Skip to content

Commit

Permalink
remove separator
Browse files Browse the repository at this point in the history
  • Loading branch information
ollema committed Dec 6, 2023
1 parent 6288619 commit 266d885
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 52 deletions.
1 change: 0 additions & 1 deletion content/components/toolbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ description: A container for grouping a set of controls, such as buttons, links
<Toolbar.Group>
<Toolbar.GroupItem />
</Toolbar.Group>
<Toolbar.Separator />
<Toolbar.Link />
<Toolbar.Button />
</Toolbar.Root>
Expand Down
4 changes: 2 additions & 2 deletions src/components/demos/toolbar-demo.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Toolbar } from "$lib";
import { Separator, Toolbar } from "$lib";
import { TextB, TextItalic, TextStrikethrough } from "phosphor-svelte";
let value: string[] | undefined = ["bold"];
Expand Down Expand Up @@ -36,7 +36,7 @@
</Toolbar.GroupItem>
</Toolbar.Group>

<Toolbar.Separator class="w-[1px] self-stretch bg-muted" />
<Separator.Root class="w-[1px] self-stretch bg-muted" />

<Toolbar.Link
class="link nowrap flex-shrink-0"
Expand Down
15 changes: 1 addition & 14 deletions src/content/api-reference/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@ const link: APISchema<Toolbar.LinkProps> = {
]
};

const separator: APISchema<Toolbar.SeparatorProps> = {
title: "Separator",
description: "A horizontal line to visually separate sections in the toolbar.",
props: { asChild },
slotProps: { ...builderAndAttrsSlotProps },
dataAttributes: [
{
name: "toolbar-separator",
description: "Present on the separator element."
}
]
};

const group: APISchema<Toolbar.GroupProps<"multiple">> = {
title: "Group",
description: "A group of toggle items in the toolbar.",
Expand Down Expand Up @@ -145,4 +132,4 @@ const groupItem: APISchema<Toolbar.GroupItemProps> = {
]
};

export const toolbar = [root, button, link, separator, group, groupItem];
export const toolbar = [root, button, link, group, groupItem];
1 change: 0 additions & 1 deletion src/lib/bits/toolbar/_export.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export type {
Props as ToolbarProps,
ButtonProps as ToolbarButtonProps,
LinkProps as ToolbarLinkProps,
SeparatorProps as ToolbarSeparatorProps,
GroupProps as ToolbarGroupProps,
GroupItemProps as ToolbarItemProps,
//
Expand Down
4 changes: 1 addition & 3 deletions src/lib/bits/toolbar/_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type ButtonProps = AsChild;

type LinkProps = AsChild;

type SeparatorProps = AsChild;

type GroupProps<T extends "single" | "multiple"> = Expand<
OmitValue<CreateToolbarGroupProps<T>> & {
/**
Expand Down Expand Up @@ -60,4 +58,4 @@ type GroupItemProps = Expand<
} & AsChild
>;

export type { Props, ButtonProps, LinkProps, SeparatorProps, GroupProps, GroupItemProps };
export type { Props, ButtonProps, LinkProps, GroupProps, GroupItemProps };
26 changes: 0 additions & 26 deletions src/lib/bits/toolbar/components/toolbar-separator.svelte

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib/bits/toolbar/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getContext, setContext } from "svelte";
const NAME = "toolbar";
const GROUP_NAME = "toolbar-group";

const PARTS = ["root", "button", "link", "separator", "group", "group-item"] as const;
const PARTS = ["root", "button", "link", "group", "group-item"] as const;

export const getAttrs = createBitAttrs(NAME, PARTS);

Expand Down
1 change: 0 additions & 1 deletion src/lib/bits/toolbar/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export { default as Root } from "./components/toolbar.svelte";
export { default as Button } from "./components/toolbar-button.svelte";
export { default as Link } from "./components/toolbar-link.svelte";
export { default as Separator } from "./components/toolbar-separator.svelte";
export { default as Group } from "./components/toolbar-group.svelte";
export { default as GroupItem } from "./components/toolbar-group-item.svelte";

Expand Down
3 changes: 0 additions & 3 deletions src/lib/bits/toolbar/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ type ButtonProps = I.ButtonProps & HTMLButtonAttributes;

type LinkProps = I.LinkProps & HTMLAnchorAttributes;

type SeparatorProps = I.SeparatorProps & HTMLDivAttributes;

type GroupProps<T extends "single" | "multiple"> = I.GroupProps<T> & HTMLDivAttributes;

type GroupItemProps = I.GroupItemProps & HTMLButtonAttributes;
Expand All @@ -35,7 +33,6 @@ export type {
Props,
ButtonProps,
LinkProps,
SeparatorProps,
GroupProps,
GroupItemProps,
//
Expand Down

0 comments on commit 266d885

Please sign in to comment.