@povio/ui 6.0.0-rc.2 → 6.0.0-rc.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.
- package/dist/{Autocomplete.bound-e5WbxlBm.js → Autocomplete.bound-DTKSW9Sb.js} +1 -1
- package/dist/{Calendar-ChmIflXX.js → Calendar-u-UcoZhB.js} +6 -156
- package/dist/Calendar.lazy-B9YqgHbn.js +131 -0
- package/dist/{DatePicker-Bc_E4UZ1.js → DatePicker-BaLQOOJJ.js} +7 -5
- package/dist/{DatePicker.bound-CtBL5w-8.js → DatePicker.bound-NquZAtFK.js} +1 -1
- package/dist/{DatePickerInput-TND0rEMc.js → DatePickerInput-B0e_huQt.js} +6 -250
- package/dist/{DateRangePicker-BNMTOQ2N.js → DateRangePicker-4CrjSCAx.js} +25 -287
- package/dist/{DateRangePicker.bound-GeRw9Iuj.js → DateRangePicker.bound-D530tUJL.js} +1 -1
- package/dist/{DateTimePicker-B3YjV4uj.js → DateTimePicker-CtU096IU.js} +7 -5
- package/dist/{DateTimePicker.bound-ByjHsAnf.js → DateTimePicker.bound-BJzw56_u.js} +1 -1
- package/dist/{Input.bound-CnqI-L-b.js → Input.bound-DCTT5J62.js} +1 -1
- package/dist/{NumberField.bound-DiDYEZM4.js → NumberField.bound-CQcKgZ--.js} +1 -1
- package/dist/{NumberRangeInput.bound-B0e7yUDI.js → NumberRangeInput.bound-D-Lj5_KL.js} +1 -1
- package/dist/{PasswordInput.bound-Bj3WO1zC.js → PasswordInput.bound-WJ_VYQpn.js} +1 -1
- package/dist/RangeCalendar-CXLwzK5Z.js +291 -0
- package/dist/{RichTextEditor-qoxzWBFP.js → RichTextEditor-DDGSNZyF.js} +3 -3
- package/dist/{Select-BAlYMh4h.js → Select-DbZOJ-0u.js} +33 -360
- package/dist/{Select.bound-CQPG2sWV.js → Select.bound-B9c9mP8o.js} +1 -1
- package/dist/SelectListBox-CFOH3brT.js +362 -0
- package/dist/{TimePicker-CmBGkxDC.js → TimePicker-BjWuzBv_.js} +4 -3
- package/dist/{TimePicker.bound-3i1DJgrU.js → TimePicker.bound-DBovZwLJ.js} +1 -1
- package/dist/{datePickerValue.utils-BxHR_BQZ.js → TimePickerForm-BReCXELG.js} +2 -5
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/password-input.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/style-definitions.js +3 -3
- package/dist/components/time-picker.js +1 -1
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/import-DflE4Gl2.js +251 -0
- package/dist/index.js +20 -20
- package/dist/rich-text-editor.js +1 -1
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack.js +20 -20
- package/dist/useScrollableListBox-BfCLMZgv.js +47 -0
- package/package.json +1 -1
- package/dist/{Autocomplete-DSwAc7jF.js → Autocomplete-DuCidYx5.js} +1 -1
- package/dist/{Input-BdCci6BF.js → Input-CPPDOg7b.js} +1 -1
- package/dist/{NumberField-BLAwsjns.js → NumberField-BbeePjH2.js} +1 -1
- package/dist/{NumberRangeInput-al32ZeSy.js → NumberRangeInput-Cpqrom84.js} +1 -1
- package/dist/{staticDateTimeSegments-CA_lwN-O.js → staticDateTimeSegments-FE-F61iH.js} +2 -2
- package/dist/{useTableColumnConfig-DoTYVxqG.js → useTableColumnConfig-CGtkUBG8.js} +2 -2
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
import { t as UIConfig } from "./uiConfig.context-dxsO9puE.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { r as ChevronLeft } from "./Tooltip-CqbyoJhl.js";
|
|
4
|
-
import { t as ChevronRight } from "./chevron-right-3nKJR5Bb.js";
|
|
5
|
-
import { n as ChevronsLeft, t as ChevronsRight } from "./chevrons-right-DJPPn2fD.js";
|
|
6
|
-
import { t as Select } from "./Select-BAlYMh4h.js";
|
|
7
|
-
import { a as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, c as $dd602d3c757202f2$export$a1d3911297b952d7, i as CalendarGrid, l as $dd602d3c757202f2$export$eac50920cf2fd59a, n as renderDatePickerTodayIcon, o as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, r as $1697a7ad3db7b79f$re_export$useDateFormatter, s as $dd602d3c757202f2$export$4f5203c0d889109e, t as DatePickerInput, u as $dd602d3c757202f2$export$f4a51ff076cc9a09 } from "./DatePickerInput-TND0rEMc.js";
|
|
2
|
+
import { a as $dd602d3c757202f2$export$4f5203c0d889109e, c as $dd602d3c757202f2$export$f4a51ff076cc9a09, i as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, n as renderDatePickerTodayIcon, o as $dd602d3c757202f2$export$a1d3911297b952d7, r as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, s as $dd602d3c757202f2$export$eac50920cf2fd59a, t as DatePickerInput } from "./DatePickerInput-B0e_huQt.js";
|
|
8
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
9
4
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
10
5
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-C1YB5dOw.js";
|
|
11
6
|
import { t as Switch } from "./Switch-Ck_zSDuw.js";
|
|
12
7
|
import { t as Typography } from "./Typography-Ba5l4rmj.js";
|
|
13
|
-
import {
|
|
14
|
-
import { BadgeButton } from "./components/badge-button.js";
|
|
8
|
+
import { t as Spinner } from "./Spinner-CFj5Iu77.js";
|
|
15
9
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
16
10
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
17
11
|
import { t as FormField } from "./FormField-DyqEbqx3.js";
|
|
18
12
|
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CuU1VIh1.js";
|
|
19
13
|
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-DYarfm5F.js";
|
|
20
|
-
import { f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog } from "./staticDateTimeSegments-
|
|
21
|
-
import "./i18n-BjNKHh_D.js";
|
|
22
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
14
|
+
import { f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog } from "./staticDateTimeSegments-FE-F61iH.js";
|
|
23
15
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
24
16
|
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva--gCeAsRx.js";
|
|
17
|
+
import "./i18n-BjNKHh_D.js";
|
|
25
18
|
import { t as TooltipWrapper } from "./TooltipWrapper-BrftXInI.js";
|
|
19
|
+
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
26
20
|
import { InputFrame } from "./components/input-frame.js";
|
|
27
|
-
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
21
|
+
import { Suspense, lazy, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
28
22
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
23
|
import { DateFormatter, GregorianCalendar, createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
30
24
|
import { useDateRangePicker, useLocale } from "react-aria";
|
|
31
|
-
import { useRangeCalendar } from "@react-aria/calendar";
|
|
32
25
|
import { useTranslation } from "react-i18next";
|
|
33
26
|
//#region ../../node_modules/.bun/react-stately@3.51.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/calendar/useRangeCalendarState.mjs
|
|
34
27
|
function $a0a87fb6fcfb22ec$export$9a987164d97ecc90(props) {
|
|
@@ -374,281 +367,24 @@ function $6de3e3f1a7663217$var$isCompleteRange(value) {
|
|
|
374
367
|
return value?.start != null && value.end != null;
|
|
375
368
|
}
|
|
376
369
|
//#endregion
|
|
377
|
-
//#region src/components/inputs/DateTime/shared/
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
const formatter = $1697a7ad3db7b79f$re_export$useDateFormatter({
|
|
384
|
-
month: "long",
|
|
385
|
-
timeZone: state.timeZone
|
|
386
|
-
});
|
|
387
|
-
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
388
|
-
const MONTHS = useMemo(() => {
|
|
389
|
-
const months = [];
|
|
390
|
-
for (let i = 1; i <= numMonths; i++) {
|
|
391
|
-
const date = state.focusedDate.set({ month: i });
|
|
392
|
-
months.push(formatter.format(date.toDate(state.timeZone)));
|
|
393
|
-
}
|
|
394
|
-
return months;
|
|
395
|
-
}, [
|
|
396
|
-
formatter,
|
|
397
|
-
numMonths,
|
|
398
|
-
state.focusedDate,
|
|
399
|
-
state.timeZone
|
|
400
|
-
]);
|
|
401
|
-
const years = Array.from({ length: 201 }, (_, i) => currentYear - 100 + i);
|
|
402
|
-
const getAvailableMonths = () => {
|
|
403
|
-
return MONTHS.map((month, i) => {
|
|
404
|
-
const monthDate = displayDate.set({ month: i + 1 });
|
|
405
|
-
let isDisabled = false;
|
|
406
|
-
if (maxDate) isDisabled = monthDate.year > maxDate.year || monthDate.year === maxDate.year && monthDate.month >= maxDate.month;
|
|
407
|
-
if (minDate) isDisabled = monthDate.year < minDate.year || monthDate.year === minDate.year && monthDate.month <= minDate.month;
|
|
408
|
-
return {
|
|
409
|
-
month,
|
|
410
|
-
value: i,
|
|
411
|
-
isDisabled
|
|
412
|
-
};
|
|
413
|
-
});
|
|
414
|
-
};
|
|
415
|
-
const getAvailableYears = () => {
|
|
416
|
-
return years.map((year) => {
|
|
417
|
-
let isDisabled = false;
|
|
418
|
-
if (maxDate) isDisabled = year > maxDate.year || year === maxDate.year && displayDate.month >= maxDate.month;
|
|
419
|
-
if (minDate && !isDisabled) isDisabled = year < minDate.year || year === minDate.year && displayDate.month <= minDate.month;
|
|
420
|
-
return {
|
|
421
|
-
year,
|
|
422
|
-
isDisabled
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
};
|
|
426
|
-
const availableMonths = getAvailableMonths();
|
|
427
|
-
const availableYears = getAvailableYears();
|
|
428
|
-
const handleMonthChange = (value) => {
|
|
429
|
-
if (value === null) return;
|
|
430
|
-
const newDate = displayDate.set({ month: value + 1 });
|
|
431
|
-
onNavigate?.(newDate);
|
|
432
|
-
};
|
|
433
|
-
const handleYearChange = (value) => {
|
|
434
|
-
if (value === null) return;
|
|
435
|
-
const newDate = displayDate.set({ year: value });
|
|
436
|
-
onNavigate?.(newDate);
|
|
437
|
-
};
|
|
438
|
-
const handlePrevMonth = (e) => {
|
|
439
|
-
e.preventDefault();
|
|
440
|
-
e.stopPropagation();
|
|
441
|
-
const newDate = displayDate.subtract({ months: 1 });
|
|
442
|
-
onNavigate?.(newDate);
|
|
443
|
-
};
|
|
444
|
-
const handleNextMonth = (e) => {
|
|
445
|
-
e.preventDefault();
|
|
446
|
-
e.stopPropagation();
|
|
447
|
-
const newDate = displayDate.add({ months: 1 });
|
|
448
|
-
onNavigate?.(newDate);
|
|
449
|
-
};
|
|
450
|
-
const handlePrevYear = (e) => {
|
|
451
|
-
e.preventDefault();
|
|
452
|
-
e.stopPropagation();
|
|
453
|
-
const newDate = displayDate.subtract({ years: 1 });
|
|
454
|
-
onNavigate?.(newDate);
|
|
455
|
-
};
|
|
456
|
-
const handleNextYear = (e) => {
|
|
457
|
-
e.preventDefault();
|
|
458
|
-
e.stopPropagation();
|
|
459
|
-
const newDate = displayDate.add({ years: 1 });
|
|
460
|
-
onNavigate?.(newDate);
|
|
461
|
-
};
|
|
462
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
463
|
-
className: "flex w-full items-center justify-between gap-3 p-3",
|
|
464
|
-
children: [
|
|
465
|
-
/* @__PURE__ */ jsxs("div", {
|
|
466
|
-
className: "flex items-center",
|
|
467
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
468
|
-
color: "secondary",
|
|
469
|
-
isDisabled: isPrevYearDisabled,
|
|
470
|
-
onClick: handlePrevYear,
|
|
471
|
-
icon: ChevronsLeft,
|
|
472
|
-
label: t(($) => $.ui.datePicker.navigation.previousYear),
|
|
473
|
-
variant: "text",
|
|
474
|
-
width: "hug",
|
|
475
|
-
disableTooltip: true,
|
|
476
|
-
size: "sm"
|
|
477
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
478
|
-
color: "secondary",
|
|
479
|
-
isDisabled: isPrevMonthDisabled,
|
|
480
|
-
onClick: handlePrevMonth,
|
|
481
|
-
icon: ChevronLeft,
|
|
482
|
-
label: t(($) => $.ui.datePicker.navigation.previousMonth),
|
|
483
|
-
variant: "text",
|
|
484
|
-
width: "hug",
|
|
485
|
-
disableTooltip: true,
|
|
486
|
-
size: "sm"
|
|
487
|
-
})]
|
|
488
|
-
}),
|
|
489
|
-
/* @__PURE__ */ jsxs("div", {
|
|
490
|
-
className: "flex gap-2",
|
|
491
|
-
children: [/* @__PURE__ */ jsx(Select, {
|
|
492
|
-
label: "Month",
|
|
493
|
-
hideLabel: true,
|
|
494
|
-
customTrigger: /* @__PURE__ */ jsx(BadgeButton, {
|
|
495
|
-
color: "secondary",
|
|
496
|
-
variant: "subtle",
|
|
497
|
-
iconPosition: "right",
|
|
498
|
-
icon: ChevronDown,
|
|
499
|
-
children: MONTHS[currentMonth].slice(0, 3)
|
|
500
|
-
}),
|
|
501
|
-
ignoreTriggerWidth: true,
|
|
502
|
-
items: availableMonths.map(({ month, value, isDisabled }) => ({
|
|
503
|
-
label: month,
|
|
504
|
-
id: value,
|
|
505
|
-
isDisabled
|
|
506
|
-
})).filter(({ isDisabled }) => !isDisabled),
|
|
507
|
-
value: currentMonth,
|
|
508
|
-
onChange: handleMonthChange
|
|
509
|
-
}), /* @__PURE__ */ jsx(Select, {
|
|
510
|
-
label: "Year",
|
|
511
|
-
hideLabel: true,
|
|
512
|
-
customTrigger: /* @__PURE__ */ jsx(BadgeButton, {
|
|
513
|
-
color: "secondary",
|
|
514
|
-
variant: "subtle",
|
|
515
|
-
iconPosition: "right",
|
|
516
|
-
icon: ChevronDown,
|
|
517
|
-
children: currentYear.toString()
|
|
518
|
-
}),
|
|
519
|
-
items: availableYears.map(({ year, isDisabled }) => ({
|
|
520
|
-
label: year.toString(),
|
|
521
|
-
id: year,
|
|
522
|
-
isDisabled
|
|
523
|
-
})).filter(({ isDisabled }) => !isDisabled),
|
|
524
|
-
value: currentYear,
|
|
525
|
-
onChange: handleYearChange
|
|
526
|
-
})]
|
|
527
|
-
}),
|
|
528
|
-
/* @__PURE__ */ jsxs("div", {
|
|
529
|
-
className: "flex items-center",
|
|
530
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
531
|
-
color: "secondary",
|
|
532
|
-
isDisabled: isNextMonthDisabled,
|
|
533
|
-
onClick: handleNextMonth,
|
|
534
|
-
icon: ChevronRight,
|
|
535
|
-
label: t(($) => $.ui.datePicker.navigation.nextMonth),
|
|
536
|
-
variant: "text",
|
|
537
|
-
width: "hug",
|
|
538
|
-
disableTooltip: true,
|
|
539
|
-
size: "sm"
|
|
540
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
541
|
-
color: "secondary",
|
|
542
|
-
isDisabled: isNextYearDisabled,
|
|
543
|
-
onClick: handleNextYear,
|
|
544
|
-
icon: ChevronsRight,
|
|
545
|
-
label: t(($) => $.ui.datePicker.navigation.nextYear),
|
|
546
|
-
variant: "text",
|
|
547
|
-
width: "hug",
|
|
548
|
-
disableTooltip: true,
|
|
549
|
-
size: "sm"
|
|
550
|
-
})]
|
|
551
|
-
})
|
|
552
|
-
]
|
|
553
|
-
});
|
|
554
|
-
};
|
|
555
|
-
//#endregion
|
|
556
|
-
//#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
|
|
557
|
-
const RangeCalendar = ({ showWeekNumbers, className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, isRangeSelectionDisabled }) => {
|
|
558
|
-
const leftRef = useRef(null);
|
|
559
|
-
const rightRef = useRef(null);
|
|
560
|
-
const { calendarProps: leftCalendarAriaProps } = useRangeCalendar(calendarProps, leftCalendarState, leftRef);
|
|
561
|
-
const { calendarProps: rightCalendarAriaProps } = useRangeCalendar(calendarProps, rightCalendarState, rightRef);
|
|
562
|
-
const leftDate = leftCalendarState.visibleRange.start;
|
|
563
|
-
const rightDate = rightCalendarState.visibleRange.start;
|
|
564
|
-
const handleLeftKeyboardNavigation = (event, date) => {
|
|
565
|
-
return onKeyboardNavigation?.(event, date, "left") ?? false;
|
|
566
|
-
};
|
|
567
|
-
const handleRightKeyboardNavigation = (event, date) => {
|
|
568
|
-
return onKeyboardNavigation?.(event, date, "right") ?? false;
|
|
569
|
-
};
|
|
570
|
-
const handleLeftNavigate = (newDate) => {
|
|
571
|
-
const rightCurrentDate = rightCalendarState.visibleRange.start;
|
|
572
|
-
if (newDate.year < rightCurrentDate.year || newDate.year === rightCurrentDate.year && newDate.month < rightCurrentDate.month) leftCalendarState.setFocusedDate(newDate);
|
|
573
|
-
else {
|
|
574
|
-
const closestValidDate = rightCurrentDate.subtract({ months: 1 });
|
|
575
|
-
leftCalendarState.setFocusedDate(closestValidDate);
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
const handleRightNavigate = (newDate) => {
|
|
579
|
-
const leftCurrentDate = leftCalendarState.visibleRange.start;
|
|
580
|
-
if (newDate.year > leftCurrentDate.year || newDate.year === leftCurrentDate.year && newDate.month > leftCurrentDate.month) rightCalendarState.setFocusedDate(newDate);
|
|
581
|
-
else {
|
|
582
|
-
const closestValidDate = leftCurrentDate.add({ months: 1 });
|
|
583
|
-
rightCalendarState.setFocusedDate(closestValidDate);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
const isNextDisabled = useMemo(() => {
|
|
587
|
-
const leftNextDate = leftDate.add({ months: 1 });
|
|
588
|
-
return leftNextDate.year > rightDate.year || leftNextDate.year === rightDate.year && leftNextDate.month === rightDate.month;
|
|
589
|
-
}, [leftDate, rightDate]);
|
|
590
|
-
const isPrevDisabled = useMemo(() => {
|
|
591
|
-
const rightPrevDate = rightDate.subtract({ months: 1 });
|
|
592
|
-
return rightPrevDate.year < leftDate.year || rightPrevDate.year === leftDate.year && rightPrevDate.month === leftDate.month;
|
|
593
|
-
}, [leftDate, rightDate]);
|
|
594
|
-
return /* @__PURE__ */ jsx("div", {
|
|
595
|
-
className: clsx("flex flex-col items-center bg-popover text-popover-foreground", showWeekNumbers ? "w-full max-w-[336px] md:w-fit md:max-w-none" : "w-fit", className),
|
|
596
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
597
|
-
className: clsx("flex", showWeekNumbers && "w-full"),
|
|
598
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
599
|
-
...leftCalendarAriaProps,
|
|
600
|
-
ref: leftRef,
|
|
601
|
-
className: clsx("flex flex-col items-center", showWeekNumbers && "w-full"),
|
|
602
|
-
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
603
|
-
state: leftCalendarState,
|
|
604
|
-
isNextMonthDisabled: isNextDisabled,
|
|
605
|
-
isNextYearDisabled: isNextDisabled,
|
|
606
|
-
onNavigate: handleLeftNavigate,
|
|
607
|
-
maxDate: rightDate
|
|
608
|
-
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
609
|
-
showWeekNumbers,
|
|
610
|
-
firstDayOfWeek: calendarProps.firstDayOfWeek,
|
|
611
|
-
state: leftCalendarState,
|
|
612
|
-
onApply,
|
|
613
|
-
shouldCloseOnSelect: false,
|
|
614
|
-
onDateSelection,
|
|
615
|
-
rangeSelection,
|
|
616
|
-
onDateHover,
|
|
617
|
-
hoverDate,
|
|
618
|
-
onKeyboardNavigation: handleLeftKeyboardNavigation,
|
|
619
|
-
className: clsx("h-64", showWeekNumbers ? "w-full md:w-[336px]!" : "w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
620
|
-
calendarSide: "left",
|
|
621
|
-
isSelectionDisabled: isRangeSelectionDisabled
|
|
622
|
-
})]
|
|
623
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
624
|
-
...rightCalendarAriaProps,
|
|
625
|
-
ref: rightRef,
|
|
626
|
-
className: "hidden flex-col items-center md:flex",
|
|
627
|
-
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
628
|
-
state: rightCalendarState,
|
|
629
|
-
isPrevMonthDisabled: isPrevDisabled,
|
|
630
|
-
isPrevYearDisabled: isPrevDisabled,
|
|
631
|
-
onNavigate: handleRightNavigate,
|
|
632
|
-
minDate: leftDate
|
|
633
|
-
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
634
|
-
showWeekNumbers,
|
|
635
|
-
firstDayOfWeek: calendarProps.firstDayOfWeek,
|
|
636
|
-
state: rightCalendarState,
|
|
637
|
-
onApply,
|
|
638
|
-
shouldCloseOnSelect: false,
|
|
639
|
-
onDateSelection,
|
|
640
|
-
rangeSelection,
|
|
641
|
-
onDateHover,
|
|
642
|
-
hoverDate,
|
|
643
|
-
onKeyboardNavigation: handleRightKeyboardNavigation,
|
|
644
|
-
className: clsx("h-64", showWeekNumbers ? "w-full md:w-[336px]!" : "w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
645
|
-
calendarSide: "right",
|
|
646
|
-
isSelectionDisabled: isRangeSelectionDisabled
|
|
647
|
-
})]
|
|
648
|
-
})]
|
|
649
|
-
})
|
|
650
|
-
});
|
|
370
|
+
//#region src/components/inputs/DateTime/shared/RangeCalendar.lazy.tsx
|
|
371
|
+
const loadRangeCalendar = () => import("./RangeCalendar-CXLwzK5Z.js");
|
|
372
|
+
const RangeCalendarRenderer = lazy(() => loadRangeCalendar().then(({ RangeCalendar }) => ({ default: RangeCalendar })));
|
|
373
|
+
/** Fetches the range calendar chunk ahead of the dialog opening (hover, focus). */
|
|
374
|
+
const preloadRangeCalendar = () => {
|
|
375
|
+
loadRangeCalendar();
|
|
651
376
|
};
|
|
377
|
+
/**
|
|
378
|
+
* Range calendar that only loads its two grids when the range picker dialog opens.
|
|
379
|
+
* The fallback reserves the size of both grids on desktop and one grid on mobile.
|
|
380
|
+
*/
|
|
381
|
+
const RangeCalendar = (props) => /* @__PURE__ */ jsx(Suspense, {
|
|
382
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
383
|
+
className: "flex h-72 w-[304px] items-center justify-center md:w-[608px]",
|
|
384
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
385
|
+
}),
|
|
386
|
+
children: /* @__PURE__ */ jsx(RangeCalendarRenderer, { ...props })
|
|
387
|
+
});
|
|
652
388
|
//#endregion
|
|
653
389
|
//#region src/components/inputs/DateTime/DateRangePicker/dateRangePreset.utils.ts
|
|
654
390
|
const dateRangePresetValues = [
|
|
@@ -1353,6 +1089,8 @@ const DateRangePickerBase = (props) => {
|
|
|
1353
1089
|
labelProps,
|
|
1354
1090
|
className: clsx("group relative flex w-full flex-col text-left", className),
|
|
1355
1091
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
1092
|
+
onMouseEnter: preloadRangeCalendar,
|
|
1093
|
+
onFocusCapture: preloadRangeCalendar,
|
|
1356
1094
|
children: [/* @__PURE__ */ jsx(DatePickerInput, {
|
|
1357
1095
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, datePickerInputRef),
|
|
1358
1096
|
as,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
2
|
import { t as FieldController } from "./form.binding-B-2id68q.js";
|
|
3
|
-
import { n as DateRangePickerInner } from "./DateRangePicker-
|
|
3
|
+
import { n as DateRangePickerInner } from "./DateRangePicker-4CrjSCAx.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.bound.tsx
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as UIConfig } from "./uiConfig.context-dxsO9puE.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, n as renderDatePickerTodayIcon, t as DatePickerInput } from "./DatePickerInput-B0e_huQt.js";
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
|
|
5
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
6
6
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
7
7
|
import { t as FormField } from "./FormField-DyqEbqx3.js";
|
|
8
|
-
import { i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, s as DateTimeDialog } from "./staticDateTimeSegments-
|
|
9
|
-
import { r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar-
|
|
10
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
11
|
-
import { t as normalizeDatePickerValue } from "./datePickerValue.utils-BxHR_BQZ.js";
|
|
8
|
+
import { i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, s as DateTimeDialog } from "./staticDateTimeSegments-FE-F61iH.js";
|
|
9
|
+
import { n as preloadCalendar, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar.lazy-B9YqgHbn.js";
|
|
12
10
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
13
11
|
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva--gCeAsRx.js";
|
|
14
12
|
import { t as TooltipWrapper } from "./TooltipWrapper-BrftXInI.js";
|
|
13
|
+
import { t as normalizeDatePickerValue } from "./datePickerValue.utils-CkmPaD6I.js";
|
|
14
|
+
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
15
15
|
import { InputFrame } from "./components/input-frame.js";
|
|
16
16
|
import { memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -190,6 +190,8 @@ const DateTimePickerBase = (props) => {
|
|
|
190
190
|
labelProps,
|
|
191
191
|
className: "group relative flex w-full flex-col text-left",
|
|
192
192
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
193
|
+
onMouseEnter: preloadCalendar,
|
|
194
|
+
onFocusCapture: preloadCalendar,
|
|
193
195
|
children: [/* @__PURE__ */ jsx(DatePickerInput, {
|
|
194
196
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, datePickerInputRef),
|
|
195
197
|
as,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
2
|
import { t as FieldController } from "./form.binding-B-2id68q.js";
|
|
3
|
-
import { n as DateTimePickerInner } from "./DateTimePicker-
|
|
3
|
+
import { n as DateTimePickerInner } from "./DateTimePicker-CtU096IU.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.bound.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
2
|
import { t as FieldController } from "./form.binding-B-2id68q.js";
|
|
3
|
-
import { r as InputInner } from "./Input-
|
|
3
|
+
import { r as InputInner } from "./Input-CPPDOg7b.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/Input/Input.bound.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
2
|
import { t as FieldController } from "./form.binding-B-2id68q.js";
|
|
3
|
-
import { r as NumberFieldInner } from "./NumberField-
|
|
3
|
+
import { r as NumberFieldInner } from "./NumberField-BbeePjH2.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/Input/NumberField/NumberField.bound.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as FieldController } from "./form.binding-B-2id68q.js";
|
|
2
|
-
import { n as NumberRangeInputInner } from "./NumberRangeInput-
|
|
2
|
+
import { n as NumberRangeInputInner } from "./NumberRangeInput-Cpqrom84.js";
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/inputs/Input/NumberRangeInput/NumberRangeInput.bound.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as EyeOff, t as Eye } from "./eye-BA4nRlMX.js";
|
|
2
2
|
import "./i18n-BjNKHh_D.js";
|
|
3
|
-
import { t as Input } from "./Input.bound-
|
|
3
|
+
import { t as Input } from "./Input.bound-DCTT5J62.js";
|
|
4
4
|
import { memo, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|