@axiapps/axi-design 1.23.1 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/axi.css +62 -10
- package/package.json +1 -1
- package/src/primitives.css +3 -1
- package/src/shells.css +50 -6
- package/src/tokens.css +9 -3
package/README.md
CHANGED
|
@@ -142,6 +142,7 @@ not "what does the system look like". Everything else is
|
|
|
142
142
|
| `--axi-well-radius` | an `.axi-well`'s corner radius, for a well used at reading scale rather than page scale | `var(--axi-radius)` | `<div class="axi-well" style="--axi-well-radius: var(--axi-radius-sm)">` |
|
|
143
143
|
| `--axi-rail-w` | an `.axi-rail`'s width, for labels longer than the default holds | `208px` | `<aside class="axi-rail" style="--axi-rail-w: 260px">` |
|
|
144
144
|
| `--axi-rail-pad` | the padding inside an `.axi-rail` | `10px` | `<aside class="axi-rail" style="--axi-rail-pad: 6px">` |
|
|
145
|
+
| `--axi-toolbar-pad` | the padding inside an `.axi-toolbar` | `14px` | `<div class="axi-toolbar" style="--axi-toolbar-pad: 4px 7px">` |
|
|
145
146
|
| `--axi-avatar-size` | the size of an `.axi-avatar` square | `40px` | `<span class="axi-avatar" style="--axi-avatar-size: 28px">MS</span>` |
|
|
146
147
|
| `--axi-modal-width` | the maximum width of an `.axi-modal`, before the viewport clamp | `560px` | `<dialog class="axi-modal" style="--axi-modal-width: 760px">` |
|
|
147
148
|
| `--axi-card-strip` | the colour of `.axi-card--strip`'s top strip | `var(--axi-accent)` | `<a class="axi-card axi-card--strip" style="--axi-card-strip: var(--axi-ok)">` |
|
package/dist/axi.css
CHANGED
|
@@ -31,9 +31,15 @@
|
|
|
31
31
|
wedge of colour. The ground stays a colour. This is the page's light. */
|
|
32
32
|
--axi-ground-image: none;
|
|
33
33
|
--axi-surface: #222731; /* a panel raised off the page */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
/* A chip, a hover, a table head - something raised off a panel that is part
|
|
35
|
+
of the page rather than over it. It said "a chip or popover" until the
|
|
36
|
+
popovers moved to the float: what they were borrowing was opacity, which
|
|
37
|
+
this token cannot promise under a translucent theme. */
|
|
38
|
+
--axi-surface-raised: #2b313d;
|
|
39
|
+
/* The fill for a surface that FLOATS over content which scrolls behind it:
|
|
40
|
+
the command palette, the menu and picker popovers, the modal, the drawer,
|
|
41
|
+
the toast, and any .axi-panel--float, .axi-rail--float or
|
|
42
|
+
.axi-toolbar--float a consumer declares. Holds --axi-surface, because for
|
|
37
43
|
a theme whose panels are opaque a floating panel is just a panel and there
|
|
38
44
|
is nothing to decide.
|
|
39
45
|
|
|
@@ -724,7 +730,9 @@ button.axi-panel--tile:hover,
|
|
|
724
730
|
min-width: 100%;
|
|
725
731
|
max-height: 340px; overflow-y: auto;
|
|
726
732
|
padding: 6px;
|
|
727
|
-
|
|
733
|
+
/* Float, for the reason .axi-menu__pop is - this is the same object with a
|
|
734
|
+
selected row. */
|
|
735
|
+
background: var(--axi-surface-float);
|
|
728
736
|
backdrop-filter: var(--axi-surface-filter);
|
|
729
737
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
730
738
|
border-radius: var(--axi-radius);
|
|
@@ -1140,7 +1148,13 @@ textarea.axi-input {
|
|
|
1140
1148
|
.axi-rail:not(.axi-rail--flush) { box-shadow: var(--axi-shadow-panel); }
|
|
1141
1149
|
.axi-rail--flush {
|
|
1142
1150
|
border: 0;
|
|
1143
|
-
|
|
1151
|
+
/* Logical, not physical: the border faces the content, and which physical
|
|
1152
|
+
side that is depends on the writing direction. `border-right` was correct
|
|
1153
|
+
only for an LTR rail pinned to the leading edge - under RTL it drew the
|
|
1154
|
+
seam on the outside, facing the viewport. Note that this still assumes the
|
|
1155
|
+
LEADING edge; a rail pinned to the trailing edge of its content needs the
|
|
1156
|
+
other border and has no way to ask for it yet. */
|
|
1157
|
+
border-inline-end: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
1144
1158
|
border-radius: 0;
|
|
1145
1159
|
}
|
|
1146
1160
|
/* A rail the page scrolls behind, rather than one the page sits beside.
|
|
@@ -1236,13 +1250,34 @@ textarea.axi-input {
|
|
|
1236
1250
|
/* ---------- toolbar ---------- */
|
|
1237
1251
|
.axi-toolbar {
|
|
1238
1252
|
display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
|
|
1239
|
-
|
|
1253
|
+
/* Own knob, like .axi-panel's and .axi-rail's. The toolbar was the one
|
|
1254
|
+
container in this language whose padding was a literal, and 14px is a
|
|
1255
|
+
figure for a strip above a list - a transport bar over a video or a map
|
|
1256
|
+
is the same object at a third of the height, and had no way to say so
|
|
1257
|
+
without writing its own padding and losing the component. */
|
|
1258
|
+
padding: var(--axi-toolbar-pad, 14px);
|
|
1240
1259
|
background: var(--axi-surface);
|
|
1241
1260
|
backdrop-filter: var(--axi-surface-filter);
|
|
1242
1261
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
1243
1262
|
border-radius: var(--axi-radius);
|
|
1244
1263
|
box-shadow: var(--axi-shadow-panel);
|
|
1245
1264
|
}
|
|
1265
|
+
/* A toolbar that floats over moving content rather than sitting above it: the
|
|
1266
|
+
controls pinned over a map, a chart, a replay. Says exactly what
|
|
1267
|
+
.axi-panel--float and .axi-rail--float say, and for the same reason -
|
|
1268
|
+
--axi-surface-float's own note lists the surfaces that need it and the
|
|
1269
|
+
toolbar was missing from that list, which is the whole of the bug. A strip
|
|
1270
|
+
above a list is not floating and keeps the plain surface; a strip over a
|
|
1271
|
+
map is, and a translucent one shows the map through its own labels on any
|
|
1272
|
+
platform where the blur is unavailable. */
|
|
1273
|
+
.axi-toolbar--float { background: var(--axi-surface-float); }
|
|
1274
|
+
/* A toolbar that must not become two rows. The wrap is right for a strip
|
|
1275
|
+
above a list, where losing a filter off the edge is worse than a second
|
|
1276
|
+
line - and wrong for a bar whose height other things are positioned
|
|
1277
|
+
against, because wrapping moves everything around it. Stated as its own
|
|
1278
|
+
modifier rather than left to each consumer's inline style, so the reason
|
|
1279
|
+
lives here instead of in a comment in somebody's component. */
|
|
1280
|
+
.axi-toolbar--nowrap { flex-wrap: nowrap; }
|
|
1246
1281
|
|
|
1247
1282
|
/* ---------- menu popover ---------- */
|
|
1248
1283
|
/* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
|
|
@@ -1255,7 +1290,13 @@ textarea.axi-input {
|
|
|
1255
1290
|
position: absolute; top: calc(100% + 9px); left: 0; z-index: 41;
|
|
1256
1291
|
width: var(--axi-menu-width, 310px);
|
|
1257
1292
|
max-height: 340px; overflow-y: auto; padding: 8px;
|
|
1258
|
-
|
|
1293
|
+
/* The other component --axi-surface-float names. It read --axi-surface-raised
|
|
1294
|
+
because that token's comment says "a chip or popover" and, before the float
|
|
1295
|
+
existed, raised was the only word for "higher than the panel". Height is
|
|
1296
|
+
carried by the border and the block, though - the modal is the highest
|
|
1297
|
+
surface on screen and sits on the plain fill - so what raised was actually
|
|
1298
|
+
lending here was opacity it cannot promise under a translucent theme. */
|
|
1299
|
+
background: var(--axi-surface-float);
|
|
1259
1300
|
backdrop-filter: var(--axi-surface-filter);
|
|
1260
1301
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
1261
1302
|
border-radius: var(--axi-radius);
|
|
@@ -1519,7 +1560,9 @@ textarea.axi-input {
|
|
|
1519
1560
|
position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
|
|
1520
1561
|
width: min(var(--axi-drawer-width, 560px), 100vw);
|
|
1521
1562
|
display: flex; flex-direction: column;
|
|
1522
|
-
|
|
1563
|
+
/* A drawer is pinned to three edges with the page live beside it, and its
|
|
1564
|
+
own body scrolls. Float on both counts. */
|
|
1565
|
+
background: var(--axi-surface-float);
|
|
1523
1566
|
backdrop-filter: var(--axi-surface-filter);
|
|
1524
1567
|
border-left: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
1525
1568
|
}
|
|
@@ -1708,7 +1751,12 @@ textarea.axi-input {
|
|
|
1708
1751
|
.axi-modal {
|
|
1709
1752
|
padding: 0;
|
|
1710
1753
|
max-width: min(var(--axi-modal-width, 560px), calc(100vw - 32px));
|
|
1711
|
-
|
|
1754
|
+
/* The float surface, not the plain one. --axi-surface-float's own note names
|
|
1755
|
+
this component as one of its three consumers and it was only ever wired
|
|
1756
|
+
into the palette; a modal is the strongest case the token has, because the
|
|
1757
|
+
whole app is behind it and a scrim does not make a .42-alpha pane legible
|
|
1758
|
+
on a platform where the blur is switched off. */
|
|
1759
|
+
background: var(--axi-surface-float);
|
|
1712
1760
|
backdrop-filter: var(--axi-surface-filter);
|
|
1713
1761
|
color: var(--axi-text);
|
|
1714
1762
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
@@ -1804,7 +1852,11 @@ textarea.axi-input {
|
|
|
1804
1852
|
pointer-events: auto;
|
|
1805
1853
|
display: flex; align-items: center; gap: 12px;
|
|
1806
1854
|
padding: 12px 15px;
|
|
1807
|
-
|
|
1855
|
+
/* Float at the control weight. A toast is the one floating thing the reader
|
|
1856
|
+
did not open and cannot hold still: whatever is under it is mid-scroll by
|
|
1857
|
+
definition, which is the float's case exactly, while the border and the
|
|
1858
|
+
block stay at the control step for the reason above. */
|
|
1859
|
+
background: var(--axi-surface-float);
|
|
1808
1860
|
backdrop-filter: var(--axi-surface-filter);
|
|
1809
1861
|
border: var(--axi-border-control) solid var(--axi-ink-line);
|
|
1810
1862
|
border-radius: var(--axi-radius-sm);
|
package/package.json
CHANGED
package/src/primitives.css
CHANGED
|
@@ -458,7 +458,9 @@ button.axi-panel--tile:hover,
|
|
|
458
458
|
min-width: 100%;
|
|
459
459
|
max-height: 340px; overflow-y: auto;
|
|
460
460
|
padding: 6px;
|
|
461
|
-
|
|
461
|
+
/* Float, for the reason .axi-menu__pop is - this is the same object with a
|
|
462
|
+
selected row. */
|
|
463
|
+
background: var(--axi-surface-float);
|
|
462
464
|
backdrop-filter: var(--axi-surface-filter);
|
|
463
465
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
464
466
|
border-radius: var(--axi-radius);
|
package/src/shells.css
CHANGED
|
@@ -178,7 +178,13 @@
|
|
|
178
178
|
.axi-rail:not(.axi-rail--flush) { box-shadow: var(--axi-shadow-panel); }
|
|
179
179
|
.axi-rail--flush {
|
|
180
180
|
border: 0;
|
|
181
|
-
|
|
181
|
+
/* Logical, not physical: the border faces the content, and which physical
|
|
182
|
+
side that is depends on the writing direction. `border-right` was correct
|
|
183
|
+
only for an LTR rail pinned to the leading edge - under RTL it drew the
|
|
184
|
+
seam on the outside, facing the viewport. Note that this still assumes the
|
|
185
|
+
LEADING edge; a rail pinned to the trailing edge of its content needs the
|
|
186
|
+
other border and has no way to ask for it yet. */
|
|
187
|
+
border-inline-end: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
182
188
|
border-radius: 0;
|
|
183
189
|
}
|
|
184
190
|
/* A rail the page scrolls behind, rather than one the page sits beside.
|
|
@@ -274,13 +280,34 @@
|
|
|
274
280
|
/* ---------- toolbar ---------- */
|
|
275
281
|
.axi-toolbar {
|
|
276
282
|
display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
|
|
277
|
-
|
|
283
|
+
/* Own knob, like .axi-panel's and .axi-rail's. The toolbar was the one
|
|
284
|
+
container in this language whose padding was a literal, and 14px is a
|
|
285
|
+
figure for a strip above a list - a transport bar over a video or a map
|
|
286
|
+
is the same object at a third of the height, and had no way to say so
|
|
287
|
+
without writing its own padding and losing the component. */
|
|
288
|
+
padding: var(--axi-toolbar-pad, 14px);
|
|
278
289
|
background: var(--axi-surface);
|
|
279
290
|
backdrop-filter: var(--axi-surface-filter);
|
|
280
291
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
281
292
|
border-radius: var(--axi-radius);
|
|
282
293
|
box-shadow: var(--axi-shadow-panel);
|
|
283
294
|
}
|
|
295
|
+
/* A toolbar that floats over moving content rather than sitting above it: the
|
|
296
|
+
controls pinned over a map, a chart, a replay. Says exactly what
|
|
297
|
+
.axi-panel--float and .axi-rail--float say, and for the same reason -
|
|
298
|
+
--axi-surface-float's own note lists the surfaces that need it and the
|
|
299
|
+
toolbar was missing from that list, which is the whole of the bug. A strip
|
|
300
|
+
above a list is not floating and keeps the plain surface; a strip over a
|
|
301
|
+
map is, and a translucent one shows the map through its own labels on any
|
|
302
|
+
platform where the blur is unavailable. */
|
|
303
|
+
.axi-toolbar--float { background: var(--axi-surface-float); }
|
|
304
|
+
/* A toolbar that must not become two rows. The wrap is right for a strip
|
|
305
|
+
above a list, where losing a filter off the edge is worse than a second
|
|
306
|
+
line - and wrong for a bar whose height other things are positioned
|
|
307
|
+
against, because wrapping moves everything around it. Stated as its own
|
|
308
|
+
modifier rather than left to each consumer's inline style, so the reason
|
|
309
|
+
lives here instead of in a comment in somebody's component. */
|
|
310
|
+
.axi-toolbar--nowrap { flex-wrap: nowrap; }
|
|
284
311
|
|
|
285
312
|
/* ---------- menu popover ---------- */
|
|
286
313
|
/* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
|
|
@@ -293,7 +320,13 @@
|
|
|
293
320
|
position: absolute; top: calc(100% + 9px); left: 0; z-index: 41;
|
|
294
321
|
width: var(--axi-menu-width, 310px);
|
|
295
322
|
max-height: 340px; overflow-y: auto; padding: 8px;
|
|
296
|
-
|
|
323
|
+
/* The other component --axi-surface-float names. It read --axi-surface-raised
|
|
324
|
+
because that token's comment says "a chip or popover" and, before the float
|
|
325
|
+
existed, raised was the only word for "higher than the panel". Height is
|
|
326
|
+
carried by the border and the block, though - the modal is the highest
|
|
327
|
+
surface on screen and sits on the plain fill - so what raised was actually
|
|
328
|
+
lending here was opacity it cannot promise under a translucent theme. */
|
|
329
|
+
background: var(--axi-surface-float);
|
|
297
330
|
backdrop-filter: var(--axi-surface-filter);
|
|
298
331
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
299
332
|
border-radius: var(--axi-radius);
|
|
@@ -557,7 +590,9 @@
|
|
|
557
590
|
position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
|
|
558
591
|
width: min(var(--axi-drawer-width, 560px), 100vw);
|
|
559
592
|
display: flex; flex-direction: column;
|
|
560
|
-
|
|
593
|
+
/* A drawer is pinned to three edges with the page live beside it, and its
|
|
594
|
+
own body scrolls. Float on both counts. */
|
|
595
|
+
background: var(--axi-surface-float);
|
|
561
596
|
backdrop-filter: var(--axi-surface-filter);
|
|
562
597
|
border-left: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
563
598
|
}
|
|
@@ -746,7 +781,12 @@
|
|
|
746
781
|
.axi-modal {
|
|
747
782
|
padding: 0;
|
|
748
783
|
max-width: min(var(--axi-modal-width, 560px), calc(100vw - 32px));
|
|
749
|
-
|
|
784
|
+
/* The float surface, not the plain one. --axi-surface-float's own note names
|
|
785
|
+
this component as one of its three consumers and it was only ever wired
|
|
786
|
+
into the palette; a modal is the strongest case the token has, because the
|
|
787
|
+
whole app is behind it and a scrim does not make a .42-alpha pane legible
|
|
788
|
+
on a platform where the blur is switched off. */
|
|
789
|
+
background: var(--axi-surface-float);
|
|
750
790
|
backdrop-filter: var(--axi-surface-filter);
|
|
751
791
|
color: var(--axi-text);
|
|
752
792
|
border: var(--axi-border-panel) solid var(--axi-ink-line);
|
|
@@ -842,7 +882,11 @@
|
|
|
842
882
|
pointer-events: auto;
|
|
843
883
|
display: flex; align-items: center; gap: 12px;
|
|
844
884
|
padding: 12px 15px;
|
|
845
|
-
|
|
885
|
+
/* Float at the control weight. A toast is the one floating thing the reader
|
|
886
|
+
did not open and cannot hold still: whatever is under it is mid-scroll by
|
|
887
|
+
definition, which is the float's case exactly, while the border and the
|
|
888
|
+
block stay at the control step for the reason above. */
|
|
889
|
+
background: var(--axi-surface-float);
|
|
846
890
|
backdrop-filter: var(--axi-surface-filter);
|
|
847
891
|
border: var(--axi-border-control) solid var(--axi-ink-line);
|
|
848
892
|
border-radius: var(--axi-radius-sm);
|
package/src/tokens.css
CHANGED
|
@@ -27,9 +27,15 @@
|
|
|
27
27
|
wedge of colour. The ground stays a colour. This is the page's light. */
|
|
28
28
|
--axi-ground-image: none;
|
|
29
29
|
--axi-surface: #222731; /* a panel raised off the page */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
/* A chip, a hover, a table head - something raised off a panel that is part
|
|
31
|
+
of the page rather than over it. It said "a chip or popover" until the
|
|
32
|
+
popovers moved to the float: what they were borrowing was opacity, which
|
|
33
|
+
this token cannot promise under a translucent theme. */
|
|
34
|
+
--axi-surface-raised: #2b313d;
|
|
35
|
+
/* The fill for a surface that FLOATS over content which scrolls behind it:
|
|
36
|
+
the command palette, the menu and picker popovers, the modal, the drawer,
|
|
37
|
+
the toast, and any .axi-panel--float, .axi-rail--float or
|
|
38
|
+
.axi-toolbar--float a consumer declares. Holds --axi-surface, because for
|
|
33
39
|
a theme whose panels are opaque a floating panel is just a panel and there
|
|
34
40
|
is nothing to decide.
|
|
35
41
|
|