@bevelo/solid 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-7jt3BPeM.js +101 -0
- package/dist/accordion-BZw6wfXC.cjs +142 -0
- package/dist/accordion-CbEiLZg1.d.ts +65 -0
- package/dist/accordion-D96X2Dfn.d.cts +65 -0
- package/dist/accordion.cjs +9 -0
- package/dist/accordion.d.cts +2 -0
- package/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +1 -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-5MyAE281.d.cts +41 -0
- package/dist/alert-dialog-BJ83l4Yr.d.ts +41 -0
- package/dist/alert-dialog-__fU1AaI.cjs +150 -0
- package/dist/alert-dialog-dDX-88oC.js +121 -0
- package/dist/alert-dialog.cjs +7 -0
- package/dist/alert-dialog.d.cts +2 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +1 -0
- package/dist/alert.cjs +73 -0
- package/dist/alert.d.cts +19 -0
- package/dist/alert.d.ts +19 -0
- package/dist/alert.js +72 -0
- package/dist/aspect-ratio.cjs +25 -0
- package/dist/aspect-ratio.d.cts +13 -0
- package/dist/aspect-ratio.d.ts +13 -0
- package/dist/aspect-ratio.js +24 -0
- package/dist/async-options.cjs +93 -0
- package/dist/async-options.d.cts +50 -0
- package/dist/async-options.d.ts +50 -0
- package/dist/async-options.js +92 -0
- package/dist/autocomplete.cjs +320 -0
- package/dist/autocomplete.d.cts +135 -0
- package/dist/autocomplete.d.ts +135 -0
- package/dist/autocomplete.js +318 -0
- package/dist/avatar.cjs +113 -0
- package/dist/avatar.d.cts +46 -0
- package/dist/avatar.d.ts +46 -0
- package/dist/avatar.js +110 -0
- package/dist/badge.cjs +50 -0
- package/dist/badge.d.cts +21 -0
- package/dist/badge.d.ts +21 -0
- package/dist/badge.js +49 -0
- package/dist/breadcrumb.cjs +62 -0
- package/dist/breadcrumb.d.cts +22 -0
- package/dist/breadcrumb.d.ts +22 -0
- package/dist/breadcrumb.js +61 -0
- package/dist/button.cjs +44 -0
- package/dist/button.d.cts +35 -0
- package/dist/button.d.ts +35 -0
- package/dist/button.js +43 -0
- package/dist/calendar-DHg328Wh.cjs +915 -0
- package/dist/calendar-DeAf96cJ.js +838 -0
- package/dist/calendar.cjs +4 -0
- package/dist/calendar.d.cts +88 -0
- package/dist/calendar.d.ts +88 -0
- package/dist/calendar.js +1 -0
- package/dist/card-BTasFPAi.cjs +128 -0
- package/dist/card-Bl_qvP9O.d.ts +42 -0
- package/dist/card-GTyhk9cq.js +87 -0
- package/dist/card-s7z9AgPW.d.cts +42 -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 +220 -0
- package/dist/carousel.d.cts +68 -0
- package/dist/carousel.d.ts +68 -0
- package/dist/carousel.js +218 -0
- package/dist/checkbox-group.cjs +81 -0
- package/dist/checkbox-group.d.cts +44 -0
- package/dist/checkbox-group.d.ts +44 -0
- package/dist/checkbox-group.js +79 -0
- package/dist/checkbox.cjs +104 -0
- package/dist/checkbox.d.cts +50 -0
- package/dist/checkbox.d.ts +50 -0
- package/dist/checkbox.js +103 -0
- package/dist/collapsible-BnSkwTni.cjs +106 -0
- package/dist/collapsible-CpDUzooq.d.ts +57 -0
- package/dist/collapsible-DyHC_FGP.js +71 -0
- package/dist/collapsible-O9hUWgJA.d.cts +57 -0
- package/dist/collapsible.cjs +8 -0
- package/dist/collapsible.d.cts +2 -0
- package/dist/collapsible.d.ts +2 -0
- package/dist/collapsible.js +1 -0
- package/dist/color-picker.cjs +300 -0
- package/dist/color-picker.d.cts +151 -0
- package/dist/color-picker.d.ts +151 -0
- package/dist/color-picker.js +286 -0
- package/dist/combobox-BE_Ofnla.d.cts +263 -0
- package/dist/combobox-DLlN9OA1.js +922 -0
- package/dist/combobox-EPlhNIDM.d.ts +263 -0
- package/dist/combobox-s2YZXpzm.cjs +1119 -0
- package/dist/combobox.cjs +35 -0
- package/dist/combobox.d.cts +2 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.js +1 -0
- package/dist/command-CL-Yr9xn.cjs +856 -0
- package/dist/command-D1obN_-I.js +707 -0
- package/dist/command-Dl9njwVq.d.cts +198 -0
- package/dist/command-M3-krsPS.d.ts +198 -0
- package/dist/command.cjs +16 -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-BlBg_gSG.js +166 -0
- package/dist/context-menu-CJ9UfOP7.d.cts +47 -0
- package/dist/context-menu-CYJ3zH5X.cjs +189 -0
- package/dist/context-menu-KR3kfesV.d.ts +47 -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 +1 -0
- package/dist/controller-BqMwv5AS.cjs +64 -0
- package/dist/controller-C8Z-wsos.d.cts +5 -0
- package/dist/controller-C8Z-wsos.d.ts +5 -0
- package/dist/controller-D9qJwhBF.js +53 -0
- package/dist/date-input.cjs +274 -0
- package/dist/date-input.d.cts +83 -0
- package/dist/date-input.d.ts +83 -0
- package/dist/date-input.js +271 -0
- package/dist/date-picker-B5FO4aeT.d.cts +153 -0
- package/dist/date-picker-Ba4QQARc.cjs +888 -0
- package/dist/date-picker-CALdRWyJ.js +841 -0
- package/dist/date-picker-D1WyqdXf.d.ts +153 -0
- package/dist/date-picker.cjs +4 -0
- package/dist/date-picker.d.cts +2 -0
- package/dist/date-picker.d.ts +2 -0
- package/dist/date-picker.js +1 -0
- package/dist/description-content-BLuIA4Pb.cjs +91 -0
- package/dist/description-content-BWxZuDXC.js +56 -0
- package/dist/dialog-BeQDFmmz.cjs +165 -0
- package/dist/dialog-DjzR1RON.d.ts +56 -0
- package/dist/dialog-LT5bRUot.js +135 -0
- package/dist/dialog-qAhmbIqQ.d.cts +56 -0
- package/dist/dialog-view-DbygGXef.js +118 -0
- package/dist/dialog-view-DfsNxRN7.cjs +147 -0
- package/dist/dialog.cjs +7 -0
- package/dist/dialog.d.cts +2 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +1 -0
- package/dist/direction.cjs +25 -0
- package/dist/direction.d.cts +14 -0
- package/dist/direction.d.ts +14 -0
- package/dist/direction.js +24 -0
- package/dist/dnd.cjs +124 -0
- package/dist/dnd.d.cts +64 -0
- package/dist/dnd.d.ts +64 -0
- package/dist/dnd.js +119 -0
- package/dist/drawer.cjs +114 -0
- package/dist/drawer.d.cts +65 -0
- package/dist/drawer.d.ts +65 -0
- package/dist/drawer.js +111 -0
- package/dist/empty-state.cjs +70 -0
- package/dist/empty-state.d.cts +20 -0
- package/dist/empty-state.d.ts +20 -0
- package/dist/empty-state.js +69 -0
- package/dist/engine-signal-1bLbbRhE.js +9 -0
- package/dist/engine-signal-6pShphhv.cjs +14 -0
- package/dist/error-state.cjs +81 -0
- package/dist/error-state.d.cts +23 -0
- package/dist/error-state.d.ts +23 -0
- package/dist/error-state.js +80 -0
- package/dist/field-api-BW0JlKyA.cjs +18 -0
- package/dist/field-api-D5RjQPB3.js +13 -0
- package/dist/field.cjs +238 -0
- package/dist/field.d.cts +61 -0
- package/dist/field.d.ts +61 -0
- package/dist/field.js +232 -0
- package/dist/file-input.cjs +103 -0
- package/dist/file-input.d.cts +69 -0
- package/dist/file-input.d.ts +69 -0
- package/dist/file-input.js +101 -0
- package/dist/gauge-parts-B3P8g6bU.d.cts +29 -0
- package/dist/gauge-parts-Ca1FaLmF.js +84 -0
- package/dist/gauge-parts-Da9Dvvym.d.ts +29 -0
- package/dist/gauge-parts-DybADezg.cjs +95 -0
- package/dist/headless-BQH7sRXk.cjs +646 -0
- package/dist/headless-CoFdY0wl.d.cts +143 -0
- package/dist/headless-DYGhuD8h.js +623 -0
- package/dist/headless-kqnA1wix.d.ts +143 -0
- package/dist/headless-props-BE1RQfyU.d.cts +4 -0
- package/dist/headless-props-CBYucfR5.js +66 -0
- package/dist/headless-props-Cf7LwO5W.cjs +107 -0
- package/dist/headless-props-bnSQ57kj.d.ts +4 -0
- package/dist/headless.cjs +5 -0
- package/dist/headless.d.cts +2 -0
- package/dist/headless.d.ts +2 -0
- package/dist/headless.js +1 -0
- package/dist/hover-card.cjs +77 -0
- package/dist/hover-card.d.cts +49 -0
- package/dist/hover-card.d.ts +49 -0
- package/dist/hover-card.js +75 -0
- package/dist/icon-button.cjs +45 -0
- package/dist/icon-button.d.cts +21 -0
- package/dist/icon-button.d.ts +21 -0
- package/dist/icon-button.js +43 -0
- package/dist/image-cropper-BTboNMMN.d.ts +43 -0
- package/dist/image-cropper-ChThsl2E.cjs +113 -0
- package/dist/image-cropper-Q749T_mI.js +84 -0
- package/dist/image-cropper-Sw4GRMtW.d.cts +43 -0
- package/dist/image-cropper.cjs +6 -0
- package/dist/image-cropper.d.cts +2 -0
- package/dist/image-cropper.d.ts +2 -0
- package/dist/image-cropper.js +1 -0
- package/dist/image.cjs +44 -0
- package/dist/image.d.cts +29 -0
- package/dist/image.d.ts +29 -0
- package/dist/image.js +43 -0
- package/dist/index.cjs +1581 -0
- package/dist/index.d.cts +566 -0
- package/dist/index.d.ts +566 -0
- package/dist/index.js +867 -0
- package/dist/input-group.cjs +49 -0
- package/dist/input-group.d.cts +20 -0
- package/dist/input-group.d.ts +20 -0
- package/dist/input-group.js +48 -0
- package/dist/input.cjs +74 -0
- package/dist/input.d.cts +52 -0
- package/dist/input.d.ts +52 -0
- package/dist/input.js +72 -0
- package/dist/item-BMra-oi7.js +194 -0
- package/dist/item-C_ZhJGza.d.cts +71 -0
- package/dist/item-Dujbi4dB.cjs +265 -0
- package/dist/item-Uxz8gAzc.d.ts +71 -0
- package/dist/item.cjs +11 -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 +75 -0
- package/dist/kbd.d.cts +17 -0
- package/dist/kbd.d.ts +17 -0
- package/dist/kbd.js +74 -0
- package/dist/label.cjs +27 -0
- package/dist/label.d.cts +15 -0
- package/dist/label.d.ts +15 -0
- package/dist/label.js +26 -0
- package/dist/list-data-D0kJD8WS.js +40 -0
- package/dist/list-data-DKH9VSgs.cjs +69 -0
- package/dist/listbox-CuISC5VB.js +188 -0
- package/dist/listbox-DLpIDe7l.cjs +217 -0
- package/dist/listbox-DzRlXOH7.d.cts +96 -0
- package/dist/listbox-Gsy3yFFS.d.ts +96 -0
- package/dist/listbox.cjs +6 -0
- package/dist/listbox.d.cts +2 -0
- package/dist/listbox.d.ts +2 -0
- package/dist/listbox.js +1 -0
- package/dist/loader.cjs +37 -0
- package/dist/loader.d.cts +27 -0
- package/dist/loader.d.ts +27 -0
- package/dist/loader.js +36 -0
- package/dist/mention-menu.cjs +159 -0
- package/dist/mention-menu.d.cts +68 -0
- package/dist/mention-menu.d.ts +68 -0
- package/dist/mention-menu.js +157 -0
- package/dist/menu-BptiQtff.js +347 -0
- package/dist/menu-DCdNGoQP.d.cts +57 -0
- package/dist/menu-DeSo-q8T.d.ts +57 -0
- package/dist/menu-qGui6tgy.cjs +394 -0
- package/dist/menu.cjs +10 -0
- package/dist/menu.d.cts +2 -0
- package/dist/menu.d.ts +2 -0
- package/dist/menu.js +1 -0
- package/dist/menubar.cjs +53 -0
- package/dist/menubar.d.cts +33 -0
- package/dist/menubar.d.ts +33 -0
- package/dist/menubar.js +51 -0
- package/dist/meter.cjs +85 -0
- package/dist/meter.d.cts +42 -0
- package/dist/meter.d.ts +42 -0
- package/dist/meter.js +80 -0
- package/dist/native-select-Ca8YL0F5.js +104 -0
- package/dist/native-select-D5oPMNzp.cjs +121 -0
- package/dist/native-select-DqUdVxFD.d.ts +46 -0
- package/dist/native-select-IFCcJ7sM.d.cts +46 -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 +164 -0
- package/dist/navigation-menu.d.cts +68 -0
- package/dist/navigation-menu.d.ts +68 -0
- package/dist/navigation-menu.js +162 -0
- package/dist/number-input.cjs +181 -0
- package/dist/number-input.d.cts +87 -0
- package/dist/number-input.d.ts +87 -0
- package/dist/number-input.js +173 -0
- package/dist/otp-input.cjs +111 -0
- package/dist/otp-input.d.cts +49 -0
- package/dist/otp-input.d.ts +49 -0
- package/dist/otp-input.js +110 -0
- package/dist/overlay-controller-BNGpdfOi.cjs +64 -0
- package/dist/overlay-controller-BwJtB1tP.js +47 -0
- package/dist/overlay-controller-Cchdw1aT.d.cts +21 -0
- package/dist/overlay-controller-lT7Gkj00.d.ts +21 -0
- package/dist/pagination.cjs +153 -0
- package/dist/pagination.d.cts +55 -0
- package/dist/pagination.d.ts +55 -0
- package/dist/pagination.js +151 -0
- package/dist/password-input.cjs +110 -0
- package/dist/password-input.d.cts +71 -0
- package/dist/password-input.d.ts +71 -0
- package/dist/password-input.js +108 -0
- package/dist/popover.cjs +106 -0
- package/dist/popover.d.cts +66 -0
- package/dist/popover.d.ts +66 -0
- package/dist/popover.js +103 -0
- package/dist/preferences.cjs +82 -0
- package/dist/preferences.d.cts +26 -0
- package/dist/preferences.d.ts +26 -0
- package/dist/preferences.js +80 -0
- package/dist/presence.cjs +71 -0
- package/dist/presence.d.cts +31 -0
- package/dist/presence.d.ts +31 -0
- package/dist/presence.js +69 -0
- package/dist/progress.cjs +88 -0
- package/dist/progress.d.cts +40 -0
- package/dist/progress.d.ts +40 -0
- package/dist/progress.js +83 -0
- package/dist/query.cjs +235 -0
- package/dist/query.d.cts +72 -0
- package/dist/query.d.ts +72 -0
- package/dist/query.js +220 -0
- package/dist/radio.cjs +129 -0
- package/dist/radio.d.cts +57 -0
- package/dist/radio.d.ts +57 -0
- package/dist/radio.js +127 -0
- package/dist/rating.cjs +95 -0
- package/dist/rating.d.cts +53 -0
- package/dist/rating.d.ts +53 -0
- package/dist/rating.js +93 -0
- package/dist/resizable-BK4Fz6B5.d.ts +49 -0
- package/dist/resizable-CTAsuFPX.d.cts +49 -0
- package/dist/resizable-CwkUH-MF.js +108 -0
- package/dist/resizable-Ddlx8mi3.cjs +143 -0
- package/dist/resizable.cjs +8 -0
- package/dist/resizable.d.cts +2 -0
- package/dist/resizable.d.ts +2 -0
- package/dist/resizable.js +1 -0
- package/dist/scroll-area.cjs +48 -0
- package/dist/scroll-area.d.cts +32 -0
- package/dist/scroll-area.d.ts +32 -0
- package/dist/scroll-area.js +46 -0
- package/dist/segmented-control.cjs +97 -0
- package/dist/segmented-control.d.cts +54 -0
- package/dist/segmented-control.d.ts +54 -0
- package/dist/segmented-control.js +94 -0
- package/dist/select-BFfmeGUv.d.ts +153 -0
- package/dist/select-BQh8JVx5.cjs +493 -0
- package/dist/select-COgnUXgF.d.cts +153 -0
- package/dist/select-SutRVX6v.js +398 -0
- package/dist/select.cjs +18 -0
- package/dist/select.d.cts +2 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +1 -0
- package/dist/separator.cjs +19 -0
- package/dist/separator.d.cts +13 -0
- package/dist/separator.d.ts +13 -0
- package/dist/separator.js +18 -0
- package/dist/sheet.cjs +131 -0
- package/dist/sheet.d.cts +84 -0
- package/dist/sheet.d.ts +84 -0
- package/dist/sheet.js +128 -0
- package/dist/sidebar-CIG1qDhQ.cjs +93 -0
- package/dist/sidebar-Dbx8GT2H.d.ts +43 -0
- package/dist/sidebar-fT_qQ-T0.js +64 -0
- package/dist/sidebar-l-Aq9IOz.d.cts +43 -0
- package/dist/sidebar.cjs +7 -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 +62 -0
- package/dist/skeleton.d.cts +17 -0
- package/dist/skeleton.d.ts +17 -0
- package/dist/skeleton.js +61 -0
- package/dist/slider.cjs +146 -0
- package/dist/slider.d.cts +63 -0
- package/dist/slider.d.ts +63 -0
- package/dist/slider.js +137 -0
- package/dist/sortable-board-strict.cjs +121 -0
- package/dist/sortable-board-strict.d.cts +65 -0
- package/dist/sortable-board-strict.d.ts +65 -0
- package/dist/sortable-board-strict.js +114 -0
- package/dist/sortable-engine.cjs +150 -0
- package/dist/sortable-engine.d.cts +58 -0
- package/dist/sortable-engine.d.ts +58 -0
- package/dist/sortable-engine.js +148 -0
- package/dist/sortable-strict.cjs +108 -0
- package/dist/sortable-strict.d.cts +41 -0
- package/dist/sortable-strict.d.ts +41 -0
- package/dist/sortable-strict.js +102 -0
- package/dist/sortable.cjs +91 -0
- package/dist/sortable.d.cts +59 -0
- package/dist/sortable.d.ts +59 -0
- package/dist/sortable.js +90 -0
- package/dist/spinner-0flshyQD.d.cts +28 -0
- package/dist/spinner-CwRqmRiC.cjs +53 -0
- package/dist/spinner-DAy7BD58.js +36 -0
- package/dist/spinner-gyZlsbee.d.ts +28 -0
- package/dist/spinner.cjs +5 -0
- package/dist/spinner.d.cts +2 -0
- package/dist/spinner.d.ts +2 -0
- package/dist/spinner.js +1 -0
- package/dist/steps-BS3VTdAj.d.ts +42 -0
- package/dist/steps-C_q2sTwv.cjs +125 -0
- package/dist/steps-Cxo076uS.js +84 -0
- package/dist/steps-DNS1V6At.d.cts +42 -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 +90 -0
- package/dist/switch.d.cts +55 -0
- package/dist/switch.d.ts +55 -0
- package/dist/switch.js +88 -0
- package/dist/table.cjs +147 -0
- package/dist/table.d.cts +52 -0
- package/dist/table.d.ts +52 -0
- package/dist/table.js +146 -0
- package/dist/tabs.cjs +250 -0
- package/dist/tabs.d.cts +108 -0
- package/dist/tabs.d.ts +108 -0
- package/dist/tabs.js +243 -0
- package/dist/textarea.cjs +94 -0
- package/dist/textarea.d.cts +58 -0
- package/dist/textarea.d.ts +58 -0
- package/dist/textarea.js +92 -0
- package/dist/time-input.cjs +101 -0
- package/dist/time-input.d.cts +49 -0
- package/dist/time-input.d.ts +49 -0
- package/dist/time-input.js +100 -0
- package/dist/timeline-B-HlcIe2.d.cts +54 -0
- package/dist/timeline-B-nmr0Hb.js +113 -0
- package/dist/timeline-B9yOdmyL.cjs +178 -0
- package/dist/timeline-lJ2Eidq_.d.ts +54 -0
- package/dist/timeline.cjs +11 -0
- package/dist/timeline.d.cts +2 -0
- package/dist/timeline.d.ts +2 -0
- package/dist/timeline.js +1 -0
- package/dist/toast.cjs +320 -0
- package/dist/toast.d.cts +95 -0
- package/dist/toast.d.ts +95 -0
- package/dist/toast.js +307 -0
- package/dist/toggle-Bv70V6KS.d.cts +46 -0
- package/dist/toggle-Dpt_Qvx2.d.ts +46 -0
- package/dist/toggle-JXH5NEkQ.cjs +127 -0
- package/dist/toggle-group.cjs +63 -0
- package/dist/toggle-group.d.cts +35 -0
- package/dist/toggle-group.d.ts +35 -0
- package/dist/toggle-group.js +62 -0
- package/dist/toggle-nt4rA46s.js +104 -0
- package/dist/toggle.cjs +6 -0
- package/dist/toggle.d.cts +2 -0
- package/dist/toggle.d.ts +2 -0
- package/dist/toggle.js +1 -0
- package/dist/token-input-B0CXtxy3.d.cts +139 -0
- package/dist/token-input-BMkRWbm-.d.ts +139 -0
- package/dist/token-input-Cnw66beG.js +365 -0
- package/dist/token-input-NxrlP4Gz.cjs +418 -0
- package/dist/token-input.cjs +11 -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 +97 -0
- package/dist/toolbar.d.cts +35 -0
- package/dist/toolbar.d.ts +35 -0
- package/dist/toolbar.js +95 -0
- package/dist/tooltip.cjs +90 -0
- package/dist/tooltip.d.cts +53 -0
- package/dist/tooltip.d.ts +53 -0
- package/dist/tooltip.js +88 -0
- package/dist/tree-B9ONanD2.d.cts +106 -0
- package/dist/tree-C1q2lYJs.js +238 -0
- package/dist/tree-CNWDUX_r.cjs +267 -0
- package/dist/tree-CtVvz_b4.d.ts +106 -0
- package/dist/tree-grid-BWZHm05V.d.cts +62 -0
- package/dist/tree-grid-C7SXcLbA.js +164 -0
- package/dist/tree-grid-CNajLoL-.cjs +193 -0
- package/dist/tree-grid-CmzYkxyz.d.ts +62 -0
- package/dist/tree-grid.cjs +7 -0
- package/dist/tree-grid.d.cts +2 -0
- package/dist/tree-grid.d.ts +2 -0
- package/dist/tree-grid.js +1 -0
- package/dist/tree.cjs +6 -0
- package/dist/tree.d.cts +2 -0
- package/dist/tree.d.ts +2 -0
- package/dist/tree.js +1 -0
- package/dist/trigger-menu-D6VAW4RC.d.ts +142 -0
- package/dist/trigger-menu-DbAaDRBP.d.cts +142 -0
- package/dist/trigger-menu-DrgodhOD.js +465 -0
- package/dist/trigger-menu-kLYrZ8M7.cjs +542 -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 +1 -0
- package/dist/virtual-list-BCbpPSc2.d.cts +63 -0
- package/dist/virtual-list-BwS-lXzi.d.ts +63 -0
- package/dist/virtual-list-Df4oyIaV.cjs +155 -0
- package/dist/virtual-list-eCLq_nPF.js +126 -0
- package/dist/virtual-list.cjs +7 -0
- package/dist/virtual-list.d.cts +2 -0
- package/dist/virtual-list.d.ts +2 -0
- package/dist/virtual-list.js +1 -0
- package/dist/virtual.cjs +59 -0
- package/dist/virtual.d.cts +45 -0
- package/dist/virtual.d.ts +45 -0
- package/dist/virtual.js +58 -0
- package/dist/waterfall-chart.cjs +115 -0
- package/dist/waterfall-chart.d.cts +42 -0
- package/dist/waterfall-chart.d.ts +42 -0
- package/dist/waterfall-chart.js +113 -0
- package/dist/waterfall.cjs +346 -0
- package/dist/waterfall.d.cts +91 -0
- package/dist/waterfall.d.ts +91 -0
- package/dist/waterfall.js +333 -0
- package/package.json +521 -3
- package/README.md +0 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Where the options stand. */
|
|
2
|
+
export type AsyncOptionsStatus = "idle" | "loading" | "ready" | "error";
|
|
3
|
+
/** What the loader receives beside the query. */
|
|
4
|
+
export interface AsyncOptionsContext {
|
|
5
|
+
/** Aborts when a newer query, a reload or the owner's disposal supersedes this load. */
|
|
6
|
+
readonly signal: AbortSignal;
|
|
7
|
+
/** 0 for the first page, then 1, 2… for each `loadMore()`. */
|
|
8
|
+
readonly page: number;
|
|
9
|
+
}
|
|
10
|
+
/** One load: the items alone, or the items and whether another page exists. */
|
|
11
|
+
export type AsyncOptionsLoad<Item> = (query: string, context: AsyncOptionsContext) => Promise<readonly Item[] | {
|
|
12
|
+
readonly items: readonly Item[];
|
|
13
|
+
readonly hasMore?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
/** Options for `createAsyncOptions`. */
|
|
16
|
+
export interface AsyncOptionsOptions {
|
|
17
|
+
/** Milliseconds typing must pause before a load starts. Defaults to 150. */
|
|
18
|
+
readonly debounceMs?: number;
|
|
19
|
+
/** The same as `debounceMs`. */
|
|
20
|
+
readonly debounce?: number;
|
|
21
|
+
/** Loads the initial query once mounted, without waiting for typing. */
|
|
22
|
+
readonly immediate?: boolean;
|
|
23
|
+
/** The initial query. Defaults to "". */
|
|
24
|
+
readonly query?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/** The result: getters that track, and the setters that drive them. */
|
|
27
|
+
export interface AsyncOptionsResult<Item> {
|
|
28
|
+
/** The latest answer; kept on screen while a newer query loads. */
|
|
29
|
+
readonly items: readonly Item[];
|
|
30
|
+
readonly status: AsyncOptionsStatus;
|
|
31
|
+
/** Whether `loadMore()` has another page to ask for. */
|
|
32
|
+
readonly hasMore: boolean;
|
|
33
|
+
/** What the last load rejected with, while `status` is "error". */
|
|
34
|
+
readonly error: unknown;
|
|
35
|
+
/** The query the next answer is for. */
|
|
36
|
+
readonly query: string;
|
|
37
|
+
/** Changes the query; the load starts once typing pauses. */
|
|
38
|
+
setQuery(query: string): void;
|
|
39
|
+
/** Loads the current query again, now. */
|
|
40
|
+
reload(): void;
|
|
41
|
+
/** Appends the next page when one exists. */
|
|
42
|
+
loadMore(): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Loads options as a query changes, keeping only the latest answer. Call it in
|
|
46
|
+
* a component or another owner: the first load starts on mount and pending
|
|
47
|
+
* work is aborted when the owner is disposed. Outside an owner it starts at
|
|
48
|
+
* once and is never disposed.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createAsyncOptions<Item>(load: AsyncOptionsLoad<Item>, options?: AsyncOptionsOptions): AsyncOptionsResult<Item>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Where the options stand. */
|
|
2
|
+
export type AsyncOptionsStatus = "idle" | "loading" | "ready" | "error";
|
|
3
|
+
/** What the loader receives beside the query. */
|
|
4
|
+
export interface AsyncOptionsContext {
|
|
5
|
+
/** Aborts when a newer query, a reload or the owner's disposal supersedes this load. */
|
|
6
|
+
readonly signal: AbortSignal;
|
|
7
|
+
/** 0 for the first page, then 1, 2… for each `loadMore()`. */
|
|
8
|
+
readonly page: number;
|
|
9
|
+
}
|
|
10
|
+
/** One load: the items alone, or the items and whether another page exists. */
|
|
11
|
+
export type AsyncOptionsLoad<Item> = (query: string, context: AsyncOptionsContext) => Promise<readonly Item[] | {
|
|
12
|
+
readonly items: readonly Item[];
|
|
13
|
+
readonly hasMore?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
/** Options for `createAsyncOptions`. */
|
|
16
|
+
export interface AsyncOptionsOptions {
|
|
17
|
+
/** Milliseconds typing must pause before a load starts. Defaults to 150. */
|
|
18
|
+
readonly debounceMs?: number;
|
|
19
|
+
/** The same as `debounceMs`. */
|
|
20
|
+
readonly debounce?: number;
|
|
21
|
+
/** Loads the initial query once mounted, without waiting for typing. */
|
|
22
|
+
readonly immediate?: boolean;
|
|
23
|
+
/** The initial query. Defaults to "". */
|
|
24
|
+
readonly query?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/** The result: getters that track, and the setters that drive them. */
|
|
27
|
+
export interface AsyncOptionsResult<Item> {
|
|
28
|
+
/** The latest answer; kept on screen while a newer query loads. */
|
|
29
|
+
readonly items: readonly Item[];
|
|
30
|
+
readonly status: AsyncOptionsStatus;
|
|
31
|
+
/** Whether `loadMore()` has another page to ask for. */
|
|
32
|
+
readonly hasMore: boolean;
|
|
33
|
+
/** What the last load rejected with, while `status` is "error". */
|
|
34
|
+
readonly error: unknown;
|
|
35
|
+
/** The query the next answer is for. */
|
|
36
|
+
readonly query: string;
|
|
37
|
+
/** Changes the query; the load starts once typing pauses. */
|
|
38
|
+
setQuery(query: string): void;
|
|
39
|
+
/** Loads the current query again, now. */
|
|
40
|
+
reload(): void;
|
|
41
|
+
/** Appends the next page when one exists. */
|
|
42
|
+
loadMore(): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Loads options as a query changes, keeping only the latest answer. Call it in
|
|
46
|
+
* a component or another owner: the first load starts on mount and pending
|
|
47
|
+
* work is aborted when the owner is disposed. Outside an owner it starts at
|
|
48
|
+
* once and is never disposed.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createAsyncOptions<Item>(load: AsyncOptionsLoad<Item>, options?: AsyncOptionsOptions): AsyncOptionsResult<Item>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { createAsyncOptions as createAsyncOptions$1 } from "@bevelo/core";
|
|
2
|
+
import { createSignal, getOwner, onCleanup, onMount } from "solid-js";
|
|
3
|
+
// src/async-options.ts
|
|
4
|
+
const STATUS = {
|
|
5
|
+
idle: "idle",
|
|
6
|
+
loading: "loading",
|
|
7
|
+
loaded: "ready",
|
|
8
|
+
failed: "error"
|
|
9
|
+
};
|
|
10
|
+
const DEFAULT_DEBOUNCE = 150;
|
|
11
|
+
/**
|
|
12
|
+
* Loads options as a query changes, keeping only the latest answer. Call it in
|
|
13
|
+
* a component or another owner: the first load starts on mount and pending
|
|
14
|
+
* work is aborted when the owner is disposed. Outside an owner it starts at
|
|
15
|
+
* once and is never disposed.
|
|
16
|
+
*/
|
|
17
|
+
function createAsyncOptions(load, options = {}) {
|
|
18
|
+
const debounce = options.debounceMs ?? options.debounce ?? DEFAULT_DEBOUNCE;
|
|
19
|
+
const [items, setItems] = createSignal([]);
|
|
20
|
+
const [status, setStatus] = createSignal(options.immediate === true ? "loading" : "idle");
|
|
21
|
+
const [hasMore, setHasMore] = createSignal(false);
|
|
22
|
+
const [error, setError] = createSignal(void 0);
|
|
23
|
+
const [query, setQueryText] = createSignal(options.query ?? "");
|
|
24
|
+
function create(initial, immediate) {
|
|
25
|
+
const created = createAsyncOptions$1({
|
|
26
|
+
load: async (request, signal) => {
|
|
27
|
+
const answer = await load(request.query, {
|
|
28
|
+
signal,
|
|
29
|
+
page: request.page
|
|
30
|
+
});
|
|
31
|
+
return Array.isArray(answer) ? {
|
|
32
|
+
items: answer,
|
|
33
|
+
hasMore: false
|
|
34
|
+
} : answer;
|
|
35
|
+
},
|
|
36
|
+
init: {
|
|
37
|
+
query: initial,
|
|
38
|
+
debounce,
|
|
39
|
+
immediate
|
|
40
|
+
},
|
|
41
|
+
onChange: (state) => {
|
|
42
|
+
if (created !== binding) return;
|
|
43
|
+
setStatus(STATUS[state.status]);
|
|
44
|
+
setQueryText(state.query);
|
|
45
|
+
setError(() => state.error);
|
|
46
|
+
setHasMore(state.hasMore);
|
|
47
|
+
if (state.status !== "loading") setItems(() => state.items);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return created;
|
|
51
|
+
}
|
|
52
|
+
let binding = create(options.query ?? "", options.immediate === true);
|
|
53
|
+
if (getOwner() === null) binding.start();
|
|
54
|
+
else {
|
|
55
|
+
onMount(() => binding.start());
|
|
56
|
+
onCleanup(() => binding.dispose());
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
get items() {
|
|
60
|
+
return items();
|
|
61
|
+
},
|
|
62
|
+
get status() {
|
|
63
|
+
return status();
|
|
64
|
+
},
|
|
65
|
+
get hasMore() {
|
|
66
|
+
return hasMore();
|
|
67
|
+
},
|
|
68
|
+
get error() {
|
|
69
|
+
return error();
|
|
70
|
+
},
|
|
71
|
+
get query() {
|
|
72
|
+
return query();
|
|
73
|
+
},
|
|
74
|
+
setQuery(text) {
|
|
75
|
+
setQueryText(text);
|
|
76
|
+
binding.query(text);
|
|
77
|
+
},
|
|
78
|
+
reload() {
|
|
79
|
+
if (binding.state().status === "failed") {
|
|
80
|
+
binding.retry();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
binding.dispose();
|
|
84
|
+
binding = create(query(), true);
|
|
85
|
+
binding.start();
|
|
86
|
+
},
|
|
87
|
+
loadMore() {
|
|
88
|
+
binding.loadMore();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export { createAsyncOptions };
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_description_content = require("./description-content-BLuIA4Pb.cjs");
|
|
3
|
+
const require_controller = require("./controller-BqMwv5AS.cjs");
|
|
4
|
+
const require_headless = require("./headless-BQH7sRXk.cjs");
|
|
5
|
+
const require_headless_props = require("./headless-props-Cf7LwO5W.cjs");
|
|
6
|
+
let solid_js_web = require("solid-js/web");
|
|
7
|
+
let _bevelo_core = require("@bevelo/core");
|
|
8
|
+
let solid_js = require("solid-js");
|
|
9
|
+
let _bevelo_core_primitives_autocomplete = require("@bevelo/core/primitives/autocomplete");
|
|
10
|
+
// src/autocomplete.tsx
|
|
11
|
+
var _tmpl$ = /*#__PURE__*/ (0, solid_js_web.template)(`<span aria-hidden=true>▾`);
|
|
12
|
+
var _tmpl$2 = /*#__PURE__*/ (0, solid_js_web.template)(`<div role=status data-part=status>`);
|
|
13
|
+
var _tmpl$3 = /*#__PURE__*/ (0, solid_js_web.template)(`<div role=separator data-part=separator>`);
|
|
14
|
+
var _tmpl$4 = /*#__PURE__*/ (0, solid_js_web.template)(`<div role=group data-part=group><div data-part=label data-scope=group>`);
|
|
15
|
+
/** The names the wrapper owns: everything else is an element prop. */
|
|
16
|
+
const OWNED = [
|
|
17
|
+
"value",
|
|
18
|
+
"defaultValue",
|
|
19
|
+
"query",
|
|
20
|
+
"options",
|
|
21
|
+
"items",
|
|
22
|
+
"emptyItems",
|
|
23
|
+
"label",
|
|
24
|
+
"showLabel",
|
|
25
|
+
"trigger",
|
|
26
|
+
"optionIcons",
|
|
27
|
+
"disabled",
|
|
28
|
+
"readOnly",
|
|
29
|
+
"loading",
|
|
30
|
+
"status",
|
|
31
|
+
"open",
|
|
32
|
+
"defaultOpen",
|
|
33
|
+
"onOpenChange",
|
|
34
|
+
"loop",
|
|
35
|
+
"submitOnSelect",
|
|
36
|
+
"onSubmit",
|
|
37
|
+
"onChange",
|
|
38
|
+
"onInput",
|
|
39
|
+
"onHighlight",
|
|
40
|
+
"filter",
|
|
41
|
+
"name",
|
|
42
|
+
"form",
|
|
43
|
+
"required",
|
|
44
|
+
"item",
|
|
45
|
+
"statusText",
|
|
46
|
+
"loadingText",
|
|
47
|
+
"emptyText",
|
|
48
|
+
"controller",
|
|
49
|
+
"id",
|
|
50
|
+
"idSeed",
|
|
51
|
+
"render",
|
|
52
|
+
"ref"
|
|
53
|
+
];
|
|
54
|
+
/** Stable empty default: a fresh array on every update would look like a change. */
|
|
55
|
+
const NO_OPTIONS = [];
|
|
56
|
+
/** A suggestion's icon: a description list, or already-shaped Solid nodes. */
|
|
57
|
+
function iconContent(icon) {
|
|
58
|
+
if (icon === void 0 || icon === null || typeof icon === "boolean") return null;
|
|
59
|
+
return require_description_content.renderDescriptionChildren(icon);
|
|
60
|
+
}
|
|
61
|
+
/** One suggestion row; the option is an accessor, so a filtered list keeps it live. */
|
|
62
|
+
function AutocompleteOptionRow(props) {
|
|
63
|
+
const address = { index: props.index };
|
|
64
|
+
const render = props.item;
|
|
65
|
+
if (render !== void 0) {
|
|
66
|
+
const state = {
|
|
67
|
+
get option() {
|
|
68
|
+
return props.option();
|
|
69
|
+
},
|
|
70
|
+
get index() {
|
|
71
|
+
return props.index;
|
|
72
|
+
},
|
|
73
|
+
get active() {
|
|
74
|
+
return props.active() === props.option();
|
|
75
|
+
},
|
|
76
|
+
get segments() {
|
|
77
|
+
return (0, _bevelo_core.matchSegments)(props.option(), props.text());
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
return require_headless.usePart(props.handle, "option", () => ({ children: render(state) }), void 0, address);
|
|
81
|
+
}
|
|
82
|
+
const icon = require_headless.usePart(props.handle, "option-icon", () => ({ children: iconContent(props.icon()) }), void 0, address);
|
|
83
|
+
const text = require_headless.usePart(props.handle, "option-label", () => ({ children: props.option() }), void 0, address);
|
|
84
|
+
return require_headless.usePart(props.handle, "option", () => ({ children: [icon, text] }), void 0, address);
|
|
85
|
+
}
|
|
86
|
+
function Autocomplete(props) {
|
|
87
|
+
const [local, element] = (0, solid_js.splitProps)(props, OWNED);
|
|
88
|
+
const [fieldText, setFieldText] = (0, solid_js.createSignal)(local.query ?? local.value ?? local.defaultValue ?? "");
|
|
89
|
+
const source = () => {
|
|
90
|
+
if (local.items === void 0) return void 0;
|
|
91
|
+
return fieldText().trim() === "" && local.emptyItems !== void 0 ? local.emptyItems : local.items;
|
|
92
|
+
};
|
|
93
|
+
const submit = (value) => {
|
|
94
|
+
local.onChange?.(value);
|
|
95
|
+
if (local.submitOnSelect === true && value !== "") local.onSubmit?.(value);
|
|
96
|
+
};
|
|
97
|
+
const options = () => {
|
|
98
|
+
const items = source();
|
|
99
|
+
return {
|
|
100
|
+
...local.value === void 0 ? {} : { value: local.value },
|
|
101
|
+
...local.defaultValue === void 0 ? {} : { defaultValue: local.defaultValue },
|
|
102
|
+
...local.query === void 0 ? {} : { query: local.query },
|
|
103
|
+
options: items === void 0 ? local.options ?? NO_OPTIONS : (0, _bevelo_core.autocompleteItemValues)(items),
|
|
104
|
+
label: local.label ?? "",
|
|
105
|
+
showLabel: local.showLabel === true,
|
|
106
|
+
trigger: local.trigger === true,
|
|
107
|
+
...local.optionIcons === void 0 ? {} : { optionIcons: local.optionIcons },
|
|
108
|
+
disabled: local.disabled === true,
|
|
109
|
+
loading: local.status === "loading" || local.loading === true,
|
|
110
|
+
...local.onChange === void 0 && local.submitOnSelect !== true ? {} : { onChange: submit },
|
|
111
|
+
...local.onInput === void 0 ? {} : { onInput: local.onInput },
|
|
112
|
+
...local.filter === void 0 ? {} : { filter: local.filter },
|
|
113
|
+
id: local.id ?? "",
|
|
114
|
+
...local.idSeed === void 0 ? {} : { idSeed: local.idSeed }
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
const handle = require_headless.usePrimitive(_bevelo_core_primitives_autocomplete.autocompletePrimitive, options);
|
|
118
|
+
const api = handle.api;
|
|
119
|
+
const visible = () => {
|
|
120
|
+
handle.revision();
|
|
121
|
+
return api.visible();
|
|
122
|
+
};
|
|
123
|
+
const text = () => {
|
|
124
|
+
handle.revision();
|
|
125
|
+
return api.text();
|
|
126
|
+
};
|
|
127
|
+
let syncing = false;
|
|
128
|
+
const syncOpen = () => {
|
|
129
|
+
const wanted = local.open;
|
|
130
|
+
if (wanted === void 0 || wanted === api.isOpen()) return;
|
|
131
|
+
syncing = true;
|
|
132
|
+
try {
|
|
133
|
+
if (wanted) api.open();
|
|
134
|
+
else api.close();
|
|
135
|
+
} finally {
|
|
136
|
+
syncing = false;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
if ((local.open ?? local.defaultOpen) === true && local.readOnly !== true) {
|
|
140
|
+
syncing = true;
|
|
141
|
+
api.open();
|
|
142
|
+
syncing = false;
|
|
143
|
+
}
|
|
144
|
+
(0, solid_js.createEffect)((0, solid_js.on)(() => local.open, syncOpen, { defer: true }));
|
|
145
|
+
const [active, setActive] = (0, solid_js.createSignal)(api.activeOption());
|
|
146
|
+
let lastOpen = api.isOpen();
|
|
147
|
+
(0, solid_js.onCleanup)(handle.instance.subscribeLive(() => {
|
|
148
|
+
if (local.readOnly === true && api.isOpen()) api.close();
|
|
149
|
+
setFieldText(api.text());
|
|
150
|
+
const open = api.isOpen();
|
|
151
|
+
if (open !== lastOpen) {
|
|
152
|
+
lastOpen = open;
|
|
153
|
+
if (!syncing) {
|
|
154
|
+
local.onOpenChange?.(open);
|
|
155
|
+
if (local.open !== void 0) queueMicrotask(syncOpen);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const current = api.activeOption();
|
|
159
|
+
if (current !== active()) {
|
|
160
|
+
setActive(() => current);
|
|
161
|
+
local.onHighlight?.(current, { index: current === void 0 ? -1 : api.visible().indexOf(current) });
|
|
162
|
+
}
|
|
163
|
+
}));
|
|
164
|
+
let rootNode;
|
|
165
|
+
let inputNode;
|
|
166
|
+
const setRoot = (node) => {
|
|
167
|
+
rootNode = node instanceof HTMLElement ? node : void 0;
|
|
168
|
+
};
|
|
169
|
+
const controller = {
|
|
170
|
+
...api,
|
|
171
|
+
focus: () => inputNode?.focus()
|
|
172
|
+
};
|
|
173
|
+
require_controller.useControllerAttach(local.controller, controller);
|
|
174
|
+
(0, solid_js.createEffect)(() => {
|
|
175
|
+
const node = rootNode;
|
|
176
|
+
if (local.ref === void 0) return;
|
|
177
|
+
local.ref(node === void 0 ? null : {
|
|
178
|
+
api: controller,
|
|
179
|
+
element: node
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
(0, solid_js.onCleanup)(() => {
|
|
183
|
+
local.ref?.(null);
|
|
184
|
+
});
|
|
185
|
+
const onFieldKeydown = (event) => {
|
|
186
|
+
if (event.key !== "ArrowDown" && event.key !== "ArrowUp") return;
|
|
187
|
+
if (local.readOnly === true) {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
event.stopPropagation();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (local.loop !== true || !api.isOpen()) return;
|
|
193
|
+
const step = (0, _bevelo_core.autocompleteLoopStep)(event.key, api.visible(), api.activeOption());
|
|
194
|
+
if (step === void 0) return;
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
event.stopPropagation();
|
|
197
|
+
api.move(step);
|
|
198
|
+
};
|
|
199
|
+
const setInput = (node) => {
|
|
200
|
+
inputNode?.removeEventListener("keydown", onFieldKeydown);
|
|
201
|
+
inputNode = node instanceof HTMLInputElement ? node : void 0;
|
|
202
|
+
inputNode?.addEventListener("keydown", onFieldKeydown);
|
|
203
|
+
};
|
|
204
|
+
(0, solid_js.onCleanup)(() => inputNode?.removeEventListener("keydown", onFieldKeydown));
|
|
205
|
+
const statusState = {
|
|
206
|
+
get loading() {
|
|
207
|
+
return local.status === "loading" || local.loading === true;
|
|
208
|
+
},
|
|
209
|
+
get count() {
|
|
210
|
+
return visible().length;
|
|
211
|
+
},
|
|
212
|
+
get query() {
|
|
213
|
+
return text();
|
|
214
|
+
},
|
|
215
|
+
get empty() {
|
|
216
|
+
return visible().length === 0;
|
|
217
|
+
},
|
|
218
|
+
get status() {
|
|
219
|
+
return local.status ?? (local.loading === true ? "loading" : "idle");
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const label = require_headless.usePart(handle, "label", () => ({ children: local.label ?? "" }));
|
|
223
|
+
const input = require_headless.usePart(handle, "input", () => ({
|
|
224
|
+
ref: setInput,
|
|
225
|
+
readOnly: local.readOnly === true ? true : void 0,
|
|
226
|
+
name: local.name,
|
|
227
|
+
form: local.form,
|
|
228
|
+
required: local.required === true ? true : void 0
|
|
229
|
+
}));
|
|
230
|
+
const trigger = require_headless.usePart(handle, "trigger", () => ({ children: _tmpl$() }));
|
|
231
|
+
const clear = require_headless.usePart(handle, "clear", () => ({ children: "×" }));
|
|
232
|
+
const statusText = local.statusText;
|
|
233
|
+
const statusRegion = statusText === void 0 ? null : (() => {
|
|
234
|
+
var _el$2 = _tmpl$2();
|
|
235
|
+
(0, solid_js_web.insert)(_el$2, () => statusText(statusState));
|
|
236
|
+
return _el$2;
|
|
237
|
+
})();
|
|
238
|
+
const loading = require_headless.usePart(handle, "loading", () => ({ children: local.loadingText ?? "Loading" }));
|
|
239
|
+
const emptyText = local.emptyText;
|
|
240
|
+
const empty = require_headless.usePart(handle, "empty", () => ({ children: require_headless_props.withState(emptyText, statusState) ?? "No suggestions" }));
|
|
241
|
+
const row = (option, index) => (0, solid_js_web.createComponent)(AutocompleteOptionRow, {
|
|
242
|
+
handle,
|
|
243
|
+
index,
|
|
244
|
+
option,
|
|
245
|
+
icon: () => local.optionIcons?.[option()],
|
|
246
|
+
get item() {
|
|
247
|
+
return local.item;
|
|
248
|
+
},
|
|
249
|
+
active,
|
|
250
|
+
text
|
|
251
|
+
});
|
|
252
|
+
const sections = () => {
|
|
253
|
+
const items = source();
|
|
254
|
+
return items === void 0 ? void 0 : (0, _bevelo_core.autocompleteSections)(items, visible());
|
|
255
|
+
};
|
|
256
|
+
const listbox = require_headless.usePart(handle, "listbox", () => ({ children: (0, solid_js_web.createComponent)(solid_js.Show, {
|
|
257
|
+
get when() {
|
|
258
|
+
return sections();
|
|
259
|
+
},
|
|
260
|
+
get fallback() {
|
|
261
|
+
return (0, solid_js_web.createComponent)(solid_js.Index, {
|
|
262
|
+
get each() {
|
|
263
|
+
return visible();
|
|
264
|
+
},
|
|
265
|
+
children: (option, index) => row(option, index)
|
|
266
|
+
});
|
|
267
|
+
},
|
|
268
|
+
children: (laidOut) => (0, solid_js_web.createComponent)(solid_js.For, {
|
|
269
|
+
get each() {
|
|
270
|
+
return laidOut();
|
|
271
|
+
},
|
|
272
|
+
children: (section, position) => {
|
|
273
|
+
if (section.kind === "row") return row(() => section.row.option, section.row.index);
|
|
274
|
+
if (section.kind === "separator") return _tmpl$3();
|
|
275
|
+
const id = `${api.listboxId()}-group-${position()}`;
|
|
276
|
+
return (() => {
|
|
277
|
+
var _el$4 = _tmpl$4(), _el$5 = _el$4.firstChild;
|
|
278
|
+
(0, solid_js_web.setAttribute)(_el$4, "aria-labelledby", id);
|
|
279
|
+
(0, solid_js_web.setAttribute)(_el$5, "id", id);
|
|
280
|
+
(0, solid_js_web.insert)(_el$5, () => section.label);
|
|
281
|
+
(0, solid_js_web.insert)(_el$4, (0, solid_js_web.createComponent)(solid_js.For, {
|
|
282
|
+
get each() {
|
|
283
|
+
return section.rows;
|
|
284
|
+
},
|
|
285
|
+
children: (entry) => row(() => entry.option, entry.index)
|
|
286
|
+
}), null);
|
|
287
|
+
return _el$4;
|
|
288
|
+
})();
|
|
289
|
+
}
|
|
290
|
+
})
|
|
291
|
+
}) }));
|
|
292
|
+
const popup = require_headless.usePart(handle, "popup", () => ({ children: [
|
|
293
|
+
loading,
|
|
294
|
+
empty,
|
|
295
|
+
listbox
|
|
296
|
+
] }));
|
|
297
|
+
return require_headless.usePart(handle, "root", () => ({
|
|
298
|
+
...element,
|
|
299
|
+
ref: setRoot,
|
|
300
|
+
children: [
|
|
301
|
+
label,
|
|
302
|
+
input,
|
|
303
|
+
trigger,
|
|
304
|
+
(0, solid_js_web.createComponent)(solid_js.Show, {
|
|
305
|
+
get when() {
|
|
306
|
+
return local.readOnly !== true;
|
|
307
|
+
},
|
|
308
|
+
children: clear
|
|
309
|
+
}),
|
|
310
|
+
statusRegion,
|
|
311
|
+
popup
|
|
312
|
+
]
|
|
313
|
+
}), local.render);
|
|
314
|
+
}
|
|
315
|
+
/** A controller for an `Autocomplete`: its api, once the field is mounted. */
|
|
316
|
+
function createAutocompleteController() {
|
|
317
|
+
return require_controller.createController();
|
|
318
|
+
}
|
|
319
|
+
exports.Autocomplete = Autocomplete;
|
|
320
|
+
exports.createAutocompleteController = createAutocompleteController;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { t as Controller } from "./controller-C8Z-wsos.cjs";
|
|
2
|
+
import { o as HeadlessPartRender } from "./headless-CoFdY0wl.cjs";
|
|
3
|
+
import { JSX } from "solid-js";
|
|
4
|
+
import { AutocompleteFilter, AutocompleteItem, Child, MatchSegment } from "@bevelo/core";
|
|
5
|
+
import { PrimitiveAutocompleteApi } from "@bevelo/core/primitives/autocomplete";
|
|
6
|
+
/** The primitive's api plus focusing the field. */
|
|
7
|
+
export interface AutocompleteApi extends PrimitiveAutocompleteApi {
|
|
8
|
+
/** Focuses the input. */
|
|
9
|
+
focus(): void;
|
|
10
|
+
}
|
|
11
|
+
/** What `ref` receives: the api plus the root element. */
|
|
12
|
+
export interface AutocompleteHandle {
|
|
13
|
+
readonly api: AutocompleteApi;
|
|
14
|
+
readonly element: HTMLElement;
|
|
15
|
+
}
|
|
16
|
+
/** The root's part state, as a render function sees it. */
|
|
17
|
+
export interface AutocompletePartState {
|
|
18
|
+
readonly open: boolean;
|
|
19
|
+
readonly disabled: boolean;
|
|
20
|
+
readonly state: "open" | "closed";
|
|
21
|
+
readonly text: string;
|
|
22
|
+
readonly value: string;
|
|
23
|
+
readonly active: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** One suggestion row's state, as `item` receives it. Its fields track. */
|
|
26
|
+
export interface AutocompleteItemState {
|
|
27
|
+
readonly option: string;
|
|
28
|
+
/** The row's index among the visible suggestions. */
|
|
29
|
+
readonly index: number;
|
|
30
|
+
readonly active: boolean;
|
|
31
|
+
/** `option` split around the field's text, so the matched run can be emphasized. */
|
|
32
|
+
readonly segments: readonly MatchSegment[];
|
|
33
|
+
}
|
|
34
|
+
/** The suggestions' state, as `statusText` and `emptyText` receive it. Its fields track. */
|
|
35
|
+
export interface AutocompleteStatusState {
|
|
36
|
+
/** Whether `status` is "loading" or `loading` is set. */
|
|
37
|
+
readonly loading: boolean;
|
|
38
|
+
/** How many suggestions are visible. */
|
|
39
|
+
readonly count: number;
|
|
40
|
+
/** The field's text. */
|
|
41
|
+
readonly query: string;
|
|
42
|
+
readonly empty: boolean;
|
|
43
|
+
/** The `status` prop, or "loading" / "idle" from `loading`. */
|
|
44
|
+
readonly status: string;
|
|
45
|
+
}
|
|
46
|
+
export type AutocompleteProps = {
|
|
47
|
+
/** A present value makes the field's value controlled. */
|
|
48
|
+
value?: string;
|
|
49
|
+
/** The value before the host controls it. */
|
|
50
|
+
defaultValue?: string;
|
|
51
|
+
/** A present value makes the field's text controlled. */
|
|
52
|
+
query?: string;
|
|
53
|
+
/** The suggestions, in the order the host wants them. */
|
|
54
|
+
options?: readonly string[];
|
|
55
|
+
/** Suggestions with separators and labelled groups; wins over `options`. */
|
|
56
|
+
items?: readonly AutocompleteItem[];
|
|
57
|
+
/** The suggestions while the field is blank, in `items`' shape. */
|
|
58
|
+
emptyItems?: readonly AutocompleteItem[];
|
|
59
|
+
/** The field's accessible name. */
|
|
60
|
+
label?: string;
|
|
61
|
+
/** Renders a visible `<label>` for the field. */
|
|
62
|
+
showLabel?: boolean;
|
|
63
|
+
/** Renders the trigger button that opens and closes the suggestions. */
|
|
64
|
+
trigger?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Icons for suggestions, keyed by the suggestion's text. A `Child` is the
|
|
67
|
+
* description shape the view-based component took; Solid nodes also render,
|
|
68
|
+
* which is what a host porting JSX expects.
|
|
69
|
+
*/
|
|
70
|
+
optionIcons?: Readonly<Record<string, Child>>;
|
|
71
|
+
/** Disables typing, opening and selection. */
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
/** The field shows its value but the popup never opens, clears or commits. */
|
|
74
|
+
readOnly?: boolean;
|
|
75
|
+
/** Shows a loading status instead of suggestions. */
|
|
76
|
+
loading?: boolean;
|
|
77
|
+
/** Where the suggestions stand ("idle", "loading", "ready", "error" or the host's own word); "loading" sets `loading`. */
|
|
78
|
+
status?: string;
|
|
79
|
+
/** Whether the popup is open. A present value is restored after a gesture changes it. */
|
|
80
|
+
open?: boolean;
|
|
81
|
+
/** Opens the popup on mount. */
|
|
82
|
+
defaultOpen?: boolean;
|
|
83
|
+
/** Reports every open and close. */
|
|
84
|
+
onOpenChange?: (open: boolean) => void;
|
|
85
|
+
/** ArrowDown on the last suggestion goes to the first, ArrowUp on the first to the last. */
|
|
86
|
+
loop?: boolean;
|
|
87
|
+
/** Calls `onSubmit` after a suggestion is chosen. */
|
|
88
|
+
submitOnSelect?: boolean;
|
|
89
|
+
/** Receives the chosen suggestion when `submitOnSelect` is set. */
|
|
90
|
+
onSubmit?: (value: string) => void;
|
|
91
|
+
/** Reports a committed value. */
|
|
92
|
+
onChange?: (value: string) => void;
|
|
93
|
+
/** Reports every keystroke, including text the host controls. */
|
|
94
|
+
onInput?: (query: string) => void;
|
|
95
|
+
/** Reports the highlighted suggestion and its index among the visible ones. */
|
|
96
|
+
onHighlight?: (value: string | undefined, details: {
|
|
97
|
+
readonly index: number;
|
|
98
|
+
}) => void;
|
|
99
|
+
/** Overrides the case-insensitive substring match. */
|
|
100
|
+
filter?: AutocompleteFilter;
|
|
101
|
+
/** The input's form field name. */
|
|
102
|
+
name?: string;
|
|
103
|
+
/** Id of a form elsewhere on the page that the input belongs to. */
|
|
104
|
+
form?: string;
|
|
105
|
+
required?: boolean;
|
|
106
|
+
/** Renders a suggestion's content in place of its icon and text. */
|
|
107
|
+
item?: (state: AutocompleteItemState) => JSX.Element;
|
|
108
|
+
/** Rendered in a `div[role=status][data-part=status]` region beside the field. */
|
|
109
|
+
statusText?: (state: AutocompleteStatusState) => JSX.Element;
|
|
110
|
+
/** Shown while loading. Defaults to "Loading". */
|
|
111
|
+
loadingText?: JSX.Element;
|
|
112
|
+
/** Shown when no suggestion matches. Defaults to "No suggestions". */
|
|
113
|
+
emptyText?: JSX.Element | ((state: AutocompleteStatusState) => JSX.Element);
|
|
114
|
+
/** Receives the api while mounted; create one with `createAutocompleteController()`. */
|
|
115
|
+
controller?: Controller<AutocompleteApi>;
|
|
116
|
+
/** Id prefix for the field, popup and listbox. */
|
|
117
|
+
id?: string;
|
|
118
|
+
/** The adapter's stable id seed; `id` wins when both are given. */
|
|
119
|
+
idSeed?: string;
|
|
120
|
+
/** Solid's class spelling. */
|
|
121
|
+
class?: string;
|
|
122
|
+
/** The React spelling, accepted for hosts porting a wrapper. */
|
|
123
|
+
className?: string;
|
|
124
|
+
style?: JSX.CSSProperties | string;
|
|
125
|
+
/** Replace the root's element. It receives the part's props and state. */
|
|
126
|
+
render?: HeadlessPartRender<AutocompletePartState>;
|
|
127
|
+
/** The root element, plus the api once it exists. */
|
|
128
|
+
ref?: (handle: AutocompleteHandle | null) => void;
|
|
129
|
+
readonly [key: `data-${string}`]: string | number | boolean | undefined;
|
|
130
|
+
readonly [key: `aria-${string}`]: string | number | boolean | undefined;
|
|
131
|
+
};
|
|
132
|
+
export declare function Autocomplete(props: AutocompleteProps): JSX.Element;
|
|
133
|
+
/** A controller for an `Autocomplete`: its api, once the field is mounted. */
|
|
134
|
+
export declare function createAutocompleteController(): Controller<AutocompleteApi>;
|
|
135
|
+
export type { AutocompleteFilter, AutocompleteItem, MatchSegment };
|