@cscfi/csc-ui 4.0.0-alpha.19 → 4.0.0-alpha.20
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/dist/csc-ui.js +5037 -5003
- package/dist/custom-elements.json +9 -1
- package/dist/styles/css/tokens.css +417 -1
- package/dist/vscode.css-custom-data.json +1 -1
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +3 -3
- package/dist-types/components/c-menu-item/CMenuItem.vue.d.ts +1 -0
- package/dist-types/shared/useAnchoredPanel.d.ts +12 -7
- package/dist-types/tag-name-map.d.ts +1 -0
- package/dist-types/theme/themeMode.d.ts +21 -6
- package/package.json +1 -1
|
@@ -2389,7 +2389,7 @@
|
|
|
2389
2389
|
"cssParts": [
|
|
2390
2390
|
{
|
|
2391
2391
|
"name": "root",
|
|
2392
|
-
"description": "The card's visible surface, carries the background, border, radius, shadow and section spacing"
|
|
2392
|
+
"description": "The card's visible surface, carries the background and its ink, border, radius, shadow and section spacing"
|
|
2393
2393
|
},
|
|
2394
2394
|
{
|
|
2395
2395
|
"name": "fullscreen-toggle",
|
|
@@ -6453,6 +6453,14 @@
|
|
|
6453
6453
|
"signature": "()"
|
|
6454
6454
|
}
|
|
6455
6455
|
},
|
|
6456
|
+
{
|
|
6457
|
+
"kind": "method",
|
|
6458
|
+
"name": "isSubmenuOpen",
|
|
6459
|
+
"privacy": "public",
|
|
6460
|
+
"csc": {
|
|
6461
|
+
"signature": "(): boolean"
|
|
6462
|
+
}
|
|
6463
|
+
},
|
|
6456
6464
|
{
|
|
6457
6465
|
"kind": "method",
|
|
6458
6466
|
"name": "openSubmenu",
|
|
@@ -139,7 +139,13 @@
|
|
|
139
139
|
* data-theme="light" or "dark" opens a mode scope for its subtree, and the
|
|
140
140
|
* nearest enclosing scope wins (ADR-0053). Block order is load-bearing:
|
|
141
141
|
* :root and [data-theme='dark'] have equal specificity, so dark must stay
|
|
142
|
-
* last.
|
|
142
|
+
* last.
|
|
143
|
+
*
|
|
144
|
+
* data-theme-invert opens an INVERTING scope: the opposite of the mode it
|
|
145
|
+
* sits in, keyed off the --c-mode keyword through a style container query
|
|
146
|
+
* (ADR-0054). --c-mode is emitter-owned; do not hand-write it.
|
|
147
|
+
*
|
|
148
|
+
* See utils/createSemanticTheme.cjs for the full cascade rationale.
|
|
143
149
|
*/
|
|
144
150
|
|
|
145
151
|
/* Mode-invariant roles (identical in light and dark). */
|
|
@@ -155,6 +161,7 @@
|
|
|
155
161
|
:root,
|
|
156
162
|
[data-theme='light'] {
|
|
157
163
|
color-scheme: light;
|
|
164
|
+
--c-mode: light;
|
|
158
165
|
--c-surface: var(--c-white);
|
|
159
166
|
--c-surface-raised: var(--c-white);
|
|
160
167
|
--c-surface-overlay: var(--c-white);
|
|
@@ -252,6 +259,7 @@
|
|
|
252
259
|
/* Explicit dark, at the root or in any mode scope (wins over the OS preference). */
|
|
253
260
|
[data-theme='dark'] {
|
|
254
261
|
color-scheme: dark;
|
|
262
|
+
--c-mode: dark;
|
|
255
263
|
--c-surface: var(--c-slate-800);
|
|
256
264
|
--c-surface-raised: var(--c-slate-800);
|
|
257
265
|
--c-surface-overlay: var(--c-slate-700);
|
|
@@ -350,6 +358,414 @@
|
|
|
350
358
|
@media (prefers-color-scheme: dark) {
|
|
351
359
|
:root:not([data-theme='light']):not([data-theme='dark']) {
|
|
352
360
|
color-scheme: dark;
|
|
361
|
+
--c-mode: dark;
|
|
362
|
+
--c-surface: var(--c-slate-800);
|
|
363
|
+
--c-surface-raised: var(--c-slate-800);
|
|
364
|
+
--c-surface-overlay: var(--c-slate-700);
|
|
365
|
+
--c-surface-muted: var(--c-slate-850);
|
|
366
|
+
--c-surface-sunken: var(--c-slate-900);
|
|
367
|
+
--c-on-surface: var(--c-slate-100);
|
|
368
|
+
--c-on-surface-muted: var(--c-slate-300);
|
|
369
|
+
--c-on-surface-faint: var(--c-slate-400);
|
|
370
|
+
--c-on-surface-sunken: var(--c-slate-100);
|
|
371
|
+
--c-border: var(--c-slate-700);
|
|
372
|
+
--c-border-strong: var(--c-slate-400);
|
|
373
|
+
--c-divider: color-mix(in srgb, var(--c-white) 12%, transparent);
|
|
374
|
+
--c-ring: var(--c-primary-300);
|
|
375
|
+
--c-surface-inverted: var(--c-white);
|
|
376
|
+
--c-on-surface-inverted: var(--c-slate-900);
|
|
377
|
+
--c-on-surface-inverted-muted: var(--c-tertiary-600);
|
|
378
|
+
--c-success-inverted: var(--c-success-600);
|
|
379
|
+
--c-info-inverted: var(--c-info-600);
|
|
380
|
+
--c-warning-inverted: var(--c-warning-600);
|
|
381
|
+
--c-error-inverted: var(--c-error-600);
|
|
382
|
+
--c-primary: var(--c-primary-300);
|
|
383
|
+
--c-primary-hover: var(--c-primary-200);
|
|
384
|
+
--c-on-primary: var(--c-primary-950);
|
|
385
|
+
--c-primary-subtle: var(--c-primary-700);
|
|
386
|
+
--c-primary-subtle-hover: var(--c-primary-600);
|
|
387
|
+
--c-on-primary-subtle: var(--c-primary-200);
|
|
388
|
+
--c-secondary: var(--c-secondary-300);
|
|
389
|
+
--c-secondary-hover: var(--c-secondary-200);
|
|
390
|
+
--c-on-secondary: var(--c-secondary-950);
|
|
391
|
+
--c-secondary-subtle: var(--c-secondary-700);
|
|
392
|
+
--c-secondary-subtle-hover: var(--c-secondary-600);
|
|
393
|
+
--c-on-secondary-subtle: var(--c-secondary-200);
|
|
394
|
+
--c-accent: var(--c-accent-400);
|
|
395
|
+
--c-accent-hover: var(--c-accent-300);
|
|
396
|
+
--c-on-accent: var(--c-accent-950);
|
|
397
|
+
--c-accent-subtle: var(--c-accent-800);
|
|
398
|
+
--c-accent-subtle-hover: var(--c-accent-700);
|
|
399
|
+
--c-on-accent-subtle: var(--c-accent-200);
|
|
400
|
+
--c-success: var(--c-success-400);
|
|
401
|
+
--c-success-hover: var(--c-success-300);
|
|
402
|
+
--c-on-success: var(--c-success-950);
|
|
403
|
+
--c-success-subtle: var(--c-success-800);
|
|
404
|
+
--c-success-subtle-hover: var(--c-success-700);
|
|
405
|
+
--c-on-success-subtle: var(--c-success-200);
|
|
406
|
+
--c-info: var(--c-info-400);
|
|
407
|
+
--c-info-hover: var(--c-info-300);
|
|
408
|
+
--c-on-info: var(--c-info-950);
|
|
409
|
+
--c-info-subtle: var(--c-info-700);
|
|
410
|
+
--c-info-subtle-hover: var(--c-info-600);
|
|
411
|
+
--c-on-info-subtle: var(--c-info-200);
|
|
412
|
+
--c-warning: var(--c-warning-400);
|
|
413
|
+
--c-warning-hover: var(--c-warning-300);
|
|
414
|
+
--c-on-warning: var(--c-warning-950);
|
|
415
|
+
--c-warning-subtle: var(--c-warning-800);
|
|
416
|
+
--c-warning-subtle-hover: var(--c-warning-700);
|
|
417
|
+
--c-on-warning-subtle: var(--c-warning-200);
|
|
418
|
+
--c-error: var(--c-error-400);
|
|
419
|
+
--c-error-hover: var(--c-error-300);
|
|
420
|
+
--c-on-error: var(--c-error-950);
|
|
421
|
+
--c-error-subtle: var(--c-error-700);
|
|
422
|
+
--c-error-subtle-hover: var(--c-error-600);
|
|
423
|
+
--c-on-error-subtle: var(--c-error-200);
|
|
424
|
+
--c-link: var(--c-link-200);
|
|
425
|
+
--c-link-hover: var(--c-link-100);
|
|
426
|
+
--c-on-link: var(--c-link-900);
|
|
427
|
+
--c-link-subtle: var(--c-link-700);
|
|
428
|
+
--c-link-subtle-hover: var(--c-link-600);
|
|
429
|
+
--c-on-link-subtle: var(--c-link-200);
|
|
430
|
+
--c-nav-surface: var(--c-primary-700);
|
|
431
|
+
--c-nav-surface-hover: var(--c-primary-600);
|
|
432
|
+
--c-on-nav: var(--c-primary-100);
|
|
433
|
+
--c-nav-active: var(--c-primary-500);
|
|
434
|
+
--c-on-nav-active: var(--c-white);
|
|
435
|
+
--c-nav-sub-active: color-mix(in srgb, var(--c-white) 18%, transparent);
|
|
436
|
+
--c-chart-1: oklch(0.6504 0.1710 247.9858);
|
|
437
|
+
--c-chart-2: oklch(0.5920 0.1445 343.8493);
|
|
438
|
+
--c-chart-3: oklch(0.6696 0.1303 89.2281);
|
|
439
|
+
--c-chart-4: oklch(0.5861 0.1562 304.1845);
|
|
440
|
+
--c-chart-5: oklch(0.6697 0.1216 175.8180);
|
|
441
|
+
--c-chart-6: oklch(0.5874 0.1449 15.7250);
|
|
442
|
+
--c-chart-7: oklch(0.6696 0.1134 215.6049);
|
|
443
|
+
--c-chart-8: oklch(0.5788 0.1701 271.6728);
|
|
444
|
+
--c-chart-9: oklch(0.6689 0.1550 335.8160);
|
|
445
|
+
--c-chart-10: oklch(0.6126 0.1374 113.7550);
|
|
446
|
+
--c-chart-11: oklch(0.6562 0.1563 281.6216);
|
|
447
|
+
--c-chart-12: oklch(0.5979 0.1019 195.6274);
|
|
448
|
+
--c-chart-surface: var(--c-slate-800);
|
|
449
|
+
--c-chart-grid: var(--c-slate-700);
|
|
450
|
+
--c-chart-axis: var(--c-slate-300);
|
|
451
|
+
--c-logo-wordmark: var(--c-white);
|
|
452
|
+
--c-logo-teal: var(--c-white);
|
|
453
|
+
--c-logo-magenta: var(--c-white);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/*
|
|
458
|
+
* The inverting scope: the opposite of the mode the element sits in.
|
|
459
|
+
* The style query reads the nearest ANCESTOR container, never the element
|
|
460
|
+
* itself, so the scope declares the opposite ON ITSELF and nesting resolves
|
|
461
|
+
* by inheritance proximity exactly as a pinned scope does (ADR-0054).
|
|
462
|
+
*/
|
|
463
|
+
@container style(--c-mode: light) {
|
|
464
|
+
[data-theme-invert]:where(:not([data-theme='light']):not([data-theme='dark'])) {
|
|
465
|
+
color-scheme: dark;
|
|
466
|
+
--c-mode: dark;
|
|
467
|
+
--c-surface: var(--c-slate-800);
|
|
468
|
+
--c-surface-raised: var(--c-slate-800);
|
|
469
|
+
--c-surface-overlay: var(--c-slate-700);
|
|
470
|
+
--c-surface-muted: var(--c-slate-850);
|
|
471
|
+
--c-surface-sunken: var(--c-slate-900);
|
|
472
|
+
--c-on-surface: var(--c-slate-100);
|
|
473
|
+
--c-on-surface-muted: var(--c-slate-300);
|
|
474
|
+
--c-on-surface-faint: var(--c-slate-400);
|
|
475
|
+
--c-on-surface-sunken: var(--c-slate-100);
|
|
476
|
+
--c-border: var(--c-slate-700);
|
|
477
|
+
--c-border-strong: var(--c-slate-400);
|
|
478
|
+
--c-divider: color-mix(in srgb, var(--c-white) 12%, transparent);
|
|
479
|
+
--c-ring: var(--c-primary-300);
|
|
480
|
+
--c-surface-inverted: var(--c-white);
|
|
481
|
+
--c-on-surface-inverted: var(--c-slate-900);
|
|
482
|
+
--c-on-surface-inverted-muted: var(--c-tertiary-600);
|
|
483
|
+
--c-success-inverted: var(--c-success-600);
|
|
484
|
+
--c-info-inverted: var(--c-info-600);
|
|
485
|
+
--c-warning-inverted: var(--c-warning-600);
|
|
486
|
+
--c-error-inverted: var(--c-error-600);
|
|
487
|
+
--c-primary: var(--c-primary-300);
|
|
488
|
+
--c-primary-hover: var(--c-primary-200);
|
|
489
|
+
--c-on-primary: var(--c-primary-950);
|
|
490
|
+
--c-primary-subtle: var(--c-primary-700);
|
|
491
|
+
--c-primary-subtle-hover: var(--c-primary-600);
|
|
492
|
+
--c-on-primary-subtle: var(--c-primary-200);
|
|
493
|
+
--c-secondary: var(--c-secondary-300);
|
|
494
|
+
--c-secondary-hover: var(--c-secondary-200);
|
|
495
|
+
--c-on-secondary: var(--c-secondary-950);
|
|
496
|
+
--c-secondary-subtle: var(--c-secondary-700);
|
|
497
|
+
--c-secondary-subtle-hover: var(--c-secondary-600);
|
|
498
|
+
--c-on-secondary-subtle: var(--c-secondary-200);
|
|
499
|
+
--c-accent: var(--c-accent-400);
|
|
500
|
+
--c-accent-hover: var(--c-accent-300);
|
|
501
|
+
--c-on-accent: var(--c-accent-950);
|
|
502
|
+
--c-accent-subtle: var(--c-accent-800);
|
|
503
|
+
--c-accent-subtle-hover: var(--c-accent-700);
|
|
504
|
+
--c-on-accent-subtle: var(--c-accent-200);
|
|
505
|
+
--c-success: var(--c-success-400);
|
|
506
|
+
--c-success-hover: var(--c-success-300);
|
|
507
|
+
--c-on-success: var(--c-success-950);
|
|
508
|
+
--c-success-subtle: var(--c-success-800);
|
|
509
|
+
--c-success-subtle-hover: var(--c-success-700);
|
|
510
|
+
--c-on-success-subtle: var(--c-success-200);
|
|
511
|
+
--c-info: var(--c-info-400);
|
|
512
|
+
--c-info-hover: var(--c-info-300);
|
|
513
|
+
--c-on-info: var(--c-info-950);
|
|
514
|
+
--c-info-subtle: var(--c-info-700);
|
|
515
|
+
--c-info-subtle-hover: var(--c-info-600);
|
|
516
|
+
--c-on-info-subtle: var(--c-info-200);
|
|
517
|
+
--c-warning: var(--c-warning-400);
|
|
518
|
+
--c-warning-hover: var(--c-warning-300);
|
|
519
|
+
--c-on-warning: var(--c-warning-950);
|
|
520
|
+
--c-warning-subtle: var(--c-warning-800);
|
|
521
|
+
--c-warning-subtle-hover: var(--c-warning-700);
|
|
522
|
+
--c-on-warning-subtle: var(--c-warning-200);
|
|
523
|
+
--c-error: var(--c-error-400);
|
|
524
|
+
--c-error-hover: var(--c-error-300);
|
|
525
|
+
--c-on-error: var(--c-error-950);
|
|
526
|
+
--c-error-subtle: var(--c-error-700);
|
|
527
|
+
--c-error-subtle-hover: var(--c-error-600);
|
|
528
|
+
--c-on-error-subtle: var(--c-error-200);
|
|
529
|
+
--c-link: var(--c-link-200);
|
|
530
|
+
--c-link-hover: var(--c-link-100);
|
|
531
|
+
--c-on-link: var(--c-link-900);
|
|
532
|
+
--c-link-subtle: var(--c-link-700);
|
|
533
|
+
--c-link-subtle-hover: var(--c-link-600);
|
|
534
|
+
--c-on-link-subtle: var(--c-link-200);
|
|
535
|
+
--c-nav-surface: var(--c-primary-700);
|
|
536
|
+
--c-nav-surface-hover: var(--c-primary-600);
|
|
537
|
+
--c-on-nav: var(--c-primary-100);
|
|
538
|
+
--c-nav-active: var(--c-primary-500);
|
|
539
|
+
--c-on-nav-active: var(--c-white);
|
|
540
|
+
--c-nav-sub-active: color-mix(in srgb, var(--c-white) 18%, transparent);
|
|
541
|
+
--c-chart-1: oklch(0.6504 0.1710 247.9858);
|
|
542
|
+
--c-chart-2: oklch(0.5920 0.1445 343.8493);
|
|
543
|
+
--c-chart-3: oklch(0.6696 0.1303 89.2281);
|
|
544
|
+
--c-chart-4: oklch(0.5861 0.1562 304.1845);
|
|
545
|
+
--c-chart-5: oklch(0.6697 0.1216 175.8180);
|
|
546
|
+
--c-chart-6: oklch(0.5874 0.1449 15.7250);
|
|
547
|
+
--c-chart-7: oklch(0.6696 0.1134 215.6049);
|
|
548
|
+
--c-chart-8: oklch(0.5788 0.1701 271.6728);
|
|
549
|
+
--c-chart-9: oklch(0.6689 0.1550 335.8160);
|
|
550
|
+
--c-chart-10: oklch(0.6126 0.1374 113.7550);
|
|
551
|
+
--c-chart-11: oklch(0.6562 0.1563 281.6216);
|
|
552
|
+
--c-chart-12: oklch(0.5979 0.1019 195.6274);
|
|
553
|
+
--c-chart-surface: var(--c-slate-800);
|
|
554
|
+
--c-chart-grid: var(--c-slate-700);
|
|
555
|
+
--c-chart-axis: var(--c-slate-300);
|
|
556
|
+
--c-logo-wordmark: var(--c-white);
|
|
557
|
+
--c-logo-teal: var(--c-white);
|
|
558
|
+
--c-logo-magenta: var(--c-white);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
@container style(--c-mode: dark) {
|
|
563
|
+
[data-theme-invert]:where(:not([data-theme='light']):not([data-theme='dark'])) {
|
|
564
|
+
color-scheme: light;
|
|
565
|
+
--c-mode: light;
|
|
566
|
+
--c-surface: var(--c-white);
|
|
567
|
+
--c-surface-raised: var(--c-white);
|
|
568
|
+
--c-surface-overlay: var(--c-white);
|
|
569
|
+
--c-surface-muted: var(--c-tertiary-100);
|
|
570
|
+
--c-surface-sunken: var(--c-primary-100);
|
|
571
|
+
--c-on-surface: var(--c-primary-900);
|
|
572
|
+
--c-on-surface-muted: var(--c-tertiary-500);
|
|
573
|
+
--c-on-surface-faint: var(--c-tertiary-500);
|
|
574
|
+
--c-on-surface-sunken: var(--c-primary-700);
|
|
575
|
+
--c-border: var(--c-tertiary-200);
|
|
576
|
+
--c-border-strong: var(--c-tertiary-600);
|
|
577
|
+
--c-divider: color-mix(in srgb, var(--c-black) 12%, transparent);
|
|
578
|
+
--c-ring: var(--c-primary-500);
|
|
579
|
+
--c-surface-inverted: var(--c-slate-950);
|
|
580
|
+
--c-on-surface-inverted: var(--c-white);
|
|
581
|
+
--c-on-surface-inverted-muted: var(--c-slate-300);
|
|
582
|
+
--c-success-inverted: var(--c-success-400);
|
|
583
|
+
--c-info-inverted: var(--c-info-400);
|
|
584
|
+
--c-warning-inverted: var(--c-warning-400);
|
|
585
|
+
--c-error-inverted: var(--c-error-400);
|
|
586
|
+
--c-primary: var(--c-primary-500);
|
|
587
|
+
--c-primary-hover: var(--c-primary-300);
|
|
588
|
+
--c-on-primary: var(--c-white);
|
|
589
|
+
--c-primary-subtle: var(--c-primary-100);
|
|
590
|
+
--c-primary-subtle-hover: var(--c-primary-50);
|
|
591
|
+
--c-on-primary-subtle: var(--c-primary-700);
|
|
592
|
+
--c-secondary: var(--c-secondary-500);
|
|
593
|
+
--c-secondary-hover: var(--c-secondary-300);
|
|
594
|
+
--c-on-secondary: var(--c-white);
|
|
595
|
+
--c-secondary-subtle: var(--c-secondary-100);
|
|
596
|
+
--c-secondary-subtle-hover: var(--c-secondary-50);
|
|
597
|
+
--c-on-secondary-subtle: var(--c-secondary-700);
|
|
598
|
+
--c-accent: var(--c-accent-500);
|
|
599
|
+
--c-accent-hover: var(--c-accent-300);
|
|
600
|
+
--c-on-accent: var(--c-white);
|
|
601
|
+
--c-accent-subtle: var(--c-accent-100);
|
|
602
|
+
--c-accent-subtle-hover: var(--c-accent-50);
|
|
603
|
+
--c-on-accent-subtle: var(--c-accent-700);
|
|
604
|
+
--c-success: var(--c-success-500);
|
|
605
|
+
--c-success-hover: var(--c-success-300);
|
|
606
|
+
--c-on-success: var(--c-white);
|
|
607
|
+
--c-success-subtle: var(--c-success-100);
|
|
608
|
+
--c-success-subtle-hover: var(--c-success-50);
|
|
609
|
+
--c-on-success-subtle: var(--c-success-700);
|
|
610
|
+
--c-info: var(--c-info-500);
|
|
611
|
+
--c-info-hover: var(--c-info-300);
|
|
612
|
+
--c-on-info: var(--c-white);
|
|
613
|
+
--c-info-subtle: var(--c-info-100);
|
|
614
|
+
--c-info-subtle-hover: var(--c-info-50);
|
|
615
|
+
--c-on-info-subtle: var(--c-info-700);
|
|
616
|
+
--c-warning: var(--c-warning-500);
|
|
617
|
+
--c-warning-hover: var(--c-warning-300);
|
|
618
|
+
--c-on-warning: var(--c-white);
|
|
619
|
+
--c-warning-subtle: var(--c-warning-100);
|
|
620
|
+
--c-warning-subtle-hover: var(--c-warning-50);
|
|
621
|
+
--c-on-warning-subtle: var(--c-warning-700);
|
|
622
|
+
--c-error: var(--c-error-500);
|
|
623
|
+
--c-error-hover: var(--c-error-300);
|
|
624
|
+
--c-on-error: var(--c-white);
|
|
625
|
+
--c-error-subtle: var(--c-error-100);
|
|
626
|
+
--c-error-subtle-hover: var(--c-error-50);
|
|
627
|
+
--c-on-error-subtle: var(--c-error-700);
|
|
628
|
+
--c-link: var(--c-link-500);
|
|
629
|
+
--c-link-hover: var(--c-accent-100);
|
|
630
|
+
--c-on-link: var(--c-white);
|
|
631
|
+
--c-link-subtle: var(--c-link-100);
|
|
632
|
+
--c-link-subtle-hover: var(--c-accent-100);
|
|
633
|
+
--c-on-link-subtle: var(--c-link-700);
|
|
634
|
+
--c-nav-surface: var(--c-primary-500);
|
|
635
|
+
--c-nav-surface-hover: var(--c-primary-400);
|
|
636
|
+
--c-on-nav: var(--c-white);
|
|
637
|
+
--c-nav-active: var(--c-primary-100);
|
|
638
|
+
--c-on-nav-active: var(--c-primary-700);
|
|
639
|
+
--c-nav-sub-active: var(--c-white);
|
|
640
|
+
--c-chart-1: oklch(0.6534 0.1710 247.9336);
|
|
641
|
+
--c-chart-2: oklch(0.5906 0.1462 343.7182);
|
|
642
|
+
--c-chart-3: oklch(0.6697 0.1291 89.0072);
|
|
643
|
+
--c-chart-4: oklch(0.5828 0.1563 304.1567);
|
|
644
|
+
--c-chart-5: oklch(0.6535 0.1224 175.0621);
|
|
645
|
+
--c-chart-6: oklch(0.5492 0.1452 15.2354);
|
|
646
|
+
--c-chart-7: oklch(0.6591 0.1084 215.9066);
|
|
647
|
+
--c-chart-8: oklch(0.5509 0.1711 271.9308);
|
|
648
|
+
--c-chart-9: oklch(0.6689 0.1550 335.8160);
|
|
649
|
+
--c-chart-10: oklch(0.6158 0.1381 113.7300);
|
|
650
|
+
--c-chart-11: oklch(0.6594 0.1561 281.6578);
|
|
651
|
+
--c-chart-12: oklch(0.5889 0.1004 195.6438);
|
|
652
|
+
--c-chart-surface: var(--c-white);
|
|
653
|
+
--c-chart-grid: var(--c-tertiary-200);
|
|
654
|
+
--c-chart-axis: var(--c-tertiary-500);
|
|
655
|
+
--c-logo-wordmark: var(--c-tertiary-600);
|
|
656
|
+
--c-logo-teal: oklch(0.4725 0.0831 214.1610);
|
|
657
|
+
--c-logo-magenta: oklch(0.4006 0.1660 351.9773);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/*
|
|
662
|
+
* Inverting at the root. :root has no ancestor container, so the style
|
|
663
|
+
* query above can never match it; <html data-theme-invert> inverts the OS
|
|
664
|
+
* preference instead. (0,4,0) beats both the light block and the OS block.
|
|
665
|
+
*/
|
|
666
|
+
@media (prefers-color-scheme: dark) {
|
|
667
|
+
:root[data-theme-invert]:not([data-theme='light']):not([data-theme='dark']) {
|
|
668
|
+
color-scheme: light;
|
|
669
|
+
--c-mode: light;
|
|
670
|
+
--c-surface: var(--c-white);
|
|
671
|
+
--c-surface-raised: var(--c-white);
|
|
672
|
+
--c-surface-overlay: var(--c-white);
|
|
673
|
+
--c-surface-muted: var(--c-tertiary-100);
|
|
674
|
+
--c-surface-sunken: var(--c-primary-100);
|
|
675
|
+
--c-on-surface: var(--c-primary-900);
|
|
676
|
+
--c-on-surface-muted: var(--c-tertiary-500);
|
|
677
|
+
--c-on-surface-faint: var(--c-tertiary-500);
|
|
678
|
+
--c-on-surface-sunken: var(--c-primary-700);
|
|
679
|
+
--c-border: var(--c-tertiary-200);
|
|
680
|
+
--c-border-strong: var(--c-tertiary-600);
|
|
681
|
+
--c-divider: color-mix(in srgb, var(--c-black) 12%, transparent);
|
|
682
|
+
--c-ring: var(--c-primary-500);
|
|
683
|
+
--c-surface-inverted: var(--c-slate-950);
|
|
684
|
+
--c-on-surface-inverted: var(--c-white);
|
|
685
|
+
--c-on-surface-inverted-muted: var(--c-slate-300);
|
|
686
|
+
--c-success-inverted: var(--c-success-400);
|
|
687
|
+
--c-info-inverted: var(--c-info-400);
|
|
688
|
+
--c-warning-inverted: var(--c-warning-400);
|
|
689
|
+
--c-error-inverted: var(--c-error-400);
|
|
690
|
+
--c-primary: var(--c-primary-500);
|
|
691
|
+
--c-primary-hover: var(--c-primary-300);
|
|
692
|
+
--c-on-primary: var(--c-white);
|
|
693
|
+
--c-primary-subtle: var(--c-primary-100);
|
|
694
|
+
--c-primary-subtle-hover: var(--c-primary-50);
|
|
695
|
+
--c-on-primary-subtle: var(--c-primary-700);
|
|
696
|
+
--c-secondary: var(--c-secondary-500);
|
|
697
|
+
--c-secondary-hover: var(--c-secondary-300);
|
|
698
|
+
--c-on-secondary: var(--c-white);
|
|
699
|
+
--c-secondary-subtle: var(--c-secondary-100);
|
|
700
|
+
--c-secondary-subtle-hover: var(--c-secondary-50);
|
|
701
|
+
--c-on-secondary-subtle: var(--c-secondary-700);
|
|
702
|
+
--c-accent: var(--c-accent-500);
|
|
703
|
+
--c-accent-hover: var(--c-accent-300);
|
|
704
|
+
--c-on-accent: var(--c-white);
|
|
705
|
+
--c-accent-subtle: var(--c-accent-100);
|
|
706
|
+
--c-accent-subtle-hover: var(--c-accent-50);
|
|
707
|
+
--c-on-accent-subtle: var(--c-accent-700);
|
|
708
|
+
--c-success: var(--c-success-500);
|
|
709
|
+
--c-success-hover: var(--c-success-300);
|
|
710
|
+
--c-on-success: var(--c-white);
|
|
711
|
+
--c-success-subtle: var(--c-success-100);
|
|
712
|
+
--c-success-subtle-hover: var(--c-success-50);
|
|
713
|
+
--c-on-success-subtle: var(--c-success-700);
|
|
714
|
+
--c-info: var(--c-info-500);
|
|
715
|
+
--c-info-hover: var(--c-info-300);
|
|
716
|
+
--c-on-info: var(--c-white);
|
|
717
|
+
--c-info-subtle: var(--c-info-100);
|
|
718
|
+
--c-info-subtle-hover: var(--c-info-50);
|
|
719
|
+
--c-on-info-subtle: var(--c-info-700);
|
|
720
|
+
--c-warning: var(--c-warning-500);
|
|
721
|
+
--c-warning-hover: var(--c-warning-300);
|
|
722
|
+
--c-on-warning: var(--c-white);
|
|
723
|
+
--c-warning-subtle: var(--c-warning-100);
|
|
724
|
+
--c-warning-subtle-hover: var(--c-warning-50);
|
|
725
|
+
--c-on-warning-subtle: var(--c-warning-700);
|
|
726
|
+
--c-error: var(--c-error-500);
|
|
727
|
+
--c-error-hover: var(--c-error-300);
|
|
728
|
+
--c-on-error: var(--c-white);
|
|
729
|
+
--c-error-subtle: var(--c-error-100);
|
|
730
|
+
--c-error-subtle-hover: var(--c-error-50);
|
|
731
|
+
--c-on-error-subtle: var(--c-error-700);
|
|
732
|
+
--c-link: var(--c-link-500);
|
|
733
|
+
--c-link-hover: var(--c-accent-100);
|
|
734
|
+
--c-on-link: var(--c-white);
|
|
735
|
+
--c-link-subtle: var(--c-link-100);
|
|
736
|
+
--c-link-subtle-hover: var(--c-accent-100);
|
|
737
|
+
--c-on-link-subtle: var(--c-link-700);
|
|
738
|
+
--c-nav-surface: var(--c-primary-500);
|
|
739
|
+
--c-nav-surface-hover: var(--c-primary-400);
|
|
740
|
+
--c-on-nav: var(--c-white);
|
|
741
|
+
--c-nav-active: var(--c-primary-100);
|
|
742
|
+
--c-on-nav-active: var(--c-primary-700);
|
|
743
|
+
--c-nav-sub-active: var(--c-white);
|
|
744
|
+
--c-chart-1: oklch(0.6534 0.1710 247.9336);
|
|
745
|
+
--c-chart-2: oklch(0.5906 0.1462 343.7182);
|
|
746
|
+
--c-chart-3: oklch(0.6697 0.1291 89.0072);
|
|
747
|
+
--c-chart-4: oklch(0.5828 0.1563 304.1567);
|
|
748
|
+
--c-chart-5: oklch(0.6535 0.1224 175.0621);
|
|
749
|
+
--c-chart-6: oklch(0.5492 0.1452 15.2354);
|
|
750
|
+
--c-chart-7: oklch(0.6591 0.1084 215.9066);
|
|
751
|
+
--c-chart-8: oklch(0.5509 0.1711 271.9308);
|
|
752
|
+
--c-chart-9: oklch(0.6689 0.1550 335.8160);
|
|
753
|
+
--c-chart-10: oklch(0.6158 0.1381 113.7300);
|
|
754
|
+
--c-chart-11: oklch(0.6594 0.1561 281.6578);
|
|
755
|
+
--c-chart-12: oklch(0.5889 0.1004 195.6438);
|
|
756
|
+
--c-chart-surface: var(--c-white);
|
|
757
|
+
--c-chart-grid: var(--c-tertiary-200);
|
|
758
|
+
--c-chart-axis: var(--c-tertiary-500);
|
|
759
|
+
--c-logo-wordmark: var(--c-tertiary-600);
|
|
760
|
+
--c-logo-teal: oklch(0.4725 0.0831 214.1610);
|
|
761
|
+
--c-logo-magenta: oklch(0.4006 0.1660 351.9773);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
@media (prefers-color-scheme: light) {
|
|
766
|
+
:root[data-theme-invert]:not([data-theme='light']):not([data-theme='dark']) {
|
|
767
|
+
color-scheme: dark;
|
|
768
|
+
--c-mode: dark;
|
|
353
769
|
--c-surface: var(--c-slate-800);
|
|
354
770
|
--c-surface-raised: var(--c-slate-800);
|
|
355
771
|
--c-surface-overlay: var(--c-slate-700);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
"name": "::part(root)",
|
|
138
|
-
"description": "The card's visible surface, carries the background, border, radius, shadow and section spacing"
|
|
138
|
+
"description": "The card's visible surface, carries the background and its ink, border, radius, shadow and section spacing"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"name": "::part(fullscreen-toggle)",
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
315
|
"name": "c-card",
|
|
316
|
-
"description": "\n---\n\n\n### **Methods:**\n - **enterFullscreen()** - Enter fullscreen from the outside\n- **exitFullscreen()** - Exit fullscreen from the outside\n\n### **Slots:**\n - **default** - Card components\n\n### **CSS Parts:**\n - **root** - The card's visible surface, carries the background, border, radius, shadow and section spacing\n- **fullscreen-toggle** - The circular fullscreen toggle button shown when the fullscreen prop is set",
|
|
316
|
+
"description": "\n---\n\n\n### **Methods:**\n - **enterFullscreen()** - Enter fullscreen from the outside\n- **exitFullscreen()** - Exit fullscreen from the outside\n\n### **Slots:**\n - **default** - Card components\n\n### **CSS Parts:**\n - **root** - The card's visible surface, carries the background and its ink, border, radius, shadow and section spacing\n- **fullscreen-toggle** - The circular fullscreen toggle button shown when the fullscreen prop is set",
|
|
317
317
|
"attributes": [
|
|
318
318
|
{
|
|
319
319
|
"name": "fullscreen",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@cscfi/csc-ui",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.20",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -891,7 +891,7 @@
|
|
|
891
891
|
},
|
|
892
892
|
{
|
|
893
893
|
"name": "c-card",
|
|
894
|
-
"description": "\n---\n\n\n### **Methods:**\n - **enterFullscreen()** - Enter fullscreen from the outside\n- **exitFullscreen()** - Exit fullscreen from the outside\n\n### **Slots:**\n - **default** - Card components\n\n### **CSS Parts:**\n - **root** - The card's visible surface, carries the background, border, radius, shadow and section spacing\n- **fullscreen-toggle** - The circular fullscreen toggle button shown when the fullscreen prop is set",
|
|
894
|
+
"description": "\n---\n\n\n### **Methods:**\n - **enterFullscreen()** - Enter fullscreen from the outside\n- **exitFullscreen()** - Exit fullscreen from the outside\n\n### **Slots:**\n - **default** - Card components\n\n### **CSS Parts:**\n - **root** - The card's visible surface, carries the background and its ink, border, radius, shadow and section spacing\n- **fullscreen-toggle** - The circular fullscreen toggle button shown when the fullscreen prop is set",
|
|
895
895
|
"doc-url": "",
|
|
896
896
|
"attributes": [
|
|
897
897
|
{
|
|
@@ -5985,7 +5985,7 @@
|
|
|
5985
5985
|
},
|
|
5986
5986
|
{
|
|
5987
5987
|
"name": "part(root)",
|
|
5988
|
-
"description": "The card's visible surface, carries the background, border, radius, shadow and section spacing"
|
|
5988
|
+
"description": "The card's visible surface, carries the background and its ink, border, radius, shadow and section spacing"
|
|
5989
5989
|
},
|
|
5990
5990
|
{
|
|
5991
5991
|
"name": "part(fullscreen-toggle)",
|
|
@@ -41,6 +41,7 @@ type __VLS_Slots = {} & {
|
|
|
41
41
|
};
|
|
42
42
|
declare const __VLS_base: import("vue").DefineComponent<CMenuItemProps, {
|
|
43
43
|
closeSubmenu: () => void;
|
|
44
|
+
isSubmenuOpen: () => boolean;
|
|
44
45
|
openSubmenu: () => void;
|
|
45
46
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CMenuItemProps> & Readonly<{}>, {
|
|
46
47
|
icon: string;
|
|
@@ -12,11 +12,16 @@
|
|
|
12
12
|
* supplies that declaration and `panelStyle` the matching
|
|
13
13
|
* `position-anchor` / `position-area` plus the panel width pinned to the
|
|
14
14
|
* anchor's rect on open;
|
|
15
|
-
* - the
|
|
15
|
+
* - the field-box pull-back. The anchor wrapper spans the whole inner
|
|
16
16
|
* `c-input`, INCLUDING its hint / error message area (reserved unless
|
|
17
|
-
* `hide-details` is set)
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* `hide-details` is set), the gap above it and an on-top label. The
|
|
18
|
+
* panel must sit flush against the field box itself — the same 0px every
|
|
19
|
+
* dropdown keeps (`c-select`'s listbox, `c-menu`'s default `distance`) —
|
|
20
|
+
* so on open the distance from the anchor's bottom edge to the field
|
|
21
|
+
* box's bottom edge is measured and pulled back with a negative
|
|
22
|
+
* block-start margin, and the distance from the anchor's top edge to the
|
|
23
|
+
* field box's top edge is published as `--_c-field-panel-top-offset` for
|
|
24
|
+
* the consumer's flipped-above `@position-try` rules;
|
|
20
25
|
* - the fullscreen layout: chosen at `open()` from the `fullscreen`
|
|
21
26
|
* predicate and kept for the whole open (crossing the threshold while open
|
|
22
27
|
* closes the panel). The panel drops anchor positioning and becomes the
|
|
@@ -63,9 +68,9 @@ export interface AnchoredPanel {
|
|
|
63
68
|
layout: ComputedRef<PanelLayout>;
|
|
64
69
|
/** Bind as the panel's `@toggle` handler. */
|
|
65
70
|
onToggle(event: Event): void;
|
|
66
|
-
/** Choose the layout, measure (anchored: the anchor width and the field's
|
|
71
|
+
/** Choose the layout, measure (anchored: the anchor width and the field box's offsets from the anchor's edges), then `showPopover()`. */
|
|
67
72
|
open(): void;
|
|
68
|
-
/** Inline style for the panel: anchored — `position-anchor`, `position-area: bottom span-right`, `inset: auto`, the pinned width
|
|
73
|
+
/** Inline style for the panel: anchored — `position-anchor`, `position-area: bottom span-right`, `inset: auto`, the pinned width, the field-box pull-back and `--_c-field-panel-top-offset`; fullscreen — the surface, the layout viewport's box. */
|
|
69
74
|
panelStyle: ComputedRef<string>;
|
|
70
75
|
}
|
|
71
76
|
/** The two layouts one field panel takes (CONTEXT.md "Fullscreen panel"). */
|
|
@@ -75,7 +80,7 @@ export interface UseAnchoredPanelOptions {
|
|
|
75
80
|
anchor: Readonly<Ref<HTMLElement | null>>;
|
|
76
81
|
/** `open()` is a no-op while this returns true (the field's `disabled`). */
|
|
77
82
|
disabled?: () => boolean;
|
|
78
|
-
/** The inner `c-input` host: its `
|
|
83
|
+
/** The inner `c-input` host: the offsets between its field box (`.c-input__slot`) and the anchor's edges are pulled back so the panel sits flush against the field box. */
|
|
79
84
|
field: Readonly<Ref<HTMLElement | null>>;
|
|
80
85
|
/** Open as a fullscreen panel while true — the shared narrow-viewport predicate (`useNarrowViewport`). Absent: always anchored. */
|
|
81
86
|
fullscreen?: Readonly<Ref<boolean>>;
|
|
@@ -815,6 +815,7 @@ export interface CMenuItemElement extends Omit<HTMLElement, 'active' | 'activeIc
|
|
|
815
815
|
/** Value reported in the menu's `select` event when this item is chosen. */
|
|
816
816
|
value?: string;
|
|
817
817
|
closeSubmenu(): void;
|
|
818
|
+
isSubmenuOpen(): boolean;
|
|
818
819
|
openSubmenu(): void;
|
|
819
820
|
}
|
|
820
821
|
/** Section label for a group of `c-menu-item`s. */
|
|
@@ -3,9 +3,19 @@ export type ThemeMode = 'dark' | 'light';
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolve the theme mode in effect for an element, mirroring the cascade in
|
|
5
5
|
* `tokens.css`: the nearest enclosing **mode scope** wins (an ancestor-or-self
|
|
6
|
-
* carrying `data-theme="light"` or `"dark"`, ADR-0053)
|
|
6
|
+
* carrying `data-theme="light"` or `"dark"`, ADR-0053), an **inverting scope**
|
|
7
|
+
* (`data-theme-invert`, ADR-0054) flips whatever it sits in; otherwise the OS
|
|
7
8
|
* preference; light where neither is available (server rendering, no
|
|
8
|
-
* `matchMedia`). Any other `data-theme` value is inert, exactly as
|
|
9
|
+
* `matchMedia`). Any other `data-theme` value is inert, exactly as in CSS.
|
|
10
|
+
*
|
|
11
|
+
* The answer comes from the cascade itself — `--c-mode`, which every mode block
|
|
12
|
+
* declares — rather than from walking the DOM. That is the only way to resolve
|
|
13
|
+
* an inverting scope without re-implementing the style query, it cannot drift
|
|
14
|
+
* from the CSS, and unlike `closest()` it reads correctly for an element INSIDE
|
|
15
|
+
* a shadow root, since custom properties inherit across the boundary. The DOM
|
|
16
|
+
* walk remains as the fallback for when `tokens.css` has not been loaded: a
|
|
17
|
+
* detached node, a server-rendered pass, or a consumer who ships only the
|
|
18
|
+
* Tailwind theme export.
|
|
9
19
|
*
|
|
10
20
|
* Pass the element whose mode you need — a chart inside a dark panel on an
|
|
11
21
|
* otherwise light page resolves `dark` only if you ask about the chart.
|
|
@@ -20,10 +30,15 @@ export declare function themeMode(root?: Element | null): ThemeMode;
|
|
|
20
30
|
* Calls `onChange` once synchronously with the current mode, then again
|
|
21
31
|
* whenever it actually changes — so wiring a chart up is the one call, with no
|
|
22
32
|
* separate initial render. Covers both paths that can change the answer: a
|
|
23
|
-
* `data-theme` attribute mutating anywhere in the
|
|
24
|
-
* **mode scope** or any ancestor's, which is why a
|
|
25
|
-
* observer is not enough), and the OS preference
|
|
26
|
-
*
|
|
33
|
+
* `data-theme` or `data-theme-invert` attribute mutating anywhere in the
|
|
34
|
+
* document (the element's own **mode scope** or any ancestor's, which is why a
|
|
35
|
+
* `documentElement`-only observer is not enough), and the OS preference
|
|
36
|
+
* flipping while no scope pins a mode.
|
|
37
|
+
*
|
|
38
|
+
* Re-parenting `target` is not observed; re-subscribe if you move it. That
|
|
39
|
+
* matters more than it used to: an **inverting scope** resolves against where
|
|
40
|
+
* it sits, so moving one between a light and a dark region changes its mode,
|
|
41
|
+
* where moving a pinned scope never did.
|
|
27
42
|
*
|
|
28
43
|
* ```ts
|
|
29
44
|
* const stop = observeThemeMode(chartEl, (mode) => {
|
package/package.json
CHANGED