next-helios-fe 1.8.46 → 1.8.48
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 +1 -1
- package/package.json +1 -1
- package/src/components/form/input/file.tsx +10 -6
package/package.json
CHANGED
@@ -109,7 +109,7 @@ export const File: React.FC<FileProps> = ({
|
|
109
109
|
<input
|
110
110
|
ref={inputRef}
|
111
111
|
type="file"
|
112
|
-
className={`peer/file w-full px-4 border-default border rounded-md bg-secondary-bg text-transparent file:hidden focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light
|
112
|
+
className={`peer/file w-full px-4 border-default border rounded-md bg-secondary-bg text-transparent file:hidden focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light ${height}`}
|
113
113
|
onChange={(e) => {
|
114
114
|
if (rest.onChange) {
|
115
115
|
rest.onChange({
|
@@ -125,7 +125,7 @@ export const File: React.FC<FileProps> = ({
|
|
125
125
|
className={`absolute px-4 pointer-events-none ${
|
126
126
|
tempFile.length === 0 &&
|
127
127
|
"text-silent duration-300 translate-x-0 peer-focus/file:translate-x-1"
|
128
|
-
}`}
|
128
|
+
} ${rest.disabled && "text-disabled"}`}
|
129
129
|
>
|
130
130
|
{tempFile[0]?.name ?? rest.placeholder}
|
131
131
|
</span>
|
@@ -134,7 +134,7 @@ export const File: React.FC<FileProps> = ({
|
|
134
134
|
<div className="relative flex-1 flex items-center h-full">
|
135
135
|
<input
|
136
136
|
type="file"
|
137
|
-
className={`w-full px-4 border-default border border-dashed rounded-md bg-secondary-bg text-transparent cursor-pointer file:hidden focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light ${
|
137
|
+
className={`w-full px-4 border-default border border-dashed rounded-md bg-secondary-bg text-transparent cursor-pointer file:hidden focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:cursor-default ${
|
138
138
|
options?.height === "full" ? "min-h-60 h-full" : "h-60"
|
139
139
|
}`}
|
140
140
|
onChange={(e) => {
|
@@ -194,7 +194,11 @@ export const File: React.FC<FileProps> = ({
|
|
194
194
|
}}
|
195
195
|
{...rest}
|
196
196
|
/>
|
197
|
-
<div
|
197
|
+
<div
|
198
|
+
className={`absolute flex flex-col gap-8 justify-center items-center w-full h-full px-4 pointer-events-none ${
|
199
|
+
rest.disabled && "text-disabled"
|
200
|
+
}`}
|
201
|
+
>
|
198
202
|
<div>
|
199
203
|
<Icon
|
200
204
|
icon={
|
@@ -238,8 +242,8 @@ export const File: React.FC<FileProps> = ({
|
|
238
242
|
type="button"
|
239
243
|
className={
|
240
244
|
options?.buttonVariant === "button"
|
241
|
-
?
|
242
|
-
:
|
245
|
+
? `hover:text-primary disabled:text-disabled`
|
246
|
+
: `p-2 rounded-full hover:bg-secondary-light disabled:bg-secondary-light disabled:text-disabled`
|
243
247
|
}
|
244
248
|
tabIndex={-1}
|
245
249
|
disabled={rest.disabled}
|