sprint-asia-custom-component 0.1.45 → 0.1.47
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.css +1 -1
- package/dist/index.js +3659 -1040
- package/package.json +1 -1
- package/src/components/button/primarybutton/index.js +1 -0
- package/src/components/dropzone/uploadfile/index.js +37 -29
- package/src/index.js +2 -1
- package/src/templates/index.js +1 -0
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ const PrimaryButton = ({
|
|
|
31
31
|
${size === "large" && "text-lg h-10"}
|
|
32
32
|
${size === "very large" && "text-xl h-12"}
|
|
33
33
|
${size === "extra very large" && "text-2xl h-14"}
|
|
34
|
+
${size === "detail division" && "text-sm h-10"}
|
|
34
35
|
rounded-lg drop-shadow-md text-center py-1.5 px-4 flex justify-center items-center`
|
|
35
36
|
}
|
|
36
37
|
disabled={!isActive}
|
|
@@ -1,40 +1,48 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { useDropzone } from
|
|
3
|
-
import { PiFileArrowUpDuotone } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useDropzone } from "react-dropzone";
|
|
3
|
+
import { PiFileArrowUpDuotone } from "react-icons/pi";
|
|
4
4
|
|
|
5
5
|
const DropzoneUploadFile = ({
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
title = "Title Dropzone",
|
|
7
|
+
subtitle = "Format File PDF, JPEG JPG, Maximal File 5 MB",
|
|
8
|
+
required = false,
|
|
8
9
|
}) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const { getRootProps, getInputProps } = useDropzone({
|
|
11
|
+
accept: {
|
|
12
|
+
"image/jpeg": [],
|
|
13
|
+
"image/png": [],
|
|
14
|
+
},
|
|
15
|
+
});
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
|
-
<div className=
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
<div className="w-full">
|
|
19
|
+
<div className="flex items-center">
|
|
20
|
+
<p className="text-black text-sm mb-1">{title}</p>
|
|
21
|
+
{required && (
|
|
22
|
+
<p className="text-sm font-normal text-danger500 ml-1">*</p>
|
|
23
|
+
)}
|
|
24
|
+
</div>
|
|
25
|
+
<div className="cursor-pointer">
|
|
26
|
+
<div
|
|
27
|
+
{...getRootProps({ className: "dropzone" })}
|
|
28
|
+
className="bg-neutral20 w-full h-28 rounded-lg border-2 border-neutral50 border-dashed"
|
|
29
|
+
>
|
|
30
|
+
<input {...getInputProps()} required={required} />
|
|
31
|
+
<div className="flex w-full h-full justify-center items-center text-center">
|
|
32
|
+
<div>
|
|
33
|
+
<div className="flex justify-center">
|
|
34
|
+
<PiFileArrowUpDuotone size={16} className="text-neutral300" />
|
|
35
|
+
</div>
|
|
36
|
+
<p className="text-sm text-neutral300 mt-2">
|
|
37
|
+
Drag & Drop File Here or Chose File
|
|
38
|
+
</p>
|
|
33
39
|
</div>
|
|
40
|
+
</div>
|
|
34
41
|
</div>
|
|
35
|
-
|
|
42
|
+
</div>
|
|
43
|
+
<p className="text-xs text-neutral300 mt-1">{subtitle}</p>
|
|
36
44
|
</div>
|
|
37
45
|
);
|
|
38
46
|
};
|
|
39
47
|
|
|
40
|
-
export default DropzoneUploadFile;
|
|
48
|
+
export default DropzoneUploadFile;
|
package/src/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import CardInternalProduct from './components/card';
|
|
|
25
25
|
import Chip from './components/chip'
|
|
26
26
|
import CustomDatePicker from './components/datepicker';
|
|
27
27
|
import Description from './components/description';
|
|
28
|
+
import DescriptionFile from './components/description/file';
|
|
28
29
|
import DropdownCard from './components/dropdown/dropdownCard';
|
|
29
30
|
import DropdownChip from './components/dropdown/dropdownChip';
|
|
30
31
|
import DropdownText from './components/dropdown/dropdownText';
|
|
@@ -76,7 +77,7 @@ import Header from './components/header';
|
|
|
76
77
|
|
|
77
78
|
export {Header, Footer, CellModelOne, CellModelTwo, CellModelThree,CellModelFour,CellModelFive,CellModelSix,CellModelSeven,DetailDivision, SearchDropdown, FilterDropdown, HeaderTable, TextInput, Pagination, ReportList, ReportListClient, InternalProductList, BillerProductList, BillerList, TabBar, ChipBar, Switch, Stepper,
|
|
78
79
|
SearchInput, Notification, ModalState, ModalResult, ModalLoading, Menu, FilterText, FilterCheckbox, ExportToExcel, NotFound, EmptyData, DropzoneUploadPhoto, DropzoneUploadFile, DropdownText, DropdownChip, DropdownCard, Description, CustomDatePicker, Chip, CardInternalProduct, PrimaryButton, OutlineButton,
|
|
79
|
-
DangerButton, Alert, BillingList, ModalBilling, LimitList, ModalLimit, VerticalStepBar, DepositList, ModalDeposit}
|
|
80
|
+
DangerButton, Alert, BillingList, ModalBilling, LimitList, ModalLimit, VerticalStepBar, DepositList, ModalDeposit, DescriptionFile}
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
|