viewkitjs 0.30.0 → 0.31.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/CHANGELOG.md +30 -6
- package/package.json +4 -2
- package/views/dist/controls/avatar/avatar.d.ts +10 -4
- package/views/dist/controls/avatar/avatar.js +5 -3
- package/views/dist/controls/avatar/tokens.d.ts +60 -0
- package/views/dist/controls/avatar/tokens.js +15 -0
- package/views/dist/controls/avatar.css +29 -15
- package/views/dist/controls/button/map-button.d.ts +5 -3
- package/views/dist/controls/button/map-button.js +14 -7
- package/views/dist/controls/index.d.ts +3 -2
- package/views/dist/controls/index.js +2 -1
- package/views/dist/controls/input/input.d.ts +12 -1
- package/views/dist/controls/input/input.js +7 -6
- package/views/dist/controls/input/save-mark.d.ts +8 -0
- package/views/dist/controls/input/save-mark.js +26 -0
- package/views/dist/controls/input/tokens.d.ts +16 -0
- package/views/dist/controls/input/tokens.js +4 -0
- package/views/dist/controls/input.css +18 -0
- package/views/dist/controls/radio/radio.d.ts +7 -0
- package/views/dist/controls/radio/radio.js +8 -4
- package/views/dist/controls/radio/tokens.d.ts +40 -0
- package/views/dist/controls/radio/tokens.js +10 -0
- package/views/dist/controls/radio.css +52 -3
- package/views/dist/controls/select/select.d.ts +8 -2
- package/views/dist/controls/select/select.js +6 -4
- package/views/dist/controls/setting-row/looks.d.ts +10 -0
- package/views/dist/controls/setting-row/looks.js +17 -0
- package/views/dist/controls/setting-row/setting-row.d.ts +65 -0
- package/views/dist/controls/setting-row/setting-row.js +66 -0
- package/views/dist/controls/setting-row/tokens.d.ts +84 -0
- package/views/dist/controls/setting-row/tokens.js +23 -0
- package/views/dist/controls/setting-row.css +94 -0
- package/views/dist/controls/switch-row/switch-row.d.ts +1 -15
- package/views/dist/controls/switch-row/switch-row.js +1 -9
- package/views/dist/controls/tokens.js +2 -0
- package/views/dist/looks/index.d.ts +1 -0
- package/views/dist/looks/index.js +1 -0
- package/views/dist/looks/pieces.js +2 -0
- package/views/dist/panels/react/views-row/FoldingViewRow.js +3 -4
- package/views/dist/styles.css +182 -19
- package/views/dist/styles.unlayered.css +182 -19
- package/views/docs/controls/avatar.md +15 -0
- package/views/docs/controls/input.md +8 -0
- package/views/docs/controls/radio.md +18 -0
- package/views/docs/controls/select.md +4 -0
- package/views/docs/controls/setting-row.md +26 -0
- package/views/docs/reference/controls.md +27 -10
- package/views/docs/reference/looks.md +3 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! viewkitjs 0.
|
|
1
|
+
/*! viewkitjs 0.31.0 · viewkitjs/views/styles.unlayered.css: ViewKit's look, its defaults the Outright look */
|
|
2
2
|
|
|
3
3
|
@layer base {
|
|
4
4
|
@layer viewkit {:where(*):where([data-slot^="vk-"], [data-vk-body], [data-slot^="vk-"] *, [data-vk-body] *),
|
|
@@ -431,48 +431,60 @@
|
|
|
431
431
|
.o-avatar-letters svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
|
|
432
432
|
|
|
433
433
|
/* ── Sizes: 16 in a typed Select's chip, its initials at the 3xs type size; 20 in chips and text, 24 in dense rows and stacks,
|
|
434
|
-
40 in headers, 64 on a record's page ── */
|
|
434
|
+
40 in headers, 56 at a settings page's head, 64 on a record's page ── */
|
|
435
435
|
.o-avatar.o-avatar-2xs { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); font-size: var(--vk-font-size-3xs); }
|
|
436
436
|
.o-avatar.o-avatar-xs { width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 5); font-size: var(--vk-font-size-2xs); }
|
|
437
437
|
.o-avatar.o-avatar-sm { width: calc(var(--vk-spacing) * 6); height: calc(var(--vk-spacing) * 6); font-size: var(--vk-font-size-2xs); }
|
|
438
438
|
.o-avatar.o-avatar-lg { width: calc(var(--vk-spacing) * 10); height: calc(var(--vk-spacing) * 10); font-size: var(--vk-font-size-sm); }
|
|
439
|
+
.o-avatar.o-avatar-56 { width: calc(var(--vk-spacing) * 14); height: calc(var(--vk-spacing) * 14); font-size: var(--vk-font-size-xl); }
|
|
439
440
|
.o-avatar.o-avatar-xl { width: calc(var(--vk-spacing) * 16); height: calc(var(--vk-spacing) * 16); font-size: var(--vk-font-size-2xl); }
|
|
440
441
|
|
|
441
442
|
/* ── A thing: a square, its corners a step that grows with it, on the neutral ground, its edge inside ─ */
|
|
442
443
|
.o-avatar.o-avatar-thing { border-radius: var(--avatar-r); background-color: var(--vk-neutral); color: var(--vk-fg-subtle); box-shadow: inset 0 0 0 var(--vk-border-width) var(--vk-border-subtle); }
|
|
443
444
|
/* The workspace: the one square in the brand. */
|
|
444
445
|
.o-avatar.o-avatar-workspace { background-color: var(--vk-brand); color: var(--vk-fg-on-brand); box-shadow: none; }
|
|
446
|
+
/* A square's own colour, the workspace's included: on the hue's fill, what it holds in the hue's strong ink, with no edge; grey
|
|
447
|
+
the neutral ground in the quieter ink. */
|
|
448
|
+
.o-avatar.o-avatar-thing[data-colour] { box-shadow: none; }
|
|
449
|
+
.o-avatar.o-avatar-thing[data-colour="blue"] { background-color: var(--vk-label-blue-fill); color: var(--vk-label-blue-strong); }
|
|
450
|
+
.o-avatar.o-avatar-thing[data-colour="green"] { background-color: var(--vk-label-green-fill); color: var(--vk-label-green-strong); }
|
|
451
|
+
.o-avatar.o-avatar-thing[data-colour="amber"] { background-color: var(--vk-label-amber-fill); color: var(--vk-label-amber-strong); }
|
|
452
|
+
.o-avatar.o-avatar-thing[data-colour="red"] { background-color: var(--vk-label-red-fill); color: var(--vk-label-red-strong); }
|
|
453
|
+
.o-avatar.o-avatar-thing[data-colour="purple"] { background-color: var(--vk-label-purple-fill); color: var(--vk-label-purple-strong); }
|
|
454
|
+
.o-avatar.o-avatar-thing[data-colour="pink"] { background-color: var(--vk-label-pink-fill); color: var(--vk-label-pink-strong); }
|
|
455
|
+
.o-avatar.o-avatar-thing[data-colour="teal"] { background-color: var(--vk-label-teal-fill); color: var(--vk-label-teal-strong); }
|
|
456
|
+
.o-avatar.o-avatar-thing[data-colour="grey"] { background-color: var(--vk-neutral); color: var(--vk-fg-subtle); }
|
|
445
457
|
/* An agent: a thing's square holding its own icon. Its mark comes in its own fills, so it is filled, never drawn as a
|
|
446
458
|
line as a record's icon is; a mark with no colour of its own (Codex's, Grok's) takes the text's ink, as the canvas drew it. */
|
|
447
459
|
.o-avatar-agent .o-avatar-letters svg { fill: var(--vk-fg); stroke: none; }
|
|
448
460
|
|
|
449
|
-
/* ── Corners: a radius token per size, in steps; Medium with nothing set: xs at 20, sm at 24 and 32, md at 40, lg at 64,
|
|
461
|
+
/* ── Corners: a radius token per size, in steps, 56 taking 64's; Medium with nothing set: xs at 20, sm at 24 and 32, md at 40, lg at 56 and 64,
|
|
450
462
|
between Small and Large, the tokens holding nothing between xs and sm ────────────────────────────── */
|
|
451
463
|
.o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-sm); }
|
|
452
464
|
.o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs) { --avatar-r: var(--vk-radius-xs); }
|
|
453
465
|
.o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-md); }
|
|
454
|
-
.o-avatar.o-avatar-thing.o-avatar-xl { --avatar-r: var(--vk-radius-lg); }
|
|
455
|
-
/* Small: xs at 20 and 24, sm at 32 and 40, md at 64. */
|
|
466
|
+
.o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-lg); }
|
|
467
|
+
/* Small: xs at 20 and 24, sm at 32 and 40, md at 56 and 64. */
|
|
456
468
|
[data-avatar-corners="small"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-sm); }
|
|
457
469
|
[data-avatar-corners="small"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-xs); }
|
|
458
|
-
[data-avatar-corners="small"] .o-avatar.o-avatar-thing.o-avatar-xl { --avatar-r: var(--vk-radius-md); }
|
|
459
|
-
/* Large, the radii before Medium came: sm at 20 and 24, md at 32, lg at 40, xl at 64. */
|
|
470
|
+
[data-avatar-corners="small"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-md); }
|
|
471
|
+
/* Large, the radii before Medium came: sm at 20 and 24, md at 32, lg at 40, xl at 56 and 64. */
|
|
460
472
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-md); }
|
|
461
473
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-sm); }
|
|
462
474
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-lg); }
|
|
463
|
-
[data-avatar-corners="large"] .o-avatar.o-avatar-thing.o-avatar-xl { --avatar-r: var(--vk-radius-xl); }
|
|
464
|
-
/* Extra large: md at 20 and 24, lg at 32, xl at 40, 2xl at 64. */
|
|
475
|
+
[data-avatar-corners="large"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-xl); }
|
|
476
|
+
/* Extra large: md at 20 and 24, lg at 32, xl at 40, 2xl at 56 and 64. */
|
|
465
477
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-lg); }
|
|
466
478
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-md); }
|
|
467
479
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-xl); }
|
|
468
|
-
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing.o-avatar-xl { --avatar-r: var(--vk-radius-2xl); }
|
|
480
|
+
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-2xl); }
|
|
469
481
|
|
|
470
482
|
/* ── Corner smoothing: Smooth, with nothing set, draws a square's corners with the smooth outline (smooth.css),
|
|
471
483
|
every browser that knows shape() showing it; one that doesn't keeps the quarter circles above, and so does Round. Its
|
|
472
484
|
smoothing eases off where a side is too short for 1.7 radii at each end, as the canvas drew it (o-smooth-ease, from its size and
|
|
473
485
|
its radius, both tokens, so it follows Corner radius). The outline would cut the edge drawn inside the square, so under it the
|
|
474
486
|
edge is a ring of its own (::before), between the outline and the same outline drawn a hairline in, under whatever the square
|
|
475
|
-
holds; the workspace
|
|
487
|
+
holds; the workspace and a square on its own colour have none. Its smoothing is its own Corner smoothing, never a host's: the outline's amount inherits, and a
|
|
476
488
|
crumb, a tab or a list's card that follows the token sets it on itself, so the square sets it back. ─────── */
|
|
477
489
|
@supports (clip-path: shape(evenodd from 0 0, curve by 1px 1px with 1px 0 / 1px 0, close, move to 0 0, hline to 1px, close)) and (width: calc(tan(atan2(1px, 1px)) * 1px)) {
|
|
478
490
|
.o-avatar.o-avatar-thing { --smooth-amount: initial; }
|
|
@@ -480,8 +492,9 @@
|
|
|
480
492
|
--avatar-rr: min(var(--avatar-r), var(--avatar-size) / 2); --smooth-t: var(--avatar-rr); --smooth-side: var(--avatar-size);
|
|
481
493
|
position: relative; box-shadow: none; clip-path: shape(var(--smooth-outline));
|
|
482
494
|
}
|
|
483
|
-
/* Its edge, a hairline ring along the outline, under the picture or the letters it holds; the workspace
|
|
484
|
-
|
|
495
|
+
/* Its edge, a hairline ring along the outline, under the picture or the letters it holds; the workspace and a square on its
|
|
496
|
+
own colour have none. */
|
|
497
|
+
.o-avatar.o-avatar-thing:not(.o-avatar-workspace):not([data-colour]):not([data-avatar-smoothing="round"] *)::before {
|
|
485
498
|
--smooth-t: calc(var(--avatar-rr) - var(--vk-border-width)); --smooth-in: var(--vk-border-width);
|
|
486
499
|
content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-color: var(--vk-border-subtle);
|
|
487
500
|
clip-path: shape(var(--smooth-ring));
|
|
@@ -527,13 +540,14 @@
|
|
|
527
540
|
/* The rest, as a count in a neutral circle. */
|
|
528
541
|
.o-avatar.o-avatar-more { background-color: var(--vk-neutral); color: var(--vk-fg-subtle); font-variant-numeric: tabular-nums; }
|
|
529
542
|
/* ── Presence and the badge: a dot on the corner, its size stepping with the avatar's (6,
|
|
530
|
-
8, 10, 12, 16), cut out of whatever the avatar stands on by a mask, never a ring painted in the page's colour. The mask stands
|
|
543
|
+
8, 10, 12, 14, 16), cut out of whatever the avatar stands on by a mask, never a ring painted in the page's colour. The mask stands
|
|
531
544
|
only on a badged avatar and a stack's faces: a mask clips what is outside the box and makes a stacking context. ──────── */
|
|
532
545
|
:is(.o-avatar, .o-avatar-badged) { --avatar-size: calc(var(--vk-spacing) * 8); --avatar-dot: calc(var(--vk-spacing) * 2.5); --avatar-cut: calc(var(--vk-spacing) * 0.5); --avatar-dot-inset: 0px; }
|
|
533
546
|
.o-avatar.o-avatar-2xs { --avatar-size: calc(var(--vk-spacing) * 4); }
|
|
534
547
|
:is(.o-avatar.o-avatar-xs, .o-avatar-badged[data-size="20"]) { --avatar-size: calc(var(--vk-spacing) * 5); --avatar-dot: var(--vk-dot-size); --avatar-cut: calc(var(--vk-spacing) * 0.375); }
|
|
535
548
|
:is(.o-avatar.o-avatar-sm, .o-avatar-badged[data-size="24"]) { --avatar-size: calc(var(--vk-spacing) * 6); --avatar-dot: calc(var(--vk-spacing) * 2); }
|
|
536
549
|
:is(.o-avatar.o-avatar-lg, .o-avatar-badged[data-size="40"]) { --avatar-size: calc(var(--vk-spacing) * 10); --avatar-dot: calc(var(--vk-spacing) * 3); }
|
|
550
|
+
:is(.o-avatar.o-avatar-56, .o-avatar-badged[data-size="56"]) { --avatar-size: calc(var(--vk-spacing) * 14); --avatar-dot: calc(var(--vk-spacing) * 3.5); --avatar-dot-inset: calc(var(--vk-spacing) * 0.5); }
|
|
537
551
|
:is(.o-avatar.o-avatar-xl, .o-avatar-badged[data-size="64"]) { --avatar-size: calc(var(--vk-spacing) * 16); --avatar-dot: calc(var(--vk-spacing) * 4); --avatar-dot-inset: calc(var(--vk-spacing) * 0.5); }
|
|
538
552
|
:is(.o-avatar.o-avatar-thing, .o-avatar-badged[data-thing]) { --avatar-dot-inset: calc(var(--vk-spacing) * -0.75); }
|
|
539
553
|
.o-avatar-badged { position: relative; display: inline-flex; flex: none; vertical-align: middle; isolation: isolate; }
|
|
@@ -545,7 +559,7 @@
|
|
|
545
559
|
background-color: var(--vk-brand); color: var(--vk-fg-on-brand);
|
|
546
560
|
}
|
|
547
561
|
.o-avatar-badge > svg { display: none; width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
|
|
548
|
-
.o-avatar-badged:is([data-size="32"], [data-size="40"], [data-size="64"]) > .o-avatar-badge > svg { display: block; }
|
|
562
|
+
.o-avatar-badged:is([data-size="32"], [data-size="40"], [data-size="56"], [data-size="64"]) > .o-avatar-badge > svg { display: block; }
|
|
549
563
|
/* Here, a green dot; away, a hollow ring whose middle shows the ground. */
|
|
550
564
|
.o-avatar-badge[data-presence="here"] { background-color: var(--vk-success-bold); }
|
|
551
565
|
.o-avatar-badge[data-presence="away"] { background-color: transparent; box-shadow: inset 0 0 0 calc(var(--vk-border-width) * 2) var(--vk-fg-subtlest); }
|
|
@@ -2390,6 +2404,23 @@ textarea.o-input-control.o-input-lines { flex: none; min-height: 0; max-height:
|
|
|
2390
2404
|
|
|
2391
2405
|
@media (prefers-reduced-motion: reduce) { .o-input { transition: none; } .o-input.o-smooth::before, .o-input.o-smooth::after { transition: none; } }
|
|
2392
2406
|
|
|
2407
|
+
/* ── Saving and Saved (VK-921; the settings canvas, round 2, Every part: Saving): at the field's end, where its sides stand,
|
|
2408
|
+
while the app saves what was typed or picked and just after. Saving, the Spinner in the quietest words; saved, a check and
|
|
2409
|
+
Saved, small, in the success colour, announced, fading after --vk-saved-hold, after which save-mark.tsx takes it out of
|
|
2410
|
+
the field. In its field it keeps the box's padding at its end; in a group it stands after the end side; in a Select's
|
|
2411
|
+
field, just before the chevron. A page holds Saved with data-force="saved". ─────────────────────────────────────── */
|
|
2412
|
+
.o-input-save {
|
|
2413
|
+
flex: none; display: inline-flex; align-items: center; gap: calc(var(--vk-spacing) * 1.5);
|
|
2414
|
+
font-size: var(--vk-font-size-xs); line-height: var(--vk-line-height-xs); color: var(--vk-fg-subtlest); white-space: nowrap; user-select: none;
|
|
2415
|
+
}
|
|
2416
|
+
.o-input-lone > .o-input-save { padding-inline-end: var(--input-pad-inline); }
|
|
2417
|
+
.o-input-group:not(.o-select-field) > .o-input-save { order: 1; }
|
|
2418
|
+
.o-input-save > svg { flex: none; width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
|
|
2419
|
+
.o-input-save[data-save="saved"] { color: var(--vk-success); animation: o-input-saved-leave var(--vk-duration-base) var(--vk-ease-in) var(--vk-saved-hold) forwards; }
|
|
2420
|
+
[data-force="saved"] .o-input-save { animation: none; }
|
|
2421
|
+
@keyframes o-input-saved-leave { to { opacity: 0; } }
|
|
2422
|
+
@media (prefers-reduced-motion: reduce) { .o-input-save[data-save="saved"] { animation-duration: 1ms; } }
|
|
2423
|
+
|
|
2393
2424
|
/* ── A key: a 20px cap on the raised ground, half the radius's corners, its bottom edge twice as heavy so
|
|
2394
2425
|
it reads as a key; its label in the quieter text colour ───────────────────────────────────────────── */
|
|
2395
2426
|
.o-kbd {
|
|
@@ -3992,7 +4023,7 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
3992
4023
|
/* Marked cards in a row: two across, as New view's layouts; one under another on a phone. Marked cards, as a row or as tiles, keep
|
|
3993
4024
|
room on every side for what stands outside a card's edge, the chosen one's ring and the focus outline, so a holder that clips
|
|
3994
4025
|
its sides (the Pane's body) never cuts either (KIT-816); the map's tiles stand as far in. */
|
|
3995
|
-
.o-radio-group.o-radio-row:has(> .o-radio-marked.o-choice-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
4026
|
+
.o-radio-group.o-radio-row:has(> .o-radio-marked.o-choice-card):not(:has(> .o-radio-pictured)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
3996
4027
|
.o-radio-group:where(.o-radio-row, .o-radio-tiles):has(> .o-radio-marked.o-choice-card) { padding: calc(var(--vk-focus-width) + var(--vk-focus-offset)); }
|
|
3997
4028
|
|
|
3998
4029
|
/* ── Tiles: marked cards three across, each centred, its mark over its name in the card's quieter words; chosen, the mark
|
|
@@ -4015,14 +4046,63 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
4015
4046
|
.o-choice-card.o-radio-marked:has(> [data-disabled]) { border-style: dashed; border-color: var(--vk-border-input); box-shadow: none; background-color: transparent; cursor: not-allowed; }
|
|
4016
4047
|
.o-choice-card.o-radio-marked:has(> [data-disabled]) :is(.o-radio-mark, .o-choice-label, .o-choice-note) { color: var(--vk-fg-disabled); }
|
|
4017
4048
|
|
|
4049
|
+
/* ── A swatch (VK-920; the settings canvas, round 2, Workspace's Colour): a label colour in place of the ring, a 24px dot
|
|
4050
|
+
named by its aria-label. Chosen, a thin ring of the ground and the selected colour just outside it; under the pointer the
|
|
4051
|
+
same ring in the field's hovered edge; focus outlines it outside that ring; disabled, grey and dashed, which the arrows pass
|
|
4052
|
+
by, its ring kept in the field's edge when it is the chosen one. A row of them stands 10 apart. ──────────────────────────────────────────────────────────────────────────────────── */
|
|
4053
|
+
.o-radio-swatched { align-items: center; }
|
|
4054
|
+
.o-radio-swatch {
|
|
4055
|
+
flex: none; box-sizing: border-box; width: calc(var(--vk-spacing) * 6); height: calc(var(--vk-spacing) * 6);
|
|
4056
|
+
border-radius: var(--vk-radius-full); outline: none; transition: box-shadow var(--vk-duration-fast) var(--vk-ease-out);
|
|
4057
|
+
}
|
|
4058
|
+
.o-radio-swatch[data-colour="blue"] { background-color: var(--vk-label-blue-fill); }
|
|
4059
|
+
.o-radio-swatch[data-colour="green"] { background-color: var(--vk-label-green-fill); }
|
|
4060
|
+
.o-radio-swatch[data-colour="amber"] { background-color: var(--vk-label-amber-fill); }
|
|
4061
|
+
.o-radio-swatch[data-colour="red"] { background-color: var(--vk-label-red-fill); }
|
|
4062
|
+
.o-radio-swatch[data-colour="purple"] { background-color: var(--vk-label-purple-fill); }
|
|
4063
|
+
.o-radio-swatch[data-colour="pink"] { background-color: var(--vk-label-pink-fill); }
|
|
4064
|
+
.o-radio-swatch[data-colour="teal"] { background-color: var(--vk-label-teal-fill); }
|
|
4065
|
+
.o-radio-swatch[data-colour="grey"] { background-color: var(--vk-neutral); }
|
|
4066
|
+
.o-radio-swatch[data-force="hover"]:not([data-checked], [data-disabled]) { box-shadow: 0 0 0 var(--vk-focus-offset) var(--vk-ground), 0 0 0 calc(var(--vk-focus-offset) + var(--vk-focus-width)) var(--vk-border-input-hovered); }
|
|
4067
|
+
@media (hover: hover) { .o-radio:hover > .o-radio-swatch:not([data-checked], [data-disabled]) { box-shadow: 0 0 0 var(--vk-focus-offset) var(--vk-ground), 0 0 0 calc(var(--vk-focus-offset) + var(--vk-focus-width)) var(--vk-border-input-hovered); } }
|
|
4068
|
+
.o-radio-swatch[data-checked] { box-shadow: 0 0 0 var(--vk-focus-offset) var(--vk-ground), 0 0 0 calc(var(--vk-focus-offset) + var(--vk-focus-width)) var(--vk-border-selected); }
|
|
4069
|
+
.o-radio-swatch:is(:focus-visible, [data-force="focus"]) { outline: var(--vk-focus-width) solid var(--vk-border-brand); outline-offset: calc(var(--vk-focus-offset) * 2 + var(--vk-focus-width)); }
|
|
4070
|
+
.o-radio-swatch[data-disabled] { background-color: var(--vk-neutral); border: var(--vk-border-width) dashed var(--vk-border-input); box-shadow: none; }
|
|
4071
|
+
.o-radio-swatch[data-disabled][data-checked] { box-shadow: 0 0 0 var(--vk-focus-offset) var(--vk-ground), 0 0 0 calc(var(--vk-focus-offset) + var(--vk-focus-width)) var(--vk-border-input); }
|
|
4072
|
+
.o-radio:has(> .o-radio-swatch[data-disabled]) { cursor: not-allowed; }
|
|
4073
|
+
.o-radio-group.o-radio-row:has(> .o-radio-swatched) { gap: calc(var(--vk-spacing) * 2.5); align-items: center; min-height: calc(var(--vk-spacing) * 9); }
|
|
4074
|
+
|
|
4075
|
+
/* ── A marked card's picture (VK-920; round 2, Preferences' Appearance): what the app draws, the card's width and 120 tall,
|
|
4076
|
+
its mark and its name side by side and centred under it, in the card's quieter words; chosen, ringed as any marked card,
|
|
4077
|
+
its words in the text colour, the name a little heavier, the mark not in the brand. A row of them stands one beside
|
|
4078
|
+
another at equal widths, on a phone too. ──────────────────────────────────────────────────────────────────────────── */
|
|
4079
|
+
.o-choice-card.o-radio-marked.o-radio-pictured {
|
|
4080
|
+
display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr); align-items: center; column-gap: calc(var(--vk-spacing) * 2); row-gap: 0;
|
|
4081
|
+
padding: calc(var(--vk-spacing) * 1.5) calc(var(--vk-spacing) * 1.5) 0; color: var(--vk-fg-subtle);
|
|
4082
|
+
}
|
|
4083
|
+
.o-radio-picture {
|
|
4084
|
+
grid-column: 1 / -1; justify-self: stretch; display: flex; box-sizing: border-box; height: calc(var(--vk-spacing) * 30); overflow: hidden;
|
|
4085
|
+
border: var(--vk-border-width) solid var(--vk-border-subtle); border-radius: var(--vk-radius-sm);
|
|
4086
|
+
}
|
|
4087
|
+
.o-radio-pictured > :is(.o-radio-mark, .o-choice-text) { min-height: calc(var(--vk-spacing) * 11); display: flex; align-items: center; }
|
|
4088
|
+
/* The picture spans the card; the mark and the name stand in the two middle columns, centred as a pair under it. */
|
|
4089
|
+
.o-radio-pictured > .o-radio-mark { grid-column: 2; }
|
|
4090
|
+
.o-radio-pictured > .o-choice-text { grid-column: 3; }
|
|
4091
|
+
.o-radio-pictured > .o-radio-mark, .o-radio-pictured > .o-radio-mark[data-checked] { color: inherit; }
|
|
4092
|
+
.o-radio-pictured > .o-radio-mark > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
|
|
4093
|
+
.o-radio-pictured .o-choice-label { font-weight: var(--vk-font-weight-normal); color: inherit; }
|
|
4094
|
+
.o-choice-card.o-radio-pictured:has(> [data-checked]) { color: var(--vk-fg); }
|
|
4095
|
+
.o-choice-card.o-radio-pictured:has(> [data-checked]) .o-choice-label { font-weight: var(--vk-font-weight-medium); }
|
|
4096
|
+
.o-radio-group.o-radio-row:has(> .o-radio-pictured) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: calc(var(--vk-spacing) * 3); }
|
|
4097
|
+
|
|
4018
4098
|
/* On a phone (`data-vk-phone`, the group's own mark from the device, or a phone frame round it): marked cards one under
|
|
4019
4099
|
another, tiles on one card. */
|
|
4020
|
-
.o-radio-group.o-radio-row:where([data-vk-phone], [data-vk-phone] *):has(> .o-radio-marked.o-choice-card) { grid-template-columns: minmax(0, 1fr); }
|
|
4100
|
+
.o-radio-group.o-radio-row:where([data-vk-phone], [data-vk-phone] *):has(> .o-radio-marked.o-choice-card):not(:has(> .o-radio-pictured)) { grid-template-columns: minmax(0, 1fr); }
|
|
4021
4101
|
.o-radio-group.o-radio-tiles:where([data-vk-phone], [data-vk-phone] *):has(> .o-choice-card) { gap: calc(var(--vk-spacing) * 2); padding: calc(var(--vk-spacing) * 3); border-radius: var(--vk-radius-xl); background-color: var(--vk-overlay-card); }
|
|
4022
4102
|
.o-radio-tiles:where([data-vk-phone], [data-vk-phone] *) > .o-choice-card.o-radio-marked { justify-content: center; min-height: calc(var(--vk-spacing) * 18); }
|
|
4023
4103
|
.o-radio-tiles:where([data-vk-phone], [data-vk-phone] *) > .o-radio-marked > .o-radio-mark > svg { width: calc(var(--vk-spacing) * 5.5); height: calc(var(--vk-spacing) * 5.5); }
|
|
4024
4104
|
|
|
4025
|
-
@media (prefers-reduced-motion: reduce) { .o-radio-ring, .o-radio-dot, .o-radio-mark { transition: none; } }
|
|
4105
|
+
@media (prefers-reduced-motion: reduce) { .o-radio-ring, .o-radio-dot, .o-radio-mark, .o-radio-swatch { transition: none; } }
|
|
4026
4106
|
|
|
4027
4107
|
/* Doubled, so a component's own overflow: auto in the same layer never brings the sideways scroll back. */
|
|
4028
4108
|
[data-scrollbar][data-scrollbar] { overflow-x: hidden; }
|
|
@@ -4135,6 +4215,88 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
4135
4215
|
|
|
4136
4216
|
@media (prefers-reduced-motion: reduce) { .o-select-chevron { transition: none; } }
|
|
4137
4217
|
|
|
4218
|
+
/* ── The options: each value sets the card's or the rows' own names, read below ─────────────────────────────────────── */
|
|
4219
|
+
:where([data-setting-row-card="raised"]) .o-setting-rows { --setting-rows-edge: var(--vk-border-subtle); --setting-rows-ground: var(--vk-raised); }
|
|
4220
|
+
:where([data-setting-row-rows="roomy"]) :is(.o-setting-rows, .o-setting-row) {
|
|
4221
|
+
--setting-rows-pad: calc(var(--vk-spacing) * 3) calc(var(--vk-spacing) * 4.5); --setting-rows-height: calc(var(--vk-spacing) * 16);
|
|
4222
|
+
--setting-rows-side: calc(var(--vk-spacing) * 16);
|
|
4223
|
+
}
|
|
4224
|
+
.o-setting-rows.o-setting-rows-danger { --setting-rows-edge: var(--vk-border-danger); }
|
|
4225
|
+
|
|
4226
|
+
/* ── The card, on a computer: the rows in a box, a line between each ───────────────────────────────────────────────── */
|
|
4227
|
+
.o-setting-rows:not(.o-field-rows) {
|
|
4228
|
+
display: grid; border: var(--vk-border-width) solid var(--setting-rows-edge, var(--vk-border)); border-radius: var(--vk-radius-lg); overflow: hidden;
|
|
4229
|
+
background-color: var(--setting-rows-ground, transparent);
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4232
|
+
/* ── A row, on a computer: its start, its words, its end ───────────────────────────────────────────────────────────── */
|
|
4233
|
+
.o-setting-row:not(.o-field-row) {
|
|
4234
|
+
display: flex; align-items: center; justify-content: space-between; gap: calc(var(--vk-spacing) * 4); box-sizing: border-box;
|
|
4235
|
+
min-height: var(--setting-rows-height, auto); margin: 0; padding: var(--setting-rows-pad, calc(var(--vk-spacing) * 3.5) calc(var(--vk-spacing) * 4));
|
|
4236
|
+
border: 0; border-top: var(--vk-border-width) solid var(--vk-border-subtle);
|
|
4237
|
+
-webkit-tap-highlight-color: transparent; transition: background-color var(--vk-duration-fast) var(--vk-ease-out);
|
|
4238
|
+
}
|
|
4239
|
+
.o-setting-row:not(.o-field-row):first-child { border-top: 0; }
|
|
4240
|
+
.o-setting-row:not(.o-field-row) > .o-choice-text { flex: 1 1 auto; }
|
|
4241
|
+
.o-setting-row:not(.o-field-row) .o-choice-label { font-weight: var(--vk-font-weight-medium); }
|
|
4242
|
+
/* The rows that are a press as a whole: the switch's (a label) and the one opening its page (a button). */
|
|
4243
|
+
button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: left; background-color: transparent; }
|
|
4244
|
+
.o-setting-row:is([data-setting-row-kind="switch"], [data-setting-row-kind="open"]):not(.o-field-row) { cursor: pointer; }
|
|
4245
|
+
@media (hover: hover) { .o-setting-row:is([data-setting-row-kind="switch"], [data-setting-row-kind="open"]):not(.o-field-row):hover { background-color: var(--vk-hovered); } }
|
|
4246
|
+
.o-setting-row:not(.o-field-row):is([data-locked], :has(.o-switch[data-disabled])) { cursor: not-allowed; background-color: transparent; }
|
|
4247
|
+
|
|
4248
|
+
/* Its start: a mark as given; an icon in its box. */
|
|
4249
|
+
.o-setting-row > :not(.o-choice-text) { flex: none; }
|
|
4250
|
+
.o-setting-row-icon {
|
|
4251
|
+
display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(var(--vk-spacing) * 8); height: calc(var(--vk-spacing) * 8);
|
|
4252
|
+
border: var(--vk-border-width) solid var(--vk-border-subtle); border-radius: var(--vk-radius-md); background-color: var(--vk-raised); color: var(--vk-fg-subtle);
|
|
4253
|
+
}
|
|
4254
|
+
.o-setting-row-icon > svg { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); }
|
|
4255
|
+
|
|
4256
|
+
/* Its end: the reason, then the control; the Select 220 wide; the value and ›. */
|
|
4257
|
+
.o-setting-row-end { display: flex; align-items: center; gap: calc(var(--vk-spacing) * 2); margin-left: auto; min-width: 0; }
|
|
4258
|
+
.o-setting-row-select { width: calc(var(--vk-spacing) * 55); }
|
|
4259
|
+
.o-setting-row-select .o-select-field { width: 100%; }
|
|
4260
|
+
.o-setting-row-reason { font-size: var(--vk-font-size-xs); line-height: calc(var(--vk-font-size-xs) * var(--vk-line-height-xs)); color: var(--vk-fg-subtlest); }
|
|
4261
|
+
.o-setting-row-reason + .o-switch { margin-left: calc(var(--vk-spacing) * -2); }
|
|
4262
|
+
.o-setting-row-value { font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); color: var(--vk-fg-subtle); }
|
|
4263
|
+
.o-setting-row-chevron { flex: none; width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); color: var(--vk-fg-subtlest); }
|
|
4264
|
+
/* Locked: its control greyed (a switch keeps its own locked state), its words as they are. */
|
|
4265
|
+
.o-setting-row[data-locked] :is(.o-setting-row-select, .o-button, .o-setting-row-value, .o-setting-row-chevron) { opacity: 0.45; }
|
|
4266
|
+
|
|
4267
|
+
/* A lone row: bare, no card, no line, no room round it. */
|
|
4268
|
+
.o-setting-row[data-alone]:not(.o-field-row) { min-height: 0; padding: 0; border-top: 0; background-color: transparent; }
|
|
4269
|
+
|
|
4270
|
+
/* ── On a phone: Field rows' card and rows; a setting's words, value and › in them ─────────────────────────────────── */
|
|
4271
|
+
.o-setting-row.o-field-row > .o-choice-text { flex: 1 1 auto; }
|
|
4272
|
+
.o-setting-row-press {
|
|
4273
|
+
display: flex; flex: 1 1 auto; align-items: center; gap: calc(var(--vk-spacing) * 3); align-self: stretch; min-width: 0; margin: 0; padding: 0;
|
|
4274
|
+
border: 0; font: inherit; color: inherit; text-align: left; background-color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
|
|
4275
|
+
}
|
|
4276
|
+
.o-setting-row.o-field-row .o-setting-row-end { flex: 0 1 auto; }
|
|
4277
|
+
.o-setting-row.o-field-row .o-setting-row-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: inherit; line-height: inherit; }
|
|
4278
|
+
.o-setting-rows-danger.o-field-rows .o-choice-label { color: var(--vk-danger); }
|
|
4279
|
+
|
|
4280
|
+
@media (prefers-reduced-motion: reduce) { .o-setting-row { transition: none; } }
|
|
4281
|
+
|
|
4282
|
+
/* ── The card's corners smooth: following the token corner-smoothing, drawn with the smooth outline (smooth.css) in every
|
|
4283
|
+
browser that knows shape(); one that doesn't keeps the corners above. Its round part is fitted to its smallest row, as a
|
|
4284
|
+
control's is. Nothing stands outside it (its rows were hidden past its edge), so it is clipped itself, its rows with it; its
|
|
4285
|
+
edge is a ring along the curve over its rows (::after), in the card's edge colour. ── */
|
|
4286
|
+
@supports (clip-path: shape(evenodd from 0 0, curve by 1px 1px with 1px 0 / 1px 0, close, move to 0 0, hline to 1px, close)) and (width: calc(tan(atan2(1px, 1px)) * 1px)) {
|
|
4287
|
+
.o-setting-rows:not(.o-field-rows) {
|
|
4288
|
+
--smooth-amount: var(--vk-corner-smoothing);
|
|
4289
|
+
--setting-rows-fit: min(var(--vk-radius-lg), var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm))) / (2 + 2 * var(--smooth-amount, 0.7)));
|
|
4290
|
+
--smooth-t: var(--setting-rows-fit); --smooth-side: var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm)));
|
|
4291
|
+
position: relative; overflow: visible; border-color: transparent; border-radius: var(--setting-rows-fit); clip-path: shape(var(--smooth-outline));
|
|
4292
|
+
}
|
|
4293
|
+
.o-setting-rows:not(.o-field-rows)::after {
|
|
4294
|
+
--smooth-t: max(0px, var(--setting-rows-fit) - var(--vk-border-width)); --smooth-in: var(--vk-border-width);
|
|
4295
|
+
content: ""; position: absolute; inset: calc(var(--vk-border-width) * -1); z-index: 1; pointer-events: none;
|
|
4296
|
+
background-color: var(--setting-rows-edge, var(--vk-border)); clip-path: shape(var(--smooth-ring));
|
|
4297
|
+
}
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4138
4300
|
.o-sheet, .o-sheet-backdrop, .o-sheet-below {
|
|
4139
4301
|
--sheet-spring: var(--vk-spring-quick); --sheet-spring-ease: var(--vk-ease-spring-quick); --sheet-spring-time: var(--vk-duration-spring-quick);
|
|
4140
4302
|
}
|
|
@@ -8527,6 +8689,7 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
8527
8689
|
--vk-font-size-2xl: 24px;
|
|
8528
8690
|
--vk-font-size-2xs: 10px;
|
|
8529
8691
|
--vk-font-size-3xs: 8px;
|
|
8692
|
+
--vk-font-size-xl: 20px;
|
|
8530
8693
|
--vk-font-size-xs: 12px;
|
|
8531
8694
|
--vk-radius-md: 7.5px;
|
|
8532
8695
|
--vk-radius-sm: 5px;
|
|
@@ -8593,7 +8756,6 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
8593
8756
|
--vk-ease-out-sharp: cubic-bezier(0.23, 1, 0.32, 1);
|
|
8594
8757
|
--vk-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
8595
8758
|
--vk-border-accent: hsl(219 90% 65.5%);
|
|
8596
|
-
--vk-font-size-xl: 20px;
|
|
8597
8759
|
--vk-font-weight-normal: 400;
|
|
8598
8760
|
--vk-tracking-wide: 0.025em;
|
|
8599
8761
|
--vk-border-overlay-card: hsl(220 3% 86%);
|
|
@@ -8611,6 +8773,7 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
8611
8773
|
--vk-brand-300: hsl(218 100% 89%);
|
|
8612
8774
|
--vk-border-input-strong: hsl(210 1% 72%);
|
|
8613
8775
|
--vk-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
8776
|
+
--vk-saved-hold: 2000ms;
|
|
8614
8777
|
--vk-shadow-field: 0 1px 1px 0 rgb(16 17 26 / 0.08);
|
|
8615
8778
|
--vk-shadow-field-focus: 0 0 10px 0 hsl(219 90% 65.5% / 0.3);
|
|
8616
8779
|
--vk-shadow-field-focus-danger: 0 0 10px 0 hsl(3 87% 68% / 0.3);
|
|
@@ -10,6 +10,20 @@ Every name the Avatar's stylesheet (`avatar.css`) reads, each optional: the read
|
|
|
10
10
|
| `--vk-fg-on-brand` | colour | `text-brand-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 5%)` |
|
|
11
11
|
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
12
12
|
| `--vk-fg-subtlest` | colour | `text-subtlest` | `hsl(210 1% 53.5%)` · dark `hsl(210 3% 53%)` |
|
|
13
|
+
| `--vk-label-amber-fill` | colour | `label-amber-fill` | `hsl(19 72% 92.5%)` · dark `hsl(20 42% 18.5%)` |
|
|
14
|
+
| `--vk-label-amber-strong` | colour | `label-amber-strong` | `hsl(23 85% 29%)` · dark `hsl(20 90% 76.5%)` |
|
|
15
|
+
| `--vk-label-blue-fill` | colour | `label-blue-fill` | `hsl(218 100% 94%)` · dark `hsl(219 46% 21%)` |
|
|
16
|
+
| `--vk-label-blue-strong` | colour | `label-blue-strong` | `hsl(219 70% 38%)` · dark `hsl(218 100% 81%)` |
|
|
17
|
+
| `--vk-label-green-fill` | colour | `label-green-fill` | `hsl(143 41% 91%)` · dark `hsl(146 27% 16.5%)` |
|
|
18
|
+
| `--vk-label-green-strong` | colour | `label-green-strong` | `hsl(156 87% 21%)` · dark `hsl(146 52% 73.5%)` |
|
|
19
|
+
| `--vk-label-pink-fill` | colour | `label-pink-fill` | `hsl(345 100% 94.5%)` · dark `hsl(341 34% 20.5%)` |
|
|
20
|
+
| `--vk-label-pink-strong` | colour | `label-pink-strong` | `hsl(336 59% 37.5%)` · dark `hsl(342 100% 83.5%)` |
|
|
21
|
+
| `--vk-label-purple-fill` | colour | `label-purple-fill` | `hsl(249 100% 95.5%)` · dark `hsl(254 34% 23.5%)` |
|
|
22
|
+
| `--vk-label-purple-strong` | colour | `label-purple-strong` | `hsl(259 53% 44.5%)` · dark `hsl(251 100% 86%)` |
|
|
23
|
+
| `--vk-label-red-fill` | colour | `label-red-fill` | `hsl(6 100% 94%)` · dark `hsl(5 37% 20.5%)` |
|
|
24
|
+
| `--vk-label-red-strong` | colour | `label-red-strong` | `hsl(0 59% 39%)` · dark `hsl(6 100% 83%)` |
|
|
25
|
+
| `--vk-label-teal-fill` | colour | `label-teal-fill` | `hsl(196 52% 91.5%)` · dark `hsl(196 32% 17.5%)` |
|
|
26
|
+
| `--vk-label-teal-strong` | colour | `label-teal-strong` | `hsl(193 82% 26%)` · dark `hsl(196 67% 75.5%)` |
|
|
13
27
|
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
14
28
|
| `--vk-person-1` | colour | `person-1` | `#d7a77e` |
|
|
15
29
|
| `--vk-person-2` | colour | `person-2` | `#93b6ce` |
|
|
@@ -25,6 +39,7 @@ Every name the Avatar's stylesheet (`avatar.css`) reads, each optional: the read
|
|
|
25
39
|
| `--vk-font-size-2xs` | size | `text-2xs` | `10px` |
|
|
26
40
|
| `--vk-font-size-3xs` | size | `text-3xs` | `8px` |
|
|
27
41
|
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
42
|
+
| `--vk-font-size-xl` | size | `text-xl` | `20px` |
|
|
28
43
|
| `--vk-font-size-xs` | size | `text-xs` | `12px` |
|
|
29
44
|
| `--vk-font-weight-semibold` | size | `font-weight-semibold` | `600` |
|
|
30
45
|
| `--vk-radius-2xl` | size | `radius-2xl` | `20px` |
|
|
@@ -14,7 +14,9 @@ Every name the Input's, the InputGroup's and the segments' stylesheet (`input.cs
|
|
|
14
14
|
| `--vk-brand-subtler` | colour | `background-brand-subtler` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
|
|
15
15
|
| `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
|
|
16
16
|
| `--vk-danger-subtlest` | colour | `background-danger-subtlest` | `hsl(6 100% 98%)` · dark `hsl(6 13% 10%)` |
|
|
17
|
+
| `--vk-duration-base` | motion | `duration-base` | `200ms` |
|
|
17
18
|
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
19
|
+
| `--vk-ease-in` | motion | `ease-in` | `cubic-bezier(0.4, 0, 1, 1)` |
|
|
18
20
|
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
19
21
|
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
20
22
|
| `--vk-fg-disabled` | colour | `text-disabled` | `hsl(210 1% 72%)` · dark `hsl(210 1% 37%)` |
|
|
@@ -39,10 +41,16 @@ Every name the Input's, the InputGroup's and the segments' stylesheet (`input.cs
|
|
|
39
41
|
| `--vk-radius-sm` | size | `radius-sm` | `5px` |
|
|
40
42
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
41
43
|
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
44
|
+
| `--vk-saved-hold` | motion | `saved-hold` | `2000ms` |
|
|
42
45
|
| `--vk-shadow-field` | shadow | `shadow-field` | `0 1px 1px 0 rgb(16 17 26 / 0.08)` · dark `0 1px 1px 0 rgb(255 255 255 / 0.08)` |
|
|
43
46
|
| `--vk-shadow-field-focus` | shadow | `shadow-field-focus` | `0 0 10px 0 hsl(219 90% 65.5% / 0.3)` · dark `0 0 10px 0 hsl(219 66% 45% / 0.42)` |
|
|
44
47
|
| `--vk-shadow-field-focus-danger` | shadow | `shadow-field-focus-danger` | `0 0 10px 0 hsl(3 87% 68% / 0.3)` · dark `0 0 10px 0 hsl(1 55% 46.5% / 0.42)` |
|
|
45
48
|
| `--vk-shadow-field-hover` | shadow | `shadow-field-hover` | `0 1px 1px 0 rgb(16 17 26 / 0.16)` · dark `0 1px 1px 0 rgb(255 255 255 / 0.12)` |
|
|
46
49
|
| `--vk-shadow-key-pressed` | shadow | `shadow-key-pressed` | `inset 0 1px 1.5px 0 hsl(214 30% 10% / 0.12)` · dark `inset 0 1px 1.5px 0 hsl(0 0% 0% / 0.18)` |
|
|
47
50
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
51
|
+
| `--vk-success` | colour | `text-success` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
|
|
48
52
|
| `--vk-sunken` | colour | `surface-sunken` | `hsl(0 0% 98%)` · dark `hsl(210 8% 5%)` |
|
|
53
|
+
|
|
54
|
+
## Saving and Saved
|
|
55
|
+
|
|
56
|
+
`<Input saving />`, `<Input saved />`, and the same on an `InputGroup`: while the app saves what was typed, the Spinner stands at the field's end (after a group's end side), in `--vk-fg-subtlest`, the field busy (`aria-busy`) and still typed into; once the save took, a check and the word Saved, in `--vk-success` at `--vk-font-size-xs`, announced (`role="status"`), fading on `--vk-duration-base` after `--vk-saved-hold` and then gone from the field. It shows again each time `saved` turns on; saving wins when both are on. A page holds Saved with `data-force="saved"`. A save that fails is the Field's `error`, with the value before put back by the app.
|
|
@@ -20,6 +20,7 @@ The words beside a choice, and a card's edge and ground (`o-choice-*`), are `cho
|
|
|
20
20
|
| `--vk-duration-base` | motion | `duration-base` | `200ms` |
|
|
21
21
|
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
22
22
|
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
23
|
+
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
23
24
|
| `--vk-fg-accent` | colour | `text-brand` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
24
25
|
| `--vk-fg-disabled` | colour | `text-disabled` | `hsl(210 1% 72%)` · dark `hsl(210 1% 37%)` |
|
|
25
26
|
| `--vk-fg-inverse` | colour | `text-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 95%)` |
|
|
@@ -27,13 +28,30 @@ The words beside a choice, and a card's edge and ground (`o-choice-*`), are `cho
|
|
|
27
28
|
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
28
29
|
| `--vk-focus-offset` | size | `focus-offset` | `2px` |
|
|
29
30
|
| `--vk-focus-width` | size | `focus-width` | `2px` |
|
|
31
|
+
| `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
|
|
30
32
|
| `--vk-font-weight-normal` | size | `font-weight-normal` | `400` |
|
|
31
33
|
| `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
|
|
32
34
|
| `--vk-hovered` | colour | `surface-hovered` | `hsl(0 0% 96.5%)` · dark `hsl(210 4% 9.5%)` |
|
|
33
35
|
| `--vk-input` | colour | `background-input` | `hsl(0 0% 100% / 0)` |
|
|
36
|
+
| `--vk-label-amber-fill` | colour | `label-amber-fill` | `hsl(19 72% 92.5%)` · dark `hsl(20 42% 18.5%)` |
|
|
37
|
+
| `--vk-label-blue-fill` | colour | `label-blue-fill` | `hsl(218 100% 94%)` · dark `hsl(219 46% 21%)` |
|
|
38
|
+
| `--vk-label-green-fill` | colour | `label-green-fill` | `hsl(143 41% 91%)` · dark `hsl(146 27% 16.5%)` |
|
|
39
|
+
| `--vk-label-pink-fill` | colour | `label-pink-fill` | `hsl(345 100% 94.5%)` · dark `hsl(341 34% 20.5%)` |
|
|
40
|
+
| `--vk-label-purple-fill` | colour | `label-purple-fill` | `hsl(249 100% 95.5%)` · dark `hsl(254 34% 23.5%)` |
|
|
41
|
+
| `--vk-label-red-fill` | colour | `label-red-fill` | `hsl(6 100% 94%)` · dark `hsl(5 37% 20.5%)` |
|
|
42
|
+
| `--vk-label-teal-fill` | colour | `label-teal-fill` | `hsl(196 52% 91.5%)` · dark `hsl(196 32% 17.5%)` |
|
|
34
43
|
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
35
44
|
| `--vk-overlay-card` | colour | `surface-overlay-card` | `hsl(0 0% 94%)` · dark `hsl(225 7% 15%)` |
|
|
36
45
|
| `--vk-radius-full` | size | `radius-full` | `9999px` |
|
|
37
46
|
| `--vk-radius-lg` | size | `radius-lg` | `10px` |
|
|
47
|
+
| `--vk-radius-sm` | size | `radius-sm` | `5px` |
|
|
38
48
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
39
49
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
50
|
+
|
|
51
|
+
## A swatch
|
|
52
|
+
|
|
53
|
+
`<Radio swatch="teal" aria-label="Teal" />`: a 24px dot in one of the label colours (`blue`, `green`, `amber`, `red`, `purple`, `pink`, `teal`, `grey`) in place of the ring, named by its aria-label. Chosen, a thin ring of the ground (`--vk-ground`) and the selected colour just outside it; under the pointer the same ring in `--vk-border-input-hovered`; focus outlines it outside that ring; disabled, `--vk-neutral` with a dashed edge, which the arrows pass by, the chosen one keeping its ring in `--vk-border-input`. In a `row` group, 10 apart.
|
|
54
|
+
|
|
55
|
+
## A picture on a marked card
|
|
56
|
+
|
|
57
|
+
`<Radio mark={<SunIcon />} picture={<YourPicture />} label="Light" />`: what the app draws fills the card's width, 120 tall, framed in `--vk-border-subtle` at `--vk-radius-sm`; the mark and the name stand side by side and centred under it, in `--vk-fg-subtle`, the chosen card's in `--vk-fg`, its name `--vk-font-weight-medium`. A picture makes the card marked with a mark or without. In a `row` group the pictured cards stand one beside another at equal widths, on a phone too.
|
|
@@ -10,3 +10,7 @@ Every name the Select's stylesheet (`select.css`) reads, each optional: the read
|
|
|
10
10
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
11
11
|
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
12
12
|
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
13
|
+
|
|
14
|
+
## Saving and Saved
|
|
15
|
+
|
|
16
|
+
Every Select field takes `saving` and `saved`, as the Input does ([its page](input.md), Saving and Saved): the Spinner, then a check and Saved, just before the chevron, the field busy while it saves and named as before. Its names are the Input's.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# The setting row's tokens
|
|
2
|
+
|
|
3
|
+
Every name the setting row's stylesheet (`setting-row.css`) reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-border` | colour | `border` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
8
|
+
| `--vk-border-subtle` | colour | `border-subtle` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
9
|
+
| `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
|
|
10
|
+
| `--vk-hovered` | colour | `surface-hovered` | `hsl(0 0% 96.5%)` · dark `hsl(210 4% 9.5%)` |
|
|
11
|
+
| `--vk-raised` | colour | `surface-raised` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
|
|
12
|
+
| `--vk-danger` | colour | `text-danger` | `hsl(0 81% 58%)` |
|
|
13
|
+
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
14
|
+
| `--vk-fg-subtlest` | colour | `text-subtlest` | `hsl(210 1% 53.5%)` · dark `hsl(210 3% 53%)` |
|
|
15
|
+
| `--vk-border-width` | size | `border-width` | `1px` |
|
|
16
|
+
| `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
|
|
17
|
+
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
18
|
+
| `--vk-font-size-xs` | size | `text-xs` | `12px` |
|
|
19
|
+
| `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
|
|
20
|
+
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
21
|
+
| `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
|
|
22
|
+
| `--vk-radius-lg` | size | `radius-lg` | `10px` |
|
|
23
|
+
| `--vk-radius-md` | size | `radius-md` | `7.5px` |
|
|
24
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
25
|
+
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
26
|
+
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
@@ -4,8 +4,8 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
4
4
|
|
|
5
5
|
## The defaults
|
|
6
6
|
|
|
7
|
-
- `CONTROLS` — the components map's defaults, for each control an app leaves out: each control below that fills a slot of the map. An app spreads it first and its own controls after, `components={{ ...CONTROLS, ...own }}`. Its `Button` draws ViewKit's buttons (`variant`, `size`) as the kit's Button's kinds and sizes,
|
|
8
|
-
- `leadingGlyph` — `leadingGlyph(children, glyphs)`: a glyph before a button's words (an svg, or one of the app's icons in `glyphs`) as `
|
|
7
|
+
- `CONTROLS` — the components map's defaults, for each control an app leaves out: each control below that fills a slot of the map. An app spreads it first and its own controls after, `components={{ ...CONTROLS, ...own }}`. Its `Button` draws ViewKit's buttons (`variant`, `size`) as the kit's Button's kinds and sizes, stands a glyph handed before the words as the Button's icon, and one handed after them as its end icon.
|
|
8
|
+
- `leadingGlyph` — `leadingGlyph(children, glyphs)`: a glyph before a button's words (an svg, or one of the app's icons or its `AppIcon` in `glyphs`) as `icon`, one after them as `iconEnd`, and the words as `label`; a glyph alone, or another component, stays `{ label }`.
|
|
9
9
|
|
|
10
10
|
<!-- One block per lane of control moves, each opened by its comment: a move adds its controls' sections inside its own block alone. -->
|
|
11
11
|
|
|
@@ -278,9 +278,10 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
|
|
|
278
278
|
|
|
279
279
|
## The Avatar
|
|
280
280
|
|
|
281
|
-
- `Avatar` — who or what a row is about: a person a circle on their tone, a thing, the workspace or an agent a square; `size` 16 to 64, a photo or logo by `src`, its kind's `icon`, `presence` or a `badge` on its corner.
|
|
281
|
+
- `Avatar` — who or what a row is about: a person a circle on their tone, a thing, the workspace or an agent a square, which a `colour` stands on one of the label hues; `size` 16 to 64, a photo or logo by `src`, its kind's `icon`, `presence` or a `badge` on its corner.
|
|
282
282
|
- `AvatarProps` — its props.
|
|
283
|
-
- `AvatarSize` — its sizes, 16, 20, 24, 32, 40 and 64.
|
|
283
|
+
- `AvatarSize` — its sizes, 16, 20, 24, 32, 40, 56 and 64; a stack takes neither 16 nor 56.
|
|
284
|
+
- `AvatarColour` — a square's own colour: blue, green, amber, red, purple, pink, teal or grey, the Option's list; the square on the hue's fill, what it holds in its strong ink, with no edge.
|
|
284
285
|
- `AvatarPresence` — whether a person is here now: `here` or `away`.
|
|
285
286
|
- `AvatarStack` — several people on one thing, overlapping, the rest a count; with `onPick` one button opening everyone in a Menu (its card rows pinned on a phone), with `addButton` a dashed + after it.
|
|
286
287
|
- `AvatarStackProps` — its props.
|
|
@@ -964,7 +965,7 @@ The grip's `moved` and `dragAt`, the list a shell is handed (`handedList`) and t
|
|
|
964
965
|
- `LinksEditorWords` — those words, and its roles list's own (`picker`).
|
|
965
966
|
- `linksWords` — the words handed, over the English.
|
|
966
967
|
|
|
967
|
-
<!-- The press and the choice: press.css, choice.css, the TagField, the
|
|
968
|
+
<!-- The press and the choice: press.css, choice.css, the TagField, the setting row -->
|
|
968
969
|
|
|
969
970
|
## The pressing area
|
|
970
971
|
|
|
@@ -981,13 +982,29 @@ Tags inside the Input's field, before the caret, in a Field with its label, its
|
|
|
981
982
|
- `TagField` — the field. Its words are its props: `placeholder` says "Add a tag" when none is handed, and each tag's remove button "Remove <tag>", as the Tag's does.
|
|
982
983
|
- `TagFieldProps` — `label`, `note`, `error`, `disabled`, `defaultValue`, `onValueChange`, `placeholder`, `className`.
|
|
983
984
|
|
|
984
|
-
## The
|
|
985
|
+
## The setting row
|
|
985
986
|
|
|
986
|
-
|
|
987
|
+
One setting as a row (`SettingRow`): its name and a line under it on the left (the words beside a choice), its control at its end, a mark or an icon at its start. Its kind is the prop it is given:
|
|
987
988
|
|
|
988
|
-
- `
|
|
989
|
-
- `
|
|
990
|
-
- `
|
|
989
|
+
- A switch, `switch` — the Switch's props: the whole row a label pressing it, the hovered ground under the pointer.
|
|
990
|
+
- A select, `select` — a Select with its own list (its props but `label` and `size`): 36 tall, 220 wide.
|
|
991
|
+
- A button, `action` — a button (`SettingAction`: `label`, `icon`, `onClick`, `disabled`): the Button's outline kind, 32 tall; in a danger card its danger kind.
|
|
992
|
+
- › to its page, `onOpen` — the whole row a button, its `value` before ›.
|
|
993
|
+
|
|
994
|
+
`locked` (the reason) shuts its control, which stands greyed after the reason; a switch keeps the Switch's own locked state, a lock in its thumb. `alone` stands a lone row bare, with no card. `SettingRows` holds the rows in a card, a line between each, its corners smooth where the browser can draw them; `danger` is the danger zone's, a red edge (`o-setting-rows-danger`). On a phone (a PhoneHost screen, below the app's line, or `form="phone"`) the card and its rows are Field rows' (`field.css`): the name on the left, the value on the right, ›; a select's row opens its list in the full Sheet, a button's row is the button, a danger card's names are red, a locked row's reason stands in place of its line. Its two options, the card and the rows, are on [`viewkitjs/views/looks`](looks.md). Its stylesheet is `viewkitjs/views/controls/setting-row.css`, in the ready stylesheet; it stands on `choice.css`, the Switch's, the Select's, the Button's and the Field's. Its names are on [its page](../controls/setting-row.md).
|
|
995
|
+
|
|
996
|
+
`SwitchRow` and `SwitchRows` are its switch kind, with the props and the classes they always had (`o-switch-row`, `o-switch-rows`), so `switch-row.css` (its names on [its page](../controls/switch-row.md)) still draws them for an app that hasn't moved to `setting-row.css`. `SwitchRows` keeps its computer form on a phone.
|
|
997
|
+
|
|
998
|
+
- `SettingRow` — one row.
|
|
999
|
+
- `SettingRowProps` — its props: `label`, `note`, `icon`, `mark`, `locked`, `alone`, `className`, and its kind.
|
|
1000
|
+
- `SettingRows` — the card.
|
|
1001
|
+
- `SettingRowsProps` — the card's props: `danger`, `form`, `className`.
|
|
1002
|
+
- `SettingAction` — a row's button.
|
|
1003
|
+
- `SwitchRow` — the switch kind.
|
|
1004
|
+
- `SwitchRowProps` — its props: every prop of the Switch, and its `label` and `note`.
|
|
1005
|
+
- `SwitchRows` — the card round switch rows.
|
|
1006
|
+
- `settingRowWornOf` — the options worn round an element.
|
|
1007
|
+
- `SETTING_ROW_ATTRS` — the attributes they are set by.
|
|
991
1008
|
|
|
992
1009
|
## The stylesheets
|
|
993
1010
|
|
|
@@ -88,6 +88,9 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
|
|
|
88
88
|
- `StatusLookOptionId` — the Status's option ids.
|
|
89
89
|
- `SWITCH_LOOKS` — the Switch's: 4 options (`shape` a computer's, `phone` a phone's, `mark`, `motion`) and five looks, `slim`, `capsule`, `thin`, `hairline` and `classic`.
|
|
90
90
|
- `SwitchLookOptionId` — the Switch's option ids.
|
|
91
|
+
- `SETTING_ROW_LOOKS` — the setting row's: 2 options, each a computer's (`card`, `outlined` (the default) or `raised`; `rows`, `snug` (the default) or `roomy`, 64 tall), and two looks, `outright` (every option's default, the SwitchRows as they were) and `attio` (`raised`, `roomy`).
|
|
92
|
+
- `SettingRowOptionId` — its option ids.
|
|
93
|
+
- `SettingRowPicks` — one value for each.
|
|
91
94
|
- `MENU_LIST_LOOKS` — the menu list's, each a phone's: 6 options (`rows`, what its rows stand on; `lines`; `height`, a scale from `48` to `56`; `corners`, a scale from `lg` to `2xl`; `close`, a Close row; `tiles`) and five looks, `stack`, `card`, `plain`, `joined` and `words`, which pick the first four and leave the Close row and the tiles to the app.
|
|
92
95
|
- `MenuListLookOptionId` — the menu list's option ids.
|
|
93
96
|
|