@apliteni/apliteni-ui 0.189.0 → 0.193.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.
@@ -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);
@@ -482,7 +482,7 @@ function placeTip(host, mark, tip, placement = "top") {
482
482
  const view = host.ownerDocument.documentElement;
483
483
  const declared = parseFloat(getComputedStyle(tip).getPropertyValue("--ui-tip-gap"));
484
484
  const gap = Number.isFinite(declared) ? declared : TIP_GAP;
485
- const clip = { top: 0, left: 0, right: view.clientWidth, bottom: view.clientHeight };
485
+ const clip = { top: TIP_GAP, left: TIP_GAP, right: view.clientWidth - TIP_GAP, bottom: view.clientHeight - TIP_GAP };
486
486
  const layered = typeof tip.showPopover === "function" && tip.matches(":popover-open");
487
487
  for (let el = host; el && el !== host.ownerDocument.body; el = el.parentElement) {
488
488
  const style = getComputedStyle(el);
@@ -769,8 +769,13 @@ function ContextRow({ caption, delta, basisId }) {
769
769
  const own = delta.basis || "";
770
770
  return /* @__PURE__ */ jsxs8("dd", { className: "ui-stat__delta", "aria-describedby": !own && basisId ? basisId : void 0, children: [
771
771
  lead,
772
- /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
773
- delta.tooltip ? /* @__PURE__ */ jsx12(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }),
772
+ delta.tooltip ? /* @__PURE__ */ jsxs8(Tooltip, { text: delta.tooltip, children: [
773
+ /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
774
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value })
775
+ ] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
776
+ /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
777
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value })
778
+ ] }),
774
779
  own ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
775
780
  " ",
776
781
  /* @__PURE__ */ jsx12("span", { className: "ui-stat__basis", children: own })
