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

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.
Files changed (118) hide show
  1. package/bin/create-preset.mjs +373 -21
  2. package/dist/compiled/composables/useKatluxContext.mjs +6 -3
  3. package/dist/compiled/composables/useKatluxForm.mjs +268 -0
  4. package/dist/compiled/composables/useToast.mjs +164 -0
  5. package/dist/compiled/composables/useVirtualScroll.mjs +176 -0
  6. package/dist/module.cjs +1 -0
  7. package/dist/module.json +1 -1
  8. package/dist/module.mjs +1 -0
  9. package/dist/runtime/components/KBulkActions/KBulkActions.global.d.vue.ts +6 -2
  10. package/dist/runtime/components/KBulkActions/KBulkActions.global.vue +3 -3
  11. package/dist/runtime/components/KBulkActions/KBulkActions.global.vue.d.ts +6 -2
  12. package/dist/runtime/components/KBulkActions/KBulkActions.logic.js +9 -0
  13. package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +9 -0
  14. package/dist/runtime/components/KCombobox/KCombobox.global.vue +2 -1
  15. package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +9 -0
  16. package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +5 -0
  17. package/dist/runtime/components/KCombobox/KCombobox.logic.js +22 -3
  18. package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +8 -0
  19. package/dist/runtime/components/KDatatable/KDataIterator.global.vue +10 -2
  20. package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +8 -0
  21. package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +8 -0
  22. package/dist/runtime/components/KDatatable/KDataIterator.logic.js +10 -2
  23. package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +8 -0
  24. package/dist/runtime/components/KDatatable/KDatatable.global.vue +12 -4
  25. package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +8 -0
  26. package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +8 -0
  27. package/dist/runtime/components/KDatatable/KDatatable.logic.js +11 -3
  28. package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +2 -0
  29. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +5 -1
  30. package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +2 -0
  31. package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +7 -6
  32. package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +7 -6
  33. package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +9 -0
  34. package/dist/runtime/components/KDropdown/KDropdown.global.vue +2 -1
  35. package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +9 -0
  36. package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +5 -0
  37. package/dist/runtime/components/KDropdown/KDropdown.logic.js +10 -7
  38. package/dist/runtime/components/KGantt/KGantt.logic.js +11 -4
  39. package/dist/runtime/components/KPagination/KPagination.logic.js +7 -4
  40. package/dist/runtime/components/KToast/KToast.global.d.vue.ts +24 -1
  41. package/dist/runtime/components/KToast/KToast.global.vue +12 -2
  42. package/dist/runtime/components/KToast/KToast.global.vue.d.ts +24 -1
  43. package/dist/runtime/components/KToast/KToast.logic.d.ts +13 -0
  44. package/dist/runtime/components/KToast/KToast.logic.js +45 -5
  45. package/dist/runtime/components/KToastContainer/KToastContainer.global.d.vue.ts +3 -0
  46. package/dist/runtime/components/KToastContainer/KToastContainer.global.vue +11 -0
  47. package/dist/runtime/components/KToastContainer/KToastContainer.global.vue.d.ts +3 -0
  48. package/dist/runtime/components/KTree/KTree.global.d.vue.ts +38 -0
  49. package/dist/runtime/components/KTree/KTree.global.vue +7 -3
  50. package/dist/runtime/components/KTree/KTree.global.vue.d.ts +38 -0
  51. package/dist/runtime/components/KTree/KTree.logic.d.ts +21 -0
  52. package/dist/runtime/components/KTree/KTree.logic.js +17 -0
  53. package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +52 -1
  54. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +30 -3
  55. package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +52 -1
  56. package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +20 -0
  57. package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +16 -0
  58. package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +36 -0
  59. package/dist/runtime/components/KTreeView/KTreeView.global.vue +5 -1
  60. package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +36 -0
  61. package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +20 -0
  62. package/dist/runtime/components/KTreeView/KTreeView.logic.js +16 -0
  63. package/dist/runtime/composables/useKatluxContext.js +6 -3
  64. package/dist/runtime/composables/useKatluxForm.d.ts +143 -0
  65. package/dist/runtime/composables/useKatluxForm.js +268 -0
  66. package/dist/runtime/composables/useToast.d.ts +49 -0
  67. package/dist/runtime/composables/useToast.js +164 -0
  68. package/dist/runtime/composables/useVirtualScroll.d.ts +34 -0
  69. package/dist/runtime/composables/useVirtualScroll.js +176 -0
  70. package/dist/runtime/plugins/PresetPlugin.js +9 -1
  71. package/dist/runtime/plugins/nuxtCompatPlugin.js +0 -1
  72. package/dist/runtime/plugins/toastPlugin.client.d.ts +2 -0
  73. package/dist/runtime/plugins/toastPlugin.client.js +16 -0
  74. package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +1 -0
  75. package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +36 -7
  76. package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +1 -0
  77. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +10 -4
  78. package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +1 -0
  79. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
  80. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +7 -2
  81. package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
  82. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.d.vue.ts +10 -1
  83. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +128 -6
  84. package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue.d.ts +10 -1
  85. package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +12 -1
  86. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +206 -27
  87. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +12 -1
  88. package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +1 -0
  89. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +23 -2
  90. package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +1 -0
  91. package/dist/runtime/presets/default/components/KLayout/KLayout.vue +4 -2
  92. package/dist/runtime/presets/default/components/KModal/KModal.vue +8 -1
  93. package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +1 -1
  94. package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +6 -4
  95. package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +6 -0
  96. package/dist/runtime/presets/default/components/KToast/KToast.vue +22 -4
  97. package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +6 -0
  98. package/dist/runtime/presets/default/components/KToastContainer/KToastContainer.d.vue.ts +11 -0
  99. package/dist/runtime/presets/default/components/KToastContainer/KToastContainer.vue +207 -0
  100. package/dist/runtime/presets/default/components/KToastContainer/KToastContainer.vue.d.ts +11 -0
  101. package/dist/runtime/presets/default/components/KTree/KTree.d.vue.ts +15 -5
  102. package/dist/runtime/presets/default/components/KTree/KTree.vue +232 -13
  103. package/dist/runtime/presets/default/components/KTree/KTree.vue.d.ts +15 -5
  104. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +14 -1
  105. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +118 -13
  106. package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +14 -1
  107. package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +12 -3
  108. package/dist/runtime/presets/default/components/KTreeView/KTreeView.d.vue.ts +4 -0
  109. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +8 -0
  110. package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue.d.ts +4 -0
  111. package/dist/runtime/server/middleware/session.js +1 -1
  112. package/package.json +3 -4
  113. package/dist/compiled/composables/useDataProvider.spec.mjs +0 -157
  114. package/dist/compiled/composables/useKatluxContext.spec.mjs +0 -63
  115. package/dist/compiled/composables/useKatluxI18n.spec.mjs +0 -10
  116. package/dist/compiled/composables/usePresetComponent.spec.mjs +0 -106
  117. package/dist/compiled/composables/useTemplate.spec.mjs +0 -30
  118. package/dist/compiled/utils/PresetResolver.spec.mjs +0 -68
