@strapi/admin 4.6.0-alpha.1 → 4.6.0-beta.1
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/admin/src/components/AuthenticatedApp/index.js +13 -2
- package/admin/src/components/GlobalStyle/index.js +0 -5
- package/admin/src/content-manager/components/ComponentIcon/ComponentIcon.js +49 -0
- package/admin/src/content-manager/components/ComponentIcon/index.js +1 -0
- package/admin/src/content-manager/components/ComponentInitializer/index.js +1 -7
- package/admin/src/content-manager/components/{RepeatableComponent/DragPreview.js → DragLayer/ComponentDragPreview.js} +10 -11
- package/admin/src/content-manager/components/DragLayer/RelationDragPreview.js +75 -0
- package/admin/src/content-manager/components/DragLayer/index.js +23 -7
- package/admin/src/content-manager/components/DynamicZone/components/ComponentCard.js +17 -31
- package/admin/src/content-manager/components/DynamicZone/components/ComponentCategory.js +2 -2
- package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +129 -85
- package/admin/src/content-manager/components/DynamicZone/index.js +99 -24
- package/admin/src/content-manager/components/DynamicZone/utils/select.js +9 -5
- package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +76 -14
- package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +42 -25
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +24 -5
- package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/recursivelyFindPathsBasedOnCondition.js +8 -1
- package/admin/src/content-manager/components/InputJSON/FieldWrapper.js +10 -2
- package/admin/src/content-manager/components/InputJSON/Label.js +2 -18
- package/admin/src/content-manager/components/InputJSON/index.js +7 -3
- package/admin/src/content-manager/components/NonRepeatableComponent/index.js +4 -0
- package/admin/src/content-manager/components/RelationInput/RelationInput.js +205 -74
- package/admin/src/content-manager/components/RelationInput/components/RelationItem.js +136 -21
- package/admin/src/content-manager/components/RelationInput/components/RelationList.js +1 -2
- package/admin/src/content-manager/components/RelationInput/constants.js +1 -0
- package/admin/src/content-manager/components/RelationInput/index.js +1 -0
- package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js +132 -10
- package/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js +77 -0
- package/admin/src/content-manager/components/RepeatableComponent/components/Component.js +262 -0
- package/admin/src/content-manager/components/RepeatableComponent/{DraggedItem → components}/Preview.js +0 -0
- package/admin/src/content-manager/components/RepeatableComponent/index.js +148 -90
- package/admin/src/content-manager/components/RepeatableComponent/utils/getComponentErrorKeys.js +1 -1
- package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +1 -1
- package/admin/src/content-manager/components/Wysiwyg/Editor.js +1 -1
- package/admin/src/content-manager/hooks/index.js +2 -0
- package/admin/src/content-manager/hooks/useDragAndDrop.js +134 -0
- package/admin/src/content-manager/hooks/useKeyboardDragAndDrop.js +98 -0
- package/admin/src/content-manager/hooks/useLazyComponents/index.js +40 -15
- package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +18 -38
- package/admin/src/content-manager/sharedReducers/crudReducer/actions.js +5 -0
- package/admin/src/content-manager/sharedReducers/crudReducer/constants.js +2 -0
- package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +7 -0
- package/admin/src/content-manager/utils/ItemTypes.js +1 -1
- package/admin/src/content-manager/utils/composeRefs.js +28 -0
- package/admin/src/content-manager/utils/getMaxTempKey.js +1 -1
- package/admin/src/content-manager/utils/index.js +7 -0
- package/admin/src/core/utils/axiosInstance.js +4 -2
- package/admin/src/hooks/index.js +1 -0
- package/admin/src/hooks/useFetchClient/index.js +23 -0
- package/admin/src/hooks/useSettingsMenu/init.js +0 -7
- package/admin/src/pages/Admin/Onboarding/index.js +42 -44
- package/admin/src/pages/App/index.js +20 -13
- package/admin/src/pages/AuthPage/components/Register/index.js +1 -1
- package/admin/src/pages/AuthPage/components/ResetPassword/index.js +1 -1
- package/admin/src/pages/HomePage/SocialLinks.js +4 -4
- package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -3
- package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +23 -18
- package/admin/src/pages/SettingsPage/utils/defaultRoutes.js +0 -11
- package/admin/src/permissions/defaultPermissions.js +0 -4
- package/admin/src/translations/en.json +8 -8
- package/admin/src/translations/sk.json +274 -52
- package/admin/src/translations/tr.json +485 -5
- package/admin/src/utils/fetchClient.js +45 -0
- package/admin/src/utils/getFetchClient.js +10 -0
- package/admin/src/utils/index.js +1 -0
- package/admin/src/utils/uniqueAdminHash.js +22 -0
- package/build/2235.06c13219.chunk.js +106 -0
- package/build/2598.962797b2.chunk.js +159 -0
- package/build/4318.0bbd3f4b.chunk.js +30 -0
- package/build/4958.7c118f5e.chunk.js +276 -0
- package/build/5052.712419ea.chunk.js +65 -0
- package/build/7295.04ac49dc.chunk.js +114 -0
- package/build/805.ddcead70.chunk.js +138 -0
- package/build/{8633.8da5488a.chunk.js → 8633.59223842.chunk.js} +1 -1
- package/build/874.bde3ea04.chunk.js +104 -0
- package/build/{1233.80b05d66.chunk.js → 9159.ac968e72.chunk.js} +67 -67
- package/build/9707.77e475ee.chunk.js +101 -0
- package/build/Admin-authenticatedApp.9dd415b8.chunk.js +72 -0
- package/build/{Admin_homePage.54e33c2d.chunk.js → Admin_homePage.8945f71a.chunk.js} +5 -5
- package/build/{Admin_marketplace.8219fda6.chunk.js → Admin_marketplace.ed754a4a.chunk.js} +1 -1
- package/build/Admin_pluginsPage.67728975.chunk.js +6 -0
- package/build/{Admin_profilePage.e9fcce92.chunk.js → Admin_profilePage.60ab80bb.chunk.js} +1 -1
- package/build/{Admin_settingsPage.d3f48e9e.chunk.js → Admin_settingsPage.9ce40fed.chunk.js} +15 -15
- package/build/Upload_ConfigureTheView.7cb2a3fd.chunk.js +1 -0
- package/build/admin-app.d8fc7c4d.chunk.js +112 -0
- package/build/admin-edit-roles-page.f407538c.chunk.js +1 -0
- package/build/admin-edit-users.5547b126.chunk.js +10 -0
- package/build/{admin-users.a0748674.chunk.js → admin-users.4b6b47f8.chunk.js} +2 -2
- package/build/api-tokens-create-page.dd4ddfcb.chunk.js +1 -0
- package/build/api-tokens-edit-page.821c5a6c.chunk.js +1 -0
- package/build/{api-tokens-list-page.700e575f.chunk.js → api-tokens-list-page.50519ed7.chunk.js} +1 -1
- package/build/content-manager.f2214e32.chunk.js +1166 -0
- package/build/content-type-builder-list-view.4aea46fa.chunk.js +198 -0
- package/build/content-type-builder-translation-de-json.a52482c7.chunk.js +1 -0
- package/build/content-type-builder-translation-dk-json.a8616510.chunk.js +1 -0
- package/build/content-type-builder-translation-en-json.1d9a3c14.chunk.js +1 -0
- package/build/content-type-builder-translation-es-json.c3ea46fb.chunk.js +1 -0
- package/build/content-type-builder-translation-ko-json.3fb7ddc8.chunk.js +1 -0
- package/build/content-type-builder-translation-pl-json.9b2993b2.chunk.js +1 -0
- package/build/content-type-builder-translation-pt-BR-json.6d255441.chunk.js +1 -0
- package/build/content-type-builder-translation-sv-json.c608b9ca.chunk.js +1 -0
- package/build/content-type-builder-translation-tr-json.949e22eb.chunk.js +1 -0
- package/build/content-type-builder-translation-zh-json.b79513e4.chunk.js +1 -0
- package/build/content-type-builder.8a9a77f9.chunk.js +127 -0
- package/build/email-settings-page.c6e62f6b.chunk.js +15 -0
- package/build/email-translation-tr-json.8aa034bb.chunk.js +1 -0
- package/build/en-json.1abdade9.chunk.js +1 -0
- package/build/{i18n-settings-page.195d42fe.chunk.js → i18n-settings-page.ee572037.chunk.js} +1 -1
- package/build/i18n-translation-tr-json.34ca9d61.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/main.91f6e21e.js +4099 -0
- package/build/runtime~main.447b0382.js +2 -0
- package/build/sk-json.2af48064.chunk.js +1 -0
- package/build/sso-settings-page.91924df1.chunk.js +41 -0
- package/build/tr-json.eac8bd79.chunk.js +1 -0
- package/build/upload-settings.326cd9fd.chunk.js +89 -0
- package/build/upload-translation-en-json.32cf9aff.chunk.js +1 -0
- package/build/upload-translation-sk-json.fe86c53b.chunk.js +1 -0
- package/build/upload-translation-tr-json.b173223a.chunk.js +1 -0
- package/build/upload.2977cb13.chunk.js +38 -0
- package/build/users-advanced-settings-page.0c0b8230.chunk.js +13 -0
- package/build/users-email-settings-page.18d4a475.chunk.js +28 -0
- package/build/{users-permissions-translation-dk-json.fe39c74b.chunk.js → users-permissions-translation-dk-json.bad0b786.chunk.js} +1 -1
- package/build/{users-permissions-translation-en-json.765abf48.chunk.js → users-permissions-translation-en-json.aeab388a.chunk.js} +1 -1
- package/build/{users-permissions-translation-es-json.1bb9cde2.chunk.js → users-permissions-translation-es-json.152a923f.chunk.js} +1 -1
- package/build/{users-permissions-translation-ko-json.3be77775.chunk.js → users-permissions-translation-ko-json.6bd0ae22.chunk.js} +1 -1
- package/build/{users-permissions-translation-pl-json.1dbdd4a1.chunk.js → users-permissions-translation-pl-json.c6a02992.chunk.js} +1 -1
- package/build/{users-permissions-translation-sv-json.d5d11648.chunk.js → users-permissions-translation-sv-json.370d6eee.chunk.js} +1 -1
- package/build/users-permissions-translation-tr-json.9bebc250.chunk.js +1 -0
- package/build/{users-permissions-translation-zh-json.92f406f9.chunk.js → users-permissions-translation-zh-json.1fea833f.chunk.js} +1 -1
- package/build/users-providers-settings-page.25dd858e.chunk.js +1 -0
- package/build/users-roles-settings-page.8482a999.chunk.js +30 -0
- package/build/{webhook-edit-page.14ad1e6e.chunk.js → webhook-edit-page.dcc3d145.chunk.js} +4 -4
- package/build/{webhook-list-page.b87821f2.chunk.js → webhook-list-page.894e6959.chunk.js} +1 -1
- package/ee/server/services/passport/provider-registry.js +1 -1
- package/package.json +16 -22
- package/server/controllers/admin.js +2 -0
- package/server/routes/admin.js +1 -1
- package/server/services/metrics.js +5 -2
- package/server/services/role.js +1 -0
- package/utils/get-plugins-path.js +17 -3
- package/webpack.alias.js +0 -2
- package/admin/src/content-manager/components/BackHeader/index.js +0 -8
- package/admin/src/content-manager/components/Block/components.js +0 -28
- package/admin/src/content-manager/components/Block/index.js +0 -43
- package/admin/src/content-manager/components/Container/index.js +0 -7
- package/admin/src/content-manager/components/CustomInputCheckbox/components.js +0 -77
- package/admin/src/content-manager/components/CustomInputCheckbox/index.js +0 -53
- package/admin/src/content-manager/components/DynamicComponentCard/Wrapper.js +0 -63
- package/admin/src/content-manager/components/FilterOptionsCTA/index.js +0 -14
- package/admin/src/content-manager/components/FormTitle/index.js +0 -22
- package/admin/src/content-manager/components/FormWrapper/index.js +0 -20
- package/admin/src/content-manager/components/InputJSON/FieldError.js +0 -38
- package/admin/src/content-manager/components/LayoutTitle/index.js +0 -19
- package/admin/src/content-manager/components/PlusButton/index.js +0 -52
- package/admin/src/content-manager/components/PreviewCarret/components.js +0 -27
- package/admin/src/content-manager/components/PreviewCarret/index.js +0 -22
- package/admin/src/content-manager/components/RepeatableComponent/AccordionGroupCustom/index.js +0 -122
- package/admin/src/content-manager/components/RepeatableComponent/AddFieldButton.js +0 -58
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +0 -72
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/IconButtonCustoms.js +0 -32
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +0 -322
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/connect.js +0 -11
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/index.js +0 -2
- package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/utils/select.js +0 -30
- package/admin/src/content-manager/components/RepeatableComponent/utils/connect.js +0 -11
- package/admin/src/content-manager/components/RepeatableComponent/utils/select.js +0 -12
- package/admin/src/content-manager/components/SectionTitle/Title.js +0 -11
- package/admin/src/content-manager/components/SectionTitle/index.js +0 -26
- package/admin/src/content-manager/hooks/__test__/usePrev.test.js +0 -26
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/DynamicTable/TableRows/CellValue.js +0 -19
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/DynamicTable/TableRows/index.js +0 -65
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/ModalDialog/ActionItem.js +0 -25
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/ModalDialog/index.js +0 -76
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useFormatTimeStamp.js +0 -24
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/index.js +0 -84
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ListView/utils/tableHeaders.js +0 -37
- package/admin/src/pages/SettingsPage/pages/AuditLogs/ProtectedListPage/index.js +0 -12
- package/build/1551f4f60c37af51121f.woff2 +0 -0
- package/build/1920.74a262e7.chunk.js +0 -245
- package/build/1e59d2330b4c6deb84b3.ttf +0 -0
- package/build/20fd1704ea223900efa9.woff2 +0 -0
- package/build/2285773e6b4b172f07d9.woff +0 -0
- package/build/23f19bb08961f37aaf69.eot +0 -0
- package/build/2438.61291207.chunk.js +0 -2183
- package/build/2517.9b4940f3.chunk.js +0 -117
- package/build/2f517e09eb2ca6650ff5.svg +0 -3717
- package/build/4306.f03c2b46.chunk.js +0 -98
- package/build/4318.7931eee7.chunk.js +0 -30
- package/build/4689f52cc96215721344.svg +0 -801
- package/build/491974d108fe4002b2aa.ttf +0 -0
- package/build/4986.3820d11d.chunk.js +0 -145
- package/build/504.9aeff724.chunk.js +0 -758
- package/build/527940b104eb2ea366c8.ttf +0 -0
- package/build/77206a6bb316fa0aded5.eot +0 -0
- package/build/7a3337626410ca2f4071.woff2 +0 -0
- package/build/7a8b4f130182d19a2d7c.svg +0 -5034
- package/build/805.e991a370.chunk.js +0 -138
- package/build/8b43027f47b20503057d.eot +0 -0
- package/build/9707.a0cc4ad8.chunk.js +0 -70
- package/build/9bbb245e67a133f6e486.eot +0 -0
- package/build/Admin-authenticatedApp.ac85652e.chunk.js +0 -80
- package/build/Admin_pluginsPage.3c872de7.chunk.js +0 -6
- package/build/admin-app.77179e07.chunk.js +0 -112
- package/build/admin-audit-logs.334ee871.chunk.js +0 -1
- package/build/admin-edit-roles-page.23f15909.chunk.js +0 -1
- package/build/admin-edit-users.283b49ed.chunk.js +0 -10
- package/build/api-tokens-create-page.93dd0689.chunk.js +0 -1
- package/build/api-tokens-edit-page.b0adac81.chunk.js +0 -1
- package/build/bb58e57c48a3e911f15f.woff +0 -0
- package/build/be9ee23c0c6390141475.ttf +0 -0
- package/build/c1e38fd9e0e74ba58f7a.svg +0 -2671
- package/build/content-manager.01e04e11.chunk.js +0 -1200
- package/build/content-type-builder-list-view.4412efc3.chunk.js +0 -201
- package/build/content-type-builder-translation-de-json.0d7696b9.chunk.js +0 -1
- package/build/content-type-builder-translation-dk-json.4729f055.chunk.js +0 -1
- package/build/content-type-builder-translation-en-json.f985c9c4.chunk.js +0 -1
- package/build/content-type-builder-translation-es-json.333cf47f.chunk.js +0 -1
- package/build/content-type-builder-translation-ko-json.51201b12.chunk.js +0 -1
- package/build/content-type-builder-translation-pl-json.4a42349b.chunk.js +0 -1
- package/build/content-type-builder-translation-pt-BR-json.6fe3b8d1.chunk.js +0 -1
- package/build/content-type-builder-translation-sv-json.6deff030.chunk.js +0 -1
- package/build/content-type-builder-translation-tr-json.2e52bc60.chunk.js +0 -1
- package/build/content-type-builder-translation-zh-json.3b0afd31.chunk.js +0 -1
- package/build/content-type-builder.aa4ec633.chunk.js +0 -145
- package/build/d878b0a6a1144760244f.woff2 +0 -0
- package/build/eeccf4f66002c6f2ba24.woff +0 -0
- package/build/email-settings-page.d44a57cb.chunk.js +0 -15
- package/build/email-translation-tr-json.87f2feb3.chunk.js +0 -1
- package/build/en-json.57917cb1.chunk.js +0 -1
- package/build/f691f37e57f04c152e23.woff +0 -0
- package/build/fontawesome-css-all.15068c6e.chunk.js +0 -4618
- package/build/fontawesome-css.418f40da.chunk.js +0 -6
- package/build/fontawesome-js.252cc5f3.chunk.js +0 -7
- package/build/main.f31112a5.js +0 -2034
- package/build/runtime~main.81f05721.js +0 -2
- package/build/sk-json.7ba4b330.chunk.js +0 -1
- package/build/sso-settings-page.9f091262.chunk.js +0 -1
- package/build/tr-json.9c44ea0c.chunk.js +0 -1
- package/build/upload-settings.450cab1a.chunk.js +0 -18
- package/build/upload-translation-en-json.86da7b0a.chunk.js +0 -1
- package/build/upload-translation-sk-json.b03d4904.chunk.js +0 -1
- package/build/upload.a73936d9.chunk.js +0 -64
- package/build/users-advanced-settings-page.dc23bc56.chunk.js +0 -13
- package/build/users-email-settings-page.6541d372.chunk.js +0 -28
- package/build/users-permissions-translation-tr-json.cdc49a3c.chunk.js +0 -1
- package/build/users-providers-settings-page.e11a2f64.chunk.js +0 -33
- package/build/users-roles-settings-page.445e5e16.chunk.js +0 -30
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
const Label = styled.label`
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
position: relative;
|
|
7
|
-
vertical-align: middle;
|
|
8
|
-
> input {
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
&:before {
|
|
12
|
-
content: '';
|
|
13
|
-
position: absolute;
|
|
14
|
-
left: 15px;
|
|
15
|
-
top: calc(50% - 8px);
|
|
16
|
-
width: 14px;
|
|
17
|
-
height: 14px;
|
|
18
|
-
border: 1px solid rgba(16, 22, 34, 0.15);
|
|
19
|
-
background-color: #fdfdfd;
|
|
20
|
-
border-radius: 3px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
${({ shouldDisplaySomeChecked }) => {
|
|
24
|
-
if (shouldDisplaySomeChecked) {
|
|
25
|
-
return css`
|
|
26
|
-
&:after {
|
|
27
|
-
content: '\f068';
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: calc(50% - 8px);
|
|
30
|
-
left: 18px;
|
|
31
|
-
font-size: 10px;
|
|
32
|
-
font-family: 'FontAwesome';
|
|
33
|
-
font-weight: 100;
|
|
34
|
-
color: #1c5de7;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
}
|
|
38
|
-
}}
|
|
39
|
-
|
|
40
|
-
${({ shouldDisplayAllChecked }) => {
|
|
41
|
-
if (shouldDisplayAllChecked) {
|
|
42
|
-
return css`
|
|
43
|
-
&:after {
|
|
44
|
-
content: '\f00c';
|
|
45
|
-
position: absolute;
|
|
46
|
-
top: calc(50% - 9px);
|
|
47
|
-
left: 17px;
|
|
48
|
-
font-size: 10px;
|
|
49
|
-
font-family: 'FontAwesome';
|
|
50
|
-
font-weight: 100;
|
|
51
|
-
color: #1c5de7;
|
|
52
|
-
transition: all 0.2s;
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
}
|
|
56
|
-
}}
|
|
57
|
-
|
|
58
|
-
${({ isChecked }) => {
|
|
59
|
-
if (isChecked) {
|
|
60
|
-
return css`
|
|
61
|
-
&:after {
|
|
62
|
-
content: '\f00c';
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: calc(50% - 11px);
|
|
65
|
-
left: 17px;
|
|
66
|
-
font-size: 10px;
|
|
67
|
-
font-family: 'FontAwesome';
|
|
68
|
-
font-weight: 100;
|
|
69
|
-
color: #1c5de7;
|
|
70
|
-
transition: all 0.2s;
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
}
|
|
74
|
-
}}
|
|
75
|
-
`;
|
|
76
|
-
|
|
77
|
-
export { Label };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* CustomInputCheckbox
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { memo } from 'react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import { Label } from './components';
|
|
9
|
-
|
|
10
|
-
function CustomInputCheckbox({ entriesToDelete, isAll, name, onChange, value }) {
|
|
11
|
-
const shouldDisplaySomeChecked = isAll && entriesToDelete.length > 0 && !value;
|
|
12
|
-
|
|
13
|
-
const shouldDisplayAllChecked = isAll && value;
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<span className="form-check" style={{ marginLeft: '-15px' }}>
|
|
17
|
-
<Label
|
|
18
|
-
className="form-check-label"
|
|
19
|
-
isAll={isAll}
|
|
20
|
-
shouldDisplaySomeChecked={shouldDisplaySomeChecked}
|
|
21
|
-
shouldDisplayAllChecked={shouldDisplayAllChecked}
|
|
22
|
-
isChecked={value && !isAll}
|
|
23
|
-
htmlFor={name}
|
|
24
|
-
>
|
|
25
|
-
<input
|
|
26
|
-
className="form-check-input"
|
|
27
|
-
checked={value}
|
|
28
|
-
id={name}
|
|
29
|
-
name={name}
|
|
30
|
-
onChange={onChange}
|
|
31
|
-
type="checkbox"
|
|
32
|
-
/>
|
|
33
|
-
</Label>
|
|
34
|
-
</span>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
CustomInputCheckbox.defaultProps = {
|
|
39
|
-
entriesToDelete: [],
|
|
40
|
-
isAll: false,
|
|
41
|
-
name: '',
|
|
42
|
-
value: false,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
CustomInputCheckbox.propTypes = {
|
|
46
|
-
entriesToDelete: PropTypes.array,
|
|
47
|
-
isAll: PropTypes.bool,
|
|
48
|
-
name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
49
|
-
onChange: PropTypes.func.isRequired,
|
|
50
|
-
value: PropTypes.bool,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default memo(CustomInputCheckbox);
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const Wrapper = styled.div`
|
|
4
|
-
position: relative;
|
|
5
|
-
height: 90px;
|
|
6
|
-
width: 139px !important;
|
|
7
|
-
margin: 0 10px 10px 0;
|
|
8
|
-
padding: 18px 10px;
|
|
9
|
-
background-color: #ffffff;
|
|
10
|
-
color: #919bae;
|
|
11
|
-
text-align: center;
|
|
12
|
-
border-radius: 2px;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
border: 1px solid #ffffff;
|
|
15
|
-
|
|
16
|
-
button {
|
|
17
|
-
outline: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.component-uid {
|
|
21
|
-
width: 119px;
|
|
22
|
-
text-overflow: ellipsis;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
color: #919bae;
|
|
26
|
-
font-weight: 500;
|
|
27
|
-
font-size: 13px;
|
|
28
|
-
line-height: normal;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.component-icon {
|
|
32
|
-
width: 35px;
|
|
33
|
-
height: 35px;
|
|
34
|
-
margin-bottom: 5px;
|
|
35
|
-
line-height: 35px;
|
|
36
|
-
align-self: center;
|
|
37
|
-
border-radius: 50%;
|
|
38
|
-
background-color: #e9eaeb;
|
|
39
|
-
color: #b4b6ba;
|
|
40
|
-
padding: 0;
|
|
41
|
-
i,
|
|
42
|
-
svg {
|
|
43
|
-
margin: auto;
|
|
44
|
-
display: block;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:hover {
|
|
49
|
-
background-color: #e6f0fb;
|
|
50
|
-
color: #007eff;
|
|
51
|
-
border: 1px solid #aed4fb;
|
|
52
|
-
|
|
53
|
-
.component-icon {
|
|
54
|
-
background-color: #aed4fb;
|
|
55
|
-
color: #007eff;
|
|
56
|
-
}
|
|
57
|
-
.component-uid {
|
|
58
|
-
color: #007eff;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
|
|
63
|
-
export default Wrapper;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const FilterOptionsCTA = styled.button`
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
height: 20px;
|
|
7
|
-
width: 20px;
|
|
8
|
-
margin: 8px 5px 0px 0px;
|
|
9
|
-
border-radius: 50%;
|
|
10
|
-
border: 1px solid #e3e9f3;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
export default FilterOptionsCTA;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React, { memo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormattedMessage } from 'react-intl';
|
|
4
|
-
|
|
5
|
-
const FormTitle = ({ description, title }) => (
|
|
6
|
-
<>
|
|
7
|
-
{!!title && <FormattedMessage id={title} />}
|
|
8
|
-
{!!description && <FormattedMessage id={description}>{(msg) => <p>{msg}</p>}</FormattedMessage>}
|
|
9
|
-
</>
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
FormTitle.propTypes = {
|
|
13
|
-
description: PropTypes.string,
|
|
14
|
-
title: PropTypes.string,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
FormTitle.defaultProps = {
|
|
18
|
-
description: null,
|
|
19
|
-
title: null,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default memo(FormTitle);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const FormWrapper = styled.div`
|
|
4
|
-
padding: 22px 10px 0 10px;
|
|
5
|
-
background: #ffffff;
|
|
6
|
-
border-radius: 2px;
|
|
7
|
-
box-shadow: 0 2px 4px #e3e9f3;
|
|
8
|
-
margin-bottom: 17px;
|
|
9
|
-
> div {
|
|
10
|
-
margin-right: 0;
|
|
11
|
-
margin-left: 0;
|
|
12
|
-
}
|
|
13
|
-
.row {
|
|
14
|
-
&:last-of-type {
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
|
|
20
|
-
export default FormWrapper;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
5
|
-
|
|
6
|
-
export const FieldError = ({ id, error, name }) => {
|
|
7
|
-
const { formatMessage } = useIntl();
|
|
8
|
-
const errorMessage = error ? formatMessage({ id: error, defaultMessage: error }) : '';
|
|
9
|
-
|
|
10
|
-
if (!error) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Typography
|
|
16
|
-
as="p"
|
|
17
|
-
variant="pi"
|
|
18
|
-
id={`${id || name}-error`}
|
|
19
|
-
textColor="danger600"
|
|
20
|
-
data-strapi-field-error
|
|
21
|
-
>
|
|
22
|
-
{errorMessage}
|
|
23
|
-
</Typography>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
FieldError.defaultProps = {
|
|
28
|
-
id: undefined,
|
|
29
|
-
error: undefined,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
FieldError.propTypes = {
|
|
33
|
-
error: PropTypes.string,
|
|
34
|
-
id: PropTypes.string,
|
|
35
|
-
name: PropTypes.string.isRequired,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default FieldError;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const LayoutTitle = styled.div`
|
|
4
|
-
color: #333740;
|
|
5
|
-
font-size: 13px;
|
|
6
|
-
font-weight: 500;
|
|
7
|
-
line-height: 18px;
|
|
8
|
-
|
|
9
|
-
p {
|
|
10
|
-
margin-top: 2px;
|
|
11
|
-
margin-bottom: 13px;
|
|
12
|
-
color: #9ea7b8;
|
|
13
|
-
font-size: 12px;
|
|
14
|
-
font-weight: 400;
|
|
15
|
-
line-height: normal;
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export default LayoutTitle;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const beforeStyle = `
|
|
4
|
-
content: ' ';
|
|
5
|
-
position: absolute;
|
|
6
|
-
display: block;
|
|
7
|
-
width: 14px;
|
|
8
|
-
height: 2px;
|
|
9
|
-
left: 11px;
|
|
10
|
-
top: 17px;
|
|
11
|
-
bottom: 10px;
|
|
12
|
-
z-index: 9;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
const afterStyle = `
|
|
16
|
-
content: ' ';
|
|
17
|
-
position: absolute;
|
|
18
|
-
display: block;
|
|
19
|
-
height: 14px;
|
|
20
|
-
width: 2px;
|
|
21
|
-
left: 17px;
|
|
22
|
-
top: 11px;
|
|
23
|
-
right: 10px;
|
|
24
|
-
z-index: 9;
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
const Button = styled.button`
|
|
28
|
-
position: relative;
|
|
29
|
-
height: 36px;
|
|
30
|
-
width: 36px;
|
|
31
|
-
background-color: #f3f4f4;
|
|
32
|
-
border-radius: 50%;
|
|
33
|
-
text-align: center;
|
|
34
|
-
|
|
35
|
-
:focus {
|
|
36
|
-
outline: 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:before {
|
|
40
|
-
${beforeStyle}
|
|
41
|
-
}
|
|
42
|
-
:after {
|
|
43
|
-
${afterStyle}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:before,
|
|
47
|
-
:after {
|
|
48
|
-
background-color: #b4b6ba;
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
export default Button;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
/* eslint-disable indent */
|
|
4
|
-
const Wrapper = styled.div`
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
justify-content: space-around;
|
|
8
|
-
height: 30px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 0 5px;
|
|
11
|
-
|
|
12
|
-
${({ isComponent }) =>
|
|
13
|
-
isComponent &&
|
|
14
|
-
`
|
|
15
|
-
height: 34px;
|
|
16
|
-
padding: 0;
|
|
17
|
-
`}
|
|
18
|
-
|
|
19
|
-
border-radius: 2px;
|
|
20
|
-
> div {
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 2px;
|
|
23
|
-
background: #007eff;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
export default Wrapper;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React, { memo } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import Wrapper from './components';
|
|
5
|
-
|
|
6
|
-
const PreviewCarret = ({ isComponent, style }) => (
|
|
7
|
-
<Wrapper isComponent={isComponent} style={style}>
|
|
8
|
-
<div />
|
|
9
|
-
</Wrapper>
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
PreviewCarret.defaultProps = {
|
|
13
|
-
isComponent: false,
|
|
14
|
-
style: {},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
PreviewCarret.propTypes = {
|
|
18
|
-
isComponent: PropTypes.bool,
|
|
19
|
-
style: PropTypes.object,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default memo(PreviewCarret);
|
package/admin/src/content-manager/components/RepeatableComponent/AccordionGroupCustom/index.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import React, { Children, cloneElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { useIntl } from 'react-intl';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { Box } from '@strapi/design-system/Box';
|
|
6
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
7
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
8
|
-
import { KeyboardNavigable } from '@strapi/design-system/KeyboardNavigable';
|
|
9
|
-
|
|
10
|
-
const AccordionFooter = styled(Box)`
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
13
|
-
border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
14
|
-
border-left: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
15
|
-
border-radius: 0 0 ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
const EnhancedGroup = styled(Box)`
|
|
19
|
-
> div {
|
|
20
|
-
& > * {
|
|
21
|
-
border-radius: unset;
|
|
22
|
-
border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
23
|
-
border-left: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
24
|
-
border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
25
|
-
}
|
|
26
|
-
> div {
|
|
27
|
-
> div:first-of-type {
|
|
28
|
-
border-radius: unset;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
> div:first-of-type {
|
|
34
|
-
> div {
|
|
35
|
-
border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
|
|
36
|
-
> div:first-of-type {
|
|
37
|
-
border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
> div:not([data-strapi-expanded='true']) {
|
|
42
|
-
border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
border-top: 1px solid ${({ theme }) => theme.colors.primary600};
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
> span {
|
|
50
|
-
border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
|
|
51
|
-
border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
& [data-strapi-expanded='true'] {
|
|
56
|
-
border: 1px solid ${({ theme }) => theme.colors.primary600};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
${({ theme, footer }) => `
|
|
60
|
-
&:not(${footer}) {
|
|
61
|
-
& > *:last-of-type {
|
|
62
|
-
border-radius: 0 0 ${theme.borderRadius} ${theme.borderRadius};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
`}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
const LabelAction = styled(Box)`
|
|
69
|
-
svg path {
|
|
70
|
-
fill: ${({ theme }) => theme.colors.neutral500};
|
|
71
|
-
}
|
|
72
|
-
`;
|
|
73
|
-
|
|
74
|
-
const AccordionGroupCustom = ({ children, footer, label, labelAction, error }) => {
|
|
75
|
-
const { formatMessage } = useIntl();
|
|
76
|
-
const childrenArray = Children.toArray(children).map((child) => {
|
|
77
|
-
return cloneElement(child, { hasErrorMessage: false });
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<KeyboardNavigable attributeName="data-strapi-accordion-toggle">
|
|
82
|
-
{label && (
|
|
83
|
-
<Flex paddingBottom={1}>
|
|
84
|
-
<Typography as="label" textColor="neutral800" variant="pi" fontWeight="bold">
|
|
85
|
-
{label}
|
|
86
|
-
</Typography>
|
|
87
|
-
{labelAction && <LabelAction paddingLeft={1}>{labelAction}</LabelAction>}
|
|
88
|
-
</Flex>
|
|
89
|
-
)}
|
|
90
|
-
<EnhancedGroup footer={footer}>{childrenArray}</EnhancedGroup>
|
|
91
|
-
{footer && <AccordionFooter>{footer}</AccordionFooter>}
|
|
92
|
-
{error && (
|
|
93
|
-
<Box paddingTop={1}>
|
|
94
|
-
<Typography variant="pi" textColor="danger600">
|
|
95
|
-
{formatMessage({ id: error.id, defaultMessage: error.id }, { ...error.values })}
|
|
96
|
-
</Typography>
|
|
97
|
-
</Box>
|
|
98
|
-
)}
|
|
99
|
-
</KeyboardNavigable>
|
|
100
|
-
);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
AccordionGroupCustom.defaultProps = {
|
|
104
|
-
error: undefined,
|
|
105
|
-
footer: null,
|
|
106
|
-
label: null,
|
|
107
|
-
labelAction: undefined,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
AccordionGroupCustom.propTypes = {
|
|
111
|
-
children: PropTypes.node.isRequired,
|
|
112
|
-
error: PropTypes.shape({
|
|
113
|
-
id: PropTypes.string.isRequired,
|
|
114
|
-
defaultMessage: PropTypes.string.isRequired,
|
|
115
|
-
values: PropTypes.object,
|
|
116
|
-
}),
|
|
117
|
-
footer: PropTypes.node,
|
|
118
|
-
label: PropTypes.string,
|
|
119
|
-
labelAction: PropTypes.node,
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export default AccordionGroupCustom;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { useIntl } from 'react-intl';
|
|
5
|
-
import { Box } from '@strapi/design-system/Box';
|
|
6
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
7
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
8
|
-
import Plus from '@strapi/icons/Plus';
|
|
9
|
-
import { pxToRem } from '@strapi/helper-plugin';
|
|
10
|
-
import { getTrad } from '../../utils';
|
|
11
|
-
|
|
12
|
-
const StyledButton = styled(Box)`
|
|
13
|
-
width: 100%;
|
|
14
|
-
border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
|
|
15
|
-
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
const StyledIcon = styled(Plus)`
|
|
19
|
-
width: ${pxToRem(10)};
|
|
20
|
-
height: ${pxToRem(10)};
|
|
21
|
-
margin-right: ${({ theme }) => theme.spaces[2]};
|
|
22
|
-
|
|
23
|
-
> path {
|
|
24
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
const Button = ({ disabled, onClick }) => {
|
|
29
|
-
const { formatMessage } = useIntl();
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<StyledButton
|
|
33
|
-
as="button"
|
|
34
|
-
disabled={disabled}
|
|
35
|
-
type="button"
|
|
36
|
-
paddingTop={2}
|
|
37
|
-
paddingBottom={2}
|
|
38
|
-
onClick={onClick}
|
|
39
|
-
>
|
|
40
|
-
<Flex justifyContent="center">
|
|
41
|
-
<Typography fontWeight="bold" textColor="primary600">
|
|
42
|
-
<StyledIcon />
|
|
43
|
-
{formatMessage({
|
|
44
|
-
id: getTrad('containers.EditView.add.new-entry'),
|
|
45
|
-
defaultMessage: 'Add an entry',
|
|
46
|
-
})}
|
|
47
|
-
</Typography>
|
|
48
|
-
</Flex>
|
|
49
|
-
</StyledButton>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
Button.propTypes = {
|
|
54
|
-
disabled: PropTypes.bool.isRequired,
|
|
55
|
-
onClick: PropTypes.func.isRequired,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default Button;
|
package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { Stack } from '@strapi/design-system/Stack';
|
|
5
|
-
import { Flex } from '@strapi/design-system/Flex';
|
|
6
|
-
import { TextButton } from '@strapi/design-system/TextButton';
|
|
7
|
-
import { Icon } from '@strapi/design-system/Icon';
|
|
8
|
-
import { Typography } from '@strapi/design-system/Typography';
|
|
9
|
-
import Trash from '@strapi/icons/Trash';
|
|
10
|
-
import Drag from '@strapi/icons/Drag';
|
|
11
|
-
import DropdownIcon from '@strapi/icons/CarretDown';
|
|
12
|
-
import { CustomIconButtonSibling } from './IconButtonCustoms';
|
|
13
|
-
|
|
14
|
-
const SiblingWrapper = styled.span`
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: space-between;
|
|
17
|
-
padding-left: ${({ theme }) => theme.spaces[4]};
|
|
18
|
-
padding-right: ${({ theme }) => theme.spaces[4]};
|
|
19
|
-
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
20
|
-
height: ${50 / 16}rem;
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
const ToggleButton = styled(TextButton)`
|
|
24
|
-
text-align: left;
|
|
25
|
-
|
|
26
|
-
svg {
|
|
27
|
-
width: ${14 / 16}rem;
|
|
28
|
-
height: ${14 / 16}rem;
|
|
29
|
-
|
|
30
|
-
path {
|
|
31
|
-
fill: ${({ theme, expanded }) =>
|
|
32
|
-
expanded ? theme.colors.primary600 : theme.colors.neutral500};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
const DraggingSibling = ({ displayedValue }) => {
|
|
38
|
-
return (
|
|
39
|
-
<SiblingWrapper>
|
|
40
|
-
<Stack horizontal spacing={3} flex={1}>
|
|
41
|
-
<Flex
|
|
42
|
-
justifyContent="center"
|
|
43
|
-
borderRadius="50%"
|
|
44
|
-
height={`${24 / 16}rem}`}
|
|
45
|
-
width={`${24 / 16}rem}`}
|
|
46
|
-
aria-hidden
|
|
47
|
-
as="span"
|
|
48
|
-
background="neutral200"
|
|
49
|
-
>
|
|
50
|
-
<Icon as={DropdownIcon} width={`${8 / 16}rem}`} color="neutral600" />
|
|
51
|
-
</Flex>
|
|
52
|
-
|
|
53
|
-
<ToggleButton onClick={() => {}} flex={1}>
|
|
54
|
-
<Typography fontWeight="bold" textColor="neutral700">
|
|
55
|
-
{displayedValue}
|
|
56
|
-
</Typography>
|
|
57
|
-
</ToggleButton>
|
|
58
|
-
</Stack>
|
|
59
|
-
|
|
60
|
-
<Stack horizontal spacing={0}>
|
|
61
|
-
<CustomIconButtonSibling noBorder onClick={() => {}} icon={<Trash />} />
|
|
62
|
-
<CustomIconButtonSibling icon={<Drag />} noBorder />
|
|
63
|
-
</Stack>
|
|
64
|
-
</SiblingWrapper>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
DraggingSibling.propTypes = {
|
|
69
|
-
displayedValue: PropTypes.string.isRequired,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default DraggingSibling;
|
package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/IconButtonCustoms.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { IconButton } from '@strapi/design-system/IconButton';
|
|
3
|
-
|
|
4
|
-
export const CustomIconButton = styled(IconButton)`
|
|
5
|
-
background-color: transparent;
|
|
6
|
-
|
|
7
|
-
svg {
|
|
8
|
-
path {
|
|
9
|
-
fill: ${({ theme, expanded }) =>
|
|
10
|
-
expanded ? theme.colors.primary600 : theme.colors.neutral600};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
svg {
|
|
16
|
-
path {
|
|
17
|
-
fill: ${({ theme }) => theme.colors.primary600};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
export const CustomIconButtonSibling = styled(IconButton)`
|
|
24
|
-
background-color: transparent;
|
|
25
|
-
|
|
26
|
-
svg {
|
|
27
|
-
path {
|
|
28
|
-
fill: ${({ theme, expanded }) =>
|
|
29
|
-
expanded ? theme.colors.primary600 : theme.colors.neutral600};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
`;
|