@finstack-com-public/design 0.9.1 → 0.10.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/CHANGELOG.md +37 -0
- package/dist/css/data-type.css +32 -0
- package/dist/css/data-type.md +45 -0
- package/dist/css/diagram.css +119 -0
- package/dist/css/diagram.md +32 -0
- package/dist/css/mark-dot.css +62 -0
- package/dist/css/mark-dot.md +54 -0
- package/dist/css/node.css +242 -0
- package/dist/css/node.md +108 -0
- package/dist/css/tokens.css +28 -0
- package/dist/css/xyflow.css +101 -0
- package/dist/css/xyflow.md +97 -0
- package/dist/css-text/data-type.d.ts +2 -0
- package/dist/css-text/data-type.js +1 -0
- package/dist/css-text/diagram.d.ts +2 -0
- package/dist/css-text/diagram.js +1 -0
- package/dist/css-text/kit.js +487 -0
- package/dist/css-text/mark-dot.d.ts +2 -0
- package/dist/css-text/mark-dot.js +1 -0
- package/dist/css-text/node.d.ts +2 -0
- package/dist/css-text/node.js +1 -0
- package/dist/css-text/tokens.js +1 -1
- package/dist/css-text/xyflow.d.ts +2 -0
- package/dist/css-text/xyflow.js +1 -0
- package/dist/kit.css +487 -0
- package/dist/react/data.d.ts +24 -0
- package/dist/react/data.js +14 -0
- package/dist/react/diagram.d.ts +27 -0
- package/dist/react/diagram.js +14 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/tokens/color.d.ts +8 -0
- package/dist/tokens/color.js +13 -0
- package/dist/tokens/contrast-pairs.js +22 -0
- package/dist/tokens/index.d.ts +18 -4
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/scale.d.ts +14 -0
- package/dist/tokens/scale.js +17 -0
- package/dist/tokens.json +30 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@
|
|
|
3
3
|
Written by hand for each release. Token names, class names, file paths and exports are the
|
|
4
4
|
public API. While the kit is 0.x, a minor version may break them, and its entry says so.
|
|
5
5
|
|
|
6
|
+
## 0.10.0 — 2026-11-12
|
|
7
|
+
|
|
8
|
+
Nothing breaks. Upgrading from 0.9.1 needs no change.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Mark dot and mark count (T92):** `.fs-mark-dot` is a 7 px conversion dot, `--exact`, `--approx` or `--none`; `--none`
|
|
13
|
+
is a hollow ring, so colour is not the only sign. The dot is decoration (`aria-hidden`): the word goes beside it in
|
|
14
|
+
`.fs-visually-hidden`. `.fs-mark-count` (same three modifiers) is a dot and a tabular number; put a group of them in a
|
|
15
|
+
`.fs-cluster` with `role="group"` and a name. React `MarkDot` and `MarkCount` (`mark` takes `exact`, `approximate`,
|
|
16
|
+
`not-converted`; `MarkCount` requires `label`, the whole phrase for assistive technology). See `css/mark-dot.md`.
|
|
17
|
+
- **Data-type badge (T93):** `.fs-data-type`, a 22 × 16 frame for one 12 px `.fs-icon`, `--fs-ink-2` on `--fs-bg-sunken`.
|
|
18
|
+
The product picks the icon; the type word goes beside the badge in `.fs-visually-hidden`. React `DataTypeBadge` with an
|
|
19
|
+
`icon` slot and a required `label`. See `css/data-type.md`.
|
|
20
|
+
- **Diagram tokens, plane and lines (T94):** the inks `--fs-diagram-bg`, `-dot`, `-line`, `-line-inactive`,
|
|
21
|
+
`-line-emphasis`, `-end-bg`, `-end-line` and `-end-ink`, in both schemes and aliased to existing roles, so a re-theme
|
|
22
|
+
moves them; and the scheme-independent `--fs-diagram-line-width`, `-emphasis-width`, `-inactive-dash`, `-flow-dash`,
|
|
23
|
+
`-flow-offset`, `-flow-period`, `-dim-node`, `-dim-edge`, `-end-size`, `-end-line-width`, `-dot-size` and
|
|
24
|
+
`-grid-gap`. Classes: `.fs-diagram` (the plane with its dot grid); `.fs-diagram-edge` on an SVG path, with `--inactive`,
|
|
25
|
+
`--emphasis`, `--dim` and `--flow` (moving dashes, a solid still line under `prefers-reduced-motion`; add `--back` to
|
|
26
|
+
reverse them); `.fs-diagram-end` (the cardinality circle, with `--emphasis` and `--dim`); `.fs-diagram-arrow` (with
|
|
27
|
+
`--inactive`, `--emphasis` and `--dim`). The kit styles a diagram and never draws one. See `css/diagram.md`.
|
|
28
|
+
- **xyflow theme (T95):** `css/xyflow.css`, an opt-in sheet like `reset.css` (`kit.css` leaves it out). Scoped under
|
|
29
|
+
`.fs-diagram`, it sets xyflow's `--xy-*` variables from kit tokens: flat square controls, a bordered minimap on the
|
|
30
|
+
surface, the kit's line inks on edges (also on a custom edge path carrying the `.fs-diagram-edge` classes), and
|
|
31
|
+
`.react-flow__edges svg { max-width: none }`. It leaves nodes and handles to you. The kit has no xyflow dependency.
|
|
32
|
+
xyflow's attribution link keeps its own colour, which fails AA: restyle it in your own unlayered CSS, as the gallery's
|
|
33
|
+
`diagram.html` does. See `css/xyflow.md`.
|
|
34
|
+
- **Node frame (T96):** `.fs-node` (width from `--fs-node-width`, 248 px by default) with `__header` (`__icon`, `__name`,
|
|
35
|
+
`__meta`), `__body` for any children, `__row` (24 px; `__row-name`, `__tag`, `__gap`, `__more`) and `__section`, a
|
|
36
|
+
folding `details.fs-disclosure` with `__section-head` and `__counts` for mark counts. Node states: `.fs-is-selected`,
|
|
37
|
+
`--lit`, `--match`, `--dim`, `--fail`, `--nodata` and `--measures-only`. Row states: `.fs-is-selected`, `.fs-is-lit`,
|
|
38
|
+
`.fs-is-hidden`, `.fs-is-key` and `.fs-is-gap`. Corners 0 and no shadow (D37); the kit styles no handles. React
|
|
39
|
+
`DiagramNode`, a thin frame with `header` and `children` slots, `headerAs` (`div` or `button`), `headerProps` and one
|
|
40
|
+
boolean prop per node state (`selected`, `lit`, `match`, `dim`, `fail`, `noData`, `measuresOnly`). See `css/node.md`.
|
|
41
|
+
- **Gallery:** a new `diagram.html` page shows every block above in all six panels, with a live xyflow diagram.
|
|
42
|
+
|
|
6
43
|
## 0.9.1 — 2026-11-10
|
|
7
44
|
|
|
8
45
|
Nothing breaks. Upgrading from 0.9.0 needs no change.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* Data-type badge: a column's data type as one icon in a small frame (spec 02 F, T93). Usage: data-type.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* A frame for one icon. The product picks the icon; the kit draws the frame. It is a glyph like an icon: the size does not follow density. */
|
|
4
|
+
.fs-data-type {
|
|
5
|
+
--fs-data-type-w: 22px;
|
|
6
|
+
--fs-data-type-h: 16px;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex: none;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
width: var(--fs-data-type-w);
|
|
13
|
+
height: var(--fs-data-type-h);
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
color: var(--fs-ink-2);
|
|
16
|
+
background: var(--fs-bg-sunken);
|
|
17
|
+
/* A badge (D37), but a small square-cornered chip, not a pill: the 4 px control corner. */
|
|
18
|
+
border-radius: var(--fs-radius-sm);
|
|
19
|
+
}
|
|
20
|
+
.fs-data-type > .fs-icon {
|
|
21
|
+
width: 12px;
|
|
22
|
+
height: 12px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* The sunken fill is dropped in forced colours, so the frame is drawn as an edge. */
|
|
26
|
+
@media (forced-colors: active) {
|
|
27
|
+
.fs-data-type {
|
|
28
|
+
color: CanvasText;
|
|
29
|
+
border: var(--fs-line-width) solid CanvasText;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Data-type badge — `.fs-data-type`
|
|
2
|
+
|
|
3
|
+
Spec 02 F (T93, Phase G). CSS: `css/data-type.css` (the tip is `css/tooltip.css`). Gallery: `diagram.html`. Not the object-type
|
|
4
|
+
icon: that is `.fs-type-icon` (`css/type-icon.md`, spec 01 §3.7), which colours an icon by object type. This one marks a
|
|
5
|
+
column's **data** type.
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<span class="fs-data-type" aria-hidden="true"><svg class="fs-icon">…</svg></span><span class="fs-visually-hidden">Whole number</span>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- 22 × 16 px, holding one 12 px `.fs-icon`, in muted ink (`--fs-ink-2`) on `--fs-bg-sunken`. The corner is
|
|
12
|
+
`--fs-radius-sm` (4 px, D37's control corner; the kit's nearest to core's 3 px), never a literal. It is a glyph, so the size does not
|
|
13
|
+
follow density. In forced colours the fill goes and the frame gets a `CanvasText` edge.
|
|
14
|
+
- **The kit ships the frame; the product puts the icon in.** The kit does not list data types or map them to icons. Grizzbi's
|
|
15
|
+
core maps its types to Lucide names (`field-types.ts`) and registers the icons with `registerIcons`.
|
|
16
|
+
- **The type word goes beside the badge in `.fs-visually-hidden`**, and the badge is `aria-hidden`: the same pattern as the
|
|
17
|
+
mark dot (`mark-dot.md`), so a word in a tree row is read once. The icon is decoration.
|
|
18
|
+
- **A badge by itself is name-only: no tooltip**, because a tooltip needs a focusable anchor. Where the row already has a
|
|
19
|
+
control (a `.fs-icon-button`, say), put the badge in it, name the control with the word (`aria-label`) and let the tooltip add
|
|
20
|
+
a sentence ("Counts items, no decimals") rather than repeat the name, so the word is announced once. Do not add `tabindex`
|
|
21
|
+
to a badge.
|
|
22
|
+
- **Dense rows**: no `--dense` modifier. 16 px fits a 24 px row with 4 px above and below, so one size serves every density.
|
|
23
|
+
- React: `DataTypeBadge` (`icon`, `label`) renders the badge and the hidden word. `icon` is any node, usually `<Icon name="…" />`; `label` is required.
|
|
24
|
+
|
|
25
|
+
## Examples: core's five types
|
|
26
|
+
|
|
27
|
+
These are examples of what a product puts in the slot, not a kit list. Icons are Lucide's, from the kit's full set
|
|
28
|
+
(`@finstack-com-public/design/icons/<name>`).
|
|
29
|
+
|
|
30
|
+
| Type | Icon (example) | `label` |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| text | `type` | Text |
|
|
33
|
+
| whole number | `hash` | Whole number |
|
|
34
|
+
| decimal | `decimals-arrow-right` | Decimal |
|
|
35
|
+
| date | `calendar` | Date |
|
|
36
|
+
| yes/no | `toggle-left` | Yes/no |
|
|
37
|
+
|
|
38
|
+
## In a column row (Grizzbi's Model view)
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<div class="fs-tree__row">
|
|
42
|
+
<span class="fs-data-type" aria-hidden="true"><svg class="fs-icon">…</svg></span><span class="fs-visually-hidden">Decimal</span>
|
|
43
|
+
<span class="fs-tree__name">Unit price</span>
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* Diagram looks: the plane, the line, the cardinality end and the filter arrow (spec 02 J, T94). Usage: diagram.md. The kit styles a diagram and never draws one. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* The plane: the surround with a dot grid. The product places and sizes it; xyflow's own stylesheet moves it. */
|
|
4
|
+
.fs-diagram {
|
|
5
|
+
background-color: var(--fs-diagram-bg);
|
|
6
|
+
background-image: radial-gradient(
|
|
7
|
+
var(--fs-diagram-dot) var(--fs-diagram-dot-size),
|
|
8
|
+
transparent calc(var(--fs-diagram-dot-size) + 0.2px)
|
|
9
|
+
);
|
|
10
|
+
background-size: var(--fs-diagram-grid-gap) var(--fs-diagram-grid-gap);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* A line, drawn as an SVG path. */
|
|
14
|
+
.fs-diagram-edge {
|
|
15
|
+
fill: none;
|
|
16
|
+
stroke: var(--fs-diagram-line);
|
|
17
|
+
stroke-width: var(--fs-diagram-line-width);
|
|
18
|
+
transition: stroke var(--fs-dur);
|
|
19
|
+
}
|
|
20
|
+
.fs-diagram-edge--inactive {
|
|
21
|
+
stroke: var(--fs-diagram-line-inactive);
|
|
22
|
+
stroke-dasharray: var(--fs-diagram-inactive-dash);
|
|
23
|
+
}
|
|
24
|
+
/* Hover, selected, lit: the product sets --emphasis on the parts of a line it lights; a path's own hover does it too. */
|
|
25
|
+
.fs-diagram-edge--emphasis,
|
|
26
|
+
.fs-diagram-edge:hover,
|
|
27
|
+
.fs-diagram-edge--flow {
|
|
28
|
+
stroke: var(--fs-diagram-line-emphasis);
|
|
29
|
+
stroke-width: var(--fs-diagram-emphasis-width);
|
|
30
|
+
}
|
|
31
|
+
.fs-diagram-edge--dim {
|
|
32
|
+
opacity: var(--fs-diagram-dim-edge);
|
|
33
|
+
}
|
|
34
|
+
/* The way a filter goes: dashes moving along the line. --back runs them the other way. */
|
|
35
|
+
.fs-diagram-edge--flow {
|
|
36
|
+
stroke-dasharray: var(--fs-diagram-flow-dash);
|
|
37
|
+
animation: fs-diagram-flow var(--fs-diagram-flow-period) linear infinite;
|
|
38
|
+
}
|
|
39
|
+
.fs-diagram-edge--flow.fs-diagram-edge--back {
|
|
40
|
+
animation-direction: reverse;
|
|
41
|
+
}
|
|
42
|
+
@keyframes fs-diagram-flow {
|
|
43
|
+
to {
|
|
44
|
+
stroke-dashoffset: var(--fs-diagram-flow-offset);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/* Reduced motion: the line is solid and still. */
|
|
48
|
+
@media (prefers-reduced-motion: reduce) {
|
|
49
|
+
.fs-diagram-edge--flow {
|
|
50
|
+
animation: none;
|
|
51
|
+
stroke-dasharray: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* The "1" / "*" end: an SVG group of a circle and a text. The product places it and sets the circle's r to half --fs-diagram-end-size (core's r is 7). Give the text dy="0.36em": half the cap height at any size, so "1" and "*" sit centred. */
|
|
56
|
+
.fs-diagram-end > circle {
|
|
57
|
+
fill: var(--fs-diagram-end-bg);
|
|
58
|
+
stroke: var(--fs-diagram-end-line);
|
|
59
|
+
stroke-width: var(--fs-diagram-end-line-width);
|
|
60
|
+
}
|
|
61
|
+
.fs-diagram-end > text {
|
|
62
|
+
fill: var(--fs-diagram-end-ink);
|
|
63
|
+
font-family: var(--fs-font-sans);
|
|
64
|
+
font-size: var(--fs-text-xs-size);
|
|
65
|
+
font-weight: var(--fs-weight-semibold);
|
|
66
|
+
text-anchor: middle;
|
|
67
|
+
}
|
|
68
|
+
.fs-diagram-end--emphasis > circle {
|
|
69
|
+
stroke: var(--fs-diagram-line-emphasis);
|
|
70
|
+
}
|
|
71
|
+
.fs-diagram-end--dim {
|
|
72
|
+
opacity: var(--fs-diagram-dim-edge);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* The filter-direction triangle: an SVG path. */
|
|
76
|
+
.fs-diagram-arrow {
|
|
77
|
+
fill: var(--fs-diagram-line);
|
|
78
|
+
}
|
|
79
|
+
.fs-diagram-arrow--inactive {
|
|
80
|
+
fill: var(--fs-diagram-line-inactive);
|
|
81
|
+
}
|
|
82
|
+
.fs-diagram-arrow--emphasis {
|
|
83
|
+
fill: var(--fs-diagram-line-emphasis);
|
|
84
|
+
}
|
|
85
|
+
.fs-diagram-arrow--dim {
|
|
86
|
+
opacity: var(--fs-diagram-dim-edge);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Forced colours: system colours; the dash still tells inactive from active. */
|
|
90
|
+
@media (forced-colors: active) {
|
|
91
|
+
.fs-diagram {
|
|
92
|
+
background-image: none;
|
|
93
|
+
}
|
|
94
|
+
.fs-diagram-edge {
|
|
95
|
+
stroke: CanvasText;
|
|
96
|
+
}
|
|
97
|
+
.fs-diagram-edge--emphasis,
|
|
98
|
+
.fs-diagram-edge:hover,
|
|
99
|
+
.fs-diagram-edge--flow {
|
|
100
|
+
stroke: Highlight;
|
|
101
|
+
}
|
|
102
|
+
.fs-diagram-end > circle {
|
|
103
|
+
fill: Canvas;
|
|
104
|
+
stroke: CanvasText;
|
|
105
|
+
}
|
|
106
|
+
.fs-diagram-end--emphasis > circle {
|
|
107
|
+
stroke: Highlight;
|
|
108
|
+
}
|
|
109
|
+
.fs-diagram-end > text {
|
|
110
|
+
fill: CanvasText;
|
|
111
|
+
}
|
|
112
|
+
.fs-diagram-arrow {
|
|
113
|
+
fill: CanvasText;
|
|
114
|
+
}
|
|
115
|
+
.fs-diagram-arrow--emphasis {
|
|
116
|
+
fill: Highlight;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Diagram looks — `.fs-diagram`
|
|
2
|
+
|
|
3
|
+
Spec 02 J (T94, Phase G; T95 and T96 (the node frame, `node.md`) add rows). CSS: `css/diagram.css`; tokens: spec 01 §3.12. Gallery: `diagram.html`.
|
|
4
|
+
**The kit styles a diagram and never draws one.** It has no xyflow dependency (the same rule as `codemirror.md`):
|
|
5
|
+
the product draws the SVG, the kit gives it the plane and the classes.
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<div class="fs-diagram" style="width: 400px; height: 200px">
|
|
9
|
+
<svg width="400" height="200" aria-hidden="true">
|
|
10
|
+
<path class="fs-diagram-edge" d="M120 100 H280" />
|
|
11
|
+
<g class="fs-diagram-end" transform="translate(135 100)"><circle r="7" /><text dy="0.36em">1</text></g>
|
|
12
|
+
<path class="fs-diagram-arrow" d="M270 94 L282 100 L270 106 Z" />
|
|
13
|
+
</svg>
|
|
14
|
+
</div>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
| Class | What it is |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `.fs-diagram` | The plane: `--fs-diagram-bg` with a dot grid (`--fs-diagram-dot`, 1 px dots every 20 px). No size, no padding. |
|
|
20
|
+
| `.fs-diagram-edge` | An SVG `<path>`: 1.5 px in `--fs-diagram-line`, no fill. `--inactive` (`--fs-diagram-line-inactive`, dash 5 4), `--emphasis` (accent, 2.25 px; a path's own `:hover` does it too), `--dim` (opacity 0.25), `--flow` (emphasis plus moving dashes 6 5, 900 ms), `--flow` with `--back` (the other way). |
|
|
21
|
+
| `.fs-diagram-end` | An SVG `<g>` with a `<circle>` and a `<text>` ("1" or "\*"): `--fs-diagram-end-bg` fill, `--fs-diagram-end-line` edge, 12 px semibold text (the kit's `--fs-text-xs-size`, D35; core draws 10 px). `--emphasis`, `--dim`. The product sets `r` and places it: `--fs-diagram-end-size` (14 px) is the circle's diameter to the middle of its stroke, so `r="7"` as core draws it (15.2 px across with the 1.2 px stroke). Give the `<text>` `dy="0.36em"` (half the cap height) so "1" and "*" sit centred. |
|
|
22
|
+
| `.fs-diagram-arrow` | The filter-direction triangle, an SVG `<path>`: fills like the line. `--inactive`, `--emphasis`, `--dim`. |
|
|
23
|
+
|
|
24
|
+
- **The product sets the state classes on every part of a line** (edge, end, arrow). The kit does not know that they belong together.
|
|
25
|
+
Dim is `--fs-diagram-dim-edge` (0.25) for a line; a node uses `--fs-diagram-dim-node` (0.38, T96).
|
|
26
|
+
- **Dim one group where you can.** Core sets one opacity on the wrapping `<g>` of a line. The kit dims the path, end and arrow
|
|
27
|
+
separately, because it cannot see the wrapper, and two dimmed parts that overlap let the line show through the end circle.
|
|
28
|
+
Where the product has a wrapping `<g>`, put one `opacity: var(--fs-diagram-dim-edge)` on it instead of the `--dim` classes.
|
|
29
|
+
- **Dimming is a deliberate contrast exception**, like the chart series (D40, spec 06 §2): the lit path is the cue, and the dimmed part is
|
|
30
|
+
not something to read. The line and emphasis inks hold 3:1 on the plane; the inactive line is faint by design and is told apart by its dash.
|
|
31
|
+
- **Reduced motion:** `--flow` is solid and still. **Forced colours:** system colours, no dot grid.
|
|
32
|
+
- **For xyflow** (T95): set its `--xy-*` variables from these tokens in a sheet scoped under `.fs-diagram`.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Mark dot and mark count: the conversion marks' dot, alone or with a number (spec 02 F, T92). Usage: mark-dot.md. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
/* A glyph, like an icon: the 7 px does not follow density. */
|
|
4
|
+
.fs-mark-dot {
|
|
5
|
+
--fs-mark-dot-size: 7px;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
flex: none;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
width: var(--fs-mark-dot-size);
|
|
10
|
+
height: var(--fs-mark-dot-size);
|
|
11
|
+
vertical-align: middle;
|
|
12
|
+
background: var(--fs-mark-dot-fill, var(--fs-mark-none-fill));
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
}
|
|
15
|
+
.fs-mark-dot--exact {
|
|
16
|
+
--fs-mark-dot-fill: var(--fs-mark-exact-fill);
|
|
17
|
+
}
|
|
18
|
+
.fs-mark-dot--approx {
|
|
19
|
+
--fs-mark-dot-fill: var(--fs-mark-approx-fill);
|
|
20
|
+
}
|
|
21
|
+
/* Not converted is hollow: a ring in the gap ink, so colour is not the only sign. */
|
|
22
|
+
.fs-mark-dot--none {
|
|
23
|
+
background: transparent;
|
|
24
|
+
border: 1.5px solid var(--fs-mark-none-ink);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* A dot and a tabular number, in the mark's ink. */
|
|
28
|
+
.fs-mark-count {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 3px;
|
|
32
|
+
font-variant-numeric: tabular-nums;
|
|
33
|
+
letter-spacing: 0;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
color: var(--fs-mark-count-ink, var(--fs-ink-2));
|
|
36
|
+
}
|
|
37
|
+
.fs-mark-count--exact {
|
|
38
|
+
--fs-mark-count-ink: var(--fs-mark-exact-ink);
|
|
39
|
+
}
|
|
40
|
+
.fs-mark-count--approx {
|
|
41
|
+
--fs-mark-count-ink: var(--fs-mark-approx-ink);
|
|
42
|
+
}
|
|
43
|
+
.fs-mark-count--none {
|
|
44
|
+
--fs-mark-count-ink: var(--fs-mark-none-ink);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Forced colours drops the fills: exact stays solid, approximate is half filled, none stays a ring. */
|
|
48
|
+
@media (forced-colors: active) {
|
|
49
|
+
.fs-mark-dot {
|
|
50
|
+
border: 1.5px solid CanvasText;
|
|
51
|
+
}
|
|
52
|
+
.fs-mark-dot--exact {
|
|
53
|
+
background: CanvasText;
|
|
54
|
+
}
|
|
55
|
+
.fs-mark-dot--approx {
|
|
56
|
+
background: linear-gradient(90deg, CanvasText 50%, transparent 50%);
|
|
57
|
+
}
|
|
58
|
+
.fs-mark-dot--none {
|
|
59
|
+
background: transparent;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Mark dot and mark count — `.fs-mark-dot`, `.fs-mark-count`
|
|
2
|
+
|
|
3
|
+
Spec 02 F (T92, Phase G). CSS: `css/mark-dot.css` (the tip is `css/tooltip.css`, the group is `.fs-cluster` in `css/utilities.css`). Gallery: `diagram.html`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<span class="fs-mark-dot fs-mark-dot--exact" aria-hidden="true"></span><span class="fs-visually-hidden">exact</span>
|
|
7
|
+
<span class="fs-mark-dot fs-mark-dot--approx" aria-hidden="true"></span>
|
|
8
|
+
<span class="fs-mark-dot fs-mark-dot--none" aria-hidden="true"></span>
|
|
9
|
+
|
|
10
|
+
<span class="fs-cluster" role="group" aria-label="Measures">
|
|
11
|
+
<span class="fs-mark-count fs-mark-count--exact">
|
|
12
|
+
<span class="fs-mark-dot fs-mark-dot--exact" aria-hidden="true"></span>
|
|
13
|
+
<span aria-hidden="true">4</span><span class="fs-visually-hidden">4 exact,</span>
|
|
14
|
+
</span>
|
|
15
|
+
<span class="fs-mark-count fs-mark-count--none">
|
|
16
|
+
<span class="fs-mark-dot fs-mark-dot--none" aria-hidden="true"></span>
|
|
17
|
+
<span aria-hidden="true">1</span><span class="fs-visually-hidden">1 not converted</span>
|
|
18
|
+
</span>
|
|
19
|
+
</span>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- The dot is 7 px and a glyph: it does not follow density (override with `--fs-mark-dot-size`). `--exact`, `--approx` and
|
|
23
|
+
`--none` fill it from `--fs-mark-{exact,approx,none}-fill`. **`--none` is hollow**: a 1.5 px ring in the gap ink
|
|
24
|
+
(`--fs-mark-none-ink`), so colour is not the only sign. In forced colours the dots draw in `CanvasText`: exact solid,
|
|
25
|
+
approximate half filled, none a ring.
|
|
26
|
+
- The dot is decoration (`aria-hidden`). The word ("exact", "approximate", "not converted") goes beside it in
|
|
27
|
+
`.fs-visually-hidden`, so a dense row keeps its meaning. In a dense, non-interactive row (a tree row) that hidden word is
|
|
28
|
+
the accessible path and a tooltip is optional.
|
|
29
|
+
- Put a dot in a focusable control only where the row already has one. Then the control's name is the word (`aria-label`),
|
|
30
|
+
and the tooltip adds a sentence rather than repeating it ("Converted with a small loss"), so the word is announced once:
|
|
31
|
+
a `.fs-icon-button`, with `createTooltip(button, tip)` for hover, keyboard focus, Escape and `aria-describedby`.
|
|
32
|
+
- `.fs-mark-count` is a dot and a tabular number in the mark's ink (3 px apart; the number comes formatted from the product).
|
|
33
|
+
The visible number is `aria-hidden` and the hidden text is the whole phrase ("4 exact", "1 not converted"), so a screen
|
|
34
|
+
reader hears "4 exact, 1 not converted" and never "4 1". Every count but the last ends its hidden phrase with a comma
|
|
35
|
+
("4 exact,"), so the group reads as one list. A group of counts sits in a `.fs-cluster` with `role="group"` and
|
|
36
|
+
a name.
|
|
37
|
+
- Fills are non-text at 3:1 on surface and chrome (spec 06 §2); the ring is tested the same way.
|
|
38
|
+
- React: `MarkDot` (`mark`) and `MarkCount` (`mark`, `count`, `label`).
|
|
39
|
+
|
|
40
|
+
## In a `.fs-tree` row (Grizzbi's Data page)
|
|
41
|
+
|
|
42
|
+
A mark goes in the row after the name, replacing the glyphs the Data page draws today:
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<div class="fs-tree__row">
|
|
46
|
+
<span class="fs-tree__chevron"></span>
|
|
47
|
+
<svg class="fs-icon fs-tree__icon fs-type-icon--model" aria-hidden="true">…</svg>
|
|
48
|
+
<span class="fs-tree__name">Revenue</span>
|
|
49
|
+
<span class="fs-mark-dot fs-mark-dot--approx" aria-hidden="true"></span><span class="fs-visually-hidden">approximate</span>
|
|
50
|
+
</div>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The tree's row is a flex row, so the dot sits at its end with the row's gap; put a count group at the end of a measures
|
|
54
|
+
head the same way (core's "MEASURES 4 ● 1 ○").
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/* Node frame: a box for a diagram, with a header, rows and a folding section (spec 02 J, T96). Usage: node.md. The kit draws no ports. */
|
|
2
|
+
@layer fs.components {
|
|
3
|
+
.fs-node {
|
|
4
|
+
--fs-node-edge: var(--fs-line-strong);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
width: var(--fs-node-width, 248px);
|
|
7
|
+
font-size: var(--fs-text-xs-size);
|
|
8
|
+
line-height: var(--fs-text-xs-line);
|
|
9
|
+
color: var(--fs-ink);
|
|
10
|
+
background: var(--fs-bg-surface);
|
|
11
|
+
/* D37: corners 0 and no shadow. */
|
|
12
|
+
border: var(--fs-line-width) solid var(--fs-node-edge);
|
|
13
|
+
border-radius: 0;
|
|
14
|
+
transition: border-color var(--fs-dur);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* The header is the drag handle: it can be a div or a button. */
|
|
18
|
+
.fs-node__header {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--fs-space-2);
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 8px 10px;
|
|
27
|
+
border: 0;
|
|
28
|
+
border-bottom: var(--fs-line-width) solid var(--fs-line);
|
|
29
|
+
border-radius: 0;
|
|
30
|
+
background: var(--fs-bg-chrome);
|
|
31
|
+
color: inherit;
|
|
32
|
+
font: inherit;
|
|
33
|
+
text-align: left;
|
|
34
|
+
cursor: grab;
|
|
35
|
+
}
|
|
36
|
+
.fs-node__icon {
|
|
37
|
+
flex: none;
|
|
38
|
+
color: var(--fs-ink-2);
|
|
39
|
+
}
|
|
40
|
+
.fs-node__name {
|
|
41
|
+
flex: 1 1 auto;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
font-weight: var(--fs-weight-semibold);
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
}
|
|
48
|
+
.fs-node__meta {
|
|
49
|
+
flex: none;
|
|
50
|
+
color: var(--fs-ink-muted);
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
font-variant-numeric: tabular-nums;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Any children: rows, a section, a "more" line, or the product's own. */
|
|
56
|
+
.fs-node__body {
|
|
57
|
+
display: grid;
|
|
58
|
+
padding: 3px 0;
|
|
59
|
+
}
|
|
60
|
+
.fs-node__body:empty {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.fs-node__row {
|
|
65
|
+
position: relative;
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 7px;
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
width: 100%;
|
|
71
|
+
min-height: 24px;
|
|
72
|
+
margin: 0;
|
|
73
|
+
padding: 2px 10px;
|
|
74
|
+
border: 0;
|
|
75
|
+
border-radius: 0;
|
|
76
|
+
background: none;
|
|
77
|
+
color: inherit;
|
|
78
|
+
font: inherit;
|
|
79
|
+
text-align: left;
|
|
80
|
+
}
|
|
81
|
+
.fs-node__row-name {
|
|
82
|
+
flex: 1 1 auto;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
}
|
|
88
|
+
.fs-node__tag {
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
flex: none;
|
|
91
|
+
align-items: center;
|
|
92
|
+
color: var(--fs-ink-muted);
|
|
93
|
+
}
|
|
94
|
+
/* The word of a gap row ("Not converted"): the word is the cue, the hatch is its backdrop. */
|
|
95
|
+
.fs-node__gap {
|
|
96
|
+
flex: none;
|
|
97
|
+
font-weight: var(--fs-weight-semibold);
|
|
98
|
+
color: var(--fs-gap-ink);
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
}
|
|
101
|
+
.fs-node__more {
|
|
102
|
+
padding: 2px 10px 6px 39px;
|
|
103
|
+
font-size: var(--fs-text-xs-size);
|
|
104
|
+
color: var(--fs-ink-muted);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* A row the product makes interactive: a button, or anything with a tabindex. */
|
|
108
|
+
.fs-node__row:is(button, [tabindex]) {
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
.fs-node__header:focus-visible,
|
|
112
|
+
.fs-node__row:focus-visible,
|
|
113
|
+
.fs-node__section-head:focus-visible {
|
|
114
|
+
outline: var(--fs-ring-width) solid var(--fs-ring);
|
|
115
|
+
outline-offset: calc(-1 * var(--fs-ring-width));
|
|
116
|
+
}
|
|
117
|
+
@media (hover: hover) {
|
|
118
|
+
.fs-node__row:hover {
|
|
119
|
+
background-color: var(--fs-bg-hover);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
.fs-node__row.fs-is-selected {
|
|
123
|
+
background-color: var(--fs-bg-selected);
|
|
124
|
+
}
|
|
125
|
+
/* Lit: an accent wash and a 3 px accent left edge. */
|
|
126
|
+
.fs-node__row.fs-is-lit {
|
|
127
|
+
background-color: var(--fs-accent-wash);
|
|
128
|
+
box-shadow: inset 3px 0 0 var(--fs-accent);
|
|
129
|
+
}
|
|
130
|
+
.fs-node__row.fs-is-hidden .fs-node__row-name {
|
|
131
|
+
color: var(--fs-ink-muted);
|
|
132
|
+
}
|
|
133
|
+
.fs-node__row.fs-is-key .fs-node__row-name {
|
|
134
|
+
font-weight: var(--fs-weight-semibold);
|
|
135
|
+
}
|
|
136
|
+
.fs-node__row.fs-is-gap {
|
|
137
|
+
background-image: var(--fs-gap-hatch-sm);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* The folding section, on .fs-disclosure (the chevron, the open state and the ring are its). */
|
|
141
|
+
.fs-node__section {
|
|
142
|
+
border-top: var(--fs-line-width) solid var(--fs-line);
|
|
143
|
+
}
|
|
144
|
+
.fs-node__section-head {
|
|
145
|
+
min-height: 24px;
|
|
146
|
+
padding: 2px 10px;
|
|
147
|
+
border-radius: 0;
|
|
148
|
+
font-weight: var(--fs-weight-semibold);
|
|
149
|
+
letter-spacing: var(--fs-tracking-caps);
|
|
150
|
+
text-transform: uppercase;
|
|
151
|
+
color: var(--fs-ink-2);
|
|
152
|
+
}
|
|
153
|
+
.fs-node__section-head::before {
|
|
154
|
+
width: 12px;
|
|
155
|
+
height: 12px;
|
|
156
|
+
}
|
|
157
|
+
/* The slot for T92's mark counts, pushed right. */
|
|
158
|
+
.fs-node__counts {
|
|
159
|
+
display: flex;
|
|
160
|
+
gap: 6px;
|
|
161
|
+
margin-left: auto;
|
|
162
|
+
letter-spacing: 0;
|
|
163
|
+
text-transform: none;
|
|
164
|
+
}
|
|
165
|
+
.fs-node__section > .fs-disclosure__body {
|
|
166
|
+
display: grid;
|
|
167
|
+
padding: 3px 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Node states. Selected is an outline, outside the edge, so it never moves the layout. */
|
|
171
|
+
.fs-node.fs-is-selected {
|
|
172
|
+
outline: 2px solid var(--fs-accent);
|
|
173
|
+
outline-offset: 2px;
|
|
174
|
+
}
|
|
175
|
+
/* Lit and match: the edge turns accent and the header takes the wash, so it is not colour on the edge alone. */
|
|
176
|
+
.fs-node--lit,
|
|
177
|
+
.fs-node--match {
|
|
178
|
+
--fs-node-edge: var(--fs-accent);
|
|
179
|
+
}
|
|
180
|
+
.fs-node--lit > .fs-node__header,
|
|
181
|
+
.fs-node--match > .fs-node__header {
|
|
182
|
+
background-color: var(--fs-accent-wash);
|
|
183
|
+
}
|
|
184
|
+
/* Dim: the one deliberate contrast exception for a node (spec 06 §2). */
|
|
185
|
+
.fs-node--dim {
|
|
186
|
+
opacity: var(--fs-diagram-dim-node);
|
|
187
|
+
}
|
|
188
|
+
/* Fail (two filter paths): a dashed gap edge, and the gap hatch on the header. */
|
|
189
|
+
.fs-node--fail {
|
|
190
|
+
--fs-node-edge: var(--fs-gap-ink);
|
|
191
|
+
border-style: dashed;
|
|
192
|
+
}
|
|
193
|
+
.fs-node--fail > .fs-node__header {
|
|
194
|
+
background-image: var(--fs-gap-hatch-sm);
|
|
195
|
+
}
|
|
196
|
+
/* No data: a hatched header, and the product's "No data" in the meta, which turns bold and darker. */
|
|
197
|
+
.fs-node--nodata > .fs-node__header {
|
|
198
|
+
background-image: repeating-linear-gradient(135deg, var(--fs-bg-sunken) 0 6px, transparent 6px 12px);
|
|
199
|
+
}
|
|
200
|
+
.fs-node--nodata .fs-node__meta {
|
|
201
|
+
color: var(--fs-ink-2);
|
|
202
|
+
font-weight: var(--fs-weight-semibold);
|
|
203
|
+
}
|
|
204
|
+
/* Measures only: a dashed edge. */
|
|
205
|
+
.fs-node--measures-only {
|
|
206
|
+
border-style: dashed;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Forced colours: system colours; dashes, the outline and the left edge still show. */
|
|
210
|
+
@media (forced-colors: active) {
|
|
211
|
+
.fs-node {
|
|
212
|
+
border-color: CanvasText;
|
|
213
|
+
}
|
|
214
|
+
.fs-node.fs-is-selected {
|
|
215
|
+
outline-color: Highlight;
|
|
216
|
+
}
|
|
217
|
+
.fs-node--lit,
|
|
218
|
+
.fs-node--match {
|
|
219
|
+
border-color: Highlight;
|
|
220
|
+
}
|
|
221
|
+
/* Forced colours removes box-shadow, so the lit row's left edge is a border; the padding gives the 3 px back. */
|
|
222
|
+
.fs-node__row.fs-is-lit {
|
|
223
|
+
border-inline-start: 3px solid Highlight;
|
|
224
|
+
padding-inline-start: 7px;
|
|
225
|
+
}
|
|
226
|
+
.fs-node__row.fs-is-selected {
|
|
227
|
+
outline: 1px solid Highlight;
|
|
228
|
+
outline-offset: -1px;
|
|
229
|
+
}
|
|
230
|
+
/* Forced colours erase a hatch: a dashed system-colour border takes its place (06 §7, as gap.css does). The row's
|
|
231
|
+
border is inside its box-sizing, so the row keeps its height; the header's replaces its bottom hairline. */
|
|
232
|
+
.fs-node__row.fs-is-gap {
|
|
233
|
+
background-image: none;
|
|
234
|
+
border: var(--fs-line-width) dashed CanvasText;
|
|
235
|
+
}
|
|
236
|
+
.fs-node--fail > .fs-node__header,
|
|
237
|
+
.fs-node--nodata > .fs-node__header {
|
|
238
|
+
background-image: none;
|
|
239
|
+
border-bottom: var(--fs-line-width) dashed CanvasText;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|