@apliteni/apliteni-ui 0.196.0 → 0.196.1

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.
@@ -869,6 +869,12 @@ gives less vertical space, and `pad="lg"` makes a centred landing card. `icon` a
869
869
  centred on the title line. On a touch phone the tools stand `--tap-gap` apart. A `Chart` in a
870
870
  titled card puts its Chart and Table switch there.
871
871
 
872
+ **A card on the light page.** A card draws no box, and its text and its table text start on the
873
+ page title's edge. To do this, the card hangs outside its container by its side inset: 24px, and
874
+ 16px at 720px and below. The page shell pads enough for this at every width. If you put a light
875
+ card in another container, pad each side of the container by at least the hang, or the page
876
+ scrolls sideways. A tinted card, a landing card and a stat tile keep their box and do not hang.
877
+
872
878
  **Setting rows.** A setting row keeps its choice on one line. On a phone, the control stands under
873
879
  its label and hint. Use `ui-card__row--tight-choice` for a three-option row that must stay on one
874
880
  line below 360px.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.196.0",
3
+ "version": "0.196.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -10,6 +10,7 @@
10
10
  why: docs/foundations.md#elevation */
11
11
  .ui-card {
12
12
  --ui-card-ground: var(--surface); /* the ground a scrolling row inside covers its edge with; a tint repeats it below */
13
+ --ui-card-inset: var(--space-6); /* the side inset, which a table or a viewer in the card bleeds through */
13
14
  background: var(--surface);
14
15
  border: 1px solid var(--card-edge);
15
16
  box-shadow: var(--elev-rest);
@@ -34,14 +35,21 @@
34
35
  centred landing card, which keeps its own inset and never hangs out. #850 */
35
36
  :root[data-theme="light"] .ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) {
36
37
  padding-block: 0;
37
- margin-inline: calc(-1 * var(--space-6));
38
+ margin-inline: calc(-1 * var(--ui-card-inset));
38
39
  }
39
- @media (max-width: 560px) {
40
+ /* The folded shell pads the page by --space-4, so the hang shrinks to it. A hang of 24px
41
+ put the card and its table 8px past the page from 561 to 720px. #875 */
42
+ @media (max-width: 720px) {
40
43
  :root[data-theme="light"] .ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) {
41
- padding-inline: var(--space-4);
42
- margin-inline: calc(-1 * var(--space-4));
44
+ --ui-card-inset: var(--space-4);
45
+ padding-inline: var(--ui-card-inset);
43
46
  }
44
47
  }
48
+ /* A light stat tile keeps its box and its 24px inset from 561 to 720px. On a phone it pads
49
+ 16px, as it did before #875. */
50
+ @media (max-width: 560px) {
51
+ :root[data-theme="light"] .ui-stats--tiles { --ui-tile-inset: var(--space-4); }
52
+ }
45
53
 
46
54
  /* A table wider than its card scrolls INSIDE the card instead of bleeding past
47
55
  the rounded corners / clipping its last column. Clipping to the card's
@@ -109,7 +117,7 @@
109
117
  object and the row above it as the tools. Decided on #736.
110
118
  why: docs/foundations.md#elevation */
111
119
  .ui-card__viewer {
112
- margin: var(--space-4) calc(-1 * var(--space-6)) 0;
120
+ margin: var(--space-4) calc(-1 * var(--ui-card-inset)) 0;
113
121
  border-top: 1px solid var(--card-edge);
114
122
  }
