@dreamy-ui/panda-preset
Version:
A panda preset for Dreamy UI React component library
88 lines (82 loc) • 5.91 kB
text/typescript
import * as _pandacss_types from '@pandacss/types';
import { PandaPlugin } from '@pandacss/types';
import { Preset } from '@pandacss/dev';
/**
* This plugin is used to modify the `jsx` directory in the `styled-system` folder,
* to remove the jsx generated filed from patterns, since Dreamy UI has its own jsx implementation.
*
* This function does not throw at errors, since it is not required to build.
*/
declare const dreamyPlugin: PandaPlugin;
type BorderRadius = (typeof BorderRadii)[number];
declare const BorderRadii: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl"];
type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
declare const parts: {
button: (config: Partial<Record<"root" | "leftIcon" | "rightIcon" | "ripple" | "rippleContainer" | "icons", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "leftIcon" | "rightIcon" | "ripple" | "rippleContainer" | "icons", _pandacss_types.SystemStyleObject>>;
checkbox: (config: Partial<Record<"icon" | "root" | "group" | "control" | "label", _pandacss_types.SystemStyleObject>>) => Partial<Record<"icon" | "root" | "group" | "control" | "label", _pandacss_types.SystemStyleObject>>;
field: (config: Partial<Record<"error" | "root" | "label" | "helpText" | "requiredIndicator" | "errorIcon", _pandacss_types.SystemStyleObject>>) => Partial<Record<"error" | "root" | "label" | "helpText" | "requiredIndicator" | "errorIcon", _pandacss_types.SystemStyleObject>>;
image: (config: Partial<Record<"image" | "zoomedWrapper" | "wrapper" | "blurredImg", _pandacss_types.SystemStyleObject>>) => Partial<Record<"image" | "zoomedWrapper" | "wrapper" | "blurredImg", _pandacss_types.SystemStyleObject>>;
avatar: (config: Partial<Record<"root" | "image" | "name" | "group" | "excess", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "image" | "name" | "group" | "excess", _pandacss_types.SystemStyleObject>>;
checkboxCard: (config: Partial<Record<"icon" | "description" | "root" | "title" | "header" | "checkboxRoot" | "control" | "label", _pandacss_types.SystemStyleObject>>) => Partial<Record<"icon" | "description" | "root" | "title" | "header" | "checkboxRoot" | "control" | "label", _pandacss_types.SystemStyleObject>>;
radioCard: (config: Partial<Record<"description" | "root" | "title" | "header" | "control" | "label" | "wrapper" | "radioRoot", _pandacss_types.SystemStyleObject>>) => Partial<Record<"description" | "root" | "title" | "header" | "control" | "label" | "wrapper" | "radioRoot", _pandacss_types.SystemStyleObject>>;
snippet: (config: Partial<Record<"symbol" | "content" | "copy" | "pre" | "root" | "copyIcon" | "checkIcon", _pandacss_types.SystemStyleObject>>) => Partial<Record<"symbol" | "content" | "copy" | "pre" | "root" | "copyIcon" | "checkIcon", _pandacss_types.SystemStyleObject>>;
radio: (config: Partial<Record<"icon" | "root" | "group" | "control" | "label" | "wrapper", _pandacss_types.SystemStyleObject>>) => Partial<Record<"icon" | "root" | "group" | "control" | "label" | "wrapper", _pandacss_types.SystemStyleObject>>;
progressCircular: (config: Partial<Record<"circle" | "root" | "label" | "circleTrack" | "circleRange" | "valueText", _pandacss_types.SystemStyleObject>>) => Partial<Record<"circle" | "root" | "label" | "circleTrack" | "circleRange" | "valueText", _pandacss_types.SystemStyleObject>>;
progress: (config: Partial<Record<"root" | "filledTrack", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "filledTrack", _pandacss_types.SystemStyleObject>>;
skeleton: (config: Partial<Record<"root" | "textWrapper", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "textWrapper", _pandacss_types.SystemStyleObject>>;
switch: (config: Partial<Record<"root" | "control" | "label" | "thumb", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "control" | "label" | "thumb", _pandacss_types.SystemStyleObject>>;
toast: (config: Partial<Record<"container" | "icon" | "description" | "root" | "title" | "close", _pandacss_types.SystemStyleObject>>) => Partial<Record<"container" | "icon" | "description" | "root" | "title" | "close", _pandacss_types.SystemStyleObject>>;
tooltip: (config: Partial<Record<"root" | "arrowOuter" | "arrowInner", _pandacss_types.SystemStyleObject>>) => Partial<Record<"root" | "arrowOuter" | "arrowInner", _pandacss_types.SystemStyleObject>>;
};
interface LightDarkColor {
light: string;
dark: string;
}
interface PresetOptions {
backgrounds: {
light: string;
dark: string;
};
fonts: {
body: string;
heading: string;
mono: string;
};
primaryColor: string | LightDarkColor;
secondaryColor: string | LightDarkColor;
rounded: BorderRadius;
/**
* Color for the primary button. It depends on the `primaryColor` option.
* @default Dreamy UI will automatically resolve contrast to match the `primaryColor` option.
*/
buttonPrimaryTextColor: string | LightDarkColor;
/**
* Color for the secondary button. It depends on the `secondaryColor` option.
* @default Dreamy UI will automatically resolve contrast to match the `secondaryColor` option.
*/
buttonSecondaryTextColor: string | LightDarkColor;
}
declare const defaultPresetOptions: {
backgrounds: {
light: string;
dark: string;
};
fonts: {
body: string;
heading: string;
mono: string;
};
primaryColor: {
light: string;
dark: string;
};
secondaryColor: {
light: string;
dark: string;
};
rounded: "md";
};
declare function createDreamyPreset(optionsArg?: DeepPartial<PresetOptions>): Preset;
export { BorderRadii, type BorderRadius, type DeepPartial, type PresetOptions, createDreamyPreset as default, defaultPresetOptions, dreamyPlugin, parts };