@strapi/upload 5.0.0-beta.6 → 5.0.0-beta.8

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 (41) hide show
  1. package/dist/_chunks/{index-jJSqYu6S.js → index-B96Z3Gq6.js} +59 -34
  2. package/dist/_chunks/index-B96Z3Gq6.js.map +1 -0
  3. package/dist/_chunks/{index-BI7qD8h6.mjs → index-Bvg2llNU.mjs} +24 -33
  4. package/dist/_chunks/index-Bvg2llNU.mjs.map +1 -0
  5. package/dist/_chunks/{index-CtyJq8P-.js → index-C7nlFYgw.js} +277 -259
  6. package/dist/_chunks/index-C7nlFYgw.js.map +1 -0
  7. package/dist/_chunks/index-CRhNpXFr.js.map +1 -1
  8. package/dist/_chunks/{index-ZXpABToX.mjs → index-CjolPMop.mjs} +231 -211
  9. package/dist/_chunks/index-CjolPMop.mjs.map +1 -0
  10. package/dist/_chunks/{index-BL34bU2o.mjs → index-CpIJ-CJ3.mjs} +91 -70
  11. package/dist/_chunks/index-CpIJ-CJ3.mjs.map +1 -0
  12. package/dist/_chunks/{index-DU4hcIHO.js → index-De1W-cb7.js} +89 -68
  13. package/dist/_chunks/index-De1W-cb7.js.map +1 -0
  14. package/dist/_chunks/{index-BNV9vUuq.js → index-DwWG14v6.js} +25 -35
  15. package/dist/_chunks/index-DwWG14v6.js.map +1 -0
  16. package/dist/_chunks/{index-CWDl5PEs.mjs → index-TnbVQ0RI.mjs} +61 -36
  17. package/dist/_chunks/index-TnbVQ0RI.mjs.map +1 -0
  18. package/dist/_chunks/index-VKvfSVC7.mjs.map +1 -1
  19. package/dist/admin/index.js +2 -1
  20. package/dist/admin/index.js.map +1 -1
  21. package/dist/admin/index.mjs +2 -1
  22. package/dist/admin/index.mjs.map +1 -1
  23. package/dist/server/src/index.d.ts +0 -1
  24. package/dist/server/src/index.d.ts.map +1 -1
  25. package/dist/server/src/services/extensions/content-manager/entity-manager.d.ts.map +1 -1
  26. package/dist/server/src/services/extensions/utils.d.ts.map +1 -1
  27. package/dist/server/src/services/image-manipulation.d.ts +0 -1
  28. package/dist/server/src/services/image-manipulation.d.ts.map +1 -1
  29. package/dist/server/src/services/index.d.ts +0 -1
  30. package/dist/server/src/services/index.d.ts.map +1 -1
  31. package/dist/server/src/types.d.ts +0 -1
  32. package/dist/server/src/types.d.ts.map +1 -1
  33. package/package.json +15 -19
  34. package/dist/_chunks/index-BI7qD8h6.mjs.map +0 -1
  35. package/dist/_chunks/index-BL34bU2o.mjs.map +0 -1
  36. package/dist/_chunks/index-BNV9vUuq.js.map +0 -1
  37. package/dist/_chunks/index-CWDl5PEs.mjs.map +0 -1
  38. package/dist/_chunks/index-CtyJq8P-.js.map +0 -1
  39. package/dist/_chunks/index-DU4hcIHO.js.map +0 -1
  40. package/dist/_chunks/index-ZXpABToX.mjs.map +0 -1
  41. package/dist/_chunks/index-jJSqYu6S.js.map +0 -1
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
+ const icons = require("@strapi/icons");
2
3
  const jsxRuntime = require("react/jsx-runtime");
3
4
  const React = require("react");
4
5
  const PropTypes = require("prop-types");
5
6
  const strapiAdmin = require("@strapi/admin/strapi-admin");
6
7
  const designSystem = require("@strapi/design-system");
7
8
  const reactIntl = require("react-intl");
8
- const styled = require("styled-components");
9
+ const styledComponents = require("styled-components");
9
10
  const byteSize = require("byte-size");
10
11
  const dateFns = require("date-fns");
11
12
  const qs = require("qs");
@@ -13,8 +14,6 @@ const reactQuery = require("react-query");
13
14
  const formik = require("formik");
14
15
  const isEqual = require("lodash/isEqual");
15
16
  const yup = require("yup");
16
- const axios = require("axios");
17
- const icons = require("@strapi/icons");
18
17
  const ReactSelect = require("react-select");
19
18
  const Cropper = require("cropperjs");
20
19
  require("cropperjs/dist/cropper.css");
@@ -44,11 +43,9 @@ function _interopNamespace(e) {
44
43
  }
45
44
  const React__namespace = /* @__PURE__ */ _interopNamespace(React);
46
45
  const PropTypes__default = /* @__PURE__ */ _interopDefault(PropTypes);
47
- const styled__default = /* @__PURE__ */ _interopDefault(styled);
48
46
  const byteSize__default = /* @__PURE__ */ _interopDefault(byteSize);
49
47
  const isEqual__default = /* @__PURE__ */ _interopDefault(isEqual);
50
48
  const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
51
- const axios__default = /* @__PURE__ */ _interopDefault(axios);
52
49
  const ReactSelect__default = /* @__PURE__ */ _interopDefault(ReactSelect);
53
50
  const Cropper__default = /* @__PURE__ */ _interopDefault(Cropper);
54
51
  const isEmpty__default = /* @__PURE__ */ _interopDefault(isEmpty);
@@ -63,7 +60,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
63
60
  });
64
61
  };
65
62
  const name$1 = "@strapi/upload";
66
- const version = "5.0.0-beta.5";
63
+ const version = "5.0.0-beta.7";
67
64
  const description = "Makes it easy to upload images and files to your Strapi Application.";
68
65
  const license = "SEE LICENSE IN LICENSE";
