@strapi/content-manager 5.0.0-rc.2 → 5.0.0-rc.20

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 (116) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-Bv-IXOYu.js → ComponentConfigurationPage-DnnZJc1F.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-Bv-IXOYu.js.map → ComponentConfigurationPage-DnnZJc1F.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-BxJCkKZV.mjs → ComponentConfigurationPage-hLMNf7KI.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-BxJCkKZV.mjs.map → ComponentConfigurationPage-hLMNf7KI.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-QZl5zOz-.js → EditConfigurationPage-CpLj5gYZ.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-QZl5zOz-.js.map → EditConfigurationPage-CpLj5gYZ.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-BGwHNypQ.mjs → EditConfigurationPage-Dh6sq-G4.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-BGwHNypQ.mjs.map → EditConfigurationPage-Dh6sq-G4.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-CtdtssrH.mjs → EditViewPage-BU1ugeVi.mjs} +19 -8
  10. package/dist/_chunks/EditViewPage-BU1ugeVi.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-DxKueadW.js → EditViewPage-D2QVRr_2.js} +19 -8
  12. package/dist/_chunks/EditViewPage-D2QVRr_2.js.map +1 -0
  13. package/dist/_chunks/{Field-BPw8fE3W.js → Field-BEDX9i_V.js} +120 -92
  14. package/dist/_chunks/Field-BEDX9i_V.js.map +1 -0
  15. package/dist/_chunks/{Field-BU7_nR4F.mjs → Field-VSPY6uzs.mjs} +118 -90
  16. package/dist/_chunks/Field-VSPY6uzs.mjs.map +1 -0
  17. package/dist/_chunks/{Form-ffghBTPI.mjs → Form-05Oaes1N.mjs} +35 -16
  18. package/dist/_chunks/Form-05Oaes1N.mjs.map +1 -0
  19. package/dist/_chunks/{Form-DtvmbGdZ.js → Form-DCaY8xBX.js} +35 -16
  20. package/dist/_chunks/Form-DCaY8xBX.js.map +1 -0
  21. package/dist/_chunks/{History-D6PRyNcx.mjs → History-BqO2G3MV.mjs} +4 -4
  22. package/dist/_chunks/{History-D6PRyNcx.mjs.map → History-BqO2G3MV.mjs.map} +1 -1
  23. package/dist/_chunks/{History-CSr8y9KM.js → History-BrJ1tUvt.js} +4 -4
  24. package/dist/_chunks/{History-CSr8y9KM.js.map → History-BrJ1tUvt.js.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-BC9bCi9k.mjs → ListConfigurationPage-C6rsFlme.mjs} +14 -4
  26. package/dist/_chunks/ListConfigurationPage-C6rsFlme.mjs.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-DsmAQ3YM.js → ListConfigurationPage-Eane5LKE.js} +14 -4
  28. package/dist/_chunks/ListConfigurationPage-Eane5LKE.js.map +1 -0
  29. package/dist/_chunks/{ListViewPage-DqAIb_ie.js → ListViewPage-Coj-RPsx.js} +49 -40
  30. package/dist/_chunks/ListViewPage-Coj-RPsx.js.map +1 -0
  31. package/dist/_chunks/{ListViewPage-B1GyNqfn.mjs → ListViewPage-yE_zYhcI.mjs} +47 -38
  32. package/dist/_chunks/ListViewPage-yE_zYhcI.mjs.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-xjvn5XwY.js → NoContentTypePage-BDJ0dshy.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-xjvn5XwY.js.map → NoContentTypePage-BDJ0dshy.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-CJ-HJriz.mjs → NoContentTypePage-NW_FSVdY.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-CJ-HJriz.mjs.map → NoContentTypePage-NW_FSVdY.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DObTkKmZ.js → NoPermissionsPage-BOtb5FTM.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DObTkKmZ.js.map → NoPermissionsPage-BOtb5FTM.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage--afHbbbD.mjs → NoPermissionsPage-h0I3ImsX.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage--afHbbbD.mjs.map → NoPermissionsPage-h0I3ImsX.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-t4Q0DpqW.js → Relations-CVh0DOKv.js} +4 -4
  42. package/dist/_chunks/{Relations-t4Q0DpqW.js.map → Relations-CVh0DOKv.js.map} +1 -1
  43. package/dist/_chunks/{Relations-heq-nLGU.mjs → Relations-FP0uWpBz.mjs} +4 -4
  44. package/dist/_chunks/{Relations-heq-nLGU.mjs.map → Relations-FP0uWpBz.mjs.map} +1 -1
  45. package/dist/_chunks/{en-uOUIxfcQ.js → en-BlhnxQfj.js} +7 -6
  46. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BlhnxQfj.js.map} +1 -1
  47. package/dist/_chunks/{en-BrCTWlZv.mjs → en-C8YBvRrK.mjs} +7 -6
  48. package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-C8YBvRrK.mjs.map} +1 -1
  49. package/dist/_chunks/{index-BcQ8cRyl.mjs → index-CPCHQ3X_.mjs} +1927 -1765
  50. package/dist/_chunks/index-CPCHQ3X_.mjs.map +1 -0
  51. package/dist/_chunks/{index-1zxclxo_.js → index-DTKVhcla.js} +1907 -1745
  52. package/dist/_chunks/index-DTKVhcla.js.map +1 -0
  53. package/dist/_chunks/{layout-Jl9mJFJZ.mjs → layout-B4UhJ8MJ.mjs} +22 -9
  54. package/dist/_chunks/layout-B4UhJ8MJ.mjs.map +1 -0
  55. package/dist/_chunks/{layout-tVvbqota.js → layout-CWgZzMYf.js} +21 -8
  56. package/dist/_chunks/layout-CWgZzMYf.js.map +1 -0
  57. package/dist/_chunks/{relations-f4Pv7Kgo.mjs → relations-B83Ge9a7.mjs} +2 -2
  58. package/dist/_chunks/{relations-f4Pv7Kgo.mjs.map → relations-B83Ge9a7.mjs.map} +1 -1
  59. package/dist/_chunks/{relations-CK2Jd0HM.js → relations-D81a_2zw.js} +2 -2
  60. package/dist/_chunks/{relations-CK2Jd0HM.js.map → relations-D81a_2zw.js.map} +1 -1
  61. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  62. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  63. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  64. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  65. package/dist/admin/index.js +2 -1
  66. package/dist/admin/index.js.map +1 -1
  67. package/dist/admin/index.mjs +5 -4
  68. package/dist/admin/src/exports.d.ts +1 -1
  69. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  70. package/dist/admin/src/hooks/useDocument.d.ts +30 -1
  71. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  72. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  73. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  74. package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
  75. package/dist/admin/src/services/api.d.ts +1 -1
  76. package/dist/admin/src/services/components.d.ts +2 -2
  77. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  78. package/dist/admin/src/services/documents.d.ts +19 -17
  79. package/dist/admin/src/services/init.d.ts +1 -1
  80. package/dist/admin/src/services/relations.d.ts +2 -2
  81. package/dist/admin/src/services/uid.d.ts +3 -3
  82. package/dist/admin/src/utils/validation.d.ts +4 -1
  83. package/dist/server/index.js +147 -82
  84. package/dist/server/index.js.map +1 -1
  85. package/dist/server/index.mjs +148 -83
  86. package/dist/server/index.mjs.map +1 -1
  87. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  88. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  89. package/dist/server/src/history/services/history.d.ts.map +1 -1
  90. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  91. package/dist/server/src/history/services/utils.d.ts +2 -1
  92. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  93. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  94. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  95. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  96. package/dist/shared/contracts/collection-types.d.ts +3 -1
  97. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  98. package/package.json +11 -11
  99. package/dist/_chunks/EditViewPage-CtdtssrH.mjs.map +0 -1
  100. package/dist/_chunks/EditViewPage-DxKueadW.js.map +0 -1
  101. package/dist/_chunks/Field-BPw8fE3W.js.map +0 -1
  102. package/dist/_chunks/Field-BU7_nR4F.mjs.map +0 -1
  103. package/dist/_chunks/Form-DtvmbGdZ.js.map +0 -1
  104. package/dist/_chunks/Form-ffghBTPI.mjs.map +0 -1
  105. package/dist/_chunks/ListConfigurationPage-BC9bCi9k.mjs.map +0 -1
  106. package/dist/_chunks/ListConfigurationPage-DsmAQ3YM.js.map +0 -1
  107. package/dist/_chunks/ListViewPage-B1GyNqfn.mjs.map +0 -1
  108. package/dist/_chunks/ListViewPage-DqAIb_ie.js.map +0 -1
  109. package/dist/_chunks/index-1zxclxo_.js.map +0 -1
  110. package/dist/_chunks/index-BcQ8cRyl.mjs.map +0 -1
  111. package/dist/_chunks/layout-Jl9mJFJZ.mjs.map +0 -1
  112. package/dist/_chunks/layout-tVvbqota.js.map +0 -1
  113. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  114. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  115. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  116. package/strapi-server.js +0 -3
