Skip to content

Commit

Permalink
closer closer closer
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed May 11, 2024
1 parent b3e5683 commit b1f6cf6
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 112 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script lang="ts">
import { melt } from "@melt-ui/svelte";
import { getCtx, updatePositioning } from "../ctx.js";
import type { ContentEvents, ContentProps } from "../index.js";
import type { ContentProps } from "../index.js";
import type { Transition } from "$lib/internal/types.js";
import { createDispatcher } from "$lib/internal/events.js";
type T = $$Generic<Transition>;
type In = $$Generic<Transition>;
type Out = $$Generic<Transition>;
type $$Props = ContentProps<T, In, Out>;
type $$Events = ContentEvents;
export let transition: $$Props["transition"] = undefined;
export let transitionConfig: $$Props["transitionConfig"] = undefined;
Expand Down
12 changes: 0 additions & 12 deletions packages/bits-ui/src/lib/bits/context-menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,19 @@ export { default as RadioGroup } from "$lib/bits/menu/components/menu-radio-grou
export { default as SubContent } from "$lib/bits/menu/components/menu-sub-content.svelte";
export { default as SubTrigger } from "$lib/bits/menu/components/menu-sub-trigger.svelte";
export { default as CheckboxItem } from "$lib/bits/menu/components/menu-checkbox-item.svelte";
export { default as RadioIndicator } from "$lib/bits/menu/components/menu-radio-indicator.svelte";
export { default as CheckboxIndicator } from "$lib/bits/menu/components/menu-checkbox-indicator.svelte";

export type {
ContextMenuArrowProps as ArrowProps,
ContextMenuCheckboxIndicatorProps as CheckboxIndicatorProps,
ContextMenuCheckboxItemEvents as CheckboxItemEvents,
ContextMenuCheckboxItemProps as CheckboxItemProps,
ContextMenuContentEvents as ContentEvents,
ContextMenuGroupProps as GroupProps,
ContextMenuItemEvents as ItemEvents,
ContextMenuItemProps as ItemProps,
ContextMenuLabelProps as LabelProps,
ContextMenuProps as Props,
ContextMenuRadioGroupProps as RadioGroupProps,
ContextMenuRadioIndicatorProps as RadioIndicatorProps,
ContextMenuRadioItemEvents as RadioItemEvents,
ContextMenuRadioItemProps as RadioItemProps,
ContextMenuSeparatorProps as SeparatorProps,
ContextMenuSubContentEvents as SubContentEvents,
ContextMenuSubContentProps as SubContentProps,
ContextMenuSubProps as SubProps,
ContextMenuSubTriggerEvents as SubTriggerEvents,
ContextMenuSubTriggerProps as SubTriggerProps,
ContextMenuTriggerEvents as TriggerEvents,
ContextMenuTriggerProps as TriggerProps,
ContextMenuContentProps as ContentProps,
} from "./types.js";
16 changes: 2 additions & 14 deletions packages/bits-ui/src/lib/bits/context-menu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,17 @@ import type { FloatingProps } from "$lib/bits/floating/_types.js";

export type {
ArrowProps as ContextMenuArrowProps,
CheckboxIndicatorProps as ContextMenuCheckboxIndicatorProps,
CheckboxItemEvents as ContextMenuCheckboxItemEvents,
CheckboxItemProps as ContextMenuCheckboxItemProps,
ContentEvents as ContextMenuContentEvents,
GroupProps as ContextMenuGroupProps,
ItemEvents as ContextMenuItemEvents,
ItemProps as ContextMenuItemProps,
LabelProps as ContextMenuLabelProps,
Props as ContextMenuProps,
RootProps as ContextMenuProps,
RadioGroupProps as ContextMenuRadioGroupProps,
RadioIndicatorProps as ContextMenuRadioIndicatorProps,
RadioItemEvents as ContextMenuRadioItemEvents,
RadioItemProps as ContextMenuRadioItemProps,
SeparatorProps as ContextMenuSeparatorProps,
SubContentEvents as ContextMenuSubContentEvents,
SubContentProps as ContextMenuSubContentProps,
SubProps as ContextMenuSubProps,
SubTriggerEvents as ContextMenuSubTriggerEvents,
SubTriggerProps as ContextMenuSubTriggerProps,
ContextTriggerEvents as ContextMenuTriggerEvents,
ContextTriggerProps as ContextMenuTriggerProps,
} from "$lib/bits/menu/index.js";

