@apliteni/apliteni-ui 0.142.7 → 0.145.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.142.7",
3
+ "version": "0.145.0",
4
4
 
5
5
  "workspaces": [
6
6
  "react"
package/react/README.md CHANGED
@@ -925,8 +925,8 @@ to `format`. A `bars-below` series takes positive magnitudes and is drawn under
925
925
  A period marked `estimated` keeps its series fill with a dashed edge. The legend names the state.
926
926
  The readout and the optional table show the state and its `note`.
927
927
 
928
- A bar series names a tone. `accent` and `accent-soft` are one hue at two weights, which is how
929
- two series read apart without spending a second colour on them; `good` and `bad` say which way
928
+ A bar series names a tone. Each tone has its own hue: `accent` is blue and `accent-soft` is
929
+ cyan, so two series read apart by hue. `good` and `bad` say which way
930
930
  the news runs, and belong to a series where some direction is better. Every tone is opaque and
931
931
  clears 3:1 against the card and against the page, in both themes and under every accent.
932
932
 
@@ -1055,9 +1055,127 @@
1055
1055
  width: 100%;
1056
1056
  }
1057
1057
  }
1058
+ .ui-app__rail > .ui-react-app__control {
1059
+ width: var(--ui-nav-col);
1060
+ flex: none;
1061
+ transition: opacity var(--dur-fast) var(--ease);
1062
+ }
1063
+ .ui-react-app__control {
1064
+ display: flex;
1065
+ align-items: center;
1066
+ gap: var(--space-1);
1067
+ min-width: 0;
1068
+ }
1069
+ .ui-react-app__control > :first-child {
1070
+ flex: 1 1 auto;
1071
+ min-width: 0;
1072
+ justify-content: flex-start;
1073
+ }
1074
+ :where(.ui-app.is-collapsed) .ui-app__rail > .ui-react-app__control {
1075
+ opacity: 0;
1076
+ pointer-events: none;
1077
+ }
1078
+ .ui-react-app__menu > .ui-react-app__control {
1079
+ margin-bottom: var(--space-3);
1080
+ }
1081
+ .ui-react-app__menu > .ui-react-app__control .toggle {
1082
+ width: 40px;
1083
+ height: 40px;
1084
+ }
1085
+ .ui-app__drawer .ui-app__user-panel .ui-dropdown__item {
1086
+ min-height: 40px;
1087
+ }
1088
+ .ui-react-app .ui-app__fold-row:has(> .ui-react-app__head-control) {
1089
+ display: flex;
1090
+ align-items: center;
1091
+ gap: var(--space-1);
1092
+ }
1093
+ .ui-react-app__head-control {
1094
+ display: flex;
1095
+ align-items: center;
1096
+ flex: none;
1097
+ }
1098
+ .ui-react-app__head-control > button,
1099
+ .ui-react-app__head-control > a,
1100
+ .ui-react-app__head-control > .ui-dropdown > .ui-dropdown__trigger {
1101
+ display: inline-grid;
1102
+ place-items: center;
1103
+ width: var(--ui-head-control-w, var(--ui-nav-strip, 40px));
1104
+ height: var(--ui-head-control-h, calc(18px + 1.2 * var(--text-base)));
1105
+ padding: 0;
1106
+ border: 0;
1107
+ border-radius: 10px;
1108
+ background: none;
1109
+ color: var(--text);
1110
+ transform: none;
1111
+ }
1112
+ .ui-react-app__head-control > button:hover,
1113
+ .ui-react-app__head-control > a:hover,
1114
+ .ui-react-app__head-control > .ui-dropdown > .ui-dropdown__trigger:hover {
1115
+ transform: none;
1116
+ color: var(--strong);
1117
+ background: color-mix(in srgb, var(--surface-3) 50%, transparent);
1118
+ }
1119
+ .ui-react-app__head-control > button:focus-visible,
1120
+ .ui-react-app__head-control > a:focus-visible,
1121
+ .ui-react-app__head-control > .ui-dropdown > .ui-dropdown__trigger:focus-visible {
1122
+ color: var(--strong);
1123
+ }
1124
+ .ui-react-app__head-control svg {
1125
+ display: block;
1126
+ width: 17px;
1127
+ height: 17px;
1128
+ opacity: 0.66;
1129
+ stroke-width: 2.2;
1130
+ }
1131
+ :where(.ui-app.is-collapsed) .ui-app__rail .ui-react-app__head-control {
1132
+ position: absolute;
1133
+ inset-inline-start: 0;
1134
+ top: calc(50% + var(--ui-app-band) / 2 + var(--space-5));
1135
+ }
1136
+ :where(.ui-app.is-collapsed) .ui-app__rail > .ui-app__head:has(.ui-react-app__head-control):not(:has(+ .ui-react-app__control)) {
1137
+ margin-bottom: calc(18px + 1.2 * var(--text-base) + var(--space-5));
1138
+ }
1139
+ :where(.ui-app.is-collapsed) .ui-app__rail:has(.ui-react-app__head-control) > .ui-react-app__control {
1140
+ min-height: calc(18px + 1.2 * var(--text-base));
1141
+ }
1142
+ .ui-drawer__actions .ui-react-app__head-control {
1143
+ --ui-head-control-w: 40px;
1144
+ --ui-head-control-h: 40px;
1145
+ }
1058
1146
  .ui-react-app__band-control {
1059
1147
  display: contents;
1060
1148
  }
