@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.mjs CHANGED
@@ -5805,6 +5805,7 @@ var useToast = () => {
5805
5805
  link && /* @__PURE__ */ jsx65(
5806
5806
  Link6,
5807
5807
  {
5808
+ as: link.as,
5808
5809
  href: link.url,
5809
5810
  textDecoration: "underline",
5810
5811
  minW: "max-content",
@@ -6012,6 +6013,11 @@ var Uploader = ({
6012
6013
  const file = files[0];
6013
6014
  const imageUrl = URL.createObjectURL(file);
6014
6015
  const img = new Image();
6016
+ if (file.type === "image/heic") {
6017
+ setFilePreview(file.name);
6018
+ onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, null);
6019
+ return null;
6020
+ }
6015
6021
  img.src = imageUrl;
6016
6022
  img.onload = () => {
6017
6023
  const imgWidth = img.width;
@@ -6028,7 +6034,7 @@ var Uploader = ({
6028
6034
  };
6029
6035
  return null;
6030
6036
  },
6031
- [acceptFormat, customValidation, dimension, handleRejection, maxFileSize, onHandleUploadFile]
6037
+ [customValidation, dimension, handleRejection, onHandleUploadFile]
6032
6038
  );
6033
6039
  const onDropRejected = useCallback4((fileRejections) => {
6034
6040
  defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
@@ -6056,8 +6062,8 @@ var Uploader = ({
6056
6062
  accept: Object.fromEntries(acceptFile),
6057
6063
  maxFiles: 1,
6058
6064
  maxSize: maxFileSize == null ? void 0 : maxFileSize.validate,
6059
- noClick: isDisabled,
6060
- noDrag: isDisabled,
6065
+ noClick: isDisabled || !!filePreview,
6066
+ noDrag: isDisabled || !!filePreview,
6061
6067
  validator
6062
6068
  });
6063
6069
  const renderHelperText = () => {
@@ -6149,7 +6155,7 @@ var Uploader = ({
6149
6155
  "data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
6150
6156
  justify: "center",
6151
6157
  align: "center",
6152
- children: /* @__PURE__ */ jsx66(
6158
+ children: filePreview.includes("blob") ? /* @__PURE__ */ jsx66(
6153
6159
  ChakraImage,
6154
6160
  {
6155
6161
  h: size2 === "lg" ? "120" : "100",
@@ -6157,7 +6163,7 @@ var Uploader = ({
6157
6163
  alt: "uploader-preview",
6158
6164
  objectFit: "contain"
6159
6165
  }
6160
- )
6166
+ ) : filePreview
6161
6167
  }
6162
6168
  ) }),
6163
6169
  !filePreview && /* @__PURE__ */ jsx66(Fragment12, { children: isDragActive ? /* @__PURE__ */ jsx66(Text18, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs31(Flex19, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [