@axiapps/axi-design 1.25.0 → 1.27.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 +3 -0
- package/dist/axi.css +117 -2
- package/docs/RULES.md +1 -0
- package/package.json +1 -1
- package/src/shells.css +113 -0
- package/src/tokens.css +4 -2
package/README.md
CHANGED
|
@@ -143,6 +143,7 @@ not "what does the system look like". Everything else is
|
|
|
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
145
|
| `--axi-toolbar-pad` | the padding inside an `.axi-toolbar` | `14px` | `<div class="axi-toolbar" style="--axi-toolbar-pad: 4px 7px">` |
|
|
146
|
+
| `--axi-dock-pad` | the padding inside an `.axi-dock` | `12px 16px` | `<div class="axi-dock" style="--axi-dock-pad: 6px 10px">` |
|
|
146
147
|
| `--axi-avatar-size` | the size of an `.axi-avatar` square | `40px` | `<span class="axi-avatar" style="--axi-avatar-size: 28px">MS</span>` |
|
|
147
148
|
| `--axi-modal-width` | the maximum width of an `.axi-modal`, before the viewport clamp | `560px` | `<dialog class="axi-modal" style="--axi-modal-width: 760px">` |
|
|
148
149
|
| `--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)">` |
|
|
@@ -155,6 +156,8 @@ not "what does the system look like". Everything else is
|
|
|
155
156
|
| `--axi-palette-top` | how far down the screen an `.axi-palette` opens | `12vh` | `<div class="axi-scrim axi-palette" style="--axi-palette-top: 6vh">` |
|
|
156
157
|
| `--axi-menu-width` | width of `.axi-menu__pop` | `310px` | `<div class="axi-menu__pop" style="--axi-menu-width: 380px">` |
|
|
157
158
|
| `--axi-drawer-width` | width of `.axi-drawer` (capped at `100vw`) | `560px` | `<aside class="axi-drawer" style="--axi-drawer-width: 720px">` |
|
|
159
|
+
| `--axi-sheet-top` | where an `.axi-sheet`'s top edge sits, for an app whose own chrome starts above it | `0` | `<div class="axi-sheet" style="--axi-sheet-top: 2.5rem">` |
|
|
160
|
+
| `--axi-sheet-pad` | the padding inside an `.axi-sheet` | `12px 16px` | `<div class="axi-sheet" style="--axi-sheet-pad: 0">` |
|
|
158
161
|
| `--axi-series` | the ink a meter fill, bar, plot line or `.axi-diamond--series` is drawn in | `var(--axi-accent)` | `<span class="axi-meter__fill" style="--axi-series: var(--axi-ok)">` |
|
|
159
162
|
| `--axi-meter-v` | how full one `.axi-meter__fill` is | `0%` | `<span class="axi-meter__fill" style="--axi-meter-v: 62%">` |
|
|
160
163
|
| `--axi-meter-h` | height of a `.axi-meter` | `12px` | `<div class="axi-meter" style="--axi-meter-h: 18px">` |
|
package/dist/axi.css
CHANGED
|
@@ -38,8 +38,10 @@
|
|
|
38
38
|
--axi-surface-raised: #2b313d;
|
|
39
39
|
/* The fill for a surface that FLOATS over content which scrolls behind it:
|
|
40
40
|
the command palette, the menu and picker popovers, the modal, the drawer,
|
|
41
|
-
the toast,
|
|
42
|
-
|
|
41
|
+
the toast, every .axi-dock (which is the one surface here that cannot be
|
|
42
|
+
anything else - docking IS having content scroll under you), and any
|
|
43
|
+
.axi-panel--float, .axi-rail--float or .axi-toolbar--float a consumer
|
|
44
|
+
declares. Holds --axi-surface, because for
|
|
43
45
|
a theme whose panels are opaque a floating panel is just a panel and there
|
|
44
46
|
is nothing to decide.
|
|
45
47
|
|
|
@@ -1279,6 +1281,59 @@ textarea.axi-input {
|
|
|
1279
1281
|
lives here instead of in a comment in somebody's component. */
|
|
1280
1282
|
.axi-toolbar--nowrap { flex-wrap: nowrap; }
|
|
1281
1283
|
|
|
1284
|
+
/* ---------- dock ---------- */
|
|
1285
|
+
/* A bar that IS one edge of its scroll container rather than an object standing
|
|
1286
|
+
in the layout: a tray that drops in above a list, an action bar pinned under
|
|
1287
|
+
one. The horizontal counterpart to .axi-rail--flush, and the shape this
|
|
1288
|
+
language was missing - a rail is vertical, and a toolbar stands in the layout
|
|
1289
|
+
with space around it, so every consumer with a full-width edge bar had to
|
|
1290
|
+
write the surface, the single border and the squared ends by hand.
|
|
1291
|
+
|
|
1292
|
+
It drops what says "an object with space around it", for the reasons
|
|
1293
|
+
.axi-rail--flush drops them: no radius, because its two ends are the
|
|
1294
|
+
container's own edges and a corner there is a corner cut out of the page; and
|
|
1295
|
+
no offset block, because a block needs somewhere to fall and this has content
|
|
1296
|
+
on one side and the container's edges on the other three.
|
|
1297
|
+
|
|
1298
|
+
It is on --axi-surface-float unconditionally, with no --float modifier to
|
|
1299
|
+
forget. Every other surface here can be either way - a panel may sit still on
|
|
1300
|
+
the page or be pinned over a scrolling table - but "the content scrolls under
|
|
1301
|
+
it" is the definition of docking rather than a variant of it. A translucent
|
|
1302
|
+
dock is a dock with the list showing through its own buttons on any platform
|
|
1303
|
+
where the blur is unavailable, which is to say on some platform.
|
|
1304
|
+
|
|
1305
|
+
What it does not say is how its contents are arranged or how it is pinned:
|
|
1306
|
+
put an .axi-toolbar's row of controls inside it, or a head above a scrolling
|
|
1307
|
+
body; make it position: sticky or leave it in flow. Those belong to the
|
|
1308
|
+
consumer, and a dock that answered either would be two objects wearing one
|
|
1309
|
+
name. */
|
|
1310
|
+
.axi-dock {
|
|
1311
|
+
/* The inline figure is a page gutter and the block figure is a bar's height.
|
|
1312
|
+
They differ on purpose: a dock spans the full width, so its contents have
|
|
1313
|
+
to line up with the content it is docked against, while how tall it stands
|
|
1314
|
+
is its own business. */
|
|
1315
|
+
padding: var(--axi-dock-pad, 12px 16px);
|
|
1316
|
+
background: var(--axi-surface-float);
|
|
1317
|
+
backdrop-filter: var(--axi-surface-filter);
|
|
1318
|
+
/* The seam's colour and style said once, both widths off, and each modifier
|
|
1319
|
+
below turning on the one side it needs. Spelling the whole shorthand twice
|
|
1320
|
+
would put two independent copies of the edge in the file for a theme to
|
|
1321
|
+
change one of. */
|
|
1322
|
+
border: 0;
|
|
1323
|
+
border-block: 0 solid var(--axi-ink-line);
|
|
1324
|
+
border-radius: 0;
|
|
1325
|
+
}
|
|
1326
|
+
/* The border faces the content, so a dock at the block-start edge draws it on
|
|
1327
|
+
its block-end side. Logical rather than physical, so it survives a vertical
|
|
1328
|
+
writing mode - the same correction .axi-rail--flush took. */
|
|
1329
|
+
.axi-dock:not(.axi-dock--end) { border-block-end-width: var(--axi-border-panel); }
|
|
1330
|
+
/* The other edge. Unlike .axi-rail--flush, which assumes the leading edge and
|
|
1331
|
+
has no way to ask for the far one, a dock can say which edge it is on -
|
|
1332
|
+
because both cases arrived together: a tray drops in from the top of a list
|
|
1333
|
+
and an action bar is pinned beneath the same list. This is the pair
|
|
1334
|
+
.axi-rail--flush should grow into the day a trailing-edge rail exists. */
|
|
1335
|
+
.axi-dock--end { border-block-start-width: var(--axi-border-panel); }
|
|
1336
|
+
|
|
1282
1337
|
/* ---------- menu popover ---------- */
|
|
1283
1338
|
/* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
|
|
1284
1339
|
with aria-expanded; this styles the panel it opens. */
|
|
@@ -1594,6 +1649,66 @@ textarea.axi-input {
|
|
|
1594
1649
|
}
|
|
1595
1650
|
.axi-drawer__body { overflow-y: auto; padding: 18px 24px 30px; }
|
|
1596
1651
|
|
|
1652
|
+
/* ---------- sheet ---------- */
|
|
1653
|
+
/* A pane that covers the whole of its containing block: one thing blown up to
|
|
1654
|
+
fill the app, with a way back out. Three names were already close and all
|
|
1655
|
+
three are wrong, so this one is worth its own word.
|
|
1656
|
+
|
|
1657
|
+
Not .axi-modal. A modal is a <dialog> in the top layer with a scrim and the
|
|
1658
|
+
page inert behind it; a sheet is in the page, and the thing it replaces is
|
|
1659
|
+
the view, not the reader's attention.
|
|
1660
|
+
|
|
1661
|
+
Not .axi-drawer--full. A drawer is pinned to three edges with the page live
|
|
1662
|
+
beside it - that live strip is what makes it a drawer, and it is what pays
|
|
1663
|
+
for the float fill, the leading outline and the scrim. Widen a drawer to the
|
|
1664
|
+
fourth edge and every one of those three goes away, which is a different
|
|
1665
|
+
object wearing a modifier, not a wider drawer.
|
|
1666
|
+
|
|
1667
|
+
Not .axi-panel. Rule 3 outlines a raised element and rule 5 gives it a
|
|
1668
|
+
block, and both are claims about an edge: an element pinned to all four
|
|
1669
|
+
sides has no edge on screen to outline, and nothing behind it this language
|
|
1670
|
+
is entitled to cast a shadow on. So a sheet carries no outline, no block and
|
|
1671
|
+
no radius, and nothing raises it - it is the ground with one thing on it.
|
|
1672
|
+
|
|
1673
|
+
Which is why it paints the ground's IMAGE as well as the ground's colour. A
|
|
1674
|
+
sheet is the page for as long as it is open, and a theme that lights the
|
|
1675
|
+
page from a few directions would otherwise have that light blink off every
|
|
1676
|
+
time a reader opened one, then back on when they closed it. `background` in
|
|
1677
|
+
the shorthand, so a theme leaving --axi-ground-image as `none` still gets a
|
|
1678
|
+
clean flat fill and no stray layer.
|
|
1679
|
+
|
|
1680
|
+
No filter either, for the same reason the window has none: there is nothing
|
|
1681
|
+
to see through to. The two knobs are the only things a consumer genuinely
|
|
1682
|
+
cannot know from here - where its top edge is (an app with its own titlebar
|
|
1683
|
+
starts below it) and how much padding its content wants. */
|
|
1684
|
+
.axi-sheet {
|
|
1685
|
+
position: fixed;
|
|
1686
|
+
inset: var(--axi-sheet-top, 0) 0 0;
|
|
1687
|
+
/* Its own rung, between the page's sticky chrome and the scrim. Above 40 and
|
|
1688
|
+
41 because a sheet covers the view, and the masthead and the popovers are
|
|
1689
|
+
part of the view; below 50 because a modal or a drawer opened FROM a sheet
|
|
1690
|
+
has to land on top of it, and a sheet is not the kind of thing that gets
|
|
1691
|
+
to win that. */
|
|
1692
|
+
z-index: 45;
|
|
1693
|
+
display: flex;
|
|
1694
|
+
flex-direction: column;
|
|
1695
|
+
overflow-x: hidden;
|
|
1696
|
+
overflow-y: auto;
|
|
1697
|
+
background: var(--axi-ground) var(--axi-ground-image);
|
|
1698
|
+
padding: var(--axi-sheet-pad, 12px 16px);
|
|
1699
|
+
}
|
|
1700
|
+
/* The heading the sheet opened with, divided from the body by a rule. Rule 8:
|
|
1701
|
+
a line inside a surface separates its parts rather than raising them - and
|
|
1702
|
+
here it is doing the job the outline a sheet does not have would have done,
|
|
1703
|
+
which is to say where the pane's own chrome stops and its content starts. */
|
|
1704
|
+
.axi-sheet__head {
|
|
1705
|
+
flex: none;
|
|
1706
|
+
padding-bottom: 10px;
|
|
1707
|
+
border-bottom: var(--axi-border-control) solid var(--axi-ink-line);
|
|
1708
|
+
}
|
|
1709
|
+
/* The scrolling region under the head. */
|
|
1710
|
+
.axi-sheet__body { flex: 1 1 auto; min-height: 0; }
|
|
1711
|
+
|
|
1597
1712
|
/* ---------- pull-quote ---------- */
|
|
1598
1713
|
/* A cited quotation. The accent rule down the left is the only place in the
|
|
1599
1714
|
language where colour marks a block rather than filling a chip - a quote is
|
package/docs/RULES.md
CHANGED
|
@@ -490,6 +490,7 @@ instead of joining it.
|
|
|
490
490
|
| Table corner | 3 | where the two cross |
|
|
491
491
|
| Sticky chrome | 40 | `.axi-mast` |
|
|
492
492
|
| Popovers | 41 | `.axi-menu__pop`, `.axi-picker__pop` |
|
|
493
|
+
| Sheet | 45 | `.axi-sheet` |
|
|
493
494
|
| Scrim | 50 | `.axi-scrim` |
|
|
494
495
|
| Drawer | 51 | `.axi-drawer` |
|
|
495
496
|
| Toasts | 60 | `.axi-toasts` |
|
package/package.json
CHANGED
package/src/shells.css
CHANGED
|
@@ -309,6 +309,59 @@
|
|
|
309
309
|
lives here instead of in a comment in somebody's component. */
|
|
310
310
|
.axi-toolbar--nowrap { flex-wrap: nowrap; }
|
|
311
311
|
|
|
312
|
+
/* ---------- dock ---------- */
|
|
313
|
+
/* A bar that IS one edge of its scroll container rather than an object standing
|
|
314
|
+
in the layout: a tray that drops in above a list, an action bar pinned under
|
|
315
|
+
one. The horizontal counterpart to .axi-rail--flush, and the shape this
|
|
316
|
+
language was missing - a rail is vertical, and a toolbar stands in the layout
|
|
317
|
+
with space around it, so every consumer with a full-width edge bar had to
|
|
318
|
+
write the surface, the single border and the squared ends by hand.
|
|
319
|
+
|
|
320
|
+
It drops what says "an object with space around it", for the reasons
|
|
321
|
+
.axi-rail--flush drops them: no radius, because its two ends are the
|
|
322
|
+
container's own edges and a corner there is a corner cut out of the page; and
|
|
323
|
+
no offset block, because a block needs somewhere to fall and this has content
|
|
324
|
+
on one side and the container's edges on the other three.
|
|
325
|
+
|
|
326
|
+
It is on --axi-surface-float unconditionally, with no --float modifier to
|
|
327
|
+
forget. Every other surface here can be either way - a panel may sit still on
|
|
328
|
+
the page or be pinned over a scrolling table - but "the content scrolls under
|
|
329
|
+
it" is the definition of docking rather than a variant of it. A translucent
|
|
330
|
+
dock is a dock with the list showing through its own buttons on any platform
|
|
331
|
+
where the blur is unavailable, which is to say on some platform.
|
|
332
|
+
|
|
333
|
+
What it does not say is how its contents are arranged or how it is pinned:
|
|
334
|
+
put an .axi-toolbar's row of controls inside it, or a head above a scrolling
|
|
335
|
+
body; make it position: sticky or leave it in flow. Those belong to the
|
|
336
|
+
consumer, and a dock that answered either would be two objects wearing one
|
|
337
|
+
name. */
|
|
338
|
+
.axi-dock {
|
|
339
|
+
/* The inline figure is a page gutter and the block figure is a bar's height.
|
|
340
|
+
They differ on purpose: a dock spans the full width, so its contents have
|
|
341
|
+
to line up with the content it is docked against, while how tall it stands
|
|
342
|
+
is its own business. */
|
|
343
|
+
padding: var(--axi-dock-pad, 12px 16px);
|
|
344
|
+
background: var(--axi-surface-float);
|
|
345
|
+
backdrop-filter: var(--axi-surface-filter);
|
|
346
|
+
/* The seam's colour and style said once, both widths off, and each modifier
|
|
347
|
+
below turning on the one side it needs. Spelling the whole shorthand twice
|
|
348
|
+
would put two independent copies of the edge in the file for a theme to
|
|
349
|
+
change one of. */
|
|
350
|
+
border: 0;
|
|
351
|
+
border-block: 0 solid var(--axi-ink-line);
|
|
352
|
+
border-radius: 0;
|
|
353
|
+
}
|
|
354
|
+
/* The border faces the content, so a dock at the block-start edge draws it on
|
|
355
|
+
its block-end side. Logical rather than physical, so it survives a vertical
|
|
356
|
+
writing mode - the same correction .axi-rail--flush took. */
|
|
357
|
+
.axi-dock:not(.axi-dock--end) { border-block-end-width: var(--axi-border-panel); }
|
|
358
|
+
/* The other edge. Unlike .axi-rail--flush, which assumes the leading edge and
|
|
359
|
+
has no way to ask for the far one, a dock can say which edge it is on -
|
|
360
|
+
because both cases arrived together: a tray drops in from the top of a list
|
|
361
|
+
and an action bar is pinned beneath the same list. This is the pair
|
|
362
|
+
.axi-rail--flush should grow into the day a trailing-edge rail exists. */
|
|
363
|
+
.axi-dock--end { border-block-start-width: var(--axi-border-panel); }
|
|
364
|
+
|
|
312
365
|
/* ---------- menu popover ---------- */
|
|
313
366
|
/* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
|
|
314
367
|
with aria-expanded; this styles the panel it opens. */
|
|
@@ -624,6 +677,66 @@
|
|
|
624
677
|
}
|
|
625
678
|
.axi-drawer__body { overflow-y: auto; padding: 18px 24px 30px; }
|
|
626
679
|
|
|
680
|
+
/* ---------- sheet ---------- */
|
|
681
|
+
/* A pane that covers the whole of its containing block: one thing blown up to
|
|
682
|
+
fill the app, with a way back out. Three names were already close and all
|
|
683
|
+
three are wrong, so this one is worth its own word.
|
|
684
|
+
|
|
685
|
+
Not .axi-modal. A modal is a <dialog> in the top layer with a scrim and the
|
|
686
|
+
page inert behind it; a sheet is in the page, and the thing it replaces is
|
|
687
|
+
the view, not the reader's attention.
|
|
688
|
+
|
|
689
|
+
Not .axi-drawer--full. A drawer is pinned to three edges with the page live
|
|
690
|
+
beside it - that live strip is what makes it a drawer, and it is what pays
|
|
691
|
+
for the float fill, the leading outline and the scrim. Widen a drawer to the
|
|
692
|
+
fourth edge and every one of those three goes away, which is a different
|
|
693
|
+
object wearing a modifier, not a wider drawer.
|
|
694
|
+
|
|
695
|
+
Not .axi-panel. Rule 3 outlines a raised element and rule 5 gives it a
|
|
696
|
+
block, and both are claims about an edge: an element pinned to all four
|
|
697
|
+
sides has no edge on screen to outline, and nothing behind it this language
|
|
698
|
+
is entitled to cast a shadow on. So a sheet carries no outline, no block and
|
|
699
|
+
no radius, and nothing raises it - it is the ground with one thing on it.
|
|
700
|
+
|
|
701
|
+
Which is why it paints the ground's IMAGE as well as the ground's colour. A
|
|
702
|
+
sheet is the page for as long as it is open, and a theme that lights the
|
|
703
|
+
page from a few directions would otherwise have that light blink off every
|
|
704
|
+
time a reader opened one, then back on when they closed it. `background` in
|
|
705
|
+
the shorthand, so a theme leaving --axi-ground-image as `none` still gets a
|
|
706
|
+
clean flat fill and no stray layer.
|
|
707
|
+
|
|
708
|
+
No filter either, for the same reason the window has none: there is nothing
|
|
709
|
+
to see through to. The two knobs are the only things a consumer genuinely
|
|
710
|
+
cannot know from here - where its top edge is (an app with its own titlebar
|
|
711
|
+
starts below it) and how much padding its content wants. */
|
|
712
|
+
.axi-sheet {
|
|
713
|
+
position: fixed;
|
|
714
|
+
inset: var(--axi-sheet-top, 0) 0 0;
|
|
715
|
+
/* Its own rung, between the page's sticky chrome and the scrim. Above 40 and
|
|
716
|
+
41 because a sheet covers the view, and the masthead and the popovers are
|
|
717
|
+
part of the view; below 50 because a modal or a drawer opened FROM a sheet
|
|
718
|
+
has to land on top of it, and a sheet is not the kind of thing that gets
|
|
719
|
+
to win that. */
|
|
720
|
+
z-index: 45;
|
|
721
|
+
display: flex;
|
|
722
|
+
flex-direction: column;
|
|
723
|
+
overflow-x: hidden;
|
|
724
|
+
overflow-y: auto;
|
|
725
|
+
background: var(--axi-ground) var(--axi-ground-image);
|
|
726
|
+
padding: var(--axi-sheet-pad, 12px 16px);
|
|
727
|
+
}
|
|
728
|
+
/* The heading the sheet opened with, divided from the body by a rule. Rule 8:
|
|
729
|
+
a line inside a surface separates its parts rather than raising them - and
|
|
730
|
+
here it is doing the job the outline a sheet does not have would have done,
|
|
731
|
+
which is to say where the pane's own chrome stops and its content starts. */
|
|
732
|
+
.axi-sheet__head {
|
|
733
|
+
flex: none;
|
|
734
|
+
padding-bottom: 10px;
|
|
735
|
+
border-bottom: var(--axi-border-control) solid var(--axi-ink-line);
|
|
736
|
+
}
|
|
737
|
+
/* The scrolling region under the head. */
|
|
738
|
+
.axi-sheet__body { flex: 1 1 auto; min-height: 0; }
|
|
739
|
+
|
|
627
740
|
/* ---------- pull-quote ---------- */
|
|
628
741
|
/* A cited quotation. The accent rule down the left is the only place in the
|
|
629
742
|
language where colour marks a block rather than filling a chip - a quote is
|
package/src/tokens.css
CHANGED
|
@@ -34,8 +34,10 @@
|
|
|
34
34
|
--axi-surface-raised: #2b313d;
|
|
35
35
|
/* The fill for a surface that FLOATS over content which scrolls behind it:
|
|
36
36
|
the command palette, the menu and picker popovers, the modal, the drawer,
|
|
37
|
-
the toast,
|
|
38
|
-
|
|
37
|
+
the toast, every .axi-dock (which is the one surface here that cannot be
|
|
38
|
+
anything else - docking IS having content scroll under you), and any
|
|
39
|
+
.axi-panel--float, .axi-rail--float or .axi-toolbar--float a consumer
|
|
40
|
+
declares. Holds --axi-surface, because for
|
|
39
41
|
a theme whose panels are opaque a floating panel is just a panel and there
|
|
40
42
|
is nothing to decide.
|
|
41
43
|
|