1149
+ .ui-react-app__title {
1150
+ display: none;
1151
+ }
1152
+ @media (min-width: 721px) {
1153
+ .ui-react-app .ui-app__bar:has(> .ui-react-app__title) .ui-app__search {
1154
+ margin-inline: auto;
1155
+ }
1156
+ .ui-react-app .ui-app__bar:has(> .ui-react-app__title) .ui-app__bar-gap {
1157
+ display: none;
1158
+ }
1159
+ }
1160
+ @media (max-width: 720px) {
1161
+ .ui-react-app .ui-app__bar:has(> .ui-app__menu:last-child) {
1162
+ padding-inline: var(--space-2);
1163
+ }
1164
+ .ui-react-app__title {
1165
+ display: block;
1166
+ flex: 1 1 auto;
1167
+ min-width: 0;
1168
+ margin-inline: var(--space-1);
1169
+ overflow: hidden;
1170
+ text-overflow: ellipsis;
1171
+ white-space: nowrap;
1172
+ color: var(--strong);
1173
+ font-weight: var(--weight-semibold);
1174
+ }
1175
+ .ui-react-app .ui-app__bar:has(> .ui-react-app__title) .ui-app__bar-gap {
1176
+ display: none;
1177
+ }
1178
+ }
1061
1179
  @media (max-width: 560px) {
1062
1180
  .ui-react-app .ui-app__bar {
1063
1181
  gap: 0;
@@ -1070,12 +1188,9 @@
1070
1188
  gap: var(--space-3);
1071
1189
  --tap-clear-x: var(--space-3);
1072
1190
  }
1073
- .ui-react-app .ui-app__bar:not(:has(> .ui-app__menu:first-child)) {
1191
+ .ui-react-app .ui-app__bar:not(:has(> .ui-app__menu)) {
1074
1192
  padding-inline-start: var(--space-4);
1075
1193
  }
1076
- .ui-react-app .ui-app__bar-gap {
1077
- display: none;
1078
- }
1079
1194
  .ui-react-app .ui-app__bar .ui-app__menu,
1080
1195
  .ui-react-app .ui-app__bar .ui-app__search,
1081
1196
  .ui-react-app .ui-app__bar .toggle,
@@ -1101,33 +1216,24 @@
1101
1216
  .ui-react-app .ui-app__bar > .ui-app__brand--band {
1102
1217
  min-width: 40px;
1103
1218
  min-height: 40px;
1104
- margin-inline-start: var(--space-1);
1105
1219
  }
1106
1220
  .ui-react-app .ui-app__user--bar {
1107
1221
  margin: 0;
1108
1222
  }
1109
- .ui-react-app .ui-app__search {
1110
- order: 2;
1111
- }
1112
1223
  .ui-react-app .ui-app__search-ic {
1113
1224
  display: flex;
1114
1225
  }
1115
- .ui-react-app__band-control > :first-child {
1116
- order: 1;
1117
- min-width: 0;
1118
- margin-inline: var(--space-1) auto;
1119
- }
1120
- .ui-react-app__band-control > :not(:first-child) {
1121
- order: 3;
1226
+ .ui-react-app .ui-app__bar:not(:has(> .ui-app__menu)) .ui-app__bar-gap {
1227
+ display: none;
1122
1228
  }
1123
- .ui-react-app .ui-app__bar:not(:has(.ui-react-app__band-control)) .ui-app__search {
1229
+ .ui-react-app .ui-app__bar:not(:has(> .ui-app__menu)) .ui-app__search {
1124
1230
  margin-inline-start: auto;
1125
1231
  }
1126
- .ui-react-app .ui-app__bar .toggle {
1127
- order: 4;
1232
+ .ui-react-app .ui-app__bar > .ui-app__brand:not(.ui-app__brand--band) {
1233
+ display: none;
1128
1234
  }
1129
- .ui-react-app .ui-app__user--bar {
1130
- order: 5;
1235
+ .ui-react-app__band-control > :first-child {
1236
+ min-width: 0;
1131
1237
  }
1132
1238
  .ui-react-app__band-control > .ui-btn,
1133
1239
  .ui-react-app__band-control > .ui-dropdown > .ui-dropdown__trigger {
@@ -1147,17 +1253,6 @@
1147
1253
  text-overflow: ellipsis;
1148
1254
  white-space: nowrap;
1149
1255
  }
1150
- .ui-react-app .ui-app__bar > .ui-app__brand:not(.ui-app__brand--band) {
1151
- display: none;
1152
- }
1153
- .ui-react-app .ui-app__bar {
1154
- container-type: inline-size;
1155
- }
1156
- }
1157
- @container (max-width: 373px) {
1158
- .ui-react-app .ui-app__bar > .ui-app__brand--band {
1159
- display: none;
1160
- }
1161
1256
  }
1162
1257
 
1163
1258
  /* src/AuthShell.css */
@@ -215,10 +215,13 @@ type DrawerProps = {
215
215
  side?: 'right' | 'left' | 'top' | 'bottom';
216
216
  size?: 'sm' | 'md' | 'lg';
217
217
  footer?: ReactNode;
218
+ /** Controls in the header, between the title and the close button. */
219
+ headerActions?: ReactNode;
218
220
  children?: ReactNode;
219
221
  closeLabel?: string;
222
+ initialFocusRef?: RefObject<HTMLElement | null>;
220
223
  };
221
- declare function Drawer({ open, title, onClose, side, size, footer, children, closeLabel, }: DrawerProps): react.ReactPortal | null;
224
+ declare function Drawer({ open, title, onClose, side, size, footer, headerActions, children, closeLabel, initialFocusRef, }: DrawerProps): react.ReactPortal | null;
222
225
 
223
226
  type CommandItem = {
224
227
  id: string;
@@ -931,6 +934,9 @@ type AppShellProps = {
931
934
  lede?: string;
932
935
  actions?: ReactNode;
933
936
  bandControl?: ReactNode;
937
+ /** One glyph control in the sidebar head, before the fold button, drawn as the fold is.
938
+ * On a phone it stands in the menu panel's head. Topbar layout only (#732). */
939
+ headControl?: ReactNode;
934
940
  /** The band trigger's words and its name at every width. Below 560px the trigger shows
935
941
  * only its glyph (#729), and the words stay its accessible name. */
936
942
  searchLabel?: string;
@@ -947,7 +953,7 @@ type AppShellProps = {
947
953
  /** Spread linkProps onto the router link, including children and onClick. */
948
954
  renderLink?: (section: AppShellSection, linkProps: ComponentPropsWithoutRef<'a'>) => ReactNode;
949
955
  };
950
- declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, crumbs, lede, actions, bandControl, account, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
956
+ declare function AppShell({ sections, pathname, title, children, word, brand, layout, brandHref, width, back, crumbs, lede, actions, bandControl, headControl, account, onSignOut, searchLabel, defaultCollapsed, palette, renderLink }: AppShellProps): react.JSX.Element;
951
957
 
952
958
  type AuthShellProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
953
959
  brand: ReactNode;
@@ -1114,8 +1120,9 @@ type ChartSeries = {
1114
1120
  shape?: 'bars' | 'bars-below' | 'line';
1115
1121
  /**
1116
1122
  * Bars take a tone. A line is `neutral` unless the caller says otherwise.
1117
- * `accent` and `accent-soft` are one hue at two weights, which is how two
1118
- * series read apart without spending a second colour on them.
1123
+ * The tones are the chart's own fixed palette and do not follow the product
1124
+ * accent. Each tone has its own hue: `accent` is blue and `accent-soft` is
1125
+ * cyan, so two series read apart by hue.
1119
1126
  */
1120
1127
  tone?: ChartTone;
1121
1128
  };
@@ -1119,15 +1119,17 @@ function Drawer({
1119
1119
  side = "right",
1120
1120
  size = "md",
1121
1121
  footer,
1122
+ headerActions,
1122
1123
  children,
1123
- closeLabel = "Close"
1124
+ closeLabel = "Close",
1125
+ initialFocusRef
1124
1126
  }) {
1125
1127
  const root = useRef7(null);
1126
1128
  const panel = useRef7(null);
1127
1129
  const body = useRef7(null);
1128
1130
  const titleId = useId5();
1129
1131
  const { mounted, shown } = usePresence(open, root, panel);
1130
- const scope = useDialog(shown, { root, panel, body }, onClose);
1132
+ const scope = useDialog(shown, { root, panel, body, initialFocus: initialFocusRef }, onClose);
1131
1133
  if (!mounted) return null;
1132
1134
  const cls = ["ui-drawer", `ui-drawer--${side}`, `ui-drawer--${size}`, shown && "is-open"].filter(Boolean).join(" ");
1133
1135
  return createPortal3(
@@ -1145,6 +1147,7 @@ function Drawer({
1145
1147
  children: [
1146
1148
  /* @__PURE__ */ jsxs12("header", { className: "ui-drawer__header", children: [
1147
1149
  /* @__PURE__ */ jsx16("h2", { className: "ui-drawer__title", id: titleId, children: title }),
1150
+ headerActions && /* @__PURE__ */ jsx16("div", { className: "ui-drawer__actions", children: headerActions }),
1148
1151
  /* @__PURE__ */ jsx16("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx16(Icon, { name: "x" }) })
1149
1152
  ] }),
1150
1153
  /* @__PURE__ */ jsx16("div", { className: "ui-drawer__body", ref: body, children }),
@@ -4130,8 +4133,8 @@ function Toast({ children, collapse = false }) {
4130
4133
  }
4131
4134
 
4132
4135
  // src/AppShell.tsx
4133
- import { useEffect as useEffect15, useId as useId12, useRef as useRef20, useState as useState16 } from "react";
4134
- import { prism } from "@apliteni/apliteni-ui";
4136
+ import { useEffect as useEffect15, useId as useId12, useMemo as useMemo4, useRef as useRef20, useState as useState16 } from "react";
4137
+ import { prism, themeIcon as themeIcon2 } from "@apliteni/apliteni-ui";
4135
4138
 
4136
4139
  // src/lib/palette-hotkey.ts
4137
4140
  function paletteHotkey(platform = typeof navigator === "undefined" ? "" : navigator.platform) {
@@ -4341,7 +4344,7 @@ function subscribe(notify) {
4341
4344
  window.removeEventListener("storage", onStorage);
4342
4345
  };
4343
4346
  }
4344
- function ThemeToggle({ labelled = false }) {
4347
+ function useThemeChoice() {
4345
4348
  const theme = useSyncExternalStore(subscribe, snapshot, () => "auto");
4346
4349
  const next = theme === "dark" ? "light" : theme === "light" ? "auto" : "dark";
4347
4350
  const label = theme === "auto" ? "Auto" : theme === "light" ? "Light" : "Dark";
@@ -4355,6 +4358,10 @@ function ThemeToggle({ labelled = false }) {
4355
4358
  }
4356
4359
  window.dispatchEvent(new Event(CHOICE_EVENT));
4357
4360
  };
4361
+ return { theme, next, label, name, toggle };
4362
+ }
4363
+ function ThemeToggle({ labelled = false }) {
4364
+ const { theme, label, name, toggle } = useThemeChoice();
4358
4365
  const button = /* @__PURE__ */ jsx38("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx38("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
4359
4366
  return labelled ? /* @__PURE__ */ jsxs33("span", { className: "ui-theme-toggle", children: [
4360
4367
  button,
@@ -4383,6 +4390,7 @@ function AppShell({
4383
4390
  lede,
4384
4391
  actions,
4385
4392
  bandControl,
4393
+ headControl,
4386
4394
  account,
4387
4395
  onSignOut,
4388
4396
  searchLabel = "Search or run a command\u2026",
@@ -4391,10 +4399,15 @@ function AppShell({
4391
4399
  renderLink
4392
4400
  }) {
4393
4401
  const uid = useId12();
4402
+ const theme = useThemeChoice();
4394
4403
  const [collapsed, setCollapsed] = useState16(defaultCollapsed);
4395
4404
  const [search, setSearch] = useState16(false);
4396
4405
  const [menu, setMenu] = useState16(false);
4397
4406
  const menuButton = useRef20(null);
4407
+ const menuBody = useRef20(null);
4408
+ const firstRow = useMemo4(() => ({ get current() {
4409
+ return menuBody.current?.querySelector(".ui-nav__item") ?? null;
4410
+ } }), []);
4398
4411
  const current = path(pathname);
4399
4412
  const active = sections.filter((section) => current === path(section.href) || path(section.href) !== "/" && current.startsWith(`${path(section.href)}/`)).sort((a, b) => path(b.href).length - path(a.href).length)[0];
4400
4413
  useEffect15(() => {
@@ -4452,7 +4465,7 @@ function AppShell({
4452
4465
  brand ?? /* @__PURE__ */ jsx39("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
4453
4466
  /* @__PURE__ */ jsx39("span", { children: word })
4454
4467
  ] });
4455
- const accountBlock = () => /* @__PURE__ */ jsx39("div", { className: "ui-app__user", children: /* @__PURE__ */ jsx39(
4468
+ const accountBlock = (withTheme = false) => /* @__PURE__ */ jsx39("div", { className: "ui-app__user", children: /* @__PURE__ */ jsx39(
4456
4469
  Dropdown,
4457
4470
  {
4458
4471
  variant: "menu",
@@ -4469,28 +4482,46 @@ function AppShell({
4469
4482
  /* @__PURE__ */ jsx39("span", { children: account.email })
4470
4483
  ] })
4471
4484
  ] }),
4472
- items: [{ label: "Sign out", icon: "logout", danger: true }],
4473
- onSelect: onSignOut
4474
- }
4475
- ) });
4476
- const foldControl = /* @__PURE__ */ jsx39("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs34(
4477
- "button",
4478
- {
4479
- type: "button",
4480
- className: "ui-nav__item ui-app__fold",
4481
- "aria-expanded": !collapsed,
4482
- "aria-label": foldLabel,
4483
- onClick: fold,
4484
- children: [
4485
- /* @__PURE__ */ jsx39("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs34("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4486
- /* @__PURE__ */ jsx39("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
4487
- /* @__PURE__ */ jsx39("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
4488
- /* @__PURE__ */ jsx39("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
4489
- ] }) }),
4490
- /* @__PURE__ */ jsx39("span", { className: "ui-nav__label", children: foldLabel })
4491
- ]
4485
+ items: [...withTheme ? [{ label: `${theme.label} theme`, value: "theme" }] : [], { label: "Sign out", value: "sign-out", icon: "logout", danger: true }],
4486
+ row: (item, props) => item.value === "theme" ? /* @__PURE__ */ jsxs34(
4487
+ "div",
4488
+ {
4489
+ ...props,
4490
+ "aria-label": `${item.label}. Switch to ${theme.next}.`,
4491
+ onClick: theme.toggle,
4492
+ children: [
4493
+ /* @__PURE__ */ jsx39("span", { className: "ui-dropdown__ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon2(theme.theme) } }),
4494
+ /* @__PURE__ */ jsx39("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx39("span", { className: "ui-dropdown__label", children: item.label }) })
4495
+ ]
4496
+ }
4497
+ ) : /* @__PURE__ */ jsx39("div", { ...props }),
4498
+ onSelect: (value) => {
4499
+ if (value === "sign-out") onSignOut();
4500
+ }
4492
4501
  }
4493
4502
  ) });
4503
+ const headSlot = layout === "topbar" && headControl && /* @__PURE__ */ jsx39("div", { className: "ui-react-app__head-control", children: headControl });
4504
+ const foldControl = /* @__PURE__ */ jsxs34("div", { className: "ui-app__fold-row", children: [
4505
+ headSlot,
4506
+ /* @__PURE__ */ jsxs34(
4507
+ "button",
4508
+ {
4509
+ type: "button",
4510
+ className: "ui-nav__item ui-app__fold",
4511
+ "aria-expanded": !collapsed,
4512
+ "aria-label": foldLabel,
4513
+ onClick: fold,
4514
+ children: [
4515
+ /* @__PURE__ */ jsx39("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs34("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
4516
+ /* @__PURE__ */ jsx39("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
4517
+ /* @__PURE__ */ jsx39("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
4518
+ /* @__PURE__ */ jsx39("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
4519
+ ] }) }),
4520
+ /* @__PURE__ */ jsx39("span", { className: "ui-nav__label", children: foldLabel })
4521
+ ]
4522
+ }
4523
+ )
4524
+ ] });
4494
4525
  const page = /* @__PURE__ */ jsxs34("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
4495
4526
  back ? /* @__PURE__ */ jsx39(BackLink, { ...back }) : crumbs?.length ? /* @__PURE__ */ jsx39(Breadcrumbs, { items: crumbs }) : null,
4496
4527
  /* @__PURE__ */ jsx39("h1", { children: title }),
@@ -4538,62 +4569,85 @@ function AppShell({
4538
4569
  }
4539
4570
  )
4540
4571
  ] });
4572
+ const control = bandControl && /* @__PURE__ */ jsx39("div", { className: "ui-react-app__control", inert: collapsed, children: bandControl });
4541
4573
  return /* @__PURE__ */ jsxs34("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
4542
4574
  navigable && /* @__PURE__ */ jsxs34("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
4543
- /* @__PURE__ */ jsx39("div", { className: "ui-app__head", children: lockup }),
4575
+ /* @__PURE__ */ jsxs34("div", { className: "ui-app__head", children: [
4576
+ lockup,
4577
+ foldControl
4578
+ ] }),
4579
+ control,
4544
4580
  sidebar("Sections"),
4545
- /* @__PURE__ */ jsx39("div", { className: "ui-app__foot", children: foldControl })
4581
+ accountBlock(true)
4546
4582
  ] }),
4547
4583
  /* @__PURE__ */ jsxs34("div", { className: "ui-app__well", children: [
4548
4584
  /* @__PURE__ */ jsxs34("header", { className: "ui-app__bar", children: [
4549
- navigable && /* @__PURE__ */ jsxs34(Fragment16, { children: [
4550
- /* @__PURE__ */ jsx39(
4551
- Button,
4552
- {
4553
- ref: menuButton,
4554
- variant: "ghost",
4555
- icon: "menu",
4556
- iconOnly: true,
4557
- "aria-label": "Menu",
4558
- className: "ui-app__menu",
4559
- "aria-haspopup": "dialog",
4560
- "aria-expanded": menu,
4561
- onClick: () => setMenu(true)
4562
- }
4563
- ),
4564
- /* @__PURE__ */ jsx39("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx39("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
4565
- ] }),
4566
- !navigable && lockup,
4585
+ navigable ? /* @__PURE__ */ jsxs34(Fragment16, { children: [
4586
+ /* @__PURE__ */ jsx39("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx39("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) }),
4587
+ /* @__PURE__ */ jsx39("span", { className: "ui-react-app__title", "aria-hidden": "true", children: title })
4588
+ ] }) : lockup,
4567
4589
  /* @__PURE__ */ jsxs34("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
4568
4590
  /* @__PURE__ */ jsx39("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx39(Icon, { name: "search" }) }),
4569
4591
  /* @__PURE__ */ jsx39("span", { className: "ui-app__search-txt", children: searchLabel }),
4570
4592
  /* @__PURE__ */ jsx39("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
4571
4593
  ] }),
4572
4594
  /* @__PURE__ */ jsx39("span", { className: "ui-app__bar-gap" }),
4573
- bandControl && /* @__PURE__ */ jsx39("span", { className: "ui-react-app__band-control", children: bandControl }),
4574
- /* @__PURE__ */ jsx39(ThemeToggle, {}),
4575
- /* @__PURE__ */ jsx39("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx39(
4576
- Dropdown,
4595
+ navigable ? /* @__PURE__ */ jsx39(
4596
+ Button,
4577
4597
  {
4578
- variant: "menu",
4579
- align: "end",
4580
- chevron: false,
4581
- ariaLabel: `Signed in as ${account.name}, ${account.email}`,
4582
- triggerClass: "ui-app__user-trigger",
4583
- panelClass: "ui-app__user-panel",
4584
- triggerContent: /* @__PURE__ */ jsx39("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx39(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
4585
- header: /* @__PURE__ */ jsxs34("div", { className: "ui-dropdown__head", children: [
4586
- /* @__PURE__ */ jsx39("b", { children: account.name }),
4587
- /* @__PURE__ */ jsx39("span", { children: account.email })
4588
- ] }),
4589
- items: [{ label: "Sign out", icon: "logout", danger: true }],
4590
- onSelect: onSignOut
4598
+ ref: menuButton,
4599
+ variant: "ghost",
4600
+ icon: "menu",
4601
+ iconOnly: true,
4602
+ "aria-label": "Menu",
4603
+ className: "ui-app__menu",
4604
+ "aria-haspopup": "dialog",
4605
+ "aria-expanded": menu,
4606
+ onClick: () => setMenu(true)
4591
4607
  }
4592
- ) })
4608
+ ) : /* @__PURE__ */ jsxs34(Fragment16, { children: [
4609
+ bandControl && /* @__PURE__ */ jsx39("span", { className: "ui-react-app__band-control", children: bandControl }),
4610
+ headControl && /* @__PURE__ */ jsx39("span", { className: "ui-react-app__band-control", children: headControl }),
4611
+ /* @__PURE__ */ jsx39(ThemeToggle, {}),
4612
+ /* @__PURE__ */ jsx39("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx39(
4613
+ Dropdown,
4614
+ {
4615
+ variant: "menu",
4616
+ align: "end",
4617
+ chevron: false,
4618
+ ariaLabel: `Signed in as ${account.name}, ${account.email}`,
4619
+ triggerClass: "ui-app__user-trigger",
4620
+ panelClass: "ui-app__user-panel",
4621
+ triggerContent: /* @__PURE__ */ jsx39("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx39(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
4622
+ header: /* @__PURE__ */ jsxs34("div", { className: "ui-dropdown__head", children: [
4623
+ /* @__PURE__ */ jsx39("b", { children: account.name }),
4624
+ /* @__PURE__ */ jsx39("span", { children: account.email })
4625
+ ] }),
4626
+ items: [{ label: "Sign out", icon: "logout", danger: true }],
4627
+ onSelect: onSignOut
4628
+ }
4629
+ ) })
4630
+ ] })
4593
4631
  ] }),
4594
4632
  page
4595
4633
  ] }),
4596
- navigable && /* @__PURE__ */ jsx39(Drawer, { open: menu, onClose: () => setMenu(false), title: word, side: "left", size: "sm", children: /* @__PURE__ */ jsx39("div", { className: "ui-react-app__menu", children: sidebar("Menu sections") }) }),
4634
+ navigable && /* @__PURE__ */ jsx39(
4635
+ Drawer,
4636
+ {
4637
+ open: menu,
4638
+ onClose: () => setMenu(false),
4639
+ title: word,
4640
+ side: "left",
4641
+ size: "sm",
4642
+ initialFocusRef: firstRow,
4643
+ headerActions: headSlot,
4644
+ footer: /* @__PURE__ */ jsx39("div", { className: "ui-app__drawer", children: accountBlock(true) }),
4645
+ children: /* @__PURE__ */ jsxs34("div", { className: "ui-react-app__menu", ref: menuBody, children: [
4646
+ bandControl && /* @__PURE__ */ jsx39("div", { className: "ui-react-app__control", children: bandControl }),
4647
+ sidebar("Menu sections")
4648
+ ] })
4649
+ }
4650
+ ),
4597
4651
  /* @__PURE__ */ jsx39(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
4598
4652
  ] });
4599
4653
  }
@@ -4807,7 +4861,7 @@ import {
4807
4861
  useEffect as useEffect17,
4808
4862
  useId as useId14,
4809
4863
  useLayoutEffect as useLayoutEffect5,
4810
- useMemo as useMemo4,
4864
+ useMemo as useMemo5,
4811
4865
  useRef as useRef22,
4812
4866
  useState as useState18
4813
4867
  } from "react";
@@ -4821,11 +4875,15 @@ var TAP_FLOOR = 44;
4821
4875
  var PHONE_MAX2 = 560;
4822
4876
  var FALLBACK_COL = 48;
4823
4877
  var BAR_SHARE = 0.5;
4824
- var BAR_MAX = 24;
4825
- var BAR_MAX_BRIDGE = 40;
4878
+ var BAR_MAX = 12;
4879
+ var BAR_MAX_BRIDGE = 22;
4826
4880
  var LANE_GAP = 2;
4827
- var BAR_RADIUS = 4;
4828
4881
  var MISSING = "\u2014";
4882
+ function fadeOf(uid, m, bridge) {
4883
+ if (!bridge && !m.foot) return null;
4884
+ const up = bridge ? m.value >= 0 : m.foot === "bottom";
4885
+ return { id: `${uid}-fade-${m.tone}-${up ? "up" : "down"}`, tone: m.tone, up };
4886
+ }
4829
4887
  var cx8 = (...parts) => parts.filter(Boolean).join(" ");
4830
4888
  var px = (n) => Math.round(n * 10) / 10;
4831
4889
  var columnOf = (p, fallback) => ({
@@ -4840,7 +4898,7 @@ function onPrevious(value, previous, when) {
4840
4898
  return `${pct < 0 ? "\u2212" : "+"}${Math.abs(pct).toFixed(1)}% on ${when}`;
4841
4899
  }
4842
4900
  function barPath(m) {
4843
- const r = Math.min(BAR_RADIUS, m.w / 2, m.h / (m.foot ? 1 : 4));
4901
+ const r = Math.min(m.w / 2, m.h / (m.foot ? 1 : 4));
4844
4902
  const { x, y: top, w, h } = m;
4845
4903
  const bottom = top + h;
4846
4904
  const arc = (dx, dy, sweep) => `a${px(r)} ${px(r)} 0 0 ${sweep} ${px(dx)} ${px(dy)}`;
@@ -4995,7 +5053,7 @@ function Chart(props) {
4995
5053
  const bridgeTones = props.variant === "bridge" ? props.tones : void 0;
4996
5054
  const periods = props.variant === "bridge" ? void 0 : props.periods;
4997
5055
  const series = props.variant === "bridge" ? void 0 : props.series;
4998
- const frame = useMemo4(() => steps ? bridgeFrame(steps, bridgeTones, format) : seriesFrame(periods ?? [], series ?? [], spark, format), [steps, bridgeTones, periods, series, spark, format]);
5056
+ const frame = useMemo5(() => steps ? bridgeFrame(steps, bridgeTones, format) : seriesFrame(periods ?? [], series ?? [], spark, format), [steps, bridgeTones, periods, series, spark, format]);
4999
5057
  const { columns, scale, lines, keys, tableHead, tableRows } = frame;
5000
5058
  const count = columns.length || 1;
5001
5059
  const cursor = Math.min(rawCursor, Math.max(columns.length - 1, 0));
@@ -5018,7 +5076,7 @@ function Chart(props) {
5018
5076
  ));
5019
5077
  const barWidth = (groupWidth - LANE_GAP * (lanes - 1)) / lanes;
5020
5078
  const centre = useCallback7((column) => column * colWidth + colWidth / 2, [colWidth]);
5021
- const marks = useMemo4(() => {
5079
+ const marks = useMemo5(() => {
5022
5080
  const out = frame.bars.map((bar) => {
5023
5081
  let top = Math.min(y(bar.from), y(bar.to));
5024
5082
  let bottom = Math.max(y(bar.from), y(bar.to));
@@ -5090,7 +5148,8 @@ function Chart(props) {
5090
5148
  }
5091
5149
  return [...out, ...dots];
5092
5150
  }, [frame, lines, keys, columns, centre, barWidth, groupWidth, y, floor, colWidth, plotWidth, boxTop, boxHeight]);
5093
- const byId = useMemo4(() => new Map(marks.map((m) => [m.id, m])), [marks]);
5151
+ const byId = useMemo5(() => new Map(marks.map((m) => [m.id, m])), [marks]);
5152
+ const fades = useMemo5(() => new Map(marks.filter((m) => m.kind === "bar").map((m) => fadeOf(uid, m, variant === "bridge")).filter((f) => f !== null).map((f) => [f.id, f])), [marks, uid, variant]);
5094
5153
  const lead = useCallback7((column) => marks.find((m) => m.column === column), [marks]);
5095
5154
  const open = openId ? byId.get(openId) : void 0;
5096
5155
  useEffect17(() => {
@@ -5202,20 +5261,16 @@ function Chart(props) {
5202
5261
  !spark && keys.length > 0 && /* @__PURE__ */ jsxs38("ul", { className: "ui-chart__legend", children: [
5203
5262
  keys.map((key) => /* @__PURE__ */ jsxs38("li", { className: cx8("ui-chart__key", `ui-chart__tone--${key.tone}`), children: [
5204
5263
  key.shape === "line" ? /* @__PURE__ */ jsx43("svg", { className: "ui-chart__key-mark", width: "18", height: "12", viewBox: "0 0 18 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("path", { className: "ui-chart__key-line", d: "M1 9 L6 5 L12 7 L17 3" }) }) : /* @__PURE__ */ jsx43("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx43(
5205
- "rect",
5264
+ "path",
5206
5265
  {
5207
5266
  className: "ui-chart__key-swatch",
5208
- x: "1",
5209
- width: "10",
5210
- height: "5",
5211
- rx: "1",
5212
- y: key.shape === "bars-below" ? 6 : 1
5267
+ d: barPath({ x: 3.5, y: 1, w: 5, h: 10, foot: key.shape === "bars-below" ? "top" : "bottom" })
5213
5268
  }
5214
5269
  ) }),
5215
5270
  key.name
5216
5271
  ] }, key.id)),
5217
5272
  estimated.length > 0 && /* @__PURE__ */ jsxs38("li", { className: cx8("ui-chart__key", `ui-chart__tone--${estimatedTone}`), children: [
5218
- /* @__PURE__ */ jsx43("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("rect", { className: "ui-chart__key-estimated", x: "1.5", y: "1.5", width: "9", height: "9", rx: "1" }) }),
5273
+ /* @__PURE__ */ jsx43("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("rect", { className: "ui-chart__key-estimated", x: "1.5", y: "1.5", width: "9", height: "9", rx: "2.5" }) }),
5219
5274
  "Estimated"
5220
5275
  ] })
5221
5276
  ] }),
@@ -5359,18 +5414,38 @@ function Chart(props) {
5359
5414
  y2: px(y(0))
5360
5415
  }
5361
5416
  ),
5362
- marks.filter((m) => m.kind === "bar").map((mark) => /* @__PURE__ */ jsx43(
5363
- "path",
5417
+ fades.size > 0 && /* @__PURE__ */ jsx43("defs", { children: [...fades.values()].map((fade) => /* @__PURE__ */ jsxs38(
5418
+ "linearGradient",
5364
5419
  {
5365
- className: cx8(
5366
- "ui-chart__bar",
5367
- `ui-chart__tone--${mark.tone}`,
5368
- mark.estimated && "is-estimated"
5369
- ),
5370
- d: barPath(mark)
5420
+ id: fade.id,
5421
+ className: `ui-chart__tone--${fade.tone}`,
5422
+ x1: "0",
5423
+ x2: "0",
5424
+ y1: fade.up ? "1" : "0",
5425
+ y2: fade.up ? "0" : "1",
5426
+ children: [
5427
+ /* @__PURE__ */ jsx43("stop", { className: "ui-chart__fade-base", offset: "0" }),
5428
+ /* @__PURE__ */ jsx43("stop", { className: "ui-chart__fade-end", offset: "1" })
5429
+ ]
5371
5430
  },
5372
- `bar-${mark.id}`
5373
- )),
5431
+ fade.id
5432
+ )) }),
5433
+ marks.filter((m) => m.kind === "bar").map((mark) => {
5434
+ const fade = fadeOf(uid, mark, variant === "bridge");
5435
+ return /* @__PURE__ */ jsx43(
5436
+ "path",
5437
+ {
5438
+ className: cx8(
5439
+ "ui-chart__bar",
5440
+ `ui-chart__tone--${mark.tone}`,
5441
+ mark.estimated && "is-estimated"
5442
+ ),
5443
+ style: fade ? { "--ui-chart-paint": `url(#${fade.id})` } : void 0,
5444
+ d: barPath(mark)
5445
+ },
5446
+ `bar-${mark.id}`
5447
+ );
5448
+ }),
5374
5449
  ["casing", "stroke"].map((layer) => lines.flatMap(
5375
5450
  (line) => line.values.slice(1).map((value, i) => Number.isFinite(value) && Number.isFinite(line.values[i]) ? /* @__PURE__ */ jsx43(
5376
5451
  "line",
@@ -170,16 +170,20 @@
170
170
  .ui-chart__band { fill: var(--surface-3); }
171
171
 
172
172
  .ui-chart__bar {
173
- /* One flat tone, the whole bar. A ramp down the bar was the one thing in the
174
- drawing that carried no number: it let the middle go while both edges held,
175
- so a reader comparing two months compared two shaded cylinders. */
176
- fill: var(--ui-chart-tone);
173
+ /* A bar fades from a tint of its tone at the base to the full tone at the data
174
+ end. The fade is allowed because it carries no value: the strong data end, the
175
+ zero line and the base hold the bar's length, and the data end alone clears
176
+ 3:1. The component names the ramp per bar as --ui-chart-paint. A bridge bar
177
+ fades from the previous running total to the new one. */
178
+ fill: var(--ui-chart-paint, var(--ui-chart-tone));
177
179
  stroke: none;
178
180
  }
179
- /* Keep each series' fill weight. Ground-coloured dashes mark unfinished data
181
+ /* The ramp's two stops. Each reads the tone of the gradient that holds it. */
182
+ .ui-chart__fade-base { stop-color: var(--ui-chart-fade); }
183
+ .ui-chart__fade-end { stop-color: var(--ui-chart-tone); }
184
+ /* Keep each series' fill. Ground-coloured dashes mark unfinished data
180
185
  without joining the mirrored bars across the zero channel. */
181
186
  .ui-chart__bar.is-estimated {
182
- fill: var(--ui-chart-tone);
183
187
  stroke: var(--ui-chart-ground);
184
188
  stroke-width: 1;
185
189
  stroke-dasharray: 3 2;
@@ -231,25 +235,17 @@
231
235
  chrome to measure. */
232
236
  .ui-chart--pick [data-mark] { cursor: pointer; }
233
237
 
234
- /* The tones. A series names one; the token behind it is the kit's, and the same
235
- in both themes' terms. The neutral one is --muted, which is what
236
- --signal-solid-neutral already is: a mid grey in both themes, where --dim
237
- would paint a bridge's totals near-black in light and near-white in dark. */
238
- .ui-chart__tone--accent { --ui-chart-tone: var(--accent); }
239
- /* The accent's second weight: the same hue, let down towards the ground rather
240
- than given an opacity, so a mark painted with it is opaque and a reader
241
- measures one colour. The mix crosses 3:1 at 67% against the card AND against
242
- the page, in both themes, under all four accents, so 70% ships with room over
243
- the bar rather than sitting on it — the 40% the restyle's mock drew measures
244
- 1.99:1 and 2.03:1 and does not ship. */
245
- .ui-chart__tone--accent-soft {
246
- --ui-chart-tone: color-mix(in srgb, var(--accent) 70%, var(--ui-chart-ground));
247
- }
248
- .ui-chart__tone--good { --ui-chart-tone: var(--green); }
249
- .ui-chart__tone--bad { --ui-chart-tone: var(--pink); }
250
- .ui-chart__tone--warn { --ui-chart-tone: var(--amber); }
251
- .ui-chart__tone--info { --ui-chart-tone: var(--cyan); }
252
- .ui-chart__tone--neutral { --ui-chart-tone: var(--muted); }
238
+ /* The tones. A series names one, and each is the kit's own pair of tokens: the
239
+ tone, which is the data end and every line, legend key and dot, and its fade,
240
+ which is a bar's base. Both are fixed steps in each theme, so a chart does not
241
+ follow the product accent and accent-soft is not a mix towards the ground. */
242
+ .ui-chart__tone--accent { --ui-chart-tone: var(--chart-accent); --ui-chart-fade: var(--chart-accent-fade); }
243
+ .ui-chart__tone--accent-soft { --ui-chart-tone: var(--chart-accent-soft); --ui-chart-fade: var(--chart-accent-soft-fade); }
244
+ .ui-chart__tone--good { --ui-chart-tone: var(--chart-good); --ui-chart-fade: var(--chart-good-fade); }
245
+ .ui-chart__tone--bad { --ui-chart-tone: var(--chart-bad); --ui-chart-fade: var(--chart-bad-fade); }
246
+ .ui-chart__tone--warn { --ui-chart-tone: var(--chart-warn); --ui-chart-fade: var(--chart-warn-fade); }
247
+ .ui-chart__tone--info { --ui-chart-tone: var(--chart-info); --ui-chart-fade: var(--chart-info-fade); }
248
+ .ui-chart__tone--neutral { --ui-chart-tone: var(--chart-neutral); --ui-chart-fade: var(--chart-neutral-fade); }
253
249
 
254
250
  /* -- the table ------------------------------------------------------------- */
255
251
 
@@ -148,6 +148,8 @@
148
148
  letter-spacing: 0.01em;
149
149
  color: var(--strong);
150
150
  }
151
+ /* Header actions stand at the far end, beside the close button. */
152
+ .ui-drawer__actions { display: flex; align-items: center; gap: var(--space-1); margin-inline-start: auto; }
151
153
  .ui-drawer__close {
152
154
  display: inline-flex;
153
155
  align-items: center;
@@ -55,13 +55,12 @@
55
55
  transition: width var(--dur-med) var(--ease);
56
56
  }
57
57
  /* Each block of the rail keeps the open column while the box closes over it. The
58
- nav declares its own; these are the three that are not the nav. Scoped to the rail,
58
+ nav declares its own; these are the two that are not the nav. Scoped to the rail,
59
59
  because the topbar layout draws the reader's block in its band instead and a column
60
60
  the rail's width is no measurement for a box on a 52px line.
61
61
  why: docs/components.md#the-page-shell */
62
62
  .ui-app__rail > .ui-app__head,
63
- .ui-app__rail > .ui-app__user,
64
- .ui-app__rail > .ui-app__foot { width: var(--ui-nav-col); flex: none; }
63
+ .ui-app__rail > .ui-app__user { width: var(--ui-nav-col); flex: none; }
65
64
  /* The rail is itself --surface, so nav.css's plate has no step here: 1.000:1, with a
66
65
  hairline as the whole resting mark. Both marks go a rung further — the current row
67
66
  to the --surface-3 the folded rail already paints, a hovered row to half of it, so
@@ -140,18 +139,6 @@
140
139
  }
141
140
  /* A drawer's footer carries no rule above it, so the block keeps the rail's rule out. */
142
141
  .ui-app__drawer .ui-app__user { padding-top: 0; border-top: 0; }
143
- /* The other thing that can close a rail: where the reader's block is in the band,
144
- the fold's control takes its place under the same rule.
145
- why: docs/components.md#the-page-shell */
146
- .ui-app__foot {
147
- display: flex;
148
- align-items: center;
149
- padding-top: var(--space-5);
150
- border-top: 1px solid var(--border);
151
- }
152
- /* On the glyph column from the first frame, so the fold moves it nowhere — the ride
153
- along the closing edge belongs to the head band, where the mark holds that column. */
154
- .ui-app__foot > .ui-app__fold-row { margin-inline-start: 0; }
155
142
  /* The avatar is the reader block's own glyph, so half the difference between the
156
143
  glyph column and itself is the inset that centres it on the line every glyph above
157
144
  it stands on. The arithmetic and not the 5.5 it comes to: both numbers are declared
@@ -265,12 +252,9 @@
265
252
  lockup goes whole, since that column is where its mark stood. Below 720px there is
266
253
  no rail, so none of this is drawn. why: docs/components.md#the-page-shell */
267
254
  :where(.ui-app.is-collapsed) .ui-app__head > .ui-app__fold-row { inset-inline-start: calc(var(--ui-nav-strip) - var(--ui-nav-col)); }
268
- /* …and only in the layout where something arrives on the mark's column. In the
269
- topbar layout the toggle is at the rail's foot, nothing lands where the mark
270
- stands, and a lockup faded out there leaves a band with nothing in it and its
271
- hairline still under it. So that layout keeps the mark and lets the shared rule above fold away its words.
255
+ /* Both layouts put the toggle in the head (#732), so it lands where the mark stood.
272
256
  why: docs/components.md#the-page-shell */
273
- :where(.ui-app:not(.ui-app--topbar).is-collapsed) .ui-app__rail .ui-app__brand { opacity: 0; visibility: hidden; pointer-events: none; }
257
+ :where(.ui-app.is-collapsed) .ui-app__rail .ui-app__brand { opacity: 0; visibility: hidden; pointer-events: none; }
274
258
  :where(.ui-app.is-collapsed) .ui-app__rail .ui-nav__sub { margin-inline-start: 0; padding-inline-start: 0; border-inline-start-width: 0; }
275
259
  :where(.ui-app.is-collapsed) .ui-app__rail .ui-nav__item:not(:has(.ui-nav__ic))::after { opacity: 0.62; }
276
260
  /* The current row's plate on the glyph column, and beside it the one thing a bare rail
@@ -353,11 +337,10 @@
353
337
  z-index: var(--z-sticky);
354
338
  }
355
339
  .ui-app__bar-gap { flex: 1 1 auto; }
356
- /* The rail's two bands take the band's height, so the rule under the head lands on
340
+ /* The rail's head takes the band's height, so the rule under the head lands on
357
341
  the line the band's own rule lands on. The rail gives up its top inset to buy it. */
358
342
  .ui-app--topbar > .ui-app__rail { padding-top: 0; }
359
343
  .ui-app--topbar > .ui-app__rail > .ui-app__head { height: var(--ui-app-band); padding-bottom: 0; }
360
- .ui-app--topbar > .ui-app__rail > .ui-app__foot { height: var(--ui-app-band); padding-top: 0; }
361
344
 
362
345
  /* Drawn as a field, behaving as a button. The hairline and the radius are the
363
346
  field's — src/styles/input.css:20 `.ui-input,` sets both — because what it looks
@@ -331,6 +331,24 @@
331
331
  /* Backdrop that dims the page behind an overlay (drawer, modal, composer). */
332
332
  --scrim: rgba(0, 0, 0, 0.58);
333
333
 
334
+ /* Chart series tones (#740, the "Soft fade" palette), the same under every accent. A tone is the bar's data
335
+ end and clears 3:1 on the card and the page; its -fade is the bar's base, a tint
336
+ of the tone that does not clear 3:1 on the card by design. why: docs/components.md#react-charts */
337
+ --chart-accent: #347bcd;
338
+ --chart-accent-fade: #2b5185;
339
+ --chart-accent-soft: #26a7a9;
340
+ --chart-accent-soft-fade: #246971;
341
+ --chart-bad: #dd6a77;
342
+ --chart-bad-fade: #884856;
343
+ --chart-good: #4c7a37;
344
+ --chart-good-fade: #395133;
345
+ --chart-warn: #b78c26;
346
+ --chart-warn-fade: #745b29;
347
+ --chart-info: #9256a0;
348
+ --chart-info-fade: #5f3d6c;
349
+ --chart-neutral: #a29db6;
350
+ --chart-neutral-fade: #686478;
351
+
334
352
  /* Accent gradient stops (hero headline, marketing) — overridden per sub-theme.
335
353
  --grad-from is pinned to a literal rather than tracking --purple-light, which #157
336
354
  moved up a step; every --grad-from in accents.css is a literal for the same reason. */
@@ -500,6 +518,22 @@
500
518
 
501
519
  --scrim: rgba(20, 22, 40, 0.38);
502
520
 
521
+ /* Chart series tones (#740): the dark block's comment holds for these. */
522
+ --chart-accent: #236cbd;
523
+ --chart-accent-fade: #86aedb;
524
+ --chart-accent-soft: #04999c;
525
+ --chart-accent-soft-fade: #75c7c9;
526
+ --chart-bad: #c15260;
527
+ --chart-bad-fade: #dda0a8;
528
+ --chart-good: #3e6c29;
529
+ --chart-good-fade: #95ae89;
530
+ --chart-warn: #a97e0e;
531
+ --chart-warn-fade: #d0b87a;
532
+ --chart-info: #80448d;
533
+ --chart-info-fade: #b998c0;
534
+ --chart-neutral: #5c6270;
535
+ --chart-neutral-fade: #a5a9b0;
536
+
503
537
  --grad-from: var(--purple-light);
504
538
  --grad-to: var(--cyan);
505
539
  }