@povio/ui 3.4.0-rc.24 → 3.4.0-rc.25

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.
Files changed (133) hide show
  1. package/dist/{BottomSheet-DNnVqMw9.js → BottomSheet-BNGGxiX7.js} +1 -1
  2. package/dist/{Button-B8T7AjGP.js → Button-CtPMeT8f.js} +1 -1
  3. package/dist/{Calendar-B7OLjVV9.js → Calendar-CzDZnIF0.js} +4 -4
  4. package/dist/{Checkbox-B7f8NgnO.js → Checkbox-Feyideqw.js} +1 -1
  5. package/dist/{DatePicker-p5zEtFfc.js → DatePicker-O55fFlKg.js} +7 -7
  6. package/dist/{DatePickerInput-BLL4-Sqj.js → DatePickerInput-CQKtbsQd.js} +16 -9
  7. package/dist/{DateRangePicker-CjOo8S9R.d.ts → DateRangePicker-CMWUdyh1.d.ts} +25 -12
  8. package/dist/{DateRangePicker-BELkyFZ3.js → DateRangePicker-CnxuqAB1.js} +122 -31
  9. package/dist/{DateTimePicker-YxEZH7Kk.js → DateTimePicker-B39ywgjx.js} +7 -7
  10. package/dist/{FileUpload-uqaBcMUE.js → FileUpload-CnYu5cmB.js} +2 -2
  11. package/dist/{Form-BO5xLioQ.d.ts → Form-DsbBBmgz.d.ts} +1 -1
  12. package/dist/{InputItem-C_njDXaE.js → InputItem-D4UmXpyc.js} +10 -10
  13. package/dist/{InputUpload-BEda9AO8.js → InputUpload-CAk3IStC.js} +2 -2
  14. package/dist/{Inputs-CTywD5sa.js → Inputs-4vWHEAZ1.js} +1 -1
  15. package/dist/{Inputs-6bq2_53x.d.ts → Inputs-CnwGtVmt.d.ts} +1 -1
  16. package/dist/{Menu-DTiZS3t_.js → Menu-DF3r5ssn.js} +2 -2
  17. package/dist/{NumberRangeInput-vrceL7KX.js → NumberRangeInput-CBM_ycX_.js} +3 -3
  18. package/dist/{PaginationList-DwPkbMEh.js → PaginationList-B27QL6gG.js} +1 -1
  19. package/dist/{RadioGroup-DopLBNzi.js → RadioGroup-DbMmwkLQ.js} +1 -1
  20. package/dist/{Select-T4am7u5p.js → Select-C_cXfp8z.js} +3 -3
  21. package/dist/{Slider-RhB5Rcwv.js → Slider-YdD68ygp.js} +1 -1
  22. package/dist/{Tag-BspEXTbs.js → Tag-BAFkwLDe.js} +1 -1
  23. package/dist/{TextArea-Dqg717Gx.js → TextArea-B8TIZZ5i.js} +2 -2
  24. package/dist/{TextEditor-DXFlGnkW.js → TextEditor-CAh3oyK3.js} +3 -3
  25. package/dist/{TimePicker-lAn8yzYJ.js → TimePicker-BY6IMP4p.js} +5 -5
  26. package/dist/{Toast-DycxJVq5.js → Toast-trOdO6gl.js} +2 -2
  27. package/dist/{Toggle-BZCEmMGO.js → Toggle-Bw15KIly.js} +1 -1
  28. package/dist/{TooltipWrapper-D8gfa-pC.js → TooltipWrapper-eCF5-eNP.js} +1 -1
  29. package/dist/components/action-modal.js +2 -2
  30. package/dist/components/autocomplete.js +3 -3
  31. package/dist/components/bottom-sheet.js +1 -1
  32. package/dist/components/button.js +1 -1
  33. package/dist/components/checkbox-group.js +2 -2
  34. package/dist/components/checkbox.js +1 -1
  35. package/dist/components/date-picker.js +1 -1
  36. package/dist/components/date-range-picker.d.ts +2 -2
  37. package/dist/components/date-range-picker.js +1 -1
  38. package/dist/components/date-time-picker.js +1 -1
  39. package/dist/components/file-upload-container.js +1 -1
  40. package/dist/components/file-upload.js +1 -1
  41. package/dist/components/icon-button.js +1 -1
  42. package/dist/components/inline-icon-button.js +1 -1
  43. package/dist/components/input-upload.js +1 -1
  44. package/dist/components/menu.js +1 -1
  45. package/dist/components/number-input.js +4 -4
  46. package/dist/components/number-range-input.js +1 -1
  47. package/dist/components/pagination-list.js +1 -1
  48. package/dist/components/pagination.js +1 -1
  49. package/dist/components/pill.js +1 -1
  50. package/dist/components/query-autocomplete.js +1 -1
  51. package/dist/components/query-select.js +2 -2
  52. package/dist/components/radio-group.js +1 -1
  53. package/dist/components/responsive-popover.js +2 -2
  54. package/dist/components/select.js +1 -1
  55. package/dist/components/slider.js +1 -1
  56. package/dist/components/split-button.js +2 -2
  57. package/dist/components/tag.js +1 -1
  58. package/dist/components/text-area.js +1 -1
  59. package/dist/components/text-button.js +1 -1
  60. package/dist/components/text-input.js +4 -4
  61. package/dist/components/time-picker.js +1 -1
  62. package/dist/components/toast.js +1 -1
  63. package/dist/components/toggle-button.js +1 -1
  64. package/dist/components/toggle.js +1 -1
  65. package/dist/components/use-toast.js +1 -1
  66. package/dist/config/ui-config.d.ts +3 -2
  67. package/dist/config/ui-config.js +1 -1
  68. package/dist/{date-range-picker-DaLQYShd.d.ts → date-range-picker-BYdeSyMU.d.ts} +1 -1
  69. package/dist/{datePickerValue.utils-BqdbvGFL.js → datePickerValue.utils-BoOLaZk_.js} +2 -2
  70. package/dist/{dynamicInputs-BoAqswLw.d.ts → dynamicInputs-CiJNkz3F.d.ts} +4 -4
  71. package/dist/{fieldAdapter-C_3uizcT.js → fieldAdapter-C1EWUhUl.js} +1 -1
  72. package/dist/index.d.ts +4 -4
  73. package/dist/index.js +20 -20
  74. package/dist/rhf/autocomplete.js +1 -1
  75. package/dist/rhf/checkbox-group.js +1 -1
  76. package/dist/rhf/checkbox.js +2 -2
  77. package/dist/rhf/date-picker.js +2 -2
  78. package/dist/rhf/date-range-picker.d.ts +3 -3
  79. package/dist/rhf/date-range-picker.js +2 -2
  80. package/dist/rhf/date-time-picker.js +2 -2
  81. package/dist/rhf/file-upload.js +2 -2
  82. package/dist/rhf/input-upload.js +2 -2
  83. package/dist/rhf/inputs.d.ts +1 -1
  84. package/dist/rhf/number-input.js +1 -1
  85. package/dist/rhf/number-range-input.js +2 -2
  86. package/dist/rhf/password-input.js +1 -1
  87. package/dist/rhf/query-autocomplete.js +1 -1
  88. package/dist/rhf/query-select.js +1 -1
  89. package/dist/rhf/radio-group.js +2 -2
  90. package/dist/rhf/segment.js +1 -1
  91. package/dist/rhf/select.js +2 -2
  92. package/dist/rhf/slider.js +2 -2
  93. package/dist/rhf/text-area.js +2 -2
  94. package/dist/rhf/text-editor.js +2 -2
  95. package/dist/rhf/text-input.js +1 -1
  96. package/dist/rhf/time-picker.js +2 -2
  97. package/dist/rhf/toggle.js +2 -2
  98. package/dist/{rhf-Ca72CryM.js → rhf-oYBHBWj-.js} +1 -1
  99. package/dist/rhf.d.ts +4 -4
  100. package/dist/rhf.js +20 -20
  101. package/dist/{staticDateTimeSegments-C8AOKnEO.js → staticDateTimeSegments-CAEX9ogz.js} +2 -2
  102. package/dist/{staticSelect.utils-CYV-eubF.js → staticSelect.utils-Blrqx6Y6.js} +5 -5
  103. package/dist/tanstack/checkbox.js +1 -1
  104. package/dist/tanstack/date-picker.js +1 -1
  105. package/dist/tanstack/date-range-picker.d.ts +2 -2
  106. package/dist/tanstack/date-range-picker.js +1 -1
  107. package/dist/tanstack/date-time-picker.js +1 -1
  108. package/dist/tanstack/file-upload.js +1 -1
  109. package/dist/tanstack/form.d.ts +1 -1
  110. package/dist/tanstack/form.js +1 -1
  111. package/dist/tanstack/input-upload.js +1 -1
  112. package/dist/tanstack/inputs.d.ts +2 -2
  113. package/dist/tanstack/inputs.js +1 -1
  114. package/dist/tanstack/number-range-input.js +1 -1
  115. package/dist/tanstack/radio-group.js +1 -1
  116. package/dist/tanstack/select.js +1 -1
  117. package/dist/tanstack/slider.js +1 -1
  118. package/dist/tanstack/table.js +1 -1
  119. package/dist/tanstack/text-area.js +1 -1
  120. package/dist/tanstack/text-editor.js +1 -1
  121. package/dist/tanstack/time-picker.js +1 -1
  122. package/dist/tanstack/toggle.js +1 -1
  123. package/dist/tanstack.d.ts +6 -6
  124. package/dist/tanstack.js +29 -29
  125. package/dist/text-editor.js +1 -1
  126. package/dist/{uiConfig.context-SBtRegKv.js → uiConfig.context-B_wBkrQZ.js} +2 -1
  127. package/dist/{uiConfig.context-DyCOXtaZ.d.ts → uiConfig.context-bpfilZZ_.d.ts} +3 -0
  128. package/dist/{useBreakpoint-D0s71F97.js → useBreakpoint-YuMYUdpG.js} +1 -1
  129. package/dist/{useFieldAccessibility-Bdt6GY7h.js → useFieldAccessibility-BsEP3ts2.js} +1 -1
  130. package/dist/{useFormAutosave-CyuAM0Mh.js → useFormAutosave-DJJdcgK-.js} +2 -2
  131. package/dist/{useStaticInputHandoff-pnEcfX_d.js → useStaticInputHandoff-ClwANfo-.js} +2 -2
  132. package/dist/{useTableColumnConfig-BZ4H6gha.js → useTableColumnConfig-DaAi30uc.js} +2 -2
  133. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { o as ObjectUtils, t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { o as ObjectUtils, t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as X } from "./x-BYOEO0gW.js";
3
3
  import { t as clsx } from "./clsx-CnD0nOiA.js";
4
4
  import { n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "./Dialog-DpLXaUXz.js";
@@ -1,4 +1,4 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as clsx } from "./clsx-CnD0nOiA.js";
3
3
  import { n as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "./Button-oSE-CM83.js";
4
4
  import { t as $4f118338184dc1d9$export$a6c7ac8248d6e38a } from "./Link-iPOFlrxY.js";
@@ -2,13 +2,13 @@ import { t as ChevronDown } from "./chevron-down-Ciz9yP9R.js";
2
2
  import { t as ChevronLeft } from "./chevron-left-VO8YZrXZ.js";
3
3
  import { t as ChevronRight } from "./chevron-right-C_M98bh3.js";
4
4
  import { t as ChevronUp } from "./chevron-up-CHRnDSA3.js";
5
- import { i as CalendarGrid } from "./DatePickerInput-BLL4-Sqj.js";
5
+ import { i as CalendarGrid } from "./DatePickerInput-CQKtbsQd.js";
6
6
  import { t as clsx } from "./clsx-CnD0nOiA.js";
7
7
  import { b as $bdb11010cef70236$export$f680877a34711e37, g as $3ef42575df84b30b$export$9d1611c77c2fe928, h as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./import-CuNJ25EP.js";
8
8
  import { n as $d4ee10de306f2510$export$4282f70798064fe0, t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-HV79Qf_F.js";
9
9
  import { o as $9bf71ea28793e738$export$c5251b9e124bf29 } from "./SelectionIndicator-BiAHPBz2.js";
10
10
  import { t as $ef06256079686ba0$export$f8aeda7b10753fa1 } from "./useDescription-D8raJPFb.js";
11
- import { C as $dfb4eba373ed9493$exports, S as $3dfb0f96be0d6a08$export$4a931266a3838b86, v as $16f0b7bb276bc17e$export$300019f83c56d282, w as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./staticDateTimeSegments-C8AOKnEO.js";
11
+ import { C as $dfb4eba373ed9493$exports, S as $3dfb0f96be0d6a08$export$4a931266a3838b86, v as $16f0b7bb276bc17e$export$300019f83c56d282, w as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from "./staticDateTimeSegments-CAEX9ogz.js";
12
12
  import { i as $eed445e0843c11d0$export$a11e76429ed99b4, t as $eed445e0843c11d0$export$41f133550aa26f48 } from "./ListBox-BCW74bzR.js";
13
13
  import { n as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "./Button-oSE-CM83.js";
14
14
  import { n as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-D9TmTRN_.js";
@@ -16,8 +16,8 @@ import { n as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidati
16
16
  import { n as $84b7d8702d4ff4a8$export$40258cc1d95ff477 } from "./ToggleButton-DYVFkuEk.js";
17
17
  import { t as Typography } from "./Typography-AcUd9df8.js";
18
18
  import { PillButton } from "./components/pill-button.js";
19
- import { t as useBreakpoint } from "./useBreakpoint-D0s71F97.js";
20
- import { n as TimePickerForm } from "./datePickerValue.utils-BqdbvGFL.js";
19
+ import { t as useBreakpoint } from "./useBreakpoint-YuMYUdpG.js";
20
+ import { n as TimePickerForm } from "./datePickerValue.utils-BoOLaZk_.js";
21
21
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
22
22
  import { c } from "react/compiler-runtime";
23
23
  import { CalendarDateTime, Time, today } from "@internationalized/date";
@@ -1,4 +1,4 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { c as checkboxIndicatorClass, l as checkboxTypography, n as checkboxContentClassName, t as CheckboxCheckmark } from "./CheckboxCheckmark-C7Oq15ms.js";
3
3
  import { t as clsx } from "./clsx-CnD0nOiA.js";
4
4
  import { n as $4e85f108e88277b8$export$b085522c77523c51 } from "./RSPContexts-DHQi1l7F.js";
@@ -1,16 +1,16 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as FormField } from "./FormField-ChDNTHr4.js";
3
- import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-BLL4-Sqj.js";
3
+ import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-CQKtbsQd.js";
4
4
  import { t as clsx } from "./clsx-CnD0nOiA.js";
5
5
  import { _ as $5dc95899b306f630$export$c9058316764c140e } from "./import-CuNJ25EP.js";
6
6
  import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-HV79Qf_F.js";
7
- import { d as useCalendarState, i as getStaticDateTimeFocusTarget, o as DateTimeDialogFooter, p as useDatePickerState, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-C8AOKnEO.js";
8
- import { r as $6057a3d2a53a12fd$export$42df105a73306d51, t as Calendar } from "./Calendar-B7OLjVV9.js";
7
+ import { d as useCalendarState, i as getStaticDateTimeFocusTarget, o as DateTimeDialogFooter, p as useDatePickerState, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-CAEX9ogz.js";
8
+ import { r as $6057a3d2a53a12fd$export$42df105a73306d51, t as Calendar } from "./Calendar-CzDZnIF0.js";
9
9
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
10
10
  import { t as FieldController } from "./form.binding-DyZ4fH8l.js";
11
- import { t as TooltipWrapper } from "./TooltipWrapper-D8gfa-pC.js";
12
- import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-pnEcfX_d.js";
13
- import { t as normalizeDatePickerValue } from "./datePickerValue.utils-BqdbvGFL.js";
11
+ import { t as TooltipWrapper } from "./TooltipWrapper-eCF5-eNP.js";
12
+ import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-ClwANfo-.js";
13
+ import { t as normalizeDatePickerValue } from "./datePickerValue.utils-BoOLaZk_.js";
14
14
  import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
15
15
  import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
16
16
  import { createCalendar, getLocalTimeZone, toCalendarDate, today } from "@internationalized/date";
@@ -1,17 +1,17 @@
1
1
  import { t as createLucideIcon } from "./createLucideIcon-CskCrR9z.js";
2
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
2
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
3
3
  import { r as FormFieldLabel } from "./FormField-ChDNTHr4.js";
4
4
  import { t as clsx } from "./clsx-CnD0nOiA.js";
5
5
  import { g as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./import-CuNJ25EP.js";
6
6
  import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-HV79Qf_F.js";
7
- import { b as $16f0b7bb276bc17e$export$5591b0b878c1a989, c as useFirefoxDateSegmentSelectionGuard, f as useDateFieldState, l as DateSegmentItem } from "./staticDateTimeSegments-C8AOKnEO.js";
7
+ import { b as $16f0b7bb276bc17e$export$5591b0b878c1a989, c as useFirefoxDateSegmentSelectionGuard, f as useDateFieldState, l as DateSegmentItem } from "./staticDateTimeSegments-CAEX9ogz.js";
8
8
  import { n as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "./Button-oSE-CM83.js";
9
9
  import { t as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-Cd0lBvKO.js";
10
10
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
11
11
  import { t as Typography } from "./Typography-AcUd9df8.js";
12
12
  import { IconButton } from "./components/icon-button.js";
13
13
  import { InlineIconButton } from "./components/inline-icon-button.js";
14
- import { r as InputClear } from "./TooltipWrapper-D8gfa-pC.js";
14
+ import { r as InputClear } from "./TooltipWrapper-eCF5-eNP.js";
15
15
  import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-KYGD4Bdz.js";
16
16
  import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
17
17
  import { t as DateUtils } from "./date.utils-B8_QF9y6.js";
@@ -187,7 +187,7 @@ const WEEK_INDICES = [
187
187
  5
188
188
  ];
189
189
  const NO_CALENDAR_OFFSET = {};
190
- const CalendarGrid = ({ state, onApply, onDoubleClickApply, shouldApplyOnDateSelection, shouldCloseOnSelect, offset = NO_CALENDAR_OFFSET, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, className, calendarSide, ...props }) => {
190
+ const CalendarGrid = ({ state, onApply, onDoubleClickApply, shouldApplyOnDateSelection, shouldCloseOnSelect, offset = NO_CALENDAR_OFFSET, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, className, calendarSide, isSelectionDisabled, ...props }) => {
191
191
  const { gridProps, headerProps, weekDays } = useCalendarGrid({
192
192
  ...props,
193
193
  weekdayStyle: "short"
@@ -198,6 +198,8 @@ const CalendarGrid = ({ state, onApply, onDoubleClickApply, shouldApplyOnDateSel
198
198
  };
199
199
  return /* @__PURE__ */ jsx("div", {
200
200
  className: clsx("h-72 w-full px-3 py-1 md:w-80", className),
201
+ inert: isSelectionDisabled || void 0,
202
+ "aria-disabled": isSelectionDisabled || void 0,
201
203
  children: /* @__PURE__ */ jsxs("table", {
202
204
  ...gridProps,
203
205
  cellPadding: "0",
@@ -419,7 +421,7 @@ const renderDatePickerTodayIcon = (todayIcon, options) => {
419
421
  };
420
422
  //#endregion
421
423
  //#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
422
- const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, ...props }) => {
424
+ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, displayValue, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, ...props }) => {
423
425
  const uiConfig = UIConfig.useConfig();
424
426
  const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
425
427
  let effectiveTimeZone = getLocalTimeZone();
@@ -474,6 +476,7 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
474
476
  setCanClear(canClearInput);
475
477
  }, []);
476
478
  const showClear = (!isDisabled || isClearableIfDisabled === true) && (canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null);
479
+ const hasDisplayedValue = !!hasValue || normalizedFieldProps.value != null;
477
480
  const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
478
481
  const onToday = () => {
479
482
  if (isTodayIconDisabled) return;
@@ -511,13 +514,13 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
511
514
  "data-disabled": isDisabled || void 0,
512
515
  "data-is-disabled": isDisabled || void 0,
513
516
  "data-invalid": isInvalid || void 0,
514
- "data-is-empty": normalizedFieldProps.value == null || void 0,
517
+ "data-is-empty": !hasDisplayedValue || void 0,
515
518
  "data-focus-within": isFocused || void 0,
516
519
  "data-focus-visible": isFocused && isFocusVisible || void 0,
517
- "data-has-selection": normalizedFieldProps.value != null || void 0,
520
+ "data-has-selection": hasDisplayedValue || void 0,
518
521
  "data-is-dirty": isDirty || void 0,
519
522
  "data-is-required": isRequired || void 0,
520
- "data-is-filled": normalizedFieldProps.value != null || void 0,
523
+ "data-is-filled": hasDisplayedValue || void 0,
521
524
  children: [/* @__PURE__ */ jsxs("div", {
522
525
  className: clsx("flex items-center gap-input-gap-input-text-to-elements pr-0!", shouldShrinkInput ? "min-w-0 flex-1 w-full" : "w-full", inputSizeCva({
523
526
  size,
@@ -538,7 +541,11 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
538
541
  isDisabled
539
542
  }),
540
543
  !shouldRenderTodayIconWithFieldLabel && todayIconButton,
541
- disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
544
+ displayValue ? /* @__PURE__ */ jsx(Typography, {
545
+ size: "label-1",
546
+ className: "truncate",
547
+ children: displayValue
548
+ }) : disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
542
549
  size: "label-1",
543
550
  className: "text-text-default-3",
544
551
  children: placeholder
@@ -25,23 +25,36 @@ interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Om
25
25
  inputClassName?: string;
26
26
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
27
27
  allowPartialRange?: boolean;
28
+ mode?: "absolute" | "relative";
29
+ relativeValue?: string | null;
30
+ relativeOptions?: DateRangeRelativeOption[];
31
+ onRelativeChange?: (value: string | null) => void;
28
32
  }
29
- interface DateRangePickerProps extends Omit<DateRangePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
30
- value?: {
31
- start: string | null;
32
- end: string | null;
33
- } | null;
34
- onChange?: (value: {
35
- start: string | null;
36
- end: string | null;
37
- } | null) => void;
33
+ interface DateRangeRelativeOption {
34
+ /** Stable value emitted by DateRangePicker when mode is `relative`. */
35
+ value: string;
36
+ /** Human-readable value shown in the input and options list. */
37
+ label: string;
38
+ isDisabled?: boolean;
39
+ }
40
+ interface DateRangePickerSharedProps extends Omit<DateRangePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
38
41
  fullIso?: boolean;
39
42
  minValue?: DateValue$1 | string;
40
43
  maxValue?: DateValue$1 | string;
41
44
  renderStaticInput?: boolean;
42
45
  }
43
- type ControlledDateRangePickerProps<TFieldValues extends FieldValues> = ControlProps<DateRangePickerProps, TFieldValues>;
44
- declare const DateRangePickerComponent: <TFieldValues extends FieldValues>({ fullIso, minValue, maxValue, renderStaticInput, ...props }: ControlledDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
46
+ type DateRangePickerValue = {
47
+ start: string | null;
48
+ end: string | null;
49
+ } | string | null;
50
+ type DateRangePickerProps<TMode extends "absolute" | "relative" = "absolute"> = DateRangePickerSharedProps & {
51
+ /** `relative` returns and displays an option key instead of a concrete range. */
52
+ mode?: TMode;
53
+ value?: TMode extends "relative" ? string | null : Exclude<DateRangePickerValue, string>;
54
+ onChange?: (value: TMode extends "relative" ? string | null : Exclude<DateRangePickerValue, string>) => void;
55
+ };
56
+ type ControlledDateRangePickerProps<TFieldValues extends FieldValues, TMode extends "absolute" | "relative" = "absolute"> = ControlProps<DateRangePickerProps<TMode>, TFieldValues>;
57
+ declare const DateRangePickerComponent: <TFieldValues extends FieldValues, TMode extends "absolute" | "relative" = "absolute">({ fullIso, minValue, maxValue, renderStaticInput, ...props }: ControlledDateRangePickerProps<TFieldValues, TMode>) => import("react/jsx-runtime").JSX.Element;
45
58
  declare const DateRangePicker: typeof DateRangePickerComponent;
46
59
  //#endregion
47
- export { DateRangePicker as n, DateRangePickerProps as r, ControlledDateRangePickerProps as t };
60
+ export { DateRangeRelativeOption as i, DateRangePicker as n, DateRangePickerProps as r, ControlledDateRangePickerProps as t };
@@ -1,16 +1,16 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as ChevronDown } from "./chevron-down-Ciz9yP9R.js";
3
3
  import { t as ChevronLeft } from "./chevron-left-VO8YZrXZ.js";
4
4
  import { t as ChevronRight } from "./chevron-right-C_M98bh3.js";
5
5
  import { n as ChevronsLeft, t as ChevronsRight } from "./chevrons-right-BXdmZ2TS.js";
6
6
  import { t as FormField } from "./FormField-ChDNTHr4.js";
7
- import { i as CalendarGrid, n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-BLL4-Sqj.js";
7
+ import { i as CalendarGrid, n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-CQKtbsQd.js";
8
8
  import { t as clsx } from "./clsx-CnD0nOiA.js";
9
9
  import { _ as $5dc95899b306f630$export$c9058316764c140e, b as $bdb11010cef70236$export$f680877a34711e37, g as $3ef42575df84b30b$export$9d1611c77c2fe928, h as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./import-CuNJ25EP.js";
10
10
  import { n as $d4ee10de306f2510$export$4282f70798064fe0, t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-HV79Qf_F.js";
11
11
  import { o as $9bf71ea28793e738$export$c5251b9e124bf29 } from "./SelectionIndicator-BiAHPBz2.js";
12
12
  import { t as $ef06256079686ba0$export$f8aeda7b10753fa1 } from "./useDescription-D8raJPFb.js";
13
- import { C as $dfb4eba373ed9493$exports, S as $3dfb0f96be0d6a08$export$4a931266a3838b86, h as useRangeCalendarState, i as getStaticDateTimeFocusTarget, m as useDateRangePickerState, o as DateTimeDialogFooter, r as getStaticDateRangeSegments, s as DateTimeDialog, v as $16f0b7bb276bc17e$export$300019f83c56d282, w as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, x as $16f0b7bb276bc17e$export$7b3062cd49e80452 } from "./staticDateTimeSegments-C8AOKnEO.js";
13
+ import { C as $dfb4eba373ed9493$exports, S as $3dfb0f96be0d6a08$export$4a931266a3838b86, h as useRangeCalendarState, i as getStaticDateTimeFocusTarget, m as useDateRangePickerState, o as DateTimeDialogFooter, r as getStaticDateRangeSegments, s as DateTimeDialog, v as $16f0b7bb276bc17e$export$300019f83c56d282, w as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, x as $16f0b7bb276bc17e$export$7b3062cd49e80452 } from "./staticDateTimeSegments-CAEX9ogz.js";
14
14
  import { n as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "./Button-oSE-CM83.js";
15
15
  import { n as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-D9TmTRN_.js";
16
16
  import { n as $e5be200c675c3b3a$export$a763b9476acd3eb, r as $e5be200c675c3b3a$export$dad6ae84456c676a, t as $e5be200c675c3b3a$export$75ee7c75d68f5b0e } from "./useFormValidationState-Bpry7Uk5.js";
@@ -20,10 +20,10 @@ import { InlineIconButton } from "./components/inline-icon-button.js";
20
20
  import { PillButton } from "./components/pill-button.js";
21
21
  import "./i18n-C2TBJvnh.js";
22
22
  import { t as FieldController } from "./form.binding-DyZ4fH8l.js";
23
- import { t as TooltipWrapper } from "./TooltipWrapper-D8gfa-pC.js";
24
- import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-pnEcfX_d.js";
23
+ import { t as TooltipWrapper } from "./TooltipWrapper-eCF5-eNP.js";
24
+ import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-ClwANfo-.js";
25
25
  import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
26
- import { t as Select } from "./Select-T4am7u5p.js";
26
+ import { t as Select } from "./Select-C_cXfp8z.js";
27
27
  import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
28
28
  import { createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, startOfMonth, startOfWeek, startOfYear, toCalendarDate, today } from "@internationalized/date";
29
29
  import { useFocusWithin } from "@react-aria/interactions";
@@ -368,7 +368,7 @@ const CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled,
368
368
  };
369
369
  //#endregion
370
370
  //#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
371
- const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation }) => {
371
+ const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, isRangeSelectionDisabled }) => {
372
372
  const leftRef = useRef(null);
373
373
  const rightRef = useRef(null);
374
374
  const { calendarProps: leftCalendarAriaProps } = useRangeCalendar(calendarProps, leftCalendarState, leftRef);
@@ -428,8 +428,9 @@ const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calen
428
428
  onDateHover,
429
429
  hoverDate,
430
430
  onKeyboardNavigation: handleLeftKeyboardNavigation,
431
- className: "h-64 w-[304px]!",
432
- calendarSide: "left"
431
+ className: clsx("h-64 w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
432
+ calendarSide: "left",
433
+ isSelectionDisabled: isRangeSelectionDisabled
433
434
  })]
434
435
  }), /* @__PURE__ */ jsxs("div", {
435
436
  ...rightCalendarAriaProps,
@@ -450,8 +451,9 @@ const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calen
450
451
  onDateHover,
451
452
  hoverDate,
452
453
  onKeyboardNavigation: handleRightKeyboardNavigation,
453
- className: "h-64 w-[304px]!",
454
- calendarSide: "right"
454
+ className: clsx("h-64 w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
455
+ calendarSide: "right",
456
+ isSelectionDisabled: isRangeSelectionDisabled
455
457
  })]
456
458
  })]
457
459
  })
@@ -462,7 +464,7 @@ const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calen
462
464
  const DateRangePickerBase = (props) => {
463
465
  const ui = UIConfig.useConfig();
464
466
  const { t } = useTranslation();
465
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, allowPartialRange: allowPartialRangeProp, minValue, maxValue, ...rest } = props;
467
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, allowPartialRange: allowPartialRangeProp, mode = "absolute", relativeValue, relativeOptions = [], onRelativeChange, minValue, maxValue, ...rest } = props;
466
468
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
467
469
  const variant = variantProp ?? ui.input.variant;
468
470
  const as = asProp ?? ui.input.as;
@@ -578,7 +580,7 @@ const DateRangePickerBase = (props) => {
578
580
  minValue,
579
581
  maxValue
580
582
  });
581
- const [activePreset, setActivePreset] = useState(null);
583
+ const [activePreset, setActivePreset] = useState(mode === "relative" ? relativeValue ?? null : null);
582
584
  const [rangeSelection, setRangeSelection] = useState({
583
585
  start: value?.start || null,
584
586
  end: value?.end || null,
@@ -843,6 +845,11 @@ const DateRangePickerBase = (props) => {
843
845
  clampRangeToBounds
844
846
  ]);
845
847
  const onApply = () => {
848
+ if (mode === "relative") {
849
+ onRelativeChange?.(activePreset);
850
+ state.toggle();
851
+ return;
852
+ }
846
853
  let valueToApply = dialogState.value;
847
854
  if (rangeSelection.start && rangeSelection.end) valueToApply = {
848
855
  start: rangeSelection.start,
@@ -872,6 +879,11 @@ const DateRangePickerBase = (props) => {
872
879
  syncCalendarStates(clampedTodayRange);
873
880
  };
874
881
  const onInputClear = () => {
882
+ if (mode === "relative") {
883
+ setActivePreset(null);
884
+ onRelativeChange?.(null);
885
+ return;
886
+ }
875
887
  fieldRangeRef.current = null;
876
888
  onChange?.(null);
877
889
  dialogState.setValue(null);
@@ -885,6 +897,10 @@ const DateRangePickerBase = (props) => {
885
897
  setHoverDate(null);
886
898
  };
887
899
  const syncSelectionFromControlledValue = () => {
900
+ if (mode === "relative") {
901
+ setActivePreset(relativeValue ?? null);
902
+ return;
903
+ }
888
904
  const currentValue = state.value;
889
905
  if (!(currentValue != null && currentValue.start != null && currentValue.end != null)) {
890
906
  syncCalendarStates(null);
@@ -963,6 +979,7 @@ const DateRangePickerBase = (props) => {
963
979
  if (!clampedValue) isDisabled = true;
964
980
  if (clampedValue && !isRangeWithinBounds(clampedValue)) isDisabled = true;
965
981
  return {
982
+ value: params.value,
966
983
  label: params.label,
967
984
  getValue: params.getValue,
968
985
  clampedValue,
@@ -971,26 +988,32 @@ const DateRangePickerBase = (props) => {
971
988
  };
972
989
  const presets = [
973
990
  createPreset({
991
+ value: "thisWeek",
974
992
  label: t(($) => $.ui.datePicker.presets.thisWeek, { ns: "ui" }),
975
993
  getValue: getThisWeekRange
976
994
  }),
977
995
  createPreset({
996
+ value: "lastWeek",
978
997
  label: t(($) => $.ui.datePicker.presets.lastWeek, { ns: "ui" }),
979
998
  getValue: getLastWeekRange
980
999
  }),
981
1000
  createPreset({
1001
+ value: "thisAndLastWeek",
982
1002
  label: t(($) => $.ui.datePicker.presets.thisAndLastWeek, { ns: "ui" }),
983
1003
  getValue: getThisAndLastWeekRange
984
1004
  }),
985
1005
  createPreset({
1006
+ value: "thisMonth",
986
1007
  label: t(($) => $.ui.datePicker.presets.thisMonth, { ns: "ui" }),
987
1008
  getValue: getThisMonthRange
988
1009
  }),
989
1010
  createPreset({
1011
+ value: "thisAndLastMonth",
990
1012
  label: t(($) => $.ui.datePicker.presets.thisAndLastMonth, { ns: "ui" }),
991
1013
  getValue: getThisAndLastMonthRange
992
1014
  }),
993
1015
  createPreset({
1016
+ value: "thisYear",
994
1017
  label: t(($) => $.ui.datePicker.presets.thisYear, { ns: "ui" }),
995
1018
  getValue: () => ({
996
1019
  start: startOfYear(todayDate),
@@ -998,6 +1021,7 @@ const DateRangePickerBase = (props) => {
998
1021
  })
999
1022
  }),
1000
1023
  createPreset({
1024
+ value: "lastYear",
1001
1025
  label: t(($) => $.ui.datePicker.presets.lastYear, { ns: "ui" }),
1002
1026
  getValue: () => ({
1003
1027
  start: startOfYear(todayDate.subtract({ years: 1 })),
@@ -1005,6 +1029,7 @@ const DateRangePickerBase = (props) => {
1005
1029
  })
1006
1030
  }),
1007
1031
  createPreset({
1032
+ value: "thisAndLastYear",
1008
1033
  label: t(($) => $.ui.datePicker.presets.thisAndLastYear, { ns: "ui" }),
1009
1034
  getValue: () => ({
1010
1035
  start: startOfYear(todayDate.subtract({ years: 1 })),
@@ -1012,17 +1037,29 @@ const DateRangePickerBase = (props) => {
1012
1037
  })
1013
1038
  }),
1014
1039
  createPreset({
1040
+ value: "soFar",
1015
1041
  label: t(($) => $.ui.datePicker.presets.soFar, { ns: "ui" }),
1016
1042
  getValue: () => ({
1017
1043
  start: startOfYear(todayDate),
1018
1044
  end: todayDate
1019
1045
  }),
1020
1046
  keepEnabledUnlessFutureMin: true
1021
- })
1047
+ }),
1048
+ ...relativeOptions.map((option) => ({
1049
+ value: option.value,
1050
+ label: option.label,
1051
+ getValue: () => ({
1052
+ start: todayDate,
1053
+ end: todayDate
1054
+ }),
1055
+ clampedValue: null,
1056
+ isDisabled: option.isDisabled ?? false
1057
+ }))
1022
1058
  ];
1023
1059
  const selectPreset = (preset) => {
1024
- if (preset.isDisabled || !preset.clampedValue) return;
1025
- setActivePreset(preset.label);
1060
+ if (preset.isDisabled || mode !== "relative" && !preset.clampedValue) return;
1061
+ setActivePreset(mode === "relative" ? preset.value : preset.label);
1062
+ if (!preset.clampedValue) return;
1026
1063
  const presetValue = preset.clampedValue;
1027
1064
  syncCalendarStates(presetValue);
1028
1065
  const startDate = presetValue.start;
@@ -1033,7 +1070,9 @@ const DateRangePickerBase = (props) => {
1033
1070
  const rightCalendarMonth = startDate.add({ months: 1 });
1034
1071
  rightCalendarState.setFocusedDate(rightCalendarMonth);
1035
1072
  }
1073
+ if (mode === "relative") setActivePreset(preset.value);
1036
1074
  };
1075
+ const activeRelativeOption = mode === "relative" ? presets.find((preset) => preset.value === relativeValue) : void 0;
1037
1076
  return /* @__PURE__ */ jsx(TooltipWrapper, {
1038
1077
  as,
1039
1078
  error,
@@ -1073,7 +1112,7 @@ const DateRangePickerBase = (props) => {
1073
1112
  fieldValue: normalizedValue?.start ?? null,
1074
1113
  endFieldValue: normalizedValue?.end ?? null,
1075
1114
  isValueControlled: true,
1076
- hasValue: normalizedValue?.start != null || normalizedValue?.end != null,
1115
+ hasValue: mode === "relative" ? !!relativeValue : normalizedValue?.start != null || normalizedValue?.end != null,
1077
1116
  buttonProps,
1078
1117
  isDisabled,
1079
1118
  isInvalid: !!error,
@@ -1088,7 +1127,8 @@ const DateRangePickerBase = (props) => {
1088
1127
  todayIconButtonComponent,
1089
1128
  todayIconPlacement,
1090
1129
  isDirty,
1091
- disableManualEntry,
1130
+ disableManualEntry: mode === "relative" || disableManualEntry,
1131
+ displayValue: activeRelativeOption?.label,
1092
1132
  autoFixYear,
1093
1133
  placeholder,
1094
1134
  className: inputClassName,
@@ -1098,11 +1138,11 @@ const DateRangePickerBase = (props) => {
1098
1138
  }), /* @__PURE__ */ jsx(DateTimeDialog, {
1099
1139
  hideSidebar,
1100
1140
  sidebar: /* @__PURE__ */ jsx("div", {
1101
- className: "flex w-full flex-row overflow-auto border-elevation-outline-default-1 border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden",
1141
+ className: "flex w-full flex-row overflow-auto border-elevation-outline-default-1 border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:max-h-[344px] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden",
1102
1142
  children: presets.map((preset) => /* @__PURE__ */ jsx($d2b4bc8c273e7be6$export$353f5b6fc5456de1, {
1103
1143
  isDisabled: preset.isDisabled,
1104
1144
  onClick: () => selectPreset(preset),
1105
- className: clsx("w-full px-2 py-1 text-left md:px-list-side-item-left md:py-list-height-item disabled:text-interactive-text-secondary-disabled!", activePreset !== preset.label && "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover", activePreset === preset.label && "bg-interactive-contained-primary-idle text-interactive-text-secondary-idle-inverted"),
1145
+ className: clsx("w-full px-2 py-1 text-left md:px-list-side-item-left md:py-list-height-item disabled:text-interactive-text-secondary-disabled!", activePreset !== (mode === "relative" ? preset.value : preset.label) && "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover", activePreset === (mode === "relative" ? preset.value : preset.label) && "bg-interactive-contained-primary-idle text-interactive-text-secondary-idle-inverted"),
1106
1146
  children: /* @__PURE__ */ jsx(Typography, {
1107
1147
  size: "label-2",
1108
1148
  sizeMobile: "label-3",
@@ -1110,12 +1150,12 @@ const DateRangePickerBase = (props) => {
1110
1150
  className: "whitespace-nowrap",
1111
1151
  children: preset.label
1112
1152
  })
1113
- }, preset.label))
1153
+ }, mode === "relative" ? preset.value : preset.label))
1114
1154
  }),
1115
1155
  footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
1116
1156
  isDisabled,
1117
- isValid: !dialogState.isInvalid && !!dialogState.value,
1118
- onTodayPress,
1157
+ isValid: mode === "relative" ? !!activePreset : !dialogState.isInvalid && !!dialogState.value,
1158
+ onTodayPress: mode === "relative" ? void 0 : onTodayPress,
1119
1159
  onApply
1120
1160
  }),
1121
1161
  label,
@@ -1133,11 +1173,12 @@ const DateRangePickerBase = (props) => {
1133
1173
  calendarProps,
1134
1174
  onApply,
1135
1175
  onRangeChange: syncCalendarStates,
1136
- onDateSelection: handleDateSelection,
1176
+ onDateSelection: mode === "relative" ? void 0 : handleDateSelection,
1137
1177
  onDateHover: handleDateHover,
1138
1178
  rangeSelection,
1139
1179
  hoverDate,
1140
- onKeyboardNavigation: handleKeyboardNavigation
1180
+ onKeyboardNavigation: mode === "relative" ? void 0 : handleKeyboardNavigation,
1181
+ isRangeSelectionDisabled: mode === "relative"
1141
1182
  })
1142
1183
  })
1143
1184
  })
@@ -1147,6 +1188,7 @@ const DateRangePickerBase = (props) => {
1147
1188
  };
1148
1189
  const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
1149
1190
  const ui = UIConfig.useConfig();
1191
+ const { t } = useTranslation();
1150
1192
  const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
1151
1193
  const { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
1152
1194
  const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
@@ -1211,10 +1253,51 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
1211
1253
  maxValue,
1212
1254
  parseCalendarDate
1213
1255
  ]);
1256
+ const normalizedRange = normalizedValue;
1214
1257
  if (!renderInput) {
1215
- const startDateValue = parseCalendarDate(normalizedValue?.start ?? null);
1216
- const endDateValue = parseCalendarDate(normalizedValue?.end ?? null);
1217
- const hasProvidedRangeValue = !!(normalizedValue?.start || normalizedValue?.end);
1258
+ const relativeOptions = [
1259
+ {
1260
+ value: "thisWeek",
1261
+ label: t(($) => $.ui.datePicker.presets.thisWeek, { ns: "ui" })
1262
+ },
1263
+ {
1264
+ value: "lastWeek",
1265
+ label: t(($) => $.ui.datePicker.presets.lastWeek, { ns: "ui" })
1266
+ },
1267
+ {
1268
+ value: "thisAndLastWeek",
1269
+ label: t(($) => $.ui.datePicker.presets.thisAndLastWeek, { ns: "ui" })
1270
+ },
1271
+ {
1272
+ value: "thisMonth",
1273
+ label: t(($) => $.ui.datePicker.presets.thisMonth, { ns: "ui" })
1274
+ },
1275
+ {
1276
+ value: "thisAndLastMonth",
1277
+ label: t(($) => $.ui.datePicker.presets.thisAndLastMonth, { ns: "ui" })
1278
+ },
1279
+ {
1280
+ value: "thisYear",
1281
+ label: t(($) => $.ui.datePicker.presets.thisYear, { ns: "ui" })
1282
+ },
1283
+ {
1284
+ value: "lastYear",
1285
+ label: t(($) => $.ui.datePicker.presets.lastYear, { ns: "ui" })
1286
+ },
1287
+ {
1288
+ value: "thisAndLastYear",
1289
+ label: t(($) => $.ui.datePicker.presets.thisAndLastYear, { ns: "ui" })
1290
+ },
1291
+ {
1292
+ value: "soFar",
1293
+ label: t(($) => $.ui.datePicker.presets.soFar, { ns: "ui" })
1294
+ },
1295
+ ...ui.dateInput.dateRangeOptions
1296
+ ];
1297
+ const relativeLabel = props.mode === "relative" ? relativeOptions.find((option) => option.value === normalizedValue)?.label : void 0;
1298
+ const startDateValue = parseCalendarDate(normalizedRange?.start ?? null);
1299
+ const endDateValue = parseCalendarDate(normalizedRange?.end ?? null);
1300
+ const hasProvidedRangeValue = props.mode === "relative" ? !!relativeLabel : !!(normalizedRange?.start || normalizedRange?.end);
1218
1301
  const as = props.as ?? ui.input.as;
1219
1302
  const size = props.size ?? ui.input.size;
1220
1303
  const isDisabled = isFormControlDisabled || !!props.isDisabled;
@@ -1228,7 +1311,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
1228
1311
  size: todayIconButtonSize,
1229
1312
  todayIconButtonComponent
1230
1313
  });
1231
- const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
1314
+ const disableManualEntry = props.mode === "relative" || (props.disableManualEntry ?? ui.dateInput.disableManualEntry);
1232
1315
  const showDropdown = !props.disableDropdown || disableManualEntry;
1233
1316
  const staticSegments = getStaticDateRangeSegments({
1234
1317
  start: startDateValue,
@@ -1274,14 +1357,22 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
1274
1357
  onClick: () => {},
1275
1358
  altText: ""
1276
1359
  } : void 0,
1277
- children: staticSegments
1360
+ children: relativeLabel ? /* @__PURE__ */ jsx(Typography, {
1361
+ size: "label-1",
1362
+ className: "truncate",
1363
+ children: relativeLabel
1364
+ }) : staticSegments
1278
1365
  });
1279
1366
  }
1280
1367
  return /* @__PURE__ */ jsx(DateRangePickerBase, {
1281
1368
  ...props,
1282
1369
  ...dateLimits,
1283
1370
  ref: $5dc95899b306f630$export$c9058316764c140e(props.ref, inputRef),
1284
- value: parseDateRange(normalizedValue),
1371
+ mode: props.mode,
1372
+ relativeValue: props.mode === "relative" ? normalizedValue : null,
1373
+ relativeOptions: props.mode === "relative" ? ui.dateInput.dateRangeOptions : [],
1374
+ onRelativeChange: (value) => props.onChange?.(value),
1375
+ value: props.mode === "relative" ? null : parseDateRange(normalizedRange),
1285
1376
  onChange: (value) => props.onChange?.(formatDateRange(value))
1286
1377
  });
1287
1378
  };
@@ -1,16 +1,16 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as FormField } from "./FormField-ChDNTHr4.js";
3
- import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-BLL4-Sqj.js";
3
+ import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, t as DatePickerInput } from "./DatePickerInput-CQKtbsQd.js";
4
4
  import { t as clsx } from "./clsx-CnD0nOiA.js";
5
5
  import { _ as $5dc95899b306f630$export$c9058316764c140e } from "./import-CuNJ25EP.js";
6
6
  import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-HV79Qf_F.js";
7
- import { d as useCalendarState, i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, p as useDatePickerState, s as DateTimeDialog } from "./staticDateTimeSegments-C8AOKnEO.js";
8
- import { r as $6057a3d2a53a12fd$export$42df105a73306d51, t as Calendar } from "./Calendar-B7OLjVV9.js";
7
+ import { d as useCalendarState, i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, p as useDatePickerState, s as DateTimeDialog } from "./staticDateTimeSegments-CAEX9ogz.js";
8
+ import { r as $6057a3d2a53a12fd$export$42df105a73306d51, t as Calendar } from "./Calendar-CzDZnIF0.js";
9
9
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
10
10
  import { t as FieldController } from "./form.binding-DyZ4fH8l.js";
11
- import { t as TooltipWrapper } from "./TooltipWrapper-D8gfa-pC.js";
12
- import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-pnEcfX_d.js";
13
- import { t as normalizeDatePickerValue } from "./datePickerValue.utils-BqdbvGFL.js";
11
+ import { t as TooltipWrapper } from "./TooltipWrapper-eCF5-eNP.js";
12
+ import { n as InputFrame, t as useStaticInputHandoff } from "./useStaticInputHandoff-ClwANfo-.js";
13
+ import { t as normalizeDatePickerValue } from "./datePickerValue.utils-BoOLaZk_.js";
14
14
  import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
15
15
  import { memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
16
16
  import { Time, createCalendar, getLocalTimeZone, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
@@ -1,5 +1,5 @@
1
1
  import { t as createLucideIcon } from "./createLucideIcon-CskCrR9z.js";
2
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
2
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
3
3
  import { t as FormField } from "./FormField-ChDNTHr4.js";
4
4
  import { n as $cb088e721efb9218$export$3c6489d84dc98b6, r as Upload, t as $1e2864c73f66a4da$export$6fb4a10d2c950550 } from "./FileTrigger-BSzrj50r.js";
5
5
  import { t as X } from "./x-BYOEO0gW.js";
@@ -8,7 +8,7 @@ import { _ as $5dc95899b306f630$export$c9058316764c140e } from "./import-CuNJ25E
8
8
  import { t as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-CUjKpeKj.js";
9
9
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
10
10
  import { t as Typography } from "./Typography-AcUd9df8.js";
11
- import { t as Button } from "./Button-B8T7AjGP.js";
11
+ import { t as Button } from "./Button-CtPMeT8f.js";
12
12
  import { InlineIconButton } from "./components/inline-icon-button.js";
13
13
  import "./i18n-C2TBJvnh.js";
14
14
  import { TextButton } from "./components/text-button.js";
@@ -1,5 +1,5 @@
1
1
  import { c as ZodObject, h as output } from "./schemas-CAtYiHoz.js";
2
- import { c as InputComponentProps, i as DefaultComponentType, r as AllowedComponentType, u as InputDefBaseProps } from "./dynamicInputs-BoAqswLw.js";
2
+ import { c as InputComponentProps, i as DefaultComponentType, r as AllowedComponentType, u as InputDefBaseProps } from "./dynamicInputs-CiJNkz3F.js";
3
3
  import { c as UIForm, l as UseFormProps, o as FormSubmitErrorHandler, s as FormSubmitHandler } from "./form.binding-DWlFTecs.js";
4
4
  import { DependencyList, ReactNode } from "react";
5
5
  //#region src/hooks/useAutosave.d.ts