@jsenv/navi 0.29.102 → 0.29.103
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/jsenv_navi.js +1245 -463
- package/dist/jsenv_navi.js.map +97 -36
- package/dist/jsenv_navi_side_effects.js +32 -6
- package/dist/jsenv_navi_side_effects.js.map +2 -2
- package/docs/AI_INSTRUCTIONS.md +19 -3
- package/docs/badge_list.md +80 -0
- package/docs/control_value.md +50 -5
- package/docs/interactions.md +17 -6
- package/package.json +1 -1
|
@@ -476,6 +476,10 @@ const css = /* css */`
|
|
|
476
476
|
the surface token so one override themes fields, layouts and popups
|
|
477
477
|
together. Still its own token, so popups alone can be re-papered. */
|
|
478
478
|
--navi-popup-background-color: var(--navi-surface-color);
|
|
479
|
+
/* The ink written on that paper. A popup declares both on itself (see
|
|
480
|
+
dialog.jsx / popover.jsx): it is a new surface, so it does not write
|
|
481
|
+
in whatever the container it was declared in writes in. */
|
|
482
|
+
--navi-popup-color: var(--navi-surface-text-color);
|
|
479
483
|
--navi-backdrop-close-background: rgba(0, 0, 0, 0.08);
|
|
480
484
|
/* backdropVariant="discrete": the popup still catches every outside
|
|
481
485
|
click, it just stops announcing that it did. For an affordance one
|
|
@@ -521,6 +525,9 @@ const css = /* css */`
|
|
|
521
525
|
Fields use it whenever they need a solid background (their default
|
|
522
526
|
background, a transparent field being edited, …). */
|
|
523
527
|
--navi-surface-color: light-dark(#ffffff, #1c1c1e);
|
|
528
|
+
/* What is written on that paper. The browser's own text color rather
|
|
529
|
+
than a literal, so it follows color-scheme the way the paper does. */
|
|
530
|
+
--navi-surface-text-color: CanvasText;
|
|
524
531
|
/* The line that separates two regions of one surface — a scrolling area's
|
|
525
532
|
header from what scrolls under it, for instance. Not a border: the
|
|
526
533
|
separation belongs to the layout, not to the box that draws it. */
|
|
@@ -553,17 +560,36 @@ const css = /* css */`
|
|
|
553
560
|
--navi-typo-xl: 1.25rem; /* 20px at 16px base */
|
|
554
561
|
--navi-typo-xxl: 1.5rem; /* 24px at 16px base */
|
|
555
562
|
|
|
556
|
-
/* Color keywords
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
563
|
+
/* Color keywords.
|
|
564
|
+
primary: the ink of the paper, at full strength. An absolute
|
|
565
|
+
rather than currentColor: it is what brings a run back
|
|
566
|
+
to plain text inside a muted one (a value in a secondary
|
|
567
|
+
label). Themed through --navi-surface-text-color.
|
|
568
|
+
secondary: supporting text, captions, less important labels
|
|
569
|
+
emphasis: reinforce meaning, make content stand out more
|
|
570
|
+
discrete: unobtrusive elements that shouldn't compete for attention
|
|
571
|
+
hint: barely-there color, watermarks, ghost placeholders
|
|
572
|
+
The last four mix currentColor toward transparent or black, so they
|
|
573
|
+
follow whatever ink a container writes in: a dark card sets color and
|
|
574
|
+
nothing else. Theme tokens, like everything on :root — a container
|
|
575
|
+
that overrides one for ITS paper is heard by every popup opened from
|
|
576
|
+
it too, a popup having no way to tell a theme from a paper. */
|
|
577
|
+
--navi-color-primary: var(--navi-surface-text-color);
|
|
562
578
|
--navi-color-secondary: color-mix(in srgb, currentColor 80%, transparent);
|
|
563
579
|
--navi-color-emphasis: color-mix(in srgb, currentColor 50%, black);
|
|
564
580
|
--navi-color-discrete: color-mix(in srgb, currentColor 60%, transparent);
|
|
565
581
|
--navi-color-hint: color-mix(in srgb, currentColor 25%, transparent);
|
|
566
582
|
}
|
|
583
|
+
|
|
584
|
+
/* A popup is a new paper (see --navi-popup-color): primary is the ink it
|
|
585
|
+
writes in, not the ink of the container it was opened from. On the
|
|
586
|
+
element itself, so it beats a container's own override whatever the
|
|
587
|
+
layer; an app that wants a popup to keep its container's ink says so on
|
|
588
|
+
the popup, unlayered, and wins in turn. */
|
|
589
|
+
.navi_popover,
|
|
590
|
+
.navi_dialog {
|
|
591
|
+
--navi-color-primary: var(--navi-popup-color);
|
|
592
|
+
}
|
|
567
593
|
}
|
|
568
594
|
|
|
569
595
|
${SAFE_AREA_CSS}
|