69
66
  const author = {
@@ -103,19 +100,15 @@ const scripts = {
103
100
  clean: "run -T rimraf dist",
104
101
  lint: "run -T eslint .",
105
102
  "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
106
- "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
107
- "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
108
- "test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
109
103
  "test:unit": "run -T jest",
110
104
  "test:unit:watch": "run -T jest --watch",
111
105
  watch: "pack-up watch"
112
106
  };
113
107
  const dependencies = {
114
- "@strapi/design-system": "2.0.0-beta.2",
115
- "@strapi/icons": "2.0.0-beta.2",
116
- "@strapi/provider-upload-local": "5.0.0-beta.5",
117
- "@strapi/utils": "5.0.0-beta.5",
118
- axios: "1.6.8",
108
+ "@strapi/design-system": "2.0.0-beta.4",
109
+ "@strapi/icons": "2.0.0-beta.4",
110
+ "@strapi/provider-upload-local": "5.0.0-beta.7",
111
+ "@strapi/utils": "5.0.0-beta.7",
119
112
  "byte-size": "8.1.1",
120
113
  cropperjs: "1.6.1",
121
114
  "date-fns": "2.30.0",
@@ -137,12 +130,12 @@ const dependencies = {
137
130
  yup: "0.32.9"
138
131
  };
139
132
  const devDependencies = {
140
- "@strapi/admin": "5.0.0-beta.5",
133
+ "@strapi/admin": "5.0.0-beta.7",
141
134
  "@strapi/pack-up": "5.0.0",
142
- "@strapi/types": "5.0.0-beta.5",
143
- "@testing-library/dom": "9.2.0",
144
- "@testing-library/react": "14.0.0",
145
- "@testing-library/user-event": "14.4.3",
135
+ "@strapi/types": "5.0.0-beta.7",
136
+ "@testing-library/dom": "10.1.0",
137
+ "@testing-library/react": "15.0.7",
138
+ "@testing-library/user-event": "14.5.2",
146
139
  "@types/fs-extra": "11.0.4",
147
140
  "@types/koa": "2.13.4",
148
141
  "@types/koa-range": "0.3.5",
@@ -151,17 +144,17 @@ const devDependencies = {
151
144
  koa: "2.15.2",
152
145
  "koa-body": "6.0.1",
153
146
  msw: "1.3.0",
154
- react: "^18.2.0",
155
- "react-dom": "^18.2.0",
147
+ react: "18.3.1",
148
+ "react-dom": "18.3.1",
156
149
  "react-router-dom": "6.22.3",
157
- "styled-components": "5.3.11"
150
+ "styled-components": "6.1.8"
158
151
  };
159
152
  const peerDependencies = {
160
153
  "@strapi/admin": "^5.0.0 || ^5.0.0-beta || ^5.0.0-alpha || ^5.0.0-rc",
161
154
  react: "^17.0.0 || ^18.0.0",
162
155
  "react-dom": "^17.0.0 || ^18.0.0",
163
156
  "react-router-dom": "^6.0.0",
164
- "styled-components": "^5.2.1"
157
+ "styled-components": "^6.0.0"
165
158
  };
166
159
  const engines = {
167
160
  node: ">=18.0.0 <=20.x.x",
@@ -905,7 +898,7 @@ const moveElement = (array, index2, offset) => {
905
898
  const newIndex = index2 + offset;
906
899
  return move(array, index2, newIndex);
907
900
  };
908
- const editAssetRequest = (asset, file, cancelToken, onProgress, post) => {
901
+ const editAssetRequest = (asset, file, signal, onProgress, post) => {
909
902
  const endpoint2 = `/${pluginId}?id=${asset.id}`;
910
903
  const formData = new FormData();
911
904
  if (file) {
@@ -921,13 +914,7 @@ const editAssetRequest = (asset, file, cancelToken, onProgress, post) => {
921
914
  })
922
915
  );
923
916
  return post(endpoint2, formData, {
924
- cancelToken: cancelToken.token,
925
- onUploadProgress({ total, loaded }) {
926
- onProgress(loaded / total * 100);
927
- },
928
- headers: {
929
- "Content-Type": "multipart/form-data"
930
- }
917
+ signal
931
918
  }).then((res) => res.data);
932
919
  };
933
920
  const useEditAsset = () => {
@@ -935,10 +922,11 @@ const useEditAsset = () => {
935
922
  const { formatMessage } = reactIntl.useIntl();
936
923
  const { toggleNotification } = strapiAdmin.useNotification();
937
924
  const queryClient = reactQuery.useQueryClient();
938
- const tokenRef = React.useRef(axios__default.default.CancelToken.source());
925
+ const abortController = new AbortController();
926
+ const signal = abortController.signal;
939
927
  const { post } = strapiAdmin.useFetchClient();
940
928
  const mutation = reactQuery.useMutation(
941
- ({ asset, file }) => editAssetRequest(asset, file, tokenRef.current, setProgress, post),
929
+ ({ asset, file }) => editAssetRequest(asset, file, signal, setProgress, post),
942
930
  {
943
931
  onSuccess() {
944
932
  queryClient.refetchQueries([pluginId, "assets"], { active: true });
@@ -958,9 +946,7 @@ const useEditAsset = () => {
958
946
  }
959
947
  );
960
948
  const editAsset = (asset, file) => mutation.mutateAsync({ asset, file });
961
- const cancel = () => tokenRef.current.cancel(
962
- formatMessage({ id: getTrad("modal.upload.cancelled"), defaultMessage: "" })
963
- );
949
+ const cancel = () => abortController.abort();
964
950
  return { ...mutation, cancel, editAsset, progress, status: mutation.status };
965
951
  };
966
952
  const recursiveRenameKeys = (obj, fn) => Object.fromEntries(
@@ -1028,7 +1014,7 @@ ContextInfo.propTypes = {
1028
1014
  })
1029
1015
  ).isRequired
1030
1016
  };
1031
- const ToggleButton = styled__default.default(designSystem.Flex)`
1017
+ const ToggleButton = styledComponents.styled(designSystem.Flex)`
1032
1018
  align-self: flex-end;
1033
1019
  height: 2.2rem;
1034
1020
  width: 2.8rem;
@@ -1053,7 +1039,7 @@ const Option = ({ children, data, selectProps, ...props }) => {
1053
1039
  id: "app.utils.toggle",
1054
1040
  defaultMessage: "Toggle"
1055
1041
  }),
1056
- as: "button",
1042
+ tag: "button",
1057
1043
  alignItems: "center",
1058
1044
  hasRadius: true,
1059
1045
  justifyContent: "center",
@@ -1147,7 +1133,7 @@ const SelectTree = ({ options: defaultOptions, maxDisplayDepth, defaultValue, ..
1147
1133
  );
1148
1134
  };
1149
1135
  const Select = ({ components: components2, styles, error, ariaErrorMessage, ...props }) => {
1150
- const theme = styled.useTheme();
1136
+ const theme = styledComponents.useTheme();
1151
1137
  const customStyles = getSelectStyles(theme, error);
1152
1138
  return /* @__PURE__ */ jsxRuntime.jsx(
1153
1139
  ReactSelect__default.default,
@@ -1179,7 +1165,7 @@ Select.propTypes = {
1179
1165
  error: PropTypes__default.default.string,
1180
1166
  ariaErrorMessage: PropTypes__default.default.string
1181
1167
  };
1182
- const IconBox = styled__default.default(designSystem.Box)`
1168
+ const IconBox = styledComponents.styled(designSystem.Box)`
1183
1169
  background: transparent;
1184
1170
  border: none;
1185
1171
  position: relative;
@@ -1196,9 +1182,9 @@ const IconBox = styled__default.default(designSystem.Box)`
1196
1182
  `;
1197
1183
  const ClearIndicator = (props) => {
1198
1184
  const Component = ReactSelect.components.ClearIndicator;
1199
- return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { as: "button", type: "button", children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}) }) });
1185
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { tag: "button", type: "button", children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}) }) });
1200
1186
  };
1201
- const CarretBox = styled__default.default(IconBox)`
1187
+ const CarretBox = styledComponents.styled(IconBox)`
1202
1188
  display: flex;
1203
1189
  background: none;
1204
1190
  border: none;
@@ -1345,7 +1331,7 @@ SelectTree.propTypes = {
1345
1331
  };
1346
1332
  const DialogHeader = () => {
1347
1333
  const { formatMessage } = reactIntl.useIntl();
1348
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id: "title", children: formatMessage({ id: "global.details", defaultMessage: "Details" }) }) });
1334
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id: "title", children: formatMessage({ id: "global.details", defaultMessage: "Details" }) }) });
1349
1335
  };
1350
1336
  const QUALITY = 1;
1351
1337
  const useCropImg = () => {
@@ -1418,7 +1404,7 @@ const useCropImg = () => {
1418
1404
  };
1419
1405
  };
1420
1406
  const endpoint = `/${pluginId}`;
1421
- const uploadAsset = (asset, folderId, cancelToken, onProgress, post) => {
1407
+ const uploadAsset = (asset, folderId, signal, onProgress, post) => {
1422
1408
  const { rawFile, caption, name: name2, alternativeText } = asset;
1423
1409
  const formData = new FormData();
1424
1410
  formData.append("files", rawFile);
@@ -1432,24 +1418,18 @@ const uploadAsset = (asset, folderId, cancelToken, onProgress, post) => {
1432
1418
  })
1433
1419
  );
1434
1420
  return post(endpoint, formData, {
1435
- headers: {
1436
- "Content-Type": "multipart/form-data"
1437
- },
1438
- cancelToken: cancelToken.token,
1439
- onUploadProgress({ total, loaded }) {
1440
- onProgress(loaded / total * 100);
1441
- }
1421
+ signal
1442
1422
  }).then((res) => res.data);
1443
1423
  };
1444
1424
  const useUpload = () => {
1445
1425
  const [progress, setProgress] = React.useState(0);
1446
- const { formatMessage } = reactIntl.useIntl();
1447
1426
  const queryClient = reactQuery.useQueryClient();
1448
- const tokenRef = React.useRef(axios__default.default.CancelToken.source());
1427
+ const abortController = new AbortController();
1428
+ const signal = abortController.signal;
1449
1429
  const { post } = strapiAdmin.useFetchClient();
1450
1430
  const mutation = reactQuery.useMutation(
1451
1431
  ({ asset, folderId }) => {
1452
- return uploadAsset(asset, folderId, tokenRef.current, setProgress, post);
1432
+ return uploadAsset(asset, folderId, signal, setProgress, post);
1453
1433
  },
1454
1434
  {
1455
1435
  onSuccess() {
@@ -1459,9 +1439,7 @@ const useUpload = () => {
1459
1439
  }
1460
1440
  );
1461
1441
  const upload = (asset, folderId) => mutation.mutateAsync({ asset, folderId });
1462
- const cancel = () => tokenRef.current.cancel(
1463
- formatMessage({ id: getTrad("modal.upload.cancelled"), defaultMessage: "" })
1464
- );
1442
+ const cancel = () => abortController.abort();
1465
1443
  return {
1466
1444
  upload,
1467
1445
  cancel,
@@ -1531,7 +1509,7 @@ const CopyLinkButton = ({ url }) => {
1531
1509
  CopyLinkButton.propTypes = {
1532
1510
  url: PropTypes__default.default.string.isRequired
1533
1511
  };
1534
- const BoxWrapper = styled__default.default(designSystem.Flex)`
1512
+ const BoxWrapper = styledComponents.styled(designSystem.Flex)`
1535
1513
  border-radius: ${({ theme }) => `${theme.borderRadius} ${theme.borderRadius} 0 0`};
1536
1514
  width: 100%;
1537
1515
  height: 100%;
@@ -1542,7 +1520,7 @@ const BoxWrapper = styled__default.default(designSystem.Flex)`
1542
1520
  }
1543
1521
  }
1544
1522
  `;
1545
- const CancelButton = styled__default.default.button`
1523
+ const CancelButton = styledComponents.styled.button`
1546
1524
  border: none;
1547
1525
  background: none;
1548
1526
  width: min-content;
@@ -1567,7 +1545,7 @@ const UploadProgress = ({ onCancel, progress, error }) => {
1567
1545
  return /* @__PURE__ */ jsxRuntime.jsx(BoxWrapper, { alignItems: "center", background: error ? "danger100" : "neutral150", error, children: error ? /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, { "aria-label": error?.message }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 2, width: "100%", children: [
1568
1546
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.ProgressBar, { value: progress, children: `${progress}/100%` }),
1569
1547
  /* @__PURE__ */ jsxRuntime.jsx(CancelButton, { type: "button", onClick: onCancel, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
1570
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", as: "span", textColor: "inherit", children: formatMessage({
1548
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", tag: "span", textColor: "inherit", children: formatMessage({
1571
1549
  id: "app.components.Button.cancel",
1572
1550
  defaultMessage: "Cancel"
1573
1551
  }) }),
@@ -1648,7 +1626,7 @@ const usePersistentState = (key, defaultValue) => {
1648
1626
  }, [key, value]);
1649
1627
  return [value, setValue];
1650
1628
  };
1651
- const CardAsset$1 = styled__default.default(designSystem.Flex)`
1629
+ const CardAsset$1 = styledComponents.styled(designSystem.Flex)`
1652
1630
  border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
1653
1631
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f9 121.48%);
1654
1632
  `;
@@ -1674,10 +1652,10 @@ AssetPreview.propTypes = {
1674
1652
  name: PropTypes__default.default.string.isRequired,
1675
1653
  url: PropTypes__default.default.string.isRequired
1676
1654
  };
1677
- const RelativeBox = styled__default.default(designSystem.Box)`
1655
+ const RelativeBox = styledComponents.styled(designSystem.Box)`
1678
1656
  position: relative;
1679
1657
  `;
1680
- const Wrapper$1 = styled__default.default.div`
1658
+ const Wrapper$1 = styledComponents.styled.div`
1681
1659
  position: relative;
1682
1660
  text-align: center;
1683
1661
  background: repeating-conic-gradient(
@@ -1699,24 +1677,24 @@ const Wrapper$1 = styled__default.default.div`
1699
1677
  max-width: 100%;
1700
1678
  }
1701
1679
  `;
1702
- const ActionRow = styled__default.default(designSystem.Flex)`
1680
+ const ActionRow = styledComponents.styled(designSystem.Flex)`
1703
1681
  height: 5.2rem;
1704
- background-color: ${({ blurry }) => blurry ? `rgba(33, 33, 52, 0.4)` : void 0};
1682
+ background-color: ${({ $blurry }) => $blurry ? `rgba(33, 33, 52, 0.4)` : void 0};
1705
1683
  `;
1706
- const CroppingActionRow = styled__default.default(designSystem.Flex)`
1684
+ const CroppingActionRow = styledComponents.styled(designSystem.Flex)`
1707
1685
  z-index: 1;
1708
1686
  height: 5.2rem;
1709
1687
  position: absolute;
1710
1688
  background-color: rgba(33, 33, 52, 0.4);
1711
1689
  width: 100%;
1712
1690
  `;
1713
- const BadgeOverride = styled__default.default(designSystem.Badge)`
1691
+ const BadgeOverride = styledComponents.styled(designSystem.Badge)`
1714
1692
  span {
1715
1693
  color: inherit;
1716
1694
  font-weight: ${({ theme }) => theme.fontWeights.regular};
1717
1695
  }
1718
1696
  `;
1719
- const UploadProgressWrapper$1 = styled__default.default.div`
1697
+ const UploadProgressWrapper$1 = styledComponents.styled.div`
1720
1698
  position: absolute;
1721
1699
  z-index: 2;
1722
1700
  height: 100%;
@@ -1732,26 +1710,33 @@ const CroppingActions = ({ onCancel, onValidate, onDuplicate }) => {
1732
1710
  id: getTrad("control-card.stop-crop"),
1733
1711
  defaultMessage: "Stop cropping"
1734
1712
  }),
1735
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
1736
- onClick: onCancel
1713
+ onClick: onCancel,
1714
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {})
1737
1715
  }
1738
1716
  ),
1739
1717
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Root, { children: [
1740
- /* @__PURE__ */ jsxRuntime.jsxs(Trigger, { variant: "tertiary", paddingLeft: 2, paddingRight: 2, endIcon: null, children: [
1741
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { as: "span", children: formatMessage({
1742
- id: getTrad("control-card.crop"),
1743
- defaultMessage: "Crop"
1744
- }) }),
1745
- /* @__PURE__ */ jsxRuntime.jsx(
1746
- icons.Check,
1747
- {
1748
- "aria-hidden": true,
1749
- focusable: false,
1750
- style: { position: "relative", top: 2 },
1751
- fill: "#C0C0D0"
1752
- }
1753
- )
1754
- ] }),
1718
+ /* @__PURE__ */ jsxRuntime.jsx(
1719
+ Trigger,
1720
+ {
1721
+ "aria-label": formatMessage({
1722
+ id: getTrad("control-card.crop"),
1723
+ defaultMessage: "Crop"
1724
+ }),
1725
+ variant: "tertiary",
1726
+ paddingLeft: 2,
1727
+ paddingRight: 2,
1728
+ endIcon: null,
1729
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1730
+ icons.Check,
1731
+ {
1732
+ "aria-hidden": true,
1733
+ focusable: false,
1734
+ style: { position: "relative", top: 2 },
1735
+ fill: "#C0C0D0"
1736
+ }
1737
+ )
1738
+ }
1739
+ ),
1755
1740
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Menu.Content, { zIndex: 5, children: [
1756
1741
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Menu.Item, { onSelect: onValidate, children: formatMessage({
1757
1742
  id: getTrad("checkControl.crop-original"),
@@ -1765,7 +1750,7 @@ const CroppingActions = ({ onCancel, onValidate, onDuplicate }) => {
1765
1750
  ] })
1766
1751
  ] }) }) });
1767
1752
  };
1768
- const Trigger = styled__default.default(designSystem.Menu.Trigger)`
1753
+ const Trigger = styledComponents.styled(designSystem.Menu.Trigger)`
1769
1754
  svg {
1770
1755
  > g,
1771
1756
  path {
@@ -1904,8 +1889,8 @@ const PreviewBox = ({
1904
1889
  id: "global.delete",
1905
1890
  defaultMessage: "Delete"
1906
1891
  }),
1907
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
1908
- onClick: () => setShowConfirmDialog(true)
1892
+ onClick: () => setShowConfirmDialog(true),
1893
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
1909
1894
  }
1910
1895
  ),
1911
1896
  canDownload && /* @__PURE__ */ jsxRuntime.jsx(
@@ -1915,8 +1900,8 @@ const PreviewBox = ({
1915
1900
  id: getTrad("control-card.download"),
1916
1901
  defaultMessage: "Download"
1917
1902
  }),
1918
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
1919
- onClick: () => downloadFile(assetUrl, asset.name)
1903
+ onClick: () => downloadFile(assetUrl, asset.name),
1904
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {})
1920
1905
  }
1921
1906
  ),
1922
1907
  canCopyLink && /* @__PURE__ */ jsxRuntime.jsx(CopyLinkButton, { url: assetUrl }),
@@ -1924,8 +1909,8 @@ const PreviewBox = ({
1924
1909
  designSystem.IconButton,
1925
1910
  {
1926
1911
  label: formatMessage({ id: getTrad("control-card.crop"), defaultMessage: "Crop" }),
1927
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Crop, {}),
1928
- onClick: handleCropStart
1912
+ onClick: handleCropStart,
1913
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Crop, {})
1929
1914
  }
1930
1915
  )
1931
1916
  ] }) }),
@@ -1960,7 +1945,7 @@ const PreviewBox = ({
1960
1945
  paddingLeft: 2,
1961
1946
  paddingRight: 2,
1962
1947
  justifyContent: "flex-end",
1963
- blurry: isInCroppingMode,
1948
+ $blurry: isInCroppingMode,
1964
1949
  children: isInCroppingMode && width && height && /* @__PURE__ */ jsxRuntime.jsx(BadgeOverride, { background: "neutral900", color: "neutral0", children: width && height ? `${height}✕${width}` : "N/A" })
1965
1950
  }
1966
1951
  )
@@ -2035,7 +2020,7 @@ ReplaceMediaButton.propTypes = {
2035
2020
  onSelectMedia: PropTypes__default.default.func.isRequired,
2036
2021
  trackedLocation: PropTypes__default.default.string
2037
2022
  };
2038
- const LoadingBody$1 = styled__default.default(designSystem.Flex)`
2023
+ const LoadingBody$1 = styledComponents.styled(designSystem.Flex)`
2039
2024
  /* 80px are coming from the Tabs component that is not included in the ModalBody */
2040
2025
  min-height: ${() => `calc(60vh + 8rem)`};
2041
2026
  `;
@@ -2201,54 +2186,64 @@ const EditAssetDialog = ({
2201
2186
  ]
2202
2187
  }
2203
2188
  ),
2204
- /* @__PURE__ */ jsxRuntime.jsx(
2205
- designSystem.TextInput,
2206
- {
2207
- label: formatMessage({
2208
- id: getTrad("form.input.label.file-name"),
2209
- defaultMessage: "File name"
2210
- }),
2211
- name: "name",
2212
- value: values.name,
2213
- error: errors.name,
2214
- onChange: handleChange,
2215
- disabled: formDisabled
2216
- }
2217
- ),
2218
- /* @__PURE__ */ jsxRuntime.jsx(
2219
- designSystem.TextInput,
2189
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "name", error: errors.name, children: [
2190
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2191
+ id: getTrad("form.input.label.file-name"),
2192
+ defaultMessage: "File name"
2193
+ }) }),
2194
+ /* @__PURE__ */ jsxRuntime.jsx(
2195
+ designSystem.TextInput,
2196
+ {
2197
+ value: values.name,
2198
+ onChange: handleChange,
2199
+ disabled: formDisabled
2200
+ }
2201
+ ),
2202
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
2203
+ ] }),
2204
+ /* @__PURE__ */ jsxRuntime.jsxs(
2205
+ designSystem.Field.Root,
2220
2206
  {
2221
- label: formatMessage({
2222
- id: getTrad("form.input.label.file-alt"),
2223
- defaultMessage: "Alternative text"
2224
- }),
2225
2207
  name: "alternativeText",
2226
2208
  hint: formatMessage({
2227
2209
  id: getTrad("form.input.decription.file-alt"),
2228
2210
  defaultMessage: "This text will be displayed if the asset can’t be shown."
2229
2211
  }),
2230
- value: values.alternativeText,
2231
2212
  error: errors.alternativeText,
2232
- onChange: handleChange,
2233
- disabled: formDisabled
2234
- }
2235
- ),
2236
- /* @__PURE__ */ jsxRuntime.jsx(
2237
- designSystem.TextInput,
2238
- {
2239
- label: formatMessage({
2240
- id: getTrad("form.input.label.file-caption"),
2241
- defaultMessage: "Caption"
2242
- }),
2243
- name: "caption",
2244
- value: values.caption,
2245
- error: errors.caption,
2246
- onChange: handleChange,
2247
- disabled: formDisabled
2213
+ children: [
2214
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2215
+ id: getTrad("form.input.label.file-alt"),
2216
+ defaultMessage: "Alternative text"
2217
+ }) }),
2218
+ /* @__PURE__ */ jsxRuntime.jsx(
2219
+ designSystem.TextInput,
2220
+ {
2221
+ value: values.alternativeText,
2222
+ onChange: handleChange,
2223
+ disabled: formDisabled
2224
+ }
2225
+ ),
2226
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
2227
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
2228
+ ]
2248
2229
  }
2249
2230
  ),
2250
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2251
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { htmlFor: "asset-folder", children: formatMessage({
2231
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "caption", error: errors.caption, children: [
2232
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2233
+ id: getTrad("form.input.label.file-caption"),
2234
+ defaultMessage: "Caption"
2235
+ }) }),
2236
+ /* @__PURE__ */ jsxRuntime.jsx(
2237
+ designSystem.TextInput,
2238
+ {
2239
+ value: values.caption,
2240
+ onChange: handleChange,
2241
+ disabled: formDisabled
2242
+ }
2243
+ )
2244
+ ] }),
2245
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "parent", id: "asset-folder", children: [
2246
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2252
2247
  id: getTrad("form.input.label.file-location"),
2253
2248
  defaultMessage: "Location"
2254
2249
  }) }),
@@ -2268,7 +2263,7 @@ const EditAssetDialog = ({
2268
2263
  ariaErrorMessage: "folder-parent-error"
2269
2264
  }
2270
2265
  )
2271
- ] })
2266
+ ] }) })
2272
2267
  ] }),
2273
2268
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
2274
2269
  "button",
@@ -2386,7 +2381,7 @@ const useEditFolder = () => {
2386
2381
  };
2387
2382
  const EditFolderModalHeader = ({ isEditing }) => {
2388
2383
  const { formatMessage } = reactIntl.useIntl();
2389
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id: "title", children: formatMessage(
2384
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id: "title", children: formatMessage(
2390
2385
  isEditing ? {
2391
2386
  id: getTrad("modal.folder.edit.title"),
2392
2387
  defaultMessage: "Edit folder"
@@ -2535,22 +2530,23 @@ const EditFolderDialog = ({ onClose, folder, location, parentFolderId }) => {
2535
2530
  ]
2536
2531
  }
2537
2532
  ) }),
2538
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { xs: 12, col: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
2539
- designSystem.TextInput,
2540
- {
2541
- label: formatMessage({
2542
- id: getTrad("form.input.label.folder-name"),
2543
- defaultMessage: "Name"
2544
- }),
2545
- name: "name",
2546
- value: values.name,
2547
- error: errors.name,
2548
- onChange: handleChange,
2549
- disabled: formDisabled
2550
- }
2551
- ) }),
2552
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { xs: 12, col: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2553
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.FieldLabel, { htmlFor: "folder-parent", children: formatMessage({
2533
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { xs: 12, col: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { name: "name", error: errors.name, children: [
2534
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2535
+ id: getTrad("form.input.label.folder-name"),
2536
+ defaultMessage: "Name"
2537
+ }) }),
2538
+ /* @__PURE__ */ jsxRuntime.jsx(
2539
+ designSystem.TextInput,
2540
+ {
2541
+ value: values.name,
2542
+ onChange: handleChange,
2543
+ disabled: formDisabled
2544
+ }
2545
+ ),
2546
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
2547
+ ] }) }),
2548
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.GridItem, { xs: 12, col: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { id: "folder-parent", children: [
2549
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
2554
2550
  id: getTrad("form.input.label.folder-location"),
2555
2551
  defaultMessage: "Location"
2556
2552
  }) }),
@@ -2575,7 +2571,7 @@ const EditFolderDialog = ({ onClose, folder, location, parentFolderId }) => {
2575
2571
  designSystem.Typography,
2576
2572
  {
2577
2573
  variant: "pi",
2578
- as: "p",
2574
+ tag: "p",
2579
2575
  id: "folder-parent-error",
2580
2576
  textColor: "danger600",
2581
2577
  children: errors.parent
@@ -2674,17 +2670,17 @@ const useFolder = (id2, { enabled = true } = {}) => {
2674
2670
  );
2675
2671
  return { data, error, isLoading };
2676
2672
  };
2677
- const Extension$1 = styled__default.default.span`
2673
+ const Extension$1 = styledComponents.styled.span`
2678
2674
  text-transform: uppercase;
2679
2675
  `;
2680
- const CardActionsContainer = styled__default.default(designSystem.CardAction)`
2676
+ const CardActionsContainer = styledComponents.styled(designSystem.CardAction)`
2681
2677
  opacity: 0;
2682
2678
 
2683
2679
  &:focus-within {
2684
2680
  opacity: 1;
2685
2681
  }
2686
2682
  `;
2687
- const CardContainer = styled__default.default(designSystem.Card)`
2683
+ const CardContainer = styledComponents.styled(designSystem.Card)`
2688
2684
  cursor: pointer;
2689
2685
 
2690
2686
  &:hover {
@@ -2726,16 +2722,16 @@ const AssetCardBase = ({
2726
2722
  id: getTrad("control-card.remove-selection"),
2727
2723
  defaultMessage: "Remove from selection"
2728
2724
  }),
2729
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
2730
- onClick: onRemove
2725
+ onClick: onRemove,
2726
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
2731
2727
  }
2732
2728
  ),
2733
2729
  onEdit && /* @__PURE__ */ jsxRuntime.jsx(
2734
2730
  designSystem.IconButton,
2735
2731
  {
2736
2732
  label: formatMessage({ id: getTrad("control-card.edit"), defaultMessage: "Edit" }),
2737
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}),
2738
- onClick: onEdit
2733
+ onClick: onEdit,
2734
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
2739
2735
  }
2740
2736
  )
2741
2737
  ] }),
@@ -2743,7 +2739,7 @@ const AssetCardBase = ({
2743
2739
  ] }),
