sprint-asia-custom-component 0.1.162 → 0.1.164

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.162",
4
+ "version": "0.1.164",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -11,6 +11,7 @@ const DropzoneUploadFile = ({
11
11
  selectedFile,
12
12
  error = "",
13
13
  disabled,
14
+ maxSize = null,
14
15
  acceptExcel = false,
15
16
  }) => {
16
17
  const [errorMessage, setErrorMessage] = useState("");
@@ -48,7 +49,7 @@ const DropzoneUploadFile = ({
48
49
  maxFiles,
49
50
  accept: acceptExcel ? excelAcceptedFiles : defaultAcceptedFiles,
50
51
  noKeyboard: true,
51
- maxSize: 5242881,
52
+ ...(maxSize !== null && { maxSize }),
52
53
  onDropRejected,
53
54
  disabled,
54
55
  });
@@ -36,7 +36,7 @@ const TextInput = ({
36
36
 
37
37
  return (
38
38
  <div className={`w-full ${className}`}>
39
- <div className="flex justify-between w-full items-center">
39
+ <div className="flex w-full items-center">
40
40
  {title && (
41
41
  <div className="flex">
42
42
  <p className="text-sm font-normal text-black mb-1">{title}</p>
@@ -44,7 +44,7 @@ const TextInput = ({
44
44
  </div>
45
45
  )}
46
46
  {
47
- rightComponent && <div>{rightComponent}</div>
47
+ rightComponent && {rightComponent}
48
48
  }
49
49
  </div>
50
50
 
@@ -67,12 +67,11 @@ const TextInput = ({
67
67
  min={minimum !== null && minimum !== undefined && type === "number" ? minimum : undefined}
68
68
  max={maximum !== null && maximum !== undefined && type === "number" ? maximum : undefined}
69
69
  type={type === "password" ? (showPassword ? "text" : "password") : type}
70
- className={`py-2.5 px-4 w-full font-normal text-sm text-neutral300 rounded-md border
71
- ${
72
- !value &&
73
- mode === "default" &&
74
- "bg-neutral20 border-neutral50 focus:outline-2 outline-primary500"
75
- }
70
+ className={`py-2.5 px-4 w-full font-normal text-sm text-black rounded-md border
71
+ ${!value &&
72
+ mode === "default" &&
73
+ "bg-neutral20 border-neutral50 focus:outline-2 outline-primary500"
74
+ }
76
75
  ${value && mode === "default" && "bg-neutral20 border-black focus:outline-2 outline-primary500"}
77
76
  ${isFocused && mode === "default" && "bg-neutral20 border-primary500"}
78
77
  ${mode === "disable" && "bg-neutral30 border-neutral50"}
@@ -109,7 +108,7 @@ const TextInput = ({
109
108
  <PiInfo
110
109
  size={16}
111
110
  className={`
112
- ${mode === "primary" && "text-black"}
111
+ ${mode === "primary" && "text-neutral50"}
113
112
  ${mode === "disable" && "text-neutral50"}
114
113
  ${mode === "danger" && "text-danger500"}
115
114
  `}