From 0422f5f56b8d86f5b60efd773589d3f204e8f3bb Mon Sep 17 00:00:00 2001 From: Hunter Johnston <64506580+huntabyte@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:27:56 -0500 Subject: [PATCH] fix: export `Menubar.Portal` (#955) --- .changeset/stupid-candles-do.md | 5 + .../bits-ui/src/lib/bits/menubar/exports.ts | 1 + .../lib/components/demos/menubar-demo.svelte | 351 ++++++++++-------- 3 files changed, 195 insertions(+), 162 deletions(-) create mode 100644 .changeset/stupid-candles-do.md diff --git a/.changeset/stupid-candles-do.md b/.changeset/stupid-candles-do.md new file mode 100644 index 000000000..94fa0449d --- /dev/null +++ b/.changeset/stupid-candles-do.md @@ -0,0 +1,5 @@ +--- +"bits-ui": patch +--- + +fix: export `Portal` from `Menubar` namespace diff --git a/packages/bits-ui/src/lib/bits/menubar/exports.ts b/packages/bits-ui/src/lib/bits/menubar/exports.ts index a2d9d7036..0f79e57a9 100644 --- a/packages/bits-ui/src/lib/bits/menubar/exports.ts +++ b/packages/bits-ui/src/lib/bits/menubar/exports.ts @@ -15,6 +15,7 @@ export { default as SubContentStatic } from "$lib/bits/menu/components/menu-sub- export { default as SubTrigger } from "$lib/bits/menu/components/menu-sub-trigger.svelte"; export { default as RadioGroup } from "$lib/bits/menu/components/menu-radio-group.svelte"; export { default as CheckboxItem } from "$lib/bits/menu/components/menu-checkbox-item.svelte"; +export { default as Portal } from "$lib/bits/utilities/portal/portal.svelte"; export type { MenubarRootProps as RootProps, diff --git a/sites/docs/src/lib/components/demos/menubar-demo.svelte b/sites/docs/src/lib/components/demos/menubar-demo.svelte index dab1f3afb..385f9fee5 100644 --- a/sites/docs/src/lib/components/demos/menubar-demo.svelte +++ b/sites/docs/src/lib/components/demos/menubar-demo.svelte @@ -71,198 +71,225 @@ - View + File - - {#each grids as grid} - - {#snippet children({ checked })} - {grid.label} grid -
- {#if checked} - - {:else} - - {/if} -
- {/snippet} -
- {/each} - - - {#each views as view} - + + {#each grids as grid} + {#snippet children({ checked })} - {view.label} -
+ {grid.label} grid +
{#if checked} - + + {:else} + {/if}
{/snippet} - + {/each} - - + + + {#each views as view} + + {#snippet children({ checked })} + {view.label} +
+ {#if checked} + + {/if} +
+ {/snippet} +
+ {/each} +
+ + + Edit - - Undo - Redo + + - - - - Find -
- -
-
- + - Search the web - - Find... + + + - Find Next - Find Previous + +
+ + - - - - Cut - Copy - Paste -
+ + Search the web + + + + Find... + + + Find Next + + + Find Previous + + + + + + Cut + + + Copy + + + Paste + +
+ View - - {#each showConfigs as config} - + + + {#each showConfigs as config} + + {#snippet children({ checked })} + {config.label} +
+ {#if checked} + + {:else} + + {/if} +
+ {/snippet} +
+ {/each} + + - {#snippet children({ checked })} - {config.label} - {#if checked} - - {:else} -
- -
- {/if} - {/snippet} -
- {/each} - - Reload - Force Reload - - Toggle Fullscreen - - Hide Sidebar -
+ Reload + + + Force Reload + + + + Toggle Fullscreen + + + + Hide Sidebar + + +
Profiles - - - {#each profiles as profile} - - {#snippet children({ checked })} - {profile.label} - {#if checked} - - {/if} - {/snippet} - - {/each} - - - Edit... - - Add Profile... + + - + + {#each profiles as profile} + + {#snippet children({ checked })} + {profile.label} +
+ {#if checked} + + {/if} +
+ {/snippet} +
+ {/each} +
+ + Edit... + + Add Profile... +
+