@@ -4011,7 +4016,7 @@ function DrawerSection({ title, headingLevel = 3, className, children, ...rest }
4011
4016
  // src/Snippet.tsx
4012
4017
  import { useEffect as useEffect14, useRef as useRef17, useState as useState14 } from "react";
4013
4018
  import { Fragment as Fragment16, jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
4014
- function Snippet({ label = "shell", code = "", children, copy = true, reveal = false, copyLabel = "Copy code" }) {
4019
+ function Snippet({ label, code = "", children, copy = true, reveal = false, wrap = false, onCopy, copyLabel = "Copy code" }) {
4015
4020
  const [status, setStatus] = useState14("idle");
4016
4021
  const request = useRef17(0);
4017
4022
  const timer = useRef17(void 0);
@@ -4030,29 +4035,35 @@ function Snippet({ label = "shell", code = "", children, copy = true, reveal = f
4030
4035
  await navigator.clipboard.writeText(code);
4031
4036
  if (current !== request.current) return;
4032
4037
  setStatus("copied");
4033
- timer.current = setTimeout(() => setStatus("idle"), 1400);
4038
+ onCopy?.();
4039
+ timer.current = setTimeout(() => setStatus("idle"), 2e3);
4034
4040
  } catch {
4035
4041
  if (current === request.current) setStatus("failed");
4036
4042
  }
4037
4043
  }
4038
- return /* @__PURE__ */ jsxs28("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
4039
- /* @__PURE__ */ jsxs28("div", { className: "ui-snippet__bar", children: [
4044
+ const copyControl = () => copy && /* @__PURE__ */ jsxs28(Fragment16, { children: [
4045
+ /* @__PURE__ */ jsxs28(
4046
+ "button",
4047
+ {
4048
+ type: "button",
4049
+ className: "ui-snippet__copy",
4050
+ "aria-label": copyLabel,
4051
+ title: copyLabel,
4052
+ onClick: handleCopy,
4053
+ children: [
4054
+ /* @__PURE__ */ jsx32(Icon, { name: status !== "copied" ? "copy" : "check" }),
4055
+ status === "copied" && /* @__PURE__ */ jsx32("span", { className: "ui-snippet__copied", children: "Copied" })
4056
+ ]
4057
+ }
4058
+ ),
4059
+ /* @__PURE__ */ jsx32("span", { className: "ui-sr ui-snippet__status", role: "status", "aria-live": "polite", children: status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : "" })
4060
+ ] });
4061
+ return /* @__PURE__ */ jsxs28("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : wrap ? "ui-snippet ui-snippet--wrap" : "ui-snippet", children: [
4062
+ label && /* @__PURE__ */ jsxs28("div", { className: "ui-snippet__bar", children: [
4040
4063
  /* @__PURE__ */ jsx32("span", { children: label }),
4041
- copy && /* @__PURE__ */ jsxs28(Fragment16, { children: [
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
- ] })
4064
+ copyControl()
4055
4065
  ] }),
4066
+ !label && copyControl(),
4056
4067
  /* @__PURE__ */ jsx32("pre", { children: children ?? code })
4057
4068
  ] });
4058
4069
  }
@@ -4270,14 +4281,15 @@ var cases = {
4270
4281
  "not-found": { title: "We can't find that page", sub: "Check the address or return to the home page.", icon: "folder" },
4271
4282
  "not-yet-built": { title: "Not available yet", sub: "This screen ships in a later release.", icon: "clock" }
4272
4283
  };
4273
- function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actions }) {
4284
+ function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actions, className, level = 0 }) {
4274
4285
  const preset = cases[variant];
4275
4286
  const heading = title ?? preset.title;
4276
4287
  const guidance = sub ?? preset.sub;
4277
4288
  const glyph2 = icon9 ?? preset.icon;
4278
- return /* @__PURE__ */ jsxs31("div", { className: "ui-empty", children: [
4289
+ const Title = [2, 3, 4, 5, 6].includes(level) ? `h${level}` : "div";
4290
+ return /* @__PURE__ */ jsxs31("div", { className: ["ui-empty", className].filter(Boolean).join(" "), children: [
4279
4291
  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("div", { className: "ui-empty__title", children: heading }),
4292
+ heading && /* @__PURE__ */ jsx35(Title, { className: "ui-empty__title", children: heading }),
4281
4293
  guidance && /* @__PURE__ */ jsx35("div", { className: "ui-empty__sub", children: guidance }),
4282
4294
  actions && /* @__PURE__ */ jsx35("div", { className: "ui-empty__actions", children: actions })
4283
4295
  ] });
@@ -4473,8 +4485,8 @@ function FileDrop({
4473
4485
  import { forwardRef as forwardRef9 } from "react";
4474
4486
  import { icon as icon6 } from "@apliteni/apliteni-ui";
4475
4487
  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: [
4488
+ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, className, ...props }, ref) {
4489
+ return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", style: width ? { width, flex: "none" } : void 0, children: [
4478
4490
  /* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4479
4491
  /* @__PURE__ */ jsx37(
4480
4492
  "input",
@@ -5194,10 +5206,10 @@ function AppShell({
5194
5206
  ] });
5195
5207
  const page = /* @__PURE__ */ jsxs37("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
5196
5208
  back && /* @__PURE__ */ jsx41(BackLink, { ...back }),
5197
- tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
5209
+ title != null && (tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
5198
5210
  /* @__PURE__ */ jsx41("h1", { children: title }),
5199
5211
  /* @__PURE__ */ jsx41("div", { className: "ui-app__tools", children: tools })
5200
- ] }) : /* @__PURE__ */ jsx41("h1", { children: title }),
5212
+ ] }) : /* @__PURE__ */ jsx41("h1", { children: title })),
5201
5213
  lede && /* @__PURE__ */ jsx41("p", { className: "ui-app__sub", children: lede }),
5202
5214
  actions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__actions", children: actions }),
5203
5215
  /* @__PURE__ */ jsx41("div", { className: "ui-app__body", children })
@@ -5334,11 +5346,27 @@ function AppShell({
5334
5346
  // src/AuthShell.tsx
5335
5347
  import { forwardRef as forwardRef10 } from "react";
5336
5348
  import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
5337
- var AuthShell = forwardRef10(function AuthShell2({ brand, children, className, ...rest }, ref) {
5338
- return /* @__PURE__ */ jsx42("div", { ...rest, ref, className: ["ui-auth", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs38("div", { className: "ui-auth__card", children: [
5339
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5340
- children
5341
- ] }) });
5349
+ var AuthShell = forwardRef10(function AuthShell2({ brand, children, split, tagline, brandAbove, className, ...rest }, ref) {
5350
+ const cls = ["ui-auth", split && "ui-auth--split", brandAbove && "ui-auth--brand-above", className].filter(Boolean).join(" ");
5351
+ if (!split && brandAbove) {
5352
+ return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5353
+ /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5354
+ /* @__PURE__ */ jsx42("div", { className: "ui-auth__card", children })
5355
+ ] });
5356
+ }
5357
+ if (!split) {
5358
+ return /* @__PURE__ */ jsx42("div", { ...rest, ref, className: cls, children: /* @__PURE__ */ jsxs38("div", { className: "ui-auth__card", children: [
5359
+ /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5360
+ children
5361
+ ] }) });
5362
+ }
5363
+ return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5364
+ /* @__PURE__ */ jsxs38("aside", { className: "ui-auth__brand-pane", children: [
5365
+ /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5366
+ tagline && /* @__PURE__ */ jsx42("p", { className: "ui-auth__tagline", children: tagline })
5367
+ ] }),
5368
+ /* @__PURE__ */ jsx42("div", { className: "ui-auth__pane", children })
5369
+ ] });
5342
5370
  });
5343
5371
 
5344
5372
  // src/Footer.tsx
@@ -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 the Stock screener draws, else outside the bar.
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 */
@@ -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
- /* Two letters in 24px leave the type at the kit's smallest step; in 32px one step down. */
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); }
@@ -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
@@ -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;
@@ -1,5 +1,5 @@
1
1
  /* ============================================================================
2
- * Card — .ui-card (a filled surface one step off the page: edged in both themes)
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.
@@ -33,7 +60,10 @@
33
60
 
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
- .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
+ /* #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 { --ui-block-gap: var(--space-10); gap: var(--ui-block-gap); }
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)) 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 the page. */
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(--bg);
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
+ }
@@ -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
 
@@ -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: label */
29
+ /* rank: caption */
22
30
  font-size: var(--text-sm);
23
- font-weight: var(--weight-medium);
24
- color: var(--text);
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); }
@@ -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. At 560px and
262
- below the label stacks over the value and there is nothing to align. A field's own label
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; }
@@ -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