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

docs: add note on checkbox.md about needed input:hidden #1266

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions apps/www/static/registry/styles/default/textarea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "textarea",
"dependencies": [],
"registryDependencies": [],
"files": [
{
"name": "index.ts",
"content": "import Root from \"./textarea.svelte\";\n\ntype FormTextareaEvent<T extends Event = Event> = T & {\n\tcurrentTarget: EventTarget & HTMLTextAreaElement;\n};\n\ntype TextareaEvents = {\n\tblur: FormTextareaEvent<FocusEvent>;\n\tchange: FormTextareaEvent<Event>;\n\tclick: FormTextareaEvent<MouseEvent>;\n\tfocus: FormTextareaEvent<FocusEvent>;\n\tkeydown: FormTextareaEvent<KeyboardEvent>;\n\tkeypress: FormTextareaEvent<KeyboardEvent>;\n\tkeyup: FormTextareaEvent<KeyboardEvent>;\n\tmouseover: FormTextareaEvent<MouseEvent>;\n\tmouseenter: FormTextareaEvent<MouseEvent>;\n\tmouseleave: FormTextareaEvent<MouseEvent>;\n\tpaste: FormTextareaEvent<ClipboardEvent>;\n\tinput: FormTextareaEvent<InputEvent>;\n};\n\nexport {\n\tRoot,\n\t//\n\tRoot as Textarea,\n\ttype TextareaEvents,\n\ttype FormTextareaEvent,\n};\n"
},
{
"name": "textarea.svelte",
"content": "<script lang=\"ts\">\n\timport type { HTMLTextareaAttributes } from \"svelte/elements\";\n\timport type { TextareaEvents } from \"./index.js\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = HTMLTextareaAttributes;\n\ttype $$Events = TextareaEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let value: $$Props[\"value\"] = undefined;\n\texport { className as class };\n\n\t// Workaround for https://github.com/sveltejs/svelte/issues/9305\n\t// Fixed in Svelte 5, but not backported to 4.x.\n\texport let readonly: $$Props[\"readonly\"] = undefined;\n</script>\n\n<textarea\n\tclass={cn(\n\t\t\"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:paste\n\ton:input\n\t{...$$restProps}\n></textarea>\n"
}
],
"type": "components:ui"
}
2 changes: 2 additions & 0 deletions sites/docs/src/content/components/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ bits: https://www.bits-ui.com/docs/components/checkbox

### Form

**Note:** Checkbox needs an `input:hidden` with needed attributes as shown in examples below.

<ComponentPreview name="checkbox-form-single">

