@povio/ui 6.0.0-rc.12 → 6.0.0-rc.13
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 +469 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/{Accordion-ORBin0EZ.js → Accordion-gUW7u1Zn.js} +41 -41
- package/dist/Alert-DwnALnFY.d.ts +36 -0
- package/dist/AlertDialog-BcRiqY_n.d.ts +70 -0
- package/dist/Autocomplete-CV4Aa1Ok.js +319 -0
- package/dist/Autocomplete-DRwQxx0U.d.ts +123 -0
- package/dist/Badge-CO-ZsmbR.d.ts +67 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-APVu5TUd.js} +8 -8
- package/dist/BottomSheet-Be0HtQzP.d.ts +65 -0
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-NNB7ivkW.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-Bn3fqVYx.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-Cd75RPbS.js} +33 -17
- package/dist/{Button-C1YB5dOw.js → Button-BJJkLVNj.js} +1 -5
- package/dist/{Button-BaODzvZd.js → Button-CzEs3tcV.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-Hk8zm9q_.d.ts} +2 -2
- package/dist/ButtonBase-Cp1w00t2.d.ts +47 -0
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-aGz6DYum.js} +10 -18
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DN-i_b-_.js} +19 -17
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-CqmyDSND.js} +4 -4
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-CzKXZw_w.js} +35 -9
- package/dist/Checkbox-D32MOIhF.d.ts +49 -0
- package/dist/CheckboxCheckmark-DDU_Ie7-.js +42 -0
- package/dist/CheckboxGroup-B5Mn1G3u.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-BqWt09kZ.js} +75 -35
- package/dist/DatePicker-CmoVbapu.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-DQewd1By.js} +80 -41
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-B9VnExeA.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-Bp9ZIN5E.js} +37 -26
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-DRZ1hLlR.js} +86 -158
- package/dist/DateRangePicker-LX1VJlnD.d.ts +102 -0
- package/dist/DateTimePicker-D9pODhAj.d.ts +83 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-DWtKPaE6.js} +70 -35
- package/dist/{Dialog-C9H9_BmK.js → Dialog-BJ13KRQo.js} +1 -1
- package/dist/{Dialog-DN5703sy.js → Dialog-BzQYDPJ9.js} +23 -19
- package/dist/Dialog-D0SeePPz.d.ts +66 -0
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-Bjm5IOpg.js} +1 -1
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-DTr7b-XO.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-DrshB60h.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-DxGA0yvx.js} +14 -8
- package/dist/FileInput-Bokcp9nH.d.ts +61 -0
- package/dist/{FileInput-BUwtAF2-.js → FileInput-LMhFxlqB.js} +75 -80
- package/dist/FileUpload-BqXd4_nz.d.ts +181 -0
- package/dist/FileUpload-CJZrkr_U.js +679 -0
- package/dist/{FormField-dduTMkNH.js → FormField-TI8Vx5aC.js} +10 -10
- package/dist/FormField-XQbjfGSv.d.ts +70 -0
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DB7KrrcD.js +22 -0
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-CQLHX8-Y.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CjDUsi2I.js} +1 -1
- package/dist/{Input-CG5LQ0zs.js → Input-CeRJeAoR.js} +94 -59
- package/dist/Input-onUj0DKg.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B8OCdbVP.js} +15 -13
- package/dist/InputContent-D5ZkB9hO.d.ts +39 -0
- package/dist/Link-BdnWVYL9.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-gR4iSV7N.js} +3 -3
- package/dist/{Modal-DcLWF9cB.js → Modal-DAMsCwzb.js} +1 -1
- package/dist/{NumberField-DxuikBcr.js → NumberField-6Q9LHGSo.js} +91 -62
- package/dist/NumberField-Sb30Qao3.d.ts +41 -0
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BDSkcHVJ.js} +152 -101
- package/dist/NumberRangeInput-Dvq8mOUY.d.ts +89 -0
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-eJk6GNK6.d.ts} +6 -5
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-BcHpV0Ie.js} +6 -6
- package/dist/PasswordInput-VHzP4VPU.d.ts +16 -0
- package/dist/Popover-qplPGDnR.d.ts +51 -0
- package/dist/Progress-DH-w99MU.d.ts +26 -0
- package/dist/Progress-WzWvbvtp.js +180 -0
- package/dist/ProgressBar-BsSimmJF.js +46 -0
- package/dist/RadioGroup-CC8bKtBN.d.ts +52 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-PKqFHoKP.js} +66 -26
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DqCTlIuy.js} +12 -10
- package/dist/Select-CSyfDyxG.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-D3fuXwVt.js} +435 -184
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-DqAxkT1f.js} +46 -37
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-BGl_PIsH.js} +280 -363
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-CdtK2M-C.d.ts} +31 -17
- package/dist/{Slider-DCsCCPFx.js → Slider-BCUiALjE.js} +69 -12
- package/dist/Slider-DxalZD3o.d.ts +57 -0
- package/dist/Spinner-BTrEbNFy.d.ts +13 -0
- package/dist/SplitButton-Dv5l8p5t.d.ts +25 -0
- package/dist/Stepper-B1IOUcSI.d.ts +49 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-DA2G546I.js} +116 -88
- package/dist/{Switch-BfpSMMpv.js → Switch-Ce-bJOVw.js} +54 -12
- package/dist/Switch-urNrop0P.d.ts +42 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-Cweij8He.js} +44 -33
- package/dist/TabsFilters-M5Ld7eb8.d.ts +59 -0
- package/dist/Tag-BKR1AZFa.d.ts +26 -0
- package/dist/TextArea-D7YVclaz.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-P8F0oD_A.js} +59 -32
- package/dist/TimePicker-Ai1M2TGW.d.ts +63 -0
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-l4Ysk2AX.js} +99 -50
- package/dist/{TimePickerForm-DD9VA_td.js → TimePickerForm-BMqNpDPT.js} +5 -5
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-BeklfvlK.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-DWw53pTt.d.ts} +2 -2
- package/dist/ToggleGroup-BQk3k0at.d.ts +95 -0
- package/dist/ToggleGroup-BdIgqoqA.js +500 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-BkXPEBqw.js} +2 -2
- package/dist/Tooltip-H8OB7CqY.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-ubbBHHVD.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-Cx1oRGxd.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-BpoxNggB.js} +20 -22
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-Dyy_RUZU.d.ts} +1 -1
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- 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 +159 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +4 -4
- 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 +29 -26
- 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 +1 -1
- 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 +2 -2
- package/dist/components/style-definitions.js +33 -18
- 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 +1 -1
- 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-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-BflM4Vxg.js +93 -0
- package/dist/confirmation.context-C_js9qNv.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-DZOoWaZz.js} +63 -38
- 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-MH5ziWUe.js} +2 -2
- package/dist/form-field-Bw7U_ZPI.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-DM-PUcxQ.d.ts → i18n-B3PeqBM7.d.ts} +100 -4
- package/dist/{i18n-D8vXIoiq.js → i18n-DQs7jPjv.js} +99 -9
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-C73fI3WD.js} +2 -2
- package/dist/index.d.ts +64 -83
- package/dist/index.js +55 -90
- 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/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BcBuP9ZT.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-D6L1c2wq.d.ts +2157 -0
- package/dist/{logger-CqZjM-sn.js → logger-CW24po62.js} +10 -1
- 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/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BYk1tcxs.js} +43 -13
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack-ABeiJISz.js +10 -0
- package/dist/tanstack-bLXoUPDY.d.ts +165 -0
- package/dist/tanstack.d.ts +64 -83
- package/dist/tanstack.js +55 -90
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-C3oA7He3.js} +8 -8
- package/dist/toast.runtime-BHXdSTXV.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/uiConfig.context-CN_QgxGO.d.ts +19 -0
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-CjnLnQOo.js} +5 -7
- package/dist/{uiConfig.context-BnCORTNm.d.ts → uiConfig.types-B0sPL7nN.d.ts} +34 -34
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-CQgkDfjW.js} +140 -35
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-BrJrvp9_.js} +5 -1
- package/dist/useBreakpoint-D-SVcBeQ.d.ts +9 -0
- package/dist/useDebounceCallback-BjePw6y4.js +90 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BN-zueci.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-B7qGzySj.js} +103 -2
- package/dist/useRemoveButton-B6-IGvpY.js +98 -0
- package/dist/useResolveDateRangePreset-C_L-doA6.js +26 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-C8chM7c-.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/{useTableColumnConfig-CXYgj5xi.js → useTableColumnConfig-B9cYBKo3.js} +956 -535
- package/dist/useTableNav-rP1wDkhV.d.ts +372 -0
- package/dist/useToast-D2C9pROU.d.ts +78 -0
- package/dist/useToast-DSoOiSw0.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/llms.txt +3116 -0
- package/package.json +13 -121
- 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/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/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/useTableNav-BusSFEVC.d.ts +0 -197
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { an as InputVariantProps, dn as CheckboxVariantProps } from "./link.cva-D6L1c2wq.js";
|
|
2
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { r as FormFieldProps } from "./FormField-XQbjfGSv.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 { ReactElement, Ref } from "react";
|
|
7
|
+
import { CheckboxGroupProps, Key } from "react-aria-components";
|
|
8
|
+
//#region src/components/inputs/Checkbox/CheckboxGroup.d.ts
|
|
9
|
+
/** One choice of a `CheckboxGroup`. */
|
|
10
|
+
interface CheckboxGroupItem<TKey extends Key = Key> {
|
|
11
|
+
/** The entry the group's value holds while this choice is checked. */
|
|
12
|
+
id: TKey;
|
|
13
|
+
label: string | ReactElement;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface CheckboxGroupFieldProps extends Omit<FormFieldProps, "variant">, CheckboxVariantProps, Omit<InputVariantProps, "variant">, Omit<CheckboxGroupProps, "children" | "className" | "defaultValue" | "label" | "onChange" | "value" | UnsupportedAriaFieldProps> {
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
/** Marks the field as changed; only sets `data-is-dirty` for styling. Filled in automatically when bound with `field`. */
|
|
19
|
+
isDirty?: boolean;
|
|
20
|
+
inputClassName?: string;
|
|
21
|
+
labelClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
interface CheckboxGroupItemsProps<TKey extends Key> {
|
|
24
|
+
/** The choices. `value` and `onChange` use arrays of their `id`s. */
|
|
25
|
+
items: readonly CheckboxGroupItem<TKey>[];
|
|
26
|
+
/** @deprecated Use `items`. */
|
|
27
|
+
options?: Removed<"Use `items`: { id, label }[]">;
|
|
28
|
+
}
|
|
29
|
+
interface CheckboxGroupValueProps<TKey extends Key> {
|
|
30
|
+
/** The value that stands for "everything checked"; `onChange` emits it instead of the full list of ids. */
|
|
31
|
+
allValue?: TKey[] | null;
|
|
32
|
+
/** The `id`s of the checked items. */
|
|
33
|
+
value?: TKey[] | null;
|
|
34
|
+
defaultValue?: TKey[] | null;
|
|
35
|
+
onChange?: (value: TKey[] | null) => void;
|
|
36
|
+
}
|
|
37
|
+
interface CheckboxGroupBaseProps<TKey extends Key = Key> extends CheckboxGroupFieldProps, CheckboxGroupItemsProps<TKey>, CheckboxGroupValueProps<TKey> {}
|
|
38
|
+
/** Props for a `CheckboxGroup` that owns its value through `value`/`defaultValue`/`onChange`. */
|
|
39
|
+
interface StandaloneCheckboxGroupProps<TKey extends Key = Key> extends CheckboxGroupBaseProps<TKey> {
|
|
40
|
+
field?: never;
|
|
41
|
+
}
|
|
42
|
+
type FieldKey<TKey extends Key> = TKey extends string ? string : TKey extends number ? number : TKey;
|
|
43
|
+
/** Props for a `CheckboxGroup` bound to a form field; the form owns the value, change, and blur handling. */
|
|
44
|
+
type ControlledCheckboxGroupProps<TKey extends Key = Key, TFieldValues extends FieldValues = FieldValues> = FormControlProps<CheckboxGroupFieldProps & CheckboxGroupValueProps<FieldKey<TKey>> & {
|
|
45
|
+
field?: never;
|
|
46
|
+
}, TFieldValues, "value", "an array of item ids"> & CheckboxGroupItemsProps<TKey>;
|
|
47
|
+
/** Props for `CheckboxGroup`: either its own value props, or `field={{ form, name }}` to bind a form field. */
|
|
48
|
+
type CheckboxGroupProps$1<TKey extends Key = Key, TFieldValues extends FieldValues = FieldValues> = StandaloneCheckboxGroupProps<TKey> | ControlledCheckboxGroupProps<TKey, TFieldValues>;
|
|
49
|
+
declare const CheckboxGroupComponent: <TKey extends Key = Key, TFieldValues extends FieldValues = FieldValues>(props: CheckboxGroupProps$1<TKey, TFieldValues>) => import("react").JSX.Element;
|
|
50
|
+
declare const CheckboxGroup: typeof CheckboxGroupComponent;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { StandaloneCheckboxGroupProps as a, ControlledCheckboxGroupProps as i, CheckboxGroupItem as n, CheckboxGroupProps$1 as r, CheckboxGroup as t };
|
|
@@ -1,11 +1,14 @@
|
|
|
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 CheckboxBase, r as $ed8ccb2e23e76301$export$4aa08d5625cb8ead } from "./Checkbox-
|
|
4
|
-
import { t as UIConfig } from "./uiConfig.context-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { t as
|
|
3
|
+
import { n as CheckboxBase, r as $ed8ccb2e23e76301$export$4aa08d5625cb8ead } from "./Checkbox-CzKXZw_w.js";
|
|
4
|
+
import { t as UIConfig } from "./uiConfig.context-CjnLnQOo.js";
|
|
5
|
+
import { n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
6
|
+
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
7
|
+
import { a as checkboxGroupLabelDefinition, n as checkboxContentRowDefinition, r as checkboxContentWrapperDefinition } from "./checkbox.cva-qU_q0lSX.js";
|
|
8
|
+
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
9
|
+
import { n as FormFieldLabel, t as FormField } from "./FormField-TI8Vx5aC.js";
|
|
10
|
+
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-mm1dnfKP.js";
|
|
11
|
+
import { n as resolveInputLayout, t as isFieldHeaderHiddenByLayout } from "./inputLayout-CIVpuUBq.js";
|
|
9
12
|
import { memo } from "react";
|
|
10
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
import { useLabel } from "@react-aria/label";
|
|
@@ -17,33 +20,41 @@ const CheckboxGroupBase = (props) => {
|
|
|
17
20
|
const checkboxGroupLabelCva = UIOverrides.useCva("checkbox.groupLabelCva", checkboxGroupLabelDefinition);
|
|
18
21
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
19
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
20
|
-
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName,
|
|
21
|
-
const as = resolveInputLayout(layoutProp,
|
|
23
|
+
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, error, isInvalid: isInvalidProp, className, items, allValue, value, defaultValue, onChange, onBlur, layout: layoutProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
|
|
24
|
+
const as = resolveInputLayout(layoutProp, ui.input.layout);
|
|
22
25
|
const size = sizeProp ?? ui.input.size;
|
|
23
26
|
const variant = variantProp ?? ui.checkbox.variant;
|
|
24
27
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
25
|
-
const
|
|
28
|
+
const isInvalid = isInvalidProp || !!error;
|
|
29
|
+
const itemIds = items.map((item) => item.id);
|
|
26
30
|
const expandAllValue = (currentValue) => {
|
|
27
|
-
if (
|
|
28
|
-
if (
|
|
29
|
-
|
|
31
|
+
if (currentValue === void 0) return;
|
|
32
|
+
if (currentValue === null) return allValue === null ? itemIds : [];
|
|
33
|
+
if (allValue !== void 0 && allValue !== null) {
|
|
34
|
+
if (currentValue.length === allValue.length && currentValue.every((item, index) => item === allValue[index])) return itemIds;
|
|
30
35
|
}
|
|
31
|
-
return currentValue
|
|
36
|
+
return currentValue;
|
|
32
37
|
};
|
|
33
|
-
const resolvedValue = expandAllValue(value);
|
|
34
|
-
const resolvedDefaultValue = expandAllValue(defaultValue);
|
|
38
|
+
const resolvedValue = expandAllValue(value)?.map(String);
|
|
39
|
+
const resolvedDefaultValue = expandAllValue(defaultValue)?.map(String);
|
|
35
40
|
const selectedValue = resolvedValue ?? resolvedDefaultValue;
|
|
36
41
|
const shouldRenderInputFrame = as !== "default";
|
|
37
42
|
const { labelProps, fieldProps } = useLabel({ label });
|
|
43
|
+
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
44
|
+
describedBy: rest["aria-describedby"],
|
|
45
|
+
error,
|
|
46
|
+
helperText
|
|
47
|
+
});
|
|
38
48
|
const formFieldProps = {
|
|
39
49
|
className,
|
|
40
50
|
error,
|
|
51
|
+
errorMessageId,
|
|
41
52
|
errorClassName,
|
|
42
53
|
headerClassName,
|
|
43
54
|
helperText,
|
|
44
|
-
|
|
55
|
+
helperTextId,
|
|
56
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
45
57
|
isDisabled,
|
|
46
|
-
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
47
58
|
isRequired,
|
|
48
59
|
label,
|
|
49
60
|
rightContent,
|
|
@@ -53,7 +64,7 @@ const CheckboxGroupBase = (props) => {
|
|
|
53
64
|
className: headerClassName,
|
|
54
65
|
helperText,
|
|
55
66
|
isDisabled,
|
|
56
|
-
isHeaderHidden: hideLabel
|
|
67
|
+
isHeaderHidden: hideLabel,
|
|
57
68
|
isRequired,
|
|
58
69
|
label,
|
|
59
70
|
labelProps,
|
|
@@ -61,26 +72,29 @@ const CheckboxGroupBase = (props) => {
|
|
|
61
72
|
tooltipText
|
|
62
73
|
};
|
|
63
74
|
const handleChange = (nextValue) => {
|
|
64
|
-
const
|
|
65
|
-
|
|
75
|
+
const nextIds = itemIds.filter((itemId) => nextValue.includes(String(itemId)));
|
|
76
|
+
const hasAllOptions = allValue !== void 0 && itemIds.length > 0 && nextIds.length === itemIds.length;
|
|
77
|
+
onChange?.(hasAllOptions ? allValue : nextIds);
|
|
66
78
|
};
|
|
67
79
|
return /* @__PURE__ */ jsx($ed8ccb2e23e76301$export$4aa08d5625cb8ead, {
|
|
68
80
|
...rest,
|
|
69
81
|
...fieldProps,
|
|
82
|
+
"aria-describedby": describedBy,
|
|
70
83
|
ref,
|
|
71
84
|
value: resolvedValue,
|
|
72
85
|
defaultValue: resolvedDefaultValue,
|
|
73
86
|
onChange: handleChange,
|
|
74
87
|
onBlur,
|
|
75
88
|
isDisabled,
|
|
76
|
-
isInvalid
|
|
89
|
+
isInvalid,
|
|
77
90
|
isRequired,
|
|
91
|
+
validationBehavior: "aria",
|
|
78
92
|
"data-is-dirty": isDirty || void 0,
|
|
79
93
|
"data-is-required": isRequired || void 0,
|
|
80
94
|
className: "group",
|
|
81
95
|
children: /* @__PURE__ */ jsx(FormField, {
|
|
82
96
|
...formFieldProps,
|
|
83
|
-
as,
|
|
97
|
+
layout: as,
|
|
84
98
|
labelProps,
|
|
85
99
|
className: clsx("w-full", as === "inline" && "h-full", className),
|
|
86
100
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
@@ -88,23 +102,23 @@ const CheckboxGroupBase = (props) => {
|
|
|
88
102
|
children: /* @__PURE__ */ jsx("div", {
|
|
89
103
|
className: clsx("group/checkbox-group-content relative", shouldRenderInputFrame && inputBaseCva({
|
|
90
104
|
variant: ui.input.variant,
|
|
91
|
-
as
|
|
105
|
+
layout: as
|
|
92
106
|
}), inputClassName),
|
|
93
107
|
"data-rac": "",
|
|
94
108
|
"data-disabled": isDisabled || void 0,
|
|
95
109
|
"data-is-disabled": isDisabled || void 0,
|
|
96
|
-
"data-invalid":
|
|
110
|
+
"data-invalid": isInvalid || void 0,
|
|
97
111
|
"data-has-selection": selectedValue?.length ? true : void 0,
|
|
98
112
|
"data-checkbox-group-content": "",
|
|
99
113
|
children: /* @__PURE__ */ jsxs("div", {
|
|
100
114
|
className: clsx(checkboxContentWrapperCva({
|
|
101
115
|
variant,
|
|
102
|
-
as,
|
|
116
|
+
layout: as,
|
|
103
117
|
size,
|
|
104
118
|
hasInputFrame: shouldRenderInputFrame,
|
|
105
119
|
...rest
|
|
106
120
|
}), shouldRenderInputFrame && as !== "floating" && inputSizeCva({
|
|
107
|
-
as,
|
|
121
|
+
layout: as,
|
|
108
122
|
size
|
|
109
123
|
})),
|
|
110
124
|
"data-is-dirty": isDirty || void 0,
|
|
@@ -113,29 +127,55 @@ const CheckboxGroupBase = (props) => {
|
|
|
113
127
|
...headerProps,
|
|
114
128
|
as: as === "floating" ? "filter" : as,
|
|
115
129
|
size,
|
|
116
|
-
className: clsx(headerClassName, checkboxGroupLabelCva({ as }))
|
|
130
|
+
className: clsx(headerClassName, checkboxGroupLabelCva({ layout: as }))
|
|
117
131
|
}), /* @__PURE__ */ jsx("div", {
|
|
118
132
|
className: checkboxContentRowCva({
|
|
119
133
|
variant,
|
|
120
|
-
as,
|
|
134
|
+
layout: as,
|
|
121
135
|
hasInputFrame: shouldRenderInputFrame,
|
|
122
136
|
...rest
|
|
123
137
|
}),
|
|
124
|
-
children:
|
|
125
|
-
value:
|
|
138
|
+
children: items.map((item) => /* @__PURE__ */ jsx(CheckboxBase, {
|
|
139
|
+
value: String(item.id),
|
|
140
|
+
isDisabled: item.isDisabled,
|
|
126
141
|
variant,
|
|
127
|
-
hideLabel,
|
|
142
|
+
hideLabel: false,
|
|
128
143
|
hideError: true,
|
|
144
|
+
"aria-describedby": describedBy,
|
|
145
|
+
"aria-errormessage": errorMessageId,
|
|
129
146
|
labelClassName,
|
|
130
|
-
children:
|
|
131
|
-
},
|
|
147
|
+
children: item.label
|
|
148
|
+
}, item.id))
|
|
132
149
|
})]
|
|
133
150
|
})
|
|
134
151
|
})
|
|
135
152
|
})
|
|
136
153
|
});
|
|
137
154
|
};
|
|
138
|
-
const
|
|
155
|
+
const ControlledCheckboxGroup = (props) => {
|
|
156
|
+
const { field, ref, ...innerProps } = props;
|
|
157
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
158
|
+
control: field.form,
|
|
159
|
+
name: field.name,
|
|
160
|
+
onValueChange: field.onValueChange,
|
|
161
|
+
onBlur: field.onBlur,
|
|
162
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(CheckboxGroupBase, {
|
|
163
|
+
...innerProps,
|
|
164
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
165
|
+
value: field.value === void 0 ? [] : field.value,
|
|
166
|
+
onChange: (value) => {
|
|
167
|
+
field.onChange(value);
|
|
168
|
+
field.onValueCommit();
|
|
169
|
+
},
|
|
170
|
+
onBlur: field.onBlur,
|
|
171
|
+
name: field.name,
|
|
172
|
+
isDirty,
|
|
173
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
174
|
+
error: props.error ?? error?.message
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const CheckboxGroupComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledCheckboxGroup, { ...props }) : /* @__PURE__ */ jsx(CheckboxGroupBase, { ...props });
|
|
139
179
|
const CheckboxGroup = memo(CheckboxGroupComponent);
|
|
140
180
|
//#endregion
|
|
141
|
-
export {
|
|
181
|
+
export { CheckboxGroup as t };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { an as InputVariantProps } from "./link.cva-D6L1c2wq.js";
|
|
2
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { r as FormFieldProps } from "./FormField-XQbjfGSv.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-B9VnExeA.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-CjnLnQOo.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-TI8Vx5aC.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-Bp9ZIN5E.js";
|
|
10
|
+
import { c as parseIsoDate, i as getStaticDateTimeFocusTarget, l as parsePickerValue, o as DateTimeDialogFooter, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-BYk1tcxs.js";
|
|
11
|
+
import { n as preloadCalendar, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar.lazy-CqmyDSND.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-ubbBHHVD.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,7 +80,10 @@ 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;
|
|
84
89
|
const dialogState = $28aae683a942e141$export$87194bb378cc3ac2({
|
|
@@ -132,7 +137,7 @@ const DatePickerBase = (props) => {
|
|
|
132
137
|
helperText,
|
|
133
138
|
isRequired,
|
|
134
139
|
rightContent,
|
|
135
|
-
isHeaderHidden: hideLabel
|
|
140
|
+
isHeaderHidden: hideLabel,
|
|
136
141
|
isDisabled,
|
|
137
142
|
className: headerClassName,
|
|
138
143
|
labelProps
|
|
@@ -208,7 +213,7 @@ const DatePickerBase = (props) => {
|
|
|
208
213
|
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
209
214
|
children: /* @__PURE__ */ jsxs(FormField, {
|
|
210
215
|
...formFieldProps,
|
|
211
|
-
as,
|
|
216
|
+
layout: as,
|
|
212
217
|
labelProps,
|
|
213
218
|
className: clsx("group relative flex w-full flex-col text-left", className),
|
|
214
219
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
@@ -221,7 +226,7 @@ const DatePickerBase = (props) => {
|
|
|
221
226
|
...groupProps,
|
|
222
227
|
"aria-describedby": accessibility.describedBy,
|
|
223
228
|
"aria-errormessage": accessibility.errorMessageId,
|
|
224
|
-
"aria-invalid":
|
|
229
|
+
"aria-invalid": isInvalid
|
|
225
230
|
},
|
|
226
231
|
fieldProps: {
|
|
227
232
|
...fieldProps,
|
|
@@ -238,9 +243,10 @@ const DatePickerBase = (props) => {
|
|
|
238
243
|
isDirty,
|
|
239
244
|
isRequired,
|
|
240
245
|
isDisabled,
|
|
246
|
+
isReadOnly: rest.isReadOnly,
|
|
241
247
|
disableManualEntry,
|
|
242
248
|
autoFixYear,
|
|
243
|
-
isInvalid
|
|
249
|
+
isInvalid,
|
|
244
250
|
disableDropdown,
|
|
245
251
|
variant,
|
|
246
252
|
size,
|
|
@@ -269,7 +275,7 @@ const DatePickerBase = (props) => {
|
|
|
269
275
|
label,
|
|
270
276
|
triggerRef: datePickerRef,
|
|
271
277
|
dialogProps,
|
|
272
|
-
isOpen: state.isOpen,
|
|
278
|
+
isOpen: state.isOpen && !rest.isReadOnly,
|
|
273
279
|
onOpenChange,
|
|
274
280
|
children: /* @__PURE__ */ jsx(Calendar, {
|
|
275
281
|
showWeekNumbers,
|
|
@@ -285,12 +291,21 @@ const DatePickerBase = (props) => {
|
|
|
285
291
|
})
|
|
286
292
|
});
|
|
287
293
|
};
|
|
288
|
-
const
|
|
294
|
+
const DATE_PICKER_FULL_ISO_FORMAT = {
|
|
295
|
+
component: "DatePicker",
|
|
296
|
+
expected: "an ISO date or timestamp, e.g. 2025-03-04T00:00:00.000Z"
|
|
297
|
+
};
|
|
298
|
+
const DATE_PICKER_DATE_FORMAT = {
|
|
299
|
+
component: "DatePicker (fullIso={false})",
|
|
300
|
+
expected: "a YYYY-MM-DD date"
|
|
301
|
+
};
|
|
302
|
+
const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granularity: granularityProp, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
289
303
|
const ui = UIConfig.useConfig();
|
|
304
|
+
const granularity = granularityProp ?? ui.dateInput.granularity;
|
|
290
305
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
291
306
|
const { locale } = useLocale();
|
|
292
307
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
293
|
-
const [renderInput, setRenderInput] = useState(
|
|
308
|
+
const [renderInput, setRenderInput] = useState(() => shouldRenderInputOnMount(renderStaticInput, ui.renderStaticInput, props.autoFocus));
|
|
294
309
|
const inputRef = useRef(null);
|
|
295
310
|
const { renderRealInput, replayStaticInputPress } = useStaticInputHandoff({
|
|
296
311
|
inputRef,
|
|
@@ -321,16 +336,10 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
321
336
|
if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(normalizedDate);
|
|
322
337
|
return DateTimeUtils.fromDateValueToLocal(normalizedDate, "UTC").toISOString().slice(0, 10);
|
|
323
338
|
};
|
|
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]);
|
|
339
|
+
const parseCalendarDate = useCallback((formattedDate) => parsePickerValue(formattedDate, fullIso ? DATE_PICKER_FULL_ISO_FORMAT : DATE_PICKER_DATE_FORMAT, (value) => {
|
|
340
|
+
const date = parseIsoDate(value, { dateOnly: !fullIso });
|
|
341
|
+
return normalizeByGranularity(DateTimeUtils.fromUTCISOToCalendarDate(date.toISOString()));
|
|
342
|
+
}), [fullIso, normalizeByGranularity]);
|
|
334
343
|
const dateLimits = useMemo(() => ({
|
|
335
344
|
minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
|
|
336
345
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
@@ -340,8 +349,8 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
340
349
|
parseCalendarDate
|
|
341
350
|
]);
|
|
342
351
|
if (!renderInput) {
|
|
343
|
-
const dateValue =
|
|
344
|
-
const as = resolveInputLayout(props.layout,
|
|
352
|
+
const dateValue = parseCalendarDate(normalizedValue);
|
|
353
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
345
354
|
const size = props.size ?? ui.input.size;
|
|
346
355
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
347
356
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
@@ -349,7 +358,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
349
358
|
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
350
359
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
351
360
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
352
|
-
isDisabled,
|
|
361
|
+
isDisabled: isDisabled || props.isReadOnly,
|
|
353
362
|
size: todayIconButtonSize,
|
|
354
363
|
todayIconButtonComponent
|
|
355
364
|
});
|
|
@@ -385,7 +394,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
385
394
|
dataIsRequired: props.isRequired,
|
|
386
395
|
dataIsDisabled: isDisabled,
|
|
387
396
|
dataDisabled: isDisabled,
|
|
388
|
-
dataInvalid: !!props.error,
|
|
397
|
+
dataInvalid: !!props.isInvalid || !!props.error,
|
|
389
398
|
dataHasSelection: dateValue != null
|
|
390
399
|
},
|
|
391
400
|
onStaticInteract: renderRealInput,
|
|
@@ -393,14 +402,16 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
393
402
|
staticPressTarget: "action",
|
|
394
403
|
actionContent: staticTodayIcon,
|
|
395
404
|
actionContentPlacement: todayIconPlacement === "fieldLabel" ? "content-row" : "content-wrapper",
|
|
405
|
+
isClearable: props.isReadOnly ? false : props.isClearable,
|
|
396
406
|
showClear: dateValue != null,
|
|
397
407
|
wrapContentAndTrailing: true,
|
|
398
408
|
contentAndTrailingClassName: "gap-2!",
|
|
399
|
-
trailingClassName:
|
|
409
|
+
trailingClassName: inputTrailingRowInsetClass,
|
|
400
410
|
action: showDropdown ? {
|
|
401
411
|
icon: ui.dateInput.calendarIcon,
|
|
402
|
-
|
|
403
|
-
|
|
412
|
+
onPress: () => {},
|
|
413
|
+
label: "",
|
|
414
|
+
isDisabled: props.isReadOnly
|
|
404
415
|
} : void 0,
|
|
405
416
|
children: staticSegments
|
|
406
417
|
});
|
|
@@ -414,7 +425,7 @@ const DatePickerInner = ({ defaultValue: _defaultValue, fullIso = true, granular
|
|
|
414
425
|
onChange: (value) => props.onChange?.(formatCalendarDate(value))
|
|
415
426
|
});
|
|
416
427
|
};
|
|
417
|
-
const
|
|
428
|
+
const StandaloneDatePicker = ({ defaultValue, value, onChange, ...props }) => {
|
|
418
429
|
const [internalValue, setInternalValue] = useState(defaultValue ?? null);
|
|
419
430
|
return /* @__PURE__ */ jsx(DatePickerInner, {
|
|
420
431
|
...props,
|
|
@@ -425,6 +436,34 @@ const DatePickerComponent = ({ defaultValue, value, onChange, ...props }) => {
|
|
|
425
436
|
}
|
|
426
437
|
});
|
|
427
438
|
};
|
|
439
|
+
const ControlledDatePicker = ({ fullIso = true, granularity, minValue, maxValue, renderStaticInput, ...props }) => {
|
|
440
|
+
const { field, ref, ...innerProps } = props;
|
|
441
|
+
const controlWithOptions = field.form;
|
|
442
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
443
|
+
control: field.form,
|
|
444
|
+
name: field.name,
|
|
445
|
+
onValueChange: field.onValueChange,
|
|
446
|
+
onBlur: field.onBlur,
|
|
447
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DatePickerInner, {
|
|
448
|
+
...innerProps,
|
|
449
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, toPickerElementRef(field.ref)),
|
|
450
|
+
value: field.value ?? null,
|
|
451
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
452
|
+
onValueCommit: field.onValueCommit,
|
|
453
|
+
onBlur: field.onBlur,
|
|
454
|
+
isDirty,
|
|
455
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
456
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
457
|
+
error: props.error ?? error?.message,
|
|
458
|
+
fullIso,
|
|
459
|
+
granularity,
|
|
460
|
+
minValue,
|
|
461
|
+
maxValue,
|
|
462
|
+
renderStaticInput
|
|
463
|
+
})
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
const DatePickerComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledDatePicker, { ...props }) : /* @__PURE__ */ jsx(StandaloneDatePicker, { ...props });
|
|
428
467
|
const DatePicker = memo(DatePickerComponent);
|
|
429
468
|
//#endregion
|
|
430
|
-
export {
|
|
469
|
+
export { DatePicker as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
1
|
+
import "./link.cva-D6L1c2wq.js";
|
|
2
|
+
import { n as IconButtonProps } from "./IconButton-CQLHX8-Y.js";
|
|
3
|
+
import "./FormField-XQbjfGSv.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
|