@strapi/admin 4.1.1 → 4.2.0-alpha.O

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.
Files changed (177) hide show
  1. package/admin/src/StrapiApp.js +40 -42
  2. package/admin/src/components/AutoReloadOverlayBlockerProvider/Blocker.js +2 -2
  3. package/admin/src/components/GuidedTour/Homepage/index.js +1 -1
  4. package/admin/src/components/GuidedTour/Modal/components/Content.js +1 -1
  5. package/admin/src/components/GuidedTour/Modal/components/Modal.js +2 -2
  6. package/admin/src/components/LeftMenu/index.js +1 -1
  7. package/admin/src/components/Notifications/index.js +1 -1
  8. package/admin/src/components/Providers/index.js +65 -32
  9. package/admin/src/components/Theme/index.js +11 -12
  10. package/admin/src/components/ThemeToggleProvider/index.js +66 -0
  11. package/admin/src/{pages/AuthPage/components/Logo → components/UnauthenticatedLogo}/index.js +1 -1
  12. package/admin/src/components/UpgradePlanModal/index.js +2 -2
  13. package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +4 -4
  14. package/admin/src/content-manager/components/ComponentInitializer/index.js +1 -1
  15. package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +1 -1
  16. package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +1 -1
  17. package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +2 -2
  18. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +1 -1
  19. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +1 -1
  20. package/admin/src/content-manager/components/DynamicZone/index.js +2 -5
  21. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +1 -6
  22. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +0 -9
  23. package/admin/src/content-manager/components/FieldComponent/index.js +2 -5
  24. package/admin/src/content-manager/components/InputJSON/index.js +2 -5
  25. package/admin/src/content-manager/components/InputUID/index.js +1 -2
  26. package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -1
  27. package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +2 -2
  28. package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +4 -7
  29. package/admin/src/content-manager/components/SelectMany/index.js +2 -2
  30. package/admin/src/content-manager/components/SelectOne/index.js +1 -1
  31. package/admin/src/content-manager/components/SelectWrapper/index.js +2 -5
  32. package/admin/src/content-manager/components/SelectWrapper/utils/getSelectStyles.js +1 -0
  33. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +4 -4
  34. package/admin/src/content-manager/components/Wysiwyg/EditorStylesContainer.js +5 -3
  35. package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +2 -2
  36. package/admin/src/content-manager/components/Wysiwyg/index.js +2 -2
  37. package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +2 -2
  38. package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +1 -1
  39. package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFields.js +2 -2
  40. package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
  41. package/admin/src/content-manager/pages/EditView/Header/index.js +4 -7
  42. package/admin/src/content-manager/pages/EditView/Informations/index.js +1 -1
  43. package/admin/src/content-manager/pages/EditView/index.js +5 -5
  44. package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +1 -1
  45. package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +1 -1
  46. package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +1 -1
  47. package/admin/src/contexts/ThemeToggle/index.js +5 -0
  48. package/admin/src/contexts/index.js +1 -0
  49. package/admin/src/hooks/index.js +1 -0
  50. package/admin/src/hooks/useSettingsMenu/init.js +2 -2
  51. package/admin/src/hooks/useThemeToggle/index.js +10 -0
  52. package/admin/src/pages/Admin/Onboarding/index.js +1 -1
  53. package/admin/src/pages/App/index.js +2 -0
  54. package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +2 -2
  55. package/admin/src/pages/AuthPage/components/ForgotPasswordSuccess/index.js +1 -1
  56. package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +2 -2
  57. package/admin/src/pages/AuthPage/components/Oops/index.js +1 -1
  58. package/admin/src/pages/AuthPage/components/Register/index.js +224 -223
  59. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +2 -2
  60. package/admin/src/pages/AuthPage/index.js +20 -17
  61. package/admin/src/pages/HomePage/ContentBlocks.js +1 -1
  62. package/admin/src/pages/HomePage/HomeHeader.js +1 -1
  63. package/admin/src/pages/HomePage/SocialLinks.js +2 -5
  64. package/admin/src/pages/MarketplacePage/index.js +13 -4
  65. package/admin/src/pages/ProfilePage/index.js +79 -15
  66. package/admin/src/pages/ProfilePage/utils/api.js +4 -2
  67. package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +4 -1
  68. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
  69. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
  70. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +1 -1
  71. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +2 -2
  72. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +1 -1
  73. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +1 -1
  74. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -2
  75. package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +3 -3
  76. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +2 -2
  77. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
  78. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +1 -1
  79. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +4 -4
  80. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -3
  81. package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +1 -1
  82. package/admin/src/pages/UseCasePage/index.js +173 -0
  83. package/admin/src/translations/en.json +15 -2
  84. package/build/1094.e1db3a1a.chunk.js +1 -0
  85. package/build/1454.f065d92a.chunk.js +2 -0
  86. package/build/{5032.ed02a466.chunk.js.LICENSE.txt → 1454.f065d92a.chunk.js.LICENSE.txt} +0 -0
  87. package/build/1856.a30bd09b.chunk.js +1 -0
  88. package/build/2481.4eae9408.chunk.js +1 -0
  89. package/build/{2912.38fb9bd1.chunk.js → 2912.c5f76e65.chunk.js} +1 -1
  90. package/build/4362.86a4e939.chunk.js +1 -0
  91. package/build/4715.8a2db02a.chunk.js +1 -0
  92. package/build/{4800.18e59c83.chunk.js → 4800.f4a1384a.chunk.js} +1 -1
  93. package/build/497.3fcf6196.chunk.js +1 -0
  94. package/build/4982.601f6196.chunk.js +1 -0
  95. package/build/6404.3c2d0a81.chunk.js +1 -0
  96. package/build/{7841.ef9bcee9.chunk.js → 7841.490dbbf1.chunk.js} +1 -1
  97. package/build/{8042.9b85175a.chunk.js → 8042.1d66811a.chunk.js} +2 -2
  98. package/build/{8042.9b85175a.chunk.js.LICENSE.txt → 8042.1d66811a.chunk.js.LICENSE.txt} +0 -0
  99. package/build/849.17f011e8.chunk.js +1 -0
  100. package/build/{2736.ee6e45c9.chunk.js → 9260.fa40c7bd.chunk.js} +2 -2
  101. package/build/{2736.ee6e45c9.chunk.js.LICENSE.txt → 9260.fa40c7bd.chunk.js.LICENSE.txt} +0 -0
  102. package/build/9853.6ff595fa.chunk.js +1 -0
  103. package/build/{9988.b4229043.chunk.js → 9988.fe838ba6.chunk.js} +2 -2
  104. package/build/{9988.b4229043.chunk.js.LICENSE.txt → 9988.fe838ba6.chunk.js.LICENSE.txt} +0 -0
  105. package/build/Admin-authenticatedApp.a5d2c5fa.chunk.js +1 -0
  106. package/build/Admin_homePage.d6754c66.chunk.js +1 -0
  107. package/build/Admin_marketplace.419010d8.chunk.js +1 -0
  108. package/build/Admin_profilePage.d7192d06.chunk.js +1 -0
  109. package/build/Admin_settingsPage.a8c7ded5.chunk.js +1 -0
  110. package/build/admin-edit-roles-page.49b6f01d.chunk.js +1 -0
  111. package/build/admin-edit-users.381e4a0d.chunk.js +1 -0
  112. package/build/admin-users.1fda1f27.chunk.js +1 -0
  113. package/build/{api-tokens-create-page.0981141a.chunk.js → api-tokens-create-page.db17bb39.chunk.js} +1 -1
  114. package/build/{api-tokens-edit-page.3faf1af1.chunk.js → api-tokens-edit-page.c7299a77.chunk.js} +1 -1
  115. package/build/content-manager.8412e024.chunk.js +1 -0
  116. package/build/content-type-builder-translation-en-json.8034dab6.chunk.js +1 -0
  117. package/build/content-type-builder.cda4ba3c.chunk.js +1 -0
  118. package/build/{email-settings-page.4338588d.chunk.js → email-settings-page.40ee2bda.chunk.js} +1 -1
  119. package/build/{en-json.bb614bb0.chunk.js → en-json.b35c285f.chunk.js} +1 -1
  120. package/build/i18n-settings-page.c4018651.chunk.js +1 -0
  121. package/build/i18n-translation-de-json.c5c9054f.chunk.js +1 -0
  122. package/build/index.html +1 -1
  123. package/build/main.3e719c82.js +2 -0
  124. package/build/{main.fc123ed7.js.LICENSE.txt → main.3e719c82.js.LICENSE.txt} +0 -0
  125. package/build/runtime~main.66becdbd.js +1 -0
  126. package/build/{sso-settings-page.c073b6d7.chunk.js → sso-settings-page.121dd0a6.chunk.js} +1 -1
  127. package/build/{upload-settings.8e7cbc3b.chunk.js → upload-settings.4401f36d.chunk.js} +1 -1
  128. package/build/{upload.803ab265.chunk.js → upload.5a2dded7.chunk.js} +1 -1
  129. package/build/{users-advanced-settings-page.7694d3c9.chunk.js → users-advanced-settings-page.8905d8d8.chunk.js} +1 -1
  130. package/build/users-email-settings-page.5abb9575.chunk.js +1 -0
  131. package/build/users-permissions-translation-en-json.21b0fd2f.chunk.js +1 -0
  132. package/build/users-providers-settings-page.368893ed.chunk.js +1 -0
  133. package/build/users-roles-settings-page.a2f6277a.chunk.js +1 -0
  134. package/build/webhook-edit-page.d170eda1.chunk.js +1 -0
  135. package/build/{webhook-list-page.5c8f2a91.chunk.js → webhook-list-page.c21b5a9a.chunk.js} +1 -1
  136. package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
  137. package/ee/admin/pages/AuthPage/components/Providers/index.js +2 -2
  138. package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +1 -1
  139. package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +3 -3
  140. package/index.js +6 -1
  141. package/package.json +7 -7
  142. package/server/routes/serve-admin-panel.js +18 -6
  143. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/isValidJSONString.js +0 -15
  144. package/admin/src/themes/colors.js +0 -51
  145. package/admin/src/themes/fontWeights.js +0 -8
  146. package/admin/src/themes/index.js +0 -13
  147. package/admin/src/themes/sizes.js +0 -31
  148. package/build/1856.a06395b4.chunk.js +0 -1
  149. package/build/2481.7d15bd79.chunk.js +0 -1
  150. package/build/4261.a4e1e93c.chunk.js +0 -1
  151. package/build/4362.d0c1a04a.chunk.js +0 -1
  152. package/build/4715.31ca1967.chunk.js +0 -1
  153. package/build/497.8f30da61.chunk.js +0 -1
  154. package/build/4982.da4adb38.chunk.js +0 -1
  155. package/build/5032.ed02a466.chunk.js +0 -2
  156. package/build/6250.dc6d7a58.chunk.js +0 -1
  157. package/build/849.9075d399.chunk.js +0 -1
  158. package/build/9238.bdd93dae.chunk.js +0 -1
  159. package/build/Admin-authenticatedApp.013e2774.chunk.js +0 -1
  160. package/build/Admin_homePage.e4779166.chunk.js +0 -1
  161. package/build/Admin_marketplace.e8654056.chunk.js +0 -1
  162. package/build/Admin_profilePage.67dd744c.chunk.js +0 -1
  163. package/build/Admin_settingsPage.2d0d2cca.chunk.js +0 -1
  164. package/build/admin-edit-roles-page.2d1b6461.chunk.js +0 -1
  165. package/build/admin-edit-users.e736db15.chunk.js +0 -1
  166. package/build/admin-users.5f79c031.chunk.js +0 -1
  167. package/build/content-manager.141d110d.chunk.js +0 -1
  168. package/build/content-type-builder-translation-en-json.b3d8e9d4.chunk.js +0 -1
  169. package/build/content-type-builder.f1cef05c.chunk.js +0 -1
  170. package/build/i18n-settings-page.51e37957.chunk.js +0 -1
  171. package/build/main.fc123ed7.js +0 -2
  172. package/build/runtime~main.0866074a.js +0 -1
  173. package/build/users-email-settings-page.862eb51e.chunk.js +0 -1
  174. package/build/users-permissions-translation-en-json.1993655e.chunk.js +0 -1
  175. package/build/users-providers-settings-page.47f97b06.chunk.js +0 -1
  176. package/build/users-roles-settings-page.b67e2b4d.chunk.js +0 -1
  177. package/build/webhook-edit-page.adad0a42.chunk.js +0 -1
