@povio/ui 6.0.0-rc.12 → 6.0.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +523 -42
- package/dist/{Accordion-ORBin0EZ.js → Accordion-BNHpv7Zj.js} +42 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/Alert-xHGPLUpt.d.ts +36 -0
- package/dist/AlertDialog-CKcUZ6l9.d.ts +70 -0
- package/dist/Autocomplete-CkWTSFoj.d.ts +123 -0
- package/dist/Autocomplete-CrNDRxvg.js +319 -0
- package/dist/Badge-B25YEMEw.d.ts +67 -0
- package/dist/BottomSheet-CtcPZG82.d.ts +65 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-tUXH3NjS.js} +9 -9
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-DuwAJSaI.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-BrtRh_dX.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-D8WXqOLN.js} +36 -20
- package/dist/{Button-BaODzvZd.js → Button-C1Jv1Plk.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-DDuk3hJ3.d.ts} +2 -2
- package/dist/{Button-C1YB5dOw.js → Button-DF6sbTuF.js} +3 -7
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-BYJz1JkH.js} +12 -20
- package/dist/ButtonBase-Bn_FT89h.d.ts +47 -0
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DdneUEhM.js} +71 -35
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-BY0kLoYH.js} +7 -7
- package/dist/Checkbox-Bwl6MA-V.d.ts +49 -0
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-E2bns_n0.js} +40 -14
- package/dist/CheckboxCheckmark-Beu8T1g9.js +42 -0
- package/dist/CheckboxGroup-0rzsn-bA.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-C7epIEpW.js} +75 -35
- package/dist/ColumnConfigContent-LNq-6Brf.js +1025 -0
- package/dist/ColumnListContent-Dzze5R7T.js +133 -0
- package/dist/DatePicker-B70SCKfT.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-BU-34fCk.js} +117 -46
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-BCuz08Ws.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-CMEJmZSQ.js} +41 -30
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-D0RtqeBM.js} +90 -162
- package/dist/DateRangePicker-jovxcWGk.d.ts +102 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-Cbdt76CL.js} +94 -40
- package/dist/DateTimePicker-Cfi3ruFy.d.ts +83 -0
- package/dist/Dialog-BWNQjIgo.d.ts +66 -0
- package/dist/{Dialog-C9H9_BmK.js → Dialog-Bpwr1nuy.js} +15 -15
- package/dist/{Dialog-DN5703sy.js → Dialog-ebjPH22i.js} +23 -19
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-D_aym2zh.js} +3 -3
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-3V-G7fZ7.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-C4WitobV.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-BM7659Sk.js} +14 -8
- package/dist/{FileInput-BUwtAF2-.js → FileInput-Bc_E1M1X.js} +76 -81
- package/dist/FileInput-CWRW7OzZ.d.ts +61 -0
- package/dist/{FileTrigger-DlryDp2T.js → FileTrigger-tGSUFrb2.js} +6 -6
- package/dist/FileUpload-DVnp9xxv.d.ts +181 -0
- package/dist/FileUpload-Dk6ZmgWF.js +1105 -0
- package/dist/{Form-CqF1SaVw.js → Form-4jZarkjk.js} +2 -2
- package/dist/FormField-BgiWLGjf.d.ts +70 -0
- package/dist/{FormField-dduTMkNH.js → FormField-DOZ7eXjA.js} +11 -11
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DW9sqJWl.js +22 -0
- package/dist/{Heading-D4XFYv__.js → Heading-B9G3z6Es.js} +2 -2
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-Bjjf5cQL.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CcdpMJa6.js} +1 -1
- package/dist/{Input-BG0Xjw5X.js → Input-BkR3jkvt.js} +2 -2
- package/dist/{Input-CG5LQ0zs.js → Input-CvYyjMWx.js} +95 -60
- package/dist/Input-lppNS8wM.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B5YjsLDE.js} +15 -13
- package/dist/InputContent-Bgalf6R1.d.ts +39 -0
- package/dist/{Label-BGvF9vWx.js → Label-VTcaaLO8.js} +2 -2
- package/dist/{Link-Chux-Clm.js → Link-8zP_NC_c.js} +2 -2
- package/dist/Link-HJ4y-xiW.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-Ck-B1Jae.js} +9 -9
- package/dist/{Modal-DcLWF9cB.js → Modal-xT-Wz5GH.js} +3 -3
- package/dist/{NumberField-DxuikBcr.js → NumberField-BXLzNb2T.js} +92 -63
- package/dist/NumberField-Q-4y3jpb.d.ts +41 -0
- package/dist/{NumberFormatter-DYarfm5F.js → NumberFormatter-D5csbNXm.js} +1 -1
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BBzZCC54.js} +153 -102
- package/dist/NumberRangeInput-DuWOdSdU.d.ts +89 -0
- package/dist/{OverlayArrow-DF0jMwul.js → OverlayArrow-BptI-A_7.js} +2 -2
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-jVaC3Z9L.d.ts} +6 -5
- package/dist/PasswordInput-DtTnGHRD.d.ts +16 -0
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-U0QhNsMp.js} +6 -6
- package/dist/Popover-ClCEOP3e.d.ts +51 -0
- package/dist/Progress-DlXY0dv_.js +180 -0
- package/dist/Progress-VkkXbIh7.d.ts +26 -0
- package/dist/ProgressBar-mpNpV7ow.js +46 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-BPPJyA1s.js} +72 -32
- package/dist/RadioGroup-BbcrP56w.d.ts +52 -0
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DIVjIl0T.js} +12 -10
- package/dist/Select-D1qIWZCv.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-DlbVDCz8.js} +452 -191
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-CCr5YY86.js} +55 -43
- package/dist/{SelectionIndicator-C3hniBa2.js → SelectionIndicator-CvuKjZRP.js} +3 -3
- package/dist/{SharedElementTransition-CZ2bE7yo.js → SharedElementTransition-BkyYit3Q.js} +2 -2
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-CIpFJGOa.js} +283 -366
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-DcwA_jv7.d.ts} +31 -17
- package/dist/Slider-CLViwkE1.d.ts +57 -0
- package/dist/{Slider-DCsCCPFx.js → Slider-_RsgBJcg.js} +72 -15
- package/dist/Spinner-GMEauCHv.d.ts +13 -0
- package/dist/SplitButton-BdP4xjFQ.d.ts +25 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-D4z7JNsD.js} +116 -88
- package/dist/Stepper-DBb0qfla.d.ts +49 -0
- package/dist/{Switch-BfpSMMpv.js → Switch-Bi3_bUw1.js} +56 -14
- package/dist/Switch-DCxONL2Q.d.ts +42 -0
- package/dist/TableDnd-CG1yOlxh.js +238 -0
- package/dist/TableDragHandle-CXApnuUm.js +51 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-BPogry73.js} +46 -35
- package/dist/TabsFilters-CPfGBODw.d.ts +59 -0
- package/dist/Tag-xhcJOv_X.d.ts +26 -0
- package/dist/{Text-D72yc4S6.js → Text-D7Nqkw1l.js} +1 -1
- package/dist/TextArea-BYX9Kk_v.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-CuJS3-Nv.js} +62 -35
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-ByfjqkLp.js} +120 -56
- package/dist/TimePicker-UTo9C6gz.d.ts +64 -0
- package/dist/TimePickerForm-CaIHR0PV.js +532 -0
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-tr7Zxahc.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-BX8o7ECO.d.ts} +2 -2
- package/dist/{ToggleButton-P1z1pxzT.js → ToggleButton-D8BT67FO.js} +5 -5
- package/dist/ToggleGroup-18c-FZ_r.js +500 -0
- package/dist/ToggleGroup-UazUtgU1.d.ts +95 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-Dl3sf8fq.js} +5 -5
- package/dist/Tooltip-FcJ29dhq.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-bvNpM6ku.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-auHWN282.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-C9mE8CMf.js} +23 -24
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-CeGnrjoA.d.ts} +2 -2
- package/dist/calendarHeader.cva-D3sXR7ox.js +23 -0
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/columnConfig.cva-CERwSZRN.js +29 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +174 -128
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +17 -15
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/badge.js +166 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +25 -21
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +4 -41
- package/dist/components/date-range-picker.js +4 -2
- package/dist/components/date-range-presets.d.ts +2 -0
- package/dist/components/date-range-presets.js +3 -0
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +1 -1
- package/dist/components/drawer.js +16 -80
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +2 -3
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload.d.ts +2 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +3 -2
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +22 -25
- package/dist/components/icon-slot.d.ts +1 -2
- package/dist/components/icon-slot.js +2 -2
- package/dist/components/input-frame.d.ts +6 -10
- package/dist/components/input-frame.js +31 -28
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -2
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +2 -2
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +5 -5
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +1 -22
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +105 -87
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +71 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +15 -4
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +3 -3
- package/dist/components/style-definitions.js +62 -20
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +1 -1
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +50 -64
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -3
- package/dist/components/toast.js +4 -3
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.d.ts +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/use-toast.d.ts +2 -2
- package/dist/components/use-toast.js +1 -41
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/component-configuration.js +53 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +3 -3
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/config/ui-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-C_-uADGJ.js +93 -0
- package/dist/confirmation.context-DkWyR2aT.d.ts +32 -0
- package/dist/{datePickerInput.cva-Du0Zn04v.js → datePickerInput.cva-CWkV2fut.js} +1 -1
- package/dist/dateRangePreset.utils-Bnb-rjTt.js +116 -0
- package/dist/{dialog.cva-BIpz6HcA.js → dialog.cva-BjVggO5l.js} +1 -1
- package/dist/{dist-DEZzXa0W.js → dist-CP6vV22I.js} +68 -39
- package/dist/{dom.utils-BPooTXtC.js → dom.utils-CqejLWIQ.js} +1 -1
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-BopsvbOy.js} +19 -7
- package/dist/{exports-BNrTn8Tj.js → exports-DeBGRThC.js} +3 -3
- package/dist/{file.utils-Crb-mIHs.d.ts → file.utils-DUADtzdt.d.ts} +3 -3
- package/dist/{file.utils-DqQxnuAm.js → file.utils-X6tkeWaz.js} +2 -6
- package/dist/fileInputButton.cva-gbqRUf1g.js +39 -0
- package/dist/{fileUpload.cva-BYzXGc9C.js → fileUpload.cva-SrF6v406.js} +3 -3
- package/dist/form-field-C735uXsi.d.ts +1 -0
- package/dist/form.binding-Brdjq2yr.js +161 -0
- package/dist/form.binding-DSXB2AOD.d.ts +127 -0
- package/dist/form.types-a2WVJDQX.d.ts +43 -0
- package/dist/formReset-CnZl_yze.js +35 -0
- package/dist/hints-B09_WDhL.d.ts +17 -0
- package/dist/hooks/use-async-list.d.ts +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-breakpoint.d.ts +3 -0
- package/dist/hooks/use-breakpoint.js +2 -0
- package/dist/hooks/use-filters.d.ts +2 -2
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-D8vXIoiq.js → i18n-DaIHnR2n.js} +123 -9
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-xXkHgzet.d.ts} +124 -4
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-Cz8NlFqm.js} +40 -16
- package/dist/index.d.ts +66 -84
- package/dist/index.js +57 -92
- package/dist/{input.cva-DZii82eS.js → input.cva-mm1dnfKP.js} +27 -23
- package/dist/inputLayout-CIVpuUBq.js +7 -0
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{intlStrings-Cu1YN1tA.js → intlStrings-ClpdCJmU.js} +35 -35
- package/dist/{isEqual-LFw0W5rU.js → isEqual-BdJdNr5O.js} +1 -1
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BxVK2yQ5.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-ZhpQz3P0.d.ts +2277 -0
- package/dist/{progress.cva-CsGaGVJ-.js → progress.cva-mkJxrrac.js} +2 -2
- package/dist/{radio.cva-DistaZtZ.js → radio.cva-Dt5N2ul2.js} +7 -7
- package/dist/rich-text-editor.d.ts +44 -2
- package/dist/rich-text-editor.js +733 -1
- package/dist/router.context-B6j_M4cN.js +151 -0
- package/dist/router.context-CSd9JYQ4.d.ts +33 -0
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/{selectItem.cva-B6vxey2R.js → selectItem.cva-DsOZSSPx.js} +2 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BgUrcqXD.js} +379 -94
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/{table.cva-DkcsOmZG.js → table.cva-n9TO_vu1.js} +68 -17
- package/dist/tableCells.cva-Br0_kgRM.js +18 -0
- package/dist/tableColumnConfigStorage-Cciq8gVe.js +215 -0
- package/dist/tableVirtualStore-whSmFzTV.js +67 -0
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table-context.d.ts +2 -0
- package/dist/tanstack/table-context.js +2 -0
- package/dist/tanstack/table-types.d.ts +55 -0
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +3 -2
- package/dist/tanstack-JB8VmS9j.js +73 -0
- package/dist/tanstack-cQOW9-Q2.d.ts +165 -0
- package/dist/tanstack-table-DdWYwCZM.d.ts +858 -0
- package/dist/tanstack-table-M1M26UQJ.js +5299 -0
- package/dist/tanstack.d.ts +66 -84
- package/dist/tanstack.js +57 -92
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-DusQwZw-.js} +13 -9
- package/dist/toast.runtime-ZN5q4T9X.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-NWmBJ2Hc.js} +72 -10
- package/dist/uiConfig.context-ykH4E2js.d.ts +19 -0
- package/dist/uiConfig.types-BsyPKepP.d.ts +291 -0
- package/dist/{uiOverrides.context-DHHzLSnq.d.ts → uiOverrides.context-C5Maic5Q.d.ts} +106 -0
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-DkIjhlce.js} +142 -37
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/useBreakpoint-BPrZNuNl.d.ts +9 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-DtYSRweq.js} +6 -2
- package/dist/{useControlledState-CuU1VIh1.js → useControlledState-C1-Mt2i0.js} +1 -1
- package/dist/useDebounceCallback-C7YKfjXW.js +96 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BzCGqFqi.js +419 -0
- package/dist/{useFormAutosave-BBLm3Ujo.d.ts → useFormAutosave-ClMnzVE7.d.ts} +1 -1
- package/dist/{useIntersectionObserver-DFAhTsV0.js → useIntersectionObserver-B8msnQTR.js} +15 -3
- package/dist/{numberStatic.utils-BIyZuILs.js → useLiveNumberFieldState-npiqOvyB.js} +107 -6
- package/dist/useRemoveButton-zhlA1Pbc.js +98 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/useResolveDateRangePreset-k_h_XJBG.js +26 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-4pieApqz.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/useTableVirtualizer-sFInQiH-.d.ts +162 -0
- package/dist/useToast-BHqkSByv.d.ts +78 -0
- package/dist/useToast-DgqC6Ta_.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/{utils-BkLF-JA3.js → utils-Q5Oc6oX2.js} +1 -1
- package/llms.txt +3201 -0
- package/package.json +22 -118
- package/MIGRATION.md +0 -655
- package/dist/Alert-D4X7OWiv.d.ts +0 -34
- package/dist/AlertDialog-DklLDjmw.d.ts +0 -26
- package/dist/Autocomplete-BgFz3kuR.d.ts +0 -23
- package/dist/Autocomplete-Bn13u0zu.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-Dwh__y-Z.js +0 -28
- package/dist/Badge-Db1ndK67.d.ts +0 -30
- package/dist/BadgeButton-BPhWDAnc.d.ts +0 -15
- package/dist/BottomSheet-BZmDJBR-.d.ts +0 -33
- package/dist/ButtonBase-CZuEy3Pk.d.ts +0 -32
- package/dist/Checkbox-w2j5hLOQ.d.ts +0 -27
- package/dist/Checkbox.bound-D2nBglJz.js +0 -33
- package/dist/Checkbox.bound-DD_RCjVm.d.ts +0 -9
- package/dist/CheckboxCheckmark-DWsYVZuu.js +0 -25
- package/dist/CheckboxGroup-BYI15Y09.d.ts +0 -30
- package/dist/CheckboxGroup.bound-DY0HKGSh.js +0 -32
- package/dist/CheckboxGroup.bound-QiJ-P0KR.d.ts +0 -9
- package/dist/ComboBox-ChsdI0lt.js +0 -212
- package/dist/DatePicker-QzfQf21b.d.ts +0 -56
- package/dist/DatePicker.bound-DoCAqhM4.d.ts +0 -9
- package/dist/DatePicker.bound-M2cjR37s.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-CkIDsAUf.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/DateTimePicker.bound-nSCVUqd0.js +0 -32
- package/dist/Dialog-CO9xljD3.d.ts +0 -21
- package/dist/Drawer-D1cHiBFO.d.ts +0 -18
- package/dist/DropdownMenu-D_9z9ond.d.ts +0 -25
- package/dist/FileInput-BEaECoBS.d.ts +0 -75
- package/dist/FileInput.bound-C12mOKpg.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-D7FMYm-k.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-DmkuulOi.js +0 -30
- package/dist/FileUploadContainer-Dzg5aXXZ.d.ts +0 -5
- package/dist/FormField-DGyCDxOp.d.ts +0 -42
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +0 -17
- package/dist/IconButton-shH_9wcl.d.ts +0 -25
- package/dist/Input-CTp_9mS9.d.ts +0 -34
- package/dist/Input.bound-B9a62ylL.d.ts +0 -9
- package/dist/Input.bound-DYoXyRGy.js +0 -31
- package/dist/InputContent-BCNkN4Fx.d.ts +0 -27
- package/dist/Link-PvYB_M-j.d.ts +0 -30
- package/dist/MenuItem-U3-pu1j5.d.ts +0 -6
- package/dist/NumberField-WXebfxjK.d.ts +0 -34
- package/dist/NumberField.bound-ChJnNyJS.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-BF6P_ega.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- package/dist/PasswordInput-EhQjYyJS.d.ts +0 -11
- package/dist/PasswordInput.bound-CK5GwKL4.d.ts +0 -9
- package/dist/Popover-D_t1XDPA.d.ts +0 -20
- package/dist/Progress-Ckfpi_-M.d.ts +0 -45
- package/dist/Progress-RiEGGxNG.js +0 -119
- package/dist/RadioGroup-6e-Z6jW8.d.ts +0 -26
- package/dist/RadioGroup.bound-BFWSq-on.js +0 -32
- package/dist/RadioGroup.bound-w3SZqSkH.d.ts +0 -9
- package/dist/RichTextEditor-DHhuBeT6.d.ts +0 -28
- package/dist/RichTextEditor-DfwVdm45.js +0 -651
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound--Az1Xwgm.js +0 -34
- package/dist/Select.bound-qOihchei.d.ts +0 -17
- package/dist/Slider-DRg8zKRM.d.ts +0 -23
- package/dist/Slider.bound-CByTXPTr.js +0 -31
- package/dist/Slider.bound-CaEF19um.d.ts +0 -9
- package/dist/Spinner-Cvy_6zgD.d.ts +0 -30
- package/dist/Spinner-DqjP06T1.js +0 -101
- package/dist/SplitButton-V1f2NWfh.d.ts +0 -15
- package/dist/Stepper-k91x_m-E.d.ts +0 -114
- package/dist/Switch-ELVPkPx0.d.ts +0 -24
- package/dist/Switch.bound-DeEdVvZV.d.ts +0 -9
- package/dist/Switch.bound-Dv0cHsMM.js +0 -33
- package/dist/TableDnd-CuHxANWh.js +0 -133
- package/dist/TableRowDetails-D8HFTghI.d.ts +0 -109
- package/dist/TabsFilters-DePddjCk.d.ts +0 -30
- package/dist/Tag-B2_ZiSE-.d.ts +0 -44
- package/dist/TextArea-iqUeB2QY.d.ts +0 -26
- package/dist/TextArea.bound-BJHyCogp.d.ts +0 -9
- package/dist/TextArea.bound-DeaskY6r.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-BFSXJvE_.js +0 -32
- package/dist/TimePickerForm-DD9VA_td.js +0 -225
- package/dist/Toast-D9pdadZ4.d.ts +0 -16
- package/dist/ToggleGroup-CrDoeLN0.js +0 -333
- package/dist/ToggleGroup-DvjnSinl.d.ts +0 -42
- package/dist/ToggleGroup.bound-B03ISHQ8.d.ts +0 -9
- package/dist/ToggleGroup.bound-DCnYwmBt.js +0 -67
- package/dist/Tooltip-B8DTURLQ.d.ts +0 -16
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +0 -11
- package/dist/badgeButton.cva-CBFIhr1S.d.ts +0 -41
- package/dist/button.cva-C8LGtNJ3.d.ts +0 -94
- package/dist/checkbox.cva-CCh_UlrC.d.ts +0 -76
- package/dist/components/badge-button.d.ts +0 -2
- package/dist/components/badge-button.js +0 -74
- package/dist/components/file-upload-container.d.ts +0 -3
- package/dist/components/file-upload-container.js +0 -15
- package/dist/confirmation.context-Bc2yEVp_.js +0 -114
- package/dist/confirmation.context-C_GDRn3a.d.ts +0 -23
- package/dist/fileUpload.types-C-ke21yY.d.ts +0 -110
- package/dist/form.binding-DOR5gIQf.js +0 -49
- package/dist/form.types-C8P4sznq.d.ts +0 -22
- package/dist/formFieldHelper.cva-DRmSyRZN.js +0 -14
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +0 -9
- package/dist/icons.d.ts +0 -4
- package/dist/icons.js +0 -3
- package/dist/input.cva-BjuHsDGy.d.ts +0 -80
- package/dist/inputLayout-KdAtunGk.js +0 -5
- package/dist/link.context-BCHn7NSy.d.ts +0 -12
- package/dist/radio.cva-D7M1hqLe.d.ts +0 -56
- package/dist/router.context-CtafjXV7.d.ts +0 -16
- package/dist/router.context-MckTbHw9.js +0 -63
- package/dist/routing.utils-DfxEt0_Y.js +0 -30
- package/dist/style-definitions-Dx6aFDiR.d.ts +0 -1038
- package/dist/switch.cva-r6vcS25Q.d.ts +0 -16
- package/dist/tanstack/autocomplete.d.ts +0 -3
- package/dist/tanstack/autocomplete.js +0 -2
- package/dist/tanstack/checkbox-group.d.ts +0 -3
- package/dist/tanstack/checkbox-group.js +0 -2
- package/dist/tanstack/checkbox.d.ts +0 -3
- package/dist/tanstack/checkbox.js +0 -2
- package/dist/tanstack/date-picker.d.ts +0 -3
- package/dist/tanstack/date-picker.js +0 -2
- package/dist/tanstack/date-range-picker.d.ts +0 -3
- package/dist/tanstack/date-range-picker.js +0 -2
- package/dist/tanstack/date-time-picker.d.ts +0 -3
- package/dist/tanstack/date-time-picker.js +0 -2
- package/dist/tanstack/file-input.d.ts +0 -3
- package/dist/tanstack/file-input.js +0 -2
- package/dist/tanstack/file-upload.d.ts +0 -4
- package/dist/tanstack/file-upload.js +0 -2
- package/dist/tanstack/input.d.ts +0 -3
- package/dist/tanstack/input.js +0 -2
- package/dist/tanstack/number-field.d.ts +0 -3
- package/dist/tanstack/number-field.js +0 -2
- package/dist/tanstack/number-range-input.d.ts +0 -3
- package/dist/tanstack/number-range-input.js +0 -2
- package/dist/tanstack/password-input.d.ts +0 -2
- package/dist/tanstack/password-input.js +0 -2
- package/dist/tanstack/radio-group.d.ts +0 -3
- package/dist/tanstack/radio-group.js +0 -2
- package/dist/tanstack/rich-text-editor.d.ts +0 -9
- package/dist/tanstack/rich-text-editor.js +0 -28
- package/dist/tanstack/select.d.ts +0 -3
- package/dist/tanstack/select.js +0 -2
- package/dist/tanstack/slider.d.ts +0 -3
- package/dist/tanstack/slider.js +0 -2
- package/dist/tanstack/switch.d.ts +0 -3
- package/dist/tanstack/switch.js +0 -2
- package/dist/tanstack/text-area.d.ts +0 -3
- package/dist/tanstack/text-area.js +0 -2
- package/dist/tanstack/time-picker.d.ts +0 -3
- package/dist/tanstack/time-picker.js +0 -2
- package/dist/tanstack/toggle-group.d.ts +0 -3
- package/dist/tanstack/toggle-group.js +0 -2
- package/dist/tanstack-Bgdv0qU1.js +0 -19
- package/dist/tanstack-wNbE6b-h.d.ts +0 -566
- package/dist/toast.cva-AmLw6Cf5.d.ts +0 -61
- package/dist/toast.runtime-Drd2IJ_j.js +0 -17
- package/dist/toastActivation.store-BELtcr76.js +0 -16
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +0 -26
- package/dist/typography.cva-BCHlTHdM.d.ts +0 -36
- package/dist/uiConfig.context-BnCORTNm.d.ts +0 -132
- package/dist/useAsyncList-Cu-Y8If2.d.ts +0 -9
- package/dist/useFilters-BxRScJdn.d.ts +0 -11
- package/dist/useFilters-DMi94RZK.js +0 -190
- package/dist/useForm-Cb7KWLds.js +0 -217
- package/dist/useForm-I6z23FXf.d.ts +0 -51
- package/dist/useFormAutosave-BPGlChiY.js +0 -216
- package/dist/useTableColumnConfig-CXYgj5xi.js +0 -1906
- package/dist/useTableNav-BusSFEVC.d.ts +0 -197
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
import { a as TableColumnConfigStorage, l as TableColumnStorageTarget, p as CellLinkPreloadHandlers, r as TableDragHandleProps } from "./useTableVirtualizer-sFInQiH-.js";
|
|
2
|
+
import "./IconSlot-DcEDPaNb.js";
|
|
3
|
+
import "./uiOverrides.context-C5Maic5Q.js";
|
|
4
|
+
import { c as TableRowVariantProps, l as TableVariant } from "./link.cva-ZhpQz3P0.js";
|
|
5
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
6
|
+
import { n as TypographyProps } from "./Typography-auHWN282.js";
|
|
7
|
+
import { a as TableRowDetailsMode } from "./uiConfig.types-BsyPKepP.js";
|
|
8
|
+
import { CSSProperties, ComponentType, FC, KeyboardEvent, MouseEvent, PropsWithChildren, ReactElement, ReactNode, RefObject, SetStateAction } from "react";
|
|
9
|
+
import { ColumnDef, ColumnOrderState, ColumnOrderState as ColumnOrderState$1, ColumnPinningState, ColumnPinningState as ColumnPinningState$1, ColumnSizingState, ColumnSizingState as ColumnSizingState$1, ColumnVisibilityState, ColumnVisibilityState as ColumnVisibilityState$1, ExpandedState, ExpandedState as ExpandedState$1, Header, OnChangeFn, OnChangeFn as OnChangeFn$1, Row, RowData, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1, StockFeatures, StockFeatures as StockFeatures$1, Table } from "@tanstack/react-table";
|
|
10
|
+
import { DragEndEvent, DragStartEvent, UniqueIdentifier } from "@dnd-kit/core";
|
|
11
|
+
import { TFunction } from "i18next";
|
|
12
|
+
//#region src/components/table/CellText.d.ts
|
|
13
|
+
interface CellTextProps extends Partial<Pick<TypographyProps, "size">> {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
declare const CellText: FC<CellTextProps>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/table/CellDate.d.ts
|
|
21
|
+
interface CellDateProps {
|
|
22
|
+
/** A `Date` or ISO string. Missing or invalid values render `/`. */
|
|
23
|
+
children: Date | string | null | undefined;
|
|
24
|
+
/** Locale used for formatting. Defaults to the active i18next language. */
|
|
25
|
+
locale?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Local calendar date. */
|
|
28
|
+
declare const CellDate: (props: CellDateProps) => string;
|
|
29
|
+
/** Calendar date in UTC, for date-only values stored as UTC midnight. */
|
|
30
|
+
declare const CellDateUTC: (props: CellDateProps) => string;
|
|
31
|
+
/** Local date and 24-hour time; the time is left out at midnight. */
|
|
32
|
+
declare const CellDateTime: (props: CellDateProps) => string;
|
|
33
|
+
/** Date and time in UTC; the time is left out at midnight. */
|
|
34
|
+
declare const CellDateTimeUTC: (props: CellDateProps) => string;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/table/CellLink.d.ts
|
|
37
|
+
interface CellLinkProps extends CellLinkPreloadHandlers {
|
|
38
|
+
/** Target of the link. Without it the cell renders plain text. */
|
|
39
|
+
href?: string;
|
|
40
|
+
/** Accessible name and tooltip of the link icon. Defaults to "Open". */
|
|
41
|
+
label?: string;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Cell text with an icon that opens `href` in a new tab, shown on hover or focus. Clicking it never activates the row.
|
|
46
|
+
* Preload handlers on the props take precedence over `CellLinkPreloadContext`.
|
|
47
|
+
*/
|
|
48
|
+
declare const CellLink: ({ href, label, children, onPreload, onPreloadCancel }: CellLinkProps) => import("react").JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/components/table/CellNumber.d.ts
|
|
51
|
+
interface CellNumberProps {
|
|
52
|
+
/** Numbers are formatted for the locale; anything else renders as is. */
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
/** Unit or currency shown after the value, separated by a non-breaking space. */
|
|
55
|
+
unit?: string;
|
|
56
|
+
/** `Intl.NumberFormat` options, e.g. fraction digits. Merged over `tableCellNumber.formatOptions` from `UIConfig`. */
|
|
57
|
+
numberOptions?: Intl.NumberFormatOptions;
|
|
58
|
+
/** Locale used for formatting. Defaults to the active i18next language. */
|
|
59
|
+
locale?: string;
|
|
60
|
+
}
|
|
61
|
+
interface CellNumberValueProps {
|
|
62
|
+
/** An already formatted value. */
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
/** Unit or currency shown after the value. */
|
|
65
|
+
unit?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Renders a formatted value with its unit, for values formatted elsewhere. */
|
|
68
|
+
declare const CellNumberValue: ({ children: formattedValue, unit }: CellNumberValueProps) => import("react").JSX.Element;
|
|
69
|
+
/** A number formatted for the active locale, with an optional unit. */
|
|
70
|
+
declare const CellNumber: ({ children, unit, numberOptions, locale }: CellNumberProps) => import("react").JSX.Element;
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/components/table/cellDateFormatters.d.ts
|
|
73
|
+
interface CellDateFormatOptions {
|
|
74
|
+
/** Locale used for formatting. Defaults to the active i18next language, then the runtime locale. */
|
|
75
|
+
locale?: string;
|
|
76
|
+
}
|
|
77
|
+
/** Shown for a missing or invalid date. */
|
|
78
|
+
declare const CELL_DATE_PLACEHOLDER = "/";
|
|
79
|
+
/** Turns a cell value into a `Date`; empty values become `null`. */
|
|
80
|
+
declare const toCellDate: (value: Date | string | null | undefined) => Date | null;
|
|
81
|
+
/** Local calendar date, e.g. `09/07/2026`. */
|
|
82
|
+
declare const formatCellDateValue: (value: Date | null | undefined, { locale }?: CellDateFormatOptions) => string;
|
|
83
|
+
/** Calendar date in UTC, for date-only values stored as UTC midnight. */
|
|
84
|
+
declare const formatCellDateUTCValue: (value: Date | null | undefined, { locale }?: CellDateFormatOptions) => string;
|
|
85
|
+
/** Local date and 24-hour time; the time is left out at midnight. */
|
|
86
|
+
declare const formatCellDateTimeValue: (value: Date | null | undefined, { locale }?: CellDateFormatOptions) => string;
|
|
87
|
+
/** Date and time in UTC; the time is left out at midnight. */
|
|
88
|
+
declare const formatCellDateTimeUTCValue: (value: Date | null | undefined, { locale }?: CellDateFormatOptions) => string;
|
|
89
|
+
/** `formatCellDateTimeValue` for ISO strings. */
|
|
90
|
+
declare const formatCellDateTime: (value: string | null | undefined, options?: CellDateFormatOptions) => string;
|
|
91
|
+
/** `formatCellDateTimeUTCValue` for ISO strings. */
|
|
92
|
+
declare const formatCellDateTimeUTC: (value: string | null | undefined, options?: CellDateFormatOptions) => string;
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/components/table/columnFormatters.d.ts
|
|
95
|
+
/** Plain-text value for exports and `textFormatter`; `null` for missing values. */
|
|
96
|
+
declare const formatColumnText: (value: unknown) => string | null;
|
|
97
|
+
/** A number in the given locale, defaulting to the active i18next language. */
|
|
98
|
+
declare const formatColumnNumber: (value: number | null | undefined, locale?: string) => string | null;
|
|
99
|
+
/** An enum value with its first letter capitalized. */
|
|
100
|
+
declare const formatColumnEnum: (value: string | null | undefined) => string | null;
|
|
101
|
+
/** `Yes` / `No` by default; pass `labels` to translate them. */
|
|
102
|
+
declare const formatColumnBoolean: (value: boolean | null | undefined, labels?: {
|
|
103
|
+
yes: string;
|
|
104
|
+
no: string;
|
|
105
|
+
}) => string | null;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/components/table/columnOrder.d.ts
|
|
108
|
+
/**
|
|
109
|
+
* Sorts columns (in place) by a saved list of ids. Columns missing from `order` keep their relative order at the end.
|
|
110
|
+
*/
|
|
111
|
+
declare function orderTableColumns<TColumn extends {
|
|
112
|
+
id?: string;
|
|
113
|
+
accessorKey?: unknown;
|
|
114
|
+
header?: unknown;
|
|
115
|
+
}>(columns: TColumn[], order?: readonly string[]): TColumn[];
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/components/table/ColumnConfigContent.d.ts
|
|
118
|
+
type ColumnDef$4<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
119
|
+
interface ColumnConfigProps<TData extends RowData, TValue> {
|
|
120
|
+
/** All configurable columns, in their current order. */
|
|
121
|
+
configColumns: ColumnDef$4<TData, TValue>[];
|
|
122
|
+
visibleColumns: ColumnVisibilityState;
|
|
123
|
+
columnPinning: ColumnPinningState;
|
|
124
|
+
/** Columns left out of the configuration, e.g. selection or actions. */
|
|
125
|
+
excludedColumnIds?: string[];
|
|
126
|
+
/** The table's default sorting. Shown with `onDefaultSortingChange`. */
|
|
127
|
+
defaultSorting?: SortingState;
|
|
128
|
+
/** Adds a default sorting picker for columns with `enableSorting: true`. */
|
|
129
|
+
onDefaultSortingChange?: (sorting: SortingState) => void;
|
|
130
|
+
/** Order restored by Reset. Defaults to the columns' natural order. */
|
|
131
|
+
defaultColumnOrder?: ColumnOrderState;
|
|
132
|
+
/** Pinning restored by Reset. Defaults to no pinned columns. */
|
|
133
|
+
defaultColumnPinning?: ColumnPinningState;
|
|
134
|
+
onVisibilityChange: (visibleColumns: ColumnVisibilityState) => void;
|
|
135
|
+
onOrderChange: (columnOrder: ColumnOrderState) => void;
|
|
136
|
+
onPinningChange: (columnPinning: ColumnPinningState) => void;
|
|
137
|
+
/** Called after Reset has restored the defaults through the change callbacks. */
|
|
138
|
+
onReset?: () => void;
|
|
139
|
+
}
|
|
140
|
+
interface ColumnConfigContentProps<TData extends RowData, TValue> extends ColumnConfigProps<TData, TValue> {
|
|
141
|
+
/** Shows a close button. */
|
|
142
|
+
onClose?: () => void;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/components/table/ColumnConfig.d.ts
|
|
146
|
+
type ColumnDef$3<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
147
|
+
type VisibilityState$1 = ColumnVisibilityState;
|
|
148
|
+
/** The pinning layout of the column configuration (three drop zones), loaded on first render. */
|
|
149
|
+
declare const ColumnConfigContent: <TData extends RowData, TValue>(props: ColumnConfigContentProps<TData, TValue>) => import("react").JSX.Element;
|
|
150
|
+
/**
|
|
151
|
+
* Dialog where the user shows, hides and reorders table columns. Opens like `Dialog`: pass `trigger`, or control it
|
|
152
|
+
* with `isOpen` + `onOpenChange`. The column props come from `useTableColumnConfig`.
|
|
153
|
+
*/
|
|
154
|
+
interface ColumnConfigModalProps<TData extends RowData, TValue = unknown> {
|
|
155
|
+
/** Controlled open state. Optional only when `trigger` owns the state; without either the dialog never opens. */
|
|
156
|
+
isOpen?: boolean;
|
|
157
|
+
/** Called with the next open state: `false` on Escape, outside press, the close icon or "Done". */
|
|
158
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
159
|
+
/** A pressable element (`Button`, `IconButton`) that opens the dialog on press. `ColumnConfigPopover` has its own. */
|
|
160
|
+
trigger?: ReactElement;
|
|
161
|
+
/** @deprecated Use `onOpenChange`. */
|
|
162
|
+
onClose?: Removed<"Use `onOpenChange`; it is called with `false` when the dialog closes">;
|
|
163
|
+
/**
|
|
164
|
+
* Every column in its current order, hidden ones included: `configColumns` from `useTableColumnConfig`. Columns with
|
|
165
|
+
* `enableHiding: false` (row actions, for example) always show and are not listed.
|
|
166
|
+
*/
|
|
167
|
+
configColumns: ColumnDef$3<TData, TValue>[];
|
|
168
|
+
/** Visibility as `{ [columnId]: boolean }`; a missing id counts as visible. */
|
|
169
|
+
visibleColumns: VisibilityState$1;
|
|
170
|
+
/** Called with the full visibility map after a column is toggled. */
|
|
171
|
+
onVisibilityChange: (visibleColumns: VisibilityState$1) => void;
|
|
172
|
+
/** Called with every column id (unlisted ones included) in the new order after a drag. */
|
|
173
|
+
onOrderChange: (columnOrder: ColumnOrderState) => void;
|
|
174
|
+
/**
|
|
175
|
+
* Shows a "Reset" button that restores the default visibility and order. With pinning, Reset is always shown and
|
|
176
|
+
* this is called after the defaults are restored.
|
|
177
|
+
*/
|
|
178
|
+
onReset?: () => void;
|
|
179
|
+
/**
|
|
180
|
+
* `list` (the default, from `table.columnConfigLayout` in `UIConfig`): a sortable checkbox list. `pinning`: columns
|
|
181
|
+
* are dragged between pinned-left, scrollable and pinned-right zones; needs `onPinningChange`.
|
|
182
|
+
*/
|
|
183
|
+
layout?: "list" | "pinning";
|
|
184
|
+
/** Pinned column ids, for the `pinning` layout. */
|
|
185
|
+
columnPinning?: ColumnPinningState;
|
|
186
|
+
/** Receives the new pinning in the `pinning` layout. `useTableColumnConfig` returns it. */
|
|
187
|
+
onPinningChange?: (columnPinning: ColumnPinningState) => void;
|
|
188
|
+
/** Columns left out of the pinning configuration, e.g. selection or actions. */
|
|
189
|
+
excludedColumnIds?: string[];
|
|
190
|
+
/** The table's default sorting. Shown with `onDefaultSortingChange` in the pinning layout. */
|
|
191
|
+
defaultSorting?: SortingState;
|
|
192
|
+
/** Adds a default sorting picker to the pinning layout. */
|
|
193
|
+
onDefaultSortingChange?: (sorting: SortingState) => void;
|
|
194
|
+
/** Order restored by Reset in the pinning layout. Defaults to the columns' natural order. */
|
|
195
|
+
defaultColumnOrder?: ColumnOrderState;
|
|
196
|
+
/** Pinning restored by Reset in the pinning layout. Defaults to no pinned columns. */
|
|
197
|
+
defaultColumnPinning?: ColumnPinningState;
|
|
198
|
+
/** `ColumnConfigPopover` only: renders the trigger as an icon button. */
|
|
199
|
+
iconOnly?: boolean;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Dialog for choosing visible columns and their order: a sortable checkbox list with "Show all", a visible count,
|
|
203
|
+
* "Reset" (with `onReset`) and "Done". With `layout="pinning"` (or `table.columnConfigLayout`) and `onPinningChange`
|
|
204
|
+
* it also configures pinning: columns are dragged between pinned-left, scrollable and pinned-right zones.
|
|
205
|
+
*/
|
|
206
|
+
declare function ColumnConfigModal<TData extends RowData, TValue = unknown>(props: ColumnConfigModalProps<TData, TValue>): import("react").JSX.Element;
|
|
207
|
+
/**
|
|
208
|
+
* `ColumnConfigModal` in a popover (a bottom sheet on small screens) with its own trigger button.
|
|
209
|
+
* Renders nothing while `TableConfigurationEnabledContext` is off.
|
|
210
|
+
*/
|
|
211
|
+
declare function ColumnConfigPopover<TData extends RowData, TValue = unknown>(props: ColumnConfigModalProps<TData, TValue>): import("react").JSX.Element | null;
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/components/table/HeaderText.d.ts
|
|
214
|
+
interface HeaderTextProps extends Partial<Pick<TypographyProps, "size">> {
|
|
215
|
+
children: ReactNode;
|
|
216
|
+
className?: string;
|
|
217
|
+
style?: CSSProperties;
|
|
218
|
+
}
|
|
219
|
+
declare const HeaderText: FC<HeaderTextProps>;
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/components/table/useColumnResize.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* How column widths are decided.
|
|
224
|
+
* - `natural`: the browser fits columns to their content; widths become fixed from the first resize on.
|
|
225
|
+
* - `sized`: columns take their `size`. Until a column is resized (or `meta.hasSavedWidths` is set) the columns
|
|
226
|
+
* stretch to fill the table, except those with `meta.grow: false`, a fixed size or a selection model.
|
|
227
|
+
*/
|
|
228
|
+
type TableColumnLayout = "natural" | "sized";
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/components/table/TableHead.d.ts
|
|
231
|
+
type Header$1<TData extends RowData> = Header<StockFeatures, TData, unknown>;
|
|
232
|
+
type Column<TData extends RowData> = Header$1<TData>["column"];
|
|
233
|
+
/** What `renderColumnFilter` gets for each header. */
|
|
234
|
+
interface TableColumnFilterContext<TData extends RowData> {
|
|
235
|
+
column: Column<TData>;
|
|
236
|
+
table: Table<StockFeatures, TData>;
|
|
237
|
+
/** `meta.filterKey`, or the column id. */
|
|
238
|
+
filterKey: string;
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/components/table/TableRowDetails.d.ts
|
|
242
|
+
interface TableRowDetails<T extends RowData> {
|
|
243
|
+
/** How a row's details open. Defaults to `table.rowDetailsMode` from `UIConfig`. */
|
|
244
|
+
mode?: TableRowDetailsMode;
|
|
245
|
+
/** The details of one row. `close` closes them again. */
|
|
246
|
+
render: (row: T, helpers: {
|
|
247
|
+
close: () => void;
|
|
248
|
+
}) => ReactNode;
|
|
249
|
+
/** Heading of the `drawer` and `split` panels, also their accessible name. Defaults to the translated "Row details". */
|
|
250
|
+
title?: (row: T) => string;
|
|
251
|
+
/** Rows that have details. Defaults to all rows. */
|
|
252
|
+
canOpen?: (row: T) => boolean;
|
|
253
|
+
/** `expand` mode only: `single` (default) closes the open row when another one opens. */
|
|
254
|
+
expandMode?: "single" | "multiple";
|
|
255
|
+
}
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/components/table/TableMountBoundary.d.ts
|
|
258
|
+
/**
|
|
259
|
+
* Mounts its children in a normal-priority render right after the page's first commit, so the page (and a table's
|
|
260
|
+
* header and loading rows) paints before a heavy table mounts.
|
|
261
|
+
*/
|
|
262
|
+
declare const TableMountBoundary: ({ children }: PropsWithChildren) => import("react").ReactNode;
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/components/table/TableRow.d.ts
|
|
265
|
+
/**
|
|
266
|
+
* A drag handle for the row `rowId`, for `enableDragDrop` tables that place their own handle
|
|
267
|
+
* (`showDragHandleColumn={false}`). `label` is its accessible name; it defaults to "Drag handle".
|
|
268
|
+
*/
|
|
269
|
+
declare const RowDragHandleCell: ({ rowId, label }: {
|
|
270
|
+
rowId: string;
|
|
271
|
+
label?: string;
|
|
272
|
+
}) => import("react").JSX.Element;
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/components/table/Table.d.ts
|
|
275
|
+
/** A column definition for rows of `TData`: TanStack's `ColumnDef` with this table's features applied. */
|
|
276
|
+
type ColumnDef$2<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
277
|
+
type ReactTable<TData extends RowData> = Table<StockFeatures, TData>;
|
|
278
|
+
/** A row of `TData` as cell renderers and row callbacks receive it: TanStack's `Row` with this table's features. */
|
|
279
|
+
type Row$1<TData extends RowData> = Row<StockFeatures, TData>;
|
|
280
|
+
type AnyValueColumnDef<TData extends RowData> = ColumnDef$2<TData, any>;
|
|
281
|
+
type VisibilityState = ColumnVisibilityState;
|
|
282
|
+
/**
|
|
283
|
+
* Rendered in place of the header row while rows are selected; read the selection from `table`. Define it at module
|
|
284
|
+
* scope: the table renders it as a component, so one defined inline remounts (and loses its state) on every render.
|
|
285
|
+
*/
|
|
286
|
+
type BulkSelectionActionsComponent<T extends RowData> = ComponentType<{
|
|
287
|
+
table: ReactTable<T>;
|
|
288
|
+
}>;
|
|
289
|
+
interface TableWrapperProps<T extends RowData> extends Omit<TableProps<T>, "columns"> {}
|
|
290
|
+
/** What `renderRow` gets for each row. */
|
|
291
|
+
interface TableRowRenderContext<T extends RowData> {
|
|
292
|
+
row: Row$1<T>;
|
|
293
|
+
/** The row as the table would render it. */
|
|
294
|
+
defaultRow: ReactNode;
|
|
295
|
+
/** Spread on a drag handle inside the rendered rows (`enableDragDrop`). */
|
|
296
|
+
dragHandleProps?: TableDragHandleProps;
|
|
297
|
+
}
|
|
298
|
+
interface TableReorderContext {
|
|
299
|
+
oldIndex: number;
|
|
300
|
+
newIndex: number;
|
|
301
|
+
itemId: UniqueIdentifier;
|
|
302
|
+
}
|
|
303
|
+
interface TableProps<T extends RowData> extends TableRowVariantProps {
|
|
304
|
+
/** The rows, in display order. The table renders them as given: it does not sort, filter or page them. */
|
|
305
|
+
items: T[];
|
|
306
|
+
/** @deprecated Use `items`. */
|
|
307
|
+
data?: Removed<"Use `items`">;
|
|
308
|
+
/** @deprecated Tables have no pager. Use `InfiniteTable` for server lists. */
|
|
309
|
+
pagination?: Removed<"Tables have no pager: use `InfiniteTable` with `hasNextPage` and `fetchNextPage`">;
|
|
310
|
+
/** Column definitions (`ColumnDef<Row>[]` from this entry), or a function of `t` returning them. */
|
|
311
|
+
columns: ((t: TFunction) => AnyValueColumnDef<T>[]) | AnyValueColumnDef<T>[];
|
|
312
|
+
/** Lines between columns. Defaults to on, except for the `horizontals`, `zebra` and `striped-columns` variants. */
|
|
313
|
+
showCellBorder?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Runs when a row is clicked, or Enter is pressed on one of its cells, with the row's item. Replaces the built-in
|
|
316
|
+
* row action (opening `rowDetails`, or toggling selection). Prefer `rowDetails` for showing more.
|
|
317
|
+
*/
|
|
318
|
+
onRowAction?: (item: T) => void;
|
|
319
|
+
/** Runs with the row's item when a row is double-clicked. Mouse only: give keyboard users the same action another way. */
|
|
320
|
+
onRowDoubleClick?: (item: T) => void;
|
|
321
|
+
/** Middle click on a row. */
|
|
322
|
+
onAuxClick?: (item: T) => void;
|
|
323
|
+
/** Right click on a row; the browser menu doesn't open. */
|
|
324
|
+
onRightClick?: (item: T, event?: MouseEvent) => void;
|
|
325
|
+
/** The pointer enters a row, e.g. to prefetch its details. */
|
|
326
|
+
onRowHover?: (item: T) => void;
|
|
327
|
+
/** Extra class for a row. */
|
|
328
|
+
getRowClassName?: (item: T) => string | undefined;
|
|
329
|
+
/**
|
|
330
|
+
* The rows are loading (a query's `isLoading`). By default the body shows a spinner in place of the rows;
|
|
331
|
+
* with `table.loadingState: "skeleton"` in `UIConfig` it shows skeleton rows while there are no items.
|
|
332
|
+
* `loadingContent` replaces either. `InfiniteTable` shows its own spinner for further pages.
|
|
333
|
+
*/
|
|
334
|
+
isLoading?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* Shown in the body when there are no rows and nothing is loading. Defaults to `table.emptyState` from `UIConfig`,
|
|
337
|
+
* else a translated "No results". `false` (or `null`) shows no empty row.
|
|
338
|
+
*/
|
|
339
|
+
emptyState?: ReactNode;
|
|
340
|
+
/** @deprecated Use `isLoading`. */
|
|
341
|
+
loading?: Removed<"Use `isLoading`">;
|
|
342
|
+
/** @deprecated Use `emptyState`. */
|
|
343
|
+
emptyText?: Removed<"Use `emptyState`; it takes any node">;
|
|
344
|
+
/** @deprecated Use `emptyState`. */
|
|
345
|
+
emptyContent?: Removed<"Use `emptyState`">;
|
|
346
|
+
/** @deprecated Use `onRowAction`. */
|
|
347
|
+
onRowClick?: Removed<"Use `onRowAction`; it also runs on Enter">;
|
|
348
|
+
/** @deprecated Use `onRowDoubleClick`. */
|
|
349
|
+
onDoubleClick?: Removed<"Use `onRowDoubleClick`">;
|
|
350
|
+
/**
|
|
351
|
+
* Classes for the `<table>` element itself. Style the scrolling wrapper (border, radius, background, width) with
|
|
352
|
+
* `containerClassName`, and limit its height with `maxHeight`.
|
|
353
|
+
*/
|
|
354
|
+
className?: string;
|
|
355
|
+
/** Border style. Defaults to `table.variant` from `UIConfig`. */
|
|
356
|
+
variant?: TableVariant;
|
|
357
|
+
/** Classes for the scroll container around the `<table>`: the table's outer element. */
|
|
358
|
+
containerClassName?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Max height of the scroll container. When set, rows scroll inside the table and the header stays pinned.
|
|
361
|
+
* Without it the table grows with its rows; wide tables always scroll horizontally.
|
|
362
|
+
*/
|
|
363
|
+
maxHeight?: CSSProperties["maxHeight"];
|
|
364
|
+
/**
|
|
365
|
+
* What scrolls when the table is larger than its space. Defaults to `table.scroll` from `UIConfig` (`table`).
|
|
366
|
+
* - `table`: the table scrolls inside its own container.
|
|
367
|
+
* - `page`: the page, or the nearest scrolling parent, scrolls; the header pins to its top. `maxHeight` is ignored.
|
|
368
|
+
*/
|
|
369
|
+
scroll?: "table" | "page";
|
|
370
|
+
/**
|
|
371
|
+
* Current sort, shown as arrows in the headers. The table does not reorder rows: `items` come sorted from the
|
|
372
|
+
* server, so send `order` from `useSorting` to the query. A column's `meta.sortKey` names it in this state.
|
|
373
|
+
*/
|
|
374
|
+
sorting?: SortingState;
|
|
375
|
+
/**
|
|
376
|
+
* Makes headers sortable; without it the headers are plain text. Receives the next sort or an updater, like a state
|
|
377
|
+
* setter: pass `setSorting` from `useSorting`.
|
|
378
|
+
*/
|
|
379
|
+
onSortingChange?: OnChangeFn<SortingState>;
|
|
380
|
+
/** @deprecated Use `onSortingChange`. */
|
|
381
|
+
setSorting?: Removed<"Use `onSortingChange`">;
|
|
382
|
+
/** Clicking a column sorted the second way clears its sorting. Defaults to `table.enableSortingRemoval` (on). */
|
|
383
|
+
enableSortingRemoval?: boolean;
|
|
384
|
+
/** Sorting moves back to the first page. Defaults to `table.resetPageIndexOnSorting` (off). */
|
|
385
|
+
resetPageIndexOnSorting?: boolean;
|
|
386
|
+
/** Column ids in display order; columns left out go last. `useTableColumnConfig` already returns ordered `columns`. */
|
|
387
|
+
columnOrder?: ColumnOrderState;
|
|
388
|
+
/** Receives the next order or an updater, like a state setter. */
|
|
389
|
+
onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
|
|
390
|
+
/** @deprecated Use `onColumnOrderChange`. */
|
|
391
|
+
setColumnOrder?: Removed<"Use `onColumnOrderChange`">;
|
|
392
|
+
/** Hidden columns as `{ [columnId]: false }`. `useTableColumnConfig` already returns only the visible `columns`. */
|
|
393
|
+
columnVisibility?: VisibilityState;
|
|
394
|
+
/** Receives the next visibility or an updater, like a state setter. */
|
|
395
|
+
onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
|
|
396
|
+
/** @deprecated Use `onColumnVisibilityChange`. */
|
|
397
|
+
setColumnVisibility?: Removed<"Use `onColumnVisibilityChange`">;
|
|
398
|
+
/** Shows a pin button in each header. Pinned columns stay in view and move to the start of the table. */
|
|
399
|
+
enableColumnPinning?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Pinned column ids. Without it the table keeps pinning in its own state, starting from the columns'
|
|
402
|
+
* `meta.configuredPinPosition`.
|
|
403
|
+
*/
|
|
404
|
+
columnPinning?: ColumnPinningState;
|
|
405
|
+
/** Receives the next pinning or an updater, like a state setter. */
|
|
406
|
+
onColumnPinningChange?: OnChangeFn<ColumnPinningState>;
|
|
407
|
+
/** @deprecated Use `onColumnPinningChange`. */
|
|
408
|
+
setColumnPinning?: Removed<"Use `onColumnPinningChange`">;
|
|
409
|
+
/**
|
|
410
|
+
* Shows a resize handle on each header's edge (drag it, or focus it and use the arrow keys).
|
|
411
|
+
* Limit a column with `minSize` / `maxSize`. Defaults to `table.enableColumnResizing` from `UIConfig`;
|
|
412
|
+
* always off inside `TableConfigurationEnabledContext` set to `false`.
|
|
413
|
+
*/
|
|
414
|
+
enableColumnResizing?: boolean;
|
|
415
|
+
/** Column widths in pixels. Without it the table keeps the widths in its own state. */
|
|
416
|
+
columnSizing?: ColumnSizingState;
|
|
417
|
+
/** Receives the next widths or an updater, like a state setter. */
|
|
418
|
+
onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
|
|
419
|
+
/** @deprecated Use `onColumnSizingChange`. */
|
|
420
|
+
setColumnSizing?: Removed<"Use `onColumnSizingChange`">;
|
|
421
|
+
/**
|
|
422
|
+
* How column widths are decided. Defaults to `table.columnLayout` from `UIConfig` (`natural`).
|
|
423
|
+
* - `natural`: columns fit their content; they keep their widths from the first resize on.
|
|
424
|
+
* - `sized`: columns take their `size` and stretch to fill the table until one is resized (or the columns have
|
|
425
|
+
* `meta.hasSavedWidths`). Double-clicking a resize handle fits the column to its content. Without resizing, a
|
|
426
|
+
* column's `size` is its minimum width.
|
|
427
|
+
*/
|
|
428
|
+
columnLayout?: TableColumnLayout;
|
|
429
|
+
/** Sets the columns' widths from their `size` (columns without one fit their content), without resizing. */
|
|
430
|
+
useColumnWidths?: boolean;
|
|
431
|
+
/** CSS `table-layout`, overriding the one the column layout picks. */
|
|
432
|
+
tableLayout?: CSSProperties["tableLayout"];
|
|
433
|
+
/**
|
|
434
|
+
* Row details, opened by clicking a row (unless `onRowAction` is set). `mode` defaults to `table.rowDetailsMode` from
|
|
435
|
+
* `UIConfig`: `drawer` slides in from the side, `split` opens beside the table, `expand` opens under the row.
|
|
436
|
+
* In `drawer` and `split` mode Enter on a cell opens them too; `expand` adds a chevron column.
|
|
437
|
+
* Pass `getRowId` so open rows survive sorting and paging. Not available with `enableDragDrop`.
|
|
438
|
+
*/
|
|
439
|
+
rowDetails?: TableRowDetails<T>;
|
|
440
|
+
/** Open rows by id (one at a time in `drawer` and `split` mode). Without it the table keeps them in its own state. */
|
|
441
|
+
expanded?: ExpandedState;
|
|
442
|
+
/** Receives the next open rows or an updater, like a state setter. */
|
|
443
|
+
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
444
|
+
/** @deprecated Use `onExpandedChange`. */
|
|
445
|
+
setExpanded?: Removed<"Use `onExpandedChange`">;
|
|
446
|
+
/**
|
|
447
|
+
* Adds a leading checkbox column: one checkbox per row and select-all in the header. Selection is multiple unless
|
|
448
|
+
* `enableMultiRowSelection={false}`. A function enables it per row. Clicking a row also toggles it unless `rowDetails`
|
|
449
|
+
* or `onRowAction` is set. Do not add your own checkbox column. Defaults to `table.enableRowSelection` (off).
|
|
450
|
+
*/
|
|
451
|
+
enableRowSelection?: boolean | ((row: Row$1<T>) => boolean);
|
|
452
|
+
/**
|
|
453
|
+
* `false` keeps one selected row at a time and drops select-all. Defaults to `table.enableMultiRowSelection` from
|
|
454
|
+
* `UIConfig` (on).
|
|
455
|
+
*/
|
|
456
|
+
enableMultiRowSelection?: boolean | ((row: Row$1<T>) => boolean);
|
|
457
|
+
/**
|
|
458
|
+
* The leading checkbox column of `enableRowSelection` tables. Turn it off for a table that shows selection its own
|
|
459
|
+
* way (e.g. a column with `meta.selectionModel`). Defaults to `table.showSelectionColumn` from `UIConfig` (on).
|
|
460
|
+
*/
|
|
461
|
+
showSelectionColumn?: boolean;
|
|
462
|
+
/** Controlled selection as `{ [rowId]: true }`; pair it with `onRowSelectionChange`. Pass `getRowId` for stable ids. */
|
|
463
|
+
rowSelection?: RowSelectionState;
|
|
464
|
+
/**
|
|
465
|
+
* Initial selection when the table keeps it in its own state. Read once, on mount, unless
|
|
466
|
+
* `table.followDefaultRowSelection` is on: then a change of its selected ids resets the selection to it.
|
|
467
|
+
*/
|
|
468
|
+
defaultRowSelection?: RowSelectionState;
|
|
469
|
+
/** Receives the next selection or an updater, like a state setter. Also fires when the selection is uncontrolled. */
|
|
470
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
471
|
+
/** @deprecated Use `rowSelection` (controlled) or `defaultRowSelection` (uncontrolled). */
|
|
472
|
+
defaultSelectedRows?: Removed<"Use `rowSelection` with `onRowSelectionChange`, or `defaultRowSelection`">;
|
|
473
|
+
/** @deprecated Use `enableRowSelection`. */
|
|
474
|
+
selectionMode?: Removed<"Use `enableRowSelection`; add `enableMultiRowSelection={false}` for one row at a time">;
|
|
475
|
+
/** @deprecated Use `rowSelection`. */
|
|
476
|
+
selectedKeys?: Removed<"Use `rowSelection` (`{ [rowId]: true }`) with `onRowSelectionChange`">;
|
|
477
|
+
/** @deprecated Use `onRowSelectionChange`. */
|
|
478
|
+
onSelectionChange?: Removed<"Use `onRowSelectionChange`">;
|
|
479
|
+
/** Selected rows get `data-selected` (and its style). Defaults to `table.highlightSelectedRows` (on). */
|
|
480
|
+
highlightSelectedRows?: boolean;
|
|
481
|
+
/** Rows with focus inside get the hover style. Defaults to `table.highlightFocusedRows` (on). */
|
|
482
|
+
highlightFocusedRows?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Up and Down move the selection (and `onRowAction`) to the next row, with focus. The table itself takes focus.
|
|
485
|
+
* Defaults to `table.enableArrowKeyRowNavigation` (off).
|
|
486
|
+
*/
|
|
487
|
+
enableArrowKeyRowNavigation?: boolean;
|
|
488
|
+
/** Rows the arrow keys stop at. Defaults to rows that can be selected, or every row with `onRowAction`. */
|
|
489
|
+
canArrowKeyNavigateRow?: (row: Row$1<T>) => boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Component shown across the header while any row is selected, next to select-all. Define it at module scope (an
|
|
492
|
+
* inline component remounts on every render); it receives `table`: read `table.getSelectedRowModel().rows`, clear
|
|
493
|
+
* with `table.resetRowSelection()`. Needs `enableRowSelection`.
|
|
494
|
+
*/
|
|
495
|
+
bulkSelectionActions?: BulkSelectionActionsComponent<T>;
|
|
496
|
+
/**
|
|
497
|
+
* Adds a drag handle column for reordering rows. Needs `getRowId`; `rowDetails` is ignored while it is on.
|
|
498
|
+
* dnd-kit loads on mount (see `preloadTableDnd`); the table shows its loading state until then. Rows are not
|
|
499
|
+
* virtualized, except with `renderRow`.
|
|
500
|
+
*/
|
|
501
|
+
enableDragDrop?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Adds a leading drag handle column to `enableDragDrop` tables (default on). Turn it off to place your own handle,
|
|
504
|
+
* with `RowDragHandleCell` or `renderRow`'s `dragHandleProps`.
|
|
505
|
+
*/
|
|
506
|
+
showDragHandleColumn?: boolean;
|
|
507
|
+
/** Raw dnd-kit event of a row drag that started. */
|
|
508
|
+
onDragStart?: (event: DragStartEvent) => void;
|
|
509
|
+
/** Raw dnd-kit event of a finished row drag. Prefer `onReorder`. */
|
|
510
|
+
onDragEnd?: (event: DragEndEvent) => void;
|
|
511
|
+
/** Called after a row drag with `items` in their new order; store it, the table does not. */
|
|
512
|
+
onReorder?: (reorderedItems: T[], context: TableReorderContext) => void;
|
|
513
|
+
/** Shows the new order right after a drop, until `items` changes. */
|
|
514
|
+
optimisticReordering?: boolean;
|
|
515
|
+
/** Stable row id, used as the key in `rowSelection` and `expanded`. Defaults to the row index. */
|
|
516
|
+
getRowId?: (row: T) => UniqueIdentifier;
|
|
517
|
+
/** Content in each header after its label, e.g. a filter button. */
|
|
518
|
+
renderColumnFilter?: (context: TableColumnFilterContext<T>) => ReactNode;
|
|
519
|
+
/** Marks a header whose filter is applied with `data-filter-active`. */
|
|
520
|
+
isColumnFilterActive?: (context: TableColumnFilterContext<T>) => boolean;
|
|
521
|
+
/** Scrolls the table back to the top whenever this value changes, e.g. the applied filters. */
|
|
522
|
+
scrollResetKey?: unknown;
|
|
523
|
+
/** Rows belong to a previous query (`placeholderData`): renders skeleton rows of the same count instead. */
|
|
524
|
+
isPlaceholderData?: boolean;
|
|
525
|
+
/** Shown instead of the spinner or skeleton rows while `isLoading`. */
|
|
526
|
+
loadingContent?: ReactNode;
|
|
527
|
+
/** More rows can load: renders an end marker for `loadMoreRef` and enables `onEndReached`. */
|
|
528
|
+
hasMoreRows?: boolean;
|
|
529
|
+
/** Ref for an element after the last row, to observe for loading more (rows that aren't virtualized). */
|
|
530
|
+
loadMoreRef?: (element: HTMLDivElement | null) => void;
|
|
531
|
+
/** Changes when a page has loaded, so `onEndReached` can fire again for the same row count. */
|
|
532
|
+
loadMoreKey?: number;
|
|
533
|
+
/** Virtualized rows reached the end after the user scrolled. */
|
|
534
|
+
onEndReached?: () => void;
|
|
535
|
+
/**
|
|
536
|
+
* Renders only the rows in view once there are more than `table.virtualization.rowThreshold`. Needs a bounded
|
|
537
|
+
* scroller: `maxHeight`, a fixed-height parent, or `scroll="page"`. Loads on demand (see `preloadTableVirtualizer`).
|
|
538
|
+
* Defaults to `table.virtualization.rows` (off). Not with `enableDragDrop` unless rows use `renderRow`.
|
|
539
|
+
*/
|
|
540
|
+
enableRowVirtualization?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Renders only the cells of columns in view (plus pinned and `meta.keepMounted` columns) once there are more than
|
|
543
|
+
* `table.virtualization.columnThreshold`. Turn it off for rows whose height depends on off-screen cells.
|
|
544
|
+
* Defaults to `table.virtualization.columns` (off).
|
|
545
|
+
*/
|
|
546
|
+
enableColumnVirtualization?: boolean;
|
|
547
|
+
/** Row height before rows are measured, in px. Defaults to `table.virtualization.estimateRowSize`. */
|
|
548
|
+
estimateRowSize?: number;
|
|
549
|
+
/** Rows rendered beyond each edge of the view. Defaults to `table.virtualization.overscan`. */
|
|
550
|
+
virtualizationOverscan?: number;
|
|
551
|
+
/** Keeps two viewports of rows ready in each direction, for fast scrolling. */
|
|
552
|
+
viewportOverscan?: boolean;
|
|
553
|
+
/** Wraps each row, e.g. in a context provider. */
|
|
554
|
+
renderRowProvider?: (row: Row$1<T>, children: ReactNode) => ReactNode;
|
|
555
|
+
/** Renders a row and rows of your own around it; each row gets its own `<tbody>`. */
|
|
556
|
+
renderRow?: (context: TableRowRenderContext<T>) => ReactNode;
|
|
557
|
+
/** Content between the header and the rows, e.g. a `<tbody>` of totals. */
|
|
558
|
+
renderBodyStartRows?: (table: ReactTable<T>) => ReactNode;
|
|
559
|
+
/** Content after the rows, e.g. a `<tfoot>`. */
|
|
560
|
+
renderFooterRows?: (table: ReactTable<T>) => ReactNode;
|
|
561
|
+
/** Keeps the last row (e.g. totals) at the bottom of the view. */
|
|
562
|
+
stickyLastRow?: boolean;
|
|
563
|
+
}
|
|
564
|
+
declare const Table$1: <T extends RowData>({ items, showCellBorder, columns, onRowAction, onRowDoubleClick, onAuxClick, onRightClick, onRowHover, getRowClassName, className, variant: variantProp, containerClassName, maxHeight, scroll: scrollProp, sorting, onSortingChange, enableSortingRemoval, resetPageIndexOnSorting, columnOrder, onColumnOrderChange, columnVisibility, onColumnVisibilityChange, enableColumnPinning, columnPinning: columnPinningProp, onColumnPinningChange, enableColumnResizing: enableColumnResizingProp, columnSizing: columnSizingProp, onColumnSizingChange, columnLayout: columnLayoutProp, useColumnWidths, tableLayout, rowDetails, expanded: expandedProp, onExpandedChange, bulkSelectionActions: ActionHeader, enableDragDrop, showDragHandleColumn, onDragStart, onDragEnd, onReorder, optimisticReordering, getRowId, enableRowSelection: enableRowSelectionProp, enableMultiRowSelection: enableMultiRowSelectionProp, showSelectionColumn: showSelectionColumnProp, rowSelection: rowSelectionProp, defaultRowSelection, highlightSelectedRows: highlightSelectedRowsProp, highlightFocusedRows, enableArrowKeyRowNavigation: enableArrowKeyRowNavigationProp, canArrowKeyNavigateRow, onRowSelectionChange, renderColumnFilter, isColumnFilterActive, scrollResetKey, isLoading, isPlaceholderData, emptyState: emptyStateProp, loadingContent, hasMoreRows, loadMoreRef, loadMoreKey, onEndReached, enableRowVirtualization: enableRowVirtualizationProp, enableColumnVirtualization: enableColumnVirtualizationProp, estimateRowSize: estimateRowSizeProp, virtualizationOverscan, viewportOverscan, renderRowProvider, renderRow, renderBodyStartRows, renderFooterRows, stickyLastRow, highlightFocused, data: _data, pagination: _pagination, loading: _loading, emptyText: _emptyText, emptyContent: _emptyContent, onRowClick: _onRowClick, onDoubleClick: _onDoubleClick, setSorting: _setSorting, setColumnOrder: _setColumnOrder, setColumnVisibility: _setColumnVisibility, setColumnPinning: _setColumnPinning, setColumnSizing: _setColumnSizing, setExpanded: _setExpanded, defaultSelectedRows: _defaultSelectedRows, selectionMode: _selectionMode, selectedKeys: _selectedKeys, onSelectionChange: _onSelectionChange, ...rowVariantProps }: TableProps<T>) => import("react").JSX.Element;
|
|
565
|
+
//#endregion
|
|
566
|
+
//#region src/components/table/InfiniteTable.d.ts
|
|
567
|
+
/** One page of an infinite query. */
|
|
568
|
+
interface InfiniteTablePage<T> {
|
|
569
|
+
items: T[];
|
|
570
|
+
}
|
|
571
|
+
/** Infinite query data: the loaded pages in order. */
|
|
572
|
+
interface InfiniteTableData<T> {
|
|
573
|
+
pages: InfiniteTablePage<T>[];
|
|
574
|
+
}
|
|
575
|
+
/** The parts of a TanStack infinite query result the table reads. */
|
|
576
|
+
interface InfiniteTableQueryState {
|
|
577
|
+
data?: unknown;
|
|
578
|
+
fetchNextPage?: () => unknown;
|
|
579
|
+
hasNextPage?: boolean;
|
|
580
|
+
isFetching?: boolean;
|
|
581
|
+
isFetchingNextPage?: boolean;
|
|
582
|
+
isLoading?: boolean;
|
|
583
|
+
isPending?: boolean;
|
|
584
|
+
}
|
|
585
|
+
interface InfiniteTableWrapperProps<T extends RowData> extends Omit<InfiniteTableProps<T>, "columns"> {}
|
|
586
|
+
/**
|
|
587
|
+
* `Table` that loads the next page when its end scrolls into view. Wire `isLoading`, `hasNextPage`,
|
|
588
|
+
* `isFetchingNextPage` and `fetchNextPage` straight from an infinite query and pass every loaded row as `items` (or
|
|
589
|
+
* pass the query's `data`, or the whole `query`).
|
|
590
|
+
*/
|
|
591
|
+
interface InfiniteTableProps<T extends RowData> extends Omit<TableProps<T>, "items" | "data"> {
|
|
592
|
+
/** Every loaded row. Leave it out to read them from `data` or `query`. */
|
|
593
|
+
items?: T[];
|
|
594
|
+
/** Infinite query data; rows are the `items` of every page. */
|
|
595
|
+
data?: InfiniteTableData<T>;
|
|
596
|
+
/** An infinite query result. Explicit props take precedence over its fields; its initial load shows as loading. */
|
|
597
|
+
query?: InfiniteTableQueryState;
|
|
598
|
+
/** Whether the server has more rows. While `true`, a spinner under the last row triggers `fetchNextPage`. */
|
|
599
|
+
hasNextPage?: boolean;
|
|
600
|
+
/** A page is loading: keeps the spinner visible and holds back further `fetchNextPage` calls. */
|
|
601
|
+
isFetchingNextPage?: boolean;
|
|
602
|
+
/**
|
|
603
|
+
* Loads the next page; called when the end of the table comes near the view, and again while it stays near after a
|
|
604
|
+
* page lands. A page that adds no rows (it failed) is retried only when the user scrolls.
|
|
605
|
+
*/
|
|
606
|
+
fetchNextPage?: () => unknown;
|
|
607
|
+
/**
|
|
608
|
+
* Shown instead of rows when there are none. Defaults to `table.infiniteEmptyState` from `UIConfig`, then to the
|
|
609
|
+
* table's `emptyState`.
|
|
610
|
+
*/
|
|
611
|
+
emptyState?: ReactNode;
|
|
612
|
+
/**
|
|
613
|
+
* The rows failed to load. Without rows, `errorContent` replaces `emptyState`; with rows (a failed refetch or
|
|
614
|
+
* page), they stay and `errorContent` shows as an alert above the table.
|
|
615
|
+
*/
|
|
616
|
+
isError?: boolean;
|
|
617
|
+
/** Shown while `isError` is set. Defaults to `table.infiniteErrorContent` from `UIConfig`, else a generic message. */
|
|
618
|
+
errorContent?: ReactNode;
|
|
619
|
+
/**
|
|
620
|
+
* Mounts the table right after the page's first commit (see `TableMountBoundary`).
|
|
621
|
+
* Defaults to `table.infiniteDeferMount` from `UIConfig`.
|
|
622
|
+
*/
|
|
623
|
+
deferMount?: boolean;
|
|
624
|
+
/**
|
|
625
|
+
* Where the next-page spinner appears.
|
|
626
|
+
* Defaults to `table.infiniteLoadingIndicator` from `UIConfig`.
|
|
627
|
+
* - `footer`: below the table while more pages exist.
|
|
628
|
+
* - `overlay`: centred over the visible rows while a page loads; the load trigger sits inside the table.
|
|
629
|
+
*/
|
|
630
|
+
loadingIndicator?: "footer" | "overlay";
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* A table that loads the next page as the user scrolls near its end. Pass `items` with `hasNextPage` /
|
|
634
|
+
* `fetchNextPage`, or the infinite query's `data` (or the whole `query`). Each page is requested once per `items` /
|
|
635
|
+
* `data` value, so keep that value stable between renders (memoize it) until new rows land; a failed request is
|
|
636
|
+
* retried on the next scroll.
|
|
637
|
+
*/
|
|
638
|
+
declare const InfiniteTable: <T extends RowData>({ items: itemsProp, data, query, hasNextPage, isFetchingNextPage, fetchNextPage, emptyState, isError, errorContent: errorContentProp, loadingIndicator: loadingIndicatorProp, deferMount: deferMountProp, isLoading, ...rest }: InfiniteTableProps<T>) => import("react").JSX.Element;
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/components/table/TableRowCheckbox.d.ts
|
|
641
|
+
interface TableRowCheckboxProps {
|
|
642
|
+
/** Accessible name of the checkbox. */
|
|
643
|
+
label: string;
|
|
644
|
+
className?: string;
|
|
645
|
+
isSelected: boolean;
|
|
646
|
+
isDisabled?: boolean;
|
|
647
|
+
/** Shows a partial selection; the native input is marked indeterminate. */
|
|
648
|
+
isIndeterminate?: boolean;
|
|
649
|
+
/** Icon shown while indeterminate. Defaults to a minus. */
|
|
650
|
+
indicator?: "check" | "plus" | "minus";
|
|
651
|
+
/** Receives the new selection and whether Shift was held, for range selection. */
|
|
652
|
+
onChange: (selected: boolean, shiftKey: boolean) => void;
|
|
653
|
+
}
|
|
654
|
+
/** A lightweight native checkbox for table rows and headers, cheap enough to render in every row. */
|
|
655
|
+
declare const TableRowCheckbox: ({ label, className, isSelected, isDisabled, isIndeterminate, indicator, onChange }: TableRowCheckboxProps) => import("react").JSX.Element;
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region src/components/table/tableSelectionModel.d.ts
|
|
658
|
+
type TableSelectionState = {
|
|
659
|
+
selected: boolean;
|
|
660
|
+
disabled?: boolean;
|
|
661
|
+
indeterminate?: boolean;
|
|
662
|
+
indicator?: "check" | "minus" | "plus";
|
|
663
|
+
visible?: boolean;
|
|
664
|
+
fallbackIndicator?: "info";
|
|
665
|
+
};
|
|
666
|
+
interface TableSelectionModel<T> {
|
|
667
|
+
getRowState(row: T): TableSelectionState;
|
|
668
|
+
setRowSelected(row: T, selected: boolean): void;
|
|
669
|
+
getHeaderState?(): TableSelectionState;
|
|
670
|
+
setHeaderSelected?(selected: boolean): void;
|
|
671
|
+
}
|
|
672
|
+
//#endregion
|
|
673
|
+
//#region src/components/table/TableSelectionCheckbox.d.ts
|
|
674
|
+
interface TableSelectionCheckboxProps<T> {
|
|
675
|
+
/** Accessible name of the checkbox. */
|
|
676
|
+
label: string;
|
|
677
|
+
/** Supplies the state and receives changes. */
|
|
678
|
+
model: TableSelectionModel<T>;
|
|
679
|
+
/** The row to select. Leave it out for the header checkbox, which uses the model's header state. */
|
|
680
|
+
row?: T;
|
|
681
|
+
className?: string;
|
|
682
|
+
}
|
|
683
|
+
/** Selection checkbox driven by a `TableSelectionModel`. Clicks never reach the row underneath. */
|
|
684
|
+
declare const TableSelectionCheckbox: <T>({ label, model, row, className }: TableSelectionCheckboxProps<T>) => import("react").JSX.Element | null;
|
|
685
|
+
//#endregion
|
|
686
|
+
//#region src/hooks/useControlledTableRowSelection.d.ts
|
|
687
|
+
interface UseControlledTableRowSelectionOptions {
|
|
688
|
+
/** Ids of the selected rows, as returned by the table's `getRowId`. */
|
|
689
|
+
selectedRowIds?: readonly string[];
|
|
690
|
+
/** Called once per row whose selection changed. */
|
|
691
|
+
onRowSelectionChange?: (rowId: string, selected: boolean) => void;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Bridges a list of selected ids to TanStack row selection. Spread the result onto `Table`: it is
|
|
695
|
+
* `rowSelection` and `onRowSelectionChange`.
|
|
696
|
+
*/
|
|
697
|
+
declare const useControlledTableRowSelection: ({ selectedRowIds, onRowSelectionChange }: UseControlledTableRowSelectionOptions) => {
|
|
698
|
+
readonly rowSelection: RowSelectionState;
|
|
699
|
+
readonly onRowSelectionChange: OnChangeFn<RowSelectionState>;
|
|
700
|
+
};
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region src/hooks/useRemainingNameColumnWidth.d.ts
|
|
703
|
+
interface UseRemainingNameColumnWidthArgs {
|
|
704
|
+
/** Narrowest the column gets, in pixels. Defaults to 280. */
|
|
705
|
+
minWidth?: number;
|
|
706
|
+
/** Combined width of the other columns, in pixels. */
|
|
707
|
+
reservedWidth: number;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* Width for a column that fills the space the other columns leave in the container.
|
|
711
|
+
* Attach `containerRef` to the element around the table.
|
|
712
|
+
*/
|
|
713
|
+
declare const useRemainingNameColumnWidth: ({ minWidth, reservedWidth }: UseRemainingNameColumnWidthArgs) => {
|
|
714
|
+
containerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
715
|
+
remainingNameColumnWidth: number;
|
|
716
|
+
};
|
|
717
|
+
//#endregion
|
|
718
|
+
//#region src/hooks/useSorting.d.ts
|
|
719
|
+
interface UseSortingOptions {
|
|
720
|
+
/**
|
|
721
|
+
* Sorting used when the URL has none. A sort already in the URL (reload, shared link) wins. Once the user clears the
|
|
722
|
+
* sort, it stays cleared until the URL changes from outside (a link, back/forward).
|
|
723
|
+
*/
|
|
724
|
+
defaultSorting?: SortingState;
|
|
725
|
+
/** Namespaces the query key (`order-<prefix>`) so several tables can share one page. */
|
|
726
|
+
prefix?: string;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Table sorting state kept in the URL query (`order`). The table only shows the sort: pass `order`
|
|
730
|
+
* (`"-createdAt,+name"`) to the list request so the server sorts the rows. Needs `UIRouter.UIRouterProvider` from
|
|
731
|
+
* `@povio/ui/ui-router` above it, which connects the app router.
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* const { sorting, setSorting, order } = useSorting({ defaultSorting: [{ id: "createdAt", desc: true }] });
|
|
735
|
+
* const { data } = useOrders({ order });
|
|
736
|
+
* <Table items={data} columns={columns} sorting={sorting} onSortingChange={setSorting} />
|
|
737
|
+
*/
|
|
738
|
+
declare function useSorting({ defaultSorting, prefix }?: UseSortingOptions): {
|
|
739
|
+
sorting: SortingState;
|
|
740
|
+
setSorting: import("react").Dispatch<import("react").SetStateAction<SortingState>>;
|
|
741
|
+
order: string;
|
|
742
|
+
};
|
|
743
|
+
//#endregion
|
|
744
|
+
//#region src/hooks/useTableColumnConfig.d.ts
|
|
745
|
+
type ColumnDef$1<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
746
|
+
/**
|
|
747
|
+
* Combines a saved column order with the current columns: unknown ids are dropped and new columns appended.
|
|
748
|
+
* `prependWhenMissing` columns go first when the saved order predates them; `trailingColumnIds` always go last.
|
|
749
|
+
*/
|
|
750
|
+
declare const mergeColumnOrder: (columnIds: string[], stored?: ColumnOrderState, prependWhenMissing?: string[], trailingColumnIds?: string[]) => string[];
|
|
751
|
+
interface UseTableColumnConfigOptions {
|
|
752
|
+
/**
|
|
753
|
+
* Saved visibility as `{ [columnId]: boolean }`, e.g. from user settings. Without it every column starts visible.
|
|
754
|
+
* Changing it resets the visibility to it; changing the columns keeps local changes.
|
|
755
|
+
*/
|
|
756
|
+
visibleColumns?: ColumnVisibilityState;
|
|
757
|
+
/**
|
|
758
|
+
* Saved column ids in display order. Without it the columns keep their defined order. Columns left out (added after
|
|
759
|
+
* the order was saved) go last. Changing it resets the order to it.
|
|
760
|
+
*/
|
|
761
|
+
columnOrder?: ColumnOrderState;
|
|
762
|
+
/** Pinned column ids. Changing it resets the pinning to it. */
|
|
763
|
+
columnPinning?: ColumnPinningState;
|
|
764
|
+
/** Called with the new visibility, to persist it. */
|
|
765
|
+
onVisibilityChange?: (value: ColumnVisibilityState) => void;
|
|
766
|
+
/** Called with the new order, to persist it. */
|
|
767
|
+
onOrderChange?: (value: ColumnOrderState) => void;
|
|
768
|
+
/** Called with the new pinning, to persist it. */
|
|
769
|
+
onPinningChange?: (value: ColumnPinningState) => void;
|
|
770
|
+
/** Saves every setting, including column widths, under one key of the storage adapter. */
|
|
771
|
+
location?: string;
|
|
772
|
+
/** Saves visibility, order and pinning under separate keys; widths are saved under the `order` key. */
|
|
773
|
+
persistence?: TableColumnStorageTarget["persistence"];
|
|
774
|
+
/** Storage adapter for `location` / `persistence`. Defaults to `TableColumnConfigStorageContext`. */
|
|
775
|
+
storage?: TableColumnConfigStorage;
|
|
776
|
+
/** Columns placed first when a saved order doesn't contain them yet, e.g. a newly added selection column. */
|
|
777
|
+
prependWhenMissing?: string[];
|
|
778
|
+
/** Columns that always stay last, e.g. actions. */
|
|
779
|
+
trailingColumnIds?: string[];
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* State for a user-configurable column set: which columns show, in what order, and which are pinned, with optional
|
|
783
|
+
* persistence. Pass `columns` to the table (already filtered and ordered) and the rest to `ColumnConfigModal` or
|
|
784
|
+
* `ColumnConfigPopover`. Columns with `enableHiding: false` (row actions, for example) always show and are not listed
|
|
785
|
+
* in the modal. Saved settings and widths are only used while `TableConfigurationEnabledContext` is on.
|
|
786
|
+
*
|
|
787
|
+
* @example
|
|
788
|
+
* const columnConfig = useTableColumnConfig(columns);
|
|
789
|
+
* <Table items={items} columns={columnConfig.columns} />
|
|
790
|
+
* <ColumnConfigModal trigger={<Button>Columns</Button>} {...columnConfig} onReset={columnConfig.resetColumns} />
|
|
791
|
+
*/
|
|
792
|
+
declare function useTableColumnConfig<TData extends RowData, TValue>(defaultColumns: ColumnDef$1<TData, TValue>[], options?: UseTableColumnConfigOptions): {
|
|
793
|
+
configColumns: ColumnDef$1<TData, TValue>[];
|
|
794
|
+
columns: ColumnDef$1<TData, TValue>[];
|
|
795
|
+
visibleColumns: ColumnVisibilityState;
|
|
796
|
+
columnOrder: string[];
|
|
797
|
+
columnPinning: ColumnPinningState;
|
|
798
|
+
onVisibilityChange: (value: ColumnVisibilityState) => void;
|
|
799
|
+
onOrderChange: (requestedOrder: ColumnOrderState) => void;
|
|
800
|
+
onPinningChange: (value: ColumnPinningState) => void;
|
|
801
|
+
resetColumns: () => void;
|
|
802
|
+
};
|
|
803
|
+
//#endregion
|
|
804
|
+
//#region src/hooks/useTableNav.d.ts
|
|
805
|
+
declare const Selectors: {
|
|
806
|
+
readonly Cell: '[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"],td,th';
|
|
807
|
+
readonly Row: '[role="row"],tr';
|
|
808
|
+
readonly RowGroup: '[role="rowgroup"],thead,tbody,tfoot';
|
|
809
|
+
/** Selector from here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/focus.ts#L10 */
|
|
810
|
+
readonly Focusable: 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not([aria-disabled="true"]):not([tabindex="-1"]):not(:disabled),*[tabindex]';
|
|
811
|
+
};
|
|
812
|
+
type Config = {
|
|
813
|
+
debug?: boolean;
|
|
814
|
+
selectors?: Partial<Record<keyof typeof Selectors, string>>;
|
|
815
|
+
/** How many rows to move when pressing page up/down - Default goes to first/last row */
|
|
816
|
+
pageUpDown?: number;
|
|
817
|
+
} | undefined;
|
|
818
|
+
declare class DataGridNav {
|
|
819
|
+
private selectors;
|
|
820
|
+
readonly pageUpDown: number | undefined;
|
|
821
|
+
private keys;
|
|
822
|
+
private disabled;
|
|
823
|
+
readonly debug: boolean;
|
|
824
|
+
private activeCell;
|
|
825
|
+
constructor();
|
|
826
|
+
constructor(config: Config);
|
|
827
|
+
private debugLog;
|
|
828
|
+
disable(): void;
|
|
829
|
+
enable(): void;
|
|
830
|
+
private isFocusable;
|
|
831
|
+
getActiveCell(): HTMLElement | null;
|
|
832
|
+
tableKeyUp(): void;
|
|
833
|
+
tableKeyDown(e: KeyboardEvent): void;
|
|
834
|
+
cellNavigation(e: KeyboardEvent): void;
|
|
835
|
+
gridNavigation(e: KeyboardEvent): void;
|
|
836
|
+
private getRows;
|
|
837
|
+
private pageCellNavigation;
|
|
838
|
+
private verticalCellNavigation;
|
|
839
|
+
private focusOnFirstCell;
|
|
840
|
+
private getColumnIndex;
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Arrow-key cell navigation for a hand-built `<table>` or ARIA grid: spread `listeners` on the table element.
|
|
844
|
+
* `Table` and `InfiniteTable` already use it; don't add it to them.
|
|
845
|
+
*
|
|
846
|
+
* Arrows move between cells; from a widget inside a cell, Left/Right step through the cell's widgets and then on to the
|
|
847
|
+
* next cell, and Up/Down move to the cell above or below. Escape moves from a widget to its cell. Text fields keep
|
|
848
|
+
* their arrow keys. Give one cell `tabIndex={0}` and the rest `-1` so Tab can reach the grid.
|
|
849
|
+
*/
|
|
850
|
+
declare function useTableNav(options?: Config): {
|
|
851
|
+
listeners: {
|
|
852
|
+
onKeyDown: (e: KeyboardEvent) => void;
|
|
853
|
+
onKeyUp: () => void;
|
|
854
|
+
};
|
|
855
|
+
tableNav: DataGridNav;
|
|
856
|
+
};
|
|
857
|
+
//#endregion
|
|
858
|
+
export { orderTableColumns as $, InfiniteTableQueryState as A, RowDragHandleCell as B, TableSelectionState as C, CellDateUTC as Ct, InfiniteTableData as D, InfiniteTable as E, Table$1 as F, HeaderText as G, TableRowDetails as H, TableProps as I, ColumnConfigModal as J, HeaderTextProps as K, TableReorderContext as L, BulkSelectionActionsComponent as M, ColumnDef$2 as N, InfiniteTablePage as O, Row$1 as P, ColumnConfigProps as Q, TableRowRenderContext as R, TableSelectionModel as S, CellDateTimeUTC as St, TableRowCheckboxProps as T, CellTextProps as Tt, TableColumnFilterContext as U, TableMountBoundary as V, TableColumnLayout as W, ColumnConfigPopover as X, ColumnConfigModalProps as Y, ColumnConfigContentProps as Z, useRemainingNameColumnWidth as _, CellLink as _t, ExpandedState$1 as a, CellDateFormatOptions as at, TableSelectionCheckbox as b, CellDateProps as bt, SortingState$1 as c, formatCellDateTimeUTCValue as ct, UseTableColumnConfigOptions as d, formatCellDateValue as dt, formatColumnBoolean as et, mergeColumnOrder as f, toCellDate as ft, UseRemainingNameColumnWidthArgs as g, CellNumberValueProps as gt, useSorting as h, CellNumberValue as ht, ColumnVisibilityState$1 as i, CELL_DATE_PLACEHOLDER as it, InfiniteTableWrapperProps as j, InfiniteTableProps as k, StockFeatures$1 as l, formatCellDateTimeValue as lt, UseSortingOptions as m, CellNumberProps as mt, ColumnPinningState$1 as n, formatColumnNumber as nt, OnChangeFn$1 as o, formatCellDateTime as ot, useTableColumnConfig as p, CellNumber as pt, ColumnConfigContent as q, ColumnSizingState$1 as r, formatColumnText as rt, RowSelectionState$1 as s, formatCellDateTimeUTC as st, ColumnOrderState$1 as t, formatColumnEnum as tt, useTableNav as u, formatCellDateUTCValue as ut, UseControlledTableRowSelectionOptions as v, CellLinkProps as vt, TableRowCheckbox as w, CellText as wt, TableSelectionCheckboxProps as x, CellDateTime as xt, useControlledTableRowSelection as y, CellDate as yt, TableWrapperProps as z };
|