@axiapps/axi-design 1.11.0 → 1.12.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/dist/axi.css +12 -3
- package/dist/themes/glass.css +5 -1
- package/docs/RULES.md +18 -9
- package/package.json +1 -1
- package/src/primitives.css +1 -1
- package/src/shells.css +2 -2
- package/src/tokens.css +9 -0
package/dist/axi.css
CHANGED
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
--axi-surface: #222731; /* a panel raised off the page */
|
|
20
20
|
--axi-surface-raised: #2b313d; /* a chip or popover raised off a panel */
|
|
21
21
|
--axi-ink-line: #0c0e12; /* the outline every raised element is drawn with */
|
|
22
|
+
/* The tone a shape is made of when it is made of the line ink rather than
|
|
23
|
+
outlined in it - the tooltip, the titlebar strip, the switch's slug. Holds
|
|
24
|
+
--axi-ink-line today, which is why it reads as the same decision and is
|
|
25
|
+
not: one is the colour a shape's EDGE is drawn in, the other the colour a
|
|
26
|
+
shape is FILLED with. They only have to diverge once - a theme that
|
|
27
|
+
outlines in a light colour so its page can go near-black - for the
|
|
28
|
+
conflated spelling to turn the tooltip into a pale box. Same split as
|
|
29
|
+
--axi-ink-on-fill below, on the other side of the same token. */
|
|
30
|
+
--axi-ground-deep: var(--axi-ink-line);
|
|
22
31
|
--axi-rule: #3a4250; /* internal rules, inside an outlined panel */
|
|
23
32
|
--axi-text: #f4f6f9;
|
|
24
33
|
--axi-text-dim: #a7b0be;
|
|
@@ -342,7 +351,7 @@ a { color: inherit; }
|
|
|
342
351
|
top: 2px; bottom: 2px; left: 2px;
|
|
343
352
|
width: var(--axi-switch-knob, 16px);
|
|
344
353
|
border-radius: var(--axi-radius-sm);
|
|
345
|
-
background: var(--axi-
|
|
354
|
+
background: var(--axi-ground-deep);
|
|
346
355
|
transition: transform .1s;
|
|
347
356
|
}
|
|
348
357
|
/* The travel is the track's inner width less the slug and its two insets.
|
|
@@ -922,7 +931,7 @@ textarea.axi-input {
|
|
|
922
931
|
argument with one. */
|
|
923
932
|
z-index: 70;
|
|
924
933
|
padding: 5px 8px;
|
|
925
|
-
background: var(--axi-
|
|
934
|
+
background: var(--axi-ground-deep);
|
|
926
935
|
color: var(--axi-text);
|
|
927
936
|
border: var(--axi-border-hairline) solid var(--axi-rule);
|
|
928
937
|
border-radius: var(--axi-radius-sm);
|
|
@@ -1071,7 +1080,7 @@ textarea.axi-input {
|
|
|
1071
1080
|
flex: none;
|
|
1072
1081
|
display: flex; align-items: center; gap: 12px;
|
|
1073
1082
|
height: 38px; padding-left: 14px;
|
|
1074
|
-
background: var(--axi-
|
|
1083
|
+
background: var(--axi-ground-deep);
|
|
1075
1084
|
border-bottom: var(--axi-border-control) solid var(--axi-ink-line);
|
|
1076
1085
|
font: var(--axi-t-micro);
|
|
1077
1086
|
letter-spacing: var(--axi-ls-micro);
|
package/dist/themes/glass.css
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
Edit the files in src/ and run `npm run build`; do not edit this file. */
|
|
3
3
|
|
|
4
4
|
[data-axi-theme="glass"] {
|
|
5
|
-
--axi-ground: #
|
|
5
|
+
--axi-ground: #0a0c10;
|
|
6
6
|
--axi-surface: rgba(255, 255, 255, .09);
|
|
7
7
|
--axi-surface-raised: rgba(255, 255, 255, .15);
|
|
8
|
+
--axi-ink-line: #242b38;
|
|
9
|
+
--axi-ground-deep: #0c0e12;
|
|
10
|
+
--axi-accent-ink: #0c0e12;
|
|
11
|
+
--axi-ink-on-fill: #0c0e12;
|
|
8
12
|
--axi-rule: rgba(255, 255, 255, .17);
|
|
9
13
|
--axi-scrim: rgba(6, 7, 9, .55);
|
|
10
14
|
--axi-surface-filter: blur(14px) saturate(140%);
|
package/docs/RULES.md
CHANGED
|
@@ -62,11 +62,20 @@ stops looking raised.
|
|
|
62
62
|
|
|
63
63
|
There is exactly one element drawn in the line ink rather than on a surface,
|
|
64
64
|
and it is named here so it stays an exception rather than becoming a habit:
|
|
65
|
-
`.axi-tooltip` is filled with
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
`.axi-tooltip` is filled with the line ink itself. A thing cannot be outlined
|
|
66
|
+
in the colour it is already made of, and a block in that same ink under a box
|
|
67
|
+
already made of it reads as the box being thicker rather than raised — so the
|
|
68
|
+
tooltip takes a hairline in `--axi-rule` to hold its edge against the page, and
|
|
69
|
+
carries no block. Nothing else may use that reasoning.
|
|
70
|
+
|
|
71
|
+
It spells that fill `--axi-ground-deep`, not `--axi-ink-line`, and so do the
|
|
72
|
+
two smaller shapes made of the same tone — the titlebar strip and the switch's
|
|
73
|
+
slug. The token holds the line ink today and is a different decision from it:
|
|
74
|
+
one is the colour a shape's edge is drawn in, the other the colour a shape is
|
|
75
|
+
filled with. A theme that outlines in a light colour so its page can go
|
|
76
|
+
near-black relights the first and leaves the second, and the tooltip stays a
|
|
77
|
+
dark box with light words on it instead of becoming a pale box with pale ones.
|
|
78
|
+
Anything else that comes to be made of this tone reads the same token.
|
|
70
79
|
|
|
71
80
|
**What is mechanically enforced.** `tests/tokens.test.mjs` enforces both
|
|
72
81
|
columns:
|
|
@@ -180,7 +189,7 @@ element becomes the containing block for any `position: fixed` descendant.
|
|
|
180
189
|
An overlay positioned in viewport coordinates — `.axi-tooltip` is the one
|
|
181
190
|
this language ships — must therefore live as a child of `<body>`, never
|
|
182
191
|
inside the component it annotates, or the first hover lift re-anchors it.
|
|
183
|
-
The class draws only the box (
|
|
192
|
+
The class draws only the box (`--axi-ground-deep` ground, hairline rule border, micro
|
|
184
193
|
type); measuring the trigger and setting `left`/`top` is the consumer's
|
|
185
194
|
half, and `gallery.js` is the reference wiring.
|
|
186
195
|
|
|
@@ -213,7 +222,7 @@ a third step in everything but name — and would put a thin frame around a
|
|
|
213
222
|
heavier bar.
|
|
214
223
|
|
|
215
224
|
A switch is the same rule in a slot. Its track fills to assert the setting's
|
|
216
|
-
status and is empty otherwise; the slug that moves is `--axi-
|
|
225
|
+
status and is empty otherwise; the slug that moves is `--axi-ground-deep` in both
|
|
217
226
|
states, so on and off differ in what colour is *in* the slot and never in how
|
|
218
227
|
bright the moving part is. It carries no block — a block belongs to things you
|
|
219
228
|
press, and a switch is a slot with something sitting in it — but it keeps a
|
|
@@ -347,8 +356,8 @@ Three layers, in `src/tokens.css` — the only file permitted to contain a colou
|
|
|
347
356
|
literal.
|
|
348
357
|
|
|
349
358
|
- **Surface & text** — `--axi-ground`, `--axi-surface`, `--axi-surface-raised`,
|
|
350
|
-
`--axi-ink-line`, `--axi-
|
|
351
|
-
`--axi-text-faint`, `--axi-scrim`
|
|
359
|
+
`--axi-ink-line`, `--axi-ground-deep`, `--axi-rule`, `--axi-text`,
|
|
360
|
+
`--axi-text-dim`, `--axi-text-faint`, `--axi-scrim`
|
|
352
361
|
- **Accent & status** — `--axi-accent`, `--axi-accent-ink`, `--axi-meta`,
|
|
353
362
|
`--axi-ok`, `--axi-warn`, `--axi-danger`. **This is the per-app override
|
|
354
363
|
surface.** An app that sets `--axi-accent` and nothing else is correctly
|
package/package.json
CHANGED
package/src/primitives.css
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
top: 2px; bottom: 2px; left: 2px;
|
|
150
150
|
width: var(--axi-switch-knob, 16px);
|
|
151
151
|
border-radius: var(--axi-radius-sm);
|
|
152
|
-
background: var(--axi-
|
|
152
|
+
background: var(--axi-ground-deep);
|
|
153
153
|
transition: transform .1s;
|
|
154
154
|
}
|
|
155
155
|
/* The travel is the track's inner width less the slug and its two insets.
|
package/src/shells.css
CHANGED
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
argument with one. */
|
|
141
141
|
z-index: 70;
|
|
142
142
|
padding: 5px 8px;
|
|
143
|
-
background: var(--axi-
|
|
143
|
+
background: var(--axi-ground-deep);
|
|
144
144
|
color: var(--axi-text);
|
|
145
145
|
border: var(--axi-border-hairline) solid var(--axi-rule);
|
|
146
146
|
border-radius: var(--axi-radius-sm);
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
flex: none;
|
|
290
290
|
display: flex; align-items: center; gap: 12px;
|
|
291
291
|
height: 38px; padding-left: 14px;
|
|
292
|
-
background: var(--axi-
|
|
292
|
+
background: var(--axi-ground-deep);
|
|
293
293
|
border-bottom: var(--axi-border-control) solid var(--axi-ink-line);
|
|
294
294
|
font: var(--axi-t-micro);
|
|
295
295
|
letter-spacing: var(--axi-ls-micro);
|
package/src/tokens.css
CHANGED
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
--axi-surface: #222731; /* a panel raised off the page */
|
|
16
16
|
--axi-surface-raised: #2b313d; /* a chip or popover raised off a panel */
|
|
17
17
|
--axi-ink-line: #0c0e12; /* the outline every raised element is drawn with */
|
|
18
|
+
/* The tone a shape is made of when it is made of the line ink rather than
|
|
19
|
+
outlined in it - the tooltip, the titlebar strip, the switch's slug. Holds
|
|
20
|
+
--axi-ink-line today, which is why it reads as the same decision and is
|
|
21
|
+
not: one is the colour a shape's EDGE is drawn in, the other the colour a
|
|
22
|
+
shape is FILLED with. They only have to diverge once - a theme that
|
|
23
|
+
outlines in a light colour so its page can go near-black - for the
|
|
24
|
+
conflated spelling to turn the tooltip into a pale box. Same split as
|
|
25
|
+
--axi-ink-on-fill below, on the other side of the same token. */
|
|
26
|
+
--axi-ground-deep: var(--axi-ink-line);
|
|
18
27
|
--axi-rule: #3a4250; /* internal rules, inside an outlined panel */
|
|
19
28
|
--axi-text: #f4f6f9;
|
|
20
29
|
--axi-text-dim: #a7b0be;
|