@strapi/admin 4.1.3 → 4.2.0-alpha.0

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 (170) 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/components/UpgradePlanModal/index.js +2 -2
  12. package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +4 -4
  13. package/admin/src/content-manager/components/ComponentInitializer/index.js +1 -1
  14. package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDelete/index.js +1 -1
  15. package/admin/src/content-manager/components/DynamicTable/ConfirmDialogDeleteAll/index.js +1 -1
  16. package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +2 -2
  17. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/ComponentCard/index.js +1 -1
  18. package/admin/src/content-manager/components/DynamicZone/components/ComponentPicker/Category/index.js +1 -1
  19. package/admin/src/content-manager/components/DynamicZone/index.js +2 -5
  20. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/cleanData.js +1 -6
  21. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +0 -9
  22. package/admin/src/content-manager/components/FieldComponent/index.js +2 -5
  23. package/admin/src/content-manager/components/InputJSON/index.js +2 -5
  24. package/admin/src/content-manager/components/InputUID/index.js +1 -2
  25. package/admin/src/content-manager/components/NonRepeatableComponent/index.js +1 -1
  26. package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/DraggingSibling.js +2 -2
  27. package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +4 -7
  28. package/admin/src/content-manager/components/SelectMany/index.js +2 -2
  29. package/admin/src/content-manager/components/SelectOne/index.js +1 -1
  30. package/admin/src/content-manager/components/SelectWrapper/index.js +2 -5
  31. package/admin/src/content-manager/components/SelectWrapper/utils/getSelectStyles.js +1 -0
  32. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +4 -4
  33. package/admin/src/content-manager/components/Wysiwyg/EditorStylesContainer.js +5 -3
  34. package/admin/src/content-manager/components/Wysiwyg/WysiwygNav.js +2 -2
  35. package/admin/src/content-manager/components/Wysiwyg/index.js +2 -2
  36. package/admin/src/content-manager/pages/EditSettingsView/components/DisplayedFields.js +2 -2
  37. package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +1 -1
  38. package/admin/src/content-manager/pages/EditSettingsView/components/RelationalFields.js +2 -2
  39. package/admin/src/content-manager/pages/EditSettingsView/index.js +1 -1
  40. package/admin/src/content-manager/pages/EditView/Header/index.js +4 -7
  41. package/admin/src/content-manager/pages/EditView/Informations/index.js +1 -1
  42. package/admin/src/content-manager/pages/EditView/index.js +5 -5
  43. package/admin/src/content-manager/pages/ListSettingsView/components/CardPreview.js +1 -1
  44. package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +1 -1
  45. package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +1 -1
  46. package/admin/src/contexts/ThemeToggle/index.js +5 -0
  47. package/admin/src/contexts/index.js +1 -0
  48. package/admin/src/hooks/index.js +1 -0
  49. package/admin/src/hooks/useSettingsMenu/init.js +2 -2
  50. package/admin/src/hooks/useThemeToggle/index.js +10 -0
  51. package/admin/src/pages/Admin/Onboarding/index.js +1 -1
  52. package/admin/src/pages/AuthPage/components/ForgotPassword/index.js +1 -1
  53. package/admin/src/pages/AuthPage/components/Login/BaseLogin.js +1 -1
  54. package/admin/src/pages/AuthPage/components/Register/index.js +219 -214
  55. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +1 -1
  56. package/admin/src/pages/AuthPage/index.js +7 -1
  57. package/admin/src/pages/HomePage/ContentBlocks.js +1 -1
  58. package/admin/src/pages/HomePage/HomeHeader.js +1 -1
  59. package/admin/src/pages/HomePage/SocialLinks.js +2 -5
  60. package/admin/src/pages/MarketplacePage/index.js +2 -2
  61. package/admin/src/pages/ProfilePage/index.js +79 -15
  62. package/admin/src/pages/ProfilePage/utils/api.js +4 -2
  63. package/admin/src/pages/SettingsPage/components/SettingsNav/index.js +4 -1
  64. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -2
  65. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +1 -1
  66. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/ConditionsModal/index.js +1 -1
  67. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/GlobalActions/index.js +2 -2
  68. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/PluginsAndSettings/Row/index.js +1 -1
  69. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/components/RoleForm/index.js +1 -1
  70. package/admin/src/pages/SettingsPage/pages/Roles/EditPage/index.js +2 -2
  71. package/admin/src/pages/SettingsPage/pages/Users/EditPage/index.js +3 -3
  72. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +2 -2
  73. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
  74. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/HeadersInput/index.js +1 -1
  75. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/TriggerContainer/index.js +4 -4
  76. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/WebhookForm/index.js +3 -3
  77. package/admin/src/pages/SettingsPage/pages/Webhooks/ListView/index.js +1 -1
  78. package/admin/src/pages/UseCasePage/index.js +1 -1
  79. package/admin/src/translations/en.json +5 -2
  80. package/build/{1094.1087a368.chunk.js → 1094.e1db3a1a.chunk.js} +1 -1
  81. package/build/1454.f065d92a.chunk.js +2 -0
  82. package/build/{1454.c0f0c2df.chunk.js.LICENSE.txt → 1454.f065d92a.chunk.js.LICENSE.txt} +0 -0
  83. package/build/1856.a30bd09b.chunk.js +1 -0
  84. package/build/2481.4eae9408.chunk.js +1 -0
  85. package/build/{2912.38fb9bd1.chunk.js → 2912.c5f76e65.chunk.js} +1 -1
  86. package/build/4362.86a4e939.chunk.js +1 -0
  87. package/build/4715.8a2db02a.chunk.js +1 -0
  88. package/build/{4800.18e59c83.chunk.js → 4800.f4a1384a.chunk.js} +1 -1
  89. package/build/497.3fcf6196.chunk.js +1 -0
  90. package/build/4982.601f6196.chunk.js +1 -0
  91. package/build/6404.3c2d0a81.chunk.js +1 -0
  92. package/build/{7841.ef9bcee9.chunk.js → 7841.490dbbf1.chunk.js} +1 -1
  93. package/build/{8042.9b85175a.chunk.js → 8042.1d66811a.chunk.js} +2 -2
  94. package/build/{8042.9b85175a.chunk.js.LICENSE.txt → 8042.1d66811a.chunk.js.LICENSE.txt} +0 -0
  95. package/build/849.17f011e8.chunk.js +1 -0
  96. package/build/{2736.53cd9bba.chunk.js → 9260.fa40c7bd.chunk.js} +2 -2
  97. package/build/{2736.53cd9bba.chunk.js.LICENSE.txt → 9260.fa40c7bd.chunk.js.LICENSE.txt} +0 -0
  98. package/build/9853.6ff595fa.chunk.js +1 -0
  99. package/build/{9988.b4229043.chunk.js → 9988.fe838ba6.chunk.js} +2 -2
  100. package/build/{9988.b4229043.chunk.js.LICENSE.txt → 9988.fe838ba6.chunk.js.LICENSE.txt} +0 -0
  101. package/build/Admin-authenticatedApp.00b65530.chunk.js +1 -0
  102. package/build/Admin_homePage.d6754c66.chunk.js +1 -0
  103. package/build/Admin_marketplace.419010d8.chunk.js +1 -0
  104. package/build/Admin_profilePage.d7192d06.chunk.js +1 -0
  105. package/build/Admin_settingsPage.a8c7ded5.chunk.js +1 -0
  106. package/build/admin-edit-roles-page.49b6f01d.chunk.js +1 -0
  107. package/build/admin-edit-users.381e4a0d.chunk.js +1 -0
  108. package/build/admin-users.1fda1f27.chunk.js +1 -0
  109. package/build/{api-tokens-create-page.0981141a.chunk.js → api-tokens-create-page.db17bb39.chunk.js} +1 -1
  110. package/build/{api-tokens-edit-page.3faf1af1.chunk.js → api-tokens-edit-page.c7299a77.chunk.js} +1 -1
  111. package/build/content-manager.8412e024.chunk.js +1 -0
  112. package/build/content-type-builder.cda4ba3c.chunk.js +1 -0
  113. package/build/{email-settings-page.4338588d.chunk.js → email-settings-page.40ee2bda.chunk.js} +1 -1
  114. package/build/en-json.b35c285f.chunk.js +1 -0
  115. package/build/i18n-settings-page.c4018651.chunk.js +1 -0
  116. package/build/i18n-translation-de-json.c5c9054f.chunk.js +1 -0
  117. package/build/index.html +1 -1
  118. package/build/main.d710de1b.js +2 -0
  119. package/build/{main.2667673b.js.LICENSE.txt → main.d710de1b.js.LICENSE.txt} +0 -0
  120. package/build/runtime~main.fb5daee1.js +1 -0
  121. package/build/{sso-settings-page.c073b6d7.chunk.js → sso-settings-page.121dd0a6.chunk.js} +1 -1
  122. package/build/{upload-settings.8e7cbc3b.chunk.js → upload-settings.4401f36d.chunk.js} +1 -1
  123. package/build/{upload.803ab265.chunk.js → upload.5a2dded7.chunk.js} +1 -1
  124. package/build/{users-advanced-settings-page.7694d3c9.chunk.js → users-advanced-settings-page.8905d8d8.chunk.js} +1 -1
  125. package/build/users-email-settings-page.5abb9575.chunk.js +1 -0
  126. package/build/users-permissions-translation-en-json.21b0fd2f.chunk.js +1 -0
  127. package/build/users-providers-settings-page.368893ed.chunk.js +1 -0
  128. package/build/users-roles-settings-page.a2f6277a.chunk.js +1 -0
  129. package/build/webhook-edit-page.d170eda1.chunk.js +1 -0
  130. package/build/{webhook-list-page.5c8f2a91.chunk.js → webhook-list-page.c21b5a9a.chunk.js} +1 -1
  131. package/ee/admin/pages/AuthPage/components/Login/index.js +1 -1
  132. package/ee/admin/pages/AuthPage/components/Providers/index.js +1 -1
  133. package/ee/admin/pages/SettingsPage/SingleSignOn/index.js +1 -1
  134. package/ee/admin/pages/SettingsPage/pages/Roles/CreatePage/index.js +3 -3
  135. package/package.json +7 -7
  136. package/server/routes/serve-admin-panel.js +18 -6
  137. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/isValidJSONString.js +0 -15
  138. package/admin/src/themes/colors.js +0 -51
  139. package/admin/src/themes/fontWeights.js +0 -8
  140. package/admin/src/themes/index.js +0 -13
  141. package/admin/src/themes/sizes.js +0 -31
  142. package/build/1454.c0f0c2df.chunk.js +0 -2
  143. package/build/1856.a06395b4.chunk.js +0 -1
  144. package/build/2481.7d15bd79.chunk.js +0 -1
  145. package/build/4362.70618acb.chunk.js +0 -1
  146. package/build/4715.31ca1967.chunk.js +0 -1
  147. package/build/497.8f30da61.chunk.js +0 -1
  148. package/build/4982.da4adb38.chunk.js +0 -1
  149. package/build/6250.dc6d7a58.chunk.js +0 -1
  150. package/build/849.9075d399.chunk.js +0 -1
  151. package/build/9853.b75be3f0.chunk.js +0 -1
  152. package/build/Admin-authenticatedApp.872a6e3b.chunk.js +0 -1
  153. package/build/Admin_homePage.e4779166.chunk.js +0 -1
  154. package/build/Admin_marketplace.e8654056.chunk.js +0 -1
  155. package/build/Admin_profilePage.67dd744c.chunk.js +0 -1
  156. package/build/Admin_settingsPage.2d0d2cca.chunk.js +0 -1
  157. package/build/admin-edit-roles-page.2d1b6461.chunk.js +0 -1
  158. package/build/admin-edit-users.e736db15.chunk.js +0 -1
  159. package/build/admin-users.5f79c031.chunk.js +0 -1
  160. package/build/content-manager.141d110d.chunk.js +0 -1
  161. package/build/content-type-builder.5544bc9f.chunk.js +0 -1
  162. package/build/en-json.5aa9e5ec.chunk.js +0 -1
  163. package/build/i18n-settings-page.51e37957.chunk.js +0 -1
  164. package/build/main.2667673b.js +0 -2
  165. package/build/runtime~main.4b356df3.js +0 -1
  166. package/build/users-email-settings-page.862eb51e.chunk.js +0 -1
  167. package/build/users-permissions-translation-en-json.1993655e.chunk.js +0 -1
  168. package/build/users-providers-settings-page.f3e86700.chunk.js +0 -1
  169. package/build/users-roles-settings-page.b67e2b4d.chunk.js +0 -1
  170. package/build/webhook-edit-page.b2e22743.chunk.js +0 -1
