tailwindcss-3d
Version:
Add 3D transforms to your TailwindCSS project
49 lines (48 loc) • 2.48 kB
TypeScript
export declare const VALID_LENGTH_UNITS: string[];
export declare const VALID_ANGLE_UNITS: string[];
export declare const VALID_TIME_UNITS: string[];
export type UnsafeCSSValue = string | number | undefined;
export declare const toStringValue: (value: UnsafeCSSValue) => string | undefined;
export declare const toNumericValue: (value: UnsafeCSSValue) => number | undefined;
interface NumericValueAndUnit {
value: number | undefined;
unit: string | undefined;
}
export declare const toNumericValueAndUnit: (value: UnsafeCSSValue, validUnits?: string | string[]) => NumericValueAndUnit;
type NormaliseUnionValueFunction = (value: UnsafeCSSValue, defaultValue?: UnsafeCSSValue, allowedValues?: string | string[]) => string | undefined;
export declare const normaliseUnionValue: NormaliseUnionValueFunction;
interface Limit {
limit: number;
inclusive?: boolean;
adjustBy?: number;
}
interface NormaliseUnitValueOptions {
defaultNil?: '0' | 'none' | '';
allowNone?: boolean;
allowVar?: boolean;
allowCalc?: boolean;
defaultUnit?: string;
validUnits?: string[];
disallowValues?: number | number[];
allowDecimal?: boolean;
upperLimit?: number | Limit;
lowerLimit?: number | Limit;
}
type NormaliseUnitValueFunction = (value: UnsafeCSSValue, defaultValue?: UnsafeCSSValue, options?: NormaliseUnitValueOptions) => string;
export declare const normaliseUnitValue: NormaliseUnitValueFunction;
interface NormaliseAlphaValueOptions {
percentage?: NormaliseUnitValueOptions;
number?: NormaliseUnitValueOptions;
}
type NormaliseAlphaValueFunction = (value: UnsafeCSSValue, defaultValue?: UnsafeCSSValue, options?: NormaliseAlphaValueOptions) => string | undefined;
export declare const normaliseAlphaValue: NormaliseAlphaValueFunction;
export declare const normaliseAngleValue: NormaliseUnitValueFunction;
export declare const normaliseAnglePercentageValue: NormaliseUnitValueFunction;
export declare const normaliseLengthValue: NormaliseUnitValueFunction;
export declare const normaliseLengthPercentageValue: NormaliseUnitValueFunction;
export declare const normaliseNumberValue: NormaliseUnitValueFunction;
export declare const normaliseNumberPercentageValue: NormaliseUnitValueFunction;
export declare const normalisePercentageValue: NormaliseUnitValueFunction;
export declare const normaliseTimeValue: NormaliseUnitValueFunction;
export declare const normaliseTimePercentageValue: NormaliseUnitValueFunction;
export {};