@axiapps/axi-design 1.30.1 → 1.32.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
@@ -140,6 +140,8 @@ not "what does the system look like". Everything else is
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
141
  | `--axi-btn-pad` | the padding inside an `.axi-btn`. The three named steps set it for you; reach for the knob only for a size they do not cover | `12px 20px` | `<button class="axi-btn" style="--axi-btn-pad: 3px 7px">` |
142
142
  | `--axi-btn-size` | an `.axi-btn`'s text size, which travels with its padding | `13px` | `<button class="axi-btn" style="--axi-btn-size: 10px">` |
143
+ | `--axi-pill-pad` | the padding inside an `.axi-pill`. The same scale and the same two named steps as the button, because a pill is a button that holds a state | `12px 20px` | `<button class="axi-pill" style="--axi-pill-pad: 3px 7px">` |
144
+ | `--axi-pill-size` | an `.axi-pill`'s text size, which travels with its padding | `13px` | `<button class="axi-pill" style="--axi-pill-size: 10px">` |
143
145
  | `--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">` |
144
146
  | `--axi-input-size` | an `.axi-input`'s text size, which travels with its padding | `14px` | `<input class="axi-input" style="--axi-input-size: 13px">` |
145
147
  | `--axi-well-pad` | the padding inside an `.axi-well` | `10px` | `<div class="axi-well" style="--axi-well-pad: 18px">` |
package/dist/axi.css CHANGED
@@ -448,19 +448,30 @@ button.axi-panel--tile:hover,
448
448
  as a generic "selected". Consumers set that colour with --axi-pill-fill,
449
449
  on the pill or on any ancestor - it is read through a fallback and never
450
450
  declared on the component, which is what keeps both placements working. */
451
+ /* On the button's scale, and deliberately the same numbers. The only thing a
452
+ pill has that a button does not is a state, so two of them carrying the same
453
+ 13px uppercase label have no reason to be different shapes - and they were:
454
+ measured at 12px/20px against 10px/9px, the pill's sides less than half the
455
+ button's, 43px tall against 39px. Side by side that reads as two components
456
+ rather than one component holding a state. The steps below are the button's
457
+ steps verbatim for the same reason, and a test holds the two in step. */
451
458
  .axi-pill {
452
459
  display: inline-flex; align-items: center; gap: 6px;
453
- padding: 10px 9px;
460
+ padding: var(--axi-pill-pad, 12px 20px);
454
461
  border: var(--axi-border-control) solid var(--axi-ink-line);
455
462
  border-radius: var(--axi-radius-sm);
456
463
  background: var(--axi-ground);
457
464
  color: var(--axi-text-dim);
458
465
  font: var(--axi-t-label);
459
466
  letter-spacing: var(--axi-ls-label);
467
+ /* After the `font` shorthand, which sets 13px and would otherwise reset it. */
468
+ font-size: var(--axi-pill-size, 13px);
460
469
  text-transform: uppercase;
461
470
  cursor: pointer;
462
471
  transition: transform .1s, box-shadow .1s;
463
472
  }
473
+ .axi-pill--sm { --axi-pill-pad: 8px 13px; --axi-pill-size: 12px; }
474
+ .axi-pill--xs { --axi-pill-pad: 5px 9px; --axi-pill-size: 11px; }
464
475
  /* :where() for the same reason the button's hover has it - the brighten is
465
476
  what a pill that has not been told its colour falls back to, not an override
466
477
  of one that has. See rule 6's addendum. */
@@ -569,6 +580,27 @@ button.axi-panel--tile:hover,
569
580
  color: var(--axi-meta);
570
581
  }
571
582
 
583
+ /* A chip you press. A chip is a mark - it states a value about the thing it
584
+ sits on - and a mark has no cursor and does not move. But the same shape also
585
+ turns up holding a value the *reader* chose and can take back: the filters
586
+ standing above a table, one per selection, each one dismissable. That is
587
+ still a chip and not a button, because its label is data rather than an
588
+ action - "DAMAGE", not "Clear all" - and rule 5 is what tells the reader
589
+ which of the two they are looking at. What it is missing is only the press
590
+ affordances: the hand, and the block that every other pressable thing in the
591
+ language raises on hover.
592
+
593
+ It deliberately says nothing about colour. `.axi-chip--accent` and the three
594
+ status fills each set their own contrast pair at one class, and a hover
595
+ brighten here would weigh the same and win on source order - putting a
596
+ neutral back on top of a saturated fill. There is nothing for a brighten to
597
+ add to a filled chip anyway; the lift is the feedback. */
598
+ .axi-chip--action { cursor: pointer; }
599
+ .axi-chip--action:where(:hover) {
600
+ box-shadow: var(--axi-shadow-control);
601
+ transform: translate(-2px, -2px);
602
+ }
603
+
572
604
  /* ---------- count badge ---------- */