@@ -124,8 +124,7 @@ const InputUID = ({
124
124
  if (
125
125
  debouncedValue &&
126
126
  debouncedValue.trim().match(UID_REGEX) &&
127
- debouncedValue !== initialValue &&
128
- !value
127
+ debouncedValue !== initialValue
129
128
  ) {
130
129
  checkAvailability();
131
130
  }
@@ -28,7 +28,7 @@ const NonRepeatableComponent = ({ componentUid, isFromDynamicZone, isNested, nam
28
28
  hasRadius={isNested}
29
29
  borderColor={isNested ? 'neutral200' : ''}
30
30
  >
31
- <Stack size={6}>
31
+ <Stack spacing={6}>
32
32
  {fields.map((fieldRow, key) => {
33
33
  return (
34
34
  <Grid gap={4} key={key}>
@@ -37,7 +37,7 @@ const ToggleButton = styled(TextButton)`
37
37
  const DraggingSibling = ({ displayedValue }) => {
38
38
  return (
39
39
  <SiblingWrapper>
40
- <Stack horizontal size={3} flex={1}>
40
+ <Stack horizontal spacing={3} flex={1}>
41
41
  <Flex
42
42
  justifyContent="center"
43
43
  borderRadius="50%"
@@ -57,7 +57,7 @@ const DraggingSibling = ({ displayedValue }) => {
57
57
  </ToggleButton>
58
58
  </Stack>
59
59
 
60
- <Stack horizontal size={0}>
60
+ <Stack horizontal spacing={0}>
61
61
  <CustomIconButtonSibling noBorder onClick={() => {}} icon={<Trash />} />
62
62
  <CustomIconButtonSibling icon={<Drag />} noBorder />
63
63
  </Stack>
@@ -194,14 +194,14 @@ const DraggedItem = ({
194
194
  error={accordionHasError}
195
195
  hasErrorMessage={hasErrorMessage}
196
196
  expanded={isOpen}
197
- toggle={onClickToggle}
197
+ onToggle={onClickToggle}
198
198
  id={componentFieldName}
199
199
  size="S"
200
200
  >
201
201
  <AccordionToggle
202
202
  action={
203
203
  isReadOnly ? null : (
204
- <Stack horizontal size={0}>
204
+ <Stack horizontal spacing={0}>
205
205
  <CustomIconButton
206
206
  expanded={isOpen}
207
207
  noBorder
@@ -238,7 +238,7 @@ const DraggedItem = ({
238
238
  togglePosition="left"
239
239
  />
240
240
  <AccordionContent>
241
- <Stack background="neutral100" padding={6} size={6}>
241
+ <Stack background="neutral100" padding={6} spacing={6}>
242
242
  {fields.map((fieldRow, key) => {
243
243
  return (
244
244
  <Grid gap={4} key={key}>
@@ -318,9 +318,6 @@ DraggedItem.propTypes = {
318
318
 
319
319
  const Memoized = memo(DraggedItem);
320
320
 
321
- export default connect(
322
- Memoized,
323
- select
324
- );
321
+ export default connect(Memoized, select);
325
322
 
326
323
  export { DraggedItem };
@@ -39,7 +39,7 @@ function SelectMany({
39
39
  };
40
40
 
41
41
  return (
42
- <Stack size={1}>
42
+ <Stack spacing={1}>
43
43
  <Select
44
44
  components={components}
45
45
  isDisabled={isDisabled}
@@ -76,7 +76,7 @@ function SelectMany({
76
76
  value={[]}
77
77
  />
78
78
  <Box paddingTop={3} style={{ overflow: 'auto' }}>
79
- <Stack as="ul" size={4} style={{ maxHeight: '128px', overflowX: 'hidden' }}>
79
+ <Stack as="ul" spacing={4} style={{ maxHeight: '128px', overflowX: 'hidden' }}>
80
80
  {value?.map((data, index) => {
81
81
  return (
82
82
  <ListItem
@@ -28,7 +28,7 @@ function SelectOne({
28
28
  const { formatMessage } = useIntl();
29
29
 
30
30
  return (
31
- <Stack size={1}>
31
+ <Stack spacing={1}>
32
32
  <Select
33
33
  components={{
34
34
  ...components,
@@ -280,7 +280,7 @@ function SelectWrapper({
280
280
  const styles = getSelectStyles(theme);
281
281
 
282
282
  return (
283
- <Stack size={1}>
283
+ <Stack spacing={1}>
284
284
  <Label
285
285
  intlLabel={intlLabel}
286
286
  isSingle={isSingle}
@@ -368,7 +368,4 @@ SelectWrapper.propTypes = {
368
368
 
369
369
  const Memoized = memo(SelectWrapper);
370
370
 
371
- export default connect(
372
- Memoized,
373
- select
374
- );
371
+ export default connect(Memoized, select);
@@ -49,6 +49,7 @@ const getSelectStyles = theme => {
49
49
  ...base,
50
50
  width: '100%',
51
51
  marginTop: theme.spaces[1],
52
+ backgroundColor: theme.colors.neutral0,
52
53
  borderRadius: '4px !important',
53
54
  borderTopLeftRadius: '4px !important',
54
55
  borderTopRightRadius: '4px !important',
@@ -3,7 +3,7 @@ import { useHistory } from 'react-router-dom';
3
3
  import get from 'lodash/get';
4
4
  import {
5
5
  useTracking,
6
- formatComponentData,
6
+ formatContentTypeData,
7
7
  useQueryParams,
8
8
  useNotification,
9
9
  useGuidedTour,
@@ -55,7 +55,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
55
55
  );
56
56
 
57
57
  // This is needed in order to add a unique id for the repeatable components, in order to make the reorder easier
58
- return formatComponentData(cleaned, allLayoutData.contentType, allLayoutData.components);
58
+ return formatContentTypeData(cleaned, allLayoutData.contentType, allLayoutData.components);
59
59
  },
60
60
  [allLayoutData]
61
61
  );
@@ -73,7 +73,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
73
73
  allLayoutData.components
74
74
  );
75
75
 
76
- acc[current] = formatComponentData(
76
+ acc[current] = formatContentTypeData(
77
77
  defaultComponentForm,
78
78
  allLayoutData.components[current],
79
79
  allLayoutData.components
@@ -86,7 +86,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
86
86
  allLayoutData.contentType.attributes,
87
87
  allLayoutData.components
88
88
  );
89
- const contentTypeDataStructureFormatted = formatComponentData(
89
+ const contentTypeDataStructureFormatted = formatContentTypeData(
90
90
  contentTypeDataStructure,
91
91
  allLayoutData.contentType,
92
92
  allLayoutData.components
@@ -29,7 +29,8 @@ export const EditorStylesContainer = styled.div`
29
29
 
30
30
  .CodeMirror-scrollbar-filler,
31
31
  .CodeMirror-gutter-filler {
32
- background-color: white; /* The little square between H and V scrollbars */
32
+ /* The little square between H and V scrollbars */
33
+ background-color: ${({ theme }) => `${theme.colors.neutral0}`};
33
34
  }
34
35
 
35
36
  /* GUTTER */
@@ -158,7 +159,7 @@ export const EditorStylesContainer = styled.div`
158
159
  .CodeMirror {
159
160
  position: relative;
160
161
  overflow: hidden;
161
- background: white;
162
+ background: ${({ theme }) => `${theme.colors.neutral0}`};
162
163
  }
163
164
 
164
165
  .CodeMirror-scroll {
@@ -224,7 +225,7 @@ export const EditorStylesContainer = styled.div`
224
225
  margin: 0;
225
226
  white-space: pre;
226
227
  word-wrap: normal;
227
- line-height: inherit;
228
+ line-height: 1.5;
228
229
  color: inherit;
229
230
  /* z-index: 2; */
230
231
  position: relative;
@@ -292,6 +293,7 @@ export const EditorStylesContainer = styled.div`
292
293
  .CodeMirror-cursor {
293
294
  position: absolute;
294
295
  pointer-events: none;
296
+ border-color: ${({ theme }) => `${theme.colors.neutral800}`};
295
297
  }
296
298
  .CodeMirror-measure pre {
297
299
  position: static;
@@ -11,7 +11,7 @@ import { Flex } from '@strapi/design-system/Flex';
11
11
  import Bold from '@strapi/icons/Bold';
12
12
  import Italic from '@strapi/icons/Italic';
13
13
  import Underline from '@strapi/icons/Underline';
14
- import Strikethrough from '@strapi/icons/Strikethrough';
14
+ import StrikeThrough from '@strapi/icons/StrikeThrough';
15
15
  import BulletList from '@strapi/icons/BulletList';
16
16
  import NumberList from '@strapi/icons/NumberList';
17
17
  import Code from '@strapi/icons/Code';
@@ -161,7 +161,7 @@ const WysiwygNav = ({
161
161
  id="Strikethrough"
162
162
  label="Strikethrough"
163
163
  name="Strikethrough"
164
- icon={<Strikethrough />}
164
+ icon={<StrikeThrough />}
165
165
  />
166
166
  <CustomIconButton
167
167
  onClick={() => onActionClick('BulletList', editorRef, handleTogglePopover)}
@@ -128,8 +128,8 @@ const Wysiwyg = ({
128
128
 
129
129
  return (
130
130
  <>
131
- <Stack size={1}>
132
- <Stack horizontal size={1}>
131
+ <Stack spacing={1}>
132
+ <Stack horizontal spacing={1}>
133
133
  <Typography variant="pi" fontWeight="bold" textColor="neutral800">
134
134
  {label}
135
135
  {required && <TypographyAsterisk textColor="danger600">*</TypographyAsterisk>}
@@ -16,7 +16,7 @@ const DisplayedFields = ({ editLayout, editLayoutRemainingFields, onRemoveField,
16
16
  const { formatMessage } = useIntl();
17
17
 
18
18
  return (
19
- <Stack size={4}>
19
+ <Stack spacing={4}>
20
20
  <Flex justifyContent="space-between">
21
21
  <div>
22
22
  <Box>
@@ -39,7 +39,7 @@ const DisplayedFields = ({ editLayout, editLayoutRemainingFields, onRemoveField,
39
39
  <LinkToCTB />
40
40
  </Flex>
41
41
  <Box padding={4} hasRadius borderStyle="dashed" borderWidth="1px" borderColor="neutral300">
42
- <Stack size={2}>
42
+ <Stack spacing={2}>
43
43
  {editLayout.map((row, index) => (
44
44
  <RowsLayout key={row.rowId} row={row} rowIndex={index} onRemoveField={onRemoveField} />
45
45
  ))}
@@ -45,7 +45,7 @@ const DynamicZoneList = ({ components }) => {
45
45
  const { componentLayouts } = useLayoutDnd();
46
46
 
47
47
  return (
48
- <Stack size={2} horizontal overflow="scroll hidden" padding={3}>
48
+ <Stack spacing={2} horizontal overflow="scroll hidden" padding={3}>
49
49
  {components.map(componentUid => (
50
50
  <CustomLink
51
51
  hasRadius
@@ -22,7 +22,7 @@ const RelationalFields = ({
22
22
  const { setEditFieldToSelect, modifiedData, onMoveRelation } = useLayoutDnd();
23
23
 
24
24
  return (
25
- <Stack size={4}>
25
+ <Stack spacing={4}>
26
26
  <div>
27
27
  <Box>
28
28
  <Typography fontWeight="bold">
@@ -42,7 +42,7 @@ const RelationalFields = ({
42
42
  </Box>
43
43
  </div>
44
44
  <Box padding={4} hasRadius borderStyle="dashed" borderWidth="1px" borderColor="neutral300">
45
- <Stack size={2}>
45
+ <Stack spacing={2}>
46
46
  {relationsLayout.map((relationName, index) => {
47
47
  const relationLabel = get(
48
48
  modifiedData,
@@ -275,7 +275,7 @@ const EditSettingsView = ({ mainLayout, components, isContentTypeView, slug, upd
275
275
  paddingLeft={7}
276
276
  paddingRight={7}
277
277
  >
278
- <Stack size={4}>
278
+ <Stack spacing={4}>
279
279
  <Typography variant="delta" as="h2">
280
280
  {formatMessage({
281
281
  id: getTrad('containers.SettingPage.settings'),
@@ -71,7 +71,7 @@ const Header = ({
71
71
 
72
72
  if (isCreatingEntry && canCreate) {
73
73
  primaryAction = (
74
- <Stack horizontal size={2}>
74
+ <Stack horizontal spacing={2}>
75
75
  {hasDraftAndPublish && (
76
76
  <Button disabled startIcon={<Check />} variant="secondary">
77
77
  {formatMessage({ id: 'app.utils.publish', defaultMessage: 'Publish' })}
@@ -187,7 +187,7 @@ const Header = ({
187
187
  isOpen={showWarningUnpublish}
188
188
  >
189
189
  <DialogBody icon={<ExclamationMarkCircle />}>
190
- <Stack size={2}>
190
+ <Stack spacing={2}>
191
191
  <Flex justifyContent="center" style={{ textAlign: 'center' }}>
192
192
  <Typography id="confirm-description">
193
193
  {formatMessage(
@@ -242,7 +242,7 @@ const Header = ({
242
242
  isOpen={showWarningDraftRelation}
243
243
  >
244
244
  <DialogBody icon={<ExclamationMarkCircle />}>
245
- <Stack size={2}>
245
+ <Stack spacing={2}>
246
246
  <Flex justifyContent="center" style={{ textAlign: 'center' }}>
247
247
  <Typography id="confirm-description">
248
248
  {draftRelationsCountRef.current}
@@ -314,8 +314,5 @@ Header.propTypes = {
314
314
 
315
315
  const Memoized = memo(Header, isEqualFastCompare);
316
316
 
317
- export default connect(
318
- Memoized,
319
- select
320
- );
317
+ export default connect(Memoized, select);
321
318
  export { Header };
@@ -44,7 +44,7 @@ const Informations = () => {
44
44
  <Box paddingTop={2} paddingBottom={6}>
45
45
  <Divider />
46
46
  </Box>
47
- <Stack size={4}>
47
+ <Stack spacing={4}>
48
48
  <Flex justifyContent="space-between">
49
49
  <Typography fontWeight="bold">
50
50
  {formatMessage({
@@ -137,7 +137,7 @@ const EditView = ({
137
137
  <ContentLayout>
138
138
  <Grid gap={4}>
139
139
  <GridItem col={9} s={12}>
140
- <Stack size={6}>
140
+ <Stack spacing={6}>
141
141
  {formattedContentTypeLayout.map((row, index) => {
142
142
  if (isDynamicZone(row)) {
143
143
  const {
@@ -174,7 +174,7 @@ const EditView = ({
174
174
  paddingBottom={6}
175
175
  borderColor="neutral150"
176
176
  >
177
- <Stack size={6}>
177
+ <Stack spacing={6}>
178
178
  {row.map((grid, gridIndex) => {
179
179
  return (
180
180
  <Grid gap={4} key={gridIndex}>
@@ -232,7 +232,7 @@ const EditView = ({
232
232
  </Stack>
233
233
  </GridItem>
234
234
  <GridItem col={3} s={12}>
235
- <Stack size={2}>
235
+ <Stack spacing={2}>
236
236
  <DraftAndPublishBadge />
237
237
  <Box
238
238
  as="aside"
@@ -275,7 +275,7 @@ const EditView = ({
275
275
  <Box paddingTop={2} paddingBottom={6}>
276
276
  <Divider />
277
277
  </Box>
278
- <Stack size={4}>
278
+ <Stack spacing={4}>
279
279
  {relationsLayout.map(
280
280
  ({ name, fieldSchema, labelAction, metadatas, queryInfos }) => {
281
281
  return (
@@ -308,7 +308,7 @@ const EditView = ({
308
308
  </Box>
309
309
  )}
310
310
  <Box as="aside" aria-labelledby="links">
311
- <Stack size={2}>
311
+ <Stack spacing={2}>
312
312
  <InjectionZone area="contentManager.editView.right-links" slug={slug} />
313
313
  {slug !== 'strapi::administrator' && (
314
314
  <CheckPermissions permissions={ctbPermissions}>
@@ -66,7 +66,7 @@ const CardPreview = ({ labelField, transparent, isSibling }) => {
66
66
  transparent={transparent}
67
67
  isSibling={isSibling}
68
68
  >
69
- <Stack horizontal size={3}>
69
+ <Stack horizontal spacing={3}>
70
70
  <DragButton alignItems="center">
71
71
  <Drag />
72
72
  </DragButton>
@@ -193,7 +193,7 @@ const DraggableCard = ({
193
193
  onClick={handleClickEditRow}
194
194
  isDragging={isDragging}
195
195
  >
196
- <Stack horizontal size={3}>
196
+ <Stack horizontal spacing={3}>
197
197
  <DragButton
198
198
  as="span"
199
199
  aria-label={formatMessage(
@@ -75,7 +75,7 @@ const SortDisplayedFields = ({
75
75
  hasRadius
76
76
  >
77
77
  <ScrollableContainer size="1" paddingBottom={4} ref={scrollableContainerRef}>
78
- <Stack horizontal size={3}>
78
+ <Stack horizontal spacing={3}>
79
79
  {displayedFields.map((field, index) => (
80
80
  <DraggableCard
81
81
  key={field}
@@ -0,0 +1,5 @@
1
+ import { createContext } from 'react';
2
+
3
+ const ThemeToggleContext = createContext({});
4
+
5
+ export default ThemeToggleContext;
@@ -1,3 +1,4 @@
1
1
  export { default as AdminContext } from './Admin';
2
2
  export { default as ConfigurationsContext } from './Configurations';
3
3
  export { default as PermissionsDataManagerContext } from './PermisssionsDataManagerContext';
4
+ export { default as ThemeToggleContext } from './ThemeToggle';
@@ -9,3 +9,4 @@ export { default as useSettingsMenu } from './useSettingsMenu';
9
9
  export { default as useSettingsForm } from './useSettingsForm';
10
10
  export { default as usePermissionsDataManager } from './usePermissionsDataManager';
11
11
  export { default as useReleaseNotification } from './useReleaseNotification';
12
+ export { default as useThemeToggle } from './useThemeToggle';
@@ -10,7 +10,7 @@ const init = (initialState, { settings, shouldUpdateStrapi }) => {
10
10
  // Sort the links by name
11
11
  const sortedGlobalLinks = sortLinks([...pluginsGlobalLinks, ...globalLinks]).map(link => ({
12
12
  ...link,
13
- hasNotification: link.id === 'application-infos' && shouldUpdateStrapi,
13
+ hasNotification: link.id === '000-application-infos' && shouldUpdateStrapi,
14
14
  }));
15
15
 
16
16
  const otherSections = Object.values(omit(settings, 'global'));
@@ -25,7 +25,7 @@ const init = (initialState, { settings, shouldUpdateStrapi }) => {
25
25
  intlLabel: { id: 'Settings.permissions', defaultMessage: 'Administration Panel' },
26
26
  links: [
27
27
  {
28
- intlLabel: { id: 'Settings.permissions.menu.link.roles.label' },
28
+ intlLabel: { id: 'Settings.permissions.menu.link.roles.label', defaultMessage: 'Roles' },
29
29
  to: '/settings/roles',
30
30
  id: 'roles',
31
31
  isDisplayed: false,
@@ -0,0 +1,10 @@
1
+ import { useContext } from 'react';
2
+ import { ThemeToggleContext } from '../../contexts';
3
+
4
+ const useThemeToggle = () => {
5
+ const context = useContext(ThemeToggleContext);
6
+
7
+ return context;
8
+ };
9
+
10
+ export default useThemeToggle;
@@ -21,7 +21,7 @@ const Button = styled.button`
21
21
  box-shadow: ${({ theme }) => theme.shadows.tableShadow};
22
22
  border-radius: 50%;
23
23
  svg {
24
- color: ${({ theme }) => theme.colors.neutral0};
24
+ color: ${({ theme }) => theme.colors.buttonNeutral0};
25
25
  }
26
26
  `;
27
27
 
@@ -19,6 +19,7 @@ import PrivateRoute from '../../components/PrivateRoute';
19
19
  import { createRoute, makeUniqueRoutes } from '../../utils';
20
20
  import AuthPage from '../AuthPage';
21
21
  import NotFoundPage from '../NotFoundPage';
22
+ import UseCasePage from '../UseCasePage';
22
23
  import { getUID } from './utils';
23
24
  import routes from './utils/routes';
24
25
 
@@ -119,6 +120,7 @@ function App() {
119
120
  )}
120
121
  exact
121
122
  />
123
+ <PrivateRoute path="/usecase" component={UseCasePage} />
122
124
  <PrivateRoute path="/" component={AuthenticatedApp} />
123
125
  <Route path="" component={NotFoundPage} />
124
126
  </Switch>
@@ -15,7 +15,7 @@ import UnauthenticatedLayout, {
15
15
  Column,
16
16
  LayoutContent,
17
17
  } from '../../../../layouts/UnauthenticatedLayout';
18
- import Logo from '../Logo';
18
+ import Logo from '../../../../components/UnauthenticatedLogo';
19
19
 
20
20
  const ForgotPassword = ({ onSubmit, schema }) => {
21
21
  const { formatMessage } = useIntl();
@@ -60,7 +60,7 @@ const ForgotPassword = ({ onSubmit, schema }) => {
60
60
  )}
61
61
  </Column>
62
62
 
63
- <Stack size={6}>
63
+ <Stack spacing={6}>
64
64
  <TextInput
65
65
  error={
66
66
  errors.email
@@ -9,7 +9,7 @@ import UnauthenticatedLayout, {
9
9
  Column,
10
10
  LayoutContent,
11
11
  } from '../../../../layouts/UnauthenticatedLayout';
12
- import Logo from '../Logo';
12
+ import Logo from '../../../../components/UnauthenticatedLogo';
13
13
 
14
14
  const ForgotPasswordSuccess = () => {
15
15
  const { formatMessage } = useIntl();
@@ -16,7 +16,7 @@ import { useIntl } from 'react-intl';
16
16
  import styled from 'styled-components';
17
17
  import { Formik } from 'formik';
18
18
  import { Column, LayoutContent } from '../../../../layouts/UnauthenticatedLayout';
19
- import Logo from '../Logo';
19
+ import Logo from '../../../../components/UnauthenticatedLogo';
20
20
  import FieldActionWrapper from '../FieldActionWrapper';
21
21
 
22
22
  const PasswordInput = styled(TextInput)`
@@ -75,7 +75,7 @@ const Login = ({ onSubmit, schema, children }) => {
75
75
  )}
76
76
  </Column>
77
77
 
78
- <Stack size={6}>
78
+ <Stack spacing={6}>
79
79
  <TextInput
80
80
  error={
81
81
  errors.email
@@ -10,7 +10,7 @@ import UnauthenticatedLayout, {
10
10
  Column,
11
11
  LayoutContent,
12
12
  } from '../../../../layouts/UnauthenticatedLayout';
13
- import Logo from '../Logo';
13
+ import Logo from '../../../../components/UnauthenticatedLogo';
14
14
 
15
15
  const Oops = () => {
16
16
  const { formatMessage } = useIntl();