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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.45",
4
+ "version": "0.1.47",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -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 'react';
2
- import { useDropzone } from 'react-dropzone';
3
- import { PiFileArrowUpDuotone } from 'react-icons/pi';
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
- title = "Title Dropzone",
7
- subtitle = "Format File PDF, JPEG JPG, Maximal File 5 MB"
6
+ title = "Title Dropzone",
7
+ subtitle = "Format File PDF, JPEG JPG, Maximal File 5 MB",
8
+ required = false,
8
9
  }) => {
9
- const { getRootProps, getInputProps } = useDropzone({
10
- accept: {
11
- 'image/jpeg': [],
12
- 'image/png': []
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='w-full'>
18
- <p className='text-black text-sm mb-1'>{title}</p>
19
- <div className="cursor-pointer">
20
- <div
21
- {...getRootProps({ className: 'dropzone' })}
22
- className="bg-neutral20 w-full h-28 rounded-lg border-2 border-neutral50 border-dashed"
23
- >
24
- <input {...getInputProps()} />
25
- <div className="flex w-full h-full justify-center items-center text-center">
26
- <div>
27
- <div className='flex justify-center'>
28
- <PiFileArrowUpDuotone size={16} className='text-neutral300'/>
29
- </div>
30
- <p className="text-sm text-neutral300 mt-2">Drag & Drop File Here or Chose File</p>
31
- </div>
32
- </div>
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
- <p className='text-xs text-neutral300 mt-1'>{subtitle}</p>
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
 
@@ -1054,6 +1054,7 @@ const Templates = () => {
1054
1054
  <DropzoneUploadFile
1055
1055
  title="Upload Your File"
1056
1056
  subtitle="Accepts PDF, JPEG, JPG. Max size 5 MB"
1057
+ required={true}
1057
1058
  />
1058
1059
 
1059
1060
  <div className='m-9'></div>