@ctlyst.id/internal-ui 5.3.4 → 5.4.1

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
@@ -769,6 +769,7 @@ interface CustomToastOptions extends Omit<ToastOptions, 'icon'> {
769
769
  link?: {
770
770
  url: string;
771
771
  label: string;
772
+ as?: As;
772
773
  };
773
774
  }
774
775
  declare const useToast: () => {
package/dist/index.d.ts CHANGED
@@ -769,6 +769,7 @@ interface CustomToastOptions extends Omit<ToastOptions, 'icon'> {
769
769
  link?: {
770
770
  url: string;
771
771
  label: string;
772
+ as?: As;
772
773
  };
773
774
  }
774
775
  declare const useToast: () => {
package/dist/index.js CHANGED
@@ -5946,6 +5946,7 @@ var useToast = () => {
5946
5946
  link && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5947
5947
  import_react92.Link,
5948
5948
  {
5949
+ as: link.as,
5949
5950
  href: link.url,
5950
5951
  textDecoration: "underline",
5951
5952
  minW: "max-content",
@@ -6141,6 +6142,11 @@ var Uploader = ({
6141
6142
  const file = files[0];
6142
6143
  const imageUrl = URL.createObjectURL(file);
6143
6144
  const img = new Image();
6145
+ if (file.type === "image/heic") {
6146
+ setFilePreview(file.name);
6147
+ onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, null);
6148
+ return null;
6149
+ }
6144
6150
  img.src = imageUrl;
6145
6151
  img.onload = () => {
6146
6152
  const imgWidth = img.width;
@@ -6157,7 +6163,7 @@ var Uploader = ({
6157
6163
  };
6158
6164
  return null;
6159
6165
  },
6160
- [acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
6166
+ [customValidation, dimension, handleRejection, onHandleUploadFile]
6161
6167
  );
6162
6168
  const onDropRejected = (0, import_react94.useCallback)((fileRejections) => {
6163
6169
  defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
@@ -6185,8 +6191,8 @@ var Uploader = ({
6185
6191
  accept: Object.fromEntries(acceptFile),
6186
6192
  maxFiles: 1,
6187
6193
  maxSize: maxFileSize == null ? void 0 : maxFileSize.validate,
6188
- noClick: isDisabled,
6189
- noDrag: isDisabled,
6194
+ noClick: isDisabled || !!filePreview,
6195
+ noDrag: isDisabled || !!filePreview,
6190
6196
  validator
6191
6197
  });
6192
6198
  const renderHelperText = () => {
@@ -6278,7 +6284,7 @@ var Uploader = ({
6278
6284
  "data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
6279
6285
  justify: "center",
6280
6286
  align: "center",
6281
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6287
+ children: filePreview.includes("blob") ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6282
6288
  import_react93.Image,
6283
6289
  {
6284
6290
  h: size2 === "lg" ? "120" : "100",
@@ -6286,7 +6292,7 @@ var Uploader = ({
6286
6292
  alt: "uploader-preview",
6287
6293
  objectFit: "contain"
6288
6294
  }
6289
- )
6295
+ ) : filePreview
6290
6296
  }
6291
6297
  ) }),
6292
6298
  !filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react93.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react93.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [