import { CSSPropertyRef, CSSSyntaxRef } from "design-to-code/dist/esm/data-utilities/mapping.mdn-data"; import { XOR } from "design-to-code/dist/esm/data-utilities/type.utilities"; import { Type } from "design-to-code/dist/esm/css-data.types"; import { Syntax } from "design-to-code/dist/esm/css-data.syntax"; import { CSSControlStylesheets } from "./control.css.props"; export interface RenderControlConfig { /** * This maps to the React key so as to ensure * that values do not persist when switching * between different syntax references */ key: string; /** * The change handler for form element onChange events * to use */ handleChange: (value: string) => void; /** * The current value */ value: string; /** * The current dictionary ID */ dictionaryId: string; /** * The current data location */ dataLocation: string; /** * The file paths to the web components stylesheets */ stylesheets: CSSControlStylesheets; } export interface RenderRefControlConfig extends RenderControlConfig { ref: XOR; } interface SelectControlOptions { /** * This maps to the React key so as to ensure * that values do not persist when switching * between different syntax references */ key: string; /** * The value of the option */ value: number | string; /** * The display name for the option */ displayName: string; } export interface RenderSelectControlConfig extends RenderControlConfig { options: SelectControlOptions[]; } declare type Uncategorized = "" | "" | ""; export declare type AllTypeKeys = Type | Syntax | Uncategorized; export declare type AllTypes = { [key in AllTypeKeys]: TConfig; }; export declare enum CSSControlType { "number" = 0, "text" = 1, "multiple" = 2, "function" = 3 } /** * Number values * * These are often appended with text such as "px" or "deg" */ interface AppendType { unit: string[]; } export interface NumberFieldTypeConfig { type: CSSControlType.number; append?: AppendType; } declare type NumberFieldType = Pick, "" | "" | "" | "" | "" | "" | "" | "" | "