Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
File size: 14,513 Bytes
1d4419b 89af3b2 1d4419b 89af3b2 1d4419b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | /* wave 51 -- lane C (the Sheet chrome: page, rail, formula bar, binding editor, dialogs).
Pre-created at the wave base with its @import in index.css so no lane edits index.css
(a shared file is a merge collision). Tokens only: var(--lp-*), var(--cg-z-*); no literal
font-size (verify_ui goes RED), no hex, no text-transform: uppercase (DESIGN.md section 2). */
/* -- W51-T08: the formula bar's cancel and confirm controls -------------------------------- */
/* The row itself is pinned at 32px in `styles/wave50/sheet.css`, NOT here. That file is imported
from inside SheetPage's lazy chunk while this one arrives through index.css in the eager chunk,
so an equal-specificity redeclaration written here would lose the cascade and change nothing.
New classes have no such fight, which is why only these two live in this file.
Excel's order, and the reason it is worth copying: name box, cancel, confirm, then the fx mark
and the input. The two acts a person needs while a cell is open sit where the eye already is,
between the address they are editing and the text they are editing it into.
The buttons are square and sized off the row so the whole band stays 32px tall whatever the
glyph is; the SVG inside is 13px, matching `.sheet-fx-mark`'s existing mark. */
.sheet-fx-btn {
flex: 0 0 auto;
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: 1px solid transparent;
border-radius: var(--lp-r-sm);
background: transparent;
/* ⛔ NOT RED, AND THAT INCLUDES CANCEL. Red is the destructive channel (DESIGN.md §3); cancel
reverts an edit that has not landed and destroys no stored value, so both controls carry the
same quiet muted ink as every other glyph in this row and earn colour only on hover. */
color: var(--lp-muted);
cursor: pointer;
transition: background-color 150ms ease-out, color 150ms ease-out, opacity 150ms ease-out;
}
.sheet-fx-btn:hover:not(:disabled) {
background: var(--lp-surface-2);
color: var(--lp-ink);
}
/* Confirm is the affirmative act, so it is the one that takes the interactive blue on hover.
Contrast is the deep blue rather than the fill blue, which is 1.88:1 and unreadable as ink. */
.sheet-fx-btn--ok:hover:not(:disabled) {
background: var(--lp-blue-tint);
color: var(--lp-blue-deep);
}
.sheet-fx-btn:active:not(:disabled) {
transform: translateY(1px);
}
/* Keyboard focus is visible on a control whose resting state has no border of its own. */
.sheet-fx-btn:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
background: var(--lp-blue-tint);
color: var(--lp-ink);
}
/* Nothing to confirm and nothing to revert: a bound cell, a busy page, or no cell at all. */
.sheet-fx-btn:disabled {
opacity: 0.45;
cursor: default;
}
@media (prefers-reduced-motion: reduce) {
.sheet-fx-btn {
transition: none;
}
.sheet-fx-btn:active:not(:disabled) {
transform: none;
}
}
/* ChatDockSeat owns display and motion. This page keeps the seat's layout class. */
.sheet-chat-dock {
flex: 0 0 auto;
min-width: 0;
min-height: 0;
align-self: stretch;
overflow: hidden;
}
/* -- W51-T10: the "Shared to me" section in the Sheet rail ------------------------------------
Two NEW classes, which is why they live in this eager sheet rather than in wave50/sheet.css:
nothing else in the app declares them, so there is no cascade to lose. The rows inside are
`.cg-view-row` / `.cg-view-main` and take index.css's paint untouched, exactly as the rows above
them do; only the band and its heading are new.
The heading is a quiet label rather than a fold head: a fold head carries a toggle and this band
does not open or close, so borrowing the class would promise a control that is not there. It is
sentence case and takes a size token, never a literal (DESIGN.md section 2). */
.sheet-shared {
margin-top: 10px;
padding-top: 8px;
border-top: 1px solid var(--lp-line);
}
.sheet-shared-head {
margin: 0 0 2px;
padding: 0 10px;
color: var(--lp-muted);
font-size: var(--lp-fs-3xs);
}
/* -- W51-T12: the binding panel, a real COLUMN at the right of the Sheet's content box ---------
⛔⛔ THIS IS A FLEX CHILD, NOT AN OVERLAY, AND THAT IS THE WHOLE POINT OF THE NEW CLASS NAME.
`styles/wave49/sheet.css` styles `.sheet-binding` as `position: fixed; z-index: var(--cg-z-drawer)`
and floats it over the canvas. W50-QA-1 is what that costs on a real surface: a panel positioned
over the map made every pin under it unclickable, and no z-index repairs document-order stacking.
The design contract's clause is that the right-side panel is a 380px column at the right of the
module's content box and THE CONTENT BESIDE IT SHRINKS, so the panel never covers what it
describes.
`.sheet-page` is `display: flex; align-items: stretch` and `BindingEditor` already renders as one
of its direct children, beside `.sheet-body` (`flex: 1 1 auto; min-width: 0`). So `flex: 0 0 380px`
here narrows the body, and that is observable as a MEASUREMENT rather than as a picture: the
grid's own bounding width with the panel open is smaller than with it closed, which is the one
difference a screenshot of an overlay and a screenshot of a column do not have.
⚠ NO `position` AND NO `z-index` BELOW, deliberately. Either one would re-create the overlay this
rule exists to replace. The panel is in flow; it needs no layer.
⚠ THE CLASS IS NEW BECAUSE THE CASCADE COULD NOT BE WON. `wave49/sheet.css` is imported from
inside SheetPage's LAZY chunk while this file arrives eagerly through `index.css`, so an
equal-specificity override of `.sheet-binding` written here would lose
([[a-lazy-chunk-stylesheet-beats-an-eager-one]]). Every INNER class the panel still uses
(`.sheet-field`, `.sheet-scope`, `.sheet-radio`, `.sheet-binding-title`) is a top-level selector
rather than a descendant of `.sheet-binding`, so all of that paint survives the rename. */
.sheet-binding-panel {
flex: 0 0 380px;
min-width: 0;
min-height: 0;
align-self: stretch;
display: flex;
flex-direction: column;
/* The panel clips; the SCROLLER is the wrapper inside it. See `.sheet-binding-scroll`. */
overflow: hidden;
border-left: 1px solid var(--lp-line);
background: var(--lp-surface);
}
.sheet-binding-head {
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 12px 14px;
border-bottom: 1px solid var(--lp-line);
}
/* DESIGN.md section 4's button reset in full, then the quiet-glyph treatment every other close
control in this page wears. */
.sheet-binding-close {
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
border: 1px solid transparent;
border-radius: var(--lp-r-sm);
background: transparent;
font: inherit;
color: var(--lp-muted);
cursor: pointer;
transition: background-color 150ms ease-out, color 150ms ease-out;
}
.sheet-binding-close:hover {
background: var(--lp-surface-2);
color: var(--lp-ink);
}
.sheet-binding-close:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
background: var(--lp-blue-tint);
color: var(--lp-ink);
}
/* ⛔ THE INTERNAL SCROLL LIVES HERE, NOT ON THE PANEL. A 380px column holding the whole filter
builder is taller than the page; scrolling the panel as a whole would push Save off the bottom
with nothing on screen saying it is still there. `min-height: 0` is what lets a flex child
shrink below its content and therefore scroll at all. */
.sheet-binding-scroll {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px 14px;
}
/* The action row is OUTSIDE the scroller, pinned to the foot. Two classes deep so it wins over
`styles/wave49/sheet.css`'s single-class rule on load order alone. */
.sheet-binding-panel .sheet-binding-actions {
flex: 0 0 auto;
padding: 10px 14px;
border-top: 1px solid var(--lp-line);
}
/* -- R9: the period's quick picks and its lock ------------------------------------------------ */
.sheet-period-quick {
display: flex;
gap: 6px;
}
.sheet-period-pick,
.sheet-period-link {
appearance: none;
padding: 4px 9px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-surface);
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
cursor: pointer;
transition: background-color 150ms ease-out, color 150ms ease-out;
}
.sheet-period-pick:hover,
.sheet-period-link:hover {
background: var(--lp-surface-2);
}
/* "Use a cell" is a LINK, so it reads as one: no border, no fill, the interactive blue. */
.sheet-period-link {
align-self: flex-start;
padding: 0;
border-color: transparent;
background: transparent;
color: var(--lp-blue-deep);
text-decoration: underline;
}
.sheet-period-link:hover {
background: transparent;
color: var(--lp-blue-deep);
}
.sheet-period-lock {
display: flex;
flex-direction: column;
gap: 4px;
}
/* A switch, because the control has two states with names and the sentence beneath it says what
each one costs when the cell is copied. */
.sheet-lock-toggle {
appearance: none;
display: inline-flex;
align-items: center;
gap: 7px;
align-self: flex-start;
padding: 4px 9px 4px 5px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-pill, 999px);
background: var(--lp-surface);
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
cursor: pointer;
transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.sheet-lock-dot {
width: 10px;
height: 10px;
border-radius: 50%;
border: 1px solid var(--lp-line-strong);
background: var(--lp-surface-2);
transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.sheet-lock-toggle.is-on {
border-color: var(--lp-blue-deep);
background: var(--lp-blue-tint);
}
.sheet-lock-toggle.is-on .sheet-lock-dot {
border-color: var(--lp-blue-deep);
background: var(--lp-blue-deep);
}
.sheet-lock-toggle:focus-visible {
outline: none;
border-color: var(--lp-blue-deep);
}
.sheet-period-note {
margin: 0;
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
}
/* -- The sentences: period, lock, both drag rules, and R11's adopted filter -------------------- */
.sheet-binding-summary {
display: flex;
flex-direction: column;
gap: 3px;
padding: 9px 10px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-wash);
}
.sheet-binding-line {
margin: 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
/* R11's provenance line is the one sentence here nobody can recover from another control, so it
is the one that carries emphasis. */
.sheet-binding-adopted {
color: var(--lp-muted);
font-style: italic;
}
@media (prefers-reduced-motion: reduce) {
.sheet-binding-close,
.sheet-period-pick,
.sheet-period-link,
.sheet-lock-toggle,
.sheet-lock-dot {
transition: none;
}
}
/* == W51-T13 (owner instruction 7, contract C4) - the import dialog's body ======================
Everything here lives INSIDE `ConfirmDialog`'s `.lp-dialog-body`, so the panel, the scrim, the
action row and the focus ring are the kit's and nothing below re-declares one. What the body
needs that the kit has no class for is a file input, a progress track and three grades of
sentence.
The sheet is imported EAGERLY by index.css while wave50/sheet.css arrives inside SheetPage's
lazy chunk, so a class declared here must be a NEW name rather than an override of one that
sheet already owns. Every selector below is new. */
.sheet-import {
display: flex;
flex-direction: column;
gap: 10px;
}
.sheet-import-file {
width: 100%;
font: inherit;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
.sheet-import-file:disabled {
color: var(--lp-muted);
cursor: not-allowed;
}
.sheet-import-progress {
display: flex;
flex-direction: column;
gap: 6px;
}
.sheet-import-state {
margin: 0;
font-size: var(--lp-fs-2xs);
font-weight: 600;
color: var(--lp-ink);
}
/* The track is the full width of the body, so the fill's percentage reads as a proportion of the
whole job rather than of some inner box a person has to measure by eye. */
.sheet-import-bar {
height: 6px;
width: 100%;
overflow: hidden;
border-radius: 999px;
background: var(--lp-wash);
border: 1px solid var(--lp-line);
}
.sheet-import-fill {
display: block;
height: 100%;
border-radius: 999px;
background: var(--lp-blue-deep);
transition: width 220ms ease-out;
}
.sheet-import-line {
margin: 0;
font-size: var(--lp-fs-2xs);
color: var(--lp-ink);
}
.sheet-import-note {
margin: 0;
font-size: var(--lp-fs-3xs);
color: var(--lp-muted);
}
/* A real workbook can name dozens of unsupported parts, and a dialog taller than the viewport puts
its own Cancel button off screen. The list scrolls; the action row never moves. */
.sheet-import-unsupported {
display: flex;
flex-direction: column;
gap: 3px;
max-height: 160px;
overflow-y: auto;
padding: 9px 10px;
border: 1px solid var(--lp-line);
border-radius: var(--lp-r-md);
background: var(--lp-wash);
}
/* A refusal is the one sentence in this body that must be read, so it is the one that carries
weight. It is not coloured red: the sentence already says what happened, and a red paragraph in
a dialog that also refuses on ordinary things like a wrong extension reads as an error state
when it is usually just an instruction. */
.sheet-import-refusal {
margin: 0;
font-size: var(--lp-fs-2xs);
font-weight: 600;
color: var(--lp-ink);
}
/* The anchored tooltip shares the popover surface and keeps every cause and fix readable. */
.cg-pop.sheet-pivot-limit-tip,
.cg-overlay.sheet-pivot-limit-tip {
width: calc(var(--lp-rail-w) * 2);
padding: var(--lp-home-tile-inset);
font-size: var(--lp-fs-2xs);
line-height: var(--lp-lh);
color: var(--lp-ink);
background: var(--lp-surface);
border-radius: var(--lp-r-md);
box-shadow: var(--shell-shadow-overlay);
white-space: pre-line;
overflow-wrap: anywhere;
overflow: auto;
overflow-y: auto;
pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
.sheet-import-fill {
transition: none;
}
}
|