@@ -2,12 +2,12 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { useState, useEffect, useCallback, memo } from "react";
4
4
  import { useStrapiApp, createContext, useField, useNotification, useForm, useAPIErrorHandler, useQueryParams, useFocusInputField, InputRenderer as InputRenderer$1 } from "@strapi/admin/strapi-admin";
5
- import { Box, SingleSelect, SingleSelectOption, Typography, Flex, BaseLink, Button, Popover, Field, Tooltip, IconButton, useComposedRefs, Portal, FocusTrap, Divider, VisuallyHidden, Grid as Grid$1, Accordion, TextButton, BaseButton, TextInput, IconButtonGroup, Menu, MenuItem } from "@strapi/design-system";
5
+ import { Box, SingleSelect, SingleSelectOption, Typography, Flex, BaseLink, Button, Popover, Field, Tooltip, IconButton, useComposedRefs, Portal, FocusTrap, Divider, VisuallyHidden, Grid as Grid$1, Accordion, TextButton, TextInput, IconButtonGroup, Menu, MenuItem } from "@strapi/design-system";
6
6
  import pipe$1 from "lodash/fp/pipe";
7
7
  import { useIntl } from "react-intl";
8
- import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, d as buildValidParams, f as useDocumentRBAC, n as useDocLayout } from "./index-BcQ8cRyl.mjs";
8
+ import { m as DOCUMENT_META_FIELDS, g as getTranslation, c as useDoc, e as contentManagerApi, n as CLONE_PATH, d as buildValidParams, f as useDocumentRBAC, o as useDocLayout } from "./index-CPCHQ3X_.mjs";
9
9
  import { generateNKeysBetween } from "fractional-indexing";
