@ctlyst.id/internal-ui 3.4.5 → 3.4.6
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.js +39 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5752,7 +5752,6 @@ var Uploader = ({
|
|
|
5752
5752
|
onDrop,
|
|
5753
5753
|
maxFiles: 1,
|
|
5754
5754
|
noClick: isDisabled,
|
|
5755
|
-
disabled: !!filePreview,
|
|
5756
5755
|
noDrag: isDisabled
|
|
5757
5756
|
});
|
|
5758
5757
|
const renderHelperText = () => {
|
|
@@ -5855,60 +5854,49 @@ var Uploader = ({
|
|
|
5855
5854
|
)
|
|
5856
5855
|
}
|
|
5857
5856
|
) }),
|
|
5858
|
-
!filePreview && /* @__PURE__ */
|
|
5859
|
-
/* @__PURE__ */ jsx66(
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
fontWeight: "400",
|
|
5873
|
-
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
|
5874
|
-
mb: size2 === "sm" ? "0" : "2",
|
|
5875
|
-
textAlign: "center",
|
|
5876
|
-
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
|
5877
|
-
}
|
|
5878
|
-
),
|
|
5879
|
-
size2 === "lg" && /* @__PURE__ */ jsx66(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
|
5880
|
-
] })
|
|
5857
|
+
!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: [
|
|
5858
|
+
size2 === "sm" && /* @__PURE__ */ jsx66(Plus, { size: 6, color }),
|
|
5859
|
+
/* @__PURE__ */ jsxs31(Box30, { children: [
|
|
5860
|
+
!filePreview && /* @__PURE__ */ jsx66(
|
|
5861
|
+
Heading2,
|
|
5862
|
+
{
|
|
5863
|
+
fontWeight: "400",
|
|
5864
|
+
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
|
5865
|
+
mb: size2 === "sm" ? "0" : "2",
|
|
5866
|
+
textAlign: "center",
|
|
5867
|
+
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
|
5868
|
+
}
|
|
5869
|
+
),
|
|
5870
|
+
size2 === "lg" && /* @__PURE__ */ jsx66(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
|
5881
5871
|
] })
|
|
5882
|
-
] })
|
|
5872
|
+
] }) })
|
|
5883
5873
|
]
|
|
5884
5874
|
}
|
|
5885
5875
|
),
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
{
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
)
|
|
5911
|
-
] }),
|
|
5876
|
+
/* @__PURE__ */ createElement(
|
|
5877
|
+
"input",
|
|
5878
|
+
{
|
|
5879
|
+
...getInputProps(),
|
|
5880
|
+
key: Math.random(),
|
|
5881
|
+
ref: inputRef,
|
|
5882
|
+
accept: "image/*",
|
|
5883
|
+
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
|
5884
|
+
}
|
|
5885
|
+
),
|
|
5886
|
+
filePreview && !isSmall && /* @__PURE__ */ jsx66(Flex19, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ jsx66(
|
|
5887
|
+
Button7,
|
|
5888
|
+
{
|
|
5889
|
+
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
|
5890
|
+
type: "button",
|
|
5891
|
+
size: "sm",
|
|
5892
|
+
variant: "outline",
|
|
5893
|
+
onClick: () => {
|
|
5894
|
+
var _a;
|
|
5895
|
+
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.click();
|
|
5896
|
+
},
|
|
5897
|
+
children: "Ubah Foto"
|
|
5898
|
+
}
|
|
5899
|
+
) }),
|
|
5912
5900
|
renderErrorText(errorText),
|
|
5913
5901
|
renderHelperText()
|
|
5914
5902
|
] });
|