2744
2740
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.CardBody, { children: [
2745
2741
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.CardContent, { children: [
2746
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardTitle, { as: "h2", children: name2 }) }),
2742
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardTitle, { tag: "h2", children: name2 }) }),
2747
2743
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.CardSubtitle, { children: [
2748
2744
  /* @__PURE__ */ jsxRuntime.jsx(Extension$1, { children: extension }),
2749
2745
  subtitle
@@ -2786,7 +2782,7 @@ AudioPreview.propTypes = {
2786
2782
  alt: PropTypes__default.default.string.isRequired,
2787
2783
  url: PropTypes__default.default.string.isRequired
2788
2784
  };
2789
- const AudioPreviewWrapper$1 = styled__default.default(designSystem.Box)`
2785
+ const AudioPreviewWrapper$1 = styledComponents.styled(designSystem.Box)`
2790
2786
  canvas,
2791
2787
  audio {
2792
2788
  display: block;
@@ -2814,12 +2810,12 @@ AudioAssetCard.propTypes = {
2814
2810
  selected: PropTypes__default.default.bool,
2815
2811
  size: PropTypes__default.default.oneOf(["S", "M"])
2816
2812
  };
2817
- const IconWrapper$1 = styled__default.default.span`
2813
+ const IconWrapper$1 = styledComponents.styled.span`
2818
2814
  svg {
2819
2815
  font-size: 4.8rem;
2820
2816
  }
2821
2817
  `;
2822
- const CardAsset = styled__default.default(designSystem.Flex)`
2818
+ const CardAsset = styledComponents.styled(designSystem.Flex)`
2823
2819
  border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
2824
2820
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f9 121.48%);
2825
2821
  `;
@@ -2893,7 +2889,7 @@ const VideoPreview = ({ url, mime, onLoadDuration, alt, ...props }) => {
2893
2889
  return;
2894
2890
  video.play();
2895
2891
  };
2896
- return /* @__PURE__ */ React.createElement(designSystem.Box, { as: "figure", ...props, key: url }, /* @__PURE__ */ jsxRuntime.jsx(
2892
+ return /* @__PURE__ */ React.createElement(designSystem.Box, { tag: "figure", ...props, key: url }, /* @__PURE__ */ jsxRuntime.jsx(
2897
2893
  "video",
2898
2894
  {
2899
2895
  muted: true,
@@ -2903,7 +2899,7 @@ const VideoPreview = ({ url, mime, onLoadDuration, alt, ...props }) => {
2903
2899
  onTimeUpdate: handleTimeUpdate,
2904
2900
  children: /* @__PURE__ */ jsxRuntime.jsx("source", { type: mime })
2905
2901
  }
2906
- ), /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { as: "figcaption", children: alt }));
2902
+ ), /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { tag: "figcaption", children: alt }));
2907
2903
  };
2908
2904
  VideoPreview.defaultProps = {
2909
2905
  onLoadDuration() {
@@ -2917,7 +2913,7 @@ VideoPreview.propTypes = {
2917
2913
  onLoadDuration: PropTypes__default.default.func,
2918
2914
  size: PropTypes__default.default.oneOf(["S", "M"])
2919
2915
  };
2920
- const VideoPreviewWrapper$2 = styled__default.default(designSystem.Box)`
2916
+ const VideoPreviewWrapper$2 = styledComponents.styled(designSystem.Box)`
2921
2917
  canvas,
2922
2918
  video {
2923
2919
  display: block;
@@ -3052,7 +3048,7 @@ const AssetGridList = ({
3052
3048
  title
3053
3049
  }) => {
3054
3050
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.KeyboardNavigable, { tagName: "article", children: [
3055
- title && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h2", variant: "delta", fontWeight: "semiBold", children: title }) }),
3051
+ title && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "delta", fontWeight: "semiBold", children: title }) }),
3056
3052
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children: assets.map((asset, index2) => {
3057
3053
  const isSelected = !!selectedAssets.find((currentAsset) => currentAsset.id === asset.id);
3058
3054
  if (onReorderAsset) {
@@ -3130,7 +3126,7 @@ const CrumbSimpleMenuAsync = ({ parentsToOmit, currentFolderId, onChangeFolder }
3130
3126
  return /* @__PURE__ */ jsxRuntime.jsx(
3131
3127
  designSystem.MenuItem,
3132
3128
  {
3133
- as: "button",
3129
+ tag: "button",
3134
3130
  type: "button",
3135
3131
  onClick: () => onChangeFolder(ascendant.id, ascendant.path),
3136
3132
  children: ascendant.label
@@ -3142,7 +3138,7 @@ const CrumbSimpleMenuAsync = ({ parentsToOmit, currentFolderId, onChangeFolder }
3142
3138
  folder: ascendant?.id,
3143
3139
  folderPath: ascendant?.path
3144
3140
  });
3145
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.MenuItem, { isLink: true, as: reactRouterDom.NavLink, to: url, children: ascendant.label }, ascendant.id);
3141
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.MenuItem, { isLink: true, tag: reactRouterDom.NavLink, to: url, children: ascendant.label }, ascendant.id);
3146
3142
  })
3147
3143
  ]
3148
3144
  }
@@ -3177,7 +3173,7 @@ const Breadcrumbs = ({ breadcrumbs, onChangeFolder, currentFolderId, ...props })
3177
3173
  return /* @__PURE__ */ jsxRuntime.jsx(
3178
3174
  designSystem.CrumbLink,
3179
3175
  {
3180
- as: onChangeFolder ? "button" : reactRouterDom.NavLink,
3176
+ tag: onChangeFolder ? "button" : reactRouterDom.NavLink,
3181
3177
  type: onChangeFolder && "button",
3182
3178
  to: onChangeFolder ? void 0 : crumb.href,
3183
3179
  onClick: onChangeFolder && (() => onChangeFolder(crumb.id, crumb.path)),
@@ -3205,7 +3201,7 @@ Breadcrumbs.propTypes = {
3205
3201
  currentFolderId: PropTypes__default.default.number,
3206
3202
  onChangeFolder: PropTypes__default.default.func
3207
3203
  };
3208
- const EmptyAssetCard = styled__default.default(designSystem.Box)`
3204
+ const EmptyAssetCard = styledComponents.styled(designSystem.Box)`
3209
3205
  background: linear-gradient(
3210
3206
  180deg,
3211
3207
  rgba(234, 234, 239, 0) 0%,
@@ -3213,21 +3209,12 @@ const EmptyAssetCard = styled__default.default(designSystem.Box)`
3213
3209
  );
3214
3210
  opacity: 0.33;
3215
3211
  `;
3216
- const GridColSize = {
3217
- S: 180,
3218
- M: 250
3219
- };
3220
3212
  const PlaceholderSize = {
3221
3213
  S: 138,
3222
3214
  M: 234
3223
3215
  };
3224
- const GridLayout = styled__default.default(designSystem.Box)`
3225
- display: grid;
3226
- grid-template-columns: repeat(auto-fit, minmax(${({ size }) => `${GridColSize[size]}px`}, 1fr));
3227
- grid-gap: ${({ theme }) => theme.spaces[4]};
3228
- `;
3229
3216
  const EmptyAssetGrid = ({ count, size }) => {
3230
- return /* @__PURE__ */ jsxRuntime.jsx(GridLayout, { size, children: Array(count).fill(null).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx(
3217
+ return /* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Layouts.Grid, { size, children: Array(count).fill(null).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx(
3231
3218
  EmptyAssetCard,
3232
3219
  {
3233
3220
  height: `${PlaceholderSize[size]}px`,
@@ -3246,7 +3233,7 @@ const EmptyAssets = ({ icon: Icon = symbols.EmptyDocuments, content, action, siz
3246
3233
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { position: "absolute", top: 11, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 4, textAlign: "center", children: [
3247
3234
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "center", gap: 6, children: [
3248
3235
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { width: "160px", height: "88px" }),
3249
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", as: "p", textColor: "neutral600", children: content })
3236
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "p", textColor: "neutral600", children: content })
3250
3237
  ] }),
3251
3238
  action
3252
3239
  ] }) })
@@ -3275,7 +3262,7 @@ const useId = (initialId) => {
3275
3262
  const idRef = React.useRef(`${initialId}-${genId()}`);
3276
3263
  return idRef.current;
3277
3264
  };
3278
- const FauxClickWrapper = styled__default.default.button`
3265
+ const FauxClickWrapper = styledComponents.styled.button`
3279
3266
  height: 100%;
3280
3267
  left: 0;
3281
3268
  position: absolute;
@@ -3288,15 +3275,15 @@ const FauxClickWrapper = styled__default.default.button`
3288
3275
  text-decoration: none;
3289
3276
  }
3290
3277
  `;
3291
- const StyledFolder = styled__default.default(icons.Folder)`
3278
+ const StyledFolder = styledComponents.styled(icons.Folder)`
3292
3279
  path {
3293
3280
  fill: currentColor;
3294
3281
  }
3295
3282
  `;
3296
- const CardActionDisplay = styled__default.default(designSystem.Box)`
3283
+ const CardActionDisplay = styledComponents.styled(designSystem.Box)`
3297
3284
  display: none;
3298
3285
  `;
3299
- const Card = styled__default.default(designSystem.Box)`
3286
+ const Card = styledComponents.styled(designSystem.Box)`
3300
3287
  &:hover,
3301
3288
  &:focus-within {
3302
3289
  ${CardActionDisplay} {
@@ -3313,7 +3300,7 @@ const FolderCard = React.forwardRef(
3313
3300
  FauxClickWrapper,
3314
3301
  {
3315
3302
  to: to || void 0,
3316
- as: to ? reactRouterDom.NavLink : "button",
3303
+ tag: to ? reactRouterDom.NavLink : "button",
3317
3304
  type: to ? void 0 : "button",
3318
3305
  onClick,
3319
3306
  tabIndex: -1,
@@ -3372,7 +3359,7 @@ FolderCard.propTypes = {
3372
3359
  cardActions: PropTypes__default.default.element,
3373
3360
  to: PropTypes__default.default.string
3374
3361
  };
3375
- const StyledBox = styled__default.default(designSystem.Flex)`
3362
+ const StyledBox = styledComponents.styled(designSystem.Flex)`
3376
3363
  user-select: none;
3377
3364
  `;
3378
3365
  const FolderCardBody = (props) => {
@@ -3390,13 +3377,13 @@ const FolderCardBody = (props) => {
3390
3377
  }
3391
3378
  );
3392
3379
  };
3393
- const BoxOutline = styled__default.default(designSystem.Box)`
3380
+ const BoxOutline = styledComponents.styled(designSystem.Box)`
3394
3381
  &:focus {
3395
3382
  outline: 2px solid ${({ theme }) => theme.colors.primary600};
3396
3383
  outline-offset: -2px;
3397
3384
  }
3398
3385
  `;
3399
- const BoxTextDecoration = styled__default.default(BoxOutline)`
3386
+ const BoxTextDecoration = styledComponents.styled(BoxOutline)`
3400
3387
  text-decoration: none;
3401
3388
  `;
3402
3389
  const FolderCardBodyAction = ({ to, ...props }) => {
@@ -3405,14 +3392,14 @@ const FolderCardBodyAction = ({ to, ...props }) => {
3405
3392
  BoxTextDecoration,
3406
3393
  {
3407
3394
  padding: 1,
3408
- as: reactRouterDom.NavLink,
3395
+ tag: reactRouterDom.NavLink,
3409
3396
  maxWidth: "100%",
3410
3397
  to,
3411
3398
  ...props
3412
3399
  }
3413
3400
  );
3414
3401
  }
3415
- return /* @__PURE__ */ jsxRuntime.jsx(BoxOutline, { padding: 1, as: "button", type: "button", maxWidth: "100%", ...props });
3402
+ return /* @__PURE__ */ jsxRuntime.jsx(BoxOutline, { padding: 1, tag: "button", type: "button", maxWidth: "100%", ...props });
3416
3403
  };
3417
3404
  FolderCardBodyAction.defaultProps = {
3418
3405
  to: void 0
@@ -3422,7 +3409,7 @@ FolderCardBodyAction.propTypes = {
3422
3409
  };
3423
3410
  const FolderGridList = ({ title, children }) => {
3424
3411
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.KeyboardNavigable, { tagName: "article", children: [
3425
- title && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { as: "h2", variant: "delta", fontWeight: "semiBold", children: title }) }),
3412
+ title && /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "delta", fontWeight: "semiBold", children: title }) }),
3426
3413
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Grid, { gap: 4, children })
3427
3414
  ] });
3428
3415
  };