115
123
  .ui-card__viewer > .ui-toolbar {
@@ -285,7 +293,7 @@
285
293
  .ui-card__glyph svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
286
294
 
287
295
  /* A soft line between blocks: a straight hairline across the column width on the
288
- block's top edge, with one inner gap of air under it. A light card hangs --space-6
296
+ block's top edge, with one inner gap of air under it. A light card hangs its side inset
289
297
  outside the column, but its own padding keeps the line on the column's width, and
290
298
  the ::before draws straight where a border would follow the rounded corner. Dark
291
299
  cards are boxed and already separate, so only the light rule draws.
@@ -132,6 +132,7 @@ dd.ui-stat__caption { contain: inline-size; }
132
132
  tiles is tightly placed, so each tile keeps its soft edge and its padding.
133
133
  The edge is the card's own --card-edge in both themes. */
134
134
  :root[data-theme="light"] .ui-stats--tiles .ui-stat.ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) {
135
+ --ui-card-inset: var(--ui-tile-inset, var(--space-6)); /* a tile keeps its box, so the folded page does not narrow it. card.css sets the phone inset */
135
136
  border: 1px solid var(--card-edge);
136
137
  padding-block: var(--space-5);
137
138
  margin-inline: 0;
@@ -600,17 +600,18 @@ a.ui-identity:hover { text-decoration: underline; }
600
600
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act .ui-btn { margin-block: calc(-1 * (var(--btn-pad-y) + var(--btn-edge-width))); }
601
601
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act .ui-btn--icon { box-sizing: border-box; width: var(--space-8); height: var(--space-8); padding: 0; justify-content: center; vertical-align: top; margin-block: calc((var(--ui-cell-line) - var(--space-8)) / 2); }
602
602
 
603
- /* In a card the table, or its frame, reaches the card's edges, so a row's fill does too. */
603
+ /* In a card the table, or its frame, reaches the card's edges, so a row's fill does too. It
604
+ bleeds by the card's own side inset, which is less in a light card on a narrow page. #875 */
604
605
  .ui-card > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))) {
605
- width: calc(100% + 2 * var(--space-6));
606
+ width: calc(100% + 2 * var(--ui-card-inset));
606
607
  max-width: none;
607
- margin-inline: calc(-1 * var(--space-6));
608
+ margin-inline: calc(-1 * var(--ui-card-inset));
608
609
  }
609
610
  .ui-card > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))):first-child { margin-top: calc(-1 * var(--space-6)); }
610
611
  .ui-card > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))):last-child { margin-bottom: calc(-1 * var(--space-6)); }
611
612
  .ui-card--pad-sm > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))):first-child { margin-top: calc(-1 * var(--space-5)); }
612
613
  .ui-card--pad-sm > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))):last-child { margin-bottom: calc(-1 * var(--space-5)); }
613
- .ui-card--fit > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))) { width: auto; max-width: calc(100% + 2 * var(--space-6)); }
614
+ .ui-card--fit > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))) { width: auto; max-width: calc(100% + 2 * var(--ui-card-inset)); }
614
615
  /* #850: on the light page a table in a card sits on the column, so its rules and its end
615
616
  cells end on the column edges. The frame keeps its side bands below.
616
617
  why: docs/foundations.md#spacing-and-rhythm */
@@ -619,6 +620,20 @@ a.ui-identity:hover { text-decoration: underline; }
619
620
  max-width: 100%;
620
621
  margin-inline: 0;
621
622
  }
623
+ /* #875: a light card with no box hangs its own inset outside the column, so a table in it
624
+ takes no bleed of its own and its end cells meet the page title's edge. A frame hangs out
625
+ by its side band only. The selector names the light card as card.css does, so it outranks
626
+ each bleed above. A row fill stays inside the page. */
627
+ :root[data-theme="light"] .ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) > .ui-table {
628
+ width: 100%;
629
+ max-width: 100%;
630
+ margin-inline: 0;
631
+ }
632
+ :root[data-theme="light"] .ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) > .ui-table-scroll {
633
+ width: calc(100% + 2 * var(--space-1));
634
+ max-width: none;
635
+ margin-inline: calc(-1 * var(--space-1));
636
+ }
622
637
  /* #850: the row table's vertical bleed hangs it out by the card's 24px padding, but the
623
638
  light card removed that padding. The card clips its overflow, so the last row was cut and
624
639
  faded at the bottom. Reset the two ends to 0. why: docs/foundations.md#spacing-and-rhythm */