index.d.mts 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import * as React from "react";
  2. import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
  3. import * as Radix from "@radix-ui/react-primitive";
  4. import { Primitive } from "@radix-ui/react-primitive";
  5. import * as SeparatorPrimitive from "@radix-ui/react-separator";
  6. import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
  7. export const createToolbarScope: import("@radix-ui/react-context").CreateScope;
  8. type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
  9. type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
  10. export interface ToolbarProps extends PrimitiveDivProps {
  11. orientation?: RovingFocusGroupProps['orientation'];
  12. loop?: RovingFocusGroupProps['loop'];
  13. dir?: RovingFocusGroupProps['dir'];
  14. }
  15. export const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
  16. type SeparatorProps = Radix.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;
  17. export interface ToolbarSeparatorProps extends SeparatorProps {
  18. }
  19. export const ToolbarSeparator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
  20. type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
  21. export interface ToolbarButtonProps extends PrimitiveButtonProps {
  22. }
  23. export const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
  24. type PrimitiveLinkProps = Radix.ComponentPropsWithoutRef<typeof Primitive.a>;
  25. export interface ToolbarLinkProps extends PrimitiveLinkProps {
  26. }
  27. export const ToolbarLink: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
  28. type ToggleGroupProps = Radix.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;
  29. export interface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, {
  30. type: 'single';
  31. }> {
  32. }
  33. export interface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, {
  34. type: 'multiple';
  35. }> {
  36. }
  37. export const ToolbarToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
  38. type ToggleGroupItemProps = Radix.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;
  39. export interface ToolbarToggleItemProps extends ToggleGroupItemProps {
  40. }
  41. export const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
  42. export const Root: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
  43. export const Separator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
  44. export const Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
  45. export const Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
  46. export const ToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
  47. export const ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
  48. //# sourceMappingURL=index.d.ts.map