|
| 1 | +import { Theme } from 'reflexjs' |
| 2 | + |
| 3 | +const theme: Theme = { |
| 4 | + useRootStyles: true, |
| 5 | + initialColorModeName: 'light', |
| 6 | + colors: { |
| 7 | + text: '#191924', |
| 8 | + background: '#fff', |
| 9 | + primary: '#06f', |
| 10 | + border: '#ebece9', |
| 11 | + modes: { |
| 12 | + dark: { |
| 13 | + text: '#ededee', |
| 14 | + background: '#1a202c', |
| 15 | + primary: '#06f', |
| 16 | + border: '#2a2a3c', |
| 17 | + }, |
| 18 | + }, |
| 19 | + }, |
| 20 | + breakpoints: ['640px', '768px', '1024px', '1280px'], |
| 21 | + fonts: { |
| 22 | + body: |
| 23 | + '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji', |
| 24 | + heading: 'inherit', |
| 25 | + monospace: |
| 26 | + 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace', |
| 27 | + }, |
| 28 | + fontSizes: { |
| 29 | + sm: '0.875rem', |
| 30 | + md: '1rem', |
| 31 | + lg: '3rem', |
| 32 | + }, |
| 33 | + fontWeights: { |
| 34 | + normal: 400, |
| 35 | + medium: 500, |
| 36 | + bold: 700, |
| 37 | + }, |
| 38 | + space: { |
| 39 | + 0: '0', |
| 40 | + 1: '0.25rem', |
| 41 | + 2: '0.5rem', |
| 42 | + 3: '0.75rem', |
| 43 | + 4: '1rem', |
| 44 | + 5: '1.25rem', |
| 45 | + 6: '1.5rem', |
| 46 | + 7: '1.75rem', |
| 47 | + 8: '2rem', |
| 48 | + 9: '2.25rem', |
| 49 | + 10: '2.5rem', |
| 50 | + }, |
| 51 | + sizes: { |
| 52 | + 0: '0', |
| 53 | + 1: '0.25rem', |
| 54 | + 2: '0.5rem', |
| 55 | + 3: '0.75rem', |
| 56 | + 4: '1rem', |
| 57 | + 5: '1.25rem', |
| 58 | + 6: '1.5rem', |
| 59 | + 7: '1.75rem', |
| 60 | + 8: '2rem', |
| 61 | + 9: '2.25rem', |
| 62 | + 10: '2.5rem', |
| 63 | + auto: 'auto', |
| 64 | + half: '50%', |
| 65 | + full: '100%', |
| 66 | + screen: '100vw', |
| 67 | + }, |
| 68 | + borders: [0, '1px solid'], |
| 69 | + radii: { |
| 70 | + none: '0', |
| 71 | + sm: '0.125rem', |
| 72 | + md: '0.25rem', |
| 73 | + lg: '0.375rem', |
| 74 | + xl: '0.5rem', |
| 75 | + }, |
| 76 | + shadows: { |
| 77 | + none: 'none', |
| 78 | + sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)', |
| 79 | + md: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', |
| 80 | + lg: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', |
| 81 | + }, |
| 82 | + gridTemplateColumns: { |
| 83 | + none: 'none', |
| 84 | + 1: 'repeat(1, minmax(0, 1fr))', |
| 85 | + 2: 'repeat(2, minmax(0, 1fr))', |
| 86 | + 3: 'repeat(3, minmax(0, 1fr))', |
| 87 | + }, |
| 88 | + gridTemplateRows: { |
| 89 | + none: 'none', |
| 90 | + 1: 'repeat(1, minmax(0, 1fr))', |
| 91 | + 2: 'repeat(2, minmax(0, 1fr))', |
| 92 | + 3: 'repeat(3, minmax(0, 1fr))', |
| 93 | + }, |
| 94 | + styles: { |
| 95 | + root: { |
| 96 | + fontFamily: 'body', |
| 97 | + fontSize: 16, |
| 98 | + lineHeight: 'normal', |
| 99 | + fontFeatureSettings: "'kern'", |
| 100 | + textRendering: 'optimizeLegibility', |
| 101 | + WebkitFontSmoothing: 'antialiased', |
| 102 | + '*': { |
| 103 | + listStyle: 'none', |
| 104 | + border: '0 solid', |
| 105 | + borderColor: 'border', |
| 106 | + m: 0, |
| 107 | + p: 0, |
| 108 | + |
| 109 | + '::selection': { |
| 110 | + bg: 'selection', |
| 111 | + }, |
| 112 | + }, |
| 113 | + body: { |
| 114 | + color: 'text', |
| 115 | + fontFamily: 'body', |
| 116 | + fontWeight: 'normal', |
| 117 | + fontSize: 'md', |
| 118 | + lineHeight: 'relaxed', |
| 119 | + letterSpacing: 'normal', |
| 120 | + }, |
| 121 | + }, |
| 122 | + }, |
| 123 | + |
| 124 | + // Variants. |
| 125 | + text: { |
| 126 | + paragraph: { |
| 127 | + fontSize: 'lg', |
| 128 | + my: 8, |
| 129 | + lineHeight: 8, |
| 130 | + }, |
| 131 | + }, |
| 132 | + |
| 133 | + heading: { |
| 134 | + color: 'heading', |
| 135 | + fontFamily: 'heading', |
| 136 | + fontWeight: 'semibold', |
| 137 | + lineHeight: 'tight', |
| 138 | + letterSpacing: 'tight', |
| 139 | + |
| 140 | + h1: { |
| 141 | + fontWeight: 'bold', |
| 142 | + lineHeight: '1.1', |
| 143 | + fontSize: 'lg', |
| 144 | + }, |
| 145 | + }, |
| 146 | + |
| 147 | + container: { |
| 148 | + px: '6|6|6|4', |
| 149 | + mx: 'auto', |
| 150 | + maxWidth: 1280, |
| 151 | + }, |
| 152 | + |
| 153 | + button: { |
| 154 | + display: 'inline-flex', |
| 155 | + alignItems: 'center', |
| 156 | + justifyContent: 'center', |
| 157 | + color: 'text', |
| 158 | + bg: 'muted', |
| 159 | + fontFamily: 'body', |
| 160 | + fontSize: 'md', |
| 161 | + fontWeight: 'medium', |
| 162 | + lineHeight: 'none', |
| 163 | + textDecoration: 'none', |
| 164 | + border: '1px solid', |
| 165 | + borderColor: 'border', |
| 166 | + borderRadius: 'md', |
| 167 | + px: 4, |
| 168 | + py: 3, |
| 169 | + cursor: 'pointer', |
| 170 | + transition: 'all .15s ease-in', |
| 171 | + |
| 172 | + ':hover, :focus': { |
| 173 | + transform: 'translateY(-2px)', |
| 174 | + boxShadow: 'lg', |
| 175 | + }, |
| 176 | + |
| 177 | + primary: { |
| 178 | + bg: 'primary', |
| 179 | + color: 'white', |
| 180 | + borderColor: 'primary', |
| 181 | + |
| 182 | + '&:hover, &:focus': { |
| 183 | + bg: 'primaryHover', |
| 184 | + color: 'white', |
| 185 | + borderColor: 'primaryHover', |
| 186 | + transform: 'translateY(-2px)', |
| 187 | + boxShadow: 'lg', |
| 188 | + }, |
| 189 | + }, |
| 190 | + }, |
| 191 | +} |
| 192 | + |
| 193 | +export default theme |
0 commit comments