codexly-ui 0.1.22 → 0.1.23
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/assets/styles/_fonts.css +3 -84
- package/assets/styles/_theme.css +11 -1
- package/fesm2022/codexly-ui.mjs +410 -79
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +55 -22
- package/assets/fonts/roboto-bold-italic.ttf +0 -0
- package/assets/fonts/roboto-bold.ttf +0 -0
- package/assets/fonts/roboto-italic.ttf +0 -0
- package/assets/fonts/roboto-light-italic.ttf +0 -0
- package/assets/fonts/roboto-light.ttf +0 -0
- package/assets/fonts/roboto-medium-italic.ttf +0 -0
- package/assets/fonts/roboto-medium.ttf +0 -0
- package/assets/fonts/roboto-regular.ttf +0 -0
- package/assets/fonts/roboto-semibold-italic.ttf +0 -0
- package/assets/fonts/roboto-semibold.ttf +0 -0
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -165,6 +165,163 @@ const BADGE_SHAPE_FIXED = {
|
|
|
165
165
|
circle: 'rounded-full',
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
+
const CLX_FONT_CATALOG = [
|
|
169
|
+
{
|
|
170
|
+
label: 'Roboto',
|
|
171
|
+
value: 'Roboto',
|
|
172
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: 'Inter',
|
|
176
|
+
value: 'Inter',
|
|
177
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: 'Poppins',
|
|
181
|
+
value: 'Poppins',
|
|
182
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
label: 'Plus Jakarta Sans',
|
|
186
|
+
value: 'Plus Jakarta Sans',
|
|
187
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: 'Nunito',
|
|
191
|
+
value: 'Nunito',
|
|
192
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'DM Sans',
|
|
196
|
+
value: 'DM Sans',
|
|
197
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
label: 'Geist',
|
|
201
|
+
value: 'Geist',
|
|
202
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: 'Lato',
|
|
206
|
+
value: 'Lato',
|
|
207
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
label: 'Montserrat',
|
|
211
|
+
value: 'Montserrat',
|
|
212
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: 'Open Sans',
|
|
216
|
+
value: 'Open Sans',
|
|
217
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
label: 'Work Sans',
|
|
221
|
+
value: 'Work Sans',
|
|
222
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: 'Manrope',
|
|
226
|
+
value: 'Manrope',
|
|
227
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
label: 'Sora',
|
|
231
|
+
value: 'Sora',
|
|
232
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&display=swap',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
label: 'Outfit',
|
|
236
|
+
value: 'Outfit',
|
|
237
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: 'Rubik',
|
|
241
|
+
value: 'Rubik',
|
|
242
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
label: 'Source Sans 3',
|
|
246
|
+
value: 'Source Sans 3',
|
|
247
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
label: 'Space Grotesk',
|
|
251
|
+
value: 'Space Grotesk',
|
|
252
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
label: 'Merriweather',
|
|
256
|
+
value: 'Merriweather',
|
|
257
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
label: 'Playfair Display',
|
|
261
|
+
value: 'Playfair Display',
|
|
262
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
label: 'Lora',
|
|
266
|
+
value: 'Lora',
|
|
267
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
label: 'PT Serif',
|
|
271
|
+
value: 'PT Serif',
|
|
272
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
label: 'Caveat',
|
|
276
|
+
value: 'Caveat',
|
|
277
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
label: 'Dancing Script',
|
|
281
|
+
value: 'Dancing Script',
|
|
282
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&display=swap',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
label: 'Cinzel',
|
|
286
|
+
value: 'Cinzel',
|
|
287
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800;900&display=swap',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
label: 'Berkshire Swash',
|
|
291
|
+
value: 'Berkshire Swash',
|
|
292
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Berkshire+Swash&display=swap',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: 'JetBrains Mono',
|
|
296
|
+
value: 'JetBrains Mono',
|
|
297
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
label: 'Orbitron',
|
|
301
|
+
value: 'Orbitron',
|
|
302
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
label: 'UnifrakturMaguntia',
|
|
306
|
+
value: 'UnifrakturMaguntia',
|
|
307
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
label: 'Pirata One',
|
|
311
|
+
value: 'Pirata One',
|
|
312
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Pirata+One&display=swap',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
label: 'Press Start 2P',
|
|
316
|
+
value: 'Press Start 2P',
|
|
317
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
label: 'Bungee',
|
|
321
|
+
value: 'Bungee',
|
|
322
|
+
googleUrl: 'https://fonts.googleapis.com/css2?family=Bungee&display=swap',
|
|
323
|
+
},
|
|
324
|
+
];
|
|
168
325
|
// ── Tailwind rounded classes per borderRadius token ───────────────────────────
|
|
169
326
|
const CLX_RADIUS_MAP = {
|
|
170
327
|
none: 'rounded-none',
|
|
@@ -194,13 +351,16 @@ function resolveContainerRadius(r) {
|
|
|
194
351
|
// ── Default theme ─────────────────────────────────────────────────────────────
|
|
195
352
|
const CLX_THEME_DEFAULTS = {
|
|
196
353
|
primaryColor: 'indigo',
|
|
354
|
+
secondaryColor: 'slate',
|
|
197
355
|
dangerColor: 'red',
|
|
198
356
|
successColor: 'green',
|
|
199
357
|
warningColor: 'amber',
|
|
200
358
|
neutralColor: 'slate',
|
|
359
|
+
textColor: 'slate',
|
|
201
360
|
borderRadius: 'md',
|
|
202
361
|
defaultSize: 'md',
|
|
203
362
|
defaultShape: 'rounded',
|
|
363
|
+
fontFamily: 'Roboto',
|
|
204
364
|
};
|
|
205
365
|
// ── Injection token ───────────────────────────────────────────────────────────
|
|
206
366
|
const CLX_THEME_CONFIG = new InjectionToken('CLX_THEME_CONFIG', { factory: () => CLX_THEME_DEFAULTS });
|
|
@@ -212,7 +372,107 @@ function provideCodexlyTheme(config) {
|
|
|
212
372
|
};
|
|
213
373
|
}
|
|
214
374
|
|
|
375
|
+
// ── Full Tailwind v4 palette (hex), all colors × all shades ──────────────────
|
|
376
|
+
// Source of truth: official Tailwind CSS v4 color values.
|
|
377
|
+
const CLX_COLOR_PALETTE = {
|
|
378
|
+
red: {
|
|
379
|
+
50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5', 400: '#f87171',
|
|
380
|
+
500: '#ef4444', 600: '#dc2626', 700: '#b91c1c', 800: '#991b1b', 900: '#7f1d1d', 950: '#450a0a',
|
|
381
|
+
},
|
|
382
|
+
orange: {
|
|
383
|
+
50: '#fff7ed', 100: '#ffedd5', 200: '#fed7aa', 300: '#fdba74', 400: '#fb923c',
|
|
384
|
+
500: '#f97316', 600: '#ea580c', 700: '#c2410c', 800: '#9a3412', 900: '#7c2d12', 950: '#431407',
|
|
385
|
+
},
|
|
386
|
+
amber: {
|
|
387
|
+
50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24',
|
|
388
|
+
500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f', 950: '#451a03',
|
|
389
|
+
},
|
|
390
|
+
yellow: {
|
|
391
|
+
50: '#fefce8', 100: '#fef9c3', 200: '#fef08a', 300: '#fde047', 400: '#facc15',
|
|
392
|
+
500: '#eab308', 600: '#ca8a04', 700: '#a16207', 800: '#854d0e', 900: '#713f12', 950: '#422006',
|
|
393
|
+
},
|
|
394
|
+
lime: {
|
|
395
|
+
50: '#f7fee7', 100: '#ecfccb', 200: '#d9f99d', 300: '#bef264', 400: '#a3e635',
|
|
396
|
+
500: '#84cc16', 600: '#65a30d', 700: '#4d7c0f', 800: '#3f6212', 900: '#365314', 950: '#1a2e05',
|
|
397
|
+
},
|
|
398
|
+
green: {
|
|
399
|
+
50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac', 400: '#4ade80',
|
|
400
|
+
500: '#22c55e', 600: '#16a34a', 700: '#15803d', 800: '#166534', 900: '#14532d', 950: '#052e16',
|
|
401
|
+
},
|
|
402
|
+
emerald: {
|
|
403
|
+
50: '#ecfdf5', 100: '#d1fae5', 200: '#a7f3d0', 300: '#6ee7b7', 400: '#34d399',
|
|
404
|
+
500: '#10b981', 600: '#059669', 700: '#047857', 800: '#065f46', 900: '#064e3b', 950: '#022c22',
|
|
405
|
+
},
|
|
406
|
+
teal: {
|
|
407
|
+
50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf',
|
|
408
|
+
500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', 950: '#042f2e',
|
|
409
|
+
},
|
|
410
|
+
cyan: {
|
|
411
|
+
50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee',
|
|
412
|
+
500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344',
|
|
413
|
+
},
|
|
414
|
+
sky: {
|
|
415
|
+
50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd', 300: '#7dd3fc', 400: '#38bdf8',
|
|
416
|
+
500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e', 950: '#082f49',
|
|
417
|
+
},
|
|
418
|
+
blue: {
|
|
419
|
+
50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa',
|
|
420
|
+
500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', 950: '#172554',
|
|
421
|
+
},
|
|
422
|
+
indigo: {
|
|
423
|
+
50: '#eef2ff', 100: '#e0e7ff', 200: '#c7d2fe', 300: '#a5b4fc', 400: '#818cf8',
|
|
424
|
+
500: '#6366f1', 600: '#4f46e5', 700: '#4338ca', 800: '#3730a3', 900: '#312e81', 950: '#1e1b4b',
|
|
425
|
+
},
|
|
426
|
+
violet: {
|
|
427
|
+
50: '#f5f3ff', 100: '#ede9fe', 200: '#ddd6fe', 300: '#c4b5fd', 400: '#a78bfa',
|
|
428
|
+
500: '#8b5cf6', 600: '#7c3aed', 700: '#6d28d9', 800: '#5b21b6', 900: '#4c1d95', 950: '#2e1065',
|
|
429
|
+
},
|
|
430
|
+
purple: {
|
|
431
|
+
50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc',
|
|
432
|
+
500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', 950: '#3b0764',
|
|
433
|
+
},
|
|
434
|
+
fuchsia: {
|
|
435
|
+
50: '#fdf4ff', 100: '#fae8ff', 200: '#f5d0fe', 300: '#f0abfc', 400: '#e879f9',
|
|
436
|
+
500: '#d946ef', 600: '#c026d3', 700: '#a21caf', 800: '#86198f', 900: '#701a75', 950: '#4a044e',
|
|
437
|
+
},
|
|
438
|
+
pink: {
|
|
439
|
+
50: '#fdf2f8', 100: '#fce7f3', 200: '#fbcfe8', 300: '#f9a8d4', 400: '#f472b6',
|
|
440
|
+
500: '#ec4899', 600: '#db2777', 700: '#be185d', 800: '#9d174d', 900: '#831843', 950: '#500724',
|
|
441
|
+
},
|
|
442
|
+
rose: {
|
|
443
|
+
50: '#fff1f2', 100: '#ffe4e6', 200: '#fecdd3', 300: '#fda4af', 400: '#fb7185',
|
|
444
|
+
500: '#f43f5e', 600: '#e11d48', 700: '#be123c', 800: '#9f1239', 900: '#881337', 950: '#4c0519',
|
|
445
|
+
},
|
|
446
|
+
slate: {
|
|
447
|
+
50: '#f8fafc', 100: '#f1f5f9', 200: '#e2e8f0', 300: '#cbd5e1', 400: '#94a3b8',
|
|
448
|
+
500: '#64748b', 600: '#475569', 700: '#334155', 800: '#1e293b', 900: '#0f172a', 950: '#020617',
|
|
449
|
+
},
|
|
450
|
+
gray: {
|
|
451
|
+
50: '#f9fafb', 100: '#f3f4f6', 200: '#e5e7eb', 300: '#d1d5db', 400: '#9ca3af',
|
|
452
|
+
500: '#6b7280', 600: '#4b5563', 700: '#374151', 800: '#1f2937', 900: '#111827', 950: '#030712',
|
|
453
|
+
},
|
|
454
|
+
zinc: {
|
|
455
|
+
50: '#fafafa', 100: '#f4f4f5', 200: '#e4e4e7', 300: '#d4d4d8', 400: '#a1a1aa',
|
|
456
|
+
500: '#71717a', 600: '#52525b', 700: '#3f3f46', 800: '#27272a', 900: '#18181b', 950: '#09090b',
|
|
457
|
+
},
|
|
458
|
+
neutral: {
|
|
459
|
+
50: '#fafafa', 100: '#f5f5f5', 200: '#e5e5e5', 300: '#d4d4d4', 400: '#a3a3a3',
|
|
460
|
+
500: '#737373', 600: '#525252', 700: '#404040', 800: '#262626', 900: '#171717', 950: '#0a0a0a',
|
|
461
|
+
},
|
|
462
|
+
stone: {
|
|
463
|
+
50: '#fafaf9', 100: '#f5f5f4', 200: '#e7e5e4', 300: '#d6d3d1', 400: '#a8a29e',
|
|
464
|
+
500: '#78716c', 600: '#57534e', 700: '#44403c', 800: '#292524', 900: '#1c1917', 950: '#0c0a09',
|
|
465
|
+
},
|
|
466
|
+
white: { 500: '#ffffff' },
|
|
467
|
+
};
|
|
468
|
+
/** Resolve a hex value for any Tailwind color + shade, with a safe fallback. */
|
|
469
|
+
function resolvePaletteHex(color, shade) {
|
|
470
|
+
const entry = CLX_COLOR_PALETTE[color] ?? CLX_COLOR_PALETTE.indigo;
|
|
471
|
+
return entry[shade] ?? entry[500] ?? CLX_COLOR_PALETTE.indigo[500];
|
|
472
|
+
}
|
|
473
|
+
|
|
215
474
|
const STORAGE_KEY = 'clx-theme-mode';
|
|
475
|
+
const FONT_LINK_ID = 'clx-google-font';
|
|
216
476
|
class ClxThemeService {
|
|
217
477
|
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
218
478
|
_initial = inject(CLX_THEME_CONFIG);
|
|
@@ -229,6 +489,12 @@ class ClxThemeService {
|
|
|
229
489
|
return false;
|
|
230
490
|
return this._sysDark();
|
|
231
491
|
}, ...(ngDevMode ? [{ debugName: "isDark" }] : /* istanbul ignore next */ []));
|
|
492
|
+
/** Color to apply to clx-nav-group labels — falls back to neutralColor */
|
|
493
|
+
sidebarGroupColor = computed(() => this._config().sidebarGroupColor ?? this._config().neutralColor, ...(ngDevMode ? [{ debugName: "sidebarGroupColor" }] : /* istanbul ignore next */ []));
|
|
494
|
+
/** Color to apply to top-level clx-menu — falls back to primaryColor */
|
|
495
|
+
sidebarMenuColor = computed(() => this._config().sidebarMenuColor ?? this._config().primaryColor, ...(ngDevMode ? [{ debugName: "sidebarMenuColor" }] : /* istanbul ignore next */ []));
|
|
496
|
+
/** Color to apply to clx-menu-item — falls back to primaryColor */
|
|
497
|
+
sidebarItemColor = computed(() => this._config().sidebarItemColor ?? this._config().primaryColor, ...(ngDevMode ? [{ debugName: "sidebarItemColor" }] : /* istanbul ignore next */ []));
|
|
232
498
|
constructor() {
|
|
233
499
|
effect(() => {
|
|
234
500
|
if (!this._isBrowser)
|
|
@@ -238,14 +504,15 @@ class ClxThemeService {
|
|
|
238
504
|
effect(() => {
|
|
239
505
|
if (!this._isBrowser)
|
|
240
506
|
return;
|
|
241
|
-
const
|
|
242
|
-
|
|
507
|
+
const cfg = this._config();
|
|
508
|
+
this._applyColorVar('--clx-primary', '--clx-primary-light', cfg.primaryColor);
|
|
509
|
+
this._applyColorVar('--clx-secondary', '--clx-secondary-light', cfg.secondaryColor);
|
|
510
|
+
this._applyTextColor(cfg.textColor, this.isDark());
|
|
511
|
+
});
|
|
512
|
+
effect(() => {
|
|
513
|
+
if (!this._isBrowser)
|
|
243
514
|
return;
|
|
244
|
-
|
|
245
|
-
const hex500 = CLX_COLOR_HEX[color] ?? CLX_COLOR_HEX.indigo;
|
|
246
|
-
const hex100 = CLX_COLOR_HEX_100[color] ?? CLX_COLOR_HEX_100.indigo;
|
|
247
|
-
document.documentElement.style.setProperty('--clx-primary', hex500);
|
|
248
|
-
document.documentElement.style.setProperty('--clx-primary-light', hex100);
|
|
515
|
+
this._applyFont(this._config().fontFamily ?? 'Roboto');
|
|
249
516
|
});
|
|
250
517
|
if (this._isBrowser) {
|
|
251
518
|
const mq = window.matchMedia('(prefers-color-scheme: dark)');
|
|
@@ -263,6 +530,42 @@ class ClxThemeService {
|
|
|
263
530
|
toggle() {
|
|
264
531
|
this.setMode(this.isDark() ? 'light' : 'dark');
|
|
265
532
|
}
|
|
533
|
+
_applyColorVar(varName, lightVarName, input) {
|
|
534
|
+
if (!input)
|
|
535
|
+
return;
|
|
536
|
+
const { color, shade } = parseColorInput(input);
|
|
537
|
+
document.documentElement.style.setProperty(varName, resolvePaletteHex(color, shade));
|
|
538
|
+
if (lightVarName) {
|
|
539
|
+
document.documentElement.style.setProperty(lightVarName, resolvePaletteHex(color, 100));
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
_applyTextColor(input, dark) {
|
|
543
|
+
if (!input)
|
|
544
|
+
return;
|
|
545
|
+
const { color } = parseColorInput(input);
|
|
546
|
+
const shades = dark
|
|
547
|
+
? { text: 100, label: 300, muted: 400, subtle: 500, faint: 600 }
|
|
548
|
+
: { text: 900, label: 600, muted: 500, subtle: 400, faint: 300 };
|
|
549
|
+
document.documentElement.style.setProperty('--clx-text', resolvePaletteHex(color, shades.text));
|
|
550
|
+
document.documentElement.style.setProperty('--clx-text-label', resolvePaletteHex(color, shades.label));
|
|
551
|
+
document.documentElement.style.setProperty('--clx-text-muted', resolvePaletteHex(color, shades.muted));
|
|
552
|
+
document.documentElement.style.setProperty('--clx-text-subtle', resolvePaletteHex(color, shades.subtle));
|
|
553
|
+
document.documentElement.style.setProperty('--clx-text-faint', resolvePaletteHex(color, shades.faint));
|
|
554
|
+
}
|
|
555
|
+
_applyFont(family) {
|
|
556
|
+
const option = CLX_FONT_CATALOG.find(f => f.value === family);
|
|
557
|
+
if (!option)
|
|
558
|
+
return;
|
|
559
|
+
let link = document.getElementById(FONT_LINK_ID);
|
|
560
|
+
if (!link) {
|
|
561
|
+
link = document.createElement('link');
|
|
562
|
+
link.id = FONT_LINK_ID;
|
|
563
|
+
link.rel = 'stylesheet';
|
|
564
|
+
document.head.appendChild(link);
|
|
565
|
+
}
|
|
566
|
+
link.href = option.googleUrl;
|
|
567
|
+
document.documentElement.style.setProperty('--clx-font-body', `'${family}', ui-sans-serif, system-ui, sans-serif`);
|
|
568
|
+
}
|
|
266
569
|
_loadMode() {
|
|
267
570
|
if (!this._isBrowser)
|
|
268
571
|
return 'system';
|
|
@@ -2635,7 +2938,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2635
2938
|
const CLX_LIST_CONTEXT = new InjectionToken('CLX_LIST_CONTEXT');
|
|
2636
2939
|
// ── Variant maps ──────────────────────────────────────────────────────────────
|
|
2637
2940
|
const LIST_VARIANT_SHAPE = {
|
|
2638
|
-
bordered: 'bg-
|
|
2941
|
+
bordered: 'bg-clx-surface rounded-2xl overflow-hidden border border-clx-border',
|
|
2639
2942
|
flat: 'bg-transparent',
|
|
2640
2943
|
flush: 'bg-transparent',
|
|
2641
2944
|
};
|
|
@@ -3841,7 +4144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
3841
4144
|
|
|
3842
4145
|
const INPUT_STATUS_MAP = {
|
|
3843
4146
|
default: {
|
|
3844
|
-
border: 'border-
|
|
4147
|
+
border: 'border-clx-border',
|
|
3845
4148
|
ring: '',
|
|
3846
4149
|
msgCls: '',
|
|
3847
4150
|
iconName: '',
|
|
@@ -4254,11 +4557,18 @@ class ClxSelectComponent {
|
|
|
4254
4557
|
_activeColor = computed(() => this.activeColor() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_activeColor" }] : /* istanbul ignore next */ []));
|
|
4255
4558
|
_el = inject((ElementRef));
|
|
4256
4559
|
_sso = inject(ScrollStrategyOptions);
|
|
4560
|
+
_isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
4561
|
+
_loadedFonts = new Set();
|
|
4257
4562
|
_scrollStrategy = this._sso.reposition();
|
|
4258
4563
|
constructor() {
|
|
4259
4564
|
this._searchQuery = toSignal(this._searchControl.valueChanges.pipe(startWith(''), map(v => v ?? '')), { initialValue: '' });
|
|
4260
4565
|
if (this._ngControl)
|
|
4261
4566
|
this._ngControl.valueAccessor = this;
|
|
4567
|
+
effect(() => {
|
|
4568
|
+
const family = this._displayFontFamily();
|
|
4569
|
+
if (family)
|
|
4570
|
+
this._loadPreviewFont(family);
|
|
4571
|
+
});
|
|
4262
4572
|
// Async autocomplete: debounce + switchMap sobre el search control
|
|
4263
4573
|
this._searchControl.valueChanges.pipe(debounceTime(this.debounceMs()), distinctUntilChanged(), switchMap(query => {
|
|
4264
4574
|
const q = query ?? '';
|
|
@@ -4306,6 +4616,10 @@ class ClxSelectComponent {
|
|
|
4306
4616
|
const sel = this._selectedOptions();
|
|
4307
4617
|
return sel.length ? sel[0].label : this.placeholder();
|
|
4308
4618
|
}, ...(ngDevMode ? [{ debugName: "_displayValue" }] : /* istanbul ignore next */ []));
|
|
4619
|
+
_displayFontFamily = computed(() => {
|
|
4620
|
+
const sel = this._selectedOptions();
|
|
4621
|
+
return sel.length ? sel[0].previewFontFamily ?? null : null;
|
|
4622
|
+
}, ...(ngDevMode ? [{ debugName: "_displayFontFamily" }] : /* istanbul ignore next */ []));
|
|
4309
4623
|
_overlayWidth = computed(() => this._overlayWidthPx(), ...(ngDevMode ? [{ debugName: "_overlayWidth" }] : /* istanbul ignore next */ []));
|
|
4310
4624
|
_labelClass = computed(() => `${this._sizeConfig().label} ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
|
|
4311
4625
|
_hintClass = computed(() => `${this._sizeConfig().hint} ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
|
|
@@ -4356,6 +4670,26 @@ class ClxSelectComponent {
|
|
|
4356
4670
|
if (!this.async())
|
|
4357
4671
|
this._searchControl.setValue('', { emitEvent: false });
|
|
4358
4672
|
this._isOpen.set(true);
|
|
4673
|
+
for (const opt of this.options()) {
|
|
4674
|
+
if (opt.previewFontFamily)
|
|
4675
|
+
this._loadPreviewFont(opt.previewFontFamily);
|
|
4676
|
+
}
|
|
4677
|
+
}
|
|
4678
|
+
_loadPreviewFont(family) {
|
|
4679
|
+
if (!this._isBrowser || this._loadedFonts.has(family))
|
|
4680
|
+
return;
|
|
4681
|
+
const option = CLX_FONT_CATALOG.find(f => f.value === family);
|
|
4682
|
+
if (!option)
|
|
4683
|
+
return;
|
|
4684
|
+
this._loadedFonts.add(family);
|
|
4685
|
+
const id = `clx-preview-font-${family.replace(/\s+/g, '-').toLowerCase()}`;
|
|
4686
|
+
if (document.getElementById(id))
|
|
4687
|
+
return;
|
|
4688
|
+
const link = document.createElement('link');
|
|
4689
|
+
link.id = id;
|
|
4690
|
+
link.rel = 'stylesheet';
|
|
4691
|
+
link.href = option.googleUrl;
|
|
4692
|
+
document.head.appendChild(link);
|
|
4359
4693
|
}
|
|
4360
4694
|
_closePanel() {
|
|
4361
4695
|
this._isOpen.set(false);
|
|
@@ -4465,7 +4799,7 @@ class ClxSelectComponent {
|
|
|
4465
4799
|
|
|
4466
4800
|
<!-- Single mode: display value -->
|
|
4467
4801
|
} @else {
|
|
4468
|
-
<span [class]="_singleDisplayClass()">{{ _displayValue() }}</span>
|
|
4802
|
+
<span [class]="_singleDisplayClass()" [style.font-family]="_displayFontFamily()">{{ _displayValue() }}</span>
|
|
4469
4803
|
}
|
|
4470
4804
|
|
|
4471
4805
|
<!-- Right controls: clear + chevron -->
|
|
@@ -4545,7 +4879,7 @@ class ClxSelectComponent {
|
|
|
4545
4879
|
[disabled]="opt.disabled ?? false"
|
|
4546
4880
|
(mousedown)="$event.preventDefault()"
|
|
4547
4881
|
(click)="_selectOption(opt)">
|
|
4548
|
-
<span class="flex-1 text-left truncate">{{ opt.label }}</span>
|
|
4882
|
+
<span class="flex-1 text-left truncate" [style.font-family]="opt.previewFontFamily ?? null">{{ opt.label }}</span>
|
|
4549
4883
|
@if (_isSelected(opt.value)) {
|
|
4550
4884
|
<span clx-icon name="check" size="xs" class="shrink-0"></span>
|
|
4551
4885
|
}
|
|
@@ -4612,7 +4946,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
4612
4946
|
|
|
4613
4947
|
<!-- Single mode: display value -->
|
|
4614
4948
|
} @else {
|
|
4615
|
-
<span [class]="_singleDisplayClass()">{{ _displayValue() }}</span>
|
|
4949
|
+
<span [class]="_singleDisplayClass()" [style.font-family]="_displayFontFamily()">{{ _displayValue() }}</span>
|
|
4616
4950
|
}
|
|
4617
4951
|
|
|
4618
4952
|
<!-- Right controls: clear + chevron -->
|
|
@@ -4692,7 +5026,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
4692
5026
|
[disabled]="opt.disabled ?? false"
|
|
4693
5027
|
(mousedown)="$event.preventDefault()"
|
|
4694
5028
|
(click)="_selectOption(opt)">
|
|
4695
|
-
<span class="flex-1 text-left truncate">{{ opt.label }}</span>
|
|
5029
|
+
<span class="flex-1 text-left truncate" [style.font-family]="opt.previewFontFamily ?? null">{{ opt.label }}</span>
|
|
4696
5030
|
@if (_isSelected(opt.value)) {
|
|
4697
5031
|
<span clx-icon name="check" size="xs" class="shrink-0"></span>
|
|
4698
5032
|
}
|
|
@@ -5137,6 +5471,7 @@ class ClxAlertComponent {
|
|
|
5137
5471
|
_resolve = inject(CLX_ALERT_RESOLVE);
|
|
5138
5472
|
_animate = inject(ClxAnimateService);
|
|
5139
5473
|
_el = inject((ElementRef));
|
|
5474
|
+
_themeSvc = inject(ClxThemeService);
|
|
5140
5475
|
_zone;
|
|
5141
5476
|
constructor() {
|
|
5142
5477
|
const zone = inject(NgZone, { optional: true });
|
|
@@ -5144,17 +5479,36 @@ class ClxAlertComponent {
|
|
|
5144
5479
|
}
|
|
5145
5480
|
// ─── Resolved options ─────────────────────────────────────────────────────
|
|
5146
5481
|
get _type() { return this._opts.type ?? 'info'; }
|
|
5482
|
+
get _isConfirm() { return this._type === 'confirm'; }
|
|
5147
5483
|
_icon = signal(ALERT_ICON_MAP[this._type], ...(ngDevMode ? [{ debugName: "_icon" }] : /* istanbul ignore next */ []));
|
|
5148
|
-
_iconBg = signal(ALERT_ICON_BG_MAP[this._type], ...(ngDevMode ? [{ debugName: "_iconBg" }] : /* istanbul ignore next */ []));
|
|
5149
|
-
_iconColor = signal(ALERT_ICON_COLOR_MAP[this._type], ...(ngDevMode ? [{ debugName: "_iconColor" }] : /* istanbul ignore next */ []));
|
|
5150
|
-
_progressColor = signal(ALERT_PROGRESS_COLOR_MAP[this._type], ...(ngDevMode ? [{ debugName: "_progressColor" }] : /* istanbul ignore next */ []));
|
|
5151
5484
|
_title = signal(this._opts.title ?? '', ...(ngDevMode ? [{ debugName: "_title" }] : /* istanbul ignore next */ []));
|
|
5152
5485
|
_message = signal(this._opts.message ?? '', ...(ngDevMode ? [{ debugName: "_message" }] : /* istanbul ignore next */ []));
|
|
5153
5486
|
_showCancel = signal(this._opts.showCancelButton ?? this._opts.type === 'confirm', ...(ngDevMode ? [{ debugName: "_showCancel" }] : /* istanbul ignore next */ []));
|
|
5487
|
+
_iconBg = computed(() => {
|
|
5488
|
+
if (!this._isConfirm)
|
|
5489
|
+
return ALERT_ICON_BG_MAP[this._type];
|
|
5490
|
+
return resolveColor(this._themeSvc.config().primaryColor).bgSubtle;
|
|
5491
|
+
}, ...(ngDevMode ? [{ debugName: "_iconBg" }] : /* istanbul ignore next */ []));
|
|
5492
|
+
_iconColor = computed(() => {
|
|
5493
|
+
if (!this._isConfirm)
|
|
5494
|
+
return ALERT_ICON_COLOR_MAP[this._type];
|
|
5495
|
+
return resolveColor(this._themeSvc.config().primaryColor).textSubtle;
|
|
5496
|
+
}, ...(ngDevMode ? [{ debugName: "_iconColor" }] : /* istanbul ignore next */ []));
|
|
5497
|
+
_progressColor = computed(() => {
|
|
5498
|
+
if (!this._isConfirm)
|
|
5499
|
+
return ALERT_PROGRESS_COLOR_MAP[this._type];
|
|
5500
|
+
return resolveColor(this._themeSvc.config().primaryColor).bg;
|
|
5501
|
+
}, ...(ngDevMode ? [{ debugName: "_progressColor" }] : /* istanbul ignore next */ []));
|
|
5154
5502
|
_confirmText = signal(this._opts.confirmButton?.text ?? 'Aceptar', ...(ngDevMode ? [{ debugName: "_confirmText" }] : /* istanbul ignore next */ []));
|
|
5155
|
-
_confirmColor =
|
|
5503
|
+
_confirmColor = computed(() => {
|
|
5504
|
+
if (this._opts.confirmButton?.color)
|
|
5505
|
+
return this._opts.confirmButton.color;
|
|
5506
|
+
if (this._isConfirm)
|
|
5507
|
+
return this._themeSvc.config().primaryColor;
|
|
5508
|
+
return ALERT_CONFIRM_COLOR_MAP[this._type];
|
|
5509
|
+
}, ...(ngDevMode ? [{ debugName: "_confirmColor" }] : /* istanbul ignore next */ []));
|
|
5156
5510
|
_cancelText = signal(this._opts.cancelButton?.text ?? 'Cancelar', ...(ngDevMode ? [{ debugName: "_cancelText" }] : /* istanbul ignore next */ []));
|
|
5157
|
-
_cancelColor =
|
|
5511
|
+
_cancelColor = computed(() => this._opts.cancelButton?.color ?? this._themeSvc.config().secondaryColor, ...(ngDevMode ? [{ debugName: "_cancelColor" }] : /* istanbul ignore next */ []));
|
|
5158
5512
|
_cancelVariant = signal(this._opts.cancelButton?.variant ?? 'ghost', ...(ngDevMode ? [{ debugName: "_cancelVariant" }] : /* istanbul ignore next */ []));
|
|
5159
5513
|
// ─── Timer state ─────────────────────────────────────────────────────────
|
|
5160
5514
|
_timerTotal = signal(this._opts.timer ?? 0, ...(ngDevMode ? [{ debugName: "_timerTotal" }] : /* istanbul ignore next */ []));
|
|
@@ -5258,7 +5612,6 @@ class ClxAlertComponent {
|
|
|
5258
5612
|
[color]="_cancelColor()"
|
|
5259
5613
|
[variant]="_cancelVariant()"
|
|
5260
5614
|
size="md"
|
|
5261
|
-
shape="pill"
|
|
5262
5615
|
(click)="dismiss()"
|
|
5263
5616
|
>
|
|
5264
5617
|
{{ _cancelText() }}
|
|
@@ -5270,7 +5623,6 @@ class ClxAlertComponent {
|
|
|
5270
5623
|
[color]="_confirmColor()"
|
|
5271
5624
|
variant="solid"
|
|
5272
5625
|
size="md"
|
|
5273
|
-
shape="pill"
|
|
5274
5626
|
(click)="confirm()"
|
|
5275
5627
|
>
|
|
5276
5628
|
{{ _confirmText() }}
|
|
@@ -5330,7 +5682,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5330
5682
|
[color]="_cancelColor()"
|
|
5331
5683
|
[variant]="_cancelVariant()"
|
|
5332
5684
|
size="md"
|
|
5333
|
-
shape="pill"
|
|
5334
5685
|
(click)="dismiss()"
|
|
5335
5686
|
>
|
|
5336
5687
|
{{ _cancelText() }}
|
|
@@ -5342,7 +5693,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5342
5693
|
[color]="_confirmColor()"
|
|
5343
5694
|
variant="solid"
|
|
5344
5695
|
size="md"
|
|
5345
|
-
shape="pill"
|
|
5346
5696
|
(click)="confirm()"
|
|
5347
5697
|
>
|
|
5348
5698
|
{{ _confirmText() }}
|
|
@@ -5371,7 +5721,7 @@ const MODAL_SIZE_MAP = {
|
|
|
5371
5721
|
xl: 'w-full',
|
|
5372
5722
|
full: 'w-full h-screen rounded-none',
|
|
5373
5723
|
};
|
|
5374
|
-
const MODAL_CONTAINER_CLASS = 'flex flex-col bg-
|
|
5724
|
+
const MODAL_CONTAINER_CLASS = 'flex flex-col bg-clx-surface rounded-2xl shadow-2xl overflow-hidden';
|
|
5375
5725
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5376
5726
|
const CLX_MODAL_DATA = new InjectionToken('CLX_MODAL_DATA');
|
|
5377
5727
|
const CLX_MODAL_SIZE = new InjectionToken('CLX_MODAL_SIZE');
|
|
@@ -5394,7 +5744,7 @@ const DRAWER_WIDTH_MAP = {
|
|
|
5394
5744
|
md: '420px',
|
|
5395
5745
|
lg: '560px',
|
|
5396
5746
|
};
|
|
5397
|
-
const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-
|
|
5747
|
+
const DRAWER_CONTAINER_CLASS = 'flex flex-col bg-clx-surface shadow-2xl overflow-hidden h-screen';
|
|
5398
5748
|
const CLX_DRAWER_SIZE = new InjectionToken('CLX_DRAWER_SIZE');
|
|
5399
5749
|
|
|
5400
5750
|
class ClxDrawerComponent {
|
|
@@ -5448,7 +5798,7 @@ class ClxDrawerComponent {
|
|
|
5448
5798
|
</div>
|
|
5449
5799
|
|
|
5450
5800
|
<!-- Footer -->
|
|
5451
|
-
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0
|
|
5801
|
+
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0">
|
|
5452
5802
|
@if (_hasBuiltInButtons()) {
|
|
5453
5803
|
@if (showCancelButton()) {
|
|
5454
5804
|
<button
|
|
@@ -5456,7 +5806,6 @@ class ClxDrawerComponent {
|
|
|
5456
5806
|
[color]="_cancelColor()"
|
|
5457
5807
|
[variant]="_cancelVariant()"
|
|
5458
5808
|
size="md"
|
|
5459
|
-
shape="pill"
|
|
5460
5809
|
(click)="cancelClick.emit()">
|
|
5461
5810
|
{{ _cancelText() }}
|
|
5462
5811
|
</button>
|
|
@@ -5466,7 +5815,6 @@ class ClxDrawerComponent {
|
|
|
5466
5815
|
[color]="_confirmColor()"
|
|
5467
5816
|
[variant]="_confirmVariant()"
|
|
5468
5817
|
size="md"
|
|
5469
|
-
shape="pill"
|
|
5470
5818
|
(click)="confirmClick.emit()">
|
|
5471
5819
|
{{ _confirmText() }}
|
|
5472
5820
|
</button>
|
|
@@ -5509,7 +5857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5509
5857
|
</div>
|
|
5510
5858
|
|
|
5511
5859
|
<!-- Footer -->
|
|
5512
|
-
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0
|
|
5860
|
+
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0">
|
|
5513
5861
|
@if (_hasBuiltInButtons()) {
|
|
5514
5862
|
@if (showCancelButton()) {
|
|
5515
5863
|
<button
|
|
@@ -5517,7 +5865,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5517
5865
|
[color]="_cancelColor()"
|
|
5518
5866
|
[variant]="_cancelVariant()"
|
|
5519
5867
|
size="md"
|
|
5520
|
-
shape="pill"
|
|
5521
5868
|
(click)="cancelClick.emit()">
|
|
5522
5869
|
{{ _cancelText() }}
|
|
5523
5870
|
</button>
|
|
@@ -5527,7 +5874,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5527
5874
|
[color]="_confirmColor()"
|
|
5528
5875
|
[variant]="_confirmVariant()"
|
|
5529
5876
|
size="md"
|
|
5530
|
-
shape="pill"
|
|
5531
5877
|
(click)="confirmClick.emit()">
|
|
5532
5878
|
{{ _confirmText() }}
|
|
5533
5879
|
</button>
|
|
@@ -5569,7 +5915,7 @@ class ClxModalComponent {
|
|
|
5569
5915
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxModalComponent, isStandalone: true, selector: "clx-modal", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, confirmButton: { classPropertyName: "confirmButton", publicName: "confirmButton", isSignal: true, isRequired: false, transformFunction: null }, cancelButton: { classPropertyName: "cancelButton", publicName: "cancelButton", isSignal: true, isRequired: false, transformFunction: null }, showCancelButton: { classPropertyName: "showCancelButton", publicName: "showCancelButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmClick: "confirmClick", cancelClick: "cancelClick" }, host: { properties: { "class": "_hostClass()" } }, ngImport: i0, template: `
|
|
5570
5916
|
<!-- Header -->
|
|
5571
5917
|
<div class="flex items-center gap-3 px-6 py-4 border-b border-clx-border-soft shrink-0">
|
|
5572
|
-
<div class="flex-1 min-w-0">
|
|
5918
|
+
<div class="flex-1 min-w-0 text-clx-text-label">
|
|
5573
5919
|
<ng-content select="[clx-modal-title]" />
|
|
5574
5920
|
</div>
|
|
5575
5921
|
@if (showClose()) {
|
|
@@ -5593,7 +5939,7 @@ class ClxModalComponent {
|
|
|
5593
5939
|
</div>
|
|
5594
5940
|
|
|
5595
5941
|
<!-- Footer -->
|
|
5596
|
-
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0
|
|
5942
|
+
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0">
|
|
5597
5943
|
@if (_hasBuiltInButtons()) {
|
|
5598
5944
|
@if (showCancelButton()) {
|
|
5599
5945
|
<button
|
|
@@ -5601,7 +5947,6 @@ class ClxModalComponent {
|
|
|
5601
5947
|
[color]="_cancelColor()"
|
|
5602
5948
|
[variant]="_cancelVariant()"
|
|
5603
5949
|
size="md"
|
|
5604
|
-
shape="pill"
|
|
5605
5950
|
(click)="cancelClick.emit()">
|
|
5606
5951
|
{{ _cancelText() }}
|
|
5607
5952
|
</button>
|
|
@@ -5611,7 +5956,6 @@ class ClxModalComponent {
|
|
|
5611
5956
|
[color]="_confirmColor()"
|
|
5612
5957
|
[variant]="_confirmVariant()"
|
|
5613
5958
|
size="md"
|
|
5614
|
-
shape="pill"
|
|
5615
5959
|
(click)="confirmClick.emit()">
|
|
5616
5960
|
{{ _confirmText() }}
|
|
5617
5961
|
</button>
|
|
@@ -5630,7 +5974,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5630
5974
|
template: `
|
|
5631
5975
|
<!-- Header -->
|
|
5632
5976
|
<div class="flex items-center gap-3 px-6 py-4 border-b border-clx-border-soft shrink-0">
|
|
5633
|
-
<div class="flex-1 min-w-0">
|
|
5977
|
+
<div class="flex-1 min-w-0 text-clx-text-label">
|
|
5634
5978
|
<ng-content select="[clx-modal-title]" />
|
|
5635
5979
|
</div>
|
|
5636
5980
|
@if (showClose()) {
|
|
@@ -5654,7 +5998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5654
5998
|
</div>
|
|
5655
5999
|
|
|
5656
6000
|
<!-- Footer -->
|
|
5657
|
-
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0
|
|
6001
|
+
<div class="flex items-center justify-end gap-3 px-6 py-4 border-t border-clx-border-soft shrink-0">
|
|
5658
6002
|
@if (_hasBuiltInButtons()) {
|
|
5659
6003
|
@if (showCancelButton()) {
|
|
5660
6004
|
<button
|
|
@@ -5662,7 +6006,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5662
6006
|
[color]="_cancelColor()"
|
|
5663
6007
|
[variant]="_cancelVariant()"
|
|
5664
6008
|
size="md"
|
|
5665
|
-
shape="pill"
|
|
5666
6009
|
(click)="cancelClick.emit()">
|
|
5667
6010
|
{{ _cancelText() }}
|
|
5668
6011
|
</button>
|
|
@@ -5672,7 +6015,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
5672
6015
|
[color]="_confirmColor()"
|
|
5673
6016
|
[variant]="_confirmVariant()"
|
|
5674
6017
|
size="md"
|
|
5675
|
-
shape="pill"
|
|
5676
6018
|
(click)="confirmClick.emit()">
|
|
5677
6019
|
{{ _confirmText() }}
|
|
5678
6020
|
</button>
|
|
@@ -11693,7 +12035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11693
12035
|
}], propDecorators: { logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
|
|
11694
12036
|
|
|
11695
12037
|
// ── Item geometry ──────────────────────────────────────────────────────────────
|
|
11696
|
-
const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium
|
|
12038
|
+
const NAV_ITEM_BASE = 'flex items-center gap-3 w-full text-sm font-medium cursor-pointer select-none';
|
|
11697
12039
|
const NAV_ITEM_L1 = 'px-6 py-3';
|
|
11698
12040
|
const NAV_ITEM_L2 = 'pl-4 pr-3 py-2';
|
|
11699
12041
|
const NAV_ITEM_IDLE = 'text-clx-text-subtle';
|
|
@@ -11713,9 +12055,7 @@ class ClxMenuItemComponent {
|
|
|
11713
12055
|
routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
11714
12056
|
routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
|
|
11715
12057
|
itemClick = output();
|
|
11716
|
-
|
|
11717
|
-
_resolvedColor = computed(() => this._inheritedColor() ?? this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : /* istanbul ignore next */ []));
|
|
11718
|
-
inheritColor(c) { this._inheritedColor.set(c); }
|
|
12058
|
+
_resolvedColor = computed(() => this.color() ?? this._themeSvc.sidebarItemColor(), ...(ngDevMode ? [{ debugName: "_resolvedColor" }] : /* istanbul ignore next */ []));
|
|
11719
12059
|
_geom = computed(() => {
|
|
11720
12060
|
if (this.collapsed())
|
|
11721
12061
|
return 'w-full py-3 px-0 justify-center';
|
|
@@ -11723,8 +12063,8 @@ class ClxMenuItemComponent {
|
|
|
11723
12063
|
}, ...(ngDevMode ? [{ debugName: "_geom" }] : /* istanbul ignore next */ []));
|
|
11724
12064
|
_iconCls = computed(() => resolveColor(this._resolvedColor()).textSubtle, ...(ngDevMode ? [{ debugName: "_iconCls" }] : /* istanbul ignore next */ []));
|
|
11725
12065
|
_idleCls = computed(() => {
|
|
11726
|
-
const
|
|
11727
|
-
return `${NAV_ITEM_BASE} ${this._geom()} ${
|
|
12066
|
+
const hover = resolveColor(this._resolvedColor()).hoverBgMuted;
|
|
12067
|
+
return `${NAV_ITEM_BASE} ${this._geom()} ${hover}`;
|
|
11728
12068
|
}, ...(ngDevMode ? [{ debugName: "_idleCls" }] : /* istanbul ignore next */ []));
|
|
11729
12069
|
_activeCls = computed(() => {
|
|
11730
12070
|
const t = resolveColor(this._resolvedColor());
|
|
@@ -11744,10 +12084,10 @@ class ClxMenuItemComponent {
|
|
|
11744
12084
|
[class]="rla.isActive ? _activeCls() : _idleCls()"
|
|
11745
12085
|
[title]="collapsed() ? label() : ''">
|
|
11746
12086
|
@if (icon()) {
|
|
11747
|
-
<span clx-icon [name]="icon()" size="sm" [class]="
|
|
12087
|
+
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11748
12088
|
}
|
|
11749
12089
|
@if (!collapsed()) {
|
|
11750
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12090
|
+
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11751
12091
|
}
|
|
11752
12092
|
</a>
|
|
11753
12093
|
} @else {
|
|
@@ -11757,10 +12097,10 @@ class ClxMenuItemComponent {
|
|
|
11757
12097
|
[title]="collapsed() ? label() : ''"
|
|
11758
12098
|
(click)="itemClick.emit()">
|
|
11759
12099
|
@if (icon()) {
|
|
11760
|
-
<span clx-icon [name]="icon()" size="sm" [class]="
|
|
12100
|
+
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11761
12101
|
}
|
|
11762
12102
|
@if (!collapsed()) {
|
|
11763
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12103
|
+
<span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11764
12104
|
}
|
|
11765
12105
|
</button>
|
|
11766
12106
|
}
|
|
@@ -11782,10 +12122,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11782
12122
|
[class]="rla.isActive ? _activeCls() : _idleCls()"
|
|
11783
12123
|
[title]="collapsed() ? label() : ''">
|
|
11784
12124
|
@if (icon()) {
|
|
11785
|
-
<span clx-icon [name]="icon()" size="sm" [class]="
|
|
12125
|
+
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11786
12126
|
}
|
|
11787
12127
|
@if (!collapsed()) {
|
|
11788
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12128
|
+
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11789
12129
|
}
|
|
11790
12130
|
</a>
|
|
11791
12131
|
} @else {
|
|
@@ -11795,10 +12135,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11795
12135
|
[title]="collapsed() ? label() : ''"
|
|
11796
12136
|
(click)="itemClick.emit()">
|
|
11797
12137
|
@if (icon()) {
|
|
11798
|
-
<span clx-icon [name]="icon()" size="sm" [class]="
|
|
12138
|
+
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11799
12139
|
}
|
|
11800
12140
|
@if (!collapsed()) {
|
|
11801
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12141
|
+
<span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11802
12142
|
}
|
|
11803
12143
|
</button>
|
|
11804
12144
|
}
|
|
@@ -11814,14 +12154,13 @@ class ClxMenuComponent {
|
|
|
11814
12154
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
11815
12155
|
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
11816
12156
|
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
11817
|
-
_color = computed(() => this.color() ?? this._themeSvc.
|
|
12157
|
+
_color = computed(() => this.color() ?? this._themeSvc.sidebarMenuColor(), ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
11818
12158
|
collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
11819
12159
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
11820
12160
|
routerLink = input('', ...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
11821
12161
|
routerLinkActiveOptions = input({ exact: false }, ...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
|
|
11822
12162
|
_isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "_isExpanded" }] : /* istanbul ignore next */ []));
|
|
11823
12163
|
_rla;
|
|
11824
|
-
_childItems;
|
|
11825
12164
|
_destroyRef = inject(DestroyRef);
|
|
11826
12165
|
constructor() {
|
|
11827
12166
|
effect(() => { if (this.active())
|
|
@@ -11849,26 +12188,16 @@ class ClxMenuComponent {
|
|
|
11849
12188
|
return `${base} ${t.textSubtle} font-semibold`;
|
|
11850
12189
|
return `${base} ${t.textSubtle} font-semibold border-l-2 ${t.borderLight} !pl-[22px]`;
|
|
11851
12190
|
}
|
|
11852
|
-
return `${base} ${
|
|
12191
|
+
return `${base} ${t.hoverBgMuted}`;
|
|
11853
12192
|
}
|
|
11854
12193
|
NAV_CHILDREN_WRAPPER = NAV_CHILDREN_WRAPPER;
|
|
11855
12194
|
NAV_CHILDREN_INNER = NAV_CHILDREN_INNER;
|
|
11856
12195
|
NAV_CHILDREN_LIST = NAV_CHILDREN_LIST;
|
|
11857
|
-
ngAfterContentInit() {
|
|
11858
|
-
this._syncChildren();
|
|
11859
|
-
this._childItems.changes
|
|
11860
|
-
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
11861
|
-
.subscribe(() => this._syncChildren());
|
|
11862
|
-
}
|
|
11863
|
-
_syncChildren() {
|
|
11864
|
-
const color = this._color();
|
|
11865
|
-
this._childItems.forEach(c => c.inheritColor(color));
|
|
11866
|
-
}
|
|
11867
12196
|
_toggle() {
|
|
11868
12197
|
this._isExpanded.update(v => !v);
|
|
11869
12198
|
}
|
|
11870
12199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11871
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" },
|
|
12200
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxMenuComponent, isStandalone: true, selector: "clx-menu", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, routerLink: { classPropertyName: "routerLink", publicName: "routerLink", isSignal: true, isRequired: false, transformFunction: null }, routerLinkActiveOptions: { classPropertyName: "routerLinkActiveOptions", publicName: "routerLinkActiveOptions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, viewQueries: [{ propertyName: "_rla", first: true, predicate: RouterLinkActive, descendants: true }], ngImport: i0, template: `
|
|
11872
12201
|
@if (routerLink()) {
|
|
11873
12202
|
<a
|
|
11874
12203
|
[routerLink]="routerLink()"
|
|
@@ -11882,7 +12211,7 @@ class ClxMenuComponent {
|
|
|
11882
12211
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11883
12212
|
}
|
|
11884
12213
|
@if (!collapsed()) {
|
|
11885
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12214
|
+
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11886
12215
|
<span
|
|
11887
12216
|
clx-icon
|
|
11888
12217
|
name="expand_more"
|
|
@@ -11902,7 +12231,7 @@ class ClxMenuComponent {
|
|
|
11902
12231
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11903
12232
|
}
|
|
11904
12233
|
@if (!collapsed()) {
|
|
11905
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12234
|
+
<span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11906
12235
|
<span
|
|
11907
12236
|
clx-icon
|
|
11908
12237
|
name="expand_more"
|
|
@@ -11945,7 +12274,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11945
12274
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11946
12275
|
}
|
|
11947
12276
|
@if (!collapsed()) {
|
|
11948
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12277
|
+
<span class="flex-1 text-left truncate" [class]="rla.isActive ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11949
12278
|
<span
|
|
11950
12279
|
clx-icon
|
|
11951
12280
|
name="expand_more"
|
|
@@ -11965,7 +12294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11965
12294
|
<span clx-icon [name]="icon()" size="sm" [class]="_iconCls()"></span>
|
|
11966
12295
|
}
|
|
11967
12296
|
@if (!collapsed()) {
|
|
11968
|
-
<span class="flex-1 text-left truncate">{{ label() }}</span>
|
|
12297
|
+
<span class="flex-1 text-left truncate" [class]="active() ? '' : 'text-clx-text-subtle'">{{ label() }}</span>
|
|
11969
12298
|
<span
|
|
11970
12299
|
clx-icon
|
|
11971
12300
|
name="expand_more"
|
|
@@ -11994,18 +12323,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
11994
12323
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], routerLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLink", required: false }] }], routerLinkActiveOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "routerLinkActiveOptions", required: false }] }], _rla: [{
|
|
11995
12324
|
type: ViewChild,
|
|
11996
12325
|
args: [RouterLinkActive]
|
|
11997
|
-
}], _childItems: [{
|
|
11998
|
-
type: ContentChildren,
|
|
11999
|
-
args: [ClxMenuItemComponent, { descendants: true }]
|
|
12000
12326
|
}] } });
|
|
12001
12327
|
|
|
12002
12328
|
class ClxNavGroupComponent {
|
|
12003
12329
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
12004
12330
|
collapsed = input(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
12331
|
+
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
12332
|
+
labelClass = computed(() => {
|
|
12333
|
+
const c = this.color();
|
|
12334
|
+
return c ? resolveColor(c).textSubtle : 'text-clx-text-subtle';
|
|
12335
|
+
}, ...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
|
|
12005
12336
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxNavGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12006
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxNavGroupComponent, isStandalone: true, selector: "clx-nav-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
12337
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxNavGroupComponent, isStandalone: true, selector: "clx-nav-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
|
|
12007
12338
|
@if (!collapsed()) {
|
|
12008
|
-
<span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest
|
|
12339
|
+
<span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest select-none" [class]="labelClass()">{{ label() }}</span>
|
|
12009
12340
|
} @else {
|
|
12010
12341
|
<span class="flex items-center justify-center w-full py-3">
|
|
12011
12342
|
<span class="w-1.5 h-1.5 rounded-full bg-clx-border"></span>
|
|
@@ -12020,7 +12351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12020
12351
|
standalone: true,
|
|
12021
12352
|
template: `
|
|
12022
12353
|
@if (!collapsed()) {
|
|
12023
|
-
<span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest
|
|
12354
|
+
<span class="block px-6 pt-5 pb-1 text-[10px] font-bold uppercase tracking-widest select-none" [class]="labelClass()">{{ label() }}</span>
|
|
12024
12355
|
} @else {
|
|
12025
12356
|
<span class="flex items-center justify-center w-full py-3">
|
|
12026
12357
|
<span class="w-1.5 h-1.5 rounded-full bg-clx-border"></span>
|
|
@@ -12031,7 +12362,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12031
12362
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12032
12363
|
host: { class: 'block' },
|
|
12033
12364
|
}]
|
|
12034
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }] } });
|
|
12365
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
12035
12366
|
|
|
12036
12367
|
class ClxProfileComponent {
|
|
12037
12368
|
// ── Inputs ──────────────────────────────────────────────────────────────────
|
|
@@ -12252,7 +12583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
12252
12583
|
// ── Base classes ─────────────────────────────────────────────────────────────
|
|
12253
12584
|
const TABLE_BASE_CLASS = 'w-full text-left border-collapse text-sm';
|
|
12254
12585
|
const TABLE_HEADER_CELL_CLASS = 'px-4 py-3 font-semibold whitespace-nowrap';
|
|
12255
|
-
const TABLE_CELL_CLASS = 'px-4 py-3 border-b border-
|
|
12586
|
+
const TABLE_CELL_CLASS = 'px-4 py-3 border-b border-clx-border-soft text-clx-text-label';
|
|
12256
12587
|
const TABLE_ROW_CLASS = '';
|
|
12257
12588
|
// ── Alignment ────────────────────────────────────────────────────────────────
|
|
12258
12589
|
const TABLE_ALIGN_MAP = {
|
|
@@ -14873,5 +15204,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
14873
15204
|
* Generated bundle index. Do not edit.
|
|
14874
15205
|
*/
|
|
14875
15206
|
|
|
14876
|
-
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
15207
|
+
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxChartComponent, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
14877
15208
|
//# sourceMappingURL=codexly-ui.mjs.map
|