@bevelo/vue 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/dist/accordion.cjs +89 -0
- package/dist/accordion.d.cts +145 -0
- package/dist/accordion.d.ts +145 -0
- package/dist/accordion.js +88 -0
- package/dist/agent.cjs +74 -0
- package/dist/agent.d.cts +2 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +1 -0
- package/dist/alert-dialog.cjs +48 -0
- package/dist/alert-dialog.d.cts +142 -0
- package/dist/alert-dialog.d.ts +142 -0
- package/dist/alert-dialog.js +47 -0
- package/dist/alert.cjs +77 -0
- package/dist/alert.d.cts +64 -0
- package/dist/alert.d.ts +64 -0
- package/dist/alert.js +76 -0
- package/dist/aspect-ratio.cjs +21 -0
- package/dist/aspect-ratio.d.cts +13 -0
- package/dist/aspect-ratio.d.ts +13 -0
- package/dist/aspect-ratio.js +21 -0
- package/dist/async-options.cjs +76 -0
- package/dist/async-options.d.cts +49 -0
- package/dist/async-options.d.ts +49 -0
- package/dist/async-options.js +75 -0
- package/dist/autocomplete.cjs +274 -0
- package/dist/autocomplete.d.cts +309 -0
- package/dist/autocomplete.d.ts +309 -0
- package/dist/autocomplete.js +273 -0
- package/dist/avatar.cjs +51 -0
- package/dist/avatar.d.cts +69 -0
- package/dist/avatar.d.ts +69 -0
- package/dist/avatar.js +50 -0
- package/dist/badge.cjs +41 -0
- package/dist/badge.d.cts +39 -0
- package/dist/badge.d.ts +39 -0
- package/dist/badge.js +40 -0
- package/dist/breadcrumb.cjs +59 -0
- package/dist/breadcrumb.d.cts +40 -0
- package/dist/breadcrumb.d.ts +40 -0
- package/dist/breadcrumb.js +58 -0
- package/dist/button.cjs +56 -0
- package/dist/button.d.cts +79 -0
- package/dist/button.d.ts +79 -0
- package/dist/button.js +55 -0
- package/dist/calendar-Bcc6HKc9.js +643 -0
- package/dist/calendar-vHGhj3RI.cjs +720 -0
- package/dist/calendar.cjs +4 -0
- package/dist/calendar.d.cts +316 -0
- package/dist/calendar.d.ts +316 -0
- package/dist/calendar.js +1 -0
- package/dist/card-B_ZoLCvt.d.cts +61 -0
- package/dist/card-B_ZoLCvt.d.ts +61 -0
- package/dist/card-CZHRix0r.js +99 -0
- package/dist/card-CvGfpsiU.cjs +140 -0
- package/dist/card.cjs +9 -0
- package/dist/card.d.cts +2 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +1 -0
- package/dist/carousel.cjs +225 -0
- package/dist/carousel.d.cts +214 -0
- package/dist/carousel.d.ts +214 -0
- package/dist/carousel.js +224 -0
- package/dist/checkbox-group.cjs +93 -0
- package/dist/checkbox-group.d.cts +108 -0
- package/dist/checkbox-group.d.ts +108 -0
- package/dist/checkbox-group.js +91 -0
- package/dist/checkbox.cjs +117 -0
- package/dist/checkbox.d.cts +153 -0
- package/dist/checkbox.d.ts +153 -0
- package/dist/checkbox.js +116 -0
- package/dist/collapsible.cjs +70 -0
- package/dist/collapsible.d.cts +141 -0
- package/dist/collapsible.d.ts +141 -0
- package/dist/collapsible.js +69 -0
- package/dist/color-picker.cjs +225 -0
- package/dist/color-picker.d.cts +180 -0
- package/dist/color-picker.d.ts +180 -0
- package/dist/color-picker.js +212 -0
- package/dist/combobox-CDHIXr6J.d.ts +735 -0
- package/dist/combobox-D39Waj6L.d.cts +735 -0
- package/dist/combobox-DlCU0vS1.cjs +945 -0
- package/dist/combobox-wLdV6VA_.js +802 -0
- package/dist/combobox.cjs +26 -0
- package/dist/combobox.d.cts +3 -0
- package/dist/combobox.d.ts +3 -0
- package/dist/combobox.js +1 -0
- package/dist/command-CEJACYpR.d.ts +404 -0
- package/dist/command-CqHZVivR.js +693 -0
- package/dist/command-D54bj6RJ.cjs +836 -0
- package/dist/command-rAVp-wbf.d.cts +404 -0
- package/dist/command.cjs +15 -0
- package/dist/command.d.cts +2 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +1 -0
- package/dist/context-menu-BPsgeLQm.cjs +170 -0
- package/dist/context-menu-ByhKzWTm.d.ts +129 -0
- package/dist/context-menu-Co3ABcdp.js +153 -0
- package/dist/context-menu-USbhMQuc.d.cts +129 -0
- package/dist/context-menu.cjs +6 -0
- package/dist/context-menu.d.cts +2 -0
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +2 -0
- package/dist/date-input.cjs +374 -0
- package/dist/date-input.d.cts +234 -0
- package/dist/date-input.d.ts +234 -0
- package/dist/date-input.js +371 -0
- package/dist/date-picker-D1mygz_Y.js +891 -0
- package/dist/date-picker-D_hqHHAV.cjs +938 -0
- package/dist/date-picker.cjs +4 -0
- package/dist/date-picker.d.cts +447 -0
- package/dist/date-picker.d.ts +447 -0
- package/dist/date-picker.js +1 -0
- package/dist/describe-BlNg9SbK.js +25 -0
- package/dist/describe-D_dLtwde.cjs +42 -0
- package/dist/dialog-view-CKtpbGq_.js +26 -0
- package/dist/dialog-view-swgEQvlZ.cjs +31 -0
- package/dist/dialog.cjs +66 -0
- package/dist/dialog.d.cts +158 -0
- package/dist/dialog.d.ts +158 -0
- package/dist/dialog.js +63 -0
- package/dist/direction.cjs +21 -0
- package/dist/direction.d.cts +13 -0
- package/dist/direction.d.ts +13 -0
- package/dist/direction.js +21 -0
- package/dist/dnd.cjs +103 -0
- package/dist/dnd.d.cts +54 -0
- package/dist/dnd.d.ts +54 -0
- package/dist/dnd.js +98 -0
- package/dist/drawer.cjs +137 -0
- package/dist/drawer.d.cts +190 -0
- package/dist/drawer.d.ts +190 -0
- package/dist/drawer.js +134 -0
- package/dist/empty-state.cjs +75 -0
- package/dist/empty-state.d.cts +46 -0
- package/dist/empty-state.d.ts +46 -0
- package/dist/empty-state.js +74 -0
- package/dist/engine-refs-8O6mHfYd.d.cts +4 -0
- package/dist/engine-refs-8O6mHfYd.d.ts +4 -0
- package/dist/engine-refs-CPWFFTfA.cjs +32 -0
- package/dist/engine-refs-sojZQs1R.js +21 -0
- package/dist/error-state.cjs +86 -0
- package/dist/error-state.d.cts +54 -0
- package/dist/error-state.d.ts +54 -0
- package/dist/error-state.js +85 -0
- package/dist/field.cjs +123 -0
- package/dist/field.d.cts +100 -0
- package/dist/field.d.ts +100 -0
- package/dist/field.js +122 -0
- package/dist/file-input.cjs +117 -0
- package/dist/file-input.d.cts +168 -0
- package/dist/file-input.d.ts +168 -0
- package/dist/file-input.js +116 -0
- package/dist/form-CKus_NQE.cjs +23 -0
- package/dist/form-y7b0fcqL.js +18 -0
- package/dist/gauge-parts-BVmw61GR.js +64 -0
- package/dist/gauge-parts-DjqBK9pL.d.cts +15 -0
- package/dist/gauge-parts-V31Fma77.cjs +75 -0
- package/dist/gauge-parts-mAgseDD4.d.ts +15 -0
- package/dist/headless-B3zQWaJm.js +225 -0
- package/dist/headless-BQe1X1Vf.d.ts +2 -0
- package/dist/headless-CbQgxdK1.d.cts +2 -0
- package/dist/headless-D88yFw8W.cjs +248 -0
- package/dist/hover-card.cjs +139 -0
- package/dist/hover-card.d.cts +200 -0
- package/dist/hover-card.d.ts +200 -0
- package/dist/hover-card.js +137 -0
- package/dist/icon-button.cjs +75 -0
- package/dist/icon-button.d.cts +104 -0
- package/dist/icon-button.d.ts +104 -0
- package/dist/icon-button.js +74 -0
- package/dist/image-cropper.cjs +106 -0
- package/dist/image-cropper.d.cts +7 -0
- package/dist/image-cropper.d.ts +7 -0
- package/dist/image-cropper.js +105 -0
- package/dist/image.cjs +87 -0
- package/dist/image.d.cts +92 -0
- package/dist/image.d.ts +92 -0
- package/dist/image.js +86 -0
- package/dist/index.cjs +1685 -0
- package/dist/index.d.cts +1195 -0
- package/dist/index.d.ts +1195 -0
- package/dist/index.js +1042 -0
- package/dist/input-group.cjs +91 -0
- package/dist/input-group.d.cts +84 -0
- package/dist/input-group.d.ts +84 -0
- package/dist/input-group.js +90 -0
- package/dist/input.cjs +114 -0
- package/dist/input.d.cts +186 -0
- package/dist/input.d.ts +186 -0
- package/dist/input.js +113 -0
- package/dist/item-B-QdNtAl.cjs +264 -0
- package/dist/item-D6GSb0WD.d.ts +144 -0
- package/dist/item-DPJnk7ED.js +199 -0
- package/dist/item-DyrvCrsL.d.cts +144 -0
- package/dist/item.cjs +10 -0
- package/dist/item.d.cts +2 -0
- package/dist/item.d.ts +2 -0
- package/dist/item.js +1 -0
- package/dist/kbd.cjs +55 -0
- package/dist/kbd.d.cts +38 -0
- package/dist/kbd.d.ts +38 -0
- package/dist/kbd.js +54 -0
- package/dist/label.cjs +41 -0
- package/dist/label.d.cts +40 -0
- package/dist/label.d.ts +40 -0
- package/dist/label.js +40 -0
- package/dist/listbox.cjs +85 -0
- package/dist/listbox.d.cts +200 -0
- package/dist/listbox.d.ts +200 -0
- package/dist/listbox.js +84 -0
- package/dist/loader.cjs +66 -0
- package/dist/loader.d.cts +68 -0
- package/dist/loader.d.ts +68 -0
- package/dist/loader.js +65 -0
- package/dist/mention-menu.cjs +126 -0
- package/dist/mention-menu.d.cts +144 -0
- package/dist/mention-menu.d.ts +144 -0
- package/dist/mention-menu.js +125 -0
- package/dist/menu.cjs +182 -0
- package/dist/menu.d.cts +240 -0
- package/dist/menu.d.ts +240 -0
- package/dist/menu.js +181 -0
- package/dist/menubar.cjs +38 -0
- package/dist/menubar.d.cts +43 -0
- package/dist/menubar.d.ts +43 -0
- package/dist/menubar.js +37 -0
- package/dist/meter.cjs +113 -0
- package/dist/meter.d.cts +124 -0
- package/dist/meter.d.ts +124 -0
- package/dist/meter.js +108 -0
- package/dist/native-select-52jYpA3c.d.cts +136 -0
- package/dist/native-select-BdJojSQt.d.ts +136 -0
- package/dist/native-select-BwptULNE.js +129 -0
- package/dist/native-select-DjBGWFoh.cjs +146 -0
- package/dist/native-select.cjs +5 -0
- package/dist/native-select.d.cts +2 -0
- package/dist/native-select.d.ts +2 -0
- package/dist/native-select.js +1 -0
- package/dist/navigation-menu.cjs +108 -0
- package/dist/navigation-menu.d.cts +245 -0
- package/dist/navigation-menu.d.ts +245 -0
- package/dist/navigation-menu.js +107 -0
- package/dist/number-input.cjs +189 -0
- package/dist/number-input.d.cts +232 -0
- package/dist/number-input.d.ts +232 -0
- package/dist/number-input.js +187 -0
- package/dist/option-row-DFCj-NoL.js +64 -0
- package/dist/option-row-Dlc6brXH.d.cts +30 -0
- package/dist/option-row-hLg6Ye86.cjs +105 -0
- package/dist/option-row-yJqjEx0G.d.ts +30 -0
- package/dist/options-BDn36q6n.cjs +111 -0
- package/dist/options-BlkyK-uO.js +106 -0
- package/dist/options-CGl5jBEY.d.ts +19 -0
- package/dist/options-DUGLoksA.d.cts +19 -0
- package/dist/otp-input.cjs +85 -0
- package/dist/otp-input.d.cts +113 -0
- package/dist/otp-input.d.ts +113 -0
- package/dist/otp-input.js +84 -0
- package/dist/overlay-controller-78GSJGbM.js +76 -0
- package/dist/overlay-controller-BDeITPoR.d.cts +16 -0
- package/dist/overlay-controller-DmaZ8FLl.cjs +93 -0
- package/dist/overlay-controller-HrMdTomI.d.ts +16 -0
- package/dist/pagination.cjs +87 -0
- package/dist/pagination.d.cts +112 -0
- package/dist/pagination.d.ts +112 -0
- package/dist/pagination.js +86 -0
- package/dist/parts-9zrUGbuI.js +84 -0
- package/dist/parts-DcYZV8ug.cjs +95 -0
- package/dist/password-input.cjs +144 -0
- package/dist/password-input.d.cts +151 -0
- package/dist/password-input.d.ts +151 -0
- package/dist/password-input.js +143 -0
- package/dist/placement-C_WRqvZk.js +49 -0
- package/dist/placement-ChEh6uxa.cjs +60 -0
- package/dist/popover.cjs +159 -0
- package/dist/popover.d.cts +185 -0
- package/dist/popover.d.ts +185 -0
- package/dist/popover.js +157 -0
- package/dist/preferences.cjs +96 -0
- package/dist/preferences.d.cts +36 -0
- package/dist/preferences.d.ts +36 -0
- package/dist/preferences.js +94 -0
- package/dist/presence.cjs +85 -0
- package/dist/presence.d.cts +25 -0
- package/dist/presence.d.ts +25 -0
- package/dist/presence.js +83 -0
- package/dist/progress.cjs +111 -0
- package/dist/progress.d.cts +109 -0
- package/dist/progress.d.ts +109 -0
- package/dist/progress.js +106 -0
- package/dist/query.cjs +152 -0
- package/dist/query.d.cts +68 -0
- package/dist/query.d.ts +68 -0
- package/dist/query.js +142 -0
- package/dist/radio.cjs +102 -0
- package/dist/radio.d.cts +136 -0
- package/dist/radio.d.ts +136 -0
- package/dist/radio.js +101 -0
- package/dist/rating.cjs +88 -0
- package/dist/rating.d.cts +100 -0
- package/dist/rating.d.ts +100 -0
- package/dist/rating.js +87 -0
- package/dist/resizable.cjs +57 -0
- package/dist/resizable.d.cts +119 -0
- package/dist/resizable.d.ts +119 -0
- package/dist/resizable.js +56 -0
- package/dist/scroll-area.cjs +59 -0
- package/dist/scroll-area.d.cts +72 -0
- package/dist/scroll-area.d.ts +72 -0
- package/dist/scroll-area.js +58 -0
- package/dist/segmented-control.cjs +88 -0
- package/dist/segmented-control.d.cts +121 -0
- package/dist/segmented-control.d.ts +121 -0
- package/dist/segmented-control.js +86 -0
- package/dist/select.cjs +160 -0
- package/dist/select.d.cts +385 -0
- package/dist/select.d.ts +385 -0
- package/dist/select.js +159 -0
- package/dist/separator.cjs +32 -0
- package/dist/separator.d.cts +31 -0
- package/dist/separator.d.ts +31 -0
- package/dist/separator.js +31 -0
- package/dist/sheet.cjs +294 -0
- package/dist/sheet.d.cts +456 -0
- package/dist/sheet.d.ts +456 -0
- package/dist/sheet.js +292 -0
- package/dist/sidebar-C-OdvGzD.d.cts +96 -0
- package/dist/sidebar-CZ1-p0-V.d.ts +96 -0
- package/dist/sidebar-DC-mpzMR.js +87 -0
- package/dist/sidebar-gSAgHdkn.cjs +110 -0
- package/dist/sidebar.cjs +6 -0
- package/dist/sidebar.d.cts +2 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +1 -0
- package/dist/skeleton.cjs +46 -0
- package/dist/skeleton.d.cts +47 -0
- package/dist/skeleton.d.ts +47 -0
- package/dist/skeleton.js +45 -0
- package/dist/slider.cjs +118 -0
- package/dist/slider.d.cts +181 -0
- package/dist/slider.d.ts +181 -0
- package/dist/slider.js +117 -0
- package/dist/sortable-board-strict.cjs +149 -0
- package/dist/sortable-board-strict.d.cts +181 -0
- package/dist/sortable-board-strict.d.ts +181 -0
- package/dist/sortable-board-strict.js +148 -0
- package/dist/sortable-engine.cjs +136 -0
- package/dist/sortable-engine.d.cts +237 -0
- package/dist/sortable-engine.d.ts +237 -0
- package/dist/sortable-engine.js +135 -0
- package/dist/sortable.cjs +67 -0
- package/dist/sortable.d.cts +217 -0
- package/dist/sortable.d.ts +217 -0
- package/dist/sortable.js +66 -0
- package/dist/spinner.cjs +32 -0
- package/dist/spinner.d.cts +31 -0
- package/dist/spinner.d.ts +31 -0
- package/dist/spinner.js +31 -0
- package/dist/steps-C9Jmrt8G.cjs +122 -0
- package/dist/steps-Cs8AfxV7.js +81 -0
- package/dist/steps-DW5NkzVj.d.ts +71 -0
- package/dist/steps-ymRMdju5.d.cts +71 -0
- package/dist/steps.cjs +8 -0
- package/dist/steps.d.cts +2 -0
- package/dist/steps.d.ts +2 -0
- package/dist/steps.js +1 -0
- package/dist/switch.cjs +100 -0
- package/dist/switch.d.cts +144 -0
- package/dist/switch.d.ts +144 -0
- package/dist/switch.js +99 -0
- package/dist/table.cjs +124 -0
- package/dist/table.d.cts +124 -0
- package/dist/table.d.ts +124 -0
- package/dist/table.js +123 -0
- package/dist/tabs.cjs +89 -0
- package/dist/tabs.d.cts +160 -0
- package/dist/tabs.d.ts +160 -0
- package/dist/tabs.js +88 -0
- package/dist/textarea.cjs +140 -0
- package/dist/textarea.d.cts +231 -0
- package/dist/textarea.d.ts +231 -0
- package/dist/textarea.js +139 -0
- package/dist/time-input.cjs +117 -0
- package/dist/time-input.d.cts +140 -0
- package/dist/time-input.d.ts +140 -0
- package/dist/time-input.js +116 -0
- package/dist/timeline.cjs +82 -0
- package/dist/timeline.d.cts +62 -0
- package/dist/timeline.d.ts +62 -0
- package/dist/timeline.js +81 -0
- package/dist/toast-CfkRzdNd.js +354 -0
- package/dist/toast-DyezF7lm.cjs +401 -0
- package/dist/toast.cjs +16 -0
- package/dist/toast.d.cts +275 -0
- package/dist/toast.d.ts +275 -0
- package/dist/toast.js +1 -0
- package/dist/toggle-group.cjs +65 -0
- package/dist/toggle-group.d.cts +128 -0
- package/dist/toggle-group.d.ts +128 -0
- package/dist/toggle-group.js +64 -0
- package/dist/toggle.cjs +64 -0
- package/dist/toggle.d.cts +97 -0
- package/dist/toggle.d.ts +97 -0
- package/dist/toggle.js +63 -0
- package/dist/token-input-BIC9VLMG.d.cts +170 -0
- package/dist/token-input-BTReOHIv.cjs +336 -0
- package/dist/token-input-CQnZ6-pO.d.ts +170 -0
- package/dist/token-input-DtcCZrcC.js +295 -0
- package/dist/token-input.cjs +9 -0
- package/dist/token-input.d.cts +2 -0
- package/dist/token-input.d.ts +2 -0
- package/dist/token-input.js +1 -0
- package/dist/toolbar.cjs +62 -0
- package/dist/toolbar.d.cts +58 -0
- package/dist/toolbar.d.ts +58 -0
- package/dist/toolbar.js +61 -0
- package/dist/tooltip.cjs +149 -0
- package/dist/tooltip.d.cts +208 -0
- package/dist/tooltip.d.ts +208 -0
- package/dist/tooltip.js +147 -0
- package/dist/tree-grid.cjs +127 -0
- package/dist/tree-grid.d.cts +130 -0
- package/dist/tree-grid.d.ts +130 -0
- package/dist/tree-grid.js +126 -0
- package/dist/tree.cjs +227 -0
- package/dist/tree.d.cts +223 -0
- package/dist/tree.d.ts +223 -0
- package/dist/tree.js +226 -0
- package/dist/trigger-menu-8FAwypbs.d.cts +347 -0
- package/dist/trigger-menu-B898rWkz.cjs +502 -0
- package/dist/trigger-menu-C2YHe7es.d.ts +347 -0
- package/dist/trigger-menu-CxzocSWO.js +431 -0
- package/dist/trigger-menu.cjs +22 -0
- package/dist/trigger-menu.d.cts +2 -0
- package/dist/trigger-menu.d.ts +2 -0
- package/dist/trigger-menu.js +2 -0
- package/dist/virtual-list-strict.cjs +126 -0
- package/dist/virtual-list-strict.d.cts +69 -0
- package/dist/virtual-list-strict.d.ts +69 -0
- package/dist/virtual-list-strict.js +125 -0
- package/dist/virtual-list.cjs +65 -0
- package/dist/virtual-list.d.cts +82 -0
- package/dist/virtual-list.d.ts +82 -0
- package/dist/virtual-list.js +64 -0
- package/dist/virtual.cjs +27 -0
- package/dist/virtual.d.cts +30 -0
- package/dist/virtual.d.ts +30 -0
- package/dist/virtual.js +26 -0
- package/dist/vue-helpers-Bh_YF48i.cjs +102 -0
- package/dist/vue-helpers-Z3oOAHYB.js +55 -0
- package/dist/waterfall-chart.cjs +114 -0
- package/dist/waterfall-chart.d.cts +117 -0
- package/dist/waterfall-chart.d.ts +117 -0
- package/dist/waterfall-chart.js +113 -0
- package/dist/waterfall.cjs +296 -0
- package/dist/waterfall.d.cts +219 -0
- package/dist/waterfall.d.ts +219 -0
- package/dist/waterfall.js +284 -0
- package/package.json +518 -3
- package/README.md +0 -3
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
const require_headless = require("./headless-D88yFw8W.cjs");
|
|
2
|
+
const require_describe = require("./describe-D_dLtwde.cjs");
|
|
3
|
+
const require_options = require("./options-BDn36q6n.cjs");
|
|
4
|
+
const require_parts = require("./parts-DcYZV8ug.cjs");
|
|
5
|
+
require("@bevelo/core");
|
|
6
|
+
let vue = require("vue");
|
|
7
|
+
let _bevelo_core_primitives_toast = require("@bevelo/core/primitives/toast");
|
|
8
|
+
// src/toast-parts.ts
|
|
9
|
+
/**
|
|
10
|
+
* The composition root: it creates the instance and renders the root part's
|
|
11
|
+
* element with the host's attrs and slot children inside it.
|
|
12
|
+
*/
|
|
13
|
+
const ToastRootPart = require_parts.createVuePartsRoot(_bevelo_core_primitives_toast.toastPrimitive, { portal: true });
|
|
14
|
+
/** The `title` part. */
|
|
15
|
+
const ToastTitlePart = require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "title");
|
|
16
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "icon");
|
|
17
|
+
/** The `description` part. */
|
|
18
|
+
const ToastDescriptionPart = require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "description");
|
|
19
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "footer");
|
|
20
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "actions");
|
|
21
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "timer-ring");
|
|
22
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "timer-ring-fill");
|
|
23
|
+
/** The `action` part. */
|
|
24
|
+
const ToastActionPart = require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "action");
|
|
25
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "progress");
|
|
26
|
+
require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "progress-fill");
|
|
27
|
+
/** The `close` part. */
|
|
28
|
+
const ToastClosePart = require_parts.createVuePart(_bevelo_core_primitives_toast.toastPrimitive, "close");
|
|
29
|
+
// src/toast.ts
|
|
30
|
+
const schema = require_options.vueOptions(_bevelo_core_primitives_toast.toastPrimitive);
|
|
31
|
+
const NO_MESSAGES = [];
|
|
32
|
+
/** A controller to pass as `Toast`'s `controller` prop. */
|
|
33
|
+
function createToastController() {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
const Toast = (0, vue.defineComponent)({
|
|
37
|
+
name: "Toast",
|
|
38
|
+
inheritAttrs: false,
|
|
39
|
+
props: {
|
|
40
|
+
...schema.props,
|
|
41
|
+
messages: {
|
|
42
|
+
type: Array,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "Notifications"
|
|
48
|
+
},
|
|
49
|
+
dismissLabel: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: "Dismiss"
|
|
52
|
+
},
|
|
53
|
+
position: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "bottom-right"
|
|
56
|
+
},
|
|
57
|
+
controller: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
emits: schema.emits,
|
|
63
|
+
slots: Object,
|
|
64
|
+
setup(props, { attrs, slots, expose }) {
|
|
65
|
+
const handle = require_headless.usePrimitive(_bevelo_core_primitives_toast.toastPrimitive, schema.bind(props, () => ({ messages: props.messages ?? NO_MESSAGES })));
|
|
66
|
+
const api = handle.api;
|
|
67
|
+
const controller = (0, vue.toRaw)(props.controller);
|
|
68
|
+
if (controller !== void 0) controller.api = api;
|
|
69
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
70
|
+
if (controller?.api === api) delete controller.api;
|
|
71
|
+
});
|
|
72
|
+
expose({ api });
|
|
73
|
+
return () => {
|
|
74
|
+
handle.revision.value;
|
|
75
|
+
const rendered = (handle.state.items ?? []).map((item, index) => {
|
|
76
|
+
const address = { index };
|
|
77
|
+
const scope = {
|
|
78
|
+
message: item.message,
|
|
79
|
+
index,
|
|
80
|
+
dismiss: () => api.dismiss(item.id)
|
|
81
|
+
};
|
|
82
|
+
const icon = require_headless.renderPart(handle, "icon", { key: `${item.id}-icon` }, [require_describe.descriptionNode((0, _bevelo_core_primitives_toast.toastStatusGlyph)(item.status), 0)], address);
|
|
83
|
+
const body = slots.content !== void 0 ? [(0, vue.h)(vue.Fragment, { key: `${item.id}-content` }, [icon, slots.content(scope)])] : [require_headless.renderPart(handle, "title", { key: `${item.id}-title` }, [(0, vue.h)(vue.Fragment, null, [icon, item.message.title])], address), require_headless.renderPart(handle, "description", { key: `${item.id}-desc` }, item.message.description, address)];
|
|
84
|
+
const ringFill = require_headless.renderPart(handle, "timer-ring-fill", {
|
|
85
|
+
key: `${item.id}-ringfill`,
|
|
86
|
+
cx: "8",
|
|
87
|
+
cy: "8",
|
|
88
|
+
r: "7",
|
|
89
|
+
fill: "none",
|
|
90
|
+
stroke: "currentColor",
|
|
91
|
+
strokeWidth: "2",
|
|
92
|
+
strokeLinecap: "round",
|
|
93
|
+
pathLength: "100"
|
|
94
|
+
}, void 0, address);
|
|
95
|
+
const ring = require_headless.renderPart(handle, "timer-ring", { key: `${item.id}-ring` }, [(0, vue.h)("svg", {
|
|
96
|
+
viewBox: "0 0 16 16",
|
|
97
|
+
width: "16",
|
|
98
|
+
height: "16",
|
|
99
|
+
focusable: "false"
|
|
100
|
+
}, [(0, vue.h)("circle", {
|
|
101
|
+
cx: "8",
|
|
102
|
+
cy: "8",
|
|
103
|
+
r: "7",
|
|
104
|
+
fill: "none",
|
|
105
|
+
stroke: "currentColor",
|
|
106
|
+
strokeWidth: "2",
|
|
107
|
+
opacity: "0.25"
|
|
108
|
+
}), ringFill])], address);
|
|
109
|
+
const action = require_headless.renderPart(handle, "action", { key: `${item.id}-action` }, slots.action?.(scope) ?? item.message.action?.label, address);
|
|
110
|
+
const actions = require_headless.renderPart(handle, "actions", { key: `${item.id}-actions` }, [(0, vue.h)(vue.Fragment, null, [ring, action])], address);
|
|
111
|
+
const progressFill = require_headless.renderPart(handle, "progress-fill", { key: `${item.id}-pf` }, void 0, address);
|
|
112
|
+
const progress = require_headless.renderPart(handle, "progress", { key: `${item.id}-progress` }, [progressFill], address);
|
|
113
|
+
const footer = require_headless.renderPart(handle, "footer", { key: `${item.id}-footer` }, [(0, vue.h)(vue.Fragment, null, [actions, progress])], address);
|
|
114
|
+
const close = require_headless.renderPart(handle, "close", { key: `${item.id}-close` }, slots.closeIcon?.() ?? "×", address);
|
|
115
|
+
return require_headless.renderPart(handle, "toast", { key: item.id }, [(0, vue.h)(vue.Fragment, null, [
|
|
116
|
+
...body,
|
|
117
|
+
footer,
|
|
118
|
+
close
|
|
119
|
+
])], address);
|
|
120
|
+
});
|
|
121
|
+
return require_headless.renderPart(handle, "root", { ...attrs }, rendered, { portal: true });
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
const ITEM_SCOPE = Symbol("toast-item");
|
|
126
|
+
/** Provides one message's scope to the parts its slot renders. */
|
|
127
|
+
const ToastItemScope = (0, vue.defineComponent)({
|
|
128
|
+
name: "ToastItemScope",
|
|
129
|
+
props: {
|
|
130
|
+
item: {
|
|
131
|
+
type: Object,
|
|
132
|
+
required: true
|
|
133
|
+
},
|
|
134
|
+
toaster: {
|
|
135
|
+
type: Function,
|
|
136
|
+
required: true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
setup(props, { slots }) {
|
|
140
|
+
(0, vue.provide)(ITEM_SCOPE, {
|
|
141
|
+
get item() {
|
|
142
|
+
return props.item;
|
|
143
|
+
},
|
|
144
|
+
get toaster() {
|
|
145
|
+
return props.toaster;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return () => slots["default"]?.();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
function regionPosition(position, side, align) {
|
|
152
|
+
if (position !== void 0) return position;
|
|
153
|
+
if (side === "top" || side === "bottom") return `${side}-${align === "start" ? "left" : align === "end" ? "right" : "center"}`;
|
|
154
|
+
if (side === "left" || side === "right") return `bottom-${side}`;
|
|
155
|
+
return "bottom-right";
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Renders a toaster. Without a default slot it is a `Toast` fed by the
|
|
159
|
+
* toaster; with one, the slot renders each message (`{ item }`) inside the
|
|
160
|
+
* region and the `Toast*` parts read that message.
|
|
161
|
+
*/
|
|
162
|
+
const ToastRegion = (0, vue.defineComponent)({
|
|
163
|
+
name: "ToastRegion",
|
|
164
|
+
inheritAttrs: false,
|
|
165
|
+
props: {
|
|
166
|
+
...schema.props,
|
|
167
|
+
toaster: {
|
|
168
|
+
type: Function,
|
|
169
|
+
required: true
|
|
170
|
+
},
|
|
171
|
+
label: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: "Notifications"
|
|
174
|
+
},
|
|
175
|
+
dismissLabel: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: "Dismiss"
|
|
178
|
+
},
|
|
179
|
+
position: {
|
|
180
|
+
type: String,
|
|
181
|
+
required: false
|
|
182
|
+
},
|
|
183
|
+
/** With `align`, an alternative to `position`. */
|
|
184
|
+
side: {
|
|
185
|
+
type: String,
|
|
186
|
+
required: false
|
|
187
|
+
},
|
|
188
|
+
align: {
|
|
189
|
+
type: String,
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
/** How many of the newest messages a slot-rendered region shows. */
|
|
193
|
+
maxVisible: {
|
|
194
|
+
type: Number,
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
controller: {
|
|
198
|
+
type: Object,
|
|
199
|
+
required: false
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
emits: schema.emits,
|
|
203
|
+
slots: Object,
|
|
204
|
+
setup(props, { attrs, slots, emit }) {
|
|
205
|
+
const messages = (0, vue.shallowRef)(props.toaster.messages());
|
|
206
|
+
const items = (0, vue.shallowRef)(props.toaster.items());
|
|
207
|
+
const unsubscribe = props.toaster.subscribe(() => {
|
|
208
|
+
messages.value = props.toaster.messages();
|
|
209
|
+
items.value = props.toaster.items();
|
|
210
|
+
});
|
|
211
|
+
(0, vue.onBeforeUnmount)(unsubscribe);
|
|
212
|
+
return () => {
|
|
213
|
+
const position = regionPosition(props.position, props.side, props.align);
|
|
214
|
+
const itemSlot = slots.default;
|
|
215
|
+
if (itemSlot !== void 0) {
|
|
216
|
+
const visible = props.maxVisible !== void 0 && props.maxVisible > 0 ? items.value.slice(-props.maxVisible) : items.value;
|
|
217
|
+
if (visible.length === 0) return null;
|
|
218
|
+
return (0, vue.h)("div", {
|
|
219
|
+
role: "region",
|
|
220
|
+
"aria-label": props.label,
|
|
221
|
+
"data-slot": "toast-region",
|
|
222
|
+
"data-part": "root",
|
|
223
|
+
"data-position": position,
|
|
224
|
+
...attrs
|
|
225
|
+
}, visible.map((item) => (0, vue.h)(ToastItemScope, {
|
|
226
|
+
key: item.id,
|
|
227
|
+
item,
|
|
228
|
+
toaster: props.toaster
|
|
229
|
+
}, () => itemSlot({ item }))));
|
|
230
|
+
}
|
|
231
|
+
const { toaster: _toaster, side: _side, align: _align, maxVisible: _max, ...rest } = props;
|
|
232
|
+
const forwarded = {
|
|
233
|
+
...rest,
|
|
234
|
+
...attrs,
|
|
235
|
+
position,
|
|
236
|
+
messages: messages.value,
|
|
237
|
+
onDismiss: (id) => {
|
|
238
|
+
props.toaster.dismiss(id, "close-press");
|
|
239
|
+
emit("dismiss", id);
|
|
240
|
+
},
|
|
241
|
+
onAction: (id) => {
|
|
242
|
+
props.toaster.action(id);
|
|
243
|
+
emit("action", id);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
return (0, vue.h)(Toast, forwarded, {
|
|
247
|
+
...slots.content === void 0 ? {} : { content: slots.content },
|
|
248
|
+
...slots.action === void 0 ? {} : { action: slots.action },
|
|
249
|
+
...slots.closeIcon === void 0 ? {} : { closeIcon: slots.closeIcon }
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
/** A message's title: inside a region slot, the message's own; elsewhere, the `title` part. */
|
|
255
|
+
const ToastTitle = (0, vue.defineComponent)({
|
|
256
|
+
name: "ToastTitle",
|
|
257
|
+
inheritAttrs: false,
|
|
258
|
+
setup(_props, { attrs, slots }) {
|
|
259
|
+
const scope = (0, vue.inject)(ITEM_SCOPE, null);
|
|
260
|
+
return () => scope === null ? (0, vue.h)(ToastTitlePart, attrs, slots) : (0, vue.h)("div", {
|
|
261
|
+
"data-part": "title",
|
|
262
|
+
...attrs
|
|
263
|
+
}, slots["default"]?.() ?? scope.item.title);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
/** A message's description: inside a region slot, the message's own; elsewhere, the `description` part. */
|
|
267
|
+
const ToastDescription = (0, vue.defineComponent)({
|
|
268
|
+
name: "ToastDescription",
|
|
269
|
+
inheritAttrs: false,
|
|
270
|
+
setup(_props, { attrs, slots }) {
|
|
271
|
+
const scope = (0, vue.inject)(ITEM_SCOPE, null);
|
|
272
|
+
return () => {
|
|
273
|
+
if (scope === null) return (0, vue.h)(ToastDescriptionPart, attrs, slots);
|
|
274
|
+
const text = slots["default"]?.() ?? scope.item.description;
|
|
275
|
+
return text === void 0 ? null : (0, vue.h)("p", {
|
|
276
|
+
"data-part": "description",
|
|
277
|
+
...attrs
|
|
278
|
+
}, text);
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
/** Dismisses the message it sits in; elsewhere, the `close` part. */
|
|
283
|
+
const ToastClose = (0, vue.defineComponent)({
|
|
284
|
+
name: "ToastClose",
|
|
285
|
+
inheritAttrs: false,
|
|
286
|
+
emits: { click: (_event) => true },
|
|
287
|
+
setup(_props, { attrs, slots, emit }) {
|
|
288
|
+
const scope = (0, vue.inject)(ITEM_SCOPE, null);
|
|
289
|
+
return () => scope === null ? (0, vue.h)(ToastClosePart, attrs, slots) : (0, vue.h)("button", {
|
|
290
|
+
type: "button",
|
|
291
|
+
"data-part": "close",
|
|
292
|
+
...attrs,
|
|
293
|
+
onClick: (event) => {
|
|
294
|
+
emit("click", event);
|
|
295
|
+
scope.toaster.dismiss(scope.item.id, "close-press");
|
|
296
|
+
}
|
|
297
|
+
}, slots["default"]?.() ?? "×");
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
/**
|
|
301
|
+
* Runs the message's action, then dismisses it; a promise holds `data-pending`
|
|
302
|
+
* until it settles. Elsewhere, the `action` part.
|
|
303
|
+
*/
|
|
304
|
+
const ToastAction = (0, vue.defineComponent)({
|
|
305
|
+
name: "ToastAction",
|
|
306
|
+
inheritAttrs: false,
|
|
307
|
+
props: {
|
|
308
|
+
/** Runs instead of the message's own action. */
|
|
309
|
+
action: {
|
|
310
|
+
type: Function,
|
|
311
|
+
required: false
|
|
312
|
+
} },
|
|
313
|
+
emits: { click: (_event) => true },
|
|
314
|
+
slots: Object,
|
|
315
|
+
setup(props, { attrs, slots, emit }) {
|
|
316
|
+
const scope = (0, vue.inject)(ITEM_SCOPE, null);
|
|
317
|
+
const pending = (0, vue.shallowRef)(false);
|
|
318
|
+
const error = (0, vue.shallowRef)(null);
|
|
319
|
+
return () => {
|
|
320
|
+
if (scope === null) return (0, vue.h)(ToastActionPart, attrs, slots);
|
|
321
|
+
const label = slots.default?.({
|
|
322
|
+
pending: pending.value,
|
|
323
|
+
error: error.value
|
|
324
|
+
}) ?? scope.item.action?.label;
|
|
325
|
+
if (label === void 0) return null;
|
|
326
|
+
return (0, vue.h)("button", {
|
|
327
|
+
type: "button",
|
|
328
|
+
"data-part": "action",
|
|
329
|
+
"data-pending": pending.value ? "" : void 0,
|
|
330
|
+
"data-error": error.value === null ? void 0 : "",
|
|
331
|
+
...attrs,
|
|
332
|
+
onClick: async (event) => {
|
|
333
|
+
emit("click", event);
|
|
334
|
+
const run = props.action ?? scope.item.action?.onAction;
|
|
335
|
+
if (run === void 0) return;
|
|
336
|
+
error.value = null;
|
|
337
|
+
try {
|
|
338
|
+
const result = run();
|
|
339
|
+
if (result instanceof Promise) {
|
|
340
|
+
pending.value = true;
|
|
341
|
+
await result;
|
|
342
|
+
pending.value = false;
|
|
343
|
+
}
|
|
344
|
+
scope.toaster.dismiss(scope.item.id, "action");
|
|
345
|
+
} catch (caught) {
|
|
346
|
+
pending.value = false;
|
|
347
|
+
error.value = caught;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}, label);
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
Object.defineProperty(exports, "Toast", {
|
|
355
|
+
enumerable: true,
|
|
356
|
+
get: function() {
|
|
357
|
+
return Toast;
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
Object.defineProperty(exports, "ToastAction", {
|
|
361
|
+
enumerable: true,
|
|
362
|
+
get: function() {
|
|
363
|
+
return ToastAction;
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
Object.defineProperty(exports, "ToastClose", {
|
|
367
|
+
enumerable: true,
|
|
368
|
+
get: function() {
|
|
369
|
+
return ToastClose;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
Object.defineProperty(exports, "ToastDescription", {
|
|
373
|
+
enumerable: true,
|
|
374
|
+
get: function() {
|
|
375
|
+
return ToastDescription;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
Object.defineProperty(exports, "ToastRegion", {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function() {
|
|
381
|
+
return ToastRegion;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
Object.defineProperty(exports, "ToastRootPart", {
|
|
385
|
+
enumerable: true,
|
|
386
|
+
get: function() {
|
|
387
|
+
return ToastRootPart;
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
Object.defineProperty(exports, "ToastTitle", {
|
|
391
|
+
enumerable: true,
|
|
392
|
+
get: function() {
|
|
393
|
+
return ToastTitle;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
Object.defineProperty(exports, "createToastController", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function() {
|
|
399
|
+
return createToastController;
|
|
400
|
+
}
|
|
401
|
+
});
|
package/dist/toast.cjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_toast = require("./toast-DyezF7lm.cjs");
|
|
3
|
+
let _bevelo_core = require("@bevelo/core");
|
|
4
|
+
exports.Toast = require_toast.Toast;
|
|
5
|
+
exports.ToastAction = require_toast.ToastAction;
|
|
6
|
+
exports.ToastClose = require_toast.ToastClose;
|
|
7
|
+
exports.ToastDescription = require_toast.ToastDescription;
|
|
8
|
+
exports.ToastRegion = require_toast.ToastRegion;
|
|
9
|
+
exports.ToastTitle = require_toast.ToastTitle;
|
|
10
|
+
exports.createToastController = require_toast.createToastController;
|
|
11
|
+
Object.defineProperty(exports, "createToaster", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return _bevelo_core.createToaster;
|
|
15
|
+
}
|
|
16
|
+
});
|
package/dist/toast.d.cts
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { n as OptionEmits } from "./options-DUGLoksA.cjs";
|
|
2
|
+
import { PropType, SlotsType, VNodeChild } from "vue";
|
|
3
|
+
import { ToastInput, ToastMessage, ToastPosition, Toaster, ToasterItem, ToasterOptions, ToasterStatus, createToaster } from "@bevelo/core";
|
|
4
|
+
import { PrimitiveToastApi } from "@bevelo/core/primitives/toast";
|
|
5
|
+
/** A host's handle on a mounted `Toast`: `api` is set while it is mounted. */
|
|
6
|
+
export interface ToastController {
|
|
7
|
+
api?: PrimitiveToastApi;
|
|
8
|
+
}
|
|
9
|
+
/** A controller to pass as `Toast`'s `controller` prop. */
|
|
10
|
+
export declare function createToastController(): ToastController;
|
|
11
|
+
/** What the `content` and `action` slots receive. */
|
|
12
|
+
export interface ToastSlotProps {
|
|
13
|
+
readonly message: ToastMessage;
|
|
14
|
+
readonly index: number;
|
|
15
|
+
readonly dismiss: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const Toast: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
18
|
+
messages: {
|
|
19
|
+
type: PropType<readonly ToastMessage[]>;
|
|
20
|
+
required: false;
|
|
21
|
+
};
|
|
22
|
+
label: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
dismissLabel: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
position: {
|
|
31
|
+
type: PropType<ToastPosition>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
controller: {
|
|
35
|
+
type: PropType<ToastController>;
|
|
36
|
+
required: false;
|
|
37
|
+
};
|
|
38
|
+
movementWithinRegion: {
|
|
39
|
+
type: PropType<(input: unknown) => boolean>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
schedule: {
|
|
43
|
+
type: PropType<import("@bevelo/core").ToastSchedule>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
now: {
|
|
47
|
+
type: PropType<() => number>;
|
|
48
|
+
default: undefined;
|
|
49
|
+
};
|
|
50
|
+
}>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, OptionEmits<import("@bevelo/core").PrimitiveToastOptions>, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
messages: {
|
|
52
|
+
type: PropType<readonly ToastMessage[]>;
|
|
53
|
+
required: false;
|
|
54
|
+
};
|
|
55
|
+
label: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
dismissLabel: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
position: {
|
|
64
|
+
type: PropType<ToastPosition>;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
controller: {
|
|
68
|
+
type: PropType<ToastController>;
|
|
69
|
+
required: false;
|
|
70
|
+
};
|
|
71
|
+
movementWithinRegion: {
|
|
72
|
+
type: PropType<(input: unknown) => boolean>;
|
|
73
|
+
default: undefined;
|
|
74
|
+
};
|
|
75
|
+
schedule: {
|
|
76
|
+
type: PropType<import("@bevelo/core").ToastSchedule>;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
now: {
|
|
80
|
+
type: PropType<() => number>;
|
|
81
|
+
default: undefined;
|
|
82
|
+
};
|
|
83
|
+
}>> & Readonly<{
|
|
84
|
+
onAction?: (id: string) => any;
|
|
85
|
+
onDismiss?: (id: string) => any;
|
|
86
|
+
}>, {
|
|
87
|
+
label: string;
|
|
88
|
+
position: ToastPosition;
|
|
89
|
+
movementWithinRegion: (input: unknown) => boolean;
|
|
90
|
+
schedule: import("@bevelo/core").ToastSchedule;
|
|
91
|
+
now: () => number;
|
|
92
|
+
dismissLabel: string;
|
|
93
|
+
}, SlotsType<{
|
|
94
|
+
content?: (props: ToastSlotProps) => VNodeChild;
|
|
95
|
+
action?: (props: ToastSlotProps) => VNodeChild;
|
|
96
|
+
closeIcon?: () => VNodeChild;
|
|
97
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
|
+
/** Props for `Toast`. */
|
|
99
|
+
export type ToastProps = InstanceType<typeof Toast>["$props"];
|
|
100
|
+
/** One message as a toaster holds it, with what the region's slot renders. */
|
|
101
|
+
export type ToasterItemState = ToasterItem;
|
|
102
|
+
/**
|
|
103
|
+
* Renders a toaster. Without a default slot it is a `Toast` fed by the
|
|
104
|
+
* toaster; with one, the slot renders each message (`{ item }`) inside the
|
|
105
|
+
* region and the `Toast*` parts read that message.
|
|
106
|
+
*/
|
|
107
|
+
export declare const ToastRegion: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
108
|
+
toaster: {
|
|
109
|
+
type: PropType<Toaster>;
|
|
110
|
+
required: true;
|
|
111
|
+
};
|
|
112
|
+
label: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
dismissLabel: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
position: {
|
|
121
|
+
type: PropType<ToastPosition>;
|
|
122
|
+
required: false;
|
|
123
|
+
};
|
|
124
|
+
/** With `align`, an alternative to `position`. */
|
|
125
|
+
side: {
|
|
126
|
+
type: PropType<"top" | "bottom" | "left" | "right">;
|
|
127
|
+
required: false;
|
|
128
|
+
};
|
|
129
|
+
align: {
|
|
130
|
+
type: PropType<"start" | "center" | "end">;
|
|
131
|
+
required: false;
|
|
132
|
+
};
|
|
133
|
+
/** How many of the newest messages a slot-rendered region shows. */
|
|
134
|
+
maxVisible: {
|
|
135
|
+
type: NumberConstructor;
|
|
136
|
+
required: false;
|
|
137
|
+
};
|
|
138
|
+
controller: {
|
|
139
|
+
type: PropType<ToastController>;
|
|
140
|
+
required: false;
|
|
141
|
+
};
|
|
142
|
+
movementWithinRegion: {
|
|
143
|
+
type: PropType<(input: unknown) => boolean>;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
146
|
+
schedule: {
|
|
147
|
+
type: PropType<import("@bevelo/core").ToastSchedule>;
|
|
148
|
+
default: undefined;
|
|
149
|
+
};
|
|
150
|
+
now: {
|
|
151
|
+
type: PropType<() => number>;
|
|
152
|
+
default: undefined;
|
|
153
|
+
};
|
|
154
|
+
messages: {
|
|
155
|
+
type: PropType<readonly ToastMessage[]>;
|
|
156
|
+
default: undefined;
|
|
157
|
+
};
|
|
158
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
159
|
+
[key: string]: any;
|
|
160
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, OptionEmits<import("@bevelo/core").PrimitiveToastOptions>, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
161
|
+
toaster: {
|
|
162
|
+
type: PropType<Toaster>;
|
|
163
|
+
required: true;
|
|
164
|
+
};
|
|
165
|
+
label: {
|
|
166
|
+
type: StringConstructor;
|
|
167
|
+
default: string;
|
|
168
|
+
};
|
|
169
|
+
dismissLabel: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
default: string;
|
|
172
|
+
};
|
|
173
|
+
position: {
|
|
174
|
+
type: PropType<ToastPosition>;
|
|
175
|
+
required: false;
|
|
176
|
+
};
|
|
177
|
+
/** With `align`, an alternative to `position`. */
|
|
178
|
+
side: {
|
|
179
|
+
type: PropType<"top" | "bottom" | "left" | "right">;
|
|
180
|
+
required: false;
|
|
181
|
+
};
|
|
182
|
+
align: {
|
|
183
|
+
type: PropType<"start" | "center" | "end">;
|
|
184
|
+
required: false;
|
|
185
|
+
};
|
|
186
|
+
/** How many of the newest messages a slot-rendered region shows. */
|
|
187
|
+
maxVisible: {
|
|
188
|
+
type: NumberConstructor;
|
|
189
|
+
required: false;
|
|
190
|
+
};
|
|
191
|
+
controller: {
|
|
192
|
+
type: PropType<ToastController>;
|
|
193
|
+
required: false;
|
|
194
|
+
};
|
|
195
|
+
movementWithinRegion: {
|
|
196
|
+
type: PropType<(input: unknown) => boolean>;
|
|
197
|
+
default: undefined;
|
|
198
|
+
};
|
|
199
|
+
schedule: {
|
|
200
|
+
type: PropType<import("@bevelo/core").ToastSchedule>;
|
|
201
|
+
default: undefined;
|
|
202
|
+
};
|
|
203
|
+
now: {
|
|
204
|
+
type: PropType<() => number>;
|
|
205
|
+
default: undefined;
|
|
206
|
+
};
|
|
207
|
+
messages: {
|
|
208
|
+
type: PropType<readonly ToastMessage[]>;
|
|
209
|
+
default: undefined;
|
|
210
|
+
};
|
|
211
|
+
}>> & Readonly<{
|
|
212
|
+
onAction?: (id: string) => any;
|
|
213
|
+
onDismiss?: (id: string) => any;
|
|
214
|
+
}>, {
|
|
215
|
+
label: string;
|
|
216
|
+
movementWithinRegion: (input: unknown) => boolean;
|
|
217
|
+
schedule: import("@bevelo/core").ToastSchedule;
|
|
218
|
+
now: () => number;
|
|
219
|
+
messages: readonly ToastMessage[];
|
|
220
|
+
dismissLabel: string;
|
|
221
|
+
}, SlotsType<{
|
|
222
|
+
default?: (props: {
|
|
223
|
+
readonly item: ToasterItemState;
|
|
224
|
+
}) => VNodeChild;
|
|
225
|
+
content?: (props: ToastSlotProps) => VNodeChild;
|
|
226
|
+
action?: (props: ToastSlotProps) => VNodeChild;
|
|
227
|
+
closeIcon?: () => VNodeChild;
|
|
228
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
229
|
+
/** Props for `ToastRegion`. */
|
|
230
|
+
export type ToastRegionProps = InstanceType<typeof ToastRegion>["$props"];
|
|
231
|
+
/** A message's title: inside a region slot, the message's own; elsewhere, the `title` part. */
|
|
232
|
+
export declare const ToastTitle: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
235
|
+
/** A message's description: inside a region slot, the message's own; elsewhere, the `description` part. */
|
|
236
|
+
export declare const ToastDescription: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
237
|
+
[key: string]: any;
|
|
238
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
239
|
+
/** Dismisses the message it sits in; elsewhere, the `close` part. */
|
|
240
|
+
export declare const ToastClose: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
241
|
+
[key: string]: any;
|
|
242
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
243
|
+
click: (_event: MouseEvent) => true;
|
|
244
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
245
|
+
onClick?: (_event: MouseEvent) => any;
|
|
246
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
247
|
+
/**
|
|
248
|
+
* Runs the message's action, then dismisses it; a promise holds `data-pending`
|
|
249
|
+
* until it settles. Elsewhere, the `action` part.
|
|
250
|
+
*/
|
|
251
|
+
export declare const ToastAction: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
252
|
+
/** Runs instead of the message's own action. */
|
|
253
|
+
action: {
|
|
254
|
+
type: PropType<() => unknown>;
|
|
255
|
+
required: false;
|
|
256
|
+
};
|
|
257
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
258
|
+
[key: string]: any;
|
|
259
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
260
|
+
click: (_event: MouseEvent) => true;
|
|
261
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
262
|
+
/** Runs instead of the message's own action. */
|
|
263
|
+
action: {
|
|
264
|
+
type: PropType<() => unknown>;
|
|
265
|
+
required: false;
|
|
266
|
+
};
|
|
267
|
+
}>> & Readonly<{
|
|
268
|
+
onClick?: (_event: MouseEvent) => any;
|
|
269
|
+
}>, {}, SlotsType<{
|
|
270
|
+
default?: (props: {
|
|
271
|
+
readonly pending: boolean;
|
|
272
|
+
readonly error: unknown;
|
|
273
|
+
}) => VNodeChild;
|
|
274
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
275
|
+
export { type ToastInput, type Toaster, type ToasterOptions, type ToasterStatus, createToaster };
|