Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next: tidy up docs #1404

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"embla-carousel-autoplay": "8.1.6",
"embla-carousel-svelte": "8.1.6",
"estree-walker": "^3.0.3",
"formsnap": "2.0.0-next.0",
"formsnap": "2.0.0-next.1",
"hast-util-to-html": "^9.0.1",
"is-reference": "^3.0.2",
"lodash.template": "^4.5.0",
Expand Down
6 changes: 6 additions & 0 deletions sites/docs/src/content/components/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ To show the command menu in a dialog, use the `<Command.Dialog />` component ins
</Command.List>
</Command.Dialog>
```

## Changelog

### 2024-10-30 Classes for icons

- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `<Command.Item>` component to automatically style the icons inside.
7 changes: 7 additions & 0 deletions sites/docs/src/content/components/dropdown-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ Install `bits-ui`:
<div></div>

</ComponentPreview>

## Changelog

### 2024-10-30 Classes for DropdownMenu.SubTrigger

- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `<DropdownMenu.SubTrigger>` to automatically style icon inside the dropdown menu sub trigger.
- Removed `size-4` from the icon inside the `<DropdownMenu.SubTrigger>` since it is now handled by the parent `<DropdownMenu.SubTrigger>`.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<CommandPrimitive.Item
class={cn(
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
className
)}
bind:ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<DropdownMenuPrimitive.SubTrigger
bind:ref
class={cn(
"data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
"data-[highlighted]:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
inset && "pl-8",
className
)}
{...restProps}
>
{@render children?.()}
<ChevronRight class="ml-auto size-4" />
<ChevronRight class="ml-auto" />
</DropdownMenuPrimitive.SubTrigger>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<CommandPrimitive.Item
class={cn(
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
className
)}
bind:ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<DropdownMenuPrimitive.SubTrigger
bind:ref
class={cn(
"data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
"data-[highlighted]:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
inset && "pl-8",
className
)}
{...restProps}
>
{@render children?.()}
<ChevronRight class="ml-auto size-4" />
<ChevronRight class="ml-auto" />
</DropdownMenuPrimitive.SubTrigger>
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
<Form.Label>Email</Form.Label>
<Select.Root type="single" bind:value={$formData.email} name={props.name}>
<Select.Trigger {...props}>
{$formData.email ?? "Select a verified email to display"}
{$formData.email && $formData.email.length
? $formData.email
: "Select a verified email to display"}
</Select.Trigger>
<Select.Content>
<Select.Item value="m@example.com" label="m@example.com" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<div class="flex items-center space-x-2">
<p class="text-sm font-medium">Rows per page</p>
<Select.Root
allowDeselect={false}
type="single"
value={`${table.getState().pagination.pageSize}`}
onValueChange={(value) => {
Expand Down