@filipgutica/design-system 1.0.35 → 1.0.37
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/dist/tokens.d.ts +1 -0
- package/dist/tokens.js +16 -0
- package/dist/tokens.json +16 -0
- package/language/DESIGN.md +7 -5
- package/language/components.html +66 -27
- package/language/components.md +17 -16
- package/language/decisions.md +4 -2
- package/language/docs.html +5 -3
- package/language/product.html +3 -3
- package/language/reference.html +16 -6
- package/language/tokens.css +1 -0
- package/language/ui-sdk.css +17 -4
- package/package.json +1 -1
- package/theme-mapper/core.js +2 -1
package/language/components.html
CHANGED
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
.btn { --depth: var(--shadow-raise); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--control-md); padding: 0 0.625rem; border: 1px solid transparent; border-radius: var(--radius-control); background: var(--color-accent); color: var(--color-accent-text); box-shadow: var(--depth); font: var(--weight-medium) var(--text-md) / 1.25 var(--font-ui); letter-spacing: -0.01em; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
|
|
32
32
|
.btn[data-size="sm"] { min-height: var(--control-sm); gap: 0.375rem; padding: 0 var(--space-2); font-size: var(--text-sm); }
|
|
33
33
|
.btn[data-size="lg"] { min-height: var(--control-lg); padding: 0 var(--space-3); font-size: var(--text-lg); }
|
|
34
|
+
/* An icon-only button is a circle: one 16px icon and no text, on a square box of the size's control height. */
|
|
35
|
+
.btn[data-icon-only] { --size: var(--control-md); flex: none; width: var(--size); height: var(--size); min-height: var(--size); padding: 0; border-radius: var(--radius-circle); }
|
|
36
|
+
.btn[data-icon-only][data-size="sm"] { --size: var(--control-sm); }
|
|
37
|
+
.btn[data-icon-only][data-size="lg"] { --size: var(--control-lg); }
|
|
34
38
|
.btn.is-hover:not(:disabled) { background: var(--color-button-hover); }
|
|
35
39
|
@media (hover: hover) { .btn:hover:not(:disabled) { background: var(--color-button-hover); } }
|
|
36
40
|
.btn.secondary { background: var(--color-control-thumb); color: var(--color-text); }
|
|
@@ -58,6 +62,8 @@
|
|
|
58
62
|
.btn[aria-busy="true"] { cursor: wait; }
|
|
59
63
|
.btn[aria-busy="true"]::before { content: ""; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
|
|
60
64
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
65
|
+
/* An icon-only button has no room for both, so the spinner replaces its icon; the aria-label names it still. */
|
|
66
|
+
.btn[data-icon-only][aria-busy="true"] > * { display: none; }
|
|
61
67
|
/* Reduced motion slows the spinner instead of stopping it: the tokens.css base holds that exception. */
|
|
62
68
|
|
|
63
69
|
/* Quiet action: an icon or short text action inside a component, such as Copy, Full size, a dialog or
|
|
@@ -223,6 +229,9 @@
|
|
|
223
229
|
/* Line height 1 comes after the font shorthand, which would reset it: the label then sits centred in the option. */
|
|
224
230
|
.segmented button { --depth: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: calc(var(--item) - 2 * var(--inset)); padding: 0 var(--space-3); border: 0; border-radius: calc(var(--radius-control) - var(--inset)); background: transparent; color: var(--color-muted); font: inherit; line-height: 1; cursor: pointer; }
|
|
225
231
|
.segmented[data-icon-only] button { width: calc(var(--item) - 2 * var(--inset)); padding: 0; }
|
|
232
|
+
/* Icon-only: a pill track with round options, concentric with it. A px radius keeps the thumb a pill while it glides. */
|
|
233
|
+
.segmented[data-icon-only] { border-radius: var(--radius-pill); }
|
|
234
|
+
.segmented[data-icon-only] button { border-radius: calc(var(--radius-pill) - var(--inset)); }
|
|
226
235
|
/* The track insets its options 2px from its outer edge (the 1px border and 1px of padding), with 2px between
|
|
227
236
|
them, so each option is its thumb and the track is the control's height. The option's corner is the
|
|
228
237
|
track radius minus that 2px, concentric from the outer edge. */
|
|
@@ -289,7 +298,9 @@
|
|
|
289
298
|
.tablist[data-clip="start"] { mask-image: linear-gradient(to right, transparent, #000 24px); }
|
|
290
299
|
.tablist[data-clip="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
|
|
291
300
|
.tablist[data-clip="start end"] { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
|
|
292
|
-
|
|
301
|
+
/* A tab's box is the button's: the control height, the button's inline padding (--tab-pad), and line height 1. */
|
|
302
|
+
.tab { --tab-pad: 0.625rem; position: relative; flex: none; display: inline-flex; align-items: center; min-height: var(--tab-item, var(--control-md)); padding: 0 var(--tab-pad); border: 0; border-radius: var(--radius-inline); background: transparent; color: var(--color-muted); font: var(--weight-medium) var(--text-md) / 1 var(--font-ui); white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
|
|
303
|
+
.tablist[data-size="sm"] .tab { --tab-item: var(--control-sm); --tab-pad: var(--space-2); font-size: var(--text-sm); }
|
|
293
304
|
.tab.is-hover:where(:not(:disabled)) { background: var(--color-row-hover); color: var(--color-text); }
|
|
294
305
|
@media (hover: hover) { .tab:hover:where(:not(:disabled)) { background: var(--color-row-hover); color: var(--color-text); } }
|
|
295
306
|
/* The selected tab takes the navigation row's lifted fill: one selected state for both. The fill is a
|
|
@@ -353,7 +364,7 @@
|
|
|
353
364
|
.dialog-body { min-height: 0; overflow: auto; padding: var(--space-4); }
|
|
354
365
|
.dialog-foot { justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--color-border-subtle); background: var(--color-surface); }
|
|
355
366
|
/* The close button is a quiet action; this sets its size only. */
|
|
356
|
-
.close { flex: none; width: var(--control-
|
|
367
|
+
.close { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; color: var(--color-muted); }
|
|
357
368
|
.drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
|
|
358
369
|
dialog.drawer { position: fixed; inset: 0 auto 0 0; height: 100dvh; max-height: none; margin: 0; }
|
|
359
370
|
dialog.drawer::backdrop { background: var(--color-overlay); }
|
|
@@ -569,14 +580,13 @@
|
|
|
569
580
|
.tool-body { margin-top: var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); font-size: var(--text-sm); }
|
|
570
581
|
.tool-body ul { display: grid; gap: 0.125rem; margin: 0; padding-inline-start: var(--space-4); }
|
|
571
582
|
|
|
572
|
-
/* Composer: one field with an inline send button
|
|
573
|
-
|
|
583
|
+
/* Composer: one field with an inline round send button 6px inside its outer edge, clear of the box's 12px
|
|
584
|
+
corner. The box takes the field look and focus; the textarea inside it draws nothing. */
|
|
574
585
|
.composer { display: grid; gap: var(--space-1); width: 100%; }
|
|
575
|
-
.composer-box { display: flex; align-items: flex-end; gap: var(--space-2); padding:
|
|
586
|
+
.composer-box { display: flex; align-items: flex-end; gap: var(--space-2); padding: 0.3125rem; padding-inline-start: var(--space-3); border: 1px solid var(--color-field-edge); border-radius: var(--radius-panel); background: var(--color-field-bg); box-shadow: var(--shadow-field); }
|
|
576
587
|
/* The padding centres one line in --control-sm; each further line adds a line, up to 10rem. */
|
|
577
588
|
.composer-box textarea { flex: 1 1 0; min-width: 0; min-height: var(--control-sm); max-height: 10rem; padding: calc((var(--control-sm) - 1lh) / 2) 0; border: 0; outline: 0; resize: none; field-sizing: content; background: transparent; color: var(--color-text); font: var(--text-md) / 1.45 var(--font-ui); overflow-wrap: anywhere; }
|
|
578
589
|
.composer-box textarea::placeholder { color: var(--color-muted); opacity: 1; }
|
|
579
|
-
.composer-box .btn { width: var(--control-sm); padding: 0; border-radius: var(--radius-inline); }
|
|
580
590
|
.composer-box:is(:has(textarea:focus-visible), .is-focus) { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
|
|
581
591
|
.composer-box:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); }
|
|
582
592
|
.composer-box:has(textarea[aria-invalid="true"]):is(:has(textarea:focus-visible), .is-focus) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
|
|
@@ -625,7 +635,7 @@
|
|
|
625
635
|
.code-head b { font-weight: var(--weight-semibold); }
|
|
626
636
|
.code-head .lang { color: var(--color-muted); }
|
|
627
637
|
/* Copy is a quiet action; this sets its size and place. */
|
|
628
|
-
.copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-
|
|
638
|
+
.copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
|
|
629
639
|
/* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
|
|
630
640
|
.code .copy { color: var(--color-muted); }
|
|
631
641
|
.code .copy[data-copied] { color: var(--color-code-text); }
|
|
@@ -645,6 +655,8 @@
|
|
|
645
655
|
/* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
|
|
646
656
|
.code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
|
|
647
657
|
.code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
|
|
658
|
+
/* Copy keeps its control height and centres on the panel's line. */
|
|
659
|
+
.code.compact > .copy { align-self: center; }
|
|
648
660
|
|
|
649
661
|
/* Code block with a live example: a live stage over its source, in one frame. */
|
|
650
662
|
.example { width: 100%; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-bg); }
|
|
@@ -679,9 +691,9 @@
|
|
|
679
691
|
}
|
|
680
692
|
.capture-head { display: flex; align-items: center; min-width: 0; }
|
|
681
693
|
.capture .tablist { flex: 1; width: auto; padding-inline: var(--space-2); }
|
|
682
|
-
.capture .tab {
|
|
694
|
+
.capture .tab { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
683
695
|
/* Full size is a quiet action; this sets its size and place. */
|
|
684
|
-
.full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-
|
|
696
|
+
.full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-md); padding: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
|
|
685
697
|
/* Inset: the panel clips its content. */
|
|
686
698
|
.capture .full.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
|
|
687
699
|
.capture .tabpanel { padding-top: 0; color: inherit; }
|
|
@@ -726,7 +738,7 @@
|
|
|
726
738
|
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-text); background: var(--color-bg); width: 100%; }
|
|
727
739
|
.projects { position: relative; }
|
|
728
740
|
/* The trigger is a quiet action; this sets its size and type. */
|
|
729
|
-
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-
|
|
741
|
+
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-md); padding-inline: var(--space-3); border-radius: var(--radius-field); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
|
|
730
742
|
.projects > summary::-webkit-details-marker { display: none; }
|
|
731
743
|
/* The ~/ mark is decorative: the empty alternative text keeps it out of the name. */
|
|
732
744
|
.projects > summary::before { content: "~/" / ""; color: var(--color-project); }
|
|
@@ -739,8 +751,8 @@
|
|
|
739
751
|
/* Rows sit --space-1 inside the menu, so they are concentric with it, as select picker rows are. */
|
|
740
752
|
.projects .navlist a { border-radius: calc(var(--radius-panel) - var(--space-1)); font-family: var(--font-mono); }
|
|
741
753
|
.site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
|
|
742
|
-
/* The site links are a navigation strip at the
|
|
743
|
-
.site-links a { min-height: var(--control-
|
|
754
|
+
/* The site links are a navigation strip at the control height; they grow to --control-touch at tablet width. */
|
|
755
|
+
.site-links a { min-height: var(--control-md); }
|
|
744
756
|
|
|
745
757
|
/* Page type and helpers */
|
|
746
758
|
.folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
|
|
@@ -796,7 +808,7 @@
|
|
|
796
808
|
/* The inset accent line drops, so a focused field draws the system ring just inside its edge. */
|
|
797
809
|
:is(.input, .select, .textarea):is(:focus-visible, .is-focus), .search:is(:has(input:focus-visible), .is-focus), .composer-box:is(:has(textarea:focus-visible), .is-focus) { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
|
|
798
810
|
/* The lifted fill drops, so the selected tab takes a system border; the padding absorbs it. */
|
|
799
|
-
.tab[aria-selected="true"] { border: 2px solid Highlight; padding: calc(var(--
|
|
811
|
+
.tab[aria-selected="true"] { border: 2px solid Highlight; padding-inline: calc(var(--tab-pad) - 2px); }
|
|
800
812
|
.tab[aria-selected="true"]::before { content: none; }
|
|
801
813
|
.check input:checked { forced-color-adjust: none; border-color: Highlight; background: Highlight; }
|
|
802
814
|
/* The masked search cross would lose its fill, so it opts out and takes the system text colour. */
|
|
@@ -854,8 +866,8 @@
|
|
|
854
866
|
.page-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-8); }
|
|
855
867
|
.page-head > .strip { justify-self: start; }
|
|
856
868
|
}
|
|
857
|
-
/* Header links are navigation rows at the
|
|
858
|
-
.page-head .strip a { min-height: var(--control-
|
|
869
|
+
/* Header links are navigation rows at the control height; they grow to --control-touch at tablet width. */
|
|
870
|
+
.page-head .strip a { min-height: var(--control-md); }
|
|
859
871
|
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
|
|
860
872
|
/* One column that may shrink below its content, so a long title or specimen cannot widen the page.
|
|
861
873
|
A short page, such as one left by a find with no matches, keeps its rows at the top. */
|
|
@@ -897,6 +909,8 @@
|
|
|
897
909
|
.rail-specimen { display: grid; gap: var(--space-3); width: 240px; }
|
|
898
910
|
.phone-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); width: min(100%, 360px); padding-block: var(--space-2); border-bottom: 1px solid var(--color-text); }
|
|
899
911
|
.phone-head > .strip { flex-basis: 100%; margin-inline: -2px; }
|
|
912
|
+
/* The phone header samples show the touch size at every width. */
|
|
913
|
+
.phone-head .projects > summary, .phone-head > .strip a { min-height: var(--control-touch); }
|
|
900
914
|
/* At 640px and narrower, one or two links stay on the switcher's row as plain text links, 12px apart:
|
|
901
915
|
no row padding or hover fill, and the current page in the accent with no fill. The picker ends the row;
|
|
902
916
|
where all of it does not fit, as at 320px, only the picker wraps. */
|
|
@@ -959,18 +973,23 @@
|
|
|
959
973
|
.row { grid-template-columns: minmax(0, 1fr); }
|
|
960
974
|
/* Touch: controls of every size grow to --control-touch, the inert state examples included. Only the size
|
|
961
975
|
specimens (data-specimen="size") keep their sizes. */
|
|
962
|
-
.btn:not([data-specimen="size"] *), .navlist a, .rows [role="option"], .tab { min-height: var(--control-touch); }
|
|
976
|
+
.btn:not([data-specimen="size"] *), .navlist a, .rows [role="option"], .tab:not([data-specimen="size"] *) { min-height: var(--control-touch); }
|
|
977
|
+
/* An icon-only button grows on both sides, so it stays a circle. */
|
|
978
|
+
.btn[data-icon-only]:not([data-specimen="size"] *) { --size: var(--control-touch); }
|
|
963
979
|
/* A segmented control grows its item size too, so icon-only options stay square. */
|
|
964
980
|
.segmented:not([data-specimen="size"] *) { --item: var(--control-touch); }
|
|
965
981
|
.input:not([data-specimen="size"] *), .select:not([data-specimen="size"] *), .range:not([data-specimen="size"] *) { height: var(--control-touch); }
|
|
966
982
|
.search { height: var(--control-touch); }
|
|
967
983
|
.check:not([data-specimen="size"] *), .switch:not([data-specimen="size"] *), .toggle:not([data-specimen="size"] *) { min-height: var(--control-touch); }
|
|
968
984
|
.copy-link { width: var(--control-touch); height: var(--control-touch); }
|
|
985
|
+
/* Quiet actions in docs components: 32px on desktop, 44px here. */
|
|
986
|
+
.close { width: var(--control-touch); }
|
|
987
|
+
.copy { min-width: var(--control-touch); }
|
|
988
|
+
.close, .copy, .full, .projects > summary, .page-head .strip a { min-height: var(--control-touch); }
|
|
969
989
|
.chip { min-height: var(--control-touch); }
|
|
970
990
|
/* Touch: the hover toolbar never shows; a tap opens the thread, whose header holds More. */
|
|
971
991
|
.msg-tools { display: none; }
|
|
972
992
|
.composer-box textarea { min-height: var(--control-touch); padding-block: calc((var(--control-touch) - 1lh) / 2); }
|
|
973
|
-
.composer-box .btn { width: var(--control-touch); min-height: var(--control-touch); }
|
|
974
993
|
/* The thread pane takes the full width below the message list, and the handle hides. */
|
|
975
994
|
.thread-demo { grid-template-columns: minmax(0, 1fr); }
|
|
976
995
|
.thread-pane { border-left: 0; border-top: 1px solid var(--color-border-subtle); }
|
|
@@ -1137,7 +1156,7 @@
|
|
|
1137
1156
|
<section class="component" id="button" data-layer="Core" data-states="hover pressed focus disabled busy" aria-labelledby="button-title">
|
|
1138
1157
|
<header><h3 id="button-title">Button</h3><span class="badge">Core</span><a href="components.md#button">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="button" aria-label="Copy link to Button" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1139
1158
|
<p class="purpose">The main action control: primary, secondary, ghost, danger, and text.</p>
|
|
1140
|
-
<dl class="guidance"><dt>Do</dt><dd>One primary button in each decision group, labelled with a verb for its result, such as “Save changes”. Every other action in the group is secondary, ghost, or text.</dd><dt>Don’t</dt><dd>The danger variant on an action the reader can undo. Danger marks an action that destroys something.</dd></dl>
|
|
1159
|
+
<dl class="guidance"><dt>Do</dt><dd>One primary button in each decision group, labelled with a verb for its result, such as “Save changes”. Every other action in the group is secondary, ghost, or text. Give a lone icon a circle when it is the one icon action in its group that needs a fill, such as Send or Update, and put it at the end of its row.</dd><dt>Don’t</dt><dd>The danger variant on an action the reader can undo. Danger marks an action that destroys something. An icon-only ghost or text button: a lone icon with no fill at rest is a quiet action, because the two look the same at rest and would hover in different shapes.</dd></dl>
|
|
1141
1160
|
<div class="row"><h4>Primary</h4><div class="states">
|
|
1142
1161
|
<div class="state"><button class="btn" type="button"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg>New monitor</button><span class="caption">Rest</span></div>
|
|
1143
1162
|
<div class="state" inert><button class="btn is-hover" type="button">New monitor</button><span class="caption">Hover</span></div>
|
|
@@ -1167,6 +1186,16 @@
|
|
|
1167
1186
|
<div class="state" inert><button class="btn danger is-active" type="button">Delete monitor</button><span class="caption">Pressed</span></div>
|
|
1168
1187
|
<div class="state" inert><button class="btn danger" type="button" disabled>Delete monitor</button><span class="caption">Disabled</span></div>
|
|
1169
1188
|
</div></div>
|
|
1189
|
+
<div class="row"><h4>Icon only</h4><div class="states">
|
|
1190
|
+
<div class="state"><button class="btn" type="button" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button><span class="caption">Primary</span></div>
|
|
1191
|
+
<div class="state"><button class="btn secondary" type="button" data-icon-only aria-label="Add"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">Secondary</span></div>
|
|
1192
|
+
<div class="state"><button class="btn danger" type="button" data-icon-only aria-label="Remove"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button><span class="caption">Danger</span></div>
|
|
1193
|
+
<div class="state" inert><button class="btn secondary is-hover" type="button" data-icon-only aria-label="Add, hover"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">Hover</span></div>
|
|
1194
|
+
<div class="state" inert><button class="btn secondary is-focus" type="button" data-icon-only aria-label="Add, focus"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">Focus visible</span></div>
|
|
1195
|
+
<div class="state" inert><button class="btn secondary is-active" type="button" data-icon-only aria-label="Add, pressed"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">Pressed</span></div>
|
|
1196
|
+
<div class="state" inert><button class="btn" type="button" data-icon-only aria-label="Send" aria-busy="true" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button><span class="caption">Busy</span></div>
|
|
1197
|
+
<div class="state" inert><button class="btn" type="button" data-icon-only aria-label="Send, disabled" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button><span class="caption">Disabled</span></div>
|
|
1198
|
+
</div></div>
|
|
1170
1199
|
<div class="row"><h4>Text</h4><div class="states">
|
|
1171
1200
|
<div class="state"><button class="btn text" type="button">Show details</button><span class="caption">Rest</span></div>
|
|
1172
1201
|
<div class="state" inert><button class="btn text is-focus" type="button">Show details</button><span class="caption">Focus visible</span></div>
|
|
@@ -1178,6 +1207,9 @@
|
|
|
1178
1207
|
<div class="state" inert data-specimen="size"><button class="btn" type="button" data-size="lg">Large</button><span class="caption">lg</span></div>
|
|
1179
1208
|
<div class="state" inert data-specimen="size"><button class="btn secondary" type="button" data-size="sm">Small</button><span class="caption">sm</span></div>
|
|
1180
1209
|
<div class="state" inert data-specimen="size"><button class="btn secondary" type="button" data-size="lg">Large</button><span class="caption">lg</span></div>
|
|
1210
|
+
<div class="state" inert data-specimen="size"><button class="btn secondary" type="button" data-size="sm" data-icon-only aria-label="Add, small"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">sm</span></div>
|
|
1211
|
+
<div class="state" inert data-specimen="size"><button class="btn secondary" type="button" data-size="md" data-icon-only aria-label="Add, medium"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">md</span></div>
|
|
1212
|
+
<div class="state" inert data-specimen="size"><button class="btn secondary" type="button" data-size="lg" data-icon-only aria-label="Add, large"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button><span class="caption">lg</span></div>
|
|
1181
1213
|
</div></div>
|
|
1182
1214
|
<div class="row"><h4>Link</h4><div class="states">
|
|
1183
1215
|
<div class="state"><a class="btn secondary" href="#quiet-action">Read the guide</a><span class="caption">Rest, live; no underline on hover</span></div>
|
|
@@ -1188,7 +1220,7 @@
|
|
|
1188
1220
|
<section class="component" id="quiet-action" data-layer="Core" data-states="hover pressed focus disabled" aria-labelledby="quiet-action-title">
|
|
1189
1221
|
<header><h3 id="quiet-action-title">Quiet action</h3><span class="badge">Core</span><a href="components.md#quiet-action">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="quiet-action" aria-label="Copy link to Quiet action" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1190
1222
|
<p class="purpose">A small transparent action inside a component, such as Copy or Close.</p>
|
|
1191
|
-
<dl class="guidance"><dt>Do</dt><dd>Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger.</dd><dt>Don’t</dt><dd>
|
|
1223
|
+
<dl class="guidance"><dt>Do</dt><dd>Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger. Use it too for any icon-only action that needs no fill at rest, such as the utilities in a sidebar footer or Help at the end of an action bar. In a row of controls it is a square at that row’s control size, and it grows to <code>--control-touch</code> at tablet width.</dd><dt>Don’t</dt><dd>A labelled action that stands on its own in the page, such as Save or Next. That is a button. A lone icon that needs a fill at rest, such as Send: that is an icon-only button, a circle.</dd></dl>
|
|
1192
1224
|
<p class="note">One recipe for Copy, Full size, dialog and drawer close, the project trigger, and the overflow menu trigger. Each component sets only its size and place.</p>
|
|
1193
1225
|
<div class="row"><h4>Icon</h4><div class="states">
|
|
1194
1226
|
<div class="state"><button class="quiet-action close" type="button" aria-label="Close"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button><span class="caption">Rest</span></div>
|
|
@@ -1231,7 +1263,7 @@
|
|
|
1231
1263
|
<p class="purpose">A small suggestion that fills in a composer or opens a screen.</p>
|
|
1232
1264
|
<dl class="guidance"><dt>Do</dt><dd>Offer two to four next steps under an empty composer, each named for its result, such as “Review last night’s run”. A chip either fills in the composer or opens a screen.</dd><dt>Don’t</dt><dd>A chip for a status or a category, which is a badge, or a chip that sends a message on its own.</dd></dl>
|
|
1233
1265
|
<div class="row"><h4>Suggestions</h4><div class="states">
|
|
1234
|
-
<div class="state wide"><div class="chip-stage"><div class="composer"><label class="sr-only" for="chip-composer">Post to #global</label><div class="composer-box"><textarea id="chip-composer" rows="1" placeholder="Post to #global, or start with /todo" aria-describedby="chip-composer-hint"></textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="chip-composer-hint">Posts to the board. It doesn’t start a T3 Code thread.</p></div><ul class="chips" aria-label="Suggestions"><li><a class="chip" href="#thread-panel"><svg class="icon" aria-hidden="true"><use href="#i-dark"/></svg>Open a thread</a></li><li><a class="chip" href="#message-group"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg>See grouped messages</a></li><li><a class="chip" href="#find-field"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg>Find a component</a></li></ul></div><span class="caption">Rest, live: a wrapping, centred row under an empty composer</span></div>
|
|
1266
|
+
<div class="state wide"><div class="chip-stage"><div class="composer"><label class="sr-only" for="chip-composer">Post to #global</label><div class="composer-box"><textarea id="chip-composer" rows="1" placeholder="Post to #global, or start with /todo" aria-describedby="chip-composer-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="chip-composer-hint">Posts to the board. It doesn’t start a T3 Code thread.</p></div><ul class="chips" aria-label="Suggestions"><li><a class="chip" href="#thread-panel"><svg class="icon" aria-hidden="true"><use href="#i-dark"/></svg>Open a thread</a></li><li><a class="chip" href="#message-group"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg>See grouped messages</a></li><li><a class="chip" href="#find-field"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg>Find a component</a></li></ul></div><span class="caption">Rest, live: a wrapping, centred row under an empty composer</span></div>
|
|
1235
1267
|
</div></div>
|
|
1236
1268
|
<div class="row"><h4>States</h4><div class="states">
|
|
1237
1269
|
<div class="state" inert><a class="chip" href="#chip"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg>Open todos</a><span class="caption">Rest</span></div>
|
|
@@ -1333,6 +1365,9 @@
|
|
|
1333
1365
|
<div class="state"><div class="segmented" role="group" aria-label="Layout" data-icon-only data-live><button type="button" aria-pressed="true" aria-label="List" title="List"><svg class="icon" aria-hidden="true"><use href="#i-list"/></svg></button><button type="button" aria-pressed="false" aria-label="Grid" title="Grid"><svg class="icon" aria-hidden="true"><use href="#i-grid"/></svg></button></div><span class="caption">Icon only, live</span></div>
|
|
1334
1366
|
<div class="state" inert data-specimen="size"><div class="segmented" role="group" aria-label="Small" data-size="sm"><button type="button" aria-pressed="true">Day</button><button type="button" aria-pressed="false">Week</button></div><span class="caption">sm</span></div>
|
|
1335
1367
|
<div class="state" inert data-specimen="size"><div class="segmented" role="group" aria-label="Large" data-size="lg"><button type="button" aria-pressed="true">Day</button><button type="button" aria-pressed="false">Week</button></div><span class="caption">lg</span></div>
|
|
1368
|
+
<div class="state" inert data-specimen="size"><div class="segmented" role="group" aria-label="Theme, small" data-size="sm" data-icon-only><button type="button" aria-pressed="true" aria-label="System" title="System"><svg class="icon" aria-hidden="true"><use href="#i-system"/></svg></button><button type="button" aria-pressed="false" aria-label="Light" title="Light"><svg class="icon" aria-hidden="true"><use href="#i-light"/></svg></button><button type="button" aria-pressed="false" aria-label="Dark" title="Dark"><svg class="icon" aria-hidden="true"><use href="#i-dark"/></svg></button></div><span class="caption">sm</span></div>
|
|
1369
|
+
<div class="state" inert data-specimen="size"><div class="segmented" role="group" aria-label="Theme, medium" data-icon-only><button type="button" aria-pressed="true" aria-label="System" title="System"><svg class="icon" aria-hidden="true"><use href="#i-system"/></svg></button><button type="button" aria-pressed="false" aria-label="Light" title="Light"><svg class="icon" aria-hidden="true"><use href="#i-light"/></svg></button><button type="button" aria-pressed="false" aria-label="Dark" title="Dark"><svg class="icon" aria-hidden="true"><use href="#i-dark"/></svg></button></div><span class="caption">md</span></div>
|
|
1370
|
+
<div class="state" inert data-specimen="size"><div class="segmented" role="group" aria-label="Theme, large" data-size="lg" data-icon-only><button type="button" aria-pressed="true" aria-label="System" title="System"><svg class="icon" aria-hidden="true"><use href="#i-system"/></svg></button><button type="button" aria-pressed="false" aria-label="Light" title="Light"><svg class="icon" aria-hidden="true"><use href="#i-light"/></svg></button><button type="button" aria-pressed="false" aria-label="Dark" title="Dark"><svg class="icon" aria-hidden="true"><use href="#i-dark"/></svg></button></div><span class="caption">lg</span></div>
|
|
1336
1371
|
</div></div>
|
|
1337
1372
|
</section>
|
|
1338
1373
|
|
|
@@ -1604,6 +1639,10 @@
|
|
|
1604
1639
|
<div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, hover"><button class="tab" type="button" role="tab" aria-selected="true">Overview</button><button class="tab is-hover" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Hover on History</span></div>
|
|
1605
1640
|
<div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, focus"><button class="tab is-focus" type="button" role="tab" aria-selected="true">Overview</button><button class="tab" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Focus visible</span></div>
|
|
1606
1641
|
</div></div>
|
|
1642
|
+
<div class="row"><h4>Sizes</h4><div class="states">
|
|
1643
|
+
<div class="state" inert data-specimen="size"><div class="tablist" role="tablist" aria-label="Monitor, small" data-size="sm"><button class="tab" type="button" role="tab" aria-selected="true">Overview</button><button class="tab" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">sm</span></div>
|
|
1644
|
+
<div class="state" inert data-specimen="size"><div class="tablist" role="tablist" aria-label="Monitor, medium"><button class="tab" type="button" role="tab" aria-selected="true">Overview</button><button class="tab" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">md</span></div>
|
|
1645
|
+
</div></div>
|
|
1607
1646
|
</section>
|
|
1608
1647
|
|
|
1609
1648
|
<section class="component" id="skip-link" data-layer="Core" aria-labelledby="skip-link-title">
|
|
@@ -1678,7 +1717,7 @@
|
|
|
1678
1717
|
<dl class="guidance"><dt>Do</dt><dd>Open a thread beside its channel, so the reader keeps the channel in view, and mark its root message as selected in the list.</dd><dt>Don’t</dt><dd>A thread in a dialog, or a second pane beside the first. One thread is open at a time.</dd></dl>
|
|
1679
1718
|
<p class="note">In an application the pane is an <code><aside></code>; the catalogue uses a section, because a complementary landmark belongs at the top level, outside <code>main</code>. Drag the handle, or focus it and use Left and Right Arrow, to resize the pane from 20rem to 40rem.</p>
|
|
1680
1719
|
<div class="row"><h4>Live</h4><div class="states">
|
|
1681
|
-
<div class="state wide"><div class="thread-demo"><ol class="stream" aria-label="Messages in #annoterm"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">2 replies</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>20 Nov 16:20</time></div><div class="msg-body"><p>Docs preview deploys are back.</p></div></div></li></ol><section class="thread-pane" id="thread-live" aria-labelledby="thread-live-title"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-controls="thread-live" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div><div class="pane-head"><h4 id="thread-live-title">Thread <span>#annoterm</span></h4><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false" aria-controls="thread-menu"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="thread-menu" role="menu" aria-label="Thread actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button><button type="button" role="menuitem" tabindex="-1">Open #annoterm</button><button type="button" role="menuitem" tabindex="-1">Copy link</button></div></div></div><div class="pane-body"><ol class="stream" aria-label="Thread root"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links"><a href="#thread-panel">PR #31</a><span>checks passed</span><a href="#thread-panel">T3 thread</a></p></div></div></li></ol><p class="reply-count">2 replies</p><ol class="stream" aria-label="Replies"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Yesterday 11:30</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>renderer handles tables that fit the terminal</b></span></summary><div class="tool-body"><ul><li>Tables up to 80 columns render.</li><li>Wider tables clip at the edge.</li></ul></div></details></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>PR #31 open, checks pass</b></span></summary><div class="tool-body"><p>PR #31 adds table rendering and its snapshot tests.</p></div></details><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div></li></ol></div><div class="composer"><label class="sr-only" for="thread-composer">Reply to desktop-claude</label><div class="composer-box"><textarea id="thread-composer" rows="1" placeholder="Reply to desktop-claude" aria-describedby="thread-composer-hint"></textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="thread-composer-hint">Saved to the board. desktop-claude sees it the next time it checks.</p></div></section></div><span class="caption">Open beside its channel, live; the root message is selected in the list</span></div>
|
|
1720
|
+
<div class="state wide"><div class="thread-demo"><ol class="stream" aria-label="Messages in #annoterm"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">2 replies</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>20 Nov 16:20</time></div><div class="msg-body"><p>Docs preview deploys are back.</p></div></div></li></ol><section class="thread-pane" id="thread-live" aria-labelledby="thread-live-title"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-controls="thread-live" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div><div class="pane-head"><h4 id="thread-live-title">Thread <span>#annoterm</span></h4><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false" aria-controls="thread-menu"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="thread-menu" role="menu" aria-label="Thread actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button><button type="button" role="menuitem" tabindex="-1">Open #annoterm</button><button type="button" role="menuitem" tabindex="-1">Copy link</button></div></div></div><div class="pane-body"><ol class="stream" aria-label="Thread root"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links"><a href="#thread-panel">PR #31</a><span>checks passed</span><a href="#thread-panel">T3 thread</a></p></div></div></li></ol><p class="reply-count">2 replies</p><ol class="stream" aria-label="Replies"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Yesterday 11:30</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>renderer handles tables that fit the terminal</b></span></summary><div class="tool-body"><ul><li>Tables up to 80 columns render.</li><li>Wider tables clip at the edge.</li></ul></div></details></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>PR #31 open, checks pass</b></span></summary><div class="tool-body"><p>PR #31 adds table rendering and its snapshot tests.</p></div></details><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div></li></ol></div><div class="composer"><label class="sr-only" for="thread-composer">Reply to desktop-claude</label><div class="composer-box"><textarea id="thread-composer" rows="1" placeholder="Reply to desktop-claude" aria-describedby="thread-composer-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="thread-composer-hint">Saved to the board. desktop-claude sees it the next time it checks.</p></div></section></div><span class="caption">Open beside its channel, live; the root message is selected in the list</span></div>
|
|
1682
1721
|
</div></div>
|
|
1683
1722
|
<div class="row"><h4>Handle</h4><div class="states">
|
|
1684
1723
|
<div class="state" inert><div class="handle-specimen"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div></div><span class="caption">Rest</span></div>
|
|
@@ -1692,14 +1731,14 @@
|
|
|
1692
1731
|
<p class="purpose">One growing field with an inline send button.</p>
|
|
1693
1732
|
<dl class="guidance"><dt>Do</dt><dd>Name the field for where the message goes, such as “Reply to desktop-claude”, and say in the hint what happens after sending.</dd><dt>Don’t</dt><dd>A Send label beside the field, or a second field for a title. The composer is one field and one icon.</dd></dl>
|
|
1694
1733
|
<div class="row"><h4>States</h4><div class="states">
|
|
1695
|
-
<div class="state"><div class="composer"><label class="sr-only" for="cmp-live">Reply to desktop-claude</label><div class="composer-box"><textarea id="cmp-live" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-live-hint"></textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-live-hint">Saved to the board.</p></div><span class="caption">Rest, live</span></div>
|
|
1734
|
+
<div class="state"><div class="composer"><label class="sr-only" for="cmp-live">Reply to desktop-claude</label><div class="composer-box"><textarea id="cmp-live" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-live-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-live-hint">Saved to the board.</p></div><span class="caption">Rest, live</span></div>
|
|
1696
1735
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-typing">Reply, typing</label><div class="composer-box"><textarea id="cmp-typing" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-typing-hint">Scroll for now.
|
|
1697
1736
|
Wrap needs a design pass first.
|
|
1698
|
-
I’ll open a ticket for it.</textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-typing-hint">Saved to the board.</p></div><span class="caption">Typing: the field grows, up to 10rem</span></div>
|
|
1699
|
-
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-focus">Reply, focused</label><div class="composer-box is-focus"><textarea id="cmp-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-focus-hint"></textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-focus-hint">Saved to the board.</p></div><span class="caption">Focus visible</span></div>
|
|
1700
|
-
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid">Reply, refused</label><div class="composer-box"><textarea id="cmp-invalid" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-hint" aria-invalid="true" aria-errormessage="cmp-invalid-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-hint">Saved to the board.</p></div><span class="caption">Invalid: refused, nothing saved</span></div>
|
|
1701
|
-
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid-focus">Reply, refused and focused</label><div class="composer-box is-focus"><textarea id="cmp-invalid-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-focus-hint" aria-invalid="true" aria-errormessage="cmp-invalid-focus-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-focus-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-focus-hint">Saved to the board.</p></div><span class="caption">Invalid while focused</span></div>
|
|
1702
|
-
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-offline">Reply, offline</label><div class="composer-box"><textarea id="cmp-offline" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-offline-hint" disabled></textarea><button class="btn" type="button" data-size="sm" aria-label="Send" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-offline-hint">Offline: the board server can’t be reached. Sending comes back when it can.</p></div><span class="caption">Disabled: offline, with the reason in the hint</span></div>
|
|
1737
|
+
I’ll open a ticket for it.</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-typing-hint">Saved to the board.</p></div><span class="caption">Typing: the field grows, up to 10rem</span></div>
|
|
1738
|
+
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-focus">Reply, focused</label><div class="composer-box is-focus"><textarea id="cmp-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-focus-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-focus-hint">Saved to the board.</p></div><span class="caption">Focus visible</span></div>
|
|
1739
|
+
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid">Reply, refused</label><div class="composer-box"><textarea id="cmp-invalid" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-hint" aria-invalid="true" aria-errormessage="cmp-invalid-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-hint">Saved to the board.</p></div><span class="caption">Invalid: refused, nothing saved</span></div>
|
|
1740
|
+
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid-focus">Reply, refused and focused</label><div class="composer-box is-focus"><textarea id="cmp-invalid-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-focus-hint" aria-invalid="true" aria-errormessage="cmp-invalid-focus-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-focus-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-focus-hint">Saved to the board.</p></div><span class="caption">Invalid while focused</span></div>
|
|
1741
|
+
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-offline">Reply, offline</label><div class="composer-box"><textarea id="cmp-offline" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-offline-hint" disabled></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-offline-hint">Offline: the board server can’t be reached. Sending comes back when it can.</p></div><span class="caption">Disabled: offline, with the reason in the hint</span></div>
|
|
1703
1742
|
</div></div>
|
|
1704
1743
|
</section>
|
|
1705
1744
|
|
package/language/components.md
CHANGED
|
@@ -48,7 +48,7 @@ A control's **States** line names each interactive state it has. In `components.
|
|
|
48
48
|
|
|
49
49
|
Layer: Core.
|
|
50
50
|
|
|
51
|
-
- **Anatomy.** A native `<button>` with a label and an optional 16px leading icon. A link that should look like a button is an `<a>` with the same classes and no underline. Medium weight, `-0.01em` tracking, line height 1.25, `--radius-control` (an 8px rounded rectangle, the field and row corner). Horizontal padding is `--space-2` (8px) at `sm`, 10px at `md`, and `--space-3` at `lg`, and an `sm` button's icon sits 6px from its label.
|
|
51
|
+
- **Anatomy.** A native `<button>` with a label and an optional 16px leading icon. A link that should look like a button is an `<a>` with the same classes and no underline. Medium weight, `-0.01em` tracking, line height 1.25, `--radius-control` (an 8px rounded rectangle, the field and row corner). Horizontal padding is `--space-2` (8px) at `sm`, 10px at `md`, and `--space-3` at `lg`, and an `sm` button's icon sits 6px from its label. An icon-only button carries `data-icon-only` and holds one 16px icon and no text. It is a circle: its width equals its height at every size, with no padding and `--radius-circle`. Only primary, secondary, and danger have an icon-only form.
|
|
52
52
|
- **Variants.**
|
|
53
53
|
|
|
54
54
|
| Variant | Rest | Hover | Pressed |
|
|
@@ -59,11 +59,12 @@ Layer: Core.
|
|
|
59
59
|
| Danger | `--color-error-surface` fill, `--color-error` mixed 75% with `--color-status-ink` (85% in dark), `--shadow-raise` | `--color-error` 10% into `--color-error-surface` | `--color-error` 16% into `--color-error-surface`, `--shadow-sink` |
|
|
60
60
|
| Text | Transparent, `--color-link`, underlined, 4px padding | No change | No change |
|
|
61
61
|
|
|
62
|
-
- **States.** Rest, hover, pressed, focus-visible, disabled, and busy. Pressed also moves the button 1px down, for every variant but text, and applies to `aria-pressed="true"`. Busy sets `aria-busy="true"` and `disabled`, so the button takes no hover or press, with `cursor: wait`. It shows a 14px spinner before the label: a 2px `currentColor` ring with a transparent right edge, turning once every 700ms. Keep the label while busy.
|
|
63
|
-
- **Do.** One primary button in each decision group, labelled with a verb for its result, such as "Save changes". Every other action in the group is secondary, ghost, or text.
|
|
64
|
-
- **Don't.** The danger variant on an action the reader can undo. Danger marks an action that destroys something.
|
|
62
|
+
- **States.** Rest, hover, pressed, focus-visible, disabled, and busy. Pressed also moves the button 1px down, for every variant but text, and applies to `aria-pressed="true"`. Busy sets `aria-busy="true"` and `disabled`, so the button takes no hover or press, with `cursor: wait`. It shows a 14px spinner before the label: a 2px `currentColor` ring with a transparent right edge, turning once every 700ms. Keep the label while busy. An icon-only button has no room for both, so the spinner replaces its icon, and its `aria-label` stays the same.
|
|
63
|
+
- **Do.** One primary button in each decision group, labelled with a verb for its result, such as "Save changes". Every other action in the group is secondary, ghost, or text. Give a lone icon a circle when it is the one icon action in its group that needs a fill, such as Send or Update, and put it at the end of its row.
|
|
64
|
+
- **Don't.** The danger variant on an action the reader can undo. Danger marks an action that destroys something. An icon-only ghost or text button: a lone icon with no fill at rest is a quiet action, because the two look the same at rest and would hover in different shapes.
|
|
65
65
|
- **Danger label.** Check the label at 4.5:1 on the rest, hover, and pressed fills. Where the mix misses, use the first of `--color-text`, black, and white that reads on all three.
|
|
66
66
|
- **Keyboard and screen reader.** Native button behavior: Enter and Space activate it. An icon-only button needs `aria-label`.
|
|
67
|
+
- **Touch.** At tablet width (`max-width: 800px`) every button is at least `--control-touch` tall, and an icon-only button grows to a `--control-touch` circle.
|
|
67
68
|
- **Motion.** Fill and shadow transition over `--duration-fast`. Reduced motion slows the spinner to 1.4s instead of stopping it, so the busy state stays visible. The `tokens.css` base holds that exception.
|
|
68
69
|
- **Forced colors.** The transparent border draws as the system button edge.
|
|
69
70
|
|
|
@@ -71,10 +72,10 @@ Layer: Core.
|
|
|
71
72
|
|
|
72
73
|
Layer: Core.
|
|
73
74
|
|
|
74
|
-
- **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour.
|
|
75
|
+
- **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour. On a docs page, Copy, close, Full size, and the project trigger are `--control-md` (32px) tall, and `--control-touch` at tablet width.
|
|
75
76
|
- **States.** Hover turns the text `--color-text` and fills `currentColor` at 6% over transparent, only where the pointer can hover (`@media (hover: hover)`). Pressed fills `currentColor` at 12%, with no sink. Focus-visible is the focus ring, inset where the parent clips. An open menu keeps its trigger at the 6% hover tint, below the press. The code block's Copy is `--color-muted` at rest and takes the block's text colour (`--color-code-text`) on hover and while its tick shows. A disabled quiet action follows the shared [disabled](#rules-for-every-control) rule.
|
|
76
|
-
- **Do.** Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger.
|
|
77
|
-
- **Don't.**
|
|
77
|
+
- **Do.** Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger. Use it too for any icon-only action that needs no fill at rest, such as the utilities in a sidebar footer or Help at the end of an action bar. In a row of controls it is a square at that row's control size, and it grows to `--control-touch` at tablet width.
|
|
78
|
+
- **Don't.** A labelled action that stands on its own in the page, such as Save or Next. That is a button. A lone icon that needs a fill at rest, such as Send: that is an icon-only button, a circle.
|
|
78
79
|
- **Keyboard and screen reader.** Native button behavior. An icon-only action needs `aria-label`.
|
|
79
80
|
- **Motion.** Fill and colour change over `--duration-fast` with `--ease-out`.
|
|
80
81
|
- **Forced colors.** The transparent border draws as the system edge.
|
|
@@ -160,7 +161,7 @@ Layer: Core.
|
|
|
160
161
|
|
|
161
162
|
Layer: Core.
|
|
162
163
|
|
|
163
|
-
- **Anatomy.** A `role="group"` with an accessible name, containing one `<button aria-pressed>` for each option. The track is undivided: `--color-well` fill, `--shadow-sink`, a transparent 1px border, 1px of padding, and `--radius-control`, and it is the control height (`--item`), so an `sm` filter lines up with the `sm` buttons beside it. Its options sit 2px (`--inset`, the border plus the padding) inside its outer edge, with 2px between them, as in Astryx's segmented control: each button is `--item` minus 4px tall, with line height 1, so the label sits centred, and `--space-2` padding at `sm` and `--space-3` at `md` and `lg`, and square when icon-only. Each button is its own thumb: a `::before` layer that fills it, behind the label. Its corners are concentric with the track from the outer edge, `calc(var(--radius-control) - var(--inset))` (6px), a named exception to the 8px row corner. At tablet width a control of any size sets `--item` to `--control-touch`, so its options grow to the touch size less their 4px total inset, and icon-only options stay square.
|
|
164
|
+
- **Anatomy.** A `role="group"` with an accessible name, containing one `<button aria-pressed>` for each option. The track is undivided: `--color-well` fill, `--shadow-sink`, a transparent 1px border, 1px of padding, and `--radius-control`, and it is the control height (`--item`), so an `sm` filter lines up with the `sm` buttons beside it. Its options sit 2px (`--inset`, the border plus the padding) inside its outer edge, with 2px between them, as in Astryx's segmented control: each button is `--item` minus 4px tall, with line height 1, so the label sits centred, and `--space-2` padding at `sm` and `--space-3` at `md` and `lg`, and square when icon-only. Each button is its own thumb: a `::before` layer that fills it, behind the label. Its corners are concentric with the track from the outer edge, `calc(var(--radius-control) - var(--inset))` (6px), a named exception to the 8px row corner. At tablet width a control of any size sets `--item` to `--control-touch`, so its options grow to the touch size less their 4px total inset, and icon-only options stay square. An icon-only control (`data-icon-only`) has a `--radius-pill` track and round options, `calc(var(--radius-pill) - var(--inset))` on a square box, so the thumb is a circle at rest and a pill while it glides. A text control keeps the 8px track and 6px options.
|
|
164
165
|
- **Tokens.** Labels are `--color-muted`. The pressed option's thumb is `--color-control-thumb` with `--shadow-raise` and no ring. Its label is `--color-segmented-current-text`: `--color-accent` where it reaches 4.5:1 on the thumb, on the page and on a surface, and otherwise the first of `--color-text`, black, and white that does. An icon-only option needs 3:1. Hover on an unpressed option shows the thumb at 45% and turns the label `--color-text`.
|
|
165
166
|
- **States.** Rest, hover, pressed, focus-visible (an inset ring, so it hugs the thumb instead of crossing into the next option), and disabled.
|
|
166
167
|
- **Do.** Use it for two to five short options that apply at once and change how the same content shows, such as a view mode or the System, Light, and Dark choice.
|
|
@@ -300,7 +301,7 @@ Layer: Core.
|
|
|
300
301
|
|
|
301
302
|
Layer: Core.
|
|
302
303
|
|
|
303
|
-
- **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a
|
|
304
|
+
- **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a 32px close button, `--control-touch` at tablet width), a body that scrolls, and an optional footer on `--color-surface` with its actions at the end. Rules between the parts are `--color-border-subtle`. On phones it becomes a bottom sheet with rounded top corners.
|
|
304
305
|
- **Tokens.** `--color-surface-raised`, a transparent 1px border, `--radius-panel`, `--shadow-dialog`. The close button is a [quiet action](#quiet-action).
|
|
305
306
|
- **States.** Closed and open. When focus lands on the dialog itself, it shows the focus ring.
|
|
306
307
|
- **Do.** Use a dialog for a short task the reader must finish or cancel before the page continues, such as confirming a deletion. Title it with that task.
|
|
@@ -410,13 +411,13 @@ Layer: Core.
|
|
|
410
411
|
|
|
411
412
|
Layer: Core.
|
|
412
413
|
|
|
413
|
-
- **Anatomy.** A `role="tablist"` with no rule below it and a 12px gap below it. It scrolls sideways when needed, and a 24px mask fades each clipped edge. Scrolling clips on every side, so the list has 4px (`--space-1`) padding all round: it keeps the selected tab's shadow whole and its fill off the frame edge. Each tab is a borderless button at least `--control-md` tall
|
|
414
|
+
- **Anatomy.** A `role="tablist"` with no rule below it and a 12px gap below it. It scrolls sideways when needed, and a 24px mask fades each clipped edge. Scrolling clips on every side, so the list has 4px (`--space-1`) padding all round: it keeps the selected tab's shadow whole and its fill off the frame edge. Each tab is a borderless button with the [button](#button)'s box: at least `--control-md` tall with 10px inline padding, no block padding, and line height 1, so its label sits centred; `--radius-inline` corners, medium weight, and `--color-muted`. A list with `data-size="sm"`, for app screens, has tabs at least `--control-sm` tall with `--space-2` padding and `--text-sm` labels. At tablet width tabs of every size are at least `--control-touch` tall. The selected tab's fill is a `::before` layer behind the label, inset 0, with the tab's corners; the list sets `isolation: isolate`, so the layer stays inside it.
|
|
414
415
|
- **States.** Hover fills `--color-row-hover` and turns the text `--color-text`. The selected tab takes the [navigation row](#navigation-list)'s current-page recipe: `--color-nav-current` fill and `--shadow-nav-current`, with no underline. Its text is `--color-nav-current-text`: the first of `--color-accent`, `--color-text`, black, and white that reaches 4.5:1 over the tinted fill, both on the page and on a surface (composite a translucent fill over each first). Focus-visible is the focus ring, inset because the list scrolls.
|
|
415
416
|
- **Do.** Use tabs for panels about one object, such as a monitor's Overview and History, when the URL does not change.
|
|
416
417
|
- **Don't.** Links with `role="tab"`, or one set that mixes pages and panels. Pages take a navigation strip.
|
|
417
418
|
- **Motion.** Hover fades over `--duration-fast` with `--ease-out`. When the reader changes the tab, the fill glides from the old tab to the new one as the [segmented control](#segmented-control)'s thumb does: start the new fill's left and right edges where the old fill was, then animate each edge home with the `glide-left` and `glide-right` keyframes and CSS `ease`, the leading edge over 260ms and the trailing edge over 300ms. Labels cross-fade their colour over 260ms. An interrupted glide starts from the fill's current position. There is no glide on first render or under reduced motion, where the fill moves at once.
|
|
418
419
|
- **Keyboard and screen reader.** Roving `tabindex`: arrow keys move between tabs, Home and End go to the ends, and focus selects the tab. Each tab has `aria-controls` and `aria-selected`; each panel has `role="tabpanel"`. Without JavaScript, show every panel under its own heading. Apply the tab roles and hide the headings and unselected panels only when the script enhances the markup.
|
|
419
|
-
- **Forced colors.** The fill layer is removed (`content: none`), so the selected tab takes a 2px `Highlight` border, and its padding shrinks by 2px to keep its size.
|
|
420
|
+
- **Forced colors.** The fill layer is removed (`content: none`), so the selected tab takes a 2px `Highlight` border, and its inline padding shrinks by 2px to keep its size.
|
|
420
421
|
|
|
421
422
|
## Skip link
|
|
422
423
|
|
|
@@ -497,14 +498,14 @@ Layer: Core.
|
|
|
497
498
|
|
|
498
499
|
Layer: Core.
|
|
499
500
|
|
|
500
|
-
- **Anatomy.** A box that holds one auto-growing `<textarea>` and an inline send button, with a one-line hint below it. The box is a field: `--color-field-bg`, a 1px `--color-field-edge` border, `--radius-panel`, and `--shadow-field`, with `
|
|
501
|
+
- **Anatomy.** A box that holds one auto-growing `<textarea>` and an inline send button, with a one-line hint below it. The box is a field: `--color-field-bg`, a 1px `--color-field-edge` border, `--radius-panel`, and `--shadow-field`, with 5px (`0.3125rem`) padding inside its 1px border, 6px from its outer edge, and `--space-3` at the start. The textarea has no edge, fill, or ring of its own: `field-sizing: content`, at least `--control-sm` tall and at most 10rem before it scrolls, with no resize handle, in `--text-md` with line height 1.45. The send button is an icon-only primary [button](#button) at `sm`: a 28px circle with the SVG send icon. The 6px around it keeps the circle clear of the box's 12px corner; a circle is not a nested rectangle, so the concentric rule does not apply. It stays at the bottom of the box as the text grows. The hint is `--text-xs` `--color-muted`, `--space-1` below the box, and says where the message goes, such as "Saved to the board". An error, in the [field wrapper](#field-wrapper)'s error type, sits between the box and the hint.
|
|
501
502
|
- **States.** Rest (empty or typing), focus (the [field focus](#rules-for-every-control) on the box: `--color-accent` edge and `--shadow-field-focus`, no ring), invalid (refused: `--color-error` edge, `--shadow-field-focus-invalid` while focused, the reason as inline error text, and nothing saved), and disabled (offline: the box takes the disabled field look, the send button its own, and the hint says why). The send button keeps the primary button's own look.
|
|
502
503
|
- **Do.** Name the field for where the message goes, such as "Reply to desktop-claude", and say in the hint what happens after sending.
|
|
503
504
|
- **Don't.** A Send label beside the field, or a second field for a title. The composer is one field and one icon.
|
|
504
505
|
- **Keyboard and screen reader.** The textarea has a visible or visually hidden `<label>`, and `aria-describedby` names the hint. Enter sends, and Shift+Enter starts a new line. The send button has `aria-label="Send"`. A refused message keeps the text in the field, sets `aria-invalid="true"`, and names the error with `aria-errormessage`. Offline, the textarea and the button are `disabled`, and the hint gives the reason.
|
|
505
506
|
- **Motion.** None: as for the input, the focus and invalid edges change at once.
|
|
506
507
|
- **Forced colors.** As for the search field: the box's edge draws as the system field edge, and a focused composer draws a `Highlight` outline 1px inside its edge, because the inset line drops. The invalid edge relies on its error text.
|
|
507
|
-
- **Touch.** At tablet width (`max-width: 800px`) the textarea is at least `--control-touch` tall and the send button grows to `--control-touch`
|
|
508
|
+
- **Touch.** At tablet width (`max-width: 800px`) the textarea is at least `--control-touch` tall and the send button grows to a `--control-touch` circle, as every icon-only button does.
|
|
508
509
|
|
|
509
510
|
## Tool-call disclosure
|
|
510
511
|
|
|
@@ -538,9 +539,9 @@ Layer: Core.
|
|
|
538
539
|
- **Frame.** `--color-surface-raised`, a 1px `--color-border-subtle` border, `--radius-panel`, and `--shadow-surface`. Its padding is `0 var(--space-1) var(--space-1)` under a header, and `var(--space-1)` on every side without one.
|
|
539
540
|
- **Header.** At least 40px and `--text-xs`, on the frame with no fill and no rule below. It holds the title in semibold, the language in muted text, and a Copy button.
|
|
540
541
|
- **Source panel.** The `<pre>`: `--color-code`, a transparent 1px border, and `calc(var(--radius-panel) - var(--space-1))` corners (8px), so its curve is concentric with the frame's. It has `--space-4` padding, scrolls in both directions, is at most 32rem tall, and sets `--font-mono` at `--text-code` with a line height of 1.65. Line numbers are muted and right-aligned. Syntax uses the `--color-syntax-*` tokens.
|
|
541
|
-
- **Compact.** The panel and the Copy button share one row, with no header, and a `--space-1` column gap. The panel fills the row's height, so it sits `--space-1` from the frame and from Copy on every side, and centres its line.
|
|
542
|
+
- **Compact.** The panel and the Copy button share one row, with no header, and a `--space-1` column gap. The panel fills the row's height, so it sits `--space-1` from the frame and from Copy on every side, and centres its line. Copy centres on the row.
|
|
542
543
|
- **Phone text.** Set `text-size-adjust: 100%` (and `-webkit-text-size-adjust`) on the block, and align each line's items to the baseline, so iOS Safari does not enlarge one line.
|
|
543
|
-
- **Copy.** Copies the code text only: no line numbers or prompts, and one line per row joined with newlines. A [quiet action](#quiet-action) at least 44×44 with an accessible name. It is `--color-muted` at rest (7.09:1 on the frame in light, 6.63:1 in dark), and `--color-code-text` on hover and while the tick shows, which the script marks with `data-copied`. Announce the result in a polite live region; in the compact variant the success message is visually hidden.
|
|
544
|
+
- **Copy.** Copies the code text only: no line numbers or prompts, and one line per row joined with newlines. A [quiet action](#quiet-action) at least 32×32 (`--control-md`), and 44×44 at tablet width, with an accessible name. It is `--color-muted` at rest (7.09:1 on the frame in light, 6.63:1 in dark), and `--color-code-text` on hover and while the tick shows, which the script marks with `data-copied`. Announce the result in a polite live region; in the compact variant the success message is visually hidden.
|
|
544
545
|
- **Copy feedback.** This applies to every copy action: the code block's Copy, a token's Copy, and Copy link. On success, the icon turns into a plain tick (`#i-tick`) for 1.5s and then turns back. A second click within the 1.5s restarts the wait. The visible label, such as Copy, and the accessible name do not change, and no "Copied" text appears. The polite live region announces "Copied." or the failure. On failure, the icon does not change and the failure shows as before: a token's Copy shows "Copy failed" in place of its icon. Under reduced motion nothing changes, because the swap has no animation.
|
|
545
546
|
- **States.** Rest, and focus-visible on Copy and on the `<pre>` when it scrolls. Copy takes the quiet action states, shows the tick after a copy, and announces "Copied." or a failure.
|
|
546
547
|
- **Do.** Use a code block for source with no live result. When the reader should see the result too, use the variant with a live example.
|
|
@@ -594,7 +595,7 @@ Layer: Identity.
|
|
|
594
595
|
|
|
595
596
|
Layer: Identity.
|
|
596
597
|
|
|
597
|
-
- **Anatomy.** A static header at least 64px tall on `--color-bg` with a solid 1px `--color-text` rule below it. At the start is the project switcher: a `<details>` whose summary, a [quiet action](#quiet-action), shows the mono, semibold project name after a `~/` mark in `--color-project` (drawn by CSS, so it is not read), then a chevron. It keeps the quiet-action tint, but it opens a menu and does not act, so it takes the 8px field corner (`--radius-field`), as a select does. Its menu is a floating layer, with the dialog's tokens, listing the shared project registry in the order it defines, as navigation rows with concentric 8px corners (`calc(var(--radius-panel) - var(--space-1))`), with the current project marked `aria-current="page"`. At the end are the site links and the appearance picker: an icon-only segmented control at `lg`. The site links are a [navigation strip](#navigation-list) of rows
|
|
598
|
+
- **Anatomy.** A static header at least 64px tall on `--color-bg` with a solid 1px `--color-text` rule below it. At the start is the project switcher: a `<details>` whose summary, a [quiet action](#quiet-action), shows the mono, semibold project name after a `~/` mark in `--color-project` (drawn by CSS, so it is not read), then a chevron. It keeps the quiet-action tint, but it opens a menu and does not act, so it takes the 8px field corner (`--radius-field`), as a select does. Its menu is a floating layer, with the dialog's tokens, listing the shared project registry in the order it defines, as navigation rows with concentric 8px corners (`calc(var(--radius-panel) - var(--space-1))`), with the current project marked `aria-current="page"`. At the end are the site links and the appearance picker: an icon-only segmented control at `lg`. The site links are a [navigation strip](#navigation-list) of rows `--control-md` tall (32px), and `--control-touch` at tablet width. A link to a page inside the site takes `aria-current="page"` on that page, with the current-page recipe.
|
|
598
599
|
- **Position.** Every family site, this design system's site included, starts its header with the project switcher. It is the same on every page: never a breadcrumb or a page title, which go above the page's h1 as [breadcrumbs](#breadcrumbs), and the first breadcrumb is the way back to the site's home page. The links sit at the same x on every page, and the current link is as wide as it is on other pages (see the [horizontal strip](#navigation-list)). A header that puts its links right after the switcher, as this design system's site does, is a grid at `min-width: 801px` (`auto minmax(0, 1fr) auto`), so where the links start never depends on the page.
|
|
599
600
|
- **States.** The project menu is closed or open; while open, its summary keeps the quiet action's hover tint. Site links take the navigation row states.
|
|
600
601
|
- **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
|