UNPKG

@gulibs/vgrove-ui

Version:

VGrove UI component library built with HeroUI and React

156 lines 3.88 kB
import type { PropsWithChildren, SVGProps } from "react"; import type { DebugConfig } from "./client"; export interface ContainerProps extends PropsWithChildren { className?: string; } export type IconSvgProps = SVGProps<SVGSVGElement> & { size?: number; }; export type SvgContainerProps = PropsWithChildren & IconSvgProps; export interface Collapseable { isCollapsed?: boolean; } /** * 布局设置 - 与 VGrove 布局配置兼容 */ export interface LayoutSettings { /** 是否显示侧边栏 */ sidebar?: boolean; /** 是否显示导航栏/头部 */ header?: boolean; /** 是否显示页脚 */ footer?: boolean; /** 导航栏配置 */ navbar?: NavbarConfig; /** 侧边栏配置 */ sidebarConfig?: SidebarConfig; /** 页脚配置 */ footerConfig?: FooterConfig; /** 主题相关配置 */ theme?: ThemeConfig; /** 响应式配置 */ responsive?: ResponsiveConfig; /** 调试配置 */ debug?: DebugConfig; } /** * 导航栏配置 */ export interface NavbarConfig { /** 是否固定在顶部 */ sticky?: boolean; /** 背景透明度 */ transparent?: boolean; /** 高度 */ height?: string; } /** * 侧边栏配置 */ export interface SidebarConfig { /** 侧边栏宽度 */ width?: string; /** 是否可折叠 */ collapsible?: boolean; /** 默认是否折叠 */ defaultCollapsed?: boolean; } /** * 页脚配置 */ export interface FooterConfig { /** 是否固定在底部 */ sticky?: boolean; /** 高度 */ height?: string; } /** * 主题配置 */ export interface ThemeConfig { /** 主题模式 */ mode?: 'light' | 'dark' | 'auto'; /** 主色调 */ primaryColor?: string; } /** * 响应式配置 */ export interface ResponsiveConfig { /** 移动端是否隐藏侧边栏 */ hideSidebarOnMobile?: boolean; /** 移动端断点 */ mobileBreakpoint?: string; } export interface LayoutFeatures { hasSidebar: boolean; hasHeader: boolean; hasFooter: boolean; isSidebarCollapsible: boolean; isNavbarSticky: boolean; isFooterSticky: boolean; shouldHideSidebarOnMobile: boolean; } /** * 表单相关类型定义 */ /** 表单布局方向 */ export type FormLayout = 'horizontal' | 'vertical'; /** 标签对齐方式 */ export type LabelAlign = 'left' | 'right'; /** 表单验证状态 */ export type ValidateStatus = 'success' | 'warning' | 'error' | 'validating'; /** 网格列配置 */ export interface ColConfig { /** 占用列数 */ span?: number; /** 偏移列数 */ offset?: number; } /** 表单项布局配置 */ export interface FormItemLayout { /** 布局方向 */ layout?: FormLayout; /** 标签对齐方式 */ labelAlign?: LabelAlign; /** 标签列配置 (水平布局时) */ labelCol?: ColConfig; /** 包装列配置 (水平布局时) */ wrapperCol?: ColConfig; /** 是否显示冒号 */ colon?: boolean; } /** 表单项验证配置 */ export interface FormItemValidation { /** 是否必填 */ required?: boolean; /** 验证状态 */ validateStatus?: ValidateStatus; /** 自定义错误信息 */ errorMessage?: string; } /** 表单项内容配置 */ export interface FormItemContent { /** 标签内容 */ label?: React.ReactNode; /** 帮助文本 */ help?: React.ReactNode; /** 工具提示配置 */ tooltip?: { content: React.ReactNode; placement?: 'top' | 'bottom' | 'left' | 'right'; showArrow?: boolean; delay?: number; closeDelay?: number; }; /** 占位符 */ placeholder?: string; } /** 表单项交互配置 */ export interface FormItemInteraction { /** 是否可清除 */ canClear?: boolean; /** 自定义样式类 */ className?: string; } //# sourceMappingURL=types.d.ts.map