import React, { CSSProperties, HTMLProps } from 'react'; import type { Property } from 'csstype'; import XBaseObject, { XBaseObjectProps } from './XBaseObject'; /** * 样式组件属性 */ export interface XBaseStyleProps extends XBaseObjectProps { /** * 样式模式,是桌面端还是移动端 */ styleMode?: string | 'web' | 'mobile' | 'miniApp'; /** * 样式类型 */ styleType?: string | 'default' | 'style1' | 'style2' | 'style3' | 'style4' | 'style5'; /** * 主题类型 */ theme?: string; /** * 组件class */ className?: string; /** * 组件样式 */ style?: CSSProperties; /** * 是否存在盒子 */ hasBox?: boolean; /** * 容器盒className */ boxClassName?: string; /** * 所有组件的容器盒样式,容器盒为一个div,参考react的style */ boxStyle?: CSSProperties; /** * 组件宽度 */ width?: Property.Width; /** * 组件最大宽度 */ maxWidth?: Property.MaxWidth; /** * 组件最小宽度 */ minWidth?: Property.MinWidth; /** * 组件高度 */ height?: Property.Height; /** * 组件最大高度 */ maxHeight?: Property.MaxHeight; /** * 组件最小高度 */ minHeight?: Property.MinHeight; /** * 设置是否显示边框,默认边框为1px的黑色实线 */ showBorder?: boolean; /** * 内部填充范围 TRBL分别为上右下左,参考Css中padding */ paddingTRBL?: string; /** * 外部边框范围,参考Css中margin */ marginTRBL?: string; /** * 组件是否可见 */ visible?: boolean; /** * 组件的z-index */ zIndex?: Property.ZIndex; /** * 滚动条 */ overflow?: Property.Overflow; /** * 鼠标样式 */ cursor?: Property.Cursor; /** * 字体颜色 */ color?: Property.Color; /** * 背景颜色 */ backgroundColor?: Property.Color; /** * 组件在XFlex布局中的flex定义,如:0 0 auto */ flex?: Property.Flex; /** * 组件在XGrid布局中的位置,[1,2]表示在第1行第2列 */ grid?: number[]; /** * 组件在XGrid布局中的跨行列的数量,[2,1]表示在对应位置上跨两行一列 */ gridSpan?: number[]; /** * 组件在XFlex和XGrid布局中,所在单元格中垂直方向的布局,与css中定义一致 */ alignSelf?: Property.AlignSelf; /** * 组件在XFlex和XGrid布局中,所在单元格中水平方向的布局,与css中定义一致 */ justifySelf?: Property.JustifySelf; htmlProps?: HTMLProps; } /** * 基础样式组件 * 基础样式组件继承于基础组件,为每个组件增加一个外包盒,提供了样式相关的属性和方法,兼容HTML的样式设置。 * @name 基础样式组件 * @groupName 基础 */ export default class XBaseStyle extends XBaseObject { static Theme: { light: string; dark: string; gray: string; red: string; green: string; blue: string; }; static StyleMode: { web: string; mobile: string; miniApp: string; }; static StyleType: { default: string; style1: string; style2: string; style3: string; style4: string; style5: string; style6: string; }; static Overflow: { auto: string; hidden: string; unset: string; }; static FontSize: { small: string; middle: string; large: string; }; static Color: { success: string; warn: string; error: string; }; static Align: { start: string; end: string; center: string; spaceEvenly: string; spaceAround: string; spaceBetween: string; }; static BoxStyleCenterContent: { display: string; alignItems: string; justifyContent: string; }; static defaultProps: { styleType: string; hasBox: boolean; showBorder: any; overflow: string; boxStyle: {}; width: string; height: string; visible: boolean; grid: number[]; gridSpan: number[]; parent: string; pureRender: boolean; dataSourceUrl: string; filterData: {}; mustHasFilter: boolean; }; constructor(props: XBaseStyleProps & P); useStateVisible: boolean; /** * 设置组件的可见性 * @param visible */ SetVisible(visible: boolean): void; /** * 返回组件的可见性 */ GetVisible(): any; getBoxStyle(): React.CSSProperties; rootStyleDiv: HTMLDivElement; styleWrap: (node?: React.ReactNode) => string | number | boolean | Iterable | React.JSX.Element; } export declare const ThemeA: ({ children }: { children: any; }) => React.JSX.Element;