next-helios-fe 1.8.48 → 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) => {
|