@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
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
+
import { t as Checkbox } from "./Checkbox-E2bns_n0.js";
|
|
3
|
+
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
4
|
+
import "./i18n-DaIHnR2n.js";
|
|
5
|
+
import { t as Button } from "./Button-C1Jv1Plk.js";
|
|
6
|
+
import { v as getColumnDefId } from "./tanstack-table-M1M26UQJ.js";
|
|
7
|
+
import { t as DragHandleButton } from "./TableDragHandle-CXApnuUm.js";
|
|
8
|
+
import { DndProvider, SortableItem, SortableRows } from "./TableDnd-CG1yOlxh.js";
|
|
9
|
+
import { useMemo } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useTranslation } from "react-i18next";
|
|
12
|
+
//#region src/components/table/ColumnListContent.tsx
|
|
13
|
+
const getColumnId = (column) => getColumnDefId(column);
|
|
14
|
+
function ColumnListContent({ headingId, configColumns, visibleColumns, onVisibilityChange, onOrderChange, onReset, onDone, onDraggingChange }) {
|
|
15
|
+
const { t } = useTranslation("ui");
|
|
16
|
+
const allIds = useMemo(() => configColumns.map(getColumnId), [configColumns]);
|
|
17
|
+
const items = useMemo(() => configColumns.filter((column) => column.enableHiding !== false).map((column_0) => {
|
|
18
|
+
const id = getColumnId(column_0);
|
|
19
|
+
return {
|
|
20
|
+
id,
|
|
21
|
+
label: typeof column_0.header === "string" && column_0.header ? column_0.header : id,
|
|
22
|
+
visible: visibleColumns?.[id] ?? true
|
|
23
|
+
};
|
|
24
|
+
}), [configColumns, visibleColumns]);
|
|
25
|
+
const visibleCount = items.filter((item) => item.visible).length;
|
|
26
|
+
const handleToggle = (id_0, visible) => {
|
|
27
|
+
onVisibilityChange({
|
|
28
|
+
...visibleColumns,
|
|
29
|
+
[id_0]: visible
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const handleShowAll = () => {
|
|
33
|
+
onVisibilityChange(Object.fromEntries(items.map((item_0) => [item_0.id, true])));
|
|
34
|
+
};
|
|
35
|
+
const handleDragEnd = ({ active, over }) => {
|
|
36
|
+
onDraggingChange?.(false);
|
|
37
|
+
if (!over || active.id === over.id) return;
|
|
38
|
+
const listedIds = items.map((item_1) => item_1.id);
|
|
39
|
+
const oldIndex = listedIds.indexOf(String(active.id));
|
|
40
|
+
const newIndex = listedIds.indexOf(String(over.id));
|
|
41
|
+
if (oldIndex === -1 || newIndex === -1) return;
|
|
42
|
+
const [moved] = listedIds.splice(oldIndex, 1);
|
|
43
|
+
listedIds.splice(newIndex, 0, moved);
|
|
44
|
+
const listed = new Set(listedIds);
|
|
45
|
+
let nextListed = 0;
|
|
46
|
+
onOrderChange(allIds.map((id_1) => listed.has(id_1) ? listedIds[nextListed++] : id_1));
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
49
|
+
/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex flex-col gap-1.5 pr-6",
|
|
51
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
52
|
+
as: "h2",
|
|
53
|
+
id: headingId,
|
|
54
|
+
size: "h3",
|
|
55
|
+
className: "font-semibold text-foreground",
|
|
56
|
+
children: t(($) => $.ui.table.configureColumns)
|
|
57
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
58
|
+
size: "body",
|
|
59
|
+
className: "text-pretty text-muted-foreground",
|
|
60
|
+
children: t(($_0) => $_0.ui.table.configureColumnsDescription)
|
|
61
|
+
})]
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "flex flex-col gap-2",
|
|
65
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
66
|
+
className: "flex items-center justify-between",
|
|
67
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
68
|
+
size: "small",
|
|
69
|
+
className: "text-muted-foreground",
|
|
70
|
+
children: t(($_1) => $_1.ui.table.visibleCount, {
|
|
71
|
+
visible: visibleCount,
|
|
72
|
+
total: items.length
|
|
73
|
+
})
|
|
74
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
color: "secondary",
|
|
77
|
+
size: "sm",
|
|
78
|
+
width: "hug",
|
|
79
|
+
isDisabled: visibleCount === items.length,
|
|
80
|
+
onPress: handleShowAll,
|
|
81
|
+
children: t(($_2) => $_2.ui.table.showAll)
|
|
82
|
+
})]
|
|
83
|
+
}), /* @__PURE__ */ jsx(DndProvider, {
|
|
84
|
+
onDragStart: () => onDraggingChange?.(true),
|
|
85
|
+
onDragEnd: handleDragEnd,
|
|
86
|
+
onDragCancel: () => onDraggingChange?.(false),
|
|
87
|
+
children: /* @__PURE__ */ jsx(SortableRows, {
|
|
88
|
+
items: items.map((item_2) => item_2.id),
|
|
89
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
90
|
+
className: "max-h-96 overflow-y-auto rounded-lg border border-border",
|
|
91
|
+
children: items.map((item_3) => /* @__PURE__ */ jsx(SortableItem, {
|
|
92
|
+
id: item_3.id,
|
|
93
|
+
children: ({ ref, style, isDragging, handleProps }) => /* @__PURE__ */ jsxs("li", {
|
|
94
|
+
ref,
|
|
95
|
+
style,
|
|
96
|
+
className: clsx("flex h-11 items-center gap-2 border-b border-border bg-background pr-3 pl-1 last:border-b-0", isDragging && "shadow-md"),
|
|
97
|
+
children: [/* @__PURE__ */ jsx(DragHandleButton, {
|
|
98
|
+
handleProps,
|
|
99
|
+
label: t(($_3) => $_3.ui.table.reorderColumn, { column: item_3.label })
|
|
100
|
+
}), /* @__PURE__ */ jsx(Checkbox, {
|
|
101
|
+
isSelected: item_3.visible,
|
|
102
|
+
onChange: (isSelected) => handleToggle(item_3.id, isSelected),
|
|
103
|
+
hideError: true,
|
|
104
|
+
className: "flex-1 flex-row-reverse justify-between",
|
|
105
|
+
labelClassName: item_3.visible ? "text-foreground" : "text-muted-foreground",
|
|
106
|
+
children: item_3.label
|
|
107
|
+
})]
|
|
108
|
+
})
|
|
109
|
+
}, item_3.id))
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsxs("div", {
|
|
115
|
+
className: clsx("flex items-center gap-2", onReset ? "justify-between" : "justify-end"),
|
|
116
|
+
children: [onReset && /* @__PURE__ */ jsx(Button, {
|
|
117
|
+
variant: "ghost",
|
|
118
|
+
color: "secondary",
|
|
119
|
+
width: "hug",
|
|
120
|
+
onPress: onReset,
|
|
121
|
+
children: t(($_4) => $_4.ui.table.reset)
|
|
122
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
123
|
+
variant: "contained",
|
|
124
|
+
color: "primary",
|
|
125
|
+
width: "hug",
|
|
126
|
+
onPress: onDone,
|
|
127
|
+
children: t(($_5) => $_5.ui.table.done)
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
] });
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { ColumnListContent };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { an as InputVariantProps } from "./link.cva-ZhpQz3P0.js";
|
|
2
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { r as FormFieldProps } from "./FormField-BgiWLGjf.js";
|
|
4
|
+
import { i as FieldValues } from "./form.binding-DSXB2AOD.js";
|
|
5
|
+
import { n as UnsupportedAriaFieldProps, t as FormControlProps } from "./form.types-a2WVJDQX.js";
|
|
6
|
+
import { a as DatePickerTodayIconPlacement, i as DatePickerTodayIconButtonSize, n as DatePickerTodayIcon, r as DatePickerTodayIconButtonComponent, t as DatePickerInputHandle } from "./DatePickerInput-BCuz08Ws.js";
|
|
7
|
+
import { FocusEvent, Ref } from "react";
|
|
8
|
+
import { DatePickerStateOptions } from "react-stately";
|
|
9
|
+
import { CalendarDate, DateValue } from "@internationalized/date";
|
|
10
|
+
//#region src/components/inputs/DateTime/DatePicker/DatePicker.d.ts
|
|
11
|
+
type DatePickerGranularity = "day" | "month" | "year";
|
|
12
|
+
interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label" | "onBlur" | UnsupportedAriaFieldProps> {
|
|
13
|
+
"aria-describedby"?: string;
|
|
14
|
+
"aria-label"?: string;
|
|
15
|
+
"aria-labelledby"?: string;
|
|
16
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
17
|
+
/** Hides the picker button and popover so the value can only be typed. Ignored when manual entry is disabled. */
|
|
18
|
+
disableDropdown?: boolean;
|
|
19
|
+
/** Shows a clear button while the field has a value. Defaults to `UIConfig.input.isClearable`. */
|
|
20
|
+
isClearable?: boolean;
|
|
21
|
+
/** Keeps the clear button while the field is disabled. */
|
|
22
|
+
isClearableIfDisabled?: boolean;
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Shows ISO week numbers and starts weeks on Monday. Defaults to `UIConfig.dateInput.showWeekNumbers`. */
|
|
25
|
+
showWeekNumbers?: boolean;
|
|
26
|
+
/** Button that fills in today: true for the default icon, or an icon to use. Defaults to `UIConfig.dateInput.todayIcon`. */
|
|
27
|
+
todayIcon?: DatePickerTodayIcon;
|
|
28
|
+
/** Defaults to `UIConfig.dateInput.todayIconButtonSize`. */
|
|
29
|
+
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
30
|
+
/** Defaults to `UIConfig.dateInput.todayIconButtonComponent`. */
|
|
31
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
32
|
+
/** Renders the today button inside the field or next to its label. Defaults to `UIConfig.dateInput.todayIconPlacement`. */
|
|
33
|
+
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
34
|
+
/** Marks the value as changed for styling; set from the form state when bound with `field`. */
|
|
35
|
+
isDirty?: boolean;
|
|
36
|
+
/** Makes the segments read-only so the value can only be picked from the popover. Defaults to `UIConfig.dateInput.disableManualEntry`. */
|
|
37
|
+
disableManualEntry?: boolean;
|
|
38
|
+
/** On blur, fills a missing year with the current one and expands two-digit years. Defaults to `UIConfig.dateInput.autoFixYear`. */
|
|
39
|
+
autoFixYear?: boolean;
|
|
40
|
+
/** Replaces the segment placeholders while the field is empty. */
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
/** Classes for the bordered input box; `className` styles the field root. */
|
|
43
|
+
inputClassName?: string;
|
|
44
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
45
|
+
/** Runs after the user commits a value with the popover's Apply, the today button or the clear button. */
|
|
46
|
+
onValueCommit?: () => void;
|
|
47
|
+
/** Moves the draft selection when the month or year dropdown changes. Defaults to `UIConfig.dateInput.shouldUpdateDateOnMonthYearChange`. */
|
|
48
|
+
shouldUpdateDateOnMonthYearChange?: boolean;
|
|
49
|
+
/** Smallest unit that is picked; month and year values snap to the first day. Defaults to `UIConfig.dateInput.granularity`. */
|
|
50
|
+
granularity?: DatePickerGranularity;
|
|
51
|
+
/** Display pattern used while manual entry is disabled, built from `yyyy`, `MMM`, `MM`, `M`, `dd`, `d`, `HH`, `mm`, `ss`. Defaults to the locale format. */
|
|
52
|
+
format?: string;
|
|
53
|
+
}
|
|
54
|
+
interface StandaloneDatePickerProps extends Omit<DatePickerBaseProps, "value" | "onChange" | "defaultValue" | "minValue" | "maxValue" | "onValueCommit"> {
|
|
55
|
+
field?: never;
|
|
56
|
+
/** @deprecated The date and time pickers are not submitted through native `FormData`. */
|
|
57
|
+
name?: Removed<"The date and time pickers are not submitted with native FormData: bind them with field={{ form, name }}">;
|
|
58
|
+
/** Initial value in the fullIso format; used only when value is undefined. */
|
|
59
|
+
defaultValue?: string | null;
|
|
60
|
+
/** Controlled UTC-calendar date in the fullIso format; null clears the field. */
|
|
61
|
+
value?: string | null;
|
|
62
|
+
/** Emits UTC midnight ISO (fullIso=true) or YYYY-MM-DD (false), or null when cleared. */
|
|
63
|
+
onChange?: (value: string | null) => void;
|
|
64
|
+
/** Defaults to true: YYYY-MM-DDT00:00:00.000Z. False uses YYYY-MM-DD for inputs and outputs. */
|
|
65
|
+
fullIso?: boolean;
|
|
66
|
+
/** Earliest selectable date: a `DateValue`, or a string in the same format as `value`. */
|
|
67
|
+
minValue?: DateValue | string;
|
|
68
|
+
/** Latest selectable date: a `DateValue`, or a string in the same format as `value`. */
|
|
69
|
+
maxValue?: DateValue | string;
|
|
70
|
+
/** Renders a lightweight static field until first interaction. Defaults to `UIConfig.renderStaticInput`. */
|
|
71
|
+
renderStaticInput?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** Props for a `DatePicker` bound to a form field; the form owns the value, change, and blur handling. */
|
|
74
|
+
type ControlledDatePickerProps<TFieldValues extends FieldValues = FieldValues> = FormControlProps<StandaloneDatePickerProps, TFieldValues, "value", "an ISO date string">;
|
|
75
|
+
/** Props for `DatePicker`: either its own value props, or `field={{ form, name }}` to bind a form field. */
|
|
76
|
+
type DatePickerProps<TFieldValues extends FieldValues = FieldValues> = StandaloneDatePickerProps | ControlledDatePickerProps<TFieldValues>;
|
|
77
|
+
declare const DatePickerComponent: <TFieldValues extends FieldValues = FieldValues>(props: DatePickerProps<TFieldValues>) => import("react").JSX.Element;
|
|
78
|
+
declare const DatePicker: typeof DatePickerComponent;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { StandaloneDatePickerProps as i, DatePicker as n, DatePickerProps as r, ControlledDatePickerProps as t };
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { t as UIConfig } from "./uiConfig.context-
|
|
3
|
+
import { t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
4
|
+
import { n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
4
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
5
6
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
6
|
-
import { t as FormField } from "./FormField-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { i as getStaticDateTimeFocusTarget, o as DateTimeDialogFooter, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-
|
|
10
|
-
import { n as preloadCalendar, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar.lazy-
|
|
7
|
+
import { t as FormField } from "./FormField-DOZ7eXjA.js";
|
|
8
|
+
import { n as resolveInputLayout, t as isFieldHeaderHiddenByLayout } from "./inputLayout-CIVpuUBq.js";
|
|
9
|
+
import { a as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, n as toPickerElementRef, r as renderDatePickerTodayIcon, t as DatePickerInput } from "./DatePickerInput-CMEJmZSQ.js";
|
|
10
|
+
import { i as getStaticDateTimeFocusTarget, l as parseIsoDate, o as DateTimeDialogFooter, s as DateTimeDialog, t as getStaticCalendarDateSegments, u as parsePickerValue } from "./staticDateTimeSegments-BgUrcqXD.js";
|
|
11
|
+
import { n as preloadCalendar, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar.lazy-BY0kLoYH.js";
|
|
11
12
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
12
|
-
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-
|
|
13
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
13
|
+
import { t as datePickerInputContentRowDefinition } from "./datePickerInput.cva-CWkV2fut.js";
|
|
14
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-bvNpM6ku.js";
|
|
15
|
+
import { r as inputTrailingRowInsetClass } from "./inputRow.clsx-BbcaXVta.js";
|
|
14
16
|
import { t as normalizeDatePickerValue } from "./datePickerValue.utils-CkmPaD6I.js";
|
|
15
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
17
|
+
import { n as shouldRenderInputOnMount, r as useStaticInputHandoff } from "./useStaticInputHandoff-DrNFrvD7.js";
|
|
16
18
|
import { InputFrame } from "./components/input-frame.js";
|
|
17
19
|
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
-
import { createCalendar, getLocalTimeZone,
|
|
21
|
+
import { createCalendar, getLocalTimeZone, today } from "@internationalized/date";
|
|
20
22
|
import { useDatePicker, useLocale } from "react-aria";
|
|
21
23
|
//#region src/components/inputs/DateTime/DatePicker/DatePicker.tsx
|
|
22
24
|
const DatePickerBase = (props) => {
|
|
23
25
|
const ui = UIConfig.useConfig();
|
|
24
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName,
|
|
25
|
-
const as = resolveInputLayout(layoutProp,
|
|
26
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, layout: layoutProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, showWeekNumbers = ui.dateInput.showWeekNumbers, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, format, onValueCommit, ...rest } = props;
|
|
27
|
+
const as = resolveInputLayout(layoutProp, ui.input.layout);
|
|
26
28
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
27
29
|
const variant = variantProp ?? ui.input.variant;
|
|
28
30
|
const size = sizeProp ?? ui.input.size;
|
|
@@ -47,6 +49,7 @@ const DatePickerBase = (props) => {
|
|
|
47
49
|
if (granularity === "month") return date.set({ day: 1 });
|
|
48
50
|
return date;
|
|
49
51
|
}, [granularity]);
|
|
52
|
+
const isInvalid = !!rest.isInvalid || !!error;
|
|
50
53
|
const accessibility = useFieldAccessibility({
|
|
51
54
|
error,
|
|
52
55
|
helperText,
|
|
@@ -61,8 +64,7 @@ const DatePickerBase = (props) => {
|
|
|
61
64
|
helperText,
|
|
62
65
|
isRequired,
|
|
63
66
|
rightContent,
|
|
64
|
-
|
|
65
|
-
hideLabel,
|
|
67
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
66
68
|
isDisabled,
|
|
67
69
|
headerClassName,
|
|
68
70
|
errorClassName
|
|
@@ -78,9 +80,26 @@ const DatePickerBase = (props) => {
|
|
|
78
80
|
getContainer: () => datePickerInputRef.current?.getContainer?.() ?? null
|
|
79
81
|
}));
|
|
80
82
|
const handleBlur = (val) => {
|
|
81
|
-
onBlur?.({
|
|
83
|
+
onBlur?.({
|
|
84
|
+
type: "blur",
|
|
85
|
+
target: { value: val }
|
|
86
|
+
});
|
|
82
87
|
};
|
|
83
88
|
const normalizedValue = value ?? null;
|
|
89
|
+
const keepOutOfRangeEntry = ui.dateInput.keepOutOfRangeEntry;
|
|
90
|
+
const valueKey = normalizedValue?.toString() ?? null;
|
|
91
|
+
const [entry, setEntry] = useState(() => ({
|
|
92
|
+
valueKey,
|
|
93
|
+
value: normalizedValue,
|
|
94
|
+
blurred: false
|
|
95
|
+
}));
|
|
96
|
+
if (keepOutOfRangeEntry && entry.valueKey !== valueKey) setEntry({
|
|
97
|
+
valueKey,
|
|
98
|
+
value: normalizedValue,
|
|
99
|
+
blurred: false
|
|
100
|
+
});
|
|
101
|
+
const inputValue = keepOutOfRangeEntry && entry.valueKey === valueKey ? entry.value : normalizedValue;
|
|
102
|
+
const isInputOutOfRange = !!inputValue && !!(rest.minValue && inputValue.compare(rest.minValue) < 0 || rest.maxValue && inputValue.compare(rest.maxValue) > 0);
|
|
84
103
|
const dialogState = $28aae683a942e141$export$87194bb378cc3ac2({
|
|
85
104
|
...rest,
|
|
86
105
|
defaultValue: normalizedValue ?? rest.defaultValue ?? null,
|
|
@@ -90,12 +109,17 @@ const DatePickerBase = (props) => {
|
|
|
90
109
|
const state = $28aae683a942e141$export$87194bb378cc3ac2({
|
|
91
110
|
...rest,
|
|
92
111
|
shouldForceLeadingZeros,
|
|
93
|
-
value:
|
|
112
|
+
value: inputValue,
|
|
94
113
|
onChange: (val) => {
|
|
95
114
|
let normalizedValue = normalizeDatePickerValue(val);
|
|
96
115
|
if (val) normalizedValue = normalizeByGranularity(val);
|
|
116
|
+
if (keepOutOfRangeEntry) setEntry({
|
|
117
|
+
valueKey,
|
|
118
|
+
value: normalizedValue,
|
|
119
|
+
blurred: false
|
|
120
|
+
});
|
|
97
121
|
if (normalizedValue && (rest.minValue && normalizedValue < rest?.minValue || rest?.maxValue && normalizedValue > rest?.maxValue)) {
|
|
98
|
-
state.setValue(state.value);
|
|
122
|
+
if (!keepOutOfRangeEntry) state.setValue(state.value);
|
|
99
123
|
return;
|
|
100
124
|
}
|
|
101
125
|
onChange?.(normalizedValue);
|
|
@@ -132,7 +156,7 @@ const DatePickerBase = (props) => {
|
|
|
132
156
|
helperText,
|
|
133
157
|
isRequired,
|
|
134
158
|
rightContent,
|
|
135
|
-
isHeaderHidden: hideLabel
|
|
159
|
+
isHeaderHidden: hideLabel,
|
|
136
160
|
isDisabled,
|
|
137
161
|
className: headerClassName,
|
|
138
162
|
labelProps
|
|
@@ -162,6 +186,11 @@ const DatePickerBase = (props) => {
|
|
|
162
186
|
calendarState.setFocusedDate(todayValue);
|
|
163
187
|
};
|
|
164
188
|
const onInputClear = () => {
|
|
189
|
+
if (keepOutOfRangeEntry) setEntry({
|
|
190
|
+
valueKey,
|
|
191
|
+
value: null,
|
|
192
|
+
blurred: false
|
|
193
|
+
});
|
|
165
194
|
onChange?.(null);
|
|
166
195
|
dialogState.setValue(null);
|
|
167
196
|
onValueCommit?.();
|
|
@@ -208,7 +237,7 @@ const DatePickerBase = (props) => {
|
|
|
208
237
|
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
209
238
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
210
239
|
...formFieldProps,
|
|
211
|
-
as,
|
|
240
|
+
layout: as,
|
|
212
241
|
labelProps,
|
|
213
242
|
className: clsx("group relative flex w-full flex-col text-left", className),
|
|
214
243
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
@@ -221,26 +250,35 @@ const DatePickerBase = (props) => {
|
|
|
221
250
|
...groupProps,
|
|
222
251
|
"aria-describedby": accessibility.describedBy,
|
|
223
252
|
"aria-errormessage": accessibility.errorMessageId,
|
|
224
|
-
"aria-invalid":
|
|
253
|
+
"aria-invalid": isInvalid
|
|
225
254
|
},
|
|
226
255
|
fieldProps: {
|
|
227
256
|
...fieldProps,
|
|
228
257
|
"aria-describedby": accessibility.describedBy,
|
|
229
258
|
onBlur: (event) => {
|
|
230
259
|
fieldProps.onBlur?.(event);
|
|
231
|
-
|
|
260
|
+
if (!keepOutOfRangeEntry) {
|
|
261
|
+
handleBlur(state.value);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
setEntry((current) => ({
|
|
265
|
+
...current,
|
|
266
|
+
blurred: true
|
|
267
|
+
}));
|
|
268
|
+
if (!isInputOutOfRange) handleBlur(normalizedValue);
|
|
232
269
|
}
|
|
233
270
|
},
|
|
234
|
-
fieldValue:
|
|
271
|
+
fieldValue: inputValue,
|
|
235
272
|
isValueControlled: true,
|
|
236
|
-
hasValue:
|
|
273
|
+
hasValue: inputValue != null,
|
|
237
274
|
buttonProps,
|
|
238
275
|
isDirty,
|
|
239
276
|
isRequired,
|
|
240
277
|
isDisabled,
|
|
278
|
+
isReadOnly: rest.isReadOnly,
|
|
241
279
|
disableManualEntry,
|
|
242
280
|
autoFixYear,
|
|
243
|
-
isInvalid:
|
|
281
|
+
isInvalid: isInvalid || keepOutOfRangeEntry && entry.blurred && isInputOutOfRange,
|
|
244
282
|
disableDropdown,
|
|
245
283
|
variant,
|
|
246
284
|
size,
|
|
@@ -269,7 +307,7 @@ const DatePickerBase = (props) => {
|
|
|
269
307
|
label,
|
|
270
308
|
triggerRef: datePickerRef,
|
|
271
309
|
dialogProps,
|
|
272
|
-
isOpen: state.isOpen,
|
|
310
|
+
isOpen: state.isOpen && !rest.isReadOnly,
|
|
273
311
|
onOpenChange,
|
|
274
312
|
children: /* @__PURE__ */ jsx(Calendar, {
|
|
275
313
|
showWeekNumbers,
|
|
@@ -285,12 +323,21 @@ const DatePickerBase = (props) => {
|
|
|
285
323
|
})
|
|
286
324
|
});
|
|
287
325
|
};
|
|
288
|
-
const
|
|
326
|
+
const DATE_PICKER_FULL_ISO_FORMAT = {
|
|
327
|
+
component: "DatePicker",
|
|
328
|
+
expected: "an ISO date or timestamp, e.g. 2025-03-04T00:00:00.000Z"
|
|
329
|
+
};
|
|
330
|
+
const DATE_PICKER_DATE_FORMAT = {
|
|
331
|
+
component: "DatePicker (fullIso={false})",
|
|
332
|
+
expected: "a YYYY-MM-DD date"
|
|
333
|
+
};
|
|
334
|
+
const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granularity: granularityProp, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
289
335
|
const ui = UIConfig.useConfig();
|
|
336
|
+
const granularity = granularityProp ?? ui.dateInput.granularity;
|
|
290
337
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
291
338
|
const { locale } = useLocale();
|
|
292
339
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
293
|
-
const [renderInput, setRenderInput] = useState(
|
|
340
|
+
const [renderInput, setRenderInput] = useState(() => shouldRenderInputOnMount(renderStaticInput, ui.renderStaticInput, props.autoFocus));
|
|
294
341
|
const inputRef = useRef(null);
|
|
295
342
|
const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
|
|
296
343
|
inputRef,
|
|
@@ -321,16 +368,10 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
321
368
|
if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(normalizedDate);
|
|
322
369
|
return DateTimeUtils.fromDateValueToLocal(normalizedDate, "UTC").toISOString().slice(0, 10);
|
|
323
370
|
};
|
|
324
|
-
const parseCalendarDate = useCallback((formattedDate) => {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return normalizeByGranularity(parsedDate);
|
|
329
|
-
}
|
|
330
|
-
const date = /* @__PURE__ */ new Date(`${formattedDate}T00:00:00.000Z`);
|
|
331
|
-
const zonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(date, "UTC");
|
|
332
|
-
return normalizeByGranularity(toCalendarDate(zonedDateTime));
|
|
333
|
-
}, [fullIso, normalizeByGranularity]);
|
|
371
|
+
const parseCalendarDate = useCallback((formattedDate) => parsePickerValue(formattedDate, fullIso ? DATE_PICKER_FULL_ISO_FORMAT : DATE_PICKER_DATE_FORMAT, (value) => {
|
|
372
|
+
const date = parseIsoDate(value, { dateOnly: !fullIso });
|
|
373
|
+
return normalizeByGranularity(DateTimeUtils.fromUTCISOToCalendarDate(date.toISOString()));
|
|
374
|
+
}), [fullIso, normalizeByGranularity]);
|
|
334
375
|
const dateLimits = useMemo(() => ({
|
|
335
376
|
minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
|
|
336
377
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
@@ -340,8 +381,8 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
340
381
|
parseCalendarDate
|
|
341
382
|
]);
|
|
342
383
|
if (!renderInput) {
|
|
343
|
-
const dateValue =
|
|
344
|
-
const as = resolveInputLayout(props.layout,
|
|
384
|
+
const dateValue = parseCalendarDate(normalizedValue);
|
|
385
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
345
386
|
const size = props.size ?? ui.input.size;
|
|
346
387
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
347
388
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
@@ -349,7 +390,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
349
390
|
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
350
391
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
351
392
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
352
|
-
isDisabled,
|
|
393
|
+
isDisabled: isDisabled || props.isReadOnly,
|
|
353
394
|
size: todayIconButtonSize,
|
|
354
395
|
todayIconButtonComponent
|
|
355
396
|
});
|
|
@@ -385,7 +426,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
385
426
|
dataIsRequired: props.isRequired,
|
|
386
427
|
dataIsDisabled: isDisabled,
|
|
387
428
|
dataDisabled: isDisabled,
|
|
388
|
-
dataInvalid: !!props.error,
|
|
429
|
+
dataInvalid: !!props.isInvalid || !!props.error,
|
|
389
430
|
dataHasSelection: dateValue != null
|
|
390
431
|
},
|
|
391
432
|
onStaticInteract: renderRealInput,
|
|
@@ -393,14 +434,16 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
393
434
|
staticPressTarget: "action",
|
|
394
435
|
actionContent: staticTodayIcon,
|
|
395
436
|
actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
|
|
437
|
+
isClearable: props.isReadOnly ? false : props.isClearable,
|
|
396
438
|
showClear: dateValue != null,
|
|
397
439
|
wrapContentAndTrailing: true,
|
|
398
440
|
contentAndTrailingClassName: "gap-2!",
|
|
399
|
-
trailingClassName:
|
|
441
|
+
trailingClassName: inputTrailingRowInsetClass,
|
|
400
442
|
action: showDropdown ? {
|
|
401
443
|
icon: ui.dateInput.calendarIcon,
|
|
402
|
-
|
|
403
|
-
|
|
444
|
+
onPress: () => {},
|
|
445
|
+
label: "",
|
|
446
|
+
isDisabled: props.isReadOnly
|
|
404
447
|
} : void 0,
|
|
405
448
|
children: staticSegments
|
|
406
449
|
});
|
|
@@ -414,7 +457,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
414
457
|
onChange: (value) => props.onChange?.(formatCalendarDate(value))
|
|
415
458
|
});
|
|
416
459
|
};
|
|
417
|
-
const
|
|
460
|
+
const StandaloneDatePicker = ({ defaultValue, value, onChange, ...props }) => {
|
|
418
461
|
const [internalValue, setInternalValue] = useState(defaultValue ?? null);
|
|
419
462
|
return /* @__PURE__ */ jsx(DatePickerInner, {
|
|
420
463
|
...props,
|
|
@@ -425,6 +468,34 @@ const DatePickerComponent = ({ defaultValue, value, onChange, ...props }) => {
|
|
|
425
468
|
}
|
|
426
469
|
});
|
|
427
470
|
};
|
|
471
|
+
const ControlledDatePicker = ({ fullIso = true, granularity, minValue, maxValue, renderStaticInput, ...props }) => {
|
|
472
|
+
const { field, ref, ...innerProps } = props;
|
|
473
|
+
const controlWithOptions = field.form;
|
|
474
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
475
|
+
control: field.form,
|
|
476
|
+
name: field.name,
|
|
477
|
+
onValueChange: field.onValueChange,
|
|
478
|
+
onBlur: field.onBlur,
|
|
479
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DatePickerInner, {
|
|
480
|
+
...innerProps,
|
|
481
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, toPickerElementRef(field.ref)),
|
|
482
|
+
value: field.value ?? null,
|
|
483
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
484
|
+
onValueCommit: field.onValueCommit,
|
|
485
|
+
onBlur: field.onBlur,
|
|
486
|
+
isDirty,
|
|
487
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
488
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
489
|
+
error: props.error ?? error?.message,
|
|
490
|
+
fullIso,
|
|
491
|
+
granularity,
|
|
492
|
+
minValue,
|
|
493
|
+
maxValue,
|
|
494
|
+
renderStaticInput
|
|
495
|
+
})
|
|
496
|
+
});
|
|
497
|
+
};
|
|
498
|
+
const DatePickerComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledDatePicker, { ...props }) : /* @__PURE__ */ jsx(StandaloneDatePicker, { ...props });
|
|
428
499
|
const DatePicker = memo(DatePickerComponent);
|
|
429
500
|
//#endregion
|
|
430
|
-
export {
|
|
501
|
+
export { DatePicker as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import "./link.cva-ZhpQz3P0.js";
|
|
2
|
+
import { n as IconButtonProps } from "./IconButton-Bjjf5cQL.js";
|
|
3
|
+
import "./FormField-BgiWLGjf.js";
|
|
4
4
|
import { ReactNode, Ref } from "react";
|
|
5
5
|
import "react-aria";
|
|
6
6
|
//#region src/components/inputs/DateTime/shared/datePicker.types.d.ts
|