laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
1,243 lines (975 loc) • 76.9 kB
TypeScript
import * as AccordionPrimitive from '@radix-ui/react-accordion';
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { ButtonProps as ButtonProps_2 } from './button';
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
import { ClassProp } from 'class-variance-authority/types';
import { ClassValue } from 'clsx';
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
import { ColumnDef } from '@tanstack/react-table';
import { Command as Command_2 } from 'cmdk';
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
import { ControllerProps } from 'react-hook-form';
import { DayPicker } from 'react-day-picker';
import { default as default_2 } from 'react';
import { default as default_3 } from 'embla-carousel-react';
import * as DialogPrimitive from '@radix-ui/react-dialog';
import { Drawer as Drawer_2 } from 'vaul';
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
import { FieldError } from 'react-hook-form';
import { FieldPath } from 'react-hook-form';
import { FieldValues } from 'react-hook-form';
import { FormProviderProps } from 'react-hook-form';
import { ForwardRefExoticComponent } from 'react';
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
import { HTMLAttributes } from 'react';
import { InputProps as InputProps_2 } from './input';
import { JSX } from 'react/jsx-runtime';
import { JSX as JSX_2 } from 'react';
import * as LabelPrimitive from '@radix-ui/react-label';
import * as LucideIcons from 'lucide-react';
import * as MenubarPrimitive from '@radix-ui/react-menubar';
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
import { OnChangeFn } from '@tanstack/react-table';
import { OTPInput } from 'input-otp';
import * as PopoverPrimitive from '@radix-ui/react-popover';
import * as ProgressPrimitive from '@radix-ui/react-progress';
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
import * as React_2 from 'react';
import { ReactElement } from 'react';
import { ReactNode } from 'react';
import * as RechartsPrimitive from 'recharts';
import { RefAttributes } from 'react';
import { RefObject } from 'react';
import * as ResizablePrimitive from 'react-resizable-panels';
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import * as SelectPrimitive from '@radix-ui/react-select';
import * as SeparatorPrimitive from '@radix-ui/react-separator';
import { SeparatorProps } from '@radix-ui/react-separator';
import { SetStateAction } from 'react';
import * as SliderPrimitive from '@radix-ui/react-slider';
import { Slot } from '@radix-ui/react-slot';
import * as SwitchPrimitive from '@radix-ui/react-switch';
import * as TabsPrimitive from '@radix-ui/react-tabs';
import { Toaster as Toaster_2 } from 'sonner';
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
import * as TogglePrimitive from '@radix-ui/react-toggle';
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
import { UseEmblaCarouselType } from 'embla-carousel-react';
import { VariantProps } from 'class-variance-authority';
declare type AcceptItem = "pdf" | "doc" | "docx" | "xls" | "xlsx" | "ppt" | "txt" | "csv" | "jpg" | "jpeg" | "png" | "gif" | "image" | "video" | "audio";
export declare function Accordion({ ...props }: AccordionProps): JSX.Element;
export declare function AccordionContent({ className, children, ...props }: AccordionContentProps): JSX.Element;
declare type AccordionContentProps = React_2.ComponentProps<typeof AccordionPrimitive.Content>;
export declare function AccordionItem({ className, ...props }: AccordionItemProps): JSX.Element;
declare type AccordionItemProps = React_2.ComponentProps<typeof AccordionPrimitive.Item>;
declare type AccordionProps = React_2.ComponentProps<typeof AccordionPrimitive.Root>;
export declare function AccordionTrigger({ className, children, ...props }: AccordionTriggerProps): JSX.Element;
declare type AccordionTriggerProps = React_2.ComponentProps<typeof AccordionPrimitive.Trigger>;
declare type AdditionalMessageOptions = Omit<ChatMessageProps, keyof Message>;
export declare function Alert({ className, variant, ...props }: AlertProps): JSX.Element;
export declare function AlertDescription({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function AlertDialog({ ...props }: AlertDialogProps): JSX.Element;
export declare function AlertDialogAction({ className, ...props }: AlertDialogActionProps): JSX.Element;
declare type AlertDialogActionProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Action>;
export declare function AlertDialogCancel({ className, ...props }: AlertDialogCancelProps): JSX.Element;
declare type AlertDialogCancelProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Cancel>;
export declare function AlertDialogContent({ className, ...props }: AlertDialogContentProps): JSX.Element;
declare type AlertDialogContentProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Content>;
export declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps): JSX.Element;
declare type AlertDialogDescriptionProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Description>;
export declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): JSX.Element;
declare type AlertDialogFooterProps = React_2.ComponentProps<"div">;
export declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): JSX.Element;
declare type AlertDialogHeaderProps = React_2.ComponentProps<"div">;
declare type AlertDialogProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Root>;
export declare function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps): JSX.Element;
declare type AlertDialogTitleProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Title>;
export declare function AlertDialogTrigger({ ...props }: AlertDialogTriggerProps): JSX.Element;
declare type AlertDialogTriggerProps = React_2.ComponentProps<typeof AlertDialogPrimitive.Trigger>;
declare type AlertProps = React_2.ComponentProps<"div"> & VariantProps<typeof alertVariants>;
export declare function AlertTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
declare const alertVariants: (props?: ({
variant?: "default" | "destructive" | null | undefined;
} & ClassProp) | undefined) => string;
declare type Animation_2 = VariantProps<typeof chatBubbleVariants>["animation"];
export declare function AppEditor({ defaultValue, onMarkdownEdit, plugins, toolbars, placeholder, onlyMarkdown, className, }: AppEditorProps): JSX.Element;
declare type AppEditorPlugin = "clear" | "counter";
declare interface AppEditorProps {
defaultValue?: string;
onMarkdownEdit?: (markdown: string) => void;
plugins?: AppEditorPlugin[];
toolbars?: AppEditorToolbar[];
placeholder?: string;
onlyMarkdown?: boolean;
className?: string;
}
declare type AppEditorToolbar = "block-format" | "font-format" | "history";
export declare function AppMultipleSelectDropdown({ options, value, onChange, onClear, placeholder, disabled, size, label, labelClassName, emptyMessage, className, searchPlaceholder, searchable, cancelLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
export declare interface AppMultipleSelectOption {
value: string;
label: string;
disabled?: boolean;
}
export declare function AppSelect<T = AppSelectOption>({ options, placeholder, children, label, className, labelKey, valueKey, descriptionKey, groupNameKey, isOptionDisabled, ...props }: AppSelectProps<T>): JSX.Element;
export declare interface AppSelectOption {
value: string | number;
label: string | React_2.ReactNode;
disabled?: boolean;
groupName?: string;
}
export declare interface AppSelectProps<T = AppSelectOption> extends React_2.ComponentProps<typeof Select> {
options: T[];
placeholder?: string;
className?: string;
labelKey?: keyof T;
valueKey?: keyof T;
descriptionKey?: keyof T;
groupNameKey?: keyof T;
isOptionDisabled?: (option: T) => boolean;
}
export declare function AppSidebar({ navigation, navigationFooter, versions, defaultVersion, headerContent, footerContent, showRail, linkComponent: LinkComponent, linkProps, ...props }: AppSidebarProps): JSX.Element;
declare interface AppSidebarProps extends React_2.ComponentProps<typeof Sidebar> {
navigation: NavGroup[];
navigationFooter?: NavGroup[];
versions?: string[];
defaultVersion?: string;
headerContent?: React_2.ReactNode;
footerContent?: React_2.ReactNode;
showRail?: boolean;
linkComponent?: React_2.ComponentType<any>;
linkProps?: Record<string, any>;
}
export declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element;
declare type AspectRatioProps = React.ComponentProps<typeof AspectRatioPrimitive.Root>;
export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, multiple, size, }: AsyncSelectProps<T>): JSX.Element;
declare interface AsyncSelectMultipleProps<T> extends VariantProps<typeof selectTriggerVariants> {
multiple: true;
fetcher: (query?: string) => Promise<T[]>;
preload?: boolean;
filterFn?: (option: T, query: string) => boolean;
renderOption: (option: T) => React_2.ReactNode;
getOptionValue: (option: T) => string;
getDisplayValue: (option: T) => React_2.ReactNode;
notFound?: React_2.ReactNode;
loadingSkeleton?: React_2.ReactNode;
value?: string[];
onChange?: (value: string[]) => void;
label?: string | React_2.ReactNode;
labelClassName?: string;
placeholder?: string;
disabled?: boolean;
width?: string | number | "auto";
triggerClassName?: string;
noResultsMessage?: string;
clearable?: boolean;
}
declare type AsyncSelectProps<T> = AsyncSelectSingleProps<T> | AsyncSelectMultipleProps<T>;
declare interface AsyncSelectSingleProps<T> extends VariantProps<typeof selectTriggerVariants> {
multiple?: false;
fetcher: (query?: string) => Promise<T[]>;
preload?: boolean;
filterFn?: (option: T, query: string) => boolean;
renderOption: (option: T) => React_2.ReactNode;
getOptionValue: (option: T) => string;
getDisplayValue: (option: T) => React_2.ReactNode;
notFound?: React_2.ReactNode;
loadingSkeleton?: React_2.ReactNode;
value?: string;
onChange?: (value: string) => void;
label?: string | React_2.ReactNode;
labelClassName?: string;
placeholder?: string;
disabled?: boolean;
width?: string | number | "auto";
triggerClassName?: string;
noResultsMessage?: string;
clearable?: boolean;
}
declare interface Attachment {
name?: string;
contentType?: string;
url: string;
}
export declare function AudioVisualizer({ stream, isRecording, onClick, }: AudioVisualizerProps): JSX.Element;
declare interface AudioVisualizerProps {
stream: MediaStream | null;
isRecording: boolean;
onClick: () => void;
}
export declare function Avatar({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Root>): JSX.Element;
export declare function AvatarFallback({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Fallback>): JSX.Element;
export declare function AvatarImage({ className, ...props }: React_2.ComponentProps<typeof AvatarPrimitive.Image>): JSX.Element;
export declare interface AvatarItem {
src: string;
alt?: string;
}
export declare function Badge({ className, variant, asChild, ...props }: React_2.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
asChild?: boolean;
}): JSX.Element;
export declare const badgeVariants: (props?: ({
variant?: "default" | "secondary" | "destructive" | "outline" | "outline-primary" | null | undefined;
} & ClassProp) | undefined) => string;
declare type BarItemDataType = RepeatDataType | NoRepeatDataType;
export declare function Breadcrumb({ ...props }: React_2.ComponentProps<"nav">): JSX.Element;
export declare function BreadcrumbEllipsis({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
export declare function BreadcrumbItem({ className, ...props }: React_2.ComponentProps<"li">): JSX.Element;
export declare function BreadcrumbLink({ asChild, className, ...props }: React_2.ComponentProps<"a"> & {
asChild?: boolean;
}): JSX.Element;
export declare function BreadcrumbList({ className, ...props }: React_2.ComponentProps<"ol">): JSX.Element;
export declare function BreadcrumbPage({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
export declare function BreadcrumbSeparator({ children, className, ...props }: React_2.ComponentProps<"li">): JSX.Element;
export declare function Button({ className, variant, size, asChild, iconLeft, iconRight, isLoading, ...props }: ButtonProps): JSX.Element;
export declare interface ButtonProps extends React_2.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
asChild?: boolean;
iconLeft?: IconName;
iconRight?: IconName;
isLoading?: boolean;
}
export declare const buttonVariants: (props?: ({
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-primary" | "ghost" | null | undefined;
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
} & ClassProp) | undefined) => string;
export declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React_2.ComponentProps<typeof DayPicker> & {
buttonVariant?: React_2.ComponentProps<typeof Button>["variant"];
}): JSX.Element;
export declare interface CalendarAppointment {
id: number;
title: string;
description?: string;
date: string;
startTime: string;
endTime?: string;
color?: string;
attributes?: {
key: string;
value: default_2.ReactNode | string;
showPreview?: boolean;
showTooltip?: boolean;
}[];
className?: string;
groupBy?: string;
}
export declare function Card({ className, size, ...props }: CardProps): JSX.Element;
export declare function CardContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function CardDescription({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function CardFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function CardHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare interface CardProps extends React_2.ComponentProps<"div"> {
size?: CardSize;
}
declare type CardSize = "default" | "sm" | "lg" | "none";
export declare function CardTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React_2.ComponentProps<"div"> & CarouselProps): JSX.Element;
declare type CarouselApi = UseEmblaCarouselType[1];
export declare function CarouselContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function CarouselItem({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function CarouselNext({ className, variant, size, ...props }: React_2.ComponentProps<typeof Button>): JSX.Element;
declare type CarouselOptions = UseCarouselParameters[0];
declare type CarouselPlugin = UseCarouselParameters[1];
export declare function CarouselPrevious({ className, variant, size, ...props }: React_2.ComponentProps<typeof Button>): JSX.Element;
declare type CarouselProps = {
opts?: CarouselOptions;
plugins?: CarouselPlugin;
orientation?: "horizontal" | "vertical";
setApi?: (api: CarouselApi) => void;
};
declare const Chart: default_2.FC<ChartProps>;
export declare type ChartConfig = {
[k in string]: {
label?: React_2.ReactNode;
icon?: React_2.ComponentType;
} & ({
color?: string;
theme?: never;
} | {
color?: never;
theme: Record<keyof typeof THEMES, string>;
});
};
export declare function ChartContainer({ id, className, children, config, ...props }: React_2.ComponentProps<"div"> & {
config: ChartConfig;
children: React_2.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
}): JSX.Element;
export declare const ChartLegend: typeof RechartsPrimitive.Legend;
export declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: {
className?: string;
hideIcon?: boolean;
payload?: Array<{
value?: string;
dataKey?: string;
color?: string;
}>;
verticalAlign?: "top" | "middle" | "bottom";
nameKey?: string;
} & React_2.HTMLAttributes<HTMLDivElement>): JSX.Element | null;
declare interface ChartProps {
data: GanttDataType[];
className?: string;
onBarDoubleClick?: OnBarDoubleClickType;
onBarChange?: OnBarChangeType;
treeTitle?: string;
}
export declare const ChartStyle: ({ id, config }: {
id: string;
config: ChartConfig;
}) => JSX.Element | null;
export declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
export declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: {
active?: boolean;
payload?: Array<{
dataKey?: string;
name?: string;
value?: any;
color?: string;
payload?: any;
}>;
label?: string | number;
className?: string;
indicator?: "line" | "dot" | "dashed";
hideLabel?: boolean;
hideIndicator?: boolean;
labelFormatter?: (value: any, payload: any) => React_2.ReactNode;
labelClassName?: string;
formatter?: (value: any, name: any, item: any, index: number, payload: any) => React_2.ReactNode;
color?: string;
nameKey?: string;
labelKey?: string;
} & React_2.HTMLAttributes<HTMLDivElement>): JSX.Element | null;
export declare function Chat({ messages, welcomeTitle, handleSubmit, input, handleInputChange, stop, isGenerating, append, suggestions, className, onRateResponse, setMessages, transcribeAudio, allowAttachments, onEdit, onMessageSave, }: ChatProps): JSX.Element;
export declare namespace Chat {
var displayName: string;
}
declare const chatBubbleVariants: (props?: ({
isUser?: boolean | null | undefined;
animation?: "none" | "scale" | "slide" | "fade" | null | undefined;
} & ClassProp) | undefined) => string;
export declare const ChatContainer: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
export declare const ChatForm: ForwardRefExoticComponent<ChatFormProps & RefAttributes<HTMLFormElement>>;
declare interface ChatFormProps {
className?: string;
isPending: boolean;
handleSubmit: (event?: {
preventDefault?: () => void;
}, options?: {
experimental_attachments?: FileList;
}) => void;
children: (props: {
files: File[] | null;
setFiles: React.Dispatch<React.SetStateAction<File[] | null>>;
}) => ReactElement;
}
export declare const ChatMessage: default_2.FC<ChatMessageProps>;
export declare interface ChatMessageProps extends Message {
showTimeStamp?: boolean;
animation?: Animation_2;
actions?: default_2.ReactNode;
editable?: boolean;
onEdit?: (newContent: string) => void;
onMessageSave?: (messageId: string, content: string) => void;
}
export declare function ChatMessages({ messages, children, }: React.PropsWithChildren<{
messages: Message[];
}>): JSX.Element;
declare type ChatProps = ChatPropsWithoutSuggestions | ChatPropsWithSuggestions;
declare interface ChatPropsBase {
handleSubmit: (event?: {
preventDefault?: () => void;
}, options?: {
experimental_attachments?: FileList;
}) => void;
messages: Array<Message>;
input: string;
className?: string;
handleInputChange: React.ChangeEventHandler<HTMLTextAreaElement>;
isGenerating: boolean;
stop?: () => void;
onRateResponse?: (messageId: string, rating: "thumbs-up" | "thumbs-down") => void;
setMessages?: (messages: any[]) => void;
transcribeAudio?: (blob: Blob) => Promise<string>;
allowAttachments?: boolean;
onEdit?: (messageId: string, newContent: string) => void;
onMessageSave?: (messageId: string, content: string) => void;
welcomeTitle?: string;
}
declare interface ChatPropsWithoutSuggestions extends ChatPropsBase {
append?: never;
suggestions?: never;
}
declare interface ChatPropsWithSuggestions extends ChatPropsBase {
append: (message: {
role: "user";
content: string;
}) => void;
suggestions: string[];
}
export declare function Checkbox({ className, checked, ...props }: React_2.ComponentProps<typeof CheckboxPrimitive.Root>): JSX.Element;
export declare function CircularProgress({ value, renderLabel, className, progressClassName, labelClassName, showLabel, shape, size, strokeWidth, circleStrokeWidth, progressStrokeWidth, }: CircularProgressProps): JSX.Element;
declare interface CircularProgressProps {
value: number;
renderLabel?: (progress: number) => number | string;
size?: number;
strokeWidth?: number;
circleStrokeWidth?: number;
progressStrokeWidth?: number;
shape?: "square" | "round";
className?: string;
progressClassName?: string;
labelClassName?: string;
showLabel?: boolean;
}
export declare function cn(...inputs: ClassValue[]): string;
export declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): JSX.Element;
export declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): JSX.Element;
export declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): JSX.Element;
export declare const Command: React_2.ForwardRefExoticComponent<Omit<{
children?: React_2.ReactNode;
} & Pick<Pick<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React_2.HTMLAttributes<HTMLDivElement>> & {
ref?: React_2.Ref<HTMLDivElement>;
} & {
asChild?: boolean;
}, "key" | keyof React_2.HTMLAttributes<HTMLDivElement> | "asChild"> & {
label?: string;
shouldFilter?: boolean;
filter?: (value: string, search: string, keywords?: string[]) => number;
defaultValue?: string;
value?: string;
onValueChange?: (value: string) => void;
loop?: boolean;
disablePointerSelection?: boolean;
vimBindings?: boolean;
} & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
export declare function CommandDialog({ title, description, children, ...props }: React_2.ComponentProps<typeof Dialog> & {
title?: string;
description?: string;
}): JSX.Element;
export declare function CommandEmpty({ ...props }: React_2.ComponentProps<typeof Command_2.Empty>): JSX.Element;
export declare function CommandGroup({ className, ...props }: React_2.ComponentProps<typeof Command_2.Group>): JSX.Element;
export declare function CommandInput({ className, ...props }: React_2.ComponentProps<typeof Command_2.Input>): JSX.Element;
export declare function CommandItem({ className, ...props }: React_2.ComponentProps<typeof Command_2.Item>): JSX.Element;
export declare function CommandList({ className, ...props }: React_2.ComponentProps<typeof Command_2.List>): JSX.Element;
export declare function CommandSeparator({ className, ...props }: React_2.ComponentProps<typeof Command_2.Separator>): JSX.Element;
export declare function CommandShortcut({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
declare const confirm_2: (payload: ConfirmOptions) => Promise<boolean>;
export { confirm_2 as confirm }
export declare interface ConfirmedCell {
fromId: string;
toId: string;
id?: string;
value: any;
}
export declare interface ConfirmedCellsData {
editedCells: ConfirmedCell[];
toDefaultCells: ConfirmedCell[];
}
export declare const Confirmer: () => JSX.Element;
declare interface ConfirmOptions {
title?: React.ReactNode;
description?: React.ReactNode;
cancelText?: React.ReactNode;
actionText?: React.ReactNode;
CancelProps?: React.ComponentProps<typeof AlertDialogCancel>;
ActionProps?: React.ComponentProps<typeof Button>;
}
export declare function ContextMenu({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Root>): JSX.Element;
export declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): JSX.Element;
export declare function ContextMenuContent({ className, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Content>): JSX.Element;
export declare function ContextMenuGroup({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Group>): JSX.Element;
export declare function ContextMenuItem({ className, inset, variant, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Item> & {
inset?: boolean;
variant?: "default" | "destructive";
}): JSX.Element;
export declare function ContextMenuLabel({ className, inset, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Label> & {
inset?: boolean;
}): JSX.Element;
export declare function ContextMenuPortal({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Portal>): JSX.Element;
export declare function ContextMenuRadioGroup({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): JSX.Element;
export declare function ContextMenuRadioItem({ className, children, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): JSX.Element;
export declare function ContextMenuSeparator({ className, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Separator>): JSX.Element;
export declare function ContextMenuShortcut({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
export declare function ContextMenuSub({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Sub>): JSX.Element;
export declare function ContextMenuSubContent({ className, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.SubContent>): JSX.Element;
export declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
inset?: boolean;
}): JSX.Element;
export declare function ContextMenuTrigger({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Trigger>): JSX.Element;
declare const Controls: default_2.FC<ControlsProps>;
declare interface ControlsProps {
className?: string;
}
export declare function CopyButton({ content, copyMessage }: CopyButtonProps): JSX.Element;
declare type CopyButtonProps = {
content: string;
copyMessage?: string;
};
export declare interface CrossTableCell {
render?: (fromId: string, toId: string, id?: string) => ReactNode;
value?: number | string | null;
bgColor?: string;
textColor?: string;
fromId: string;
toId: string;
id?: string;
editable?: boolean;
}
export declare interface CrossTableData {
headerTop: CrossTableHeader[];
headerLeft: CrossTableHeader[];
data: (CrossTableCell | null)[][];
}
export declare interface CrossTableHeader {
id: string;
label: string;
}
export declare function DataCrossTable({ crossTableData, filterable, loading, emptyComponent, className, notFoundMessage, cornerHeaderFrom, cornerHeaderTo, minWidthCell, editable, editMode, onEditModeChange, onSelectedRow, selectedRow, rowSortAsc, }: DataCrossTableProps): JSX.Element;
export declare const DataCrossTableButtonsGroup: default_2.FC<DataCrossTableButtonsGroupProps>;
export declare interface DataCrossTableButtonsGroupProps {
className?: string;
}
declare interface DataCrossTableContextType {
editedCells: Record<string, {
value: any;
cell: CrossTableCell;
}>;
setEditedCells: default_2.Dispatch<default_2.SetStateAction<Record<string, {
value: any;
cell: CrossTableCell;
}>>>;
toDefaultCells: Record<string, {
value: any;
cell: CrossTableCell;
}>;
setToDefaultCells: default_2.Dispatch<default_2.SetStateAction<Record<string, {
value: any;
cell: CrossTableCell;
}>>>;
editMode: boolean;
setEditMode: (mode: boolean) => void;
onConfirmedCells?: (data: ConfirmedCellsData) => void;
editConfirmLabel: string;
editCancelLabel: string;
editRestoreDefaultLabel: string;
showDefaultActionButton: boolean;
cellEditTitleLabel: string;
cellEditModifiedLabel: string;
cellConfirmButtonLabel: string;
cellCancelButtonLabel: string;
cellResetButtonLabel: string;
}
export declare interface DataCrossTableProps {
crossTableData: CrossTableData;
filterable?: boolean;
loading?: boolean;
emptyComponent?: ReactNode;
className?: string;
notFoundMessage?: string;
cornerHeaderFrom?: string;
cornerHeaderTo?: string;
minWidthCell?: number;
showFreezeControls?: boolean;
editable?: boolean;
editMode?: boolean;
editConfirmLabel?: string;
editCancelLabel?: string;
onConfirmedCells?: (cells: ConfirmedCellsData) => void;
onEditModeChange?: (editMode: boolean) => void;
onSelectedRow?: (row: CrossTableHeader) => void;
selectedRow?: CrossTableHeader;
rowSortAsc?: boolean;
}
export declare const DataCrossTableProvider: default_2.FC<DataCrossTableProviderProps>;
export declare interface DataCrossTableProviderProps {
children: ReactNode | ((context: DataCrossTableContextType) => ReactNode);
onConfirmedCells?: (data: ConfirmedCellsData) => void;
editConfirmLabel?: string;
editCancelLabel?: string;
editRestoreDefaultLabel?: string;
initialEditMode?: boolean;
showDefaultActionButton?: boolean;
cellEditTitleLabel?: string;
cellEditModifiedLabel?: string;
cellConfirmButtonLabel?: string;
cellCancelButtonLabel?: string;
cellResetButtonLabel?: string;
}
export declare enum DataRepeatTypes {
DAY = "DAY",
WEEK = "WEEK",
MONTH = "MONTH"
}
export declare function DataTable<TData, TValue>({ columns, data, loading, emptyComponent, className, rowSelection, onRowSelectionChange, checkable, onCheckedRowsChange, notFoundMessage, searchBar, dropdownFilters, totalItems, datatableSizes, paginationPlaceholders, serverOptions, setServerOptions, }: DataTableProps<TData, TValue>): JSX.Element;
export declare interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[];
data: TData[];
loading?: boolean;
emptyComponent?: ReactNode;
className?: string;
rowSelection?: Record<string, boolean>;
onRowSelectionChange?: OnChangeFn<Record<string, boolean>>;
checkable?: boolean;
onCheckedRowsChange?: (checkedRows: TData[]) => void;
notFoundMessage?: string;
searchBar?: ISearchBarProps;
dropdownFilters?: IDropdownFilterProp[];
totalItems?: number;
datatableSizes?: IDatatableSizes;
paginationPlaceholders?: IDatatablePaginationPlaceholders;
serverOptions?: IServerOptionsProps;
setServerOptions?: (value: SetStateAction<IServerOptionsProps>) => void;
}
export declare function DatePicker({ value, onChange, placeholder, dateFormat, className, buttonVariant, disabled, size, }: DatePickerProps): JSX.Element;
declare interface DatePickerProps {
value?: Date;
onChange?: (date: Date | undefined) => void;
placeholder?: string;
dateFormat?: string;
className?: string;
buttonVariant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
disabled?: boolean;
size?: "sm" | "default" | "lg";
}
export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
export declare function DialogContent({ className, children, size, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
size?: "sm" | "default" | "lg";
}): JSX.Element;
export declare function DialogDescription({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Description>): JSX.Element;
export declare function DialogFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function DialogHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Title>): JSX.Element;
export declare function DialogTrigger({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element;
export declare enum DragStepSizes {
FIVE_MIN = "FIVE_MIN",
TEN_MIN = "TEN_MIN",
FIFTEEN_MIN = "FIFTEEN_MIN",
TWENTY_MIN = "TWENTY_MIN",
THIRTY_MIN = "THIRTY_MIN",
ONE_HOUR = "ONE_HOUR",
EIGHT_HOURS = "EIGHT_HOURS",
TWELVE_HOURS = "TWELVE_HOURS",
ONE_DAY = "ONE_DAY"
}
export declare function Drawer({ ...props }: React_2.ComponentProps<typeof Drawer_2.Root>): JSX.Element;
export declare function DrawerContent({ className, children, ...props }: React_2.ComponentProps<typeof Drawer_2.Content>): JSX.Element;
export declare function DrawerDescription({ className, ...props }: React_2.ComponentProps<typeof Drawer_2.Description>): JSX.Element;
export declare function DrawerFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function DrawerHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function DrawerTitle({ className, ...props }: React_2.ComponentProps<typeof Drawer_2.Title>): JSX.Element;
export declare function DrawerTrigger({ ...props }: React_2.ComponentProps<typeof Drawer_2.Trigger>): JSX.Element;
export declare const DropdownMenu: React_2.FC<DropdownMenuPrimitive.DropdownMenuProps>;
export declare const DropdownMenuContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
inset?: boolean;
} & React_2.RefAttributes<HTMLDivElement>>;
export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
inset?: boolean;
} & React_2.RefAttributes<HTMLDivElement>>;
export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
export declare enum ELogicalFilterOperator {
AND = "AND",
OR = "OR"
}
export declare const FilePreview: default_2.ForwardRefExoticComponent<FilePreviewProps & default_2.RefAttributes<HTMLDivElement>>;
declare interface FilePreviewProps {
file: IFilePreviewCallbackReturn;
onRemove?: (url: string) => void;
onPreview?: (url: string) => void;
onDownload?: (url: string) => void;
showActionMenu?: boolean;
className?: string;
}
export declare const FileUploader: default_2.FC<FileUploaderProps>;
declare interface FileUploaderProps {
accept?: string;
extensions?: AcceptItem[];
multiple?: boolean;
onUpload?: (files: File[]) => void;
buttonLabel?: string;
description?: string;
formatDescription?: string;
isLoading?: boolean;
selectedLabel?: string;
}
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
export declare function FormControl({ ...props }: React_2.ComponentProps<typeof Slot>): JSX.Element;
export declare function FormDescription({ className, ...props }: React_2.ComponentProps<"p">): JSX.Element;
export declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => JSX.Element;
export declare function FormItem({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function FormLabel({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
export declare function FormMessage({ className, ...props }: React_2.ComponentProps<"p">): JSX.Element | null;
export declare const Gantt: default_2.FC<GanttProps> & {
Chart: typeof Chart;
Controls: typeof Controls;
};
export declare const GanttConsts: {
ROW_HEIGHT: number;
HEADER_HEIGHT: number;
TREE_WIDTH: number;
LEAF_TITLE_PADDING_LEFT: number;
LEAF_CHILDREN_PADDING_LEFT: number;
SCALE_STEP_DEFAULT_WIDTH: number;
SECONDS_IN_HOUR: number;
SECONDS_IN_DAY: number;
HOURS_IN_DAY: number;
MIN_SCROLL_OFFSET: number;
SCALE_STEP_RATIO: number;
};
declare type GanttDataType<T = Record<string, unknown>> = RawGanttDataType<T> & {
[P in keyof T]: T[P];
};
export declare enum GanttDimensions {
HOUR = "hour",
TWO_HOURS = "twoHours",
THREE_HOURS = "threeHours",
FOUR_HOURS = "fourHours",
SIX_HOURS = "sixHours",
EIGHT_HOURS = "eightHours",
TWELVE_HOURS = "twelveHours",
DAY = "day"
}
declare type GanttItemDataType<T = Record<string, unknown>> = TransformedDataType<GanttDataType<T>> & {
/**
* Tree level of gantt item
*/
level: number;
/**
* Parents keys of gantt item
*/
parentsKeys: string[];
/**
* Color of gantt item
*/
color: string;
/**
* Is gantt item expanded?
*/
expanded?: boolean;
} & T;
declare type GanttProps = {
children: ReactNode | ReactNode[];
draggable?: boolean;
/**
* Dimensione predefinita per il controllo dello zoom (1h, 1g, ecc.)
* @default GanttDimensions.HOUR
*/
defaultDimension?: GanttDimensions;
/**
* Step size predefinito per il drag delle attività
* @default DragStepSizes.THIRTY_MIN
*/
defaultDragStepSize?: DragStepSizes;
/**
* Titolo personalizzato per la colonna dell'albero
* @default "Attività"
*/
treeTitle?: string;
};
export declare const hexContrast: (hex: string) => string;
export declare const hexToRgba: (hex: string, alpha: number) => string;
export declare function HoverCard({ ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Root>): JSX.Element;
export declare function HoverCardContent({ className, align, sideOffset, ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Content>): JSX.Element;
export declare function HoverCardTrigger({ ...props }: React_2.ComponentProps<typeof HoverCardPrimitive.Trigger>): JSX.Element;
export declare type IColumnDefWithSticky<TData, TValue = unknown> = ColumnDef<TData, TValue> & {
sticky?: boolean;
};
/**
* Componente Icon che renderizza un'icona da lucide-react
*
* @example
* ```tsx
* <Icon name="Check" size="md" />
* <Icon name="AlertCircle" size="lg" className="text-d-destructive" />
* <Icon name="ArrowRight" size="sm" color="#FF0000" />
* ```
*/
export declare function Icon({ name, size, className, color, ...props }: IconProps): JSX.Element | null;
export declare type IconName = keyof typeof LucideIcons;
declare interface IconProps {
name: IconName;
/** Dimensione dell'icona (xs, sm, md, lg, xl) */
size?: IconSize;
/** Classe CSS personalizzata */
className?: string;
/** Colore dell'icona (sovrascrive la classe) */
color?: string;
/** Attributi aggiuntivi */
[key: string]: any;
}
declare type IconSize = keyof typeof sizeMap;
export declare interface IDatatablePaginationPlaceholders {
rows?: string;
pages?: string;
first?: string;
previous?: string;
next?: string;
last?: string;
}
export declare interface IDatatableSizes {
rowHeight?: number;
headerHeight?: number;
containerHeight?: number;
}
export declare interface IDropdownFilterItem {
label: string;
value: string;
}
export declare interface IDropdownFilterProp {
column: string;
placeholder: string;
label?: string;
innerFiltersMode?: ELogicalFilterOperator;
items: IDropdownFilterItem[];
filterFn?: (rowValue: unknown, filterValue: string[]) => boolean;
}
declare type IFilePreviewCallbackReturn = File | {
name: string;
url: string;
type?: string;
};
export declare const Input: React_2.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
export declare function InputOTP({ className, containerClassName, ...props }: React_2.ComponentProps<typeof OTPInput> & {
containerClassName?: string;
}): JSX.Element;
export declare function InputOTPGroup({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
export declare function InputOTPSlot({ index, className, ...props }: React_2.ComponentProps<"div"> & {
index: number;
}): JSX.Element;
declare interface InputProps extends Omit<React_2.ComponentProps<"input">, "label" | "size">, VariantProps<typeof inputVariants> {
label?: string | React_2.ReactNode;
labelClassName?: string;
iconLeft?: IconName;
iconRight?: IconName;
}
export declare function InputSelector({ value, onChange, min, max, className, buttonClassName, counterClassName, }: InputSelectorProps): JSX.Element;
export declare interface InputSelectorProps {
value: number;
onChange?: (value: number) => void;
min?: number;
max?: number;
className?: string;
buttonClassName?: string;
counterClassName?: string;
}
declare const inputVariants: (props?: ({
size?: "default" | "sm" | "lg" | null | undefined;
} & ClassProp) | undefined) => string;
export declare function InterruptPrompt({ isOpen, close }: InterruptPromptProps): JSX.Element;
declare interface InterruptPromptProps {
isOpen: boolean;
close: () => void;
}
export declare interface IPaginationProps {
pageIndex: number;
pageSize: number;
}
export declare interface ISearchBarProps {
placeholder?: string;
columns: string[];
}
export declare interface IServerFilterProps {
searchbarFilters?: {
value: string;
columns: string[];
};
dropdownFilters?: {
[column: string]: {
logic: ELogicalFilterOperator;
value: string[];
column: string;
};
};
}
export declare interface IServerOptionsProps {
pagination: IPaginationProps;
filters?: IServerFilterProps;
disableAutoPageSize?: boolean;
}
export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
export declare function MarkdownRenderer({ children }: MarkdownRendererProps): JSX.Element;
declare interface MarkdownRendererProps {
children: string;
}
export declare function Menubar({ className, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Root>): JSX.Element;
export declare function MenubarCheckboxItem({ className, children, checked, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): JSX.Element;
export declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Content>): JSX.Element;
export declare function MenubarGroup({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Group>): JSX.Element;
export declare function MenubarItem({ className, inset, variant, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Item> & {
inset?: boolean;
variant?: "default" | "destructive";
}): JSX.Element;
export declare function MenubarLabel({ className, inset, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Label> & {
inset?: boolean;
}): JSX.Element;
export declare function MenubarMenu({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Menu>): JSX.Element;
export declare function MenubarPortal({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Portal>): JSX.Element;
export declare function MenubarRadioGroup({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.RadioGroup>): JSX.Element;
export declare function MenubarRadioItem({ className, children, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.RadioItem>): JSX.Element;
export declare function MenubarSeparator({ className, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Separator>): JSX.Element;
export declare function MenubarShortcut({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
export declare function MenubarSub({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Sub>): JSX.Element;
export declare function MenubarSubContent({ className, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.SubContent>): JSX.Element;
export declare function MenubarSubTrigger({ className, inset, children, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
inset?: boolean;
}): JSX.Element;
export declare function MenubarTrigger({ className, ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Trigger>): JSX.Element;
export declare interface Message {
id: string;
role: "user" | "assistant" | (string & {});
content: string;
createdAt?: Date;
experimental_attachments?: Attachment[];
toolInvocations?: ToolInvocation[];
parts?: MessagePart[];
}
export declare function MessageInput({ placeholder, className, onKeyDown: onKeyDownProp, submitOnEnter, stop, isGenerating, enableInterrupt, transcribeAudio, ...props }: MessageInputProps): JSX.Element;
export declare namespace MessageInput {
var displayName: string;
}
declare interface MessageInputBaseProps extends default_2.TextareaHTMLAttributes<HTMLTextAreaElement> {
value: string;
submitOnEnter?: boolean;
stop?: () => void;
isGenerating: boolean;
enableInterrupt?: boolean;
transcribeAudio?: (blob: Blob) => Promise<string>;
}
declare type MessageInputProps = MessageInputWithoutAttachmentProps | MessageInputWithAttachmentsProps;
declare interface MessageInputWithAttachmentsProps extends MessageInputBaseProps {
allowAttachments: true;
files: File[] | null;
setFiles: default_2.Dispatch<default_2.SetStateAction<File[] | null>>;
}
declare interface MessageInputWithoutAttachmentProps extends MessageInputBaseProps {
allowAttachments?: false;
}
export declare function MessageList({ messages, showTimeStamps, isTyping, messageOptions, onEdit, onMessageSave, }: MessageListProps): JSX.Element;
declare interface MessageListProps {
messages: Message[];
showTimeStamps?: boolean;
isTyping?: boolean;
messageOptions?: AdditionalMessageOptions | ((message: Message) => AdditionalMessageOptions);
onEdit?: (messageId: string, newContent: string) => void;
onMessageSave?: (messageId: string, content: string) => void;
}
declare type MessagePart = TextPart | ReasoningPart | ToolInvocationPart | SourcePart;
declare interface MultipleSelectDropdownProps {
options: AppMultipleSelectOption[];
value: string[];
onChange: (value: string[]) => void;
onClear?: () => void;
placeholder?: string;
disabled?: boolean;
size?: MultipleSelectSizeType;
label?: string | React_2.ReactNode;
labelClassName?: string;
emptyMessage?: string;
className?: string;
searchPlaceholder?: string;
searchable?: boolean;
maxSelectedItems?: number;
cancelLabel?: string;
}
export declare const MultipleSelector: React_2.ForwardRefExoticComponent<MultipleSelectorProps & React_2.RefAttributes<MultipleSelectorRef>>;
declare interface MultipleSelectorProps {