10
- import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-heq-nLGU.mjs";
10
+ import { u as useComponent, C as ComponentProvider, M as MemoizedRelationsField } from "./Relations-FP0uWpBz.mjs";
11
11
  import { Code, HeadingOne, HeadingTwo, HeadingThree, HeadingFour, HeadingFive, HeadingSix, Image as Image$1, NumberList, BulletList, Paragraph, Quotes, Link as Link$1, Drag, Collapse, Bold, Italic, Underline, StrikeThrough, Expand, PlusCircle, Plus, Trash, EyeStriked, CheckCircle, WarningCircle, Loader, ArrowClockwise, More } from "@strapi/icons";
12
12
  import { styled, css, keyframes } from "styled-components";
13
13
  import { C as ComponentIcon, a as COMPONENT_ICONS } from "./ComponentIcon-u4bIXTFY.mjs";
@@ -17,9 +17,9 @@ import { g as getIn } from "./objects-mKMAmfec.mjs";
17
17
  import { Editor as Editor$1, Transforms, Node, Element, Range, Path, Point, createEditor } from "slate";
18
18
  import { withHistory } from "slate-history";
19
19
  import { useFocused, useSelected, ReactEditor, Editable, useSlate, Slate, withReact } from "slate-react";
20
- import { p as prefixFileUrlWithBackendUrl, u as usePrev } from "./usePrev-DH6iah0A.mjs";
20
+ import { p as prefixFileUrlWithBackendUrl, u as usePrev, a as useDebounce } from "./useDebounce-DmuSJIF3.mjs";
21
21
  import * as Toolbar from "@radix-ui/react-toolbar";
22
- import { useLocation } from "react-router-dom";
22
+ import { useLocation, useMatch } from "react-router-dom";
23
23
  import CodeMirror from "codemirror5";
24
24
  import sanitizeHtml from "sanitize-html";
25
25
  import { getLanguage, highlight, highlightAuto } from "highlight.js";
@@ -1407,7 +1407,7 @@ const ToolbarButton = ({
1407
1407
  width: 7,
1408
1408
  height: 7,
1409
1409
  hasRadius: true,
1410
- children: /* @__PURE__ */ jsx(Icon, { width: "1.2rem", height: "1.2rem", fill: disabled ? "neutral300" : enabledColor })
1410
+ children: /* @__PURE__ */ jsx(Icon, { fill: disabled ? "neutral300" : enabledColor })
1411
1411
  }
1412
1412
  )
1413
1413
  }
@@ -1749,6 +1749,7 @@ const DragItem = styled(Flex)`
1749
1749
  }
1750
1750
  `;
