@atelic-action/ui 0.5.0 → 0.6.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/README.md +8 -0
- package/package.json +1 -1
- package/src/chrome/BrandLockup.tsx +16 -3
- package/src/styles/chrome.css +15 -0
- package/src/types.ts +14 -0
package/README.md
CHANGED
|
@@ -71,6 +71,14 @@ import { Footer, SiteHeader, SkipLink, StickyCTABar } from "@atelic-action/ui/ch
|
|
|
71
71
|
</div>;
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
A sent artifact's header names who the document is for as well as who it is
|
|
75
|
+
from: pass `recipient: { src, alt }` on the `brand` (added 0.6.0) and the
|
|
76
|
+
lockup reads "atelic × <their mark>", the sender's wordmark and run first, a
|
|
77
|
+
quiet times sign, then the recipient's mark at wordmark height. Cut the mark
|
|
78
|
+
for the surface the header wears (a light mark for the dark bar) and keep it
|
|
79
|
+
an image; the chrome draws no second wordmark. A marketing site's lockup
|
|
80
|
+
passes no recipient.
|
|
81
|
+
|
|
74
82
|
The menu is a native `<dialog>` opened with `showModal()`, so Escape, focus containment, and focus return come from the browser.
|
|
75
83
|
|
|
76
84
|
## The Not Found Page
|
package/package.json
CHANGED
|
@@ -9,12 +9,17 @@ export interface BrandLockupProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* The header's identity as one link: the mark (a glyph tile or an image),
|
|
11
11
|
* the wordmark, and the trailing run. The image carries empty alt text
|
|
12
|
-
* because the link's own label already names it.
|
|
12
|
+
* because the link's own label already names it. On a sent artifact the
|
|
13
|
+
* recipient's mark follows, after a times sign: "atelic × Wynkoop Athletics",
|
|
14
|
+
* the sender's identity and the business the document is for in one lockup.
|
|
15
|
+
* The anchor's aria-label folds in the recipient's alt too, since it
|
|
16
|
+
* overrides accessible-name computation for every child, image alt included.
|
|
13
17
|
*/
|
|
14
18
|
export function BrandLockup({ brand, ariaLabel }: BrandLockupProps) {
|
|
15
|
-
const { name, href = "/", logo } = brand;
|
|
19
|
+
const { name, href = "/", logo, recipient } = brand;
|
|
20
|
+
const label = ariaLabel ?? (recipient ? `${name} × ${recipient.alt} home` : `${name} home`);
|
|
16
21
|
return (
|
|
17
|
-
<a className="nav-logo" href={href} aria-label={
|
|
22
|
+
<a className="nav-logo" href={href} aria-label={label}>
|
|
18
23
|
{logo?.tile ? (
|
|
19
24
|
<span className="logo-tile" aria-hidden="true">
|
|
20
25
|
{logo.tile}
|
|
@@ -24,6 +29,14 @@ export function BrandLockup({ brand, ariaLabel }: BrandLockupProps) {
|
|
|
24
29
|
)}
|
|
25
30
|
<span className="wordmark">{logo?.wordmark ?? name}</span>
|
|
26
31
|
{logo?.run && <span className="wordmark-run" aria-hidden="true" />}
|
|
32
|
+
{recipient && (
|
|
33
|
+
<>
|
|
34
|
+
<span className="nav-x" aria-hidden="true">
|
|
35
|
+
×
|
|
36
|
+
</span>
|
|
37
|
+
<img className="nav-recipient" src={recipient.src} alt={recipient.alt} />
|
|
38
|
+
</>
|
|
39
|
+
)}
|
|
27
40
|
</a>
|
|
28
41
|
);
|
|
29
42
|
}
|
package/src/styles/chrome.css
CHANGED
|
@@ -101,6 +101,21 @@
|
|
|
101
101
|
height: 30px;
|
|
102
102
|
width: 30px;
|
|
103
103
|
}
|
|
104
|
+
/* The recipient half of a sent artifact's lockup (BrandLockup: recipient):
|
|
105
|
+
a quiet times sign in the mono face, then the business's mark at
|
|
106
|
+
wordmark height. */
|
|
107
|
+
.mkt .nav-logo .nav-x {
|
|
108
|
+
font-family: var(--font-mono);
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
font-size: 0.9rem;
|
|
111
|
+
color: color-mix(in srgb, currentColor 55%, transparent);
|
|
112
|
+
margin: 0 2px;
|
|
113
|
+
}
|
|
114
|
+
.mkt .nav-logo .nav-recipient {
|
|
115
|
+
height: 22px;
|
|
116
|
+
width: auto;
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
104
119
|
.mkt .nav-links {
|
|
105
120
|
display: none;
|
|
106
121
|
align-items: center;
|
package/src/types.ts
CHANGED
|
@@ -20,12 +20,26 @@ export interface BrandLogo {
|
|
|
20
20
|
run?: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The recipient half of a sent artifact's lockup: the business a document
|
|
25
|
+
* was prepared for, whose mark follows the sender's wordmark after a times
|
|
26
|
+
* sign. An image cut for the surface the header wears (a light mark on the
|
|
27
|
+
* dark bar), never a wordmark string, since the sender's type is the one
|
|
28
|
+
* face the chrome draws in.
|
|
29
|
+
*/
|
|
30
|
+
export interface BrandRecipient {
|
|
31
|
+
src: string;
|
|
32
|
+
alt: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
/** The identity a header or footer wears. */
|
|
24
36
|
export interface Brand {
|
|
25
37
|
name: string;
|
|
26
38
|
/** Where the lockup points. Defaults to "/". */
|
|
27
39
|
href?: string;
|
|
28
40
|
logo?: BrandLogo;
|
|
41
|
+
/** Set on a sent artifact's header only; a marketing site's lockup has no recipient. */
|
|
42
|
+
recipient?: BrandRecipient;
|
|
29
43
|
}
|
|
30
44
|
|
|
31
45
|
/** An entry in a site's primary nav. */
|