import { ComponentProps, ExcludedProps, VariantProps } from "@vitality-ds/system"; import type { LucideIcon } from "lucide-react"; import React from "react"; import { ButtonPrimitiveProps } from "../Button/primitives/types"; import { ButtonProps } from "../Button/types"; import { RemoveBreakPointVariants, valueof } from "../helpers/logic/type-helpers"; import { TypographyProps } from "../Typography/types"; import { BaseCallout } from "./styled"; type Action = Pick & { label: string; icon?: ButtonPrimitiveProps["iconLeft"]; }; type Actions = { primary: Action; secondary?: Action; }; type SeverityVariants = Pick, "severity">; export type SeverityKeys = valueof>; export type DefaultContent = { title: string; titleColor: TypographyProps["color"]; icon: LucideIcon | React.FunctionComponent; spinnerColor: ButtonPrimitiveProps["spinnerColor"]; iconColor: string; }; export type DefaultContentOptions = { [K in SeverityKeys]: DefaultContent; }; export type CalloutContentHookType = { titleToDisplay: CalloutProps["title"]; titleColor: DefaultContent["titleColor"]; iconToDisplay: CalloutProps["icon"]; iconColor: DefaultContent["iconColor"]; spinnerColor: DefaultContent["spinnerColor"]; iconSize: "1rem"; isCompactLayout: boolean; }; export type CommonCalloutButtonProps = { size: ButtonPrimitiveProps["size"]; color: SeverityKeys; spinnerColor: ButtonPrimitiveProps["spinnerColor"]; }; export type CalloutProps = ExcludedProps & VariantProps & ComponentProps & { /** * Configure primary and secondary action button props */ actions?: Actions; /** * Descriptive text to describe the callout's purpose */ description: React.ReactNode; /** * Descriptive title to display in the callout * @default "Information" "Success" "Warning" "Critical" */ title?: string; /** * The severity used to communicate more meaning to the user * @default "info" */ severity?: SeverityKeys; /** * Icon to be displayed next to the title when visible. Each severity variant has a default icon. */ icon?: DefaultContent["icon"]; /** * */ size?: VariantProps["size"] | null; /** * Hide the Callout's title. */ hideTitle?: boolean; }; export {};