@frank-auth/react
Version:
Flexible and customizable React UI components for Frank Authentication
1 lines • 1.34 kB
Source Map (JSON)
{"version":3,"file":"theme.cjs","sources":["../../../src/theme/theme.ts"],"sourcesContent":["import { tokens } from \"./tokens\";\n\nexport type ThemeMode = \"light\" | \"dark\";\n\nexport interface Theme {\n\tcolors: typeof tokens.colors.light;\n\tspacing: typeof tokens.spacing;\n\tfontSizes: typeof tokens.fontSizes;\n\tfontWeights: typeof tokens.fontWeights;\n\tlineHeights: typeof tokens.lineHeights;\n\tborderRadius: typeof tokens.borderRadius;\n\tshadows: typeof tokens.shadows;\n\ttransitions: typeof tokens.transitions;\n\tzIndex: typeof tokens.zIndex;\n}\n\nexport const createTheme = (mode: ThemeMode = \"light\"): Theme => ({\n\tcolors: tokens.colors[mode],\n\tspacing: tokens.spacing,\n\tfontSizes: tokens.fontSizes,\n\tfontWeights: tokens.fontWeights,\n\tlineHeights: tokens.lineHeights,\n\tborderRadius: tokens.borderRadius,\n\tshadows: tokens.shadows,\n\ttransitions: tokens.transitions,\n\tzIndex: tokens.zIndex,\n});\n\nexport const lightTheme = createTheme(\"light\");\nexport const darkTheme = createTheme(\"dark\");\n"],"names":["createTheme","mode","tokens"],"mappings":"gHAgBaA,EAAc,CAACC,EAAkB,WAAoB,CACjE,OAAQC,EAAAA,OAAO,OAAOD,CAAI,EAC1B,QAASC,EAAO,OAAA,QAChB,UAAWA,EAAO,OAAA,UAClB,YAAaA,EAAO,OAAA,YACpB,YAAaA,EAAO,OAAA,YACpB,aAAcA,EAAO,OAAA,aACrB,QAASA,EAAO,OAAA,QAChB,YAAaA,EAAO,OAAA,YACpB,OAAQA,EAAAA,OAAO,MAChB"}