@povio/ui 6.0.0-rc.12 → 6.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +469 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/{Accordion-ORBin0EZ.js → Accordion-gUW7u1Zn.js} +41 -41
- package/dist/Alert-DwnALnFY.d.ts +36 -0
- package/dist/AlertDialog-BcRiqY_n.d.ts +70 -0
- package/dist/Autocomplete-CV4Aa1Ok.js +319 -0
- package/dist/Autocomplete-DRwQxx0U.d.ts +123 -0
- package/dist/Badge-CO-ZsmbR.d.ts +67 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-APVu5TUd.js} +8 -8
- package/dist/BottomSheet-Be0HtQzP.d.ts +65 -0
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-NNB7ivkW.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-Bn3fqVYx.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-Cd75RPbS.js} +33 -17
- package/dist/{Button-C1YB5dOw.js → Button-BJJkLVNj.js} +1 -5
- package/dist/{Button-BaODzvZd.js → Button-CzEs3tcV.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-Hk8zm9q_.d.ts} +2 -2
- package/dist/ButtonBase-Cp1w00t2.d.ts +47 -0
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-aGz6DYum.js} +10 -18
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DN-i_b-_.js} +19 -17
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-CqmyDSND.js} +4 -4
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-CzKXZw_w.js} +35 -9
- package/dist/Checkbox-D32MOIhF.d.ts +49 -0
- package/dist/CheckboxCheckmark-DDU_Ie7-.js +42 -0
- package/dist/CheckboxGroup-B5Mn1G3u.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-BqWt09kZ.js} +75 -35
- package/dist/DatePicker-CmoVbapu.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-DQewd1By.js} +80 -41
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-B9VnExeA.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-Bp9ZIN5E.js} +37 -26
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-DRZ1hLlR.js} +86 -158
- package/dist/DateRangePicker-LX1VJlnD.d.ts +102 -0
- package/dist/DateTimePicker-D9pODhAj.d.ts +83 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-DWtKPaE6.js} +70 -35
- package/dist/{Dialog-C9H9_BmK.js → Dialog-BJ13KRQo.js} +1 -1
- package/dist/{Dialog-DN5703sy.js → Dialog-BzQYDPJ9.js} +23 -19
- package/dist/Dialog-D0SeePPz.d.ts +66 -0
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-Bjm5IOpg.js} +1 -1
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-DTr7b-XO.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-DrshB60h.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-DxGA0yvx.js} +14 -8
- package/dist/FileInput-Bokcp9nH.d.ts +61 -0
- package/dist/{FileInput-BUwtAF2-.js → FileInput-LMhFxlqB.js} +75 -80
- package/dist/FileUpload-BqXd4_nz.d.ts +181 -0
- package/dist/FileUpload-CJZrkr_U.js +679 -0
- package/dist/{FormField-dduTMkNH.js → FormField-TI8Vx5aC.js} +10 -10
- package/dist/FormField-XQbjfGSv.d.ts +70 -0
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DB7KrrcD.js +22 -0
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-CQLHX8-Y.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CjDUsi2I.js} +1 -1
- package/dist/{Input-CG5LQ0zs.js → Input-CeRJeAoR.js} +94 -59
- package/dist/Input-onUj0DKg.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B8OCdbVP.js} +15 -13
- package/dist/InputContent-D5ZkB9hO.d.ts +39 -0
- package/dist/Link-BdnWVYL9.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-gR4iSV7N.js} +3 -3
- package/dist/{Modal-DcLWF9cB.js → Modal-DAMsCwzb.js} +1 -1
- package/dist/{NumberField-DxuikBcr.js → NumberField-6Q9LHGSo.js} +91 -62
- package/dist/NumberField-Sb30Qao3.d.ts +41 -0
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BDSkcHVJ.js} +152 -101
- package/dist/NumberRangeInput-Dvq8mOUY.d.ts +89 -0
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-eJk6GNK6.d.ts} +6 -5
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-BcHpV0Ie.js} +6 -6
- package/dist/PasswordInput-VHzP4VPU.d.ts +16 -0
- package/dist/Popover-qplPGDnR.d.ts +51 -0
- package/dist/Progress-DH-w99MU.d.ts +26 -0
- package/dist/Progress-WzWvbvtp.js +180 -0
- package/dist/ProgressBar-BsSimmJF.js +46 -0
- package/dist/RadioGroup-CC8bKtBN.d.ts +52 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-PKqFHoKP.js} +66 -26
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DqCTlIuy.js} +12 -10
- package/dist/Select-CSyfDyxG.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-D3fuXwVt.js} +435 -184
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-DqAxkT1f.js} +46 -37
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-BGl_PIsH.js} +280 -363
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-CdtK2M-C.d.ts} +31 -17
- package/dist/{Slider-DCsCCPFx.js → Slider-BCUiALjE.js} +69 -12
- package/dist/Slider-DxalZD3o.d.ts +57 -0
- package/dist/Spinner-BTrEbNFy.d.ts +13 -0
- package/dist/SplitButton-Dv5l8p5t.d.ts +25 -0
- package/dist/Stepper-B1IOUcSI.d.ts +49 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-DA2G546I.js} +116 -88
- package/dist/{Switch-BfpSMMpv.js → Switch-Ce-bJOVw.js} +54 -12
- package/dist/Switch-urNrop0P.d.ts +42 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-Cweij8He.js} +44 -33
- package/dist/TabsFilters-M5Ld7eb8.d.ts +59 -0
- package/dist/Tag-BKR1AZFa.d.ts +26 -0
- package/dist/TextArea-D7YVclaz.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-P8F0oD_A.js} +59 -32
- package/dist/TimePicker-Ai1M2TGW.d.ts +63 -0
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-l4Ysk2AX.js} +99 -50
- package/dist/{TimePickerForm-DD9VA_td.js → TimePickerForm-BMqNpDPT.js} +5 -5
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-BeklfvlK.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-DWw53pTt.d.ts} +2 -2
- package/dist/ToggleGroup-BQk3k0at.d.ts +95 -0
- package/dist/ToggleGroup-BdIgqoqA.js +500 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-BkXPEBqw.js} +2 -2
- package/dist/Tooltip-H8OB7CqY.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-ubbBHHVD.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-Cx1oRGxd.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-BpoxNggB.js} +20 -22
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-Dyy_RUZU.d.ts} +1 -1
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +174 -128
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +17 -15
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/badge.js +159 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +4 -4
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +4 -41
- package/dist/components/date-range-picker.js +4 -2
- package/dist/components/date-range-presets.d.ts +2 -0
- package/dist/components/date-range-presets.js +3 -0
- package/dist/components/date-time-picker.d.ts +2 -2
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +1 -1
- package/dist/components/drawer.js +16 -80
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +2 -3
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload.d.ts +2 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +3 -2
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +22 -25
- package/dist/components/icon-slot.d.ts +1 -2
- package/dist/components/icon-slot.js +2 -2
- package/dist/components/input-frame.d.ts +6 -10
- package/dist/components/input-frame.js +29 -26
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -2
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +2 -2
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +5 -5
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +1 -22
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +105 -87
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +71 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +15 -4
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +2 -2
- package/dist/components/style-definitions.js +33 -18
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +1 -1
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +50 -64
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -3
- package/dist/components/toast.js +4 -3
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.d.ts +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/use-toast.d.ts +2 -2
- package/dist/components/use-toast.js +1 -41
- package/dist/config/component-configuration.d.ts +1 -1
- package/dist/config/component-configuration.js +53 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +3 -3
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-BflM4Vxg.js +93 -0
- package/dist/confirmation.context-C_js9qNv.d.ts +32 -0
- package/dist/{datePickerInput.cva-Du0Zn04v.js → datePickerInput.cva-CWkV2fut.js} +1 -1
- package/dist/dateRangePreset.utils-Bnb-rjTt.js +116 -0
- package/dist/{dialog.cva-BIpz6HcA.js → dialog.cva-BjVggO5l.js} +1 -1
- package/dist/{dist-DEZzXa0W.js → dist-DZOoWaZz.js} +63 -38
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-BopsvbOy.js} +19 -7
- package/dist/{exports-BNrTn8Tj.js → exports-DeBGRThC.js} +3 -3
- package/dist/{file.utils-Crb-mIHs.d.ts → file.utils-DUADtzdt.d.ts} +3 -3
- package/dist/{file.utils-DqQxnuAm.js → file.utils-X6tkeWaz.js} +2 -6
- package/dist/fileInputButton.cva-gbqRUf1g.js +39 -0
- package/dist/{fileUpload.cva-BYzXGc9C.js → fileUpload.cva-MH5ziWUe.js} +2 -2
- package/dist/form-field-Bw7U_ZPI.d.ts +1 -0
- package/dist/form.binding-Brdjq2yr.js +161 -0
- package/dist/form.binding-DSXB2AOD.d.ts +127 -0
- package/dist/form.types-a2WVJDQX.d.ts +43 -0
- package/dist/formReset-CnZl_yze.js +35 -0
- package/dist/hints-B09_WDhL.d.ts +17 -0
- package/dist/hooks/use-async-list.d.ts +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-breakpoint.d.ts +3 -0
- package/dist/hooks/use-breakpoint.js +2 -0
- package/dist/hooks/use-filters.d.ts +2 -2
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-B3PeqBM7.d.ts} +100 -4
- package/dist/{i18n-D8vXIoiq.js → i18n-DQs7jPjv.js} +99 -9
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-C73fI3WD.js} +2 -2
- package/dist/index.d.ts +64 -83
- package/dist/index.js +55 -90
- package/dist/{input.cva-DZii82eS.js → input.cva-mm1dnfKP.js} +27 -23
- package/dist/inputLayout-CIVpuUBq.js +7 -0
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BcBuP9ZT.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-D6L1c2wq.d.ts +2157 -0
- package/dist/{logger-CqZjM-sn.js → logger-CW24po62.js} +10 -1
- package/dist/{progress.cva-CsGaGVJ-.js → progress.cva-mkJxrrac.js} +2 -2
- package/dist/{radio.cva-DistaZtZ.js → radio.cva-Dt5N2ul2.js} +7 -7
- package/dist/rich-text-editor.d.ts +44 -2
- package/dist/rich-text-editor.js +733 -1
- package/dist/router.context-B6j_M4cN.js +151 -0
- package/dist/router.context-CSd9JYQ4.d.ts +33 -0
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BYk1tcxs.js} +43 -13
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack-ABeiJISz.js +10 -0
- package/dist/tanstack-bLXoUPDY.d.ts +165 -0
- package/dist/tanstack.d.ts +64 -83
- package/dist/tanstack.js +55 -90
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-C3oA7He3.js} +8 -8
- package/dist/toast.runtime-BHXdSTXV.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/uiConfig.context-CN_QgxGO.d.ts +19 -0
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-CjnLnQOo.js} +5 -7
- package/dist/{uiConfig.context-BnCORTNm.d.ts → uiConfig.types-B0sPL7nN.d.ts} +34 -34
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-CQgkDfjW.js} +140 -35
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-BrJrvp9_.js} +5 -1
- package/dist/useBreakpoint-D-SVcBeQ.d.ts +9 -0
- package/dist/useDebounceCallback-BjePw6y4.js +90 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BN-zueci.js +419 -0
- package/dist/{useFormAutosave-BBLm3Ujo.d.ts → useFormAutosave-ClMnzVE7.d.ts} +1 -1
- package/dist/{useIntersectionObserver-DFAhTsV0.js → useIntersectionObserver-B8msnQTR.js} +15 -3
- package/dist/{numberStatic.utils-BIyZuILs.js → useLiveNumberFieldState-B7qGzySj.js} +103 -2
- package/dist/useRemoveButton-B6-IGvpY.js +98 -0
- package/dist/useResolveDateRangePreset-C_L-doA6.js +26 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-C8chM7c-.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/{useTableColumnConfig-CXYgj5xi.js → useTableColumnConfig-B9cYBKo3.js} +956 -535
- package/dist/useTableNav-rP1wDkhV.d.ts +372 -0
- package/dist/useToast-D2C9pROU.d.ts +78 -0
- package/dist/useToast-DSoOiSw0.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/llms.txt +3116 -0
- package/package.json +13 -121
- package/MIGRATION.md +0 -655
- package/dist/Alert-D4X7OWiv.d.ts +0 -34
- package/dist/AlertDialog-DklLDjmw.d.ts +0 -26
- package/dist/Autocomplete-BgFz3kuR.d.ts +0 -23
- package/dist/Autocomplete-Bn13u0zu.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-Dwh__y-Z.js +0 -28
- package/dist/Badge-Db1ndK67.d.ts +0 -30
- package/dist/BadgeButton-BPhWDAnc.d.ts +0 -15
- package/dist/BottomSheet-BZmDJBR-.d.ts +0 -33
- package/dist/ButtonBase-CZuEy3Pk.d.ts +0 -32
- package/dist/Checkbox-w2j5hLOQ.d.ts +0 -27
- package/dist/Checkbox.bound-D2nBglJz.js +0 -33
- package/dist/Checkbox.bound-DD_RCjVm.d.ts +0 -9
- package/dist/CheckboxCheckmark-DWsYVZuu.js +0 -25
- package/dist/CheckboxGroup-BYI15Y09.d.ts +0 -30
- package/dist/CheckboxGroup.bound-DY0HKGSh.js +0 -32
- package/dist/CheckboxGroup.bound-QiJ-P0KR.d.ts +0 -9
- package/dist/ComboBox-ChsdI0lt.js +0 -212
- package/dist/DatePicker-QzfQf21b.d.ts +0 -56
- package/dist/DatePicker.bound-DoCAqhM4.d.ts +0 -9
- package/dist/DatePicker.bound-M2cjR37s.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-CkIDsAUf.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/DateTimePicker.bound-nSCVUqd0.js +0 -32
- package/dist/Dialog-CO9xljD3.d.ts +0 -21
- package/dist/Drawer-D1cHiBFO.d.ts +0 -18
- package/dist/DropdownMenu-D_9z9ond.d.ts +0 -25
- package/dist/FileInput-BEaECoBS.d.ts +0 -75
- package/dist/FileInput.bound-C12mOKpg.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-D7FMYm-k.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-DmkuulOi.js +0 -30
- package/dist/FileUploadContainer-Dzg5aXXZ.d.ts +0 -5
- package/dist/FormField-DGyCDxOp.d.ts +0 -42
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +0 -17
- package/dist/IconButton-shH_9wcl.d.ts +0 -25
- package/dist/Input-CTp_9mS9.d.ts +0 -34
- package/dist/Input.bound-B9a62ylL.d.ts +0 -9
- package/dist/Input.bound-DYoXyRGy.js +0 -31
- package/dist/InputContent-BCNkN4Fx.d.ts +0 -27
- package/dist/Link-PvYB_M-j.d.ts +0 -30
- package/dist/MenuItem-U3-pu1j5.d.ts +0 -6
- package/dist/NumberField-WXebfxjK.d.ts +0 -34
- package/dist/NumberField.bound-ChJnNyJS.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-BF6P_ega.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- package/dist/PasswordInput-EhQjYyJS.d.ts +0 -11
- package/dist/PasswordInput.bound-CK5GwKL4.d.ts +0 -9
- package/dist/Popover-D_t1XDPA.d.ts +0 -20
- package/dist/Progress-Ckfpi_-M.d.ts +0 -45
- package/dist/Progress-RiEGGxNG.js +0 -119
- package/dist/RadioGroup-6e-Z6jW8.d.ts +0 -26
- package/dist/RadioGroup.bound-BFWSq-on.js +0 -32
- package/dist/RadioGroup.bound-w3SZqSkH.d.ts +0 -9
- package/dist/RichTextEditor-DHhuBeT6.d.ts +0 -28
- package/dist/RichTextEditor-DfwVdm45.js +0 -651
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound--Az1Xwgm.js +0 -34
- package/dist/Select.bound-qOihchei.d.ts +0 -17
- package/dist/Slider-DRg8zKRM.d.ts +0 -23
- package/dist/Slider.bound-CByTXPTr.js +0 -31
- package/dist/Slider.bound-CaEF19um.d.ts +0 -9
- package/dist/Spinner-Cvy_6zgD.d.ts +0 -30
- package/dist/Spinner-DqjP06T1.js +0 -101
- package/dist/SplitButton-V1f2NWfh.d.ts +0 -15
- package/dist/Stepper-k91x_m-E.d.ts +0 -114
- package/dist/Switch-ELVPkPx0.d.ts +0 -24
- package/dist/Switch.bound-DeEdVvZV.d.ts +0 -9
- package/dist/Switch.bound-Dv0cHsMM.js +0 -33
- package/dist/TableDnd-CuHxANWh.js +0 -133
- package/dist/TableRowDetails-D8HFTghI.d.ts +0 -109
- package/dist/TabsFilters-DePddjCk.d.ts +0 -30
- package/dist/Tag-B2_ZiSE-.d.ts +0 -44
- package/dist/TextArea-iqUeB2QY.d.ts +0 -26
- package/dist/TextArea.bound-BJHyCogp.d.ts +0 -9
- package/dist/TextArea.bound-DeaskY6r.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-BFSXJvE_.js +0 -32
- package/dist/Toast-D9pdadZ4.d.ts +0 -16
- package/dist/ToggleGroup-CrDoeLN0.js +0 -333
- package/dist/ToggleGroup-DvjnSinl.d.ts +0 -42
- package/dist/ToggleGroup.bound-B03ISHQ8.d.ts +0 -9
- package/dist/ToggleGroup.bound-DCnYwmBt.js +0 -67
- package/dist/Tooltip-B8DTURLQ.d.ts +0 -16
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +0 -11
- package/dist/badgeButton.cva-CBFIhr1S.d.ts +0 -41
- package/dist/button.cva-C8LGtNJ3.d.ts +0 -94
- package/dist/checkbox.cva-CCh_UlrC.d.ts +0 -76
- package/dist/components/badge-button.d.ts +0 -2
- package/dist/components/badge-button.js +0 -74
- package/dist/components/file-upload-container.d.ts +0 -3
- package/dist/components/file-upload-container.js +0 -15
- package/dist/confirmation.context-Bc2yEVp_.js +0 -114
- package/dist/confirmation.context-C_GDRn3a.d.ts +0 -23
- package/dist/fileUpload.types-C-ke21yY.d.ts +0 -110
- package/dist/form.binding-DOR5gIQf.js +0 -49
- package/dist/form.types-C8P4sznq.d.ts +0 -22
- package/dist/formFieldHelper.cva-DRmSyRZN.js +0 -14
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +0 -9
- package/dist/icons.d.ts +0 -4
- package/dist/icons.js +0 -3
- package/dist/input.cva-BjuHsDGy.d.ts +0 -80
- package/dist/inputLayout-KdAtunGk.js +0 -5
- package/dist/link.context-BCHn7NSy.d.ts +0 -12
- package/dist/radio.cva-D7M1hqLe.d.ts +0 -56
- package/dist/router.context-CtafjXV7.d.ts +0 -16
- package/dist/router.context-MckTbHw9.js +0 -63
- package/dist/routing.utils-DfxEt0_Y.js +0 -30
- package/dist/style-definitions-Dx6aFDiR.d.ts +0 -1038
- package/dist/switch.cva-r6vcS25Q.d.ts +0 -16
- package/dist/tanstack/autocomplete.d.ts +0 -3
- package/dist/tanstack/autocomplete.js +0 -2
- package/dist/tanstack/checkbox-group.d.ts +0 -3
- package/dist/tanstack/checkbox-group.js +0 -2
- package/dist/tanstack/checkbox.d.ts +0 -3
- package/dist/tanstack/checkbox.js +0 -2
- package/dist/tanstack/date-picker.d.ts +0 -3
- package/dist/tanstack/date-picker.js +0 -2
- package/dist/tanstack/date-range-picker.d.ts +0 -3
- package/dist/tanstack/date-range-picker.js +0 -2
- package/dist/tanstack/date-time-picker.d.ts +0 -3
- package/dist/tanstack/date-time-picker.js +0 -2
- package/dist/tanstack/file-input.d.ts +0 -3
- package/dist/tanstack/file-input.js +0 -2
- package/dist/tanstack/file-upload.d.ts +0 -4
- package/dist/tanstack/file-upload.js +0 -2
- package/dist/tanstack/input.d.ts +0 -3
- package/dist/tanstack/input.js +0 -2
- package/dist/tanstack/number-field.d.ts +0 -3
- package/dist/tanstack/number-field.js +0 -2
- package/dist/tanstack/number-range-input.d.ts +0 -3
- package/dist/tanstack/number-range-input.js +0 -2
- package/dist/tanstack/password-input.d.ts +0 -2
- package/dist/tanstack/password-input.js +0 -2
- package/dist/tanstack/radio-group.d.ts +0 -3
- package/dist/tanstack/radio-group.js +0 -2
- package/dist/tanstack/rich-text-editor.d.ts +0 -9
- package/dist/tanstack/rich-text-editor.js +0 -28
- package/dist/tanstack/select.d.ts +0 -3
- package/dist/tanstack/select.js +0 -2
- package/dist/tanstack/slider.d.ts +0 -3
- package/dist/tanstack/slider.js +0 -2
- package/dist/tanstack/switch.d.ts +0 -3
- package/dist/tanstack/switch.js +0 -2
- package/dist/tanstack/text-area.d.ts +0 -3
- package/dist/tanstack/text-area.js +0 -2
- package/dist/tanstack/time-picker.d.ts +0 -3
- package/dist/tanstack/time-picker.js +0 -2
- package/dist/tanstack/toggle-group.d.ts +0 -3
- package/dist/tanstack/toggle-group.js +0 -2
- package/dist/tanstack-Bgdv0qU1.js +0 -19
- package/dist/tanstack-wNbE6b-h.d.ts +0 -566
- package/dist/toast.cva-AmLw6Cf5.d.ts +0 -61
- package/dist/toast.runtime-Drd2IJ_j.js +0 -17
- package/dist/toastActivation.store-BELtcr76.js +0 -16
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +0 -26
- package/dist/typography.cva-BCHlTHdM.d.ts +0 -36
- package/dist/useAsyncList-Cu-Y8If2.d.ts +0 -9
- package/dist/useFilters-BxRScJdn.d.ts +0 -11
- package/dist/useFilters-DMi94RZK.js +0 -190
- package/dist/useForm-Cb7KWLds.js +0 -217
- package/dist/useForm-I6z23FXf.d.ts +0 -51
- package/dist/useFormAutosave-BPGlChiY.js +0 -216
- package/dist/useTableNav-BusSFEVC.d.ts +0 -197
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { c as TableRowVariantProps, l as TableVariant } from "./link.cva-D6L1c2wq.js";
|
|
2
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { n as TypographyProps } from "./Typography-Cx1oRGxd.js";
|
|
4
|
+
import { a as TableRowDetailsMode } from "./uiConfig.types-B0sPL7nN.js";
|
|
5
|
+
import { CSSProperties, ComponentType, FC, KeyboardEvent, ReactElement, ReactNode, RefObject, SetStateAction } from "react";
|
|
6
|
+
import { ColumnDef, ColumnOrderState, ColumnPinningState, ColumnSizingState, ColumnVisibilityState, ExpandedState, OnChangeFn, Row, RowData, RowSelectionState, SortingState, StockFeatures, Table } from "@tanstack/react-table";
|
|
7
|
+
import { DragEndEvent, UniqueIdentifier } from "@dnd-kit/core";
|
|
8
|
+
import { TFunction } from "i18next";
|
|
9
|
+
//#region src/components/table/CellText.d.ts
|
|
10
|
+
interface CellTextProps extends Partial<Pick<TypographyProps, "size">> {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
declare const CellText: FC<CellTextProps>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/table/ColumnConfig.d.ts
|
|
18
|
+
type ColumnDef$3<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
19
|
+
type VisibilityState$2 = ColumnVisibilityState;
|
|
20
|
+
/**
|
|
21
|
+
* Dialog where the user shows, hides and reorders table columns. Opens like `Dialog`: pass `trigger`, or control it
|
|
22
|
+
* with `isOpen` + `onOpenChange`. The column props come from `useTableColumnConfig`.
|
|
23
|
+
*/
|
|
24
|
+
interface ColumnConfigModalProps<TData extends RowData, TValue = unknown> {
|
|
25
|
+
/** Controlled open state. Optional only when `trigger` owns the state; without either the dialog never opens. */
|
|
26
|
+
isOpen?: boolean;
|
|
27
|
+
/** Called with the next open state: `false` on Escape, outside press, the close icon or "Done". */
|
|
28
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
29
|
+
/** A pressable element (`Button`, `IconButton`) that opens the dialog on press. */
|
|
30
|
+
trigger?: ReactElement;
|
|
31
|
+
/** @deprecated Use `onOpenChange`. */
|
|
32
|
+
onClose?: Removed<"Use `onOpenChange`; it is called with `false` when the dialog closes">;
|
|
33
|
+
/**
|
|
34
|
+
* Every column in its current order, hidden ones included: `configColumns` from `useTableColumnConfig`. Columns with
|
|
35
|
+
* `enableHiding: false` (row actions, for example) always show and are not listed.
|
|
36
|
+
*/
|
|
37
|
+
configColumns: ColumnDef$3<TData, TValue>[];
|
|
38
|
+
/** Visibility as `{ [columnId]: boolean }`; a missing id counts as visible. */
|
|
39
|
+
visibleColumns: VisibilityState$2;
|
|
40
|
+
/** Called with the full visibility map after a column is toggled. */
|
|
41
|
+
onVisibilityChange: (visibleColumns: VisibilityState$2) => void;
|
|
42
|
+
/** Called with every column id (unlisted ones included) in the new order after a drag. */
|
|
43
|
+
onOrderChange: (columnOrder: ColumnOrderState) => void;
|
|
44
|
+
/** Shows a "Reset" button that restores the default visibility and order. */
|
|
45
|
+
onReset?: () => void;
|
|
46
|
+
}
|
|
47
|
+
declare function ColumnConfigModal<TData extends RowData, TValue = unknown>({ isOpen, onOpenChange, trigger, configColumns, visibleColumns, onVisibilityChange, onOrderChange, onReset }: ColumnConfigModalProps<TData, TValue>): import("react").JSX.Element;
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/components/table/HeaderText.d.ts
|
|
50
|
+
interface HeaderTextProps extends Partial<Pick<TypographyProps, "size">> {
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
className?: string;
|
|
53
|
+
style?: CSSProperties;
|
|
54
|
+
}
|
|
55
|
+
declare const HeaderText: FC<HeaderTextProps>;
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/table/TableRowDetails.d.ts
|
|
58
|
+
interface TableRowDetails<T extends RowData> {
|
|
59
|
+
/** How a row's details open. Defaults to `table.rowDetailsMode` from `UIConfig`. */
|
|
60
|
+
mode?: TableRowDetailsMode;
|
|
61
|
+
/** The details of one row. `close` closes them again. */
|
|
62
|
+
render: (row: T, helpers: {
|
|
63
|
+
close: () => void;
|
|
64
|
+
}) => ReactNode;
|
|
65
|
+
/** Heading of the `drawer` and `split` panels, also their accessible name. Defaults to the translated "Row details". */
|
|
66
|
+
title?: (row: T) => string;
|
|
67
|
+
/** Rows that have details. Defaults to all rows. */
|
|
68
|
+
canOpen?: (row: T) => boolean;
|
|
69
|
+
/** `expand` mode only: `single` (default) closes the open row when another one opens. */
|
|
70
|
+
expandMode?: "single" | "multiple";
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/components/table/Table.d.ts
|
|
74
|
+
/** A column definition for rows of `TData`: TanStack's `ColumnDef` with this table's features applied. */
|
|
75
|
+
type ColumnDef$2<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
76
|
+
type ReactTable<TData extends RowData> = Table<StockFeatures, TData>;
|
|
77
|
+
/** A row of `TData` as cell renderers and row callbacks receive it: TanStack's `Row` with this table's features. */
|
|
78
|
+
type Row$1<TData extends RowData> = Row<StockFeatures, TData>;
|
|
79
|
+
type AnyValueColumnDef<TData extends RowData> = ColumnDef$2<TData, any>;
|
|
80
|
+
type VisibilityState$1 = ColumnVisibilityState;
|
|
81
|
+
/**
|
|
82
|
+
* Rendered in place of the header row while rows are selected; read the selection from `table`. Define it at module
|
|
83
|
+
* scope: the table renders it as a component, so one defined inline remounts (and loses its state) on every render.
|
|
84
|
+
*/
|
|
85
|
+
type BulkSelectionActionsComponent<T extends RowData> = ComponentType<{
|
|
86
|
+
table: ReactTable<T>;
|
|
87
|
+
}>;
|
|
88
|
+
interface TableWrapperProps<T extends RowData> extends Omit<TableProps<T>, "columns"> {}
|
|
89
|
+
interface TableProps<T extends RowData> extends TableRowVariantProps {
|
|
90
|
+
/** The rows, in display order. The table renders them as given: it does not sort, filter or page them. */
|
|
91
|
+
items: T[];
|
|
92
|
+
/** @deprecated Use `items`. */
|
|
93
|
+
data?: Removed<"Use `items`">;
|
|
94
|
+
/** @deprecated Tables have no pager. Use `InfiniteTable` for server lists. */
|
|
95
|
+
pagination?: Removed<"Tables have no pager: use `InfiniteTable` with `hasNextPage` and `fetchNextPage`">;
|
|
96
|
+
/** Column definitions (`ColumnDef<Row>[]` from this entry), or a function of `t` returning them. */
|
|
97
|
+
columns: ((t: TFunction) => AnyValueColumnDef<T>[]) | AnyValueColumnDef<T>[];
|
|
98
|
+
/** Lines between columns. Defaults to on, except for the `horizontals`, `zebra` and `striped-columns` variants. */
|
|
99
|
+
showCellBorder?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Runs when a row is clicked, or Enter is pressed on one of its cells, with the row's item. Replaces the built-in
|
|
102
|
+
* row action (opening `rowDetails`, or toggling selection). Prefer `rowDetails` for showing more.
|
|
103
|
+
*/
|
|
104
|
+
onRowAction?: (item: T) => void;
|
|
105
|
+
/** Runs with the row's item when a row is double-clicked. Mouse only: give keyboard users the same action another way. */
|
|
106
|
+
onRowDoubleClick?: (item: T) => void;
|
|
107
|
+
/**
|
|
108
|
+
* The rows are loading (a query's `isLoading`): the body shows a spinner in place of the rows. `InfiniteTable` shows
|
|
109
|
+
* its own spinner for further pages from `isFetchingNextPage`.
|
|
110
|
+
*/
|
|
111
|
+
isLoading?: boolean;
|
|
112
|
+
/** Shown in the body when `items` is empty and `isLoading` is not set. Defaults to a "No results" message. */
|
|
113
|
+
emptyState?: ReactNode;
|
|
114
|
+
/** @deprecated Use `isLoading`. */
|
|
115
|
+
loading?: Removed<"Use `isLoading`">;
|
|
116
|
+
/** @deprecated Use `emptyState`. */
|
|
117
|
+
emptyText?: Removed<"Use `emptyState`; it takes any node">;
|
|
118
|
+
/** @deprecated Use `onRowAction`. */
|
|
119
|
+
onRowClick?: Removed<"Use `onRowAction`; it also runs on Enter">;
|
|
120
|
+
/** @deprecated Use `onRowDoubleClick`. */
|
|
121
|
+
onDoubleClick?: Removed<"Use `onRowDoubleClick`">;
|
|
122
|
+
/**
|
|
123
|
+
* Classes for the `<table>` element itself. Style the scrolling wrapper (border, radius, background, width) with
|
|
124
|
+
* `containerClassName`, and limit its height with `maxHeight`.
|
|
125
|
+
*/
|
|
126
|
+
className?: string;
|
|
127
|
+
/** Border style. Defaults to `table.variant` from `UIConfig`. */
|
|
128
|
+
variant?: TableVariant;
|
|
129
|
+
/** Classes for the scroll container around the `<table>`: the table's outer element. */
|
|
130
|
+
containerClassName?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Max height of the scroll container. When set, rows scroll inside the table and the header stays pinned.
|
|
133
|
+
* Without it the table grows with its rows; wide tables always scroll horizontally.
|
|
134
|
+
*/
|
|
135
|
+
maxHeight?: CSSProperties["maxHeight"];
|
|
136
|
+
/**
|
|
137
|
+
* What scrolls when the table is larger than its space.
|
|
138
|
+
* - `table` (default): the table scrolls inside its own container.
|
|
139
|
+
* - `page`: the page scrolls; the header pins to the top of the screen. `maxHeight` is ignored.
|
|
140
|
+
*/
|
|
141
|
+
scroll?: "table" | "page";
|
|
142
|
+
/**
|
|
143
|
+
* Current sort, shown as arrows in the headers. The table does not reorder rows: `items` come sorted from the
|
|
144
|
+
* server, so send `order` from `useSorting` to the query.
|
|
145
|
+
*/
|
|
146
|
+
sorting?: SortingState;
|
|
147
|
+
/**
|
|
148
|
+
* Makes headers sortable; without it the headers are plain text. Receives the next sort or an updater, like a state
|
|
149
|
+
* setter: pass `setSorting` from `useSorting`.
|
|
150
|
+
*/
|
|
151
|
+
onSortingChange?: OnChangeFn<SortingState>;
|
|
152
|
+
/** @deprecated Use `onSortingChange`. */
|
|
153
|
+
setSorting?: Removed<"Use `onSortingChange`">;
|
|
154
|
+
/** Column ids in display order; columns left out go last. `useTableColumnConfig` already returns ordered `columns`. */
|
|
155
|
+
columnOrder?: ColumnOrderState;
|
|
156
|
+
/** Receives the next order or an updater, like a state setter. */
|
|
157
|
+
onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
|
|
158
|
+
/** @deprecated Use `onColumnOrderChange`. */
|
|
159
|
+
setColumnOrder?: Removed<"Use `onColumnOrderChange`">;
|
|
160
|
+
/** Hidden columns as `{ [columnId]: false }`. `useTableColumnConfig` already returns only the visible `columns`. */
|
|
161
|
+
columnVisibility?: VisibilityState$1;
|
|
162
|
+
/** Receives the next visibility or an updater, like a state setter. */
|
|
163
|
+
onColumnVisibilityChange?: OnChangeFn<VisibilityState$1>;
|
|
164
|
+
/** @deprecated Use `onColumnVisibilityChange`. */
|
|
165
|
+
setColumnVisibility?: Removed<"Use `onColumnVisibilityChange`">;
|
|
166
|
+
/** Shows a pin button in each header. Pinned columns stay in view and move to the start of the table. */
|
|
167
|
+
enableColumnPinning?: boolean;
|
|
168
|
+
/** Pinned column ids. Without it the table keeps pinning in its own state. */
|
|
169
|
+
columnPinning?: ColumnPinningState;
|
|
170
|
+
/** Receives the next pinning or an updater, like a state setter. */
|
|
171
|
+
onColumnPinningChange?: OnChangeFn<ColumnPinningState>;
|
|
172
|
+
/** @deprecated Use `onColumnPinningChange`. */
|
|
173
|
+
setColumnPinning?: Removed<"Use `onColumnPinningChange`">;
|
|
174
|
+
/**
|
|
175
|
+
* Shows a resize handle on each header's edge (drag it, or focus it and use the arrow keys).
|
|
176
|
+
* Columns keep their natural widths until the first resize. Limit a column with `minSize` / `maxSize`.
|
|
177
|
+
*/
|
|
178
|
+
enableColumnResizing?: boolean;
|
|
179
|
+
/** Column widths in pixels. Without it the table keeps the widths in its own state. */
|
|
180
|
+
columnSizing?: ColumnSizingState;
|
|
181
|
+
/** Receives the next widths or an updater, like a state setter. */
|
|
182
|
+
onColumnSizingChange?: OnChangeFn<ColumnSizingState>;
|
|
183
|
+
/** @deprecated Use `onColumnSizingChange`. */
|
|
184
|
+
setColumnSizing?: Removed<"Use `onColumnSizingChange`">;
|
|
185
|
+
/**
|
|
186
|
+
* Row details, opened by clicking a row (unless `onRowAction` is set). `mode` defaults to `table.rowDetailsMode` from
|
|
187
|
+
* `UIConfig`: `drawer` slides in from the side, `split` opens beside the table, `expand` opens under the row.
|
|
188
|
+
* In `drawer` and `split` mode Enter on a cell opens them too; `expand` adds a chevron column.
|
|
189
|
+
* Pass `getRowId` so open rows survive sorting and paging. Not available with `enableDragDrop`.
|
|
190
|
+
*/
|
|
191
|
+
rowDetails?: TableRowDetails<T>;
|
|
192
|
+
/** Open rows by id (one at a time in `drawer` and `split` mode). Without it the table keeps them in its own state. */
|
|
193
|
+
expanded?: ExpandedState;
|
|
194
|
+
/** Receives the next open rows or an updater, like a state setter. */
|
|
195
|
+
onExpandedChange?: OnChangeFn<ExpandedState>;
|
|
196
|
+
/** @deprecated Use `onExpandedChange`. */
|
|
197
|
+
setExpanded?: Removed<"Use `onExpandedChange`">;
|
|
198
|
+
/**
|
|
199
|
+
* Adds a leading checkbox column: one checkbox per row and select-all in the header. Selection is multiple unless
|
|
200
|
+
* `enableMultiRowSelection={false}`. A function enables it per row. Clicking a row also toggles it unless `rowDetails`
|
|
201
|
+
* or `onRowAction` is set. Do not add your own checkbox column.
|
|
202
|
+
*/
|
|
203
|
+
enableRowSelection?: boolean | ((row: Row$1<T>) => boolean);
|
|
204
|
+
/** Defaults to `true`. `false` keeps one selected row at a time and drops select-all. */
|
|
205
|
+
enableMultiRowSelection?: boolean | ((row: Row$1<T>) => boolean);
|
|
206
|
+
/** Controlled selection as `{ [rowId]: true }`; pair it with `onRowSelectionChange`. Pass `getRowId` for stable ids. */
|
|
207
|
+
rowSelection?: RowSelectionState;
|
|
208
|
+
/** Initial selection when the table keeps it in its own state. Read once, on mount. */
|
|
209
|
+
defaultRowSelection?: RowSelectionState;
|
|
210
|
+
/** Receives the next selection or an updater, like a state setter. Also fires when the selection is uncontrolled. */
|
|
211
|
+
onRowSelectionChange?: OnChangeFn<RowSelectionState>;
|
|
212
|
+
/** @deprecated Use `rowSelection` (controlled) or `defaultRowSelection` (uncontrolled). */
|
|
213
|
+
defaultSelectedRows?: Removed<"Use `rowSelection` with `onRowSelectionChange`, or `defaultRowSelection`">;
|
|
214
|
+
/** @deprecated Use `enableRowSelection`. */
|
|
215
|
+
selectionMode?: Removed<"Use `enableRowSelection`; add `enableMultiRowSelection={false}` for one row at a time">;
|
|
216
|
+
/** @deprecated Use `rowSelection`. */
|
|
217
|
+
selectedKeys?: Removed<"Use `rowSelection` (`{ [rowId]: true }`) with `onRowSelectionChange`">;
|
|
218
|
+
/** @deprecated Use `onRowSelectionChange`. */
|
|
219
|
+
onSelectionChange?: Removed<"Use `onRowSelectionChange`">;
|
|
220
|
+
/**
|
|
221
|
+
* Component shown across the header while any row is selected, next to select-all. Define it at module scope (an
|
|
222
|
+
* inline component remounts on every render); it receives `table`: read `table.getSelectedRowModel().rows`, clear
|
|
223
|
+
* with `table.resetRowSelection()`. Needs `enableRowSelection`.
|
|
224
|
+
*/
|
|
225
|
+
bulkSelectionActions?: BulkSelectionActionsComponent<T>;
|
|
226
|
+
/** Adds a drag handle column for reordering rows. Needs `getRowId`; `rowDetails` is ignored while it is on. */
|
|
227
|
+
enableDragDrop?: boolean;
|
|
228
|
+
/** Raw dnd-kit event of a finished row drag. Prefer `onReorder`. */
|
|
229
|
+
onDragEnd?: (event: DragEndEvent) => void;
|
|
230
|
+
/** Called after a row drag with `items` in their new order; store it, the table does not. */
|
|
231
|
+
onReorder?: (reorderedItems: T[]) => void;
|
|
232
|
+
/** Stable row id, used as the key in `rowSelection` and `expanded`. Defaults to the row index. */
|
|
233
|
+
getRowId?: (row: T) => UniqueIdentifier;
|
|
234
|
+
}
|
|
235
|
+
declare const Table$1: <T extends RowData>({ items, showCellBorder, columns, onRowAction, onRowDoubleClick, isLoading, emptyState, className, variant: variantProp, containerClassName, maxHeight, scroll, sorting, onSortingChange, columnOrder, onColumnOrderChange, columnVisibility, onColumnVisibilityChange, enableColumnPinning, columnPinning: columnPinningProp, onColumnPinningChange, enableColumnResizing, columnSizing: columnSizingProp, onColumnSizingChange, rowDetails, expanded: expandedProp, onExpandedChange, bulkSelectionActions: ActionHeader, enableDragDrop, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection, rowSelection: rowSelectionProp, defaultRowSelection, onRowSelectionChange, ...props }: TableProps<T>) => import("react").JSX.Element;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/components/table/InfiniteTable.d.ts
|
|
238
|
+
interface InfiniteTableWrapperProps<T extends RowData> extends Omit<InfiniteTableProps<T>, "columns"> {}
|
|
239
|
+
/**
|
|
240
|
+
* `Table` that loads the next page when its end scrolls into view. Wire `isLoading`, `hasNextPage`,
|
|
241
|
+
* `isFetchingNextPage` and `fetchNextPage` straight from an infinite query and pass every loaded row as `items`.
|
|
242
|
+
*/
|
|
243
|
+
interface InfiniteTableProps<T extends RowData> extends TableProps<T> {
|
|
244
|
+
/** Whether the server has more rows. While `true`, a spinner under the last row triggers `fetchNextPage`. */
|
|
245
|
+
hasNextPage: boolean;
|
|
246
|
+
/** A page is loading: keeps the spinner visible and holds back further `fetchNextPage` calls. */
|
|
247
|
+
isFetchingNextPage?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Loads the next page; called when the end of the table scrolls into view, and again while it stays in view after a
|
|
250
|
+
* page adds rows. A page that adds no rows (it failed) is retried only when the end scrolls back into view.
|
|
251
|
+
*/
|
|
252
|
+
fetchNextPage: () => void;
|
|
253
|
+
}
|
|
254
|
+
declare const InfiniteTable: <T extends RowData>({ hasNextPage, isFetchingNextPage, fetchNextPage, ...rest }: InfiniteTableProps<T>) => import("react").JSX.Element;
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/hooks/useSorting.d.ts
|
|
257
|
+
interface UseSortingOptions {
|
|
258
|
+
/**
|
|
259
|
+
* Sorting used when the URL has none. A sort already in the URL (reload, shared link) wins. Once the user clears the
|
|
260
|
+
* sort, it stays cleared until the URL changes from outside (a link, back/forward).
|
|
261
|
+
*/
|
|
262
|
+
defaultSorting?: SortingState;
|
|
263
|
+
/** Namespaces the query key (`order-<prefix>`) so several tables can share one page. */
|
|
264
|
+
prefix?: string;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Table sorting state kept in the URL query (`order`). The table only shows the sort: pass `order`
|
|
268
|
+
* (`"-createdAt,+name"`) to the list request so the server sorts the rows. Needs `UIRouter.UIRouterProvider` from
|
|
269
|
+
* `@povio/ui/ui-router` above it, which connects the app router.
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* const { sorting, setSorting, order } = useSorting({ defaultSorting: [{ id: "createdAt", desc: true }] });
|
|
273
|
+
* const { data } = useOrders({ order });
|
|
274
|
+
* <Table items={data} columns={columns} sorting={sorting} onSortingChange={setSorting} />
|
|
275
|
+
*/
|
|
276
|
+
declare function useSorting({ defaultSorting, prefix }?: UseSortingOptions): {
|
|
277
|
+
sorting: SortingState;
|
|
278
|
+
setSorting: import("react").Dispatch<import("react").SetStateAction<SortingState>>;
|
|
279
|
+
order: string;
|
|
280
|
+
};
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region src/hooks/useTableColumnConfig.d.ts
|
|
283
|
+
type ColumnDef$1<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
284
|
+
type VisibilityState = ColumnVisibilityState;
|
|
285
|
+
interface UseTableColumnConfigOptions {
|
|
286
|
+
/** Saved visibility as `{ [columnId]: boolean }`, e.g. from user settings. Without it every column starts visible. */
|
|
287
|
+
visibleColumns?: VisibilityState;
|
|
288
|
+
/**
|
|
289
|
+
* Saved column ids in display order. Without it the columns keep their defined order. Columns left out (added after
|
|
290
|
+
* the order was saved) go last.
|
|
291
|
+
*/
|
|
292
|
+
columnOrder?: ColumnOrderState;
|
|
293
|
+
/** Called with the new visibility, to persist it. */
|
|
294
|
+
onVisibilityChange?: (value: VisibilityState) => void;
|
|
295
|
+
/** Called with the new order, to persist it. */
|
|
296
|
+
onOrderChange?: (value: ColumnOrderState) => void;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* State for a user-configurable column set: which columns show and in what order.
|
|
300
|
+
* Pass `columns` to the table (already filtered and ordered) and the rest to `ColumnConfigModal`. Columns with
|
|
301
|
+
* `enableHiding: false` (row actions, for example) always show and are not listed in the modal.
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* const columnConfig = useTableColumnConfig(columns);
|
|
305
|
+
* <Table items={items} columns={columnConfig.columns} />
|
|
306
|
+
* <ColumnConfigModal trigger={<Button>Columns</Button>} {...columnConfig} onReset={columnConfig.resetColumns} />
|
|
307
|
+
*/
|
|
308
|
+
declare function useTableColumnConfig<TData extends RowData, TValue>(defaultColumns: ColumnDef$1<TData, TValue>[], options?: UseTableColumnConfigOptions): {
|
|
309
|
+
configColumns: ColumnDef$1<TData, TValue>[];
|
|
310
|
+
columns: ColumnDef$1<TData, TValue>[];
|
|
311
|
+
visibleColumns: ColumnVisibilityState;
|
|
312
|
+
columnOrder: ColumnOrderState;
|
|
313
|
+
onVisibilityChange: (value: VisibilityState) => void;
|
|
314
|
+
onOrderChange: (value: ColumnOrderState) => void;
|
|
315
|
+
resetColumns: () => void;
|
|
316
|
+
};
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/hooks/useTableNav.d.ts
|
|
319
|
+
declare const Selectors: {
|
|
320
|
+
readonly Cell: '[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"],td,th';
|
|
321
|
+
readonly Row: '[role="row"],tr';
|
|
322
|
+
readonly RowGroup: '[role="rowgroup"],thead,tbody,tfoot';
|
|
323
|
+
/** Selector from here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/focus.ts#L10 */
|
|
324
|
+
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]';
|
|
325
|
+
};
|
|
326
|
+
type Config = {
|
|
327
|
+
debug?: boolean;
|
|
328
|
+
selectors?: Partial<Record<keyof typeof Selectors, string>>;
|
|
329
|
+
/** How many rows to move when pressing page up/down - Default goes to first/last row */
|
|
330
|
+
pageUpDown?: number;
|
|
331
|
+
} | undefined;
|
|
332
|
+
declare class DataGridNav {
|
|
333
|
+
private selectors;
|
|
334
|
+
readonly pageUpDown: number | undefined;
|
|
335
|
+
private keys;
|
|
336
|
+
private disabled;
|
|
337
|
+
readonly debug: boolean;
|
|
338
|
+
private activeCell;
|
|
339
|
+
constructor();
|
|
340
|
+
constructor(config: Config);
|
|
341
|
+
private debugLog;
|
|
342
|
+
disable(): void;
|
|
343
|
+
enable(): void;
|
|
344
|
+
private isFocusable;
|
|
345
|
+
getActiveCell(): HTMLElement | null;
|
|
346
|
+
tableKeyUp(): void;
|
|
347
|
+
tableKeyDown(e: KeyboardEvent): void;
|
|
348
|
+
cellNavigation(e: KeyboardEvent): void;
|
|
349
|
+
gridNavigation(e: KeyboardEvent): void;
|
|
350
|
+
private getRows;
|
|
351
|
+
private pageCellNavigation;
|
|
352
|
+
private verticalCellNavigation;
|
|
353
|
+
private focusOnFirstCell;
|
|
354
|
+
private getColumnIndex;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Arrow-key cell navigation for a hand-built `<table>` or ARIA grid: spread `listeners` on the table element.
|
|
358
|
+
* `Table` and `InfiniteTable` already use it; don't add it to them.
|
|
359
|
+
*
|
|
360
|
+
* Arrows move between cells; from a widget inside a cell, Left/Right step through the cell's widgets and then on to the
|
|
361
|
+
* next cell, and Up/Down move to the cell above or below. Escape moves from a widget to its cell. Text fields keep
|
|
362
|
+
* their arrow keys. Give one cell `tabIndex={0}` and the rest `-1` so Tab can reach the grid.
|
|
363
|
+
*/
|
|
364
|
+
declare function useTableNav(options?: Config): {
|
|
365
|
+
listeners: {
|
|
366
|
+
onKeyDown: (e: KeyboardEvent) => void;
|
|
367
|
+
onKeyUp: () => void;
|
|
368
|
+
};
|
|
369
|
+
tableNav: DataGridNav;
|
|
370
|
+
};
|
|
371
|
+
//#endregion
|
|
372
|
+
export { HeaderTextProps as _, useSorting as a, CellText as b, InfiniteTableWrapperProps as c, Row$1 as d, Table$1 as f, HeaderText as g, TableRowDetails as h, UseSortingOptions as i, BulkSelectionActionsComponent as l, TableWrapperProps as m, UseTableColumnConfigOptions as n, InfiniteTable as o, TableProps as p, useTableColumnConfig as r, InfiniteTableProps as s, useTableNav as t, ColumnDef$2 as u, ColumnConfigModal as v, CellTextProps as x, ColumnConfigModalProps as y };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { n as IconSlotIcon } from "./IconSlot-DcEDPaNb.js";
|
|
2
|
+
import { g as ToastVariantProps } from "./link.cva-D6L1c2wq.js";
|
|
3
|
+
import { n as Removed, t as Hint } from "./hints-B09_WDhL.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import { Id, ToastOptions, ToastPosition } from "react-toastify";
|
|
6
|
+
//#region src/components/status/Toast/Toast.d.ts
|
|
7
|
+
interface ToastAction {
|
|
8
|
+
/** The button text. Also the React key, so keep labels unique within one toast. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Called on press. A toast shown through `useToast` then closes. */
|
|
11
|
+
onPress: () => void;
|
|
12
|
+
/** @deprecated Use `label`. */
|
|
13
|
+
text?: Removed<"Use `label`">;
|
|
14
|
+
/** @deprecated Use `onPress`. */
|
|
15
|
+
onClick?: Removed<"Use `onPress`">;
|
|
16
|
+
}
|
|
17
|
+
interface ToastProps extends Omit<ToastVariantProps, "color"> {
|
|
18
|
+
/** `secondary` (the neutral grey; the default), `success`, `warning` or `error`. `useToast` functions set it. */
|
|
19
|
+
color?: ToastVariantProps["color"] | Hint<"`neutral` is now `secondary`, as on `Badge`, `Tag` and the buttons">;
|
|
20
|
+
/** The message. */
|
|
21
|
+
text: ReactNode;
|
|
22
|
+
/** Shows a spinner in place of `icon`. Defaults to false. */
|
|
23
|
+
isLoading?: boolean;
|
|
24
|
+
/** Leading icon: an icon component (`icon={Check}`) or an element (`icon={<Check />}`). None by default. */
|
|
25
|
+
icon?: IconSlotIcon;
|
|
26
|
+
/**
|
|
27
|
+
* Buttons rendered after the message. Through `useToast`, a toast with actions stays open until an action or its
|
|
28
|
+
* close button is pressed, unless `autoClose` is passed.
|
|
29
|
+
*/
|
|
30
|
+
actions?: ToastAction[];
|
|
31
|
+
/** `outlined` or `contained`. Defaults to `UIConfig` `toast.variant` (`outlined`). */
|
|
32
|
+
variant?: ToastVariantProps["variant"];
|
|
33
|
+
/** @deprecated Use `text`. */
|
|
34
|
+
message?: Removed<"Use `text`">;
|
|
35
|
+
/** @deprecated Use `text`. */
|
|
36
|
+
title?: Removed<"Toast has no title: put the whole message in `text`">;
|
|
37
|
+
/** @deprecated Use `text`. */
|
|
38
|
+
description?: Removed<"Use `text`">;
|
|
39
|
+
}
|
|
40
|
+
/** A toast's content and look. Show toasts with the functions from `useToast`; render `Toast` only to preview one. */
|
|
41
|
+
declare const Toast: (props: ToastProps) => ReactNode;
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/status/Toast/useToast.d.ts
|
|
44
|
+
/** The colour comes from the function called (`successToast`, `errorToast`, …), so it is not a param. */
|
|
45
|
+
interface ToastParams extends Omit<ToastProps, "color"> {
|
|
46
|
+
/** Screen corner for this toast. Defaults to `UIConfig` `toast.position` (`bottom-right`). */
|
|
47
|
+
position?: ToastPosition;
|
|
48
|
+
}
|
|
49
|
+
/** A toast is its message, or `{ text, icon, actions, … }` when it needs more than text. */
|
|
50
|
+
type ToastInput = string | ToastParams;
|
|
51
|
+
/**
|
|
52
|
+
* react-toastify options. `autoClose` is the time in milliseconds before the toast closes, or false to keep it open:
|
|
53
|
+
* by default 2500, and false for a toast with `actions`. `toastId` sets the returned ID: a toast with the ID of one
|
|
54
|
+
* still on screen is not shown again, and `closeToast(toastId)` closes it.
|
|
55
|
+
*/
|
|
56
|
+
type ToastOptions$1 = Omit<ToastOptions, "position" | "data" | "closeButton"> & {
|
|
57
|
+
/** Shows a close button in the toast. Defaults to true when the toast does not close by itself. */
|
|
58
|
+
closeButton?: boolean;
|
|
59
|
+
};
|
|
60
|
+
interface UseToastResult {
|
|
61
|
+
successToast: (toast: ToastInput, options?: ToastOptions$1) => Id;
|
|
62
|
+
errorToast: (toast: ToastInput, options?: ToastOptions$1) => Id;
|
|
63
|
+
warningToast: (toast: ToastInput, options?: ToastOptions$1) => Id;
|
|
64
|
+
/** The neutral grey toast, named like the `secondary` colour of `Badge`, `Tag` and `Alert`. */
|
|
65
|
+
secondaryToast: (toast: ToastInput, options?: ToastOptions$1) => Id;
|
|
66
|
+
closeToast: (id: Id) => void;
|
|
67
|
+
/** @deprecated Use `secondaryToast`. */
|
|
68
|
+
neutralToast: Removed<"Use `secondaryToast`">;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns `successToast`, `errorToast`, `warningToast` and `secondaryToast`, each called as `successToast("Saved")` or
|
|
72
|
+
* `successToast({ text, icon, actions }, { autoClose })` and returning the toast ID, plus `closeToast(id)`.
|
|
73
|
+
* A toast closes after 2.5 s; one with `actions` stays, with a close button, until it or an action is pressed.
|
|
74
|
+
* Needs one mounted `ToastContainer`.
|
|
75
|
+
*/
|
|
76
|
+
declare const useToast: () => UseToastResult;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { Toast as a, useToast as i, ToastOptions$1 as n, ToastAction as o, ToastParams as r, ToastProps as s, ToastInput as t };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useCallback, useMemo } from "react";
|
|
2
|
+
//#region src/components/status/Toast/toastActivation.store.ts
|
|
3
|
+
let active = false;
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
const activateToastRenderer = () => {
|
|
6
|
+
if (active) return;
|
|
7
|
+
active = true;
|
|
8
|
+
listeners.forEach((listener) => listener());
|
|
9
|
+
};
|
|
10
|
+
const subscribeToToastActivation = (listener) => {
|
|
11
|
+
listeners.add(listener);
|
|
12
|
+
return () => listeners.delete(listener);
|
|
13
|
+
};
|
|
14
|
+
const isToastRendererActive = () => active;
|
|
15
|
+
const isToastRendererInactive = () => false;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/status/Toast/useToast.tsx
|
|
18
|
+
let nextToastId = 0;
|
|
19
|
+
const enqueueToast = (color, input, options) => {
|
|
20
|
+
const id = options?.toastId ?? `povio-toast-${++nextToastId}`;
|
|
21
|
+
const params = typeof input === "string" ? { text: input } : input;
|
|
22
|
+
activateToastRenderer();
|
|
23
|
+
import("./toast.runtime-BHXdSTXV.js").then(({ showToast }) => showToast(id, color, params, options));
|
|
24
|
+
return id;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns `successToast`, `errorToast`, `warningToast` and `secondaryToast`, each called as `successToast("Saved")` or
|
|
28
|
+
* `successToast({ text, icon, actions }, { autoClose })` and returning the toast ID, plus `closeToast(id)`.
|
|
29
|
+
* A toast closes after 2.5 s; one with `actions` stays, with a close button, until it or an action is pressed.
|
|
30
|
+
* Needs one mounted `ToastContainer`.
|
|
31
|
+
*/
|
|
32
|
+
const useToast = () => {
|
|
33
|
+
const successToast = useCallback((toast, options) => {
|
|
34
|
+
return enqueueToast("success", toast, options);
|
|
35
|
+
}, []);
|
|
36
|
+
const errorToast = useCallback((toast_0, options_0) => {
|
|
37
|
+
return enqueueToast("error", toast_0, options_0);
|
|
38
|
+
}, []);
|
|
39
|
+
const warningToast = useCallback((toast_1, options_1) => {
|
|
40
|
+
return enqueueToast("warning", toast_1, options_1);
|
|
41
|
+
}, []);
|
|
42
|
+
const secondaryToast = useCallback((toast_2, options_2) => {
|
|
43
|
+
return enqueueToast("secondary", toast_2, options_2);
|
|
44
|
+
}, []);
|
|
45
|
+
const closeToast = useCallback((id) => {
|
|
46
|
+
import("./toast.runtime-BHXdSTXV.js").then(({ dismissToast }) => dismissToast(id));
|
|
47
|
+
}, []);
|
|
48
|
+
return useMemo(() => ({
|
|
49
|
+
successToast,
|
|
50
|
+
errorToast,
|
|
51
|
+
warningToast,
|
|
52
|
+
secondaryToast,
|
|
53
|
+
closeToast
|
|
54
|
+
}), [
|
|
55
|
+
successToast,
|
|
56
|
+
errorToast,
|
|
57
|
+
warningToast,
|
|
58
|
+
secondaryToast,
|
|
59
|
+
closeToast
|
|
60
|
+
]);
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { subscribeToToastActivation as i, isToastRendererActive as n, isToastRendererInactive as r, useToast as t };
|
package/dist/utils/file.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FileUtils } from "../file.utils-
|
|
1
|
+
import { t as FileUtils } from "../file.utils-DUADtzdt.js";
|
|
2
2
|
export { FileUtils };
|
package/dist/utils/file.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FileUtils } from "../file.utils-
|
|
1
|
+
import { t as FileUtils } from "../file.utils-X6tkeWaz.js";
|
|
2
2
|
export { FileUtils };
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as logger } from "../logger-
|
|
1
|
+
import { t as logger } from "../logger-CW24po62.js";
|
|
2
2
|
export { logger };
|