@reusable-ui/groupable
Version:
Groups a list of UIs into a single UI.
35 lines (34 loc) • 1.63 kB
TypeScript
import { Factory, CssRule, CssStyleCollection, CssSelectorCollection, CssVars } from '@cssfn/core';
import { OrientationableOptions } from '@reusable-ui/orientationable';
export declare const defaultOrientationableOptions: OrientationableOptions;
export interface GroupableVars {
borderWidth: any;
borderStartStartRadius: any;
borderStartEndRadius: any;
borderEndStartRadius: any;
borderEndEndRadius: any;
paddingInline: any;
paddingBlock: any;
}
export declare const ifVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifFirstVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifLastVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifNotFirstVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifNotLastVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifSecondVisibleChild: (styles: CssStyleCollection) => CssRule;
export declare const ifNotSecondVisibleChild: (styles: CssStyleCollection) => CssRule;
export interface GroupableStuff {
groupableRule: Factory<CssRule>;
separatorRule: Factory<CssRule>;
groupableVars: CssVars<GroupableVars>;
}
export interface GroupableOptions extends OrientationableOptions {
itemsSelector?: CssSelectorCollection;
swapFirstItem?: boolean;
}
/**
* Groups a list of UIs into a single UI.
* @param options Options of `groupableRule`.
* @returns A `GroupableStuff` represents the group rules.
*/
export declare const usesGroupable: (options?: GroupableOptions) => GroupableStuff;