jasmincss 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +524 -0
- package/bin/jasmin.js +45 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +14568 -0
- package/dist/index.mjs +14524 -0
- package/dist/jasmin.css +63308 -0
- package/dist/jasmin.min.css +1 -0
- package/dist/plugins/nextjs.js +14777 -0
- package/dist/plugins/nextjs.mjs +14747 -0
- package/dist/plugins/vite.js +14889 -0
- package/dist/plugins/vite.mjs +14860 -0
- package/package.json +101 -0
- package/src/cli/add.js +83 -0
- package/src/cli/init.js +210 -0
- package/src/cli/run.js +142 -0
- package/src/components/accordion.js +309 -0
- package/src/components/alerts.js +357 -0
- package/src/components/avatars.js +331 -0
- package/src/components/badges.js +353 -0
- package/src/components/buttons.js +412 -0
- package/src/components/cards.js +342 -0
- package/src/components/carousel.js +495 -0
- package/src/components/chips.js +440 -0
- package/src/components/command-palette.js +434 -0
- package/src/components/datepicker.js +517 -0
- package/src/components/dropdown.js +411 -0
- package/src/components/forms.js +516 -0
- package/src/components/index.js +81 -0
- package/src/components/modals.js +349 -0
- package/src/components/navigation.js +463 -0
- package/src/components/offcanvas.js +390 -0
- package/src/components/popover.js +427 -0
- package/src/components/progress.js +396 -0
- package/src/components/rating.js +394 -0
- package/src/components/skeleton.js +408 -0
- package/src/components/spinner.js +453 -0
- package/src/components/stepper.js +389 -0
- package/src/components/tables.js +304 -0
- package/src/components/timeline.js +452 -0
- package/src/components/timepicker.js +529 -0
- package/src/components/tooltips.js +345 -0
- package/src/components/upload.js +490 -0
- package/src/config/defaults.js +263 -0
- package/src/config/loader.js +109 -0
- package/src/core/base.js +241 -0
- package/src/core/compiler.js +135 -0
- package/src/core/utilities/accessibility.js +290 -0
- package/src/core/utilities/animations.js +205 -0
- package/src/core/utilities/background.js +109 -0
- package/src/core/utilities/colors.js +234 -0
- package/src/core/utilities/columns.js +161 -0
- package/src/core/utilities/effects.js +261 -0
- package/src/core/utilities/filters.js +135 -0
- package/src/core/utilities/icons.js +806 -0
- package/src/core/utilities/index.js +239 -0
- package/src/core/utilities/layout.js +321 -0
- package/src/core/utilities/scroll.js +205 -0
- package/src/core/utilities/spacing.js +120 -0
- package/src/core/utilities/svg.js +191 -0
- package/src/core/utilities/transforms.js +116 -0
- package/src/core/utilities/typography.js +188 -0
- package/src/index.js +7 -0
- package/src/js/components/accordion.js +154 -0
- package/src/js/components/alert.js +198 -0
- package/src/js/components/carousel.js +226 -0
- package/src/js/components/dropdown.js +166 -0
- package/src/js/components/modal.js +169 -0
- package/src/js/components/offcanvas.js +175 -0
- package/src/js/components/popover.js +221 -0
- package/src/js/components/tabs.js +163 -0
- package/src/js/components/tooltip.js +200 -0
- package/src/js/index.js +79 -0
- package/src/js/types/config.d.ts +228 -0
- package/src/js/types/index.d.ts +439 -0
- package/src/plugins/nextjs.js +100 -0
- package/src/plugins/vite.js +133 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// Default JasminCSS Configuration
|
|
2
|
+
export const defaultConfig = {
|
|
3
|
+
projectName: 'my-project',
|
|
4
|
+
darkMode: true,
|
|
5
|
+
prefix: '',
|
|
6
|
+
|
|
7
|
+
// Content files to scan for class usage (tree-shaking)
|
|
8
|
+
content: [
|
|
9
|
+
'./**/*.{html,js,jsx,ts,tsx,vue,svelte,astro}',
|
|
10
|
+
'!./node_modules/**',
|
|
11
|
+
'!./dist/**'
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
// Branding configuration
|
|
15
|
+
branding: {
|
|
16
|
+
colors: {
|
|
17
|
+
primary: '#6366f1', // Indigo
|
|
18
|
+
secondary: '#ec4899', // Pink
|
|
19
|
+
accent: '#14b8a6', // Teal
|
|
20
|
+
success: '#22c55e', // Green
|
|
21
|
+
warning: '#f59e0b', // Amber
|
|
22
|
+
error: '#ef4444', // Red
|
|
23
|
+
info: '#3b82f6' // Blue
|
|
24
|
+
},
|
|
25
|
+
typography: {
|
|
26
|
+
fontFamily: 'Inter',
|
|
27
|
+
fontFamilyMono: 'JetBrains Mono',
|
|
28
|
+
baseFontSize: '16px',
|
|
29
|
+
lineHeight: 1.6
|
|
30
|
+
},
|
|
31
|
+
borderRadius: {
|
|
32
|
+
none: '0',
|
|
33
|
+
sm: '0.25rem',
|
|
34
|
+
default: '0.5rem',
|
|
35
|
+
md: '0.5rem',
|
|
36
|
+
lg: '0.75rem',
|
|
37
|
+
xl: '1rem',
|
|
38
|
+
'2xl': '1.5rem',
|
|
39
|
+
full: '9999px'
|
|
40
|
+
},
|
|
41
|
+
shadows: {
|
|
42
|
+
sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
43
|
+
default: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
44
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
45
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
46
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
47
|
+
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
48
|
+
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
49
|
+
glow: '0 0 20px rgb(99 102 241 / 0.4)',
|
|
50
|
+
none: 'none'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
// Selected components
|
|
55
|
+
components: ['buttons', 'cards', 'forms', 'navigation', 'alerts', 'badges'],
|
|
56
|
+
|
|
57
|
+
// Selected utilities
|
|
58
|
+
utilities: ['layout', 'spacing', 'typography', 'colors', 'effects', 'animations'],
|
|
59
|
+
|
|
60
|
+
// Extended colors palette
|
|
61
|
+
colors: {
|
|
62
|
+
// Grays - Neutral tones with slight warmth
|
|
63
|
+
gray: {
|
|
64
|
+
50: '#fafafa',
|
|
65
|
+
100: '#f4f4f5',
|
|
66
|
+
200: '#e4e4e7',
|
|
67
|
+
300: '#d4d4d8',
|
|
68
|
+
400: '#a1a1aa',
|
|
69
|
+
500: '#71717a',
|
|
70
|
+
600: '#52525b',
|
|
71
|
+
700: '#3f3f46',
|
|
72
|
+
800: '#27272a',
|
|
73
|
+
900: '#18181b',
|
|
74
|
+
950: '#09090b'
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
// Slate - Cool gray
|
|
78
|
+
slate: {
|
|
79
|
+
50: '#f8fafc',
|
|
80
|
+
100: '#f1f5f9',
|
|
81
|
+
200: '#e2e8f0',
|
|
82
|
+
300: '#cbd5e1',
|
|
83
|
+
400: '#94a3b8',
|
|
84
|
+
500: '#64748b',
|
|
85
|
+
600: '#475569',
|
|
86
|
+
700: '#334155',
|
|
87
|
+
800: '#1e293b',
|
|
88
|
+
900: '#0f172a',
|
|
89
|
+
950: '#020617'
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// Future-forward colors
|
|
93
|
+
neon: {
|
|
94
|
+
cyan: '#00f5ff',
|
|
95
|
+
pink: '#ff00f5',
|
|
96
|
+
green: '#00ff88',
|
|
97
|
+
blue: '#0088ff',
|
|
98
|
+
purple: '#8800ff',
|
|
99
|
+
yellow: '#ffee00'
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// Glass effects base colors
|
|
103
|
+
glass: {
|
|
104
|
+
light: 'rgba(255, 255, 255, 0.1)',
|
|
105
|
+
medium: 'rgba(255, 255, 255, 0.2)',
|
|
106
|
+
heavy: 'rgba(255, 255, 255, 0.3)',
|
|
107
|
+
dark: 'rgba(0, 0, 0, 0.1)'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
// Spacing scale
|
|
112
|
+
spacing: {
|
|
113
|
+
px: '1px',
|
|
114
|
+
0: '0',
|
|
115
|
+
0.5: '0.125rem',
|
|
116
|
+
1: '0.25rem',
|
|
117
|
+
1.5: '0.375rem',
|
|
118
|
+
2: '0.5rem',
|
|
119
|
+
2.5: '0.625rem',
|
|
120
|
+
3: '0.75rem',
|
|
121
|
+
3.5: '0.875rem',
|
|
122
|
+
4: '1rem',
|
|
123
|
+
5: '1.25rem',
|
|
124
|
+
6: '1.5rem',
|
|
125
|
+
7: '1.75rem',
|
|
126
|
+
8: '2rem',
|
|
127
|
+
9: '2.25rem',
|
|
128
|
+
10: '2.5rem',
|
|
129
|
+
11: '2.75rem',
|
|
130
|
+
12: '3rem',
|
|
131
|
+
14: '3.5rem',
|
|
132
|
+
16: '4rem',
|
|
133
|
+
20: '5rem',
|
|
134
|
+
24: '6rem',
|
|
135
|
+
28: '7rem',
|
|
136
|
+
32: '8rem',
|
|
137
|
+
36: '9rem',
|
|
138
|
+
40: '10rem',
|
|
139
|
+
44: '11rem',
|
|
140
|
+
48: '12rem',
|
|
141
|
+
52: '13rem',
|
|
142
|
+
56: '14rem',
|
|
143
|
+
60: '15rem',
|
|
144
|
+
64: '16rem',
|
|
145
|
+
72: '18rem',
|
|
146
|
+
80: '20rem',
|
|
147
|
+
96: '24rem'
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
// Breakpoints
|
|
151
|
+
breakpoints: {
|
|
152
|
+
sm: '640px',
|
|
153
|
+
md: '768px',
|
|
154
|
+
lg: '1024px',
|
|
155
|
+
xl: '1280px',
|
|
156
|
+
'2xl': '1536px'
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
// Animation durations
|
|
160
|
+
animation: {
|
|
161
|
+
duration: {
|
|
162
|
+
fast: '150ms',
|
|
163
|
+
normal: '300ms',
|
|
164
|
+
slow: '500ms',
|
|
165
|
+
slower: '700ms'
|
|
166
|
+
},
|
|
167
|
+
easing: {
|
|
168
|
+
linear: 'linear',
|
|
169
|
+
ease: 'ease',
|
|
170
|
+
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
171
|
+
easeOut: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
172
|
+
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
173
|
+
spring: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)'
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// Design templates
|
|
179
|
+
export const templates = {
|
|
180
|
+
futuristic: {
|
|
181
|
+
branding: {
|
|
182
|
+
colors: {
|
|
183
|
+
primary: '#00f5ff',
|
|
184
|
+
secondary: '#ff00f5',
|
|
185
|
+
accent: '#00ff88',
|
|
186
|
+
success: '#00ff88',
|
|
187
|
+
warning: '#ffee00',
|
|
188
|
+
error: '#ff3366',
|
|
189
|
+
info: '#0088ff'
|
|
190
|
+
},
|
|
191
|
+
typography: {
|
|
192
|
+
fontFamily: 'Space Grotesk'
|
|
193
|
+
},
|
|
194
|
+
borderRadius: {
|
|
195
|
+
default: '0.25rem'
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
darkMode: true
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
minimal: {
|
|
202
|
+
branding: {
|
|
203
|
+
colors: {
|
|
204
|
+
primary: '#18181b',
|
|
205
|
+
secondary: '#71717a',
|
|
206
|
+
accent: '#3b82f6',
|
|
207
|
+
success: '#22c55e',
|
|
208
|
+
warning: '#f59e0b',
|
|
209
|
+
error: '#ef4444',
|
|
210
|
+
info: '#3b82f6'
|
|
211
|
+
},
|
|
212
|
+
typography: {
|
|
213
|
+
fontFamily: 'Inter'
|
|
214
|
+
},
|
|
215
|
+
borderRadius: {
|
|
216
|
+
default: '0.25rem'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
darkMode: true
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
corporate: {
|
|
223
|
+
branding: {
|
|
224
|
+
colors: {
|
|
225
|
+
primary: '#1e40af',
|
|
226
|
+
secondary: '#475569',
|
|
227
|
+
accent: '#0891b2',
|
|
228
|
+
success: '#15803d',
|
|
229
|
+
warning: '#b45309',
|
|
230
|
+
error: '#b91c1c',
|
|
231
|
+
info: '#0369a1'
|
|
232
|
+
},
|
|
233
|
+
typography: {
|
|
234
|
+
fontFamily: 'DM Sans'
|
|
235
|
+
},
|
|
236
|
+
borderRadius: {
|
|
237
|
+
default: '0.375rem'
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
darkMode: true
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
creative: {
|
|
244
|
+
branding: {
|
|
245
|
+
colors: {
|
|
246
|
+
primary: '#7c3aed',
|
|
247
|
+
secondary: '#ec4899',
|
|
248
|
+
accent: '#f59e0b',
|
|
249
|
+
success: '#10b981',
|
|
250
|
+
warning: '#f97316',
|
|
251
|
+
error: '#f43f5e',
|
|
252
|
+
info: '#6366f1'
|
|
253
|
+
},
|
|
254
|
+
typography: {
|
|
255
|
+
fontFamily: 'Outfit'
|
|
256
|
+
},
|
|
257
|
+
borderRadius: {
|
|
258
|
+
default: '1rem'
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
darkMode: true
|
|
262
|
+
}
|
|
263
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { pathToFileURL } from 'url';
|
|
4
|
+
import { defaultConfig } from './defaults.js';
|
|
5
|
+
|
|
6
|
+
export async function loadConfig(configPath) {
|
|
7
|
+
if (!fs.existsSync(configPath)) {
|
|
8
|
+
throw new Error(`Config file not found: ${configPath}`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Convert to file URL for ESM import
|
|
12
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
13
|
+
|
|
14
|
+
// Add cache buster for watch mode
|
|
15
|
+
const cacheBuster = `?t=${Date.now()}`;
|
|
16
|
+
const module = await import(fileUrl + cacheBuster);
|
|
17
|
+
|
|
18
|
+
// Deep merge with defaults
|
|
19
|
+
return deepMerge(defaultConfig, module.default || module);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function deepMerge(target, source) {
|
|
23
|
+
const result = { ...target };
|
|
24
|
+
|
|
25
|
+
for (const key of Object.keys(source)) {
|
|
26
|
+
if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
|
|
27
|
+
result[key] = deepMerge(target[key] || {}, source[key]);
|
|
28
|
+
} else {
|
|
29
|
+
result[key] = source[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function resolveConfig(config) {
|
|
37
|
+
// Resolve font imports
|
|
38
|
+
const fonts = [];
|
|
39
|
+
const { fontFamily, fontFamilyMono } = config.branding.typography;
|
|
40
|
+
|
|
41
|
+
if (fontFamily && fontFamily !== 'system-ui') {
|
|
42
|
+
fonts.push(fontFamily.replace(/\s+/g, '+'));
|
|
43
|
+
}
|
|
44
|
+
if (fontFamilyMono && fontFamilyMono !== 'monospace') {
|
|
45
|
+
fonts.push(fontFamilyMono.replace(/\s+/g, '+'));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
config.resolvedFonts = fonts;
|
|
49
|
+
|
|
50
|
+
// Generate CSS custom properties
|
|
51
|
+
config.cssVariables = generateCssVariables(config);
|
|
52
|
+
|
|
53
|
+
return config;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function generateCssVariables(config) {
|
|
57
|
+
const vars = {};
|
|
58
|
+
const { branding, colors, spacing, breakpoints } = config;
|
|
59
|
+
|
|
60
|
+
// Brand colors
|
|
61
|
+
if (branding.colors) {
|
|
62
|
+
Object.entries(branding.colors).forEach(([name, value]) => {
|
|
63
|
+
vars[`--j-${name}`] = value;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Extended colors
|
|
68
|
+
if (colors) {
|
|
69
|
+
Object.entries(colors).forEach(([colorName, shades]) => {
|
|
70
|
+
if (typeof shades === 'object') {
|
|
71
|
+
Object.entries(shades).forEach(([shade, value]) => {
|
|
72
|
+
vars[`--j-${colorName}-${shade}`] = value;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Spacing
|
|
79
|
+
if (spacing) {
|
|
80
|
+
Object.entries(spacing).forEach(([key, value]) => {
|
|
81
|
+
vars[`--j-space-${key}`] = value;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Typography
|
|
86
|
+
if (branding.typography) {
|
|
87
|
+
const { fontFamily, fontFamilyMono, baseFontSize, lineHeight } = branding.typography;
|
|
88
|
+
vars['--j-font-sans'] = `"${fontFamily}", system-ui, -apple-system, sans-serif`;
|
|
89
|
+
vars['--j-font-mono'] = `"${fontFamilyMono}", ui-monospace, monospace`;
|
|
90
|
+
vars['--j-font-size-base'] = baseFontSize;
|
|
91
|
+
vars['--j-line-height'] = lineHeight;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Border radius
|
|
95
|
+
if (branding.borderRadius) {
|
|
96
|
+
Object.entries(branding.borderRadius).forEach(([key, value]) => {
|
|
97
|
+
vars[`--j-radius-${key}`] = value;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Shadows
|
|
102
|
+
if (branding.shadows) {
|
|
103
|
+
Object.entries(branding.shadows).forEach(([key, value]) => {
|
|
104
|
+
vars[`--j-shadow-${key}`] = value;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return vars;
|
|
109
|
+
}
|
package/src/core/base.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
export function generateBase(config) {
|
|
2
|
+
const { cssVariables, resolvedFonts, branding, darkMode } = config;
|
|
3
|
+
|
|
4
|
+
// Generate CSS custom properties
|
|
5
|
+
const customProps = Object.entries(cssVariables)
|
|
6
|
+
.map(([key, value]) => ` ${key}: ${value};`)
|
|
7
|
+
.join('\n');
|
|
8
|
+
|
|
9
|
+
// Font imports
|
|
10
|
+
const fontImports = resolvedFonts.length > 0
|
|
11
|
+
? `@import url('https://fonts.googleapis.com/css2?family=${resolvedFonts.join('&family=')}&display=swap');`
|
|
12
|
+
: '';
|
|
13
|
+
|
|
14
|
+
return `/* JasminCSS v1.0.0 - Modern CSS Framework */
|
|
15
|
+
/* https://github.com/jasmaine/JasminCSS */
|
|
16
|
+
|
|
17
|
+
${fontImports}
|
|
18
|
+
|
|
19
|
+
/* CSS Reset & Base Styles */
|
|
20
|
+
*, *::before, *::after {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
* {
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html {
|
|
30
|
+
-webkit-text-size-adjust: 100%;
|
|
31
|
+
tab-size: 4;
|
|
32
|
+
font-feature-settings: normal;
|
|
33
|
+
font-variation-settings: normal;
|
|
34
|
+
-webkit-tap-highlight-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
body {
|
|
38
|
+
line-height: inherit;
|
|
39
|
+
-webkit-font-smoothing: antialiased;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
img, picture, video, canvas, svg {
|
|
43
|
+
display: block;
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
input, button, textarea, select {
|
|
48
|
+
font: inherit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
p, h1, h2, h3, h4, h5, h6 {
|
|
52
|
+
overflow-wrap: break-word;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
a {
|
|
56
|
+
color: inherit;
|
|
57
|
+
text-decoration: inherit;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
button, [role="button"] {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:disabled {
|
|
65
|
+
cursor: default;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* CSS Custom Properties */
|
|
69
|
+
:root {
|
|
70
|
+
${customProps}
|
|
71
|
+
|
|
72
|
+
/* Additional computed values */
|
|
73
|
+
--j-font-size-xs: 0.75rem;
|
|
74
|
+
--j-font-size-sm: 0.875rem;
|
|
75
|
+
--j-font-size-base: 1rem;
|
|
76
|
+
--j-font-size-lg: 1.125rem;
|
|
77
|
+
--j-font-size-xl: 1.25rem;
|
|
78
|
+
--j-font-size-2xl: 1.5rem;
|
|
79
|
+
--j-font-size-3xl: 1.875rem;
|
|
80
|
+
--j-font-size-4xl: 2.25rem;
|
|
81
|
+
--j-font-size-5xl: 3rem;
|
|
82
|
+
--j-font-size-6xl: 3.75rem;
|
|
83
|
+
--j-font-size-7xl: 4.5rem;
|
|
84
|
+
--j-font-size-8xl: 6rem;
|
|
85
|
+
--j-font-size-9xl: 8rem;
|
|
86
|
+
|
|
87
|
+
/* Line heights */
|
|
88
|
+
--j-leading-none: 1;
|
|
89
|
+
--j-leading-tight: 1.25;
|
|
90
|
+
--j-leading-snug: 1.375;
|
|
91
|
+
--j-leading-normal: 1.5;
|
|
92
|
+
--j-leading-relaxed: 1.625;
|
|
93
|
+
--j-leading-loose: 2;
|
|
94
|
+
|
|
95
|
+
/* Letter spacing */
|
|
96
|
+
--j-tracking-tighter: -0.05em;
|
|
97
|
+
--j-tracking-tight: -0.025em;
|
|
98
|
+
--j-tracking-normal: 0;
|
|
99
|
+
--j-tracking-wide: 0.025em;
|
|
100
|
+
--j-tracking-wider: 0.05em;
|
|
101
|
+
--j-tracking-widest: 0.1em;
|
|
102
|
+
|
|
103
|
+
/* Z-index scale */
|
|
104
|
+
--j-z-auto: auto;
|
|
105
|
+
--j-z-0: 0;
|
|
106
|
+
--j-z-10: 10;
|
|
107
|
+
--j-z-20: 20;
|
|
108
|
+
--j-z-30: 30;
|
|
109
|
+
--j-z-40: 40;
|
|
110
|
+
--j-z-50: 50;
|
|
111
|
+
--j-z-dropdown: 1000;
|
|
112
|
+
--j-z-sticky: 1020;
|
|
113
|
+
--j-z-fixed: 1030;
|
|
114
|
+
--j-z-modal-backdrop: 1040;
|
|
115
|
+
--j-z-modal: 1050;
|
|
116
|
+
--j-z-popover: 1060;
|
|
117
|
+
--j-z-tooltip: 1070;
|
|
118
|
+
|
|
119
|
+
/* Transition durations */
|
|
120
|
+
--j-duration-75: 75ms;
|
|
121
|
+
--j-duration-100: 100ms;
|
|
122
|
+
--j-duration-150: 150ms;
|
|
123
|
+
--j-duration-200: 200ms;
|
|
124
|
+
--j-duration-300: 300ms;
|
|
125
|
+
--j-duration-500: 500ms;
|
|
126
|
+
--j-duration-700: 700ms;
|
|
127
|
+
--j-duration-1000: 1000ms;
|
|
128
|
+
|
|
129
|
+
/* Easings */
|
|
130
|
+
--j-ease-linear: linear;
|
|
131
|
+
--j-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
132
|
+
--j-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
133
|
+
--j-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
134
|
+
--j-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
|
135
|
+
|
|
136
|
+
/* Background for light mode */
|
|
137
|
+
--j-bg: #ffffff;
|
|
138
|
+
--j-bg-subtle: #f4f4f5;
|
|
139
|
+
--j-bg-muted: #e4e4e7;
|
|
140
|
+
--j-text: #18181b;
|
|
141
|
+
--j-text-subtle: #71717a;
|
|
142
|
+
--j-text-muted: #a1a1aa;
|
|
143
|
+
--j-border: #e4e4e7;
|
|
144
|
+
--j-border-subtle: #f4f4f5;
|
|
145
|
+
--j-ring: var(--j-primary);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
${darkMode ? `/* Dark Mode */
|
|
149
|
+
@media (prefers-color-scheme: dark) {
|
|
150
|
+
:root {
|
|
151
|
+
--j-bg: #09090b;
|
|
152
|
+
--j-bg-subtle: #18181b;
|
|
153
|
+
--j-bg-muted: #27272a;
|
|
154
|
+
--j-text: #fafafa;
|
|
155
|
+
--j-text-subtle: #a1a1aa;
|
|
156
|
+
--j-text-muted: #71717a;
|
|
157
|
+
--j-border: #27272a;
|
|
158
|
+
--j-border-subtle: #18181b;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.dark {
|
|
163
|
+
--j-bg: #09090b;
|
|
164
|
+
--j-bg-subtle: #18181b;
|
|
165
|
+
--j-bg-muted: #27272a;
|
|
166
|
+
--j-text: #fafafa;
|
|
167
|
+
--j-text-subtle: #a1a1aa;
|
|
168
|
+
--j-text-muted: #71717a;
|
|
169
|
+
--j-border: #27272a;
|
|
170
|
+
--j-border-subtle: #18181b;
|
|
171
|
+
}` : ''}
|
|
172
|
+
|
|
173
|
+
/* Base Typography */
|
|
174
|
+
html {
|
|
175
|
+
font-family: var(--j-font-sans);
|
|
176
|
+
font-size: var(--j-font-size-base);
|
|
177
|
+
line-height: var(--j-line-height);
|
|
178
|
+
color: var(--j-text);
|
|
179
|
+
background-color: var(--j-bg);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
code, kbd, samp, pre {
|
|
183
|
+
font-family: var(--j-font-mono);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Focus Styles */
|
|
187
|
+
:focus-visible {
|
|
188
|
+
outline: 2px solid var(--j-ring);
|
|
189
|
+
outline-offset: 2px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* Selection */
|
|
193
|
+
::selection {
|
|
194
|
+
background-color: var(--j-primary);
|
|
195
|
+
color: white;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Scrollbar Styling */
|
|
199
|
+
::-webkit-scrollbar {
|
|
200
|
+
width: 8px;
|
|
201
|
+
height: 8px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
::-webkit-scrollbar-track {
|
|
205
|
+
background: var(--j-bg-subtle);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
::-webkit-scrollbar-thumb {
|
|
209
|
+
background: var(--j-border);
|
|
210
|
+
border-radius: var(--j-radius-full);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
::-webkit-scrollbar-thumb:hover {
|
|
214
|
+
background: var(--j-text-muted);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Screen Reader Only */
|
|
218
|
+
.sr-only {
|
|
219
|
+
position: absolute;
|
|
220
|
+
width: 1px;
|
|
221
|
+
height: 1px;
|
|
222
|
+
padding: 0;
|
|
223
|
+
margin: -1px;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
clip: rect(0, 0, 0, 0);
|
|
226
|
+
white-space: nowrap;
|
|
227
|
+
border-width: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.not-sr-only {
|
|
231
|
+
position: static;
|
|
232
|
+
width: auto;
|
|
233
|
+
height: auto;
|
|
234
|
+
padding: 0;
|
|
235
|
+
margin: 0;
|
|
236
|
+
overflow: visible;
|
|
237
|
+
clip: auto;
|
|
238
|
+
white-space: normal;
|
|
239
|
+
}
|
|
240
|
+
`;
|
|
241
|
+
}
|