@asdp/ferryui 0.1.22-dev.8783 → 0.1.22-dev.8798

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
@@ -3271,6 +3271,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
3271
3271
  disabled?: boolean;
3272
3272
  language?: Language;
3273
3273
  labels?: Partial<FileUploadLabels>;
3274
+ /**
3275
+ * URL or path for the PDF icon image.
3276
+ * This should be provided by the consumer app.
3277
+ * Example: '/assets/images/icons/pdficon.svg'
3278
+ */
3279
+ pdfIcon?: string;
3274
3280
  }
3275
3281
 
3276
3282
  declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -3271,6 +3271,12 @@ interface FileUploadProps<T extends FieldValues = FieldValues> {
3271
3271
  disabled?: boolean;
3272
3272
  language?: Language;
3273
3273
  labels?: Partial<FileUploadLabels>;
3274
+ /**
3275
+ * URL or path for the PDF icon image.
3276
+ * This should be provided by the consumer app.
3277
+ * Example: '/assets/images/icons/pdficon.svg'
3278
+ */
3279
+ pdfIcon?: string;
3274
3280
  }
3275
3281
 
3276
3282
  declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps<react_hook_form.FieldValues> & React$1.RefAttributes<HTMLDivElement>>;
package/dist/index.js CHANGED
@@ -11909,7 +11909,8 @@ var FileUpload = React5__default.default.forwardRef(
11909
11909
  placeholder: placeholderProp,
11910
11910
  disabled = false,
11911
11911
  language = "id",
11912
- labels: customLabels
11912
+ labels: customLabels,
11913
+ pdfIcon
11913
11914
  }, ref) => {
11914
11915
  const mergedLabels = { ...DEFAULT_LABELS38[language], ...customLabels };
11915
11916
  const styles = uploadStyles();
@@ -11943,7 +11944,7 @@ var FileUpload = React5__default.default.forwardRef(
11943
11944
  const file = files[0];
11944
11945
  setCurrentFile(file);
11945
11946
  if (file.size > maxSize * 1024 * 1024) {
11946
- setSizeError("error");
11947
+ setSizeError(`${mergedLabels.sizeLabel} file melebihi ${maxSize}MB`);
11947
11948
  onChange(void 0);
11948
11949
  return;
11949
11950
  }
@@ -12056,7 +12057,24 @@ var FileUpload = React5__default.default.forwardRef(
12056
12057
  alt: "preview",
12057
12058
  className: styles.filePreviewImage
12058
12059
  }
12059
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Image, { src: "/assets/images/icons/pdficon.svg", alt: "PDF Icon", width: 32, height: 32 })
12060
+ ) : pdfIcon ? /* @__PURE__ */ jsxRuntime.jsx(
12061
+ "img",
12062
+ {
12063
+ src: pdfIcon,
12064
+ alt: "PDF Icon",
12065
+ width: 32,
12066
+ height: 32,
12067
+ style: { flexShrink: 0 }
12068
+ }
12069
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
12070
+ react.Icon,
12071
+ {
12072
+ icon: "fluent:document-pdf-32-regular",
12073
+ width: 32,
12074
+ height: 32,
12075
+ style: { flexShrink: 0, color: brandColors2[80] }
12076
+ }
12077
+ )
12060
12078
  }
12061
12079
  ),
12062
12080
  /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.disabledFileInfo, children: [
@@ -12209,7 +12227,24 @@ var FileUpload = React5__default.default.forwardRef(
12209
12227
  alt: "preview",
12210
12228
  className: styles.filePreviewImage
12211
12229
  }
12212
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Image, { src: "/assets/images/icons/pdficon.svg", alt: "PDF Icon", width: 32, height: 32 })
12230
+ ) : pdfIcon ? /* @__PURE__ */ jsxRuntime.jsx(
12231
+ "img",
12232
+ {
12233
+ src: pdfIcon,
12234
+ alt: "PDF Icon",
12235
+ width: 32,
12236
+ height: 32,
12237
+ style: { flexShrink: 0 }
12238
+ }
12239
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
12240
+ react.Icon,
12241
+ {
12242
+ icon: "fluent:document-pdf-32-regular",
12243
+ width: 32,
12244
+ height: 32,
12245
+ style: { flexShrink: 0, color: brandColors2[80] }
12246
+ }
12247
+ )
12213
12248
  }
12214
12249
  ),
12215
12250
  /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsxs(