next-helios-fe 1.8.47 → 1.8.49
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
@@ -8,6 +8,7 @@ export interface DateProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
8
8
|
label?: string;
|
9
9
|
description?: string;
|
10
10
|
options?: {
|
11
|
+
buttonOnly?: boolean;
|
11
12
|
enableSelectRange?: boolean;
|
12
13
|
disablePast?: boolean;
|
13
14
|
disableFuture?: boolean;
|
@@ -109,30 +110,34 @@ export const Date: React.FC<DateProps> = ({
|
|
109
110
|
</div>
|
110
111
|
)}
|
111
112
|
<div className="relative flex items-center">
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
113
|
+
{!options?.buttonOnly && (
|
114
|
+
<input
|
115
|
+
type="text"
|
116
|
+
className={`w-full ps-4 pe-14 border-default border rounded-md bg-secondary-bg placeholder:duration-300 placeholder:translate-x-0 focus:placeholder:translate-x-1 placeholder:text-silent focus:outline-none focus:ring-1 focus:ring-primary focus:shadow focus:shadow-primary focus:border-primary-dark disabled:bg-secondary-light disabled:text-disabled ${height}`}
|
117
|
+
disabled={rest.disabled}
|
118
|
+
readOnly
|
119
|
+
value={
|
120
|
+
dateRangeLabel(tempValue) === "Custom" ||
|
121
|
+
!options?.enableSelectRange
|
122
|
+
? `${
|
123
|
+
!options?.enableSelectRange
|
124
|
+
? ""
|
125
|
+
: `${
|
126
|
+
dayjs(tempValue[0]).format("MMM YYYY") ===
|
127
|
+
dayjs(tempValue[1]).format("MMM YYYY")
|
128
|
+
? dayjs(tempValue[0]).format("DD")
|
129
|
+
: dayjs(tempValue[0]).format("DD MMM YYYY")
|
130
|
+
} - `
|
131
|
+
}${dayjs(tempValue[1]).format("DD MMM YYYY")}`
|
132
|
+
: dateRangeLabel(tempValue)
|
133
|
+
}
|
134
|
+
/>
|
135
|
+
)}
|
133
136
|
<button
|
134
137
|
type="button"
|
135
|
-
className=
|
138
|
+
className={`rounded-full text-xl hover:bg-secondary-light ${
|
139
|
+
options?.buttonOnly ? "p-2" : "absolute right-4 p-1 text-disabled"
|
140
|
+
}`}
|
136
141
|
tabIndex={-1}
|
137
142
|
disabled={rest.disabled}
|
138
143
|
onClick={(e) => {
|
@@ -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>
|
@@ -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}
|