@axiapps/axi-design 1.7.1 → 1.9.0
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/README.md +2 -0
- package/dist/axi.css +58 -0
- package/docs/RULES.md +15 -0
- package/docs/superpowers/plans/2026-09-23-axi-docs-site.md +2376 -0
- package/docs/superpowers/specs/2026-09-23-axi-docs-site-design.md +333 -0
- package/package.json +14 -5
- package/src/data.css +36 -0
- package/src/shells.css +22 -0
package/README.md
CHANGED
|
@@ -83,6 +83,8 @@ not "what does the system look like". Everything else is
|
|
|
83
83
|
| `--axi-bars-gap` | gap between columns in `.axi-bars` | `6px` | `<div class="axi-bars" style="--axi-bars-gap: 2px">` |
|
|
84
84
|
| `--axi-plot-h` | height of a `.axi-plot` or `.axi-bars` | `180px` | `<div class="axi-plot" style="--axi-plot-h: 240px">` |
|
|
85
85
|
| `--axi-plot-rows` | how many horizontal rules a `.axi-plot` draws | `4` | `<div class="axi-plot" style="--axi-plot-rows: 6">` |
|
|
86
|
+
| `--axi-tick-w` / `--axi-tick-h` | size of one `.axi-ticks__tick` | `5px` / `15px` | `<div class="axi-ticks" style="--axi-tick-w: 7px">` |
|
|
87
|
+
| `--axi-ticks-gap` | gap between marks in `.axi-ticks` | `3px` | `<div class="axi-ticks" style="--axi-ticks-gap: 2px">` |
|
|
86
88
|
|
|
87
89
|
`--axi-page-pad: 0` is the one to know about: it is how a measure nested
|
|
88
90
|
inside another measure avoids paying the gutter twice.
|
package/dist/axi.css
CHANGED
|
@@ -638,6 +638,28 @@ a { color: inherit; }
|
|
|
638
638
|
.axi-menu__pop label:hover { background: var(--axi-ground); color: var(--axi-text); }
|
|
639
639
|
.axi-menu__pop input { margin: 3px 0 0; accent-color: var(--axi-accent); }
|
|
640
640
|
|
|
641
|
+
/* ---------- tooltip ---------- */
|
|
642
|
+
/* One line of ink on the darkest surface in the language, so it reads over
|
|
643
|
+
anything it lands on. The class draws the box only; coordinates come from
|
|
644
|
+
the consumer's script (measure the trigger, set left/top — gallery.js is
|
|
645
|
+
the reference wiring). Two contracts travel with it: the element is
|
|
646
|
+
appended to <body>, never inside the component it annotates, because
|
|
647
|
+
position: fixed re-anchors to any transformed ancestor and rule 4 makes
|
|
648
|
+
every hovered ancestor transformed; and it never carries information that
|
|
649
|
+
exists nowhere else, because a keyboard or touch user may never see it. */
|
|
650
|
+
.axi-tooltip {
|
|
651
|
+
position: fixed;
|
|
652
|
+
z-index: 99999;
|
|
653
|
+
padding: 5px 8px;
|
|
654
|
+
background: var(--axi-ink-line);
|
|
655
|
+
color: var(--axi-text);
|
|
656
|
+
border: var(--axi-border-hairline) solid var(--axi-rule);
|
|
657
|
+
border-radius: var(--axi-radius-sm);
|
|
658
|
+
font: var(--axi-t-micro);
|
|
659
|
+
white-space: nowrap;
|
|
660
|
+
pointer-events: none;
|
|
661
|
+
}
|
|
662
|
+
|
|
641
663
|
/* ---------- card ---------- */
|
|
642
664
|
.axi-card {
|
|
643
665
|
position: relative; overflow: hidden;
|
|
@@ -1006,6 +1028,42 @@ a { color: inherit; }
|
|
|
1006
1028
|
background: var(--axi-series, var(--axi-accent));
|
|
1007
1029
|
}
|
|
1008
1030
|
|
|
1031
|
+
/* ---------- ticks ---------- */
|
|
1032
|
+
/* A run of yes/no along a timeline: attended or missed, passed or failed,
|
|
1033
|
+
shipped or skipped. This is rule 9 read the other way round - a bar has a
|
|
1034
|
+
length because a quantity has one, and "no" has no length at all. Drawn as
|
|
1035
|
+
a bar it has to be faked with a stub, and a stub reads as "a little bit",
|
|
1036
|
+
which is the same lie as a faded fill. So every event here is one mark of
|
|
1037
|
+
the same size, and what changes between them is only which ink it is drawn
|
|
1038
|
+
in: rule 10's two series, the accent for the fact and the neutral ramp for
|
|
1039
|
+
its absence.
|
|
1040
|
+
|
|
1041
|
+
Neither mark is outlined, which is the one place this departs from the
|
|
1042
|
+
filled/empty pair the language reaches for first. At the size a run of
|
|
1043
|
+
twenty sits in a table row the outline IS the mark - three pixels of edge
|
|
1044
|
+
around one pixel of middle - so the pair would differ in nothing the eye
|
|
1045
|
+
can resolve. A strip drawn large enough to outline is a bar chart, and
|
|
1046
|
+
.axi-bars already is one.
|
|
1047
|
+
|
|
1048
|
+
Marks are a fixed width and never flex: a run of fourteen and a run of
|
|
1049
|
+
three share a column in a table, and the short one has to read as a short
|
|
1050
|
+
run rather than as fourteen fatter events. */
|
|
1051
|
+
.axi-ticks {
|
|
1052
|
+
display: inline-flex;
|
|
1053
|
+
align-items: stretch;
|
|
1054
|
+
gap: var(--axi-ticks-gap, 3px);
|
|
1055
|
+
height: var(--axi-tick-h, 15px);
|
|
1056
|
+
}
|
|
1057
|
+
.axi-ticks__tick {
|
|
1058
|
+
flex: none;
|
|
1059
|
+
width: var(--axi-tick-w, 5px);
|
|
1060
|
+
background: var(--axi-rule);
|
|
1061
|
+
border-radius: var(--axi-radius-sm);
|
|
1062
|
+
}
|
|
1063
|
+
.axi-ticks__tick--on {
|
|
1064
|
+
background: var(--axi-series, var(--axi-accent));
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1009
1067
|
/* ---------- plot ---------- */
|
|
1010
1068
|
/* A frame for a line or an area, with its horizontal rules drawn in. The
|
|
1011
1069
|
rules are hard stops in a repeating gradient, which is the select caret's
|
package/docs/RULES.md
CHANGED
|
@@ -132,6 +132,15 @@ keeping the control's `translate(-2px, -2px)`.
|
|
|
132
132
|
Nothing in this language fades, glows or pulses. The movement reads in
|
|
133
133
|
peripheral vision and costs no colour.
|
|
134
134
|
|
|
135
|
+
The lift being a transform has one structural consequence: a transformed
|
|
136
|
+
element becomes the containing block for any `position: fixed` descendant.
|
|
137
|
+
An overlay positioned in viewport coordinates — `.axi-tooltip` is the one
|
|
138
|
+
this language ships — must therefore live as a child of `<body>`, never
|
|
139
|
+
inside the component it annotates, or the first hover lift re-anchors it.
|
|
140
|
+
The class draws only the box (ink-line ground, hairline rule border, micro
|
|
141
|
+
type); measuring the trigger and setting `left`/`top` is the consumer's
|
|
142
|
+
half, and `gallery.js` is the reference wiring.
|
|
143
|
+
|
|
135
144
|
Every lift is turned off under `@media (prefers-reduced-motion: reduce)`, in
|
|
136
145
|
`base.css`, once, for every consumer. Resting appearance is untouched: the
|
|
137
146
|
diamond still rotates, because a rotation that never changes is geometry and
|
|
@@ -238,6 +247,12 @@ is the one chart type that cannot be built without the thing rule 2 forbids, so
|
|
|
238
247
|
a distribution is drawn as bars, or as a table sorted by the value, or not at
|
|
239
248
|
all.
|
|
240
249
|
|
|
250
|
+
The other corollary is that a thing with no quantity gets no length. A run of
|
|
251
|
+
yes/no — attended or missed, passed or failed — is a sequence of facts, and a
|
|
252
|
+
fact has no magnitude to draw: rendering "no" as a short bar says "a little
|
|
253
|
+
bit" as loudly as a faded fill says "30%". That series is a row of marks of
|
|
254
|
+
one size, differing only in ink, which is `.axi-ticks`.
|
|
255
|
+
|
|
241
256
|
## 10. A chart's ink is the accent
|
|
242
257
|
|
|
243
258
|
One series is the accent. A second, for comparison, is the neutral ramp —
|