@@ -3460,7 +3447,7 @@ SortPicker.propTypes = {
3460
3447
  onChangeSort: PropTypes__default.default.func.isRequired,
3461
3448
  value: PropTypes__default.default.string
3462
3449
  };
3463
- const VideoPreviewWrapper$1 = styled__default.default(designSystem.Box)`
3450
+ const VideoPreviewWrapper$1 = styledComponents.styled(designSystem.Box)`
3464
3451
  figure {
3465
3452
  width: ${({ theme }) => theme.spaces[7]};
3466
3453
  height: ${({ theme }) => theme.spaces[7]};
@@ -3626,14 +3613,14 @@ const TableRows = ({
3626
3613
  contentType === "folder" && /* @__PURE__ */ jsxRuntime.jsx(
3627
3614
  designSystem.IconButton,
3628
3615
  {
3629
- as: folderURL ? reactRouterDom.Link : void 0,
3616
+ tag: folderURL ? reactRouterDom.Link : void 0,
3630
3617
  label: formatMessage({
3631
3618
  id: getTrad("list.folders.link-label"),
3632
3619
  defaultMessage: "Access folder"
3633
3620
  }),
3634
3621
  to: folderURL,
3635
3622
  onClick: () => !folderURL && onChangeFolder(id2),
3636
- noBorder: true,
3623
+ borderWidth: 0,
3637
3624
  children: /* @__PURE__ */ jsxRuntime.jsx(icons.Eye, {})
3638
3625
  }
3639
3626
  ),
@@ -3645,7 +3632,7 @@ const TableRows = ({
3645
3632
  defaultMessage: "Edit"
3646
3633
  }),
3647
3634
  onClick: () => contentType === "asset" ? onEditAsset(element) : onEditFolder(element),
3648
- noBorder: true,
3635
+ borderWidth: 0,
3649
3636
  children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
3650
3637
  }
3651
3638
  )
@@ -3719,7 +3706,7 @@ const TableList = ({
3719
3706
  {
3720
3707
  label: sortLabel,
3721
3708
  onClick: () => handleClickSort(isSorted, name2),
3722
- noBorder: true,
3709
+ borderWidth: 0,
3723
3710
  children: isUp ? /* @__PURE__ */ jsxRuntime.jsx(icons.CaretUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {})
3724
3711
  }
3725
3712
  ),
@@ -3727,7 +3714,7 @@ const TableList = ({
3727
3714
  designSystem.Typography,
3728
3715
  {
3729
3716
  onClick: () => handleClickSort(isSorted, name2),
3730
- as: isSorted ? "span" : "button",
3717
+ tag: isSorted ? "span" : "button",
3731
3718
  label: !isSorted ? sortLabel : "",
3732
3719
  textColor: "neutral600",
3733
3720
  variant: "sigma",
@@ -4293,7 +4280,7 @@ const PageSize = ({ onChangePageSize, pageSize }) => {
4293
4280
  ]
4294
4281
  }
4295
4282
  ),
4296
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", as: "label", htmlFor: "page-size", children: formatMessage({
4283
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 2, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral600", tag: "label", htmlFor: "page-size", children: formatMessage({
4297
4284
  id: "components.PageFooter.select",
4298
4285
  defaultMessage: "Entries per page"
4299
4286
  }) }) })
@@ -4305,28 +4292,56 @@ PageSize.propTypes = {
4305
4292
  };
4306
4293
  const PaginationContext = React.createContext({ activePage: 1, pageCount: 1 });
4307
4294
  const usePagination = () => React.useContext(PaginationContext);
4308
- const PaginationText = styled__default.default(designSystem.Typography)`
4295
+ const PaginationText = styledComponents.styled(designSystem.Typography)`
4309
4296
  line-height: revert;
4310
4297
  `;
4311
- const LinkWrapper = styled__default.default.button`
4298
+ const LinkWrapper = styledComponents.styled.button`
4312
4299
  padding: ${({ theme }) => theme.spaces[3]};
4313
4300
  border-radius: ${({ theme }) => theme.borderRadius};
4314
- box-shadow: ${({ active, theme }) => active ? theme.shadows.filterShadow : void 0};
4301
+ box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
4315
4302
  text-decoration: none;
4316
4303
  display: flex;
4304
+ position: relative;
4305
+ outline: none;
4306
+
4307
+ &:after {
4308
+ transition-property: all;
4309
+ transition-duration: 0.2s;
4310
+ border-radius: 8px;
4311
+ content: '';
4312
+ position: absolute;
4313
+ top: -4px;
4314
+ bottom: -4px;
4315
+ left: -4px;
4316
+ right: -4px;
4317
+ border: 2px solid transparent;
4318
+ }
4319
+
4320
+ &:focus-visible {
4321
+ outline: none;
4317
4322
 
4318
- ${designSystem.buttonFocusStyle}
4323
+ &:after {
4324
+ border-radius: 8px;
4325
+ content: '';
4326
+ position: absolute;
4327
+ top: -5px;
4328
+ bottom: -5px;
4329
+ left: -5px;
4330
+ right: -5px;
4331
+ border: 2px solid ${(props) => props.theme.colors.primary600};
4332
+ }
4333
+ }
4319
4334
  `;
4320
4335
  LinkWrapper.defaultProps = { type: "button" };
4321
- const PageLinkWrapper = styled__default.default(LinkWrapper)`
4322
- color: ${({ theme, active }) => active ? theme.colors.primary700 : theme.colors.neutral800};
4323
- background: ${({ theme, active }) => active ? theme.colors.neutral0 : void 0};
4336
+ const PageLinkWrapper = styledComponents.styled(LinkWrapper)`
4337
+ color: ${({ theme, $active }) => $active ? theme.colors.primary700 : theme.colors.neutral800};
4338
+ background: ${({ theme, $active }) => $active ? theme.colors.neutral0 : void 0};
4324
4339
 
4325
4340
  &:hover {
4326
4341
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
4327
4342
  }
4328
4343
  `;
4329
- const ActionLinkWrapper = styled__default.default(LinkWrapper)`
4344
+ const ActionLinkWrapper = styledComponents.styled(LinkWrapper)`
4330
4345
  font-size: 1.1rem;
4331
4346
  svg path {
4332
4347
  fill: ${(p) => p["aria-disabled"] ? p.theme.colors.neutral300 : p.theme.colors.neutral600};
@@ -4343,7 +4358,7 @@ const ActionLinkWrapper = styled__default.default(LinkWrapper)`
4343
4358
  pointer-events: none;
4344
4359
  ` : void 0}
4345
4360
  `;
4346
- const DotsWrapper = styled__default.default(LinkWrapper)`
4361
+ const DotsWrapper = styledComponents.styled(LinkWrapper)`
4347
4362
  color: ${({ theme }) => theme.colors.neutral800};
4348
4363
  `;
4349
4364
  const PreviousLink = ({ children, ...props }) => {
@@ -4365,12 +4380,12 @@ const NextLink = ({ children, ...props }) => {
4365
4380
  const PageLink = ({ number, children, ...props }) => {
4366
4381
  const { activePage } = usePagination();
4367
4382
  const isActive = activePage === number;
4368
- return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(PageLinkWrapper, { ...props, active: isActive, children: [
4383
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(PageLinkWrapper, { ...props, $active: isActive, children: [
4369
4384
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children }),
4370
4385
  /* @__PURE__ */ jsxRuntime.jsx(PaginationText, { "aria-hidden": true, variant: "pi", fontWeight: isActive ? "bold" : "", children: number })
4371
4386
  ] }) });
4372
4387
  };
4373
- const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(DotsWrapper, { ...props, as: "div", children: [
4388
+ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(DotsWrapper, { ...props, tag: "div", children: [
4374
4389
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children }),
4375
4390
  /* @__PURE__ */ jsxRuntime.jsx(PaginationText, { "aria-hidden": true, small: true, children: "…" })
4376
4391
  ] }) });
@@ -4388,7 +4403,7 @@ Dots.propTypes = {
4388
4403
  };
4389
4404
  const Pagination = ({ children, label, activePage, pageCount }) => {
4390
4405
  const paginationValue = React.useMemo(() => ({ activePage, pageCount }), [activePage, pageCount]);
4391
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationContext.Provider, { value: paginationValue, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { as: "nav", "aria-label": label, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { as: "ul", gap: 1, children }) }) });
4406
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationContext.Provider, { value: paginationValue, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { tag: "nav", "aria-label": label, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { tag: "ul", gap: 1, children }) }) });
4392
4407
  };
4393
4408
  Pagination.defaultProps = {
4394
4409
  label: "pagination"
@@ -4588,7 +4603,7 @@ const SearchAsset = ({ onChangeSearch, queryValue }) => {
4588
4603
  }
4589
4604
  ) }) });
4590
4605
  }
4591
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}), label: "Search", onClick: handleToggle });
4606
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.IconButton, { label: "Search", onClick: handleToggle, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}) });
4592
4607
  };
4593
4608
  SearchAsset.defaultProps = {
4594
4609
  queryValue: null
@@ -4603,10 +4618,10 @@ const isSelectable = (allowedTypes, mime = "") => {
4603
4618
  const fileType = mime.split("/")[0];
4604
4619
  return allowedTypes.includes(fileType) || allowedTypes.includes("file") && !["video", "image", "audio"].includes(fileType);
4605
4620
  };
4606
- const TypographyMaxWidth = styled__default.default(designSystem.Typography)`
4621
+ const TypographyMaxWidth = styledComponents.styled(designSystem.Typography)`
4607
4622
  max-width: 100%;
4608
4623
  `;