1751
1751
  const DragIconButton = styled(IconButton)`
1752
+ user-select: none;
1752
1753
  display: flex;
1753
1754
  align-items: center;
1754
1755
  justify-content: center;
@@ -1877,6 +1878,7 @@ const DragAndDropElement = ({
1877
1878
  DragIconButton,
1878
1879
  {
1879
1880
  tag: "div",
1881
+ contentEditable: false,
1880
1882
  role: "button",
1881
1883
  tabIndex: 0,
1882
1884
  withTooltip: false,
@@ -2672,7 +2674,18 @@ const NonRepeatableComponent = ({
2672
2674
  children: /* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "stretch", gap: 6, children: layout.map((row, index) => {
2673
2675
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2674
2676
  const completeFieldName = `${name2}.${field.name}`;
2675
- return /* @__PURE__ */ jsx(Grid$1.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2677
+ return /* @__PURE__ */ jsx(
2678
+ Grid$1.Item,
2679
+ {
2680
+ col: size,
2681
+ s: 12,
2682
+ xs: 12,
2683
+ direction: "column",
2684
+ alignItems: "stretch",
2685
+ children: children({ ...field, name: completeFieldName })
2686
+ },
2687
+ completeFieldName
2688
+ );
2676
2689
  }) }, index);
2677
2690
  }) })
2678
2691
  }
@@ -2850,7 +2863,18 @@ const RepeatableComponent = ({
2850
2863
  children: layout.map((row, index2) => {
2851
2864
  return /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
2852
2865
  const completeFieldName = `${nameWithIndex}.${field.name}`;
2853
- return /* @__PURE__ */ jsx(Grid$1.Item, { col: size, s: 12, xs: 12, children: children({ ...field, name: completeFieldName }) }, completeFieldName);
2866
+ return /* @__PURE__ */ jsx(
2867
+ Grid$1.Item,
2868
+ {
2869
+ col: size,
2870
+ s: 12,
2871
+ xs: 12,
2872
+ direction: "column",
2873
+ alignItems: "stretch",
2874
+ children: children({ ...field, name: completeFieldName })
2875
+ },
2876
+ completeFieldName
2877
+ );
2854
2878
  }) }, index2);
2855
2879
  })
2856
2880
  }
@@ -2945,7 +2969,7 @@ const Component = ({
2945
2969
  /* @__PURE__ */ jsx(
2946
2970
  IconButton,
2947
2971
  {
2948
- borderWidth: 0,
2972
+ variant: "ghost",
2949
2973
  onClick: onDeleteComponent,
2950
2974
  label: formatMessage({
2951
2975
  id: getTranslation("containers.Edit.delete"),
@@ -2958,7 +2982,7 @@ const Component = ({
2958
2982
  IconButton,
2959
2983
  {
2960
2984
  ref: composedAccordionRefs,
2961
- borderWidth: 0,
2985
+ variant: "ghost",
2962
2986
  onClick: (e) => e.stopPropagation(),
2963
2987
  "data-handler-id": handlerId,
2964
2988
  label: formatMessage({
@@ -3028,7 +3052,7 @@ const ComponentInput = ({
3028
3052
  id: getTranslation("components.reset-entry"),
3029
3053
  defaultMessage: "Reset Entry"
3030
3054
  }),
3031
- borderWidth: 0,
3055
+ variant: "ghost",
3032
3056
  onClick: () => {
3033
3057
  field.onChange(name2, null);
3034
3058
  },
@@ -3057,11 +3081,8 @@ const AddComponentButton = ({
3057
3081
  onClick,
3058
3082
  disabled: isDisabled,
3059
3083
  background: "neutral0",
3060
- paddingTop: 3,
3061
- paddingBottom: 3,
3062
- paddingLeft: 4,
3063
- paddingRight: 4,
3064
3084
  style: { cursor: isDisabled ? "not-allowed" : "pointer" },
3085
+ variant: "tertiary",
3065
3086
  children: /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
3066
3087
  /* @__PURE__ */ jsx(StyledAddIcon, { "aria-hidden": true, $isOpen: isOpen, $hasError: hasError && !isOpen }),
3067
3088
  /* @__PURE__ */ jsx(
@@ -3090,10 +3111,11 @@ const StyledAddIcon = styled(PlusCircle)`
3090
3111
  }
3091
3112
  `;
3092
3113
  const AddComponentTitle = styled(Typography)``;
3093
- const StyledButton = styled(BaseButton)`
3114
+ const StyledButton = styled(Button)`
3094
3115
  border-radius: 26px;
3095
3116
  border-color: ${({ theme }) => theme.colors.neutral150};
3096
3117
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
3118
+ height: 5rem;
3097
3119
 
3098
3120
  &:hover {
3099
3121
  ${AddComponentTitle} {
@@ -3105,7 +3127,7 @@ const StyledButton = styled(BaseButton)`
3105
3127
  fill: ${({ theme }) => theme.colors.primary600};
3106
3128
  }
