@jsenv/navi 0.29.41 → 0.29.43
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 +438 -205
- package/dist/jsenv_navi.js.map +34 -19
- package/dist/jsenv_navi_side_effects.js +5 -0
- package/dist/jsenv_navi_side_effects.js.map +2 -2
- package/docs/AI_INSTRUCTIONS.md +6 -0
- package/docs/control_value.md +2 -0
- package/docs/form_changed.md +127 -0
- package/docs/interactions.md +27 -0
- package/docs/scroll.md +54 -4
- package/docs/z_index.md +41 -0
- package/package.json +2 -2
package/docs/z_index.md
CHANGED
|
@@ -97,6 +97,47 @@ What to read from it:
|
|
|
97
97
|
`isolation: isolate` on the parent instead, and the number stops meaning
|
|
98
98
|
anything outside it.
|
|
99
99
|
|
|
100
|
+
### A sticky part is only in the band while it is stuck
|
|
101
|
+
|
|
102
|
+
`--navi-z-index-sticky` says "kept stuck while something scrolls under it", and
|
|
103
|
+
the second half of that sentence is a condition, not decoration. A `List` group
|
|
104
|
+
label at rest is a block in the flow: nothing passes under it, and painting it
|
|
105
|
+
at 10 there is what slices a focus ring, a badge or a stamp that a neighbouring
|
|
106
|
+
row lets out of its box — including a `Group` member raising itself to 1 or 2.
|
|
107
|
+
|
|
108
|
+
CSS cannot express the condition. There is no `:stuck`, and
|
|
109
|
+
`@container scroll-state(stuck: top)` styles a container's **descendants**, so
|
|
110
|
+
an element can never read its own stuck state — which is the one that matters
|
|
111
|
+
here. So `List` measures it and marks its three sticky parts
|
|
112
|
+
(`.navi_list_item_header`, `.navi_list_item_footer`,
|
|
113
|
+
`.navi_list_item_group_label`) with `navi-stuck`, against its own scroller and
|
|
114
|
+
not the window, updated on scroll, on resize, and on every commit (a virtualized
|
|
115
|
+
list changes which labels exist without anything scrolling).
|
|
116
|
+
|
|
117
|
+
navi's own rule is the first reader: the band applies under `[navi-stuck]`,
|
|
118
|
+
`auto` applies at rest. That is what puts the decision back within reach of an
|
|
119
|
+
app — a card whose badge overflows into the label below it gets past it with a
|
|
120
|
+
literal in the card, against its own neighbour, exactly as §1–3 above ask:
|
|
121
|
+
|
|
122
|
+
```jsx
|
|
123
|
+
// Reaches past a label at rest (auto), loses to one that is stuck (10).
|
|
124
|
+
<Stamp style={{ position: "absolute", bottom: "-12px", zIndex: 1 }} />
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
There was no such value before: a label sat at 10 whether or not it was stuck,
|
|
128
|
+
so nothing a card could write got past it.
|
|
129
|
+
|
|
130
|
+
For what a literal cannot reach, each part has a pair of variables —
|
|
131
|
+
`--list-header-z-index`, `--list-footer-z-index`, `--list-group-label-z-index`,
|
|
132
|
+
each with a `-stuck` counterpart defaulting to the band — settable on `<List>`
|
|
133
|
+
with no selector and no navi class name. Reach for them last, and remember a
|
|
134
|
+
negative value is compared against the page like any other: without a stacking
|
|
135
|
+
context between the label and the nearest opaque background, `-1` does not put
|
|
136
|
+
the label behind the rows, it puts it behind that background and out of sight.
|
|
137
|
+
|
|
138
|
+
See the "Sticky parts" chapter of
|
|
139
|
+
[12_list_demo.html](../src/control/demos/12_list_demo.html).
|
|
140
|
+
|
|
100
141
|
### Why a `Group` member is not isolated
|
|
101
142
|
|
|
102
143
|
`Group` overlaps its members by one border width, so the one the user is on has
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/navi",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Library of components including navigation to create frontend applications",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@jsenv/dom": "0.17.
|
|
32
|
+
"@jsenv/dom": "0.17.15",
|
|
33
33
|
"@jsenv/humanize": "1.7.8",
|
|
34
34
|
"@jsenv/validity": "0.4.2"
|
|
35
35
|
},
|