import type { DirectionType, WrapType, JustifyType, AlignType, AlignContentType } from '../types'; /** * 将间距值转换为 CSS 值 * @param value - 间距值,可以是数字或字符串 * @returns CSS 间距值字符串 * @example * normalizeGap(16) // '16px' * normalizeGap('1rem') // '1rem' * normalizeGap(undefined) // undefined */ export declare const normalizeGap: (value: number | string | undefined) => string | undefined; /** * 计算 flex-basis 值,考虑 gap 影响 * @param columns - 一行显示的元素个数 * @param gap - 间距值 * @returns flex-basis CSS 值 * @description 公式:calc((100% - gap * (N-1)) / N) * @example * calculateFlexBasis(4, 16) // 'calc((100% - 16px * 3) / 4)' * calculateFlexBasis(3, '1rem') // 'calc((100% - 1rem * 2) / 3)' */ export declare const calculateFlexBasis: (columns: number, gap?: number | string) => string; /** * 获取数据项的唯一 key * @param item - 数据项 * @param index - 索引 * @param rowKey - rowKey 配置 * @returns 唯一 key 字符串 * @example * getRowKey({ id: 1 }, 0, 'id') // '1' * getRowKey({ id: 1 }, 0, (item, index) => `item-${item.id}`) // 'item-1' * getRowKey({ id: 1 }, 0) // '0' */ export declare const getRowKey: (item: T, index: number, rowKey?: string | ((item: T, index: number) => string) | undefined) => string; /** * flex-direction 映射表 * @description 将 direction 属性值映射为 CSS flex-direction 值 */ export declare const DIRECTION_MAP: Record; /** * flex-wrap 映射表 * @description 将 wrap 属性值映射为 CSS flex-wrap 值 */ export declare const WRAP_MAP: Record; /** * justify-content 映射表 * @description 将 justify 属性值映射为 CSS justify-content 值 */ export declare const JUSTIFY_MAP: Record; /** * align-items 映射表 * @description 将 align 属性值映射为 CSS align-items 值 */ export declare const ALIGN_MAP: Record; /** * align-content 映射表 * @description 将 alignContent 属性值映射为 CSS align-content 值 */ export declare const ALIGN_CONTENT_MAP: Record; /** * 组件样式前缀 */ export declare const COMPONENT_PREFIX = "pisell-basic-grid";