@apliteni/apliteni-ui 0.190.0 → 0.194.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.
@@ -60,10 +60,10 @@
60
60
 
61
61
  /* Vertical stacks space cards with the container's gap — see .ui-card-stack.
62
62
  (No `.ui-card + .ui-card` margin: it leaks into grid/flex rows and misaligns.) */
63
- .ui-card-stack { display: flex; flex-direction: column; gap: var(--space-5); }
63
+ .ui-card-stack { --ui-block-gap: var(--space-5); display: flex; flex-direction: column; gap: var(--ui-block-gap); }
64
64
  /* #850: on the light page a card draws no box, so the stack opens to the page's group gap.
65
65
  why: docs/foundations.md#spacing-and-rhythm */
66
- :root[data-theme="light"] .ui-card-stack { gap: var(--space-10); }
66
+ :root[data-theme="light"] .ui-card-stack { --ui-block-gap: var(--space-10); gap: var(--ui-block-gap); }
67
67
 
68
68
  /* A padding modifier moves the vertical rhythm and keeps the text edge, so cards of
69
69
  different padding line up in one column. --pad-lg is the centred landing card, never
@@ -432,10 +432,12 @@
432
432
  .ui-app__main .ui-app__title-row > h1 { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
433
433
  /* The tools wrap at the narrowest phone, so a period picker and a view action stay in the column. #832 */
434
434
  .ui-app__tools { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: var(--space-3); max-width: 100%; }
435
- .ui-app__body { display: flex; flex-direction: column; gap: var(--space-5); }
435
+ /* --ui-block-gap is the gap between two blocks. A control row above a block reads it, so
436
+ its margin holds in each theme. */
437
+ .ui-app__body { --ui-block-gap: var(--space-5); display: flex; flex-direction: column; gap: var(--ui-block-gap); }
436
438
  /* #850: on the light page a card draws no box, so the body opens to the page's group gap.
437
439
  why: docs/foundations.md#spacing-and-rhythm */
438
- :root[data-theme="light"] .ui-app__body { gap: var(--space-10); }
440
+ :root[data-theme="light"] .ui-app__body { --ui-block-gap: var(--space-10); gap: var(--ui-block-gap); }
439
441
  /* A stat band closes one section, so the block after it keeps the group gap on
440
442
  top of the body's: the air the old soft line used to give, now as space alone.
441
443
  why: guidelines/dashboards-and-reports.md, #850 */
@@ -463,9 +465,11 @@
463
465
  on the page meets its table card at the same distance. Not on the last row:
464
466
  there the gap is the page's bottom and nothing is being narrowed. tap-zone.css
465
467
  widens it on a touch phone. why: docs/foundations.md#spacing-and-rhythm */
466
- :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child) { margin-bottom: calc(var(--space-2) - var(--space-5)); }
467
- :root[data-theme="light"] :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child) { margin-bottom: calc(var(--space-2) - var(--space-10)); }
468
+ :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child) { margin-bottom: calc(var(--space-2) - var(--ui-block-gap)); }
468
469
  .ui-stack > .ui-toolbar + * { margin-top: var(--space-2); }
470
+ /* An open figure has no surface and no padding, so the row keeps 24px to its label: a
471
+ recorded exception to the inner gap, also on a touch phone. why: docs/components.md#stat-bands, #849 */
472
+ :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:has(+ .ui-stats--open) { margin-bottom: calc(var(--space-6) - var(--ui-block-gap)); }
469
473
  /* A filter bar inside its table's card sits one inner gap above the table, the
470
474
  same step the card title keeps above the bar. why: guidelines/dense-tables.md */
471
475
  .ui-card > .ui-toolbar:not(:last-child) { margin-bottom: var(--space-2); }
@@ -2,7 +2,7 @@
2
2
  * Stat band — .ui-stats (a row of key figures: label, value, change, trend)
3
3
  * .ui-stats--tiles one card per figure — the default
4
4
  * .ui-stats--band one card, figures divided by space
5
- * .ui-stats--open no surface; a rule over each figure
5
+ * .ui-stats--open no surface and no rule; space and a larger value divide
6
6
  * why: docs/components.md#stat-bands
7
7
  * ========================================================================== */
8
8
 
@@ -77,6 +77,17 @@ dd.ui-stat__caption { margin-top: var(--space-2); }
77
77
  line-height: var(--leading-snug);
