{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toolbar",
  "type": "registry:ui",
  "title": "Toolbar",
  "description": "A row of buttons, toggles and links that the keyboard enters once and then moves through with the arrow keys.",
  "categories": [
    "ui"
  ],
  "dependencies": [
    "class-variance-authority",
    "radix-ui"
  ],
  "registryDependencies": [
    "@rivier-ui/theme",
    "@rivier-ui/button",
    "@rivier-ui/cn",
    "@rivier-ui/toggle"
  ],
  "files": [
    {
      "path": "registry/ui/toolbar.tsx",
      "type": "registry:ui",
      "target": "components/ui/toolbar.tsx",
      "content": "\"use client\";\n/**\n * @name toolbar\n * @category ui\n * @description A row of buttons, toggles and links that the keyboard enters once and then moves through with the arrow keys.\n * @when The controls over an editor, a canvas, a table or a player: one Tab stop for the whole row, however many controls it holds. Give it an `aria-label`. For one group of toggles on its own use toggle-group; for commands in named menus use menubar.\n * @example\n * <Toolbar aria-label=\"Formatting\">\n *   <ToolbarToggleGroup type=\"multiple\" aria-label=\"Text style\">\n *     <ToolbarToggleItem value=\"bold\" aria-label=\"Bold\"><Bold strokeWidth={1.5} /></ToolbarToggleItem>\n *     <ToolbarToggleItem value=\"underline\" aria-label=\"Underline\"><Underline strokeWidth={1.5} /></ToolbarToggleItem>\n *   </ToolbarToggleGroup>\n *   <ToolbarSeparator />\n *   <ToolbarLink href=\"/help/formatting\">Help</ToolbarLink>\n *   <ToolbarButton className=\"ms-auto\" onClick={save}>Save</ToolbarButton>\n * </Toolbar>\n */\nimport { Toolbar as ToolbarPrimitive } from \"radix-ui\";\nimport type { VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { toggleVariants } from \"@/components/ui/toggle\";\nimport { cn } from \"@/lib/cn\";\n\n/** The row. It wraps onto a second line rather than overflow; `orientation=\"vertical\"` stacks it and turns the arrow keys. */\nexport function Toolbar({ className, ...props }: ComponentProps<typeof ToolbarPrimitive.Root>) {\n  return (\n    <ToolbarPrimitive.Root\n      data-slot=\"toolbar\"\n      className={cn(\n        \"flex w-full max-w-full flex-wrap items-center gap-1 rounded-surface border bg-background p-1 data-[orientation=vertical]:w-fit data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport type ToolbarButtonProps = ComponentProps<typeof ToolbarPrimitive.Button> & VariantProps<typeof buttonVariants>;\n\n/** A button with the look of button: `variant` (ghost by default) and `size`. */\nexport function ToolbarButton({ className, variant = \"ghost\", size, ...props }: ToolbarButtonProps) {\n  return <ToolbarPrimitive.Button data-slot=\"toolbar-button\" className={cn(buttonVariants({ variant, size }), className)} {...props} />;\n}\n\nexport function ToolbarLink({ className, ...props }: ComponentProps<typeof ToolbarPrimitive.Link>) {\n  return (\n    <ToolbarPrimitive.Link\n      data-slot=\"toolbar-link\"\n      className={cn(\"inline-flex h-control items-center rounded-control px-3 text-sm font-medium text-foreground underline underline-offset-4 hover:opacity-70\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function ToolbarSeparator({ className, ...props }: ComponentProps<typeof ToolbarPrimitive.Separator>) {\n  return (\n    <ToolbarPrimitive.Separator\n      data-slot=\"toolbar-separator\"\n      className={cn(\"mx-1 shrink-0 bg-border data-[orientation=horizontal]:my-1 data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-5 data-[orientation=vertical]:w-px\", className)}\n      {...props}\n    />\n  );\n}\n\n/** Toggles that belong together: `type=\"single\"` or `type=\"multiple\"`, with an `aria-label`. */\nexport function ToolbarToggleGroup({ className, ...props }: ComponentProps<typeof ToolbarPrimitive.ToggleGroup>) {\n  return <ToolbarPrimitive.ToggleGroup data-slot=\"toolbar-toggle-group\" className={cn(\"flex items-center gap-1\", className)} {...props} />;\n}\n\nexport type ToolbarToggleItemProps = ComponentProps<typeof ToolbarPrimitive.ToggleItem> & VariantProps<typeof toggleVariants>;\n\nexport function ToolbarToggleItem({ className, variant, size, ...props }: ToolbarToggleItemProps) {\n  return <ToolbarPrimitive.ToggleItem data-slot=\"toolbar-toggle-item\" className={cn(toggleVariants({ variant, size }), className)} {...props} />;\n}\n"
    }
  ],
  "meta": {
    "category": "ui",
    "when": "The controls over an editor, a canvas, a table or a player: one Tab stop for the whole row, however many controls it holds. Give it an `aria-label`. For one group of toggles on its own use toggle-group; for commands in named menus use menubar.",
    "example": "<Toolbar aria-label=\"Formatting\">\n  <ToolbarToggleGroup type=\"multiple\" aria-label=\"Text style\">\n    <ToolbarToggleItem value=\"bold\" aria-label=\"Bold\"><Bold strokeWidth={1.5} /></ToolbarToggleItem>\n    <ToolbarToggleItem value=\"underline\" aria-label=\"Underline\"><Underline strokeWidth={1.5} /></ToolbarToggleItem>\n  </ToolbarToggleGroup>\n  <ToolbarSeparator />\n  <ToolbarLink href=\"/help/formatting\">Help</ToolbarLink>\n  <ToolbarButton className=\"ms-auto\" onClick={save}>Save</ToolbarButton>\n</Toolbar>",
    "client": true
  }
}
