mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { Button } from "@/examples/radix/ui/button"
|
|
import { ButtonGroup } from "@/examples/radix/ui/button-group"
|
|
import {
|
|
InputGroup,
|
|
InputGroupAddon,
|
|
InputGroupButton,
|
|
InputGroupInput,
|
|
} from "@/examples/radix/ui/input-group"
|
|
import {
|
|
Tooltip,
|
|
TooltipContent,
|
|
TooltipTrigger,
|
|
} from "@/examples/radix/ui/tooltip"
|
|
import { AudioLinesIcon, PlusIcon } from "lucide-react"
|
|
|
|
export default function ButtonGroupInputGroup() {
|
|
const [voiceEnabled, setVoiceEnabled] = React.useState(false)
|
|
|
|
return (
|
|
<ButtonGroup className="[--radius:9999rem]">
|
|
<ButtonGroup>
|
|
<Button variant="outline" size="icon">
|
|
<PlusIcon />
|
|
</Button>
|
|
</ButtonGroup>
|
|
<ButtonGroup>
|
|
<InputGroup>
|
|
<InputGroupInput
|
|
placeholder={
|
|
voiceEnabled ? "Record and send audio..." : "Send a message..."
|
|
}
|
|
disabled={voiceEnabled}
|
|
/>
|
|
<InputGroupAddon align="inline-end">
|
|
<Tooltip>
|
|
<TooltipTrigger asChild>
|
|
<InputGroupButton
|
|
onClick={() => setVoiceEnabled(!voiceEnabled)}
|
|
size="icon-xs"
|
|
data-active={voiceEnabled}
|
|
className="data-[active=true]:bg-orange-100 data-[active=true]:text-orange-700 dark:data-[active=true]:bg-orange-800 dark:data-[active=true]:text-orange-100"
|
|
aria-pressed={voiceEnabled}
|
|
>
|
|
<AudioLinesIcon />
|
|
</InputGroupButton>
|
|
</TooltipTrigger>
|
|
<TooltipContent>Voice Mode</TooltipContent>
|
|
</Tooltip>
|
|
</InputGroupAddon>
|
|
</InputGroup>
|
|
</ButtonGroup>
|
|
</ButtonGroup>
|
|
)
|
|
}
|