@axiapps/axi-design 1.24.0 → 1.26.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 CHANGED
@@ -142,6 +142,8 @@ 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">` |
146
+ | `--axi-dock-pad` | the padding inside an `.axi-dock` | `12px 16px` | `<div class="axi-dock" style="--axi-dock-pad: 6px 10px">` |
145
147
  | `--axi-avatar-size` | the size of an `.axi-avatar` square | `40px` | `<span class="axi-avatar" style="--axi-avatar-size: 28px">MS</span>` |
146
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">` |
147
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)">` |
package/dist/axi.css CHANGED
@@ -38,7 +38,9 @@
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, and any .axi-panel--float or .axi-rail--float a consumer
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
42
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.
@@ -1148,7 +1150,13 @@ textarea.axi-input {
1148
1150
  .axi-rail:not(.axi-rail--flush) { box-shadow: var(--axi-shadow-panel); }
1149
1151
  .axi-rail--flush {
1150
1152
  border: 0;
1151
- border-right: var(--axi-border-panel) solid var(--axi-ink-line);
1153
+ /* Logical, not physical: the border faces the content, and which physical
1154
+ side that is depends on the writing direction. `border-right` was correct
1155
+ only for an LTR rail pinned to the leading edge - under RTL it drew the
1156
+ seam on the outside, facing the viewport. Note that this still assumes the
1157
+ LEADING edge; a rail pinned to the trailing edge of its content needs the
1158
+ other border and has no way to ask for it yet. */
1159
+ border-inline-end: var(--axi-border-panel) solid var(--axi-ink-line);
1152
1160
  border-radius: 0;
1153
1161
  }
1154
1162
  /* A rail the page scrolls behind, rather than one the page sits beside.
@@ -1244,13 +1252,87 @@ textarea.axi-input {
1244
1252
  /* ---------- toolbar ---------- */
1245
1253
  .axi-toolbar {
1246
1254
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
1247
- padding: 14px;
1255
+ /* Own knob, like .axi-panel's and .axi-rail's. The toolbar was the one
1256
+ container in this language whose padding was a literal, and 14px is a
1257
+ figure for a strip above a list - a transport bar over a video or a map
1258
+ is the same object at a third of the height, and had no way to say so
1259
+ without writing its own padding and losing the component. */
1260
+ padding: var(--axi-toolbar-pad, 14px);
1248
1261
  background: var(--axi-surface);
1249
1262
  backdrop-filter: var(--axi-surface-filter);
1250
1263
  border: var(--axi-border-panel) solid var(--axi-ink-line);
1251
1264
  border-radius: var(--axi-radius);
1252
1265
  box-shadow: var(--axi-shadow-panel);
1253
1266
  }
1267
+ /* A toolbar that floats over moving content rather than sitting above it: the
1268
+ controls pinned over a map, a chart, a replay. Says exactly what
1269
+ .axi-panel--float and .axi-rail--float say, and for the same reason -
1270
+ --axi-surface-float's own note lists the surfaces that need it and the
1271
+ toolbar was missing from that list, which is the whole of the bug. A strip
1272
+ above a list is not floating and keeps the plain surface; a strip over a
1273
+ map is, and a translucent one shows the map through its own labels on any
1274
+ platform where the blur is unavailable. */
1275
+ .axi-toolbar--float { background: var(--axi-surface-float); }
1276
+ /* A toolbar that must not become two rows. The wrap is right for a strip
1277
+ above a list, where losing a filter off the edge is worse than a second
1278
+ line - and wrong for a bar whose height other things are positioned
1279
+ against, because wrapping moves everything around it. Stated as its own
1280
+ modifier rather than left to each consumer's inline style, so the reason
1281
+ lives here instead of in a comment in somebody's component. */
1282
+ .axi-toolbar--nowrap { flex-wrap: nowrap; }
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); }
1254
1336
 
1255
1337
  /* ---------- menu popover ---------- */
1256
1338
  /* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiapps/axi-design",
3
- "version": "1.24.0",
3
+ "version": "1.26.0",
4
4
  "description": "The design language for the axi suite — flat and outlined, dark, drawn in saturated ink.",
5
5
  "type": "module",
6
6
  "license": "MIT",
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
- border-right: var(--axi-border-panel) solid var(--axi-ink-line);
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,87 @@
274
280
  /* ---------- toolbar ---------- */
275
281
  .axi-toolbar {
276
282
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
277
- padding: 14px;
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; }
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); }
284
364
 
285
365
  /* ---------- menu popover ---------- */
286
366
  /* A disclosure, not a permanent row of controls. The trigger is an .axi-btn
package/src/tokens.css CHANGED
@@ -34,7 +34,9 @@
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, and any .axi-panel--float or .axi-rail--float a consumer
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
38
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.