4609
- const ActionContainer = styled__default.default(designSystem.Box)`
4624
+ const ActionContainer = styledComponents.styled(designSystem.Box)`
4610
4625
  svg {
4611
4626
  path {
4612
4627
  fill: ${({ theme }) => theme.colors.neutral500};
@@ -4706,7 +4721,6 @@ const BrowseStep = ({
4706
4721
  /* @__PURE__ */ jsxRuntime.jsx(ActionContainer, { paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
4707
4722
  designSystem.IconButton,
4708
4723
  {
4709
- icon: isGridView ? /* @__PURE__ */ jsxRuntime.jsx(icons.List, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.GridFour, {}),
4710
4724
  label: isGridView ? formatMessage({
4711
4725
  id: "view-switch.list",
4712
4726
  defaultMessage: "List View"
@@ -4714,7 +4728,8 @@ const BrowseStep = ({
4714
4728
  id: "view-switch.grid",
4715
4729
  defaultMessage: "Grid View"
4716
4730
  }),
4717
- onClick: () => setView(isGridView ? viewOptions.LIST : viewOptions.GRID)
4731
+ onClick: () => setView(isGridView ? viewOptions.LIST : viewOptions.GRID),
4732
+ children: isGridView ? /* @__PURE__ */ jsxRuntime.jsx(icons.List, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.GridFour, {})
4718
4733
  }
4719
4734
  ) }),
4720
4735
  /* @__PURE__ */ jsxRuntime.jsx(SearchAsset, { onChangeSearch, queryValue: queryObject._q || "" })
@@ -4724,7 +4739,7 @@ const BrowseStep = ({
4724
4739
  Breadcrumbs,
4725
4740
  {
4726
4741
  onChangeFolder,
4727
- as: "nav",
4742
+ tag: "nav",
4728
4743
  label: formatMessage({
4729
4744
  id: getTrad("header.breadcrumbs.nav.label"),
4730
4745
  defaultMessage: "Folders navigation"
@@ -4798,19 +4813,20 @@ const BrowseStep = ({
4798
4813
  cardActions: onEditFolder && /* @__PURE__ */ jsxRuntime.jsx(
4799
4814
  designSystem.IconButton,
4800
4815
  {
4801
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}),
4802
- "aria-label": formatMessage({
4816
+ withTooltip: false,
4817
+ label: formatMessage({
4803
4818
  id: getTrad("list.folder.edit"),
4804
4819
  defaultMessage: "Edit folder"
4805
4820
  }),
4806
- onClick: () => onEditFolder(folder)
4821
+ onClick: () => onEditFolder(folder),
4822
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
4807
4823
  }
4808
4824
  ),
4809
4825
  children: /* @__PURE__ */ jsxRuntime.jsx(FolderCardBody, { children: /* @__PURE__ */ jsxRuntime.jsx(
4810
4826
  FolderCardBodyAction,
4811
4827
  {
4812
4828
  onClick: () => handleClickFolderCard(folder.id, folder.path),
4813
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { as: "h2", direction: "column", alignItems: "start", maxWidth: "100%", children: [
4829
+ children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { tag: "h2", direction: "column", alignItems: "start", maxWidth: "100%", children: [
4814
4830
  /* @__PURE__ */ jsxRuntime.jsxs(TypographyMaxWidth, { fontWeight: "semiBold", ellipsis: true, children: [
4815
4831
  folder.name,
4816
4832
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.VisuallyHidden, { children: "-" })
@@ -4818,7 +4834,7 @@ const BrowseStep = ({
4818
4834
  /* @__PURE__ */ jsxRuntime.jsx(
4819
4835
  TypographyMaxWidth,
4820
4836
  {
4821
- as: "span",
4837
+ tag: "span",
4822
4838
  textColor: "neutral600",
4823
4839
  variant: "pi",
4824
4840
  ellipsis: true,
@@ -4963,7 +4979,7 @@ SelectedStep.propTypes = {
4963
4979
  selectedAssets: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({})).isRequired,
4964
4980
  onReorderAsset: PropTypes__default.default.func
4965
4981
  };
4966
- const LoadingBody = styled__default.default(designSystem.Flex)`
4982
+ const LoadingBody = styledComponents.styled(designSystem.Flex)`
4967
4983
  /* 80px are coming from the Tabs component that is not included in the ModalBody */
4968
4984
  min-height: ${() => `calc(60vh + 8rem)`};
4969
4985
  `;
@@ -5242,20 +5258,20 @@ const rawFileToAsset = (rawFile, assetSource) => {
5242
5258
  isLocal: true
5243
5259
  };
5244
5260
  };
5245
- const Wrapper = styled__default.default(designSystem.Flex)`
5261
+ const Wrapper = styledComponents.styled(designSystem.Flex)`
5246
5262
  flex-direction: column;
5247
5263
  `;
5248
- const IconWrapper = styled__default.default.div`
5264
+ const IconWrapper = styledComponents.styled.div`
5249
5265
  font-size: 6rem;
5250
5266
 
5251
5267
  svg path {
5252
5268
  fill: ${({ theme }) => theme.colors.primary600};
5253
5269
  }
5254
5270
  `;
5255
- const MediaBox = styled__default.default(designSystem.Box)`
5271
+ const MediaBox = styledComponents.styled(designSystem.Box)`
5256
5272
  border-style: dashed;
5257
5273
  `;
5258
- const OpaqueBox = styled__default.default(designSystem.Box)`
5274
+ const OpaqueBox = styledComponents.styled(designSystem.Box)`
5259
5275
  opacity: 0;
5260
5276
  cursor: pointer;
5261
5277
  `;
@@ -5320,14 +5336,14 @@ const FromComputerForm = ({ onClose, onAddAssets, trackedLocation }) => {
5320
5336
  onDrop: handleDrop,
5321
5337
  children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsxs(Wrapper, { children: [
5322
5338
  /* @__PURE__ */ jsxRuntime.jsx(IconWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircle, { "aria-hidden": true, width: "3.2rem", height: "3.2rem" }) }),
5323
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 3, paddingBottom: 5, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", textColor: "neutral600", as: "span", children: formatMessage({
5339
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 3, paddingBottom: 5, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", textColor: "neutral600", tag: "span", children: formatMessage({
5324
5340
  id: getTrad("input.label"),
5325
5341
  defaultMessage: "Drag & Drop here or"
5326
5342
  }) }) }),
5327
5343
  /* @__PURE__ */ jsxRuntime.jsx(
5328
5344
  OpaqueBox,
5329
5345
  {
5330
- as: "input",
5346
+ tag: "input",
5331
5347
  position: "absolute",
5332
5348
  left: 0,
5333
5349
  right: 0,
@@ -5468,18 +5484,20 @@ const FromUrlForm = ({ onClose, onAddAsset, trackedLocation }) => {
5468
5484
  validationSchema: urlSchema,
5469
5485
  validateOnChange: false,
5470
5486
  children: ({ values, errors, handleChange }) => /* @__PURE__ */ jsxRuntime.jsxs(formik.Form, { noValidate: true, children: [
5471
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 8, paddingRight: 8, paddingBottom: 6, paddingTop: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
5472
- designSystem.Textarea,
5487
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingLeft: 8, paddingRight: 8, paddingBottom: 6, paddingTop: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(
5488
+ designSystem.Field.Root,
5473
5489
  {
5474
- label: formatMessage({ id: getTrad("input.url.label"), defaultMessage: "URL" }),
5475
- id: "urls",
5476
5490
  hint: formatMessage({
5477
5491
  id: getTrad("input.url.description"),
5478
5492
  defaultMessage: "Separate your URL links by a carriage return."
5479
5493
  }),
5480
5494
  error: error?.message || (errors.urls ? formatMessage({ id: errors.urls, defaultMessage: "An error occured" }) : void 0),
5481
- onChange: handleChange,
5482
- value: values.urls
5495
+ children: [
5496
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({ id: getTrad("input.url.label"), defaultMessage: "URL" }) }),
5497
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Textarea, { onChange: handleChange, value: values.urls }),
5498
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Hint, {}),
5499
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Error, {})
5500
+ ]
5483
5501
  }
5484
5502
  ) }),
5485
5503
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -5507,7 +5525,7 @@ FromUrlForm.propTypes = {
5507
5525
  const AddAssetStep = ({ onClose, onAddAsset, trackedLocation }) => {
5508
5526
  const { formatMessage } = reactIntl.useIntl();
5509
5527
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5510
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id: "title", children: formatMessage({
5528
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id: "title", children: formatMessage({
5511
5529
  id: getTrad("header.actions.add-assets"),
5512
5530
  defaultMessage: "Add new assets"
5513
5531
  }) }) }),
@@ -5564,11 +5582,11 @@ AddAssetStep.propTypes = {
5564
5582
  onAddAsset: PropTypes__default.default.func.isRequired,
5565
5583
  trackedLocation: PropTypes__default.default.string
5566
5584
  };
5567
- const UploadProgressWrapper = styled__default.default.div`
5585
+ const UploadProgressWrapper = styledComponents.styled.div`
5568
5586
  height: 8.8rem;
5569
5587
  width: 100%;
5570
5588
  `;
5571
- const Extension = styled__default.default.span`
5589
+ const Extension = styledComponents.styled.span`
5572
5590
  text-transform: uppercase;
5573
5591
  `;
5574
5592
  const UploadingAssetCard = ({
@@ -5621,7 +5639,7 @@ const UploadingAssetCard = ({
5621
5639
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(UploadProgressWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(UploadProgress, { error, onCancel: handleCancel, progress }) }) }),
5622
5640
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.CardBody, { children: [
5623
5641
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.CardContent, { children: [
5624
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardTitle, { as: "h2", children: asset.name }) }),
5642
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { paddingTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardTitle, { tag: "h2", children: asset.name }) }),
5625
5643
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardSubtitle, { children: /* @__PURE__ */ jsxRuntime.jsx(Extension, { children: asset.ext }) })
5626
5644
  ] }),
5627
5645
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { paddingTop: 1, grow: 1, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.CardBadge, { children: badgeContent }) })
@@ -5709,7 +5727,7 @@ const PendingAssetStep = ({
5709
5727
  }
5710
5728
  };
5711
5729
  return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
5712
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", as: "h2", id: "title", children: formatMessage({
5730
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", textColor: "neutral800", tag: "h2", id: "title", children: formatMessage({
5713
5731
  id: getTrad("header.actions.add-assets"),
5714
5732
  defaultMessage: "Add new assets"
5715
5733
  }) }) }),
@@ -5956,17 +5974,17 @@ MediaLibraryDialog.propTypes = {
5956
5974
  onClose: PropTypes__default.default.func.isRequired,
5957
5975
  onSelectAssets: PropTypes__default.default.func.isRequired
5958
5976
  };
5959
- const DocAsset = styled__default.default(designSystem.Flex)`
5977
+ const DocAsset = styledComponents.styled(designSystem.Flex)`
5960
5978
  background: linear-gradient(180deg, #ffffff 0%, #f6f6f9 121.48%);
5961
5979
  `;
5962
- const VideoPreviewWrapper = styled__default.default(designSystem.Box)`
5980
+ const VideoPreviewWrapper = styledComponents.styled(designSystem.Box)`
5963
5981
  canvas,
5964
5982
  video {
5965
5983
  max-width: 100%;
5966
5984
  height: 124px;
5967
5985
  }
5968
5986
  `;
5969
- const AudioPreviewWrapper = styled__default.default(designSystem.Box)`
5987
+ const AudioPreviewWrapper = styledComponents.styled(designSystem.Box)`
5970
5988
  canvas,
5971
5989
  audio {
5972
5990
  max-width: 100%;
@@ -5990,7 +6008,7 @@ const CarouselAsset = ({ asset }) => {
5990
6008
  return /* @__PURE__ */ jsxRuntime.jsx(
5991
6009
  designSystem.Box,
5992
6010
  {
5993
- as: "img",
6011
+ tag: "img",
5994
6012
  maxHeight: "100%",
5995
6013
  maxWidth: "100%",
5996
6014
  src: createAssetUrl(asset, true),
@@ -6013,8 +6031,8 @@ const CarouselAssetActions = ({ asset, onDeleteAsset, onAddAsset, onEditAsset })
6013
6031
  id: getTrad("control-card.add"),
6014
6032
  defaultMessage: "Add"
6015
6033
  }),
6016
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
6017
- onClick: () => onAddAsset(asset)
6034
+ onClick: () => onAddAsset(asset),
6035
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {})
6018
6036
  }
6019
6037
  ),
6020
6038
  /* @__PURE__ */ jsxRuntime.jsx(CopyLinkButton, { url: prefixFileUrlWithBackendUrl(asset.url) }),
@@ -6025,8 +6043,8 @@ const CarouselAssetActions = ({ asset, onDeleteAsset, onAddAsset, onEditAsset })
6025
6043
  id: "global.delete",
6026
6044
  defaultMessage: "Delete"
6027
6045
  }),
6028
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
6029
- onClick: () => onDeleteAsset(asset)
6046
+ onClick: () => onDeleteAsset(asset),
6047
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {})
6030
6048
  }
6031
6049
  ),
6032
6050
  onEditAsset && /* @__PURE__ */ jsxRuntime.jsx(
@@ -6036,8 +6054,8 @@ const CarouselAssetActions = ({ asset, onDeleteAsset, onAddAsset, onEditAsset })
6036
6054
  id: getTrad("control-card.edit"),
6037
6055
  defaultMessage: "edit"
6038
6056
  }),
6039
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {}),
6040
- onClick: onEditAsset
6057
+ onClick: onEditAsset,
6058
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
6041
6059
  }
6042
6060
  )
6043
6061
  ] });
@@ -6053,7 +6071,7 @@ CarouselAssetActions.propTypes = {
6053
6071
  onEditAsset: PropTypes__default.default.func,
6054
6072
  onDeleteAsset: PropTypes__default.default.func
6055
6073
  };
6056
- const TextAlignTypography = styled__default.default(designSystem.Typography)`
6074
+ const TextAlignTypography = styledComponents.styled(designSystem.Typography)`
6057
6075
  align-items: center;
6058
6076
  `;
6059
6077
  const EmptyStateAsset = ({ disabled, onClick, onDropAsset }) => {
@@ -6096,7 +6114,7 @@ const EmptyStateAsset = ({ disabled, onClick, onDropAsset }) => {
6096
6114
  alignItems: "center",
6097
6115
  height: "100%",
6098
6116
  width: "100%",
6099
- as: "button",
6117
+ tag: "button",
6100
6118
  type: "button",
6101
6119
  disabled,
6102
6120
  onClick,
@@ -6123,7 +6141,7 @@ const EmptyStateAsset = ({ disabled, onClick, onDropAsset }) => {
6123
6141
  fontWeight: "bold",
6124
6142
  textColor: "neutral600",
6125
6143
  style: { textAlign: "center" },
6126
- as: "span",
6144
+ tag: "span",
6127
6145
  children: formatMessage({
6128
6146
  id: getTrad("mediaLibraryInput.placeholder"),
6129
6147
  defaultMessage: "Click to add an asset or drag and drop one in this area"
@@ -6460,7 +6478,6 @@ MediaLibraryInput.propTypes = {
6460
6478
  name: PropTypes__default.default.string.isRequired,
6461
6479
  required: PropTypes__default.default.bool
6462
6480
  };
6463
- const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(icons.Images, {});
6464
6481
  const prefixPluginTranslations = (trad, pluginId2) => {
6465
6482
  if (!pluginId2) {
6466
6483
  throw new TypeError("pluginId can't be empty");
@@ -6475,13 +6492,14 @@ const index = {
6475
6492
  register(app) {
6476
6493
  app.addMenuLink({
6477
6494
  to: `plugins/${pluginId}`,
6478
- icon: PluginIcon,
6495
+ icon: icons.Images,
6479
6496
  intlLabel: {
6480
6497
  id: `${pluginId}.plugin.name`,
6481
6498
  defaultMessage: "Media Library"
6482
6499
  },
6483
6500
  permissions: PERMISSIONS.main,
6484
- Component: () => Promise.resolve().then(() => require("./index-BNV9vUuq.js"))
6501
+ Component: () => Promise.resolve().then(() => require("./index-DwWG14v6.js")),
6502
+ position: 4
6485
6503
  });
6486
6504
  app.addSettingsLink("global", {
6487
6505
  id: "media-library-settings",
@@ -6490,7 +6508,7 @@ const index = {
6490
6508
  defaultMessage: "Media Library"
6491
6509
  },
6492
6510
  to: "media-library",
6493
- Component: () => Promise.resolve().then(() => require("./index-DU4hcIHO.js")),
6511
+ Component: () => Promise.resolve().then(() => require("./index-De1W-cb7.js")),
6494
6512
  permissions: PERMISSIONS.settings
6495
6513
  });
6496
6514
  app.addFields({ type: "media", Component: MediaLibraryInput });
@@ -6559,4 +6577,4 @@ exports.useMediaLibraryPermissions = useMediaLibraryPermissions;
6559
6577
  exports.usePersistentState = usePersistentState;
6560
6578
  exports.useSelectionState = useSelectionState;
6561
6579
  exports.viewOptions = viewOptions;
6562
- //# sourceMappingURL=index-CtyJq8P-.js.map
6580
+ //# sourceMappingURL=index-C7nlFYgw.js.map