Skip to content

Commit

Permalink
rid test for now
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Aug 7, 2024
1 parent 6cc6358 commit 5641469
Show file tree
Hide file tree
Showing 9 changed files with 407 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { type WritableBox, box } from "svelte-toolbelt";
import { useListboxRoot } from "../listbox.svelte.js";
import type { RootProps } from "../index.js";
import ComboboxHiddenInput from "./listbox-hidden-input.svelte";
import ListboxHiddenInput from "./listbox-hidden-input.svelte";
import { noop } from "$lib/internal/callbacks.js";
import { FloatingLayer } from "$lib/bits/utilities/floating-layer/index.js";
Expand Down Expand Up @@ -52,12 +52,12 @@

{#if Array.isArray(value)}
{#if value.length === 0}
<ComboboxHiddenInput value="" />
<ListboxHiddenInput value="" />
{:else}
{#each value as item}
<ComboboxHiddenInput value={item} />
<ListboxHiddenInput value={item} />
{/each}
{/if}
{:else}
<ComboboxHiddenInput {value} />
<ListboxHiddenInput {value} />
{/if}
4 changes: 2 additions & 2 deletions packages/bits-ui/src/lib/bits/select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export type {
SelectContentImplProps as ContentImplProps,
SelectViewportProps as ViewportProps,
SelectPortalProps as PortalProps,
SelectScrollButtonProps as ScrollDownButtonProps,
SelectScrollButtonProps as ScrollUpButtonProps,
SelectScrollUpButtonProps as ScrollDownButtonProps,
SelectScrollUpButtonProps as ScrollUpButtonProps,
SelectIconProps as IconProps,
SelectGroupProps as GroupProps,
SelectGroupLabelProps as GroupLabelProps,
Expand Down
11 changes: 8 additions & 3 deletions packages/bits-ui/src/lib/bits/select/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ export type SelectViewportProps = SelectViewportPropsWithoutHTML &
export type SelectPortalPropsWithoutHTML = PortalProps;
export type SelectPortalProps = SelectPortalPropsWithoutHTML;

export type SelectScrollButtonPropsWithoutHTML = WithChild;
export type SelectScrollUpButtonPropsWithoutHTML = WithChild;

export type SelectScrollButtonProps = SelectScrollButtonPropsWithoutHTML &
Without<PrimitiveDivAttributes, SelectScrollButtonPropsWithoutHTML>;
export type SelectScrollUpButtonProps = SelectScrollUpButtonPropsWithoutHTML &
Without<PrimitiveDivAttributes, SelectScrollUpButtonPropsWithoutHTML>;

export type SelectScrollDownButtonPropsWithoutHTML = WithChild;

export type SelectScrollDownButtonProps = SelectScrollDownButtonPropsWithoutHTML &
Without<PrimitiveDivAttributes, SelectScrollDownButtonPropsWithoutHTML>;

export type SelectIconPropsWithoutHTML = WithChild;

Expand Down
1 change: 1 addition & 0 deletions packages/bits-ui/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type * from "$lib/bits/dialog/types.js";
export type * from "$lib/bits/dropdown-menu/types.js";
export type * from "$lib/bits/label/types.js";
export type * from "$lib/bits/link-preview/types.js";
export type * from "$lib/bits/listbox/types.js";
export type * from "$lib/bits/menubar/types.js";
export type * from "$lib/bits/navigation-menu/types.js";
export type * from "$lib/bits/pagination/types.js";
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions sites/docs/content/components/listbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ description: A list of options that can be selected by the user.
</Listbox.Content>
</Listbox.Root>
```

<APISection {schemas} />
3 changes: 2 additions & 1 deletion sites/docs/src/lib/content/api-reference/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { toggle } from "./toggle.js";
import { toolbar } from "./toolbar.js";
import { tooltip } from "./tooltip.js";
import { menubar } from "./menubar.js";
import { listbox } from "./listbox.js";
import type { APISchema } from "$lib/types/index.js";

export const bits = [
Expand Down Expand Up @@ -103,7 +104,7 @@ export const apiSchemas: Record<Bit, APISchema[]> = {
"dropdown-menu": dropdownMenu,
label,
"link-preview": linkPreview,
listbox: combobox,
listbox,
menubar,
"navigation-menu": navigationMenu,
pagination,
Expand Down
Loading

0 comments on commit 5641469

Please sign in to comment.