@sandlada/mdc
Version:
@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.
14 lines • 1.04 kB
TypeScript
/**
* @license
* Copyright 2025 Kai-Orion & Sandlada
* SPDX-License-Identifier: MIT
*/
type LogicShapeSuffix = '-start-start' | '-start-end' | '-end-end' | '-end-start';
type SelectedKeys<T, K extends Array<keyof T> | 'all'> = K extends 'all' ? keyof T : K[number];
type GeneratedShapeTokens<T extends Record<PropertyKey, unknown>, K extends Array<keyof T> | 'all', Wrapped extends boolean> = {
[P in SelectedKeys<T, K> as `${Wrapped extends true ? `--_${string & P}` : string & P}${LogicShapeSuffix}`]: string;
};
export declare function createLogicShapeTokens<T extends Record<PropertyKey, string | null>, K extends Array<keyof T> | 'all'>(prefix: string, allTokens: T, shapeTokenKeys: K, wrapped?: true): GeneratedShapeTokens<T, K, true>;
export declare function createLogicShapeTokens<T extends Record<PropertyKey, string | null>, K extends Array<keyof T> | 'all'>(prefix: string, allTokens: T, shapeTokenKeys: K, wrapped: false): GeneratedShapeTokens<T, K, false>;
export {};
//# sourceMappingURL=create-logic-shape-tokens.d.ts.map