@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
package/README.md
CHANGED
|
@@ -2,19 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
React Aria components styled with shadcn/ui design tokens and Tailwind's default scales.
|
|
4
4
|
|
|
5
|
-
Upgrading
|
|
5
|
+
Upgrading from 5.x? Work through [Upgrading from 5.x](#upgrading-from-5x) at the end of this file.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
`bun add @povio/ui`
|
|
10
10
|
|
|
11
|
+
## For coding agents
|
|
12
|
+
|
|
13
|
+
The package ships `llms.txt` at its root (`node_modules/@povio/ui/llms.txt`, also resolvable as `@povio/ui/llms.txt`). It lists the import, naming, and prop conventions, then an index of every public import path (what it is for and its main exports), then one type-checked example per component or hook. Point agent instructions at that file rather than copying its content.
|
|
14
|
+
|
|
15
|
+
In this repository the sources are `src/llms/guide.md` and `src/llms/examples/<subpath>.tsx` (a `/` in a subpath is written `__`, e.g. `tanstack__form.tsx`). An example's index line is the first sentence of the JSDoc on its first export, so that sentence says what the entry is for. The package build fails when a public entry has neither an example nor a `reference` entry in `scripts/lib/build.d/75_llms.mjs`, or when an example lacks that JSDoc.
|
|
16
|
+
|
|
11
17
|
## Imports
|
|
12
18
|
|
|
13
19
|
Use component and feature subpaths in application code. Each subpath resolves to an isolated ESM entry and lets route-level bundlers retain only the component graph used by that route.
|
|
14
20
|
|
|
15
21
|
```tsx
|
|
16
22
|
import { Button } from "@povio/ui/button";
|
|
17
|
-
import {
|
|
23
|
+
import { Badge } from "@povio/ui/badge";
|
|
18
24
|
import { Dialog } from "@povio/ui/dialog";
|
|
19
25
|
import { Select } from "@povio/ui/select";
|
|
20
26
|
import { useForm } from "@povio/ui/tanstack/form";
|
|
@@ -22,21 +28,21 @@ import { Table } from "@povio/ui/tanstack/table";
|
|
|
22
28
|
import { RichTextEditor } from "@povio/ui/rich-text-editor";
|
|
23
29
|
```
|
|
24
30
|
|
|
25
|
-
TanStack Form is the supported form integration.
|
|
31
|
+
TanStack Form is the supported form integration. Every input has one component and one import path; form hooks come from `@povio/ui/tanstack/form`.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
An input is either standalone or bound to a form field, never both. Standalone, `Input` from `@povio/ui/input` accepts `value`/`onChange` or an uncontrolled `defaultValue`. Bound, the same component takes `field={{ form, name }}` and rejects top-level values, change/blur handlers, and defaults; initialize values through `useForm({ defaultValues })`. Boolean controls use `isSelected`/`onChange` and `defaultSelected` when standalone. Date/time controls use string values and defaults; number controls use numbers or null. Each input exports `Standalone<Name>Props` and `Controlled<Name>Props` next to the `<Name>Props` union; type a wrapper that forwards `value`/`onChange` with the standalone type.
|
|
28
34
|
|
|
29
35
|
Optional side effects belong inside the binding: `field={{ form, name: "name", onValueChange: value => ..., onBlur: () => ... }}`. Change callbacks receive the native control value after the raw form update; blur callbacks run after actual focus loss marks the field touched. Selection commits can validate/flush autosave without firing the blur callback. Form resets and programmatic setters do not call either callback.
|
|
30
36
|
|
|
31
|
-
`FileInput` binds native `File`/`File[]` values. `FileUpload`
|
|
37
|
+
`FileInput` binds native `File`/`File[]` values and uploads nothing. `FileUpload` uploads each selected file through `onUpload(file, { signal, onProgress })`, which resolves with the stored file's `{ id }`; its `value`, `defaultValue`, `onChange` and bound field all hold `UploadedFile[]` records (`{ id, name, size?, type?, url? }`), always an array. Pass a render function as `children` to draw custom content inside the drop zone (it receives `files`, `onRemove`, and `onCancel`); a `FileUpload` without a `label` renders no field header.
|
|
32
38
|
|
|
33
39
|
The broad `@povio/ui` and `@povio/ui/tanstack` entries remain for compatibility. They are not recommended for new application imports because they reconnect otherwise independent feature graphs.
|
|
34
40
|
|
|
35
|
-
Feature dependencies are optional peers. Install the matching packages when using date/calendar entries, `@povio/ui/tanstack/table
|
|
41
|
+
Feature dependencies are optional peers. Install the matching packages when using date/calendar entries, `@povio/ui/tanstack/table` or the rich text editor. `@tanstack/react-form` is a required peer: every input's `field` prop types come from it, even when an app only uses standalone inputs. `@povio/ui/ui-config` needs no optional peer. Basic components such as Button, Typography, and Dialog do not require table, drag-and-drop, calendar, or TipTap packages.
|
|
36
42
|
|
|
37
43
|
```tsx
|
|
38
44
|
import { useForm } from "@povio/ui/tanstack/form";
|
|
39
|
-
import { Input } from "@povio/ui/
|
|
45
|
+
import { Input } from "@povio/ui/input";
|
|
40
46
|
import { z } from "zod";
|
|
41
47
|
|
|
42
48
|
const schema = z.object({ name: z.string().min(1) });
|
|
@@ -55,11 +61,49 @@ function NameForm({ onSubmit }: { onSubmit: (values: z.output<typeof schema>) =>
|
|
|
55
61
|
}
|
|
56
62
|
```
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
## Deferred input activation
|
|
65
|
+
|
|
66
|
+
Inputs default to `renderStaticInput={true}` through `UIConfig.renderStaticInput`. This renders a lightweight field first and mounts the interactive React Aria control on hover, keyboard focus, or interaction. The handoff preserves focus and replays the initiating edit/action. It is a performance optimization, not read-only presentation; use `isReadOnly` for that.
|
|
67
|
+
|
|
68
|
+
An input with `autoFocus` mounts its interactive control at once and focuses it once, after mount. Use `renderStaticInput={false}` when code needs imperative access through the input ref right after mount. `TextArea`, `Autocomplete` and `RichTextEditor` always render live and take no `renderStaticInput`. Disable deferred activation for every input, `Select` included, with `<UIConfig.Provider config={{ renderStaticInput: false }}>`. The option determines the initial rendering mode, rather than toggling an already activated field back to static.
|
|
69
|
+
|
|
70
|
+
Inputs take the React Aria flags `isDisabled`, `isRequired`, and `isReadOnly` (where the input supports it: `Select`, `Slider`, `ToggleGroup`, `FileInput`, `FileUpload` and `RichTextEditor` have none); the native `disabled`, `required`, and `readOnly` attributes are not props. `layout` selects the field layout (`default`, `floating`, `filter`, `inline`). `isInvalid` marks an input invalid even without a message; `error` also marks it invalid and supplies associated error text.
|
|
71
|
+
|
|
72
|
+
## Select search callbacks
|
|
73
|
+
|
|
74
|
+
`onInputChange` reports displayed text immediately, including selected labels and clears. `onSearchChange` reports the search query after `searchDebounceDelay` (500ms by default), including query resets after selection; use it for remote searches. Neither replaces `onChange`, which emits selected IDs. `multiSelectAutoConfirm` (default false) lets Enter toggle an exact label match or the sole remaining option in multiple mode; it does not select automatically while typing.
|
|
75
|
+
|
|
76
|
+
## Uploads and saved files
|
|
77
|
+
|
|
78
|
+
`FileUpload` values are `UploadedFile` records of finished uploads. Saved attachments go in as records with their server IDs: through `value` (with `onChange`) or `defaultValue`, or through the form's default values for a bound field. A separate image preview does not register them with the control. Each finished upload adds its record with the `id` that `onUpload` resolved with, and the remove action takes a record out, so `onChange` and a bound field always hold the current IDs:
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
import { FileUpload, type UploadedFile } from "@povio/ui/file-upload";
|
|
82
|
+
import { useForm } from "@povio/ui/tanstack/form";
|
|
83
|
+
|
|
84
|
+
// Inside the attachment editor; `uploadFile` and `deleteFile` are your API calls.
|
|
85
|
+
const form = useForm<{ attachments: UploadedFile[] }>({ defaultValues: { attachments: savedAttachments } });
|
|
86
|
+
|
|
87
|
+
<FileUpload
|
|
88
|
+
label="Attachments"
|
|
89
|
+
allowsMultiple
|
|
90
|
+
field={{ form, name: "attachments" }}
|
|
91
|
+
onUpload={async (file, { signal, onProgress }) => {
|
|
92
|
+
const { id, url } = await uploadFile(file, { signal, onUploadProgress: onProgress });
|
|
93
|
+
return { id, url };
|
|
94
|
+
}}
|
|
95
|
+
onRemove={(file) => deleteFile(file.id)}
|
|
96
|
+
/>;
|
|
97
|
+
// The submitted IDs: values.attachments.map((attachment) => attachment.id)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`onChange` runs when an upload finishes or the user removes a file, never for an upload in progress. A form with a bound `FileUpload` does not submit while an upload runs: `handleSubmit` calls `onInvalid`, and the field shows "Wait for the upload to finish" until no upload is running. Without `allowsMultiple` a new upload replaces the stored file once it finishes; until then the old file stays. `form.reset()`, unmounting, or replacing `value` with other files cancels the uploads in progress. A rejected `onUpload` shows its message as the field error, also over a schema error already shown. A standalone `FileUpload` does not block a submit: disable the submit button while your `onUpload` calls run. `onRemove` runs after the file has left the value; decide whether removal deletes the server file before the form is saved. `onInvalidFileType` receives the names of all rejected files, in `FileUpload` and `FileInput` alike.
|
|
101
|
+
|
|
102
|
+
## Migrating existing forms
|
|
59
103
|
|
|
60
104
|
The web UI package no longer maintains React Hook Form (RHF) integration. The root entry now exports the TanStack barrel. Replace imports from `@povio/ui/rhf` and its subpaths with the TanStack paths above, and replace `formControl={{ control: form.control, name }}` with `field={{ form, name }}`. Keep component names such as `Input`. Compose fields explicitly in JSX and declare TanStack table columns directly.
|
|
61
105
|
|
|
62
|
-
Use `zodSchema` for validation and `form.handleSubmit(onSubmit, onInvalid)` for submission; the valid callback receives transformed schema values. Replace `form.watch(...)` with `useFormValue(form, values => values.name)` and form-state subscriptions with `useFormState(form, state => state.isSubmitting)`, both from `@povio/ui/tanstack/form`. Replace values through `form.reset(values)`, which clears dirty and touched state.
|
|
106
|
+
Use `zodSchema` for validation and `form.handleSubmit(onSubmit, onInvalid)` for submission; the valid callback receives transformed schema values. Replace `form.watch(...)` with `useFormValue(form, values => values.name)` and form-state subscriptions with `useFormState(form, state => state.isSubmitting)`, both from `@povio/ui/tanstack/form`. Replace values through `form.reset(values)`, which clears dirty and touched state. RHF's `formState.isDirty` maps to `useFormState(form, (s) => !s.isDefaultValue)`: TanStack's `isDirty` stays true once a field has changed, even after the edit is undone. `form.state` is not reactive, so read state in render only through `useFormState` and `useFormValue`. `defaultValues` are read once, on mount: mount an edit form after its record loads, or call `form.reset(record)`. `handleSubmit`'s `onInvalid` receives `{ [fieldPath]: firstError }`. Bind custom controls with `BoundField` from `@povio/ui/tanstack/form`, and make optional number, select and date fields `.nullable()`, since clearing them writes `null`. The autosave hooks `useAutosave` and `useFormAutosave` also come from `@povio/ui/tanstack/form`.
|
|
63
107
|
|
|
64
108
|
Standalone controls keep their existing `value` / `onChange` or `isSelected` / `onChange` props. Consumers can build an external RHF adapter using those props. Mobile and `@povio/rn-ui` retain their own RHF integrations.
|
|
65
109
|
|
|
@@ -78,17 +122,20 @@ The React Aria hooks used by Povio are similarly isolated under `use-text-field`
|
|
|
78
122
|
|
|
79
123
|
Each emitted entry is independently bundled and tree-shaken; it does not forward React Aria's aggregate barrel or share a generated aggregate chunk with unrelated controls. Ordinary Povio component imports do not include the escape-hatch entries.
|
|
80
124
|
|
|
81
|
-
Use `Badge` for display content,
|
|
125
|
+
Use `Badge` for display content, `<Badge as="button">` for a compact, badge-styled action, and `ToggleButton` or `ToggleGroup` for selection. Every `Badge` mode shares one recipe; customize it through `UIOverrides.badgeButton`.
|
|
82
126
|
|
|
83
127
|
## Selection and text suggestions
|
|
84
128
|
|
|
85
|
-
Use `Select` to store an item ID, or an array of IDs with `selectionMode="multiple"`. Set `isSearchable` to filter the choices. Typing a search query does not change the selected ID.
|
|
129
|
+
Use `Select` to store an item ID, or an array of IDs with `selectionMode="multiple"`. Set `isSearchable` to filter the choices. Typing a search query does not change the selected ID, and only listed options can be chosen. Pass `value`/`onChange`, or `defaultValue` to let the select keep its own selection; `value={undefined}` still means nothing is selected.
|
|
130
|
+
|
|
131
|
+
Use `Autocomplete` when the user may also type something that is not in the list. Its value is made of entries: a picked suggestion is `{ id, label }` (an exact match) and typed text is `{ label }` (a partial match).
|
|
86
132
|
|
|
87
|
-
|
|
133
|
+
- By default it is a text box holding one entry or `null`. Typing emits `{ label }` on every keystroke, picking a suggestion emits `{ id, label }`, editing a picked entry drops its `id`, and clearing emits `null`.
|
|
134
|
+
- `selectionMode="multiple"` turns it into a row of chips, like an email "To" line, holding an array of entries. Picking a suggestion adds a chip; Enter or leaving the field turns the typed text into a chip; Backspace in the empty field removes the last chip. Typed text is never resolved to a suggestion's ID. The chips use the tag row of `Select` with `selectedTagsType="tags"` (a multiple `Select` defaults to a comma-separated list instead): picked entries are primary chips, typed ones secondary, and `collapseAfter` folds the rest into "+N more".
|
|
88
135
|
|
|
89
136
|
```tsx
|
|
90
137
|
import { Select } from "@povio/ui/select";
|
|
91
|
-
import { Autocomplete } from "@povio/ui/autocomplete";
|
|
138
|
+
import { Autocomplete, type AutocompleteValue } from "@povio/ui/autocomplete";
|
|
92
139
|
|
|
93
140
|
const cities = [{ id: "city-1", label: "Ljubljana" }];
|
|
94
141
|
// Choosing Ljubljana stores "city-1".
|
|
@@ -99,16 +146,26 @@ const cities = [{ id: "city-1", label: "Ljubljana" }];
|
|
|
99
146
|
onChange={setCityId}
|
|
100
147
|
isSearchable
|
|
101
148
|
/>;
|
|
102
|
-
// Choosing Ljubljana stores "Ljubljana";
|
|
149
|
+
// Choosing Ljubljana stores { id: "city-1", label: "Ljubljana" }; typing "lju" stores { label: "lju" }.
|
|
150
|
+
<Autocomplete
|
|
151
|
+
label="City"
|
|
152
|
+
items={cities}
|
|
153
|
+
value={city}
|
|
154
|
+
onChange={setCity}
|
|
155
|
+
/>;
|
|
156
|
+
// A filter that is exact for picked cities and partial for typed text.
|
|
103
157
|
<Autocomplete
|
|
104
|
-
label="
|
|
158
|
+
label="Cities"
|
|
159
|
+
selectionMode="multiple"
|
|
105
160
|
items={cities}
|
|
106
|
-
value={
|
|
107
|
-
onChange={
|
|
161
|
+
value={cityFilter}
|
|
162
|
+
onChange={setCityFilter}
|
|
108
163
|
/>;
|
|
164
|
+
const cityIds = cityFilter.flatMap((entry: AutocompleteValue<string>) => (entry.id == null ? [] : [entry.id]));
|
|
165
|
+
const cityNameContains = cityFilter.flatMap((entry) => (entry.id == null ? [entry.label] : []));
|
|
109
166
|
```
|
|
110
167
|
|
|
111
|
-
|
|
168
|
+
`Autocomplete` takes `items`, or `list={useAsyncList(...)}` for remote suggestions; the typed text is sent to `list.setFilterText` after `searchDebounceDelay`. Form fields hold the same shapes: `z.object({ id: z.string().optional(), label: z.string() }).nullable()` for a single field, an array of that object for `selectionMode="multiple"`.
|
|
112
169
|
|
|
113
170
|
### Async choices
|
|
114
171
|
|
|
@@ -118,7 +175,13 @@ Supply an explicit loader through `useAsyncList` and pass its result to `Select`
|
|
|
118
175
|
import { Select } from "@povio/ui/select";
|
|
119
176
|
import { useAsyncList } from "@povio/ui/use-async-list";
|
|
120
177
|
|
|
121
|
-
|
|
178
|
+
interface City {
|
|
179
|
+
id: string;
|
|
180
|
+
label: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Pass the item type: without it the items are `unknown` and `Select` rejects the list.
|
|
184
|
+
const list = useAsyncList<City>({
|
|
122
185
|
initialSelectedKeys: cityId ? [cityId] : [],
|
|
123
186
|
load: async ({ signal, filterText, cursor, selectedKeys }) => {
|
|
124
187
|
const page = await loadCities({ signal, search: filterText, cursor, selectedKeys });
|
|
@@ -143,7 +206,9 @@ const list = useAsyncList({
|
|
|
143
206
|
}
|
|
144
207
|
```
|
|
145
208
|
|
|
146
|
-
The hook starts loading when mounted. The control forwards search changes and scroll pagination to the list and leaves server-ranked items unfiltered. Display `list.error` and a retry action beside the control; `list.reload()` retries the current filter. If a saved ID is outside the first page, supply its label through `initialSelection`, or resolve `selectedKeys` in your loader and merge the selected items with the page. Selecting still emits IDs, and selected labels remain visible when subsequent searches exclude those IDs.
|
|
209
|
+
The hook starts loading when mounted. The control forwards search changes and scroll pagination to the list and leaves server-ranked items unfiltered. Display `list.error` and a retry action beside the control; `list.reload()` retries the current filter. `list.reload()` runs after the next render, with the loader from that render, and keeps the current filter text, so it can be called in the same `field.onValueChange` that changes what the loader reads. If a saved ID is outside the first page, supply its label through `initialSelection`, or resolve `selectedKeys` in your loader and merge the selected items with the page. Selecting still emits IDs, and selected labels remain visible when subsequent searches exclude those IDs. Pass `field={{ form, name }}` instead of value callbacks for a form field.
|
|
210
|
+
|
|
211
|
+
The list names its paging state as a TanStack infinite query does: `isLoading` (the first page, or a reload after a search or sort), `hasNextPage`, `fetchNextPage` and `isFetchingNextPage`. To page items yourself, for example from `useInfiniteQuery`, pass those four props to `Select` together with `items` instead of `list`. A hand-written `list` object needs `items`, `setFilterText` and the same four fields.
|
|
147
212
|
|
|
148
213
|
`QuerySelect`, `QueryAutocomplete`, and their query-hook adapters have been removed. Call regular API functions inside loaders; query hooks belong at component scope. Applications can retain their existing query cache, authorization checks, and response validation around those API calls, as the admin application's `useAsyncLabelList` does.
|
|
149
214
|
|
|
@@ -160,42 +225,42 @@ import { uiConfigurator } from "@povio/ui-configurator/vite";
|
|
|
160
225
|
uiConfigurator({ themeFile: "src/styles/theme.css" });
|
|
161
226
|
```
|
|
162
227
|
|
|
163
|
-
The path defaults to `src/styles/theme.css` relative to this app's Vite root. **Advanced → Export → Tailwind CSS → Save theme** updates that file's token declarations and lets Vite reload the CSS. Each app writes only its own configured theme. Apply remains session-only; Cancel does not undo a file save. The plugin and save action are absent from builds and preview servers. See [the configurator guide](
|
|
228
|
+
The path defaults to `src/styles/theme.css` relative to this app's Vite root. **Advanced → Export → Tailwind CSS → Save theme** updates that file's token declarations and lets Vite reload the CSS. Each app writes only its own configured theme. Apply remains session-only; Cancel does not undo a file save. The plugin and save action are absent from builds and preview servers. See [the configurator guide](https://www.npmjs.com/package/@povio/ui-configurator) for provider setup, preview behavior, and supported theme blocks.
|
|
164
229
|
|
|
165
230
|
## Choosing buttons
|
|
166
231
|
|
|
167
232
|
Choose a button by its interaction:
|
|
168
233
|
|
|
169
|
-
| Interaction
|
|
170
|
-
|
|
|
171
|
-
| Action with a visible label, optionally with
|
|
172
|
-
| Action displayed as an icon
|
|
173
|
-
| Persistent selected/unselected state
|
|
174
|
-
| Primary action with a separate menu trigger
|
|
234
|
+
| Interaction | Component |
|
|
235
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
236
|
+
| Action with a visible label, optionally with an icon | `Button` from `@povio/ui/button` |
|
|
237
|
+
| Action displayed as an icon | `IconButton` from `@povio/ui/icon-button`, with an accessible name such as `label="Close"` |
|
|
238
|
+
| Persistent selected/unselected state | `ToggleButton` from `@povio/ui/toggle-button` |
|
|
239
|
+
| Primary action with a separate menu trigger | `SplitButton` from `@povio/ui/split-button` |
|
|
175
240
|
|
|
176
|
-
`
|
|
241
|
+
`Badge` covers interactive badges: `as="button"` takes `onPress` and works as a menu or select trigger, and `as="toggle"` takes `isSelected`/`onChange`. Without `as` it is display-only; pass `onRemove` for a remove button. A display-only badge defaults to `variant="subtle"`, `as="button"` to `contained`, and `as="toggle"` to `outlined`. An icon-only selected action uses `ToggleButton iconOnly` with an accessible name; `Button` itself does not accept `iconOnly`, `toggle`, or selection props.
|
|
177
242
|
|
|
178
243
|
Text appearance is `Button variant="text"`. For the former TextButton defaults, also specify `width="hug"`. The former InlineIconButton appearance is `IconButton variant="text" size="sm" width="hug" disableTooltip`; preserve any explicitly supplied size. `IconButton` provides a tooltip by default, so disable it when an enclosing tooltip already supplies one or when preserving the old inline appearance.
|
|
179
244
|
|
|
180
|
-
See the [button migration steps](./MIGRATION.md#13-choose-buttons-by-behavior) for removed exports and exact replacements.
|
|
181
|
-
|
|
182
245
|
## Button sizes
|
|
183
246
|
|
|
184
|
-
`Button`
|
|
247
|
+
`Button` shows one icon: `icon` with `iconPosition="left"` (default) or `"right"`. `isLoading` shows a spinner and disables the button unless `disableWhileLoading={false}`; `width="fill"` stretches it.
|
|
248
|
+
|
|
249
|
+
`Button` supports `sm`, `default`, and `none` (zero padding). Omitting `size` uses `default`. The same sizes apply to `IconButton`, `ToggleButton`, and `SplitButton`.
|
|
185
250
|
|
|
186
|
-
When migrating, replace `xs
|
|
251
|
+
When migrating, replace `s`, `xs`, and `small` with `sm`; remove explicit `default`, `m`, `md`, `l`, and `lg` size props to use the default. `sm` is 32px high; `default` is 36px high.
|
|
187
252
|
|
|
188
253
|
Use `<Button variant="text" width="hug" size="none">Read more</Button>` for a text action without button padding. Variant names and `UIOverrides` keys remain available for customization.
|
|
189
254
|
|
|
190
255
|
## Input sizes
|
|
191
256
|
|
|
192
|
-
Inputs
|
|
257
|
+
Inputs and buttons share `size="sm"` and `default`. Omit `size` for the default. This applies to text and number inputs, selects, autocomplete, date/time pickers, `FileInput`, checkbox groups, and radio groups that share the input size API. `none` remains button-only because inputs need their field spacing.
|
|
193
258
|
|
|
194
|
-
|
|
259
|
+
Use `sm` for compact inputs. The `s` and `small` aliases are removed; migrate `s`, `small`, and `extra-small` to `sm`. Remove `size="large"` or `size="default"` to use the default. Typography sizes are a separate API and still include `small`.
|
|
195
260
|
|
|
196
261
|
## Date and time values
|
|
197
262
|
|
|
198
|
-
|
|
263
|
+
Standalone, the date and time controls accept `value`/`onChange` or an initial `defaultValue`. Passing `null` clears a control; omitting `value` leaves it uncontrolled. Bound with `field={{ form, name }}`, they take their values and defaults from the form field, and `field.onValueChange` receives the same output after the form updates.
|
|
199
264
|
|
|
200
265
|
| Control | Input and output format | Empty output |
|
|
201
266
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
@@ -204,12 +269,20 @@ The standalone date/time subpaths accept `value`/`onChange` or an initial `defau
|
|
|
204
269
|
| `DateTimePicker` | Input ISO timestamp with `Z` or an explicit offset; output UTC instant as `YYYY-MM-DDTHH:mm:ss.sssZ`. | `null` |
|
|
205
270
|
| `TimePicker` | Input ISO timestamp with `Z` or an explicit offset; output edited clock time on the date anchor as `YYYY-MM-DDTHH:mm:ss.sssZ`. | `null` |
|
|
206
271
|
|
|
272
|
+
Unsupported strings, including `""`, render as an empty field with a console warning instead of throwing. Use `null` for empty.
|
|
273
|
+
|
|
207
274
|
`fullIso` is supported by `DatePicker` and `DateRangePicker`. Remove it from `DateTimePicker` and `TimePicker`: it previously had no effect, and their output always contains a full UTC timestamp.
|
|
208
275
|
|
|
209
|
-
|
|
276
|
+
`minValue` and `maxValue` accept a string in the control's value format or an `@internationalized/date` value. `TimePicker` also accepts `HH:mm` or `HH:mm:ss`; for an ISO timestamp limit, only its clock time in `timeZone` counts.
|
|
277
|
+
|
|
278
|
+
Date-only controls use UTC calendar fields for parsing and output. In full ISO mode, the UTC date of an input timestamp determines the selected day. Month granularity normalizes to the first of the month, and year granularity to January 1. Range outputs represent inclusive whole UTC days. Partial ranges emit `null` unless `allowPartialRange` is enabled (default: false). With relative mode enabled, `onRelativeChange` emits the preset key and `onChange` emits its resolved range in the selected `fullIso` format; clearing or switching modes resets both to `null`. To turn a stored `relativeValue` back into `{ start, end }`, use `const resolvePreset = useResolveDateRangePreset({ fullIso })` from `@povio/ui/date-range-presets`: it follows the picker's locale (week start) and `UIConfig.dateInput.timeZone`. `resolveDateRangePreset`, `getDateRangePreset` and `hydrateRelativeDateRangeValue` default to `locale = "en-GB"` and the browser time zone, and `resolveDateRangePreset` always returns full-ISO endpoints.
|
|
210
279
|
|
|
211
280
|
`DateTimePicker` and `TimePicker` display and edit in `timeZone`, falling back to `UIConfig.dateInput.timeZone` (default: `"clientLocal"`, the browser's zone). Changing the zone changes displayed clock fields, while emitted timestamps remain UTC. For example, `2025-07-04T08:30:00.000Z` displays as 10:30 in `Europe/Ljubljana`; editing it to 11:30 emits `2025-07-04T09:30:00.000Z`. Display locale and `format` do not change the value format.
|
|
212
281
|
|
|
282
|
+
Their dropdowns and mobile sheets use draggable time wheels with touch/mouse scrolling, row selection, and keyboard controls. Hour and minute wheels wrap independently; AM/PM appears for 12-hour time and stays bounded. At default sensitivity, a full mouse or touch flick targets 20 minutes on the minute wheel, 8 hours on a 24-hour wheel, or 4 hours on a 12-hour wheel. The glide accounts for the distance already dragged. A longer manual pull continues to follow the pointer. Arrow keys adjust one step, Page Up/Down adjust five minutes or three hours, and Home/End select a column's endpoints. Save settles moving wheels and commits the draft; dismissing discards it. Empty time drafts start at the current minute in the effective time zone (`isTimeOptional` retains midnight). Reduced motion removes curvature and drag-release momentum. The editable input and timestamp contracts are unchanged.
|
|
283
|
+
|
|
284
|
+
Tune hour and minute drag/flick distances independently through `UIConfig.Provider` with `config={{ dateInput: { hourWheelSensitivity: 0.5, minuteWheelSensitivity: 1.5 } }}`. Both default to `1`; positive finite values below `1` move less, and values above `1` move farther. Invalid values fall back to `1`. The settings apply to both pickers and mobile sheets without changing keyboard steps, row clicks, native mouse-wheel/trackpad scrolling, or AM/PM. Reduced motion still disables release momentum. Storybook's **Wheel Sensitivity** stories provide live controls for both settings.
|
|
285
|
+
|
|
213
286
|
`TimePicker` uses `date` as its calendar anchor: it parses that string as a JavaScript `Date` instant, converts it into the effective zone, then replaces the clock fields. Use an explicit offset or `Z` to avoid ambiguous local timestamps. For example, `date="2025-03-04T00:00:00.000Z"` falls on March 3 in `America/Los_Angeles`; entering 10:30 emits `2025-03-03T18:30:00.000Z`. Without `date` (or with `null`), edits use today's date in the effective zone, even if the supplied `value` has another date. Once the editable input is mounted, changing `date` re-emits the current clock time on the new anchor. `isTimeOptional` on `DateTimePicker` completes a date with midnight in the effective zone when time is omitted.
|
|
214
287
|
|
|
215
288
|
```tsx
|
|
@@ -236,11 +309,63 @@ import { TimePicker } from "@povio/ui/time-picker";
|
|
|
236
309
|
|
|
237
310
|
## Table selection
|
|
238
311
|
|
|
239
|
-
|
|
312
|
+
`enableRowSelection` adds a leading checkbox column: a checkbox per row and select-all in the header, which also pins with the first pinned column and works next to `rowDetails`. Selection is multiple, as in TanStack; `enableMultiRowSelection={false}` keeps one row at a time. Do not add your own checkbox column. The table keeps the selection itself, starting from `defaultRowSelection` (read once, on mount); control it with `rowSelection` + `onRowSelectionChange`, which receives a value or an updater, so a React state setter fits. Pass stable `getRowId` values (`getRowId={(row) => row.id}`) for server-loaded rows: the default key is the row index, so a refetch that shifts rows moves the selection to other records. Without `enableRowSelection`, clicking a row selects nothing; with it, a click on a row outside its buttons and menus toggles the row when the table has no `onRowAction`, expandable rows or `rowDetails`. While rows are selected, the header row shows the select-all checkbox followed by `bulkSelectionActions`, a component that receives `table`; define it at module scope, because an inline function is a new component on every render and remounts.
|
|
313
|
+
|
|
314
|
+
Every other table state follows the same `<x>` + `on<X>Change` pattern (`sorting`, `columnOrder`, `columnVisibility`, `columnPinning`, `columnSizing`, `expanded`). Headers are sortable only when `onSortingChange` is passed. The table never reorders rows: pass `order` from `useSorting` to the list query, and `sorting={sorting} onSortingChange={setSorting}` to the table; a sort in the URL wins over `defaultSorting`, and a sort the user cleared stays cleared until the URL changes from outside. `onRowAction` runs when a row is clicked outside its selection checkbox, or on Enter in a focused cell that holds no control of its own; it and `onRowDoubleClick` receive the row's item.
|
|
315
|
+
|
|
316
|
+
Pass the query's `isLoading` to show a spinner in place of the rows, and `emptyState` for a custom message when there are no rows (the default is a translated "No results"; `false` shows no empty row). `loadingContent` replaces the spinner, and `isPlaceholderData` (a query's `placeholderData`) renders skeleton rows of the same count instead of stale values. `Table` has no error state: when the query has failed with no data (`query.error && !query.data`), render your error UI instead of the table, or a failed load shows "No results" (`InfiniteTable` takes `isError`, below). `className` styles the `<table>` element and `containerClassName` its scroll container (border, radius, background); limit the height with `maxHeight`, or let the page scroll with `scroll="page"`.
|
|
317
|
+
|
|
318
|
+
## Large tables
|
|
319
|
+
|
|
320
|
+
- **Virtualization:** `enableRowVirtualization` renders only the rows in view once there are more than `table.virtualization.rowThreshold` (it needs a bounded scroller: `maxHeight`, a fixed-height parent, or `scroll="page"`), and `enableColumnVirtualization` only the columns in view (pinned and `meta.keepMounted` columns stay). The virtualizer and dnd-kit load on demand; call `preloadTableVirtualizer()` / `preloadTableDnd()` early (for example when the route starts loading) so the first paint already has them.
|
|
321
|
+
- **Column widths:** `columnLayout="sized"` gives columns their `size` and stretches them to fill the table until one is resized (double-click a resize handle to fit a column to its content); `natural` (the default) fits columns to their content. `useColumnWidths` applies `size` without resizing, `tableLayout` overrides the CSS `table-layout`, and `useRemainingNameColumnWidth` sizes one column to the space the others leave.
|
|
322
|
+
- **Headers and rows:** `renderColumnFilter` adds content after a header's label (`isColumnFilterActive` marks applied filters with `data-filter-active`), and `scrollResetKey` scrolls back to the top when it changes (the applied filters, say). Rows take `onAuxClick` (middle click), `onRightClick`, `onRowHover`, `getRowClassName` and `renderRowProvider`; `renderRow` adds rows of your own around each row (each in its own `<tbody>`), `renderBodyStartRows` / `renderFooterRows` add content before and after them, and `stickyLastRow` keeps a totals row in view. `enableArrowKeyRowNavigation` moves the selection (and `onRowAction`) with Up and Down.
|
|
323
|
+
- **Loading more:** `hasMoreRows` with `loadMoreRef`, or `onEndReached` for virtualized rows, load the next page from a plain `Table`; `InfiniteTable` wires them for you.
|
|
324
|
+
- **Drag and drop:** `showDragHandleColumn={false}` places the handle yourself (`RowDragHandleCell`, or `renderRow`'s `dragHandleProps`), `optimisticReordering` shows the new order until `items` changes, and `onReorder` also receives `{ oldIndex, newIndex, itemId }`.
|
|
325
|
+
- **Cells:** `CellText`, `CellNumber` (locale-aware, optional `unit`), `CellDate` / `CellDateUTC` / `CellDateTime` / `CellDateTimeUTC`, and `CellLink`, which opens `href` in a new tab. Wire route preloading for every `CellLink` with `CellLinkPreloadContext`, or open links in place with `CellLinkNavigationContext`. Dates and numbers use the active i18next language unless a `locale` is passed. A column that shows selection its own way takes `meta.selectionModel` with `TableSelectionCheckbox` (driven by a `TableSelectionModel`) or the lightweight `TableRowCheckbox`; `useControlledTableRowSelection` turns a list of selected ids into `rowSelection` + `onRowSelectionChange`.
|
|
326
|
+
- **Column meta:** `import "@povio/ui/tanstack/table-types";` in one of the app's `.d.ts` files types the `meta` fields the table reads (`width`, `sortKey`, `filterKey`, `colSpan`, `grow`, `configuredPinPosition`, `keepMounted`, …).
|
|
327
|
+
|
|
328
|
+
## Table defaults in `UIConfig`
|
|
329
|
+
|
|
330
|
+
Every default lives in `UIConfig.table` (`variant`, `scroll`, `columnLayout`, `enableColumnResizing`, `virtualization`, `sortIcons`, `dragHandleIcon`, …), so an app sets them once. These keep the 6.0 behaviour above by default and switch an app that relied on the `5.1` table engine back to it:
|
|
331
|
+
|
|
332
|
+
| Option | Default (6.0) | Set to |
|
|
333
|
+
| --------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
334
|
+
| `loadingState` | `"spinner"`: a spinner row in place of the rows | `"skeleton"`: skeleton rows while there are no rows yet (`loadingSkeleton` sets count and delay) |
|
|
335
|
+
| `emptyState` | a translated "No results" | `false`: no empty row, or any node |
|
|
336
|
+
| `showSelectionColumn` | `true`: `enableRowSelection` adds the checkbox column | `false`: the app places its own (`meta.selectionModel`) |
|
|
337
|
+
| `enableMultiRowSelection` | `true` | `false`: one selected row at a time |
|
|
338
|
+
| `enableRowSelection` | `false`: selection is opt-in per table | `true`: rows are selectable unless a table says otherwise |
|
|
339
|
+
| `selectRowOnClick` | `true`: a click on a selectable row toggles it | `false`: only the checkbox selects |
|
|
340
|
+
| `rowKeyboardActivation` | `false`: one body cell is the Tab stop; Enter on a cell runs `onRowAction` | `true`: rows are the Tab stops; Enter and Space select and run `onRowAction` |
|
|
341
|
+
| `plainUnsortableHeaders` | `true`: headers that can't sort are plain text | `false`: they keep a sort button that does nothing |
|
|
342
|
+
| `columnConfigLayout` | `"list"`: the sortable checkbox list | `"pinning"`: pinned-left, scrollable and pinned-right zones (with `onPinningChange`) |
|
|
343
|
+
| `followDefaultRowSelection` | `false`: `defaultRowSelection` is read once | `true`: a change of its ids resets the selection |
|
|
240
344
|
|
|
241
345
|
## Lists
|
|
242
346
|
|
|
243
|
-
|
|
347
|
+
Load server lists with `InfiniteTable` and an `...Infinite` query; pass the page size as a constant in the query parameters, not through the URL. Use `Table` only for short, fixed data loaded at once.
|
|
348
|
+
|
|
349
|
+
`InfiniteTable` takes either `items` with `hasNextPage` / `fetchNextPage`, or the query's `data` (or the whole `query`). It requests the next page while the end of the table is in view or near it, and again after a page lands while it stays there; nothing is requested during the first load. Each page is requested once per `items` / `data` value, and a page that added no rows (a failed request) is retried only when the user scrolls. `isError` shows `errorContent` (default: a translated "Data could not be loaded") instead of the empty state, or as an alert above rows already loaded. `loadingIndicator="overlay"` replaces the footer spinner with one over the rows, and `deferMount` mounts the table right after the page's first commit; both default from `UIConfig.table` (`infiniteLoadingIndicator`, `infiniteDeferMount`, `infiniteEmptyState`, `infiniteErrorContent`).
|
|
350
|
+
|
|
351
|
+
## Table column configuration
|
|
352
|
+
|
|
353
|
+
`useTableColumnConfig(columns, options)` keeps visibility, order and pinning; pass its result to `ColumnConfigModal` or `ColumnConfigPopover` (a popover with its own trigger, a bottom sheet on small screens). They show the sortable checkbox list; with `layout="pinning"` (or `table.columnConfigLayout: "pinning"`) and `onPinningChange`, columns are dragged between pinned-left, scrollable and pinned-right zones, and `onDefaultSortingChange` adds a default sorting picker. Columns with `enableHiding: false` always show and are not listed; columns missing from a saved order go last.
|
|
354
|
+
|
|
355
|
+
Configuration is kept in memory by default. To save it, give the table a `location` (or per-setting `persistence` keys) and provide a storage adapter once:
|
|
356
|
+
|
|
357
|
+
```tsx
|
|
358
|
+
const storage: TableColumnConfigStorage = {
|
|
359
|
+
// A hook: read the saved settings for `target` and return a stable `save`.
|
|
360
|
+
useColumnSettings: (target) => useMyUserSettings(target),
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
<TableColumnConfigStorageContext value={storage}>{app}</TableColumnConfigStorageContext>;
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
`save` receives only changed settings; `widths` patches are merged into the saved widths. Saved settings are ignored inside `<TableConfigurationEnabledContext value={false}>`.
|
|
367
|
+
|
|
368
|
+
`@povio/ui/tanstack/table-context` exports the table contexts (`TableColumnConfigStorageContext`, `TableConfigurationEnabledContext`, `CellLinkPreloadContext`, `CellLinkNavigationContext`) and `preloadTableVirtualizer` / `preloadTableDnd` without the tables, so an app root can provide them while its tables load with the routes that show them. Inside `<TableConfigurationEnabledContext value={false}>` column resizing and `ColumnConfigPopover` are off too.
|
|
244
369
|
|
|
245
370
|
## Built-package tests
|
|
246
371
|
|
|
@@ -248,7 +373,7 @@ From `packages/ui`, run `bun run test:package` to build the publishable package
|
|
|
248
373
|
|
|
249
374
|
## Versioning
|
|
250
375
|
|
|
251
|
-
The current web theme uses shadcn/ui roles.
|
|
376
|
+
The current web theme uses shadcn/ui roles. Breaking changes follow semantic versioning; the steps for upgrading from 5.x are in [Upgrading from 5.x](#upgrading-from-5x).
|
|
252
377
|
|
|
253
378
|
## Publishing
|
|
254
379
|
|
|
@@ -256,7 +381,7 @@ The current web theme uses shadcn/ui roles. Earlier releases used Atlas tokens;
|
|
|
256
381
|
|
|
257
382
|
Create a GitHub release with a tag matching `v*.*.*-ui`. This triggers the publish workflow and releases the package to NPM.
|
|
258
383
|
|
|
259
|
-
Example: `v1.2.3-ui`
|
|
384
|
+
Example: `v1.2.3-ui`. The build derives the package version from the tag and publishes to npm's `latest` dist-tag.
|
|
260
385
|
|
|
261
386
|
### Release candidate
|
|
262
387
|
|
|
@@ -304,7 +429,41 @@ We also use a custom tailwind plugin to shorten some selectors inside the @povio
|
|
|
304
429
|
|
|
305
430
|
### Theme
|
|
306
431
|
|
|
307
|
-
Components use the shadcn/ui colour roles (`bg-primary`, `text-muted-foreground`, `border-input`, `ring-ring`, …) plus `success`, `warning`, `info` and `destructive-foreground`, and Tailwind's default spacing, radius, text and shadow scales. Provide them by pasting a shadcn theme (`:root` / `.dark` CSS variables and the `@theme inline` mapping) into your stylesheet
|
|
432
|
+
Components use the shadcn/ui colour roles (`bg-primary`, `text-muted-foreground`, `border-input`, `ring-ring`, …) plus `success`, `warning`, `info` and `destructive-foreground`, and Tailwind's default spacing, radius, text and shadow scales. Provide them by pasting a shadcn theme (`:root` / `.dark` CSS variables and the `@theme inline` mapping) into your stylesheet, then add the roles a stock shadcn theme lacks:
|
|
433
|
+
|
|
434
|
+
```css
|
|
435
|
+
:root {
|
|
436
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
437
|
+
--success: oklch(0.527 0.154 150.069);
|
|
438
|
+
--success-foreground: oklch(0.985 0 0);
|
|
439
|
+
--warning: oklch(0.555 0.163 48.998);
|
|
440
|
+
--warning-foreground: oklch(0.985 0 0);
|
|
441
|
+
--info: oklch(0.546 0.245 262.881);
|
|
442
|
+
--info-foreground: oklch(0.985 0 0);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.dark {
|
|
446
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
447
|
+
--success: oklch(0.723 0.219 149.579);
|
|
448
|
+
--success-foreground: oklch(0.266 0.065 152.934);
|
|
449
|
+
--warning: oklch(0.828 0.189 84.429);
|
|
450
|
+
--warning-foreground: oklch(0.279 0.077 45.635);
|
|
451
|
+
--info: oklch(0.623 0.214 259.815);
|
|
452
|
+
--info-foreground: oklch(0.985 0 0);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@theme inline {
|
|
456
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
457
|
+
--color-success: var(--success);
|
|
458
|
+
--color-success-foreground: var(--success-foreground);
|
|
459
|
+
--color-warning: var(--warning);
|
|
460
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
461
|
+
--color-info: var(--info);
|
|
462
|
+
--color-info-foreground: var(--info-foreground);
|
|
463
|
+
}
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
States use plain Tailwind (`hover:bg-primary/90`, `hover:bg-accent`, `disabled:opacity-50`), so no extra utilities are needed.
|
|
308
467
|
|
|
309
468
|
### Icon slots
|
|
310
469
|
|
|
@@ -321,7 +480,7 @@ import { IconSlot } from "@povio/ui/icon-slot";
|
|
|
321
480
|
/>;
|
|
322
481
|
```
|
|
323
482
|
|
|
324
|
-
`IconSlot`
|
|
483
|
+
Import `IconSlot` from `@povio/ui/icon-slot`. `className` styles the outer slot; `iconClassName` styles the SVG. The slot controls SVG dimensions, including supplied SVGs with their own size classes. Use the inherited CSS variable `--icons-scale` to change the default ratio throughout a theme, or `scale` to override one slot. The default 16px slot at `0.8` produces a 12.8px SVG. Stroke width continues to follow the icon's own configuration.
|
|
325
484
|
|
|
326
485
|
Override the shared recipe through `UIOverrides` at `iconSlot.cva`. Component-specific icon recipes, such as `button.iconSize`, now style the outer slot. An explicitly configured slot passed to a button or input keeps its configuration without nesting another slot.
|
|
327
486
|
|
|
@@ -366,10 +525,78 @@ To adjust stacking for your app, override the values in your `@theme static` blo
|
|
|
366
525
|
}
|
|
367
526
|
```
|
|
368
527
|
|
|
528
|
+
### Animations
|
|
529
|
+
|
|
530
|
+
Components also use theme sizes and animations that Tailwind does not define: `w-modal` (dialogs), `max-w-toast` and the drawer slide (`animate-drawer-*`). Add them to the same `@theme static` block.
|
|
531
|
+
|
|
532
|
+
```css
|
|
533
|
+
@theme static {
|
|
534
|
+
--container-modal: 32.5rem;
|
|
535
|
+
--container-toast: 45rem;
|
|
536
|
+
--animate-drawer-enter-right: drawer-slide-right 0.3s;
|
|
537
|
+
--animate-drawer-exit-right: drawer-slide-right 0.3s reverse;
|
|
538
|
+
--animate-drawer-enter-left: drawer-slide-left 0.3s;
|
|
539
|
+
--animate-drawer-exit-left: drawer-slide-left 0.3s reverse;
|
|
540
|
+
|
|
541
|
+
@keyframes drawer-slide-right {
|
|
542
|
+
from {
|
|
543
|
+
transform: translateX(100%);
|
|
544
|
+
}
|
|
545
|
+
to {
|
|
546
|
+
transform: translateX(0);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
@keyframes drawer-slide-left {
|
|
550
|
+
from {
|
|
551
|
+
transform: translateX(-100%);
|
|
552
|
+
}
|
|
553
|
+
to {
|
|
554
|
+
transform: translateX(0);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
### Rich text editor styles
|
|
561
|
+
|
|
562
|
+
Load the editor stylesheet with `@import "@povio/ui/rich-text-editor/styles";` in the app's global Tailwind stylesheet, after the theme. It uses `@apply` with the theme's tokens, so a JS/TS `import` of it fails the build.
|
|
563
|
+
|
|
369
564
|
### Translations
|
|
370
565
|
|
|
371
566
|
We're using `i18next` for translations. Make sure the package versions match in your project. Out of sync major version might cause issues.
|
|
372
567
|
|
|
568
|
+
Register the package's translations with the app's i18next instance. Without them, visible text and accessible names render as keys such as `ui.tag.dismiss`:
|
|
569
|
+
|
|
570
|
+
```ts
|
|
571
|
+
// src/config/i18n.ts
|
|
572
|
+
import { resources as uiResources } from "@povio/ui/resources";
|
|
573
|
+
import deepMerge from "deepmerge";
|
|
574
|
+
import i18n from "i18next";
|
|
575
|
+
import { initReactI18next } from "react-i18next";
|
|
576
|
+
|
|
577
|
+
i18n.use(initReactI18next).init({
|
|
578
|
+
resources: deepMerge(appResources, uiResources),
|
|
579
|
+
ns: ["main", "ui"],
|
|
580
|
+
defaultNS: "main",
|
|
581
|
+
lng: "en",
|
|
582
|
+
fallbackLng: "en",
|
|
583
|
+
});
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
React Aria formats dates and names its built-in controls in its own locale, which follows the browser language, not i18next or `<html lang>`. Pass i18next's language to React Aria's `I18nProvider` at the app root:
|
|
587
|
+
|
|
588
|
+
```tsx
|
|
589
|
+
import { I18nProvider } from "@povio/ui/i18n-provider/react-aria";
|
|
590
|
+
import { useTranslation } from "react-i18next";
|
|
591
|
+
|
|
592
|
+
function LocaleProvider({ children }: { children: ReactNode }) {
|
|
593
|
+
const { i18n } = useTranslation();
|
|
594
|
+
return <I18nProvider locale={i18n.language}>{children}</I18nProvider>;
|
|
595
|
+
}
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
The `ui` namespace includes the default accessible names of the number range, sidebar, stepper, breadcrumbs and list tabs (`ui.numberRange.*`, `ui.sidebar.*`, `ui.stepper.progress`, `ui.breadcrumbs.showHidden`, `ui.tabsFilters.lists`), the remove button prefix `ui.tag.dismiss` ("Remove"), `ui.moreInfoAlt`, the date picker's `ui.datePicker.month`, `ui.datePicker.year` and `ui.datePicker.openTimePicker`, the file input's `ui.fileUpload.removeFiles`, the rich text toolbar names (`ui.textEditor.lists.*`, `ui.textEditor.textColor`, `ui.textEditor.highlight`) and the table's `ui.table.reorderRow`, `ui.table.noResults`, `ui.table.rowDetails` and `ui.table.closeDetails`. Apps that ship their own copy of the namespace must add these keys.
|
|
599
|
+
|
|
373
600
|
#### Overriding translations
|
|
374
601
|
|
|
375
602
|
To override the translations, add a partial `ui-translation.json` file for the locale (same structure as the translation.json in @povio/ui package) and merge it into the UI namespace.
|
|
@@ -467,3 +694,257 @@ In Configure UI, open Typography → Font families → Browse Fontsource. Search
|
|
|
467
694
|
The selected role changes the live preview. **Save changes** writes it to the app's theme CSS. Adding a font makes its assets available; role assignments are saved explicitly with the theme. Package installation scripts are disabled, and no Git commit or push is performed. Catalog browsing and temporary CDN previews also work without the development installer.
|
|
468
695
|
|
|
469
696
|
The Vite plugin uses `src/styles/globals.css` by default. For another CSS entrypoint, configure `uiConfigurator({ fontCssFile: "src/app.css" })`; it must exist inside the application's Vite root. Set `fontCssFile: false` to disable font installation. Restart Vite after adding or changing the plugin configuration.
|
|
697
|
+
|
|
698
|
+
## Styling overrides and precedence
|
|
699
|
+
|
|
700
|
+
Import `UIOverrides` from `@povio/ui/ui-overrides`. Each slot (for example `button.cva` or `input.sizeCva`) accepts a recipe override. Override configs are not type-checked against variant names or values, so a stale key compiles and has no effect; input-family recipes key their layout variant `layout`, like the prop. The modes:
|
|
701
|
+
|
|
702
|
+
- `mode: "merge"` appends classes to the base and matching variant/compound entries. It does not resolve Tailwind conflicts: `p-2 p-4` retains both classes, and CSS precedence determines the result.
|
|
703
|
+
- `mode: "overrideEntry"` replaces the supplied base or variant/compound entries while retaining unspecified portions. This is the current name for the partial replacement behavior sometimes described as “override”.
|
|
704
|
+
- `mode: "overrideCva"` replaces the entire recipe, including its base, variants, compound variants, and defaults. A supplied CVA function also replaces the recipe.
|
|
705
|
+
|
|
706
|
+
With the configurator's `resolveUIConfiguration`, saved edits take precedence over TypeScript overrides at the same slot. Each edited slot becomes an `overrideCva` definition; other slots remain intact. Remove/reset a saved slot to let the corresponding TypeScript override apply again. Use entry replacement when replacing conflicting classes; `merge` is for additive styling.
|
|
707
|
+
|
|
708
|
+
## Application conventions
|
|
709
|
+
|
|
710
|
+
Use component subpath imports in examples and application code, including `@povio/ui/typography`, `@povio/ui/ui-config`, and `@povio/ui/ui-overrides`. Use `Drawer` from `@povio/ui/drawer` for a new right-side form or details panel, and `Dialog` for a centered modal. Existing `Dialog aside="right"` compositions remain supported; migrate deliberately when touching their layout and preserve focus/close behavior.
|
|
711
|
+
|
|
712
|
+
Typography supports `headline-l`, `h1`–`h4`, `lead`, `body`, `large`, and `small`; `title-4` is not supported. For example, use `<Typography as="h4" size="h4">Details</Typography>`. Web layouts use standard Tailwind radii such as `rounded-md` and `rounded-xl`, with semantic foreground/background role pairs.
|
|
713
|
+
|
|
714
|
+
## Upgrading from 5.x
|
|
715
|
+
|
|
716
|
+
Work through the groups below in order. Most removed props are still declared, with a type that makes the compiler name the replacement: `<Button fullWidth>` fails with ``Type 'boolean' is not assignable to type 'Removed<"Use `width='fill'` instead of `fullWidth`">'``. Apply the named replacement rather than casting the error away. Items marked _no hint_ fail as unknown props (TypeScript often suggests the new name). The **Still compiles** items change behaviour without a type error, so check them by hand.
|
|
717
|
+
|
|
718
|
+
### Entries, imports and dependencies
|
|
719
|
+
|
|
720
|
+
- Each input is one component, standalone or bound with `field={{ form, name }}`. The bound-input subpaths (`@povio/ui/tanstack/input`, `@povio/ui/tanstack/select` and the rest of `@povio/ui/tanstack/*`) are gone: import the same component from `@povio/ui/<input>`. `@povio/ui/tanstack/form` and `@povio/ui/tanstack/table` remain.
|
|
721
|
+
- `@povio/ui/badge-button` is gone: use `<Badge as="button">` or `<Badge as="toggle">` from `@povio/ui/badge` (see [Buttons, badges and text](#buttons-badges-and-text)).
|
|
722
|
+
- `@povio/ui/file-upload-container` is gone. `FileUploadContainer` was a `FileUpload` without a header: use `FileUpload` without `label`, which renders none, and render-function children only for custom content.
|
|
723
|
+
- `@povio/ui/icons` is gone: import `IconSlot`, `IconSlotIcon` and `IconSlotProps` from `@povio/ui/icon-slot`; `CloseIcon` was lucide's `X`.
|
|
724
|
+
- Style recipes (`*Definition`) are exported only from `@povio/ui/style-definitions`. The `@povio/ui` and `@povio/ui/tanstack` barrels and `@povio/ui/icon-slot` (`iconSlotDefinition`) no longer export them.
|
|
725
|
+
- The `@povio/ui` and `@povio/ui/tanstack` barrels export the single components (they exported the bound inputs in 5.x) and no longer export `BadgeButton`, `FileUploadContainer`, `CloseIcon`, `MenuItem`, `MenuPopover`, `SelectBaseProps` or `QueriesUtils`.
|
|
726
|
+
- `@tanstack/react-query` is no longer a peer dependency, and `QueriesUtils.prefetchMultipleQueries` is gone: call `Promise.all` over your prefetches.
|
|
727
|
+
- `@tanstack/react-form` is now a required peer dependency: install it even in apps that only use standalone inputs.
|
|
728
|
+
- New entries: `@povio/ui/use-breakpoint` (`useBreakpoint`, `Breakpoint`; import it from there instead of the `@povio/ui/tanstack` barrel) and `@povio/ui/types` (`OmitDiscriminatedUnion`).
|
|
729
|
+
- `LinkContext.LinkContextProvider` takes TanStack's `createLink(Link)` as `LinkComponent` directly: drop `as unknown as ComponentType<LinkNavigationProps>` casts. Its props are exported as `LinkContextProviderProps`.
|
|
730
|
+
- **Still compiles:** `UIRouterProvider` `push`/`replace` may return `void` or any promise (was `Promise<boolean>`), so existing implementations fit. They now receive the whole merged search object as their second argument; pass it to the router's `search`.
|
|
731
|
+
- `UIRouter.useUIRouter()` also returns `updateSearch((search) => next)`, which replaces the current search with `next` through the provider's `replace(".", next)`. `search` already includes writes not yet reflected in `searchString`, so several updates in one handler or render compose; returning `search` unchanged writes nothing. Use it instead of calling `replace` directly when writing search keys next to `useFilters`/`useSorting`.
|
|
732
|
+
- **Still compiles:** apps with their own copy of the `ui` translation namespace must add the new keys listed in [Translations](#translations); missing ones render as raw keys.
|
|
733
|
+
|
|
734
|
+
### Form binding and shared input props
|
|
735
|
+
|
|
736
|
+
- `as` → `layout` on every input and `FormField` (on `RichTextEditor` with _no hint_).
|
|
737
|
+
- `errorMessage` → `error`. In 5.x `errorMessage` won over `error` on `Input`, `PasswordInput`, `TextArea` and `NumberField`, and the date and time pickers ignored it.
|
|
738
|
+
- `description` → `helperText`; 5.x never rendered `description`.
|
|
739
|
+
- `isHeaderHidden` → `hideLabel`.
|
|
740
|
+
- `isHidden` is gone (it had no effect): render the input conditionally.
|
|
741
|
+
- `autoFocusOnMount` → `autoFocus` on `Input`, `PasswordInput`, `NumberField` and `NumberRangeInput`.
|
|
742
|
+
- `disabled`, `required` and `readOnly` → `isDisabled`, `isRequired` and `isReadOnly` (_no hint_).
|
|
743
|
+
- `validate`, `validationBehavior` and `validationState` are gone (_no hint_): validate through the form's `zodSchema`, and mark a field with `error` or `isInvalid`.
|
|
744
|
+
- `headerProps` is gone from `Input`, `PasswordInput`, `NumberField` and `Autocomplete` (_no hint_; 5.x overwrote it), and `todayIcon` from `Input` and `PasswordInput` (it had no effect; the date pickers keep theirs).
|
|
745
|
+
- `Input`, `PasswordInput` and `TextArea` accept only the props they use. `onClick` → `onFocus` (or `action` for a button in the field), `style` → `className` or `inputClassName`, and `min`/`max` → `NumberField` with `minValue`/`maxValue`. Other HTML attributes and DOM handlers (`step`, `tabIndex`, `title`, `onMouseDown`, …) fail with _no hint_; 5.x dropped them at runtime, except `autoCapitalize`, which has no replacement.
|
|
746
|
+
- `Autocomplete` accepts the same props as `Input`, minus `value`, `defaultValue`, `onChange` and `type`. In 5.x it passed other HTML attributes and DOM handlers (`tabIndex`, `title`, `onMouseDown`, `autoCapitalize`, …) to its `<input>`; they now fail with _no hint_ and have no replacement. `renderStaticInput` fails with a hint: `Autocomplete` is always live.
|
|
747
|
+
- `name` is gone from `NumberRangeInput` and `TimePicker` (it never submitted anything): bind them with `field={{ form, name }}`. `name` on `DatePicker`, `DateTimePicker`, `DateRangePicker` and `Select` fails with the same hint.
|
|
748
|
+
- `Autocomplete`: `name` is removed (it now fails with a hint). It used to submit the label text in single mode and only the unfinished typed text in multiple mode, never the ids or chips. Bind it with `field={{ form, name }}`.
|
|
749
|
+
- `useForm({ onSubmitAsync })` → `validateOnSubmitAsync`, which resolves `{ fields: { [path]: message } }` or `undefined`. In 5.x a truthy return blocked the submit silently; submit handlers belong in `form.handleSubmit(onValid)`. `onSubmit` on `useForm` fails with a hint pointing to `<form onSubmit={form.handleSubmit(onValid, onInvalid)}>`.
|
|
750
|
+
- Binding `NumberField`, a single `Select`, `Autocomplete`, `DatePicker`, `TimePicker`, `DateTimePicker` or another input that writes `null` when cleared to a zod `.optional()` (not nullable) field fails with "This input writes null when cleared: make an optional field .nullable() or .nullish(), not .optional()". Change the schema to `.nullable()` or `.nullish()`.
|
|
751
|
+
- `action` on `Input` and `NumberField`: `{ icon, onClick, altText }` → `{ icon, label, onPress, className? }`.
|
|
752
|
+
- Each `<Name>Props` is now the union `Standalone<Name>Props | Controlled<Name>Props`, so `interface X extends InputProps` fails (TS2312). Type a wrapper that forwards `value`/`onChange` with `Standalone<Name>Props`. A wrapper that forwards `field` can use `<Name>Props` or `Controlled<Name>Props` without a type argument, which accepts any form but does not check the path; to keep path and value checks, make it generic: `<T extends Record<string, unknown>>(props: InputProps<T>)`. A generic `Select` or `Autocomplete` wrapper passes its key type explicitly (`<Select<T> {...props} />`, `<Autocomplete<T> {...props} />`); without it TypeScript cannot match the generic key and reports an error about `mapInitialToSelectItem`. The bound form widens literal ids to `string`/`number` on purpose, so that `as const` items can bind to a `string` or `number` field. To drop or preset a prop of a union props type, use `OmitDiscriminatedUnion<Props, K>` from `@povio/ui/types`, not `Omit`, which merges the union. Their type parameters list the value or key type first and the form values last, with a default: `CheckboxGroupProps<TKey, TFieldValues>` and `RadioGroupProps<TKey, TFieldValues>` (5.x: `<TFieldValues>`), `SliderProps<IsRange, TFieldValues>` (5.x: `<TFieldValues, IsRange>`).
|
|
753
|
+
- `InputVariantProps["as"]` (`@povio/ui/input-styles`) → `InputVariantProps["layout"]`. `FormFieldProps` from `@povio/ui/form-field` is now the full props of the `FormField` component.
|
|
754
|
+
|
|
755
|
+
**Still compiles:**
|
|
756
|
+
|
|
757
|
+
- `autoFocus` mounts the interactive control at once, even with static rendering, and focuses it once after mount. In 5.x `autoFocusOnMount` focused the field whenever its live control mounted, including when the pointer passed over it, and plain `autoFocus` did nothing on `Input` and `TextArea`.
|
|
758
|
+
- `isInvalid` without `error` now marks `TextArea`, `NumberField`, `NumberRangeInput`, `Checkbox`, `CheckboxGroup`, `RadioGroup` and the date and time pickers invalid; 5.x replaced it with `!!error`.
|
|
759
|
+
- `isRequired` on `Checkbox` and `CheckboxGroup` no longer sets the native `required` attribute, which made the browser block the submit without a message. `RadioGroup` now sets `aria-required`. Enforce required values in the schema.
|
|
760
|
+
- A `<form>` holding a field bound with `field` gets `noValidate`, so the browser's own checks (`type="email"`, `minLength`, `pattern`) no longer block the submit with a browser bubble before the schema runs. In 5.x the schema's message for such a field never showed. Put every rule in the schema; forms with only standalone inputs keep the browser's checks.
|
|
761
|
+
- `hideLabel` (and `UIConfig.input.hideLabel`) no longer hides the option labels of a `CheckboxGroup`. On `floating` and `filter` fields it now also hides the label drawn inside the field; it stays the accessible name.
|
|
762
|
+
- A bound field that holds an object or an array (a range, a multiple selection) shows its first nested schema error, such as `range.start`, after a submit attempt. A required range with per-side schema errors can now submit once it is filled: mount validation no longer leaves errors on nested paths.
|
|
763
|
+
- Mount validation no longer writes schema errors into `fieldMeta`: until a field is touched or a submit runs, an invalid form carries one form-level `errorMap.onMount` marker, so `form.state.errors` is `["invalid"]`. `canSubmit` and `isValid` are unchanged. Show errors through the bound input or `BoundField`, not from `fieldMeta` right after mount.
|
|
764
|
+
- `form.handleSubmit(onValid, onInvalid)`: `onInvalid`'s first argument is `{ [fieldPath]: firstError }` (`FormFieldErrors`, exported from `@povio/ui/tanstack/form`) for every invalid field, nested paths included. In 5.x it was TanStack's form-level errors array, usually `[]`.
|
|
765
|
+
- `field.onBlur`, touched and autosave now run on real focus loss for bound `DatePicker`, `TimePicker`, `DateTimePicker`, `DateRangePicker`, `NumberRangeInput` and `RichTextEditor`, where they never ran before. Moving between the two sides of a range (or into its calendar) is not focus loss: the standalone `onBlur` of `NumberRangeInput` and `DateRangePicker` now fires once when focus leaves the whole range, not once per side. A bound mobile `Select` runs them when focus leaves its trigger; a pick in the sheet still only commits (touched, no `field.onBlur`).
|
|
766
|
+
- Non-generic wrapper types (`InputProps`, `ControlledInputProps`, `SelectProps<string>`, … with no form-values argument) accept any form returned by `useForm`, without checking the path.
|
|
767
|
+
- New `BoundField` (with `BoundFieldProps` and `BoundFieldControl`) in `@povio/ui/tanstack/form` binds a custom control with the library's error reveal, touched and autosave rules. Replace hand-written `form.Field` + `meta.errors` bindings with it.
|
|
768
|
+
- `Input`, `PasswordInput` and `NumberField` submit their value under `name` in a native `<form>`/`FormData` in every mode, including the default static one; `NumberField` submits the raw number and `""` when empty. In 5.x static fields and every `NumberField` were missing from `FormData`.
|
|
769
|
+
- The `tooltipText` info icon is a button named "More information" (new key `ui.moreInfoAlt`). Tab reaches it before the input, also on static fields, and focusing it no longer moves focus into the input.
|
|
770
|
+
- `Switch`, `CheckboxGroup`, `RadioGroup`, `Slider`, `FileInput`, `FileUpload` and the live `Select` link `helperText` and `error` to the control with `aria-describedby` (and `aria-errormessage` where the control takes it). `Switch` sets `aria-required` and `aria-invalid` on its input and gains an `isInvalid` prop. `FileInput` renders a `role="group"` wrapper named by its `label`.
|
|
771
|
+
|
|
772
|
+
### Text and number inputs
|
|
773
|
+
|
|
774
|
+
- `NumberRangeInput` values are `{ start, end }` instead of `{ min, max }` (`NumberRangeValue`), and its side props are `startPlaceholder`, `startLabel`, `startInputClassName`, `onStartChange` and their `end*` counterparts instead of `min*`/`max*`. `minValue` and `maxValue` take numbers only.
|
|
775
|
+
- **Still compiles:** `NumberField` and both `NumberRangeInput` sides call `onChange` on every keystroke with the parsed number (`null` while the text is not a number), then again on commit if the value is clamped or snapped. In 5.x it fired on blur, Enter or stepping, so a bound field now updates and validates while the user types.
|
|
776
|
+
- **Still compiles:** `NumberRangeInput`'s `minValue` and `maxValue` are now the allowed bounds; in 5.x they were the values shown while `value` was empty. Pass starting values as `defaultValue={{ start, end }}`. The standalone input now keeps its own state, so uncontrolled typing is no longer lost on blur.
|
|
777
|
+
- **Still compiles:** in `NumberField` and `NumberRangeInput`, an outside change of `value` while the user types (a `form.reset()`, an undo, an autosave refresh) replaces the typed text, also when it goes back to the value typing started from. In 5.x that case was ignored and the next blur wrote the typed number back.
|
|
778
|
+
- **Still compiles:** `TextArea` passes `rows`, `cols` and `wrap` to the `<textarea>` (5.x dropped them), and its `size` defaults to `UIConfig.input.size`.
|
|
779
|
+
|
|
780
|
+
### Choice and range inputs
|
|
781
|
+
|
|
782
|
+
- `RadioGroup` and `CheckboxGroup`: `options: { label, value }[]` → `items: { id, label, isDisabled? }[]`, typed as `RadioGroupItem<TKey>` and `CheckboxGroupItem<TKey>`. Values hold the item ids with their type, so numeric ids stay numbers.
|
|
783
|
+
- `RadioGroup` and `Slider` no longer take `children` (_no hint_; they were ignored).
|
|
784
|
+
- `Slider` with `isRange`: `value`, `defaultValue`, `onChange` and `onChangeEnd` use `{ start, end }` (`SliderRangeValue`) instead of `[start, end]`; a bound range field holds `{ start, end }`.
|
|
785
|
+
- `isReadOnly` on `Select`, `Slider`, `ToggleGroup`, `FileInput`, `FileUpload` and `RichTextEditor` fails with a hint: show the value as text, or use `isDisabled`.
|
|
786
|
+
- **Still compiles:** a bound `RadioGroup`, `FileInput`, `CheckboxGroup` or `Slider` whose field value is `undefined` (left out of `defaultValues`, `reset()` to `{}`, `setFieldValue(name, undefined)`) renders empty instead of keeping the last selection.
|
|
787
|
+
- **Still compiles:** `Slider` accepts `value={null}`, shown with the thumbs at `minValue`, and a bound `Slider` with a `null` value shows the same.
|
|
788
|
+
- **Still compiles:** a bound `CheckboxGroup` with `allValue={null}` shows a stored `null` as everything checked. With any other `allValue`, `null` shows nothing checked.
|
|
789
|
+
- **Still compiles:** custom `Checkbox` `selectedIcon` and `indeterminateIcon` render inside a wrapper that carries the `checkbox.iconCva` classes, and no longer receive those classes themselves.
|
|
790
|
+
|
|
791
|
+
### Date and time inputs
|
|
792
|
+
|
|
793
|
+
- `AbsoluteDateRangePickerValue` → `DateRangePickerValue`.
|
|
794
|
+
- `TimePicker` and `DateTimePicker` take `minValue`/`maxValue` as a string in the value format (`TimePicker` also `HH:mm`) or as a date value; `null` no longer type-checks, so omit the prop instead.
|
|
795
|
+
- New `useResolveDateRangePreset({ fullIso? })` in `@povio/ui/date-range-presets` (also `@povio/ui/date-range-picker`). Inside components, switch `resolveDateRangePreset(saved.relativeValue)` to `const resolvePreset = useResolveDateRangePreset(); resolvePreset(saved.relativeValue)`; otherwise week presets are a day off in en-US and other non-Monday locales.
|
|
796
|
+
- **Still compiles:** `isReadOnly` on `DatePicker`, `DateTimePicker`, `DateRangePicker`, `TimePicker` and `NumberRangeInput` hides the clear button (even with `isClearable` or `UIConfig.input.isClearable`), disables the picker and Today buttons, blocks segment edits and keeps the popover closed. In 5.x a read-only value could be cleared, typed over or re-picked.
|
|
797
|
+
- **Still compiles:** the pickers render `""` and other unsupported strings (an offset-less timestamp for `TimePicker`/`DateTimePicker`, a full ISO value with `fullIso={false}`, `05/01/2024`) as an empty field with a console warning naming the component, instead of throwing during render. `DatePicker` no longer reads locale-style dates such as `05/01/2024`, which showed the wrong day. This also covers `minValue`, `maxValue` and the `TimePicker` `date` anchor.
|
|
798
|
+
- **Still compiles:** a form whose only bound controls are date pickers or `NumberRangeInput` now gets `noValidate`, like every other bound form.
|
|
799
|
+
- **Still compiles:** static (not yet activated) `DateTimePicker` segments are no longer `role="spinbutton"`; tests must activate the field first (hover or focus, or `renderStaticInput={false}`). The static `NumberRangeInput` links `startLabel` and `endLabel` to their inputs, so `getByLabelText(endLabel)` finds the end input.
|
|
800
|
+
- **Still compiles:** `DatePicker`'s `granularity` defaults to `UIConfig.dateInput.granularity` (5.x always used `"day"`), and `DateTimePicker`'s `className` also styles the interactive control, not only the static frame.
|
|
801
|
+
|
|
802
|
+
### Rich text editor
|
|
803
|
+
|
|
804
|
+
- `RichTextEditor` also takes `defaultValue` now.
|
|
805
|
+
- **Still compiles:** `layout` and `hideLabel` default to `UIConfig.input.layout` and `UIConfig.input.hideLabel`; 5.x always used `default` and `false`.
|
|
806
|
+
- **Still compiles:** `RichTextEditor` no longer calls `onChange`, or dirties a bound field, when it loads content from `value`, the form defaults or `reset()`; `reset()` restores the default (for example `null`) instead of an empty document. Changing `editorClassName` no longer recreates the editor.
|
|
807
|
+
- **Still compiles:** the editable `.tiptap` element is the labelled `textbox` (`aria-labelledby`, `aria-describedby`, `aria-required`, `aria-invalid`), found with `getByRole("textbox", { name })`. The wrapper div no longer carries the id or `aria-labelledby`, and clicking the label focuses the editor.
|
|
808
|
+
- **Still compiles:** the toolbar's list buttons are named "Bulleted list" and "Numbered list" (5.x: "Bold" and "Italic"), and the colour triggers "Text color" and "Highlight color". New keys: `ui.textEditor.lists.bullet`, `ui.textEditor.lists.ordered`, `ui.textEditor.textColor`, `ui.textEditor.highlight`.
|
|
809
|
+
- Load the editor stylesheet only with CSS `@import "@povio/ui/rich-text-editor/styles";` after the theme (see [Rich text editor styles](#rich-text-editor-styles)); a JS/TS `import` fails the build.
|
|
810
|
+
|
|
811
|
+
### File inputs
|
|
812
|
+
|
|
813
|
+
- `FileUpload`: `fileUpload(request, file, { abortController, onUploadProgress })` → `onUpload(file, { signal, onProgress })`, which is required and resolves with `{ id, url? }`; build any request object yourself. `fileRemove({ id })` → `onRemove(file)`, which receives the removed record. A `FileUpload` used as a plain picker, without an upload callback, becomes a `FileInput`.
|
|
814
|
+
- `FileUpload` `value`, `defaultValue`, `onChange` and the bound field hold `UploadedFile[]` (`{ id, name, size?, type?, url? }`), always an array. In 5.x `value` took `FileUploadState` records while `onChange`, `defaultValue` and the field held native files. Seed saved attachments through `value`/`defaultValue` or the form's default values, change bound schemas to an array of records, and stop writing ids from the upload callback.
|
|
815
|
+
- `FileUpload`: `defaultState` → `defaultValue`, `listRenderer` → render-function `children`, `variant` → `orientation`, `as` → `actionStyle` (`"button" | "link"`), `multiple` → `allowsMultiple`. Children replace the whole drop zone content, browse button included, so the zone then accepts drops only.
|
|
816
|
+
- `FileUpload` children receive `{ files, onRemove, onCancel }` with `FileUploadItem`s: `onRemove(item)` and `onCancel(item)` take the item (5.x: an id and an index), and an item has `status` (`"uploading" | "uploaded"`), `name`, `size`, `type`, `url` and `key` instead of `state`, `displayName`, `displaySize`, `displayType` and `src`.
|
|
817
|
+
- `FileInput`: `variant="default" | "nested"` → `buttonPosition="outside" | "inside"`, `multiple` → `allowsMultiple`.
|
|
818
|
+
- `onInvalidFileType` receives an array of file names in both components; single-file mode passed one name.
|
|
819
|
+
- `FileUtils.getFileDisplaySize({ file, displaySize })` → `FileUtils.getFileDisplaySize({ size })`.
|
|
820
|
+
- **Still compiles:** `onChange` runs when an upload finishes or a file is removed. In 5.x it ran with the native files as soon as they were picked, and again on failure or cancel, so bound fields and autosave now update on completion.
|
|
821
|
+
- **Still compiles:** a controlled `value` is the source of truth, so a finished upload disappears unless `onChange` feeds it back. In single-file mode the stored file stays until the new upload finishes (5.x cleared it on selection). A failed upload shows its message as the field error, without the old error rows. A removed file leaves the value before `onRemove` runs, and a rejected `onRemove` becomes the field error. Uploads are cancelled on unmount, on `form.reset()` and when `value` is replaced. The remove button is named "Remove file" (5.x: "Cancel"), which matters for test selectors.
|
|
822
|
+
- **Still compiles:** a form with a bound `FileUpload` no longer submits while an upload runs. `handleSubmit` calls `onInvalid` instead of `onValid`, and the field shows "Wait for the upload to finish" until no upload is running, whether it finished, failed or was cancelled.
|
|
823
|
+
- **Still compiles:** a bound `FileUpload` shows a rejected `onUpload` or `onRemove` message even when a schema error is already showing; the schema error returns after the next pick, drop or remove.
|
|
824
|
+
|
|
825
|
+
### Selection
|
|
826
|
+
|
|
827
|
+
- `Select`: `hasLoadMore` → `hasNextPage`, `onLoadMore` → `fetchNextPage`, together with the new `isFetchingNextPage`; `ignoreInputValueFiltering` → `isClientSearchDisabled`; `containerClassName` → `className` (see the class change below). `showSelectionBar` is gone (_no hint_; it had no effect).
|
|
828
|
+
- `useAsyncList` results: `hasMore` → `hasNextPage`, `loadMore` → `fetchNextPage`, plus `isFetchingNextPage` (_no hint_). A hand-written `list` object needs all three. Pass the item type, `useAsyncList<Item>(…)`, or the items are `unknown` and `Select` rejects the list.
|
|
829
|
+
- Items with an extra `value` key are rejected (the error says to use `id`): map API rows to `{ id, label }`. Item arrays may now be read-only, so `as const` works.
|
|
830
|
+
- `Autocomplete` holds entries instead of a string: `{ id, label }` for a picked suggestion, `{ label }` for typed text and `null` when empty (5.x: `""`), or an array of entries with `selectionMode="multiple"`. Read `value?.label` where the text is needed, wrap stored strings as `{ label }`, and change bound schemas from a string to `z.object({ id: z.string().optional(), label: z.string() }).nullable()`. `multiple` (an ignored HTML attribute in 5.x) → `selectionMode="multiple"`.
|
|
831
|
+
- `ToggleGroup` in single mode takes `disallowEmptySelection` only as a literal: `disallowEmptySelection={flag}` fails with "Type 'boolean' is not assignable to type 'false'" (_no hint_). With `disallowEmptySelection`, `onChange` receives the id itself, never `null`.
|
|
832
|
+
- `DropdownMenu`: `MenuItemDefinition` → `DropdownMenuItem` (_no hint_). `closeDelay` and the item `isMobile` are gone (_no hint_; neither had an effect). `onAction(key, event)` types its event as `MouseEvent | KeyboardEvent | null` instead of `any`. Items take `color: "default" | "error"`.
|
|
833
|
+
- The bound `SelectProps`, `ToggleGroupProps` and `AutocompleteProps` put the form values last: `SelectProps<TKey, TInitialSelectItem, TFieldValues>`, `ToggleGroupProps<TKey, TFieldValues>`, `AutocompleteProps<TKey, TFieldValues>` (5.x bound: `<TFieldValues, …>`).
|
|
834
|
+
- **Still compiles:** `Select`'s `className` styles the field root, the element around the label, field and error, and `inputClassName` the bordered box, as on the other inputs. In 5.x `className` styled the bordered box and `inputClassName` the text input inside it, which has no class prop now. Leave widths on `className`, where they size the label and error too, and move box styles such as border, background, height and padding to `inputClassName`.
|
|
835
|
+
- `selectedKey`, `selectedKeys`, `defaultSelectedKey` and `defaultSelectedKeys` on `Select` and `Autocomplete` fail with a hint: use `value`/`defaultValue`.
|
|
836
|
+
- **Still compiles:** `useAsyncList().reload()` is stable and loads after the next render, with that render's loader, so `isLoading` turns true one commit later. Calling it in the same `field.onValueChange` that changes the loader's inputs now works; drop `useEffect` or `setTimeout` workarounds. A `list` kept from an earlier render also loads with the latest loader.
|
|
837
|
+
- **Still compiles:** a focused, closed, non-searchable `Select` trigger does type-to-pick: letters choose the matching item without opening the list (on a multiple select a letter opens it). Clicking a focused searchable `Select` reopens its list, and the mobile bottom-sheet search supports ArrowDown and Enter.
|
|
838
|
+
- **Still compiles:** the live `Select` trigger links helper and error text through `aria-describedby`, and a searchable desktop `Select` in the default layout is named by its label, so `getByRole("combobox", { name })` finds it.
|
|
839
|
+
- **Still compiles:** a bound `Autocomplete` marks its field touched, and runs autosave, on every pick, chip and clear; 5.x waited for blur.
|
|
840
|
+
- **Still compiles:** `useAsyncList`'s `isLoading` covers the first page and reloads after a search or sort, not the next page (`isFetchingNextPage`). `Select` requests each next page once, and the list ignores next-page calls while one is pending.
|
|
841
|
+
- **Still compiles:** the `Select` and `Autocomplete` popovers grow with their options up to 20rem instead of matching the trigger width, and `DropdownMenu` items now show their hover and focus background.
|
|
842
|
+
|
|
843
|
+
### Overlays
|
|
844
|
+
|
|
845
|
+
- `Dialog`: `onClose` → `onOpenChange`, `dialogClassName` → `className` (the same panel), `aria-label` → `label`. A name is required, `label` or `aria-labelledby` (_no hint_), and so are `children`. `DialogProps` is a union, so `interface X extends DialogProps` fails.
|
|
846
|
+
- `AlertDialog`: the same `onClose`, `dialogClassName` and `aria-label` changes. `primaryAction` → `confirmAction` and `secondaryAction` → `cancelAction`, as on `Confirmation` (`confirmLabel`, `cancelLabel`); `primaryAction` on `PageHeader` and `TabsFilters` is unchanged. Its action objects are exported as `AlertDialogAction` and take `isLoading` and `isDisabled`.
|
|
847
|
+
- `Confirmation`: `confirm({ dialogClassName })` → `className`. `Confirmation.ContextState` follows `AlertDialog`: `confirmAction`, `cancelAction` and `className` instead of `primaryAction`, `secondaryAction` and `dialogClassName`.
|
|
848
|
+
- `Drawer`: `dialogClassName` → `contentClassName` (the same inner element). `trigger` must be an element (_no hint_).
|
|
849
|
+
- `BottomSheet`: `label` is required (_no hint_) and rendered as the header. `containerClassName` → `className`, which styles the sheet surface; `containerClassName` styled the full-screen root. `trigger` must be an element.
|
|
850
|
+
- `Popover`: `sheetLabel` → `label`, `popoverProps={{ placement }}` → `placement`, `popoverClassName` → `className`. `className` styles the visible panel and, below `md`, the bottom sheet, so scope widths with `md:`; `popoverClassName` styled the outer positioned element, on desktop only.
|
|
851
|
+
- `solid` and `outline` are gone from the `variant` of `AlertDialog` actions and from `Confirmation`'s `confirmVariant` and `cancelVariant` (_no hint_); use `contained` and `outlined`.
|
|
852
|
+
- **Still compiles:** a `Drawer` now closes on an outside press, like the other overlays; pass `isDismissable={false}` to keep the 5.x behaviour.
|
|
853
|
+
- `AlertDialog`: `titleClassName` → `headingClassName` and `titleTypography` → `headingTypography`, named after `heading`. `role` is no longer accepted (hint: it is always `alertdialog`; use `Dialog` with `role`).
|
|
854
|
+
- `Dialog` gains `role` (`"dialog" | "alertdialog"`) and `aria-describedby`. `confirm()` takes `onConfirm: () => promise`: the dialog stays open with a loading confirm button while it runs, then `confirm()` resolves `true`, or rejects with its error after closing. Use it instead of a separate `AlertDialog` for a pending state.
|
|
855
|
+
- **Still compiles:** `AlertDialog` and `confirm()` prompts are `role="alertdialog"` (was `dialog`) and are described by `description`. Update tests that query `getByRole("dialog")` for them to `getByRole("alertdialog")`.
|
|
856
|
+
- **Still compiles:** queued `confirm()` prompts each mount a fresh dialog, which takes focus and is announced; a second Enter no longer accepts the next prompt.
|
|
857
|
+
- **Still compiles:** the `Dialog` and `Drawer` panels no longer carry `w-fit`, so numeric widths such as `w-96` in `className` take effect. Any width class in an `AlertDialog`'s `className` now beats its default `w-modal`; in 5.x `w-modal` won over most of them.
|
|
858
|
+
|
|
859
|
+
### Status
|
|
860
|
+
|
|
861
|
+
- `Alert` and `Toast`: `color="neutral"` → `color="secondary"`, the name `Badge`, `Tag` and the buttons use for the neutral grey. `useToast`: `neutralToast` → `secondaryToast`.
|
|
862
|
+
- Toast action objects: `text` → `label`. `ToastOptions.closeButton` takes only a boolean (_no hint_).
|
|
863
|
+
- `Progress`: `progress` → `value`, on a 0–100 scale. `aria-label` fails with a hint: use the new `label`, with `hideLabel` to keep it off screen.
|
|
864
|
+
- `Progress`: `valueLabel` → `valuePosition` (values unchanged: `trailing`, `leading`, `none`), so it no longer clashes with React Aria's `valueLabel` text; `valueLabel` fails with a hint. The `progress.cva` variant key `valueLabel` is now `valuePosition`.
|
|
865
|
+
- `Spinner`: `size="l"` → `size="lg"`.
|
|
866
|
+
- `Alert` gains `role` (`"alert" | "status"`, no default): set it on Alerts that appear at runtime.
|
|
867
|
+
- **Still compiles:** `Progress` is a React Aria progressbar (`role`, `aria-valuenow`/`min`/`max`/`valuetext`) and clamps `value` to 0–100. Name it with `label` (plus `hideLabel`) or `aria-labelledby`; an unnamed `Progress` logs React Aria's dev warning. It also takes `className`.
|
|
868
|
+
- **Still compiles:** toasts default to the `bottom-right` corner (5.x: `top-right`). Set `UIConfig` `toast.position` to keep the old corner.
|
|
869
|
+
- **Still compiles:** `useToast` honours `options.toastId` (5.x replaced it with a generated id), so a toast with the id of one still on screen is not shown again, and `closeToast(toastId)` closes it.
|
|
870
|
+
- **Still compiles:** the wrapper `Tooltip` adds for `isNonInteractiveTrigger` has `max-w-full`, so a truncated child keeps truncating and `TooltipEllipsis` no longer loops.
|
|
871
|
+
- **Still compiles:** a toast with `actions` no longer closes after 2.5 s. It shows a close button and stays until the user closes it or presses an action, which now also closes it; pass `{ autoClose }` to time it out. Any toast with `autoClose: false` gets the close button too.
|
|
872
|
+
- **Still compiles:** `Spinner` applies `className` to its wrapper only; 5.x applied it to the wrapper and the icon, doubling margins and opacity.
|
|
873
|
+
|
|
874
|
+
### Buttons, badges and text
|
|
875
|
+
|
|
876
|
+
- `Button`, `IconButton` and `ToggleButton`: `fullWidth` → `width="fill"`, `startIcon` → `icon`, `endIcon` → `icon` with `iconPosition="right"`, `noDisableWhenLoading` → `disableWhileLoading={false}`, and `loading` → `isLoading` (_no hint_). `isPending` → `isLoading`: React Aria's pending state kept the button focusable without a spinner, while `isLoading` shows the spinner and disables the button. `className` takes only a string.
|
|
877
|
+
- `variant="solid"` and `variant="outline"` → `contained` and `outlined` on every button and on `Badge` (_no hint_).
|
|
878
|
+
- `IconButton`: `ariaLabel` → `label` or `aria-label` (_no hint_).
|
|
879
|
+
- `SplitButton`: `isPending` is gone (_no hint_), `className` takes only a string, and `items` are `DropdownMenuItem`s. Its main button text is `label`; `children` fails with a hint.
|
|
880
|
+
- `BadgeButton` → `Badge`: add `as="button"`, or `as="toggle"` instead of `toggle` (hint: Use `as="toggle"`). `icon`, `iconPosition`, `contentRef`, `color`, `variant` and the press and toggle props carry over, and `UIOverrides` still styles it through `badgeButton`. `dismissable` has no counterpart (use `icon={X} iconPosition="right"`, or a display badge with `onRemove`), and `style` is gone.
|
|
881
|
+
- `Badge` and `Tag`: `onDismiss` → `onRemove`, and drop `dismissible`. With _no hint_: drop `dismissable`, and `disabled` → `isDisabled`, `dismissButtonProps` → `removeButtonProps`, `onPress` as the remove handler → `onRemove`.
|
|
882
|
+
- Toggle badges take `onChange`, not `onPress` (hint). On a display badge, `onPress` and `onChange` fail with hints naming `as="button"` and `as="toggle"`.
|
|
883
|
+
- **Still compiles:** `onRemove` alone renders the remove button; 5.x also needed `dismissible`.
|
|
884
|
+
- **Still compiles:** `as="toggle"` defaults to `variant="outlined"` (5.x: `contained`); pass `variant="contained"` for the old look. Selected contained badges show a ring, and selected secondary badges fill with `primary`. Check custom `badgeButton.cva` `selected:` overrides.
|
|
885
|
+
- **Still compiles:** the `Tag`/`Badge` remove button is named "Remove <text>" (5.x: "Dismiss"), and an `aria-label` in `removeButtonProps` now replaces it instead of being overwritten. After a removal that took focus with it, focus moves to the neighbouring remove button.
|
|
886
|
+
|
|
887
|
+
### Navigation
|
|
888
|
+
|
|
889
|
+
- `Accordion` items: `heading` → `label`, `subheading` → `description`; `disabled` → `isDisabled` on items and on `Accordion` (_no hint_).
|
|
890
|
+
- `Stepper`: `steps` → `items` with `label` and `description` (were `title` and `subtext`), `iconsOnly` → `iconOnly`, `titlesOnly` → `labelsOnly`, `onStepClick` → `onStepPress`.
|
|
891
|
+
- `SidebarWorkspaces`: `selectedKey`, `defaultSelectedKey` and `onSelectionChange` → `value`, `defaultValue` and `onChange`; items `name` → `label`. `value` may be `null`, and the component is generic over the id type (`SidebarWorkspaceOption<MyId>[]` types `onChange`).
|
|
892
|
+
- `SidebarItem` no longer takes `isPending`: show progress on the page.
|
|
893
|
+
- `PageHeader`: `size="compact"` → `size="sm"`.
|
|
894
|
+
- **Still compiles:** `Breadcrumbs` items collapsed into the "…" menu navigate to their `link`; in 5.x they only ran `onAction`.
|
|
895
|
+
|
|
896
|
+
### Table
|
|
897
|
+
|
|
898
|
+
- `onRowClick` → `onRowAction`, `onDoubleClick` → `onRowDoubleClick`.
|
|
899
|
+
- `setSorting`, `setColumnOrder`, `setColumnVisibility`, `setColumnPinning`, `setColumnSizing` and `setExpanded` → `onSortingChange`, `onColumnOrderChange`, `onColumnVisibilityChange`, `onColumnPinningChange`, `onColumnSizingChange` and `onExpandedChange`. They receive a value or an updater, so a state setter still fits. Spreading `useSorting()` into the table (`<Table {...sorting} />`) now fails: pass `sorting={sorting} onSortingChange={setSorting}`.
|
|
900
|
+
- `defaultSelectedRows` → `rowSelection` with `onRowSelectionChange` to control the selection, or `defaultRowSelection` for the initial one. `rowSelection` is controlled whenever it is set, so without `onRowSelectionChange` it is read-only.
|
|
901
|
+
- `ColumnConfigModal`: `onClose` → `onOpenChange`. `isOpen` is optional, and `trigger` opens it as on `Dialog`.
|
|
902
|
+
- `@povio/ui/tanstack/table` now exports `ColumnDef`, `Row`, `BulkSelectionActionsComponent` and TanStack's state types; its `ColumnDef<Row>` is `@tanstack/react-table`'s `ColumnDef<StockFeatures, Row>`, so existing column types keep working.
|
|
903
|
+
- Apps with their own `ui.table.*` translations: `column` and `show` are gone; the column config and the selection column use new keys (`showAll`, `visibleCount`, `reset`, `done`, `selectAllRows`, `selectRow`, …).
|
|
904
|
+
- **Still compiles:** plain tables no longer select rows on click. In 5.x every table was selectable, and clicking a row toggled a single selection; now selection needs `enableRowSelection`.
|
|
905
|
+
- **Still compiles:** `enableRowSelection` is multi-select by default (5.x: single) and renders a leading checkbox column with select-all. Delete hand-written checkbox columns and any select-all inside `bulkSelectionActions`, and add `enableMultiRowSelection={false}` where one row at a time is intended. While rows are selected the header shows the select-all checkbox, then `bulkSelectionActions`; without `enableRowSelection` the actions never appear.
|
|
906
|
+
- **Still compiles:** headers are sortable only when `onSortingChange` is passed; in 5.x headers looked sortable without it but did nothing. `onRowAction` also runs on Enter in a cell. With `columnOrder`, the table's own drag, selection and expand columns stay first.
|
|
907
|
+
- **Still compiles:** `ColumnConfigModal` is a sortable checkbox list with "Show all", a visible count, "Reset" (with `onReset`) and "Done", instead of a drag-and-drop table.
|
|
908
|
+
- `Table` and `InfiniteTable` take `isLoading` (a spinner row in place of the rows, `aria-busy` on the table) and `emptyState` (any node). `loading` and `emptyText` fail with hints naming them. Pass the query's `isLoading` instead of rendering your own spinner in place of the table; keep your own error branch, since the table has no error state.
|
|
909
|
+
- **Still compiles:** a table with no rows (and not loading) shows a translated "No results" row; 5.x showed only the header.
|
|
910
|
+
- **Still compiles:** headers that can't sort (no `onSortingChange`, or `enableSorting: false`) are plain text, not buttons; query them with `getByRole("columnheader", …)`.
|
|
911
|
+
- **Still compiles:** body cells use a roving tabindex: one cell is the Tab stop, Up/Down from a widget in a cell move to the cell above or below, and Left/Right step through the cell's widgets, then to the next cell. Text fields keep their arrow keys. Hand-built grids using `useTableNav` should give one cell `tabIndex={0}`.
|
|
912
|
+
- **Still compiles:** drag handles in `enableDragDrop` tables and `ColumnConfigModal` work with the keyboard (Space picks up, arrows move one slot, Space or Enter drops, Escape cancels without closing the modal). The row handle is named "Reorder row N" (was "Drag handle"). A numeric `getRowId` now reaches `onReorder`.
|
|
913
|
+
- **Still compiles:** `ColumnConfigModal` no longer lists columns with `enableHiding: false`, and `useTableColumnConfig`'s `columns` always includes them; set it on utility columns such as row actions. Columns missing from a saved `columnOrder` go last (5.x: first).
|
|
914
|
+
- **Still compiles:** `InfiniteTable` fetches the next page again while its end stays in view after a page loads, so short pages no longer stall. A page that adds no rows (a failed fetch) is retried only when the end scrolls back into view, not in a loop.
|
|
915
|
+
- **Still compiles:** column resize separators always carry `aria-valuenow`, and the `onRowAction`/`onRowDoubleClick` parameter is named `item` (the same row item).
|
|
916
|
+
- **From the 5.1 table engine (`5.1.0-rc`):** the same renames apply (`onRowClick`, `onDoubleClick`, the `set<X>` props, `defaultSelectedRows`), and `emptyContent` → `emptyState` on `Table` and `InfiniteTable`. `defaultSelectedRows` with `onRowSelectionChange` was the controlled selection: pass it as `rowSelection`. In `UIConfig.table`, `followDefaultSelectedRows` → `followDefaultRowSelection` and `infiniteEmptyContent` → `infiniteEmptyState` (_no hint_). `RowDragHandleCell` takes an optional `label` (default "Drag handle"); the built-in handle is named "Reorder row N". The `fileUpload.content*Cva` recipes variant `orientation` and `actionStyle` (were `variant` and `as`) and have no `error` content.
|
|
917
|
+
- **Still compiles (5.1 table engine):** the engine's defaults are now 6.0's: a spinner row instead of skeleton rows, a "No results" row, the built-in checkbox column, multiple selection, rows selectable only with `enableRowSelection`, plain unsortable headers, the roving cell Tab stop and the checkbox list in the column dialog. Headers sort only with `onSortingChange`, and `ColumnConfigModal` / `ColumnConfigPopover` show the pinning zones only with `layout="pinning"`. Set the `UIConfig.table` options in [Table defaults in `UIConfig`](#table-defaults-in-uiconfig) once to keep the 5.1 behaviour.
|
|
918
|
+
|
|
919
|
+
### Hooks
|
|
920
|
+
|
|
921
|
+
- `useSorting(defaultSorting, prefix)` → `useSorting({ defaultSorting, prefix })`, and `useFilters(defaultValues, prefix, schema)` → `useFilters({ defaultValues, prefix, schema })` (_no hint_: "Expected 0-1 arguments").
|
|
922
|
+
- `useFilters`: `filterData` is `Partial<T>`. The filter type comes from `schema`, no longer from `defaultValues`, and `schema` must be a `z.object(…)` whose output is the filter type (unwrap an optional or nullable schema).
|
|
923
|
+
- `useFilters<T>()` without `schema` fails with a hint ("Pass `schema`…"): pass a `z.object` schema and drop the type argument. Untyped `useFilters({ prefix })` returns `unknown` values. A `schema` typed as possibly `undefined` fails with a hint ("A `schema` that may be `undefined` matches neither form…"): branch on it and call `useFilters` with or without `schema`, or always pass one.
|
|
924
|
+
- **Still compiles:** prefixed filter URL keys changed from `filter[<prefix>-<key>]` to `filter[<prefix>][<key>]`; unprefixed keys stay `filter[<key>]`. Update hand-written links, redirects and bookmarks: old prefixed links are ignored. Prefixes and keys contain no `[` or `]`. Give every store on a page its own prefix.
|
|
925
|
+
- **Still compiles:** `useSorting` keeps a sort found in the URL; in 5.x `defaultSorting` replaced it, overwriting reloaded and shared links. It also follows URL changes after mount (back/forward, links, `ListTabs`), falling back to `defaultSorting`.
|
|
926
|
+
- **Still compiles:** several `setFilterValue` calls in one handler compose (5.x kept only the last), and default filters are no longer lost when `useSorting` or another `useFilters` writes the URL in the same mount. `z.date()` filters round-trip through the URL as ISO text.
|
|
927
|
+
- **Still compiles:** `useFilters` reads and clears only the keys of its own `prefix`, also without a prefix, and returns them without the prefix (5.x returned `"<prefix>-<key>"` keys and saw other prefixes' filters). Values are decoded once; with a `schema`, keys outside it and values that fail their field are left out, and the parsed value is kept. In 5.x numbers, arrays, objects and `"true"`/`"false"` were JSON-parsed whatever the schema said, and malformed JSON threw during render.
|
|
928
|
+
|
|
929
|
+
### UIConfig and UIOverrides
|
|
930
|
+
|
|
931
|
+
- `UIConfig.input.as` → `UIConfig.input.layout` (_no hint_). A configurator-saved `src/styles/ui-configuration.json` with the old `input.as` is read as `input.layout`, and the next save drops `as`.
|
|
932
|
+
- `UIConfig.alertDialog.titleTypography` → `UIConfig.alertDialog.headingTypography` (_no hint_: an object literal fails with an unknown-property error, and a config object that is not a literal loses the old key silently).
|
|
933
|
+
- `UIConfig.select.selectionMode` is gone: set `selectionMode` on each `Select`.
|
|
934
|
+
- `UIConfig.select.renderStaticInput` is gone: `Select` follows `UIConfig.renderStaticInput` and its own `renderStaticInput` prop.
|
|
935
|
+
- New `UIConfig.Config` type for partial configs (`const config: UIConfig.Config = { table: { rowDetailsMode: "split" } }`), and `UIConfig.ProviderProps`. Replace `Partial<UIConfig.Options>`, which rejects partial sections.
|
|
936
|
+
- `UIOverrides` slot names are unchanged, but some recipe variants changed. Override configs are not type-checked against variant names or values, so a stale key compiles and has no effect:
|
|
937
|
+
- `button.cva` and `badgeButton.cva` no longer have the `solid` and `outline` variant values (_no hint_).
|
|
938
|
+
- `dropdownMenu.itemCva` keeps its colours in a new `color` variant (`default`, `error`) instead of `base`; move colour overrides to `variants.color.default` (_no hint_).
|
|
939
|
+
- `fileUpload.dropZoneCva`: the `variant` variant is now `orientation` (_no hint_).
|
|
940
|
+
- Recipes keyed by input layout name that variant `layout`, like the prop (_no hint_): `input.baseCva`, `input.sizeCva`, `input.contentWrapperCva`, `input.clearClassCva`, `radio.contentWrapperCva`, `radio.contentRowCva`, `checkbox.contentWrapperCva`, `checkbox.contentRowCva`, `checkbox.groupLabelCva`, `label.cva` and the `label.typography` mapper. Rename `variants.as`, `compoundVariants[].as` and `defaultVariants.as` to `layout`. The exported style definitions and `LabelBaseProps` change the same way. A configurator-saved `ui-configuration.json` has these recipes' `as` keys (and `progress.cva`'s `valueLabel`) read as `layout` (`valuePosition`) when it loads; re-save it from the 6.0 configurator. Hand-written `UIOverrides` still need the manual rename.
|
|
941
|
+
- `alert.cva`, `toast.cva`, `status.iconCva` and `status.separatorCva`: the `neutral` colour is now `secondary`, with the same classes, and so are the matching exported definitions (`alertDefinition`, `toastDefinition`, `statusIconDefinition`, …). Rename `neutral` in `variants.color`, compound variants and `defaultVariants`, in TypeScript overrides and configurator-saved slots alike (_no hint_): an `overrideCva` recipe that still says `neutral` leaves `color="secondary"` unstyled.
|
|
942
|
+
- For code that composes the exported definitions: `fileInputButtonDefinition` and `fileInputDropZoneDefinition` key `variant: default | nested` as `buttonPosition: outside | inside`, `spinnerWrapperDefinition` sizes are `default` and `lg` (was `l`), and `spinnerDefinition` no longer has sizes.
|
|
943
|
+
|
|
944
|
+
### Removed and renamed types
|
|
945
|
+
|
|
946
|
+
- `AbsoluteDateRangePickerValue` → `DateRangePickerValue`, `MenuItemDefinition` → `DropdownMenuItem`.
|
|
947
|
+
- `@povio/ui/file-upload`: `DefaultFile` → `UploadedFile`, `FileUploadState` → `UploadedFile` for values and `FileUploadItem` for children, `FileUploadResponse` → `FileUploadResult`; `FileUploadRequest` and `FileUploadError` are gone. `FileUploadContainerProps`, `FileUploadBaseProps` and `FileInputBaseProps` → `StandaloneFileUploadProps` and `StandaloneFileInputProps`.
|
|
948
|
+
- Entries export public types only. The internal `*Component`, `*Inner` and `*Base` exports (`InputComponent`, `SelectInner`, `CheckboxBase`, `TextEditorBase`, …) are gone, and so are `SelectBaseProps` and `SelectDataProps` from `@povio/ui/select`, `MenuItem` and `MenuListItemProps` from `@povio/ui/dropdown-menu`, and `MenuPopover` and `MenuPopoverProps` from the barrels.
|
|
949
|
+
- `DialogProps`, `BadgeProps` and the input `<Name>Props` are unions: use `Standalone<Name>Props`/`Controlled<Name>Props`, or intersect with `&`, instead of `interface … extends`. To drop or preset one of their props, use `OmitDiscriminatedUnion<Props, K>` from `@povio/ui/types`; `Omit` merges the union, and the spread then fails with an error about `field`, `selectionMode`, `as` or `label`.
|
|
950
|
+
- `FormSubmitErrorHandler` is `(errors: FormFieldErrors<TValues>, values: TValues) => unknown`.
|