From e6cecb35b203346fb60c31b3a8b2efbadb254a9a Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Wed, 8 Nov 2023 20:35:06 -0500 Subject: [PATCH] chore: update id slot props --- src/lib/bits/accordion/components/Accordion.svelte | 1 - .../bits/alert-dialog/components/AlertDialog.svelte | 12 +++++++++++- src/lib/bits/dialog/components/Dialog.svelte | 12 +++++++++++- .../dropdown-menu/components/DropdownMenu.svelte | 9 ++++++++- .../dropdown-menu/components/DropdownMenuSub.svelte | 8 +++++++- .../bits/link-preview/components/LinkPreview.svelte | 8 +++++++- src/lib/bits/menubar/components/Menubar.svelte | 9 +++++++-- src/lib/bits/menubar/components/MenubarMenu.svelte | 10 ++++++++-- src/lib/bits/menubar/components/MenubarSub.svelte | 8 +++++++- src/lib/bits/popover/components/Popover.svelte | 8 +++++++- src/lib/bits/select/components/Select.svelte | 12 +++++++++++- src/lib/bits/tooltip/components/Tooltip.svelte | 8 +++++++- 12 files changed, 91 insertions(+), 14 deletions(-) diff --git a/src/lib/bits/accordion/components/Accordion.svelte b/src/lib/bits/accordion/components/Accordion.svelte index 366ac1c9d..d8a198c59 100644 --- a/src/lib/bits/accordion/components/Accordion.svelte +++ b/src/lib/bits/accordion/components/Accordion.svelte @@ -21,7 +21,6 @@ multiple, disabled, defaultValue: value, - onValueChange: (({ next }: { next: $$Props["value"] }) => { if (value !== next) { onValueChange?.(next); diff --git a/src/lib/bits/alert-dialog/components/AlertDialog.svelte b/src/lib/bits/alert-dialog/components/AlertDialog.svelte index d38596d89..ca21a0b37 100644 --- a/src/lib/bits/alert-dialog/components/AlertDialog.svelte +++ b/src/lib/bits/alert-dialog/components/AlertDialog.svelte @@ -1,4 +1,5 @@ - + diff --git a/src/lib/bits/dialog/components/Dialog.svelte b/src/lib/bits/dialog/components/Dialog.svelte index 50af95b67..b00aa7ec8 100644 --- a/src/lib/bits/dialog/components/Dialog.svelte +++ b/src/lib/bits/dialog/components/Dialog.svelte @@ -1,4 +1,5 @@ - + diff --git a/src/lib/bits/dropdown-menu/components/DropdownMenu.svelte b/src/lib/bits/dropdown-menu/components/DropdownMenu.svelte index c4748b075..46b45730d 100644 --- a/src/lib/bits/dropdown-menu/components/DropdownMenu.svelte +++ b/src/lib/bits/dropdown-menu/components/DropdownMenu.svelte @@ -1,6 +1,7 @@ - + diff --git a/src/lib/bits/dropdown-menu/components/DropdownMenuSub.svelte b/src/lib/bits/dropdown-menu/components/DropdownMenuSub.svelte index d635ae8b0..27fb9bf19 100644 --- a/src/lib/bits/dropdown-menu/components/DropdownMenuSub.svelte +++ b/src/lib/bits/dropdown-menu/components/DropdownMenuSub.svelte @@ -1,4 +1,5 @@ - + diff --git a/src/lib/bits/link-preview/components/LinkPreview.svelte b/src/lib/bits/link-preview/components/LinkPreview.svelte index 865f3a96c..1686fc6e8 100644 --- a/src/lib/bits/link-preview/components/LinkPreview.svelte +++ b/src/lib/bits/link-preview/components/LinkPreview.svelte @@ -1,4 +1,5 @@ - + diff --git a/src/lib/bits/menubar/components/Menubar.svelte b/src/lib/bits/menubar/components/Menubar.svelte index 563206b39..850cb8cac 100644 --- a/src/lib/bits/menubar/components/Menubar.svelte +++ b/src/lib/bits/menubar/components/Menubar.svelte @@ -2,6 +2,7 @@ import { melt } from "@melt-ui/svelte"; import { setCtx, getAttrs } from "../ctx.js"; import type { Props } from "../types.js"; + import { derived } from "svelte/store"; type $$Props = Props; @@ -15,6 +16,10 @@ ids } = setCtx({ loop, closeOnEscape }); + const idValues = derived([ids.menubar], ([$menubarId]) => ({ + menubar: $menubarId + })); + $: updateOption("loop", loop); $: updateOption("closeOnEscape", closeOnEscape); $: builder = $menubar; @@ -22,9 +27,9 @@ {#if asChild} - + {:else}
- +
{/if} diff --git a/src/lib/bits/menubar/components/MenubarMenu.svelte b/src/lib/bits/menubar/components/MenubarMenu.svelte index e255fdedf..53ebd5af1 100644 --- a/src/lib/bits/menubar/components/MenubarMenu.svelte +++ b/src/lib/bits/menubar/components/MenubarMenu.svelte @@ -1,6 +1,7 @@ - + diff --git a/src/lib/bits/popover/components/Popover.svelte b/src/lib/bits/popover/components/Popover.svelte index 658dcbfcf..234664118 100644 --- a/src/lib/bits/popover/components/Popover.svelte +++ b/src/lib/bits/popover/components/Popover.svelte @@ -1,6 +1,7 @@ - + diff --git a/src/lib/bits/select/components/Select.svelte b/src/lib/bits/select/components/Select.svelte index 76673fdeb..180a4055a 100644 --- a/src/lib/bits/select/components/Select.svelte +++ b/src/lib/bits/select/components/Select.svelte @@ -1,4 +1,5 @@ - + diff --git a/src/lib/bits/tooltip/components/Tooltip.svelte b/src/lib/bits/tooltip/components/Tooltip.svelte index 27b22eb5a..ba33b0314 100644 --- a/src/lib/bits/tooltip/components/Tooltip.svelte +++ b/src/lib/bits/tooltip/components/Tooltip.svelte @@ -1,4 +1,5 @@ - +