viewkitjs 0.22.0 → 0.23.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 +27 -0
- package/package.json +2 -4
- package/views/dist/contract.d.ts +6 -289
- package/views/dist/contract.js +1 -96
- package/views/dist/controls/atoms.d.ts +8 -0
- package/views/dist/controls/atoms.js +8 -0
- package/views/dist/controls/button/tokens.d.ts +351 -0
- package/views/dist/controls/button/tokens.js +90 -0
- package/views/dist/controls/checkbox/checkbox.d.ts +28 -0
- package/views/dist/controls/checkbox/checkbox.js +15 -0
- package/views/dist/controls/checkbox/looks.d.ts +3 -0
- package/views/dist/controls/checkbox/looks.js +8 -0
- package/views/dist/controls/checkbox/map-checkbox.d.ts +2 -0
- package/views/dist/controls/checkbox/map-checkbox.js +5 -0
- package/views/dist/controls/checkbox/tokens.d.ts +131 -0
- package/views/dist/controls/checkbox/tokens.js +35 -0
- package/views/dist/controls/checkbox.css +133 -0
- package/views/dist/controls/controls.d.ts +12 -3
- package/views/dist/controls/controls.js +13 -1
- package/views/dist/controls/field/field.d.ts +94 -0
- package/views/dist/controls/field/field.js +46 -0
- package/views/dist/controls/field/looks.d.ts +13 -0
- package/views/dist/controls/field/looks.js +22 -0
- package/views/dist/controls/field/tokens.d.ts +75 -0
- package/views/dist/controls/field/tokens.js +21 -0
- package/views/dist/controls/field.css +98 -0
- package/views/dist/controls/glass-button/glass-button.d.ts +40 -0
- package/views/dist/controls/glass-button/glass-button.js +16 -0
- package/views/dist/controls/glass-button/looks.d.ts +4 -0
- package/views/dist/controls/glass-button/looks.js +4 -0
- package/views/dist/controls/glass-button/tokens.d.ts +127 -0
- package/views/dist/controls/glass-button/tokens.js +34 -0
- package/views/dist/controls/glass-button.css +111 -0
- package/views/dist/controls/index.d.ts +26 -0
- package/views/dist/controls/index.js +25 -0
- package/views/dist/controls/inline-input/inline-input.d.ts +14 -0
- package/views/dist/controls/inline-input/inline-input.js +10 -0
- package/views/dist/controls/inline-input/looks.d.ts +3 -0
- package/views/dist/controls/inline-input/looks.js +16 -0
- package/views/dist/controls/inline-input/tokens.d.ts +79 -0
- package/views/dist/controls/inline-input/tokens.js +22 -0
- package/views/dist/controls/inline-input.css +78 -0
- package/views/dist/controls/input/autofill.d.ts +25 -0
- package/views/dist/controls/input/autofill.js +17 -0
- package/views/dist/controls/input/input.d.ts +119 -0
- package/views/dist/controls/input/input.js +127 -0
- package/views/dist/controls/input/looks.d.ts +41 -0
- package/views/dist/controls/input/looks.js +48 -0
- package/views/dist/controls/input/map-input.d.ts +2 -0
- package/views/dist/controls/input/map-input.js +5 -0
- package/views/dist/controls/input/tokens.d.ts +171 -0
- package/views/dist/controls/input/tokens.js +45 -0
- package/views/dist/controls/input.css +381 -0
- package/views/dist/controls/internal/anchor.d.ts +16 -0
- package/views/dist/controls/internal/anchor.js +8 -0
- package/views/dist/controls/internal/close-reason.d.ts +5 -0
- package/views/dist/controls/internal/close-reason.js +2 -0
- package/views/dist/controls/internal/popup-host.d.ts +7 -0
- package/views/dist/controls/internal/popup-host.js +10 -0
- package/views/dist/controls/internal/scroll.d.ts +11 -0
- package/views/dist/controls/internal/scroll.js +14 -0
- package/views/dist/controls/kbd/kbd.d.ts +13 -0
- package/views/dist/controls/kbd/kbd.js +10 -0
- package/views/dist/controls/kbd/looks.d.ts +4 -0
- package/views/dist/controls/kbd/looks.js +4 -0
- package/views/dist/controls/kbd/tokens.d.ts +47 -0
- package/views/dist/controls/kbd/tokens.js +14 -0
- package/views/dist/controls/kbd.css +46 -0
- package/views/dist/controls/number-field/number-field.d.ts +48 -0
- package/views/dist/controls/number-field/number-field.js +34 -0
- package/views/dist/controls/number-field/tokens.d.ts +47 -0
- package/views/dist/controls/number-field/tokens.js +14 -0
- package/views/dist/controls/number-field.css +54 -0
- package/views/dist/controls/option/atom-tag.d.ts +6 -0
- package/views/dist/controls/option/atom-tag.js +6 -0
- package/views/dist/controls/option/looks.d.ts +7 -0
- package/views/dist/controls/option/looks.js +21 -0
- package/views/dist/controls/option/option.d.ts +35 -0
- package/views/dist/controls/option/option.js +32 -0
- package/views/dist/controls/option/tokens.d.ts +223 -0
- package/views/dist/controls/option/tokens.js +58 -0
- package/views/dist/controls/option.css +92 -0
- package/views/dist/controls/phone-header/header-bar.d.ts +18 -0
- package/views/dist/controls/phone-header/header-bar.js +9 -0
- package/views/dist/controls/phone-header/looks.d.ts +4 -0
- package/views/dist/controls/phone-header/looks.js +4 -0
- package/views/dist/controls/phone-header/soft-edge.d.ts +5 -0
- package/views/dist/controls/phone-header/soft-edge.js +3 -0
- package/views/dist/controls/phone-header/tokens.d.ts +59 -0
- package/views/dist/controls/phone-header/tokens.js +17 -0
- package/views/dist/controls/phone-header.css +51 -0
- package/views/dist/controls/popover/looks.d.ts +4 -0
- package/views/dist/controls/popover/looks.js +10 -0
- package/views/dist/controls/popover/map-popover.d.ts +3 -0
- package/views/dist/controls/popover/map-popover.js +5 -0
- package/views/dist/controls/popover/popover.d.ts +74 -0
- package/views/dist/controls/popover/popover.js +106 -0
- package/views/dist/controls/popover/tokens.d.ts +83 -0
- package/views/dist/controls/popover/tokens.js +23 -0
- package/views/dist/controls/popover.css +94 -0
- package/views/dist/controls/scrollbar/scrollbar.d.ts +10 -0
- package/views/dist/controls/scrollbar/scrollbar.js +143 -0
- package/views/dist/controls/scrollbar/tokens.d.ts +43 -0
- package/views/dist/controls/scrollbar/tokens.js +13 -0
- package/views/dist/controls/scrollbar.css +47 -0
- package/views/dist/controls/sheet/bottom-sheet.d.ts +98 -0
- package/views/dist/controls/sheet/bottom-sheet.js +372 -0
- package/views/dist/controls/sheet/forms.d.ts +38 -0
- package/views/dist/controls/sheet/forms.js +26 -0
- package/views/dist/controls/sheet/looks.d.ts +4 -0
- package/views/dist/controls/sheet/looks.js +10 -0
- package/views/dist/controls/sheet/map-sheet.d.ts +3 -0
- package/views/dist/controls/sheet/map-sheet.js +12 -0
- package/views/dist/controls/sheet/spring.d.ts +22 -0
- package/views/dist/controls/sheet/spring.js +48 -0
- package/views/dist/controls/sheet/tokens.d.ts +143 -0
- package/views/dist/controls/sheet/tokens.js +38 -0
- package/views/dist/controls/sheet.css +220 -0
- package/views/dist/controls/spinner/tokens.d.ts +55 -0
- package/views/dist/controls/spinner/tokens.js +16 -0
- package/views/dist/controls/status/atom-status-badge.d.ts +10 -0
- package/views/dist/controls/status/atom-status-badge.js +13 -0
- package/views/dist/controls/status/looks.d.ts +4 -0
- package/views/dist/controls/status/looks.js +22 -0
- package/views/dist/controls/status/marks.d.ts +26 -0
- package/views/dist/controls/status/marks.js +73 -0
- package/views/dist/controls/status/status.d.ts +43 -0
- package/views/dist/controls/status/status.js +26 -0
- package/views/dist/controls/status/tokens.d.ts +407 -0
- package/views/dist/controls/status/tokens.js +104 -0
- package/views/dist/controls/status.css +164 -0
- package/views/dist/controls/switch/looks.d.ts +4 -0
- package/views/dist/controls/switch/looks.js +19 -0
- package/views/dist/controls/switch/switch.d.ts +15 -0
- package/views/dist/controls/switch/switch.js +11 -0
- package/views/dist/controls/switch/tokens.d.ts +139 -0
- package/views/dist/controls/switch/tokens.js +37 -0
- package/views/dist/controls/switch.css +169 -0
- package/views/dist/controls/tag/atom-cell-more.d.ts +3 -0
- package/views/dist/controls/tag/atom-cell-more.js +5 -0
- package/views/dist/controls/tag/looks.d.ts +4 -0
- package/views/dist/controls/tag/looks.js +4 -0
- package/views/dist/controls/tag/tag.d.ts +25 -0
- package/views/dist/controls/tag/tag.js +19 -0
- package/views/dist/controls/tag/tokens.d.ts +63 -0
- package/views/dist/controls/tag/tokens.js +18 -0
- package/views/dist/controls/tag.css +81 -0
- package/views/dist/controls/toggle/looks.d.ts +3 -0
- package/views/dist/controls/toggle/looks.js +12 -0
- package/views/dist/controls/toggle/toggle.d.ts +47 -0
- package/views/dist/controls/toggle/toggle.js +23 -0
- package/views/dist/controls/toggle/tokens.d.ts +55 -0
- package/views/dist/controls/toggle/tokens.js +16 -0
- package/views/dist/controls/toggle.css +67 -0
- package/views/dist/controls/tokens.d.ts +16 -0
- package/views/dist/controls/tokens.js +45 -0
- package/views/dist/controls/tooltip/looks.d.ts +4 -0
- package/views/dist/controls/tooltip/looks.js +4 -0
- package/views/dist/controls/tooltip/map-tooltip.d.ts +3 -0
- package/views/dist/controls/tooltip/map-tooltip.js +5 -0
- package/views/dist/controls/tooltip/tokens.d.ts +75 -0
- package/views/dist/controls/tooltip/tokens.js +21 -0
- package/views/dist/controls/tooltip/tooltip.d.ts +54 -0
- package/views/dist/controls/tooltip/tooltip.js +78 -0
- package/views/dist/controls/tooltip.css +94 -0
- package/views/dist/grid/chrome/GridTable.js +21 -19
- package/views/dist/grid/chrome/grid-row-window.js +3 -0
- package/views/dist/grid/chrome/useGridColumnLayout.d.ts +4 -1
- package/views/dist/grid/chrome/useGridColumnLayout.js +17 -2
- package/views/dist/grid/chrome/useGridFittedWidths.d.ts +29 -0
- package/views/dist/grid/chrome/useGridFittedWidths.js +46 -0
- package/views/dist/looks/index.d.ts +15 -0
- package/views/dist/looks/index.js +15 -0
- package/views/dist/looks/pieces.js +36 -2
- package/views/dist/model/column-schema.d.ts +3 -2
- package/views/dist/model/column-state.d.ts +11 -1
- package/views/dist/model/column-state.js +8 -2
- package/views/dist/styles.css +1930 -7
- package/views/dist/styles.unlayered.css +1930 -7
- package/views/docs/contract.md +5 -97
- package/views/docs/controls/button.md +93 -0
- package/views/docs/controls/checkbox.md +38 -0
- package/views/docs/controls/field.md +26 -0
- package/views/docs/controls/glass-button.md +37 -0
- package/views/docs/controls/inline-input.md +27 -0
- package/views/docs/controls/input.md +48 -0
- package/views/docs/controls/kbd.md +17 -0
- package/views/docs/controls/number-field.md +17 -0
- package/views/docs/controls/option.md +61 -0
- package/views/docs/controls/phone-header.md +20 -0
- package/views/docs/controls/popover.md +26 -0
- package/views/docs/controls/scrollbar.md +16 -0
- package/views/docs/controls/sheet.md +41 -0
- package/views/docs/controls/spinner.md +19 -0
- package/views/docs/controls/status.md +107 -0
- package/views/docs/controls/switch.md +40 -0
- package/views/docs/controls/tag.md +21 -0
- package/views/docs/controls/toggle.md +19 -0
- package/views/docs/controls/tooltip.md +24 -0
- package/views/docs/getting-started.md +1 -1
- package/views/docs/reference/controls.md +173 -2
- package/views/docs/reference/looks.md +67 -2
- package/views/docs/reference/views.md +7 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const MARKS = ["quarters", "linear", "segments", "progress", "pie", "square", "dot", "dots", "bar", "signal", "number", "stroke"];
|
|
2
|
+
const r2 = (n) => Math.round(n * 100) / 100;
|
|
3
|
+
const circ = (cx, cy, r) => `M${r2(cx + r)} ${cy}a${r} ${r} 0 1 1 ${r2(-2 * r)} 0a${r} ${r} 0 1 1 ${r2(2 * r)} 0`;
|
|
4
|
+
const pt = (r, t) => { const a = t * 2 * Math.PI - Math.PI / 2; return `${r2(8 + r * Math.cos(a))} ${r2(8 + r * Math.sin(a))}`; };
|
|
5
|
+
const arc = (r, t0, t1) => `M${pt(r, t0)}A${r} ${r} 0 ${t1 - t0 > 0.5 ? 1 : 0} 1 ${pt(r, t1)}`;
|
|
6
|
+
const pie = (r, fr) => (fr >= 1 ? circ(8, 8, r) : `M8 8V${r2(8 - r)}A${r} ${r} 0 ${fr > 0.5 ? 1 : 0} 1 ${pt(r, fr)}Z`);
|
|
7
|
+
const TICK = "M5.2 8.2l1.9 1.9 3.7-3.8", CROSS = "M6 6l4 4M10 6l-4 4", BANG = "M8 5v3.5M8 11h.01";
|
|
8
|
+
const QUARTER = ["", "M8 4a4 4 0 0 1 4 4h-4z", "M8 4a4 4 0 0 1 0 8z", "M8 4a4 4 0 1 1 -4 4h4z"];
|
|
9
|
+
const SQUARE = "M4 2.25h8a1.75 1.75 0 0 1 1.75 1.75v8a1.75 1.75 0 0 1-1.75 1.75h-8a1.75 1.75 0 0 1-1.75-1.75v-8a1.75 1.75 0 0 1 1.75-1.75z";
|
|
10
|
+
const SQUARE_FULL = "M4 1.5h8a2.5 2.5 0 0 1 2.5 2.5v8a2.5 2.5 0 0 1-2.5 2.5h-8a2.5 2.5 0 0 1-2.5-2.5v-8a2.5 2.5 0 0 1 2.5-2.5z";
|
|
11
|
+
const DASHED = { width: 16, on: circ(8, 8, 6), onWidth: 1.5, dash: "1.6 1.54" };
|
|
12
|
+
const OWN = {
|
|
13
|
+
"queued": DASHED,
|
|
14
|
+
"running": { width: 16, spinner: true },
|
|
15
|
+
"succeeded": { width: 16, fill: circ(8, 8, 7), cut: TICK },
|
|
16
|
+
"failed": { width: 16, fill: circ(8, 8, 7), cut: CROSS },
|
|
17
|
+
"cancelled": { width: 16, fill: circ(8, 8, 7), cut: "M5.5 10.5l5-5" },
|
|
18
|
+
"skipped": { width: 16, on: circ(8, 8, 6), onWidth: 1.5, ink: "M5.75 10.25l4.5-4.5", markWidth: 1.5 },
|
|
19
|
+
"on-track": { width: 16, fill: circ(8, 8, 7), cut: "M4.6 10.2 7.1 7.7l1.8 1.8 2.6-2.9" },
|
|
20
|
+
"at-risk": { width: 16, fill: circ(8, 8, 7), cut: BANG },
|
|
21
|
+
"off-track": { width: 16, fill: circ(8, 8, 7), cut: "M4.6 6.2 7.1 8.7l1.8-1.8 2.6 2.9" },
|
|
22
|
+
"no-update": DASHED,
|
|
23
|
+
"draft": DASHED,
|
|
24
|
+
"scheduled": { width: 16, on: circ(8, 8, 6), onWidth: 1.5, ink: "M8 5v3.2l2 1.3", markWidth: 1.5 },
|
|
25
|
+
"live": { width: 16, fill: circ(8, 8, 3.5), off: circ(8, 8, 6.25), offWidth: 1.5 },
|
|
26
|
+
"paused": { width: 16, fill: circ(8, 8, 7), cut: "M6.5 5.75v4.5M9.5 5.75v4.5" },
|
|
27
|
+
"ended": { width: 16, fill: circ(8, 8, 7), cut: "M5.75 8h4.5" },
|
|
28
|
+
};
|
|
29
|
+
const DEAL = ["start", "between", "won", "lost", "risk", "archived"];
|
|
30
|
+
export const isDealPlace = (place) => DEAL.includes(place);
|
|
31
|
+
export const stepOf = (place, quarters = 2) => (place === "start" ? 1 : place === "between" ? quarters + 1 : place === "won" || place === "lost" ? 5 : 0);
|
|
32
|
+
export function markOf(mark, place, quarters = 2) {
|
|
33
|
+
if (mark === "own" || !isDealPlace(place))
|
|
34
|
+
return OWN[place] ?? DASHED;
|
|
35
|
+
const end = place === "won" || place === "lost", off = place === "risk" || place === "archived", n = stepOf(place, quarters);
|
|
36
|
+
const fr = place === "between" ? quarters / 4 : end ? 1 : 0, sign = place === "won" ? TICK : CROSS;
|
|
37
|
+
const lit = (ds) => ({ on: ds.filter((_, i) => !off && i < n).join("") || undefined, off: ds.filter((_, i) => off || i >= n).join("") || undefined });
|
|
38
|
+
switch (mark) {
|
|
39
|
+
case "quarters":
|
|
40
|
+
return end ? { width: 16, fill: circ(8, 8, 7), cut: sign } : { width: 16, on: circ(8, 8, 6), fill: place === "between" ? QUARTER[quarters] : undefined, ink: place === "risk" ? BANG : undefined, dash: place === "archived" ? "2.4 2.3" : undefined };
|
|
41
|
+
case "linear":
|
|
42
|
+
return end ? { width: 16, fill: circ(8, 8, 7), cut: sign, markWidth: 1.6 }
|
|
43
|
+
: { width: 16, on: circ(8, 8, 6), onWidth: 1.5, fill: place === "between" ? pie(3.25, fr) : undefined, ink: place === "risk" ? BANG : undefined, markWidth: 1.6, dash: place === "start" ? "1.6 1.54" : place === "archived" ? "0.01 2.6" : undefined };
|
|
44
|
+
case "segments":
|
|
45
|
+
return { width: 16, ...lit([0, 1, 2, 3, 4].map((i) => arc(6, i / 5 + 0.028, (i + 1) / 5 - 0.028))), butt: true, ink: end ? sign : place === "risk" ? BANG : undefined, markWidth: 1.6 };
|
|
46
|
+
case "progress":
|
|
47
|
+
return { width: 16, off: circ(8, 8, 6), offWidth: 2.25, onWidth: 2.25, offDash: place === "archived" ? "2.4 2.3" : undefined,
|
|
48
|
+
on: end ? circ(8, 8, 6) : place === "start" ? arc(6, 0, 0.004) : place === "between" ? arc(6, 0, fr) : undefined, ink: end ? sign : place === "risk" ? BANG : undefined, markWidth: 1.6 };
|
|
49
|
+
case "pie":
|
|
50
|
+
return end ? { width: 16, fill: circ(8, 8, 7), cut: sign }
|
|
51
|
+
: { width: 16, on: circ(8, 8, 6.25), onWidth: 1.5, fill: place === "between" ? pie(6.25, fr) : undefined, ink: place === "risk" ? BANG : undefined, dash: place === "archived" ? "2 1.93" : undefined };
|
|
52
|
+
case "square": {
|
|
53
|
+
const h = r2(8 * fr);
|
|
54
|
+
return end ? { width: 16, fill: SQUARE_FULL, cut: sign, markWidth: 1.8 }
|
|
55
|
+
: { width: 16, on: SQUARE, onWidth: 1.5, fill: place === "between" ? `M4 ${r2(12 - h)}h8v${h}h-8z` : undefined, ink: place === "risk" ? BANG : undefined, markWidth: 1.8, dash: place === "archived" ? "2 1.7" : undefined };
|
|
56
|
+
}
|
|
57
|
+
case "dot":
|
|
58
|
+
return place === "archived" ? { width: 9, on: circ(4.5, 8, 3), onWidth: 1.5 } : { width: 9, fill: circ(4.5, 8, 3.75) };
|
|
59
|
+
case "dots":
|
|
60
|
+
return { width: 28, ...lit([3, 8.5, 14, 19.5, 25].map((x) => `M${x} 8h0`)), onWidth: 4.2, offWidth: 4.2 };
|
|
61
|
+
case "bar": {
|
|
62
|
+
const q = end ? 1 : place === "start" ? 0.1 : place === "between" ? 0.15 + fr * 0.8 : 0;
|
|
63
|
+
return { width: 20, off: "M2 8H18", offWidth: 3, onWidth: 3, offDash: place === "archived" ? "2 2.6" : undefined, on: q ? `M2 8H${r2(2 + 16 * q)}` : undefined };
|
|
64
|
+
}
|
|
65
|
+
case "signal":
|
|
66
|
+
return { width: 16, ...lit([[2.5, 10.5], [6.17, 8], [9.83, 5.5], [13.5, 3]].map(([x, y]) => `M${x} 13.5V${y}`)), onWidth: 2.2, offWidth: 2.2 };
|
|
67
|
+
case "number":
|
|
68
|
+
return end ? { width: 16, fill: circ(8, 8, 7.25), cut: sign, markWidth: 1.7 }
|
|
69
|
+
: { width: 16, on: circ(8, 8, 6.75), onWidth: 1.25, num: place === "risk" ? "!" : place === "archived" ? undefined : String(n), dash: place === "archived" ? "1.8 1.7" : undefined };
|
|
70
|
+
case "stroke":
|
|
71
|
+
return { width: 6, on: "M3 3V13", onWidth: 3, dash: place === "archived" ? "1.5 2.2" : undefined };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OptionColour } from "../option/looks.js";
|
|
3
|
+
/** A deal's path: its start, a step between, its two ends, and off it at risk or archived. */
|
|
4
|
+
export type DealPlace = "start" | "between" | "won" | "lost" | "risk" | "archived";
|
|
5
|
+
/** Something that runs and can fail: an import, a sync, a send. */
|
|
6
|
+
export type RunPlace = "queued" | "running" | "succeeded" | "failed" | "cancelled" | "skipped";
|
|
7
|
+
/** How a project or an account is doing, said by a person. */
|
|
8
|
+
export type HealthPlace = "on-track" | "at-risk" | "off-track" | "no-update";
|
|
9
|
+
/** Something sent out or put live: a campaign, a page, a form. */
|
|
10
|
+
export type PublishedPlace = "draft" | "scheduled" | "live" | "paused" | "ended";
|
|
11
|
+
export type StatusPlace = DealPlace | RunPlace | HealthPlace | PublishedPlace;
|
|
12
|
+
export type StatusSize = "sm" | "md" | "lg" | "xl";
|
|
13
|
+
export interface StatusProps {
|
|
14
|
+
/** The step's word ("Negotiation"). */
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/** Its place: on a deal's path or off it, or a run's, a project's health's, or something published's. */
|
|
17
|
+
place: StatusPlace;
|
|
18
|
+
/** For a step between: how far along, in quarters (1, 2 or 3). */
|
|
19
|
+
quarters?: 1 | 2 | 3;
|
|
20
|
+
/** sm in a dense row or a cell, md in a list, lg at the top of a record, xl a record's head on a phone. */
|
|
21
|
+
size?: StatusSize;
|
|
22
|
+
/** The step's own colour, someone's pick, worn under Colour › Each step its own. */
|
|
23
|
+
colour?: OptionColour;
|
|
24
|
+
/** Its step of how many, for Along the path: unless given, the start 1, a step between its quarters + 1, its ends 5, of 5. */
|
|
25
|
+
step?: number;
|
|
26
|
+
steps?: number;
|
|
27
|
+
/** The step it was lost at, put at risk at or set aside from ("Negotiation"), for Along the path › In words. */
|
|
28
|
+
at?: string;
|
|
29
|
+
/** How long it has stood there ("12 days"), for Along the path › Time there. */
|
|
30
|
+
since?: string;
|
|
31
|
+
/** It has stood there too long: its time in the warning colour. */
|
|
32
|
+
stale?: boolean;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
/** The mark alone, as a mark beside a step's name (a select's list, a menu's choices). */
|
|
36
|
+
export declare function StatusGlyph({ place, quarters, colour, className }: {
|
|
37
|
+
place: StatusPlace;
|
|
38
|
+
quarters?: 1 | 2 | 3;
|
|
39
|
+
colour?: OptionColour;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
/** Where a record stands on its path: a mark that says how far along, and the word. */
|
|
43
|
+
export declare function Status({ children, place, quarters, size, colour, step, steps, at, since, stale, className }: StatusProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { cx } from "../../internal/cx.js";
|
|
3
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
4
|
+
import { MARKS, isDealPlace, markOf, stepOf } from "./marks.js";
|
|
5
|
+
const SPINNER = { sm: 12, md: 14, lg: 16, xl: 18 };
|
|
6
|
+
function Drawing({ id, m, size }) {
|
|
7
|
+
if (m.spinner)
|
|
8
|
+
return _jsx("span", { className: "o-status-svg o-status-spin", "data-mark": id, children: _jsx(Spinner, { size: SPINNER[size], label: "" }) });
|
|
9
|
+
const cap = m.butt ? "butt" : undefined;
|
|
10
|
+
return (_jsxs("svg", { className: "o-status-svg", "data-mark": id, viewBox: `0 0 ${m.width} 16`, strokeWidth: 2, "aria-hidden": "true", style: m.width === 16 ? undefined : { "--st-w": m.width / 16 }, children: [m.off && _jsx("path", { className: "o-status-off", d: m.off, strokeWidth: m.offWidth, strokeDasharray: m.offDash, strokeLinecap: cap }), m.on && _jsx("path", { className: "o-status-on", d: m.on, strokeWidth: m.onWidth, strokeDasharray: m.dash, strokeLinecap: cap }), m.fill && _jsx("path", { className: "o-status-fill", d: m.fill }), m.cut && _jsx("path", { className: "o-status-mark", d: m.cut, strokeWidth: m.markWidth }), m.ink && _jsx("path", { className: "o-status-ink", d: m.ink, strokeWidth: m.markWidth }), m.num && _jsx("text", { className: "o-status-num", x: m.width / 2, y: "8.6", fontSize: 8.5, fontWeight: 700, textAnchor: "middle", dominantBaseline: "central", children: m.num })] }));
|
|
11
|
+
}
|
|
12
|
+
function Marks({ place, quarters, size }) {
|
|
13
|
+
if (!isDealPlace(place))
|
|
14
|
+
return _jsx(Drawing, { id: "own", m: markOf("own", place), size: size });
|
|
15
|
+
return _jsx(_Fragment, { children: MARKS.map((id) => _jsx(Drawing, { id: id, m: markOf(id, place, quarters), size: size }, id)) });
|
|
16
|
+
}
|
|
17
|
+
const placeAttrs = (place, quarters, colour) => ({ "data-place": place, "data-quarters": place === "between" ? quarters : undefined, "data-colour": colour });
|
|
18
|
+
export function StatusGlyph({ place, quarters = 2, colour, className }) {
|
|
19
|
+
return (_jsx("span", { className: cx("o-status o-status-glyph", className), ...placeAttrs(place, quarters, colour), children: _jsx(Marks, { place: place, quarters: quarters, size: "md" }) }));
|
|
20
|
+
}
|
|
21
|
+
export function Status({ children, place, quarters = 2, size = "md", colour, step, steps = 5, at, since, stale, className }) {
|
|
22
|
+
const deal = isDealPlace(place), n = step ?? stepOf(place, quarters), reached = place === "risk" || place === "archived" ? 0 : n;
|
|
23
|
+
const words = !deal || place === "won" ? null : place === "lost" ? (at ? `at ${at}` : null) : place === "risk" ? (at ? `· at ${at}` : null) : place === "archived" ? (at ? `· from ${at}` : null) : `· ${n} of ${steps}`;
|
|
24
|
+
const bars = (form) => (_jsx("span", { className: "o-status-path", "data-form": form, "aria-hidden": "true", children: Array.from({ length: steps }, (_, i) => _jsx("span", { "data-on": i < reached ? "" : undefined }, i)) }));
|
|
25
|
+
return (_jsxs("span", { className: cx("o-status", size !== "md" && `o-status-${size}`, className), ...placeAttrs(place, quarters, colour), "data-kit": "status", children: [_jsx(Marks, { place: place, quarters: quarters, size: size }), _jsx("span", { className: "o-status-word", children: children }), deal && bars("before"), deal && bars("under"), words && _jsx("span", { className: "o-status-more", "data-form": "words", children: words }), deal && since && _jsxs("span", { className: "o-status-more", "data-form": "time", "data-stale": stale ? "" : undefined, children: ["\u00B7 ", since] })] }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
export declare const STATUS_TOKENS: readonly [{
|
|
2
|
+
readonly name: "--vk-amber-700";
|
|
3
|
+
readonly kind: "colour";
|
|
4
|
+
readonly outright: "--amber-700";
|
|
5
|
+
}, {
|
|
6
|
+
readonly name: "--vk-blue-700";
|
|
7
|
+
readonly kind: "colour";
|
|
8
|
+
readonly outright: "--blue-700";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "--vk-border";
|
|
11
|
+
readonly kind: "colour";
|
|
12
|
+
readonly outright: "--border";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "--vk-border-accent";
|
|
15
|
+
readonly kind: "colour";
|
|
16
|
+
readonly outright: "--border-brand";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "--vk-border-bold";
|
|
19
|
+
readonly kind: "colour";
|
|
20
|
+
readonly outright: "--border-bold";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "--vk-border-danger";
|
|
23
|
+
readonly kind: "colour";
|
|
24
|
+
readonly outright: "--border-danger";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "--vk-border-info";
|
|
27
|
+
readonly kind: "colour";
|
|
28
|
+
readonly outright: "--border-information";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "--vk-border-success";
|
|
31
|
+
readonly kind: "colour";
|
|
32
|
+
readonly outright: "--border-success";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "--vk-border-warning";
|
|
35
|
+
readonly kind: "colour";
|
|
36
|
+
readonly outright: "--border-warning";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "--vk-brand";
|
|
39
|
+
readonly kind: "colour";
|
|
40
|
+
readonly outright: "--background-brand-bold";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "--vk-brand-100";
|
|
43
|
+
readonly kind: "colour";
|
|
44
|
+
readonly outright: "--brand-100";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "--vk-brand-200";
|
|
47
|
+
readonly kind: "colour";
|
|
48
|
+
readonly outright: "--brand-200";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "--vk-brand-400";
|
|
51
|
+
readonly kind: "colour";
|
|
52
|
+
readonly outright: "--brand-400";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "--vk-brand-500";
|
|
55
|
+
readonly kind: "colour";
|
|
56
|
+
readonly outright: "--brand-500";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "--vk-brand-600";
|
|
59
|
+
readonly kind: "colour";
|
|
60
|
+
readonly outright: "--brand-600";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "--vk-brand-700";
|
|
63
|
+
readonly kind: "colour";
|
|
64
|
+
readonly outright: "--brand-700";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "--vk-brand-800";
|
|
67
|
+
readonly kind: "colour";
|
|
68
|
+
readonly outright: "--brand-800";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "--vk-brand-1000";
|
|
71
|
+
readonly kind: "colour";
|
|
72
|
+
readonly outright: "--brand-1000";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "--vk-brand-subtler";
|
|
75
|
+
readonly kind: "colour";
|
|
76
|
+
readonly outright: "--background-brand-subtler";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "--vk-brand-subtlest";
|
|
79
|
+
readonly kind: "colour";
|
|
80
|
+
readonly outright: "--background-brand-subtlest";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "--vk-danger";
|
|
83
|
+
readonly kind: "colour";
|
|
84
|
+
readonly outright: "--text-danger";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "--vk-danger-bold";
|
|
87
|
+
readonly kind: "colour";
|
|
88
|
+
readonly outright: "--background-danger-bold";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "--vk-danger-subtler";
|
|
91
|
+
readonly kind: "colour";
|
|
92
|
+
readonly outright: "--background-danger-subtler";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "--vk-danger-subtlest";
|
|
95
|
+
readonly kind: "colour";
|
|
96
|
+
readonly outright: "--background-danger-subtlest";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "--vk-fg";
|
|
99
|
+
readonly kind: "colour";
|
|
100
|
+
readonly outright: "--text";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "--vk-fg-accent";
|
|
103
|
+
readonly kind: "colour";
|
|
104
|
+
readonly outright: "--text-brand";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "--vk-fg-inverse";
|
|
107
|
+
readonly kind: "colour";
|
|
108
|
+
readonly outright: "--text-inverse";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "--vk-fg-on-brand";
|
|
111
|
+
readonly kind: "colour";
|
|
112
|
+
readonly outright: "--text-brand-inverse";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "--vk-fg-subtle";
|
|
115
|
+
readonly kind: "colour";
|
|
116
|
+
readonly outright: "--text-subtle";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "--vk-fg-subtlest";
|
|
119
|
+
readonly kind: "colour";
|
|
120
|
+
readonly outright: "--text-subtlest";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "--vk-fg-warning-inverse";
|
|
123
|
+
readonly kind: "colour";
|
|
124
|
+
readonly outright: "--text-warning-inverse";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "--vk-green-700";
|
|
127
|
+
readonly kind: "colour";
|
|
128
|
+
readonly outright: "--green-700";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "--vk-ground";
|
|
131
|
+
readonly kind: "colour";
|
|
132
|
+
readonly outright: "--surface";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "--vk-info";
|
|
135
|
+
readonly kind: "colour";
|
|
136
|
+
readonly outright: "--text-information";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "--vk-info-bold";
|
|
139
|
+
readonly kind: "colour";
|
|
140
|
+
readonly outright: "--background-information-bold";
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "--vk-info-subtler";
|
|
143
|
+
readonly kind: "colour";
|
|
144
|
+
readonly outright: "--background-information-subtler";
|
|
145
|
+
}, {
|
|
146
|
+
readonly name: "--vk-info-subtlest";
|
|
147
|
+
readonly kind: "colour";
|
|
148
|
+
readonly outright: "--background-information-subtlest";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "--vk-label-amber";
|
|
151
|
+
readonly kind: "colour";
|
|
152
|
+
readonly outright: "--label-amber";
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "--vk-label-amber-edge";
|
|
155
|
+
readonly kind: "colour";
|
|
156
|
+
readonly outright: "--label-amber-edge";
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "--vk-label-amber-fill";
|
|
159
|
+
readonly kind: "colour";
|
|
160
|
+
readonly outright: "--label-amber-fill";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "--vk-label-amber-soft";
|
|
163
|
+
readonly kind: "colour";
|
|
164
|
+
readonly outright: "--label-amber-soft";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "--vk-label-amber-strong";
|
|
167
|
+
readonly kind: "colour";
|
|
168
|
+
readonly outright: "--label-amber-strong";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "--vk-label-blue";
|
|
171
|
+
readonly kind: "colour";
|
|
172
|
+
readonly outright: "--label-blue";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "--vk-label-blue-edge";
|
|
175
|
+
readonly kind: "colour";
|
|
176
|
+
readonly outright: "--label-blue-edge";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "--vk-label-blue-fill";
|
|
179
|
+
readonly kind: "colour";
|
|
180
|
+
readonly outright: "--label-blue-fill";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "--vk-label-blue-soft";
|
|
183
|
+
readonly kind: "colour";
|
|
184
|
+
readonly outright: "--label-blue-soft";
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "--vk-label-blue-strong";
|
|
187
|
+
readonly kind: "colour";
|
|
188
|
+
readonly outright: "--label-blue-strong";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "--vk-label-green";
|
|
191
|
+
readonly kind: "colour";
|
|
192
|
+
readonly outright: "--label-green";
|
|
193
|
+
}, {
|
|
194
|
+
readonly name: "--vk-label-green-edge";
|
|
195
|
+
readonly kind: "colour";
|
|
196
|
+
readonly outright: "--label-green-edge";
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "--vk-label-green-fill";
|
|
199
|
+
readonly kind: "colour";
|
|
200
|
+
readonly outright: "--label-green-fill";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "--vk-label-green-soft";
|
|
203
|
+
readonly kind: "colour";
|
|
204
|
+
readonly outright: "--label-green-soft";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "--vk-label-green-strong";
|
|
207
|
+
readonly kind: "colour";
|
|
208
|
+
readonly outright: "--label-green-strong";
|
|
209
|
+
}, {
|
|
210
|
+
readonly name: "--vk-label-pink";
|
|
211
|
+
readonly kind: "colour";
|
|
212
|
+
readonly outright: "--label-pink";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "--vk-label-pink-edge";
|
|
215
|
+
readonly kind: "colour";
|
|
216
|
+
readonly outright: "--label-pink-edge";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "--vk-label-pink-fill";
|
|
219
|
+
readonly kind: "colour";
|
|
220
|
+
readonly outright: "--label-pink-fill";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "--vk-label-pink-soft";
|
|
223
|
+
readonly kind: "colour";
|
|
224
|
+
readonly outright: "--label-pink-soft";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "--vk-label-pink-strong";
|
|
227
|
+
readonly kind: "colour";
|
|
228
|
+
readonly outright: "--label-pink-strong";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "--vk-label-purple";
|
|
231
|
+
readonly kind: "colour";
|
|
232
|
+
readonly outright: "--label-purple";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "--vk-label-purple-edge";
|
|
235
|
+
readonly kind: "colour";
|
|
236
|
+
readonly outright: "--label-purple-edge";
|
|
237
|
+
}, {
|
|
238
|
+
readonly name: "--vk-label-purple-fill";
|
|
239
|
+
readonly kind: "colour";
|
|
240
|
+
readonly outright: "--label-purple-fill";
|
|
241
|
+
}, {
|
|
242
|
+
readonly name: "--vk-label-purple-soft";
|
|
243
|
+
readonly kind: "colour";
|
|
244
|
+
readonly outright: "--label-purple-soft";
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "--vk-label-purple-strong";
|
|
247
|
+
readonly kind: "colour";
|
|
248
|
+
readonly outright: "--label-purple-strong";
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "--vk-label-red";
|
|
251
|
+
readonly kind: "colour";
|
|
252
|
+
readonly outright: "--label-red";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "--vk-label-red-edge";
|
|
255
|
+
readonly kind: "colour";
|
|
256
|
+
readonly outright: "--label-red-edge";
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "--vk-label-red-fill";
|
|
259
|
+
readonly kind: "colour";
|
|
260
|
+
readonly outright: "--label-red-fill";
|
|
261
|
+
}, {
|
|
262
|
+
readonly name: "--vk-label-red-soft";
|
|
263
|
+
readonly kind: "colour";
|
|
264
|
+
readonly outright: "--label-red-soft";
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "--vk-label-red-strong";
|
|
267
|
+
readonly kind: "colour";
|
|
268
|
+
readonly outright: "--label-red-strong";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "--vk-label-teal";
|
|
271
|
+
readonly kind: "colour";
|
|
272
|
+
readonly outright: "--label-teal";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "--vk-label-teal-edge";
|
|
275
|
+
readonly kind: "colour";
|
|
276
|
+
readonly outright: "--label-teal-edge";
|
|
277
|
+
}, {
|
|
278
|
+
readonly name: "--vk-label-teal-fill";
|
|
279
|
+
readonly kind: "colour";
|
|
280
|
+
readonly outright: "--label-teal-fill";
|
|
281
|
+
}, {
|
|
282
|
+
readonly name: "--vk-label-teal-soft";
|
|
283
|
+
readonly kind: "colour";
|
|
284
|
+
readonly outright: "--label-teal-soft";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "--vk-label-teal-strong";
|
|
287
|
+
readonly kind: "colour";
|
|
288
|
+
readonly outright: "--label-teal-strong";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "--vk-neutral";
|
|
291
|
+
readonly kind: "colour";
|
|
292
|
+
readonly outright: "--background-neutral";
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "--vk-neutral-hovered";
|
|
295
|
+
readonly kind: "colour";
|
|
296
|
+
readonly outright: "--background-neutral-hovered";
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "--vk-overlay";
|
|
299
|
+
readonly kind: "colour";
|
|
300
|
+
readonly outright: "--surface-overlay";
|
|
301
|
+
}, {
|
|
302
|
+
readonly name: "--vk-pink-700";
|
|
303
|
+
readonly kind: "colour";
|
|
304
|
+
readonly outright: "--pink-700";
|
|
305
|
+
}, {
|
|
306
|
+
readonly name: "--vk-purple-700";
|
|
307
|
+
readonly kind: "colour";
|
|
308
|
+
readonly outright: "--purple-700";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "--vk-raised";
|
|
311
|
+
readonly kind: "colour";
|
|
312
|
+
readonly outright: "--surface-raised";
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "--vk-red-700";
|
|
315
|
+
readonly kind: "colour";
|
|
316
|
+
readonly outright: "--red-700";
|
|
317
|
+
}, {
|
|
318
|
+
readonly name: "--vk-success";
|
|
319
|
+
readonly kind: "colour";
|
|
320
|
+
readonly outright: "--text-success";
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "--vk-success-bold";
|
|
323
|
+
readonly kind: "colour";
|
|
324
|
+
readonly outright: "--background-success-bold";
|
|
325
|
+
}, {
|
|
326
|
+
readonly name: "--vk-success-subtler";
|
|
327
|
+
readonly kind: "colour";
|
|
328
|
+
readonly outright: "--background-success-subtler";
|
|
329
|
+
}, {
|
|
330
|
+
readonly name: "--vk-success-subtlest";
|
|
331
|
+
readonly kind: "colour";
|
|
332
|
+
readonly outright: "--background-success-subtlest";
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "--vk-teal-700";
|
|
335
|
+
readonly kind: "colour";
|
|
336
|
+
readonly outright: "--teal-700";
|
|
337
|
+
}, {
|
|
338
|
+
readonly name: "--vk-warning";
|
|
339
|
+
readonly kind: "colour";
|
|
340
|
+
readonly outright: "--text-warning";
|
|
341
|
+
}, {
|
|
342
|
+
readonly name: "--vk-warning-bold";
|
|
343
|
+
readonly kind: "colour";
|
|
344
|
+
readonly outright: "--background-warning-bold";
|
|
345
|
+
}, {
|
|
346
|
+
readonly name: "--vk-warning-subtler";
|
|
347
|
+
readonly kind: "colour";
|
|
348
|
+
readonly outright: "--background-warning-subtler";
|
|
349
|
+
}, {
|
|
350
|
+
readonly name: "--vk-warning-subtlest";
|
|
351
|
+
readonly kind: "colour";
|
|
352
|
+
readonly outright: "--background-warning-subtlest";
|
|
353
|
+
}, {
|
|
354
|
+
readonly name: "--vk-border-width";
|
|
355
|
+
readonly kind: "size";
|
|
356
|
+
readonly outright: "--border-width";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "--vk-font-size-base";
|
|
359
|
+
readonly kind: "size";
|
|
360
|
+
readonly outright: "--text-base";
|
|
361
|
+
}, {
|
|
362
|
+
readonly name: "--vk-font-size-sm";
|
|
363
|
+
readonly kind: "size";
|
|
364
|
+
readonly outright: "--text-sm";
|
|
365
|
+
}, {
|
|
366
|
+
readonly name: "--vk-font-size-xs";
|
|
367
|
+
readonly kind: "size";
|
|
368
|
+
readonly outright: "--text-xs";
|
|
369
|
+
}, {
|
|
370
|
+
readonly name: "--vk-font-weight-bold";
|
|
371
|
+
readonly kind: "size";
|
|
372
|
+
readonly outright: "--font-weight-bold";
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "--vk-font-weight-medium";
|
|
375
|
+
readonly kind: "size";
|
|
376
|
+
readonly outright: "--font-weight-medium";
|
|
377
|
+
}, {
|
|
378
|
+
readonly name: "--vk-font-weight-normal";
|
|
379
|
+
readonly kind: "size";
|
|
380
|
+
readonly outright: "--font-weight-normal";
|
|
381
|
+
}, {
|
|
382
|
+
readonly name: "--vk-font-weight-semibold";
|
|
383
|
+
readonly kind: "size";
|
|
384
|
+
readonly outright: "--font-weight-semibold";
|
|
385
|
+
}, {
|
|
386
|
+
readonly name: "--vk-radius-full";
|
|
387
|
+
readonly kind: "size";
|
|
388
|
+
readonly outright: "--radius-full";
|
|
389
|
+
}, {
|
|
390
|
+
readonly name: "--vk-radius-sm";
|
|
391
|
+
readonly kind: "size";
|
|
392
|
+
readonly outright: "--radius-sm";
|
|
393
|
+
}, {
|
|
394
|
+
readonly name: "--vk-radius-xs";
|
|
395
|
+
readonly kind: "size";
|
|
396
|
+
readonly outright: "--radius-xs";
|
|
397
|
+
}, {
|
|
398
|
+
readonly name: "--vk-spacing";
|
|
399
|
+
readonly kind: "size";
|
|
400
|
+
readonly outright: "--spacing";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "--vk-tracking-wide";
|
|
403
|
+
readonly kind: "size";
|
|
404
|
+
readonly outright: "--tracking-wide";
|
|
405
|
+
}];
|
|
406
|
+
/** The prefixes of the Status's own machinery, set and read by it alone: not public. */
|
|
407
|
+
export declare const STATUS_PRIVATE: readonly ["--st-"];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
export const STATUS_TOKENS = [
|
|
2
|
+
{ name: "--vk-amber-700", kind: "colour", outright: "--amber-700" },
|
|
3
|
+
{ name: "--vk-blue-700", kind: "colour", outright: "--blue-700" },
|
|
4
|
+
{ name: "--vk-border", kind: "colour", outright: "--border" },
|
|
5
|
+
{ name: "--vk-border-accent", kind: "colour", outright: "--border-brand" },
|
|
6
|
+
{ name: "--vk-border-bold", kind: "colour", outright: "--border-bold" },
|
|
7
|
+
{ name: "--vk-border-danger", kind: "colour", outright: "--border-danger" },
|
|
8
|
+
{ name: "--vk-border-info", kind: "colour", outright: "--border-information" },
|
|
9
|
+
{ name: "--vk-border-success", kind: "colour", outright: "--border-success" },
|
|
10
|
+
{ name: "--vk-border-warning", kind: "colour", outright: "--border-warning" },
|
|
11
|
+
{ name: "--vk-brand", kind: "colour", outright: "--background-brand-bold" },
|
|
12
|
+
{ name: "--vk-brand-100", kind: "colour", outright: "--brand-100" },
|
|
13
|
+
{ name: "--vk-brand-200", kind: "colour", outright: "--brand-200" },
|
|
14
|
+
{ name: "--vk-brand-400", kind: "colour", outright: "--brand-400" },
|
|
15
|
+
{ name: "--vk-brand-500", kind: "colour", outright: "--brand-500" },
|
|
16
|
+
{ name: "--vk-brand-600", kind: "colour", outright: "--brand-600" },
|
|
17
|
+
{ name: "--vk-brand-700", kind: "colour", outright: "--brand-700" },
|
|
18
|
+
{ name: "--vk-brand-800", kind: "colour", outright: "--brand-800" },
|
|
19
|
+
{ name: "--vk-brand-1000", kind: "colour", outright: "--brand-1000" },
|
|
20
|
+
{ name: "--vk-brand-subtler", kind: "colour", outright: "--background-brand-subtler" },
|
|
21
|
+
{ name: "--vk-brand-subtlest", kind: "colour", outright: "--background-brand-subtlest" },
|
|
22
|
+
{ name: "--vk-danger", kind: "colour", outright: "--text-danger" },
|
|
23
|
+
{ name: "--vk-danger-bold", kind: "colour", outright: "--background-danger-bold" },
|
|
24
|
+
{ name: "--vk-danger-subtler", kind: "colour", outright: "--background-danger-subtler" },
|
|
25
|
+
{ name: "--vk-danger-subtlest", kind: "colour", outright: "--background-danger-subtlest" },
|
|
26
|
+
{ name: "--vk-fg", kind: "colour", outright: "--text" },
|
|
27
|
+
{ name: "--vk-fg-accent", kind: "colour", outright: "--text-brand" },
|
|
28
|
+
{ name: "--vk-fg-inverse", kind: "colour", outright: "--text-inverse" },
|
|
29
|
+
{ name: "--vk-fg-on-brand", kind: "colour", outright: "--text-brand-inverse" },
|
|
30
|
+
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
31
|
+
{ name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
|
|
32
|
+
{ name: "--vk-fg-warning-inverse", kind: "colour", outright: "--text-warning-inverse" },
|
|
33
|
+
{ name: "--vk-green-700", kind: "colour", outright: "--green-700" },
|
|
34
|
+
{ name: "--vk-ground", kind: "colour", outright: "--surface" },
|
|
35
|
+
{ name: "--vk-info", kind: "colour", outright: "--text-information" },
|
|
36
|
+
{ name: "--vk-info-bold", kind: "colour", outright: "--background-information-bold" },
|
|
37
|
+
{ name: "--vk-info-subtler", kind: "colour", outright: "--background-information-subtler" },
|
|
38
|
+
{ name: "--vk-info-subtlest", kind: "colour", outright: "--background-information-subtlest" },
|
|
39
|
+
{ name: "--vk-label-amber", kind: "colour", outright: "--label-amber" },
|
|
40
|
+
{ name: "--vk-label-amber-edge", kind: "colour", outright: "--label-amber-edge" },
|
|
41
|
+
{ name: "--vk-label-amber-fill", kind: "colour", outright: "--label-amber-fill" },
|
|
42
|
+
{ name: "--vk-label-amber-soft", kind: "colour", outright: "--label-amber-soft" },
|
|
43
|
+
{ name: "--vk-label-amber-strong", kind: "colour", outright: "--label-amber-strong" },
|
|
44
|
+
{ name: "--vk-label-blue", kind: "colour", outright: "--label-blue" },
|
|
45
|
+
{ name: "--vk-label-blue-edge", kind: "colour", outright: "--label-blue-edge" },
|
|
46
|
+
{ name: "--vk-label-blue-fill", kind: "colour", outright: "--label-blue-fill" },
|
|
47
|
+
{ name: "--vk-label-blue-soft", kind: "colour", outright: "--label-blue-soft" },
|
|
48
|
+
{ name: "--vk-label-blue-strong", kind: "colour", outright: "--label-blue-strong" },
|
|
49
|
+
{ name: "--vk-label-green", kind: "colour", outright: "--label-green" },
|
|
50
|
+
{ name: "--vk-label-green-edge", kind: "colour", outright: "--label-green-edge" },
|
|
51
|
+
{ name: "--vk-label-green-fill", kind: "colour", outright: "--label-green-fill" },
|
|
52
|
+
{ name: "--vk-label-green-soft", kind: "colour", outright: "--label-green-soft" },
|
|
53
|
+
{ name: "--vk-label-green-strong", kind: "colour", outright: "--label-green-strong" },
|
|
54
|
+
{ name: "--vk-label-pink", kind: "colour", outright: "--label-pink" },
|
|
55
|
+
{ name: "--vk-label-pink-edge", kind: "colour", outright: "--label-pink-edge" },
|
|
56
|
+
{ name: "--vk-label-pink-fill", kind: "colour", outright: "--label-pink-fill" },
|
|
57
|
+
{ name: "--vk-label-pink-soft", kind: "colour", outright: "--label-pink-soft" },
|
|
58
|
+
{ name: "--vk-label-pink-strong", kind: "colour", outright: "--label-pink-strong" },
|
|
59
|
+
{ name: "--vk-label-purple", kind: "colour", outright: "--label-purple" },
|
|
60
|
+
{ name: "--vk-label-purple-edge", kind: "colour", outright: "--label-purple-edge" },
|
|
61
|
+
{ name: "--vk-label-purple-fill", kind: "colour", outright: "--label-purple-fill" },
|
|
62
|
+
{ name: "--vk-label-purple-soft", kind: "colour", outright: "--label-purple-soft" },
|
|
63
|
+
{ name: "--vk-label-purple-strong", kind: "colour", outright: "--label-purple-strong" },
|
|
64
|
+
{ name: "--vk-label-red", kind: "colour", outright: "--label-red" },
|
|
65
|
+
{ name: "--vk-label-red-edge", kind: "colour", outright: "--label-red-edge" },
|
|
66
|
+
{ name: "--vk-label-red-fill", kind: "colour", outright: "--label-red-fill" },
|
|
67
|
+
{ name: "--vk-label-red-soft", kind: "colour", outright: "--label-red-soft" },
|
|
68
|
+
{ name: "--vk-label-red-strong", kind: "colour", outright: "--label-red-strong" },
|
|
69
|
+
{ name: "--vk-label-teal", kind: "colour", outright: "--label-teal" },
|
|
70
|
+
{ name: "--vk-label-teal-edge", kind: "colour", outright: "--label-teal-edge" },
|
|
71
|
+
{ name: "--vk-label-teal-fill", kind: "colour", outright: "--label-teal-fill" },
|
|
72
|
+
{ name: "--vk-label-teal-soft", kind: "colour", outright: "--label-teal-soft" },
|
|
73
|
+
{ name: "--vk-label-teal-strong", kind: "colour", outright: "--label-teal-strong" },
|
|
74
|
+
{ name: "--vk-neutral", kind: "colour", outright: "--background-neutral" },
|
|
75
|
+
{ name: "--vk-neutral-hovered", kind: "colour", outright: "--background-neutral-hovered" },
|
|
76
|
+
{ name: "--vk-overlay", kind: "colour", outright: "--surface-overlay" },
|
|
77
|
+
{ name: "--vk-pink-700", kind: "colour", outright: "--pink-700" },
|
|
78
|
+
{ name: "--vk-purple-700", kind: "colour", outright: "--purple-700" },
|
|
79
|
+
{ name: "--vk-raised", kind: "colour", outright: "--surface-raised" },
|
|
80
|
+
{ name: "--vk-red-700", kind: "colour", outright: "--red-700" },
|
|
81
|
+
{ name: "--vk-success", kind: "colour", outright: "--text-success" },
|
|
82
|
+
{ name: "--vk-success-bold", kind: "colour", outright: "--background-success-bold" },
|
|
83
|
+
{ name: "--vk-success-subtler", kind: "colour", outright: "--background-success-subtler" },
|
|
84
|
+
{ name: "--vk-success-subtlest", kind: "colour", outright: "--background-success-subtlest" },
|
|
85
|
+
{ name: "--vk-teal-700", kind: "colour", outright: "--teal-700" },
|
|
86
|
+
{ name: "--vk-warning", kind: "colour", outright: "--text-warning" },
|
|
87
|
+
{ name: "--vk-warning-bold", kind: "colour", outright: "--background-warning-bold" },
|
|
88
|
+
{ name: "--vk-warning-subtler", kind: "colour", outright: "--background-warning-subtler" },
|
|
89
|
+
{ name: "--vk-warning-subtlest", kind: "colour", outright: "--background-warning-subtlest" },
|
|
90
|
+
{ name: "--vk-border-width", kind: "size", outright: "--border-width" },
|
|
91
|
+
{ name: "--vk-font-size-base", kind: "size", outright: "--text-base" },
|
|
92
|
+
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
93
|
+
{ name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
|
|
94
|
+
{ name: "--vk-font-weight-bold", kind: "size", outright: "--font-weight-bold" },
|
|
95
|
+
{ name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
|
|
96
|
+
{ name: "--vk-font-weight-normal", kind: "size", outright: "--font-weight-normal" },
|
|
97
|
+
{ name: "--vk-font-weight-semibold", kind: "size", outright: "--font-weight-semibold" },
|
|
98
|
+
{ name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
|
|
99
|
+
{ name: "--vk-radius-sm", kind: "size", outright: "--radius-sm" },
|
|
100
|
+
{ name: "--vk-radius-xs", kind: "size", outright: "--radius-xs" },
|
|
101
|
+
{ name: "--vk-spacing", kind: "size", outright: "--spacing" },
|
|
102
|
+
{ name: "--vk-tracking-wide", kind: "size", outright: "--tracking-wide" },
|
|
103
|
+
];
|
|
104
|
+
export const STATUS_PRIVATE = ["--st-"];
|