@ikatec/nebula-react 1.9.0-beta.4 → 1.9.0-beta.5

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.
package/dist/index.d.mts CHANGED
@@ -482,10 +482,11 @@ declare const DropdownMenuShortcut: {
482
482
 
483
483
  type FileMetadata = {
484
484
  name: string;
485
- size: number;
485
+ size?: number;
486
486
  type: string;
487
487
  url: string;
488
488
  id: string;
489
+ description?: string;
489
490
  };
490
491
  type FileWithPreview = {
491
492
  file: File | FileMetadata;
package/dist/index.d.ts CHANGED
@@ -482,10 +482,11 @@ declare const DropdownMenuShortcut: {
482
482
 
483
483
  type FileMetadata = {
484
484
  name: string;
485
- size: number;
485
+ size?: number;
486
486
  type: string;
487
487
  url: string;
488
488
  id: string;
489
+ description?: string;
489
490
  };
490
491
  type FileWithPreview = {
491
492
  file: File | FileMetadata;
package/dist/index.js CHANGED
@@ -4387,7 +4387,7 @@ var useFileUpload = (options = {}) => {
4387
4387
  };
4388
4388
  }
4389
4389
  } else {
4390
- if (file.size > maxSize) {
4390
+ if (file.size != null && file.size > maxSize) {
4391
4391
  return { error: "MAXIMUM_FILE_SIZE_EXCEEDED" /* MAXIMUM_FILE_SIZE_EXCEEDED */, file };
4392
4392
  }
4393
4393
  }
@@ -4469,7 +4469,7 @@ var useFileUpload = (options = {}) => {
4469
4469
  return;
4470
4470
  }
4471
4471
  }
4472
- if (file.size > maxSize) {
4472
+ if (file.size != null && file.size > maxSize) {
4473
4473
  onError?.([
4474
4474
  { file, error: "MAXIMUM_FILE_SIZE_EXCEEDED" /* MAXIMUM_FILE_SIZE_EXCEEDED */ }
4475
4475
  ]);
@@ -4770,7 +4770,7 @@ function FileUpload({
4770
4770
  ) }),
4771
4771
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "nebula-ds flex min-w-0 flex-col gap-1", children: [
4772
4772
  /* @__PURE__ */ jsxRuntime.jsx(Heading, { level: "5", className: "nebula-ds text-xs", children: file.file.name }),
4773
- /* @__PURE__ */ jsxRuntime.jsx(Paragraph, { size: "sm", children: formatBytes(file.file.size) })
4773
+ "description" in file.file && file.file.description ? /* @__PURE__ */ jsxRuntime.jsx(Paragraph, { size: "sm", children: file.file.description }) : file.file.size != null && file.file.size > 0 && /* @__PURE__ */ jsxRuntime.jsx(Paragraph, { size: "sm", children: formatBytes(file.file.size) })
4774
4774
  ] })
4775
4775
  ] }),
4776
4776
  /* @__PURE__ */ jsxRuntime.jsx(
package/dist/index.mjs CHANGED
@@ -4344,7 +4344,7 @@ var useFileUpload = (options = {}) => {
4344
4344
  };
4345
4345
  }
4346
4346
  } else {
4347
- if (file.size > maxSize) {
4347
+ if (file.size != null && file.size > maxSize) {
4348
4348
  return { error: "MAXIMUM_FILE_SIZE_EXCEEDED" /* MAXIMUM_FILE_SIZE_EXCEEDED */, file };
4349
4349
  }
4350
4350
  }
@@ -4426,7 +4426,7 @@ var useFileUpload = (options = {}) => {
4426
4426
  return;
4427
4427
  }
4428
4428
  }
4429
- if (file.size > maxSize) {
4429
+ if (file.size != null && file.size > maxSize) {
4430
4430
  onError?.([
4431
4431
  { file, error: "MAXIMUM_FILE_SIZE_EXCEEDED" /* MAXIMUM_FILE_SIZE_EXCEEDED */ }
4432
4432
  ]);
@@ -4727,7 +4727,7 @@ function FileUpload({
4727
4727
  ) }),
4728
4728
  /* @__PURE__ */ jsxs("div", { className: "nebula-ds flex min-w-0 flex-col gap-1", children: [
4729
4729
  /* @__PURE__ */ jsx(Heading, { level: "5", className: "nebula-ds text-xs", children: file.file.name }),
4730
- /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: formatBytes(file.file.size) })
4730
+ "description" in file.file && file.file.description ? /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: file.file.description }) : file.file.size != null && file.file.size > 0 && /* @__PURE__ */ jsx(Paragraph, { size: "sm", children: formatBytes(file.file.size) })
4731
4731
  ] })
4732
4732
  ] }),
4733
4733
  /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikatec/nebula-react",
3
- "version": "1.9.0-beta.4",
3
+ "version": "1.9.0-beta.5",
4
4
  "description": "React components for Nebula Design System",
5
5
  "publishConfig": {
6
6
  "access": "public"