linear-react-components-ui 2.1.0-beta.2 → 2.1.0-beta.3

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.
@@ -19,7 +19,7 @@ import { CalendarBox } from "../calendarbox.js";
19
19
  import { Triggers } from "./triggers.js";
20
20
  import { DatePeriodFieldContext } from "./context.js";
21
21
  const InputBase = React.forwardRef((props, __) => {
22
- const $ = compilerRuntimeExports.c(207);
22
+ const $ = compilerRuntimeExports.c(211);
23
23
  const {
24
24
  label,
25
25
  errors,
@@ -46,6 +46,7 @@ const InputBase = React.forwardRef((props, __) => {
46
46
  shouldCloseOnSelect,
47
47
  min,
48
48
  max,
49
+ onChange,
49
50
  tooltip,
50
51
  tooltipPosition,
51
52
  tooltipWidth,
@@ -141,12 +142,14 @@ const InputBase = React.forwardRef((props, __) => {
141
142
  setMaskValue: setInitialMaskValue,
142
143
  unmaskedValue: initialUnmaskedValue,
143
144
  handleOnPaste,
144
- handleOnBeforeInput
145
+ handleOnBeforeInput,
146
+ handleOnKeyDownCapture: handleInitialKeyDownCapture
145
147
  } = useDateMask({
146
148
  inputRef: initialInputRef,
147
149
  variant,
148
150
  defaultValue: selectedDate.inicial?.format(ptbrFormat),
149
151
  undigitable,
152
+ readOnly,
150
153
  onCommit: (date) => handleChangeUpdateDateState({
151
154
  date,
152
155
  inputType: "initial",
@@ -158,12 +161,14 @@ const InputBase = React.forwardRef((props, __) => {
158
161
  const {
159
162
  maskedValue: finalMaskedValue,
160
163
  setMaskValue: setFinalMaskValue,
161
- unmaskedValue: finalUnmaskedValue
164
+ unmaskedValue: finalUnmaskedValue,
165
+ handleOnKeyDownCapture: handleFinalKeyDownCapture
162
166
  } = useDateMask({
163
167
  inputRef: finalInputRef,
164
168
  variant,
165
169
  defaultValue: selectedDate.final?.format(ptbrFormat),
166
170
  undigitable,
171
+ readOnly,
167
172
  onCommit: (date_0) => handleChangeUpdateDateState({
168
173
  date: date_0,
169
174
  inputType: "final",
@@ -199,10 +204,21 @@ const InputBase = React.forwardRef((props, __) => {
199
204
  t23 = $[12];
200
205
  }
201
206
  const verifyPeriodSelectedIsValid = t23;
207
+ const emitPeriodChange = (inicial, final) => {
208
+ onChange?.({
209
+ target: {
210
+ name: props.name,
211
+ value: {
212
+ [initialName]: returnValueType === "default" ? inicial?.format(isoFormat) : inicial?.toISOString(),
213
+ [finalName]: returnValueType === "default" ? final?.format(isoFormat) : final?.toISOString()
214
+ }
215
+ }
216
+ });
217
+ };
202
218
  let t24;
203
- if ($[13] !== finalName || $[14] !== handleSetCalendarBoxOpen || $[15] !== initialName || $[16] !== props || $[17] !== setFinalMaskValue || $[18] !== setInitialMaskValue || $[19] !== setSelectedDate) {
219
+ if ($[13] !== finalName || $[14] !== handleSetCalendarBoxOpen || $[15] !== initialName || $[16] !== onChange || $[17] !== props.name || $[18] !== setFinalMaskValue || $[19] !== setInitialMaskValue || $[20] !== setSelectedDate) {
204
220
  t24 = () => {
205
- props.onChange?.({
221
+ onChange?.({
206
222
  target: {
207
223
  name: props.name,
208
224
  value: {
@@ -219,13 +235,14 @@ const InputBase = React.forwardRef((props, __) => {
219
235
  $[13] = finalName;
220
236
  $[14] = handleSetCalendarBoxOpen;
221
237
  $[15] = initialName;
222
- $[16] = props;
223
- $[17] = setFinalMaskValue;
224
- $[18] = setInitialMaskValue;
225
- $[19] = setSelectedDate;
226
- $[20] = t24;
238
+ $[16] = onChange;
239
+ $[17] = props.name;
240
+ $[18] = setFinalMaskValue;
241
+ $[19] = setInitialMaskValue;
242
+ $[20] = setSelectedDate;
243
+ $[21] = t24;
227
244
  } else {
228
- t24 = $[20];
245
+ t24 = $[21];
229
246
  }
230
247
  const handleOnClickClearSelectedPeriod = t24;
231
248
  const handleChangeUpdateDateState = (params) => {
@@ -235,76 +252,73 @@ const InputBase = React.forwardRef((props, __) => {
235
252
  typing
236
253
  } = params;
237
254
  const rawDate = date_1.clone();
238
- const verifyDateRangeOrder = _temp2;
239
- bb165: switch (inputType) {
255
+ const resolveDateRange = (initialDate, finalDate) => {
256
+ if (typing) {
257
+ return {
258
+ inicial: initialDate,
259
+ final: finalDate
260
+ };
261
+ }
262
+ const inicial_0 = initialDate?.isAfter(finalDate) ? finalDate : initialDate;
263
+ const final_0 = initialDate?.isAfter(finalDate) ? initialDate : finalDate;
264
+ return {
265
+ inicial: inicial_0,
266
+ final: final_0
267
+ };
268
+ };
269
+ bb209: switch (inputType) {
240
270
  case "initial": {
241
271
  setSelectedDate((prevSelectedDate_0) => {
242
272
  const {
243
- inicial: inicial_2,
244
- final: final_2
245
- } = verifyDateRangeOrder(rawDate, prevSelectedDate_0.final);
273
+ inicial: inicial_3,
274
+ final: final_3
275
+ } = resolveDateRange(rawDate, prevSelectedDate_0.final);
246
276
  const updatedState_0 = {
247
- inicial: inicial_2,
248
- final: final_2
277
+ inicial: inicial_3,
278
+ final: final_3
249
279
  };
250
280
  return updatedState_0;
251
281
  });
252
282
  const {
253
- inicial: inicial_3,
254
- final: final_3
255
- } = verifyDateRangeOrder(rawDate, selectedDate.final);
256
- props.onChange?.({
257
- target: {
258
- name: props.name,
259
- value: {
260
- [initialName]: returnValueType === "default" ? inicial_3?.format(isoFormat) : inicial_3?.toISOString(),
261
- [finalName]: returnValueType === "default" ? final_3?.format(isoFormat) : final_3?.toISOString()
262
- }
263
- }
264
- });
283
+ inicial: inicial_4,
284
+ final: final_4
285
+ } = resolveDateRange(rawDate, selectedDate.final);
286
+ emitPeriodChange(inicial_4, final_4);
265
287
  requestAnimationFrame(() => {
266
288
  if (!typing) {
267
289
  finalInputRef.current?.focus?.();
268
290
  }
269
291
  });
270
- break bb165;
292
+ break bb209;
271
293
  }
272
294
  case "final": {
273
295
  setSelectedDate((prevSelectedDate) => {
274
296
  const {
275
- inicial: inicial_0,
276
- final: final_0
277
- } = verifyDateRangeOrder(prevSelectedDate.inicial, rawDate);
297
+ inicial: inicial_1,
298
+ final: final_1
299
+ } = resolveDateRange(prevSelectedDate.inicial, rawDate);
278
300
  const updatedState = {
279
- inicial: inicial_0,
280
- final: final_0
301
+ inicial: inicial_1,
302
+ final: final_1
281
303
  };
282
304
  return updatedState;
283
305
  });
284
306
  const {
285
- inicial: inicial_1,
286
- final: final_1
287
- } = verifyDateRangeOrder(selectedDate.inicial, rawDate);
288
- props.onChange?.({
289
- target: {
290
- name: props.name,
291
- value: {
292
- [initialName]: returnValueType === "default" ? inicial_1?.format(isoFormat) : inicial_1?.toISOString(),
293
- [finalName]: returnValueType === "default" ? final_1?.format(isoFormat) : final_1?.toISOString()
294
- }
295
- }
296
- });
307
+ inicial: inicial_2,
308
+ final: final_2
309
+ } = resolveDateRange(selectedDate.inicial, rawDate);
310
+ emitPeriodChange(inicial_2, final_2);
297
311
  if (shouldCloseCalendarOnSelect) {
298
312
  handleSetCalendarBoxOpen(false);
299
313
  }
300
- break bb165;
314
+ break bb209;
301
315
  }
302
316
  }
303
317
  handleChangeActiveDescendant(rawDate.format(TOKEN_ISO_FORMAT));
304
318
  handleChangeCalendarDisplayDate(rawDate.clone());
305
319
  };
306
320
  let t25;
307
- if ($[21] !== finalName || $[22] !== handleSetCalendarBoxOpen || $[23] !== initialName || $[24] !== isoFormat || $[25] !== maxDate || $[26] !== minDate || $[27] !== props || $[28] !== returnValueType || $[29] !== setSelectedDate || $[30] !== shouldCloseCalendarOnSelect) {
321
+ if ($[22] !== finalName || $[23] !== handleSetCalendarBoxOpen || $[24] !== initialName || $[25] !== isoFormat || $[26] !== maxDate || $[27] !== minDate || $[28] !== onChange || $[29] !== props.name || $[30] !== returnValueType || $[31] !== setSelectedDate || $[32] !== shouldCloseCalendarOnSelect) {
308
322
  t25 = (period) => {
309
323
  const localOnChange = (initialDate_0, finalDate_0) => {
310
324
  const valueToUpdate = {
@@ -318,7 +332,7 @@ const InputBase = React.forwardRef((props, __) => {
318
332
  };
319
333
  return updatedState_1;
320
334
  });
321
- props.onChange?.({
335
+ onChange?.({
322
336
  target: {
323
337
  name: props.name,
324
338
  value: valueToUpdate
@@ -335,24 +349,25 @@ const InputBase = React.forwardRef((props, __) => {
335
349
  handleSetCalendarBoxOpen(false);
336
350
  }
337
351
  };
338
- $[21] = finalName;
339
- $[22] = handleSetCalendarBoxOpen;
340
- $[23] = initialName;
341
- $[24] = isoFormat;
342
- $[25] = maxDate;
343
- $[26] = minDate;
344
- $[27] = props;
345
- $[28] = returnValueType;
346
- $[29] = setSelectedDate;
347
- $[30] = shouldCloseCalendarOnSelect;
348
- $[31] = t25;
352
+ $[22] = finalName;
353
+ $[23] = handleSetCalendarBoxOpen;
354
+ $[24] = initialName;
355
+ $[25] = isoFormat;
356
+ $[26] = maxDate;
357
+ $[27] = minDate;
358
+ $[28] = onChange;
359
+ $[29] = props.name;
360
+ $[30] = returnValueType;
361
+ $[31] = setSelectedDate;
362
+ $[32] = shouldCloseCalendarOnSelect;
363
+ $[33] = t25;
349
364
  } else {
350
- t25 = $[31];
365
+ t25 = $[33];
351
366
  }
352
367
  const handleChangeUpdateDateStateWithPredefinedPeriod = t25;
353
- let t26;
354
- if ($[32] !== calendarBoxOpen || $[33] !== digits || $[34] !== finalInputName || $[35] !== finalUnmaskedValue || $[36] !== handleChangeActiveDescendant || $[37] !== handleChangeCalendarDisplayDate || $[38] !== handleSetCalendarBoxOpen || $[39] !== initialInputName || $[40] !== initialUnmaskedValue || $[41] !== props || $[42] !== ptbrFormat || $[43] !== selectedDate.final || $[44] !== selectedDate.inicial || $[45] !== setFinalMaskValue || $[46] !== setInitialMaskValue) {
355
- t26 = (event, inputType_0) => {
368
+ let handleOnBlurMaskInput;
369
+ if ($[34] !== calendarBoxOpen || $[35] !== digits || $[36] !== emitPeriodChange || $[37] !== finalInputName || $[38] !== finalUnmaskedValue || $[39] !== handleChangeActiveDescendant || $[40] !== handleChangeCalendarDisplayDate || $[41] !== handleSetCalendarBoxOpen || $[42] !== initialInputName || $[43] !== initialUnmaskedValue || $[44] !== props || $[45] !== ptbrFormat || $[46] !== selectedDate || $[47] !== setFinalMaskValue || $[48] !== setInitialMaskValue || $[49] !== setSelectedDate) {
370
+ handleOnBlurMaskInput = (event, inputType_0) => {
356
371
  props?.onBlur?.(event);
357
372
  if (inputType_0 === "initial") {
358
373
  if (event.relatedTarget?.id !== finalInputName) {
@@ -384,30 +399,47 @@ const InputBase = React.forwardRef((props, __) => {
384
399
  }
385
400
  }
386
401
  }
402
+ handleReorderPeriodOnBlur();
403
+ };
404
+ const handleReorderPeriodOnBlur = () => {
405
+ const {
406
+ inicial: inicial_5,
407
+ final: final_5
408
+ } = selectedDate;
409
+ if (!inicial_5 || !final_5 || !inicial_5.isAfter(final_5)) {
410
+ return;
411
+ }
412
+ setSelectedDate({
413
+ inicial: final_5,
414
+ final: inicial_5
415
+ });
416
+ setInitialMaskValue(final_5.format(ptbrFormat));
417
+ setFinalMaskValue(inicial_5.format(ptbrFormat));
418
+ emitPeriodChange(final_5, inicial_5);
387
419
  };
388
- $[32] = calendarBoxOpen;
389
- $[33] = digits;
390
- $[34] = finalInputName;
391
- $[35] = finalUnmaskedValue;
392
- $[36] = handleChangeActiveDescendant;
393
- $[37] = handleChangeCalendarDisplayDate;
394
- $[38] = handleSetCalendarBoxOpen;
395
- $[39] = initialInputName;
396
- $[40] = initialUnmaskedValue;
397
- $[41] = props;
398
- $[42] = ptbrFormat;
399
- $[43] = selectedDate.final;
400
- $[44] = selectedDate.inicial;
401
- $[45] = setFinalMaskValue;
402
- $[46] = setInitialMaskValue;
403
- $[47] = t26;
420
+ $[34] = calendarBoxOpen;
421
+ $[35] = digits;
422
+ $[36] = emitPeriodChange;
423
+ $[37] = finalInputName;
424
+ $[38] = finalUnmaskedValue;
425
+ $[39] = handleChangeActiveDescendant;
426
+ $[40] = handleChangeCalendarDisplayDate;
427
+ $[41] = handleSetCalendarBoxOpen;
428
+ $[42] = initialInputName;
429
+ $[43] = initialUnmaskedValue;
430
+ $[44] = props;
431
+ $[45] = ptbrFormat;
432
+ $[46] = selectedDate;
433
+ $[47] = setFinalMaskValue;
434
+ $[48] = setInitialMaskValue;
435
+ $[49] = setSelectedDate;
436
+ $[50] = handleOnBlurMaskInput;
404
437
  } else {
405
- t26 = $[47];
438
+ handleOnBlurMaskInput = $[50];
406
439
  }
407
- const handleOnBlurMaskInput = t26;
408
- let t27;
409
- if ($[48] !== calendarBoxOpen || $[49] !== handleChangeActiveDescendant || $[50] !== handleChangeCalendarDisplayDate || $[51] !== handleSetCalendarBoxOpen || $[52] !== openCalendarOnFocus || $[53] !== props || $[54] !== readOnly || $[55] !== selectedDate.final || $[56] !== selectedDate.inicial || $[57] !== setActiveInputType) {
410
- t27 = (event_0, inputType_1) => {
440
+ let t26;
441
+ if ($[51] !== calendarBoxOpen || $[52] !== handleChangeActiveDescendant || $[53] !== handleChangeCalendarDisplayDate || $[54] !== handleSetCalendarBoxOpen || $[55] !== openCalendarOnFocus || $[56] !== props || $[57] !== readOnly || $[58] !== selectedDate.final || $[59] !== selectedDate.inicial || $[60] !== setActiveInputType) {
442
+ t26 = (event_0, inputType_1) => {
411
443
  props?.onFocus?.(event_0);
412
444
  if (!readOnly && !calendarBoxOpen && openCalendarOnFocus) {
413
445
  handleSetCalendarBoxOpen(true);
@@ -422,25 +454,25 @@ const InputBase = React.forwardRef((props, __) => {
422
454
  handleChangeCalendarDisplayDate(selectedDate.final ?? hooks());
423
455
  }
424
456
  };
425
- $[48] = calendarBoxOpen;
426
- $[49] = handleChangeActiveDescendant;
427
- $[50] = handleChangeCalendarDisplayDate;
428
- $[51] = handleSetCalendarBoxOpen;
429
- $[52] = openCalendarOnFocus;
430
- $[53] = props;
431
- $[54] = readOnly;
432
- $[55] = selectedDate.final;
433
- $[56] = selectedDate.inicial;
434
- $[57] = setActiveInputType;
435
- $[58] = t27;
457
+ $[51] = calendarBoxOpen;
458
+ $[52] = handleChangeActiveDescendant;
459
+ $[53] = handleChangeCalendarDisplayDate;
460
+ $[54] = handleSetCalendarBoxOpen;
461
+ $[55] = openCalendarOnFocus;
462
+ $[56] = props;
463
+ $[57] = readOnly;
464
+ $[58] = selectedDate.final;
465
+ $[59] = selectedDate.inicial;
466
+ $[60] = setActiveInputType;
467
+ $[61] = t26;
436
468
  } else {
437
- t27 = $[58];
469
+ t26 = $[61];
438
470
  }
439
- const handleOnFocusMaskInput = t27;
471
+ const handleOnFocusMaskInput = t26;
440
472
  let getDayState;
441
473
  let handleOnKeyDownMaskInput;
442
474
  let handleSelectDay;
443
- if ($[59] !== activeDescendant || $[60] !== calendarBoxOpen || $[61] !== finalInputName || $[62] !== handleChangeUpdateDateState || $[63] !== hasBounds || $[64] !== initialInputName || $[65] !== isDateTime || $[66] !== maxDate || $[67] !== minDate || $[68] !== props || $[69] !== selectedDate) {
475
+ if ($[62] !== activeDescendant || $[63] !== calendarBoxOpen || $[64] !== finalInputName || $[65] !== handleChangeUpdateDateState || $[66] !== hasBounds || $[67] !== initialInputName || $[68] !== isDateTime || $[69] !== maxDate || $[70] !== minDate || $[71] !== props || $[72] !== selectedDate) {
444
476
  handleOnKeyDownMaskInput = (event_1, inputType_2) => {
445
477
  props?.onKeyDown?.(event_1);
446
478
  if (calendarBoxOpen && event_1.key && !event_1.shiftKey && !event_1.altKey && event_1.key === Keys.enter) {
@@ -448,33 +480,33 @@ const InputBase = React.forwardRef((props, __) => {
448
480
  handleSelectDay(hooks(_.toString(activeDescendant), TOKEN_ISO_FORMAT), inputType_2);
449
481
  }
450
482
  };
451
- let t282;
452
- if ($[73] !== hasBounds || $[74] !== maxDate || $[75] !== minDate || $[76] !== selectedDate) {
453
- t282 = (day) => {
483
+ let t272;
484
+ if ($[76] !== hasBounds || $[77] !== maxDate || $[78] !== minDate || $[79] !== selectedDate) {
485
+ t272 = (day) => {
454
486
  const {
455
- inicial: inicial_4,
456
- final: final_4
487
+ inicial: inicial_6,
488
+ final: final_6
457
489
  } = selectedDate;
458
490
  return {
459
- isSelected: Boolean(inicial_4 && day.isSame(inicial_4, "day") || final_4 && day.isSame(final_4, "day")),
460
- isInRange: Boolean(inicial_4 && final_4 && day.isAfter(inicial_4, "day") && day.isBefore(final_4, "day")),
491
+ isSelected: Boolean(inicial_6 && day.isSame(inicial_6, "day") || final_6 && day.isSame(final_6, "day")),
492
+ isInRange: Boolean(inicial_6 && final_6 && day.isAfter(inicial_6, "day") && day.isBefore(final_6, "day")),
461
493
  ...hasBounds && {
462
494
  isDisabled: isDayOutOfBounds(day, minDate, maxDate)
463
495
  }
464
496
  };
465
497
  };
466
- $[73] = hasBounds;
467
- $[74] = maxDate;
468
- $[75] = minDate;
469
- $[76] = selectedDate;
470
- $[77] = t282;
498
+ $[76] = hasBounds;
499
+ $[77] = maxDate;
500
+ $[78] = minDate;
501
+ $[79] = selectedDate;
502
+ $[80] = t272;
471
503
  } else {
472
- t282 = $[77];
504
+ t272 = $[80];
473
505
  }
474
- getDayState = t282;
475
- let t292;
476
- if ($[78] !== finalInputName || $[79] !== initialInputName) {
477
- t292 = () => {
506
+ getDayState = t272;
507
+ let t282;
508
+ if ($[81] !== finalInputName || $[82] !== initialInputName) {
509
+ t282 = () => {
478
510
  const focusedInputId = document.activeElement?.id;
479
511
  if (focusedInputId === initialInputName) {
480
512
  return "initial";
@@ -483,13 +515,13 @@ const InputBase = React.forwardRef((props, __) => {
483
515
  return "final";
484
516
  }
485
517
  };
486
- $[78] = finalInputName;
487
- $[79] = initialInputName;
488
- $[80] = t292;
518
+ $[81] = finalInputName;
519
+ $[82] = initialInputName;
520
+ $[83] = t282;
489
521
  } else {
490
- t292 = $[80];
522
+ t282 = $[83];
491
523
  }
492
- const resolveInputTypeFromFocus = t292;
524
+ const resolveInputTypeFromFocus = t282;
493
525
  handleSelectDay = (daySelected, targetInputType) => {
494
526
  const inputType_3 = targetInputType ?? resolveInputTypeFromFocus();
495
527
  if (_.isUndefined(inputType_3)) {
@@ -502,29 +534,29 @@ const InputBase = React.forwardRef((props, __) => {
502
534
  inputType: inputType_3
503
535
  });
504
536
  };
505
- $[59] = activeDescendant;
506
- $[60] = calendarBoxOpen;
507
- $[61] = finalInputName;
508
- $[62] = handleChangeUpdateDateState;
509
- $[63] = hasBounds;
510
- $[64] = initialInputName;
511
- $[65] = isDateTime;
512
- $[66] = maxDate;
513
- $[67] = minDate;
514
- $[68] = props;
515
- $[69] = selectedDate;
516
- $[70] = getDayState;
517
- $[71] = handleOnKeyDownMaskInput;
518
- $[72] = handleSelectDay;
537
+ $[62] = activeDescendant;
538
+ $[63] = calendarBoxOpen;
539
+ $[64] = finalInputName;
540
+ $[65] = handleChangeUpdateDateState;
541
+ $[66] = hasBounds;
542
+ $[67] = initialInputName;
543
+ $[68] = isDateTime;
544
+ $[69] = maxDate;
545
+ $[70] = minDate;
546
+ $[71] = props;
547
+ $[72] = selectedDate;
548
+ $[73] = getDayState;
549
+ $[74] = handleOnKeyDownMaskInput;
550
+ $[75] = handleSelectDay;
519
551
  } else {
520
- getDayState = $[70];
521
- handleOnKeyDownMaskInput = $[71];
522
- handleSelectDay = $[72];
552
+ getDayState = $[73];
553
+ handleOnKeyDownMaskInput = $[74];
554
+ handleSelectDay = $[75];
523
555
  }
524
556
  const activeSelectedDate = activeInputType === "initial" ? selectedDate.inicial : selectedDate.final;
525
- let t28;
526
- if ($[81] !== activeInputType || $[82] !== activeSelectedDate || $[83] !== handleChangeUpdateDateState) {
527
- t28 = (hour, minute) => {
557
+ let t27;
558
+ if ($[84] !== activeInputType || $[85] !== activeSelectedDate || $[86] !== handleChangeUpdateDateState) {
559
+ t27 = (hour, minute) => {
528
560
  if (!activeSelectedDate) {
529
561
  return;
530
562
  }
@@ -534,17 +566,17 @@ const InputBase = React.forwardRef((props, __) => {
534
566
  typing: true
535
567
  });
536
568
  };
537
- $[81] = activeInputType;
538
- $[82] = activeSelectedDate;
539
- $[83] = handleChangeUpdateDateState;
540
- $[84] = t28;
569
+ $[84] = activeInputType;
570
+ $[85] = activeSelectedDate;
571
+ $[86] = handleChangeUpdateDateState;
572
+ $[87] = t27;
541
573
  } else {
542
- t28 = $[84];
574
+ t27 = $[87];
543
575
  }
544
- const handleSelectTime = t28;
545
- let t29;
546
- if ($[85] !== finalName || $[86] !== initialName || $[87] !== props.value || $[88] !== ptbrFormat || $[89] !== setFinalMaskValue || $[90] !== setInitialMaskValue || $[91] !== setSelectedDate || $[92] !== variant) {
547
- t29 = () => {
576
+ const handleSelectTime = t27;
577
+ let t28;
578
+ if ($[88] !== finalName || $[89] !== initialName || $[90] !== props.value || $[91] !== ptbrFormat || $[92] !== setFinalMaskValue || $[93] !== setInitialMaskValue || $[94] !== setSelectedDate || $[95] !== variant) {
579
+ t28 = () => {
548
580
  if (props?.value) {
549
581
  const objectValue_0 = props.value;
550
582
  const initialDate_2 = parseDateValue(objectValue_0[initialName], variant);
@@ -557,37 +589,37 @@ const InputBase = React.forwardRef((props, __) => {
557
589
  setFinalMaskValue(finalDate_2.format(ptbrFormat));
558
590
  }
559
591
  };
560
- $[85] = finalName;
561
- $[86] = initialName;
562
- $[87] = props.value;
563
- $[88] = ptbrFormat;
564
- $[89] = setFinalMaskValue;
565
- $[90] = setInitialMaskValue;
566
- $[91] = setSelectedDate;
567
- $[92] = variant;
568
- $[93] = t29;
592
+ $[88] = finalName;
593
+ $[89] = initialName;
594
+ $[90] = props.value;
595
+ $[91] = ptbrFormat;
596
+ $[92] = setFinalMaskValue;
597
+ $[93] = setInitialMaskValue;
598
+ $[94] = setSelectedDate;
599
+ $[95] = variant;
600
+ $[96] = t28;
569
601
  } else {
570
- t29 = $[93];
602
+ t28 = $[96];
571
603
  }
572
- const t30 = props?.value;
573
- let t31;
574
- if ($[94] !== t30) {
575
- t31 = [t30];
576
- $[94] = t30;
577
- $[95] = t31;
604
+ const t29 = props?.value;
605
+ let t30;
606
+ if ($[97] !== t29) {
607
+ t30 = [t29];
608
+ $[97] = t29;
609
+ $[98] = t30;
578
610
  } else {
579
- t31 = $[95];
611
+ t30 = $[98];
580
612
  }
581
- React.useEffect(t29, t31);
582
- const t32 = Boolean(readOnly);
583
- const t33 = Boolean(disabled);
584
- const t34 = verifyPeriodSelectedIsValid();
585
- let t35;
586
- if ($[96] !== calendarState || $[97] !== finalInputName || $[98] !== handleChangeUpdateDateState || $[99] !== handleChangeUpdateDateStateWithPredefinedPeriod || $[100] !== handleOnClickClearSelectedPeriod || $[101] !== hasValidationErrors || $[102] !== initialInputName || $[103] !== initialInputRef || $[104] !== maxDate || $[105] !== minDate || $[106] !== openCalendarOnFocus || $[107] !== selectedDate || $[108] !== showCalendarButton || $[109] !== showClearDateButton || $[110] !== showPredefinedPeriodsButton || $[111] !== skeletonize || $[112] !== t32 || $[113] !== t33 || $[114] !== t34 || $[115] !== undigitable) {
587
- t35 = {
613
+ React.useEffect(t28, t30);
614
+ const t31 = Boolean(readOnly);
615
+ const t32 = Boolean(disabled);
616
+ const t33 = verifyPeriodSelectedIsValid();
617
+ let t34;
618
+ if ($[99] !== calendarState || $[100] !== finalInputName || $[101] !== handleChangeUpdateDateState || $[102] !== handleChangeUpdateDateStateWithPredefinedPeriod || $[103] !== handleOnClickClearSelectedPeriod || $[104] !== hasValidationErrors || $[105] !== initialInputName || $[106] !== initialInputRef || $[107] !== maxDate || $[108] !== minDate || $[109] !== openCalendarOnFocus || $[110] !== selectedDate || $[111] !== showCalendarButton || $[112] !== showClearDateButton || $[113] !== showPredefinedPeriodsButton || $[114] !== skeletonize || $[115] !== t31 || $[116] !== t32 || $[117] !== t33 || $[118] !== undigitable) {
619
+ t34 = {
588
620
  ...calendarState,
589
- isReadOnly: t32,
590
- isDisabled: t33,
621
+ isReadOnly: t31,
622
+ isDisabled: t32,
591
623
  undigitable,
592
624
  skeletonize,
593
625
  selectedDate,
@@ -605,245 +637,246 @@ const InputBase = React.forwardRef((props, __) => {
605
637
  handleChangeUpdateDateState,
606
638
  handleOnClickClearSelectedPeriod,
607
639
  handleChangeUpdateDateStateWithPredefinedPeriod,
608
- hasValidPeriodSelected: t34
640
+ hasValidPeriodSelected: t33
609
641
  };
610
- $[96] = calendarState;
611
- $[97] = finalInputName;
612
- $[98] = handleChangeUpdateDateState;
613
- $[99] = handleChangeUpdateDateStateWithPredefinedPeriod;
614
- $[100] = handleOnClickClearSelectedPeriod;
615
- $[101] = hasValidationErrors;
616
- $[102] = initialInputName;
617
- $[103] = initialInputRef;
618
- $[104] = maxDate;
619
- $[105] = minDate;
620
- $[106] = openCalendarOnFocus;
621
- $[107] = selectedDate;
622
- $[108] = showCalendarButton;
623
- $[109] = showClearDateButton;
624
- $[110] = showPredefinedPeriodsButton;
625
- $[111] = skeletonize;
626
- $[112] = t32;
627
- $[113] = t33;
628
- $[114] = t34;
629
- $[115] = undigitable;
630
- $[116] = t35;
642
+ $[99] = calendarState;
643
+ $[100] = finalInputName;
644
+ $[101] = handleChangeUpdateDateState;
645
+ $[102] = handleChangeUpdateDateStateWithPredefinedPeriod;
646
+ $[103] = handleOnClickClearSelectedPeriod;
647
+ $[104] = hasValidationErrors;
648
+ $[105] = initialInputName;
649
+ $[106] = initialInputRef;
650
+ $[107] = maxDate;
651
+ $[108] = minDate;
652
+ $[109] = openCalendarOnFocus;
653
+ $[110] = selectedDate;
654
+ $[111] = showCalendarButton;
655
+ $[112] = showClearDateButton;
656
+ $[113] = showPredefinedPeriodsButton;
657
+ $[114] = skeletonize;
658
+ $[115] = t31;
659
+ $[116] = t32;
660
+ $[117] = t33;
661
+ $[118] = undigitable;
662
+ $[119] = t34;
663
+ } else {
664
+ t34 = $[119];
665
+ }
666
+ const contextValues = t34;
667
+ let t35;
668
+ if ($[120] !== customClassLabel || $[121] !== disabled || $[122] !== hasHintMessages || $[123] !== hasLabel || $[124] !== hintPosition || $[125] !== initialInputName || $[126] !== label || $[127] !== labelUppercase || $[128] !== popoverAlign || $[129] !== props.hint || $[130] !== props.required || $[131] !== readOnly || $[132] !== skeletonize || $[133] !== themePopover) {
669
+ t35 = hasLabel && /* @__PURE__ */ jsx(Label, { "data-testid": "test-date-period-field-label", label, inputId: initialInputName, hint: props?.hint, isDisabled: disabled, isReadOnly: readOnly, skeletonize, required: props?.required, hintPosition, themePopover, popoverAlign, labelUppercase, hasHintMessages, customClassLabel });
670
+ $[120] = customClassLabel;
671
+ $[121] = disabled;
672
+ $[122] = hasHintMessages;
673
+ $[123] = hasLabel;
674
+ $[124] = hintPosition;
675
+ $[125] = initialInputName;
676
+ $[126] = label;
677
+ $[127] = labelUppercase;
678
+ $[128] = popoverAlign;
679
+ $[129] = props.hint;
680
+ $[130] = props.required;
681
+ $[131] = readOnly;
682
+ $[132] = skeletonize;
683
+ $[133] = themePopover;
684
+ $[134] = t35;
631
685
  } else {
632
- t35 = $[116];
686
+ t35 = $[134];
633
687
  }
634
- const contextValues = t35;
635
- let t36;
636
- if ($[117] !== customClassLabel || $[118] !== disabled || $[119] !== hasHintMessages || $[120] !== hasLabel || $[121] !== hintPosition || $[122] !== initialInputName || $[123] !== label || $[124] !== labelUppercase || $[125] !== popoverAlign || $[126] !== props.hint || $[127] !== props.required || $[128] !== readOnly || $[129] !== skeletonize || $[130] !== themePopover) {
637
- t36 = hasLabel && /* @__PURE__ */ jsx(Label, { "data-testid": "test-date-period-field-label", label, inputId: initialInputName, hint: props?.hint, isDisabled: disabled, isReadOnly: readOnly, skeletonize, required: props?.required, hintPosition, themePopover, popoverAlign, labelUppercase, hasHintMessages, customClassLabel });
638
- $[117] = customClassLabel;
639
- $[118] = disabled;
640
- $[119] = hasHintMessages;
641
- $[120] = hasLabel;
642
- $[121] = hintPosition;
643
- $[122] = initialInputName;
644
- $[123] = label;
645
- $[124] = labelUppercase;
646
- $[125] = popoverAlign;
647
- $[126] = props.hint;
648
- $[127] = props.required;
649
- $[128] = readOnly;
650
- $[129] = skeletonize;
651
- $[130] = themePopover;
652
- $[131] = t36;
688
+ const t36 = _.omit(rest, ["initialRef", "finalRef"]);
689
+ const t37 = props?.initialRef;
690
+ let t38;
691
+ if ($[135] !== initialInputRef || $[136] !== t37) {
692
+ t38 = mergeRefs(initialInputRef, t37);
693
+ $[135] = initialInputRef;
694
+ $[136] = t37;
695
+ $[137] = t38;
653
696
  } else {
654
- t36 = $[131];
697
+ t38 = $[137];
655
698
  }
656
- const t37 = _.omit(rest, ["initialRef", "finalRef"]);
657
- const t38 = props?.initialRef;
658
699
  let t39;
659
- if ($[132] !== initialInputRef || $[133] !== t38) {
660
- t39 = mergeRefs(initialInputRef, t38);
661
- $[132] = initialInputRef;
662
- $[133] = t38;
663
- $[134] = t39;
700
+ if ($[138] !== handleOnBlurMaskInput) {
701
+ t39 = (event_2) => handleOnBlurMaskInput(event_2, "initial");
702
+ $[138] = handleOnBlurMaskInput;
703
+ $[139] = t39;
664
704
  } else {
665
- t39 = $[134];
705
+ t39 = $[139];
666
706
  }
667
707
  let t40;
668
- if ($[135] !== handleOnBlurMaskInput) {
669
- t40 = (event_2) => handleOnBlurMaskInput(event_2, "initial");
670
- $[135] = handleOnBlurMaskInput;
671
- $[136] = t40;
708
+ if ($[140] !== handleOnFocusMaskInput) {
709
+ t40 = (event_3) => handleOnFocusMaskInput(event_3, "initial");
710
+ $[140] = handleOnFocusMaskInput;
711
+ $[141] = t40;
672
712
  } else {
673
- t40 = $[136];
713
+ t40 = $[141];
674
714
  }
675
715
  let t41;
676
- if ($[137] !== handleOnFocusMaskInput) {
677
- t41 = (event_3) => handleOnFocusMaskInput(event_3, "initial");
678
- $[137] = handleOnFocusMaskInput;
679
- $[138] = t41;
716
+ if ($[142] !== handleOnKeyDownMaskInput) {
717
+ t41 = (event_4) => handleOnKeyDownMaskInput(event_4, "initial");
718
+ $[142] = handleOnKeyDownMaskInput;
719
+ $[143] = t41;
680
720
  } else {
681
- t41 = $[138];
721
+ t41 = $[143];
682
722
  }
683
723
  let t42;
684
- if ($[139] !== handleOnKeyDownMaskInput) {
685
- t42 = (event_4) => handleOnKeyDownMaskInput(event_4, "initial");
686
- $[139] = handleOnKeyDownMaskInput;
687
- $[140] = t42;
724
+ if ($[144] === Symbol.for("react.memo_cache_sentinel")) {
725
+ t42 = /* @__PURE__ */ jsx(Icon, { name: "arrow_right", size: 10 });
726
+ $[144] = t42;
688
727
  } else {
689
- t42 = $[140];
728
+ t42 = $[144];
690
729
  }
691
730
  let t43;
692
- if ($[141] === Symbol.for("react.memo_cache_sentinel")) {
693
- t43 = /* @__PURE__ */ jsx(Icon, { name: "arrow_right", size: 10 });
694
- $[141] = t43;
731
+ if ($[145] !== disabled || $[146] !== readOnly) {
732
+ t43 = /* @__PURE__ */ jsx("span", { className: "separator", "data-state-disabled": disabled, "data-state-read-only": readOnly, onMouseDown: _temp2, children: t42 });
733
+ $[145] = disabled;
734
+ $[146] = readOnly;
735
+ $[147] = t43;
695
736
  } else {
696
- t43 = $[141];
737
+ t43 = $[147];
697
738
  }
698
- let t44;
699
- if ($[142] !== disabled || $[143] !== readOnly) {
700
- t44 = /* @__PURE__ */ jsx("span", { className: "separator", "data-state-disabled": disabled, "data-state-read-only": readOnly, onMouseDown: _temp3, children: t43 });
701
- $[142] = disabled;
702
- $[143] = readOnly;
703
- $[144] = t44;
739
+ const t44 = inputs2_date_base_index;
740
+ const t45 = _.omit(rest, ["initialRef", "finalRef"]);
741
+ const t46 = props?.finalRef;
742
+ let t47;
743
+ if ($[148] !== t46) {
744
+ t47 = mergeRefs(finalInputRef, t46);
745
+ $[148] = t46;
746
+ $[149] = t47;
704
747
  } else {
705
- t44 = $[144];
748
+ t47 = $[149];
706
749
  }
707
- const t45 = inputs2_date_base_index;
708
- const t46 = _.omit(rest, ["initialRef", "finalRef"]);
709
- const t47 = props?.finalRef;
710
- let t48;
711
- if ($[145] !== t47) {
712
- t48 = mergeRefs(finalInputRef, t47);
713
- $[145] = t47;
714
- $[146] = t48;
750
+ const t48 = !readOnly && !skeletonize ? 0 : -1;
751
+ let t49;
752
+ if ($[150] !== handleOnBlurMaskInput) {
753
+ t49 = (event_6) => handleOnBlurMaskInput(event_6, "final");
754
+ $[150] = handleOnBlurMaskInput;
755
+ $[151] = t49;
715
756
  } else {
716
- t48 = $[146];
757
+ t49 = $[151];
717
758
  }
718
- const t49 = !readOnly && !skeletonize ? 0 : -1;
719
759
  let t50;
720
- if ($[147] !== handleOnBlurMaskInput) {
721
- t50 = (event_6) => handleOnBlurMaskInput(event_6, "final");
722
- $[147] = handleOnBlurMaskInput;
723
- $[148] = t50;
760
+ if ($[152] !== handleOnFocusMaskInput) {
761
+ t50 = (event_7) => handleOnFocusMaskInput(event_7, "final");
762
+ $[152] = handleOnFocusMaskInput;
763
+ $[153] = t50;
724
764
  } else {
725
- t50 = $[148];
765
+ t50 = $[153];
726
766
  }
727
767
  let t51;
728
- if ($[149] !== handleOnFocusMaskInput) {
729
- t51 = (event_7) => handleOnFocusMaskInput(event_7, "final");
730
- $[149] = handleOnFocusMaskInput;
731
- $[150] = t51;
768
+ if ($[154] !== handleOnKeyDownMaskInput) {
769
+ t51 = (event_8) => handleOnKeyDownMaskInput(event_8, "final");
770
+ $[154] = handleOnKeyDownMaskInput;
771
+ $[155] = t51;
732
772
  } else {
733
- t51 = $[150];
773
+ t51 = $[155];
734
774
  }
735
775
  let t52;
736
- if ($[151] !== handleOnKeyDownMaskInput) {
737
- t52 = (event_8) => handleOnKeyDownMaskInput(event_8, "final");
738
- $[151] = handleOnKeyDownMaskInput;
739
- $[152] = t52;
776
+ if ($[156] !== activeDescendant || $[157] !== calendarBoxOpen || $[158] !== customClass || $[159] !== disabled || $[160] !== finalInputName || $[161] !== finalMaskedValue || $[162] !== handleFinalKeyDownCapture || $[163] !== handleOnBeforeInput || $[164] !== handleOnPaste || $[165] !== hasValidationErrors || $[166] !== inputPlaceholder || $[167] !== readOnly || $[168] !== skeletonize || $[169] !== t44.Input || $[170] !== t45 || $[171] !== t47 || $[172] !== t48 || $[173] !== t49 || $[174] !== t50 || $[175] !== t51 || $[176] !== textAlign || $[177] !== undigitable) {
777
+ t52 = /* @__PURE__ */ jsx(t44.Input, { ...t45, ref: t47, id: finalInputName, name: finalInputName, value: finalMaskedValue, readOnly, disabled, customClass, tabIndex: t48, placeholder: inputPlaceholder, "aria-autocomplete": "list", "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": finalInputName, "aria-labelledby": finalInputName, "data-testid": "test-date-period-field-final-input", "data-state-is-period-input": true, "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onPaste: handleOnPaste, onBeforeInput: handleOnBeforeInput, onBlur: t49, onFocus: t50, onKeyDown: t51, onKeyDownCapture: handleFinalKeyDownCapture });
778
+ $[156] = activeDescendant;
779
+ $[157] = calendarBoxOpen;
780
+ $[158] = customClass;
781
+ $[159] = disabled;
782
+ $[160] = finalInputName;
783
+ $[161] = finalMaskedValue;
784
+ $[162] = handleFinalKeyDownCapture;
785
+ $[163] = handleOnBeforeInput;
786
+ $[164] = handleOnPaste;
787
+ $[165] = hasValidationErrors;
788
+ $[166] = inputPlaceholder;
789
+ $[167] = readOnly;
790
+ $[168] = skeletonize;
791
+ $[169] = t44.Input;
792
+ $[170] = t45;
793
+ $[171] = t47;
794
+ $[172] = t48;
795
+ $[173] = t49;
796
+ $[174] = t50;
797
+ $[175] = t51;
798
+ $[176] = textAlign;
799
+ $[177] = undigitable;
800
+ $[178] = t52;
740
801
  } else {
741
- t52 = $[152];
802
+ t52 = $[178];
742
803
  }
743
804
  let t53;
744
- if ($[153] !== activeDescendant || $[154] !== calendarBoxOpen || $[155] !== customClass || $[156] !== disabled || $[157] !== finalInputName || $[158] !== finalMaskedValue || $[159] !== handleOnBeforeInput || $[160] !== handleOnPaste || $[161] !== hasValidationErrors || $[162] !== inputPlaceholder || $[163] !== readOnly || $[164] !== skeletonize || $[165] !== t45.Input || $[166] !== t46 || $[167] !== t48 || $[168] !== t49 || $[169] !== t50 || $[170] !== t51 || $[171] !== t52 || $[172] !== textAlign || $[173] !== undigitable) {
745
- t53 = /* @__PURE__ */ jsx(t45.Input, { ...t46, ref: t48, id: finalInputName, name: finalInputName, value: finalMaskedValue, readOnly, disabled, customClass, tabIndex: t49, placeholder: inputPlaceholder, "aria-autocomplete": "list", "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": finalInputName, "aria-labelledby": finalInputName, "data-testid": "test-date-period-field-final-input", "data-state-is-period-input": true, "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onPaste: handleOnPaste, onBeforeInput: handleOnBeforeInput, onBlur: t50, onFocus: t51, onKeyDown: t52 });
746
- $[153] = activeDescendant;
747
- $[154] = calendarBoxOpen;
748
- $[155] = customClass;
749
- $[156] = disabled;
750
- $[157] = finalInputName;
751
- $[158] = finalMaskedValue;
752
- $[159] = handleOnBeforeInput;
753
- $[160] = handleOnPaste;
754
- $[161] = hasValidationErrors;
755
- $[162] = inputPlaceholder;
756
- $[163] = readOnly;
757
- $[164] = skeletonize;
758
- $[165] = t45.Input;
759
- $[166] = t46;
760
- $[167] = t48;
761
- $[168] = t49;
762
- $[169] = t50;
763
- $[170] = t51;
764
- $[171] = t52;
765
- $[172] = textAlign;
766
- $[173] = undigitable;
767
- $[174] = t53;
805
+ if ($[179] === Symbol.for("react.memo_cache_sentinel")) {
806
+ t53 = /* @__PURE__ */ jsx(Triggers, {});
807
+ $[179] = t53;
768
808
  } else {
769
- t53 = $[174];
809
+ t53 = $[179];
770
810
  }
771
811
  let t54;
772
- if ($[175] === Symbol.for("react.memo_cache_sentinel")) {
773
- t54 = /* @__PURE__ */ jsx(Triggers, {});
774
- $[175] = t54;
812
+ if ($[180] !== activeDescendant || $[181] !== activeSelectedDate || $[182] !== calendarBoxOpen || $[183] !== calendarDisplayDate || $[184] !== calendarRef || $[185] !== dateContainerRef || $[186] !== getDayState || $[187] !== handleNextMonth || $[188] !== handlePreviousMonth || $[189] !== handleSelectDay || $[190] !== handleSelectTime || $[191] !== initialInputName || $[192] !== isDateTime || $[193] !== maxDate || $[194] !== minDate) {
813
+ t54 = calendarBoxOpen && createPortal(/* @__PURE__ */ jsx(CalendarBox, { ref: calendarRef, testIdPrefix: "test-date-period-field", headerId: initialInputName, calendarBoxOpen, activeDescendant, calendarDisplayDate, containerRef: dateContainerRef, onNextMonth: handleNextMonth, onPreviousMonth: handlePreviousMonth, getDayState, onSelectDay: handleSelectDay, children: isDateTime && /* @__PURE__ */ jsx(TimeSelector, { value: activeSelectedDate, onSelectTime: handleSelectTime, min: minDate, max: maxDate, testIdPrefix: "test-date-period-field" }) }), document.body);
814
+ $[180] = activeDescendant;
815
+ $[181] = activeSelectedDate;
816
+ $[182] = calendarBoxOpen;
817
+ $[183] = calendarDisplayDate;
818
+ $[184] = calendarRef;
819
+ $[185] = dateContainerRef;
820
+ $[186] = getDayState;
821
+ $[187] = handleNextMonth;
822
+ $[188] = handlePreviousMonth;
823
+ $[189] = handleSelectDay;
824
+ $[190] = handleSelectTime;
825
+ $[191] = initialInputName;
826
+ $[192] = isDateTime;
827
+ $[193] = maxDate;
828
+ $[194] = minDate;
829
+ $[195] = t54;
775
830
  } else {
776
- t54 = $[175];
831
+ t54 = $[195];
777
832
  }
778
833
  let t55;
779
- if ($[176] !== activeDescendant || $[177] !== activeSelectedDate || $[178] !== calendarBoxOpen || $[179] !== calendarDisplayDate || $[180] !== calendarRef || $[181] !== dateContainerRef || $[182] !== getDayState || $[183] !== handleNextMonth || $[184] !== handlePreviousMonth || $[185] !== handleSelectDay || $[186] !== handleSelectTime || $[187] !== initialInputName || $[188] !== isDateTime || $[189] !== maxDate || $[190] !== minDate) {
780
- t55 = calendarBoxOpen && createPortal(/* @__PURE__ */ jsx(CalendarBox, { ref: calendarRef, testIdPrefix: "test-date-period-field", headerId: initialInputName, calendarBoxOpen, activeDescendant, calendarDisplayDate, containerRef: dateContainerRef, onNextMonth: handleNextMonth, onPreviousMonth: handlePreviousMonth, getDayState, onSelectDay: handleSelectDay, children: isDateTime && /* @__PURE__ */ jsx(TimeSelector, { value: activeSelectedDate, onSelectTime: handleSelectTime, min: minDate, max: maxDate, testIdPrefix: "test-date-period-field" }) }), document.body);
781
- $[176] = activeDescendant;
782
- $[177] = activeSelectedDate;
783
- $[178] = calendarBoxOpen;
784
- $[179] = calendarDisplayDate;
785
- $[180] = calendarRef;
786
- $[181] = dateContainerRef;
787
- $[182] = getDayState;
788
- $[183] = handleNextMonth;
789
- $[184] = handlePreviousMonth;
790
- $[185] = handleSelectDay;
791
- $[186] = handleSelectTime;
792
- $[187] = initialInputName;
793
- $[188] = isDateTime;
794
- $[189] = maxDate;
795
- $[190] = minDate;
796
- $[191] = t55;
834
+ if ($[196] !== disabled || $[197] !== hasHintMessages || $[198] !== hintPosition || $[199] !== props.hint || $[200] !== skeletonize) {
835
+ t55 = hintPosition === "below" && /* @__PURE__ */ jsx(Hint, { customClass: "hint", description: props.hint, disabled, skeletonize, visible: hasHintMessages });
836
+ $[196] = disabled;
837
+ $[197] = hasHintMessages;
838
+ $[198] = hintPosition;
839
+ $[199] = props.hint;
840
+ $[200] = skeletonize;
841
+ $[201] = t55;
797
842
  } else {
798
- t55 = $[191];
843
+ t55 = $[201];
799
844
  }
800
845
  let t56;
801
- if ($[192] !== disabled || $[193] !== hasHintMessages || $[194] !== hintPosition || $[195] !== props.hint || $[196] !== skeletonize) {
802
- t56 = hintPosition === "below" && /* @__PURE__ */ jsx(Hint, { customClass: "hint", description: props.hint, disabled, skeletonize, visible: hasHintMessages });
803
- $[192] = disabled;
804
- $[193] = hasHintMessages;
805
- $[194] = hintPosition;
806
- $[195] = props.hint;
807
- $[196] = skeletonize;
808
- $[197] = t56;
846
+ if ($[202] !== errors || $[203] !== hasValidationErrors || $[204] !== label || $[205] !== skeletonize) {
847
+ t56 = hasValidationErrors && /* @__PURE__ */ jsx("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": skeletonize, "aria-describedby": String(label).concat("-errors"), children: errors?.map(_temp3) });
848
+ $[202] = errors;
849
+ $[203] = hasValidationErrors;
850
+ $[204] = label;
851
+ $[205] = skeletonize;
852
+ $[206] = t56;
809
853
  } else {
810
- t56 = $[197];
854
+ t56 = $[206];
811
855
  }
812
856
  let t57;
813
- if ($[198] !== errors || $[199] !== hasValidationErrors || $[200] !== label || $[201] !== skeletonize) {
814
- t57 = hasValidationErrors && /* @__PURE__ */ jsx("span", { "data-testid": "test-date-period-field-list-errors", className: "error", "data-state-skeletonize": skeletonize, "aria-describedby": String(label).concat("-errors"), children: errors?.map(_temp4) });
815
- $[198] = errors;
816
- $[199] = hasValidationErrors;
817
- $[200] = label;
818
- $[201] = skeletonize;
819
- $[202] = t57;
857
+ if ($[207] !== tooltip || $[208] !== tooltipPosition || $[209] !== tooltipWidth) {
858
+ t57 = /* @__PURE__ */ jsx(Tooltip, { targetRef: inputRootRef, text: tooltip, width: tooltipWidth, position: tooltipPosition });
859
+ $[207] = tooltip;
860
+ $[208] = tooltipPosition;
861
+ $[209] = tooltipWidth;
862
+ $[210] = t57;
820
863
  } else {
821
- t57 = $[202];
822
- }
823
- let t58;
824
- if ($[203] !== tooltip || $[204] !== tooltipPosition || $[205] !== tooltipWidth) {
825
- t58 = /* @__PURE__ */ jsx(Tooltip, { targetRef: inputRootRef, text: tooltip, width: tooltipWidth, position: tooltipPosition });
826
- $[203] = tooltip;
827
- $[204] = tooltipPosition;
828
- $[205] = tooltipWidth;
829
- $[206] = t58;
830
- } else {
831
- t58 = $[206];
864
+ t57 = $[210];
832
865
  }
833
866
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
834
867
  /* @__PURE__ */ jsx(DatePeriodFieldContext.Provider, { value: contextValues, children: /* @__PURE__ */ jsxs(Root, { ref: inputRootRef, "data-testid": "test-date-period-field-root", "data-state-error": hasValidationErrors, customClassWrapper, children: [
835
- t36,
868
+ t35,
836
869
  /* @__PURE__ */ jsxs(Container, { ref: dateContainerRef, "data-testid": "test-date-period-field-container", onKeyDown: handleKeyDownNavigation, skeletonize, customClassInputContainer, children: [
837
- /* @__PURE__ */ jsx(Input, { ...t37, ref: t39, id: initialInputName, name: initialInputName, value: initialMaskedValue, disabled, readOnly, customClass, tabIndex: !readOnly && !skeletonize ? 0 : -1, placeholder: inputPlaceholder, "aria-autocomplete": "list", "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": initialInputName, "aria-labelledby": initialInputName, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": true, "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onPaste: handleOnPaste, onBeforeInput: handleOnBeforeInput, onBlur: t40, onFocus: t41, onKeyDown: t42 }),
838
- t44,
839
- t53,
840
- t54
870
+ /* @__PURE__ */ jsx(Input, { ...t36, ref: t38, id: initialInputName, name: initialInputName, value: initialMaskedValue, disabled, readOnly, customClass, tabIndex: !readOnly && !skeletonize ? 0 : -1, placeholder: inputPlaceholder, "aria-autocomplete": "list", "aria-activedescendant": activeDescendant, "aria-expanded": calendarBoxOpen, "aria-controls": initialInputName, "aria-labelledby": initialInputName, "data-testid": "test-date-period-field-initial-input", "data-state-is-period-input": true, "data-state-error": hasValidationErrors, "data-state-read-only": readOnly, "data-state-text-align": textAlign, "data-state-undigitable": undigitable, "data-state-skeletonize": skeletonize, onPaste: handleOnPaste, onBeforeInput: handleOnBeforeInput, onBlur: t39, onFocus: t40, onKeyDown: t41, onKeyDownCapture: handleInitialKeyDownCapture }),
871
+ t43,
872
+ t52,
873
+ t53
841
874
  ] }),
875
+ t54,
842
876
  t55,
843
- t56,
844
- t57
877
+ t56
845
878
  ] }) }),
846
- t58
879
+ t57
847
880
  ] });
848
881
  });
849
882
  InputBase.displayName = "DatePeriodFieldInputBase";
@@ -853,18 +886,10 @@ function _temp() {
853
886
  final: null
854
887
  };
855
888
  }
856
- function _temp2(initialDate, finalDate) {
857
- const inicial = initialDate?.isAfter(finalDate) ? finalDate : initialDate;
858
- const final = initialDate?.isAfter(finalDate) ? initialDate : finalDate;
859
- return {
860
- inicial,
861
- final
862
- };
863
- }
864
- function _temp3(event_5) {
889
+ function _temp2(event_5) {
865
890
  event_5.preventDefault();
866
891
  }
867
- function _temp4(error, index) {
892
+ function _temp3(error, index) {
868
893
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
869
894
  error,
870
895
  " "