import { ComputedPlacement, AutoPlacement } from "@popperjs/core"; import { positiveScale } from "../tokens/sizing-scale"; export type ClassName = string | Array; /** * @deprecated */ export enum COMPLY_COMPANY_NAME { APTIBLE = "aptible", CONVEYOR = "conveyor", } /** * @deprecated */ export enum THEME { PRODUCT = "product", BRAND = "brand", } /** * @deprecated */ export enum PRODUCT_ID { COMPLY = "comply", DEPLOY = "deploy", TRUST_CENTER = "trustCenter", EXCHANGE = "exchange", } /** * @deprecated */ export enum PRODUCT_NAME { COMPLY = "Comply", DEPLOY = "Deploy", TRUST_CENTER = "Trust Center", EXCHANGE = "Exchange", } export enum STATUS_VARIANT { DEFAULT = "default", SUCCESS = "success", WARNING = "warning", DANGER = "danger", } export enum KEY_CODE { ESC = 27, // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values ESCAPE = 27, UP = 38, DOWN = 40, ENTER = 13, TAB = 9, HOME = 36, END = 35, BACKSPACE = 8, } export enum ORIENTATION { HORIZONTAL = "horizontal", VERTICAL = "vertical", } export enum JUSTIFY { AROUND = "around", BETWEEN = "between", CENTER = "center", END = "end", START = "start", } export type PopperPlacement = ComputedPlacement | AutoPlacement; export type Action = { label: string; onClick?: () => void; href?: string; external?: boolean; }; const sizingValues = Object.keys(positiveScale).map((val) => parseInt(val, 10)); /** * @deprecated Use SizingKeys instead */ export type Spacing = typeof sizingValues[number]; export type SizingKeys = typeof sizingValues[number]; export type DisclosureProps = { isOpen: boolean; onOpen(): void; onClose(): void; onToggle(): void; }; export type RequiredToasterProps = { /** * ID of the toaster instance; auto-generated */ id: string; /** * Method to dismiss the toaster instance; auto-generated */ onClose: () => void; };