573
605
  .axi-badge-count {
574
606
  display: inline-block;
package/docs/RULES.md CHANGED
@@ -211,6 +211,30 @@ A filled chip asserts a value about the thing. An outlined chip in the cool ink
211
211
  is commentary *about* the thing — a maintainer's judgment, a source, a caveat.
212
212
  A reader must be able to tell which they are looking at before reading either.
213
213
 
214
+ A chip may be a press. `.axi-chip--action` adds the hand and the block, and
215
+ nothing else — the label of a dismissable filter is still data ("DAMAGE"), not
216
+ an action ("Clear all"), so this rule is what tells a reader which of the two a
217
+ given box is, and a chip that becomes clickable must not stop looking like a
218
+ chip.
219
+
220
+ **Inside a fill, the only inks are that fill's own pair.** A filled chip, a
221
+ pressed pill, a primary button and a current tab each set a contrast ink against
222
+ a saturated ground, and anything nested inside them inherits that ground whether
223
+ it reads the pair or not. A neutral from the ramp there is not quieter, it is
224
+ gone: a consumer's dismiss glyph written `--axi-text-dim` measured **1.39:1**
225
+ against the accent fill beside a label at 12.24:1, and `.axi-badge-count` inside
226
+ `.axi-btn--primary` was the accent on the accent until 1.30.1. The fix in both
227
+ cases is to say nothing — `currentColor` is already the pair — and the trap is
228
+ that saying nothing looks like an omission while `--axi-text-dim` looks like a
229
+ decision.
230
+
231
+ This is checked by eye and not by a test, deliberately. The obvious static
232
+ check — no descendant rule inside a fillable component may set `color` to a
233
+ neutral — flags `.axi-tabs .axi-tabs__close`, which is correct: the tab's fill
234
+ sits on the anchor and the close control is its *sibling*, so the faint neutral
235
+ is against the page ground. Whether a nested element is on the fill is a fact
236
+ about the paint chain, and a stylesheet does not contain it.
237
+
214
238
  The same rule governs coloured strips on cards: a strip must encode real data.
215
239
  A strip that carries "category" is decoration impersonating data, and it takes
216
240
  the first position the eye lands on.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiapps/axi-design",
3
- "version": "1.30.1",
3
+ "version": "1.32.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",
@@ -174,19 +174,30 @@ button.axi-panel--tile:hover,
174
174
  as a generic "selected". Consumers set that colour with --axi-pill-fill,
175
175
  on the pill or on any ancestor - it is read through a fallback and never
176
176
  declared on the component, which is what keeps both placements working. */
177
+ /* On the button's scale, and deliberately the same numbers. The only thing a
178
+ pill has that a button does not is a state, so two of them carrying the same
179
+ 13px uppercase label have no reason to be different shapes - and they were:
180
+ measured at 12px/20px against 10px/9px, the pill's sides less than half the
181
+ button's, 43px tall against 39px. Side by side that reads as two components
182
+ rather than one component holding a state. The steps below are the button's
183
+ steps verbatim for the same reason, and a test holds the two in step. */
177
184
  .axi-pill {
178
185
  display: inline-flex; align-items: center; gap: 6px;
179
- padding: 10px 9px;
186
+ padding: var(--axi-pill-pad, 12px 20px);
180
187
  border: var(--axi-border-control) solid var(--axi-ink-line);
181
188
  border-radius: var(--axi-radius-sm);
182
189
  background: var(--axi-ground);
183
190
  color: var(--axi-text-dim);
184
191
  font: var(--axi-t-label);
185
192
  letter-spacing: var(--axi-ls-label);
193
+ /* After the `font` shorthand, which sets 13px and would otherwise reset it. */
194
+ font-size: var(--axi-pill-size, 13px);
186
195
  text-transform: uppercase;
187
196
  cursor: pointer;
188
197
  transition: transform .1s, box-shadow .1s;
189
198
  }
199
+ .axi-pill--sm { --axi-pill-pad: 8px 13px; --axi-pill-size: 12px; }
200
+ .axi-pill--xs { --axi-pill-pad: 5px 9px; --axi-pill-size: 11px; }
190
201
  /* :where() for the same reason the button's hover has it - the brighten is
191
202
  what a pill that has not been told its colour falls back to, not an override
192
203
  of one that has. See rule 6's addendum. */
@@ -295,6 +306,27 @@ button.axi-panel--tile:hover,
295
306
  color: var(--axi-meta);
296
307
  }
297
308
 
309
+ /* A chip you press. A chip is a mark - it states a value about the thing it
310
+ sits on - and a mark has no cursor and does not move. But the same shape also
311
+ turns up holding a value the *reader* chose and can take back: the filters
312
+ standing above a table, one per selection, each one dismissable. That is
313
+ still a chip and not a button, because its label is data rather than an
314
+ action - "DAMAGE", not "Clear all" - and rule 5 is what tells the reader
315
+ which of the two they are looking at. What it is missing is only the press
316
+ affordances: the hand, and the block that every other pressable thing in the
317
+ language raises on hover.
318
+
319
+ It deliberately says nothing about colour. `.axi-chip--accent` and the three
320
+ status fills each set their own contrast pair at one class, and a hover
321
+ brighten here would weigh the same and win on source order - putting a
322
+ neutral back on top of a saturated fill. There is nothing for a brighten to
323
+ add to a filled chip anyway; the lift is the feedback. */
324
+ .axi-chip--action { cursor: pointer; }
325
+ .axi-chip--action:where(:hover) {
326
+ box-shadow: var(--axi-shadow-control);
327
+ transform: translate(-2px, -2px);
328
+ }
329
+
298
330
  /* ---------- count badge ---------- */
299
331
  .axi-badge-count {
300
332
  display: inline-block;