3107
3129
  > path {
3108
- fill: ${({ theme }) => theme.colors.neutral100};
3130
+ fill: ${({ theme }) => theme.colors.primary600};
3109
3131
  }
3110
3132
  }
3111
3133
  }
@@ -3236,18 +3258,6 @@ const NotAllowedInput = ({ hint, label, required, name: name2 }) => {
3236
3258
  /* @__PURE__ */ jsx(Field.Hint, {})
3237
3259
  ] });
3238
3260
  };
3239
- function useDebounce(value, delay) {
3240
- const [debouncedValue, setDebouncedValue] = useState(value);
3241
- useEffect(() => {
3242
- const handler = setTimeout(() => {
3243
- setDebouncedValue(value);
3244
- }, delay);
3245
- return () => {
3246
- clearTimeout(handler);
3247
- };
3248
- }, [value, delay]);
3249
- return debouncedValue;
3250
- }
3251
3261
  const uidApi = contentManagerApi.injectEndpoints({
3252
3262
  endpoints: (builder) => ({
3253
3263
  getDefaultUID: builder.query({
@@ -3282,7 +3292,10 @@ const uidApi = contentManagerApi.injectEndpoints({
3282
3292
  config: {
3283
3293
  params
3284
3294
  }
3285
- })
3295
+ }),
3296
+ providesTags: (_res, _error, params) => [
3297
+ { type: "UidAvailability", id: params.contentTypeUID }
3298
+ ]
3286
3299
  })
3287
3300
  })
3288
3301
  });
@@ -3294,8 +3307,10 @@ const UIDInput = React.forwardRef(
3294
3307
  const allFormValues = useForm("InputUID", (form) => form.values);
3295
3308
  const [availability, setAvailability] = React.useState();
3296
3309
  const [showRegenerate, setShowRegenerate] = React.useState(false);
3310
+ const isCloning = useMatch(CLONE_PATH) !== null;
3297
3311
  const field = useField(name2);
3298
3312
  const debouncedValue = useDebounce(field.value, 300);
3313
+ const hasChanged = debouncedValue !== field.initialValue;
3299
3314
  const { toggleNotification } = useNotification();
3300
3315
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
3301
3316
  const { formatMessage } = useIntl();
@@ -3371,8 +3386,9 @@ const UIDInput = React.forwardRef(
3371
3386
  params
3372
3387
  },
3373
3388
  {
3389
+ // Don't check availability if the value is empty or wasn't changed
3374
3390
  skip: !Boolean(
3375
- debouncedValue !== field.initialValue && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3391
+ (hasChanged || isCloning) && debouncedValue && UID_REGEX.test(debouncedValue.trim())
3376
3392
  )
3377
3393
  }
3378
3394
  );