type ContextFloatingProps = Omit<FloatingProps, "sameWidth" | "side" | "sideOffset" | "align">;
Expand All @@ -48,14 +38,12 @@ export type ContextMenuContentProps<
export type {
MenuTriggerPropsWithoutHTML as ContextMenuTriggerPropsWithoutHTML,
MenuArrowPropsWithoutHTML as ContextMenuArrowPropsWithoutHTML,
MenuCheckboxIndicatorPropsWithoutHTML as ContextMenuCheckboxIndicatorPropsWithoutHTML,
MenuCheckboxItemPropsWithoutHTML as ContextMenuCheckboxItemPropsWithoutHTML,
MenuGroupPropsWithoutHTML as ContextMenuGroupPropsWithoutHTML,
MenuItemPropsWithoutHTML as ContextMenuItemPropsWithoutHTML,
MenuLabelPropsWithoutHTML as ContextMenuLabelPropsWithoutHTML,
MenuPropsWithoutHTML as ContextMenuPropsWithoutHTML,
MenuRootPropsWithoutHTML as ContextMenuPropsWithoutHTML,
MenuRadioGroupPropsWithoutHTML as ContextMenuRadioGroupPropsWithoutHTML,
MenuRadioIndicatorPropsWithoutHTML as ContextMenuRadioIndicatorPropsWithoutHTML,
MenuRadioItemPropsWithoutHTML as ContextMenuRadioItemPropsWithoutHTML,
MenuSeparatorPropsWithoutHTML as ContextMenuSeparatorPropsWithoutHTML,
MenuSubContentPropsWithoutHTML as ContextMenuSubContentPropsWithoutHTML,
Expand Down
15 changes: 2 additions & 13 deletions packages/bits-ui/src/lib/bits/dropdown-menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,20 @@ export { default as RadioGroup } from "$lib/bits/menu/components/menu-radio-grou
export { default as SubContent } from "$lib/bits/menu/components/menu-sub-content.svelte";
export { default as SubTrigger } from "$lib/bits/menu/components/menu-sub-trigger.svelte";
export { default as CheckboxItem } from "$lib/bits/menu/components/menu-checkbox-item.svelte";
export { default as CheckboxIndicator } from "$lib/bits/menu/components/menu-checkbox-indicator.svelte";
export { default as RadioIndicator } from "$lib/bits/menu/components/menu-radio-indicator.svelte";

export type {
DropdownMenuArrowProps as ArrowProps,
DropdownMenuCheckboxIndicatorProps as CheckboxIndicatorProps,
DropdownMenuCheckboxItemEvents as CheckboxItemEvents,
DropdownMenuCheckboxItemProps as CheckboxItemProps,
DropdownMenuContentEvents as ContentEvents,
DropdownMenuContentProps as ContentProps,
DropdownMenuGroupProps as GroupProps,
DropdownMenuItemEvents as ItemEvents,
DropdownMenuItemProps as ItemProps,
DropdownMenuLabelProps as LabelProps,
DropdownMenuProps as Props,
DropdownMenuRootProps as RootProps,
DropdownMenuRadioGroupProps as RadioGroupProps,
DropdownMenuRadioIndicatorProps as RadioIndicatorProps,
DropdownMenuRadioItemEvents as RadioItemEvents,
DropdownMenuRadioItemProps as RadioItemProps,
DropdownMenuSeparatorProps as SeparatorProps,
DropdownMenuSubContentEvents as SubContentEvents,
DropdownMenuSubContentProps as SubContentProps,
DropdownMenuSubProps as SubProps,
DropdownMenuSubTriggerEvents as SubTriggerEvents,
DropdownMenuSubTriggerProps as SubTriggerProps,
DropdownMenuTriggerEvents as DropdownTriggerEvents,
DropdownMenuTriggerProps as DropdownTriggerProps,
DropdownMenuTriggerProps as TriggerProps,
} from "./types.js";
17 changes: 3 additions & 14 deletions packages/bits-ui/src/lib/bits/dropdown-menu/types.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,29 @@
export type {
ArrowProps as DropdownMenuArrowProps,
CheckboxIndicatorProps as DropdownMenuCheckboxIndicatorProps,
CheckboxItemEvents as DropdownMenuCheckboxItemEvents,
CheckboxItemProps as DropdownMenuCheckboxItemProps,
ContentEvents as DropdownMenuContentEvents,
ContentProps as DropdownMenuContentProps,
GroupProps as DropdownMenuGroupProps,
ItemEvents as DropdownMenuItemEvents,
ItemProps as DropdownMenuItemProps,
LabelProps as DropdownMenuLabelProps,
Props as DropdownMenuProps,
RootProps as DropdownMenuRootProps,
RadioGroupProps as DropdownMenuRadioGroupProps,
RadioIndicatorProps as DropdownMenuRadioIndicatorProps,
RadioItemEvents as DropdownMenuRadioItemEvents,
RadioItemProps as DropdownMenuRadioItemProps,
SeparatorProps as DropdownMenuSeparatorProps,
SubContentEvents as DropdownMenuSubContentEvents,
SubContentProps as DropdownMenuSubContentProps,
SubProps as DropdownMenuSubProps,
SubTriggerEvents as DropdownMenuSubTriggerEvents,
SubTriggerProps as DropdownMenuSubTriggerProps,
DropdownTriggerEvents as DropdownMenuTriggerEvents,
DropdownTriggerProps as DropdownMenuTriggerProps,
TriggerProps as DropdownMenuTriggerProps,
} from "$lib/bits/menu/index.js";

export type {
MenuPropsWithoutHTML as DropdownMenuPropsWithoutHTML,
MenuRootPropsWithoutHTML as DropdownMenuPropsWithoutHTML,
MenuArrowPropsWithoutHTML as DropdownMenuArrowPropsWithoutHTML,
MenuCheckboxIndicatorPropsWithoutHTML as DropdownMenuCheckboxIndicatorPropsWithoutHTML,
MenuCheckboxItemPropsWithoutHTML as DropdownMenuCheckboxItemPropsWithoutHTML,
MenuContentPropsWithoutHTML as DropdownMenuContentPropsWithoutHTML,
MenuGroupPropsWithoutHTML as DropdownMenuGroupPropsWithoutHTML,
MenuItemPropsWithoutHTML as DropdownMenuItemPropsWithoutHTML,
MenuLabelPropsWithoutHTML as DropdownMenuLabelPropsWithoutHTML,
MenuRadioGroupPropsWithoutHTML as DropdownMenuRadioGroupPropsWithoutHTML,
MenuRadioIndicatorPropsWithoutHTML as DropdownMenuRadioIndicatorPropsWithoutHTML,
MenuRadioItemPropsWithoutHTML as DropdownMenuRadioItemPropsWithoutHTML,
MenuSeparatorPropsWithoutHTML as DropdownMenuSeparatorPropsWithoutHTML,
MenuSubPropsWithoutHTML as DropdownMenuSubPropsWithoutHTML,
Expand Down

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions packages/bits-ui/src/lib/bits/menu/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
export { default as Root } from "./components/menu.svelte";
export { default as Arrow } from "./components/menu-arrow.svelte";
export { default as CheckboxIndicator } from "./components/menu-checkbox-indicator.svelte";
export { default as CheckboxItem } from "./components/menu-checkbox-item.svelte";
export { default as Content } from "./components/menu-content.svelte";
export { default as Group } from "./components/menu-group.svelte";
export { default as Item } from "./components/menu-item.svelte";
export { default as Label } from "./components/menu-label.svelte";
export { default as RadioGroup } from "./components/menu-radio-group.svelte";
export { default as RadioIndicator } from "./components/menu-radio-indicator.svelte";
export { default as RadioItem } from "./components/menu-radio-item.svelte";
export { default as Separator } from "./components/menu-separator.svelte";
export { default as Sub } from "./components/menu-sub.svelte";
Expand All @@ -29,4 +27,5 @@ export type {
MenuGroupProps as GroupProps,
MenuRadioGroupProps as RadioGroupProps,
MenuRadioItemProps as RadioItemProps,
MenuSubTriggerProps as SubTriggerProps,
} from "./types.js";
3 changes: 3 additions & 0 deletions packages/bits-ui/src/lib/bits/menu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export type MenuSubContentPropsWithoutHTML = WithAsChild<PopperLayerProps>;
export type MenuSubContentProps = MenuSubContentPropsWithoutHTML &
Without<PrimitiveDivAttributes, MenuSubContentPropsWithoutHTML>;

export type MenuSubTriggerPropsWithoutHTML = MenuItemPropsWithoutHTML;
export type MenuSubTriggerProps = MenuItemProps;

export type MenuSeparatorPropsWithoutHTML = WithAsChild<{}>;
export type MenuSeparatorProps = MenuSeparatorPropsWithoutHTML &
Without<PrimitiveDivAttributes, MenuSeparatorPropsWithoutHTML>;
Expand Down
2 changes: 0 additions & 2 deletions packages/bits-ui/src/lib/bits/menubar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export { default as SubContent } from "$lib/bits/menu/components/menu-sub-conten
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 RadioIndicator } from "$lib/bits/menu/components/menu-radio-indicator.svelte";
export { default as CheckboxIndicator } from "$lib/bits/menu/components/menu-checkbox-indicator.svelte";

export type {
MenubarProps as Props,
Expand Down
4 changes: 2 additions & 2 deletions sites/docs/src/lib/components/demos/context-menu-demo.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts">
<!-- <script lang="ts">
import { ContextMenu } from "bits-ui";
import { CopySimple, MouseSimple, PencilSimpleLine, PlusCircle, Trash } from "$icons/index.js";
import { flyAndScale } from "$lib/utils/index.js";
Expand Down Expand Up @@ -120,4 +120,4 @@
</div>
</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu.Root>
</ContextMenu.Root> -->
4 changes: 2 additions & 2 deletions sites/docs/src/lib/components/demos/menubar-demo.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts">
<!-- <script lang="ts">
import { Menubar } from "bits-ui";
import { CaretRight, Cat, Check, SwitchOff, SwitchOn } from "$icons/index.js";
import { flyAndScale } from "$lib/utils/index.js";
Expand Down Expand Up @@ -267,4 +267,4 @@
>
</Menubar.Content>
</Menubar.Menu>
</Menubar.Root>
</Menubar.Root> -->

0 comments on commit b1f6cf6

Please sign in to comment.