@@ -9,12 +9,13 @@ import {
9
9
  useNotification,
10
10
  useOverlayBlocker,
11
11
  auth,
12
+ useTracking,
12
13
  } from '@strapi/helper-plugin';
13
14
  import { useIntl } from 'react-intl';
14
15
  import { Formik } from 'formik';
16
+ import upperFirst from 'lodash/upperFirst';
15
17
  import { useQuery, useMutation, useQueryClient } from 'react-query';
16
18
  import pick from 'lodash/pick';
17
- import omit from 'lodash/omit';
18
19
  import { Helmet } from 'react-helmet';
19
20
  import { Main } from '@strapi/design-system/Main';
20
21
  import { Typography } from '@strapi/design-system/Typography';
@@ -31,10 +32,15 @@ import Eye from '@strapi/icons/Eye';
31
32
  import EyeStriked from '@strapi/icons/EyeStriked';
32
33
  import Check from '@strapi/icons/Check';
33
34
  import useLocalesProvider from '../../components/LocalesProvider/useLocalesProvider';
35
+ import { useThemeToggle } from '../../hooks';
34
36
  import { fetchUser, putUser } from './utils/api';
35
37
  import schema from './utils/schema';
36
38
  import { getFullName } from '../../utils';
37
39
 
40
+ const DocumentationLink = styled.a`
41
+ color: ${({ theme }) => theme.colors.primary600};
42
+ `;
43
+
38
44
  const PasswordInput = styled(TextInput)`
39
45
  ::-ms-reveal {
40
46
  display: none;
@@ -59,9 +65,11 @@ const ProfilePage = () => {
59
65
  const { setUserDisplayName } = useAppInfos();
60
66
  const queryClient = useQueryClient();
61
67
  const { formatMessage } = useIntl();
68
+ const { trackUsage } = useTracking();
62
69
  const toggleNotification = useNotification();
63
70
  const { lockApp, unlockApp } = useOverlayBlocker();
64
71
  const { notifyStatus } = useNotifyAT();
72
+ const { currentTheme, themes: allApplicationThemes, onChangeTheme } = useThemeToggle();
65
73
  useFocusWhenNavigate();
66
74
 
67
75
  const { status, data } = useQuery('user', () => fetchUser(), {
@@ -83,14 +91,18 @@ const ProfilePage = () => {
83
91
 
84
92
  const isLoading = status !== 'success';
85
93
 
86
- const submitMutation = useMutation(body => putUser(omit(body, 'confirmPassword')), {
94
+ const submitMutation = useMutation(body => putUser(body), {
87
95
  onSuccess: async data => {
88
96
  await queryClient.invalidateQueries('user');
89
97
 
90
- auth.setUserInfo(data);
98
+ auth.setUserInfo(
99
+ pick(data, ['email', 'firstname', 'lastname', 'username', 'preferedLanguage'])
100
+ );
91
101
  const userDisplayName = data.username || getFullName(data.firstname, data.lastname);
92
102
  setUserDisplayName(userDisplayName);
93
103
  changeLocale(data.preferedLanguage);
104
+ onChangeTheme(data.currentTheme);
105
+ trackUsage('didChangeMode', { newMode: data.currentTheme });
94
106
 
95
107
  toggleNotification({
96
108
  type: 'success',
@@ -128,9 +140,16 @@ const ProfilePage = () => {
128
140
  );
129
141
  };
130
142
 
131
- const fieldsToPick = ['email', 'firstname', 'lastname', 'username', 'preferedLanguage'];
143
+ const fieldsToPick = [
144
+ 'currentTheme',
145
+ 'email',
146
+ 'firstname',
147
+ 'lastname',
148
+ 'username',
149
+ 'preferedLanguage',
150
+ ];
132
151
 
133
- const initialData = pick(data, fieldsToPick);
152
+ const initialData = pick({ ...data, currentTheme }, fieldsToPick);
134
153
 
135
154
  if (isLoading) {
136
155
  return (
@@ -154,6 +173,10 @@ const ProfilePage = () => {
154
173
  );
155
174
  }
156
175
 
176
+ const themesToDisplay = Object.keys(allApplicationThemes).filter(
177
+ themeName => allApplicationThemes[themeName]
178
+ );
179
+
157
180
  return (
158
181
  <Main aria-busy={isSubmittingForm}>
159
182
  <Helmet
@@ -182,7 +205,7 @@ const ProfilePage = () => {
182
205
  />
183
206
  <Box paddingBottom={10}>
184
207
  <ContentLayout>
185
- <Stack size={6}>
208
+ <Stack spacing={6}>
186
209
  <Box
187
210
  background="neutral0"
188
211
  hasRadius
@@ -192,7 +215,7 @@ const ProfilePage = () => {
192
215
  paddingLeft={7}
193
216
  paddingRight={7}
194
217
  >
195
- <Stack size={4}>
218
+ <Stack spacing={4}>
196
219
  <Typography variant="delta" as="h2">
197
220
  {formatMessage({
198
221
  id: 'Settings.profile.form.section.profile.title',
@@ -263,7 +286,7 @@ const ProfilePage = () => {
263
286
  paddingLeft={7}
264
287
  paddingRight={7}
265
288
  >
266
- <Stack size={4}>
289
+ <Stack spacing={4}>
267
290
  <Typography variant="delta" as="h2">
268
291
  {formatMessage({
269
292
  id: 'Settings.profile.form.section.password.title',
@@ -410,8 +433,8 @@ const ProfilePage = () => {
410
433
  paddingLeft={7}
411
434
  paddingRight={7}
412
435
  >
413
- <Stack size={4}>
414
- <Stack size={1}>
436
+ <Stack spacing={4}>
437
+ <Stack spacing={1}>
415
438
  <Typography variant="delta" as="h2">
416
439
  {formatMessage({
417
440
  id: 'Settings.profile.form.section.experience.title',
@@ -424,20 +447,20 @@ const ProfilePage = () => {
424
447
  id:
425
448
  'Settings.profile.form.section.experience.interfaceLanguageHelp',
426
449
  defaultMessage:
427
- 'Selection will change the interface language only for you. Please refer to this {documentation} to make other languages available for your team.',
450
+ 'Preference changes will apply only to you. More information is available {here}.',
428
451
  },
429
452
  {
430
- documentation: (
431
- <a
453
+ here: (
454
+ <DocumentationLink
432
455
  target="_blank"
433
456
  rel="noopener noreferrer"
434
457
  href="https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#locales"
435
458
  >
436
459
  {formatMessage({
437
460
  id: 'Settings.profile.form.section.experience.documentation',
438
- defaultMessage: 'documentation',
461
+ defaultMessage: 'here',
439
462
  })}
440
- </a>
463
+ </DocumentationLink>
441
464
  ),
442
465
  }
443
466
  )}
@@ -487,6 +510,47 @@ const ProfilePage = () => {
487
510
  })}
488
511
  </Select>
489
512
  </GridItem>
513
+ <GridItem s={12} col={6}>
514
+ <Select
515
+ label={formatMessage({
516
+ id: 'Settings.profile.form.section.experience.mode.label',
517
+ defaultMessage: 'Interface mode',
518
+ })}
519
+ placeholder={formatMessage({
520
+ id: 'components.Select.placeholder',
521
+ defaultMessage: 'Select',
522
+ })}
523
+ hint={formatMessage({
524
+ id: 'Settings.profile.form.section.experience.mode.hint',
525
+ defaultMessage: 'Displays your interface in the chosen mode.',
526
+ })}
527
+ value={values.currentTheme}
528
+ onChange={e => {
529
+ handleChange({
530
+ target: { name: 'currentTheme', value: e },
531
+ });
532
+ }}
533
+ >
534
+ {themesToDisplay.map(theme => {
535
+ const label = formatMessage(
536
+ {
537
+ id:
538
+ 'Settings.profile.form.section.experience.mode.option-label',
539
+ defaultMessage: '{name} mode',
540
+ },
541
+ {
542
+ name: upperFirst(theme),
543
+ }
544
+ );
545
+
546
+ return (
547
+ <Option value={theme} key={theme}>
548
+ {label}
549
+ </Option>
550
+ );
551
+ })}
552
+ </Select>
553
+ </GridItem>
490
554
  </Grid>
491
555
  </Stack>
492
556
  </Box>
@@ -1,3 +1,4 @@
1
+ import omit from 'lodash/omit';
1
2
  import { axiosInstance } from '../../../core/utils';
2
3
 
3
4
  const fetchUser = async () => {
@@ -7,9 +8,10 @@ const fetchUser = async () => {
7
8
  };
8
9
 
9
10
  const putUser = async body => {
10
- const { data } = await axiosInstance.put('/admin/users/me', body);
11
+ const dataToSend = omit(body, ['confirmPassword', 'currentTheme']);
12
+ const { data } = await axiosInstance.put('/admin/users/me', dataToSend);
11
13
 
12
- return data.data;
14
+ return { ...data.data, currentTheme: body.currentTheme };
13
15
  };
14
16
 
15
17
  export { fetchUser, putUser };
@@ -29,7 +29,10 @@ const SettingsNav = ({ menu }) => {
29
29
  };
30
30
  });
31
31
 
32
- const label = formatMessage({ id: 'app.components.LeftMenuLinkContainer.settings' });
32
+ const label = formatMessage({
33
+ id: 'app.components.LeftMenuLinkContainer.settings',
34
+ defaultMessage: 'Settings',
35
+ });
33
36
 
34
37
  return (
35
38
  <SubNav ariaLabel={label}>
@@ -174,7 +174,7 @@ const ApiTokenCreateView = () => {
174
174
  }
175
175
  />
176
176
  <ContentLayout>
177
- <Stack size={6}>
177
+ <Stack spacing={6}>
178
178
  {Boolean(apiToken?.name) && <HeaderContentBox apiToken={apiToken.accessKey} />}
179
179
  <Box
180
180
  background="neutral0"
@@ -185,7 +185,7 @@ const ApiTokenCreateView = () => {
185
185
  paddingLeft={7}
186
186
  paddingRight={7}
187
187
  >
188
- <Stack size={4}>
188
+ <Stack spacing={4}>
189
189
  <Typography variant="delta" as="h2">
190
190
  {formatMessage({
191
191
  id: 'Settings.apiTokens.details',
@@ -42,7 +42,7 @@ const ApplicationInfosPage = () => {
42
42
  paddingRight={6}
43
43
  paddingLeft={6}
44
44
  >
45
- <Stack size={5}>
45
+ <Stack spacing={5}>
46
46
  <Typography variant="delta" as="h3">
47
47
  {formatMessage({
48
48
  id: 'Settings.application.details',
@@ -89,7 +89,7 @@ const ConditionsModal = ({ actions, headerBreadCrumbs, isFormDisabled, onClosed,
89
89
  </Breadcrumbs>
90
90
  </ModalHeader>
91
91
  <Box padding={8}>
92
- <Stack size={6}>
92
+ <Stack spacing={6}>
93
93
  <Typography variant="beta" as="h2">
94
94
  {formatMessage({
95
95
  id: 'Settings.permissions.conditions.define-conditions',
@@ -33,10 +33,10 @@ const GlobalActions = ({ actions, isFormDisabled, kind }) => {
33
33
 
34
34
  return (
35
35
  <Box paddingBottom={4} paddingTop={6} style={{ paddingLeft: firstRowWidth }}>
36
- <Stack horizontal size={0}>
36
+ <Stack horizontal spacing={0}>
37
37
  {displayedActions.map(({ label, actionId }) => {
38
38
  return (
39
- <CenteredStack key={actionId} size={3}>
39
+ <CenteredStack key={actionId} spacing={3}>
40
40
  <Typography variant="sigma" textColor="neutral500">
41
41
  {formatMessage({
42
42
  id: `Settings.roles.form.permissions.${label.toLowerCase()}`,
@@ -30,7 +30,7 @@ const PermissionRow = ({
30
30
  return (
31
31
  <Accordion
32
32
  expanded={isOpen}
33
- toggle={handleClick}
33
+ onToggle={handleClick}
34
34
  id={`accordion-${name}`}
35
35
  variant={isWhite ? 'primary' : 'secondary'}
36
36
  >
@@ -16,7 +16,7 @@ const RoleForm = ({ disabled, role, values, errors, onChange, onBlur }) => {
16
16
  return (
17
17
  <>
18
18
  <Box background="neutral0" padding={6} shadow="filterShadow" hasRadius>
19
- <Stack size={4}>
19
+ <Stack spacing={4}>
20
20
  <Flex justifyContent="space-between">
21
21
  <Box>
22
22
  <Box>
@@ -109,7 +109,7 @@ const EditPage = () => {
109
109
  <>
110
110
  <HeaderLayout
111
111
  primaryAction={
112
- <Stack horizontal size={2}>
112
+ <Stack horizontal spacing={2}>
113
113
  <Button
114
114
  disabled={role.code === 'strapi-super-admin'}
115
115
  onClick={handleSubmit}
@@ -141,7 +141,7 @@ const EditPage = () => {
141
141
  }
142
142
  />
143
143
  <ContentLayout>
144
- <Stack size={6}>
144
+ <Stack spacing={6}>
145
145
  <RoleForm
146
146
  isLoading={isRoleLoading}
147
147
  disabled={isFormDisabled}
@@ -205,7 +205,7 @@ const EditPage = ({ canUpdate }) => {
205
205
  <MagicLink registrationToken={data.registrationToken} />
206
206
  </Box>
207
207
  )}
208
- <Stack size={7}>
208
+ <Stack spacing={7}>
209
209
  <Box
210
210
  background="neutral0"
211
211
  hasRadius
@@ -215,7 +215,7 @@ const EditPage = ({ canUpdate }) => {
215
215
  paddingLeft={7}
216
216
  paddingRight={7}
217
217
  >
218
- <Stack size={4}>
218
+ <Stack spacing={4}>
219
219
  <Typography variant="delta" as="h2">
220
220
  {formatMessage({
221
221
  id: 'app.components.Users.ModalCreateBody.block-title.details',
@@ -250,7 +250,7 @@ const EditPage = ({ canUpdate }) => {
250
250
  paddingLeft={7}
251
251
  paddingRight={7}
252
252
  >
253
- <Stack size={4}>
253
+ <Stack spacing={4}>
254
254
  <Typography variant="delta" as="h2">
255
255
  {formatMessage({
256
256
  id: 'app.components.Users.ModalCreateBody.block-title.login',
@@ -112,7 +112,7 @@ const ModalForm = ({ queryName, onToggle }) => {
112
112
  return (
113
113
  <Form>
114
114
  <ModalBody>
115
- <Stack size={6}>
115
+ <Stack spacing={6}>
116
116
  {currentStep !== 'create' && <MagicLink registrationToken={registrationToken} />}
117
117
  <Box>
118
118
  <Typography variant="beta" as="h2">
@@ -122,7 +122,7 @@ const ModalForm = ({ queryName, onToggle }) => {
122
122
  })}
123
123
  </Typography>
124
124
  <Box paddingTop={4}>
125
- <Stack size={1}>
125
+ <Stack spacing={1}>
126
126
  <Grid gap={5}>
127
127
  {layout.map(row => {
128
128
  return row.map(input => {
@@ -99,7 +99,7 @@ const EventInput = ({ isDraftAndPublish }) => {
99
99
  };
100
100
 
101
101
  return (
102
- <Stack size={1}>
102
+ <Stack spacing={1}>
103
103
  <FieldLabel>
104
104
  {formatMessage({
105
105
  id: 'Settings.webhooks.form.events',
@@ -17,7 +17,7 @@ const HeadersInput = () => {
17
17
  const { values, errors } = useFormikContext();
18
18
 
19
19
  return (
20
- <Stack size={1}>
20
+ <Stack spacing={1}>
21
21
  <FieldLabel>
22
22
  {formatMessage({
23
23
  id: 'Settings.webhooks.form.headers',
@@ -29,7 +29,7 @@ const Status = ({ isPending, statusCode }) => {
29
29
 
30
30
  if (isPending) {
31
31
  return (
32
- <Stack horizontal size={2} style={{ alignItems: 'center' }}>
32
+ <Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
33
33
  <Icon as={Loader} />
34
34
  <Typography>
35
35
  {formatMessage({ id: 'Settings.webhooks.trigger.pending', defaultMessage: 'pending' })}
@@ -40,7 +40,7 @@ const Status = ({ isPending, statusCode }) => {
40
40
 
41
41
  if (statusCode >= 200 && statusCode < 300) {
42
42
  return (
43
- <Stack horizontal size={2} style={{ alignItems: 'center' }}>
43
+ <Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
44
44
  <Icon as={Check} color="success700" />
45
45
  <Typography>
46
46
  {formatMessage({ id: 'Settings.webhooks.trigger.success', defaultMessage: 'success' })}
@@ -51,7 +51,7 @@ const Status = ({ isPending, statusCode }) => {
51
51
 
52
52
  if (statusCode >= 300) {
53
53
  return (
54
- <Stack horizontal size={2} style={{ alignItems: 'center' }}>
54
+ <Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
55
55
  <Icon as={Cross} color="danger700" />
56
56
  <Typography>
57
57
  {formatMessage({ id: 'Settings.error', defaultMessage: 'error' })} {statusCode}
@@ -115,7 +115,7 @@ const CancelButton = ({ onCancel }) => {
115
115
  return (
116
116
  <Flex justifyContent="flex-end">
117
117
  <button onClick={onCancel} type="button">
118
- <Stack horizontal size={2} style={{ alignItems: 'center' }}>
118
+ <Stack horizontal spacing={2} style={{ alignItems: 'center' }}>
119
119
  <Typography textColor="neutral400">
120
120
  {formatMessage({ id: 'Settings.webhooks.trigger.cancel', defaultMessage: 'cancel' })}
121
121
  </Typography>
@@ -50,7 +50,7 @@ const WebhookForm = ({
50
50
  <Form noValidate>
51
51
  <HeaderLayout
52
52
  primaryAction={
53
- <Stack horizontal size={2}>
53
+ <Stack horizontal spacing={2}>
54
54
  <Button
55
55
  onClick={() => {
56
56
  triggerWebhook();
@@ -92,7 +92,7 @@ const WebhookForm = ({
92
92
  }
93
93
  />
94
94
  <ContentLayout>
95
- <Stack size={4}>
95
+ <Stack spacing={4}>
96
96
  {showTriggerResponse && (
97
97
  <div className="trigger-wrapper">
98
98
  <TriggerContainer
@@ -103,7 +103,7 @@ const WebhookForm = ({
103
103
  </div>
104
104
  )}
105
105
  <Box background="neutral0" padding={8} shadow="filterShadow" hasRadius>
106
- <Stack size={6}>
106
+ <Stack spacing={6}>
107
107
  <Grid gap={6}>
108
108
  <GridItem col={6}>
109
109
  <Field
@@ -413,7 +413,7 @@ const ListView = () => {
413
413
  </Flex>
414
414
  </Td>
415
415
  <Td>
416
- <Stack horizontal size={1} {...stopPropagation}>
416
+ <Stack horizontal spacing={1} {...stopPropagation}>
417
417
  {canUpdate && (
418
418
  <IconButton
419
419
  onClick={() => {
@@ -121,7 +121,7 @@ const UseCasePage = () => {
121
121
  </TypographyCenter>
122
122
  </Box>
123
123
  </Flex>
124
- <Stack size={6}>
124
+ <Stack spacing={6}>
125
125
  <Select
126
126
  id="usecase"
127
127
  data-testid="usecase"
@@ -133,10 +133,13 @@
133
133
  "Settings.permissions.users.tabs.label": "Tabs Permissions",
134
134
  "Settings.profile.form.notify.data.loaded": "Your profile data has been loaded",
135
135
  "Settings.profile.form.section.experience.clear.select": "Clear the interface language selected",
136
- "Settings.profile.form.section.experience.documentation": "documentation",
136
+ "Settings.profile.form.section.experience.here": "here",
137
137
  "Settings.profile.form.section.experience.interfaceLanguage": "Interface language",
138
138
  "Settings.profile.form.section.experience.interfaceLanguage.hint": "This will only display your own interface in the chosen language.",
139
- "Settings.profile.form.section.experience.interfaceLanguageHelp": "Selection will change the interface language only for you. Please refer to this {documentation} to make other languages available for your team.",
139
+ "Settings.profile.form.section.experience.interfaceLanguageHelp": "Preference changes will apply only to you. More information is available {here}.",
140
+ "Settings.profile.form.section.experience.mode.label": "Interface mode",
141
+ "Settings.profile.form.section.experience.mode.hint": "Displays your interface in the chosen mode.",
142
+ "Settings.profile.form.section.experience.mode.option-label": "{name} mode",
140
143
  "Settings.profile.form.section.experience.title": "Experience",
141
144
  "Settings.profile.form.section.helmet.title": "User profile",
142
145
  "Settings.profile.form.section.password.title": "Change password",