78
78
  }
79
79
  .ui-stat__delta svg { width: 14px; height: 14px; flex: none; stroke-width: 2.7; } /* 2.7 of a 24 box drawn at 14px = 1.58 CSS px. docs/foundations.md#icons-and-glyphs */
80
+ /* A change with a tooltip holds its arrow inside the focus target, set as the row sets it.
81
+ The focus ring's block padding is lent back, so focus moves no line. #849 */
82
+ .ui-stat__delta .ui-tip-host > .ui-focusable { display: inline-flex; align-items: center; gap: var(--space-1); vertical-align: top; }
83
+ .ui-stat__delta .ui-tip-host > .ui-focusable:focus-visible { margin-block: calc(-1 * var(--space-1)); }
84
+ /* On a touch phone the change is its own 44px target in the row, as an underline tab is.
85
+ The figure grows by the difference, and no layer reaches past the target into a
86
+ neighbour. The ring goes round the target's own box, so it lends no padding. #849 */
87
+ @media (max-width: 560px) and (pointer: coarse) {
88
+ .ui-stat__delta .ui-tip-host > .ui-focusable { min-inline-size: var(--tap-min, 44px); min-block-size: var(--tap-min, 44px); }
89
+ .ui-stat__delta .ui-tip-host > .ui-focusable:focus-visible { padding: 0; margin: 0; }
90
+ }
80
91
  .ui-stat__change { font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
81
92
  .ui-stat__basis { color: var(--text); font-weight: var(--weight-normal); }
82
93
 
@@ -126,13 +137,7 @@ dd.ui-stat__caption { contain: inline-size; }
126
137
  margin-inline: 0;
127
138
  }
128
139
 
129
- .ui-stats--open .ui-stat {
130
- border-top: 1px solid var(--border-strong);
131
- padding-top: var(--space-4);
132
- }
133
- /* #850: on the light page no hairline above an open stat; the value is the signal. */
134
- :root[data-theme="light"] .ui-stats--open .ui-stat { border-top: 0; }
135
- /* #850 round 34: without that rule the light open figures read as one band, so a
140
+ /* #850 round 34: on one white ground the light open figures read as one band, so a
136
141
  vertical soft line between figures in a row keeps the columns apart. The line
137
142
  stops where a figure starts a new row: the odd fold stacks every figure, and the
138
143
  pairs fold starts its second row at the third figure. The column gap halves so the
@@ -124,8 +124,7 @@
124
124
  and declared SMALL on purpose: the pill rule above hands every strip
125
125
  --tap-gap, and this one has 4px of row to give, not 20. So a layer here can
126
126
  never reach past the gap it was promised, whatever a tab draws. A pill draws
127
- 31 tall and does want the full 20. #527, measured in
128
- stories/segmented-wrap.test.js. */
127
+ 31 tall and does want the full 20. #527 */
129
128
  .ui-seg--underline { row-gap: var(--space-1, 4px) !important; --tap-clear-y: var(--space-1, 4px); }
130
129
 
131
130
  /* Tabs are wide enough across; down, the panel under them has the room. */
@@ -148,8 +147,9 @@
148
147
  .ui-toolbar--split .ui-filter-bar { column-gap: calc(var(--tap-gap) + var(--space-1) + 1px) !important; }
149
148
  /* The table under a filter bar moves down with the chips: the bar's inner gap
150
149
  opens to --tap-gap too, so the last row's layers stop short of the table.
151
- In .ui-stack the bar's margin collapses with the block's 8px one. */
152
- :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child) { margin-bottom: calc(var(--tap-gap) - var(--space-10)) !important; }
150
+ The stack's own gap is --ui-block-gap in each theme, so the margin takes it back.
151
+ In .ui-stack the bar's margin collapses with the block's 8px one. An open band keeps its 24px. */
152
+ :is(.ui-app__body, .ui-card-stack) > .ui-toolbar:not(:last-child, :has(+ .ui-stats--open)) { margin-bottom: calc(var(--tap-gap) - var(--ui-block-gap, 0px)) !important; }
153
153
  .ui-stack > .ui-toolbar:not(:last-child) { margin-bottom: var(--tap-gap) !important; --tap-clear-y: var(--tap-gap); }
154
154
 
155
155
  /* Inside a chip there is nothing to open: parting the value from its remove