@ctlyst.id/internal-ui 3.4.5 → 3.4.6
Sign up to get free protection for your applications and to get access to all the features.
- 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.js
CHANGED
@@ -5876,7 +5876,6 @@ var Uploader = ({
|
|
5876
5876
|
onDrop,
|
5877
5877
|
maxFiles: 1,
|
5878
5878
|
noClick: isDisabled,
|
5879
|
-
disabled: !!filePreview,
|
5880
5879
|
noDrag: isDisabled
|
5881
5880
|
});
|
5882
5881
|
const renderHelperText = () => {
|
@@ -5979,60 +5978,49 @@ var Uploader = ({
|
|
5979
5978
|
)
|
5980
5979
|
}
|
5981
5980
|
) }),
|
5982
|
-
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.
|
5983
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5984
|
-
|
5985
|
-
|
5986
|
-
|
5987
|
-
|
5988
|
-
|
5989
|
-
|
5990
|
-
|
5991
|
-
|
5992
|
-
|
5993
|
-
|
5994
|
-
|
5995
|
-
|
5996
|
-
fontWeight: "400",
|
5997
|
-
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
5998
|
-
mb: size2 === "sm" ? "0" : "2",
|
5999
|
-
textAlign: "center",
|
6000
|
-
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6001
|
-
}
|
6002
|
-
),
|
6003
|
-
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6004
|
-
] })
|
5981
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
5982
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon11.Plus, { size: 6, color }),
|
5983
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react88.Box, { children: [
|
5984
|
+
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
5985
|
+
import_react88.Heading,
|
5986
|
+
{
|
5987
|
+
fontWeight: "400",
|
5988
|
+
fontSize: size2 === "sm" ? "text.md" : "text.xl",
|
5989
|
+
mb: size2 === "sm" ? "0" : "2",
|
5990
|
+
textAlign: "center",
|
5991
|
+
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
5992
|
+
}
|
5993
|
+
),
|
5994
|
+
size2 === "lg" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Text, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6005
5995
|
] })
|
6006
|
-
] })
|
5996
|
+
] }) })
|
6007
5997
|
]
|
6008
5998
|
}
|
6009
5999
|
),
|
6010
|
-
|
6011
|
-
|
6012
|
-
|
6013
|
-
|
6014
|
-
|
6015
|
-
|
6016
|
-
|
6017
|
-
|
6018
|
-
|
6019
|
-
|
6020
|
-
|
6021
|
-
|
6022
|
-
|
6023
|
-
{
|
6024
|
-
|
6025
|
-
|
6026
|
-
|
6027
|
-
|
6028
|
-
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
)
|
6035
|
-
] }),
|
6000
|
+
/* @__PURE__ */ (0, import_react90.createElement)(
|
6001
|
+
"input",
|
6002
|
+
{
|
6003
|
+
...getInputProps(),
|
6004
|
+
key: Math.random(),
|
6005
|
+
ref: inputRef,
|
6006
|
+
accept: "image/*",
|
6007
|
+
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6008
|
+
}
|
6009
|
+
),
|
6010
|
+
filePreview && !isSmall && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react88.Flex, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6011
|
+
import_react88.Button,
|
6012
|
+
{
|
6013
|
+
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
6014
|
+
type: "button",
|
6015
|
+
size: "sm",
|
6016
|
+
variant: "outline",
|
6017
|
+
onClick: () => {
|
6018
|
+
var _a;
|
6019
|
+
(_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.click();
|
6020
|
+
},
|
6021
|
+
children: "Ubah Foto"
|
6022
|
+
}
|
6023
|
+
) }),
|
6036
6024
|
renderErrorText(errorText),
|
6037
6025
|
renderHelperText()
|
6038
6026
|
] });
|