<div />
Expand Down
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/default-js/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
{
"name": "input.svelte",
"content": "<script>\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport let value = undefined;\n\texport { className as class };\n\texport let readonly = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
"content": "<script>\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport let value = undefined;\n\texport { className as class };\n\texport let readonly = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/default-js/select.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
{
"name": "select-trigger.svelte",
"content": "<script>\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport ChevronDown from \"lucide-svelte/icons/chevron-down\";\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n\tlet:builder\n\ton:click\n\ton:keydown\n>\n\t<slot {builder} />\n\t<div>\n\t\t<ChevronDown class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
"content": "<script>\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport ChevronDown from \"lucide-svelte/icons/chevron-down\";\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n\tlet:builder\n\ton:click\n\ton:keydown\n>\n\t<slot {builder} />\n\t<div>\n\t\t<ChevronDown class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/default/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
{
"name": "input.svelte",
"content": "<script lang=\"ts\">\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\timport type { InputEvents } from \"./index.js\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = HTMLInputAttributes;\n\ttype $$Events = InputEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let value: $$Props[\"value\"] = undefined;\n\texport { className as class };\n\n\t// Workaround for https://github.com/sveltejs/svelte/issues/9305\n\t// Fixed in Svelte 5, but not backported to 4.x.\n\texport let readonly: $$Props[\"readonly\"] = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
"content": "<script lang=\"ts\">\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\timport type { InputEvents } from \"./index.js\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = HTMLInputAttributes;\n\ttype $$Events = InputEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let value: $$Props[\"value\"] = undefined;\n\texport { className as class };\n\n\t// Workaround for https://github.com/sveltejs/svelte/issues/9305\n\t// Fixed in Svelte 5, but not backported to 4.x.\n\texport let readonly: $$Props[\"readonly\"] = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/default/select.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
{
"name": "select-trigger.svelte",
"content": "<script lang=\"ts\">\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport ChevronDown from \"lucide-svelte/icons/chevron-down\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = SelectPrimitive.TriggerProps;\n\ttype $$Events = SelectPrimitive.TriggerEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"border-input bg-background ring-offset-background focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n\tlet:builder\n\ton:click\n\ton:keydown\n>\n\t<slot {builder} />\n\t<div>\n\t\t<ChevronDown class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
"content": "<script lang=\"ts\">\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport ChevronDown from \"lucide-svelte/icons/chevron-down\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = SelectPrimitive.TriggerProps;\n\ttype $$Events = SelectPrimitive.TriggerEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n\tlet:builder\n\ton:click\n\ton:keydown\n>\n\t<slot {builder} />\n\t<div>\n\t\t<ChevronDown class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/new-york-js/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
{
"name": "input.svelte",
"content": "<script>\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport let value = undefined;\n\texport { className as class };\n\texport let readonly = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
"content": "<script>\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport let value = undefined;\n\texport { className as class };\n\texport let readonly = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/new-york-js/select.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
{
"name": "select-trigger.svelte",
"content": "<script>\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport CaretSort from \"svelte-radix/CaretSort.svelte\";\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t<slot />\n\t<div>\n\t\t<CaretSort class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
"content": "<script>\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport CaretSort from \"svelte-radix/CaretSort.svelte\";\n\timport { cn } from \"$lib/utils.js\";\n\tlet className = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t<slot />\n\t<div>\n\t\t<CaretSort class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/new-york/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
{
"name": "input.svelte",
"content": "<script lang=\"ts\">\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\timport type { InputEvents } from \"./index.js\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = HTMLInputAttributes;\n\ttype $$Events = InputEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let value: $$Props[\"value\"] = undefined;\n\texport { className as class };\n\n\t// Workaround for https://github.com/sveltejs/svelte/issues/9305\n\t// Fixed in Svelte 5, but not backported to 4.x.\n\texport let readonly: $$Props[\"readonly\"] = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
"content": "<script lang=\"ts\">\n\timport type { HTMLInputAttributes } from \"svelte/elements\";\n\timport type { InputEvents } from \"./index.js\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = HTMLInputAttributes;\n\ttype $$Events = InputEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport let value: $$Props[\"value\"] = undefined;\n\texport { className as class };\n\n\t// Workaround for https://github.com/sveltejs/svelte/issues/9305\n\t// Fixed in Svelte 5, but not backported to 4.x.\n\texport let readonly: $$Props[\"readonly\"] = undefined;\n</script>\n\n<input\n\tclass={cn(\n\t\t\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n\t\tclassName\n\t)}\n\tbind:value\n\t{readonly}\n\ton:blur\n\ton:change\n\ton:click\n\ton:focus\n\ton:focusin\n\ton:focusout\n\ton:keydown\n\ton:keypress\n\ton:keyup\n\ton:mouseover\n\ton:mouseenter\n\ton:mouseleave\n\ton:mousemove\n\ton:paste\n\ton:input\n\ton:wheel|passive\n\t{...$$restProps}\n/>\n"
}
],
"type": "components:ui"
}
}
4 changes: 2 additions & 2 deletions sites/docs/static/registry/styles/new-york/select.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
},
{
"name": "select-trigger.svelte",
"content": "<script lang=\"ts\">\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport CaretSort from \"svelte-radix/CaretSort.svelte\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = SelectPrimitive.TriggerProps;\n\ttype $$Events = SelectPrimitive.TriggerEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-[invalid]:border-destructive data-[placeholder]:[&>span]:text-muted-foreground flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t<slot />\n\t<div>\n\t\t<CaretSort class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
"content": "<script lang=\"ts\">\n\timport { Select as SelectPrimitive } from \"bits-ui\";\n\timport CaretSort from \"svelte-radix/CaretSort.svelte\";\n\timport { cn } from \"$lib/utils.js\";\n\n\ttype $$Props = SelectPrimitive.TriggerProps;\n\ttype $$Events = SelectPrimitive.TriggerEvents;\n\n\tlet className: $$Props[\"class\"] = undefined;\n\texport { className as class };\n</script>\n\n<SelectPrimitive.Trigger\n\tclass={cn(\n\t\t\"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-[invalid]:border-destructive [&>span]:line-clamp-1 data-[placeholder]:[&>span]:text-muted-foreground\",\n\t\tclassName\n\t)}\n\t{...$$restProps}\n>\n\t<slot />\n\t<div>\n\t\t<CaretSort class=\"h-4 w-4 opacity-50\" />\n\t</div>\n</SelectPrimitive.Trigger>\n"
}
],
"type": "components:ui"
}
}
Loading