@@ -3401,6 +3417,7 @@ const UIDInput = React.forwardRef(
3401
3417
  const isLoading = isGeneratingDefaultUID || isGeneratingUID || isCheckingAvailability;
3402
3418
  const fieldRef = useFocusInputField(name2);
3403
3419
  const composedRefs = useComposedRefs(ref, fieldRef);
3420
+ const shouldShowAvailability = (hasChanged || isCloning) && debouncedValue != null && availability && !showRegenerate;
3404
3421
  return /* @__PURE__ */ jsxs(Field.Root, { hint, name: name2, error: field.error, required, children: [
3405
3422
  /* @__PURE__ */ jsx(Field.Label, { action: labelAction, children: label }),
3406
3423
  /* @__PURE__ */ jsx(
@@ -3409,7 +3426,7 @@ const UIDInput = React.forwardRef(
3409
3426
  ref: composedRefs,
3410
3427
  disabled: props.disabled,
3411
3428
  endAction: /* @__PURE__ */ jsxs(Flex, { position: "relative", gap: 1, children: [
3412
- availability && !showRegenerate && /* @__PURE__ */ jsxs(
3429
+ shouldShowAvailability && /* @__PURE__ */ jsxs(
3413
3430
  TextValidation,
3414
3431
  {
3415
3432
  alignItems: "center",
@@ -4243,7 +4260,7 @@ const EditorLayout = ({
4243
4260
  justifyContent: "flex-end",
4244
4261
  shrink: 0,
4245
4262
  width: "100%",
4246
- children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, children: [
4263
+ children: /* @__PURE__ */ jsxs(ExpandButton$1, { onClick: onCollapse, variant: "tertiary", size: "M", children: [
4247
4264
  /* @__PURE__ */ jsx(Typography, { children: formatMessage({
4248
4265
  id: "components.Wysiwyg.collapse",
4249
4266
  defaultMessage: "Collapse"
@@ -4261,12 +4278,14 @@ const EditorLayout = ({
4261
4278
  ) }) });
4262
4279
  }
4263
4280
  return /* @__PURE__ */ jsx(
4264
- Box,
4281
+ Flex,
4265
4282
  {
4266
4283
  borderColor: error ? "danger600" : "neutral200",
4267
4284
  borderStyle: "solid",
4268
4285
  borderWidth: "1px",
4269
4286
  hasRadius: true,
4287
+ direction: "column",
4288
+ alignItems: "stretch",
4270
4289
  children
4271
4290
  }
4272
4291
  );
@@ -4277,11 +4296,19 @@ const ExpandWrapper = styled(Flex)`
4277
4296
  const BoxWithBorder = styled(Box)`
4278
4297
  border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
4279
4298
  `;
4280
- const ExpandButton$1 = styled(BaseButton)`
4299
+ const ExpandButton$1 = styled(Button)`
4281
4300
  background-color: transparent;
4282
4301
  border: none;
4283
4302
  align-items: center;
4284
4303
 
4304
+ & > span {
4305
+ display: flex;
4306
+ justify-content: space-between;
4307
+ align-items: center;
4308
+ width: 100%;
4309
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4310
+ }
4311
+
4285
4312
  svg {
4286
4313
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4287
4314
 
@@ -4548,40 +4575,28 @@ const quoteAndCodeHandler = (editor, markdownType) => {
4548
4575
  insertWithoutTextToEdit(editor, markdownType, line, contentLength);
4549
4576
  }
4550
4577
  };
4551
- const CustomIconButton = styled(IconButton)`
4552
- padding: ${({ theme }) => theme.spaces[2]};
4553
-
4554
- svg {
4555
- width: 1.8rem;
4556
- height: 1.8rem;
4557
- }
4558
- `;
4559
- const CustomLinkIconButton = styled(CustomIconButton)`
4560
- svg {
4561
- width: 0.8rem;
4562
- height: 0.8rem;
4563
- }
4564
- `;
4565
4578
  const MainButtons = styled(IconButtonGroup)`
4566
4579
  margin-left: ${({ theme }) => theme.spaces[4]};
4567
4580
  `;
4568
4581
  const MoreButton = styled(IconButton)`
4569
4582
  margin: ${({ theme }) => `0 ${theme.spaces[2]}`};
4570
- padding: ${({ theme }) => theme.spaces[2]};
4571
-
4572
- svg {
4573
- width: 1.8rem;
4574
- height: 1.8rem;
4575
- }
4576
4583
  `;
4577
4584
  const IconButtonGroupMargin = styled(IconButtonGroup)`
4578
4585
  margin-right: ${({ theme }) => `${theme.spaces[2]}`};
4579
4586
  `;
4580
- const ExpandButton = styled(BaseButton)`
4587
+ const ExpandButton = styled(Button)`
4581
4588
  background-color: transparent;
4582
4589
  border: none;
4583
4590
  align-items: center;
4584
4591
 
4592
+ & > span {
4593
+ display: flex;
4594
+ justify-content: space-between;
4595
+ align-items: center;
4596
+ width: 100%;
4597
+ font-weight: ${({ theme }) => theme.fontWeights.regular};
4598
+ }
4599
+
4585
4600
  svg {
4586
4601
  margin-left: ${({ theme }) => `${theme.spaces[2]}`};
4587
4602
  path {
@@ -4593,7 +4608,7 @@ const ExpandButton = styled(BaseButton)`
4593
4608
  `;
4594
4609
  const WysiwygFooter = ({ onToggleExpand }) => {
4595
4610
  const { formatMessage } = useIntl();
4596
- return /* @__PURE__ */ jsx(Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, children: [
4611
+ return /* @__PURE__ */ jsx(Box, { padding: 2, background: "neutral100", borderRadius: `0 0 0.4rem 0.4rem`, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "flex-end", alignItems: "flex-end", children: /* @__PURE__ */ jsxs(ExpandButton, { id: "expand", onClick: onToggleExpand, variant: "tertiary", size: "M", children: [
4597
4612
  /* @__PURE__ */ jsx(Typography, { textColor: "neutral800", children: formatMessage({
4598
4613
  id: "components.WysiwygBottomControls.fullscreen",
4599
4614
  defaultMessage: "Expand"
@@ -4630,18 +4645,27 @@ const WysiwygNav = ({
4630
4645
  borderRadius: `0.4rem 0.4rem 0 0`,
4631
4646
  children: [
4632
4647
  /* @__PURE__ */ jsxs(Flex, { children: [
4633
- /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(SingleSelect, { disabled: true, placeholder: selectPlaceholder, "aria-label": selectPlaceholder, children: [
4634
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
4635
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
4636
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h3", children: "h3" }),
4637
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h4", children: "h4" }),
4638
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h5", children: "h5" }),
4639
- /* @__PURE__ */ jsx(SingleSelectOption, { value: "h6", children: "h6" })
4640
- ] }) }),
4648
+ /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsxs(
4649
+ SingleSelect,
4650
+ {
4651
+ disabled: true,
4652
+ placeholder: selectPlaceholder,
4653
+ "aria-label": selectPlaceholder,
4654
+ size: "S",
4655
+ children: [
4656
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
4657
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
4658
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h3", children: "h3" }),
4659
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h4", children: "h4" }),
4660
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h5", children: "h5" }),
4661
+ /* @__PURE__ */ jsx(SingleSelectOption, { value: "h6", children: "h6" })
4662
+ ]
4663
+ }
4664
+ ) }),
4641
4665
  /* @__PURE__ */ jsxs(MainButtons, { children: [
4642
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4643
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
4644
- /* @__PURE__ */ jsx(CustomIconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsx(Underline, {}) })
4666
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4667
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Italic", name: "Italic", children: /* @__PURE__ */ jsx(Italic, {}) }),
4668
+ /* @__PURE__ */ jsx(IconButton, { disabled: true, label: "Underline", name: "Underline", children: /* @__PURE__ */ jsx(Underline, {}) })
4645
4669
  ] }),
4646
4670
  /* @__PURE__ */ jsx(MoreButton, { disabled: true, label: "More", children: /* @__PURE__ */ jsx(More, {}) })
4647
4671
  ] }),
@@ -4668,6 +4692,7 @@ const WysiwygNav = ({
4668
4692
  placeholder: selectPlaceholder,
4669
4693
  "aria-label": selectPlaceholder,
4670
4694
  onChange: (value) => onActionClick(value, editorRef),
4695
+ size: "S",
4671
4696
  children: [
4672
4697
  /* @__PURE__ */ jsx(SingleSelectOption, { value: "h1", children: "h1" }),
4673
4698
  /* @__PURE__ */ jsx(SingleSelectOption, { value: "h2", children: "h2" }),
@@ -4679,17 +4704,9 @@ const WysiwygNav = ({
4679
4704
  }
4680
4705
  ) }),
4681
4706
  /* @__PURE__ */ jsxs(MainButtons, { children: [
4707
+ /* @__PURE__ */ jsx(IconButton, { onClick: () => onActionClick("Bold", editorRef), label: "Bold", name: "Bold", children: /* @__PURE__ */ jsx(Bold, {}) }),
4682
4708
  /* @__PURE__ */ jsx(
4683
- CustomIconButton,
4684
- {
4685
- onClick: () => onActionClick("Bold", editorRef),
4686
- label: "Bold",
4687
- name: "Bold",
4688
- children: /* @__PURE__ */ jsx(Bold, {})
4689
- }
4690
- ),
4691
- /* @__PURE__ */ jsx(
4692
- CustomIconButton,
4709
+ IconButton,
4693
4710
  {
4694
4711
  onClick: () => onActionClick("Italic", editorRef),
4695
4712
  label: "Italic",
@@ -4698,7 +4715,7 @@ const WysiwygNav = ({
4698
4715
  }
4699
4716
  ),
4700
4717
  /* @__PURE__ */ jsx(
4701
- CustomIconButton,
4718
+ IconButton,
4702
4719
  {
4703
4720
  onClick: () => onActionClick("Underline", editorRef),
4704
4721
  label: "Underline",
@@ -4712,7 +4729,7 @@ const WysiwygNav = ({
4712
4729
  /* @__PURE__ */ jsx(Popover.Content, { sideOffset: 12, children: /* @__PURE__ */ jsxs(Flex, { padding: 2, children: [
4713
4730
  /* @__PURE__ */ jsxs(IconButtonGroupMargin, { children: [
4714
4731
  /* @__PURE__ */ jsx(
4715
- CustomIconButton,
4732
+ IconButton,
4716
4733
  {
4717
4734
  onClick: () => onActionClick("Strikethrough", editorRef, handleTogglePopover),
4718
4735
  label: "Strikethrough",
@@ -4721,7 +4738,7 @@ const WysiwygNav = ({
4721
4738
  }
4722
4739
  ),
4723
4740
  /* @__PURE__ */ jsx(
4724
- CustomIconButton,
4741
+ IconButton,
4725
4742
  {
4726
4743
  onClick: () => onActionClick("BulletList", editorRef, handleTogglePopover),
4727
4744
  label: "BulletList",
@@ -4730,7 +4747,7 @@ const WysiwygNav = ({
4730
4747
  }
4731
4748
  ),
4732
4749
  /* @__PURE__ */ jsx(
4733
- CustomIconButton,
4750
+ IconButton,
4734
4751
  {
4735
4752
  onClick: () => onActionClick("NumberList", editorRef, handleTogglePopover),
4736
4753
  label: "NumberList",
@@ -4741,7 +4758,7 @@ const WysiwygNav = ({
4741
4758
  ] }),
4742
4759
  /* @__PURE__ */ jsxs(IconButtonGroup, { children: [
4743
4760
  /* @__PURE__ */ jsx(
4744
- CustomIconButton,
4761
+ IconButton,
4745
4762
  {
4746
4763
  onClick: () => onActionClick("Code", editorRef, handleTogglePopover),
4747
4764
  label: "Code",
@@ -4750,7 +4767,7 @@ const WysiwygNav = ({
4750
4767
  }
4751
4768
  ),
4752
4769
  /* @__PURE__ */ jsx(
4753
- CustomIconButton,
4770
+ IconButton,
4754
4771
  {
4755
4772
  onClick: () => {
4756
4773
  handleTogglePopover();
@@ -4762,7 +4779,7 @@ const WysiwygNav = ({
4762
4779
  }
4763
4780
  ),
4764
4781
  /* @__PURE__ */ jsx(
4765
- CustomLinkIconButton,
4782
+ IconButton,
4766
4783
  {
4767
4784
  onClick: () => onActionClick("Link", editorRef, handleTogglePopover),
4768
4785
  label: "Link",
@@ -4771,7 +4788,7 @@ const WysiwygNav = ({
4771
4788
  }
4772
4789
  ),
4773
4790
  /* @__PURE__ */ jsx(
4774
- CustomIconButton,
4791
+ IconButton,
4775
4792
  {
4776
4793
  onClick: () => onActionClick("Quote", editorRef, handleTogglePopover),
4777
4794
  label: "Quote",
@@ -5103,7 +5120,7 @@ const DynamicComponent = ({
5103
5120
  /* @__PURE__ */ jsx(
5104
5121
  IconButton,
5105
5122
  {
5106
- borderWidth: 0,
5123
+ variant: "ghost",
5107
5124
  label: formatMessage(
5108
5125
  {
5109
5126
  id: getTranslation("components.DynamicZone.delete-label"),
@@ -5118,7 +5135,7 @@ const DynamicComponent = ({
5118
5135
  /* @__PURE__ */ jsx(
5119
5136
  IconButton,
5120
5137
  {
5121
- borderWidth: 0,
5138
+ variant: "ghost",
5122
5139
  onClick: (e) => e.stopPropagation(),
5123
5140
  "data-handler-id": handlerId,
5124
5141
  ref: dragRef,
@@ -5179,7 +5196,18 @@ const DynamicComponent = ({
5179
5196
  ] }),
5180
5197
  /* @__PURE__ */ jsx(Accordion.Content, { children: /* @__PURE__ */ jsx(AccordionContentRadius, { background: "neutral0", children: /* @__PURE__ */ jsx(Box, { paddingLeft: 6, paddingRight: 6, paddingTop: 6, paddingBottom: 6, children: components[componentUid]?.layout?.map((row, rowInd) => /* @__PURE__ */ jsx(Grid$1.Root, { gap: 4, children: row.map(({ size, ...field }) => {
5181
5198
  const fieldName = `${name2}.${index}.${field.name}`;
5182
- return /* @__PURE__ */ jsx(Grid$1.Item, { col: size, s: 12, xs: 12, children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...field, name: fieldName }) }, fieldName);
5199
+ return /* @__PURE__ */ jsx(
5200
+ Grid$1.Item,
5201
+ {
5202
+ col: size,
5203
+ s: 12,
5204
+ xs: 12,
5205
+ direction: "column",
5206
+ alignItems: "stretch",
5207
+ children: /* @__PURE__ */ jsx(MemoizedInputRenderer, { ...field, name: fieldName })
5208
+ },
5209
+ fieldName
5210
+ );
5183
5211
  }) }, rowInd)) }) }) })
5184
5212
  ] }) }) })
5185
5213
  ] });
@@ -5488,4 +5516,4 @@ export {
5488
5516
  transformDocument as t,
5489
5517
  useLazyComponents as u
5490
5518
  };
5491
- //# sourceMappingURL=Field-BU7_nR4F.mjs.map
5519
+ //# sourceMappingURL=Field-VSPY6uzs.mjs.map