@povio/ui 6.0.0-rc.12 → 6.0.0-rc.14
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 +523 -42
- package/dist/{Accordion-ORBin0EZ.js → Accordion-BNHpv7Zj.js} +42 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/Alert-xHGPLUpt.d.ts +36 -0
- package/dist/AlertDialog-CKcUZ6l9.d.ts +70 -0
- package/dist/Autocomplete-CkWTSFoj.d.ts +123 -0
- package/dist/Autocomplete-CrNDRxvg.js +319 -0
- package/dist/Badge-B25YEMEw.d.ts +67 -0
- package/dist/BottomSheet-CtcPZG82.d.ts +65 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-tUXH3NjS.js} +9 -9
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-DuwAJSaI.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-BrtRh_dX.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-D8WXqOLN.js} +36 -20
- package/dist/{Button-BaODzvZd.js → Button-C1Jv1Plk.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-DDuk3hJ3.d.ts} +2 -2
- package/dist/{Button-C1YB5dOw.js → Button-DF6sbTuF.js} +3 -7
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-BYJz1JkH.js} +12 -20
- package/dist/ButtonBase-Bn_FT89h.d.ts +47 -0
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DdneUEhM.js} +71 -35
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-BY0kLoYH.js} +7 -7
- package/dist/Checkbox-Bwl6MA-V.d.ts +49 -0
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-E2bns_n0.js} +40 -14
- package/dist/CheckboxCheckmark-Beu8T1g9.js +42 -0
- package/dist/CheckboxGroup-0rzsn-bA.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-C7epIEpW.js} +75 -35
- package/dist/ColumnConfigContent-LNq-6Brf.js +1025 -0
- package/dist/ColumnListContent-Dzze5R7T.js +133 -0
- package/dist/DatePicker-B70SCKfT.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-BU-34fCk.js} +117 -46
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-BCuz08Ws.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-CMEJmZSQ.js} +41 -30
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-D0RtqeBM.js} +90 -162
- package/dist/DateRangePicker-jovxcWGk.d.ts +102 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-Cbdt76CL.js} +94 -40
- package/dist/DateTimePicker-Cfi3ruFy.d.ts +83 -0
- package/dist/Dialog-BWNQjIgo.d.ts +66 -0
- package/dist/{Dialog-C9H9_BmK.js → Dialog-Bpwr1nuy.js} +15 -15
- package/dist/{Dialog-DN5703sy.js → Dialog-ebjPH22i.js} +23 -19
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-D_aym2zh.js} +3 -3
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-3V-G7fZ7.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-C4WitobV.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-BM7659Sk.js} +14 -8
- package/dist/{FileInput-BUwtAF2-.js → FileInput-Bc_E1M1X.js} +76 -81
- package/dist/FileInput-CWRW7OzZ.d.ts +61 -0
- package/dist/{FileTrigger-DlryDp2T.js → FileTrigger-tGSUFrb2.js} +6 -6
- package/dist/FileUpload-DVnp9xxv.d.ts +181 -0
- package/dist/FileUpload-Dk6ZmgWF.js +1105 -0
- package/dist/{Form-CqF1SaVw.js → Form-4jZarkjk.js} +2 -2
- package/dist/FormField-BgiWLGjf.d.ts +70 -0
- package/dist/{FormField-dduTMkNH.js → FormField-DOZ7eXjA.js} +11 -11
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DW9sqJWl.js +22 -0
- package/dist/{Heading-D4XFYv__.js → Heading-B9G3z6Es.js} +2 -2
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-Bjjf5cQL.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CcdpMJa6.js} +1 -1
- package/dist/{Input-BG0Xjw5X.js → Input-BkR3jkvt.js} +2 -2
- package/dist/{Input-CG5LQ0zs.js → Input-CvYyjMWx.js} +95 -60
- package/dist/Input-lppNS8wM.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B5YjsLDE.js} +15 -13
- package/dist/InputContent-Bgalf6R1.d.ts +39 -0
- package/dist/{Label-BGvF9vWx.js → Label-VTcaaLO8.js} +2 -2
- package/dist/{Link-Chux-Clm.js → Link-8zP_NC_c.js} +2 -2
- package/dist/Link-HJ4y-xiW.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-Ck-B1Jae.js} +9 -9
- package/dist/{Modal-DcLWF9cB.js → Modal-xT-Wz5GH.js} +3 -3
- package/dist/{NumberField-DxuikBcr.js → NumberField-BXLzNb2T.js} +92 -63
- package/dist/NumberField-Q-4y3jpb.d.ts +41 -0
- package/dist/{NumberFormatter-DYarfm5F.js → NumberFormatter-D5csbNXm.js} +1 -1
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BBzZCC54.js} +153 -102
- package/dist/NumberRangeInput-DuWOdSdU.d.ts +89 -0
- package/dist/{OverlayArrow-DF0jMwul.js → OverlayArrow-BptI-A_7.js} +2 -2
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-jVaC3Z9L.d.ts} +6 -5
- package/dist/PasswordInput-DtTnGHRD.d.ts +16 -0
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-U0QhNsMp.js} +6 -6
- package/dist/Popover-ClCEOP3e.d.ts +51 -0
- package/dist/Progress-DlXY0dv_.js +180 -0
- package/dist/Progress-VkkXbIh7.d.ts +26 -0
- package/dist/ProgressBar-mpNpV7ow.js +46 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-BPPJyA1s.js} +72 -32
- package/dist/RadioGroup-BbcrP56w.d.ts +52 -0
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DIVjIl0T.js} +12 -10
- package/dist/Select-D1qIWZCv.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-DlbVDCz8.js} +452 -191
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-CCr5YY86.js} +55 -43
- package/dist/{SelectionIndicator-C3hniBa2.js → SelectionIndicator-CvuKjZRP.js} +3 -3
- package/dist/{SharedElementTransition-CZ2bE7yo.js → SharedElementTransition-BkyYit3Q.js} +2 -2
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-CIpFJGOa.js} +283 -366
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-DcwA_jv7.d.ts} +31 -17
- package/dist/Slider-CLViwkE1.d.ts +57 -0
- package/dist/{Slider-DCsCCPFx.js → Slider-_RsgBJcg.js} +72 -15
- package/dist/Spinner-GMEauCHv.d.ts +13 -0
- package/dist/SplitButton-BdP4xjFQ.d.ts +25 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-D4z7JNsD.js} +116 -88
- package/dist/Stepper-DBb0qfla.d.ts +49 -0
- package/dist/{Switch-BfpSMMpv.js → Switch-Bi3_bUw1.js} +56 -14
- package/dist/Switch-DCxONL2Q.d.ts +42 -0
- package/dist/TableDnd-CG1yOlxh.js +238 -0
- package/dist/TableDragHandle-CXApnuUm.js +51 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-BPogry73.js} +46 -35
- package/dist/TabsFilters-CPfGBODw.d.ts +59 -0
- package/dist/Tag-xhcJOv_X.d.ts +26 -0
- package/dist/{Text-D72yc4S6.js → Text-D7Nqkw1l.js} +1 -1
- package/dist/TextArea-BYX9Kk_v.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-CuJS3-Nv.js} +62 -35
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-ByfjqkLp.js} +120 -56
- package/dist/TimePicker-UTo9C6gz.d.ts +64 -0
- package/dist/TimePickerForm-CaIHR0PV.js +532 -0
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-tr7Zxahc.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-BX8o7ECO.d.ts} +2 -2
- package/dist/{ToggleButton-P1z1pxzT.js → ToggleButton-D8BT67FO.js} +5 -5
- package/dist/ToggleGroup-18c-FZ_r.js +500 -0
- package/dist/ToggleGroup-UazUtgU1.d.ts +95 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-Dl3sf8fq.js} +5 -5
- package/dist/Tooltip-FcJ29dhq.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-bvNpM6ku.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-auHWN282.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-C9mE8CMf.js} +23 -24
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-CeGnrjoA.d.ts} +2 -2
- package/dist/calendarHeader.cva-D3sXR7ox.js +23 -0
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/columnConfig.cva-CERwSZRN.js +29 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +174 -128
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +17 -15
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/badge.js +166 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +25 -21
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- 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 +2 -2
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +4 -41
- package/dist/components/date-range-picker.js +4 -2
- package/dist/components/date-range-presets.d.ts +2 -0
- package/dist/components/date-range-presets.js +3 -0
- package/dist/components/date-time-picker.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/components/drawer.js +16 -80
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +2 -3
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload.d.ts +2 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +3 -2
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +22 -25
- package/dist/components/icon-slot.d.ts +1 -2
- package/dist/components/icon-slot.js +2 -2
- package/dist/components/input-frame.d.ts +6 -10
- package/dist/components/input-frame.js +31 -28
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -2
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +2 -2
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +5 -5
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +1 -22
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +105 -87
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +71 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +15 -4
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +3 -3
- package/dist/components/style-definitions.js +62 -20
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +1 -1
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +50 -64
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -3
- package/dist/components/toast.js +4 -3
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.d.ts +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- 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/use-toast.d.ts +2 -2
- package/dist/components/use-toast.js +1 -41
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/component-configuration.js +53 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +3 -3
- 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/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-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-C_-uADGJ.js +93 -0
- package/dist/confirmation.context-DkWyR2aT.d.ts +32 -0
- package/dist/{datePickerInput.cva-Du0Zn04v.js → datePickerInput.cva-CWkV2fut.js} +1 -1
- package/dist/dateRangePreset.utils-Bnb-rjTt.js +116 -0
- package/dist/{dialog.cva-BIpz6HcA.js → dialog.cva-BjVggO5l.js} +1 -1
- package/dist/{dist-DEZzXa0W.js → dist-CP6vV22I.js} +68 -39
- package/dist/{dom.utils-BPooTXtC.js → dom.utils-CqejLWIQ.js} +1 -1
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-BopsvbOy.js} +19 -7
- package/dist/{exports-BNrTn8Tj.js → exports-DeBGRThC.js} +3 -3
- package/dist/{file.utils-Crb-mIHs.d.ts → file.utils-DUADtzdt.d.ts} +3 -3
- package/dist/{file.utils-DqQxnuAm.js → file.utils-X6tkeWaz.js} +2 -6
- package/dist/fileInputButton.cva-gbqRUf1g.js +39 -0
- package/dist/{fileUpload.cva-BYzXGc9C.js → fileUpload.cva-SrF6v406.js} +3 -3
- package/dist/form-field-C735uXsi.d.ts +1 -0
- package/dist/form.binding-Brdjq2yr.js +161 -0
- package/dist/form.binding-DSXB2AOD.d.ts +127 -0
- package/dist/form.types-a2WVJDQX.d.ts +43 -0
- package/dist/formReset-CnZl_yze.js +35 -0
- package/dist/hints-B09_WDhL.d.ts +17 -0
- package/dist/hooks/use-async-list.d.ts +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-breakpoint.d.ts +3 -0
- package/dist/hooks/use-breakpoint.js +2 -0
- package/dist/hooks/use-filters.d.ts +2 -2
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-D8vXIoiq.js → i18n-DaIHnR2n.js} +123 -9
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-xXkHgzet.d.ts} +124 -4
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-Cz8NlFqm.js} +40 -16
- package/dist/index.d.ts +66 -84
- package/dist/index.js +57 -92
- package/dist/{input.cva-DZii82eS.js → input.cva-mm1dnfKP.js} +27 -23
- package/dist/inputLayout-CIVpuUBq.js +7 -0
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{intlStrings-Cu1YN1tA.js → intlStrings-ClpdCJmU.js} +35 -35
- package/dist/{isEqual-LFw0W5rU.js → isEqual-BdJdNr5O.js} +1 -1
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BxVK2yQ5.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-ZhpQz3P0.d.ts +2277 -0
- package/dist/{progress.cva-CsGaGVJ-.js → progress.cva-mkJxrrac.js} +2 -2
- package/dist/{radio.cva-DistaZtZ.js → radio.cva-Dt5N2ul2.js} +7 -7
- package/dist/rich-text-editor.d.ts +44 -2
- package/dist/rich-text-editor.js +733 -1
- package/dist/router.context-B6j_M4cN.js +151 -0
- package/dist/router.context-CSd9JYQ4.d.ts +33 -0
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/{selectItem.cva-B6vxey2R.js → selectItem.cva-DsOZSSPx.js} +2 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BgUrcqXD.js} +379 -94
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/{table.cva-DkcsOmZG.js → table.cva-n9TO_vu1.js} +68 -17
- package/dist/tableCells.cva-Br0_kgRM.js +18 -0
- package/dist/tableColumnConfigStorage-Cciq8gVe.js +215 -0
- package/dist/tableVirtualStore-whSmFzTV.js +67 -0
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table-context.d.ts +2 -0
- package/dist/tanstack/table-context.js +2 -0
- package/dist/tanstack/table-types.d.ts +55 -0
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +3 -2
- package/dist/tanstack-JB8VmS9j.js +73 -0
- package/dist/tanstack-cQOW9-Q2.d.ts +165 -0
- package/dist/tanstack-table-DdWYwCZM.d.ts +858 -0
- package/dist/tanstack-table-M1M26UQJ.js +5299 -0
- package/dist/tanstack.d.ts +66 -84
- package/dist/tanstack.js +57 -92
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-DusQwZw-.js} +13 -9
- package/dist/toast.runtime-ZN5q4T9X.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-NWmBJ2Hc.js} +72 -10
- package/dist/uiConfig.context-ykH4E2js.d.ts +19 -0
- package/dist/uiConfig.types-BsyPKepP.d.ts +291 -0
- package/dist/{uiOverrides.context-DHHzLSnq.d.ts → uiOverrides.context-C5Maic5Q.d.ts} +106 -0
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-DkIjhlce.js} +142 -37
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/useBreakpoint-BPrZNuNl.d.ts +9 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-DtYSRweq.js} +6 -2
- package/dist/{useControlledState-CuU1VIh1.js → useControlledState-C1-Mt2i0.js} +1 -1
- package/dist/useDebounceCallback-C7YKfjXW.js +96 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BzCGqFqi.js +419 -0
- package/dist/{useFormAutosave-BBLm3Ujo.d.ts → useFormAutosave-ClMnzVE7.d.ts} +1 -1
- package/dist/{useIntersectionObserver-DFAhTsV0.js → useIntersectionObserver-B8msnQTR.js} +15 -3
- package/dist/{numberStatic.utils-BIyZuILs.js → useLiveNumberFieldState-npiqOvyB.js} +107 -6
- package/dist/useRemoveButton-zhlA1Pbc.js +98 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/useResolveDateRangePreset-k_h_XJBG.js +26 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-4pieApqz.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/useTableVirtualizer-sFInQiH-.d.ts +162 -0
- package/dist/useToast-BHqkSByv.d.ts +78 -0
- package/dist/useToast-DgqC6Ta_.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/{utils-BkLF-JA3.js → utils-Q5Oc6oX2.js} +1 -1
- package/llms.txt +3201 -0
- package/package.json +22 -118
- package/MIGRATION.md +0 -655
- package/dist/Alert-D4X7OWiv.d.ts +0 -34
- package/dist/AlertDialog-DklLDjmw.d.ts +0 -26
- package/dist/Autocomplete-BgFz3kuR.d.ts +0 -23
- package/dist/Autocomplete-Bn13u0zu.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-Dwh__y-Z.js +0 -28
- package/dist/Badge-Db1ndK67.d.ts +0 -30
- package/dist/BadgeButton-BPhWDAnc.d.ts +0 -15
- package/dist/BottomSheet-BZmDJBR-.d.ts +0 -33
- package/dist/ButtonBase-CZuEy3Pk.d.ts +0 -32
- package/dist/Checkbox-w2j5hLOQ.d.ts +0 -27
- package/dist/Checkbox.bound-D2nBglJz.js +0 -33
- package/dist/Checkbox.bound-DD_RCjVm.d.ts +0 -9
- package/dist/CheckboxCheckmark-DWsYVZuu.js +0 -25
- package/dist/CheckboxGroup-BYI15Y09.d.ts +0 -30
- package/dist/CheckboxGroup.bound-DY0HKGSh.js +0 -32
- package/dist/CheckboxGroup.bound-QiJ-P0KR.d.ts +0 -9
- package/dist/ComboBox-ChsdI0lt.js +0 -212
- package/dist/DatePicker-QzfQf21b.d.ts +0 -56
- package/dist/DatePicker.bound-DoCAqhM4.d.ts +0 -9
- package/dist/DatePicker.bound-M2cjR37s.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-CkIDsAUf.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/DateTimePicker.bound-nSCVUqd0.js +0 -32
- package/dist/Dialog-CO9xljD3.d.ts +0 -21
- package/dist/Drawer-D1cHiBFO.d.ts +0 -18
- package/dist/DropdownMenu-D_9z9ond.d.ts +0 -25
- package/dist/FileInput-BEaECoBS.d.ts +0 -75
- package/dist/FileInput.bound-C12mOKpg.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-D7FMYm-k.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-DmkuulOi.js +0 -30
- package/dist/FileUploadContainer-Dzg5aXXZ.d.ts +0 -5
- package/dist/FormField-DGyCDxOp.d.ts +0 -42
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +0 -17
- package/dist/IconButton-shH_9wcl.d.ts +0 -25
- package/dist/Input-CTp_9mS9.d.ts +0 -34
- package/dist/Input.bound-B9a62ylL.d.ts +0 -9
- package/dist/Input.bound-DYoXyRGy.js +0 -31
- package/dist/InputContent-BCNkN4Fx.d.ts +0 -27
- package/dist/Link-PvYB_M-j.d.ts +0 -30
- package/dist/MenuItem-U3-pu1j5.d.ts +0 -6
- package/dist/NumberField-WXebfxjK.d.ts +0 -34
- package/dist/NumberField.bound-ChJnNyJS.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-BF6P_ega.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- package/dist/PasswordInput-EhQjYyJS.d.ts +0 -11
- package/dist/PasswordInput.bound-CK5GwKL4.d.ts +0 -9
- package/dist/Popover-D_t1XDPA.d.ts +0 -20
- package/dist/Progress-Ckfpi_-M.d.ts +0 -45
- package/dist/Progress-RiEGGxNG.js +0 -119
- package/dist/RadioGroup-6e-Z6jW8.d.ts +0 -26
- package/dist/RadioGroup.bound-BFWSq-on.js +0 -32
- package/dist/RadioGroup.bound-w3SZqSkH.d.ts +0 -9
- package/dist/RichTextEditor-DHhuBeT6.d.ts +0 -28
- package/dist/RichTextEditor-DfwVdm45.js +0 -651
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound--Az1Xwgm.js +0 -34
- package/dist/Select.bound-qOihchei.d.ts +0 -17
- package/dist/Slider-DRg8zKRM.d.ts +0 -23
- package/dist/Slider.bound-CByTXPTr.js +0 -31
- package/dist/Slider.bound-CaEF19um.d.ts +0 -9
- package/dist/Spinner-Cvy_6zgD.d.ts +0 -30
- package/dist/Spinner-DqjP06T1.js +0 -101
- package/dist/SplitButton-V1f2NWfh.d.ts +0 -15
- package/dist/Stepper-k91x_m-E.d.ts +0 -114
- package/dist/Switch-ELVPkPx0.d.ts +0 -24
- package/dist/Switch.bound-DeEdVvZV.d.ts +0 -9
- package/dist/Switch.bound-Dv0cHsMM.js +0 -33
- package/dist/TableDnd-CuHxANWh.js +0 -133
- package/dist/TableRowDetails-D8HFTghI.d.ts +0 -109
- package/dist/TabsFilters-DePddjCk.d.ts +0 -30
- package/dist/Tag-B2_ZiSE-.d.ts +0 -44
- package/dist/TextArea-iqUeB2QY.d.ts +0 -26
- package/dist/TextArea.bound-BJHyCogp.d.ts +0 -9
- package/dist/TextArea.bound-DeaskY6r.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-BFSXJvE_.js +0 -32
- package/dist/TimePickerForm-DD9VA_td.js +0 -225
- package/dist/Toast-D9pdadZ4.d.ts +0 -16
- package/dist/ToggleGroup-CrDoeLN0.js +0 -333
- package/dist/ToggleGroup-DvjnSinl.d.ts +0 -42
- package/dist/ToggleGroup.bound-B03ISHQ8.d.ts +0 -9
- package/dist/ToggleGroup.bound-DCnYwmBt.js +0 -67
- package/dist/Tooltip-B8DTURLQ.d.ts +0 -16
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +0 -11
- package/dist/badgeButton.cva-CBFIhr1S.d.ts +0 -41
- package/dist/button.cva-C8LGtNJ3.d.ts +0 -94
- package/dist/checkbox.cva-CCh_UlrC.d.ts +0 -76
- package/dist/components/badge-button.d.ts +0 -2
- package/dist/components/badge-button.js +0 -74
- package/dist/components/file-upload-container.d.ts +0 -3
- package/dist/components/file-upload-container.js +0 -15
- package/dist/confirmation.context-Bc2yEVp_.js +0 -114
- package/dist/confirmation.context-C_GDRn3a.d.ts +0 -23
- package/dist/fileUpload.types-C-ke21yY.d.ts +0 -110
- package/dist/form.binding-DOR5gIQf.js +0 -49
- package/dist/form.types-C8P4sznq.d.ts +0 -22
- package/dist/formFieldHelper.cva-DRmSyRZN.js +0 -14
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +0 -9
- package/dist/icons.d.ts +0 -4
- package/dist/icons.js +0 -3
- package/dist/input.cva-BjuHsDGy.d.ts +0 -80
- package/dist/inputLayout-KdAtunGk.js +0 -5
- package/dist/link.context-BCHn7NSy.d.ts +0 -12
- package/dist/radio.cva-D7M1hqLe.d.ts +0 -56
- package/dist/router.context-CtafjXV7.d.ts +0 -16
- package/dist/router.context-MckTbHw9.js +0 -63
- package/dist/routing.utils-DfxEt0_Y.js +0 -30
- package/dist/style-definitions-Dx6aFDiR.d.ts +0 -1038
- package/dist/switch.cva-r6vcS25Q.d.ts +0 -16
- package/dist/tanstack/autocomplete.d.ts +0 -3
- package/dist/tanstack/autocomplete.js +0 -2
- package/dist/tanstack/checkbox-group.d.ts +0 -3
- package/dist/tanstack/checkbox-group.js +0 -2
- package/dist/tanstack/checkbox.d.ts +0 -3
- package/dist/tanstack/checkbox.js +0 -2
- package/dist/tanstack/date-picker.d.ts +0 -3
- package/dist/tanstack/date-picker.js +0 -2
- package/dist/tanstack/date-range-picker.d.ts +0 -3
- package/dist/tanstack/date-range-picker.js +0 -2
- package/dist/tanstack/date-time-picker.d.ts +0 -3
- package/dist/tanstack/date-time-picker.js +0 -2
- package/dist/tanstack/file-input.d.ts +0 -3
- package/dist/tanstack/file-input.js +0 -2
- package/dist/tanstack/file-upload.d.ts +0 -4
- package/dist/tanstack/file-upload.js +0 -2
- package/dist/tanstack/input.d.ts +0 -3
- package/dist/tanstack/input.js +0 -2
- package/dist/tanstack/number-field.d.ts +0 -3
- package/dist/tanstack/number-field.js +0 -2
- package/dist/tanstack/number-range-input.d.ts +0 -3
- package/dist/tanstack/number-range-input.js +0 -2
- package/dist/tanstack/password-input.d.ts +0 -2
- package/dist/tanstack/password-input.js +0 -2
- package/dist/tanstack/radio-group.d.ts +0 -3
- package/dist/tanstack/radio-group.js +0 -2
- package/dist/tanstack/rich-text-editor.d.ts +0 -9
- package/dist/tanstack/rich-text-editor.js +0 -28
- package/dist/tanstack/select.d.ts +0 -3
- package/dist/tanstack/select.js +0 -2
- package/dist/tanstack/slider.d.ts +0 -3
- package/dist/tanstack/slider.js +0 -2
- package/dist/tanstack/switch.d.ts +0 -3
- package/dist/tanstack/switch.js +0 -2
- package/dist/tanstack/text-area.d.ts +0 -3
- package/dist/tanstack/text-area.js +0 -2
- package/dist/tanstack/time-picker.d.ts +0 -3
- package/dist/tanstack/time-picker.js +0 -2
- package/dist/tanstack/toggle-group.d.ts +0 -3
- package/dist/tanstack/toggle-group.js +0 -2
- package/dist/tanstack-Bgdv0qU1.js +0 -19
- package/dist/tanstack-wNbE6b-h.d.ts +0 -566
- package/dist/toast.cva-AmLw6Cf5.d.ts +0 -61
- package/dist/toast.runtime-Drd2IJ_j.js +0 -17
- package/dist/toastActivation.store-BELtcr76.js +0 -16
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +0 -26
- package/dist/typography.cva-BCHlTHdM.d.ts +0 -36
- package/dist/uiConfig.context-BnCORTNm.d.ts +0 -132
- package/dist/useAsyncList-Cu-Y8If2.d.ts +0 -9
- package/dist/useFilters-BxRScJdn.d.ts +0 -11
- package/dist/useFilters-DMi94RZK.js +0 -190
- package/dist/useForm-Cb7KWLds.js +0 -217
- package/dist/useForm-I6z23FXf.d.ts +0 -51
- package/dist/useFormAutosave-BPGlChiY.js +0 -216
- package/dist/useTableColumnConfig-CXYgj5xi.js +0 -1906
- package/dist/useTableNav-BusSFEVC.d.ts +0 -197
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-
|
|
3
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-DF6sbTuF.js";
|
|
4
4
|
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
5
|
-
import
|
|
5
|
+
import "./i18n-DaIHnR2n.js";
|
|
6
|
+
import { t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
6
7
|
import { IconButton } from "./components/icon-button.js";
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
8
|
+
import { n as $a8ea2faf2ebe4d2f$re_export$mergeProps } from "./import-D_3dPATF.js";
|
|
9
|
+
import { n as FormFieldLabel } from "./FormField-DOZ7eXjA.js";
|
|
10
|
+
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-mm1dnfKP.js";
|
|
11
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-C1-Mt2i0.js";
|
|
12
|
+
import { T as $8e7461aabf74661f$export$60e84778edff6d26, d as useFirefoxDateSegmentSelectionGuard, f as DateSegmentItem } from "./staticDateTimeSegments-BgUrcqXD.js";
|
|
11
13
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
12
14
|
import { t as DateUtils } from "./date.utils-B8_QF9y6.js";
|
|
13
|
-
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-
|
|
14
|
-
import "./
|
|
15
|
-
import { n as
|
|
16
|
-
import { Type } from "lucide-react";
|
|
15
|
+
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-CWkV2fut.js";
|
|
16
|
+
import { n as InputClear } from "./TooltipWrapper-bvNpM6ku.js";
|
|
17
|
+
import { n as inputTrailingRowClass, r as inputTrailingRowInsetClass, t as inputContentRowClass } from "./inputRow.clsx-BbcaXVta.js";
|
|
17
18
|
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
19
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { Type } from "lucide-react";
|
|
19
21
|
import { CalendarDate, CalendarDateTime, DateFormatter, GregorianCalendar, createCalendar, endOfMonth, endOfWeek, getDayOfWeek, getLocalTimeZone, getWeeksInMonth, isEqualCalendar, isSameDay, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate, today } from "@internationalized/date";
|
|
20
22
|
import { useDateField, useLocale } from "react-aria";
|
|
21
23
|
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
22
24
|
import i18next from "i18next";
|
|
23
|
-
//#region ../../node_modules/.bun/react-stately@3.51.0+
|
|
25
|
+
//#region ../../node_modules/.bun/react-stately@3.51.0+62547eec5a2188e3/node_modules/react-stately/dist/private/calendar/utils.mjs
|
|
24
26
|
function $dd602d3c757202f2$export$eac50920cf2fd59a(date, minValue, maxValue) {
|
|
25
27
|
return minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
26
28
|
}
|
|
@@ -80,7 +82,7 @@ function $dd602d3c757202f2$export$6595e603c409b4b8(a, b) {
|
|
|
80
82
|
return a.days === b.days && a.weeks === b.weeks && a.months === b.months && a.years === b.years;
|
|
81
83
|
}
|
|
82
84
|
//#endregion
|
|
83
|
-
//#region ../../node_modules/.bun/react-stately@3.51.0+
|
|
85
|
+
//#region ../../node_modules/.bun/react-stately@3.51.0+62547eec5a2188e3/node_modules/react-stately/dist/private/calendar/useCalendarState.mjs
|
|
84
86
|
function $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f(props) {
|
|
85
87
|
let defaultFormatter = useMemo(() => new DateFormatter(props.locale), [props.locale]);
|
|
86
88
|
let resolvedOptions = useMemo(() => defaultFormatter.resolvedOptions(), [defaultFormatter]);
|
|
@@ -334,7 +336,7 @@ function $ea0ea6e62ae0d7ca$var$unitDuration(duration) {
|
|
|
334
336
|
return unit;
|
|
335
337
|
}
|
|
336
338
|
//#endregion
|
|
337
|
-
//#region ../../node_modules/.bun/react-stately@3.51.0+
|
|
339
|
+
//#region ../../node_modules/.bun/react-stately@3.51.0+62547eec5a2188e3/node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.mjs
|
|
338
340
|
function $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props) {
|
|
339
341
|
let [isOpen, setOpen] = $3e6197669829fe11$export$40bfa8c7b0832715(props.isOpen, props.defaultOpen || false, props.onOpenChange);
|
|
340
342
|
let [point, setPoint] = useState(null);
|
|
@@ -374,10 +376,11 @@ const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableMan
|
|
|
374
376
|
props.onChange?.(value ?? null);
|
|
375
377
|
}
|
|
376
378
|
};
|
|
379
|
+
const isReadOnly = disableManualEntry || props.isReadOnly;
|
|
377
380
|
const state = $8e7461aabf74661f$export$60e84778edff6d26({
|
|
378
381
|
...dateFieldProps,
|
|
379
382
|
isDisabled,
|
|
380
|
-
isReadOnly
|
|
383
|
+
isReadOnly,
|
|
381
384
|
locale,
|
|
382
385
|
createCalendar
|
|
383
386
|
});
|
|
@@ -385,7 +388,7 @@ const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableMan
|
|
|
385
388
|
const { fieldProps } = useDateField({
|
|
386
389
|
...dateFieldProps,
|
|
387
390
|
isDisabled,
|
|
388
|
-
isReadOnly
|
|
391
|
+
isReadOnly
|
|
389
392
|
}, state, dataFieldRef);
|
|
390
393
|
const isSegmentVisible = useCallback((segmentType) => {
|
|
391
394
|
if (dateGranularity === "day") return true;
|
|
@@ -408,6 +411,7 @@ const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableMan
|
|
|
408
411
|
return Number.isNaN(parsedValue) ? null : parsedValue;
|
|
409
412
|
};
|
|
410
413
|
const autoFixYear = () => {
|
|
414
|
+
if (props.isReadOnly) return;
|
|
411
415
|
const monthSegment = state.segments.find((segment) => segment.type === "month");
|
|
412
416
|
const daySegment = state.segments.find((segment) => segment.type === "day");
|
|
413
417
|
const yearSegment = state.segments.find((segment) => segment.type === "year");
|
|
@@ -556,7 +560,12 @@ const renderDatePickerTodayIcon = (todayIcon, options) => {
|
|
|
556
560
|
};
|
|
557
561
|
//#endregion
|
|
558
562
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
559
|
-
|
|
563
|
+
/**
|
|
564
|
+
* Hands a form field's element ref the picker's DOM element. The live picker exposes a handle rather than an
|
|
565
|
+
* element, so the form would never see a node to set `noValidate` on.
|
|
566
|
+
*/
|
|
567
|
+
const toPickerElementRef = (elementRef) => (node) => elementRef(node instanceof Element ? node : node?.getContainer?.() ?? null);
|
|
568
|
+
const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isReadOnly, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, isClearableIfDisabled, headerProps, todayIcon, todayIconButtonSize = "sm", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, displayContent, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, onClear: onClearProp, onValueCommit, ...props }) => {
|
|
560
569
|
const uiConfig = UIConfig.useConfig();
|
|
561
570
|
const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
|
|
562
571
|
let effectiveTimeZone = getLocalTimeZone();
|
|
@@ -612,7 +621,7 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
612
621
|
}, []);
|
|
613
622
|
const showClear = (!isDisabled || isClearableIfDisabled === true) && (canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null);
|
|
614
623
|
const hasDisplayedValue = !!hasValue || normalizedFieldProps.value != null;
|
|
615
|
-
const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
|
|
624
|
+
const isTodayIconDisabled = isDisabled || isReadOnly || buttonProps.isDisabled;
|
|
616
625
|
const onToday = () => {
|
|
617
626
|
if (isTodayIconDisabled) return;
|
|
618
627
|
if (isDateTime) {
|
|
@@ -636,12 +645,10 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
636
645
|
const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
|
|
637
646
|
return /* @__PURE__ */ jsxs("div", {
|
|
638
647
|
ref: containerRef,
|
|
639
|
-
|
|
640
|
-
...focusWithinProps,
|
|
641
|
-
...hoverProps,
|
|
648
|
+
...$a8ea2faf2ebe4d2f$re_export$mergeProps(groupProps, focusWithinProps, hoverProps),
|
|
642
649
|
className: clsx("group group/date-picker-content relative flex items-center justify-between gap-2", shouldShrinkInput ? "min-w-0" : "min-w-51", groupProps.className, inputBaseCva({
|
|
643
650
|
variant,
|
|
644
|
-
as,
|
|
651
|
+
layout: as,
|
|
645
652
|
...props
|
|
646
653
|
}), className),
|
|
647
654
|
"data-rac": "",
|
|
@@ -659,9 +666,9 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
659
666
|
"data-is-required": isRequired || void 0,
|
|
660
667
|
"data-is-filled": hasDisplayedValue || void 0,
|
|
661
668
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
662
|
-
className: clsx("
|
|
669
|
+
className: clsx(inputContentRowClass, "pr-0!", shouldShrinkInput && "flex-1", inputSizeCva({
|
|
663
670
|
size,
|
|
664
|
-
as
|
|
671
|
+
layout: as
|
|
665
672
|
})),
|
|
666
673
|
children: [
|
|
667
674
|
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
@@ -678,7 +685,7 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
678
685
|
"aria-labelledby": groupProps["aria-labelledby"],
|
|
679
686
|
"aria-describedby": groupProps["aria-describedby"],
|
|
680
687
|
className: "absolute inset-0 z-base",
|
|
681
|
-
isDisabled
|
|
688
|
+
isDisabled: isDisabled || isReadOnly
|
|
682
689
|
}),
|
|
683
690
|
!shouldRenderTodayIconWithFieldLabel && todayIconButton,
|
|
684
691
|
displayContent ? displayContent : disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
@@ -689,6 +696,7 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
689
696
|
ref: dateFieldRef,
|
|
690
697
|
...normalizedFieldProps,
|
|
691
698
|
isDisabled,
|
|
699
|
+
isReadOnly,
|
|
692
700
|
isInvalid,
|
|
693
701
|
onClearChange,
|
|
694
702
|
hidePlaceholder,
|
|
@@ -706,6 +714,7 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
706
714
|
ref: endDateFieldRef,
|
|
707
715
|
...normalizedEndFieldProps,
|
|
708
716
|
isDisabled,
|
|
717
|
+
isReadOnly,
|
|
709
718
|
isInvalid,
|
|
710
719
|
onClearChange,
|
|
711
720
|
hidePlaceholder,
|
|
@@ -719,19 +728,21 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
719
728
|
})
|
|
720
729
|
]
|
|
721
730
|
}), /* @__PURE__ */ jsxs("div", {
|
|
722
|
-
className: clsx(inputSizeCva({
|
|
731
|
+
className: clsx(inputTrailingRowClass, inputSizeCva({
|
|
723
732
|
size,
|
|
724
|
-
as
|
|
725
|
-
}),
|
|
726
|
-
children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
733
|
+
layout: as
|
|
734
|
+
}), inputTrailingRowInsetClass),
|
|
735
|
+
children: [isClearable && !isReadOnly && /* @__PURE__ */ jsx(InputClear, {
|
|
727
736
|
onClear: clearInput,
|
|
737
|
+
as,
|
|
728
738
|
show: showClear
|
|
729
739
|
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(IconButton, {
|
|
730
740
|
label: "",
|
|
731
741
|
color: "secondary",
|
|
732
742
|
...buttonProps,
|
|
743
|
+
href: void 0,
|
|
733
744
|
icon: pickerIcon,
|
|
734
|
-
isDisabled,
|
|
745
|
+
isDisabled: isDisabled || isReadOnly,
|
|
735
746
|
className: "border-0!",
|
|
736
747
|
"data-static-press-action": "",
|
|
737
748
|
variant: "text",
|
|
@@ -743,4 +754,4 @@ const DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, field
|
|
|
743
754
|
});
|
|
744
755
|
};
|
|
745
756
|
//#endregion
|
|
746
|
-
export { $
|
|
757
|
+
export { $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f as a, $dd602d3c757202f2$export$eac50920cf2fd59a as c, $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 as i, $dd602d3c757202f2$export$f4a51ff076cc9a09 as l, toPickerElementRef as n, $dd602d3c757202f2$export$4f5203c0d889109e as o, renderDatePickerTodayIcon as r, $dd602d3c757202f2$export$a1d3911297b952d7 as s, DatePickerInput as t };
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-
|
|
4
|
-
import { t as Switch } from "./Switch-
|
|
3
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-DF6sbTuF.js";
|
|
4
|
+
import { t as Switch } from "./Switch-Bi3_bUw1.js";
|
|
5
5
|
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import "./i18n-DaIHnR2n.js";
|
|
7
|
+
import { Spinner } from "./components/spinner.js";
|
|
8
|
+
import { t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
9
|
+
import { n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
8
10
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
9
11
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
10
|
-
import { t as FormField } from "./FormField-
|
|
11
|
-
import {
|
|
12
|
-
import { a as $
|
|
13
|
-
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-
|
|
14
|
-
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-
|
|
15
|
-
import {
|
|
12
|
+
import { t as FormField } from "./FormField-DOZ7eXjA.js";
|
|
13
|
+
import { n as resolveInputLayout, t as isFieldHeaderHiddenByLayout } from "./inputLayout-CIVpuUBq.js";
|
|
14
|
+
import { a as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, c as $dd602d3c757202f2$export$eac50920cf2fd59a, i as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, l as $dd602d3c757202f2$export$f4a51ff076cc9a09, n as toPickerElementRef, o as $dd602d3c757202f2$export$4f5203c0d889109e, r as renderDatePickerTodayIcon, s as $dd602d3c757202f2$export$a1d3911297b952d7, t as DatePickerInput } from "./DatePickerInput-CMEJmZSQ.js";
|
|
15
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-C1-Mt2i0.js";
|
|
16
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-D5csbNXm.js";
|
|
17
|
+
import { D as $8b141f2f71e88f85$export$7e319ea407e63bc0, E as $8b141f2f71e88f85$export$2440da353cedad43, O as $8b141f2f71e88f85$export$80ff8fc0ae339c13, i as getStaticDateTimeFocusTarget, k as $8b141f2f71e88f85$export$c5221a78ef73c5e9, l as parseIsoDate, o as DateTimeDialogFooter, r as getStaticDateRangeSegments, s as DateTimeDialog, u as parsePickerValue } from "./staticDateTimeSegments-BgUrcqXD.js";
|
|
16
18
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
17
|
-
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-
|
|
18
|
-
import "./
|
|
19
|
-
import {
|
|
20
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
19
|
+
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-CWkV2fut.js";
|
|
20
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-bvNpM6ku.js";
|
|
21
|
+
import { r as inputTrailingRowInsetClass } from "./inputRow.clsx-BbcaXVta.js";
|
|
22
|
+
import { n as shouldRenderInputOnMount, r as useStaticInputHandoff } from "./useStaticInputHandoff-DrNFrvD7.js";
|
|
21
23
|
import { InputFrame } from "./components/input-frame.js";
|
|
24
|
+
import { a as getDateRangePreset, d as parseRelativeDaysValue, i as formatRelativeDaysValue, o as getRelativeDaysOffset, r as formatRelativeDaysOffset } from "./dateRangePreset.utils-Bnb-rjTt.js";
|
|
22
25
|
import { Suspense, lazy, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
23
26
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { DateFormatter, GregorianCalendar, createCalendar,
|
|
25
|
-
import { useDateRangePicker, useLocale } from "react-aria";
|
|
27
|
+
import { DateFormatter, GregorianCalendar, createCalendar, getLocalTimeZone, maxDate, minDate, toCalendar, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
26
28
|
import { useTranslation } from "react-i18next";
|
|
27
|
-
|
|
29
|
+
import { useDateRangePicker, useLocale } from "react-aria";
|
|
30
|
+
//#region ../../node_modules/.bun/react-stately@3.51.0+62547eec5a2188e3/node_modules/react-stately/dist/private/calendar/useRangeCalendarState.mjs
|
|
28
31
|
function $a0a87fb6fcfb22ec$export$9a987164d97ecc90(props) {
|
|
29
32
|
let { value: valueProp, defaultValue, onChange, createCalendar, locale, visibleDuration = { months: 1 }, minValue, maxValue, ...calendarProps } = props;
|
|
30
33
|
let [value, setValue] = $3e6197669829fe11$export$40bfa8c7b0832715(valueProp, defaultValue || null, onChange);
|
|
@@ -158,7 +161,7 @@ function $a0a87fb6fcfb22ec$var$nextUnavailableDate(anchorDate, isDateUnavailable
|
|
|
158
161
|
if (isDateUnavailable(nextDate)) return nextDate.add({ days: -dir });
|
|
159
162
|
}
|
|
160
163
|
//#endregion
|
|
161
|
-
//#region ../../node_modules/.bun/react-stately@3.51.0+
|
|
164
|
+
//#region ../../node_modules/.bun/react-stately@3.51.0+62547eec5a2188e3/node_modules/react-stately/dist/private/datepicker/useDateRangePickerState.mjs
|
|
162
165
|
function $6de3e3f1a7663217$export$e50a61c1de9f574(props) {
|
|
163
166
|
let overlayState = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
164
167
|
let [controlledValue, setControlledValue] = $3e6197669829fe11$export$40bfa8c7b0832715(props.value, props.defaultValue || null, props.onChange);
|
|
@@ -369,7 +372,7 @@ function $6de3e3f1a7663217$var$isCompleteRange(value) {
|
|
|
369
372
|
}
|
|
370
373
|
//#endregion
|
|
371
374
|
//#region src/components/inputs/DateTime/shared/RangeCalendar.lazy.tsx
|
|
372
|
-
const loadRangeCalendar = () => import("./RangeCalendar-
|
|
375
|
+
const loadRangeCalendar = () => import("./RangeCalendar-DIVjIl0T.js");
|
|
373
376
|
const RangeCalendarRenderer = lazy(() => loadRangeCalendar().then(({ RangeCalendar }) => ({ default: RangeCalendar })));
|
|
374
377
|
/** Fetches the range calendar chunk ahead of the dialog opening (hover, focus). */
|
|
375
378
|
const preloadRangeCalendar = () => {
|
|
@@ -387,103 +390,6 @@ const RangeCalendar = (props) => /* @__PURE__ */ jsx(Suspense, {
|
|
|
387
390
|
children: /* @__PURE__ */ jsx(RangeCalendarRenderer, { ...props })
|
|
388
391
|
});
|
|
389
392
|
//#endregion
|
|
390
|
-
//#region src/components/inputs/DateTime/DateRangePicker/dateRangePreset.utils.ts
|
|
391
|
-
const dateRangePresetValues = [
|
|
392
|
-
"thisWeek",
|
|
393
|
-
"lastWeek",
|
|
394
|
-
"thisAndLastWeek",
|
|
395
|
-
"thisMonth",
|
|
396
|
-
"thisAndLastMonth",
|
|
397
|
-
"thisYear",
|
|
398
|
-
"lastYear",
|
|
399
|
-
"thisAndLastYear",
|
|
400
|
-
"soFar"
|
|
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
|
-
};
|
|
420
|
-
const isStoredRelativeDateRangeValue = (value) => typeof value === "object" && value !== null && typeof value.relativeValue === "string";
|
|
421
|
-
const isRelativeDateRangeValue = (value) => isStoredRelativeDateRangeValue(value) && typeof value.resolvedValue === "object";
|
|
422
|
-
const isDateRangePresetValue = (value) => dateRangePresetValues.some((preset) => preset === value);
|
|
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
|
-
};
|
|
429
|
-
if (!isDateRangePresetValue(value)) return;
|
|
430
|
-
const previousYear = currentDate.subtract({ years: 1 });
|
|
431
|
-
switch (value) {
|
|
432
|
-
case "thisWeek": return {
|
|
433
|
-
start: startOfWeek(currentDate, locale),
|
|
434
|
-
end: endOfWeek(currentDate, locale)
|
|
435
|
-
};
|
|
436
|
-
case "lastWeek": {
|
|
437
|
-
const thisWeekStart = startOfWeek(currentDate, locale);
|
|
438
|
-
return {
|
|
439
|
-
start: thisWeekStart.subtract({ weeks: 1 }),
|
|
440
|
-
end: thisWeekStart.subtract({ days: 1 })
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
case "thisAndLastWeek": return {
|
|
444
|
-
start: startOfWeek(currentDate, locale).subtract({ weeks: 1 }),
|
|
445
|
-
end: endOfWeek(currentDate, locale)
|
|
446
|
-
};
|
|
447
|
-
case "thisMonth": return {
|
|
448
|
-
start: startOfMonth(currentDate),
|
|
449
|
-
end: endOfMonth(currentDate)
|
|
450
|
-
};
|
|
451
|
-
case "thisAndLastMonth": return {
|
|
452
|
-
start: startOfMonth(currentDate).subtract({ months: 1 }),
|
|
453
|
-
end: endOfMonth(currentDate)
|
|
454
|
-
};
|
|
455
|
-
case "thisYear":
|
|
456
|
-
case "soFar": return {
|
|
457
|
-
start: startOfYear(currentDate),
|
|
458
|
-
end: currentDate
|
|
459
|
-
};
|
|
460
|
-
case "lastYear": return {
|
|
461
|
-
start: startOfYear(previousYear),
|
|
462
|
-
end: endOfYear(previousYear)
|
|
463
|
-
};
|
|
464
|
-
case "thisAndLastYear": return {
|
|
465
|
-
start: startOfYear(previousYear),
|
|
466
|
-
end: currentDate
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
const resolveDateRangePreset = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
471
|
-
const range = getDateRangePreset(value, currentDate, locale);
|
|
472
|
-
if (!range) return;
|
|
473
|
-
return {
|
|
474
|
-
start: DateTimeUtils.fromCalendarDateToUTCISO(range.start),
|
|
475
|
-
end: DateTimeUtils.fromCalendarDateToUTCISO(range.end, { endOfDay: true })
|
|
476
|
-
};
|
|
477
|
-
};
|
|
478
|
-
const hydrateRelativeDateRangeValue = (value, currentDate = today(getLocalTimeZone()), locale = "en-GB") => {
|
|
479
|
-
if (isRelativeDateRangeValue(value)) return value;
|
|
480
|
-
const resolvedValue = resolveDateRangePreset(value.relativeValue, currentDate, locale);
|
|
481
|
-
return resolvedValue ? {
|
|
482
|
-
relativeValue: value.relativeValue,
|
|
483
|
-
resolvedValue
|
|
484
|
-
} : void 0;
|
|
485
|
-
};
|
|
486
|
-
//#endregion
|
|
487
393
|
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.tsx
|
|
488
394
|
const resolveTimeZone = (timeZone) => timeZone === "clientLocal" ? getLocalTimeZone() : timeZone;
|
|
489
395
|
const getRelativeDaysLabel = (value, currentDate, locale, shouldForceLeadingZeros) => {
|
|
@@ -495,10 +401,10 @@ const getRelativeDaysLabel = (value, currentDate, locale, shouldForceLeadingZero
|
|
|
495
401
|
const DateRangePickerBase = (props) => {
|
|
496
402
|
const ui = UIConfig.useConfig();
|
|
497
403
|
const { t } = useTranslation();
|
|
498
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName,
|
|
404
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, error, onChange, onBlur, onValueCommit, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, 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;
|
|
499
405
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
500
406
|
const variant = variantProp ?? ui.input.variant;
|
|
501
|
-
const as = resolveInputLayout(layoutProp,
|
|
407
|
+
const as = resolveInputLayout(layoutProp, ui.input.layout);
|
|
502
408
|
const size = sizeProp ?? ui.input.size;
|
|
503
409
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
504
410
|
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
@@ -548,7 +454,8 @@ const DateRangePickerBase = (props) => {
|
|
|
548
454
|
"aria-label": rest["aria-labelledby"] ? void 0 : rest["aria-label"],
|
|
549
455
|
shouldForceLeadingZeros,
|
|
550
456
|
minValue,
|
|
551
|
-
maxValue
|
|
457
|
+
maxValue,
|
|
458
|
+
onBlur: () => handleBlur(state.value)
|
|
552
459
|
}, state, dateRangePickerRef);
|
|
553
460
|
const { calendarProps } = useDateRangePicker({
|
|
554
461
|
...rest,
|
|
@@ -576,8 +483,12 @@ const DateRangePickerBase = (props) => {
|
|
|
576
483
|
getContainer: () => datePickerInputRef.current?.getContainer?.() ?? null
|
|
577
484
|
}));
|
|
578
485
|
const handleBlur = (newValue) => {
|
|
579
|
-
onBlur?.({
|
|
486
|
+
onBlur?.({
|
|
487
|
+
type: "blur",
|
|
488
|
+
target: { value: newValue }
|
|
489
|
+
});
|
|
580
490
|
};
|
|
491
|
+
const isInvalid = !!rest.isInvalid || !!error;
|
|
581
492
|
const accessibility = useFieldAccessibility({
|
|
582
493
|
error,
|
|
583
494
|
helperText,
|
|
@@ -592,8 +503,7 @@ const DateRangePickerBase = (props) => {
|
|
|
592
503
|
helperText,
|
|
593
504
|
isRequired,
|
|
594
505
|
rightContent,
|
|
595
|
-
|
|
596
|
-
hideLabel,
|
|
506
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
597
507
|
isDisabled,
|
|
598
508
|
headerClassName,
|
|
599
509
|
errorClassName
|
|
@@ -636,7 +546,7 @@ const DateRangePickerBase = (props) => {
|
|
|
636
546
|
helperText,
|
|
637
547
|
isRequired,
|
|
638
548
|
rightContent,
|
|
639
|
-
isHeaderHidden: hideLabel
|
|
549
|
+
isHeaderHidden: hideLabel,
|
|
640
550
|
isDisabled,
|
|
641
551
|
className: headerClassName,
|
|
642
552
|
labelProps
|
|
@@ -1146,7 +1056,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1146
1056
|
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
1147
1057
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
1148
1058
|
...formFieldProps,
|
|
1149
|
-
as,
|
|
1059
|
+
layout: as,
|
|
1150
1060
|
labelProps,
|
|
1151
1061
|
className: clsx("group relative flex w-full flex-col text-left", className),
|
|
1152
1062
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
@@ -1159,7 +1069,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1159
1069
|
...groupProps,
|
|
1160
1070
|
"aria-describedby": accessibility.describedBy,
|
|
1161
1071
|
"aria-errormessage": accessibility.errorMessageId,
|
|
1162
|
-
"aria-invalid":
|
|
1072
|
+
"aria-invalid": isInvalid
|
|
1163
1073
|
},
|
|
1164
1074
|
fieldProps: {
|
|
1165
1075
|
...startFieldProps,
|
|
@@ -1167,10 +1077,6 @@ const DateRangePickerBase = (props) => {
|
|
|
1167
1077
|
onChange: (date) => {
|
|
1168
1078
|
startFieldProps.onChange?.(date);
|
|
1169
1079
|
emitPartialRangeChange("start", date);
|
|
1170
|
-
},
|
|
1171
|
-
onBlur: (event) => {
|
|
1172
|
-
startFieldProps.onBlur?.(event);
|
|
1173
|
-
handleBlur(state.value);
|
|
1174
1080
|
}
|
|
1175
1081
|
},
|
|
1176
1082
|
endFieldProps: {
|
|
@@ -1179,10 +1085,6 @@ const DateRangePickerBase = (props) => {
|
|
|
1179
1085
|
onChange: (date) => {
|
|
1180
1086
|
endFieldProps.onChange?.(date);
|
|
1181
1087
|
emitPartialRangeChange("end", date);
|
|
1182
|
-
},
|
|
1183
|
-
onBlur: (event) => {
|
|
1184
|
-
endFieldProps.onBlur?.(event);
|
|
1185
|
-
handleBlur(state.value);
|
|
1186
1088
|
}
|
|
1187
1089
|
},
|
|
1188
1090
|
fieldValue: normalizedValue?.start ?? null,
|
|
@@ -1191,7 +1093,8 @@ const DateRangePickerBase = (props) => {
|
|
|
1191
1093
|
hasValue: mode === "relative" ? !!relativeValue : normalizedValue?.start != null || normalizedValue?.end != null,
|
|
1192
1094
|
buttonProps,
|
|
1193
1095
|
isDisabled,
|
|
1194
|
-
|
|
1096
|
+
isReadOnly: rest.isReadOnly,
|
|
1097
|
+
isInvalid,
|
|
1195
1098
|
disableDropdown,
|
|
1196
1099
|
variant,
|
|
1197
1100
|
size,
|
|
@@ -1247,7 +1150,7 @@ const DateRangePickerBase = (props) => {
|
|
|
1247
1150
|
label,
|
|
1248
1151
|
triggerRef: dateRangePickerRef,
|
|
1249
1152
|
dialogProps,
|
|
1250
|
-
isOpen: state.isOpen,
|
|
1153
|
+
isOpen: state.isOpen && !rest.isReadOnly,
|
|
1251
1154
|
onOpenChange,
|
|
1252
1155
|
children: /* @__PURE__ */ jsx("div", {
|
|
1253
1156
|
className: "mb-4 flex max-w-[804px] md:mb-0",
|
|
@@ -1273,6 +1176,14 @@ const DateRangePickerBase = (props) => {
|
|
|
1273
1176
|
})
|
|
1274
1177
|
});
|
|
1275
1178
|
};
|
|
1179
|
+
const DATE_RANGE_PICKER_FULL_ISO_FORMAT = {
|
|
1180
|
+
component: "DateRangePicker",
|
|
1181
|
+
expected: "an ISO date or timestamp, e.g. 2025-03-04T00:00:00.000Z"
|
|
1182
|
+
};
|
|
1183
|
+
const DATE_RANGE_PICKER_DATE_FORMAT = {
|
|
1184
|
+
component: "DateRangePicker (fullIso={false})",
|
|
1185
|
+
expected: "a YYYY-MM-DD date"
|
|
1186
|
+
};
|
|
1276
1187
|
const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
1277
1188
|
const ui = UIConfig.useConfig();
|
|
1278
1189
|
const { t } = useTranslation();
|
|
@@ -1280,7 +1191,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1280
1191
|
const { locale } = useLocale();
|
|
1281
1192
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
1282
1193
|
const allowPartialRange = props.allowPartialRange ?? ui.dateInput.allowPartialRange;
|
|
1283
|
-
const [renderInput, setRenderInput] = useState(
|
|
1194
|
+
const [renderInput, setRenderInput] = useState(() => shouldRenderInputOnMount(renderStaticInput, ui.renderStaticInput, props.autoFocus));
|
|
1284
1195
|
const inputRef = useRef(null);
|
|
1285
1196
|
const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
|
|
1286
1197
|
inputRef,
|
|
@@ -1316,28 +1227,16 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1316
1227
|
end: endDate ? endDate.toISOString().slice(0, 10) : null
|
|
1317
1228
|
};
|
|
1318
1229
|
};
|
|
1230
|
+
const parseCalendarDate = useCallback((formattedDate) => parsePickerValue(formattedDate, fullIso ? DATE_RANGE_PICKER_FULL_ISO_FORMAT : DATE_RANGE_PICKER_DATE_FORMAT, (value) => DateTimeUtils.fromUTCISOToCalendarDate(parseIsoDate(value, { dateOnly: !fullIso }).toISOString())), [fullIso]);
|
|
1319
1231
|
const parseDateRange = (formattedRange) => {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
end: formattedRange.end ? DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.end) : null
|
|
1324
|
-
};
|
|
1325
|
-
const startDate = formattedRange.start ? /* @__PURE__ */ new Date(`${formattedRange.start}T00:00:00.000Z`) : null;
|
|
1326
|
-
const endDate = formattedRange.end ? /* @__PURE__ */ new Date(`${formattedRange.end}T00:00:00.000Z`) : null;
|
|
1327
|
-
const startZonedDateTime = startDate ? DateTimeUtils.fromLocalToZonedDateTime(startDate, "UTC") : null;
|
|
1328
|
-
const endZonedDateTime = endDate ? DateTimeUtils.fromLocalToZonedDateTime(endDate, "UTC") : null;
|
|
1232
|
+
const start = parseCalendarDate(formattedRange?.start);
|
|
1233
|
+
const end = parseCalendarDate(formattedRange?.end);
|
|
1234
|
+
if (!start && !end || !allowPartialRange && (!start || !end)) return null;
|
|
1329
1235
|
return {
|
|
1330
|
-
start
|
|
1331
|
-
end
|
|
1236
|
+
start,
|
|
1237
|
+
end
|
|
1332
1238
|
};
|
|
1333
1239
|
};
|
|
1334
|
-
const parseCalendarDate = useCallback((formattedDate) => {
|
|
1335
|
-
if (formattedDate == null) return null;
|
|
1336
|
-
if (fullIso) return DateTimeUtils.fromUTCISOToCalendarDate(formattedDate);
|
|
1337
|
-
const date = /* @__PURE__ */ new Date(`${formattedDate}T00:00:00.000Z`);
|
|
1338
|
-
const zonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(date, "UTC");
|
|
1339
|
-
return toCalendarDate(zonedDateTime);
|
|
1340
|
-
}, [fullIso]);
|
|
1341
1240
|
const dateLimits = useMemo(() => ({
|
|
1342
1241
|
minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
|
|
1343
1242
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
@@ -1391,7 +1290,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1391
1290
|
const startDateValue = relativeLabel ? null : parseCalendarDate(normalizedRange?.start ?? null);
|
|
1392
1291
|
const endDateValue = relativeLabel ? null : parseCalendarDate(normalizedRange?.end ?? null);
|
|
1393
1292
|
const hasProvidedRangeValue = mode === "relative" ? !!relativeLabel : !!(normalizedRange?.start || normalizedRange?.end);
|
|
1394
|
-
const as = resolveInputLayout(props.layout,
|
|
1293
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
1395
1294
|
const size = props.size ?? ui.input.size;
|
|
1396
1295
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
1397
1296
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
@@ -1399,7 +1298,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1399
1298
|
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
1400
1299
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
1401
1300
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
1402
|
-
isDisabled,
|
|
1301
|
+
isDisabled: isDisabled || props.isReadOnly,
|
|
1403
1302
|
size: todayIconButtonSize,
|
|
1404
1303
|
todayIconButtonComponent
|
|
1405
1304
|
});
|
|
@@ -1436,7 +1335,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1436
1335
|
dataIsRequired: props.isRequired,
|
|
1437
1336
|
dataIsDisabled: isDisabled,
|
|
1438
1337
|
dataDisabled: isDisabled,
|
|
1439
|
-
dataInvalid: !!props.error,
|
|
1338
|
+
dataInvalid: !!props.isInvalid || !!props.error,
|
|
1440
1339
|
dataHasSelection: hasProvidedRangeValue
|
|
1441
1340
|
},
|
|
1442
1341
|
onStaticInteract: renderRealInput,
|
|
@@ -1444,14 +1343,16 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1444
1343
|
staticPressTarget: "action",
|
|
1445
1344
|
actionContent: staticTodayIcon,
|
|
1446
1345
|
actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
|
|
1346
|
+
isClearable: props.isReadOnly ? false : props.isClearable,
|
|
1447
1347
|
showClear: hasProvidedRangeValue,
|
|
1448
1348
|
wrapContentAndTrailing: true,
|
|
1449
1349
|
contentAndTrailingClassName: "gap-2!",
|
|
1450
|
-
trailingClassName:
|
|
1350
|
+
trailingClassName: inputTrailingRowInsetClass,
|
|
1451
1351
|
action: showDropdown ? {
|
|
1452
1352
|
icon: ui.dateInput.calendarIcon,
|
|
1453
|
-
|
|
1454
|
-
|
|
1353
|
+
onPress: () => {},
|
|
1354
|
+
label: "",
|
|
1355
|
+
isDisabled: props.isReadOnly
|
|
1455
1356
|
} : void 0,
|
|
1456
1357
|
children: relativeLabel ? /* @__PURE__ */ jsx(Typography, {
|
|
1457
1358
|
size: "large",
|
|
@@ -1489,7 +1390,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1489
1390
|
onChange: (value) => props.onChange?.(formatDateRange(value))
|
|
1490
1391
|
});
|
|
1491
1392
|
};
|
|
1492
|
-
const
|
|
1393
|
+
const StandaloneDateRangePicker = ({ defaultValue, value, onChange, ...props }) => {
|
|
1493
1394
|
const [internalValue, setInternalValue] = useState(defaultValue ?? null);
|
|
1494
1395
|
return /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
1495
1396
|
...props,
|
|
@@ -1500,6 +1401,33 @@ const DateRangePickerComponent = ({ defaultValue, value, onChange, ...props }) =
|
|
|
1500
1401
|
}
|
|
1501
1402
|
});
|
|
1502
1403
|
};
|
|
1404
|
+
const ControlledDateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput, ...props }) => {
|
|
1405
|
+
const { field, ref, defaultValue: _defaultValue, ...innerProps } = props;
|
|
1406
|
+
const controlWithOptions = field.form;
|
|
1407
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
1408
|
+
control: field.form,
|
|
1409
|
+
name: field.name,
|
|
1410
|
+
onValueChange: field.onValueChange,
|
|
1411
|
+
onBlur: field.onBlur,
|
|
1412
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DateRangePickerInner, {
|
|
1413
|
+
...innerProps,
|
|
1414
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, toPickerElementRef(field.ref)),
|
|
1415
|
+
value: field.value ?? null,
|
|
1416
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
1417
|
+
onValueCommit: field.onValueCommit,
|
|
1418
|
+
onBlur: field.onBlur,
|
|
1419
|
+
isDirty,
|
|
1420
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
1421
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
1422
|
+
error: props.error ?? error?.message,
|
|
1423
|
+
fullIso,
|
|
1424
|
+
minValue,
|
|
1425
|
+
maxValue,
|
|
1426
|
+
renderStaticInput
|
|
1427
|
+
})
|
|
1428
|
+
});
|
|
1429
|
+
};
|
|
1430
|
+
const DateRangePickerComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledDateRangePicker, { ...props }) : /* @__PURE__ */ jsx(StandaloneDateRangePicker, { ...props });
|
|
1503
1431
|
const DateRangePicker = memo(DateRangePickerComponent);
|
|
1504
1432
|
//#endregion
|
|
1505
|
-
export {
|
|
1433
|
+
export { DateRangePicker as t };
|