next-helios-fe 1.8.9 → 1.8.11
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
@@ -11,7 +11,7 @@ export interface FileProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
11
11
|
maxSizeInMb?: number;
|
12
12
|
buttonOnly?: boolean;
|
13
13
|
width?: "full" | "fit";
|
14
|
-
height?: "short" | "medium" | "high";
|
14
|
+
height?: "short" | "medium" | "high" | "full";
|
15
15
|
hideInputDetail?: boolean;
|
16
16
|
};
|
17
17
|
defaultValue?: any[];
|
@@ -56,7 +56,11 @@ export const File: React.FC<FileProps> = ({
|
|
56
56
|
}, [value, defaultValue]);
|
57
57
|
|
58
58
|
return (
|
59
|
-
<label
|
59
|
+
<label
|
60
|
+
className={`grid gap-2 ${width} ${
|
61
|
+
options?.height === "full" && "h-full"
|
62
|
+
}`}
|
63
|
+
>
|
60
64
|
{!options?.buttonOnly &&
|
61
65
|
(label ||
|
62
66
|
(!options?.hideInputDetail &&
|
@@ -93,8 +97,8 @@ export const File: React.FC<FileProps> = ({
|
|
93
97
|
)}
|
94
98
|
<div
|
95
99
|
className={`flex items-center gap-4 ${
|
96
|
-
|
97
|
-
}`}
|
100
|
+
options?.height === "full" && "h-full"
|
101
|
+
} ${!options?.buttonOnly && "flex-row-reverse"}`}
|
98
102
|
>
|
99
103
|
{options?.variant !== "drag&drop" ? (
|
100
104
|
<div
|
@@ -127,10 +131,12 @@ export const File: React.FC<FileProps> = ({
|
|
127
131
|
</span>
|
128
132
|
</div>
|
129
133
|
) : (
|
130
|
-
<div className="relative flex-1 flex items-center">
|
134
|
+
<div className="relative flex-1 flex items-center h-full">
|
131
135
|
<input
|
132
136
|
type="file"
|
133
|
-
className={`w-full
|
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 ${
|
138
|
+
options?.height === "full" ? "min-h-60 h-full" : "h-60"
|
139
|
+
}`}
|
134
140
|
onChange={(e) => {
|
135
141
|
if (rest.onChange) {
|
136
142
|
rest.onChange({
|
@@ -189,14 +195,16 @@ export const File: React.FC<FileProps> = ({
|
|
189
195
|
{...rest}
|
190
196
|
/>
|
191
197
|
<div className="absolute flex flex-col gap-8 justify-center items-center w-full h-full px-4 pointer-events-none">
|
192
|
-
<
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
198
|
+
<div>
|
199
|
+
<Icon
|
200
|
+
icon={
|
201
|
+
tempFile.length !== 0 ? "mdi:file-outline" : "mynaui:upload"
|
202
|
+
}
|
203
|
+
className={`text-5xl ${
|
204
|
+
tempFile.length !== 0 ? "" : "text-disabled"
|
205
|
+
}`}
|
206
|
+
/>
|
207
|
+
</div>
|
200
208
|
<div className="flex flex-col gap-2 items-center">
|
201
209
|
{tempFile.length !== 0 ? (
|
202
210
|
<span>{tempFile[0]?.name}</span>
|
package/src/styles/calendar.scss
CHANGED
@@ -114,14 +114,14 @@
|
|
114
114
|
}
|
115
115
|
|
116
116
|
.react-calendar__tile:disabled {
|
117
|
-
background-color:
|
118
|
-
color:
|
117
|
+
background-color: var(--color-secondary-light);
|
118
|
+
color: var(--color-disabled);
|
119
119
|
}
|
120
120
|
|
121
121
|
.react-calendar__month-view__days__day--neighboringMonth:disabled,
|
122
122
|
.react-calendar__decade-view__years__year--neighboringDecade:disabled,
|
123
123
|
.react-calendar__century-view__decades__decade--neighboringCentury:disabled {
|
124
|
-
color:
|
124
|
+
color: var(--color-silent);
|
125
125
|
}
|
126
126
|
|
127
127
|
.react-calendar__tile:enabled:hover,
|