@axiapps/axi-design 1.27.1 → 1.29.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
@@ -138,6 +138,8 @@ not "what does the system look like". Everything else is
138
138
  | `--axi-check-size` | the size of an `.axi-check` or `.axi-radio` box | `22px` | `<input type="checkbox" class="axi-check" style="--axi-check-size: 16px">` |
139
139
  | `--axi-check-fill` | the fill a checked `.axi-check` takes, and the colour of a checked `.axi-radio`'s diamond | `var(--axi-accent)` | `<input type="checkbox" class="axi-check" style="--axi-check-fill: var(--axi-danger)">` |
140
140
  | `--axi-textarea-h` | the minimum height of a `<textarea class="axi-input">` | `90px` | `<textarea class="axi-input" style="--axi-textarea-h: 200px">` |
141
+ | `--axi-input-pad` | the padding inside an `.axi-input`, for a field that is furniture in a header rather than a control on a page | `11px 12px` | `<input class="axi-input" style="--axi-input-pad: 7px 12px">` |
142
+ | `--axi-input-size` | an `.axi-input`'s text size, which travels with its padding | `14px` | `<input class="axi-input" style="--axi-input-size: 13px">` |
141
143
  | `--axi-well-pad` | the padding inside an `.axi-well` | `10px` | `<div class="axi-well" style="--axi-well-pad: 18px">` |
142
144
  | `--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
145
  | `--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">` |
package/dist/axi.css CHANGED
@@ -562,15 +562,23 @@ button.axi-panel--tile:hover,
562
562
  .axi-diamond--series { background: var(--axi-series, var(--axi-accent)); }
563
563
 
564
564
  /* ---------- input ---------- */
565
+ /* Two knobs rather than one fixed size, for the same reason --axi-well-pad
566
+ exists: a field is used at two scales. A form control standing on a page is
567
+ the 14px default; a filter sitting in a section header or a row in a bar is
568
+ smaller, because there it is furniture next to 11px type rather than the
569
+ thing the page is for. The alternative is what this file did before - a
570
+ context selector per place that wanted the small one (.axi-palette__bar
571
+ .axi-input, still the only one upstream needs) - and that does not scale
572
+ past the cases upstream happens to ship. */
565
573
  .axi-input {
566
574
  width: 100%;
567
- padding: 11px 12px;
575
+ padding: var(--axi-input-pad, 11px 12px);
568
576
  background: var(--axi-ground);
569
577
  border: var(--axi-border-control) solid var(--axi-ink-line);
570
578
  border-radius: var(--axi-radius-sm);
571
579
  color: var(--axi-text);
572
580
  font: var(--axi-t-label);
573
- font-size: 14px;
581
+ font-size: var(--axi-input-size, 14px);
574
582
  }
575
583
  .axi-input::placeholder { color: var(--axi-text-faint); font-weight: 500; }
576
584
 
