@filipgutica/design-system 1.0.10 → 1.0.11
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/language/components.html +14 -0
- package/language/components.md +2 -2
- package/package.json +1 -1
package/language/components.html
CHANGED
|
@@ -733,6 +733,19 @@
|
|
|
733
733
|
.rail-specimen { display: grid; gap: var(--space-3); width: 240px; }
|
|
734
734
|
.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); }
|
|
735
735
|
.phone-head > .strip { flex-basis: 100%; margin-inline: -2px; }
|
|
736
|
+
/* At 640px and narrower, one or two links stay on the switcher's row as plain text links, 12px apart:
|
|
737
|
+
no row padding or hover fill, and the current page in the accent with no fill. The picker ends the row;
|
|
738
|
+
where all of it does not fit, as at 320px, only the picker wraps. */
|
|
739
|
+
.phone-head > .projects:has(~ .text-links) { margin-inline-end: auto; }
|
|
740
|
+
.navlist.text-links { display: flex; gap: var(--space-3); width: auto; }
|
|
741
|
+
.navlist.text-links a { min-height: var(--control-lg); padding-inline: 0; }
|
|
742
|
+
@media (hover: hover) { .navlist.text-links a:hover { background: none; } }
|
|
743
|
+
.navlist.text-links a[aria-current="page"] { background: none; box-shadow: none; color: var(--color-accent); }
|
|
744
|
+
.navlist.text-links a:is(:focus-visible, .is-focus) { outline-offset: var(--focus-offset); }
|
|
745
|
+
/* Forced colors: an underline marks the current page, as the system border would touch the text. */
|
|
746
|
+
@media (forced-colors: active) {
|
|
747
|
+
.navlist.text-links a[aria-current="page"] { border-inline-start: 0; padding-inline-start: 0; text-decoration: underline; }
|
|
748
|
+
}
|
|
736
749
|
|
|
737
750
|
/* By purpose: each group with its components, in two balanced columns. */
|
|
738
751
|
.index { display: grid; gap: var(--space-4); }
|
|
@@ -1320,6 +1333,7 @@
|
|
|
1320
1333
|
</div></div>
|
|
1321
1334
|
<div class="row"><h4>Phone header</h4><div class="states">
|
|
1322
1335
|
<div class="state wide" inert><div class="phone-head"><details class="projects"><summary class="quiet-action" aria-label="Project: Design system, phone sample"><span>Design system</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary></details><div class="segmented" role="group" aria-label="Appearance, phone sample" 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><nav class="navlist strip" aria-label="Pages, phone sample"><a href="#section-rail" data-label="Overview">Overview</a><a href="#section-rail" data-label="Foundations">Foundations</a><a href="#section-rail" aria-current="page" data-label="Components">Components</a><a href="#section-rail" data-label="Themes">Themes</a></nav></div><button class="btn secondary menu-glyph" type="button" data-size="lg">Components: By purpose</button><span class="caption">Rest at tablet width: the switcher and appearance, then the pages, then the labelled trigger below the header</span></div>
|
|
1336
|
+
<div class="state wide" inert><div class="phone-head"><details class="projects"><summary class="quiet-action" aria-label="Project: ui, phone sample with two links"><span>ui</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary></details><nav class="navlist text-links" aria-label="Site links, phone sample"><a href="#section-rail" aria-current="page">Docs</a><a href="#section-rail">GitHub</a></nav><div class="segmented" role="group" aria-label="Appearance, phone sample with two links" 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></div><span class="caption">Phone, two links: text links after the switcher, Docs current; where the row is full, only the picker wraps. A documentation page hides them, and its footer carries them</span></div>
|
|
1323
1337
|
</div></div>
|
|
1324
1338
|
</section>
|
|
1325
1339
|
|
package/language/components.md
CHANGED
|
@@ -474,10 +474,10 @@ Layer: Identity. ui: `UiSiteHeader`, `UiSiteAppearancePicker`.
|
|
|
474
474
|
- **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.
|
|
475
475
|
- **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
|
|
476
476
|
- **Don't.** The site header on an application screen. An application keeps its own navigation.
|
|
477
|
-
- **Phone.** At `max-width: 800px` the header is static, with `--space-2` above, below, and between its rows. The first row holds the switcher at the start and the picker at the end. Where both do not fit, as at 320px, the picker wraps to its own row at the start; the project name never truncates. With three or more links, the links take the next row, as a strip that scrolls with its fades. Where the strip clips a link, at least 16px of that link stays in view under the fade: on the narrowest phones (a strip 340px wide or less, by container query) the strip's rows take 6px (`0.375rem`) side padding. A page with a [section rail](#section-rail) puts the rail's labelled trigger `--space-2` below the header.
|
|
477
|
+
- **Phone.** At `max-width: 800px` the header is static, with `--space-2` above, below, and between its rows. The first row holds the switcher at the start and the picker at the end. Where both do not fit, as at 320px, the picker wraps to its own row at the start; the project name never truncates. With three or more links, the links take the next row, as a strip that scrolls with its fades. Where the strip clips a link, at least 16px of that link stays in view under the fade: on the narrowest phones (a strip 340px wide or less, by container query) the strip's rows take 6px (`0.375rem`) side padding. One or two links stay on the first row, beside the picker; at `max-width: 640px` they become plain text links after the switcher, 12px (`--space-3`) apart, and the current link takes `--color-accent` text in medium weight, with no fill. A documentation page hides them at that width, because its [footer](#page-type-and-helpers) carries them. A page with a [section rail](#section-rail) puts the rail's labelled trigger `--space-2` below the header.
|
|
478
478
|
- **Keyboard and screen reader.** The summary is named "Project: <name>". Escape closes the menu and returns focus to the summary; moving focus out of it closes it.
|
|
479
479
|
- **Motion.** The chevron turns 180° while the menu is open, over `--duration-fast` with `--ease-out`. The menu itself opens at once.
|
|
480
|
-
- **Forced colors.** The rule below the header takes the system text colour, and the menu and the site links follow the navigation list rules.
|
|
480
|
+
- **Forced colors.** The rule below the header takes the system text colour, and the menu and the site links follow the navigation list rules. A current text link on a phone takes an underline instead of the system border.
|
|
481
481
|
|
|
482
482
|
## Page type and helpers
|
|
483
483
|
|