{open}
+ + +From b8f256c7fac0d9762c80b28f74eb89da4004fcd4 Mon Sep 17 00:00:00 2001 From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com> Date: Fri, 27 Sep 2024 13:19:11 -0400 Subject: [PATCH] next: more things (#680) --- .../context-menu-content-static.svelte | 4 +- .../components/context-menu-content.svelte | 16 +- .../date-field/components/date-field.svelte | 4 +- .../lib/bits/date-field/date-field.svelte.ts | 8 +- .../bits-ui/src/lib/bits/date-field/types.ts | 7 +- .../date-picker/components/date-picker.svelte | 6 +- .../components/date-range-field.svelte | 4 +- .../date-range-field.svelte.ts | 8 +- .../src/lib/bits/date-range-field/types.ts | 2 +- .../components/date-range-picker.svelte | 6 +- .../dropdown-menu-content-static.svelte | 4 +- .../components/dropdown-menu-content.svelte | 16 +- .../link-preview-content-static.svelte | 4 +- .../components/link-preview-content.svelte | 16 +- .../bits/link-preview/link-preview.svelte.ts | 2 + .../src/lib/bits/link-preview/types.ts | 14 +- .../components/listbox-content-static.svelte | 4 +- .../listbox/components/listbox-content.svelte | 4 +- .../src/lib/bits/listbox/listbox.svelte.ts | 2 + .../bits-ui/src/lib/bits/listbox/types.ts | 14 +- .../components/menu-content-static.svelte | 4 +- .../bits/menu/components/menu-content.svelte | 11 +- .../components/menu-sub-content-static.svelte | 9 +- .../menu/components/menu-sub-content.svelte | 9 +- .../bits-ui/src/lib/bits/menu/menu.svelte.ts | 2 + packages/bits-ui/src/lib/bits/menu/types.ts | 25 +- .../components/popover-content-static.svelte | 4 +- .../popover/components/popover-content.svelte | 13 +- .../src/lib/bits/popover/popover.svelte.ts | 2 + .../bits-ui/src/lib/bits/popover/types.ts | 16 +- .../components/tooltip-content-static.svelte | 4 +- .../tooltip/components/tooltip-content.svelte | 13 +- .../src/lib/bits/tooltip/tooltip.svelte.ts | 2 + .../bits-ui/src/lib/bits/tooltip/types.ts | 14 +- .../floating-svelte/floating-utils.svelte.ts | 10 + .../accordion-single-force-mount-test.svelte | 55 +++++ .../src/tests/accordion/accordion.test.ts | 38 ++- .../alert-dialog-force-mount-test.svelte | 105 +++++++++ .../tests/alert-dialog/alert-dialog.test.ts | 37 ++- .../collapsible-force-mount-test.svelte | 34 +++ .../src/tests/collapsible/collapsible.test.ts | 34 ++- .../combobox/combobox-force-mount-test.svelte | 140 +++++++++++ .../src/tests/combobox/combobox.test.ts | 36 ++- .../context-menu-force-mount-test.svelte | 213 +++++++++++++++++ .../tests/context-menu/context-menu.test.ts | 31 ++- .../src/tests/date-field/date-field.test.ts | 2 +- .../dropdown-menu-force-mount-test.svelte | 219 ++++++++++++++++++ .../tests/dropdown-menu/dropdown-menu.test.ts | 36 ++- .../link-preview-force-mount-test.svelte | 61 +++++ .../tests/link-preview/link-preview.test.ts | 29 ++- .../listbox/listbox-force-mount-test.svelte | 120 ++++++++++ .../tests/listbox/listbox-multi-test.svelte | 2 +- .../src/tests/listbox/listbox-test.svelte | 14 +- .../bits-ui/src/tests/listbox/listbox.test.ts | 40 +++- .../popover/popover-force-mount-test.svelte | 53 +++++ .../bits-ui/src/tests/popover/popover.test.ts | 29 ++- .../tooltip/tooltip-force-mount-test.svelte | 58 +++++ .../bits-ui/src/tests/tooltip/tooltip.test.ts | 38 ++- sites/docs/content/components/accordion.md | 2 +- sites/docs/content/components/aspect-ratio.md | 2 +- sites/docs/content/components/button.md | 2 +- .../content/components/date-range-field.md | 1 - sites/docs/content/components/tabs.md | 87 +++++-- sites/docs/content/components/toggle-group.md | 73 ++++-- sites/docs/content/components/toolbar.md | 106 ++++++++- .../components/component-preview-v2.svelte | 13 +- .../lib/components/demo-code-container.svelte | 21 +- .../src/lib/components/demo-code-tabs.svelte | 34 ++- .../{accordion.ts => accordion.api.ts} | 0 .../{alert-dialog.ts => alert-dialog.api.ts} | 0 .../{aspect-ratio.ts => aspect-ratio.api.ts} | 0 .../{avatar.ts => avatar.api.ts} | 0 .../{button.ts => button.api.ts} | 0 .../{calendar.ts => calendar.api.ts} | 0 .../{checkbox.ts => checkbox.api.ts} | 1 - .../{collapsible.ts => collapsible.api.ts} | 0 .../{combobox.ts => combobox.api.ts} | 0 .../{command.ts => command.api.ts} | 0 .../{context-menu.ts => context-menu.api.ts} | 2 +- .../{date-field.ts => date-field.api.ts} | 2 +- .../{date-picker.ts => date-picker.api.ts} | 13 +- ...range-field.ts => date-range-field.api.ts} | 7 +- ...nge-picker.ts => date-range-picker.api.ts} | 14 +- .../{dialog.ts => dialog.api.ts} | 0 ...{dropdown-menu.ts => dropdown-menu.api.ts} | 2 +- .../src/lib/content/api-reference/index.ts | 76 +++--- .../api-reference/{label.ts => label.api.ts} | 0 .../{link-preview.ts => link-preview.api.ts} | 0 .../{listbox.ts => listbox.api.ts} | 0 .../api-reference/{menu.ts => menu.api.ts} | 0 .../{menubar.ts => menubar.api.ts} | 2 +- ...igation-menu.ts => navigation-menu.api.ts} | 0 .../{pagination.ts => pagination.api.ts} | 0 .../{pin-input.ts => pin-input.api.ts} | 0 .../{popover.ts => popover.api.ts} | 0 .../{progress.ts => progress.api.ts} | 0 .../{radio-group.ts => radio-group.api.ts} | 0 ...ange-calendar.ts => range-calendar.api.ts} | 4 +- .../{scroll-area.ts => scroll-area.api.ts} | 0 .../{select.ts => select.api.ts} | 0 .../{separator.ts => separator.api.ts} | 0 .../{slider.ts => slider.api.ts} | 1 - .../{switch.ts => switch.api.ts} | 0 .../api-reference/{tabs.ts => tabs.api.ts} | 0 .../{toggle-group.ts => toggle-group.api.ts} | 2 - .../{toggle.ts => toggle.api.ts} | 0 .../{toolbar.ts => toolbar.api.ts} | 0 .../{tooltip.ts => tooltip.api.ts} | 0 108 files changed, 1890 insertions(+), 284 deletions(-) create mode 100644 packages/bits-ui/src/tests/accordion/accordion-single-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/alert-dialog/alert-dialog-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/collapsible/collapsible-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/combobox/combobox-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/context-menu/context-menu-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/dropdown-menu/dropdown-menu-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/link-preview/link-preview-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/listbox/listbox-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/popover/popover-force-mount-test.svelte create mode 100644 packages/bits-ui/src/tests/tooltip/tooltip-force-mount-test.svelte rename sites/docs/src/lib/content/api-reference/{accordion.ts => accordion.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{alert-dialog.ts => alert-dialog.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{aspect-ratio.ts => aspect-ratio.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{avatar.ts => avatar.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{button.ts => button.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{calendar.ts => calendar.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{checkbox.ts => checkbox.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{collapsible.ts => collapsible.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{combobox.ts => combobox.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{command.ts => command.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{context-menu.ts => context-menu.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{date-field.ts => date-field.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{date-picker.ts => date-picker.api.ts} (94%) rename sites/docs/src/lib/content/api-reference/{date-range-field.ts => date-range-field.api.ts} (96%) rename sites/docs/src/lib/content/api-reference/{date-range-picker.ts => date-range-picker.api.ts} (93%) rename sites/docs/src/lib/content/api-reference/{dialog.ts => dialog.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{dropdown-menu.ts => dropdown-menu.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{label.ts => label.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{link-preview.ts => link-preview.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{listbox.ts => listbox.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{menu.ts => menu.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{menubar.ts => menubar.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{navigation-menu.ts => navigation-menu.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{pagination.ts => pagination.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{pin-input.ts => pin-input.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{popover.ts => popover.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{progress.ts => progress.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{radio-group.ts => radio-group.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{range-calendar.ts => range-calendar.api.ts} (97%) rename sites/docs/src/lib/content/api-reference/{scroll-area.ts => scroll-area.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{select.ts => select.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{separator.ts => separator.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{slider.ts => slider.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{switch.ts => switch.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{tabs.ts => tabs.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{toggle-group.ts => toggle-group.api.ts} (99%) rename sites/docs/src/lib/content/api-reference/{toggle.ts => toggle.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{toolbar.ts => toolbar.api.ts} (100%) rename sites/docs/src/lib/content/api-reference/{tooltip.ts => tooltip.api.ts} (100%) diff --git a/packages/bits-ui/src/lib/bits/context-menu/components/context-menu-content-static.svelte b/packages/bits-ui/src/lib/bits/context-menu/components/context-menu-content-static.svelte index 1b0bf1118..9e4a7672e 100644 --- a/packages/bits-ui/src/lib/bits/context-menu/components/context-menu-content-static.svelte +++ b/packages/bits-ui/src/lib/bits/context-menu/components/context-menu-content-static.svelte @@ -85,10 +85,10 @@ > {#snippet popper({ props })} {#if child} - {@render child({ props })} + {@render child({ props, ...contentState.snippetProps })} {:else}
{open}
+ + +{open}
+