@apliteni/apliteni-ui 0.179.2 → 0.181.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/docs/components.md +56 -15
- package/guidelines/INDEX.md +1 -1
- package/guidelines/account-and-settings.md +13 -13
- package/guidelines/the-page.md +12 -0
- package/package.json +1 -1
- package/react/README.md +14 -0
- package/react/dist/index.css +117 -0
- package/react/dist/index.d.ts +55 -12
- package/react/dist/index.js +268 -172
- package/src/styles/card.css +10 -1
- package/src/styles/layout.css +6 -2
- package/src/styles/nav.css +14 -1
- package/src/styles/table.css +17 -0
- package/src/tokens/tokens.css +3 -0
package/src/styles/card.css
CHANGED
|
@@ -179,8 +179,17 @@
|
|
|
179
179
|
/* The Theme choice needs 195px and the narrowest settings row gives it 160. Its pills
|
|
180
180
|
give up inline padding as the viewport narrows. Other choices keep their tap width. */
|
|
181
181
|
@media (max-width: 560px) {
|
|
182
|
+
.ui-card__row--tight-choice > .ui-seg:not(.ui-seg--sm):not(.ui-seg--underline) {
|
|
183
|
+
--ui-row-choice-pad: clamp(var(--space-1), calc(var(--space-3) - (360px - 100vw) * 0.3), var(--space-3));
|
|
184
|
+
}
|
|
182
185
|
.ui-card__row--tight-choice > .ui-seg:not(.ui-seg--sm):not(.ui-seg--underline) button {
|
|
183
|
-
padding-inline:
|
|
186
|
+
padding-inline: var(--ui-row-choice-pad);
|
|
187
|
+
}
|
|
188
|
+
/* A stacked choice draws no track on the card, so its first label goes back to the
|
|
189
|
+
row's text edge: the track's padding plus the first pill's. The pill hangs into the
|
|
190
|
+
card's padding. why: guidelines/spacing.md#put-text-on-the-column-edge */
|
|
191
|
+
.ui-card__row > .ui-seg:not(.ui-seg--underline) {
|
|
192
|
+
margin-inline-start: calc(-1 * (var(--space-1) + var(--ui-row-choice-pad, var(--space-3))));
|
|
184
193
|
}
|
|
185
194
|
}
|
|
186
195
|
.ui-card__row + .ui-card__row { border-top: 1px solid var(--border); }
|
package/src/styles/layout.css
CHANGED
|
@@ -535,8 +535,8 @@
|
|
|
535
535
|
starts at the panel's edge like the rows above it. */
|
|
536
536
|
.ui-app__drawer .ui-nav--side,
|
|
537
537
|
.ui-app__drawer .ui-nav--side > * { width: 100%; }
|
|
538
|
-
/* The panel's title names
|
|
539
|
-
.ui-app__drawer .ui-nav__cap { display: none; }
|
|
538
|
+
/* The panel's title names one section's list, so its caption stays out; group labels stay (#843). */
|
|
539
|
+
.ui-app__drawer .ui-nav--side:not(:has(> .ui-nav__section + .ui-nav__section)) .ui-nav__cap { display: none; }
|
|
540
540
|
.ui-app__drawer .ui-drawer__footer { justify-content: flex-start; }
|
|
541
541
|
.ui-app__drawer .ui-app__user { width: 100%; }
|
|
542
542
|
/* A finger is the only pointer this width has, so a row and the account block are
|
|
@@ -771,3 +771,7 @@
|
|
|
771
771
|
forced-color-adjust: auto; background: Canvas; color: CanvasText; border-color: CanvasText;
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
+
|
|
775
|
+
/* A folded sub-row has no glyph, so its floating name took the row's only line box with it
|
|
776
|
+
and the row shrank under the pointer. It keeps one line and its padding (#843). */
|
|
777
|
+
:where(.ui-app.is-collapsed) .ui-app__rail .ui-nav__item:not(:has(.ui-nav__ic)) { min-height: calc(1lh + 18px); /* one line plus the row's 9px padding, top and bottom */ }
|
package/src/styles/nav.css
CHANGED
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
forced-color-adjust: none;
|
|
412
412
|
background: Highlight !important;
|
|
413
413
|
color: HighlightText !important;
|
|
414
|
-
--ring: var(--ring-width) solid CanvasText;
|
|
414
|
+
--ring: var(--ring-width) solid CanvasText; --ring-scroll: var(--ring); /* the row draws --ring-scroll, which the root resolved (#843) */
|
|
415
415
|
}
|
|
416
416
|
.ui-nav__item.is-active:not(.is-disabled) .ui-nav__ic svg,
|
|
417
417
|
.ui-nav__item.is-current:not(.is-disabled) .ui-nav__ic svg,
|
|
@@ -454,3 +454,16 @@
|
|
|
454
454
|
/* The fill is the one mark, so the underline bar, which would paint the accent inside it, is gone. */
|
|
455
455
|
.ui-nav--tabs.is-underline .ui-nav__tab.is-active::after { display: none; /* motion: still — the bar is not drawn while the fill marks the tab */ }
|
|
456
456
|
}
|
|
457
|
+
|
|
458
|
+
/* The parent of the current sub-item takes the current row's ink and weight, so the place
|
|
459
|
+
shows while its list is closed. In the folded rail its full-ink glyph is the mark (#843). */
|
|
460
|
+
.ui-nav__toggle.is-current { color: var(--strong); font-weight: 500; }
|
|
461
|
+
|
|
462
|
+
/* In forced colours a background becomes the canvas, so a folded sub-row's dot vanished.
|
|
463
|
+
A border keeps it: the engine paints it in the text colour, and a filled current row,
|
|
464
|
+
which opts out of the forced palette, keeps its own ink. The second selector is the
|
|
465
|
+
shell's folded rail, which layout.css marks on .ui-app (#843). */
|
|
466
|
+
@media (forced-colors: active) {
|
|
467
|
+
.ui-nav--side.is-collapsed .ui-nav__item:not(:has(.ui-nav__ic))::after,
|
|
468
|
+
:where(.ui-app.is-collapsed) .ui-app__rail .ui-nav__item:not(:has(.ui-nav__ic))::after { box-sizing: border-box; background: none; border: 2.5px solid currentColor; }
|
|
469
|
+
}
|
package/src/styles/table.css
CHANGED
|
@@ -405,6 +405,19 @@
|
|
|
405
405
|
@container not scroll-state(scrollable: x) {
|
|
406
406
|
.ui-table--pinned :is(.ui-table__identity, .ui-table__selection) { border-right-color: transparent; }
|
|
407
407
|
}
|
|
408
|
+
/* Once the frame is scrolled, the next column's text keeps its cell padding from the
|
|
409
|
+
divider: the pinned cell lays its own ground over that padding, so the text that moves
|
|
410
|
+
under the pin stops short of the line. A frame at rest paints nothing more. The gap is
|
|
411
|
+
the next cell's padding, set beside each padding rule below. Below 720px the cell cuts
|
|
412
|
+
what overflows it, so its cut reaches past the divider to hold the widest band, 12px and
|
|
413
|
+
the 1px line. A plain step, because Chromium computes a calc() here as 0px. why: #845 */
|
|
414
|
+
@container scroll-state(scrollable: left) {
|
|
415
|
+
.ui-table--pinned .ui-table__identity { overflow-clip-margin: var(--space-4); }
|
|
416
|
+
.ui-table--pinned .ui-table__identity::after {
|
|
417
|
+
content: ''; position: absolute; top: 0; bottom: 0; left: calc(100% + 1px);
|
|
418
|
+
width: var(--ui-table-pin-gap, var(--space-3)); background: inherit; pointer-events: none;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
408
421
|
.ui-value, .ui-delta { white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
409
422
|
.ui-value__unit { margin-left: var(--space-1); font-size: var(--text-xs); color: var(--text); }
|
|
410
423
|
.ui-delta--success { color: var(--chip-success-ink); }
|
|
@@ -545,6 +558,10 @@ a.ui-identity:hover { text-decoration: underline; }
|
|
|
545
558
|
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) .ui-table__identity + :is(th, td) { padding-left: var(--space-2); }
|
|
546
559
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) .ui-table__identity { padding-right: calc(var(--cell-gap) / 2); }
|
|
547
560
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) .ui-table__identity + :is(th, td) { padding-left: calc(var(--cell-gap) / 2); }
|
|
561
|
+
/* The scrolled frame's gap after the divider, the same as the padding above. A dense or
|
|
562
|
+
compact cell pads by --space-3, the gap's fallback. */
|
|
563
|
+
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) .ui-table__identity { --ui-table-pin-gap: var(--space-2); }
|
|
564
|
+
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) .ui-table__identity { --ui-table-pin-gap: calc(var(--cell-gap) / 2); }
|
|
548
565
|
/* A link that fills a pinned cell carries the cell's padding, so it gives up the same half. */
|
|
549
566
|
.ui-table--pinned:not(.ui-table--dense):not(.ui-table--compact) td.ui-table__identity.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-right: var(--space-2); }
|
|
550
567
|
.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):is(.ui-table--pinned) td.ui-table__identity.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-right: calc(var(--cell-gap) / 2); }
|
package/src/tokens/tokens.css
CHANGED
|
@@ -115,7 +115,9 @@
|
|
|
115
115
|
/* ============================================================================
|
|
116
116
|
* DARK THEME (default) — deck palette from viz/index.html
|
|
117
117
|
* ========================================================================== */
|
|
118
|
+
/* A ThemeChoice scene draws this theme inside a page of either theme. */
|
|
118
119
|
:root,
|
|
120
|
+
.ui-theme-choice__scene--dark,
|
|
119
121
|
:root[data-theme="dark"] {
|
|
120
122
|
color-scheme: dark;
|
|
121
123
|
|
|
@@ -369,6 +371,7 @@
|
|
|
369
371
|
* A document sheet (.ui-card__page) takes this palette in both themes: the document
|
|
370
372
|
* is paper, so it stays white with dark ink on a dark stage too. Decided on #736.
|
|
371
373
|
* ========================================================================== */
|
|
374
|
+
.ui-theme-choice__scene--light,
|
|
372
375
|
.ui-card__page,
|
|
373
376
|
:root[data-theme="light"] {
|
|
374
377
|
color-scheme: light;
|