goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
98 lines • 3.67 kB
TypeScript
import { default as React } from 'react';
/**
* Caller-supplied form-field styling. Mirrors the legacy `FormFieldStyles`
* surface that `ComplexTextEditorStyles` extended, inlined here so the editor
* no longer depends on `src/theme`.
*/
export interface ComplexTextEditorFormFieldStyles {
theme?: 'light' | 'dark' | 'sacred';
backgroundColor?: string;
borderColor?: string;
borderFocusedColor?: string;
borderErrorColor?: string;
textColor?: string;
labelColor?: string;
labelFocusedColor?: string;
labelErrorColor?: string;
adornmentColor?: string;
adornmentFocusedColor?: string;
footerTextColor?: string;
fontFamily?: string;
requiredIndicatorText?: string;
disabled?: boolean;
required?: boolean;
helperTextType?: 'error' | 'info';
padding?: string;
paddingLeft?: string;
paddingRight?: string;
paddingTop?: string;
paddingBottom?: string;
margin?: string;
marginTop?: string;
marginBottom?: string;
marginLeft?: string;
marginRight?: string;
borderRadius?: string;
borderWidth?: string;
fontSize?: string;
fontWeight?: string | number;
lineHeight?: string;
width?: string;
height?: string;
minWidth?: string;
maxWidth?: string;
minHeight?: string;
maxHeight?: string;
startAdornmentOffset?: string;
endAdornmentOffset?: string;
arrowTop?: string;
arrowRight?: string;
arrowBottom?: string;
arrowPadding?: string;
transitionDuration?: string;
transitionEasing?: string;
}
/**
* Build the caller-override CSS-variable object for the editor-area element
* (RichEditor / MarkdownEditor). Mirrors the OLD `getComplexTextEditorTheme`
* editorArea branch: each caller `styles?.editorX` override (falling back to
* `textColor` / `fontFamily` for color / font) is emitted as the matching
* `--ct-editor-*` custom property so it wins over the CSS-module defaults.
* Undefined values are omitted so the verbatim CSS defaults stay in effect.
*/
export declare const buildEditorAreaOverrideStyle: (styles?: ComplexTextEditorStyles) => React.CSSProperties | undefined;
/**
* Build the caller-override CSS-variable object for the toolbar wrapper
* (`.toolbarContainer`). Mirrors the OLD `getComplexTextEditorTheme` toolbar
* branch: `toolbarBackground` / `toolbarPadding` / `toolbarGap` map to the
* `--ct-toolbar-*` custom properties. Undefined values are omitted.
*/
export declare const buildToolbarOverrideStyle: (styles?: ComplexTextEditorStyles) => React.CSSProperties | undefined;
/**
* Build the caller-override CSS-variable for the container transition. Mirrors
* the OLD `getComplexTextEditorTheme` `transition` branch: when
* `transitionDuration` is set, emit `--ct-transition` as
* `all <duration> <easing|default>`; otherwise leave the CSS default in place.
*/
export declare const buildTransitionOverride: (styles?: ComplexTextEditorStyles) => string | undefined;
export interface ComplexTextEditorStyles extends ComplexTextEditorFormFieldStyles {
toolbarBackground?: string;
toolbarPadding?: string;
toolbarGap?: string;
editorBackground?: string;
editorBorderColor?: string;
editorFontFamily?: string;
editorFontSize?: string;
editorLineHeight?: string;
editorPadding?: string;
editorMinHeight?: string;
editorBoxShadow?: string;
sacredBackgroundImage?: string;
showToolbar?: boolean;
showModeToggle?: boolean;
defaultMode?: 'simple' | 'rich' | 'markdown';
accordionMode?: boolean;
accordionSummary?: React.ReactNode;
accordionDefaultExpanded?: boolean;
}
//# sourceMappingURL=theme.d.ts.map