1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import React from "react";
- import * as Radix from "@radix-ui/react-primitive";
- import { Primitive } from "@radix-ui/react-primitive";
- import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
- import { Toggle } from "@radix-ui/react-toggle";
- export const createToggleGroupScope: import("@radix-ui/react-context").CreateScope;
- export interface ToggleGroupSingleProps extends ToggleGroupImplSingleProps {
- type: 'single';
- }
- export interface ToggleGroupMultipleProps extends ToggleGroupImplMultipleProps {
- type: 'multiple';
- }
- export const ToggleGroup: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
- interface ToggleGroupImplSingleProps extends ToggleGroupImplProps {
-
- value?: string;
-
- defaultValue?: string;
-
- onValueChange?(value: string): void;
- }
- interface ToggleGroupImplMultipleProps extends ToggleGroupImplProps {
-
- value?: string[];
-
- defaultValue?: string[];
-
- onValueChange?(value: string[]): void;
- }
- type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
- interface ToggleGroupImplProps extends PrimitiveDivProps {
-
- disabled?: boolean;
-
- rovingFocus?: boolean;
- loop?: RovingFocusGroupProps['loop'];
- orientation?: RovingFocusGroupProps['orientation'];
- dir?: RovingFocusGroupProps['dir'];
- }
- export interface ToggleGroupItemProps extends Omit<ToggleGroupItemImplProps, 'pressed'> {
- }
- export const ToggleGroupItem: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
- type ToggleProps = Radix.ComponentPropsWithoutRef<typeof Toggle>;
- interface ToggleGroupItemImplProps extends Omit<ToggleProps, 'defaultPressed' | 'onPressedChange'> {
-
- value: string;
- }
- export const Root: React.ForwardRefExoticComponent<(ToggleGroupSingleProps | ToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
- export const Item: React.ForwardRefExoticComponent<ToggleGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|