@@ -1411,7 +1419,7 @@ textarea.axi-input {
1411
1419
  not a form control standing on a page. No focus ring: the palette opens with
1412
1420
  the caret already here, so a permanent outline says nothing, and it would
1413
1421
  argue with the one mark that does - the accent on the cursor row. */
1414
- .axi-palette__bar .axi-input { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
1422
+ .axi-palette__bar .axi-input { --axi-input-pad: 7px 12px; --axi-input-size: 13px; }
1415
1423
  .axi-palette__bar .axi-input:focus-visible { outline: none; }
1416
1424
  .axi-palette__filters { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
1417
1425
  /* What the list is not showing. Meta, at the end of the filter row, because it
@@ -1540,6 +1548,31 @@ textarea.axi-input {
1540
1548
  left/top or inset the placement needs); this only changes which box those
1541
1549
  offsets are measured from. */
1542
1550
  .axi-tooltip--anchored { position: absolute; }
1551
+ /* The third placement, and the one the base class cannot express: the box is
1552
+ laid out by whoever owns its wrapper, and this element positions itself not
1553
+ at all. Charting libraries are the case that forces it - recharts renders
1554
+ custom tooltip content inside a wrapper it has already placed and
1555
+ transformed - but the shape is general: any library that hands you a slot
1556
+ and puts the slot where it wants it.
1557
+
1558
+ Worth saying why the base class LOOKS like it already works here, because
1559
+ it does, and for a reason that will not hold. A `position: fixed` box with
1560
+ every inset auto resolves to its static position, so dropped into such a
1561
+ wrapper it lands exactly where the wrapper is - zero drift, measurably. It
1562
+ then scrolls with the chart only because the wrapper carries a transform,
1563
+ which is the very containment the base class's <body> contract exists to
1564
+ escape. Two facts hold it up, both of them someone else's: that the library
1565
+ keeps transforming the wrapper, and that it keeps emitting positioning at
1566
+ all. recharts drops both when its `portal` prop is set, and the failure is
1567
+ silent - a tooltip pinned to the viewport while the chart scrolls away.
1568
+
1569
+ So this says the true thing instead of inheriting the accident. `static`
1570
+ rather than `relative` because the consumer has no offsets to apply - that
1571
+ is the whole point of the modifier - and `z-index: auto` because a layer is
1572
+ meaningless on a static box and layer 70 would only be a claim it cannot
1573
+ honour. */
1574
+ .axi-tooltip--flow { position: static; z-index: auto; }
1575
+
1543
1576
  /* A tooltip carrying a sentence rather than a value. nowrap is right for a
1544
1577
  reading - a number that breaks across two lines is harder to read than one
1545
1578
  that runs past its trigger - and wrong for prose, which needs a width from
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiapps/axi-design",
3
- "version": "1.27.1",
3
+ "version": "1.29.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",
@@ -288,15 +288,23 @@ button.axi-panel--tile:hover,
288
288
  .axi-diamond--series { background: var(--axi-series, var(--axi-accent)); }
289
289
 
290
290
  /* ---------- input ---------- */
291
+ /* Two knobs rather than one fixed size, for the same reason --axi-well-pad
292
+ exists: a field is used at two scales. A form control standing on a page is
293
+ the 14px default; a filter sitting in a section header or a row in a bar is
294
+ smaller, because there it is furniture next to 11px type rather than the
295
+ thing the page is for. The alternative is what this file did before - a
296
+ context selector per place that wanted the small one (.axi-palette__bar
297
+ .axi-input, still the only one upstream needs) - and that does not scale
298
+ past the cases upstream happens to ship. */
291
299
  .axi-input {
292
300
  width: 100%;
293
- padding: 11px 12px;
301
+ padding: var(--axi-input-pad, 11px 12px);
294
302
  background: var(--axi-ground);
295
303
  border: var(--axi-border-control) solid var(--axi-ink-line);
296
304
  border-radius: var(--axi-radius-sm);
297
305
  color: var(--axi-text);
298
306
  font: var(--axi-t-label);
299
- font-size: 14px;
307
+ font-size: var(--axi-input-size, 14px);
300
308
  }
301
309
  .axi-input::placeholder { color: var(--axi-text-faint); font-weight: 500; }
302
310
 
package/src/shells.css CHANGED
@@ -439,7 +439,7 @@
439
439
  not a form control standing on a page. No focus ring: the palette opens with
440
440
  the caret already here, so a permanent outline says nothing, and it would
441
441
  argue with the one mark that does - the accent on the cursor row. */
442
- .axi-palette__bar .axi-input { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
442
+ .axi-palette__bar .axi-input { --axi-input-pad: 7px 12px; --axi-input-size: 13px; }
443
443
  .axi-palette__bar .axi-input:focus-visible { outline: none; }
444
444
  .axi-palette__filters { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
445
445
  /* What the list is not showing. Meta, at the end of the filter row, because it
@@ -568,6 +568,31 @@
568
568
  left/top or inset the placement needs); this only changes which box those
569
569
  offsets are measured from. */
570
570
  .axi-tooltip--anchored { position: absolute; }
571
+ /* The third placement, and the one the base class cannot express: the box is
572
+ laid out by whoever owns its wrapper, and this element positions itself not
573
+ at all. Charting libraries are the case that forces it - recharts renders
574
+ custom tooltip content inside a wrapper it has already placed and
575
+ transformed - but the shape is general: any library that hands you a slot
576
+ and puts the slot where it wants it.
577
+
578
+ Worth saying why the base class LOOKS like it already works here, because
579
+ it does, and for a reason that will not hold. A `position: fixed` box with
580
+ every inset auto resolves to its static position, so dropped into such a
581
+ wrapper it lands exactly where the wrapper is - zero drift, measurably. It
582
+ then scrolls with the chart only because the wrapper carries a transform,
583
+ which is the very containment the base class's <body> contract exists to
584
+ escape. Two facts hold it up, both of them someone else's: that the library
585
+ keeps transforming the wrapper, and that it keeps emitting positioning at
586
+ all. recharts drops both when its `portal` prop is set, and the failure is
587
+ silent - a tooltip pinned to the viewport while the chart scrolls away.
588
+
589
+ So this says the true thing instead of inheriting the accident. `static`
590
+ rather than `relative` because the consumer has no offsets to apply - that
591
+ is the whole point of the modifier - and `z-index: auto` because a layer is
592
+ meaningless on a static box and layer 70 would only be a claim it cannot
593
+ honour. */
594
+ .axi-tooltip--flow { position: static; z-index: auto; }
595
+
571
596
  /* A tooltip carrying a sentence rather than a value. nowrap is right for a
572
597
  reading - a number that breaks across two lines is harder to read than one
573
598
  that runs past its trigger - and wrong for prose, which needs a width from