From 3fb4297caeddbcfdcbcdc84dea8c30cefb90eaf4 Mon Sep 17 00:00:00 2001 From: soupette Date: Thu, 23 Sep 2021 08:19:53 +0200 Subject: [PATCH] Upgrade parts Signed-off-by: soupette --- .../pages/ListView/FieldPicker/index.js | 41 +- .../content-manager/pages/ListView/index.js | 5 +- .../pages/Users/ListPage/tests/index.test.js | 394 +++++++++--------- packages/core/admin/package.json | 4 +- packages/core/helper-plugin/package.json | 4 +- .../pages/Roles/ListPage/tests/index.test.js | 88 ++-- yarn.lock | 16 +- 7 files changed, 296 insertions(+), 256 deletions(-) diff --git a/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js b/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js index 79e58e7140..5c0850f867 100644 --- a/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js +++ b/packages/core/admin/admin/src/content-manager/pages/ListView/FieldPicker/index.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import { useDispatch, useSelector } from 'react-redux'; import { useIntl } from 'react-intl'; import { Select, Option } from '@strapi/parts/Select'; +import { Box } from '@strapi/parts/Box'; import { useTracking } from '@strapi/helper-plugin'; import { onChangeListHeaders } from '../actions'; import { selectDisplayedHeaders } from '../selectors'; @@ -43,25 +44,27 @@ const FieldPicker = ({ layout }) => { }; return ( - + + + ); }; diff --git a/packages/core/admin/admin/src/content-manager/pages/ListView/index.js b/packages/core/admin/admin/src/content-manager/pages/ListView/index.js index 89d561dcef..8fdd3a4b9c 100644 --- a/packages/core/admin/admin/src/content-manager/pages/ListView/index.js +++ b/packages/core/admin/admin/src/content-manager/pages/ListView/index.js @@ -22,6 +22,7 @@ import { Main } from '@strapi/parts/Main'; import { ActionLayout, ContentLayout, HeaderLayout } from '@strapi/parts/Layout'; import { useNotifyAT } from '@strapi/parts/LiveRegions'; import { Button } from '@strapi/parts/Button'; +import { Row } from '@strapi/parts/Row'; import Add from '@strapi/icons/Add'; import axios from 'axios'; import { axiosInstance } from '../../../core/utils'; @@ -265,10 +266,10 @@ function ListView({ {canRead && (isSearchable || isFilterable) && ( + - + } startActions={ <> diff --git a/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/tests/index.test.js b/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/tests/index.test.js index 8389183c91..ac2e021c00 100644 --- a/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/tests/index.test.js +++ b/packages/core/admin/admin/src/pages/SettingsPage/pages/Users/ListPage/tests/index.test.js @@ -85,7 +85,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { color: #666687; } - .c23 { + .c24 { font-weight: 500; font-size: 0.75rem; line-height: 1.33; @@ -102,7 +102,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { line-height: 1.14; } - .c35 { + .c36 { font-weight: 600; font-size: 0.6875rem; line-height: 1.45; @@ -130,29 +130,29 @@ describe('ADMIN | Pages | USERS | ListPage', () => { padding-bottom: 16px; } - .c21 { + .c22 { padding: 4px; } - .c24 { + .c25 { box-shadow: 0px 1px 4px rgba(33,33,52,0.1); } - .c25 { + .c26 { background: #ffffff; } - .c27 { + .c28 { padding-right: 24px; padding-left: 24px; } - .c43 { + .c44 { background: #ffffff; padding: 64px; } - .c45 { + .c46 { padding-top: 24px; } @@ -189,6 +189,24 @@ describe('ADMIN | Pages | USERS | ListPage', () => { } .c17 { + 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: flex-start; + -webkit-box-align: flex-start; + -ms-flex-align: flex-start; + align-items: flex-start; + } + + .c18 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -205,7 +223,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { flex-wrap: wrap; } - .c42 { + .c43 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -223,7 +241,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { align-items: center; } - .c46 { + .c47 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -267,7 +285,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { pointer-events: none; } - .c33 { + .c34 { margin: 0; height: 18px; min-width: 18px; @@ -277,12 +295,12 @@ describe('ADMIN | Pages | USERS | ListPage', () => { background-color: #ffffff; } - .c33:checked { + .c34:checked { background-color: #4945ff; border: 1px solid #4945ff; } - .c33:checked:after { + .c34:checked:after { content: ''; display: block; position: relative; @@ -296,21 +314,21 @@ describe('ADMIN | Pages | USERS | ListPage', () => { transform: translateX(-50%) translateY(-50%); } - .c33:checked:disabled:after { + .c34:checked:disabled:after { background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEwIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGgKICAgIGQ9Ik04LjU1MzIzIDAuMzk2OTczQzguNjMxMzUgMC4zMTYzNTUgOC43NjA1MSAwLjMxNTgxMSA4LjgzOTMxIDAuMzk1NzY4TDkuODYyNTYgMS40MzQwN0M5LjkzODkzIDEuNTExNTcgOS45MzkzNSAxLjYzNTkgOS44NjM0OSAxLjcxMzlMNC4wNjQwMSA3LjY3NzI0QzMuOTg1OSA3Ljc1NzU1IDMuODU3MDcgNy43NTgwNSAzLjc3ODM0IDcuNjc4MzRMMC4xMzg2NiAzLjk5MzMzQzAuMDYxNzc5OCAzLjkxNTQ5IDAuMDYxNzEwMiAzLjc5MDMyIDAuMTM4NTA0IDMuNzEyNEwxLjE2MjEzIDIuNjczNzJDMS4yNDAzOCAyLjU5NDMyIDEuMzY4NDMgMi41OTQyMiAxLjQ0NjggMi42NzM0OEwzLjkyMTc0IDUuMTc2NDdMOC41NTMyMyAwLjM5Njk3M1oiCiAgICBmaWxsPSIjOEU4RUE5IgogIC8+Cjwvc3ZnPg==) no-repeat no-repeat center center; } - .c33:disabled { + .c34:disabled { background-color: #dcdce4; border: 1px solid #c0c0cf; } - .c33:indeterminate { + .c34:indeterminate { background-color: #4945ff; border: 1px solid #4945ff; } - .c33:indeterminate:after { + .c34:indeterminate:after { content: ''; display: block; position: relative; @@ -325,16 +343,16 @@ describe('ADMIN | Pages | USERS | ListPage', () => { transform: translateX(-50%) translateY(-50%); } - .c33:indeterminate:disabled { + .c34:indeterminate:disabled { background-color: #dcdce4; border: 1px solid #c0c0cf; } - .c33:indeterminate:disabled:after { + .c34:indeterminate:disabled:after { background-color: #8e8ea9; } - .c38 { + .c39 { border: 0; -webkit-clip: rect(0 0 0 0); clip: rect(0 0 0 0); @@ -411,7 +429,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { background: #4945ff; } - .c22 { + .c23 { padding: 8px 16px; background: #4945ff; border: none; @@ -419,7 +437,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { background: #ffffff; } - .c22 .c1 { + .c23 .c1 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -430,61 +448,61 @@ describe('ADMIN | Pages | USERS | ListPage', () => { align-items: center; } - .c22 .c10 { + .c23 .c10 { color: #ffffff; } - .c22[aria-disabled='true'] { + .c23[aria-disabled='true'] { border: 1px solid #dcdce4; background: #eaeaef; } - .c22[aria-disabled='true'] .c10 { + .c23[aria-disabled='true'] .c10 { color: #666687; } - .c22[aria-disabled='true'] svg > g, - .c22[aria-disabled='true'] svg path { + .c23[aria-disabled='true'] svg > g, + .c23[aria-disabled='true'] svg path { fill: #666687; } - .c22[aria-disabled='true']:active { + .c23[aria-disabled='true']:active { border: 1px solid #dcdce4; background: #eaeaef; } - .c22[aria-disabled='true']:active .c10 { + .c23[aria-disabled='true']:active .c10 { color: #666687; } - .c22[aria-disabled='true']:active svg > g, - .c22[aria-disabled='true']:active svg path { + .c23[aria-disabled='true']:active svg > g, + .c23[aria-disabled='true']:active svg path { fill: #666687; } - .c22:hover { + .c23:hover { background-color: #f6f6f9; } - .c22:active { + .c23:active { background-color: #eaeaef; } - .c22 .c10 { + .c23 .c10 { color: #32324d; } - .c22 svg > g, - .c22 svg path { + .c23 svg > g, + .c23 svg path { fill: #32324d; } - .c44 { + .c45 { -webkit-animation: gzYjWD 1s infinite linear; animation: gzYjWD 1s infinite linear; } - .c36 { + .c37 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -502,30 +520,30 @@ describe('ADMIN | Pages | USERS | ListPage', () => { border: none; } - .c36 svg > g, - .c36 svg path { + .c37 svg > g, + .c37 svg path { fill: #8e8ea9; } - .c36:hover svg > g, - .c36:hover svg path { + .c37:hover svg > g, + .c37:hover svg path { fill: #666687; } - .c36:active svg > g, - .c36:active svg path { + .c37:active svg > g, + .c37:active svg path { fill: #a5a5ba; } - .c36[aria-disabled='true'] { + .c37[aria-disabled='true'] { background-color: #eaeaef; } - .c36[aria-disabled='true'] svg path { + .c37[aria-disabled='true'] svg path { fill: #666687; } - .c18 > * + * { + .c19 > * + * { margin-left: 8px; } @@ -533,11 +551,11 @@ describe('ADMIN | Pages | USERS | ListPage', () => { outline: none; } - .c61 > * + * { + .c62 > * + * { margin-left: 4px; } - .c62 { + .c63 { padding: 12px; border-radius: 4px; -webkit-text-decoration: none; @@ -548,44 +566,44 @@ describe('ADMIN | Pages | USERS | ListPage', () => { display: flex; } - .c63 { + .c64 { font-size: 0.7rem; pointer-events: none; } - .c63 svg path { - fill: #c0c0cf; - } - - .c63:focus svg path, - .c63:hover svg path { - fill: #c0c0cf; - } - - .c64 { - font-size: 0.7rem; - } - .c64 svg path { - fill: #666687; + fill: #c0c0cf; } .c64:focus svg path, .c64:hover svg path { + fill: #c0c0cf; + } + + .c65 { + font-size: 0.7rem; + } + + .c65 svg path { + fill: #666687; + } + + .c65:focus svg path, + .c65:hover svg path { fill: #4a4a6a; } - .c29 { + .c30 { width: 100%; white-space: nowrap; } - .c26 { + .c27 { position: relative; border-radius: 4px 4px 0 0; } - .c26:before { + .c27:before { background: linear-gradient(90deg,#000000 0%,rgba(0,0,0,0) 100%); opacity: 0.2; position: absolute; @@ -595,7 +613,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { left: 0; } - .c26:after { + .c27:after { background: linear-gradient(270deg,#000000 0%,rgba(0,0,0,0) 100%); opacity: 0.2; position: absolute; @@ -606,48 +624,48 @@ describe('ADMIN | Pages | USERS | ListPage', () => { top: 0; } - .c28 { + .c29 { overflow-x: auto; } - .c30 { - border-bottom: 1px solid #eaeaef; - } - .c31 { border-bottom: 1px solid #eaeaef; } - .c31 td, - .c31 th { + .c32 { + border-bottom: 1px solid #eaeaef; + } + + .c32 td, + .c32 th { padding: 16px; } - .c31 td:first-of-type, - .c31 th:first-of-type { + .c32 td:first-of-type, + .c32 th:first-of-type { padding: 0 4px; } - .c32 { + .c33 { vertical-align: middle; text-align: left; color: #666687; outline-offset: -4px; } - .c32 input { + .c33 input { vertical-align: sub; } - .c34 svg { + .c35 svg { height: 0.25rem; } - .c59 { + .c60 { padding-left: 8px; } - .c19 { + .c20 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -659,21 +677,21 @@ describe('ADMIN | Pages | USERS | ListPage', () => { border: 1px solid #dcdce4; } - .c19 svg { + .c20 svg { height: 12px; width: 12px; } - .c19 svg > g, - .c19 svg path { + .c20 svg > g, + .c20 svg path { fill: #ffffff; } - .c19[aria-disabled='true'] { + .c20[aria-disabled='true'] { pointer-events: none; } - .c20 { + .c21 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -690,30 +708,30 @@ describe('ADMIN | Pages | USERS | ListPage', () => { width: 2rem; } - .c20 svg > g, - .c20 svg path { + .c21 svg > g, + .c21 svg path { fill: #8e8ea9; } - .c20:hover svg > g, - .c20:hover svg path { + .c21:hover svg > g, + .c21:hover svg path { fill: #666687; } - .c20:active svg > g, - .c20:active svg path { + .c21:active svg > g, + .c21:active svg path { fill: #a5a5ba; } - .c20[aria-disabled='true'] { + .c21[aria-disabled='true'] { background-color: #eaeaef; } - .c20[aria-disabled='true'] svg path { + .c21[aria-disabled='true'] svg path { fill: #666687; } - .c47 { + .c48 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -727,7 +745,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { align-items: center; } - .c50 { + .c51 { position: absolute; left: 0; right: 0; @@ -738,27 +756,27 @@ describe('ADMIN | Pages | USERS | ListPage', () => { border: none; } - .c50:focus { + .c51:focus { outline: none; } - .c55 { + .c56 { font-weight: 400; font-size: 0.875rem; line-height: 1.43; color: #32324d; } - .c54 { + .c55 { padding-right: 16px; padding-left: 16px; } - .c56 { + .c57 { padding-left: 12px; } - .c51 { + .c52 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -776,7 +794,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { align-items: center; } - .c53 { + .c54 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -790,7 +808,7 @@ describe('ADMIN | Pages | USERS | ListPage', () => { align-items: center; } - .c48 { + .c49 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -800,16 +818,16 @@ describe('ADMIN | Pages | USERS | ListPage', () => { flex-direction: column; } - .c48 > * { + .c49 > * { margin-top: 0; margin-bottom: 0; } - .c48 > * + * { + .c49 > * + * { margin-top: 0px; } - .c49 { + .c50 { position: relative; border: 1px solid #dcdce4; padding-right: 12px; @@ -818,27 +836,27 @@ describe('ADMIN | Pages | USERS | ListPage', () => { overflow: hidden; } - .c49:focus-within { + .c50:focus-within { border: 1px solid #4945ff; } - .c57 { + .c58 { background: transparent; border: none; position: relative; z-index: 1; } - .c57 svg { + .c58 svg { height: 0.6875rem; width: 0.6875rem; } - .c57 svg path { + .c58 svg path { fill: #666687; } - .c58 { + .c59 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -847,51 +865,51 @@ describe('ADMIN | Pages | USERS | ListPage', () => { border: none; } - .c58 svg { + .c59 svg { width: 0.375rem; } - .c52 { + .c53 { min-height: 2.5rem; } - .c39 tr:last-of-type { + .c40 tr:last-of-type { border-bottom: none; } - .c40 { + .c41 { border-bottom: 1px solid #eaeaef; } - .c40 td, - .c40 th { + .c41 td, + .c41 th { padding: 16px; } - .c40 td:first-of-type, - .c40 th:first-of-type { + .c41 td:first-of-type, + .c41 th:first-of-type { padding: 0 4px; } - .c41 { + .c42 { vertical-align: middle; text-align: left; color: #666687; outline-offset: -4px; } - .c41 input { + .c42 input { vertical-align: sub; } - .c60 { + .c61 { font-weight: 400; font-size: 0.875rem; line-height: 1.43; color: #666687; } - .c37 { + .c38 { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); @@ -976,17 +994,17 @@ describe('ADMIN | Pages | USERS | ListPage', () => { class="c1 c16" >