@@ -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
  }
@@ -133,13 +482,14 @@ ${BOLD}Examples:${RESET}
133
482
  let presetName = null
134
483
  let basePreset = null
135
484
 
136
- for (const arg of args) {
485
+ for (let i = 0; i < args.length; i++) {
486
+ const arg = args[i]
137
487
  if (arg.startsWith('--base=')) {
138
488
  basePreset = arg.slice('--base='.length)
139
489
  } else if (arg === '-b' || arg === '--base') {
140
- const idx = args.indexOf(arg)
141
- if (idx !== -1 && args[idx + 1]) {
142
- basePreset = args[idx + 1]
490
+ if (i + 1 < args.length) {
491
+ basePreset = args[i + 1]
492
+ i++ // advance index so value is not consumed as presetName
143
493
  }
144
494
  } else if (!arg.startsWith('-') && !presetName) {
145
495
  presetName = arg
@@ -164,11 +514,13 @@ ${BOLD}Examples:${RESET}
164
514
 
165
515
  const relTarget = relative(process.cwd(), result.targetDir)
166
516
  const relFile = relative(process.cwd(), result.cssVarsFile)
517
+ const relComponents = relative(process.cwd(), result.componentsDir)
167
518
 
168
519
  console.log()
169
520
  log(GREEN, '[create-preset] ✔', `Preset created successfully!`)
170
521
  console.log(` ${CYAN}Directory:${RESET} ${relTarget}`)
171
522
  console.log(` ${CYAN}Tokens File:${RESET} ${relFile}`)
523
+ console.log(` ${CYAN}Components:${RESET} ${relComponents} (empty for custom overrides)`)
172
524
  console.log()
173
525
 
174
526
  const presetTitle = toTitleCase(result.presetName)
@@ -11,9 +11,12 @@ export function useKatluxContext() {
11
11
  return { event: evt };
12
12
  }
13
13
  }
14
- const app = globalThis.__KATLUX_APP__ || (globalThis.useNuxtApp ? globalThis.useNuxtApp() : null);
15
- if (app?.ssrContext?.event) {
16
- return { event: app.ssrContext.event };
14
+ const getNuxtApp = globalThis.useNuxtApp;
15
+ if (typeof getNuxtApp === "function") {
16
+ const app = getNuxtApp();
17
+ if (app?.ssrContext?.event) {
18
+ return { event: app.ssrContext.event };
19
+ }
17
20
  }
18
21
  } catch {
19
22
  }