@apliteni/apliteni-ui 0.98.0 → 0.100.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/package.json +1 -1
- package/react/dist/index.css +19 -3
- package/react/dist/index.js +9 -6
- package/src/styles/layout.css +4 -1
- package/src/styles/table.css +68 -1
- package/src/tokens/tokens.css +2 -0
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -820,7 +820,7 @@
|
|
|
820
820
|
.rx-toast-stack {
|
|
821
821
|
position: fixed;
|
|
822
822
|
right: var(--space-4);
|
|
823
|
-
bottom: var(--space-4);
|
|
823
|
+
bottom: calc(var(--space-4) + var(--ui-app-bottom-clearance, 0px));
|
|
824
824
|
max-width: calc(100% - 2 * var(--space-4));
|
|
825
825
|
z-index: var(--z-toast);
|
|
826
826
|
pointer-events: none;
|
|
@@ -846,15 +846,28 @@
|
|
|
846
846
|
.ui-react-app__bottom .ui-nav__item {
|
|
847
847
|
min-height: 48px;
|
|
848
848
|
}
|
|
849
|
+
.ui-react-app:not(:has(> .ui-app__rail)) {
|
|
850
|
+
grid-template-columns: minmax(0, 1fr);
|
|
851
|
+
}
|
|
852
|
+
.ui-react-app .ui-app__bar > .ui-app__brand {
|
|
853
|
+
flex: none;
|
|
854
|
+
margin-inline-end: var(--space-2);
|
|
855
|
+
}
|
|
849
856
|
@media (max-width: 560px) {
|
|
857
|
+
:root:has(.ui-react-app__bottom) {
|
|
858
|
+
--ui-app-bottom-clearance: calc(96px + env(safe-area-inset-bottom));
|
|
859
|
+
}
|
|
860
|
+
:root:has(.ui-react-app) {
|
|
861
|
+
scroll-padding-bottom: calc(var(--space-5) + var(--ui-app-bottom-clearance, 0px));
|
|
862
|
+
}
|
|
850
863
|
.ui-react-app {
|
|
851
864
|
display: block;
|
|
852
865
|
}
|
|
853
866
|
.ui-react-app > .ui-app__rail {
|
|
854
867
|
display: none;
|
|
855
868
|
}
|
|
856
|
-
.ui-react-app .ui-app__main {
|
|
857
|
-
padding-bottom:
|
|
869
|
+
:root:has(.ui-react-app__bottom) .ui-react-app .ui-app__main {
|
|
870
|
+
padding-bottom: var(--ui-app-bottom-clearance, 0px);
|
|
858
871
|
}
|
|
859
872
|
.ui-react-app .ui-app__bar {
|
|
860
873
|
padding-inline: var(--space-4);
|
|
@@ -865,6 +878,9 @@
|
|
|
865
878
|
.ui-react-app .ui-app__search kbd {
|
|
866
879
|
display: none;
|
|
867
880
|
}
|
|
881
|
+
.ui-react-app .ui-app__bar > .ui-app__brand {
|
|
882
|
+
display: none;
|
|
883
|
+
}
|
|
868
884
|
.ui-react-app__bottom {
|
|
869
885
|
display: block;
|
|
870
886
|
position: fixed;
|
package/react/dist/index.js
CHANGED
|
@@ -3488,15 +3488,17 @@ function AppShell({
|
|
|
3488
3488
|
}
|
|
3489
3489
|
);
|
|
3490
3490
|
const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
|
|
3491
|
+
const navigable = sections.length > 1 || Boolean(back);
|
|
3491
3492
|
const visible = sections.length > 4 ? sections.slice(0, 3) : sections;
|
|
3492
3493
|
const remaining = sections.slice(visible.length);
|
|
3493
3494
|
const initials = account.name.trim().split(/\s+/).map((part) => part[0]).slice(0, 2).join("");
|
|
3495
|
+
const lockup = /* @__PURE__ */ jsxs29("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
|
|
3496
|
+
brand ?? /* @__PURE__ */ jsx34("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
|
|
3497
|
+
/* @__PURE__ */ jsx34("span", { children: word })
|
|
3498
|
+
] });
|
|
3494
3499
|
return /* @__PURE__ */ jsxs29("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
|
|
3495
|
-
/* @__PURE__ */ jsxs29("div", { className: "ui-app__rail", children: [
|
|
3496
|
-
/* @__PURE__ */ jsx34("div", { className: "ui-app__head", children:
|
|
3497
|
-
brand ?? /* @__PURE__ */ jsx34("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
|
|
3498
|
-
/* @__PURE__ */ jsx34("span", { children: word })
|
|
3499
|
-
] }) }),
|
|
3500
|
+
navigable && /* @__PURE__ */ jsxs29("div", { className: "ui-app__rail", children: [
|
|
3501
|
+
/* @__PURE__ */ jsx34("div", { className: "ui-app__head", children: lockup }),
|
|
3500
3502
|
sidebar(sections, "Sections"),
|
|
3501
3503
|
/* @__PURE__ */ jsx34("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx34("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs29("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
|
|
3502
3504
|
/* @__PURE__ */ jsx34("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs29("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
@@ -3509,6 +3511,7 @@ function AppShell({
|
|
|
3509
3511
|
] }),
|
|
3510
3512
|
/* @__PURE__ */ jsxs29("div", { className: "ui-app__well", children: [
|
|
3511
3513
|
/* @__PURE__ */ jsxs29("header", { className: "ui-app__bar", children: [
|
|
3514
|
+
!navigable && lockup,
|
|
3512
3515
|
/* @__PURE__ */ jsxs29("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
|
|
3513
3516
|
/* @__PURE__ */ jsx34("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx34(Icon, { name: "search" }) }),
|
|
3514
3517
|
/* @__PURE__ */ jsx34("span", { className: "ui-app__search-txt", children: "Search or run a command\u2026" }),
|
|
@@ -3544,7 +3547,7 @@ function AppShell({
|
|
|
3544
3547
|
/* @__PURE__ */ jsx34("div", { className: "ui-app__body", children })
|
|
3545
3548
|
] })
|
|
3546
3549
|
] }),
|
|
3547
|
-
/* @__PURE__ */ jsx34("nav", { className: "ui-nav ui-react-app__bottom", "aria-label": "Sections on mobile", children: /* @__PURE__ */ jsxs29("ul", { className: "ui-nav__list", children: [
|
|
3550
|
+
navigable && /* @__PURE__ */ jsx34("nav", { className: "ui-nav ui-react-app__bottom", "aria-label": "Sections on mobile", children: /* @__PURE__ */ jsxs29("ul", { className: "ui-nav__list", children: [
|
|
3548
3551
|
links(visible),
|
|
3549
3552
|
remaining.length > 0 && /* @__PURE__ */ jsx34("li", { children: /* @__PURE__ */ jsxs29(
|
|
3550
3553
|
"button",
|
package/src/styles/layout.css
CHANGED
|
@@ -422,7 +422,10 @@
|
|
|
422
422
|
letter-spacing: var(--tracking-tight);
|
|
423
423
|
margin-bottom: 8px;
|
|
424
424
|
}
|
|
425
|
-
|
|
425
|
+
/* The head keeps the kit's second step below it whether or not a lede is there to
|
|
426
|
+
carry it: with no lede the title's own margin takes the step instead. */
|
|
427
|
+
.ui-app__main h1:not(.ui-card h1):not(:has(+ .ui-app__sub)) { margin-bottom: var(--space-8); }
|
|
428
|
+
.ui-app__sub { color: var(--text); font-size: calc(var(--text-base) + 0.5px); line-height: 1.6; max-width: var(--prose-body); margin-bottom: var(--space-8); }
|
|
426
429
|
.ui-app__body { display: flex; flex-direction: column; gap: var(--space-5); }
|
|
427
430
|
/* A flex child's min-width is its content by default, so one wide block — a
|
|
428
431
|
ledger, a code sample — pushes the whole page sideways instead of scrolling
|
package/src/styles/table.css
CHANGED
|
@@ -204,7 +204,35 @@
|
|
|
204
204
|
.ui-table--compact th { padding: var(--space-2) var(--space-3); }
|
|
205
205
|
.ui-table--compact th:last-child,
|
|
206
206
|
.ui-table--compact td:last-child { padding-right: var(--space-3); }
|
|
207
|
-
|
|
207
|
+
/* Columns past the box's edge, said in paint. Two shades, one per side, under two
|
|
208
|
+
cover layers that ride the content: `local` moves a cover with the scroll, so
|
|
209
|
+
reaching an end slides that cover over its shade. A cover is solid for its first
|
|
210
|
+
half, so at 24px it hides a 12px shade outright — which is why the two sizes are
|
|
211
|
+
not one. why: guidelines/dense-tables.md */
|
|
212
|
+
.ui-table-scroll {
|
|
213
|
+
overflow: auto; max-height: var(--ui-table-height, 70vh); padding: 0 var(--space-1);
|
|
214
|
+
background-color: var(--table-bg);
|
|
215
|
+
background-image:
|
|
216
|
+
linear-gradient(to right, var(--table-bg) 50%, transparent),
|
|
217
|
+
linear-gradient(to left, var(--table-bg) 50%, transparent),
|
|
218
|
+
radial-gradient(farthest-side at 0 50%, var(--table-edge), transparent),
|
|
219
|
+
radial-gradient(farthest-side at 100% 50%, var(--table-edge), transparent);
|
|
220
|
+
background-position: 0 0, 100% 0, 0 0, 100% 0;
|
|
221
|
+
background-size: var(--space-6) 100%, var(--space-6) 100%, var(--space-3) 100%, var(--space-3) 100%;
|
|
222
|
+
background-repeat: no-repeat;
|
|
223
|
+
background-attachment: local, local, scroll, scroll;
|
|
224
|
+
}
|
|
225
|
+
/* The edge darkens on a light ground and lightens on a dark one: ink has nowhere to
|
|
226
|
+
go on a near-black page, which is why --elev-drop splits its spend and a raised
|
|
227
|
+
dark surface takes a light --elev-edge. */
|
|
228
|
+
.ui-table-scroll { --table-edge: color-mix(in srgb, var(--sheen) 12%, transparent); }
|
|
229
|
+
:root[data-theme="light"] .ui-table-scroll { --table-edge: color-mix(in srgb, var(--shadow-ink) 13%, transparent); }
|
|
230
|
+
/* The surface belongs to the box that scrolls, so the shades land under the cells
|
|
231
|
+
rather than behind them; the row fills repeat that same surface and step aside.
|
|
232
|
+
The sticky header and pinned column keep their paint: they hide what scrolls
|
|
233
|
+
beneath them. */
|
|
234
|
+
.ui-table-scroll > .ui-table,
|
|
235
|
+
.ui-table-scroll > .ui-table tbody td:not(.ui-table__identity, .ui-table__selection) { background-color: transparent; }
|
|
208
236
|
/* The kit's first ringed scroller, and a scroll region inside a card like the rest, so
|
|
209
237
|
it draws the band inward too rather than spending a halo across the card around it.
|
|
210
238
|
It had no room of its own to draw in — the padding above is horizontal — which is the
|
|
@@ -216,6 +244,45 @@
|
|
|
216
244
|
.ui-table--sticky thead th { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--table-bg); padding-top: var(--space-2); }
|
|
217
245
|
.ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection { position: sticky; left: 0; z-index: var(--z-base); background: var(--table-bg); border-right: 1px solid var(--border); }
|
|
218
246
|
.ui-table--pinned thead .ui-table__identity, .ui-table--pinned thead .ui-table__selection { z-index: calc(var(--z-sticky) + 1); }
|
|
247
|
+
/* The divider is the pin's edge: it says the column stayed while the rest moved under it.
|
|
248
|
+
Columns that all fit never move, so the line divides nothing and reads as an arbitrary
|
|
249
|
+
rule. The resting rule keeps it, so an engine that cannot answer the query is unchanged;
|
|
250
|
+
scroll-state makes a query container, not a size one. why: guidelines/dense-tables.md */
|
|
251
|
+
.ui-table-scroll { container-type: scroll-state; }
|
|
252
|
+
/* A shared grid cell puts the edge shade over the opaque sticky header, on both
|
|
253
|
+
sides: the radial-gradient shades below answer only the table's own background
|
|
254
|
+
and fall to nothing where the sticky header paints over them, so an engine that
|
|
255
|
+
can ask whether the scrollport still has room sticks a shade of its own above
|
|
256
|
+
it instead and the base radial pair is sized to 0 here. #434 review round 2 */
|
|
257
|
+
@supports (container-type: scroll-state) {
|
|
258
|
+
.ui-table-scroll {
|
|
259
|
+
display: grid;
|
|
260
|
+
grid-template-columns: minmax(0, 1fr);
|
|
261
|
+
background-size: var(--space-6) 100%, var(--space-6) 100%, 0 100%, 0 100%;
|
|
262
|
+
}
|
|
263
|
+
.ui-table-scroll > .ui-table { grid-area: 1 / 1; }
|
|
264
|
+
.ui-table-scroll::before,
|
|
265
|
+
.ui-table-scroll::after {
|
|
266
|
+
content: '';
|
|
267
|
+
grid-area: 1 / 1;
|
|
268
|
+
position: sticky;
|
|
269
|
+
top: 0;
|
|
270
|
+
width: var(--space-3);
|
|
271
|
+
z-index: calc(var(--z-sticky) + 2);
|
|
272
|
+
pointer-events: none;
|
|
273
|
+
}
|
|
274
|
+
.ui-table-scroll::before { left: 0; right: calc(100% - var(--space-3)); justify-self: start; }
|
|
275
|
+
.ui-table-scroll::after { left: calc(100% - var(--space-3)); right: 0; justify-self: end; }
|
|
276
|
+
@container scroll-state(scrollable: left) {
|
|
277
|
+
.ui-table-scroll::before { background: linear-gradient(to right, var(--table-edge), transparent); }
|
|
278
|
+
}
|
|
279
|
+
@container scroll-state(scrollable: right) {
|
|
280
|
+
.ui-table-scroll::after { background: linear-gradient(to left, var(--table-edge), transparent); }
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
@container not scroll-state(scrollable: x) {
|
|
284
|
+
.ui-table--pinned :is(.ui-table__identity, .ui-table__selection) { border-right-color: transparent; }
|
|
285
|
+
}
|
|
219
286
|
.ui-value, .ui-delta { white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
220
287
|
.ui-value__unit { margin-left: var(--space-1); font-size: var(--text-xs); color: var(--text); }
|
|
221
288
|
.ui-delta--success { color: var(--chip-success-ink); }
|
package/src/tokens/tokens.css
CHANGED
|
@@ -534,6 +534,7 @@
|
|
|
534
534
|
.ui-snippet--reveal,
|
|
535
535
|
.ui-sx,
|
|
536
536
|
.ui-table,
|
|
537
|
+
.ui-table-scroll,
|
|
537
538
|
.ui-table--sticky thead th,
|
|
538
539
|
.ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection,
|
|
539
540
|
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td,
|
|
@@ -557,6 +558,7 @@
|
|
|
557
558
|
* toward the page and leaves the page 1.02 away, while the card it is a variant of stays
|
|
558
559
|
* 1.07-1.14 off in both themes. Measured in stories/code-chip.test.js. */
|
|
559
560
|
.ui-table,
|
|
561
|
+
.ui-table-scroll,
|
|
560
562
|
.ui-table--sticky thead th,
|
|
561
563
|
.ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection,
|
|
562
564
|
.ui-table--hover:not(.ui-table--zebra) tbody tr:hover td,
|