@povio/ui 3.4.0-rc.9 → 4.0.0-rc.2
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/README.md +56 -2
- package/dist/Accordion-Cup5eRZz.d.ts +58 -0
- package/dist/Accordion-rZ9P9dZy.js +416 -0
- package/dist/Alert-BALBsBrP.js +240 -0
- package/dist/Alert-CbEhRaU5.d.ts +33 -0
- package/dist/AlertDialog-PjYM6lDo.d.ts +26 -0
- package/dist/Autocomplete-DE2lQi5o.d.ts +15 -0
- package/dist/Badge-CjPpYa50.d.ts +28 -0
- package/dist/BottomSheet-ByyAU_dJ.js +404 -0
- package/dist/BottomSheet-CT0zuola.d.ts +33 -0
- package/dist/BottomSheet.lazy-7AwnB4vS.d.ts +5 -0
- package/dist/Breadcrumbs-D-3YEuem.d.ts +19 -0
- package/dist/Breadcrumbs-UfRbfiqU.js +351 -0
- package/dist/Button-CRlZqaJq.js +89 -0
- package/dist/Button-CbwNjdRz.js +761 -0
- package/dist/Button-DTNjsGx5.d.ts +42 -0
- package/dist/ButtonContent-CohuJJzG.js +136 -0
- package/dist/Calendar-Ci0ysyfZ.js +753 -0
- package/dist/CheckContent-DzWpxKGq.js +19 -0
- package/dist/Checkbox-BJ7flpwA.js +227 -0
- package/dist/Checkbox-CBybJbLm.d.ts +26 -0
- package/dist/CheckboxCheckmark-C1X9yBT6.js +195 -0
- package/dist/CheckboxGroup-4xoWgmxr.d.ts +28 -0
- package/dist/DatePicker-CgCr_Z8r.js +434 -0
- package/dist/DatePicker-DyjAwAh6.d.ts +44 -0
- package/dist/DatePickerInput-B9Z_AUkC.js +945 -0
- package/dist/DatePickerInput-CdCtVE9z.d.ts +18 -0
- package/dist/DateRangePicker-CS69o2pD.js +1858 -0
- package/dist/DateRangePicker-Cdu1Sx37.d.ts +76 -0
- package/dist/DateTimePicker-ClSa8hFs.d.ts +44 -0
- package/dist/DateTimePicker-Xzc1ve3a.js +387 -0
- package/dist/Dialog-CLWfxiie.js +595 -0
- package/dist/Dialog-DEbI_9S-.d.ts +55 -0
- package/dist/Dialog-DLfOkNe9.js +60 -0
- package/dist/Drawer-D1cHiBFO.d.ts +18 -0
- package/dist/DropdownMenu-CZQRzOBb.d.ts +61 -0
- package/dist/DropdownMenu-hkpycd0j.js +178 -0
- package/dist/DropdownMenuDesktop-B0MKN0op.js +248 -0
- package/dist/FileInput-BQS6TAH7.js +236 -0
- package/dist/FileInput-CI8D_wf_.d.ts +70 -0
- package/dist/FileTrigger-C5r_5hvS.js +145 -0
- package/dist/FileUpload-BrnJdN3M.d.ts +7 -0
- package/dist/FileUpload-cS3NOaES.js +791 -0
- package/dist/FileUploadContainer-CkBENy6n.d.ts +5 -0
- package/dist/FocusScope-CNjWJz3s.js +343 -0
- package/dist/Form-Bam3kea-.js +10 -0
- package/dist/Form-NZGvsbuM.d.ts +49 -0
- package/dist/FormField-BHPdCLEV.js +211 -0
- package/dist/FormField-DTDj3F0A.d.ts +37 -0
- package/dist/FormFieldError-BT4uxbKY.d.ts +10 -0
- package/dist/FormFieldError-CFg0Wn3i.js +26 -0
- package/dist/FormFieldHeaderTooltip-b-kY0DgB.js +38 -0
- package/dist/Heading-D0cYUzVa.js +16 -0
- package/dist/IconButton-CYazzM7I.d.ts +16 -0
- package/dist/InlineIconButton-Rp5bXWcQ.d.ts +15 -0
- package/dist/InlineTooltipWrapper-BqLlgdD7.js +24 -0
- package/dist/Input-BmIahisJ.js +47 -0
- package/dist/Input-DSHFNEVl.d.ts +30 -0
- package/dist/InputContent-CvWm6GAv.d.ts +27 -0
- package/dist/InputItem-AU6mq7o-.js +63 -0
- package/dist/Inputs-AqKRElPz.js +17 -0
- package/dist/Inputs-DiFAIBZS.d.ts +13 -0
- package/dist/Label-C6BonuOp.js +17 -0
- package/dist/Link-D7QEPw-L.js +47 -0
- package/dist/Link-DS9-0Ijl.d.ts +27 -0
- package/dist/Link-e4ZWZNrO.js +42 -0
- package/dist/ListBox-Dx42Gif4.js +418 -0
- package/dist/MenuItem-CROWrE2A.d.ts +6 -0
- package/dist/Modal-C5Oi8GZF.js +152 -0
- package/dist/NumberField-BICDQ2gN.d.ts +30 -0
- package/dist/NumberRangeInput-BlGXChNR.d.ts +45 -0
- package/dist/NumberRangeInput-xjkniTH0.js +428 -0
- package/dist/OverlayArrow-BRnQo6-8.js +33 -0
- package/dist/Pagination-CumQED8X.d.ts +12 -0
- package/dist/PaginationList-D79ApWLm.d.ts +18 -0
- package/dist/PaginationList-Du7qn_AS.js +228 -0
- package/dist/PasswordInput-BdrYD1D3.d.ts +10 -0
- package/dist/PasswordInput-DTScGauT.js +63 -0
- package/dist/PillButton-CihEPQye.d.ts +15 -0
- package/dist/Popover-C0_-TLl_.d.ts +20 -0
- package/dist/Progress-CYfDXJKs.d.ts +44 -0
- package/dist/Progress-_jkt2pQw.js +145 -0
- package/dist/QuerySelect-V9C2b67x.d.ts +23 -0
- package/dist/RadioGroup-B9g4uT4E.js +380 -0
- package/dist/RadioGroup-WHWosz7K.d.ts +24 -0
- package/dist/RichTextEditor-CbgjRfiU.d.ts +26 -0
- package/dist/RichTextEditor-DWgaZLRW.js +925 -0
- package/dist/Select-O9dprkTa.js +159 -0
- package/dist/Select-wzB2aQ_X.d.ts +15 -0
- package/dist/SelectBase-DefgAEzh.d.ts +96 -0
- package/dist/SelectionIndicator-C9TY9dkk.js +5 -0
- package/dist/SharedElementTransition-lGqrCNlI.js +12 -0
- package/dist/Slider-CZMNmk6P.d.ts +22 -0
- package/dist/Slider-IDDtzb2P.js +246 -0
- package/dist/Spinner-BOgO9bS6.d.ts +29 -0
- package/dist/Spinner-owSXOEzg.js +113 -0
- package/dist/SplitButton-BPZbQeYC.d.ts +15 -0
- package/dist/Stepper-Coe3PAl_.js +336 -0
- package/dist/Stepper-PcHlxDD5.d.ts +113 -0
- package/dist/Switch-BaNEe9Nx.js +192 -0
- package/dist/Switch-C0S5Juhf.d.ts +22 -0
- package/dist/TableDnd-CuHxANWh.js +133 -0
- package/dist/Tag-1N-2yYCH.js +148 -0
- package/dist/Tag-CgPeLVXM.d.ts +44 -0
- package/dist/Text-D_lEB52w.js +5 -0
- package/dist/TextArea-BcIy_nZ2.js +181 -0
- package/dist/TextArea-CBWJ7w-p.d.ts +24 -0
- package/dist/TextButton-D7e_YBLe.d.ts +15 -0
- package/dist/TimePicker-BZ4WrI5Z.d.ts +33 -0
- package/dist/TimePicker-vbrwgBc5.js +428 -0
- package/dist/Toast-DIlYlUQk.d.ts +16 -0
- package/dist/ToastContainer-1H_IxvyH.d.ts +5 -0
- package/dist/ToastContainer-gdpK8d8m.js +55 -0
- package/dist/ToggleButton-C966bfpT.js +92 -0
- package/dist/ToggleButton-D4y2fLmN.d.ts +11 -0
- package/dist/ToggleGroup-BMZsbHY9.js +435 -0
- package/dist/ToggleGroup-D9CFdM5-.d.ts +7 -0
- package/dist/Tooltip-B-2AxyjP.d.ts +56 -0
- package/dist/Tooltip-BNAubrgG.js +299 -0
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +11 -0
- package/dist/TooltipWrapper-DYfZF2Ly.js +58 -0
- package/dist/Typography-AcUd9df8.js +31 -0
- package/dist/Typography-BWmZd20e.d.ts +12 -0
- package/dist/autocomplete-CaQSVRrw.d.ts +16 -0
- package/dist/button.cva-ChabF4Am.d.ts +106 -0
- package/dist/buttonContent.cva-CP857foM.d.ts +6 -0
- package/dist/chain-BKPAL-J_.js +10 -0
- package/dist/check-DefmU9oJ.js +13 -0
- package/dist/checkbox-D8CPWRlM.d.ts +9 -0
- package/dist/checkbox-group-BuPUA_Qj.d.ts +9 -0
- package/dist/checkbox.cva-DwnPS5df.d.ts +77 -0
- package/dist/chevron-down-RksSwG1O.js +13 -0
- package/dist/chevron-left-Dem1_TuL.js +13 -0
- package/dist/chevron-right-DXbvvsay.js +13 -0
- package/dist/chevron-up-CgEFpORu.js +13 -0
- package/dist/chevrons-right--HrJEes-.js +29 -0
- package/dist/clsx-CnD0nOiA.js +16 -0
- package/dist/common-UBFya8WY.d.ts +11 -0
- package/dist/components/accordion.d.ts +2 -0
- package/dist/components/accordion.js +2 -0
- package/dist/components/alert-dialog.d.ts +2 -0
- package/dist/components/alert-dialog.js +188 -0
- package/dist/components/alert.d.ts +2 -0
- package/dist/components/alert.js +2 -0
- package/dist/components/autocomplete/react-aria.d.ts +1 -0
- package/dist/components/autocomplete/react-aria.js +1 -0
- package/dist/components/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete.js +134 -0
- package/dist/components/badge.d.ts +2 -0
- package/dist/components/badge.js +98 -0
- package/dist/components/bottom-sheet.d.ts +3 -0
- package/dist/components/bottom-sheet.js +109 -0
- package/dist/components/breadcrumb/react-aria.d.ts +1 -0
- package/dist/components/breadcrumb/react-aria.js +1 -0
- package/dist/components/breadcrumbs/react-aria.d.ts +1 -0
- package/dist/components/breadcrumbs/react-aria.js +1 -0
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +2 -0
- package/dist/components/button/react-aria.d.ts +1 -0
- package/dist/components/button/react-aria.js +1 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -0
- package/dist/components/calendar/react-aria.d.ts +1 -0
- package/dist/components/calendar/react-aria.js +1 -0
- package/dist/components/calendar-cell/react-aria.d.ts +1 -0
- package/dist/components/calendar-cell/react-aria.js +1 -0
- package/dist/components/calendar-grid/react-aria.d.ts +1 -0
- package/dist/components/calendar-grid/react-aria.js +1 -0
- package/dist/components/calendar-grid-body/react-aria.d.ts +1 -0
- package/dist/components/calendar-grid-body/react-aria.js +1 -0
- package/dist/components/calendar-grid-header/react-aria.d.ts +1 -0
- package/dist/components/calendar-grid-header/react-aria.js +1 -0
- package/dist/components/calendar-header-cell/react-aria.d.ts +1 -0
- package/dist/components/calendar-header-cell/react-aria.js +1 -0
- package/dist/components/cell/react-aria.d.ts +1 -0
- package/dist/components/cell/react-aria.js +1 -0
- package/dist/components/checkbox/react-aria.d.ts +1 -0
- package/dist/components/checkbox/react-aria.js +1 -0
- package/dist/components/checkbox-group/react-aria.d.ts +1 -0
- package/dist/components/checkbox-group/react-aria.js +1 -0
- package/dist/components/checkbox-group.d.ts +2 -0
- package/dist/components/checkbox-group.js +164 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -0
- package/dist/components/collection/react-aria.d.ts +1 -0
- package/dist/components/collection/react-aria.js +1 -0
- package/dist/components/color-area/react-aria.d.ts +1 -0
- package/dist/components/color-area/react-aria.js +1 -0
- package/dist/components/color-field/react-aria.d.ts +1 -0
- package/dist/components/color-field/react-aria.js +1 -0
- package/dist/components/color-picker/react-aria.d.ts +1 -0
- package/dist/components/color-picker/react-aria.js +1 -0
- package/dist/components/color-slider/react-aria.d.ts +1 -0
- package/dist/components/color-slider/react-aria.js +1 -0
- package/dist/components/color-swatch/react-aria.d.ts +1 -0
- package/dist/components/color-swatch/react-aria.js +1 -0
- package/dist/components/color-swatch-picker/react-aria.d.ts +5 -0
- package/dist/components/color-swatch-picker/react-aria.js +1 -0
- package/dist/components/color-swatch-picker-item/react-aria.d.ts +5 -0
- package/dist/components/color-swatch-picker-item/react-aria.js +1 -0
- package/dist/components/color-thumb/react-aria.d.ts +1 -0
- package/dist/components/color-thumb/react-aria.js +1 -0
- package/dist/components/color-wheel/react-aria.d.ts +1 -0
- package/dist/components/color-wheel/react-aria.js +1 -0
- package/dist/components/color-wheel-track/react-aria.d.ts +1 -0
- package/dist/components/color-wheel-track/react-aria.js +1 -0
- package/dist/components/column/react-aria.d.ts +1 -0
- package/dist/components/column/react-aria.js +1 -0
- package/dist/components/column-resizer/react-aria.d.ts +1 -0
- package/dist/components/column-resizer/react-aria.js +1 -0
- package/dist/components/combo-box/react-aria.d.ts +1 -0
- package/dist/components/combo-box/react-aria.js +1 -0
- package/dist/components/date-field/react-aria.d.ts +1 -0
- package/dist/components/date-field/react-aria.js +1 -0
- package/dist/components/date-input/react-aria.d.ts +1 -0
- package/dist/components/date-input/react-aria.js +1 -0
- package/dist/components/date-picker/react-aria.d.ts +1 -0
- package/dist/components/date-picker/react-aria.js +1 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/date-range-picker/react-aria.d.ts +1 -0
- package/dist/components/date-range-picker/react-aria.js +1 -0
- package/dist/components/date-range-picker.d.ts +27 -0
- package/dist/components/date-range-picker.js +2 -0
- package/dist/components/date-segment/react-aria.d.ts +1 -0
- package/dist/components/date-segment/react-aria.js +1 -0
- package/dist/components/date-time-picker.d.ts +2 -0
- package/dist/components/date-time-picker.js +2 -0
- package/dist/components/default-collection-renderer/react-aria.d.ts +1 -0
- package/dist/components/default-collection-renderer/react-aria.js +1 -0
- package/dist/components/dialog/react-aria.d.ts +1 -0
- package/dist/components/dialog/react-aria.js +1 -0
- package/dist/components/dialog-trigger/react-aria.d.ts +1 -0
- package/dist/components/dialog-trigger/react-aria.js +1 -0
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/disclosure/react-aria.d.ts +1 -0
- package/dist/components/disclosure/react-aria.js +1 -0
- package/dist/components/disclosure-group/react-aria.d.ts +1 -0
- package/dist/components/disclosure-group/react-aria.js +1 -0
- package/dist/components/disclosure-panel/react-aria.d.ts +1 -0
- package/dist/components/disclosure-panel/react-aria.js +1 -0
- package/dist/components/dom-attributes/react-aria.d.ts +1 -0
- package/dist/components/dom-attributes/react-aria.js +0 -0
- package/dist/components/drawer.d.ts +2 -0
- package/dist/components/drawer.js +96 -0
- package/dist/components/drop-indicator/react-aria.d.ts +1 -0
- package/dist/components/drop-indicator/react-aria.js +1 -0
- package/dist/components/drop-zone/react-aria.d.ts +1 -0
- package/dist/components/drop-zone/react-aria.js +1 -0
- package/dist/components/dropdown-menu.d.ts +3 -0
- package/dist/components/dropdown-menu.js +3 -0
- package/dist/components/field-error/react-aria.d.ts +1 -0
- package/dist/components/field-error/react-aria.js +1 -0
- package/dist/components/file-input.d.ts +2 -0
- package/dist/components/file-input.js +2 -0
- package/dist/components/file-trigger/react-aria.d.ts +1 -0
- package/dist/components/file-trigger/react-aria.js +1 -0
- package/dist/components/file-upload-container.d.ts +3 -0
- package/dist/components/file-upload-container.js +15 -0
- package/dist/components/file-upload.d.ts +3 -0
- package/dist/components/file-upload.js +2 -0
- package/dist/components/focusable/react-aria.d.ts +1 -0
- package/dist/components/focusable/react-aria.js +1 -0
- package/dist/components/form/react-aria.d.ts +1 -0
- package/dist/components/form/react-aria.js +1 -0
- package/dist/components/form-field.d.ts +2 -0
- package/dist/components/form-field.js +2 -0
- package/dist/components/grid-list/react-aria.d.ts +1 -0
- package/dist/components/grid-list/react-aria.js +1 -0
- package/dist/components/grid-list-header/react-aria.d.ts +1 -0
- package/dist/components/grid-list-header/react-aria.js +1 -0
- package/dist/components/grid-list-item/react-aria.d.ts +1 -0
- package/dist/components/grid-list-item/react-aria.js +1 -0
- package/dist/components/grid-list-load-more-item/react-aria.d.ts +1 -0
- package/dist/components/grid-list-load-more-item/react-aria.js +1 -0
- package/dist/components/grid-list-section/react-aria.d.ts +1 -0
- package/dist/components/grid-list-section/react-aria.js +1 -0
- package/dist/components/group/react-aria.d.ts +1 -0
- package/dist/components/group/react-aria.js +1 -0
- package/dist/components/header/react-aria.d.ts +1 -0
- package/dist/components/header/react-aria.js +1 -0
- package/dist/components/heading/react-aria.d.ts +1 -0
- package/dist/components/heading/react-aria.js +1 -0
- package/dist/components/i18n-provider/react-aria.d.ts +1 -0
- package/dist/components/i18n-provider/react-aria.js +1 -0
- package/dist/components/icon-button.d.ts +2 -0
- package/dist/components/icon-button.js +55 -0
- package/dist/components/inline-icon-button.d.ts +2 -0
- package/dist/components/inline-icon-button.js +40 -0
- package/dist/components/input/react-aria.d.ts +1 -0
- package/dist/components/input/react-aria.js +1 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.js +242 -0
- package/dist/components/key/react-aria.d.ts +1 -0
- package/dist/components/key/react-aria.js +0 -0
- package/dist/components/keyboard/react-aria.d.ts +1 -0
- package/dist/components/keyboard/react-aria.js +1 -0
- package/dist/components/label/react-aria.d.ts +1 -0
- package/dist/components/label/react-aria.js +1 -0
- package/dist/components/link/react-aria.d.ts +1 -0
- package/dist/components/link/react-aria.js +1 -0
- package/dist/components/link.d.ts +2 -0
- package/dist/components/link.js +2 -0
- package/dist/components/list-box/react-aria.d.ts +1 -0
- package/dist/components/list-box/react-aria.js +1 -0
- package/dist/components/list-box-item/react-aria.d.ts +1 -0
- package/dist/components/list-box-item/react-aria.js +1 -0
- package/dist/components/list-box-load-more-item/react-aria.d.ts +1 -0
- package/dist/components/list-box-load-more-item/react-aria.js +1 -0
- package/dist/components/list-box-section/react-aria.d.ts +1 -0
- package/dist/components/list-box-section/react-aria.js +1 -0
- package/dist/components/menu/react-aria.d.ts +1 -0
- package/dist/components/menu/react-aria.js +1 -0
- package/dist/components/menu-item/react-aria.d.ts +1 -0
- package/dist/components/menu-item/react-aria.js +1 -0
- package/dist/components/menu-section/react-aria.d.ts +1 -0
- package/dist/components/menu-section/react-aria.js +1 -0
- package/dist/components/menu-trigger/react-aria.d.ts +1 -0
- package/dist/components/menu-trigger/react-aria.js +1 -0
- package/dist/components/meter/react-aria.d.ts +1 -0
- package/dist/components/meter/react-aria.js +1 -0
- package/dist/components/modal/react-aria.d.ts +1 -0
- package/dist/components/modal/react-aria.js +1 -0
- package/dist/components/modal-overlay/react-aria.d.ts +1 -0
- package/dist/components/modal-overlay/react-aria.js +1 -0
- package/dist/components/number-field/react-aria.d.ts +1 -0
- package/dist/components/number-field/react-aria.js +1 -0
- package/dist/components/number-field.d.ts +2 -0
- package/dist/components/number-field.js +245 -0
- package/dist/components/number-range-input.d.ts +2 -0
- package/dist/components/number-range-input.js +2 -0
- package/dist/components/overlay-arrow/react-aria.d.ts +1 -0
- package/dist/components/overlay-arrow/react-aria.js +1 -0
- package/dist/components/pagination-list.d.ts +2 -0
- package/dist/components/pagination-list.js +2 -0
- package/dist/components/pagination.d.ts +2 -0
- package/dist/components/pagination.js +131 -0
- package/dist/components/password-input.d.ts +2 -0
- package/dist/components/password-input.js +2 -0
- package/dist/components/pill-button.d.ts +2 -0
- package/dist/components/pill-button.js +73 -0
- package/dist/components/popover/react-aria.d.ts +1 -0
- package/dist/components/popover/react-aria.js +1 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +126 -0
- package/dist/components/pressable/react-aria.d.ts +1 -0
- package/dist/components/pressable/react-aria.js +1 -0
- package/dist/components/progress-bar/react-aria.d.ts +1 -0
- package/dist/components/progress-bar/react-aria.js +1 -0
- package/dist/components/progress.d.ts +2 -0
- package/dist/components/progress.js +2 -0
- package/dist/components/provider/react-aria.d.ts +1 -0
- package/dist/components/provider/react-aria.js +1 -0
- package/dist/components/query-autocomplete.d.ts +8 -0
- package/dist/components/query-autocomplete.js +126 -0
- package/dist/components/query-select.d.ts +2 -0
- package/dist/components/query-select.js +138 -0
- package/dist/components/radio/react-aria.d.ts +1 -0
- package/dist/components/radio/react-aria.js +1 -0
- package/dist/components/radio-group/react-aria.d.ts +1 -0
- package/dist/components/radio-group/react-aria.js +1 -0
- package/dist/components/radio-group.d.ts +2 -0
- package/dist/components/radio-group.js +2 -0
- package/dist/components/range-calendar/react-aria.d.ts +1 -0
- package/dist/components/range-calendar/react-aria.js +1 -0
- package/dist/components/resizable-table-container/react-aria.d.ts +1 -0
- package/dist/components/resizable-table-container/react-aria.js +1 -0
- package/dist/components/router-provider/react-aria.d.ts +1 -0
- package/dist/components/router-provider/react-aria.js +1 -0
- package/dist/components/row/react-aria.d.ts +1 -0
- package/dist/components/row/react-aria.js +1 -0
- package/dist/components/search-field/react-aria.d.ts +1 -0
- package/dist/components/search-field/react-aria.js +1 -0
- package/dist/components/section/react-aria.d.ts +1 -0
- package/dist/components/section/react-aria.js +1 -0
- package/dist/components/select/react-aria.d.ts +1 -0
- package/dist/components/select/react-aria.js +1 -0
- package/dist/components/select-value/react-aria.d.ts +1 -0
- package/dist/components/select-value/react-aria.js +1 -0
- package/dist/components/select.d.ts +3 -0
- package/dist/components/select.js +2 -0
- package/dist/components/selection/react-aria.d.ts +1 -0
- package/dist/components/selection/react-aria.js +0 -0
- package/dist/components/selection-indicator/react-aria.d.ts +1 -0
- package/dist/components/selection-indicator/react-aria.js +1 -0
- package/dist/components/separator/react-aria.d.ts +1 -0
- package/dist/components/separator/react-aria.js +1 -0
- package/dist/components/shared-element/react-aria.d.ts +1 -0
- package/dist/components/shared-element/react-aria.js +1 -0
- package/dist/components/shared-element-transition/react-aria.d.ts +1 -0
- package/dist/components/shared-element-transition/react-aria.js +1 -0
- package/dist/components/slider/react-aria.d.ts +1 -0
- package/dist/components/slider/react-aria.js +1 -0
- package/dist/components/slider-output/react-aria.d.ts +1 -0
- package/dist/components/slider-output/react-aria.js +1 -0
- package/dist/components/slider-thumb/react-aria.d.ts +1 -0
- package/dist/components/slider-thumb/react-aria.js +1 -0
- package/dist/components/slider-track/react-aria.d.ts +1 -0
- package/dist/components/slider-track/react-aria.js +1 -0
- package/dist/components/slider.d.ts +2 -0
- package/dist/components/slider.js +2 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +2 -0
- package/dist/components/split-button.d.ts +2 -0
- package/dist/components/split-button.js +123 -0
- package/dist/components/ssr-provider/react-aria.d.ts +1 -0
- package/dist/components/ssr-provider/react-aria.js +1 -0
- package/dist/components/stepper.d.ts +2 -0
- package/dist/components/stepper.js +2 -0
- package/dist/components/submenu-trigger/react-aria.d.ts +1 -0
- package/dist/components/submenu-trigger/react-aria.js +1 -0
- package/dist/components/switch/react-aria.d.ts +1 -0
- package/dist/components/switch/react-aria.js +1 -0
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +2 -0
- package/dist/components/tab/react-aria.d.ts +1 -0
- package/dist/components/tab/react-aria.js +1 -0
- package/dist/components/tab-list/react-aria.d.ts +1 -0
- package/dist/components/tab-list/react-aria.js +1 -0
- package/dist/components/tab-panel/react-aria.d.ts +1 -0
- package/dist/components/tab-panel/react-aria.js +1 -0
- package/dist/components/tab-panels/react-aria.d.ts +1 -0
- package/dist/components/tab-panels/react-aria.js +1 -0
- package/dist/components/table/react-aria.d.ts +1 -0
- package/dist/components/table/react-aria.js +1 -0
- package/dist/components/table-body/react-aria.d.ts +1 -0
- package/dist/components/table-body/react-aria.js +1 -0
- package/dist/components/table-header/react-aria.d.ts +1 -0
- package/dist/components/table-header/react-aria.js +1 -0
- package/dist/components/table-load-more-item/react-aria.d.ts +1 -0
- package/dist/components/table-load-more-item/react-aria.js +1 -0
- package/dist/components/tabs/react-aria.d.ts +1 -0
- package/dist/components/tabs/react-aria.js +1 -0
- package/dist/components/tag/react-aria.d.ts +1 -0
- package/dist/components/tag/react-aria.js +1 -0
- package/dist/components/tag-group/react-aria.d.ts +1 -0
- package/dist/components/tag-group/react-aria.js +1 -0
- package/dist/components/tag-list/react-aria.d.ts +1 -0
- package/dist/components/tag-list/react-aria.js +1 -0
- package/dist/components/tag.d.ts +2 -0
- package/dist/components/tag.js +2 -0
- package/dist/components/text/react-aria.d.ts +1 -0
- package/dist/components/text/react-aria.js +1 -0
- package/dist/components/text-area/react-aria.d.ts +1 -0
- package/dist/components/text-area/react-aria.js +1 -0
- package/dist/components/text-area.d.ts +2 -0
- package/dist/components/text-area.js +2 -0
- package/dist/components/text-button.d.ts +2 -0
- package/dist/components/text-button.js +36 -0
- package/dist/components/text-field/react-aria.d.ts +1 -0
- package/dist/components/text-field/react-aria.js +1 -0
- package/dist/components/time-field/react-aria.d.ts +1 -0
- package/dist/components/time-field/react-aria.js +1 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/toast/react-aria.d.ts +1 -0
- package/dist/components/toast/react-aria.js +1 -0
- package/dist/components/toast-content/react-aria.d.ts +1 -0
- package/dist/components/toast-content/react-aria.js +1 -0
- package/dist/components/toast-list/react-aria.d.ts +1 -0
- package/dist/components/toast-list/react-aria.js +1 -0
- package/dist/components/toast-region/react-aria.d.ts +1 -0
- package/dist/components/toast-region/react-aria.js +1 -0
- package/dist/components/toast.d.ts +4 -0
- package/dist/components/toast.js +3 -0
- package/dist/components/toggle-button/react-aria.d.ts +1 -0
- package/dist/components/toggle-button/react-aria.js +1 -0
- package/dist/components/toggle-button-group/react-aria.d.ts +5 -0
- package/dist/components/toggle-button-group/react-aria.js +1 -0
- package/dist/components/toggle-button.d.ts +2 -0
- package/dist/components/toggle-button.js +38 -0
- package/dist/components/toggle-group.d.ts +3 -0
- package/dist/components/toggle-group.js +2 -0
- package/dist/components/toolbar/react-aria.d.ts +1 -0
- package/dist/components/toolbar/react-aria.js +1 -0
- package/dist/components/tooltip/react-aria.d.ts +1 -0
- package/dist/components/tooltip/react-aria.js +1 -0
- package/dist/components/tooltip-ellipsis.d.ts +2 -0
- package/dist/components/tooltip-ellipsis.js +46 -0
- package/dist/components/tooltip-trigger/react-aria.d.ts +1 -0
- package/dist/components/tooltip-trigger/react-aria.js +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -0
- package/dist/components/tree/react-aria.d.ts +1 -0
- package/dist/components/tree/react-aria.js +1 -0
- package/dist/components/tree-item/react-aria.d.ts +1 -0
- package/dist/components/tree-item/react-aria.js +1 -0
- package/dist/components/tree-item-content/react-aria.d.ts +1 -0
- package/dist/components/tree-item-content/react-aria.js +1 -0
- package/dist/components/tree-load-more-item/react-aria.d.ts +1 -0
- package/dist/components/tree-load-more-item/react-aria.js +1 -0
- package/dist/components/typography.d.ts +3 -0
- package/dist/components/typography.js +2 -0
- package/dist/components/use-focus-visible/react-aria.d.ts +1 -0
- package/dist/components/use-focus-visible/react-aria.js +1 -0
- package/dist/components/use-focus-within/react-aria.d.ts +1 -0
- package/dist/components/use-focus-within/react-aria.js +1 -0
- package/dist/components/use-hover/react-aria.d.ts +1 -0
- package/dist/components/use-hover/react-aria.js +1 -0
- package/dist/components/use-label/react-aria.d.ts +1 -0
- package/dist/components/use-label/react-aria.js +1 -0
- package/dist/components/use-text-field/react-aria.d.ts +1 -0
- package/dist/components/use-text-field/react-aria.js +1 -0
- package/dist/components/use-toast.d.ts +2 -0
- package/dist/components/use-toast.js +42 -0
- package/dist/components/virtualizer/react-aria.d.ts +1 -0
- package/dist/components/virtualizer/react-aria.js +1 -0
- package/dist/components/visually-hidden/react-aria.d.ts +1 -0
- package/dist/components/visually-hidden/react-aria.js +1 -0
- package/dist/compoundMapper-CMoX98D2.d.ts +17 -0
- package/dist/compoundMapper-Di3SKZnS.js +13 -0
- package/dist/config/confirmation.d.ts +2 -0
- package/dist/config/confirmation.js +2 -0
- package/dist/config/link-context.d.ts +3 -0
- package/dist/config/link-context.js +2 -0
- package/dist/config/resources.d.ts +2 -0
- package/dist/config/resources.js +2 -0
- package/dist/config/theme-context.d.ts +2 -0
- package/dist/config/theme-context.js +2 -0
- package/dist/config/ui-config.d.ts +3 -0
- package/dist/config/ui-config.js +2 -0
- package/dist/config/ui-overrides.d.ts +2 -0
- package/dist/config/ui-overrides.js +2 -0
- package/dist/config/ui-router.d.ts +2 -0
- package/dist/config/ui-router.js +2 -0
- package/dist/confirmation.context-BcX0qVEy.js +114 -0
- package/dist/confirmation.context-fKfUTsLF.d.ts +23 -0
- package/dist/createLucideIcon-LS26Bb1M.js +125 -0
- package/dist/date-picker-DiMaoYoA.d.ts +9 -0
- package/dist/date-range-picker-DSkNEa35.d.ts +9 -0
- package/dist/date-time-picker-B5s2PMFw.d.ts +9 -0
- package/dist/date-time.utils-0F9qduim.js +190 -0
- package/dist/date-time.utils-Cu9TVj46.d.ts +45 -0
- package/dist/date.transforms-DLg-eFcE.js +15 -0
- package/dist/date.utils-B8_QF9y6.js +42 -0
- package/dist/date.utils-BoQnMRlF.d.ts +7 -0
- package/dist/datePickerValue.utils-BxOJpTbb.js +223 -0
- package/dist/dialog.cva-5qNq9YfM.js +43 -0
- package/dist/dist-BAT04RMQ.js +1740 -0
- package/dist/dom.utils-D08rHcQ2.js +49 -0
- package/dist/dynamicInputs-CRMWIpHA.js +194 -0
- package/dist/dynamicInputs-m_DQu5q0.js +214 -0
- package/dist/dynamicInputs-uIhp1Ly-.d.ts +771 -0
- package/dist/exports-DUKqxyno.js +20 -0
- package/dist/fieldAdapter-BaQgRGA9.js +61 -0
- package/dist/fieldAdapter-C4sDFC8f.d.ts +9 -0
- package/dist/file-input-D-46wS5j.d.ts +9 -0
- package/dist/file-upload-BG20Bhrn.d.ts +10 -0
- package/dist/file.utils-Crb-mIHs.d.ts +21 -0
- package/dist/file.utils-DqQxnuAm.js +61 -0
- package/dist/fileUpload.types-xFzuCT_m.d.ts +110 -0
- package/dist/focusSafely-BDIcvqPb.js +437 -0
- package/dist/form.binding-DLM7NA2s.js +179 -0
- package/dist/form.binding-DVJ5F0JE.d.ts +51 -0
- package/dist/form.types-CecYaerF.d.ts +13 -0
- package/dist/form.types-ZNGbcqJS.d.ts +13 -0
- package/dist/getScrollParent-WT3K8H_b.js +36 -0
- package/dist/hooks/use-filters.d.ts +2 -0
- package/dist/hooks/use-filters.js +2 -0
- package/dist/hooks/use-local-storage.d.ts +2 -0
- package/dist/hooks/use-local-storage.js +2 -0
- package/dist/hooks/use-translation-memo.d.ts +2 -0
- package/dist/hooks/use-translation-memo.js +2 -0
- package/dist/i18n-BDjNuy4Z.js +302 -0
- package/dist/i18n-D0Pz0p2u.d.ts +318 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +2 -0
- package/dist/import-DDGNxVX8.js +45 -0
- package/dist/index.d.ts +105 -1
- package/dist/index.js +113 -120
- package/dist/input-CKGPYwfB.d.ts +8 -0
- package/dist/input.cva-ByFuAEIS.d.ts +83 -0
- package/dist/input.cva-KYGD4Bdz.js +324 -0
- package/dist/intl.utils-NaOZUD2G.d.ts +9 -0
- package/dist/intl.utils-zwAFoZ0U.js +38 -0
- package/dist/intlStrings-A7XlNdi7.js +346 -0
- package/dist/link.context-C5ZgwVM5.d.ts +12 -0
- package/dist/link.context-J7aQtMOr.js +35 -0
- package/dist/logger-CqZjM-sn.js +333 -0
- package/dist/logger-N35Xhi14.d.ts +10 -0
- package/dist/number-field-CyP6XgJh.d.ts +8 -0
- package/dist/number-range-input-DMmlk7Bl.d.ts +8 -0
- package/dist/numberStatic.utils-DAI7Bef3.js +902 -0
- package/dist/openLink-BrfLaWo4.js +121 -0
- package/dist/outline.clsx-50W_vNDl.js +6 -0
- package/dist/outline.clsx-B1hjrX9t.d.ts +4 -0
- package/dist/password-input-BWpfQe0G.d.ts +8 -0
- package/dist/pillButton.cva-6tjADUQ6.js +265 -0
- package/dist/pillButton.cva-BVsxGnqF.d.ts +36 -0
- package/dist/platform-3R53zj-n.js +42 -0
- package/dist/popover.cva-CXha_UMQ.js +5 -0
- package/dist/queries.utils-CmbhAoHU.js +18 -0
- package/dist/query-autocomplete-BeNfRDM_.d.ts +14 -0
- package/dist/query-select-Ded04eju.d.ts +15 -0
- package/dist/queryAutocomplete.types-BlpCYzfA.d.ts +26 -0
- package/dist/radio-group-CmUtsjqP.d.ts +9 -0
- package/dist/radio.cva-DAq2M13H.d.ts +51 -0
- package/dist/rhf/autocomplete.d.ts +3 -0
- package/dist/rhf/autocomplete.js +8 -0
- package/dist/rhf/checkbox-group.d.ts +3 -0
- package/dist/rhf/checkbox-group.js +8 -0
- package/dist/rhf/checkbox.d.ts +3 -0
- package/dist/rhf/checkbox.js +8 -0
- package/dist/rhf/date-picker.d.ts +3 -0
- package/dist/rhf/date-picker.js +9 -0
- package/dist/rhf/date-range-picker.d.ts +3 -0
- package/dist/rhf/date-range-picker.js +9 -0
- package/dist/rhf/date-time-picker.d.ts +3 -0
- package/dist/rhf/date-time-picker.js +9 -0
- package/dist/rhf/file-input.d.ts +3 -0
- package/dist/rhf/file-input.js +6 -0
- package/dist/rhf/file-upload.d.ts +3 -0
- package/dist/rhf/file-upload.js +6 -0
- package/dist/rhf/input.d.ts +3 -0
- package/dist/rhf/input.js +6 -0
- package/dist/rhf/inputs.d.ts +4 -0
- package/dist/rhf/inputs.js +2 -0
- package/dist/rhf/number-field.d.ts +3 -0
- package/dist/rhf/number-field.js +6 -0
- package/dist/rhf/number-range-input.d.ts +3 -0
- package/dist/rhf/number-range-input.js +6 -0
- package/dist/rhf/password-input.d.ts +3 -0
- package/dist/rhf/password-input.js +6 -0
- package/dist/rhf/query-autocomplete.d.ts +2 -0
- package/dist/rhf/query-autocomplete.js +8 -0
- package/dist/rhf/query-select.d.ts +2 -0
- package/dist/rhf/query-select.js +8 -0
- package/dist/rhf/radio-group.d.ts +3 -0
- package/dist/rhf/radio-group.js +8 -0
- package/dist/rhf/rich-text-editor.d.ts +3 -0
- package/dist/rhf/rich-text-editor.js +6 -0
- package/dist/rhf/select.d.ts +3 -0
- package/dist/rhf/select.js +8 -0
- package/dist/rhf/slider.d.ts +3 -0
- package/dist/rhf/slider.js +6 -0
- package/dist/rhf/switch.d.ts +3 -0
- package/dist/rhf/switch.js +8 -0
- package/dist/rhf/text-area.d.ts +3 -0
- package/dist/rhf/text-area.js +6 -0
- package/dist/rhf/time-picker.d.ts +3 -0
- package/dist/rhf/time-picker.js +9 -0
- package/dist/rhf/toggle-group.d.ts +3 -0
- package/dist/rhf/toggle-group.js +6 -0
- package/dist/rhf-C52xZuFt.js +256 -0
- package/dist/rhf.d.ts +105 -225
- package/dist/rhf.js +101 -0
- package/dist/rich-text-editor-Db3XWWFo.d.ts +8 -0
- package/dist/rich-text-editor.d.ts +2 -0
- package/dist/rich-text-editor.js +2 -0
- package/dist/router.context-Bft1psqn.js +63 -0
- package/dist/router.context-CtafjXV7.d.ts +16 -0
- package/dist/routing.utils-UTQonIhB.js +25 -0
- package/dist/select-DXGbGkZM.d.ts +16 -0
- package/dist/slider-JQh0ypfU.d.ts +8 -0
- package/dist/staticDateTimeSegments-B9kkwiDz.js +3601 -0
- package/dist/staticSelect.utils-CBmV4sam.js +1834 -0
- package/dist/string.utils-BPgv6QwA.js +12 -0
- package/dist/string.utils-Cj6AB7uZ.d.ts +7 -0
- package/dist/styles/input.d.ts +2 -0
- package/dist/styles/input.js +0 -0
- package/dist/styles/outline.d.ts +2 -0
- package/dist/styles/outline.js +2 -0
- package/dist/switch-Lm3xl1rQ.d.ts +9 -0
- package/dist/switch.cva-BIioyegR.d.ts +15 -0
- package/dist/tanstack/autocomplete.d.ts +2 -0
- package/dist/tanstack/autocomplete.js +2 -0
- package/dist/tanstack/checkbox-group.d.ts +2 -0
- package/dist/tanstack/checkbox-group.js +2 -0
- package/dist/tanstack/checkbox.d.ts +2 -0
- package/dist/tanstack/checkbox.js +2 -0
- package/dist/tanstack/date-picker.d.ts +2 -0
- package/dist/tanstack/date-picker.js +2 -0
- package/dist/tanstack/date-range-picker.d.ts +2 -0
- package/dist/tanstack/date-range-picker.js +2 -0
- package/dist/tanstack/date-time-picker.d.ts +2 -0
- package/dist/tanstack/date-time-picker.js +2 -0
- package/dist/tanstack/file-input.d.ts +2 -0
- package/dist/tanstack/file-input.js +2 -0
- package/dist/tanstack/file-upload.d.ts +3 -0
- package/dist/tanstack/file-upload.js +2 -0
- package/dist/tanstack/form.d.ts +3 -0
- package/dist/tanstack/form.js +3 -0
- package/dist/tanstack/input.d.ts +2 -0
- package/dist/tanstack/input.js +2 -0
- package/dist/tanstack/inputs.d.ts +5 -0
- package/dist/tanstack/inputs.js +3 -0
- package/dist/tanstack/number-field.d.ts +2 -0
- package/dist/tanstack/number-field.js +2 -0
- package/dist/tanstack/number-range-input.d.ts +2 -0
- package/dist/tanstack/number-range-input.js +2 -0
- package/dist/tanstack/password-input.d.ts +2 -0
- package/dist/tanstack/password-input.js +2 -0
- package/dist/tanstack/query-autocomplete.d.ts +2 -0
- package/dist/tanstack/query-autocomplete.js +2 -0
- package/dist/tanstack/query-select.d.ts +2 -0
- package/dist/tanstack/query-select.js +2 -0
- package/dist/tanstack/radio-group.d.ts +2 -0
- package/dist/tanstack/radio-group.js +2 -0
- package/dist/tanstack/rich-text-editor.d.ts +2 -0
- package/dist/tanstack/rich-text-editor.js +2 -0
- package/dist/tanstack/select.d.ts +2 -0
- package/dist/tanstack/select.js +2 -0
- package/dist/tanstack/slider.d.ts +2 -0
- package/dist/tanstack/slider.js +2 -0
- package/dist/tanstack/switch.d.ts +2 -0
- package/dist/tanstack/switch.js +2 -0
- package/dist/tanstack/table.d.ts +2 -0
- package/dist/tanstack/table.js +2 -0
- package/dist/tanstack/text-area.d.ts +2 -0
- package/dist/tanstack/text-area.js +2 -0
- package/dist/tanstack/time-picker.d.ts +2 -0
- package/dist/tanstack/time-picker.js +2 -0
- package/dist/tanstack/toggle-group.d.ts +3 -0
- package/dist/tanstack/toggle-group.js +2 -0
- package/dist/tanstack.d.ts +92 -224
- package/dist/tanstack.js +97 -141
- package/dist/text-area-I5MNcGp_.d.ts +8 -0
- package/dist/theme.context-B3wQDJ-i.js +120 -0
- package/dist/theme.context-DfBt5Pz6.d.ts +20 -0
- package/dist/time-picker-DdhW8GmD.d.ts +9 -0
- package/dist/toast.cva-LU7TGprV.d.ts +60 -0
- package/dist/toast.runtime-BZQH-7Ba.js +17 -0
- package/dist/toastActivation.store-BELtcr76.js +16 -0
- package/dist/toggle-group-CPkKHm1t.d.ts +9 -0
- package/dist/toggleGroup.types-DD6uRI5G.d.ts +58 -0
- package/dist/tooltipWrapper.cva-CUu8pI-a.js +5 -0
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +0 -0
- package/dist/typography.cva-BI0FyIqm.js +129 -0
- package/dist/typography.cva-YaO6JLqU.d.ts +51 -0
- package/dist/uiConfig.context-BB7_zyOU.d.ts +126 -0
- package/dist/uiConfig.context-BvBsrMFI.js +366 -0
- package/dist/uiOverrides.context-Bfm2n-n8.js +399 -0
- package/dist/uiOverrides.context-C3xb4Ttq.d.ts +243 -0
- package/dist/useBreakpoint-CDKDB0E2.js +70 -0
- package/dist/useControlledState-BMVd3AOQ.js +189 -0
- package/dist/useFieldAccessibility-Bq-m3qhs.js +96 -0
- package/dist/useFilters-BxRScJdn.d.ts +11 -0
- package/dist/useFilters-KS2CQs_j.js +190 -0
- package/dist/useFocusable-BIU1drrg.js +63 -0
- package/dist/useFormAutosave-Bcbvu28I.js +198 -0
- package/dist/useFormValidationState-Dl-Nh0G1.js +1345 -0
- package/dist/useIntersectionObserver-DYfHnGGU.js +98 -0
- package/dist/useLayoutEffect-DN7Dbrb9.js +58 -0
- package/dist/useLocalStorage-DGsBUCT6.d.ts +13 -0
- package/dist/useLocalStorage-PlcaJ1tP.js +70 -0
- package/dist/useQueryAutocomplete-CraXvRm_.js +152 -0
- package/dist/useStaticInputHandoff-Denoy4V_.js +332 -0
- package/dist/useSyncRef-Dsn4Ybiw.js +338 -0
- package/dist/useTableColumnConfig-DSJeSKeA.js +1620 -0
- package/dist/useTableNav-Tu8UZxHA.d.ts +291 -0
- package/dist/useToast-NBGlVeFP.d.ts +16 -0
- package/dist/useTranslationMemo-CrZbeyBv.js +32 -0
- package/dist/useTranslationMemo-Dy3p6m1g.d.ts +6 -0
- package/dist/utils/compound-mapper.d.ts +2 -0
- package/dist/utils/compound-mapper.js +2 -0
- package/dist/utils/date-time.d.ts +2 -0
- package/dist/utils/date-time.js +2 -0
- package/dist/utils/date.d.ts +2 -0
- package/dist/utils/date.js +2 -0
- package/dist/utils/file.d.ts +2 -0
- package/dist/utils/file.js +2 -0
- package/dist/utils/intl.d.ts +2 -0
- package/dist/utils/intl.js +2 -0
- package/dist/utils/logger.d.ts +2 -7
- package/dist/utils/logger.js +1 -18
- package/dist/utils/string.d.ts +2 -0
- package/dist/utils/string.js +2 -0
- package/dist/utils-D3gCeElo.js +145 -0
- package/dist/x-BD2AijMA.js +16 -0
- package/dist/zod.utils-DrrPDT9v.js +24 -0
- package/package.json +1376 -25
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/en/translation.json.js +0 -147
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/assets/locales/sl/translation.json.js +0 -145
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -16
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -112
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +0 -45
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +0 -27
- package/dist/components/Menu/Menu.d.ts +0 -21
- package/dist/components/Menu/Menu.js +0 -27
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuDesktop.js +0 -48
- package/dist/components/Menu/MenuItem.d.ts +0 -3
- package/dist/components/Menu/MenuItem.js +0 -46
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.js +0 -142
- package/dist/components/Menu/MenuPopover.d.ts +0 -5
- package/dist/components/Menu/MenuPopover.js +0 -121
- package/dist/components/Menu/menu.cva.d.ts +0 -39
- package/dist/components/Menu/menu.cva.js +0 -34
- package/dist/components/buttons/Button/Button.d.ts +0 -28
- package/dist/components/buttons/Button/Button.js +0 -66
- package/dist/components/buttons/Button/button.cva.d.ts +0 -99
- package/dist/components/buttons/Button/button.cva.js +0 -661
- package/dist/components/buttons/IconButton/IconButton.d.ts +0 -11
- package/dist/components/buttons/IconButton/IconButton.js +0 -51
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +0 -13
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -15
- package/dist/components/buttons/PillButton/PillButton.d.ts +0 -12
- package/dist/components/buttons/PillButton/PillButton.js +0 -72
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +0 -40
- package/dist/components/buttons/PillButton/pillButton.cva.js +0 -264
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +0 -12
- package/dist/components/buttons/SplitButton/SplitButton.js +0 -123
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -12
- package/dist/components/buttons/TextButton/TextButton.js +0 -36
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -9
- package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -34
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/buttons/shared/ButtonContent.js +0 -37
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +0 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +0 -30
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -20
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -236
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -25
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +0 -26
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +0 -392
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -94
- package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -161
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +0 -41
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -423
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +0 -46
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -884
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +0 -41
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -383
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +0 -29
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -649
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/Calendar.js +0 -177
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -145
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -54
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -118
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -173
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateField.js +0 -156
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +0 -46
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -197
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -124
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -101
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -27
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -135
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -209
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimeField.js +0 -38
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -328
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -244
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -151
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -77
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -99
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +0 -33
- package/dist/components/inputs/File/FileUpload.d.ts +0 -4
- package/dist/components/inputs/File/FileUpload.js +0 -253
- package/dist/components/inputs/File/FileUploadContainer.d.ts +0 -3
- package/dist/components/inputs/File/FileUploadContainer.js +0 -22
- package/dist/components/inputs/File/InputUpload.d.ts +0 -4
- package/dist/components/inputs/File/InputUpload.js +0 -157
- package/dist/components/inputs/File/fileUpload.types.d.ts +0 -96
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/inputUpload.types.d.ts +0 -37
- package/dist/components/inputs/File/inputUpload.types.js +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.js +0 -121
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.js +0 -60
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContent.js +0 -208
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -58
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -112
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -117
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -79
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.js +0 -169
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -69
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +0 -6
- package/dist/components/inputs/File/shared/ProgressBar.js +0 -33
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -17
- package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -42
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +0 -27
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -39
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +0 -38
- package/dist/components/inputs/File/shared/progressBar.cva.js +0 -28
- package/dist/components/inputs/FormField/FormField.d.ts +0 -20
- package/dist/components/inputs/FormField/FormField.js +0 -127
- package/dist/components/inputs/FormField/FormFieldError.d.ts +0 -7
- package/dist/components/inputs/FormField/FormFieldError.js +0 -33
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +0 -14
- package/dist/components/inputs/FormField/FormFieldHeader.js +0 -97
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -41
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldHelper.js +0 -34
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/FormField/FormFieldLabel.js +0 -59
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldError.cva.js +0 -14
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +0 -14
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +0 -23
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -494
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -46
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -582
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -36
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -338
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +0 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -61
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +0 -19
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -346
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +0 -23
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -470
- package/dist/components/inputs/Input/shared/InputContent.d.ts +0 -29
- package/dist/components/inputs/Input/shared/InputContent.js +0 -213
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Inputs/Form.d.ts +0 -26
- package/dist/components/inputs/Inputs/Form.js +0 -73
- package/dist/components/inputs/Inputs/InputItem.d.ts +0 -67
- package/dist/components/inputs/Inputs/InputItem.js +0 -112
- package/dist/components/inputs/Inputs/Inputs.d.ts +0 -10
- package/dist/components/inputs/Inputs/Inputs.js +0 -43
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +0 -22
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -371
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -62
- package/dist/components/inputs/RadioGroup/radio.cva.js +0 -85
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +0 -12
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -165
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +0 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -176
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -39
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -15
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -172
- package/dist/components/inputs/Selection/Select/Select.d.ts +0 -12
- package/dist/components/inputs/Selection/Select/Select.js +0 -235
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -38
- package/dist/components/inputs/Selection/shared/SelectBase.js +0 -82
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -421
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInput.js +0 -470
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +0 -105
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -75
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -104
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -88
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -89
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -76
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -128
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -44
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/select.context.js +0 -231
- package/dist/components/inputs/Selection/shared/select.types.d.ts +0 -64
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +0 -16
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +0 -24
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -84
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -242
- package/dist/components/inputs/Slider/Slider.d.ts +0 -19
- package/dist/components/inputs/Slider/Slider.js +0 -285
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -22
- package/dist/components/inputs/TextEditor/TextEditor.js +0 -199
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -44
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -128
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -221
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -103
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -58
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -79
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -59
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -103
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -138
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -157
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -16
- package/dist/components/inputs/Toggle/Toggle.js +0 -234
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -19
- package/dist/components/inputs/Toggle/toggle.cva.js +0 -35
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/CheckContent.js +0 -29
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/InputClear.js +0 -117
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.js +0 -60
- package/dist/components/inputs/shared/form.binding.d.ts +0 -27
- package/dist/components/inputs/shared/form.binding.js +0 -57
- package/dist/components/inputs/shared/form.types.d.ts +0 -13
- package/dist/components/inputs/shared/form.types.js +0 -8
- package/dist/components/inputs/shared/input.cva.d.ts +0 -90
- package/dist/components/inputs/shared/input.cva.js +0 -334
- package/dist/components/inputs/shared/label.cva.d.ts +0 -19
- package/dist/components/inputs/shared/label.cva.js +0 -74
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -138
- package/dist/components/navigation/Accordion/Accordion.d.ts +0 -3
- package/dist/components/navigation/Accordion/Accordion.js +0 -34
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Accordion/AccordionItem.js +0 -63
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +0 -110
- package/dist/components/navigation/Accordion/accordion.cva.js +0 -129
- package/dist/components/navigation/Accordion/accordion.types.d.ts +0 -52
- package/dist/components/navigation/Stepper/Stepper.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.js +0 -34
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperItem.js +0 -126
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/navigation/Stepper/StepperSeparator.js +0 -30
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +0 -93
- package/dist/components/navigation/Stepper/stepper.cva.js +0 -116
- package/dist/components/navigation/Stepper/stepper.types.d.ts +0 -41
- package/dist/components/outline.clsx.d.ts +0 -2
- package/dist/components/outline.clsx.js +0 -6
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +0 -24
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -54
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +0 -32
- package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -328
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +0 -78
- package/dist/components/overlays/Drawer/Drawer.d.ts +0 -15
- package/dist/components/overlays/Drawer/Drawer.js +0 -95
- package/dist/components/overlays/Modal/Modal.d.ts +0 -15
- package/dist/components/overlays/Modal/Modal.js +0 -55
- package/dist/components/overlays/Modal/modal.cva.d.ts +0 -37
- package/dist/components/overlays/Modal/modal.cva.js +0 -44
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -17
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -45
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +0 -13
- package/dist/components/overlays/Tooltip/Tooltip.js +0 -170
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -8
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -46
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +0 -49
- package/dist/components/overlays/Tooltip/tooltip.cva.js +0 -44
- package/dist/components/segment/Segment.d.ts +0 -4
- package/dist/components/segment/Segment.js +0 -245
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/segment/SegmentItem.js +0 -85
- package/dist/components/segment/segment.cva.d.ts +0 -20
- package/dist/components/segment/segment.cva.js +0 -30
- package/dist/components/segment/segment.types.d.ts +0 -36
- package/dist/components/shared/pagination/Pagination.d.ts +0 -9
- package/dist/components/shared/pagination/Pagination.js +0 -45
- package/dist/components/shared/pagination/PaginationList.d.ts +0 -15
- package/dist/components/shared/pagination/PaginationList.js +0 -207
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/components/shared/pagination/minWidth.cva.js +0 -11
- package/dist/components/shared/popover.cva.d.ts +0 -8
- package/dist/components/shared/popover.cva.js +0 -5
- package/dist/components/status/Alert/Alert.d.ts +0 -11
- package/dist/components/status/Alert/Alert.js +0 -47
- package/dist/components/status/Alert/alert.cva.d.ts +0 -19
- package/dist/components/status/Alert/alert.cva.js +0 -67
- package/dist/components/status/Loader/Loader.d.ts +0 -5
- package/dist/components/status/Loader/Loader.js +0 -89
- package/dist/components/status/Loader/loader.cva.d.ts +0 -28
- package/dist/components/status/Loader/loader.cva.js +0 -27
- package/dist/components/status/Toast/Toast.d.ts +0 -14
- package/dist/components/status/Toast/Toast.js +0 -82
- package/dist/components/status/Toast/toast.cva.d.ts +0 -80
- package/dist/components/status/Toast/toast.cva.js +0 -211
- package/dist/components/status/Toast/useToast.d.ts +0 -13
- package/dist/components/status/Toast/useToast.js +0 -70
- package/dist/components/status/shared/status.cva.d.ts +0 -30
- package/dist/components/status/shared/status.cva.js +0 -65
- package/dist/components/table/CellText.d.ts +0 -8
- package/dist/components/table/CellText.js +0 -21
- package/dist/components/table/ColumnConfig.d.ts +0 -10
- package/dist/components/table/ColumnConfig.js +0 -187
- package/dist/components/table/HeaderText.d.ts +0 -8
- package/dist/components/table/HeaderText.js +0 -20
- package/dist/components/table/InfiniteTable.d.ts +0 -9
- package/dist/components/table/InfiniteTable.js +0 -28
- package/dist/components/table/PaginatedTable.d.ts +0 -11
- package/dist/components/table/PaginatedTable.js +0 -94
- package/dist/components/table/Table.d.ts +0 -37
- package/dist/components/table/Table.js +0 -265
- package/dist/components/table/table.cva.d.ts +0 -65
- package/dist/components/table/table.cva.js +0 -49
- package/dist/components/text/Link/Link.d.ts +0 -9
- package/dist/components/text/Link/Link.js +0 -33
- package/dist/components/text/Link/link.cva.d.ts +0 -12
- package/dist/components/text/Link/link.cva.js +0 -12
- package/dist/components/text/Pill/Pill.d.ts +0 -15
- package/dist/components/text/Pill/Pill.js +0 -44
- package/dist/components/text/Tag/Tag.d.ts +0 -15
- package/dist/components/text/Tag/Tag.js +0 -43
- package/dist/components/text/Tag/tag.cva.d.ts +0 -16
- package/dist/components/text/Tag/tag.cva.js +0 -55
- package/dist/components/text/Typography/Typography.d.ts +0 -11
- package/dist/components/text/Typography/Typography.js +0 -16
- package/dist/components/text/Typography/typography.cva.d.ts +0 -49
- package/dist/components/text/Typography/typography.cva.js +0 -129
- package/dist/config/confirmation.context.d.ts +0 -20
- package/dist/config/confirmation.context.js +0 -80
- package/dist/config/i18n.d.ts +0 -313
- package/dist/config/i18n.js +0 -10
- package/dist/config/link.context.d.ts +0 -10
- package/dist/config/link.context.js +0 -35
- package/dist/config/router.context.d.ts +0 -14
- package/dist/config/router.context.js +0 -63
- package/dist/config/theme.context.d.ts +0 -17
- package/dist/config/theme.context.js +0 -67
- package/dist/config/uiConfig.context.d.ts +0 -77
- package/dist/config/uiConfig.context.js +0 -132
- package/dist/config/uiOverrides.context.d.ts +0 -205
- package/dist/config/uiOverrides.context.js +0 -113
- package/dist/helpers/dynamicColumns.d.ts +0 -44
- package/dist/helpers/dynamicColumns.js +0 -275
- package/dist/helpers/dynamicInputs.d.ts +0 -86
- package/dist/helpers/dynamicInputs.js +0 -193
- package/dist/hooks/useAutosave.d.ts +0 -10
- package/dist/hooks/useAutosave.js +0 -87
- package/dist/hooks/useBreakpoint.d.ts +0 -3
- package/dist/hooks/useBreakpoint.js +0 -43
- package/dist/hooks/useDebounceCallback.d.ts +0 -6
- package/dist/hooks/useDebounceCallback.js +0 -25
- package/dist/hooks/useDeepCompare.d.ts +0 -4
- package/dist/hooks/useDeepCompare.js +0 -23
- package/dist/hooks/useFilters.d.ts +0 -8
- package/dist/hooks/useFilters.js +0 -188
- package/dist/hooks/useForm.d.ts +0 -42
- package/dist/hooks/useForm.js +0 -101
- package/dist/hooks/useFormAutosave.d.ts +0 -14
- package/dist/hooks/useFormAutosave.js +0 -73
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useIntersectionObserver.d.ts +0 -8
- package/dist/hooks/useIntersectionObserver.js +0 -98
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useLocalStorage.d.ts +0 -11
- package/dist/hooks/useLocalStorage.js +0 -70
- package/dist/hooks/useLongPressRepeat.d.ts +0 -9
- package/dist/hooks/useLongPressRepeat.js +0 -29
- package/dist/hooks/usePagination.d.ts +0 -7
- package/dist/hooks/usePagination.js +0 -62
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/hooks/useQueryAutocomplete.js +0 -103
- package/dist/hooks/useScrollableListBox.d.ts +0 -3
- package/dist/hooks/useScrollableListBox.js +0 -47
- package/dist/hooks/useSorting.d.ts +0 -6
- package/dist/hooks/useSorting.js +0 -80
- package/dist/hooks/useStateAndRef.d.ts +0 -4
- package/dist/hooks/useStateAndRef.js +0 -31
- package/dist/hooks/useTableColumnConfig.d.ts +0 -16
- package/dist/hooks/useTableColumnConfig.js +0 -133
- package/dist/hooks/useTableNav.d.ts +0 -84
- package/dist/hooks/useTableNav.js +0 -383
- package/dist/hooks/useTranslationMemo.d.ts +0 -4
- package/dist/hooks/useTranslationMemo.js +0 -32
- package/dist/rhf/Inputs.d.ts +0 -60
- package/dist/rhf/Inputs.js +0 -148
- package/dist/rhf/components.d.ts +0 -80
- package/dist/rhf/components.js +0 -101
- package/dist/rhf/dynamicInputs.d.ts +0 -18
- package/dist/rhf/dynamicInputs.js +0 -5
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/rhf/fieldAdapter.d.ts +0 -7
- package/dist/rhf/fieldAdapter.js +0 -40
- package/dist/rhf/form.types.d.ts +0 -12
- package/dist/rhf/useAutosave.d.ts +0 -10
- package/dist/rhf/useAutosave.js +0 -71
- package/dist/rhf/useForm.d.ts +0 -18
- package/dist/rhf/useForm.js +0 -48
- package/dist/rhf/useFormAutosave.d.ts +0 -15
- package/dist/rhf/useFormAutosave.js +0 -59
- package/dist/text-editor.d.ts +0 -2
- package/dist/text-editor.js +0 -2
- package/dist/types/common.d.ts +0 -12
- package/dist/types/error-handling.d.ts +0 -6
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.d.ts +0 -3
- package/dist/utils/array.utils.js +0 -10
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.d.ts +0 -19
- package/dist/utils/compoundMapper.js +0 -13
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.d.ts +0 -42
- package/dist/utils/date-time.utils.js +0 -192
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.d.ts +0 -5
- package/dist/utils/date.utils.js +0 -19
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/dom.utils.d.ts +0 -5
- package/dist/utils/dom.utils.js +0 -19
- package/dist/utils/file.utils.d.ts +0 -13
- package/dist/utils/file.utils.js +0 -50
- package/dist/utils/intl.utils.d.ts +0 -7
- package/dist/utils/intl.utils.js +0 -38
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/isEqual.d.ts +0 -1
- package/dist/utils/isEqual.js +0 -59
- package/dist/utils/object.utils.d.ts +0 -10
- package/dist/utils/object.utils.js +0 -38
- package/dist/utils/queries.utils.d.ts +0 -4
- package/dist/utils/queries.utils.js +0 -9
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/routing.utils.d.ts +0 -4
- package/dist/utils/routing.utils.js +0 -25
- package/dist/utils/string.utils.d.ts +0 -4
- package/dist/utils/string.utils.js +0 -12
- package/dist/utils/style-merge.util.d.ts +0 -43
- package/dist/utils/style-merge.util.js +0 -233
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
- package/dist/utils/zod.utils.d.ts +0 -20
- package/dist/utils/zod.utils.js +0 -24
- /package/dist/styles/{editor.css → styles/editor.css} +0 -0
|
@@ -0,0 +1,1858 @@
|
|
|
1
|
+
import { t as UIConfig } from "./uiConfig.context-BvBsrMFI.js";
|
|
2
|
+
import { t as ChevronDown } from "./chevron-down-RksSwG1O.js";
|
|
3
|
+
import { t as ChevronLeft } from "./chevron-left-Dem1_TuL.js";
|
|
4
|
+
import { t as ChevronRight } from "./chevron-right-DXbvvsay.js";
|
|
5
|
+
import { n as ChevronsLeft, t as ChevronsRight } from "./chevrons-right--HrJEes-.js";
|
|
6
|
+
import { a as CalendarGrid, c as $dd602d3c757202f2$export$4f5203c0d889109e, d as $dd602d3c757202f2$export$f4a51ff076cc9a09, i as $1697a7ad3db7b79f$re_export$useDateFormatter, l as $dd602d3c757202f2$export$a1d3911297b952d7, n as renderDatePickerTodayIcon, o as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput, u as $dd602d3c757202f2$export$eac50920cf2fd59a } from "./DatePickerInput-B9Z_AUkC.js";
|
|
7
|
+
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
8
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-CRlZqaJq.js";
|
|
9
|
+
import { t as Switch } from "./Switch-BaNEe9Nx.js";
|
|
10
|
+
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
11
|
+
import { n as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useLayoutEffect-DN7Dbrb9.js";
|
|
12
|
+
import { a as $390e54f620492c70$export$f680877a34711e37, r as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./useSyncRef-Dsn4Ybiw.js";
|
|
13
|
+
import { c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, m as $cf2482eff2eeeec2$export$f12b703ca79dfbb1, r as $fd2148440a13ec26$export$fc1a364ae1f3ff10, s as $2c9edc598a03d523$export$420e68273165f4ec } from "./useFormValidationState-Dl-Nh0G1.js";
|
|
14
|
+
import { n as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-BMVd3AOQ.js";
|
|
15
|
+
import { C as $0014db39426443c5$exports, S as $6a440d0e2d99dd46$export$4a931266a3838b86, 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, v as $7541913c0284d84b$export$300019f83c56d282, w as $121970af65029459$export$f8aeda7b10753fa1, x as $7541913c0284d84b$export$7b3062cd49e80452 } from "./staticDateTimeSegments-B9kkwiDz.js";
|
|
16
|
+
import { n as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-CNjWJz3s.js";
|
|
17
|
+
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
18
|
+
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
19
|
+
import { PillButton } from "./components/pill-button.js";
|
|
20
|
+
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-DDGNxVX8.js";
|
|
21
|
+
import { t as FieldController } from "./form.binding-DLM7NA2s.js";
|
|
22
|
+
import { t as FormField } from "./FormField-BHPdCLEV.js";
|
|
23
|
+
import "./i18n-BDjNuy4Z.js";
|
|
24
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-DYfZF2Ly.js";
|
|
25
|
+
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-Denoy4V_.js";
|
|
26
|
+
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
27
|
+
import { t as Select } from "./Select-O9dprkTa.js";
|
|
28
|
+
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
29
|
+
import { DateFormatter, GregorianCalendar, createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
30
|
+
import { DEFAULT_VALIDATION_RESULT, mergeValidation, privateValidationStateProp } from "react-stately/private/form/useFormValidationState";
|
|
31
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
|
+
import { useTranslation } from "react-i18next";
|
|
33
|
+
import { useRangeCalendar } from "@react-aria/calendar";
|
|
34
|
+
//#region ../../node_modules/.bun/react-aria@3.51.0+67f6792bdf102c28/node_modules/react-aria/dist/private/datepicker/useDateRangePicker.mjs
|
|
35
|
+
function $parcel$interopDefault(a) {
|
|
36
|
+
return a && a.__esModule ? a.default : a;
|
|
37
|
+
}
|
|
38
|
+
function $cccdba1b2bb08448$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
39
|
+
let stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($0014db39426443c5$exports), "@react-aria/datepicker");
|
|
40
|
+
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
41
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
|
|
42
|
+
...props,
|
|
43
|
+
labelElementType: "span",
|
|
44
|
+
isInvalid,
|
|
45
|
+
errorMessage: props.errorMessage || validationErrors
|
|
46
|
+
});
|
|
47
|
+
let labelledBy = fieldProps["aria-labelledby"] || fieldProps.id;
|
|
48
|
+
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
49
|
+
let range = state.formatValue(locale, { month: "long" });
|
|
50
|
+
let description = range ? stringFormatter.format("selectedRangeDescription", {
|
|
51
|
+
startDate: range.start,
|
|
52
|
+
endDate: range.end
|
|
53
|
+
}) : "";
|
|
54
|
+
let descProps = $121970af65029459$export$f8aeda7b10753fa1(description);
|
|
55
|
+
let startFieldProps = {
|
|
56
|
+
"aria-label": stringFormatter.format("startDate"),
|
|
57
|
+
"aria-labelledby": labelledBy
|
|
58
|
+
};
|
|
59
|
+
let endFieldProps = {
|
|
60
|
+
"aria-label": stringFormatter.format("endDate"),
|
|
61
|
+
"aria-labelledby": labelledBy
|
|
62
|
+
};
|
|
63
|
+
let buttonId = $390e54f620492c70$export$f680877a34711e37();
|
|
64
|
+
let dialogId = $390e54f620492c70$export$f680877a34711e37();
|
|
65
|
+
let groupProps = $6a440d0e2d99dd46$export$4a931266a3838b86(state, ref);
|
|
66
|
+
let ariaDescribedBy = [descProps["aria-describedby"], fieldProps["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
67
|
+
let focusManager = useMemo(() => $535772f9d2c1f38d$export$c5251b9e124bf29(ref, { accept: (element) => element.id !== buttonId }), [ref, buttonId]);
|
|
68
|
+
let commonFieldProps = {
|
|
69
|
+
[$7541913c0284d84b$export$7b3062cd49e80452]: focusManager,
|
|
70
|
+
[$7541913c0284d84b$export$300019f83c56d282]: "presentation",
|
|
71
|
+
"aria-describedby": ariaDescribedBy,
|
|
72
|
+
placeholderValue: props.placeholderValue,
|
|
73
|
+
hideTimeZone: props.hideTimeZone,
|
|
74
|
+
hourCycle: props.hourCycle,
|
|
75
|
+
granularity: props.granularity,
|
|
76
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
77
|
+
isDisabled: props.isDisabled,
|
|
78
|
+
isReadOnly: props.isReadOnly,
|
|
79
|
+
isRequired: props.isRequired,
|
|
80
|
+
validationBehavior: props.validationBehavior
|
|
81
|
+
};
|
|
82
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props);
|
|
83
|
+
let isFocused = useRef(false);
|
|
84
|
+
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
85
|
+
...props,
|
|
86
|
+
isDisabled: state.isOpen,
|
|
87
|
+
onBlurWithin: (e) => {
|
|
88
|
+
let dialog = document.getElementById(dialogId);
|
|
89
|
+
if (!$23f2114a1b82827e$export$4282f70798064fe0(dialog, e.relatedTarget)) {
|
|
90
|
+
isFocused.current = false;
|
|
91
|
+
props.onBlur?.(e);
|
|
92
|
+
props.onFocusChange?.(false);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
onFocusWithin: (e) => {
|
|
96
|
+
if (!isFocused.current) {
|
|
97
|
+
isFocused.current = true;
|
|
98
|
+
props.onFocus?.(e);
|
|
99
|
+
props.onFocusChange?.(true);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
let startFieldValidation = useRef(DEFAULT_VALIDATION_RESULT);
|
|
104
|
+
let endFieldValidation = useRef(DEFAULT_VALIDATION_RESULT);
|
|
105
|
+
return {
|
|
106
|
+
groupProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
107
|
+
role: "group",
|
|
108
|
+
"aria-disabled": props.isDisabled || null,
|
|
109
|
+
"aria-describedby": ariaDescribedBy,
|
|
110
|
+
onKeyDown(e) {
|
|
111
|
+
if (state.isOpen) return;
|
|
112
|
+
if (props.onKeyDown) props.onKeyDown(e);
|
|
113
|
+
},
|
|
114
|
+
onKeyUp(e) {
|
|
115
|
+
if (state.isOpen) return;
|
|
116
|
+
if (props.onKeyUp) props.onKeyUp(e);
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
labelProps: {
|
|
120
|
+
...labelProps,
|
|
121
|
+
onClick: () => {
|
|
122
|
+
focusManager.focusFirst();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
buttonProps: {
|
|
126
|
+
...descProps,
|
|
127
|
+
id: buttonId,
|
|
128
|
+
"aria-haspopup": "dialog",
|
|
129
|
+
"aria-label": stringFormatter.format("calendar"),
|
|
130
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
131
|
+
"aria-describedby": ariaDescribedBy,
|
|
132
|
+
"aria-expanded": state.isOpen,
|
|
133
|
+
isDisabled: props.isDisabled || props.isReadOnly,
|
|
134
|
+
onPress: () => state.setOpen(true)
|
|
135
|
+
},
|
|
136
|
+
dialogProps: {
|
|
137
|
+
id: dialogId,
|
|
138
|
+
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
139
|
+
},
|
|
140
|
+
startFieldProps: {
|
|
141
|
+
...startFieldProps,
|
|
142
|
+
...commonFieldProps,
|
|
143
|
+
value: state.value?.start ?? null,
|
|
144
|
+
defaultValue: state.defaultValue?.start,
|
|
145
|
+
onChange: (start) => state.setDateTime("start", start),
|
|
146
|
+
autoFocus: props.autoFocus,
|
|
147
|
+
name: props.startName,
|
|
148
|
+
form: props.form,
|
|
149
|
+
[privateValidationStateProp]: {
|
|
150
|
+
realtimeValidation: state.realtimeValidation,
|
|
151
|
+
displayValidation: state.displayValidation,
|
|
152
|
+
updateValidation(e) {
|
|
153
|
+
startFieldValidation.current = e;
|
|
154
|
+
state.updateValidation(mergeValidation(e, endFieldValidation.current));
|
|
155
|
+
},
|
|
156
|
+
resetValidation: state.resetValidation,
|
|
157
|
+
commitValidation: state.commitValidation
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
endFieldProps: {
|
|
161
|
+
...endFieldProps,
|
|
162
|
+
...commonFieldProps,
|
|
163
|
+
value: state.value?.end ?? null,
|
|
164
|
+
defaultValue: state.defaultValue?.end,
|
|
165
|
+
onChange: (end) => state.setDateTime("end", end),
|
|
166
|
+
name: props.endName,
|
|
167
|
+
form: props.form,
|
|
168
|
+
[privateValidationStateProp]: {
|
|
169
|
+
realtimeValidation: state.realtimeValidation,
|
|
170
|
+
displayValidation: state.displayValidation,
|
|
171
|
+
updateValidation(e) {
|
|
172
|
+
endFieldValidation.current = e;
|
|
173
|
+
state.updateValidation(mergeValidation(startFieldValidation.current, e));
|
|
174
|
+
},
|
|
175
|
+
resetValidation: state.resetValidation,
|
|
176
|
+
commitValidation: state.commitValidation
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
descriptionProps,
|
|
180
|
+
errorMessageProps,
|
|
181
|
+
calendarProps: {
|
|
182
|
+
autoFocus: true,
|
|
183
|
+
value: state.dateRange?.start && state.dateRange.end ? state.dateRange : null,
|
|
184
|
+
onChange: state.setDateRange,
|
|
185
|
+
minValue: props.minValue,
|
|
186
|
+
maxValue: props.maxValue,
|
|
187
|
+
isDisabled: props.isDisabled,
|
|
188
|
+
isReadOnly: props.isReadOnly,
|
|
189
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
190
|
+
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
191
|
+
defaultFocusedValue: state.dateRange ? void 0 : props.placeholderValue,
|
|
192
|
+
isInvalid: state.isInvalid,
|
|
193
|
+
errorMessage: typeof props.errorMessage === "function" ? props.errorMessage(state.displayValidation) : props.errorMessage || state.displayValidation.validationErrors.join(" "),
|
|
194
|
+
firstDayOfWeek: props.firstDayOfWeek,
|
|
195
|
+
pageBehavior: props.pageBehavior
|
|
196
|
+
},
|
|
197
|
+
isInvalid,
|
|
198
|
+
validationErrors,
|
|
199
|
+
validationDetails
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region ../../node_modules/.bun/react-stately@3.49.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/calendar/useRangeCalendarState.mjs
|
|
204
|
+
function $a0a87fb6fcfb22ec$export$9a987164d97ecc90(props) {
|
|
205
|
+
let { value: valueProp, defaultValue, onChange, createCalendar, locale, visibleDuration = { months: 1 }, minValue, maxValue, ...calendarProps } = props;
|
|
206
|
+
let [value, setValue] = $3e6197669829fe11$export$40bfa8c7b0832715(valueProp, defaultValue || null, onChange);
|
|
207
|
+
let [anchorDate, setAnchorDate] = useState(null);
|
|
208
|
+
let alignment = "center";
|
|
209
|
+
if (value && value.start && value.end) {
|
|
210
|
+
let end = $dd602d3c757202f2$export$f4a51ff076cc9a09(toCalendarDate(value.start), visibleDuration, locale, minValue, maxValue).add(visibleDuration).subtract({ days: 1 });
|
|
211
|
+
if (value.end.compare(end) > 0) alignment = "start";
|
|
212
|
+
}
|
|
213
|
+
let isDateUnavailable = useMemo(() => {
|
|
214
|
+
let isDateUnavailable = props.isDateUnavailable;
|
|
215
|
+
if (!isDateUnavailable) return void 0;
|
|
216
|
+
return (date) => isDateUnavailable(date, anchorDate);
|
|
217
|
+
}, [props.isDateUnavailable, anchorDate]);
|
|
218
|
+
let getAvailableRange = useCallback((anchorDate) => {
|
|
219
|
+
if (anchorDate && isDateUnavailable && !props.allowsNonContiguousRanges) return {
|
|
220
|
+
start: $a0a87fb6fcfb22ec$var$nextUnavailableDate(anchorDate, isDateUnavailable, visibleDuration, -1),
|
|
221
|
+
end: $a0a87fb6fcfb22ec$var$nextUnavailableDate(anchorDate, isDateUnavailable, visibleDuration, 1)
|
|
222
|
+
};
|
|
223
|
+
else return null;
|
|
224
|
+
}, [
|
|
225
|
+
isDateUnavailable,
|
|
226
|
+
visibleDuration,
|
|
227
|
+
props.allowsNonContiguousRanges
|
|
228
|
+
]);
|
|
229
|
+
let availableRange = useMemo(() => getAvailableRange(anchorDate), [getAvailableRange, anchorDate]);
|
|
230
|
+
let min = useMemo(() => maxDate(minValue, availableRange?.start), [minValue, availableRange]);
|
|
231
|
+
let max = useMemo(() => minDate(maxValue, availableRange?.end), [maxValue, availableRange]);
|
|
232
|
+
let calendar = $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f({
|
|
233
|
+
...calendarProps,
|
|
234
|
+
value: value && value.start,
|
|
235
|
+
createCalendar,
|
|
236
|
+
locale,
|
|
237
|
+
visibleDuration,
|
|
238
|
+
minValue: min,
|
|
239
|
+
maxValue: max,
|
|
240
|
+
selectionAlignment: props.selectionAlignment || alignment,
|
|
241
|
+
isDateUnavailable
|
|
242
|
+
});
|
|
243
|
+
let highlightedRange = anchorDate ? $a0a87fb6fcfb22ec$var$makeRange(anchorDate, calendar.focusedDate) : value && $a0a87fb6fcfb22ec$var$makeRange(value.start, value.end);
|
|
244
|
+
let selectDate = (date) => {
|
|
245
|
+
if (props.isReadOnly) return;
|
|
246
|
+
const constrainedDate = $dd602d3c757202f2$export$4f5203c0d889109e(date, min, max);
|
|
247
|
+
const previousAvailableConstrainedDate = $dd602d3c757202f2$export$a1d3911297b952d7(constrainedDate, calendar.visibleRange.start, isDateUnavailable);
|
|
248
|
+
if (!previousAvailableConstrainedDate) return;
|
|
249
|
+
if (!anchorDate) setAnchorDate(previousAvailableConstrainedDate);
|
|
250
|
+
else {
|
|
251
|
+
let range = $a0a87fb6fcfb22ec$var$makeRange(anchorDate, previousAvailableConstrainedDate);
|
|
252
|
+
if (range) setValue({
|
|
253
|
+
start: $a0a87fb6fcfb22ec$var$convertValue(range.start, value?.start),
|
|
254
|
+
end: $a0a87fb6fcfb22ec$var$convertValue(range.end, value?.end)
|
|
255
|
+
});
|
|
256
|
+
setAnchorDate(null);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
let [isDragging, setDragging] = useState(false);
|
|
260
|
+
let isInvalidSelection = useMemo(() => {
|
|
261
|
+
if (!value || anchorDate) return false;
|
|
262
|
+
if (isDateUnavailable && (isDateUnavailable(value.start) || isDateUnavailable(value.end))) return true;
|
|
263
|
+
return $dd602d3c757202f2$export$eac50920cf2fd59a(value.start, minValue, maxValue) || $dd602d3c757202f2$export$eac50920cf2fd59a(value.end, minValue, maxValue);
|
|
264
|
+
}, [
|
|
265
|
+
isDateUnavailable,
|
|
266
|
+
value,
|
|
267
|
+
anchorDate,
|
|
268
|
+
minValue,
|
|
269
|
+
maxValue
|
|
270
|
+
]);
|
|
271
|
+
let isValueInvalid = props.isInvalid || props.validationState === "invalid" || isInvalidSelection;
|
|
272
|
+
let validationState = isValueInvalid ? "invalid" : null;
|
|
273
|
+
return {
|
|
274
|
+
...calendar,
|
|
275
|
+
value,
|
|
276
|
+
setValue,
|
|
277
|
+
anchorDate,
|
|
278
|
+
setAnchorDate,
|
|
279
|
+
highlightedRange,
|
|
280
|
+
validationState,
|
|
281
|
+
isValueInvalid,
|
|
282
|
+
selectFocusedDate() {
|
|
283
|
+
if (!calendar.isCellUnavailable(calendar.focusedDate)) selectDate(calendar.focusedDate);
|
|
284
|
+
},
|
|
285
|
+
commitSelection() {
|
|
286
|
+
selectDate(calendar.focusedDate);
|
|
287
|
+
},
|
|
288
|
+
selectDate,
|
|
289
|
+
highlightDate(date) {
|
|
290
|
+
if (anchorDate) calendar.setFocusedDate(date);
|
|
291
|
+
},
|
|
292
|
+
isSelected(date) {
|
|
293
|
+
return Boolean(highlightedRange && date.compare(highlightedRange.start) >= 0 && date.compare(highlightedRange.end) <= 0 && !calendar.isCellDisabled(date) && !calendar.isCellUnavailable(date));
|
|
294
|
+
},
|
|
295
|
+
isInvalid(date) {
|
|
296
|
+
return calendar.isInvalid(date) || $dd602d3c757202f2$export$eac50920cf2fd59a(date, availableRange?.start, availableRange?.end);
|
|
297
|
+
},
|
|
298
|
+
isDragging,
|
|
299
|
+
setDragging,
|
|
300
|
+
clearSelection() {
|
|
301
|
+
setAnchorDate(null);
|
|
302
|
+
setValue(null);
|
|
303
|
+
},
|
|
304
|
+
focusNearestAvailableDate(anchorDate) {
|
|
305
|
+
let availableRange = getAvailableRange(anchorDate);
|
|
306
|
+
let isDateInvalid = (date) => this.isInvalid(date) || $dd602d3c757202f2$export$eac50920cf2fd59a(date, availableRange?.start, availableRange?.end);
|
|
307
|
+
let nextDay = anchorDate.add({ days: 1 });
|
|
308
|
+
if (isDateInvalid(nextDay)) nextDay = anchorDate.subtract({ days: 1 });
|
|
309
|
+
if (!isDateInvalid(nextDay)) {
|
|
310
|
+
this.setFocusedDate(nextDay);
|
|
311
|
+
this.setFocused(true);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function $a0a87fb6fcfb22ec$var$makeRange(start, end) {
|
|
317
|
+
if (!start || !end) return null;
|
|
318
|
+
if (end.compare(start) < 0) [start, end] = [end, start];
|
|
319
|
+
return {
|
|
320
|
+
start: toCalendarDate(start),
|
|
321
|
+
end: toCalendarDate(end)
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function $a0a87fb6fcfb22ec$var$convertValue(newValue, oldValue) {
|
|
325
|
+
newValue = toCalendar(newValue, oldValue?.calendar || new GregorianCalendar());
|
|
326
|
+
if (oldValue && "hour" in oldValue) return oldValue.set(newValue);
|
|
327
|
+
return newValue;
|
|
328
|
+
}
|
|
329
|
+
function $a0a87fb6fcfb22ec$var$nextUnavailableDate(anchorDate, isDateUnavailable, visibleDuration, dir) {
|
|
330
|
+
let nextDate = anchorDate.add({ days: dir });
|
|
331
|
+
let minDate = anchorDate.subtract(visibleDuration);
|
|
332
|
+
let maxDate = anchorDate.add(visibleDuration);
|
|
333
|
+
while ((dir < 0 ? nextDate.compare(minDate) >= 0 : nextDate.compare(maxDate) <= 0) && !isDateUnavailable(nextDate)) nextDate = nextDate.add({ days: dir });
|
|
334
|
+
if (isDateUnavailable(nextDate)) return nextDate.add({ days: -dir });
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region ../../node_modules/.bun/react-stately@3.49.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/datepicker/useDateRangePickerState.mjs
|
|
338
|
+
function $6de3e3f1a7663217$export$e50a61c1de9f574(props) {
|
|
339
|
+
let overlayState = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
340
|
+
let [controlledValue, setControlledValue] = $3e6197669829fe11$export$40bfa8c7b0832715(props.value, props.defaultValue || null, props.onChange);
|
|
341
|
+
let [initialValue] = useState(controlledValue);
|
|
342
|
+
let [placeholderValue, setPlaceholderValue] = useState(() => controlledValue || {
|
|
343
|
+
start: null,
|
|
344
|
+
end: null
|
|
345
|
+
});
|
|
346
|
+
if (controlledValue == null && placeholderValue.start && placeholderValue.end) {
|
|
347
|
+
placeholderValue = {
|
|
348
|
+
start: null,
|
|
349
|
+
end: null
|
|
350
|
+
};
|
|
351
|
+
setPlaceholderValue(placeholderValue);
|
|
352
|
+
}
|
|
353
|
+
let value = controlledValue || placeholderValue;
|
|
354
|
+
let setValue = (newValue) => {
|
|
355
|
+
value = newValue || {
|
|
356
|
+
start: null,
|
|
357
|
+
end: null
|
|
358
|
+
};
|
|
359
|
+
setPlaceholderValue(value);
|
|
360
|
+
if ($6de3e3f1a7663217$var$isCompleteRange(value)) setControlledValue(value);
|
|
361
|
+
else setControlledValue(null);
|
|
362
|
+
};
|
|
363
|
+
let v = value?.start || value?.end || props.placeholderValue || null;
|
|
364
|
+
let [granularity, defaultTimeZone] = $8b141f2f71e88f85$export$2440da353cedad43(v, props.granularity);
|
|
365
|
+
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
|
366
|
+
let shouldCloseOnSelect = props.shouldCloseOnSelect ?? true;
|
|
367
|
+
let [dateRange, setSelectedDateRange] = useState(null);
|
|
368
|
+
let [timeRange, setSelectedTimeRange] = useState(null);
|
|
369
|
+
if (value && $6de3e3f1a7663217$var$isCompleteRange(value)) {
|
|
370
|
+
dateRange = value;
|
|
371
|
+
if ("hour" in value.start) timeRange = value;
|
|
372
|
+
}
|
|
373
|
+
let commitValue = (dateRange, timeRange) => {
|
|
374
|
+
setValue({
|
|
375
|
+
start: "timeZone" in timeRange.start ? timeRange.start.set(toCalendarDate(dateRange.start)) : toCalendarDateTime(dateRange.start, timeRange.start),
|
|
376
|
+
end: "timeZone" in timeRange.end ? timeRange.end.set(toCalendarDate(dateRange.end)) : toCalendarDateTime(dateRange.end, timeRange.end)
|
|
377
|
+
});
|
|
378
|
+
setSelectedDateRange(null);
|
|
379
|
+
setSelectedTimeRange(null);
|
|
380
|
+
validation.commitValidation();
|
|
381
|
+
};
|
|
382
|
+
let setDateRange = (range) => {
|
|
383
|
+
let shouldClose = typeof shouldCloseOnSelect === "function" ? shouldCloseOnSelect() : shouldCloseOnSelect;
|
|
384
|
+
if (hasTime) {
|
|
385
|
+
if ($6de3e3f1a7663217$var$isCompleteRange(range) && (shouldClose || timeRange?.start && timeRange?.end)) commitValue(range, {
|
|
386
|
+
start: timeRange?.start || $8b141f2f71e88f85$export$c5221a78ef73c5e9(props.placeholderValue),
|
|
387
|
+
end: timeRange?.end || $8b141f2f71e88f85$export$c5221a78ef73c5e9(props.placeholderValue)
|
|
388
|
+
});
|
|
389
|
+
else setSelectedDateRange(range);
|
|
390
|
+
} else if ($6de3e3f1a7663217$var$isCompleteRange(range)) {
|
|
391
|
+
setValue(range);
|
|
392
|
+
validation.commitValidation();
|
|
393
|
+
} else setSelectedDateRange(range);
|
|
394
|
+
if (shouldClose) overlayState.setOpen(false);
|
|
395
|
+
};
|
|
396
|
+
let setTimeRange = (range) => {
|
|
397
|
+
if ($6de3e3f1a7663217$var$isCompleteRange(dateRange) && $6de3e3f1a7663217$var$isCompleteRange(range)) commitValue(dateRange, range);
|
|
398
|
+
else setSelectedTimeRange(range);
|
|
399
|
+
};
|
|
400
|
+
let showEra = value?.start?.calendar.identifier === "gregory" && value.start.era === "BC" || value?.end?.calendar.identifier === "gregory" && value.end.era === "BC";
|
|
401
|
+
let formatOpts = useMemo(() => ({
|
|
402
|
+
granularity,
|
|
403
|
+
timeZone: defaultTimeZone,
|
|
404
|
+
hideTimeZone: props.hideTimeZone,
|
|
405
|
+
hourCycle: props.hourCycle,
|
|
406
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
407
|
+
showEra
|
|
408
|
+
}), [
|
|
409
|
+
granularity,
|
|
410
|
+
props.hourCycle,
|
|
411
|
+
props.shouldForceLeadingZeros,
|
|
412
|
+
defaultTimeZone,
|
|
413
|
+
props.hideTimeZone,
|
|
414
|
+
showEra
|
|
415
|
+
]);
|
|
416
|
+
let { minValue, maxValue, isDateUnavailable } = props;
|
|
417
|
+
let builtinValidation = useMemo(() => $8b141f2f71e88f85$export$80ff8fc0ae339c13(value, minValue, maxValue, isDateUnavailable ? (date) => isDateUnavailable(date, null) : void 0, formatOpts), [
|
|
418
|
+
value,
|
|
419
|
+
minValue,
|
|
420
|
+
maxValue,
|
|
421
|
+
isDateUnavailable,
|
|
422
|
+
formatOpts
|
|
423
|
+
]);
|
|
424
|
+
let validation = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
425
|
+
...props,
|
|
426
|
+
value: controlledValue,
|
|
427
|
+
name: useMemo(() => [props.startName, props.endName].filter((n) => n != null), [props.startName, props.endName]),
|
|
428
|
+
builtinValidation
|
|
429
|
+
});
|
|
430
|
+
let isValueInvalid = validation.displayValidation.isInvalid;
|
|
431
|
+
let validationState = props.validationState || (isValueInvalid ? "invalid" : null);
|
|
432
|
+
return {
|
|
433
|
+
...validation,
|
|
434
|
+
value,
|
|
435
|
+
defaultValue: props.defaultValue ?? initialValue,
|
|
436
|
+
setValue,
|
|
437
|
+
dateRange,
|
|
438
|
+
timeRange,
|
|
439
|
+
granularity,
|
|
440
|
+
hasTime,
|
|
441
|
+
setDate(part, date) {
|
|
442
|
+
if (part === "start") setDateRange({
|
|
443
|
+
start: date,
|
|
444
|
+
end: dateRange?.end ?? null
|
|
445
|
+
});
|
|
446
|
+
else setDateRange({
|
|
447
|
+
start: dateRange?.start ?? null,
|
|
448
|
+
end: date
|
|
449
|
+
});
|
|
450
|
+
},
|
|
451
|
+
setTime(part, time) {
|
|
452
|
+
if (part === "start") setTimeRange({
|
|
453
|
+
start: time,
|
|
454
|
+
end: timeRange?.end ?? null
|
|
455
|
+
});
|
|
456
|
+
else setTimeRange({
|
|
457
|
+
start: timeRange?.start ?? null,
|
|
458
|
+
end: time
|
|
459
|
+
});
|
|
460
|
+
},
|
|
461
|
+
setDateTime(part, dateTime) {
|
|
462
|
+
if (part === "start") setValue({
|
|
463
|
+
start: dateTime,
|
|
464
|
+
end: value?.end ?? null
|
|
465
|
+
});
|
|
466
|
+
else setValue({
|
|
467
|
+
start: value?.start ?? null,
|
|
468
|
+
end: dateTime
|
|
469
|
+
});
|
|
470
|
+
},
|
|
471
|
+
setDateRange,
|
|
472
|
+
setTimeRange,
|
|
473
|
+
...overlayState,
|
|
474
|
+
setOpen(isOpen) {
|
|
475
|
+
if (!isOpen && !(value?.start && value?.end) && $6de3e3f1a7663217$var$isCompleteRange(dateRange) && hasTime) commitValue(dateRange, {
|
|
476
|
+
start: timeRange?.start || $8b141f2f71e88f85$export$c5221a78ef73c5e9(props.placeholderValue),
|
|
477
|
+
end: timeRange?.end || $8b141f2f71e88f85$export$c5221a78ef73c5e9(props.placeholderValue)
|
|
478
|
+
});
|
|
479
|
+
overlayState.setOpen(isOpen);
|
|
480
|
+
},
|
|
481
|
+
validationState,
|
|
482
|
+
isInvalid: isValueInvalid,
|
|
483
|
+
formatValue(locale, fieldOptions) {
|
|
484
|
+
if (!value || !value.start || !value.end) return null;
|
|
485
|
+
let startTimeZone = "timeZone" in value.start ? value.start.timeZone : void 0;
|
|
486
|
+
let startGranularity = props.granularity || (value.start && "minute" in value.start ? "minute" : "day");
|
|
487
|
+
let endTimeZone = "timeZone" in value.end ? value.end.timeZone : void 0;
|
|
488
|
+
let endGranularity = props.granularity || (value.end && "minute" in value.end ? "minute" : "day");
|
|
489
|
+
let startOptions = $8b141f2f71e88f85$export$7e319ea407e63bc0(fieldOptions, {
|
|
490
|
+
granularity: startGranularity,
|
|
491
|
+
timeZone: startTimeZone,
|
|
492
|
+
hideTimeZone: props.hideTimeZone,
|
|
493
|
+
hourCycle: props.hourCycle,
|
|
494
|
+
showEra: value.start.calendar.identifier === "gregory" && value.start.era === "BC" || value.end.calendar.identifier === "gregory" && value.end.era === "BC"
|
|
495
|
+
});
|
|
496
|
+
let startDate = value.start.toDate(startTimeZone || "UTC");
|
|
497
|
+
let endDate = value.end.toDate(endTimeZone || "UTC");
|
|
498
|
+
let startFormatter = new DateFormatter(locale, startOptions);
|
|
499
|
+
let endFormatter;
|
|
500
|
+
if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {
|
|
501
|
+
try {
|
|
502
|
+
let parts = startFormatter.formatRangeToParts(startDate, endDate);
|
|
503
|
+
let separatorIndex = -1;
|
|
504
|
+
for (let i = 0; i < parts.length; i++) {
|
|
505
|
+
let part = parts[i];
|
|
506
|
+
if (part.source === "shared" && part.type === "literal") separatorIndex = i;
|
|
507
|
+
else if (part.source === "endRange") break;
|
|
508
|
+
}
|
|
509
|
+
let start = "";
|
|
510
|
+
let end = "";
|
|
511
|
+
for (let i = 0; i < parts.length; i++) if (i < separatorIndex) start += parts[i].value;
|
|
512
|
+
else if (i > separatorIndex) end += parts[i].value;
|
|
513
|
+
return {
|
|
514
|
+
start,
|
|
515
|
+
end
|
|
516
|
+
};
|
|
517
|
+
} catch {}
|
|
518
|
+
endFormatter = startFormatter;
|
|
519
|
+
} else {
|
|
520
|
+
let endOptions = $8b141f2f71e88f85$export$7e319ea407e63bc0(fieldOptions, {
|
|
521
|
+
granularity: endGranularity,
|
|
522
|
+
timeZone: endTimeZone,
|
|
523
|
+
hideTimeZone: props.hideTimeZone,
|
|
524
|
+
hourCycle: props.hourCycle
|
|
525
|
+
});
|
|
526
|
+
endFormatter = new DateFormatter(locale, endOptions);
|
|
527
|
+
}
|
|
528
|
+
return {
|
|
529
|
+
start: startFormatter.format(startDate),
|
|
530
|
+
end: endFormatter.format(endDate)
|
|
531
|
+
};
|
|
532
|
+
},
|
|
533
|
+
getDateFormatter(locale, formatOptions) {
|
|
534
|
+
let newOptions = {
|
|
535
|
+
...formatOpts,
|
|
536
|
+
...formatOptions
|
|
537
|
+
};
|
|
538
|
+
let newFormatOptions = $8b141f2f71e88f85$export$7e319ea407e63bc0({}, newOptions);
|
|
539
|
+
return new DateFormatter(locale, newFormatOptions);
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
function $6de3e3f1a7663217$var$isCompleteRange(value) {
|
|
544
|
+
return value?.start != null && value.end != null;
|
|
545
|
+
}
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/components/inputs/DateTime/shared/CalendarSelectHeader.tsx
|
|
548
|
+
const CalendarSelectHeader = ({ state, isPrevMonthDisabled, isPrevYearDisabled, isNextMonthDisabled, isNextYearDisabled, offset = { months: 0 }, onNavigate, maxDate, minDate }) => {
|
|
549
|
+
const { t } = useTranslation("ui");
|
|
550
|
+
const displayDate = state.visibleRange.start.add(offset);
|
|
551
|
+
const currentMonth = displayDate.month - 1;
|
|
552
|
+
const currentYear = displayDate.year;
|
|
553
|
+
const formatter = $1697a7ad3db7b79f$re_export$useDateFormatter({
|
|
554
|
+
month: "long",
|
|
555
|
+
timeZone: state.timeZone
|
|
556
|
+
});
|
|
557
|
+
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
558
|
+
const MONTHS = useMemo(() => {
|
|
559
|
+
const months = [];
|
|
560
|
+
for (let i = 1; i <= numMonths; i++) {
|
|
561
|
+
const date = state.focusedDate.set({ month: i });
|
|
562
|
+
months.push(formatter.format(date.toDate(state.timeZone)));
|
|
563
|
+
}
|
|
564
|
+
return months;
|
|
565
|
+
}, [
|
|
566
|
+
formatter,
|
|
567
|
+
numMonths,
|
|
568
|
+
state.focusedDate,
|
|
569
|
+
state.timeZone
|
|
570
|
+
]);
|
|
571
|
+
const years = Array.from({ length: 201 }, (_, i) => currentYear - 100 + i);
|
|
572
|
+
const getAvailableMonths = () => {
|
|
573
|
+
return MONTHS.map((month, i) => {
|
|
574
|
+
const monthDate = displayDate.set({ month: i + 1 });
|
|
575
|
+
let isDisabled = false;
|
|
576
|
+
if (maxDate) isDisabled = monthDate.year > maxDate.year || monthDate.year === maxDate.year && monthDate.month >= maxDate.month;
|
|
577
|
+
if (minDate) isDisabled = monthDate.year < minDate.year || monthDate.year === minDate.year && monthDate.month <= minDate.month;
|
|
578
|
+
return {
|
|
579
|
+
month,
|
|
580
|
+
value: i,
|
|
581
|
+
isDisabled
|
|
582
|
+
};
|
|
583
|
+
});
|
|
584
|
+
};
|
|
585
|
+
const getAvailableYears = () => {
|
|
586
|
+
return years.map((year) => {
|
|
587
|
+
let isDisabled = false;
|
|
588
|
+
if (maxDate) isDisabled = year > maxDate.year || year === maxDate.year && displayDate.month >= maxDate.month;
|
|
589
|
+
if (minDate && !isDisabled) isDisabled = year < minDate.year || year === minDate.year && displayDate.month <= minDate.month;
|
|
590
|
+
return {
|
|
591
|
+
year,
|
|
592
|
+
isDisabled
|
|
593
|
+
};
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
const availableMonths = getAvailableMonths();
|
|
597
|
+
const availableYears = getAvailableYears();
|
|
598
|
+
const handleMonthChange = (value) => {
|
|
599
|
+
if (value === null) return;
|
|
600
|
+
const newDate = displayDate.set({ month: value + 1 });
|
|
601
|
+
onNavigate?.(newDate);
|
|
602
|
+
};
|
|
603
|
+
const handleYearChange = (value) => {
|
|
604
|
+
if (value === null) return;
|
|
605
|
+
const newDate = displayDate.set({ year: value });
|
|
606
|
+
onNavigate?.(newDate);
|
|
607
|
+
};
|
|
608
|
+
const handlePrevMonth = (e) => {
|
|
609
|
+
e.preventDefault();
|
|
610
|
+
e.stopPropagation();
|
|
611
|
+
const newDate = displayDate.subtract({ months: 1 });
|
|
612
|
+
onNavigate?.(newDate);
|
|
613
|
+
};
|
|
614
|
+
const handleNextMonth = (e) => {
|
|
615
|
+
e.preventDefault();
|
|
616
|
+
e.stopPropagation();
|
|
617
|
+
const newDate = displayDate.add({ months: 1 });
|
|
618
|
+
onNavigate?.(newDate);
|
|
619
|
+
};
|
|
620
|
+
const handlePrevYear = (e) => {
|
|
621
|
+
e.preventDefault();
|
|
622
|
+
e.stopPropagation();
|
|
623
|
+
const newDate = displayDate.subtract({ years: 1 });
|
|
624
|
+
onNavigate?.(newDate);
|
|
625
|
+
};
|
|
626
|
+
const handleNextYear = (e) => {
|
|
627
|
+
e.preventDefault();
|
|
628
|
+
e.stopPropagation();
|
|
629
|
+
const newDate = displayDate.add({ years: 1 });
|
|
630
|
+
onNavigate?.(newDate);
|
|
631
|
+
};
|
|
632
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
633
|
+
className: "flex w-full items-center justify-between gap-3 border-elevation-outline-default-1 border-b border-solid px-3 py-2-5",
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ jsxs("div", {
|
|
636
|
+
className: "flex items-center",
|
|
637
|
+
children: [/* @__PURE__ */ jsx(InlineIconButton, {
|
|
638
|
+
color: "secondary",
|
|
639
|
+
isDisabled: isPrevYearDisabled,
|
|
640
|
+
onClick: handlePrevYear,
|
|
641
|
+
icon: ChevronsLeft,
|
|
642
|
+
label: t(($) => $.ui.datePicker.navigation.previousYear)
|
|
643
|
+
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
644
|
+
color: "secondary",
|
|
645
|
+
isDisabled: isPrevMonthDisabled,
|
|
646
|
+
onClick: handlePrevMonth,
|
|
647
|
+
icon: ChevronLeft,
|
|
648
|
+
label: t(($) => $.ui.datePicker.navigation.previousMonth)
|
|
649
|
+
})]
|
|
650
|
+
}),
|
|
651
|
+
/* @__PURE__ */ jsxs("div", {
|
|
652
|
+
className: "flex gap-2",
|
|
653
|
+
children: [/* @__PURE__ */ jsx(Select, {
|
|
654
|
+
label: "Month",
|
|
655
|
+
hideLabel: true,
|
|
656
|
+
customTrigger: /* @__PURE__ */ jsx(PillButton, {
|
|
657
|
+
color: "secondary",
|
|
658
|
+
variant: "subtle",
|
|
659
|
+
iconPosition: "right",
|
|
660
|
+
icon: ChevronDown,
|
|
661
|
+
children: MONTHS[currentMonth].slice(0, 3)
|
|
662
|
+
}),
|
|
663
|
+
ignoreTriggerWidth: true,
|
|
664
|
+
items: availableMonths.map(({ month, value, isDisabled }) => ({
|
|
665
|
+
label: month,
|
|
666
|
+
id: value,
|
|
667
|
+
isDisabled
|
|
668
|
+
})).filter(({ isDisabled }) => !isDisabled),
|
|
669
|
+
value: currentMonth,
|
|
670
|
+
onChange: handleMonthChange
|
|
671
|
+
}), /* @__PURE__ */ jsx(Select, {
|
|
672
|
+
label: "Year",
|
|
673
|
+
hideLabel: true,
|
|
674
|
+
customTrigger: /* @__PURE__ */ jsx(PillButton, {
|
|
675
|
+
color: "secondary",
|
|
676
|
+
variant: "subtle",
|
|
677
|
+
iconPosition: "right",
|
|
678
|
+
icon: ChevronDown,
|
|
679
|
+
children: currentYear.toString()
|
|
680
|
+
}),
|
|
681
|
+
items: availableYears.map(({ year, isDisabled }) => ({
|
|
682
|
+
label: year.toString(),
|
|
683
|
+
id: year,
|
|
684
|
+
isDisabled
|
|
685
|
+
})).filter(({ isDisabled }) => !isDisabled),
|
|
686
|
+
value: currentYear,
|
|
687
|
+
onChange: handleYearChange
|
|
688
|
+
})]
|
|
689
|
+
}),
|
|
690
|
+
/* @__PURE__ */ jsxs("div", {
|
|
691
|
+
className: "flex items-center",
|
|
692
|
+
children: [/* @__PURE__ */ jsx(InlineIconButton, {
|
|
693
|
+
color: "secondary",
|
|
694
|
+
isDisabled: isNextMonthDisabled,
|
|
695
|
+
onClick: handleNextMonth,
|
|
696
|
+
icon: ChevronRight,
|
|
697
|
+
label: t(($) => $.ui.datePicker.navigation.nextMonth)
|
|
698
|
+
}), /* @__PURE__ */ jsx(InlineIconButton, {
|
|
699
|
+
color: "secondary",
|
|
700
|
+
isDisabled: isNextYearDisabled,
|
|
701
|
+
onClick: handleNextYear,
|
|
702
|
+
icon: ChevronsRight,
|
|
703
|
+
label: t(($) => $.ui.datePicker.navigation.nextYear)
|
|
704
|
+
})]
|
|
705
|
+
})
|
|
706
|
+
]
|
|
707
|
+
});
|
|
708
|
+
};
|
|
709
|
+
//#endregion
|
|
710
|
+
//#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
|
|
711
|
+
const RangeCalendar = ({ className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, isRangeSelectionDisabled }) => {
|
|
712
|
+
const leftRef = useRef(null);
|
|
713
|
+
const rightRef = useRef(null);
|
|
714
|
+
const { calendarProps: leftCalendarAriaProps } = useRangeCalendar(calendarProps, leftCalendarState, leftRef);
|
|
715
|
+
const { calendarProps: rightCalendarAriaProps } = useRangeCalendar(calendarProps, rightCalendarState, rightRef);
|
|
716
|
+
const leftDate = leftCalendarState.visibleRange.start;
|
|
717
|
+
const rightDate = rightCalendarState.visibleRange.start;
|
|
718
|
+
const handleLeftKeyboardNavigation = (event, date) => {
|
|
719
|
+
return onKeyboardNavigation?.(event, date, "left") ?? false;
|
|
720
|
+
};
|
|
721
|
+
const handleRightKeyboardNavigation = (event, date) => {
|
|
722
|
+
return onKeyboardNavigation?.(event, date, "right") ?? false;
|
|
723
|
+
};
|
|
724
|
+
const handleLeftNavigate = (newDate) => {
|
|
725
|
+
const rightCurrentDate = rightCalendarState.visibleRange.start;
|
|
726
|
+
if (newDate.year < rightCurrentDate.year || newDate.year === rightCurrentDate.year && newDate.month < rightCurrentDate.month) leftCalendarState.setFocusedDate(newDate);
|
|
727
|
+
else {
|
|
728
|
+
const closestValidDate = rightCurrentDate.subtract({ months: 1 });
|
|
729
|
+
leftCalendarState.setFocusedDate(closestValidDate);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
const handleRightNavigate = (newDate) => {
|
|
733
|
+
const leftCurrentDate = leftCalendarState.visibleRange.start;
|
|
734
|
+
if (newDate.year > leftCurrentDate.year || newDate.year === leftCurrentDate.year && newDate.month > leftCurrentDate.month) rightCalendarState.setFocusedDate(newDate);
|
|
735
|
+
else {
|
|
736
|
+
const closestValidDate = leftCurrentDate.add({ months: 1 });
|
|
737
|
+
rightCalendarState.setFocusedDate(closestValidDate);
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
const isNextDisabled = useMemo(() => {
|
|
741
|
+
const leftNextDate = leftDate.add({ months: 1 });
|
|
742
|
+
return leftNextDate.year > rightDate.year || leftNextDate.year === rightDate.year && leftNextDate.month === rightDate.month;
|
|
743
|
+
}, [leftDate, rightDate]);
|
|
744
|
+
const isPrevDisabled = useMemo(() => {
|
|
745
|
+
const rightPrevDate = rightDate.subtract({ months: 1 });
|
|
746
|
+
return rightPrevDate.year < leftDate.year || rightPrevDate.year === leftDate.year && rightPrevDate.month === leftDate.month;
|
|
747
|
+
}, [leftDate, rightDate]);
|
|
748
|
+
return /* @__PURE__ */ jsx("div", {
|
|
749
|
+
className: clsx("flex w-fit flex-col items-center bg-elevation-fill-default-1", className),
|
|
750
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
751
|
+
className: "flex",
|
|
752
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
753
|
+
...leftCalendarAriaProps,
|
|
754
|
+
ref: leftRef,
|
|
755
|
+
className: "flex flex-col items-center",
|
|
756
|
+
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
757
|
+
state: leftCalendarState,
|
|
758
|
+
isNextMonthDisabled: isNextDisabled,
|
|
759
|
+
isNextYearDisabled: isNextDisabled,
|
|
760
|
+
onNavigate: handleLeftNavigate,
|
|
761
|
+
maxDate: rightDate
|
|
762
|
+
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
763
|
+
state: leftCalendarState,
|
|
764
|
+
onApply,
|
|
765
|
+
shouldCloseOnSelect: false,
|
|
766
|
+
onDateSelection,
|
|
767
|
+
rangeSelection,
|
|
768
|
+
onDateHover,
|
|
769
|
+
hoverDate,
|
|
770
|
+
onKeyboardNavigation: handleLeftKeyboardNavigation,
|
|
771
|
+
className: clsx("h-64 w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
772
|
+
calendarSide: "left",
|
|
773
|
+
isSelectionDisabled: isRangeSelectionDisabled
|
|
774
|
+
})]
|
|
775
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
776
|
+
...rightCalendarAriaProps,
|
|
777
|
+
ref: rightRef,
|
|
778
|
+
className: "hidden flex-col items-center md:flex",
|
|
779
|
+
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
780
|
+
state: rightCalendarState,
|
|
781
|
+
isPrevMonthDisabled: isPrevDisabled,
|
|
782
|
+
isPrevYearDisabled: isPrevDisabled,
|
|
783
|
+
onNavigate: handleRightNavigate,
|
|
784
|
+
minDate: leftDate
|
|
785
|
+
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
786
|
+
state: rightCalendarState,
|
|
787
|
+
onApply,
|
|
788
|
+
shouldCloseOnSelect: false,
|
|
789
|
+
onDateSelection,
|
|
790
|
+
rangeSelection,
|
|
791
|
+
onDateHover,
|
|
792
|
+
hoverDate,
|
|
793
|
+
onKeyboardNavigation: handleRightKeyboardNavigation,
|
|
794
|
+
className: clsx("h-64 w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
795
|
+
calendarSide: "right",
|
|
796
|
+
isSelectionDisabled: isRangeSelectionDisabled
|
|
797
|
+
})]
|
|
798
|
+
})]
|
|
799
|
+
})
|
|
800
|
+
});
|
|
801
|
+
};
|
|
802
|
+
//#endregion
|
|
803
|
+
//#region src/components/inputs/DateTime/DateRangePicker/dateRangePreset.utils.ts
|
|
804
|
+
const dateRangePresetValues = [
|
|
805
|
+
"thisWeek",
|
|
806
|
+
"lastWeek",
|
|
807
|
+
"thisAndLastWeek",
|
|
808
|
+
"thisMonth",
|
|
809
|
+
"thisAndLastMonth",
|
|
810
|
+
"thisYear",
|
|
811
|
+
"lastYear",
|
|
812
|
+
"thisAndLastYear",
|
|
813
|
+
"soFar"
|
|
814
|
+
];
|
|
815
|
+
const isStoredRelativeDateRangeValue = (value) => typeof value === "object" && value !== null && typeof value.relativeValue === "string";
|
|
816
|
+
const isRelativeDateRangeValue = (value) => isStoredRelativeDateRangeValue(value) && typeof value.resolvedValue === "object";
|
|
817
|
+
const isDateRangePresetValue = (value) => dateRangePresetValues.some((preset) => preset === value);
|
|
818
|
+
const getDateRangePreset = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
819
|
+
if (!isDateRangePresetValue(value)) return;
|
|
820
|
+
const previousYear = currentDate.subtract({ years: 1 });
|
|
821
|
+
switch (value) {
|
|
822
|
+
case "thisWeek": return {
|
|
823
|
+
start: startOfWeek(currentDate, locale),
|
|
824
|
+
end: endOfWeek(currentDate, locale)
|
|
825
|
+
};
|
|
826
|
+
case "lastWeek": {
|
|
827
|
+
const thisWeekStart = startOfWeek(currentDate, locale);
|
|
828
|
+
return {
|
|
829
|
+
start: thisWeekStart.subtract({ weeks: 1 }),
|
|
830
|
+
end: thisWeekStart.subtract({ days: 1 })
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
case "thisAndLastWeek": return {
|
|
834
|
+
start: startOfWeek(currentDate, locale).subtract({ weeks: 1 }),
|
|
835
|
+
end: endOfWeek(currentDate, locale)
|
|
836
|
+
};
|
|
837
|
+
case "thisMonth": return {
|
|
838
|
+
start: startOfMonth(currentDate),
|
|
839
|
+
end: endOfMonth(currentDate)
|
|
840
|
+
};
|
|
841
|
+
case "thisAndLastMonth": return {
|
|
842
|
+
start: startOfMonth(currentDate).subtract({ months: 1 }),
|
|
843
|
+
end: endOfMonth(currentDate)
|
|
844
|
+
};
|
|
845
|
+
case "thisYear":
|
|
846
|
+
case "soFar": return {
|
|
847
|
+
start: startOfYear(currentDate),
|
|
848
|
+
end: currentDate
|
|
849
|
+
};
|
|
850
|
+
case "lastYear": return {
|
|
851
|
+
start: startOfYear(previousYear),
|
|
852
|
+
end: endOfYear(previousYear)
|
|
853
|
+
};
|
|
854
|
+
case "thisAndLastYear": return {
|
|
855
|
+
start: startOfYear(previousYear),
|
|
856
|
+
end: currentDate
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
};
|
|
860
|
+
const resolveDateRangePreset = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
861
|
+
const range = getDateRangePreset(value, currentDate, locale);
|
|
862
|
+
if (!range) return;
|
|
863
|
+
return {
|
|
864
|
+
start: DateTimeUtils.fromCalendarDateToUTCISO(range.start),
|
|
865
|
+
end: DateTimeUtils.fromCalendarDateToUTCISO(range.end, { endOfDay: true })
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
const hydrateRelativeDateRangeValue = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
869
|
+
if (isRelativeDateRangeValue(value)) return value;
|
|
870
|
+
const resolvedValue = resolveDateRangePreset(value.relativeValue, currentDate, locale);
|
|
871
|
+
return resolvedValue ? {
|
|
872
|
+
relativeValue: value.relativeValue,
|
|
873
|
+
resolvedValue
|
|
874
|
+
} : void 0;
|
|
875
|
+
};
|
|
876
|
+
//#endregion
|
|
877
|
+
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.tsx
|
|
878
|
+
const DateRangePickerBase = (props) => {
|
|
879
|
+
const ui = UIConfig.useConfig();
|
|
880
|
+
const { t } = useTranslation();
|
|
881
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, onValueCommit, 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, enableRelativeMode, onModeChange, minValue, maxValue, ...rest } = props;
|
|
882
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
883
|
+
const variant = variantProp ?? ui.input.variant;
|
|
884
|
+
const as = asProp ?? ui.input.as;
|
|
885
|
+
const size = sizeProp ?? ui.input.size;
|
|
886
|
+
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
887
|
+
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
888
|
+
const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
|
|
889
|
+
const todayIconButtonComponent = todayIconButtonComponentProp ?? ui.dateInput.todayIconButtonComponent;
|
|
890
|
+
const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
|
|
891
|
+
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
892
|
+
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
893
|
+
const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
|
|
894
|
+
const allowPartialRange = allowPartialRangeProp ?? ui.dateInput.allowPartialRange;
|
|
895
|
+
const timeZone = ui.dateInput.timeZone;
|
|
896
|
+
let effectiveTimeZone = getLocalTimeZone();
|
|
897
|
+
if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
|
|
898
|
+
const [validationRangeError, setValidationRangeError] = useState();
|
|
899
|
+
const datePickerInputRef = useRef(null);
|
|
900
|
+
const dateRangePickerRef = useMemo(() => ({ get current() {
|
|
901
|
+
return datePickerInputRef.current?.getContainer?.() || null;
|
|
902
|
+
} }), []);
|
|
903
|
+
const normalizedValue = value ?? null;
|
|
904
|
+
const fieldRangeRef = useRef(normalizedValue);
|
|
905
|
+
fieldRangeRef.current = normalizedValue;
|
|
906
|
+
const dialogState = $6de3e3f1a7663217$export$e50a61c1de9f574({
|
|
907
|
+
...rest,
|
|
908
|
+
value: normalizedValue,
|
|
909
|
+
shouldCloseOnSelect: false,
|
|
910
|
+
shouldForceLeadingZeros,
|
|
911
|
+
minValue,
|
|
912
|
+
maxValue
|
|
913
|
+
});
|
|
914
|
+
const state = $6de3e3f1a7663217$export$e50a61c1de9f574({
|
|
915
|
+
...rest,
|
|
916
|
+
shouldForceLeadingZeros,
|
|
917
|
+
value: normalizedValue,
|
|
918
|
+
minValue,
|
|
919
|
+
maxValue,
|
|
920
|
+
onChange: (newValue) => {
|
|
921
|
+
if (allowPartialRange && newValue === null) return;
|
|
922
|
+
fieldRangeRef.current = newValue;
|
|
923
|
+
const isInvalidRange = isValidRange(newValue);
|
|
924
|
+
onChange?.(newValue);
|
|
925
|
+
if (isInvalidRange) return;
|
|
926
|
+
handleCalendarStatesChange(newValue);
|
|
927
|
+
},
|
|
928
|
+
shouldCloseOnSelect: false
|
|
929
|
+
});
|
|
930
|
+
const { groupProps, labelProps, startFieldProps, endFieldProps, buttonProps, dialogProps } = $cccdba1b2bb08448$export$12fd5f0e9f4bb192({
|
|
931
|
+
...rest,
|
|
932
|
+
label,
|
|
933
|
+
shouldForceLeadingZeros,
|
|
934
|
+
minValue,
|
|
935
|
+
maxValue
|
|
936
|
+
}, state, dateRangePickerRef);
|
|
937
|
+
const { calendarProps } = $cccdba1b2bb08448$export$12fd5f0e9f4bb192({
|
|
938
|
+
...rest,
|
|
939
|
+
label,
|
|
940
|
+
shouldForceLeadingZeros,
|
|
941
|
+
minValue,
|
|
942
|
+
maxValue
|
|
943
|
+
}, dialogState, dateRangePickerRef);
|
|
944
|
+
const emitPartialRangeChange = (part, date) => {
|
|
945
|
+
if (!allowPartialRange) return;
|
|
946
|
+
const partialRange = {
|
|
947
|
+
start: part === "start" ? date : fieldRangeRef.current?.start ?? null,
|
|
948
|
+
end: part === "end" ? date : fieldRangeRef.current?.end ?? null
|
|
949
|
+
};
|
|
950
|
+
fieldRangeRef.current = partialRange;
|
|
951
|
+
if (partialRange.start && partialRange.end) return;
|
|
952
|
+
const newValue = partialRange.start || partialRange.end ? partialRange : null;
|
|
953
|
+
onChange?.(newValue);
|
|
954
|
+
};
|
|
955
|
+
const { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
956
|
+
useImperativeHandle(ref, () => ({
|
|
957
|
+
clear: () => {
|
|
958
|
+
datePickerInputRef.current?.clear();
|
|
959
|
+
},
|
|
960
|
+
getContainer: () => datePickerInputRef.current?.getContainer?.() ?? null
|
|
961
|
+
}));
|
|
962
|
+
const handleBlur = (newValue) => {
|
|
963
|
+
onBlur?.({ target: { value: newValue } });
|
|
964
|
+
};
|
|
965
|
+
const formFieldProps = {
|
|
966
|
+
error: error || validationRangeError,
|
|
967
|
+
label,
|
|
968
|
+
tooltipText,
|
|
969
|
+
helperText,
|
|
970
|
+
isRequired,
|
|
971
|
+
rightContent,
|
|
972
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
973
|
+
hideLabel,
|
|
974
|
+
isDisabled,
|
|
975
|
+
headerClassName,
|
|
976
|
+
errorClassName
|
|
977
|
+
};
|
|
978
|
+
const leftCalendarState = $a0a87fb6fcfb22ec$export$9a987164d97ecc90({
|
|
979
|
+
...calendarProps,
|
|
980
|
+
locale,
|
|
981
|
+
createCalendar,
|
|
982
|
+
pageBehavior: "single",
|
|
983
|
+
visibleDuration: { months: 1 },
|
|
984
|
+
minValue,
|
|
985
|
+
maxValue
|
|
986
|
+
});
|
|
987
|
+
const rightCalendarState = $a0a87fb6fcfb22ec$export$9a987164d97ecc90({
|
|
988
|
+
...calendarProps,
|
|
989
|
+
locale,
|
|
990
|
+
createCalendar,
|
|
991
|
+
pageBehavior: "single",
|
|
992
|
+
visibleDuration: { months: 1 },
|
|
993
|
+
defaultFocusedValue: today(effectiveTimeZone).add({ months: 1 }),
|
|
994
|
+
minValue,
|
|
995
|
+
maxValue
|
|
996
|
+
});
|
|
997
|
+
const [activePreset, setActivePreset] = useState(mode === "relative" ? relativeValue ?? null : null);
|
|
998
|
+
const handledRelativeValueRef = useRef(relativeValue);
|
|
999
|
+
useEffect(() => {
|
|
1000
|
+
setActivePreset(mode === "relative" ? relativeValue ?? null : null);
|
|
1001
|
+
}, [mode, relativeValue]);
|
|
1002
|
+
const [rangeSelection, setRangeSelection] = useState({
|
|
1003
|
+
start: value?.start || null,
|
|
1004
|
+
end: value?.end || null,
|
|
1005
|
+
isSelecting: false
|
|
1006
|
+
});
|
|
1007
|
+
const [hoverDate, setHoverDate] = useState(null);
|
|
1008
|
+
const headerProps = {
|
|
1009
|
+
label,
|
|
1010
|
+
tooltipText,
|
|
1011
|
+
helperText,
|
|
1012
|
+
isRequired,
|
|
1013
|
+
rightContent,
|
|
1014
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
1015
|
+
isDisabled,
|
|
1016
|
+
className: headerClassName,
|
|
1017
|
+
labelProps
|
|
1018
|
+
};
|
|
1019
|
+
const isDateOutsideBounds = useCallback((date) => {
|
|
1020
|
+
if (minValue && date.compare(minValue) < 0) return true;
|
|
1021
|
+
if (maxValue && date.compare(maxValue) > 0) return true;
|
|
1022
|
+
return false;
|
|
1023
|
+
}, [minValue, maxValue]);
|
|
1024
|
+
const clampRangeToBounds = useCallback((range) => {
|
|
1025
|
+
if (range === null) return null;
|
|
1026
|
+
if (minValue && maxValue && minValue.compare(maxValue) > 0) return null;
|
|
1027
|
+
let startDate = range.start;
|
|
1028
|
+
let endDate = range.end;
|
|
1029
|
+
if (minValue && endDate.compare(minValue) < 0 || maxValue && startDate.compare(maxValue) > 0) return null;
|
|
1030
|
+
if (minValue && startDate.compare(minValue) < 0) startDate = minValue;
|
|
1031
|
+
if (maxValue && startDate.compare(maxValue) > 0) startDate = maxValue;
|
|
1032
|
+
if (minValue && endDate.compare(minValue) < 0) endDate = minValue;
|
|
1033
|
+
if (maxValue && endDate.compare(maxValue) > 0) endDate = maxValue;
|
|
1034
|
+
if (startDate.compare(endDate) > 0) return null;
|
|
1035
|
+
return {
|
|
1036
|
+
start: startDate,
|
|
1037
|
+
end: endDate
|
|
1038
|
+
};
|
|
1039
|
+
}, [minValue, maxValue]);
|
|
1040
|
+
const isRangeWithinBounds = useCallback((range) => {
|
|
1041
|
+
if (minValue && range.start.compare(minValue) < 0) return false;
|
|
1042
|
+
if (maxValue && range.end.compare(maxValue) > 0) return false;
|
|
1043
|
+
return true;
|
|
1044
|
+
}, [minValue, maxValue]);
|
|
1045
|
+
const isValidRange = useCallback((newValue) => {
|
|
1046
|
+
if (newValue?.start && newValue?.end) {
|
|
1047
|
+
const startDate = newValue.start;
|
|
1048
|
+
if (newValue.end.compare(startDate) < 0) {
|
|
1049
|
+
setValidationRangeError(t(($) => $.ui.datePicker.errors.endDateBeforeStart, { ns: "ui" }));
|
|
1050
|
+
return true;
|
|
1051
|
+
}
|
|
1052
|
+
setValidationRangeError(void 0);
|
|
1053
|
+
} else setValidationRangeError(void 0);
|
|
1054
|
+
return false;
|
|
1055
|
+
}, [t]);
|
|
1056
|
+
const handleCalendarStatesChange = (newValue) => {
|
|
1057
|
+
if (newValue) {
|
|
1058
|
+
const clampedValue = clampRangeToBounds(newValue);
|
|
1059
|
+
if (!clampedValue) return;
|
|
1060
|
+
if (isValidRange(clampedValue)) return;
|
|
1061
|
+
dialogState.setValue(clampedValue);
|
|
1062
|
+
const startDate = clampedValue.start;
|
|
1063
|
+
const endDate = clampedValue.end;
|
|
1064
|
+
leftCalendarState.setFocusedDate(startDate);
|
|
1065
|
+
if (startDate.year === endDate.year && startDate.month === endDate.month) rightCalendarState.setFocusedDate(startDate.add({ months: 1 }));
|
|
1066
|
+
else rightCalendarState.setFocusedDate(endDate);
|
|
1067
|
+
leftCalendarState.setValue(clampedValue);
|
|
1068
|
+
rightCalendarState.setValue(clampedValue);
|
|
1069
|
+
setRangeSelection({
|
|
1070
|
+
start: clampedValue.start,
|
|
1071
|
+
end: clampedValue.end,
|
|
1072
|
+
isSelecting: false
|
|
1073
|
+
});
|
|
1074
|
+
setHoverDate(null);
|
|
1075
|
+
setActivePreset(null);
|
|
1076
|
+
} else {
|
|
1077
|
+
setValidationRangeError(void 0);
|
|
1078
|
+
dialogState.setValue(null);
|
|
1079
|
+
leftCalendarState.setValue(null);
|
|
1080
|
+
rightCalendarState.setValue(null);
|
|
1081
|
+
setRangeSelection({
|
|
1082
|
+
start: null,
|
|
1083
|
+
end: null,
|
|
1084
|
+
isSelecting: false
|
|
1085
|
+
});
|
|
1086
|
+
setHoverDate(null);
|
|
1087
|
+
setActivePreset(null);
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
const throttledSetHoverDate = useCallback((date) => {
|
|
1091
|
+
requestAnimationFrame(() => {
|
|
1092
|
+
setHoverDate(date);
|
|
1093
|
+
});
|
|
1094
|
+
}, []);
|
|
1095
|
+
const handleDateHover = useCallback((date) => {
|
|
1096
|
+
if (rangeSelection.isSelecting && rangeSelection.start) throttledSetHoverDate(date);
|
|
1097
|
+
}, [
|
|
1098
|
+
rangeSelection.isSelecting,
|
|
1099
|
+
rangeSelection.start,
|
|
1100
|
+
throttledSetHoverDate
|
|
1101
|
+
]);
|
|
1102
|
+
const handleDateSelection = useCallback((date, calendarSide) => {
|
|
1103
|
+
if (calendarSide) {
|
|
1104
|
+
const currentVisibleMonth = (calendarSide === "left" ? leftCalendarState : rightCalendarState).visibleRange.start;
|
|
1105
|
+
if (date.month !== currentVisibleMonth.month || date.year !== currentVisibleMonth.year) {
|
|
1106
|
+
if (calendarSide === "left") {
|
|
1107
|
+
leftCalendarState.setFocusedDate(date);
|
|
1108
|
+
rightCalendarState.setFocusedDate(date.add({ months: 1 }));
|
|
1109
|
+
} else {
|
|
1110
|
+
rightCalendarState.setFocusedDate(date);
|
|
1111
|
+
leftCalendarState.setFocusedDate(date.subtract({ months: 1 }));
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
if (isDateOutsideBounds(date)) return;
|
|
1116
|
+
if (!rangeSelection.isSelecting || !rangeSelection.start) {
|
|
1117
|
+
setRangeSelection({
|
|
1118
|
+
start: date,
|
|
1119
|
+
end: null,
|
|
1120
|
+
isSelecting: true
|
|
1121
|
+
});
|
|
1122
|
+
setHoverDate(null);
|
|
1123
|
+
leftCalendarState.setValue(null);
|
|
1124
|
+
rightCalendarState.setValue(null);
|
|
1125
|
+
} else {
|
|
1126
|
+
const { start } = rangeSelection;
|
|
1127
|
+
const end = date;
|
|
1128
|
+
const newRange = {
|
|
1129
|
+
start: start.compare(end) <= 0 ? start : end,
|
|
1130
|
+
end: start.compare(end) <= 0 ? end : start
|
|
1131
|
+
};
|
|
1132
|
+
const clampedRange = clampRangeToBounds(newRange);
|
|
1133
|
+
if (!clampedRange) return;
|
|
1134
|
+
leftCalendarState.setValue(clampedRange);
|
|
1135
|
+
rightCalendarState.setValue(clampedRange);
|
|
1136
|
+
dialogState.setValue(clampedRange);
|
|
1137
|
+
setRangeSelection({
|
|
1138
|
+
start: clampedRange.start,
|
|
1139
|
+
end: clampedRange.end,
|
|
1140
|
+
isSelecting: false
|
|
1141
|
+
});
|
|
1142
|
+
setHoverDate(null);
|
|
1143
|
+
setActivePreset(null);
|
|
1144
|
+
}
|
|
1145
|
+
}, [
|
|
1146
|
+
rangeSelection,
|
|
1147
|
+
leftCalendarState,
|
|
1148
|
+
rightCalendarState,
|
|
1149
|
+
dialogState,
|
|
1150
|
+
isDateOutsideBounds,
|
|
1151
|
+
clampRangeToBounds
|
|
1152
|
+
]);
|
|
1153
|
+
const handleKeyboardNavigation = useCallback((event, date, calendarSide) => {
|
|
1154
|
+
const currentState = calendarSide === "left" ? leftCalendarState : rightCalendarState;
|
|
1155
|
+
const otherState = calendarSide === "left" ? rightCalendarState : leftCalendarState;
|
|
1156
|
+
let shouldPreventDefault = false;
|
|
1157
|
+
switch (event.key) {
|
|
1158
|
+
case "ArrowRight": {
|
|
1159
|
+
const nextDate = date.add({ days: 1 });
|
|
1160
|
+
const currentMonth = currentState.visibleRange.start;
|
|
1161
|
+
const otherMonth = otherState.visibleRange.start;
|
|
1162
|
+
if (calendarSide === "left" && nextDate.month !== currentMonth.month) {
|
|
1163
|
+
if (nextDate.year === otherMonth.year && nextDate.month === otherMonth.month) {
|
|
1164
|
+
otherState.setFocusedDate(nextDate);
|
|
1165
|
+
shouldPreventDefault = true;
|
|
1166
|
+
} else {
|
|
1167
|
+
rightCalendarState.setFocusedDate(nextDate);
|
|
1168
|
+
shouldPreventDefault = true;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
break;
|
|
1172
|
+
}
|
|
1173
|
+
case "ArrowLeft": {
|
|
1174
|
+
const prevDate = date.subtract({ days: 1 });
|
|
1175
|
+
const currentMonth = currentState.visibleRange.start;
|
|
1176
|
+
const otherMonth = otherState.visibleRange.start;
|
|
1177
|
+
if (calendarSide === "right" && prevDate.month !== currentMonth.month) {
|
|
1178
|
+
if (prevDate.year === otherMonth.year && prevDate.month === otherMonth.month) {
|
|
1179
|
+
otherState.setFocusedDate(prevDate);
|
|
1180
|
+
shouldPreventDefault = true;
|
|
1181
|
+
} else {
|
|
1182
|
+
leftCalendarState.setFocusedDate(prevDate);
|
|
1183
|
+
shouldPreventDefault = true;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
break;
|
|
1187
|
+
}
|
|
1188
|
+
case "ArrowDown": {
|
|
1189
|
+
const nextWeekDate = date.add({ weeks: 1 });
|
|
1190
|
+
const currentMonth = currentState.visibleRange.start;
|
|
1191
|
+
const otherMonth = otherState.visibleRange.start;
|
|
1192
|
+
if (calendarSide === "left" && nextWeekDate.month !== currentMonth.month) {
|
|
1193
|
+
if (nextWeekDate.year === otherMonth.year && nextWeekDate.month === otherMonth.month) {
|
|
1194
|
+
otherState.setFocusedDate(nextWeekDate);
|
|
1195
|
+
shouldPreventDefault = true;
|
|
1196
|
+
} else {
|
|
1197
|
+
rightCalendarState.setFocusedDate(nextWeekDate);
|
|
1198
|
+
shouldPreventDefault = true;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
break;
|
|
1202
|
+
}
|
|
1203
|
+
case "ArrowUp": {
|
|
1204
|
+
const prevWeekDate = date.subtract({ weeks: 1 });
|
|
1205
|
+
const currentMonth = currentState.visibleRange.start;
|
|
1206
|
+
const otherMonth = otherState.visibleRange.start;
|
|
1207
|
+
if (calendarSide === "right" && prevWeekDate.month !== currentMonth.month) {
|
|
1208
|
+
if (prevWeekDate.year === otherMonth.year && prevWeekDate.month === otherMonth.month) {
|
|
1209
|
+
otherState.setFocusedDate(prevWeekDate);
|
|
1210
|
+
shouldPreventDefault = true;
|
|
1211
|
+
} else {
|
|
1212
|
+
leftCalendarState.setFocusedDate(prevWeekDate);
|
|
1213
|
+
shouldPreventDefault = true;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
break;
|
|
1217
|
+
}
|
|
1218
|
+
case "Enter":
|
|
1219
|
+
case " ":
|
|
1220
|
+
handleDateSelection(date);
|
|
1221
|
+
shouldPreventDefault = true;
|
|
1222
|
+
break;
|
|
1223
|
+
case "Escape":
|
|
1224
|
+
setRangeSelection({
|
|
1225
|
+
start: null,
|
|
1226
|
+
end: null,
|
|
1227
|
+
isSelecting: false
|
|
1228
|
+
});
|
|
1229
|
+
setHoverDate(null);
|
|
1230
|
+
shouldPreventDefault = true;
|
|
1231
|
+
}
|
|
1232
|
+
if (shouldPreventDefault) {
|
|
1233
|
+
event.preventDefault();
|
|
1234
|
+
event.stopPropagation();
|
|
1235
|
+
}
|
|
1236
|
+
return shouldPreventDefault;
|
|
1237
|
+
}, [
|
|
1238
|
+
leftCalendarState,
|
|
1239
|
+
rightCalendarState,
|
|
1240
|
+
handleDateSelection
|
|
1241
|
+
]);
|
|
1242
|
+
const syncCalendarStates = useCallback((newValue) => {
|
|
1243
|
+
if (newValue === null) {
|
|
1244
|
+
setValidationRangeError(void 0);
|
|
1245
|
+
leftCalendarState.setValue(null);
|
|
1246
|
+
rightCalendarState.setValue(null);
|
|
1247
|
+
dialogState.setValue(null);
|
|
1248
|
+
setRangeSelection({
|
|
1249
|
+
start: null,
|
|
1250
|
+
end: null,
|
|
1251
|
+
isSelecting: false
|
|
1252
|
+
});
|
|
1253
|
+
setHoverDate(null);
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
const clampedValue = clampRangeToBounds(newValue);
|
|
1257
|
+
if (!clampedValue) return;
|
|
1258
|
+
if (isValidRange(clampedValue)) return;
|
|
1259
|
+
leftCalendarState.setValue(clampedValue);
|
|
1260
|
+
rightCalendarState.setValue(clampedValue);
|
|
1261
|
+
dialogState.setValue(clampedValue);
|
|
1262
|
+
setRangeSelection({
|
|
1263
|
+
start: clampedValue.start,
|
|
1264
|
+
end: clampedValue.end,
|
|
1265
|
+
isSelecting: false
|
|
1266
|
+
});
|
|
1267
|
+
setHoverDate(null);
|
|
1268
|
+
}, [
|
|
1269
|
+
isValidRange,
|
|
1270
|
+
leftCalendarState,
|
|
1271
|
+
rightCalendarState,
|
|
1272
|
+
dialogState,
|
|
1273
|
+
clampRangeToBounds
|
|
1274
|
+
]);
|
|
1275
|
+
const onApply = () => {
|
|
1276
|
+
if (mode === "relative") {
|
|
1277
|
+
const preset = presets.find((option) => option.value === activePreset);
|
|
1278
|
+
handledRelativeValueRef.current = activePreset;
|
|
1279
|
+
onRelativeChange?.(activePreset, preset?.clampedValue ?? null);
|
|
1280
|
+
onValueCommit?.();
|
|
1281
|
+
state.toggle();
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
let valueToApply = dialogState.value;
|
|
1285
|
+
if (rangeSelection.start && rangeSelection.end) valueToApply = {
|
|
1286
|
+
start: rangeSelection.start,
|
|
1287
|
+
end: rangeSelection.end
|
|
1288
|
+
};
|
|
1289
|
+
if (valueToApply) {
|
|
1290
|
+
const clampedValue = clampRangeToBounds(valueToApply);
|
|
1291
|
+
if (clampedValue) {
|
|
1292
|
+
valueToApply = clampedValue;
|
|
1293
|
+
state.setValue(clampedValue);
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
state.toggle();
|
|
1297
|
+
onValueCommit?.();
|
|
1298
|
+
};
|
|
1299
|
+
const onTodayPress = () => {
|
|
1300
|
+
const todayDate = today(effectiveTimeZone);
|
|
1301
|
+
const clampedTodayRange = clampRangeToBounds({
|
|
1302
|
+
start: todayDate,
|
|
1303
|
+
end: todayDate
|
|
1304
|
+
});
|
|
1305
|
+
if (!clampedTodayRange) return;
|
|
1306
|
+
const startDate = clampedTodayRange.start;
|
|
1307
|
+
const endDate = clampedTodayRange.end;
|
|
1308
|
+
leftCalendarState.setFocusedDate(startDate);
|
|
1309
|
+
if (startDate.year === endDate.year && startDate.month === endDate.month) rightCalendarState.setFocusedDate(startDate.add({ months: 1 }));
|
|
1310
|
+
else rightCalendarState.setFocusedDate(endDate);
|
|
1311
|
+
syncCalendarStates(clampedTodayRange);
|
|
1312
|
+
};
|
|
1313
|
+
const onInputClear = () => {
|
|
1314
|
+
if (mode === "relative") {
|
|
1315
|
+
setActivePreset(null);
|
|
1316
|
+
handledRelativeValueRef.current = null;
|
|
1317
|
+
onRelativeChange?.(null, null);
|
|
1318
|
+
onValueCommit?.();
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
fieldRangeRef.current = null;
|
|
1322
|
+
onChange?.(null);
|
|
1323
|
+
dialogState.setValue(null);
|
|
1324
|
+
leftCalendarState.setValue(null);
|
|
1325
|
+
rightCalendarState.setValue(null);
|
|
1326
|
+
setRangeSelection({
|
|
1327
|
+
start: null,
|
|
1328
|
+
end: null,
|
|
1329
|
+
isSelecting: false
|
|
1330
|
+
});
|
|
1331
|
+
setHoverDate(null);
|
|
1332
|
+
onValueCommit?.();
|
|
1333
|
+
};
|
|
1334
|
+
const syncSelectionFromControlledValue = () => {
|
|
1335
|
+
if (mode === "relative") {
|
|
1336
|
+
setActivePreset(relativeValue ?? null);
|
|
1337
|
+
return;
|
|
1338
|
+
}
|
|
1339
|
+
const currentValue = state.value;
|
|
1340
|
+
if (!(currentValue != null && currentValue.start != null && currentValue.end != null)) {
|
|
1341
|
+
syncCalendarStates(null);
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
syncCalendarStates(currentValue);
|
|
1345
|
+
const startDate = currentValue.start;
|
|
1346
|
+
const endDate = currentValue.end;
|
|
1347
|
+
leftCalendarState.setFocusedDate(startDate);
|
|
1348
|
+
if (startDate.year === endDate.year && startDate.month === endDate.month) {
|
|
1349
|
+
rightCalendarState.setFocusedDate(startDate.add({ months: 1 }));
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
rightCalendarState.setFocusedDate(endDate);
|
|
1353
|
+
};
|
|
1354
|
+
useEffect(() => {
|
|
1355
|
+
if (!state.isOpen) return;
|
|
1356
|
+
syncSelectionFromControlledValue();
|
|
1357
|
+
}, [state.isOpen]);
|
|
1358
|
+
const onOpenChange = (_isOpen) => {
|
|
1359
|
+
state.toggle();
|
|
1360
|
+
syncSelectionFromControlledValue();
|
|
1361
|
+
};
|
|
1362
|
+
const onOpenDropdown = () => {
|
|
1363
|
+
syncSelectionFromControlledValue();
|
|
1364
|
+
state.toggle();
|
|
1365
|
+
};
|
|
1366
|
+
const todayDate = today(effectiveTimeZone);
|
|
1367
|
+
const getPresetRange = (value) => () => getDateRangePreset(value, todayDate, locale);
|
|
1368
|
+
const createPreset = (params) => {
|
|
1369
|
+
let clampedValue = clampRangeToBounds(params.getValue());
|
|
1370
|
+
let isDisabled = false;
|
|
1371
|
+
if (params.keepEnabledUnlessFutureMin) {
|
|
1372
|
+
let minDateIsInFuture = false;
|
|
1373
|
+
if (minValue && minValue.compare(todayDate) > 0) minDateIsInFuture = true;
|
|
1374
|
+
if (minDateIsInFuture) {
|
|
1375
|
+
isDisabled = true;
|
|
1376
|
+
clampedValue = null;
|
|
1377
|
+
} else if (!clampedValue && maxValue) clampedValue = {
|
|
1378
|
+
start: maxValue,
|
|
1379
|
+
end: maxValue
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
if (!clampedValue) isDisabled = true;
|
|
1383
|
+
if (clampedValue && !isRangeWithinBounds(clampedValue)) isDisabled = true;
|
|
1384
|
+
return {
|
|
1385
|
+
value: params.value,
|
|
1386
|
+
label: params.label,
|
|
1387
|
+
getValue: params.getValue,
|
|
1388
|
+
clampedValue,
|
|
1389
|
+
isDisabled
|
|
1390
|
+
};
|
|
1391
|
+
};
|
|
1392
|
+
const presets = [
|
|
1393
|
+
createPreset({
|
|
1394
|
+
value: "thisWeek",
|
|
1395
|
+
label: t(($) => $.ui.datePicker.presets.thisWeek, { ns: "ui" }),
|
|
1396
|
+
getValue: getPresetRange("thisWeek")
|
|
1397
|
+
}),
|
|
1398
|
+
createPreset({
|
|
1399
|
+
value: "lastWeek",
|
|
1400
|
+
label: t(($) => $.ui.datePicker.presets.lastWeek, { ns: "ui" }),
|
|
1401
|
+
getValue: getPresetRange("lastWeek")
|
|
1402
|
+
}),
|
|
1403
|
+
createPreset({
|
|
1404
|
+
value: "thisAndLastWeek",
|
|
1405
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastWeek, { ns: "ui" }),
|
|
1406
|
+
getValue: getPresetRange("thisAndLastWeek")
|
|
1407
|
+
}),
|
|
1408
|
+
createPreset({
|
|
1409
|
+
value: "thisMonth",
|
|
1410
|
+
label: t(($) => $.ui.datePicker.presets.thisMonth, { ns: "ui" }),
|
|
1411
|
+
getValue: getPresetRange("thisMonth")
|
|
1412
|
+
}),
|
|
1413
|
+
createPreset({
|
|
1414
|
+
value: "thisAndLastMonth",
|
|
1415
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastMonth, { ns: "ui" }),
|
|
1416
|
+
getValue: getPresetRange("thisAndLastMonth")
|
|
1417
|
+
}),
|
|
1418
|
+
createPreset({
|
|
1419
|
+
value: "thisYear",
|
|
1420
|
+
label: t(($) => $.ui.datePicker.presets.thisYear, { ns: "ui" }),
|
|
1421
|
+
getValue: getPresetRange("thisYear")
|
|
1422
|
+
}),
|
|
1423
|
+
createPreset({
|
|
1424
|
+
value: "lastYear",
|
|
1425
|
+
label: t(($) => $.ui.datePicker.presets.lastYear, { ns: "ui" }),
|
|
1426
|
+
getValue: getPresetRange("lastYear")
|
|
1427
|
+
}),
|
|
1428
|
+
createPreset({
|
|
1429
|
+
value: "thisAndLastYear",
|
|
1430
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastYear, { ns: "ui" }),
|
|
1431
|
+
getValue: getPresetRange("thisAndLastYear")
|
|
1432
|
+
}),
|
|
1433
|
+
createPreset({
|
|
1434
|
+
value: "soFar",
|
|
1435
|
+
label: t(($) => $.ui.datePicker.presets.soFar, { ns: "ui" }),
|
|
1436
|
+
getValue: getPresetRange("soFar"),
|
|
1437
|
+
keepEnabledUnlessFutureMin: true
|
|
1438
|
+
}),
|
|
1439
|
+
...relativeOptions.map((option) => {
|
|
1440
|
+
const resolvedValue = option.getValue();
|
|
1441
|
+
const range = {
|
|
1442
|
+
start: DateTimeUtils.fromUTCISOToCalendarDate(resolvedValue.start),
|
|
1443
|
+
end: DateTimeUtils.fromUTCISOToCalendarDate(resolvedValue.end)
|
|
1444
|
+
};
|
|
1445
|
+
const clampedValue = clampRangeToBounds(range);
|
|
1446
|
+
return {
|
|
1447
|
+
value: option.value,
|
|
1448
|
+
label: option.label,
|
|
1449
|
+
getValue: () => range,
|
|
1450
|
+
clampedValue,
|
|
1451
|
+
isDisabled: (option.isDisabled ?? false) || !clampedValue
|
|
1452
|
+
};
|
|
1453
|
+
})
|
|
1454
|
+
];
|
|
1455
|
+
const selectPreset = (preset) => {
|
|
1456
|
+
if (preset.isDisabled || mode !== "relative" && !preset.clampedValue) return;
|
|
1457
|
+
setActivePreset(mode === "relative" ? preset.value : preset.label);
|
|
1458
|
+
if (!preset.clampedValue) return;
|
|
1459
|
+
const presetValue = preset.clampedValue;
|
|
1460
|
+
syncCalendarStates(presetValue);
|
|
1461
|
+
const startDate = presetValue.start;
|
|
1462
|
+
leftCalendarState.setFocusedDate(startDate);
|
|
1463
|
+
const endDate = presetValue.end;
|
|
1464
|
+
if ((endDate.year - startDate.year) * 12 + (endDate.month - startDate.month) > 2) rightCalendarState.setFocusedDate(endDate);
|
|
1465
|
+
else {
|
|
1466
|
+
const rightCalendarMonth = startDate.add({ months: 1 });
|
|
1467
|
+
rightCalendarState.setFocusedDate(rightCalendarMonth);
|
|
1468
|
+
}
|
|
1469
|
+
if (mode === "relative") setActivePreset(preset.value);
|
|
1470
|
+
};
|
|
1471
|
+
const activeRelativeOption = mode === "relative" ? presets.find((preset) => preset.value === relativeValue) : void 0;
|
|
1472
|
+
useEffect(() => {
|
|
1473
|
+
if (mode !== "relative" || handledRelativeValueRef.current === relativeValue) return;
|
|
1474
|
+
handledRelativeValueRef.current = relativeValue;
|
|
1475
|
+
onChange?.(activeRelativeOption?.clampedValue ?? null);
|
|
1476
|
+
}, [
|
|
1477
|
+
activeRelativeOption?.clampedValue,
|
|
1478
|
+
mode,
|
|
1479
|
+
onChange,
|
|
1480
|
+
relativeValue
|
|
1481
|
+
]);
|
|
1482
|
+
const relativeDisplayValue = activeRelativeOption ? /* @__PURE__ */ jsx(Typography, {
|
|
1483
|
+
size: "label-1",
|
|
1484
|
+
children: activeRelativeOption.label
|
|
1485
|
+
}) : void 0;
|
|
1486
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
1487
|
+
as,
|
|
1488
|
+
error,
|
|
1489
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
1490
|
+
children: /* @__PURE__ */ jsxs(FormField, {
|
|
1491
|
+
...formFieldProps,
|
|
1492
|
+
as,
|
|
1493
|
+
labelProps,
|
|
1494
|
+
className: clsx("group relative inline-flex w-full flex-col text-left", className),
|
|
1495
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
1496
|
+
children: [/* @__PURE__ */ jsx(DatePickerInput, {
|
|
1497
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, datePickerInputRef),
|
|
1498
|
+
as,
|
|
1499
|
+
groupProps,
|
|
1500
|
+
fieldProps: {
|
|
1501
|
+
...startFieldProps,
|
|
1502
|
+
onChange: (date) => {
|
|
1503
|
+
startFieldProps.onChange?.(date);
|
|
1504
|
+
emitPartialRangeChange("start", date);
|
|
1505
|
+
},
|
|
1506
|
+
onBlur: (event) => {
|
|
1507
|
+
startFieldProps.onBlur?.(event);
|
|
1508
|
+
handleBlur(state.value);
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
endFieldProps: {
|
|
1512
|
+
...endFieldProps,
|
|
1513
|
+
onChange: (date) => {
|
|
1514
|
+
endFieldProps.onChange?.(date);
|
|
1515
|
+
emitPartialRangeChange("end", date);
|
|
1516
|
+
},
|
|
1517
|
+
onBlur: (event) => {
|
|
1518
|
+
endFieldProps.onBlur?.(event);
|
|
1519
|
+
handleBlur(state.value);
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
fieldValue: normalizedValue?.start ?? null,
|
|
1523
|
+
endFieldValue: normalizedValue?.end ?? null,
|
|
1524
|
+
isValueControlled: true,
|
|
1525
|
+
hasValue: mode === "relative" ? !!relativeValue : normalizedValue?.start != null || normalizedValue?.end != null,
|
|
1526
|
+
buttonProps,
|
|
1527
|
+
isDisabled,
|
|
1528
|
+
isInvalid: !!error,
|
|
1529
|
+
disableDropdown,
|
|
1530
|
+
variant,
|
|
1531
|
+
size,
|
|
1532
|
+
isClearable,
|
|
1533
|
+
isClearableIfDisabled,
|
|
1534
|
+
headerProps,
|
|
1535
|
+
todayIcon,
|
|
1536
|
+
todayIconButtonSize,
|
|
1537
|
+
todayIconButtonComponent,
|
|
1538
|
+
todayIconPlacement,
|
|
1539
|
+
isDirty,
|
|
1540
|
+
isRequired,
|
|
1541
|
+
disableManualEntry: mode === "relative" || disableManualEntry,
|
|
1542
|
+
displayContent: relativeDisplayValue,
|
|
1543
|
+
autoFixYear,
|
|
1544
|
+
placeholder,
|
|
1545
|
+
className: inputClassName,
|
|
1546
|
+
onOpenDropdown,
|
|
1547
|
+
timeZone: effectiveTimeZone,
|
|
1548
|
+
onClear: onInputClear,
|
|
1549
|
+
onValueCommit
|
|
1550
|
+
}), /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
1551
|
+
hideSidebar,
|
|
1552
|
+
sidebar: /* @__PURE__ */ jsxs("div", {
|
|
1553
|
+
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",
|
|
1554
|
+
children: [enableRelativeMode && /* @__PURE__ */ jsx(Switch, {
|
|
1555
|
+
isSelected: mode === "relative",
|
|
1556
|
+
onChange: onModeChange,
|
|
1557
|
+
className: "shrink-0 px-2 py-2 md:px-list-side-item-left",
|
|
1558
|
+
children: t(($) => $.ui.datePicker.relativeMode, { ns: "ui" })
|
|
1559
|
+
}), presets.map((preset) => /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
1560
|
+
isDisabled: preset.isDisabled,
|
|
1561
|
+
onClick: () => selectPreset(preset),
|
|
1562
|
+
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"),
|
|
1563
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
1564
|
+
size: "label-2",
|
|
1565
|
+
sizeMobile: "label-3",
|
|
1566
|
+
as: "span",
|
|
1567
|
+
className: "whitespace-nowrap",
|
|
1568
|
+
children: preset.label
|
|
1569
|
+
})
|
|
1570
|
+
}, mode === "relative" ? preset.value : preset.label))]
|
|
1571
|
+
}),
|
|
1572
|
+
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
1573
|
+
isDisabled,
|
|
1574
|
+
isValid: mode === "relative" ? !!activePreset : !dialogState.isInvalid && !!dialogState.value,
|
|
1575
|
+
onTodayPress: mode === "relative" ? void 0 : onTodayPress,
|
|
1576
|
+
onApply
|
|
1577
|
+
}),
|
|
1578
|
+
label,
|
|
1579
|
+
triggerRef: dateRangePickerRef,
|
|
1580
|
+
dialogProps,
|
|
1581
|
+
isOpen: state.isOpen,
|
|
1582
|
+
onOpenChange,
|
|
1583
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1584
|
+
className: "mb-4 flex max-w-[804px] md:mb-0",
|
|
1585
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1586
|
+
className: "flex flex-1 justify-center",
|
|
1587
|
+
children: /* @__PURE__ */ jsx(RangeCalendar, {
|
|
1588
|
+
leftCalendarState,
|
|
1589
|
+
rightCalendarState,
|
|
1590
|
+
calendarProps,
|
|
1591
|
+
onApply,
|
|
1592
|
+
onRangeChange: syncCalendarStates,
|
|
1593
|
+
onDateSelection: mode === "relative" ? void 0 : handleDateSelection,
|
|
1594
|
+
onDateHover: handleDateHover,
|
|
1595
|
+
rangeSelection,
|
|
1596
|
+
hoverDate,
|
|
1597
|
+
onKeyboardNavigation: mode === "relative" ? void 0 : handleKeyboardNavigation,
|
|
1598
|
+
isRangeSelectionDisabled: mode === "relative"
|
|
1599
|
+
})
|
|
1600
|
+
})
|
|
1601
|
+
})
|
|
1602
|
+
})]
|
|
1603
|
+
})
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1606
|
+
const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
1607
|
+
const ui = UIConfig.useConfig();
|
|
1608
|
+
const { t } = useTranslation();
|
|
1609
|
+
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
1610
|
+
const { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
1611
|
+
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
1612
|
+
const allowPartialRange = props.allowPartialRange ?? ui.dateInput.allowPartialRange;
|
|
1613
|
+
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
1614
|
+
const inputRef = useRef(null);
|
|
1615
|
+
const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
|
|
1616
|
+
inputRef,
|
|
1617
|
+
renderInput,
|
|
1618
|
+
setRenderInput,
|
|
1619
|
+
getFocusTarget: (input, staticTarget, fromEnd) => {
|
|
1620
|
+
const container = input.getContainer?.() ?? input;
|
|
1621
|
+
return container instanceof HTMLElement ? getStaticDateTimeFocusTarget(container, staticTarget, fromEnd) : null;
|
|
1622
|
+
},
|
|
1623
|
+
getPressTarget: (input) => {
|
|
1624
|
+
const container = input.getContainer?.() ?? input;
|
|
1625
|
+
if (!(container instanceof HTMLElement)) return null;
|
|
1626
|
+
return container.querySelector("[data-static-press-action]");
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
const normalizedValue = props.value ?? null;
|
|
1630
|
+
const [isRelativeMode, setIsRelativeMode] = useState(props.enableRelativeMode === true && props.relativeValue != null);
|
|
1631
|
+
const mode = isRelativeMode ? "relative" : "absolute";
|
|
1632
|
+
useEffect(() => {
|
|
1633
|
+
if (!props.enableRelativeMode) setIsRelativeMode(false);
|
|
1634
|
+
else if (props.relativeValue != null) setIsRelativeMode(true);
|
|
1635
|
+
}, [props.enableRelativeMode, props.relativeValue]);
|
|
1636
|
+
const formatDateRange = (range) => {
|
|
1637
|
+
if (!range || !range.start && !range.end || !allowPartialRange && (!range.start || !range.end)) return null;
|
|
1638
|
+
if (fullIso) return {
|
|
1639
|
+
start: range.start ? DateTimeUtils.fromCalendarDateToUTCISO(range.start) : null,
|
|
1640
|
+
end: range.end ? DateTimeUtils.fromCalendarDateToUTCISO(range.end, { endOfDay: true }) : null
|
|
1641
|
+
};
|
|
1642
|
+
const startDate = range.start ? DateTimeUtils.fromDateValueToLocal(range.start, "UTC") : null;
|
|
1643
|
+
const endDate = range.end ? DateTimeUtils.fromDateValueToLocal(range.end, "UTC") : null;
|
|
1644
|
+
return {
|
|
1645
|
+
start: startDate ? startDate.toISOString().slice(0, 10) : null,
|
|
1646
|
+
end: endDate ? endDate.toISOString().slice(0, 10) : null
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
const parseDateRange = (formattedRange) => {
|
|
1650
|
+
if (!formattedRange || !formattedRange.start && !formattedRange.end || !allowPartialRange && (!formattedRange.start || !formattedRange.end)) return null;
|
|
1651
|
+
if (fullIso) return {
|
|
1652
|
+
start: formattedRange.start ? DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.start) : null,
|
|
1653
|
+
end: formattedRange.end ? DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.end) : null
|
|
1654
|
+
};
|
|
1655
|
+
const startDate = formattedRange.start ? /* @__PURE__ */ new Date(`${formattedRange.start}T00:00:00.000Z`) : null;
|
|
1656
|
+
const endDate = formattedRange.end ? /* @__PURE__ */ new Date(`${formattedRange.end}T00:00:00.000Z`) : null;
|
|
1657
|
+
const startZonedDateTime = startDate ? DateTimeUtils.fromLocalToZonedDateTime(startDate, "UTC") : null;
|
|
1658
|
+
const endZonedDateTime = endDate ? DateTimeUtils.fromLocalToZonedDateTime(endDate, "UTC") : null;
|
|
1659
|
+
return {
|
|
1660
|
+
start: startZonedDateTime ? toCalendarDate(startZonedDateTime) : null,
|
|
1661
|
+
end: endZonedDateTime ? toCalendarDate(endZonedDateTime) : null
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
const parseCalendarDate = useCallback((formattedDate) => {
|
|
1665
|
+
if (formattedDate == null) return null;
|
|
1666
|
+
if (fullIso) return DateTimeUtils.fromUTCISOToCalendarDate(formattedDate);
|
|
1667
|
+
const date = /* @__PURE__ */ new Date(`${formattedDate}T00:00:00.000Z`);
|
|
1668
|
+
const zonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(date, "UTC");
|
|
1669
|
+
return toCalendarDate(zonedDateTime);
|
|
1670
|
+
}, [fullIso]);
|
|
1671
|
+
const dateLimits = useMemo(() => ({
|
|
1672
|
+
minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
|
|
1673
|
+
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
1674
|
+
}), [
|
|
1675
|
+
minValue,
|
|
1676
|
+
maxValue,
|
|
1677
|
+
parseCalendarDate
|
|
1678
|
+
]);
|
|
1679
|
+
const normalizedRange = normalizedValue;
|
|
1680
|
+
if (!renderInput) {
|
|
1681
|
+
const relativeOptions = [
|
|
1682
|
+
{
|
|
1683
|
+
value: "thisWeek",
|
|
1684
|
+
label: t(($) => $.ui.datePicker.presets.thisWeek, { ns: "ui" })
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
value: "lastWeek",
|
|
1688
|
+
label: t(($) => $.ui.datePicker.presets.lastWeek, { ns: "ui" })
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
value: "thisAndLastWeek",
|
|
1692
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastWeek, { ns: "ui" })
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
value: "thisMonth",
|
|
1696
|
+
label: t(($) => $.ui.datePicker.presets.thisMonth, { ns: "ui" })
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
value: "thisAndLastMonth",
|
|
1700
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastMonth, { ns: "ui" })
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
value: "thisYear",
|
|
1704
|
+
label: t(($) => $.ui.datePicker.presets.thisYear, { ns: "ui" })
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
value: "lastYear",
|
|
1708
|
+
label: t(($) => $.ui.datePicker.presets.lastYear, { ns: "ui" })
|
|
1709
|
+
},
|
|
1710
|
+
{
|
|
1711
|
+
value: "thisAndLastYear",
|
|
1712
|
+
label: t(($) => $.ui.datePicker.presets.thisAndLastYear, { ns: "ui" })
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
value: "soFar",
|
|
1716
|
+
label: t(($) => $.ui.datePicker.presets.soFar, { ns: "ui" })
|
|
1717
|
+
},
|
|
1718
|
+
...ui.dateInput.dateRangeOptions
|
|
1719
|
+
];
|
|
1720
|
+
const relativeLabel = mode === "relative" ? relativeOptions.find((option) => option.value === props.relativeValue)?.label : void 0;
|
|
1721
|
+
const startDateValue = parseCalendarDate(normalizedRange?.start ?? null);
|
|
1722
|
+
const endDateValue = parseCalendarDate(normalizedRange?.end ?? null);
|
|
1723
|
+
const hasProvidedRangeValue = mode === "relative" ? !!relativeLabel : !!(normalizedRange?.start || normalizedRange?.end);
|
|
1724
|
+
const as = props.as ?? ui.input.as;
|
|
1725
|
+
const size = props.size ?? ui.input.size;
|
|
1726
|
+
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
1727
|
+
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
1728
|
+
const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
|
|
1729
|
+
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
1730
|
+
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
1731
|
+
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
1732
|
+
isDisabled,
|
|
1733
|
+
renderStatic: true,
|
|
1734
|
+
size: todayIconButtonSize,
|
|
1735
|
+
todayIconButtonComponent
|
|
1736
|
+
});
|
|
1737
|
+
const disableManualEntry = mode === "relative" || (props.disableManualEntry ?? ui.dateInput.disableManualEntry);
|
|
1738
|
+
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
1739
|
+
const staticSegments = getStaticDateRangeSegments({
|
|
1740
|
+
start: startDateValue,
|
|
1741
|
+
end: endDateValue,
|
|
1742
|
+
locale,
|
|
1743
|
+
shouldForceLeadingZeros,
|
|
1744
|
+
isDisabled,
|
|
1745
|
+
hidePlaceholder: as === "floating" && !hasProvidedRangeValue,
|
|
1746
|
+
disableManualEntry,
|
|
1747
|
+
placeholder: props.placeholder
|
|
1748
|
+
});
|
|
1749
|
+
return /* @__PURE__ */ jsx(InputFrame, {
|
|
1750
|
+
...props,
|
|
1751
|
+
onClear: () => {
|
|
1752
|
+
props.onChange?.(null);
|
|
1753
|
+
props.onRelativeChange?.(null);
|
|
1754
|
+
props.onValueCommit?.();
|
|
1755
|
+
},
|
|
1756
|
+
isDisabled,
|
|
1757
|
+
className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
|
|
1758
|
+
inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
|
|
1759
|
+
contentClassName: "pr-0!",
|
|
1760
|
+
contentWrapperClassName: datePickerInputContentRowCva({ size }),
|
|
1761
|
+
contentGroup: "date-picker",
|
|
1762
|
+
labelPlacement: "content-row",
|
|
1763
|
+
dataAttributes: {
|
|
1764
|
+
dataIsEmpty: !hasProvidedRangeValue,
|
|
1765
|
+
dataIsFilled: hasProvidedRangeValue,
|
|
1766
|
+
dataIsDirty: props.isDirty,
|
|
1767
|
+
dataIsRequired: props.isRequired,
|
|
1768
|
+
dataIsDisabled: isDisabled,
|
|
1769
|
+
dataDisabled: isDisabled,
|
|
1770
|
+
dataInvalid: !!props.error,
|
|
1771
|
+
dataHasSelection: hasProvidedRangeValue
|
|
1772
|
+
},
|
|
1773
|
+
onStaticInteract: renderRealInput,
|
|
1774
|
+
onStaticPress: replayStaticInputPress,
|
|
1775
|
+
staticPressTarget: "action",
|
|
1776
|
+
actionContent: staticTodayIcon,
|
|
1777
|
+
actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
|
|
1778
|
+
showClear: hasProvidedRangeValue,
|
|
1779
|
+
wrapContentAndTrailing: true,
|
|
1780
|
+
contentAndTrailingClassName: "gap-2!",
|
|
1781
|
+
trailingClassName: "py-0! pl-0!",
|
|
1782
|
+
action: showDropdown ? {
|
|
1783
|
+
icon: ui.dateInput.calendarIcon,
|
|
1784
|
+
onClick: () => {},
|
|
1785
|
+
altText: ""
|
|
1786
|
+
} : void 0,
|
|
1787
|
+
children: relativeLabel ? /* @__PURE__ */ jsx(Typography, {
|
|
1788
|
+
size: "label-1",
|
|
1789
|
+
children: relativeLabel
|
|
1790
|
+
}) : staticSegments
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
return /* @__PURE__ */ jsx(DateRangePickerBase, {
|
|
1794
|
+
...props,
|
|
1795
|
+
...dateLimits,
|
|
1796
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(props.ref, inputRef),
|
|
1797
|
+
mode,
|
|
1798
|
+
enableRelativeMode: props.enableRelativeMode,
|
|
1799
|
+
onModeChange: (relative) => {
|
|
1800
|
+
setIsRelativeMode(relative);
|
|
1801
|
+
props.onChange?.(null);
|
|
1802
|
+
props.onRelativeChange?.(null);
|
|
1803
|
+
},
|
|
1804
|
+
relativeValue: mode === "relative" ? props.relativeValue : null,
|
|
1805
|
+
relativeOptions: mode === "relative" ? ui.dateInput.dateRangeOptions : [],
|
|
1806
|
+
onRelativeChange: (relativeValue, resolvedValue) => {
|
|
1807
|
+
const formattedResolvedValue = formatDateRange(resolvedValue);
|
|
1808
|
+
if (!relativeValue || !formattedResolvedValue?.start || !formattedResolvedValue.end) {
|
|
1809
|
+
props.onChange?.(null);
|
|
1810
|
+
props.onRelativeChange?.(null);
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
props.onChange?.({
|
|
1814
|
+
start: formattedResolvedValue.start,
|
|
1815
|
+
end: formattedResolvedValue.end
|
|
1816
|
+
});
|
|
1817
|
+
props.onRelativeChange?.(relativeValue);
|
|
1818
|
+
},
|
|
1819
|
+
value: mode === "relative" ? null : parseDateRange(normalizedRange),
|
|
1820
|
+
onChange: (value) => props.onChange?.(formatDateRange(value))
|
|
1821
|
+
});
|
|
1822
|
+
};
|
|
1823
|
+
const DateRangePickerComponent = ({ fullIso = true, minValue, maxValue, renderStaticInput, ...props }) => {
|
|
1824
|
+
if ("field" in props && props.field) {
|
|
1825
|
+
const { field, ref, ...innerProps } = props;
|
|
1826
|
+
const controlWithOptions = field.form;
|
|
1827
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
1828
|
+
control: field.form,
|
|
1829
|
+
name: field.name,
|
|
1830
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
1831
|
+
...innerProps,
|
|
1832
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
1833
|
+
value: field.value ?? null,
|
|
1834
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
1835
|
+
onBlur: field.onBlur,
|
|
1836
|
+
onValueCommit: field.onBlur,
|
|
1837
|
+
isDirty,
|
|
1838
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
1839
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
1840
|
+
error: props.error ?? error?.message,
|
|
1841
|
+
fullIso,
|
|
1842
|
+
minValue,
|
|
1843
|
+
maxValue,
|
|
1844
|
+
renderStaticInput
|
|
1845
|
+
})
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
return /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
1849
|
+
...props,
|
|
1850
|
+
fullIso,
|
|
1851
|
+
minValue,
|
|
1852
|
+
maxValue,
|
|
1853
|
+
renderStaticInput
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
const DateRangePicker = memo(DateRangePickerComponent);
|
|
1857
|
+
//#endregion
|
|
1858
|
+
export { isDateRangePresetValue as a, resolveDateRangePreset as c, hydrateRelativeDateRangeValue as i, dateRangePresetValues as n, isRelativeDateRangeValue as o, getDateRangePreset as r, isStoredRelativeDateRangeValue as s, DateRangePicker as t };
|