@apliteni/apliteni-ui 0.189.0 → 0.190.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 +54 -12
- package/docs/foundations.md +27 -12
- package/guidelines/colour-and-theming.md +1 -1
- package/guidelines/dashboards-and-reports.md +15 -5
- package/guidelines/stat-bands.md +2 -2
- package/guidelines/text-length.md +12 -0
- package/guidelines/the-page.md +26 -0
- package/package.json +1 -1
- package/react/dist/index.css +6 -3
- package/react/dist/index.d.ts +42 -7
- package/react/dist/index.js +54 -31
- package/src/logic/filter-bar.js +1 -1
- package/src/styles/avatar.css +4 -1
- package/src/styles/base.css +6 -0
- package/src/styles/button.css +13 -0
- package/src/styles/card.css +96 -6
- package/src/styles/chart.css +2 -0
- package/src/styles/code.css +32 -3
- package/src/styles/drawer.css +6 -2
- package/src/styles/empty.css +14 -0
- package/src/styles/layout.css +101 -2
- package/src/styles/nav.css +3 -3
- package/src/styles/segmented.css +3 -0
- package/src/styles/stat.css +38 -0
- package/src/styles/table.css +31 -20
- package/src/styles/tap-zone.css +6 -1
- package/src/tokens/tokens.css +40 -12
package/react/dist/index.js
CHANGED
|
@@ -378,7 +378,7 @@ function Avatar({ personKey, name, src, size = 24, empty = false }) {
|
|
|
378
378
|
if (img.naturalWidth > 0) setLoadedSrc(src);
|
|
379
379
|
else setFailedSrc(src);
|
|
380
380
|
}, [src]);
|
|
381
|
-
const base = ["ui-avatar", size === 32 && "ui-avatar--32"];
|
|
381
|
+
const base = ["ui-avatar", size === 32 && "ui-avatar--32", size === 48 && "ui-avatar--48"];
|
|
382
382
|
const cls = (...more) => [...base, ...more].filter(Boolean).join(" ");
|
|
383
383
|
if (empty) return /* @__PURE__ */ jsx6("span", { className: cls("ui-avatar--empty"), "aria-hidden": "true" });
|
|
384
384
|
const letters = avatarInitials(name);
|
|
@@ -4011,7 +4011,7 @@ function DrawerSection({ title, headingLevel = 3, className, children, ...rest }
|
|
|
4011
4011
|
// src/Snippet.tsx
|
|
4012
4012
|
import { useEffect as useEffect14, useRef as useRef17, useState as useState14 } from "react";
|
|
4013
4013
|
import { Fragment as Fragment16, jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4014
|
-
function Snippet({ label
|
|
4014
|
+
function Snippet({ label, code = "", children, copy = true, reveal = false, wrap = false, onCopy, copyLabel = "Copy code" }) {
|
|
4015
4015
|
const [status, setStatus] = useState14("idle");
|
|
4016
4016
|
const request = useRef17(0);
|
|
4017
4017
|
const timer = useRef17(void 0);
|
|
@@ -4030,29 +4030,35 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
|
|
|
4030
4030
|
await navigator.clipboard.writeText(code);
|
|
4031
4031
|
if (current !== request.current) return;
|
|
4032
4032
|
setStatus("copied");
|
|
4033
|
-
|
|
4033
|
+
onCopy?.();
|
|
4034
|
+
timer.current = setTimeout(() => setStatus("idle"), 2e3);
|
|
4034
4035
|
} catch {
|
|
4035
4036
|
if (current === request.current) setStatus("failed");
|
|
4036
4037
|
}
|
|
4037
4038
|
}
|
|
4038
|
-
|
|
4039
|
-
/* @__PURE__ */ jsxs28(
|
|
4039
|
+
const copyControl = () => copy && /* @__PURE__ */ jsxs28(Fragment16, { children: [
|
|
4040
|
+
/* @__PURE__ */ jsxs28(
|
|
4041
|
+
"button",
|
|
4042
|
+
{
|
|
4043
|
+
type: "button",
|
|
4044
|
+
className: "ui-snippet__copy",
|
|
4045
|
+
"aria-label": copyLabel,
|
|
4046
|
+
title: copyLabel,
|
|
4047
|
+
onClick: handleCopy,
|
|
4048
|
+
children: [
|
|
4049
|
+
/* @__PURE__ */ jsx32(Icon, { name: status !== "copied" ? "copy" : "check" }),
|
|
4050
|
+
status === "copied" && /* @__PURE__ */ jsx32("span", { className: "ui-snippet__copied", children: "Copied" })
|
|
4051
|
+
]
|
|
4052
|
+
}
|
|
4053
|
+
),
|
|
4054
|
+
/* @__PURE__ */ jsx32("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
|
|
4055
|
+
] });
|
|
4056
|
+
return /* @__PURE__ */ jsxs28("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : wrap ? "ui-snippet ui-snippet--wrap" : "ui-snippet", children: [
|
|
4057
|
+
label && /* @__PURE__ */ jsxs28("div", { className: "ui-snippet__bar", children: [
|
|
4040
4058
|
/* @__PURE__ */ jsx32("span", { children: label }),
|
|
4041
|
-
|
|
4042
|
-
/* @__PURE__ */ jsx32(
|
|
4043
|
-
"button",
|
|
4044
|
-
{
|
|
4045
|
-
type: "button",
|
|
4046
|
-
className: "ui-snippet__copy",
|
|
4047
|
-
"aria-label": copyLabel,
|
|
4048
|
-
title: copyLabel,
|
|
4049
|
-
onClick: handleCopy,
|
|
4050
|
-
children: /* @__PURE__ */ jsx32(Icon, { name: status !== "copied" ? "copy" : "check" })
|
|
4051
|
-
}
|
|
4052
|
-
),
|
|
4053
|
-
/* @__PURE__ */ jsx32("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
|
|
4054
|
-
] })
|
|
4059
|
+
copyControl()
|
|
4055
4060
|
] }),
|
|
4061
|
+
!label && copyControl(),
|
|
4056
4062
|
/* @__PURE__ */ jsx32("pre", { children: children ?? code })
|
|
4057
4063
|
] });
|
|
4058
4064
|
}
|
|
@@ -4270,14 +4276,15 @@ var cases = {
|
|
|
4270
4276
|
"not-found": { title: "We can't find that page", sub: "Check the address or return to the home page.", icon: "folder" },
|
|
4271
4277
|
"not-yet-built": { title: "Not available yet", sub: "This screen ships in a later release.", icon: "clock" }
|
|
4272
4278
|
};
|
|
4273
|
-
function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actions }) {
|
|
4279
|
+
function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actions, className, level = 0 }) {
|
|
4274
4280
|
const preset = cases[variant];
|
|
4275
4281
|
const heading = title ?? preset.title;
|
|
4276
4282
|
const guidance = sub ?? preset.sub;
|
|
4277
4283
|
const glyph2 = icon9 ?? preset.icon;
|
|
4278
|
-
|
|
4284
|
+
const Title = [2, 3, 4, 5, 6].includes(level) ? `h${level}` : "div";
|
|
4285
|
+
return /* @__PURE__ */ jsxs31("div", { className: ["ui-empty", className].filter(Boolean).join(" "), children: [
|
|
4279
4286
|
art ? typeof art === "string" ? /* @__PURE__ */ jsx35("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx35("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph2 ? /* @__PURE__ */ jsx35("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon3(glyph2) } }) : null,
|
|
4280
|
-
heading && /* @__PURE__ */ jsx35(
|
|
4287
|
+
heading && /* @__PURE__ */ jsx35(Title, { className: "ui-empty__title", children: heading }),
|
|
4281
4288
|
guidance && /* @__PURE__ */ jsx35("div", { className: "ui-empty__sub", children: guidance }),
|
|
4282
4289
|
actions && /* @__PURE__ */ jsx35("div", { className: "ui-empty__actions", children: actions })
|
|
4283
4290
|
] });
|
|
@@ -4473,8 +4480,8 @@ function FileDrop({
|
|
|
4473
4480
|
import { forwardRef as forwardRef9 } from "react";
|
|
4474
4481
|
import { icon as icon6 } from "@apliteni/apliteni-ui";
|
|
4475
4482
|
import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4476
|
-
var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, className, ...props }, ref) {
|
|
4477
|
-
return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", children: [
|
|
4483
|
+
var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, className, ...props }, ref) {
|
|
4484
|
+
return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", style: width ? { width, flex: "none" } : void 0, children: [
|
|
4478
4485
|
/* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
|
|
4479
4486
|
/* @__PURE__ */ jsx37(
|
|
4480
4487
|
"input",
|
|
@@ -5194,10 +5201,10 @@ function AppShell({
|
|
|
5194
5201
|
] });
|
|
5195
5202
|
const page = /* @__PURE__ */ jsxs37("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
|
|
5196
5203
|
back && /* @__PURE__ */ jsx41(BackLink, { ...back }),
|
|
5197
|
-
tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
|
|
5204
|
+
title != null && (tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
|
|
5198
5205
|
/* @__PURE__ */ jsx41("h1", { children: title }),
|
|
5199
5206
|
/* @__PURE__ */ jsx41("div", { className: "ui-app__tools", children: tools })
|
|
5200
|
-
] }) : /* @__PURE__ */ jsx41("h1", { children: title }),
|
|
5207
|
+
] }) : /* @__PURE__ */ jsx41("h1", { children: title })),
|
|
5201
5208
|
lede && /* @__PURE__ */ jsx41("p", { className: "ui-app__sub", children: lede }),
|
|
5202
5209
|
actions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__actions", children: actions }),
|
|
5203
5210
|
/* @__PURE__ */ jsx41("div", { className: "ui-app__body", children })
|
|
@@ -5334,11 +5341,27 @@ function AppShell({
|
|
|
5334
5341
|
// src/AuthShell.tsx
|
|
5335
5342
|
import { forwardRef as forwardRef10 } from "react";
|
|
5336
5343
|
import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5337
|
-
var AuthShell = forwardRef10(function AuthShell2({ brand, children, className, ...rest }, ref) {
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
children
|
|
5341
|
-
|
|
5344
|
+
var AuthShell = forwardRef10(function AuthShell2({ brand, children, split, tagline, brandAbove, className, ...rest }, ref) {
|
|
5345
|
+
const cls = ["ui-auth", split && "ui-auth--split", brandAbove && "ui-auth--brand-above", className].filter(Boolean).join(" ");
|
|
5346
|
+
if (!split && brandAbove) {
|
|
5347
|
+
return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
|
|
5348
|
+
/* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
|
|
5349
|
+
/* @__PURE__ */ jsx42("div", { className: "ui-auth__card", children })
|
|
5350
|
+
] });
|
|
5351
|
+
}
|
|
5352
|
+
if (!split) {
|
|
5353
|
+
return /* @__PURE__ */ jsx42("div", { ...rest, ref, className: cls, children: /* @__PURE__ */ jsxs38("div", { className: "ui-auth__card", children: [
|
|
5354
|
+
/* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
|
|
5355
|
+
children
|
|
5356
|
+
] }) });
|
|
5357
|
+
}
|
|
5358
|
+
return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
|
|
5359
|
+
/* @__PURE__ */ jsxs38("aside", { className: "ui-auth__brand-pane", children: [
|
|
5360
|
+
/* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
|
|
5361
|
+
tagline && /* @__PURE__ */ jsx42("p", { className: "ui-auth__tagline", children: tagline })
|
|
5362
|
+
] }),
|
|
5363
|
+
/* @__PURE__ */ jsx42("div", { className: "ui-auth__pane", children })
|
|
5364
|
+
] });
|
|
5342
5365
|
});
|
|
5343
5366
|
|
|
5344
5367
|
// src/Footer.tsx
|
package/src/logic/filter-bar.js
CHANGED
|
@@ -103,7 +103,7 @@ export function nextFocusStop(host) {
|
|
|
103
103
|
* A bar that still holds chips draws a box around them and takes the focus
|
|
104
104
|
* itself. Emptied of them it has only an out-of-flow legend and measures 0 high,
|
|
105
105
|
* so the focus goes where `nextFocusStop()` names — the way to add one still on
|
|
106
|
-
* the row, which is what
|
|
106
|
+
* the row, which is what a bar with an add control draws, else outside the bar.
|
|
107
107
|
* Being reachable is not taking the focus: each candidate is asked and then
|
|
108
108
|
* checked. #518
|
|
109
109
|
* why: docs/components.md#filter-bar */
|
package/src/styles/avatar.css
CHANGED
|
@@ -20,8 +20,11 @@
|
|
|
20
20
|
color: var(--signal-solid-ink);
|
|
21
21
|
}
|
|
22
22
|
.ui-avatar--32 { --ui-avatar-size: 32px; font-size: var(--text-base); }
|
|
23
|
-
|
|
23
|
+
.ui-avatar--48 { --ui-avatar-size: 48px; font-size: var(--text-xl); }
|
|
24
|
+
/* Two letters in 24px leave the type at the kit's smallest step; in 32px one step down,
|
|
25
|
+
in 48px two steps down. */
|
|
24
26
|
.ui-avatar--32[data-initials="2"] { font-size: var(--text-sm); }
|
|
27
|
+
.ui-avatar--48[data-initials="2"] { font-size: var(--text-lg); }
|
|
25
28
|
.ui-avatar--h0 { --ui-avatar-hue: var(--person-0); }
|
|
26
29
|
.ui-avatar--h1 { --ui-avatar-hue: var(--person-1); }
|
|
27
30
|
.ui-avatar--h2 { --ui-avatar-hue: var(--person-2); }
|
package/src/styles/base.css
CHANGED
|
@@ -36,6 +36,12 @@ a {
|
|
|
36
36
|
text-decoration: none;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/* A link that reads as the text around it, for a name in a list that links to its
|
|
40
|
+
detail page: body ink at rest, underlined only under the pointer.
|
|
41
|
+
why: docs/foundations.md#text-ink */
|
|
42
|
+
.ui-link--quiet { color: inherit; }
|
|
43
|
+
.ui-link--quiet:hover { text-decoration: underline; }
|
|
44
|
+
|
|
39
45
|
/* -- The two typeface roles -----------------------------------------------
|
|
40
46
|
* A heading is the display face, running text is the text face, and the
|
|
41
47
|
* ELEMENT decides which — never the size. A size threshold would change a
|
package/src/styles/button.css
CHANGED
|
@@ -84,6 +84,19 @@
|
|
|
84
84
|
color: var(--strong);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
/* An outline button draws its edge and no fill, so an icon-only control keeps a
|
|
88
|
+
visible boundary on a ground that is now one flat surface (#850). The hover
|
|
89
|
+
takes the same accent edge as a plain button. */
|
|
90
|
+
.ui-btn--outline {
|
|
91
|
+
background: transparent;
|
|
92
|
+
border-color: var(--control-edge);
|
|
93
|
+
color: var(--text);
|
|
94
|
+
}
|
|
95
|
+
.ui-btn--outline:hover {
|
|
96
|
+
background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
|
|
97
|
+
color: var(--strong);
|
|
98
|
+
}
|
|
99
|
+
|
|
87
100
|
.ui-btn--link {
|
|
88
101
|
background: transparent;
|
|
89
102
|
border-color: transparent;
|
package/src/styles/card.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
* Card — .ui-card (a
|
|
2
|
+
* Card — .ui-card (a grouping of space, not a box: no fill, edge or shadow on the page)
|
|
3
3
|
* Rows: .ui-card__row / headers: .ui-card__title / .ui-card__sub
|
|
4
4
|
* Title row: .ui-card__head holds the title and .ui-card__tools at its end
|
|
5
5
|
* ========================================================================== */
|
|
@@ -14,16 +14,43 @@
|
|
|
14
14
|
border: 1px solid var(--card-edge);
|
|
15
15
|
box-shadow: var(--elev-rest);
|
|
16
16
|
border-radius: var(--radius-xl);
|
|
17
|
-
/* Was `var(--space-6) 26px`; 26 is off the scale and broke the column's text edge.
|
|
18
|
-
why: docs/foundations.md#spacing-and-rhythm */
|
|
19
17
|
padding: var(--space-6);
|
|
20
18
|
position: relative;
|
|
21
19
|
}
|
|
20
|
+
/* #850: the light page takes the card's white, so a light card on the page is a grouping
|
|
21
|
+
of space, not a box. It draws no fill, edge or shadow, and it hangs its side inset
|
|
22
|
+
outside the column so its text starts on the page title's edge. Dark keeps its card.
|
|
23
|
+
Floating panels keep their box; the card does not float, it is the page.
|
|
24
|
+
why: docs/foundations.md#elevation */
|
|
25
|
+
:root[data-theme="light"] .ui-card {
|
|
26
|
+
--ui-card-ground: var(--bg);
|
|
27
|
+
background: transparent;
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
}
|
|
31
|
+
/* The light card's top and bottom inset is gone, so content starts after its title and
|
|
32
|
+
the section gap, not a box edge, separates one card from the next. The side inset stays
|
|
33
|
+
and hangs outside the column, so its text lines up with the page title. --pad-lg is the
|
|
34
|
+
centred landing card, which keeps its own inset and never hangs out. #850 */
|
|
35
|
+
:root[data-theme="light"] .ui-card:not(.ui-card--pad-lg):not(.ui-card--accent):not(.ui-card--live) {
|
|
36
|
+
padding-block: 0;
|
|
37
|
+
margin-inline: calc(-1 * var(--space-6));
|
|
38
|
+
}
|
|
39
|
+
@media (max-width: 560px) {
|
|
40
|
+
: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));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
22
45
|
|
|
23
46
|
/* A table wider than its card scrolls INSIDE the card instead of bleeding past
|
|
24
47
|
the rounded corners / clipping its last column. Clipping to the card's
|
|
25
48
|
border-box also keeps zebra stripes from escaping the radius. */
|
|
26
49
|
.ui-card:has(> .ui-table) { overflow-x: auto; }
|
|
50
|
+
/* A card that frames a table directly is the table's frame, so its top edge is
|
|
51
|
+
square: the data grid reads as a straight edge at both ends, not a rounded
|
|
52
|
+
card. The bottom corners keep the card's own radius. #850 */
|
|
53
|
+
.ui-card:has(> .ui-table) { border-top-left-radius: 0; border-top-right-radius: 0; }
|
|
27
54
|
/* Which makes the card a keyboard stop whenever no cell holds a control, so it
|
|
28
55
|
answered with the native outline. It is a scroll region, so it takes --ring-scroll:
|
|
29
56
|
the band drawn inward, inside the card's 24px padding and clear of the table.
|
|
@@ -34,6 +61,9 @@
|
|
|
34
61
|
/* Vertical stacks space cards with the container's gap — see .ui-card-stack.
|
|
35
62
|
(No `.ui-card + .ui-card` margin: it leaks into grid/flex rows and misaligns.) */
|
|
36
63
|
.ui-card-stack { display: flex; flex-direction: column; gap: var(--space-5); }
|
|
64
|
+
/* #850: on the light page a card draws no box, so the stack opens to the page's group gap.
|
|
65
|
+
why: docs/foundations.md#spacing-and-rhythm */
|
|
66
|
+
:root[data-theme="light"] .ui-card-stack { gap: var(--space-10); }
|
|
37
67
|
|
|
38
68
|
/* A padding modifier moves the vertical rhythm and keeps the text edge, so cards of
|
|
39
69
|
different padding line up in one column. --pad-lg is the centred landing card, never
|
|
@@ -61,6 +91,16 @@
|
|
|
61
91
|
background: color-mix(in srgb, var(--green) var(--card-tint), var(--surface));
|
|
62
92
|
border-color: color-mix(in srgb, var(--green) 22%, transparent);
|
|
63
93
|
}
|
|
94
|
+
/* #850: the light page takes a plain card's white, but a tinted card keeps its tint,
|
|
95
|
+
so the accent or live signal stays above the page. Dark keeps its own tint. */
|
|
96
|
+
:root[data-theme="light"] .ui-card--accent {
|
|
97
|
+
--ui-card-ground: color-mix(in srgb, var(--accent) var(--card-tint), var(--surface));
|
|
98
|
+
background: color-mix(in srgb, var(--accent) var(--card-tint), var(--surface));
|
|
99
|
+
}
|
|
100
|
+
:root[data-theme="light"] .ui-card--live {
|
|
101
|
+
--ui-card-ground: color-mix(in srgb, var(--green) var(--card-tint), var(--surface));
|
|
102
|
+
background: color-mix(in srgb, var(--green) var(--card-tint), var(--surface));
|
|
103
|
+
}
|
|
64
104
|
|
|
65
105
|
/* A viewer: a document shown inside a card, set apart from the controls that act on it.
|
|
66
106
|
The card's .ui-toolbar becomes a slim row between two hairlines, and its scroll box
|
|
@@ -69,7 +109,7 @@
|
|
|
69
109
|
object and the row above it as the tools. Decided on #736.
|
|
70
110
|
why: docs/foundations.md#elevation */
|
|
71
111
|
.ui-card__viewer {
|
|
72
|
-
margin: var(--space-4) calc(-1 * var(--space-6))
|
|
112
|
+
margin: var(--space-4) calc(-1 * var(--space-6)) 0;
|
|
73
113
|
border-top: 1px solid var(--card-edge);
|
|
74
114
|
}
|
|
75
115
|
.ui-card__viewer > .ui-toolbar {
|
|
@@ -100,9 +140,10 @@
|
|
|
100
140
|
border: 1px solid var(--card-edge);
|
|
101
141
|
box-shadow: var(--elev-rest);
|
|
102
142
|
border-radius: var(--radius-xs);
|
|
103
|
-
/* A table on the page takes the page's ground, not the stage's, and hands a chip
|
|
143
|
+
/* A table on the page takes the page's ground, not the stage's, and hands a chip a
|
|
144
|
+
surface that steps off the white sheet in both themes. */
|
|
104
145
|
--table-bg: var(--surface);
|
|
105
|
-
--table-code-bg: var(--
|
|
146
|
+
--table-code-bg: var(--code-chip-surface);
|
|
106
147
|
}
|
|
107
148
|
|
|
108
149
|
/* Interactive card (link / button semantics) */
|
|
@@ -193,6 +234,27 @@
|
|
|
193
234
|
}
|
|
194
235
|
}
|
|
195
236
|
.ui-card__row + .ui-card__row { border-top: 1px solid var(--border); }
|
|
237
|
+
/* #850: on the light page no hairline between rows of one list; the rows separate by
|
|
238
|
+
their padding. */
|
|
239
|
+
:root[data-theme="light"] .ui-card__row + .ui-card__row { border-top: 0; }
|
|
240
|
+
/* A role badge or a row-end glyph follows the content it marks at --space-4, on the
|
|
241
|
+
same line, instead of standing at the far end of the row.
|
|
242
|
+
why: docs/foundations.md#spacing-and-rhythm */
|
|
243
|
+
.ui-card__row:has(> .ui-badge:last-child),
|
|
244
|
+
.ui-card__row:has(> .ui-card__glyph:last-child) { justify-content: flex-start; gap: var(--space-4); }
|
|
245
|
+
/* On a phone the row-end glyph keeps its place on the row's first line, at the
|
|
246
|
+
row's right end and vertically centred, instead of dropping under the content. */
|
|
247
|
+
@media (max-width: 560px) {
|
|
248
|
+
.ui-card__row:has(> .ui-card__glyph:last-child) {
|
|
249
|
+
flex-direction: row;
|
|
250
|
+
align-items: center;
|
|
251
|
+
justify-content: space-between;
|
|
252
|
+
}
|
|
253
|
+
.ui-card__row:has(> .ui-card__glyph:last-child) > :first-child {
|
|
254
|
+
width: auto;
|
|
255
|
+
min-width: 0;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
196
258
|
.ui-card__row .lab { color: var(--strong); font-size: var(--text-md); font-weight: var(--weight-medium); }
|
|
197
259
|
.ui-card__row .hint { color: var(--text); font-size: var(--text-sm); margin-top: 3px; }
|
|
198
260
|
|
|
@@ -208,3 +270,31 @@
|
|
|
208
270
|
flex: none;
|
|
209
271
|
}
|
|
210
272
|
.ui-card__icon svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }
|
|
273
|
+
|
|
274
|
+
/* A line glyph leading or trailing a card row: 18px with a 2-unit stroke, which draws
|
|
275
|
+
the 1.5px graphic bar. A row glyph is a mark beside words, so it is muted. A granted
|
|
276
|
+
check is the kit's SuccessCheck (circled), not this glyph.
|
|
277
|
+
why: docs/foundations.md#icons-and-glyphs */
|
|
278
|
+
.ui-card__glyph {
|
|
279
|
+
display: inline-flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
flex: none;
|
|
282
|
+
/* muted-ink: glyph — a row glyph is a mark beside words */
|
|
283
|
+
color: var(--muted);
|
|
284
|
+
}
|
|
285
|
+
.ui-card__glyph svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
|
|
286
|
+
|
|
287
|
+
/* 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
|
|
289
|
+
outside the column, but its own padding keeps the line on the column's width, and
|
|
290
|
+
the ::before draws straight where a border would follow the rounded corner. Dark
|
|
291
|
+
cards are boxed and already separate, so only the light rule draws.
|
|
292
|
+
why: docs/components.md#card, guidelines/dashboards-and-reports.md */
|
|
293
|
+
:root[data-theme="light"] .ui-hairline::before {
|
|
294
|
+
content: "";
|
|
295
|
+
display: block;
|
|
296
|
+
flex: none;
|
|
297
|
+
width: 100%;
|
|
298
|
+
height: var(--space-8);
|
|
299
|
+
border-top: 1px solid var(--border);
|
|
300
|
+
}
|
package/src/styles/chart.css
CHANGED
|
@@ -340,6 +340,8 @@
|
|
|
340
340
|
}
|
|
341
341
|
/* The rule starts at the name, so the swatch column under the keys stays empty. */
|
|
342
342
|
.ui-chart__shares-total > span + span { padding-top: var(--space-2); border-top: 1px solid var(--border); }
|
|
343
|
+
/* #850: on the light page no hairline above the shares total; the caption owns the rung. */
|
|
344
|
+
:root[data-theme="light"] .ui-chart__shares-total > span + span { border-top: 0; }
|
|
343
345
|
|
|
344
346
|
/* -- the table ------------------------------------------------------------- */
|
|
345
347
|
|
package/src/styles/code.css
CHANGED
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
background: var(--code-bg); /* code-bg: inherit — a block reads the ground its container hands a chip, and holds no chip. */
|
|
9
9
|
border-radius: var(--radius-md);
|
|
10
10
|
overflow: hidden;
|
|
11
|
+
/* The bar and the titleless flex row position the copy button; a titleless
|
|
12
|
+
block holds the button in flow beside the code. */
|
|
13
|
+
position: relative;
|
|
11
14
|
}
|
|
15
|
+
/* #850: with no title the copy button reserves its own space instead of floating
|
|
16
|
+
over the code, so a short command is never covered at any width. The block is a
|
|
17
|
+
flex row: the code grows, and the button sits at the row's end. */
|
|
18
|
+
.ui-snippet:not(:has(.ui-snippet__bar)) { display: flex; align-items: flex-start; }
|
|
19
|
+
.ui-snippet:not(:has(.ui-snippet__bar)) pre { flex: 1 1 auto; min-width: 0; order: -1; }
|
|
12
20
|
.ui-snippet__bar {
|
|
13
21
|
display: flex;
|
|
14
22
|
justify-content: space-between;
|
|
@@ -18,11 +26,18 @@
|
|
|
18
26
|
border-bottom: 1px solid var(--card-edge);
|
|
19
27
|
}
|
|
20
28
|
.ui-snippet__bar > span {
|
|
21
|
-
/* rank:
|
|
29
|
+
/* rank: caption */
|
|
22
30
|
font-size: var(--text-sm);
|
|
23
|
-
font-weight: var(--weight-
|
|
24
|
-
|
|
31
|
+
font-weight: var(--weight-normal);
|
|
32
|
+
/* muted-ink: chrome — the title names the block, not its content */
|
|
33
|
+
color: var(--muted);
|
|
25
34
|
}
|
|
35
|
+
/* #850: the light page is one white ground, so a code block takes the quiet grey fill
|
|
36
|
+
--surface-3 and drops the line under its bar. The grey is the one exception to "Keep
|
|
37
|
+
text off grey fills": a block is a sample a reader does not write inside, and its own
|
|
38
|
+
inks clear 4.5:1 on the grey (the lowest is 5.22:1). why: docs/foundations.md#elevation */
|
|
39
|
+
:root[data-theme="light"] .ui-snippet:not(.ui-snippet--reveal) { --code-bg: var(--surface-3); }
|
|
40
|
+
:root[data-theme="light"] .ui-snippet:not(.ui-snippet--reveal) .ui-snippet__bar { border-bottom: 0; }
|
|
26
41
|
.ui-snippet pre {
|
|
27
42
|
margin: 0;
|
|
28
43
|
padding: var(--space-3) 15px 14px;
|
|
@@ -48,6 +63,8 @@
|
|
|
48
63
|
:root[data-theme="light"] .ui-snippet pre { --ui-snippet-edge: color-mix(in srgb, var(--shadow-ink) 13%, transparent); }
|
|
49
64
|
/* The reveal block wraps, so it never scrolls and draws no shade. */
|
|
50
65
|
.ui-snippet--reveal pre { background-image: none; }
|
|
66
|
+
/* #850: a command a reader copies whole wraps instead of scrolling one cut line. */
|
|
67
|
+
.ui-snippet--wrap pre { white-space: pre-wrap; word-break: break-all; }
|
|
51
68
|
/* Scrollable code is a keyboard target, but a <pre> flush with the card and
|
|
52
69
|
without its radius draws a square ring that cuts across the card and squares
|
|
53
70
|
its corners. The card carries the ring instead, so it follows --radius-md and
|
|
@@ -84,6 +101,18 @@
|
|
|
84
101
|
.ui-snippet--reveal .ui-snippet__copy:hover { color: var(--strong); }
|
|
85
102
|
.ui-snippet__copy:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); border-radius: var(--radius-xs); }
|
|
86
103
|
.ui-snippet__copy svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.8; }
|
|
104
|
+
/* The drawn confirmation: check and the word Copied for about 2s. The word is a
|
|
105
|
+
state the button shows, not its name, which stays the copy action. */
|
|
106
|
+
.ui-snippet__copied { margin-inline-start: 4px; }
|
|
107
|
+
/* #850: a title is optional, so a block with none puts the copy button at the
|
|
108
|
+
end of the code's own row — the bar is gone, and the button is in flow, so it
|
|
109
|
+
reserves its space and the code never runs under it. It grows leftward while
|
|
110
|
+
it shows the word, shrinking the code row rather than covering it. */
|
|
111
|
+
.ui-snippet:not(:has(.ui-snippet__bar)) .ui-snippet__copy {
|
|
112
|
+
position: static;
|
|
113
|
+
flex: none;
|
|
114
|
+
margin: var(--space-2) var(--space-2) 0 0;
|
|
115
|
+
}
|
|
87
116
|
|
|
88
117
|
/* Shell token highlighting (matches viz/account.mjs classes) */
|
|
89
118
|
.ui-snippet pre .k { color: var(--purple-mid); font-weight: var(--weight-medium); }
|
package/src/styles/drawer.css
CHANGED
|
@@ -219,6 +219,9 @@
|
|
|
219
219
|
font-weight: var(--weight-semibold);
|
|
220
220
|
color: var(--strong);
|
|
221
221
|
}
|
|
222
|
+
/* #850: on the light page a drawer group title has no line under it; space owns the group.
|
|
223
|
+
why: docs/foundations.md#spacing-and-rhythm */
|
|
224
|
+
:root[data-theme="light"] .ui-drawer__section-title { border-bottom: 0; padding-bottom: 0; }
|
|
222
225
|
/* The record's lead figure: a <dl> of one label over its value, with a status badge
|
|
223
226
|
beside the value. It stands in a group with no heading, before the other groups.
|
|
224
227
|
why: docs/components.md#drawer */
|
|
@@ -258,8 +261,9 @@
|
|
|
258
261
|
}
|
|
259
262
|
/* A control in the value column has its own border and padding, so its first line sits lower
|
|
260
263
|
than a label's. A row whose value holds a field or a dropdown lines both first lines up on
|
|
261
|
-
their baseline, whatever the control is, and a row of text keeps its place.
|
|
262
|
-
below the label stacks over the value and there is
|
|
264
|
+
their baseline, whatever the control is, and a row of text keeps its place. In the
|
|
265
|
+
two-pairs-to-a-row variant at 560px and below the label stacks over the value and there is
|
|
266
|
+
nothing to align. A field's own label
|
|
263
267
|
stays for a screen reader only when one field fills the value cell. With two
|
|
264
268
|
fields, each label remains visible to name its control. */
|
|
265
269
|
.ui-drawer__row:has(> dd :is(.ui-input, .ui-textarea, .ui-select, .ui-dropdown)) > :is(dt, dd) { align-self: baseline; }
|
package/src/styles/empty.css
CHANGED
|
@@ -67,6 +67,20 @@
|
|
|
67
67
|
margin-top: 12px;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/* #850: a no-results state sits on the column edge with a larger display-face title
|
|
71
|
+
and no picture, so the words lead and the action stands on the reading line.
|
|
72
|
+
The title is an h2, so base.css gives it the display face. */
|
|
73
|
+
.ui-empty--edge {
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
text-align: left;
|
|
76
|
+
padding: var(--space-6) 0;
|
|
77
|
+
}
|
|
78
|
+
.ui-empty--edge .ui-empty__title {
|
|
79
|
+
font-size: var(--text-2xl);
|
|
80
|
+
font-weight: var(--weight-semibold);
|
|
81
|
+
margin-top: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
/* Legacy line-icon slot — kept so existing .ui-empty__icon markup still works.
|
|
71
85
|
44px until #148. The icon inside is `width: 100%`, and that rule lost to the
|
|
72
86
|
base.css reset for as long as this slot has existed, so the slot's number was
|
package/src/styles/layout.css
CHANGED
|
@@ -433,6 +433,13 @@
|
|
|
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
435
|
.ui-app__body { display: flex; flex-direction: column; gap: var(--space-5); }
|
|
436
|
+
/* #850: on the light page a card draws no box, so the body opens to the page's group gap.
|
|
437
|
+
why: docs/foundations.md#spacing-and-rhythm */
|
|
438
|
+
:root[data-theme="light"] .ui-app__body { gap: var(--space-10); }
|
|
439
|
+
/* A stat band closes one section, so the block after it keeps the group gap on
|
|
440
|
+
top of the body's: the air the old soft line used to give, now as space alone.
|
|
441
|
+
why: guidelines/dashboards-and-reports.md, #850 */
|
|
442
|
+
.ui-app__body > .ui-stats + * { margin-top: var(--space-8); }
|
|
436
443
|
/* A flex child's min-width is its content by default, so one wide block — a
|
|
437
444
|
ledger, a code sample — pushes the whole page sideways instead of scrolling
|
|
438
445
|
inside itself. This is what keeps the shell narrower than the window. */
|
|
@@ -457,7 +464,11 @@
|
|
|
457
464
|
there the gap is the page's bottom and nothing is being narrowed. tap-zone.css
|
|
458
465
|
widens it on a touch phone. why: docs/foundations.md#spacing-and-rhythm */
|
|
459
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)); }
|
|
460
468
|
.ui-stack > .ui-toolbar + * { margin-top: var(--space-2); }
|
|
469
|
+
/* A filter bar inside its table's card sits one inner gap above the table, the
|
|
470
|
+
same step the card title keeps above the bar. why: guidelines/dense-tables.md */
|
|
471
|
+
.ui-card > .ui-toolbar:not(:last-child) { margin-bottom: var(--space-2); }
|
|
461
472
|
.ui-toolbar > .ui-input,
|
|
462
473
|
.ui-toolbar > .ui-input-group { flex: 1 1 6rem; min-width: 0; }
|
|
463
474
|
/* A row that offers the block two unrelated things — what to narrow it by, and
|
|
@@ -499,6 +510,28 @@
|
|
|
499
510
|
.ui-toolbar--split > :last-child { margin-inline-start: 0; align-self: start; }
|
|
500
511
|
}
|
|
501
512
|
|
|
513
|
+
/* A floating bar: a slim control row that docks at the bottom of its scroll region and
|
|
514
|
+
floats over the content above it — a viewer's page steps, a sheet's primary actions.
|
|
515
|
+
It stays visible while the content scrolls, and reads as the elevated surface the
|
|
516
|
+
kit's menus take. why: docs/foundations.md#elevation, #850 */
|
|
517
|
+
.ui-float-bar {
|
|
518
|
+
position: sticky;
|
|
519
|
+
bottom: var(--space-4);
|
|
520
|
+
z-index: var(--z-sticky);
|
|
521
|
+
display: flex;
|
|
522
|
+
align-items: center;
|
|
523
|
+
gap: var(--space-2);
|
|
524
|
+
width: max-content;
|
|
525
|
+
max-width: 100%;
|
|
526
|
+
margin-inline: auto;
|
|
527
|
+
margin-bottom: var(--space-4);
|
|
528
|
+
padding: var(--space-1) var(--space-2);
|
|
529
|
+
border-radius: var(--radius-pill);
|
|
530
|
+
background: var(--bg-elevated);
|
|
531
|
+
border: 1px solid var(--float-edge);
|
|
532
|
+
box-shadow: inset 0 0 0 1px var(--elev-edge, var(--float-edge-inner)), var(--elev-drop);
|
|
533
|
+
}
|
|
534
|
+
|
|
502
535
|
/* -- The phone shell ------------------------------------------------------ */
|
|
503
536
|
/* Below this width there is no rail and no strip. A band at the top holds the menu
|
|
504
537
|
control and the brand's mark, the control opens the same rail in the kit's left
|
|
@@ -637,6 +670,50 @@
|
|
|
637
670
|
padding: 40px 20px;
|
|
638
671
|
position: relative;
|
|
639
672
|
overflow: hidden;
|
|
673
|
+
/* Brand C: the branded ground behind a dialog-only page. A product may override
|
|
674
|
+
--ui-auth-ground with its own colour or gradient. why: docs/foundations.md#elevation */
|
|
675
|
+
background: var(--ui-auth-ground, var(--bg));
|
|
676
|
+
}
|
|
677
|
+
/* The split auth page: the brand half wears the branded ground, and the task half is
|
|
678
|
+
the plain page with no card box. Below 860px the pair stacks, so the brand half
|
|
679
|
+
becomes a band at the top. why: docs/foundations.md#breakpoints */
|
|
680
|
+
.ui-auth--split {
|
|
681
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
682
|
+
place-items: stretch;
|
|
683
|
+
padding: 0;
|
|
684
|
+
background: var(--bg);
|
|
685
|
+
}
|
|
686
|
+
.ui-auth--split .ui-auth__brand-pane {
|
|
687
|
+
display: flex;
|
|
688
|
+
flex-direction: column;
|
|
689
|
+
justify-content: space-between;
|
|
690
|
+
align-items: flex-start;
|
|
691
|
+
padding: clamp(48px, 7vw, 120px);
|
|
692
|
+
background: var(--ui-auth-ground, var(--bg));
|
|
693
|
+
}
|
|
694
|
+
.ui-auth--split .ui-auth__tagline {
|
|
695
|
+
margin: 0;
|
|
696
|
+
/* display: brand — the slogan on the branded half is the brand's own voice, set like
|
|
697
|
+
the wordmark beside it and not as reading prose. */
|
|
698
|
+
font-family: var(--font-display);
|
|
699
|
+
font-size: var(--text-3xl);
|
|
700
|
+
line-height: 1.05;
|
|
701
|
+
letter-spacing: var(--tracking-tight);
|
|
702
|
+
font-weight: var(--weight-bold);
|
|
703
|
+
color: var(--strong);
|
|
704
|
+
}
|
|
705
|
+
.ui-auth--split .ui-auth__pane {
|
|
706
|
+
display: grid;
|
|
707
|
+
place-items: center;
|
|
708
|
+
place-content: center;
|
|
709
|
+
padding: 40px 20px;
|
|
710
|
+
background: var(--bg);
|
|
711
|
+
}
|
|
712
|
+
.ui-auth--split .ui-auth__pane > * { width: 100%; max-width: var(--panel-md); }
|
|
713
|
+
@media (max-width: 860px) {
|
|
714
|
+
.ui-auth--split { grid-template-columns: 1fr; place-items: start; }
|
|
715
|
+
.ui-auth--split .ui-auth__brand-pane { width: 100%; padding: 32px 20px; }
|
|
716
|
+
.ui-auth--split .ui-auth__pane { width: 100%; place-items: start; }
|
|
640
717
|
}
|
|
641
718
|
.ui-auth__card {
|
|
642
719
|
position: relative;
|
|
@@ -654,17 +731,39 @@
|
|
|
654
731
|
}
|
|
655
732
|
.ui-auth__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
|
|
656
733
|
.ui-auth__brand span { font-size: var(--text-md); font-weight: 600; color: var(--strong); }
|
|
657
|
-
|
|
734
|
+
/* Consent: the brand stands on the gradient above the card, and the card's title
|
|
735
|
+
and its text line under it are centred. why: docs/foundations.md#elevation */
|
|
736
|
+
.ui-auth--brand-above { grid-template-rows: auto 1fr; row-gap: var(--space-5); }
|
|
737
|
+
.ui-auth--brand-above > .ui-auth__brand { margin-bottom: 0; }
|
|
738
|
+
.ui-auth--brand-above .ui-auth__title { text-align: center; }
|
|
739
|
+
.ui-auth--brand-above .ui-auth__sub { text-align: center; }
|
|
740
|
+
.ui-auth__title {
|
|
741
|
+
color: var(--strong);
|
|
742
|
+
/* rank: page-title */
|
|
743
|
+
font-size: var(--text-2xl);
|
|
744
|
+
font-weight: var(--weight-bold);
|
|
745
|
+
line-height: 1.1;
|
|
746
|
+
letter-spacing: var(--tracking-tight);
|
|
747
|
+
margin-bottom: 7px;
|
|
748
|
+
}
|
|
658
749
|
.ui-auth__sub { color: var(--text); font-size: var(--text-base); line-height: 1.55; margin-bottom: 26px; }
|
|
659
750
|
.ui-auth__foot { margin-top: 24px; text-align: center; font-size: var(--text-sm); color: var(--text); }
|
|
660
751
|
.ui-auth__foot a { color: var(--accent); }
|
|
661
|
-
|
|
752
|
+
/* #850: "or" keeps its two lines and stands centred at the label rank, with the group gap
|
|
753
|
+
above and below it. why: docs/foundations.md#spacing-and-rhythm */
|
|
754
|
+
.ui-divider { display: flex; align-items: center; gap: 14px; margin: var(--space-10) 0; color: var(--text); font-size: var(--text-sm); font-weight: var(--weight-medium); }
|
|
662
755
|
.ui-divider::before, .ui-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
|
|
663
756
|
|
|
757
|
+
/* The document page's bare full-bleed backdrop, behind the A4 sheet it carries.
|
|
758
|
+
why: docs/foundations.md#elevation */
|
|
759
|
+
.ui-document-ground { background: var(--ui-document-ground); /* code-bg: inherit — a backdrop behind the document sheet; nothing reads a ground from it. */ }
|
|
760
|
+
|
|
664
761
|
/* App scope grant list (OAuth consent) */
|
|
665
762
|
.ui-scopes { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
|
|
666
763
|
.ui-scope { display: flex; gap: 13px; padding: 13px 4px; }
|
|
667
764
|
.ui-scope + .ui-scope { border-top: 1px solid var(--border); }
|
|
765
|
+
/* #850: on the light page no hairline between scope rows; the rows separate by space. */
|
|
766
|
+
:root[data-theme="light"] .ui-scope + .ui-scope { border-top: 0; }
|
|
668
767
|
.ui-scope__icon {
|
|
669
768
|
width: 38px; height: 38px; flex: none;
|
|
670
769
|
border-radius: 11px;
|