@strapi/upload 5.0.0-rc.7 → 5.0.0-rc.9

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.
@@ -32,7 +32,7 @@ const __variableDynamicImportRuntimeHelper = (glob, path) => {
32
32
  });
33
33
  };
34
34
  const name$1 = "@strapi/upload";
35
- const version = "5.0.0-rc.6";
35
+ const version = "5.0.0-rc.8";
36
36
  const description = "Makes it easy to upload images and files to your Strapi Application.";
37
37
  const license = "SEE LICENSE IN LICENSE";
38
38
  const author = {
@@ -77,10 +77,10 @@ const scripts = {
77
77
  watch: "pack-up watch"
78
78
  };
79
79
  const dependencies = {
80
- "@strapi/design-system": "2.0.0-beta.6",
81
- "@strapi/icons": "2.0.0-beta.6",
82
- "@strapi/provider-upload-local": "5.0.0-rc.6",
83
- "@strapi/utils": "5.0.0-rc.6",
80
+ "@strapi/design-system": "2.0.0-rc.7",
81
+ "@strapi/icons": "2.0.0-rc.7",
82
+ "@strapi/provider-upload-local": "workspace:*",
83
+ "@strapi/utils": "workspace:*",
84
84
  "byte-size": "8.1.1",
85
85
  cropperjs: "1.6.1",
86
86
  "date-fns": "2.30.0",
@@ -102,9 +102,9 @@ const dependencies = {
102
102
  yup: "0.32.9"
103
103
  };
104
104
  const devDependencies = {
105
- "@strapi/admin": "5.0.0-rc.6",
105
+ "@strapi/admin": "workspace:*",
106
106
  "@strapi/pack-up": "5.0.0",
107
- "@strapi/types": "5.0.0-rc.6",
107
+ "@strapi/types": "workspace:*",
108
108
  "@testing-library/dom": "10.1.0",
109
109
  "@testing-library/react": "15.0.7",
110
110
  "@testing-library/user-event": "14.5.2",
@@ -971,7 +971,7 @@ const ContextInfo = ({ blocks }) => {
971
971
  paddingTop: 4,
972
972
  paddingBottom: 4,
973
973
  background: "neutral100",
974
- children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: blocks.map(({ label, value }) => /* @__PURE__ */ jsx(Grid.Item, { col: 6, xs: 12, children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
974
+ children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: blocks.map(({ label, value }) => /* @__PURE__ */ jsx(Grid.Item, { col: 6, xs: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
975
975
  /* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", children: label }),
976
976
  /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral700", children: value })
977
977
  ] }) }, label)) })
@@ -2102,7 +2102,7 @@ const EditAssetContent = ({
2102
2102
  children: ({ values, errors, handleChange, setFieldValue }) => /* @__PURE__ */ jsxs(Fragment, { children: [
2103
2103
  /* @__PURE__ */ jsx(DialogHeader, {}),
2104
2104
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs(Grid.Root, { gap: 4, children: [
2105
- /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, children: /* @__PURE__ */ jsx(
2105
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(
2106
2106
  PreviewBox,
2107
2107
  {
2108
2108
  asset,
@@ -2117,7 +2117,7 @@ const EditAssetContent = ({
2117
2117
  trackedLocation
2118
2118
  }
2119
2119
  ) }),
2120
- /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, children: /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
2120
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
2121
2121
  /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 3, children: [
2122
2122
  /* @__PURE__ */ jsx(
2123
2123
  ContextInfo,
@@ -2496,7 +2496,7 @@ const EditFolderContent = ({ onClose, folder, location, parentFolderId }) => {
2496
2496
  children: ({ values, errors, handleChange, setFieldValue }) => /* @__PURE__ */ jsxs(Form, { noValidate: true, children: [
2497
2497
  /* @__PURE__ */ jsx(EditFolderModalHeader, { isEditing }),
2498
2498
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs(Grid.Root, { gap: 4, children: [
2499
- isEditing && /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 12, children: /* @__PURE__ */ jsx(
2499
+ isEditing && /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 12, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(
2500
2500
  ContextInfo,
2501
2501
  {
2502
2502
  blocks: [
@@ -2526,7 +2526,7 @@ const EditFolderContent = ({ onClose, folder, location, parentFolderId }) => {
2526
2526
  ]
2527
2527
  }
2528
2528
  ) }),
2529
- /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, children: /* @__PURE__ */ jsxs(Field.Root, { name: "name", error: errors.name, children: [
2529
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxs(Field.Root, { name: "name", error: errors.name, children: [
2530
2530
  /* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
2531
2531
  id: getTrad("form.input.label.folder-name"),
2532
2532
  defaultMessage: "Name"
@@ -2541,7 +2541,7 @@ const EditFolderContent = ({ onClose, folder, location, parentFolderId }) => {
2541
2541
  ),
2542
2542
  /* @__PURE__ */ jsx(Field.Error, {})
2543
2543
  ] }) }),
2544
- /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, children: /* @__PURE__ */ jsxs(Field.Root, { id: "folder-parent", children: [
2544
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 12, col: 6, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsxs(Field.Root, { id: "folder-parent", children: [
2545
2545
  /* @__PURE__ */ jsx(Field.Label, { children: formatMessage({
2546
2546
  id: getTrad("form.input.label.folder-location"),
2547
2547
  defaultMessage: "Location"
@@ -3079,7 +3079,7 @@ const AssetGridList = ({
3079
3079
  }
3080
3080
  ) }) }, asset.id);
3081
3081
  }
3082
- return /* @__PURE__ */ jsx(Grid.Item, { col: 3, height: "100%", children: /* @__PURE__ */ jsx(
3082
+ return /* @__PURE__ */ jsx(Grid.Item, { col: 3, height: "100%", direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(
3083
3083
  AssetCard,
3084
3084
  {
3085
3085
  allowedTypes,
@@ -3638,14 +3638,14 @@ const TableRows = ({
3638
3638
  contentType === "folder" && /* @__PURE__ */ jsx(
3639
3639
  IconButton,
3640
3640
  {
3641
- tag: folderURL ? Link$1 : void 0,
3641
+ tag: folderURL ? Link$1 : "button",
3642
3642
  label: formatMessage({
3643
3643
  id: getTrad("list.folders.link-label"),
3644
3644
  defaultMessage: "Access folder"
3645
3645
  }),
3646
3646
  to: folderURL,
3647
3647
  onClick: () => !folderURL && onChangeFolder(id2),
3648
- borderWidth: 0,
3648
+ variant: "ghost",
3649
3649
  children: /* @__PURE__ */ jsx(Eye, {})
3650
3650
  }
3651
3651
  ),
@@ -3657,7 +3657,7 @@ const TableRows = ({
3657
3657
  defaultMessage: "Edit"
3658
3658
  }),
3659
3659
  onClick: () => contentType === "asset" ? onEditAsset(element) : onEditFolder(element),
3660
- borderWidth: 0,
3660
+ variant: "ghost",
3661
3661
  children: /* @__PURE__ */ jsx(Pencil, {})
3662
3662
  }
3663
3663
  )
@@ -3730,7 +3730,7 @@ const TableList = ({
3730
3730
  {
3731
3731
  label: sortLabel,
3732
3732
  onClick: () => handleClickSort(isSorted, name2),
3733
- borderWidth: 0,
3733
+ variant: "ghost",
3734
3734
  children: isUp ? /* @__PURE__ */ jsx(CaretUp, {}) : /* @__PURE__ */ jsx(CaretDown, {})
3735
3735
  }
3736
3736
  ),
@@ -4813,65 +4813,74 @@ const BrowseStep = ({
4813
4813
  { count: folderCount }
4814
4814
  ) || "",
4815
4815
  children: folders.map((folder) => {
4816
- return /* @__PURE__ */ jsx(Grid.Item, { col: 3, children: /* @__PURE__ */ jsx(
4817
- FolderCard,
4816
+ return /* @__PURE__ */ jsx(
4817
+ Grid.Item,
4818
4818
  {
4819
- ariaLabel: folder.name,
4820
- id: `folder-${folder.id}`,
4821
- onClick: () => handleClickFolderCard(folder.id, folder.path),
4822
- cardActions: onEditFolder && /* @__PURE__ */ jsx(
4823
- IconButton,
4824
- {
4825
- withTooltip: false,
4826
- label: formatMessage({
4827
- id: getTrad("list.folder.edit"),
4828
- defaultMessage: "Edit folder"
4829
- }),
4830
- onClick: () => onEditFolder(folder),
4831
- children: /* @__PURE__ */ jsx(Pencil, {})
4832
- }
4833
- ),
4834
- children: /* @__PURE__ */ jsx(FolderCardBody, { children: /* @__PURE__ */ jsx(
4835
- FolderCardBodyAction,
4819
+ col: 3,
4820
+ direction: "column",
4821
+ alignItems: "stretch",
4822
+ children: /* @__PURE__ */ jsx(
4823
+ FolderCard,
4836
4824
  {
4825
+ ariaLabel: folder.name,
4826
+ id: `folder-${folder.id}`,
4837
4827
  onClick: () => handleClickFolderCard(folder.id, folder.path),
4838
- children: /* @__PURE__ */ jsxs(Flex, { tag: "h2", direction: "column", alignItems: "start", maxWidth: "100%", children: [
4839
- /* @__PURE__ */ jsxs(
4840
- TypographyMaxWidth,
4841
- {
4842
- fontWeight: "semiBold",
4843
- ellipsis: true,
4844
- textColor: "neutral800",
4845
- children: [
4846
- folder.name,
4847
- /* @__PURE__ */ jsx(VisuallyHidden, { children: "-" })
4848
- ]
4849
- }
4850
- ),
4851
- /* @__PURE__ */ jsx(
4852
- TypographyMaxWidth,
4853
- {
4854
- tag: "span",
4855
- textColor: "neutral600",
4856
- variant: "pi",
4857
- ellipsis: true,
4858
- children: formatMessage(
4828
+ cardActions: onEditFolder && /* @__PURE__ */ jsx(
4829
+ IconButton,
4830
+ {
4831
+ withTooltip: false,
4832
+ label: formatMessage({
4833
+ id: getTrad("list.folder.edit"),
4834
+ defaultMessage: "Edit folder"
4835
+ }),
4836
+ onClick: () => onEditFolder(folder),
4837
+ children: /* @__PURE__ */ jsx(Pencil, {})
4838
+ }
4839
+ ),
4840
+ children: /* @__PURE__ */ jsx(FolderCardBody, { children: /* @__PURE__ */ jsx(
4841
+ FolderCardBodyAction,
4842
+ {
4843
+ onClick: () => handleClickFolderCard(folder.id, folder.path),
4844
+ children: /* @__PURE__ */ jsxs(Flex, { tag: "h2", direction: "column", alignItems: "start", maxWidth: "100%", children: [
4845
+ /* @__PURE__ */ jsxs(
4846
+ TypographyMaxWidth,
4859
4847
  {
4860
- id: getTrad("list.folder.subtitle"),
4861
- defaultMessage: "{folderCount, plural, =0 {# folder} one {# folder} other {# folders}}, {filesCount, plural, =0 {# asset} one {# asset} other {# assets}}"
4862
- },
4848
+ fontWeight: "semiBold",
4849
+ ellipsis: true,
4850
+ textColor: "neutral800",
4851
+ children: [
4852
+ folder.name,
4853
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: "-" })
4854
+ ]
4855
+ }
4856
+ ),
4857
+ /* @__PURE__ */ jsx(
4858
+ TypographyMaxWidth,
4863
4859
  {
4864
- folderCount: folder.children.count,
4865
- filesCount: folder.files.count
4860
+ tag: "span",
4861
+ textColor: "neutral600",
4862
+ variant: "pi",
4863
+ ellipsis: true,
4864
+ children: formatMessage(
4865
+ {
4866
+ id: getTrad("list.folder.subtitle"),
4867
+ defaultMessage: "{folderCount, plural, =0 {# folder} one {# folder} other {# folders}}, {filesCount, plural, =0 {# asset} one {# asset} other {# assets}}"
4868
+ },
4869
+ {
4870
+ folderCount: folder.children.count,
4871
+ filesCount: folder.files.count
4872
+ }
4873
+ )
4866
4874
  }
4867
4875
  )
4868
- }
4869
- )
4870
- ] })
4876
+ ] })
4877
+ }
4878
+ ) })
4871
4879
  }
4872
- ) })
4873
- }
4874
- ) }, `folder-${folder.id}`);
4880
+ )
4881
+ },
4882
+ `folder-${folder.id}`
4883
+ );
4875
4884
  })
4876
4885
  }
4877
4886
  ),
@@ -5771,7 +5780,7 @@ const PendingAssetStep = ({
5771
5780
  /* @__PURE__ */ jsx(KeyboardNavigable, { tagName: "article", children: /* @__PURE__ */ jsx(Grid.Root, { gap: 4, children: assets.map((asset) => {
5772
5781
  const assetKey = asset.url;
5773
5782
  if (uploadStatus === Status.Uploading || uploadStatus === Status.Intermediate) {
5774
- return /* @__PURE__ */ jsx(Grid.Item, { col: 4, children: /* @__PURE__ */ jsx(
5783
+ return /* @__PURE__ */ jsx(Grid.Item, { col: 4, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(
5775
5784
  UploadingAssetCard,
5776
5785
  {
5777
5786
  addUploadedFiles,
@@ -5784,7 +5793,7 @@ const PendingAssetStep = ({
5784
5793
  }
5785
5794
  ) }, assetKey);
5786
5795
  }
5787
- return /* @__PURE__ */ jsx(Grid.Item, { col: 4, children: /* @__PURE__ */ jsx(
5796
+ return /* @__PURE__ */ jsx(Grid.Item, { col: 4, direction: "column", alignItems: "stretch", children: /* @__PURE__ */ jsx(
5788
5797
  AssetCard,
5789
5798
  {
5790
5799
  asset,
@@ -6529,7 +6538,7 @@ const index = {
6529
6538
  defaultMessage: "Media Library"
6530
6539
  },
6531
6540
  permissions: PERMISSIONS.main,
6532
- Component: () => import("./index-BE7g4JPX.mjs"),
6541
+ Component: () => import("./index-Sh4Ok2WQ.mjs"),
6533
6542
  position: 4
6534
6543
  });
6535
6544
  app.addSettingsLink("global", {
@@ -6539,7 +6548,7 @@ const index = {
6539
6548
  defaultMessage: "Media Library"
6540
6549
  },
6541
6550
  to: "media-library",
6542
- Component: () => import("./index-gRGQL1g6.mjs"),
6551
+ Component: () => import("./index-CFUyRUTZ.mjs"),
6543
6552
  permissions: PERMISSIONS.settings
6544
6553
  });
6545
6554
  app.addFields({ type: "media", Component: MediaLibraryInput });
@@ -6610,4 +6619,4 @@ export {
6610
6619
  FolderCardBodyAction as y,
6611
6620
  AssetGridList as z
6612
6621
  };
6613
- //# sourceMappingURL=index-f2PMFkee.mjs.map
6622
+ //# sourceMappingURL=index-CWKAMMzh.mjs.map