sprint-asia-custom-component 0.1.129 → 0.1.131
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
CHANGED
|
@@ -26055,13 +26055,16 @@
|
|
|
26055
26055
|
onDrop,
|
|
26056
26056
|
maxFiles = 1,
|
|
26057
26057
|
selectedFile,
|
|
26058
|
-
error = ""
|
|
26058
|
+
error = "",
|
|
26059
|
+
disabled
|
|
26059
26060
|
}) => {
|
|
26060
26061
|
const [errorMessage, setErrorMessage] = React.useState("");
|
|
26061
26062
|
const onDropRejected = rejectedFiles => {
|
|
26062
26063
|
const file = rejectedFiles[0];
|
|
26063
26064
|
if (file.errors[0]?.code === "file-too-large") {
|
|
26064
|
-
setErrorMessage("Your file is too large
|
|
26065
|
+
setErrorMessage("Your file is too large. Max file size is 5 MB");
|
|
26066
|
+
} else if (file.errors[0]?.code === "file-invalid-type") {
|
|
26067
|
+
setErrorMessage("File format not supported. Please try again with PNG, JPEG, JPG, or PDF file within 5 MB");
|
|
26065
26068
|
}
|
|
26066
26069
|
};
|
|
26067
26070
|
const {
|
|
@@ -26071,12 +26074,14 @@
|
|
|
26071
26074
|
onDrop,
|
|
26072
26075
|
maxFiles,
|
|
26073
26076
|
accept: {
|
|
26074
|
-
"image
|
|
26077
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
26078
|
+
"image/png": [".png"],
|
|
26075
26079
|
"application/pdf": [".pdf"]
|
|
26076
26080
|
},
|
|
26077
26081
|
noKeyboard: true,
|
|
26078
26082
|
maxSize: 5242881,
|
|
26079
|
-
onDropRejected
|
|
26083
|
+
onDropRejected,
|
|
26084
|
+
disabled
|
|
26080
26085
|
});
|
|
26081
26086
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
26082
26087
|
className: "w-full"
|
|
@@ -48029,6 +48034,9 @@
|
|
|
48029
48034
|
|
|
48030
48035
|
var img$6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA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IS FILE IS AUTO GENERATED
|
|
48038
|
+
function FaInfinity(props){return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 640 512"},"child":[{"tag":"path","attr":{"d":"M0 241.1C0 161 65 96 145.1 96c38.5 0 75.4 15.3 102.6 42.5L320 210.7l72.2-72.2C419.5 111.3 456.4 96 494.9 96C575 96 640 161 640 241.1v29.7C640 351 575 416 494.9 416c-38.5 0-75.4-15.3-102.6-42.5L320 301.3l-72.2 72.2C220.5 400.7 183.6 416 145.1 416C65 416 0 351 0 270.9V241.1zM274.7 256l-72.2-72.2c-15.2-15.2-35.9-23.8-57.4-23.8C100.3 160 64 196.3 64 241.1v29.7c0 44.8 36.3 81.1 81.1 81.1c21.5 0 42.2-8.5 57.4-23.8L274.7 256zm90.5 0l72.2 72.2c15.2 15.2 35.9 23.8 57.4 23.8c44.8 0 81.1-36.3 81.1-81.1V241.1c0-44.8-36.3-81.1-81.1-81.1c-21.5 0-42.2 8.5-57.4 23.8L365.3 256z"},"child":[]}]})(props);}
|
|
48039
|
+
|
|
48032
48040
|
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
48033
48041
|
const Header = ({
|
|
48034
48042
|
title = "Label",
|
|
@@ -48049,7 +48057,7 @@
|
|
|
48049
48057
|
}],
|
|
48050
48058
|
isNotificationActive = false,
|
|
48051
48059
|
dataNotification = ["Notification 1", "Notification 2"],
|
|
48052
|
-
dataBalance =
|
|
48060
|
+
dataBalance = 0,
|
|
48053
48061
|
onClickWallet
|
|
48054
48062
|
}) => {
|
|
48055
48063
|
const [isProfileContentVisible, setProfileContentVisible] = React.useState(false);
|
|
@@ -48081,9 +48089,13 @@
|
|
|
48081
48089
|
size: 24
|
|
48082
48090
|
})), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
48083
48091
|
className: "text-neutral300 text-xs"
|
|
48084
|
-
}, "Balance:"), /*#__PURE__*/React__default["default"].createElement("
|
|
48092
|
+
}, "Balance:"), ["System Administrator", "Ops Administrator", "Business Administrator", "Business Support", "Reconcile"].includes(roleName) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48093
|
+
className: "flex items-center gap-1"
|
|
48094
|
+
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
48095
|
+
className: "font-semibold text-black"
|
|
48096
|
+
}, "Rp"), /*#__PURE__*/React__default["default"].createElement(FaInfinity, null)) : /*#__PURE__*/React__default["default"].createElement("p", {
|
|
48085
48097
|
className: "font-semibold text-black"
|
|
48086
|
-
}, "Rp ", dataBalance))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48098
|
+
}, "Rp ", dataBalance.toLocaleString()))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48087
48099
|
className: "w-px bg-neutral40 h-16 mx-3"
|
|
48088
48100
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
48089
48101
|
className: "flex items-center cursor-pointer",
|
package/package.json
CHANGED
|
@@ -10,13 +10,16 @@ const DropzoneUploadFile = ({
|
|
|
10
10
|
maxFiles = 1,
|
|
11
11
|
selectedFile,
|
|
12
12
|
error = "",
|
|
13
|
+
disabled,
|
|
13
14
|
}) => {
|
|
14
15
|
const [errorMessage, setErrorMessage] = useState("");
|
|
15
16
|
|
|
16
17
|
const onDropRejected = (rejectedFiles) => {
|
|
17
18
|
const file = rejectedFiles[0];
|
|
18
19
|
if (file.errors[0]?.code === "file-too-large") {
|
|
19
|
-
setErrorMessage("Your file is too large
|
|
20
|
+
setErrorMessage("Your file is too large. Max file size is 5 MB");
|
|
21
|
+
} else if (file.errors[0]?.code === "file-invalid-type") {
|
|
22
|
+
setErrorMessage("File format not supported. Please try again with PNG, JPEG, JPG, or PDF file within 5 MB");
|
|
20
23
|
}
|
|
21
24
|
};
|
|
22
25
|
|
|
@@ -24,12 +27,14 @@ const DropzoneUploadFile = ({
|
|
|
24
27
|
onDrop,
|
|
25
28
|
maxFiles,
|
|
26
29
|
accept: {
|
|
27
|
-
"image
|
|
30
|
+
"image/jpeg": [".jpeg", ".jpg"],
|
|
31
|
+
"image/png": [".png"],
|
|
28
32
|
"application/pdf": [".pdf"],
|
|
29
33
|
},
|
|
30
34
|
noKeyboard: true,
|
|
31
35
|
maxSize: 5242881,
|
|
32
36
|
onDropRejected,
|
|
37
|
+
disabled,
|
|
33
38
|
});
|
|
34
39
|
|
|
35
40
|
return (
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React, { useState, useRef } from "react";
|
|
3
3
|
import Profile from "../../assets/images/profile.png";
|
|
4
4
|
import { PiDoorOpenDuotone, PiUserCircleDuotone, PiBellDuotone, PiWalletDuotone } from "react-icons/pi";
|
|
5
|
+
import { FaInfinity } from "react-icons/fa6";
|
|
5
6
|
|
|
6
7
|
const Header = ({
|
|
7
8
|
title = "Label",
|
|
@@ -25,7 +26,7 @@ const Header = ({
|
|
|
25
26
|
],
|
|
26
27
|
isNotificationActive = false,
|
|
27
28
|
dataNotification = ["Notification 1", "Notification 2"],
|
|
28
|
-
dataBalance =
|
|
29
|
+
dataBalance = 0,
|
|
29
30
|
onClickWallet,
|
|
30
31
|
}) => {
|
|
31
32
|
const [isProfileContentVisible, setProfileContentVisible] = useState(false);
|
|
@@ -54,7 +55,20 @@ const Header = ({
|
|
|
54
55
|
</div>
|
|
55
56
|
<div>
|
|
56
57
|
<p className="text-neutral300 text-xs">Balance:</p>
|
|
57
|
-
|
|
58
|
+
{[
|
|
59
|
+
"System Administrator",
|
|
60
|
+
"Ops Administrator",
|
|
61
|
+
"Business Administrator",
|
|
62
|
+
"Business Support",
|
|
63
|
+
"Reconcile",
|
|
64
|
+
].includes(roleName) ? (
|
|
65
|
+
<div className="flex items-center gap-1">
|
|
66
|
+
<p className="font-semibold text-black">Rp</p>
|
|
67
|
+
<FaInfinity />
|
|
68
|
+
</div>
|
|
69
|
+
) : (
|
|
70
|
+
<p className="font-semibold text-black">Rp {dataBalance.toLocaleString()}</p>
|
|
71
|
+
)}
|
|
58
72
|
</div>
|
|
59
73
|
</a>
|
|
60
74
|
<div className="w-px bg-neutral40 h-16 mx-3"></div>
|
package/src/templates/index.js
CHANGED
|
@@ -839,8 +839,8 @@ const Templates = () => {
|
|
|
839
839
|
return (
|
|
840
840
|
<div>
|
|
841
841
|
<div>
|
|
842
|
-
<OutlineButton title="Test" />
|
|
843
|
-
|
|
842
|
+
{/* <OutlineButton title="Test" /> */}
|
|
843
|
+
<Header title="Navbar" roleName="System Administrators" dataBalance={10000} />
|
|
844
844
|
</div>
|
|
845
845
|
|
|
846
846
|
<div>
|
|
@@ -1093,7 +1093,7 @@ const Templates = () => {
|
|
|
1093
1093
|
<Description
|
|
1094
1094
|
title="Sample Title"
|
|
1095
1095
|
value={"This is a sample description.\n HHEHEEH \n LOh"}
|
|
1096
|
-
icon={<PiCalendarBlank size={20}/>}
|
|
1096
|
+
icon={<PiCalendarBlank size={20} />}
|
|
1097
1097
|
// image="https://static.promediateknologi.id/crop/0x0:0x0/0x0/webp/photo/jawapos/2022/09/one-piece-red.jpeg"
|
|
1098
1098
|
/>
|
|
1099
1099
|
|