@povio/ui 6.0.0-rc.1 → 6.0.0-rc.11
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/MIGRATION.md +28 -0
- package/README.md +10 -37
- package/dist/{Accordion-DQRdeDs1.js → Accordion-ORBin0EZ.js} +12 -118
- package/dist/{Alert-Cee_nKWj.d.ts → Alert-D4X7OWiv.d.ts} +3 -3
- package/dist/{AlertDialog-uNDUIyng.d.ts → AlertDialog-DklLDjmw.d.ts} +3 -3
- package/dist/{Autocomplete-D_4gEL7D.d.ts → Autocomplete-BgFz3kuR.d.ts} +1 -1
- package/dist/{Autocomplete-CWU9Ev3J.js → Autocomplete-BxRjxjtp.js} +15 -12
- package/dist/{Autocomplete.bound-CqhZtdd8.d.ts → Autocomplete.bound-CpHZZ3C9.d.ts} +1 -1
- package/dist/{Autocomplete.bound-D0pgmsHB.js → Autocomplete.bound-DweyHUI5.js} +2 -2
- package/dist/{Badge-C4HI9XX4.d.ts → Badge-Db1ndK67.d.ts} +2 -2
- package/dist/{BadgeButton-h3MeQYcp.d.ts → BadgeButton-BPhWDAnc.d.ts} +2 -2
- package/dist/{BottomSheet-BQXSdxoX.d.ts → BottomSheet-BZmDJBR-.d.ts} +1 -1
- package/dist/{BottomSheet-z5brMtDt.js → BottomSheet-CGipksM_.js} +10 -10
- package/dist/{BottomSheet.lazy-BzvLg8Ea.d.ts → BottomSheet.lazy-CuJMUeJP.d.ts} +1 -1
- package/dist/{Breadcrumbs-B9O0_VSN.d.ts → Breadcrumbs-CcB0oOF8.d.ts} +1 -1
- package/dist/{Breadcrumbs-AbUBqBTq.js → Breadcrumbs-a1-q_he0.js} +15 -12
- package/dist/{Button-f7FPTaiN.d.ts → Button-0SswSdDg.d.ts} +1 -1
- package/dist/{Button-DER_6cxv.js → Button-BaODzvZd.js} +1 -1
- package/dist/{ButtonBase-CYTFS-xK.d.ts → ButtonBase-CZuEy3Pk.d.ts} +3 -3
- package/dist/{ButtonBase-CeFSNcVs.js → ButtonBase-s-VV7oCa.js} +8 -7
- package/dist/{ButtonContent-c7lJayVQ.js → ButtonContent-Dztbuz3q.js} +5 -14
- package/dist/{Calendar-DRQ536wk.js → Calendar-DX0dVo6z.js} +25 -181
- package/dist/Calendar.lazy-W51M56GQ.js +131 -0
- package/dist/{CheckContent-D7sZPmzx.js → CheckContent-BKLnTPZr.js} +2 -2
- package/dist/{Checkbox-BI3DQPLa.js → Checkbox-Bjsbx-wK.js} +6 -6
- package/dist/{Checkbox-CCvC7OVT.d.ts → Checkbox-w2j5hLOQ.d.ts} +1 -1
- package/dist/{Checkbox.bound-CMZnF2_d.js → Checkbox.bound-D2nBglJz.js} +2 -2
- package/dist/{Checkbox.bound-DBt33Inx.d.ts → Checkbox.bound-DD_RCjVm.d.ts} +1 -1
- package/dist/CheckboxCheckmark-DWsYVZuu.js +25 -0
- package/dist/{CheckboxGroup-DQw4hsFa.js → CheckboxGroup-B3O3IUiu.js} +10 -8
- package/dist/{CheckboxGroup-MJ6crCZk.d.ts → CheckboxGroup-BYI15Y09.d.ts} +3 -3
- package/dist/{CheckboxGroup.bound-CTCdezUN.js → CheckboxGroup.bound-DY0HKGSh.js} +2 -2
- package/dist/{CheckboxGroup.bound-j2Sc8QtU.d.ts → CheckboxGroup.bound-QiJ-P0KR.d.ts} +1 -1
- package/dist/{ComboBox-DFlz6HJ8.js → ComboBox-ChsdI0lt.js} +2 -2
- package/dist/{DatePicker-CSm9c37c.js → DatePicker-CqNS7lgR.js} +17 -14
- package/dist/{DatePicker-umTISfvn.d.ts → DatePicker-QzfQf21b.d.ts} +3 -3
- package/dist/{DatePicker.bound-KLyoWNcX.d.ts → DatePicker.bound-DoCAqhM4.d.ts} +1 -1
- package/dist/{DatePicker.bound-Yqckg7Mk.js → DatePicker.bound-Dxg2LM89.js} +2 -2
- package/dist/{DatePickerInput-Cs9RwZfy.js → DatePickerInput-B2Pc_aJr.js} +41 -288
- package/dist/{DatePickerInput-DwHQvLzi.d.ts → DatePickerInput-vLlL5ATh.d.ts} +3 -3
- package/dist/{DateRangePicker-hV_U1IK0.d.ts → DateRangePicker-32D4pWJg.d.ts} +5 -5
- package/dist/{DateRangePicker-s_4n-F_P.js → DateRangePicker-C3ClfSfj.js} +133 -327
- package/dist/{DateRangePicker.bound-D-GPENNe.d.ts → DateRangePicker.bound-CVtoVsho.d.ts} +1 -1
- package/dist/{DateRangePicker.bound-C1klxYW0.js → DateRangePicker.bound-PR9rBoXc.js} +2 -2
- package/dist/{DateTimePicker-wgV0SUeZ.d.ts → DateTimePicker-BTRIUagV.d.ts} +3 -3
- package/dist/{DateTimePicker-411pU7VF.js → DateTimePicker-CYa2J-1r.js} +17 -14
- package/dist/{DateTimePicker.bound-BDyUzidV.js → DateTimePicker.bound-CQxnRveH.js} +2 -2
- package/dist/{DateTimePicker.bound-cF2X_ncj.d.ts → DateTimePicker.bound-X4DTyQ1b.d.ts} +1 -1
- package/dist/{Dialog-DSl1Fkqi.js → Dialog-96c4Pzfm.js} +9 -9
- package/dist/{Dialog-lFYX-7Ax.js → Dialog-C9H9_BmK.js} +35 -6
- package/dist/{Dialog-V-2cgGk1.d.ts → Dialog-CO9xljD3.d.ts} +1 -1
- package/dist/Disclosure-BRSkMbZQ.js +109 -0
- package/dist/{DropdownMenu-DH7E2aXb.js → DropdownMenu-DS0RaEfH.js} +11 -29
- package/dist/{DropdownMenu-Bl_C5W_E.d.ts → DropdownMenu-D_9z9ond.d.ts} +2 -2
- package/dist/{DropdownMenuDesktop-nMoCa6N5.js → DropdownMenuDesktop-DGPIfex-.js} +6 -27
- package/dist/{FileInput-Q72yXorH.d.ts → FileInput-BEaECoBS.d.ts} +7 -7
- package/dist/{FileInput-CqRrQRM-.js → FileInput-IRM0C9W6.js} +20 -19
- package/dist/{FileInput.bound-BZ7-g-dq.js → FileInput.bound-CctyulN9.js} +2 -2
- package/dist/{FileInput.bound-CG2G5E2K.d.ts → FileInput.bound-D2HuuqSb.d.ts} +1 -1
- package/dist/{FileTrigger-DBX1Io6E.js → FileTrigger-DlryDp2T.js} +1 -30
- package/dist/{FileUpload-B4ibHWQn.d.ts → FileUpload-BUTSqHVk.d.ts} +1 -1
- package/dist/{FileUpload-CG60c6wM.js → FileUpload-Dfs3FvJ7.js} +53 -134
- package/dist/{FileUpload.bound-C-Zy1n5Y.d.ts → FileUpload.bound-CGQXb4iT.d.ts} +2 -2
- package/dist/{FileUpload.bound-DQ6uuH2W.js → FileUpload.bound-vik_sTkm.js} +2 -2
- package/dist/{FileUploadContainer-CtUhDntB.d.ts → FileUploadContainer-Dzg5aXXZ.d.ts} +1 -1
- package/dist/{FormField-BIRMlgu4.d.ts → FormField-DGyCDxOp.d.ts} +5 -2
- package/dist/{FormField-D7KKJ6kG.js → FormField-dduTMkNH.js} +58 -37
- package/dist/{FormFieldError-Bqjg9cMb.js → FormFieldError-DTT5TUQ1.js} +2 -2
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +17 -0
- package/dist/FormLayout-CBYgWvwW.d.ts +47 -0
- package/dist/{IconButton-BM2DUNtN.d.ts → IconButton-shH_9wcl.d.ts} +1 -1
- package/dist/{IconSlot-DSK7qNxc.js → IconSlot-CqNuZl0E.js} +4 -4
- package/dist/{iconSlot.cva-BA9NahZH.d.ts → IconSlot-DcEDPaNb.d.ts} +3 -11
- package/dist/{InlineTooltipWrapper-DBuQX2yo.js → InlineTooltipWrapper-CKTiFpZn.js} +3 -3
- package/dist/{Input-BX3sZBEp.d.ts → Input-CTp_9mS9.d.ts} +3 -3
- package/dist/{Input-CG4Irgae.js → Input-UbFhc_J2.js} +29 -13
- package/dist/{Input.bound-jZx8gJro.js → Input.bound-0iJO2-ia.js} +2 -2
- package/dist/{Input.bound-BE-espm0.d.ts → Input.bound-B9a62ylL.d.ts} +1 -1
- package/dist/{InputContent-DDFr0kml.d.ts → InputContent-BCNkN4Fx.d.ts} +4 -4
- package/dist/{InputContent-KhD4_YvO.js → InputContent-D7lnNLWk.js} +35 -22
- package/dist/{Link-Bw2m9W4B.d.ts → Link-PvYB_M-j.d.ts} +5 -3
- package/dist/{ListBox-CoUk0kkt.js → ListBox-DhR5kojP.js} +3 -3
- package/dist/{MenuItem-DPZzOqp2.d.ts → MenuItem-U3-pu1j5.d.ts} +1 -1
- package/dist/{Modal-B4p1zFqi.js → Modal-DcLWF9cB.js} +1 -1
- package/dist/{NumberField-qjvHhCfN.d.ts → NumberField-WXebfxjK.d.ts} +4 -4
- package/dist/{NumberField-CxwTlqud.js → NumberField-twW8zuJ9.js} +38 -14
- package/dist/{NumberField.bound-zySl-v_q.js → NumberField.bound-DHDsBNvI.js} +2 -2
- package/dist/{NumberField.bound-DXPGF5YK.d.ts → NumberField.bound-Dy0A5iVc.d.ts} +1 -1
- package/dist/{NumberRangeInput-CS4Kn427.d.ts → NumberRangeInput-BCKQaGpy.d.ts} +2 -2
- package/dist/{NumberRangeInput-BrW03wC6.js → NumberRangeInput-gT6gEJIz.js} +18 -17
- package/dist/{NumberRangeInput.bound-CKywKEKI.js → NumberRangeInput.bound-5Yv3Og73.js} +2 -2
- package/dist/{NumberRangeInput.bound-C8I7m1cW.d.ts → NumberRangeInput.bound-BNXxIQ0b.d.ts} +1 -1
- package/dist/PageHeader-DTfzf-dA.d.ts +61 -0
- package/dist/{Pagination-DkpAg2x6.d.ts → Pagination-BCGUVYOF.d.ts} +1 -1
- package/dist/{PaginationList-DNmZRcS6.d.ts → PaginationList-CvlSkJGn.d.ts} +1 -1
- package/dist/{PaginationList-PjOxNQwB.js → PaginationList-D7SRwySe.js} +75 -74
- package/dist/{PasswordInput-BHPFkVbM.d.ts → PasswordInput-EhQjYyJS.d.ts} +1 -1
- package/dist/{PasswordInput.bound-DC57m4NT.d.ts → PasswordInput.bound-CK5GwKL4.d.ts} +1 -1
- package/dist/{PasswordInput.bound-CrXKvfil.js → PasswordInput.bound-CXtbMCD6.js} +3 -3
- package/dist/{Popover-pjd0Hu61.d.ts → Popover-D_t1XDPA.d.ts} +2 -2
- package/dist/{Progress-1WGRZE8l.d.ts → Progress-Ckfpi_-M.d.ts} +4 -4
- package/dist/{Progress-De76pCfX.js → Progress-RiEGGxNG.js} +3 -3
- package/dist/{RadioGroup-DEwQ6B1F.d.ts → RadioGroup-6e-Z6jW8.d.ts} +3 -3
- package/dist/{RadioGroup-BPSvcre6.js → RadioGroup-IL4Y8XHO.js} +11 -9
- package/dist/{RadioGroup.bound-CN4K9dV2.js → RadioGroup.bound-BFWSq-on.js} +2 -2
- package/dist/{RadioGroup.bound-Dj6CEG6M.d.ts → RadioGroup.bound-w3SZqSkH.d.ts} +1 -1
- package/dist/RangeCalendar-0W1YFZqn.js +288 -0
- package/dist/{RichTextEditor-BYIQW8QA.js → RichTextEditor-BuqZth3X.js} +32 -409
- package/dist/{RichTextEditor-hJtuB7Y6.d.ts → RichTextEditor-DHhuBeT6.d.ts} +1 -1
- package/dist/{Select-Br_3eecr.js → Select-B-TuE_Fh.js} +217 -468
- package/dist/{Select-DHYddedn.d.ts → Select-C34ENdjq.d.ts} +5 -3
- package/dist/{Select.bound-CgLKMzLn.js → Select.bound-CNCChZww.js} +2 -2
- package/dist/{Select.bound-CJ-tCsmX.d.ts → Select.bound-qOihchei.d.ts} +1 -1
- package/dist/SelectListBox-Dlonoc5z.js +390 -0
- package/dist/SelectionIndicator-C3hniBa2.js +18 -0
- package/dist/SharedElementTransition-CZ2bE7yo.js +96 -0
- package/dist/SidebarWorkspaces-DDHJAdNH.d.ts +132 -0
- package/dist/SidebarWorkspaces-DJknAfS9.js +1298 -0
- package/dist/{Slider-CqB2TPTR.js → Slider-DCsCCPFx.js} +10 -11
- package/dist/{Slider-CcoNTFVN.d.ts → Slider-DRg8zKRM.d.ts} +1 -1
- package/dist/{Slider.bound-Bp7Zrs9_.js → Slider.bound-CByTXPTr.js} +2 -2
- package/dist/{Slider.bound-8B5qzQ-8.d.ts → Slider.bound-CaEF19um.d.ts} +1 -1
- package/dist/{Spinner-B-crRcdG.d.ts → Spinner-Cvy_6zgD.d.ts} +5 -5
- package/dist/{Spinner-BeVTUzzx.js → Spinner-DqjP06T1.js} +29 -41
- package/dist/{SplitButton-BzhbtpFA.d.ts → SplitButton-V1f2NWfh.d.ts} +3 -3
- package/dist/{Stepper-CMw6QnCu.js → Stepper-Dyhxp0Tl.js} +13 -12
- package/dist/{Stepper-LORgYAJr.d.ts → Stepper-k91x_m-E.d.ts} +18 -18
- package/dist/{Switch-R0kAicgM.js → Switch-BfpSMMpv.js} +6 -6
- package/dist/{Switch-CSitpm4o.d.ts → Switch-ELVPkPx0.d.ts} +1 -1
- package/dist/{Switch.bound-DVjqsum1.d.ts → Switch.bound-DeEdVvZV.d.ts} +1 -1
- package/dist/{Switch.bound-Dk-BmxJd.js → Switch.bound-Dv0cHsMM.js} +2 -2
- package/dist/TableRowDetails-D8HFTghI.d.ts +109 -0
- package/dist/TabsFilters-CWUNeqYa.js +223 -0
- package/dist/TabsFilters-DePddjCk.d.ts +30 -0
- package/dist/Tag-B2_ZiSE-.d.ts +44 -0
- package/dist/{TextArea-DCnqXuHC.js → TextArea-DakA3nzZ.js} +8 -7
- package/dist/{TextArea-e8sQm205.d.ts → TextArea-iqUeB2QY.d.ts} +2 -2
- package/dist/{TextArea.bound-DEZuRYm_.d.ts → TextArea.bound-BJHyCogp.d.ts} +1 -1
- package/dist/{TextArea.bound-BJZ9m_FE.js → TextArea.bound-CDVPP_qb.js} +2 -2
- package/dist/{TextArea.cva-Bb73hriz.js → TextArea.cva-ENXI55ec.js} +1 -1
- package/dist/{TimePicker-Zi7B6VTr.d.ts → TimePicker-BZ1ocsBX.d.ts} +2 -2
- package/dist/{TimePicker-BwF-Crbg.js → TimePicker-RFzfDezn.js} +20 -18
- package/dist/{TimePicker.bound-Bxtb6uJL.d.ts → TimePicker.bound-8DmjMXuE.d.ts} +1 -1
- package/dist/{TimePicker.bound-B-BVLNbk.js → TimePicker.bound-DPia51Qs.js} +2 -2
- package/dist/{datePickerValue.utils-OAQBDk1R.js → TimePickerForm-DohOZViU.js} +12 -16
- package/dist/{Toast-Dl6KMa58.d.ts → Toast-D9pdadZ4.d.ts} +1 -1
- package/dist/{ToastContainer-BDvta6st.js → ToastContainer-Dd0LPykL.js} +5 -5
- package/dist/{ToggleButton-Cce9bnBw.d.ts → ToggleButton-HUZ8ij6i.d.ts} +1 -1
- package/dist/{ToggleButton-DUQ8nwKY.js → ToggleButton-P1z1pxzT.js} +2 -2
- package/dist/{ToggleGroup-s5sDSB6l.js → ToggleGroup-CrDoeLN0.js} +127 -114
- package/dist/{ToggleGroup-BJ8cqXaO.d.ts → ToggleGroup-DvjnSinl.d.ts} +5 -23
- package/dist/{ToggleGroup.bound-Cv09n91n.d.ts → ToggleGroup.bound-B03ISHQ8.d.ts} +1 -1
- package/dist/{ToggleGroup.bound-DEc7rdNF.js → ToggleGroup.bound-DCnYwmBt.js} +2 -2
- package/dist/{Tooltip-BiS7isYB.d.ts → Tooltip-B8DTURLQ.d.ts} +1 -1
- package/dist/{Tooltip-CMigoyri.js → Tooltip-DRB6lo0U.js} +8 -44
- package/dist/{TooltipWrapper-D7HUZLsP.js → TooltipWrapper-DLBksJsF.js} +21 -10
- package/dist/{Typography-LU4z2pR1.js → Typography-DCLnPa3P.js} +2 -2
- package/dist/{Typography-D2FfZr7a.d.ts → Typography-DJojwiXV.d.ts} +2 -2
- package/dist/{accordion.cva-CeBWV9EO.js → accordion.cva-DwxY-k1e.js} +17 -25
- package/dist/{badgeButton.cva-B8EQLwPv.d.ts → badgeButton.cva-CBFIhr1S.d.ts} +8 -8
- package/dist/badgeButton.cva-t5PQOH4M.js +138 -0
- package/dist/{breadcrumbs.cva-DPwJJK_D.js → breadcrumbs.cva-CnBIZUB3.js} +9 -9
- package/dist/{button.cva-CBckM91c.d.ts → button.cva-C8LGtNJ3.d.ts} +21 -16
- package/dist/button.cva-Ciga0rdG.js +267 -0
- package/dist/{buttonContent.cva-DG-4lRz4.d.ts → buttonContent.cva-BapnODby.d.ts} +2 -2
- package/dist/{checkbox.cva-CJy87xUo.d.ts → checkbox.cva-CCh_UlrC.d.ts} +6 -6
- package/dist/{checkbox.cva-D-D9Qgaf.js → checkbox.cva-aLJS7v4z.js} +24 -33
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +98 -103
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +11 -11
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +5 -5
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +9 -9
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +13 -12
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +3 -3
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +16 -2
- package/dist/components/date-range-picker.js +2 -2
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +4 -4
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.d.ts +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/form-layout.d.ts +2 -0
- package/dist/components/form-layout.js +80 -0
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/icon-slot.d.ts +2 -1
- package/dist/components/icon-slot.js +1 -1
- package/dist/components/input-frame.d.ts +5 -4
- package/dist/components/input-frame.js +48 -33
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +3 -3
- package/dist/components/number-field.d.ts +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +2 -0
- package/dist/components/page-header.js +210 -0
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +8 -8
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/password-input.js +3 -3
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +4 -4
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +3 -3
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +2 -2
- package/dist/components/style-definitions.js +31 -30
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +2 -0
- package/dist/components/tabs-filters.js +2 -0
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +8 -8
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +2 -2
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/typography.js +1 -1
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/theme-context.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/config/ui-overrides.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{confirmation.context-BSn1s-ip.js → confirmation.context-BwlIEVeF.js} +2 -2
- package/dist/{confirmation.context-B2z9A1v3.d.ts → confirmation.context-C_GDRn3a.d.ts} +1 -1
- package/dist/{datePickerInput.cva-Cd7UUN61.js → datePickerInput.cva-Du0Zn04v.js} +2 -2
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/{dialog.cva-sioU_5R7.js → dialog.cva-BIpz6HcA.js} +7 -7
- package/dist/{dist-CAFUM34b.js → dist-DEZzXa0W.js} +15 -14
- package/dist/dropdownMenu.cva-DwSOcbmR.js +31 -0
- package/dist/{fileUpload.cva-ujmStxB1.js → fileUpload.cva-BYzXGc9C.js} +11 -11
- package/dist/{fileUpload.types-BT8P1o7a.d.ts → fileUpload.types-C-ke21yY.d.ts} +2 -2
- package/dist/{form.binding-B-2id68q.js → form.binding-DOR5gIQf.js} +1 -1
- package/dist/{formFieldError.cva-CTl0VeyG.js → formFieldError.cva-BB6Ghqwq.js} +3 -3
- package/dist/formFieldHelper.cva-DRmSyRZN.js +14 -0
- package/dist/formLayout.context--CN08Mtb.js +14 -0
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-filters.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/{i18n-BjNKHh_D.js → i18n-BE9Wvs9L.js} +6 -2
- package/dist/{i18n-2z5on9No.d.ts → i18n-EDC8xyfH.d.ts} +8 -0
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +9 -0
- package/dist/icons.d.ts +2 -1
- package/dist/icons.js +3 -3
- package/dist/import-Dkfk7PHt.js +255 -0
- package/dist/index.d.ts +78 -73
- package/dist/index.js +95 -91
- package/dist/{input.cva-L7jKDv6q.d.ts → input.cva-BjuHsDGy.d.ts} +11 -11
- package/dist/input.cva-DZii82eS.js +185 -0
- package/dist/inputLayout-KdAtunGk.js +5 -0
- package/dist/label.cva-DTfT6FrX.js +85 -0
- package/dist/{link.context-C4fE_aMo.d.ts → link.context-BCHn7NSy.d.ts} +1 -1
- package/dist/link.cva-C24YVAsJ.js +16 -0
- package/dist/outline.clsx-DGGQQRkM.js +6 -0
- package/dist/popover.cva-DAbfSma6.js +5 -0
- package/dist/{progress.cva-D7iiX6Lh.js → progress.cva-CsGaGVJ-.js} +7 -7
- package/dist/{radio.cva-DO3UEac-.d.ts → radio.cva-D7M1hqLe.d.ts} +9 -5
- package/dist/{radio.cva-Ctdop1xV.js → radio.cva-DistaZtZ.js} +33 -19
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/{selectDesktop.cva-RzxvSBkd.js → selectDesktop.cva-DStkOdwm.js} +2 -2
- package/dist/selectItem.cva-B6vxey2R.js +27 -0
- package/dist/{staticDateTimeSegments-Bt5wCZvg.js → staticDateTimeSegments-4tIzPL8l.js} +12 -12
- package/dist/{status.cva-BFGMKZO_.js → status.cva-CYgi3Htz.js} +21 -21
- package/dist/{stepper.cva-CpRi0fGb.js → stepper.cva-Cecphqeo.js} +23 -35
- package/dist/{style-definitions-_RXJdSk-.d.ts → style-definitions-Dx6aFDiR.d.ts} +159 -144
- package/dist/styles/editor.css +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/styles/outline.js +1 -1
- package/dist/switch.cva-BT0kGRIk.js +24 -0
- package/dist/switch.cva-r6vcS25Q.d.ts +16 -0
- package/dist/table.cva-DkcsOmZG.js +147 -0
- package/dist/tag.cva-ExMNsTN-.js +24 -0
- package/dist/tanstack/autocomplete.d.ts +2 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +2 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +2 -2
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +2 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +2 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +2 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +2 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +3 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +2 -2
- package/dist/tanstack/input.d.ts +2 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +2 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +2 -2
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.d.ts +2 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +1 -1
- package/dist/tanstack/rich-text-editor.js +2 -2
- package/dist/tanstack/select.d.ts +2 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +2 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +2 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -3
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.d.ts +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +2 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +2 -2
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{tanstack-CmbhAoHU.js → tanstack-Bgdv0qU1.js} +2 -1
- package/dist/{tanstack-DQu9PNjn.d.ts → tanstack-CtuKX9Ss.d.ts} +195 -96
- package/dist/tanstack.d.ts +78 -73
- package/dist/tanstack.js +95 -91
- package/dist/{theme.context-B3wQDJ-i.js → theme.context--VEyStJB.js} +2 -2
- package/dist/{toast.cva-L0k_TBiW.d.ts → toast.cva-AmLw6Cf5.d.ts} +10 -10
- package/dist/{toast.cva-aC4NMpLb.js → toast.cva-B6NXTwbZ.js} +22 -38
- package/dist/{toast.runtime-DKOeUnk6.js → toast.runtime-Drd2IJ_j.js} +1 -1
- package/dist/toggleGroup.cva-CJ-3Ps7j.js +35 -0
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +26 -0
- package/dist/{tooltip.cva-ClcaR72U.js → tooltip.cva-BEyxvcG2.js} +11 -11
- package/dist/{tooltipWrapper.cva-BBQ4ic3D.js → tooltipWrapper.cva-t4NQ9zz9.js} +1 -1
- package/dist/typography.cva-BCHlTHdM.d.ts +36 -0
- package/dist/typography.cva-CHsHX_Wp.js +31 -0
- package/dist/{uiConfig.context-CT9EVqC5.js → uiConfig.context-3DN9w6oU.js} +19 -114
- package/dist/{uiConfig.context-CQU9Tzq_.d.ts → uiConfig.context-BnCORTNm.d.ts} +22 -9
- package/dist/{uiOverrides.context-Dmev7iRS.d.ts → uiOverrides.context-DHHzLSnq.d.ts} +23 -0
- package/dist/{useBreakpoint-BzYqQEBO.js → useBreakpoint-CJ3mx7UF.js} +6 -6
- package/dist/{useFilters-HIngImwn.js → useFilters-DMi94RZK.js} +2 -2
- package/dist/{useFormAutosave-XEQqk1lK.js → useFormAutosave-BPGlChiY.js} +1 -1
- package/dist/useScrollableListBox-oYKqU3Hp.js +47 -0
- package/dist/{useStaticInputHandoff-DyYxfwv6.js → useStaticInputHandoff-BN0fOerH.js} +9 -10
- package/dist/useTableColumnConfig-D3KH4Rpo.js +2060 -0
- package/dist/{useTableNav-rU9WmCj6.d.ts → useTableNav-H5DrogZU.d.ts} +29 -44
- package/dist/{useToast-DfQif03I.d.ts → useToast-DsA8CVoY.d.ts} +1 -1
- package/package.json +22 -5
- package/dist/CheckboxCheckmark-BzT6MwH5.js +0 -47
- package/dist/FormFieldHeaderTooltip-k8Snf_oM.js +0 -47
- package/dist/SelectionIndicator-B7C5Y0JM.js +0 -5
- package/dist/SharedElementTransition-DJ9CCbEa.js +0 -12
- package/dist/Tag-CoqCTZRm.d.ts +0 -44
- package/dist/badgeButton.cva-BPyVejxO.js +0 -300
- package/dist/button.cva-vO0fPUTn.js +0 -423
- package/dist/check-DYMBkp_Z.js +0 -20
- package/dist/chevron-down-B4Pr8bD3.js +0 -20
- package/dist/chevron-right-3nKJR5Bb.js +0 -20
- package/dist/chevrons-right-DJPPn2fD.js +0 -44
- package/dist/createLucideIcon-LcezOE4z.js +0 -240
- package/dist/dropdownMenu.cva-Bi3a21lO.js +0 -34
- package/dist/eye-BA4nRlMX.js +0 -57
- package/dist/formFieldHelper.cva-CxAmrG2H.js +0 -97
- package/dist/input.cva-w7ZEVQAM.js +0 -227
- package/dist/link.cva-D3XRgcAv.js +0 -12
- package/dist/outline.clsx-50W_vNDl.js +0 -6
- package/dist/popover.cva-Bhud1wnp.js +0 -5
- package/dist/selectItem.cva-BWfEkNs_.js +0 -36
- package/dist/styles/color-utilities.css +0 -20
- package/dist/switch.cva-BsJ4iAFl.js +0 -27
- package/dist/switch.cva-psw67dK9.d.ts +0 -16
- package/dist/table.cva-CmfeWLyW.d.ts +0 -84
- package/dist/table.cva-DFQM8VbM.js +0 -111
- package/dist/tag.cva-BCCH7ku3.js +0 -55
- package/dist/toggleGroup.cva-CEhjMT4j.js +0 -35
- package/dist/typography.cva-GpC6QQNx.d.ts +0 -36
- package/dist/typography.cva-iD15k56p.js +0 -51
- package/dist/useTableColumnConfig-CUINwVTR.js +0 -1348
- package/dist/x-B6vfz8Ps.js +0 -23
- package/dist/{dom.utils-BbfrA6RP.js → dom.utils-BPooTXtC.js} +1 -1
- package/dist/{link.context-J7aQtMOr.js → link.context-TPjDtjw3.js} +1 -1
- package/dist/{router.context-B4FvsTim.js → router.context-MckTbHw9.js} +1 -1
- package/dist/{uiOverrides.context-BTCH9y5a.js → uiOverrides.context-DNEQlTx0.js} +1 -1
- package/dist/{useAsyncList-yHz7twsj.js → useAsyncList-Ct74ve3i.js} +1 -1
- package/dist/{useForm-eW4KpH1u.js → useForm-Cb7KWLds.js} +1 -1
- package/dist/{useIntersectionObserver-DYfHnGGU.js → useIntersectionObserver-DFAhTsV0.js} +1 -1
- package/dist/{useLocalStorage-PlcaJ1tP.js → useLocalStorage-CctQvyqD.js} +1 -1
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import { t as UIConfig } from "./uiConfig.context-CT9EVqC5.js";
|
|
2
|
-
import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
3
|
-
import { r as ChevronLeft } from "./Tooltip-CMigoyri.js";
|
|
4
|
-
import { t as ChevronRight } from "./chevron-right-3nKJR5Bb.js";
|
|
5
|
-
import { n as ChevronsLeft, t as ChevronsRight } from "./chevrons-right-DJPPn2fD.js";
|
|
6
|
-
import { t as Select } from "./Select-Br_3eecr.js";
|
|
7
|
-
import { a as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, c as $dd602d3c757202f2$export$a1d3911297b952d7, i as CalendarGrid, l as $dd602d3c757202f2$export$eac50920cf2fd59a, n as renderDatePickerTodayIcon, o as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, r as $1697a7ad3db7b79f$re_export$useDateFormatter, s as $dd602d3c757202f2$export$4f5203c0d889109e, t as DatePickerInput, u as $dd602d3c757202f2$export$f4a51ff076cc9a09 } from "./DatePickerInput-Cs9RwZfy.js";
|
|
8
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
9
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
10
3
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-C1YB5dOw.js";
|
|
11
|
-
import { t as Switch } from "./Switch-
|
|
12
|
-
import { t as Typography } from "./Typography-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
4
|
+
import { t as Switch } from "./Switch-BfpSMMpv.js";
|
|
5
|
+
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
6
|
+
import { t as Spinner } from "./Spinner-DqjP06T1.js";
|
|
7
|
+
import { t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
15
8
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
16
9
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
17
|
-
import { t as FormField } from "./FormField-
|
|
10
|
+
import { t as FormField } from "./FormField-dduTMkNH.js";
|
|
11
|
+
import { t as resolveInputLayout } from "./inputLayout-KdAtunGk.js";
|
|
12
|
+
import { a as $dd602d3c757202f2$export$4f5203c0d889109e, c as $dd602d3c757202f2$export$f4a51ff076cc9a09, i as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, n as renderDatePickerTodayIcon, o as $dd602d3c757202f2$export$a1d3911297b952d7, r as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, s as $dd602d3c757202f2$export$eac50920cf2fd59a, t as DatePickerInput } from "./DatePickerInput-B2Pc_aJr.js";
|
|
18
13
|
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CuU1VIh1.js";
|
|
19
14
|
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-DYarfm5F.js";
|
|
20
|
-
import { f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog } from "./staticDateTimeSegments-
|
|
21
|
-
import "./i18n-BjNKHh_D.js";
|
|
22
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
15
|
+
import { f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog } from "./staticDateTimeSegments-4tIzPL8l.js";
|
|
23
16
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
24
|
-
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-
|
|
25
|
-
import
|
|
17
|
+
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-Du0Zn04v.js";
|
|
18
|
+
import "./i18n-BE9Wvs9L.js";
|
|
19
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-DLBksJsF.js";
|
|
20
|
+
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-BN0fOerH.js";
|
|
26
21
|
import { InputFrame } from "./components/input-frame.js";
|
|
27
|
-
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
22
|
+
import { Suspense, lazy, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
28
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
24
|
import { DateFormatter, GregorianCalendar, createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
30
25
|
import { useDateRangePicker, useLocale } from "react-aria";
|
|
31
|
-
import { useRangeCalendar } from "@react-aria/calendar";
|
|
32
26
|
import { useTranslation } from "react-i18next";
|
|
33
27
|
//#region ../../node_modules/.bun/react-stately@3.51.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/calendar/useRangeCalendarState.mjs
|
|
34
28
|
function $a0a87fb6fcfb22ec$export$9a987164d97ecc90(props) {
|
|
@@ -374,281 +368,24 @@ function $6de3e3f1a7663217$var$isCompleteRange(value) {
|
|
|
374
368
|
return value?.start != null && value.end != null;
|
|
375
369
|
}
|
|
376
370
|
//#endregion
|
|
377
|
-
//#region src/components/inputs/DateTime/shared/
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
const formatter = $1697a7ad3db7b79f$re_export$useDateFormatter({
|
|
384
|
-
month: "long",
|
|
385
|
-
timeZone: state.timeZone
|
|
386
|
-
});
|
|
387
|
-
const numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
|
|
388
|
-
const MONTHS = useMemo(() => {
|
|
389
|
-
const months = [];
|
|
390
|
-
for (let i = 1; i <= numMonths; i++) {
|
|
391
|
-
const date = state.focusedDate.set({ month: i });
|
|
392
|
-
months.push(formatter.format(date.toDate(state.timeZone)));
|
|
393
|
-
}
|
|
394
|
-
return months;
|
|
395
|
-
}, [
|
|
396
|
-
formatter,
|
|
397
|
-
numMonths,
|
|
398
|
-
state.focusedDate,
|
|
399
|
-
state.timeZone
|
|
400
|
-
]);
|
|
401
|
-
const years = Array.from({ length: 201 }, (_, i) => currentYear - 100 + i);
|
|
402
|
-
const getAvailableMonths = () => {
|
|
403
|
-
return MONTHS.map((month, i) => {
|
|
404
|
-
const monthDate = displayDate.set({ month: i + 1 });
|
|
405
|
-
let isDisabled = false;
|
|
406
|
-
if (maxDate) isDisabled = monthDate.year > maxDate.year || monthDate.year === maxDate.year && monthDate.month >= maxDate.month;
|
|
407
|
-
if (minDate) isDisabled = monthDate.year < minDate.year || monthDate.year === minDate.year && monthDate.month <= minDate.month;
|
|
408
|
-
return {
|
|
409
|
-
month,
|
|
410
|
-
value: i,
|
|
411
|
-
isDisabled
|
|
412
|
-
};
|
|
413
|
-
});
|
|
414
|
-
};
|
|
415
|
-
const getAvailableYears = () => {
|
|
416
|
-
return years.map((year) => {
|
|
417
|
-
let isDisabled = false;
|
|
418
|
-
if (maxDate) isDisabled = year > maxDate.year || year === maxDate.year && displayDate.month >= maxDate.month;
|
|
419
|
-
if (minDate && !isDisabled) isDisabled = year < minDate.year || year === minDate.year && displayDate.month <= minDate.month;
|
|
420
|
-
return {
|
|
421
|
-
year,
|
|
422
|
-
isDisabled
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
};
|
|
426
|
-
const availableMonths = getAvailableMonths();
|
|
427
|
-
const availableYears = getAvailableYears();
|
|
428
|
-
const handleMonthChange = (value) => {
|
|
429
|
-
if (value === null) return;
|
|
430
|
-
const newDate = displayDate.set({ month: value + 1 });
|
|
431
|
-
onNavigate?.(newDate);
|
|
432
|
-
};
|
|
433
|
-
const handleYearChange = (value) => {
|
|
434
|
-
if (value === null) return;
|
|
435
|
-
const newDate = displayDate.set({ year: value });
|
|
436
|
-
onNavigate?.(newDate);
|
|
437
|
-
};
|
|
438
|
-
const handlePrevMonth = (e) => {
|
|
439
|
-
e.preventDefault();
|
|
440
|
-
e.stopPropagation();
|
|
441
|
-
const newDate = displayDate.subtract({ months: 1 });
|
|
442
|
-
onNavigate?.(newDate);
|
|
443
|
-
};
|
|
444
|
-
const handleNextMonth = (e) => {
|
|
445
|
-
e.preventDefault();
|
|
446
|
-
e.stopPropagation();
|
|
447
|
-
const newDate = displayDate.add({ months: 1 });
|
|
448
|
-
onNavigate?.(newDate);
|
|
449
|
-
};
|
|
450
|
-
const handlePrevYear = (e) => {
|
|
451
|
-
e.preventDefault();
|
|
452
|
-
e.stopPropagation();
|
|
453
|
-
const newDate = displayDate.subtract({ years: 1 });
|
|
454
|
-
onNavigate?.(newDate);
|
|
455
|
-
};
|
|
456
|
-
const handleNextYear = (e) => {
|
|
457
|
-
e.preventDefault();
|
|
458
|
-
e.stopPropagation();
|
|
459
|
-
const newDate = displayDate.add({ years: 1 });
|
|
460
|
-
onNavigate?.(newDate);
|
|
461
|
-
};
|
|
462
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
463
|
-
className: "flex w-full items-center justify-between gap-3 border-border-default-subtle border-b border-solid px-3 py-2.5",
|
|
464
|
-
children: [
|
|
465
|
-
/* @__PURE__ */ jsxs("div", {
|
|
466
|
-
className: "flex items-center",
|
|
467
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
468
|
-
color: "secondary",
|
|
469
|
-
isDisabled: isPrevYearDisabled,
|
|
470
|
-
onClick: handlePrevYear,
|
|
471
|
-
icon: ChevronsLeft,
|
|
472
|
-
label: t(($) => $.ui.datePicker.navigation.previousYear),
|
|
473
|
-
variant: "text",
|
|
474
|
-
width: "hug",
|
|
475
|
-
disableTooltip: true,
|
|
476
|
-
size: "sm"
|
|
477
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
478
|
-
color: "secondary",
|
|
479
|
-
isDisabled: isPrevMonthDisabled,
|
|
480
|
-
onClick: handlePrevMonth,
|
|
481
|
-
icon: ChevronLeft,
|
|
482
|
-
label: t(($) => $.ui.datePicker.navigation.previousMonth),
|
|
483
|
-
variant: "text",
|
|
484
|
-
width: "hug",
|
|
485
|
-
disableTooltip: true,
|
|
486
|
-
size: "sm"
|
|
487
|
-
})]
|
|
488
|
-
}),
|
|
489
|
-
/* @__PURE__ */ jsxs("div", {
|
|
490
|
-
className: "flex gap-2",
|
|
491
|
-
children: [/* @__PURE__ */ jsx(Select, {
|
|
492
|
-
label: "Month",
|
|
493
|
-
hideLabel: true,
|
|
494
|
-
customTrigger: /* @__PURE__ */ jsx(BadgeButton, {
|
|
495
|
-
color: "secondary",
|
|
496
|
-
variant: "subtle",
|
|
497
|
-
iconPosition: "right",
|
|
498
|
-
icon: ChevronDown,
|
|
499
|
-
children: MONTHS[currentMonth].slice(0, 3)
|
|
500
|
-
}),
|
|
501
|
-
ignoreTriggerWidth: true,
|
|
502
|
-
items: availableMonths.map(({ month, value, isDisabled }) => ({
|
|
503
|
-
label: month,
|
|
504
|
-
id: value,
|
|
505
|
-
isDisabled
|
|
506
|
-
})).filter(({ isDisabled }) => !isDisabled),
|
|
507
|
-
value: currentMonth,
|
|
508
|
-
onChange: handleMonthChange
|
|
509
|
-
}), /* @__PURE__ */ jsx(Select, {
|
|
510
|
-
label: "Year",
|
|
511
|
-
hideLabel: true,
|
|
512
|
-
customTrigger: /* @__PURE__ */ jsx(BadgeButton, {
|
|
513
|
-
color: "secondary",
|
|
514
|
-
variant: "subtle",
|
|
515
|
-
iconPosition: "right",
|
|
516
|
-
icon: ChevronDown,
|
|
517
|
-
children: currentYear.toString()
|
|
518
|
-
}),
|
|
519
|
-
items: availableYears.map(({ year, isDisabled }) => ({
|
|
520
|
-
label: year.toString(),
|
|
521
|
-
id: year,
|
|
522
|
-
isDisabled
|
|
523
|
-
})).filter(({ isDisabled }) => !isDisabled),
|
|
524
|
-
value: currentYear,
|
|
525
|
-
onChange: handleYearChange
|
|
526
|
-
})]
|
|
527
|
-
}),
|
|
528
|
-
/* @__PURE__ */ jsxs("div", {
|
|
529
|
-
className: "flex items-center",
|
|
530
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
531
|
-
color: "secondary",
|
|
532
|
-
isDisabled: isNextMonthDisabled,
|
|
533
|
-
onClick: handleNextMonth,
|
|
534
|
-
icon: ChevronRight,
|
|
535
|
-
label: t(($) => $.ui.datePicker.navigation.nextMonth),
|
|
536
|
-
variant: "text",
|
|
537
|
-
width: "hug",
|
|
538
|
-
disableTooltip: true,
|
|
539
|
-
size: "sm"
|
|
540
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
541
|
-
color: "secondary",
|
|
542
|
-
isDisabled: isNextYearDisabled,
|
|
543
|
-
onClick: handleNextYear,
|
|
544
|
-
icon: ChevronsRight,
|
|
545
|
-
label: t(($) => $.ui.datePicker.navigation.nextYear),
|
|
546
|
-
variant: "text",
|
|
547
|
-
width: "hug",
|
|
548
|
-
disableTooltip: true,
|
|
549
|
-
size: "sm"
|
|
550
|
-
})]
|
|
551
|
-
})
|
|
552
|
-
]
|
|
553
|
-
});
|
|
554
|
-
};
|
|
555
|
-
//#endregion
|
|
556
|
-
//#region src/components/inputs/DateTime/shared/RangeCalendar.tsx
|
|
557
|
-
const RangeCalendar = ({ showWeekNumbers, className, leftCalendarState, rightCalendarState, calendarProps, onApply, onRangeChange: _onRangeChange, onDateSelection, onDateHover, rangeSelection, hoverDate, onKeyboardNavigation, isRangeSelectionDisabled }) => {
|
|
558
|
-
const leftRef = useRef(null);
|
|
559
|
-
const rightRef = useRef(null);
|
|
560
|
-
const { calendarProps: leftCalendarAriaProps } = useRangeCalendar(calendarProps, leftCalendarState, leftRef);
|
|
561
|
-
const { calendarProps: rightCalendarAriaProps } = useRangeCalendar(calendarProps, rightCalendarState, rightRef);
|
|
562
|
-
const leftDate = leftCalendarState.visibleRange.start;
|
|
563
|
-
const rightDate = rightCalendarState.visibleRange.start;
|
|
564
|
-
const handleLeftKeyboardNavigation = (event, date) => {
|
|
565
|
-
return onKeyboardNavigation?.(event, date, "left") ?? false;
|
|
566
|
-
};
|
|
567
|
-
const handleRightKeyboardNavigation = (event, date) => {
|
|
568
|
-
return onKeyboardNavigation?.(event, date, "right") ?? false;
|
|
569
|
-
};
|
|
570
|
-
const handleLeftNavigate = (newDate) => {
|
|
571
|
-
const rightCurrentDate = rightCalendarState.visibleRange.start;
|
|
572
|
-
if (newDate.year < rightCurrentDate.year || newDate.year === rightCurrentDate.year && newDate.month < rightCurrentDate.month) leftCalendarState.setFocusedDate(newDate);
|
|
573
|
-
else {
|
|
574
|
-
const closestValidDate = rightCurrentDate.subtract({ months: 1 });
|
|
575
|
-
leftCalendarState.setFocusedDate(closestValidDate);
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
const handleRightNavigate = (newDate) => {
|
|
579
|
-
const leftCurrentDate = leftCalendarState.visibleRange.start;
|
|
580
|
-
if (newDate.year > leftCurrentDate.year || newDate.year === leftCurrentDate.year && newDate.month > leftCurrentDate.month) rightCalendarState.setFocusedDate(newDate);
|
|
581
|
-
else {
|
|
582
|
-
const closestValidDate = leftCurrentDate.add({ months: 1 });
|
|
583
|
-
rightCalendarState.setFocusedDate(closestValidDate);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
const isNextDisabled = useMemo(() => {
|
|
587
|
-
const leftNextDate = leftDate.add({ months: 1 });
|
|
588
|
-
return leftNextDate.year > rightDate.year || leftNextDate.year === rightDate.year && leftNextDate.month === rightDate.month;
|
|
589
|
-
}, [leftDate, rightDate]);
|
|
590
|
-
const isPrevDisabled = useMemo(() => {
|
|
591
|
-
const rightPrevDate = rightDate.subtract({ months: 1 });
|
|
592
|
-
return rightPrevDate.year < leftDate.year || rightPrevDate.year === leftDate.year && rightPrevDate.month === leftDate.month;
|
|
593
|
-
}, [leftDate, rightDate]);
|
|
594
|
-
return /* @__PURE__ */ jsx("div", {
|
|
595
|
-
className: clsx("flex flex-col items-center bg-surface-default-card", showWeekNumbers ? "w-full max-w-[336px] md:w-fit md:max-w-none" : "w-fit", className),
|
|
596
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
597
|
-
className: clsx("flex", showWeekNumbers && "w-full"),
|
|
598
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
599
|
-
...leftCalendarAriaProps,
|
|
600
|
-
ref: leftRef,
|
|
601
|
-
className: clsx("flex flex-col items-center", showWeekNumbers && "w-full"),
|
|
602
|
-
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
603
|
-
state: leftCalendarState,
|
|
604
|
-
isNextMonthDisabled: isNextDisabled,
|
|
605
|
-
isNextYearDisabled: isNextDisabled,
|
|
606
|
-
onNavigate: handleLeftNavigate,
|
|
607
|
-
maxDate: rightDate
|
|
608
|
-
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
609
|
-
showWeekNumbers,
|
|
610
|
-
firstDayOfWeek: calendarProps.firstDayOfWeek,
|
|
611
|
-
state: leftCalendarState,
|
|
612
|
-
onApply,
|
|
613
|
-
shouldCloseOnSelect: false,
|
|
614
|
-
onDateSelection,
|
|
615
|
-
rangeSelection,
|
|
616
|
-
onDateHover,
|
|
617
|
-
hoverDate,
|
|
618
|
-
onKeyboardNavigation: handleLeftKeyboardNavigation,
|
|
619
|
-
className: clsx("h-64", showWeekNumbers ? "w-full md:w-[336px]!" : "w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
620
|
-
calendarSide: "left",
|
|
621
|
-
isSelectionDisabled: isRangeSelectionDisabled
|
|
622
|
-
})]
|
|
623
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
624
|
-
...rightCalendarAriaProps,
|
|
625
|
-
ref: rightRef,
|
|
626
|
-
className: "hidden flex-col items-center md:flex",
|
|
627
|
-
children: [/* @__PURE__ */ jsx(CalendarSelectHeader, {
|
|
628
|
-
state: rightCalendarState,
|
|
629
|
-
isPrevMonthDisabled: isPrevDisabled,
|
|
630
|
-
isPrevYearDisabled: isPrevDisabled,
|
|
631
|
-
onNavigate: handleRightNavigate,
|
|
632
|
-
minDate: leftDate
|
|
633
|
-
}), /* @__PURE__ */ jsx(CalendarGrid, {
|
|
634
|
-
showWeekNumbers,
|
|
635
|
-
firstDayOfWeek: calendarProps.firstDayOfWeek,
|
|
636
|
-
state: rightCalendarState,
|
|
637
|
-
onApply,
|
|
638
|
-
shouldCloseOnSelect: false,
|
|
639
|
-
onDateSelection,
|
|
640
|
-
rangeSelection,
|
|
641
|
-
onDateHover,
|
|
642
|
-
hoverDate,
|
|
643
|
-
onKeyboardNavigation: handleRightKeyboardNavigation,
|
|
644
|
-
className: clsx("h-64", showWeekNumbers ? "w-full md:w-[336px]!" : "w-[304px]!", isRangeSelectionDisabled && "pointer-events-none opacity-50"),
|
|
645
|
-
calendarSide: "right",
|
|
646
|
-
isSelectionDisabled: isRangeSelectionDisabled
|
|
647
|
-
})]
|
|
648
|
-
})]
|
|
649
|
-
})
|
|
650
|
-
});
|
|
371
|
+
//#region src/components/inputs/DateTime/shared/RangeCalendar.lazy.tsx
|
|
372
|
+
const loadRangeCalendar = () => import("./RangeCalendar-0W1YFZqn.js");
|
|
373
|
+
const RangeCalendarRenderer = lazy(() => loadRangeCalendar().then(({ RangeCalendar }) => ({ default: RangeCalendar })));
|
|
374
|
+
/** Fetches the range calendar chunk ahead of the dialog opening (hover, focus). */
|
|
375
|
+
const preloadRangeCalendar = () => {
|
|
376
|
+
loadRangeCalendar();
|
|
651
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Range calendar that only loads its two grids when the range picker dialog opens.
|
|
380
|
+
* The fallback reserves the size of both grids on desktop and one grid on mobile.
|
|
381
|
+
*/
|
|
382
|
+
const RangeCalendar = (props) => /* @__PURE__ */ jsx(Suspense, {
|
|
383
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
384
|
+
className: "flex h-72 w-[304px] items-center justify-center md:w-[608px]",
|
|
385
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
386
|
+
}),
|
|
387
|
+
children: /* @__PURE__ */ jsx(RangeCalendarRenderer, { ...props })
|
|
388
|
+
});
|
|
652
389
|
//#endregion
|
|
653
390
|
//#region src/components/inputs/DateTime/DateRangePicker/dateRangePreset.utils.ts
|
|
654
391
|
const dateRangePresetValues = [
|
|
@@ -662,10 +399,33 @@ const dateRangePresetValues = [
|
|
|
662
399
|
"thisAndLastYear",
|
|
663
400
|
"soFar"
|
|
664
401
|
];
|
|
402
|
+
const RELATIVE_DAYS_VALUE_PATTERN = /^days:([+-]?\d{1,7}):([+-]?\d{1,7})$/;
|
|
403
|
+
/** Whole days from `currentDate` to `date`; negative when `date` is in the past. */
|
|
404
|
+
const getRelativeDaysOffset = (date, currentDate) => toCalendarDate(date).compare(currentDate);
|
|
405
|
+
/** Display form of a single offset, e.g. `-7`, `0` or `+3`. */
|
|
406
|
+
const formatRelativeDaysOffset = (days) => days > 0 ? `+${days}` : `${days}`;
|
|
407
|
+
/** Serializes day offsets into a stable `relativeValue`, e.g. `days:-7:+3`. */
|
|
408
|
+
const formatRelativeDaysValue = ({ start, end }) => `days:${formatRelativeDaysOffset(start)}:${formatRelativeDaysOffset(end)}`;
|
|
409
|
+
/** Returns undefined when the value is not a day-offset value or its start is after its end. */
|
|
410
|
+
const parseRelativeDaysValue = (value) => {
|
|
411
|
+
const match = RELATIVE_DAYS_VALUE_PATTERN.exec(value);
|
|
412
|
+
if (!match) return;
|
|
413
|
+
const start = Number(match[1]);
|
|
414
|
+
const end = Number(match[2]);
|
|
415
|
+
return start <= end ? {
|
|
416
|
+
start,
|
|
417
|
+
end
|
|
418
|
+
} : void 0;
|
|
419
|
+
};
|
|
665
420
|
const isStoredRelativeDateRangeValue = (value) => typeof value === "object" && value !== null && typeof value.relativeValue === "string";
|
|
666
421
|
const isRelativeDateRangeValue = (value) => isStoredRelativeDateRangeValue(value) && typeof value.resolvedValue === "object";
|
|
667
422
|
const isDateRangePresetValue = (value) => dateRangePresetValues.some((preset) => preset === value);
|
|
668
423
|
const getDateRangePreset = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
424
|
+
const relativeDays = parseRelativeDaysValue(value);
|
|
425
|
+
if (relativeDays) return {
|
|
426
|
+
start: currentDate.add({ days: relativeDays.start }),
|
|
427
|
+
end: currentDate.add({ days: relativeDays.end })
|
|
428
|
+
};
|
|
669
429
|
if (!isDateRangePresetValue(value)) return;
|
|
670
430
|
const previousYear = currentDate.subtract({ years: 1 });
|
|
671
431
|
switch (value) {
|
|
@@ -725,13 +485,22 @@ const hydrateRelativeDateRangeValue = (value, currentDate = today(getLocalTimeZo
|
|
|
725
485
|
};
|
|
726
486
|
//#endregion
|
|
727
487
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.tsx
|
|
488
|
+
const getRelativeDaysLabel = (value, t) => {
|
|
489
|
+
const offset = value ? parseRelativeDaysValue(value) : void 0;
|
|
490
|
+
if (!offset) return;
|
|
491
|
+
return t(($) => $.ui.datePicker.relativeDaysLabel, {
|
|
492
|
+
ns: "ui",
|
|
493
|
+
start: formatRelativeDaysOffset(offset.start),
|
|
494
|
+
end: formatRelativeDaysOffset(offset.end)
|
|
495
|
+
});
|
|
496
|
+
};
|
|
728
497
|
const DateRangePickerBase = (props) => {
|
|
729
498
|
const ui = UIConfig.useConfig();
|
|
730
499
|
const { t } = useTranslation();
|
|
731
|
-
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, showWeekNumbers = ui.dateInput.showWeekNumbers, 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;
|
|
500
|
+
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, layout: layoutProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, showWeekNumbers = ui.dateInput.showWeekNumbers, 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;
|
|
732
501
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
733
502
|
const variant = variantProp ?? ui.input.variant;
|
|
734
|
-
const as = asProp
|
|
503
|
+
const as = resolveInputLayout(layoutProp, asProp, ui.input.as);
|
|
735
504
|
const size = sizeProp ?? ui.input.size;
|
|
736
505
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
737
506
|
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
@@ -982,6 +751,7 @@ const DateRangePickerBase = (props) => {
|
|
|
982
751
|
setHoverDate(null);
|
|
983
752
|
leftCalendarState.setValue(null);
|
|
984
753
|
rightCalendarState.setValue(null);
|
|
754
|
+
if (mode === "relative") setActivePreset(null);
|
|
985
755
|
} else {
|
|
986
756
|
const { start } = rangeSelection;
|
|
987
757
|
const end = date;
|
|
@@ -1000,7 +770,11 @@ const DateRangePickerBase = (props) => {
|
|
|
1000
770
|
isSelecting: false
|
|
1001
771
|
});
|
|
1002
772
|
setHoverDate(null);
|
|
1003
|
-
|
|
773
|
+
const currentDate = today(effectiveTimeZone);
|
|
774
|
+
setActivePreset(mode === "relative" ? formatRelativeDaysValue({
|
|
775
|
+
start: getRelativeDaysOffset(clampedRange.start, currentDate),
|
|
776
|
+
end: getRelativeDaysOffset(clampedRange.end, currentDate)
|
|
777
|
+
}) : null);
|
|
1004
778
|
}
|
|
1005
779
|
}, [
|
|
1006
780
|
rangeSelection,
|
|
@@ -1008,7 +782,9 @@ const DateRangePickerBase = (props) => {
|
|
|
1008
782
|
rightCalendarState,
|
|
1009
783
|
dialogState,
|
|
1010
784
|
isDateOutsideBounds,
|
|
1011
|
-
clampRangeToBounds
|
|
785
|
+
clampRangeToBounds,
|
|
786
|
+
mode,
|
|
787
|
+
effectiveTimeZone
|
|
1012
788
|
]);
|
|
1013
789
|
const handleKeyboardNavigation = useCallback((event, date, calendarSide) => {
|
|
1014
790
|
const currentState = calendarSide === "left" ? leftCalendarState : rightCalendarState;
|
|
@@ -1087,6 +863,8 @@ const DateRangePickerBase = (props) => {
|
|
|
1087
863
|
isSelecting: false
|
|
1088
864
|
});
|
|
1089
865
|
setHoverDate(null);
|
|
866
|
+
leftCalendarState.setAnchorDate(null);
|
|
867
|
+
rightCalendarState.setAnchorDate(null);
|
|
1090
868
|
shouldPreventDefault = true;
|
|
1091
869
|
}
|
|
1092
870
|
if (shouldPreventDefault) {
|
|
@@ -1100,6 +878,8 @@ const DateRangePickerBase = (props) => {
|
|
|
1100
878
|
handleDateSelection
|
|
1101
879
|
]);
|
|
1102
880
|
const syncCalendarStates = useCallback((newValue) => {
|
|
881
|
+
leftCalendarState.setAnchorDate(null);
|
|
882
|
+
rightCalendarState.setAnchorDate(null);
|
|
1103
883
|
if (newValue === null) {
|
|
1104
884
|
setValidationRangeError(void 0);
|
|
1105
885
|
leftCalendarState.setValue(null);
|
|
@@ -1134,7 +914,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1134
914
|
]);
|
|
1135
915
|
const onApply = () => {
|
|
1136
916
|
if (mode === "relative") {
|
|
1137
|
-
const preset =
|
|
917
|
+
const preset = findRelativePreset(activePreset);
|
|
1138
918
|
handledRelativeValueRef.current = activePreset;
|
|
1139
919
|
onRelativeChange?.(activePreset, preset?.clampedValue ?? null);
|
|
1140
920
|
onValueCommit?.();
|
|
@@ -1194,6 +974,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1194
974
|
const syncSelectionFromControlledValue = () => {
|
|
1195
975
|
if (mode === "relative") {
|
|
1196
976
|
setActivePreset(relativeValue ?? null);
|
|
977
|
+
showRangeInCalendars(findRelativePreset(relativeValue)?.clampedValue ?? null);
|
|
1197
978
|
return;
|
|
1198
979
|
}
|
|
1199
980
|
const currentValue = state.value;
|
|
@@ -1312,23 +1093,43 @@ const DateRangePickerBase = (props) => {
|
|
|
1312
1093
|
};
|
|
1313
1094
|
})
|
|
1314
1095
|
];
|
|
1315
|
-
const
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1096
|
+
const findRelativePreset = (presetValue) => {
|
|
1097
|
+
const preset = presets.find((option) => option.value === presetValue);
|
|
1098
|
+
if (preset || !presetValue) return preset;
|
|
1099
|
+
const label = getRelativeDaysLabel(presetValue, t);
|
|
1100
|
+
return label ? createPreset({
|
|
1101
|
+
value: presetValue,
|
|
1102
|
+
label,
|
|
1103
|
+
getValue: getPresetRange(presetValue)
|
|
1104
|
+
}) : void 0;
|
|
1105
|
+
};
|
|
1106
|
+
const showRangeInCalendars = (range) => {
|
|
1107
|
+
syncCalendarStates(range);
|
|
1108
|
+
if (!range) return;
|
|
1109
|
+
const startDate = range.start;
|
|
1322
1110
|
leftCalendarState.setFocusedDate(startDate);
|
|
1323
|
-
const endDate =
|
|
1324
|
-
if ((endDate.year - startDate.year) * 12 + (endDate.month - startDate.month) >
|
|
1111
|
+
const endDate = range.end;
|
|
1112
|
+
if ((endDate.year - startDate.year) * 12 + (endDate.month - startDate.month) > 1) rightCalendarState.setFocusedDate(endDate);
|
|
1325
1113
|
else {
|
|
1326
1114
|
const rightCalendarMonth = startDate.add({ months: 1 });
|
|
1327
1115
|
rightCalendarState.setFocusedDate(rightCalendarMonth);
|
|
1328
1116
|
}
|
|
1329
|
-
if (mode === "relative") setActivePreset(preset.value);
|
|
1330
1117
|
};
|
|
1331
|
-
const
|
|
1118
|
+
const selectPreset = (preset) => {
|
|
1119
|
+
if (preset.isDisabled || mode !== "relative" && !preset.clampedValue) return;
|
|
1120
|
+
setActivePreset(mode === "relative" ? preset.value : preset.label);
|
|
1121
|
+
if (!preset.clampedValue) return;
|
|
1122
|
+
showRangeInCalendars(preset.clampedValue);
|
|
1123
|
+
};
|
|
1124
|
+
const onCalendarKeyboardNavigation = (event, date, calendarSide) => {
|
|
1125
|
+
if (mode !== "relative" || event.key !== "Escape") return handleKeyboardNavigation(event, date, calendarSide);
|
|
1126
|
+
if (!rangeSelection.isSelecting) return false;
|
|
1127
|
+
syncSelectionFromControlledValue();
|
|
1128
|
+
event.preventDefault();
|
|
1129
|
+
event.stopPropagation();
|
|
1130
|
+
return true;
|
|
1131
|
+
};
|
|
1132
|
+
const activeRelativeOption = mode === "relative" ? findRelativePreset(relativeValue) : void 0;
|
|
1332
1133
|
useEffect(() => {
|
|
1333
1134
|
if (mode !== "relative" || handledRelativeValueRef.current === relativeValue) return;
|
|
1334
1135
|
handledRelativeValueRef.current = relativeValue;
|
|
@@ -1353,6 +1154,8 @@ const DateRangePickerBase = (props) => {
|
|
|
1353
1154
|
labelProps,
|
|
1354
1155
|
className: clsx("group relative flex w-full flex-col text-left", className),
|
|
1355
1156
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
1157
|
+
onMouseEnter: preloadRangeCalendar,
|
|
1158
|
+
onFocusCapture: preloadRangeCalendar,
|
|
1356
1159
|
children: [/* @__PURE__ */ jsx(DatePickerInput, {
|
|
1357
1160
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, datePickerInputRef),
|
|
1358
1161
|
as,
|
|
@@ -1417,16 +1220,19 @@ const DateRangePickerBase = (props) => {
|
|
|
1417
1220
|
}), /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
1418
1221
|
hideSidebar,
|
|
1419
1222
|
sidebar: /* @__PURE__ */ jsxs("div", {
|
|
1420
|
-
className: "flex w-full flex-row overflow-auto border-border
|
|
1223
|
+
className: "flex w-full flex-row overflow-auto border-border border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden",
|
|
1421
1224
|
children: [enableRelativeMode && /* @__PURE__ */ jsx(Switch, {
|
|
1422
1225
|
isSelected: mode === "relative",
|
|
1423
|
-
onChange:
|
|
1424
|
-
|
|
1226
|
+
onChange: (isRelative) => {
|
|
1227
|
+
syncCalendarStates(null);
|
|
1228
|
+
onModeChange?.(isRelative);
|
|
1229
|
+
},
|
|
1230
|
+
className: "shrink-0 px-2 py-2 md:px-2",
|
|
1425
1231
|
children: t(($) => $.ui.datePicker.relativeMode, { ns: "ui" })
|
|
1426
1232
|
}), presets.map((preset) => /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
1427
1233
|
isDisabled: preset.isDisabled,
|
|
1428
1234
|
onClick: () => selectPreset(preset),
|
|
1429
|
-
className: clsx("w-full px-2 py-1 text-left md:px-
|
|
1235
|
+
className: clsx("w-full px-2 py-1 text-left md:px-2 md:py-1.5 disabled:text-foreground!", activePreset !== (mode === "relative" ? preset.value : preset.label) && "text-foreground hover:text-foreground", activePreset === (mode === "relative" ? preset.value : preset.label) && "bg-primary text-primary-foreground"),
|
|
1430
1236
|
children: /* @__PURE__ */ jsx(Typography, {
|
|
1431
1237
|
size: "small",
|
|
1432
1238
|
sizeMobile: "small",
|
|
@@ -1438,7 +1244,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1438
1244
|
}),
|
|
1439
1245
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
1440
1246
|
isDisabled,
|
|
1441
|
-
isValid: mode === "relative" ? !!activePreset : !dialogState.isInvalid && !!dialogState.value,
|
|
1247
|
+
isValid: mode === "relative" ? !!findRelativePreset(activePreset)?.clampedValue : !dialogState.isInvalid && !!dialogState.value,
|
|
1442
1248
|
onTodayPress: mode === "relative" ? void 0 : onTodayPress,
|
|
1443
1249
|
onApply
|
|
1444
1250
|
}),
|
|
@@ -1458,12 +1264,12 @@ const DateRangePickerBase = (props) => {
|
|
|
1458
1264
|
calendarProps,
|
|
1459
1265
|
onApply,
|
|
1460
1266
|
onRangeChange: syncCalendarStates,
|
|
1461
|
-
onDateSelection:
|
|
1267
|
+
onDateSelection: handleDateSelection,
|
|
1462
1268
|
onDateHover: handleDateHover,
|
|
1463
1269
|
rangeSelection,
|
|
1464
1270
|
hoverDate,
|
|
1465
|
-
onKeyboardNavigation:
|
|
1466
|
-
|
|
1271
|
+
onKeyboardNavigation: onCalendarKeyboardNavigation,
|
|
1272
|
+
getSelectedDateLabel: mode === "relative" ? (date) => formatRelativeDaysOffset(getRelativeDaysOffset(date, todayDate)) : void 0
|
|
1467
1273
|
})
|
|
1468
1274
|
})
|
|
1469
1275
|
})
|
|
@@ -1546,7 +1352,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1546
1352
|
]);
|
|
1547
1353
|
const normalizedRange = normalizedValue;
|
|
1548
1354
|
if (!renderInput) {
|
|
1549
|
-
const relativeOptions = [
|
|
1355
|
+
const relativeOptions = mode === "relative" ? [
|
|
1550
1356
|
{
|
|
1551
1357
|
value: "thisWeek",
|
|
1552
1358
|
label: t(($) => $.ui.datePicker.presets.thisWeek, { ns: "ui" })
|
|
@@ -1584,12 +1390,12 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1584
1390
|
label: t(($) => $.ui.datePicker.presets.soFar, { ns: "ui" })
|
|
1585
1391
|
},
|
|
1586
1392
|
...ui.dateInput.dateRangeOptions
|
|
1587
|
-
];
|
|
1588
|
-
const relativeLabel = mode === "relative" ? relativeOptions.find((option) => option.value === props.relativeValue)?.label : void 0;
|
|
1589
|
-
const startDateValue = parseCalendarDate(normalizedRange?.start ?? null);
|
|
1590
|
-
const endDateValue = parseCalendarDate(normalizedRange?.end ?? null);
|
|
1393
|
+
] : [];
|
|
1394
|
+
const relativeLabel = mode === "relative" ? relativeOptions.find((option) => option.value === props.relativeValue)?.label ?? getRelativeDaysLabel(props.relativeValue, t) : void 0;
|
|
1395
|
+
const startDateValue = relativeLabel ? null : parseCalendarDate(normalizedRange?.start ?? null);
|
|
1396
|
+
const endDateValue = relativeLabel ? null : parseCalendarDate(normalizedRange?.end ?? null);
|
|
1591
1397
|
const hasProvidedRangeValue = mode === "relative" ? !!relativeLabel : !!(normalizedRange?.start || normalizedRange?.end);
|
|
1592
|
-
const as = props.as
|
|
1398
|
+
const as = resolveInputLayout(props.layout, props.as, ui.input.as);
|
|
1593
1399
|
const size = props.size ?? ui.input.size;
|
|
1594
1400
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
1595
1401
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
@@ -1603,7 +1409,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1603
1409
|
});
|
|
1604
1410
|
const disableManualEntry = mode === "relative" || (props.disableManualEntry ?? ui.dateInput.disableManualEntry);
|
|
1605
1411
|
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
1606
|
-
const staticSegments = getStaticDateRangeSegments({
|
|
1412
|
+
const staticSegments = relativeLabel ? null : getStaticDateRangeSegments({
|
|
1607
1413
|
start: startDateValue,
|
|
1608
1414
|
end: endDateValue,
|
|
1609
1415
|
locale,
|
|
@@ -1622,7 +1428,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1622
1428
|
},
|
|
1623
1429
|
isDisabled,
|
|
1624
1430
|
className: clsx("group relative flex w-full flex-col text-left", props.className),
|
|
1625
|
-
inputClassName: clsx("min-w-
|
|
1431
|
+
inputClassName: clsx("min-w-51", props.inputClassName),
|
|
1626
1432
|
contentClassName: "pr-0!",
|
|
1627
1433
|
contentWrapperClassName: datePickerInputContentRowCva({ size }),
|
|
1628
1434
|
contentGroup: "date-picker",
|
|
@@ -1700,4 +1506,4 @@ const DateRangePickerComponent = ({ defaultValue, value, onChange, ...props }) =
|
|
|
1700
1506
|
};
|
|
1701
1507
|
const DateRangePicker = memo(DateRangePickerComponent);
|
|
1702
1508
|
//#endregion
|
|
1703
|
-
export {
|
|
1509
|
+
export { formatRelativeDaysValue as a, hydrateRelativeDateRangeValue as c, isStoredRelativeDateRangeValue as d, parseRelativeDaysValue as f, formatRelativeDaysOffset as i, isDateRangePresetValue as l, DateRangePickerInner as n, getDateRangePreset as o, resolveDateRangePreset as p, dateRangePresetValues as r, getRelativeDaysOffset as s, DateRangePicker as t, isRelativeDateRangeValue as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DateRangePickerProps$1 } from "./DateRangePicker-
|
|
1
|
+
import { a as DateRangePickerProps$1 } from "./DateRangePicker-32D4pWJg.js";
|
|
2
2
|
import { n as FieldValues, t as FormControlProps } from "./form.types-C8P4sznq.js";
|
|
3
3
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.bound.d.ts
|
|
4
4
|
type ControlledDateRangePickerProps<TFieldValues extends FieldValues> = FormControlProps<DateRangePickerProps$1, TFieldValues>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
|
-
import { t as FieldController } from "./form.binding-
|
|
3
|
-
import { n as DateRangePickerInner } from "./DateRangePicker-
|
|
2
|
+
import { t as FieldController } from "./form.binding-DOR5gIQf.js";
|
|
3
|
+
import { n as DateRangePickerInner } from "./DateRangePicker-C3ClfSfj.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.bound.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as FormFieldProps } from "./FormField-
|
|
2
|
-
import { n as InputVariantProps } from "./input.cva-
|
|
3
|
-
import { a as DatePickerTodayIconPlacement, i as DatePickerTodayIconButtonSize, n as DatePickerTodayIcon, r as DatePickerTodayIconButtonComponent, t as DatePickerInputHandle } from "./DatePickerInput-
|
|
1
|
+
import { n as FormFieldProps } from "./FormField-DGyCDxOp.js";
|
|
2
|
+
import { n as InputVariantProps } from "./input.cva-BjuHsDGy.js";
|
|
3
|
+
import { a as DatePickerTodayIconPlacement, i as DatePickerTodayIconButtonSize, n as DatePickerTodayIcon, r as DatePickerTodayIconButtonComponent, t as DatePickerInputHandle } from "./DatePickerInput-vLlL5ATh.js";
|
|
4
4
|
import { FocusEvent, Ref } from "react";
|
|
5
5
|
import { DateValue } from "react-aria";
|
|
6
6
|
import { DatePickerStateOptions } from "react-stately";
|