@povio/ui 3.2.1 → 3.2.2-rc.1
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.
|
@@ -14,6 +14,7 @@ interface DateFieldProps extends Omit<DateFieldStateOptions, "locale" | "createC
|
|
|
14
14
|
format?: string;
|
|
15
15
|
timeZone?: string;
|
|
16
16
|
segmentGroup?: string;
|
|
17
|
+
shouldAutoFixYear?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const DateField: ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity, isTimeOptional, format, timeZone, segmentGroup, shouldAutoFixYear, ...props }: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -11,16 +11,17 @@ import { useDateFieldState } from "react-stately";
|
|
|
11
11
|
//#region src/components/inputs/DateTime/shared/DateField.tsx
|
|
12
12
|
var omitNullValue = ({ value: _value, ...props }) => props;
|
|
13
13
|
var DateField = (t0) => {
|
|
14
|
-
const $ = c(
|
|
15
|
-
const { ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity: t1, isTimeOptional: t2, format, timeZone, segmentGroup, ...props } = t0;
|
|
14
|
+
const $ = c(65);
|
|
15
|
+
const { ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity: t1, isTimeOptional: t2, format, timeZone, segmentGroup, shouldAutoFixYear: t3, ...props } = t0;
|
|
16
16
|
const dateGranularity = t1 === void 0 ? "day" : t1;
|
|
17
17
|
const isTimeOptional = t2 === void 0 ? false : t2;
|
|
18
|
+
const shouldAutoFixYear = t3 === void 0 ? false : t3;
|
|
18
19
|
const { locale } = useLocale();
|
|
19
20
|
const previousValueRef = useRef(props.value);
|
|
20
21
|
const dateFieldProps = props.value == null ? omitNullValue(props) : props;
|
|
21
|
-
let
|
|
22
|
+
let t4;
|
|
22
23
|
if ($[0] !== dateFieldProps || $[1] !== disableManualEntry || $[2] !== isDisabled || $[3] !== locale) {
|
|
23
|
-
|
|
24
|
+
t4 = {
|
|
24
25
|
...dateFieldProps,
|
|
25
26
|
isDisabled,
|
|
26
27
|
isReadOnly: disableManualEntry,
|
|
@@ -31,13 +32,13 @@ var DateField = (t0) => {
|
|
|
31
32
|
$[1] = disableManualEntry;
|
|
32
33
|
$[2] = isDisabled;
|
|
33
34
|
$[3] = locale;
|
|
34
|
-
$[4] =
|
|
35
|
-
} else
|
|
36
|
-
const state = useDateFieldState(
|
|
35
|
+
$[4] = t4;
|
|
36
|
+
} else t4 = $[4];
|
|
37
|
+
const state = useDateFieldState(t4);
|
|
37
38
|
const dataFieldRef = useRef(null);
|
|
38
|
-
let
|
|
39
|
+
let t5;
|
|
39
40
|
if ($[5] !== dateFieldProps || $[6] !== disableManualEntry || $[7] !== isDisabled) {
|
|
40
|
-
|
|
41
|
+
t5 = {
|
|
41
42
|
...dateFieldProps,
|
|
42
43
|
isDisabled,
|
|
43
44
|
isReadOnly: disableManualEntry
|
|
@@ -45,24 +46,24 @@ var DateField = (t0) => {
|
|
|
45
46
|
$[5] = dateFieldProps;
|
|
46
47
|
$[6] = disableManualEntry;
|
|
47
48
|
$[7] = isDisabled;
|
|
48
|
-
$[8] =
|
|
49
|
-
} else
|
|
50
|
-
const { fieldProps } = useDateField(
|
|
51
|
-
let
|
|
49
|
+
$[8] = t5;
|
|
50
|
+
} else t5 = $[8];
|
|
51
|
+
const { fieldProps } = useDateField(t5, state, dataFieldRef);
|
|
52
|
+
let t6;
|
|
52
53
|
if ($[9] !== dateGranularity) {
|
|
53
|
-
|
|
54
|
+
t6 = (segmentType) => {
|
|
54
55
|
if (dateGranularity === "day") return true;
|
|
55
56
|
if (dateGranularity === "month") return segmentType !== "day";
|
|
56
57
|
if (dateGranularity === "year") return segmentType === "year";
|
|
57
58
|
return true;
|
|
58
59
|
};
|
|
59
60
|
$[9] = dateGranularity;
|
|
60
|
-
$[10] =
|
|
61
|
-
} else
|
|
62
|
-
const isSegmentVisible =
|
|
63
|
-
let
|
|
61
|
+
$[10] = t6;
|
|
62
|
+
} else t6 = $[10];
|
|
63
|
+
const isSegmentVisible = t6;
|
|
64
|
+
let t7;
|
|
64
65
|
if ($[11] !== isSegmentVisible || $[12] !== state.segments) {
|
|
65
|
-
|
|
66
|
+
t7 = () => {
|
|
66
67
|
const segments = [];
|
|
67
68
|
for (const segment of state.segments) if (segment.type !== "literal") {
|
|
68
69
|
if (isSegmentVisible(segment.type)) segments.push(segment);
|
|
@@ -71,20 +72,20 @@ var DateField = (t0) => {
|
|
|
71
72
|
};
|
|
72
73
|
$[11] = isSegmentVisible;
|
|
73
74
|
$[12] = state.segments;
|
|
74
|
-
$[13] =
|
|
75
|
-
} else
|
|
76
|
-
const getSegmentsToRender =
|
|
77
|
-
let
|
|
75
|
+
$[13] = t7;
|
|
76
|
+
} else t7 = $[13];
|
|
77
|
+
const getSegmentsToRender = t7;
|
|
78
|
+
let t8;
|
|
78
79
|
if ($[14] !== getSegmentsToRender) {
|
|
79
|
-
|
|
80
|
+
t8 = getSegmentsToRender();
|
|
80
81
|
$[14] = getSegmentsToRender;
|
|
81
|
-
$[15] =
|
|
82
|
-
} else
|
|
83
|
-
const segmentsToRender =
|
|
82
|
+
$[15] = t8;
|
|
83
|
+
} else t8 = $[15];
|
|
84
|
+
const segmentsToRender = t8;
|
|
84
85
|
const getSegmentNumber = _temp;
|
|
85
|
-
let
|
|
86
|
+
let t9;
|
|
86
87
|
if ($[16] !== isTimeOptional || $[17] !== props || $[18] !== state) {
|
|
87
|
-
|
|
88
|
+
t9 = () => {
|
|
88
89
|
const monthSegment = state.segments.find(_temp2);
|
|
89
90
|
const daySegment = state.segments.find(_temp3);
|
|
90
91
|
const yearSegment = state.segments.find(_temp4);
|
|
@@ -131,12 +132,13 @@ var DateField = (t0) => {
|
|
|
131
132
|
$[16] = isTimeOptional;
|
|
132
133
|
$[17] = props;
|
|
133
134
|
$[18] = state;
|
|
134
|
-
$[19] =
|
|
135
|
-
} else
|
|
136
|
-
const autoFixYear =
|
|
137
|
-
let
|
|
138
|
-
if ($[20] !==
|
|
139
|
-
|
|
135
|
+
$[19] = t9;
|
|
136
|
+
} else t9 = $[19];
|
|
137
|
+
const autoFixYear = t9;
|
|
138
|
+
let t10;
|
|
139
|
+
if ($[20] !== autoFixYear || $[21] !== fieldProps || $[22] !== props || $[23] !== shouldAutoFixYear || $[24] !== state) {
|
|
140
|
+
t10 = (e) => {
|
|
141
|
+
if (shouldAutoFixYear) autoFixYear();
|
|
140
142
|
fieldProps.onBlur?.(e);
|
|
141
143
|
if (!state.value) return;
|
|
142
144
|
const currentValue = state.value;
|
|
@@ -150,62 +152,64 @@ var DateField = (t0) => {
|
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
};
|
|
153
|
-
$[20] =
|
|
154
|
-
$[21] =
|
|
155
|
-
$[22] =
|
|
156
|
-
$[23] =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
$[20] = autoFixYear;
|
|
156
|
+
$[21] = fieldProps;
|
|
157
|
+
$[22] = props;
|
|
158
|
+
$[23] = shouldAutoFixYear;
|
|
159
|
+
$[24] = state;
|
|
160
|
+
$[25] = t10;
|
|
161
|
+
} else t10 = $[25];
|
|
162
|
+
const handleBlur = t10;
|
|
163
|
+
let t11;
|
|
164
|
+
if ($[26] !== autoFixYear || $[27] !== state) {
|
|
165
|
+
t11 = () => ({
|
|
162
166
|
clearField: () => {
|
|
163
167
|
state.setValue(null);
|
|
164
168
|
},
|
|
165
169
|
autoFixYear
|
|
166
170
|
});
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
} else
|
|
171
|
-
useImperativeHandle(ref,
|
|
172
|
-
let
|
|
173
|
-
if ($[
|
|
174
|
-
|
|
171
|
+
$[26] = autoFixYear;
|
|
172
|
+
$[27] = state;
|
|
173
|
+
$[28] = t11;
|
|
174
|
+
} else t11 = $[28];
|
|
175
|
+
useImperativeHandle(ref, t11);
|
|
176
|
+
let t12;
|
|
177
|
+
if ($[29] !== previousValueRef || $[30] !== props.value || $[31] !== state) {
|
|
178
|
+
t12 = () => {
|
|
175
179
|
if (previousValueRef.current != null && props.value == null && state.value !== null) state.setValue(null);
|
|
176
180
|
previousValueRef.current = props.value;
|
|
177
181
|
};
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else
|
|
183
|
-
let t12;
|
|
184
|
-
if ($[31] !== props.value || $[32] !== state) {
|
|
185
|
-
t12 = [props.value, state];
|
|
186
|
-
$[31] = props.value;
|
|
187
|
-
$[32] = state;
|
|
188
|
-
$[33] = t12;
|
|
189
|
-
} else t12 = $[33];
|
|
190
|
-
useEffect(t11, t12);
|
|
182
|
+
$[29] = previousValueRef;
|
|
183
|
+
$[30] = props.value;
|
|
184
|
+
$[31] = state;
|
|
185
|
+
$[32] = t12;
|
|
186
|
+
} else t12 = $[32];
|
|
191
187
|
let t13;
|
|
188
|
+
if ($[33] !== props.value || $[34] !== state) {
|
|
189
|
+
t13 = [props.value, state];
|
|
190
|
+
$[33] = props.value;
|
|
191
|
+
$[34] = state;
|
|
192
|
+
$[35] = t13;
|
|
193
|
+
} else t13 = $[35];
|
|
194
|
+
useEffect(t12, t13);
|
|
192
195
|
let t14;
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
let t15;
|
|
197
|
+
if ($[36] !== onClearChange || $[37] !== state.segments) {
|
|
198
|
+
t14 = () => {
|
|
195
199
|
onClearChange?.(state.segments.some(_temp7));
|
|
196
200
|
};
|
|
197
|
-
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
201
|
+
t15 = [state.segments, onClearChange];
|
|
202
|
+
$[36] = onClearChange;
|
|
203
|
+
$[37] = state.segments;
|
|
204
|
+
$[38] = t14;
|
|
205
|
+
$[39] = t15;
|
|
202
206
|
} else {
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
t14 = $[38];
|
|
208
|
+
t15 = $[39];
|
|
205
209
|
}
|
|
206
|
-
useEffect(
|
|
207
|
-
let
|
|
208
|
-
if ($[
|
|
210
|
+
useEffect(t14, t15);
|
|
211
|
+
let t16;
|
|
212
|
+
if ($[40] !== disableManualEntry || $[41] !== format || $[42] !== state.value || $[43] !== timeZone) {
|
|
209
213
|
const getFormattedDisplayValue = () => {
|
|
210
214
|
if (!disableManualEntry) return null;
|
|
211
215
|
if (!format) return null;
|
|
@@ -215,83 +219,83 @@ var DateField = (t0) => {
|
|
|
215
219
|
if (!formattedDate.isValid) return null;
|
|
216
220
|
return formattedDate.toFormat(format);
|
|
217
221
|
};
|
|
218
|
-
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else
|
|
225
|
-
const formattedDisplayValue =
|
|
226
|
-
let
|
|
227
|
-
if ($[
|
|
228
|
-
|
|
222
|
+
t16 = getFormattedDisplayValue();
|
|
223
|
+
$[40] = disableManualEntry;
|
|
224
|
+
$[41] = format;
|
|
225
|
+
$[42] = state.value;
|
|
226
|
+
$[43] = timeZone;
|
|
227
|
+
$[44] = t16;
|
|
228
|
+
} else t16 = $[44];
|
|
229
|
+
const formattedDisplayValue = t16;
|
|
230
|
+
let t17;
|
|
231
|
+
if ($[45] !== hidePlaceholder || $[46] !== isDisabled || $[47] !== segmentGroup || $[48] !== segmentsToRender || $[49] !== state) {
|
|
232
|
+
t17 = /* @__PURE__ */ jsx(Fragment, { children: segmentsToRender.map((segment_7, i) => /* @__PURE__ */ jsx(DateSegmentItem, {
|
|
229
233
|
segment: segment_7,
|
|
230
234
|
segmentGroup,
|
|
231
235
|
state,
|
|
232
236
|
isDisabled,
|
|
233
237
|
hidePlaceholder
|
|
234
238
|
}, i)) });
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
} else
|
|
242
|
-
let fieldContent =
|
|
239
|
+
$[45] = hidePlaceholder;
|
|
240
|
+
$[46] = isDisabled;
|
|
241
|
+
$[47] = segmentGroup;
|
|
242
|
+
$[48] = segmentsToRender;
|
|
243
|
+
$[49] = state;
|
|
244
|
+
$[50] = t17;
|
|
245
|
+
} else t17 = $[50];
|
|
246
|
+
let fieldContent = t17;
|
|
243
247
|
if (formattedDisplayValue) {
|
|
244
|
-
const
|
|
245
|
-
let t18;
|
|
246
|
-
if ($[49] !== t17) {
|
|
247
|
-
t18 = clsx("select-none", t17);
|
|
248
|
-
$[49] = t17;
|
|
249
|
-
$[50] = t18;
|
|
250
|
-
} else t18 = $[50];
|
|
248
|
+
const t18 = isDisabled && "text-interactive-text-secondary-disabled";
|
|
251
249
|
let t19;
|
|
252
|
-
if ($[51] !==
|
|
253
|
-
t19 =
|
|
254
|
-
|
|
250
|
+
if ($[51] !== t18) {
|
|
251
|
+
t19 = clsx("select-none", t18);
|
|
252
|
+
$[51] = t18;
|
|
253
|
+
$[52] = t19;
|
|
254
|
+
} else t19 = $[52];
|
|
255
|
+
let t20;
|
|
256
|
+
if ($[53] !== formattedDisplayValue || $[54] !== t19) {
|
|
257
|
+
t20 = /* @__PURE__ */ jsx("span", {
|
|
258
|
+
className: t19,
|
|
255
259
|
children: formattedDisplayValue
|
|
256
260
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
} else
|
|
261
|
-
fieldContent =
|
|
261
|
+
$[53] = formattedDisplayValue;
|
|
262
|
+
$[54] = t19;
|
|
263
|
+
$[55] = t20;
|
|
264
|
+
} else t20 = $[55];
|
|
265
|
+
fieldContent = t20;
|
|
262
266
|
}
|
|
263
|
-
const
|
|
264
|
-
let t18;
|
|
265
|
-
if ($[54] !== t17) {
|
|
266
|
-
t18 = clsx("relative w-full", t17);
|
|
267
|
-
$[54] = t17;
|
|
268
|
-
$[55] = t18;
|
|
269
|
-
} else t18 = $[55];
|
|
267
|
+
const t18 = disableManualEntry && "pointer-events-none";
|
|
270
268
|
let t19;
|
|
271
|
-
if ($[56] !==
|
|
272
|
-
t19 =
|
|
273
|
-
|
|
274
|
-
children: fieldContent
|
|
275
|
-
});
|
|
276
|
-
$[56] = fieldContent;
|
|
269
|
+
if ($[56] !== t18) {
|
|
270
|
+
t19 = clsx("relative w-full", t18);
|
|
271
|
+
$[56] = t18;
|
|
277
272
|
$[57] = t19;
|
|
278
273
|
} else t19 = $[57];
|
|
279
274
|
let t20;
|
|
280
|
-
if ($[58] !==
|
|
275
|
+
if ($[58] !== fieldContent) {
|
|
281
276
|
t20 = /* @__PURE__ */ jsx("div", {
|
|
277
|
+
className: "flex",
|
|
278
|
+
children: fieldContent
|
|
279
|
+
});
|
|
280
|
+
$[58] = fieldContent;
|
|
281
|
+
$[59] = t20;
|
|
282
|
+
} else t20 = $[59];
|
|
283
|
+
let t21;
|
|
284
|
+
if ($[60] !== fieldProps || $[61] !== handleBlur || $[62] !== t19 || $[63] !== t20) {
|
|
285
|
+
t21 = /* @__PURE__ */ jsx("div", {
|
|
282
286
|
...fieldProps,
|
|
283
287
|
ref: dataFieldRef,
|
|
284
288
|
onBlur: handleBlur,
|
|
285
|
-
className:
|
|
286
|
-
children:
|
|
289
|
+
className: t19,
|
|
290
|
+
children: t20
|
|
287
291
|
});
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
} else
|
|
294
|
-
return
|
|
292
|
+
$[60] = fieldProps;
|
|
293
|
+
$[61] = handleBlur;
|
|
294
|
+
$[62] = t19;
|
|
295
|
+
$[63] = t20;
|
|
296
|
+
$[64] = t21;
|
|
297
|
+
} else t21 = $[64];
|
|
298
|
+
return t21;
|
|
295
299
|
};
|
|
296
300
|
function _temp(segment_0) {
|
|
297
301
|
if (!segment_0) return null;
|
|
@@ -18,7 +18,7 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
|
18
18
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
19
19
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
20
|
var DatePickerInput = (t0) => {
|
|
21
|
-
const $ = c(
|
|
21
|
+
const $ = c(98);
|
|
22
22
|
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone: timeZoneProp, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
23
23
|
const todayIconButtonSize = t1 === void 0 ? "none" : t1;
|
|
24
24
|
const todayIconPlacement = t2 === void 0 ? "content" : t2;
|
|
@@ -60,30 +60,34 @@ var DatePickerInput = (t0) => {
|
|
|
60
60
|
const containerRef = useRef(null);
|
|
61
61
|
const t8 = isValueControlled ? fieldValue ?? null : fieldProps.value ?? null;
|
|
62
62
|
let t9;
|
|
63
|
-
if ($[4] !==
|
|
63
|
+
if ($[4] !== autoFixYear || $[5] !== fieldProps || $[6] !== t8) {
|
|
64
64
|
t9 = {
|
|
65
65
|
...fieldProps,
|
|
66
|
-
value: t8
|
|
66
|
+
value: t8,
|
|
67
|
+
shouldAutoFixYear: autoFixYear
|
|
67
68
|
};
|
|
68
|
-
$[4] =
|
|
69
|
-
$[5] =
|
|
70
|
-
$[6] =
|
|
71
|
-
|
|
69
|
+
$[4] = autoFixYear;
|
|
70
|
+
$[5] = fieldProps;
|
|
71
|
+
$[6] = t8;
|
|
72
|
+
$[7] = t9;
|
|
73
|
+
} else t9 = $[7];
|
|
72
74
|
const normalizedFieldProps = t9;
|
|
73
75
|
let t10;
|
|
74
|
-
if ($[
|
|
76
|
+
if ($[8] !== autoFixYear || $[9] !== endFieldProps || $[10] !== endFieldValue || $[11] !== isValueControlled) {
|
|
75
77
|
t10 = endFieldProps ? {
|
|
76
78
|
...endFieldProps,
|
|
77
|
-
value: isValueControlled ? endFieldValue ?? null : endFieldProps.value ?? null
|
|
79
|
+
value: isValueControlled ? endFieldValue ?? null : endFieldProps.value ?? null,
|
|
80
|
+
shouldAutoFixYear: autoFixYear
|
|
78
81
|
} : void 0;
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
|
|
82
|
+
$[8] = autoFixYear;
|
|
83
|
+
$[9] = endFieldProps;
|
|
84
|
+
$[10] = endFieldValue;
|
|
85
|
+
$[11] = isValueControlled;
|
|
86
|
+
$[12] = t10;
|
|
87
|
+
} else t10 = $[12];
|
|
84
88
|
const normalizedEndFieldProps = t10;
|
|
85
89
|
let t11;
|
|
86
|
-
if ($[
|
|
90
|
+
if ($[13] !== endFieldProps || $[14] !== fieldProps || $[15] !== fireBlurOnChange || $[16] !== onClearProp) {
|
|
87
91
|
t11 = () => {
|
|
88
92
|
dateFieldRef.current?.clearField();
|
|
89
93
|
endDateFieldRef.current?.clearField();
|
|
@@ -98,36 +102,36 @@ var DatePickerInput = (t0) => {
|
|
|
98
102
|
}
|
|
99
103
|
setCanClear(false);
|
|
100
104
|
};
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else t11 = $[
|
|
105
|
+
$[13] = endFieldProps;
|
|
106
|
+
$[14] = fieldProps;
|
|
107
|
+
$[15] = fireBlurOnChange;
|
|
108
|
+
$[16] = onClearProp;
|
|
109
|
+
$[17] = t11;
|
|
110
|
+
} else t11 = $[17];
|
|
107
111
|
const clearInput = t11;
|
|
108
112
|
let t12;
|
|
109
113
|
let t13;
|
|
110
|
-
if ($[
|
|
114
|
+
if ($[18] !== clearInput) {
|
|
111
115
|
t12 = () => ({
|
|
112
116
|
clear: clearInput,
|
|
113
117
|
getContainer: () => containerRef.current
|
|
114
118
|
});
|
|
115
119
|
t13 = [clearInput];
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
120
|
+
$[18] = clearInput;
|
|
121
|
+
$[19] = t12;
|
|
122
|
+
$[20] = t13;
|
|
119
123
|
} else {
|
|
120
|
-
t12 = $[
|
|
121
|
-
t13 = $[
|
|
124
|
+
t12 = $[19];
|
|
125
|
+
t13 = $[20];
|
|
122
126
|
}
|
|
123
127
|
useImperativeHandle(ref, t12, t13);
|
|
124
128
|
let t14;
|
|
125
|
-
if ($[
|
|
129
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
130
|
t14 = (canClearInput) => {
|
|
127
131
|
setCanClear(canClearInput);
|
|
128
132
|
};
|
|
129
|
-
$[
|
|
130
|
-
} else t14 = $[
|
|
133
|
+
$[21] = t14;
|
|
134
|
+
} else t14 = $[21];
|
|
131
135
|
const onClearChange = t14;
|
|
132
136
|
const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
|
|
133
137
|
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
@@ -173,50 +177,50 @@ var DatePickerInput = (t0) => {
|
|
|
173
177
|
const t26 = normalizedFieldProps.value != null || void 0;
|
|
174
178
|
const t27 = shouldShrinkInput ? "min-w-0 flex-1 w-full" : "w-full";
|
|
175
179
|
let t28;
|
|
176
|
-
if ($[
|
|
180
|
+
if ($[22] !== as || $[23] !== inputSizeCva || $[24] !== size || $[25] !== t27) {
|
|
177
181
|
t28 = clsx("flex items-center gap-input-gap-input-text-to-elements pr-0!", t27, inputSizeCva({
|
|
178
182
|
size,
|
|
179
183
|
as
|
|
180
184
|
}));
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
} else t28 = $[
|
|
185
|
+
$[22] = as;
|
|
186
|
+
$[23] = inputSizeCva;
|
|
187
|
+
$[24] = size;
|
|
188
|
+
$[25] = t27;
|
|
189
|
+
$[26] = t28;
|
|
190
|
+
} else t28 = $[26];
|
|
187
191
|
let t29;
|
|
188
|
-
if ($[
|
|
192
|
+
if ($[27] !== as || $[28] !== headerProps) {
|
|
189
193
|
t29 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
190
194
|
as,
|
|
191
195
|
...headerProps
|
|
192
196
|
});
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
} else t29 = $[
|
|
197
|
+
$[27] = as;
|
|
198
|
+
$[28] = headerProps;
|
|
199
|
+
$[29] = t29;
|
|
200
|
+
} else t29 = $[29];
|
|
197
201
|
const t30 = shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
198
202
|
let t31;
|
|
199
|
-
if ($[
|
|
203
|
+
if ($[30] !== datePickerInputContentRowCva || $[31] !== size) {
|
|
200
204
|
t31 = datePickerInputContentRowCva({ size });
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
} else t31 = $[
|
|
205
|
+
$[30] = datePickerInputContentRowCva;
|
|
206
|
+
$[31] = size;
|
|
207
|
+
$[32] = t31;
|
|
208
|
+
} else t31 = $[32];
|
|
205
209
|
let t32;
|
|
206
|
-
if ($[
|
|
210
|
+
if ($[33] !== disableManualEntry || $[34] !== isDisabled || $[35] !== onOpenDropdown) {
|
|
207
211
|
t32 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
208
212
|
onPress: onOpenDropdown,
|
|
209
213
|
className: "absolute inset-0 z-base",
|
|
210
214
|
isDisabled
|
|
211
215
|
});
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
} else t32 = $[
|
|
216
|
+
$[33] = disableManualEntry;
|
|
217
|
+
$[34] = isDisabled;
|
|
218
|
+
$[35] = onOpenDropdown;
|
|
219
|
+
$[36] = t32;
|
|
220
|
+
} else t32 = $[36];
|
|
217
221
|
const t33 = !shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
218
222
|
let t34;
|
|
219
|
-
if ($[
|
|
223
|
+
if ($[37] !== as || $[38] !== dateGranularity || $[39] !== disableManualEntry || $[40] !== effectiveTimeZone || $[41] !== fieldProps || $[42] !== format || $[43] !== hidePlaceholder || $[44] !== isDisabled || $[45] !== isInvalid || $[46] !== isTimeOptional || $[47] !== normalizedEndFieldProps || $[48] !== normalizedFieldProps || $[49] !== onClearChange || $[50] !== placeholder) {
|
|
220
224
|
t34 = disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
221
225
|
size: "label-1",
|
|
222
226
|
className: "text-text-default-3",
|
|
@@ -250,24 +254,24 @@ var DatePickerInput = (t0) => {
|
|
|
250
254
|
timeZone: effectiveTimeZone,
|
|
251
255
|
segmentGroup: "end"
|
|
252
256
|
})] })] });
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else t34 = $[
|
|
257
|
+
$[37] = as;
|
|
258
|
+
$[38] = dateGranularity;
|
|
259
|
+
$[39] = disableManualEntry;
|
|
260
|
+
$[40] = effectiveTimeZone;
|
|
261
|
+
$[41] = fieldProps;
|
|
262
|
+
$[42] = format;
|
|
263
|
+
$[43] = hidePlaceholder;
|
|
264
|
+
$[44] = isDisabled;
|
|
265
|
+
$[45] = isInvalid;
|
|
266
|
+
$[46] = isTimeOptional;
|
|
267
|
+
$[47] = normalizedEndFieldProps;
|
|
268
|
+
$[48] = normalizedFieldProps;
|
|
269
|
+
$[49] = onClearChange;
|
|
270
|
+
$[50] = placeholder;
|
|
271
|
+
$[51] = t34;
|
|
272
|
+
} else t34 = $[51];
|
|
269
273
|
let t35;
|
|
270
|
-
if ($[
|
|
274
|
+
if ($[52] !== t31 || $[53] !== t32 || $[54] !== t33 || $[55] !== t34) {
|
|
271
275
|
t35 = /* @__PURE__ */ jsxs("div", {
|
|
272
276
|
className: t31,
|
|
273
277
|
children: [
|
|
@@ -276,14 +280,14 @@ var DatePickerInput = (t0) => {
|
|
|
276
280
|
t34
|
|
277
281
|
]
|
|
278
282
|
});
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
} else t35 = $[
|
|
283
|
+
$[52] = t31;
|
|
284
|
+
$[53] = t32;
|
|
285
|
+
$[54] = t33;
|
|
286
|
+
$[55] = t34;
|
|
287
|
+
$[56] = t35;
|
|
288
|
+
} else t35 = $[56];
|
|
285
289
|
let t36;
|
|
286
|
-
if ($[
|
|
290
|
+
if ($[57] !== t28 || $[58] !== t29 || $[59] !== t30 || $[60] !== t35) {
|
|
287
291
|
t36 = /* @__PURE__ */ jsxs("div", {
|
|
288
292
|
className: t28,
|
|
289
293
|
children: [
|
|
@@ -292,36 +296,36 @@ var DatePickerInput = (t0) => {
|
|
|
292
296
|
t35
|
|
293
297
|
]
|
|
294
298
|
});
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
} else t36 = $[
|
|
299
|
+
$[57] = t28;
|
|
300
|
+
$[58] = t29;
|
|
301
|
+
$[59] = t30;
|
|
302
|
+
$[60] = t35;
|
|
303
|
+
$[61] = t36;
|
|
304
|
+
} else t36 = $[61];
|
|
301
305
|
let t37;
|
|
302
|
-
if ($[
|
|
306
|
+
if ($[62] !== as || $[63] !== inputSizeCva || $[64] !== size) {
|
|
303
307
|
t37 = clsx(inputSizeCva({
|
|
304
308
|
size,
|
|
305
309
|
as
|
|
306
310
|
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
} else t37 = $[
|
|
311
|
+
$[62] = as;
|
|
312
|
+
$[63] = inputSizeCva;
|
|
313
|
+
$[64] = size;
|
|
314
|
+
$[65] = t37;
|
|
315
|
+
} else t37 = $[65];
|
|
312
316
|
let t38;
|
|
313
|
-
if ($[
|
|
317
|
+
if ($[66] !== clearInput || $[67] !== isClearable || $[68] !== showClear) {
|
|
314
318
|
t38 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
315
319
|
onClear: clearInput,
|
|
316
320
|
show: showClear
|
|
317
321
|
});
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
} else t38 = $[
|
|
322
|
+
$[66] = clearInput;
|
|
323
|
+
$[67] = isClearable;
|
|
324
|
+
$[68] = showClear;
|
|
325
|
+
$[69] = t38;
|
|
326
|
+
} else t38 = $[69];
|
|
323
327
|
let t39;
|
|
324
|
-
if ($[
|
|
328
|
+
if ($[70] !== buttonProps || $[71] !== disableDropdown || $[72] !== disableManualEntry || $[73] !== isDisabled || $[74] !== pickerIcon) {
|
|
325
329
|
t39 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
326
330
|
label: "",
|
|
327
331
|
color: "secondary",
|
|
@@ -331,26 +335,26 @@ var DatePickerInput = (t0) => {
|
|
|
331
335
|
className: "border-0!",
|
|
332
336
|
"data-static-press-action": ""
|
|
333
337
|
});
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
} else t39 = $[
|
|
338
|
+
$[70] = buttonProps;
|
|
339
|
+
$[71] = disableDropdown;
|
|
340
|
+
$[72] = disableManualEntry;
|
|
341
|
+
$[73] = isDisabled;
|
|
342
|
+
$[74] = pickerIcon;
|
|
343
|
+
$[75] = t39;
|
|
344
|
+
} else t39 = $[75];
|
|
341
345
|
let t40;
|
|
342
|
-
if ($[
|
|
346
|
+
if ($[76] !== t37 || $[77] !== t38 || $[78] !== t39) {
|
|
343
347
|
t40 = /* @__PURE__ */ jsxs("div", {
|
|
344
348
|
className: t37,
|
|
345
349
|
children: [t38, t39]
|
|
346
350
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
} else t40 = $[
|
|
351
|
+
$[76] = t37;
|
|
352
|
+
$[77] = t38;
|
|
353
|
+
$[78] = t39;
|
|
354
|
+
$[79] = t40;
|
|
355
|
+
} else t40 = $[79];
|
|
352
356
|
let t41;
|
|
353
|
-
if ($[
|
|
357
|
+
if ($[80] !== focusWithinProps || $[81] !== groupProps || $[82] !== hoverProps || $[83] !== t15 || $[84] !== t16 || $[85] !== t17 || $[86] !== t18 || $[87] !== t19 || $[88] !== t20 || $[89] !== t21 || $[90] !== t22 || $[91] !== t23 || $[92] !== t24 || $[93] !== t25 || $[94] !== t26 || $[95] !== t36 || $[96] !== t40) {
|
|
354
358
|
t41 = /* @__PURE__ */ jsxs("div", {
|
|
355
359
|
ref: containerRef,
|
|
356
360
|
...groupProps,
|
|
@@ -372,25 +376,25 @@ var DatePickerInput = (t0) => {
|
|
|
372
376
|
"data-is-filled": t26,
|
|
373
377
|
children: [t36, t40]
|
|
374
378
|
});
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
} else t41 = $[
|
|
379
|
+
$[80] = focusWithinProps;
|
|
380
|
+
$[81] = groupProps;
|
|
381
|
+
$[82] = hoverProps;
|
|
382
|
+
$[83] = t15;
|
|
383
|
+
$[84] = t16;
|
|
384
|
+
$[85] = t17;
|
|
385
|
+
$[86] = t18;
|
|
386
|
+
$[87] = t19;
|
|
387
|
+
$[88] = t20;
|
|
388
|
+
$[89] = t21;
|
|
389
|
+
$[90] = t22;
|
|
390
|
+
$[91] = t23;
|
|
391
|
+
$[92] = t24;
|
|
392
|
+
$[93] = t25;
|
|
393
|
+
$[94] = t26;
|
|
394
|
+
$[95] = t36;
|
|
395
|
+
$[96] = t40;
|
|
396
|
+
$[97] = t41;
|
|
397
|
+
} else t41 = $[97];
|
|
394
398
|
return t41;
|
|
395
399
|
};
|
|
396
400
|
//#endregion
|