@volvo-cars/css
Version:
Volvo Cars shared CSS
1 lines • 978 B
Source Map (JSON)
{"version":3,"sources":["../src/tokens.ts","../src/to-kebab-case.ts"],"sourcesContent":["import { toKebabCase } from './to-kebab-case';\n\nexport interface Tokens {\n [key: string]: string;\n}\n\nconst tokens: Tokens = new Proxy(Object.create(null), {\n get(_target, key: string) {\n return `var(--v-${toKebabCase(key)})`;\n },\n});\n\nexport default tokens;\n","export function toKebabCase(x: string) {\n return x\n .replace(/([0-9])([A-Z])/g, '$1-$2')\n .replace(/([a-z])([A-Z0-9])/g, '$1-$2')\n .toLowerCase();\n}\n"],"mappings":"4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCAO,SAASI,EAAYC,EAAW,CACrC,OAAOA,EACJ,QAAQ,kBAAmB,OAAO,EAClC,QAAQ,qBAAsB,OAAO,EACrC,YAAY,CACjB,CDCA,IAAMC,EAAiB,IAAI,MAAM,OAAO,OAAO,IAAI,EAAG,CACpD,IAAIC,EAASC,EAAa,CACxB,MAAO,WAAWC,EAAYD,CAAG,CAAC,GACpC,CACF,CAAC,EAEME,EAAQJ","names":["tokens_exports","__export","tokens_default","__toCommonJS","toKebabCase","x","tokens","_target","key","toKebabCase","tokens_default"]}