@apliteni/apliteni-ui 0.142.6 → 0.142.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/react/dist/index.css +127 -32
- package/react/dist/index.d.ts +8 -2
- package/react/dist/index.js +123 -69
- package/src/styles/card.css +5 -5
- package/src/styles/drawer.css +2 -0
- package/src/styles/layout.css +8 -25
- package/src/tokens/tokens.css +18 -18
package/package.json
CHANGED
package/react/dist/index.css
CHANGED
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
flex-direction: column;
|
|
230
230
|
background: var(--bg-elevated);
|
|
231
231
|
border: 0;
|
|
232
|
-
box-shadow: var(--elev-drop);
|
|
232
|
+
box-shadow: inset 0 0 0 1px var(--modal-edge), var(--elev-drop);
|
|
233
233
|
border-radius: var(--radius-md);
|
|
234
234
|
overflow: hidden;
|
|
235
235
|
transform: translateY(var(--space-2));
|
|
@@ -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
|
|
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-
|
|
1116
|
-
|
|
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-
|
|
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 .
|
|
1127
|
-
|
|
1232
|
+
.ui-react-app .ui-app__bar > .ui-app__brand:not(.ui-app__brand--band) {
|
|
1233
|
+
display: none;
|
|
1128
1234
|
}
|
|
1129
|
-
.ui-react-
|
|
1130
|
-
|
|
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 */
|
package/react/dist/index.d.ts
CHANGED
|
@@ -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;
|
package/react/dist/index.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
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__ */
|
|
4575
|
+
/* @__PURE__ */ jsxs34("div", { className: "ui-app__head", children: [
|
|
4576
|
+
lockup,
|
|
4577
|
+
foldControl
|
|
4578
|
+
] }),
|
|
4579
|
+
control,
|
|
4544
4580
|
sidebar("Sections"),
|
|
4545
|
-
|
|
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
|
|
4550
|
-
/* @__PURE__ */ jsx39(
|
|
4551
|
-
|
|
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
|
-
|
|
4574
|
-
|
|
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
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
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(
|
|
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
|
|
4864
|
+
useMemo as useMemo5,
|
|
4811
4865
|
useRef as useRef22,
|
|
4812
4866
|
useState as useState18
|
|
4813
4867
|
} from "react";
|
|
@@ -4995,7 +5049,7 @@ function Chart(props) {
|
|
|
4995
5049
|
const bridgeTones = props.variant === "bridge" ? props.tones : void 0;
|
|
4996
5050
|
const periods = props.variant === "bridge" ? void 0 : props.periods;
|
|
4997
5051
|
const series = props.variant === "bridge" ? void 0 : props.series;
|
|
4998
|
-
const frame =
|
|
5052
|
+
const frame = useMemo5(() => steps ? bridgeFrame(steps, bridgeTones, format) : seriesFrame(periods ?? [], series ?? [], spark, format), [steps, bridgeTones, periods, series, spark, format]);
|
|
4999
5053
|
const { columns, scale, lines, keys, tableHead, tableRows } = frame;
|
|
5000
5054
|
const count = columns.length || 1;
|
|
5001
5055
|
const cursor = Math.min(rawCursor, Math.max(columns.length - 1, 0));
|
|
@@ -5018,7 +5072,7 @@ function Chart(props) {
|
|
|
5018
5072
|
));
|
|
5019
5073
|
const barWidth = (groupWidth - LANE_GAP * (lanes - 1)) / lanes;
|
|
5020
5074
|
const centre = useCallback7((column) => column * colWidth + colWidth / 2, [colWidth]);
|
|
5021
|
-
const marks =
|
|
5075
|
+
const marks = useMemo5(() => {
|
|
5022
5076
|
const out = frame.bars.map((bar) => {
|
|
5023
5077
|
let top = Math.min(y(bar.from), y(bar.to));
|
|
5024
5078
|
let bottom = Math.max(y(bar.from), y(bar.to));
|
|
@@ -5090,7 +5144,7 @@ function Chart(props) {
|
|
|
5090
5144
|
}
|
|
5091
5145
|
return [...out, ...dots];
|
|
5092
5146
|
}, [frame, lines, keys, columns, centre, barWidth, groupWidth, y, floor, colWidth, plotWidth, boxTop, boxHeight]);
|
|
5093
|
-
const byId =
|
|
5147
|
+
const byId = useMemo5(() => new Map(marks.map((m) => [m.id, m])), [marks]);
|
|
5094
5148
|
const lead = useCallback7((column) => marks.find((m) => m.column === column), [marks]);
|
|
5095
5149
|
const open = openId ? byId.get(openId) : void 0;
|
|
5096
5150
|
useEffect17(() => {
|
package/src/styles/card.css
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* ============================================================================
|
|
2
|
-
* Card — .ui-card (a filled surface one step off the page: edged in
|
|
2
|
+
* Card — .ui-card (a filled surface one step off the page: edged in both themes)
|
|
3
3
|
* Rows: .ui-card__row / headers: .ui-card__title / .ui-card__sub
|
|
4
4
|
* ========================================================================== */
|
|
5
5
|
|
|
6
|
-
/* The surface is the step;
|
|
7
|
-
card
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
/* The surface is the step; the line makes it legible. Both themes edge the card with
|
|
7
|
+
--card-edge: the hairline in dark, --level-line in light. Light also casts --elev-rest,
|
|
8
|
+
a faint short shadow. Dark casts nothing. Decided on #730.
|
|
9
|
+
why: docs/foundations.md#elevation */
|
|
10
10
|
.ui-card {
|
|
11
11
|
--ui-card-ground: var(--surface); /* the ground a scrolling row inside covers its edge with; a tint repeats it below */
|
|
12
12
|
background: var(--surface);
|
package/src/styles/drawer.css
CHANGED
|
@@ -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;
|
package/src/styles/layout.css
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
.ui-app-page .topbar { position: sticky; top: 0; z-index: var(--z-sticky); }
|
|
29
29
|
|
|
30
30
|
/* The rail uses the card surface so its labels stay on a reading ground.
|
|
31
|
-
|
|
32
|
-
is flush to a screen edge.
|
|
31
|
+
Both themes draw its edge (--rail-edge); light also casts a faint --elev-rail, sideways,
|
|
32
|
+
because the rail is flush to a screen edge. Decided on #730.
|
|
33
33
|
why: docs/foundations.md#elevation
|
|
34
34
|
overflow-y, because the box is pinned at the viewport's height for the whole
|
|
35
35
|
scroll of .ui-app — without it a row past that height paints below the fold
|
|
@@ -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
|
|
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
|
-
/*
|
|
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
|
|
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
|
|
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
|
|
@@ -585,7 +568,7 @@
|
|
|
585
568
|
width: 100%;
|
|
586
569
|
max-width: var(--panel-md);
|
|
587
570
|
/* Floats over a spotlit page, so it takes the floating step and the floating
|
|
588
|
-
treatment: the two-step edge in dark, the drop
|
|
571
|
+
treatment: the two-step edge in dark, one line and the drop in light.
|
|
589
572
|
why: docs/foundations.md#elevation */
|
|
590
573
|
background: var(--bg-elevated);
|
|
591
574
|
border: 1px solid var(--float-edge);
|
package/src/tokens/tokens.css
CHANGED
|
@@ -162,12 +162,13 @@
|
|
|
162
162
|
|
|
163
163
|
/* WHICH EDGE EACH LEVEL DRAWS. One name per level, so a sheet never has to ask
|
|
164
164
|
which theme it is in. Dark answers all four with the hairline, because a drop
|
|
165
|
-
on a near-black page reaches 1.20 at its core and has nowhere else to go
|
|
166
|
-
|
|
165
|
+
on a near-black page reaches 1.20 at its core and has nowhere else to go.
|
|
166
|
+
Light draws one line and adds a faint short drop. why: docs/foundations.md#elevation */
|
|
167
167
|
--card-edge: var(--border); /* a card */
|
|
168
168
|
--rail-edge: var(--border); /* the shell's rail */
|
|
169
169
|
--float-edge: var(--border-strong); /* a floating surface, outer line */
|
|
170
170
|
--float-edge-inner: var(--border); /* a floating surface, inner line */
|
|
171
|
+
--modal-edge: transparent; /* the modal: the deep scrim is its edge */
|
|
171
172
|
|
|
172
173
|
/* Fields use the card surface and an edge in both themes. why: docs/foundations.md#elevation */
|
|
173
174
|
--field-bg: var(--surface);
|
|
@@ -377,16 +378,15 @@
|
|
|
377
378
|
--border: #e4e7ee;
|
|
378
379
|
--border-strong: #cdd2dc;
|
|
379
380
|
|
|
380
|
-
/* Light draws
|
|
381
|
-
|
|
382
|
-
the reference he supplied. A line divides two regions of ONE surface (a card's
|
|
383
|
-
rows, a table's rules, the rail's head band, the topbar); a drop says a surface
|
|
384
|
-
is HIGHER, and only a higher surface may cast one.
|
|
381
|
+
/* Light draws each LEVEL with one line and a faint short shadow. The line is half
|
|
382
|
+
way between --border and --border-strong. Decided on #730.
|
|
385
383
|
why: docs/foundations.md#elevation */
|
|
386
|
-
--
|
|
387
|
-
--
|
|
388
|
-
--
|
|
384
|
+
--level-line: color-mix(in srgb, var(--border) 50%, var(--border-strong));
|
|
385
|
+
--card-edge: var(--level-line);
|
|
386
|
+
--rail-edge: var(--level-line);
|
|
387
|
+
--float-edge: var(--level-line);
|
|
389
388
|
--float-edge-inner: transparent;
|
|
389
|
+
--modal-edge: var(--float-edge);
|
|
390
390
|
|
|
391
391
|
/* Light draws a field with its EDGE, because since #448 it has no well left to draw it
|
|
392
392
|
with: a card and a panel are both white, the sunken step falls two rungs under either,
|
|
@@ -485,18 +485,18 @@
|
|
|
485
485
|
/* THE LIGHT LADDER. Three rungs, each two layers: a wide faint one and a short one.
|
|
486
486
|
Each layer is offset on one axis, blurred at least twice as wide as it is offset,
|
|
487
487
|
and held in by a negative spread. None is a glow — a glow is a zero-offset layer of
|
|
488
|
-
the signal's own colour.
|
|
489
|
-
|
|
488
|
+
the signal's own colour. Each rung is short and faint, because the level's line
|
|
489
|
+
marks the edge and the rung only adds lift. Decided on #730.
|
|
490
490
|
why: docs/foundations.md#elevation */
|
|
491
491
|
--elev-rest:
|
|
492
|
-
0 2px
|
|
493
|
-
0 1px 3px -1px color-mix(in srgb, var(--shadow-ink)
|
|
492
|
+
0 2px 6px -1px color-mix(in srgb, var(--shadow-ink) 6%, transparent),
|
|
493
|
+
0 1px 3px -1px color-mix(in srgb, var(--shadow-ink) 4%, transparent);
|
|
494
494
|
--elev-rail:
|
|
495
|
-
|
|
496
|
-
1px 0 3px -1px color-mix(in srgb, var(--shadow-ink)
|
|
495
|
+
3px 0 8px -3px color-mix(in srgb, var(--shadow-ink) 6%, transparent),
|
|
496
|
+
1px 0 3px -1px color-mix(in srgb, var(--shadow-ink) 4%, transparent);
|
|
497
497
|
--elev-drop:
|
|
498
|
-
0
|
|
499
|
-
0 1px
|
|
498
|
+
0 12px 32px -12px color-mix(in srgb, var(--shadow-ink) 16%, transparent),
|
|
499
|
+
0 1px 8px -3px color-mix(in srgb, var(--shadow-ink) 9%, transparent);
|
|
500
500
|
|
|
501
501
|
--scrim: rgba(20, 22, 40, 0.38);
|
|
502
502
|
|