@katlux/toolkit 0.1.1-alpha.117 → 0.1.1-alpha.118

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.
@@ -52,6 +52,7 @@ export function createPreset({ name, base = null, cwd = process.cwd() }) {
52
52
  const baseDir = hasAppDir ? resolve(cwd, 'app', 'presets') : resolve(cwd, 'presets')
53
53
  const targetDir = resolve(baseDir, trimmedName)
54
54
  const assetsDir = resolve(targetDir, 'assets')
55
+ const componentsDir = resolve(targetDir, 'components')
55
56
  const cssVarsFile = resolve(assetsDir, 'css-variables.scss')
56
57
 
57
58
  if (existsSync(targetDir)) {
@@ -60,34 +61,380 @@ export function createPreset({ name, base = null, cwd = process.cwd() }) {
60
61
  )
61
62
  }
62
63
 
63
- // Create directory structure: assets/
64
+ // Create directory structure: assets/ and empty components/
64
65
  mkdirSync(assetsDir, { recursive: true })
66
+ mkdirSync(componentsDir, { recursive: true })
65
67
 
66
68
  // Starter CSS variables template
67
69
  // NOTE: Any preset can be token-only. Never copy files from base preset because Katlux resolution cascades!
68
70
  const scssContent = `// Katlux Preset: ${trimmedName}
69
71
  // In Katlux, any preset can be token-only.
70
72
  // When based on another preset, tokens & components cascade automatically via app.config.ts.
71
- // Do not copy files from the base preset.
73
+ // Do not copy files from the base preset. Uncomment any tokens below to customize your theme.
72
74
 
73
75
  [data-preset~="${trimmedName}"] {
74
- // Brand & Primary Palette
76
+ // ==========================================================================
77
+ // 1. Primary Brand Palette
78
+ // ==========================================================================
79
+ // --primary-100: #e0e7ff;
80
+ // --primary-200: #c7d2fe;
81
+ // --primary-300: #a5b4fc;
82
+ // --primary-400: #818cf8;
75
83
  // --primary-500: #6366f1;
76
84
  // --primary-600: #4f46e5;
77
-
78
- // Backgrounds & Surfaces
79
- // --background-color: #0f172a;
80
- // --background-color-card: #1e293b;
81
-
82
- // Typography & Font Colors
83
- // --font-color-primary: #f8fafc;
84
- // --font-color-secondary: #94a3b8;
85
-
86
- // Radii & Layout Spacing
87
- // --border-radius-md: 8px;
88
- // --gap-md: 1rem;
89
- }
90
- `
85
+ // --primary-700: #4338ca;
86
+ // --primary-900: #312e81;
87
+ // --primary-color: var(--primary-500);
88
+ // --primary-500-rgb: 99, 102, 241;
89
+
90
+ // ==========================================================================
91
+ // 2. Accent Palette
92
+ // ==========================================================================
93
+ // --accent-100: #cffafe;
94
+ // --accent-300: #67e8f9;
95
+ // --accent-500: #06b6d4;
96
+ // --accent-700: #0e7490;
97
+ // --accent-900: #164e63;
98
+
99
+ // ==========================================================================
100
+ // 3. Neutral Palette
101
+ // ==========================================================================
102
+ // --neutral-50: #f8fafc;
103
+ // --neutral-100: #f1f5f9;
104
+ // --neutral-200: #e2e8f0;
105
+ // --neutral-300: #cbd5e1;
106
+ // --neutral-400: #94a3b8;
107
+ // --neutral-500: #64748b;
108
+ // --neutral-600: #475569;
109
+ // --neutral-700: #334155;
110
+ // --neutral-800: #1e293b;
111
+ // --neutral-900: #0f172a;
112
+
113
+ // ==========================================================================
114
+ // 4. Extended Color Palettes
115
+ // ==========================================================================
116
+ // --yellow-100: #fef9c3;
117
+ // --yellow-300: #fde047;
118
+ // --yellow-500: #eab308;
119
+ // --yellow-700: #a16207;
120
+ // --yellow-900: #713f12;
121
+
122
+ // --red-100: #fee2e2;
123
+ // --red-300: #fca5a5;
124
+ // --red-500: #ef4444;
125
+ // --red-700: #b91c1c;
126
+ // --red-900: #7f1d1d;
127
+
128
+ // --blue-100: #dbeafe;
129
+ // --blue-300: #93c5fd;
130
+ // --blue-500: #3b82f6;
131
+ // --blue-700: #1d4ed8;
132
+ // --blue-900: #1e3a8a;
133
+
134
+ // --pink-100: #fce7f3;
135
+ // --pink-300: #f9a8d4;
136
+ // --pink-500: #ec4899;
137
+ // --pink-700: #be185d;
138
+ // --pink-900: #831843;
139
+
140
+ // --cyan-100: #cffafe;
141
+ // --cyan-300: #67e8f9;
142
+ // --cyan-500: #06b6d4;
143
+ // --cyan-700: #0e7490;
144
+ // --cyan-900: #164e63;
145
+
146
+ // --green-100: #dcfce7;
147
+ // --green-300: #86efac;
148
+ // --green-500: #10b981;
149
+ // --green-700: #047857;
150
+ // --green-900: #064e3b;
151
+
152
+ // ==========================================================================
153
+ // 5. Semantic Status Colors
154
+ // ==========================================================================
155
+ // --success-color: #10b981;
156
+ // --success-color-light: #dcfce7;
157
+ // --success-500: #10b981;
158
+ // --warning-color: #f59e0b;
159
+ // --warning-color-light: #fef3c7;
160
+ // --warning-500: #f59e0b;
161
+ // --error-color: #f43f5e;
162
+ // --error-color-light: #ffe4e6;
163
+ // --error-500: #f43f5e;
164
+ // --info-color: #0ea5e9;
165
+ // --info-color-light: #e0f2fe;
166
+
167
+ // ==========================================================================
168
+ // 6. Typography & Text Hierarchy
169
+ // ==========================================================================
170
+ // --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
171
+ // --font-family-mono: 'Fira Code', 'Roboto Mono', monospace;
172
+ // --font-size-xs: 12px;
173
+ // --font-size-sm: 14px;
174
+ // --font-size-md: 16px;
175
+ // --font-size-lg: 18px;
176
+ // --font-size-xl: 20px;
177
+ // --font-weight-normal: 400;
178
+ // --font-weight-medium: 500;
179
+ // --font-weight-semibold: 600;
180
+ // --font-weight-bold: 700;
181
+
182
+ // --font-color-primary: #0f172a;
183
+ // --font-color-secondary: #64748b;
184
+ // --font-color-heading: #0f172a;
185
+ // --font-color-light: #ffffff;
186
+ // --font-color-default: var(--font-color-primary);
187
+
188
+ // --text-color: var(--font-color-primary);
189
+ // --text-color-primary: var(--font-color-primary);
190
+ // --text-color-secondary: var(--font-color-secondary);
191
+ // --text-color-muted: var(--neutral-400);
192
+ // --text-font-family: var(--font-family);
193
+ // --text-font-size: var(--font-size-md);
194
+ // --text-font-weight: var(--font-weight-normal);
195
+
196
+ // --header-color: var(--font-color-heading);
197
+ // --header-font-family: var(--font-family);
198
+ // --header-font-weight: var(--font-weight-bold);
199
+ // --header-margin-top: 0;
200
+ // --header-margin-bottom: 0.5em;
201
+ // --h1-font-size: 2.5rem;
202
+ // --h2-font-size: 2rem;
203
+ // --h3-font-size: 1.75rem;
204
+ // --h4-font-size: 1.5rem;
205
+ // --h5-font-size: 1.25rem;
206
+ // --h6-font-size: 1rem;
207
+
208
+ // --link-color: var(--primary-500);
209
+ // --link-hover-color: var(--primary-700);
210
+ // --link-font-weight: var(--font-weight-medium);
211
+ // --link-text-decoration: none;
212
+ // --link-hover-text-decoration: underline;
213
+
214
+ // ==========================================================================
215
+ // 7. Backgrounds & Surfaces
216
+ // ==========================================================================
217
+ // --background-color: #ffffff;
218
+ // --background-color-light: #f8fafc;
219
+ // --background-color-medium: #f1f5f9;
220
+ // --background-color-dark: #0f172a;
221
+ // --bg-color-surface: #ffffff;
222
+ // --bg-color-elevated: #ffffff;
223
+ // --bg-color-muted: #f8fafc;
224
+
225
+ // ==========================================================================
226
+ // 8. Borders & Dividers
227
+ // ==========================================================================
228
+ // --border-color-light: #f1f5f9;
229
+ // --border-color-medium: #e2e8f0;
230
+ // --border-color-dark: #94a3b8;
231
+
232
+ // ==========================================================================
233
+ // 9. Spacing & Layout Gaps
234
+ // ==========================================================================
235
+ // --gap-xs: 4px;
236
+ // --gap-sm: 8px;
237
+ // --gap-md: 16px;
238
+ // --gap-lg: 24px;
239
+ // --gap-xl: 32px;
240
+ // --grid-gap: var(--gap-md);
241
+ // --component-gap: var(--gap-sm);
242
+
243
+ // ==========================================================================
244
+ // 10. Corner Radii
245
+ // ==========================================================================
246
+ // --border-radius-sm: 6px;
247
+ // --border-radius-md: 10px;
248
+ // --border-radius-lg: 14px;
249
+ // --border-radius-xl: 20px;
250
+ // --border-radius-full: 9999px;
251
+ // --radius-md: var(--border-radius-md);
252
+
253
+ // ==========================================================================
254
+ // 11. Shadows & Elevations
255
+ // ==========================================================================
256
+ // --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
257
+ // --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
258
+ // --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
259
+ // --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
260
+ // --shadow-glow-primary: 0 10px 15px -3px rgba(99, 102, 241, 0.4), 0 4px 6px -2px rgba(99, 102, 241, 0.2);
261
+ // --shadow-glow-danger: 0 10px 15px -3px rgba(244, 63, 94, 0.4), 0 4px 6px -2px rgba(244, 63, 94, 0.2);
262
+ // --shadow-glow-success: 0 10px 15px -3px rgba(16, 185, 129, 0.4), 0 4px 6px -2px rgba(16, 185, 129, 0.2);
263
+
264
+ // ==========================================================================
265
+ // 12. Animation Transitions
266
+ // ==========================================================================
267
+ // --transition-fast: 0.15s ease;
268
+ // --transition-normal: 0.3s ease;
269
+ // --transition-slow: 0.5s ease;
270
+ // --transition-bounce: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
271
+
272
+ // ==========================================================================
273
+ // 13. Button Controls
274
+ // ==========================================================================
275
+ // --button-border-radius: var(--border-radius-md);
276
+ // --button-font-size-sm: var(--font-size-sm);
277
+ // --button-font-size-md: var(--font-size-md);
278
+ // --button-font-size-lg: var(--font-size-lg);
279
+
280
+ // --button-bg-default: #f1f5f9;
281
+ // --button-text-default: #0f172a;
282
+ // --button-hover-bg-default: #e2e8f0;
283
+ // --button-hover-text-default: #0f172a;
284
+
285
+ // --button-bg-primary: #6366f1;
286
+ // --button-text-primary: #ffffff;
287
+ // --button-hover-bg-primary: #4f46e5;
288
+ // --button-hover-text-primary: #ffffff;
289
+
290
+ // --button-bg-success: #10b981;
291
+ // --button-text-success: #ffffff;
292
+ // --button-hover-bg-success: #059669;
293
+ // --button-hover-text-success: #ffffff;
294
+
295
+ // --button-bg-warning: #f59e0b;
296
+ // --button-text-warning: #0f172a;
297
+ // --button-hover-bg-warning: #d97706;
298
+ // --button-hover-text-warning: #0f172a;
299
+
300
+ // --button-bg-danger: #f43f5e;
301
+ // --button-text-danger: #ffffff;
302
+ // --button-hover-bg-danger: #e11d48;
303
+ // --button-hover-text-danger: #ffffff;
304
+
305
+ // --button-bg-info: #0ea5e9;
306
+ // --button-text-info: #ffffff;
307
+ // --button-hover-bg-info: #0284c7;
308
+ // --button-hover-text-info: #ffffff;
309
+
310
+ // --button-bg-light: #ffffff;
311
+ // --button-text-light: #0f172a;
312
+ // --button-hover-bg-light: #f8fafc;
313
+ // --button-hover-text-light: #0f172a;
314
+
315
+ // --button-bg-dark: #0f172a;
316
+ // --button-text-dark: #ffffff;
317
+ // --button-hover-bg-dark: #1e293b;
318
+ // --button-hover-text-dark: #ffffff;
319
+
320
+ // ==========================================================================
321
+ // 14. Form Inputs & Textboxes
322
+ // ==========================================================================
323
+ // --input-bg: #ffffff;
324
+ // --input-border-radius: var(--border-radius-sm);
325
+ // --input-border-color: #cbd5e1;
326
+ // --input-border: 1px solid var(--input-border-color);
327
+ // --input-hover-border-color: #94a3b8;
328
+ // --input-focus-border-color: var(--primary-500);
329
+ // --input-focus-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
330
+ // --input-height: 44px;
331
+ // --input-label-color: var(--font-color-primary);
332
+ // --input-button-bg: #f1f5f9;
333
+ // --input-button-hover-bg: #e2e8f0;
334
+ // --input-button-font-color: var(--font-color-primary);
335
+
336
+ // ==========================================================================
337
+ // 15. Selection Controls (Checkbox / Radiobox / Switch)
338
+ // ==========================================================================
339
+ // --checkbox-bg: #ffffff;
340
+ // --checkbox-checked-bg: var(--primary-500);
341
+ // --checkbox-border-color: #94a3b8;
342
+ // --checkbox-border-radius: var(--border-radius-sm);
343
+
344
+ // ==========================================================================
345
+ // 16. Tables & Datatables
346
+ // ==========================================================================
347
+ // --table-border-color: #e2e8f0;
348
+ // --table-header-bg: #f8fafc;
349
+ // --table-header-color: #475569;
350
+ // --table-row-bg: #ffffff;
351
+ // --table-row-alt-bg: #f8fafc;
352
+ // --table-row-hover: #f1f5f9;
353
+ // --table-row-hover-bg: #f1f5f9;
354
+ // --table-row-selected: #e0e7ff;
355
+ // --table-row-selected-bg: #e0e7ff;
356
+ // --table-row-selected-text: #312e81;
357
+ // --table-row-text-color: var(--font-color-primary);
358
+ // --page-height: 48px;
359
+ // --page-size: 10;
360
+
361
+ // ==========================================================================
362
+ // 17. Panels, Cards & Containers
363
+ // ==========================================================================
364
+ // --panel-bg-opacity: 1;
365
+ // --panel-blur: 0px;
366
+ // --panel-bg-default: #ffffff;
367
+ // --panel-header-bg-default: #f8fafc;
368
+ // --panel-footer-bg-default: #ffffff;
369
+
370
+ // --panel-bg-primary: #e0e7ff;
371
+ // --panel-header-bg-primary: #6366f1;
372
+ // --panel-footer-bg-primary: #c7d2fe;
373
+
374
+ // --panel-bg-success: #dcfce7;
375
+ // --panel-header-bg-success: #10b981;
376
+ // --panel-footer-bg-success: #bbf7d0;
377
+
378
+ // --panel-bg-warning: #fef3c7;
379
+ // --panel-header-bg-warning: #f59e0b;
380
+ // --panel-footer-bg-warning: #fde68a;
381
+
382
+ // --panel-bg-danger: #ffe4e6;
383
+ // --panel-header-bg-danger: #f43f5e;
384
+ // --panel-footer-bg-danger: #fecdd3;
385
+
386
+ // --panel-bg-info: #e0f2fe;
387
+ // --panel-header-bg-info: #0ea5e9;
388
+ // --panel-footer-bg-info: #bae6fd;
389
+
390
+ // --box-border-radius: var(--border-radius-md);
391
+ // --box-border: 1px solid var(--border-color-medium);
392
+ // --box-shadow: var(--shadow-md);
393
+ // --box-padding: var(--gap-md);
394
+
395
+ // ==========================================================================
396
+ // 18. Tooltips
397
+ // ==========================================================================
398
+ // --tooltip-bg: #0f172a;
399
+ // --tooltip-color: #ffffff;
400
+ // --tooltip-border-radius: var(--border-radius-sm);
401
+ // --tooltip-font-size: var(--font-size-sm);
402
+ // --tooltip-font-family: var(--font-family);
403
+ // --tooltip-shadow: var(--shadow-md);
404
+
405
+ // ==========================================================================
406
+ // 19. Overlays & Modals
407
+ // ==========================================================================
408
+ // --layover: #475569;
409
+ // --component-overlay-bg: rgba(255, 255, 255, 0.75);
410
+ // --table-overlay-bg: var(--component-overlay-bg);
411
+ // --modal-overlay-bg: rgba(15, 23, 42, 0.5);
412
+ // --modal-backdrop-blur: 0px;
413
+
414
+ // ==========================================================================
415
+ // 20. Application Layout Dimensions
416
+ // ==========================================================================
417
+ // --layout-header-height: 60px;
418
+ // --layout-header-bg: #ffffff;
419
+ // --layout-sidebar-width: 240px;
420
+ // --layout-sidebar-bg: #f8fafc;
421
+ // --layout-content-bg: #ffffff;
422
+ // --layout-margin: 0;
423
+ // --layout-padding: 0;
424
+
425
+ // ==========================================================================
426
+ // 21. Icons
427
+ // ==========================================================================
428
+ // --icon-color-light: #f1f5f9;
429
+ // --icon-color-medium: #94a3b8;
430
+ // --icon-color-dark: #475569;
431
+
432
+ // ==========================================================================
433
+ // 22. Tree & Hierarchical Navigation
434
+ // ==========================================================================
435
+ // --tree-depth: 0;
436
+ // --tree-indent: 16px;
437
+ }`
91
438
 
92
439
  writeFileSync(cssVarsFile, scssContent, 'utf-8')
93
440
 
@@ -95,6 +442,8 @@ export function createPreset({ name, base = null, cwd = process.cwd() }) {
95
442
  presetName: trimmedName,
96
443
  basePreset: base ? base.trim().toLowerCase() : null,
97
444
  targetDir,
445
+ assetsDir,
446
+ componentsDir,
98
447
  cssVarsFile,
99
448
  hasAppDir,
100
449
  }
@@ -164,11 +513,13 @@ ${BOLD}Examples:${RESET}
164
513
 
165
514
  const relTarget = relative(process.cwd(), result.targetDir)
166
515
  const relFile = relative(process.cwd(), result.cssVarsFile)
516
+ const relComponents = relative(process.cwd(), result.componentsDir)
167
517
 
168
518
  console.log()
169
519
  log(GREEN, '[create-preset] ✔', `Preset created successfully!`)
170
520
  console.log(` ${CYAN}Directory:${RESET} ${relTarget}`)
171
521
  console.log(` ${CYAN}Tokens File:${RESET} ${relFile}`)
522
+ console.log(` ${CYAN}Components:${RESET} ${relComponents} (empty for custom overrides)`)
172
523
  console.log()
173
524
 
174
525
  const presetTitle = toTitleCase(result.presetName)
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.1-alpha.117",
4
+ "version": "0.1.1-alpha.118",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
27
27
  }>> & Readonly<{}>, {
28
28
  disabled: boolean;
29
29
  text: string;
30
- position: "left" | "right" | "top" | "bottom";
30
+ position: "top" | "left" | "right" | "bottom";
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
32
  declare const _default: typeof __VLS_export;
33
33
  export default _default;
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
27
27
  }>> & Readonly<{}>, {
28
28
  disabled: boolean;
29
29
  text: string;
30
- position: "left" | "right" | "top" | "bottom";
30
+ position: "top" | "left" | "right" | "bottom";
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
32
  declare const _default: typeof __VLS_export;
33
33
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.117",
3
+ "version": "0.1.1-alpha.118",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",