@coopdigital/react 0.5.0 → 0.5.2
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 +9 -4
- package/dist/components/Pill/Pill.d.ts +9 -9
- package/dist/components/SkipNav/SkipNav.d.ts +36 -0
- package/dist/components/SkipNav/index.d.ts +4 -0
- package/package.json +14 -14
- package/src/components/Pill/Pill.tsx +9 -9
- package/src/components/SkipNav/SkipNav.tsx +66 -0
- package/src/components/SkipNav/index.ts +5 -0
- package/src/styles/Text.mdx +52 -5
- package/src/styles/Typography.mdx +8 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# Experience Kit for React
|
|
8
8
|
|
|
9
9
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
10
|
-
[all_contributors_badge]: https://img.shields.io/badge/all_contributors-
|
|
10
|
+
[all_contributors_badge]: https://img.shields.io/badge/all_contributors-16-C08A00.svg ''
|
|
11
11
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
12
12
|
|
|
13
13
|
<a href="https://www.npmjs.com/package/@coopdigital/react"><img src="https://img.shields.io/npm/v/%40coopdigital%2Freact?color=E85A00" alt="npm version" /></a>
|
|
@@ -90,7 +90,7 @@ Thanks goes to these wonderful people:
|
|
|
90
90
|
</tr><br />
|
|
91
91
|
<tr>
|
|
92
92
|
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/kamini.pagare">
|
|
93
|
-
<div><img src="https://
|
|
93
|
+
<div><img src="https://gitlab.com/uploads/-/system/user/avatar/23337489/avatar.png" width="200px;" alt=""/></div>
|
|
94
94
|
<small>Kamini Pagare</small>
|
|
95
95
|
<div><a href="#a11y-kamini.pagare" title="Accessibility">️️️️♿️</a> <a href="#code-kamini.pagare" title="Code">💻</a> <a href="#doc-kamini.pagare" title="Documentation">📖</a> <a href="#test-kamini.pagare" title="Tests">⚠️</a></div>
|
|
96
96
|
</a></td>
|
|
@@ -113,19 +113,24 @@ Thanks goes to these wonderful people:
|
|
|
113
113
|
<div><img src="https://secure.gravatar.com/avatar/faf90b70d749cf9460eb603fa1700add94fd7d3a32645b4be6fa12eb45c4ffa3?s=80&d=identicon" width="200px;" alt=""/></div>
|
|
114
114
|
<small>Omid Kashan</small>
|
|
115
115
|
<div><a href="#a11y-omid.kashan" title="Accessibility">️️️️♿️</a> <a href="#code-omid.kashan" title="Code">💻</a> <a href="#doc-omid.kashan" title="Documentation">📖</a> <a href="#test-omid.kashan" title="Tests">⚠️</a></div>
|
|
116
|
+
</a></td>
|
|
117
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/romain.chen">
|
|
118
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
119
|
+
<small>Romain Chen</small>
|
|
120
|
+
<div><a href="#design-romain.chen" title="Design">🎨</a></div>
|
|
116
121
|
</a></td>
|
|
117
122
|
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/sam.harden">
|
|
118
123
|
<div><img src="https://ca.slack-edge.com/T0C9E3ZF0-U03NT7D39L6-2fc82e7f7c6e-150" width="200px;" alt=""/></div>
|
|
119
124
|
<small>Sam Harden</small>
|
|
120
125
|
<div><a href="#a11y-sam.harden" title="Accessibility">️️️️♿️</a> <a href="#code-sam.harden" title="Code">💻</a> <a href="#doc-sam.harden" title="Documentation">📖</a> <a href="#test-sam.harden" title="Tests">⚠️</a></div>
|
|
121
126
|
</a></td>
|
|
127
|
+
</tr><br />
|
|
128
|
+
<tr>
|
|
122
129
|
<td align="center" valign="top" width="14.28%"><a href="">
|
|
123
130
|
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
124
131
|
<small>Shweta Jaju</small>
|
|
125
132
|
<div><a href="#userTesting-shweta.jaju" title="User Testing">📓</a></div>
|
|
126
133
|
</a></td>
|
|
127
|
-
</tr><br />
|
|
128
|
-
<tr>
|
|
129
134
|
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/theodore.kouzelis">
|
|
130
135
|
<div><img src="https://secure.gravatar.com/avatar/3988f940029d9053174ac68e7f5bfa8fd61f184872d46281f44e2e698711d37d?s=80&d=identicon" width="200px;" alt=""/></div>
|
|
131
136
|
<small>Theo Kouzelis</small>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React, { AnchorHTMLAttributes, ForwardRefExoticComponent } from "react";
|
|
2
2
|
export interface PillProps {
|
|
3
|
-
/** Specifies the custom element to override default `a` or `span
|
|
3
|
+
/** **(Optional)** Specifies the custom element to override default `a` or `span`. */
|
|
4
4
|
as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string;
|
|
5
|
-
/** Specifies a custom aria-label */
|
|
5
|
+
/** **(Optional)** Specifies a custom aria-label. */
|
|
6
6
|
ariaLabel?: string;
|
|
7
|
-
/** Specifies what text Pill should display on the badge. */
|
|
7
|
+
/** **(Optional)** Specifies what text Pill should display on the badge. */
|
|
8
8
|
badge?: string;
|
|
9
|
-
/** Specifies the badge background color from the available options. */
|
|
9
|
+
/** **(Optional)** Specifies the badge background color from the available options. */
|
|
10
10
|
badgeColor?: "green" | "orange" | "red" | "pink";
|
|
11
|
-
/** Represents the content inside the Pill component. It can be any valid JSX or string. */
|
|
11
|
+
/** **(Optional)** Represents the content inside the Pill component. It can be any valid JSX or string. */
|
|
12
12
|
children?: React.ReactNode;
|
|
13
|
-
/** Receives any
|
|
13
|
+
/** **(Optional)** Receives any className to be applied to Pill component. */
|
|
14
14
|
className?: string;
|
|
15
|
-
/** Specifies the URL that the Pill component will link to when clicked. */
|
|
15
|
+
/** **(Optional)** Specifies the URL that the Pill component will link to when clicked. */
|
|
16
16
|
href?: string;
|
|
17
|
-
/** Specifies the Pill background color from the available options. */
|
|
17
|
+
/** **(Optional)** Specifies the Pill background color from the available options. */
|
|
18
18
|
pillColor?: "blue" | "pink";
|
|
19
|
-
/** Specifies what should be the Pill size. */
|
|
19
|
+
/** **(Optional)** Specifies what should be the Pill size. */
|
|
20
20
|
size?: "sm" | "md" | "lg" | "xl";
|
|
21
21
|
}
|
|
22
22
|
export declare const Pill: ({ ariaLabel, as, badge, badgeColor, children, className, href, pillColor, size, }: PillProps) => React.ReactElement<React.AnchorHTMLAttributes<HTMLElement>, string | React.JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
interface SkipNavLink {
|
|
2
|
+
href: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SkipNavProps {
|
|
6
|
+
/** **(Optional)** Specifies a custom aria-label. */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** **(Optional)** Receives any className to be applied to Skip Nav component. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** **(Optional)** Specifies if the component is visible straight away or only when pressing 'Tab'. */
|
|
11
|
+
isVisible?: boolean;
|
|
12
|
+
/** **(Optional)** Specifies the links that are going to be shown on the Skip Nav.
|
|
13
|
+
* It is an `array` of items and each item should have `href` and `title` information.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to a single link anchored to `#main` */
|
|
16
|
+
links?: SkipNavLink[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The Skip Nav component allows screen reader and keyboard users to go directly to the main content.
|
|
20
|
+
*
|
|
21
|
+
* ### Links
|
|
22
|
+
* Links within the skip navigation component should take the user directly to the main areas of the page. These are usually the:
|
|
23
|
+
* - navigation
|
|
24
|
+
* - main content
|
|
25
|
+
* - footer
|
|
26
|
+
* - search (if applicable)
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* ### Using skip navigation on a page
|
|
30
|
+
* - The skip navigation function should be the first thing that appears on a page when it has loaded and a user presses the tab key.
|
|
31
|
+
* - Pressing the tab key again should then cycle through 'skip to main content', 'skip to navigation' and 'skip to footer' links.
|
|
32
|
+
* - Pressing enter will take the user to the correct part of the page and apply the focus ring to the first interactive element in that section.
|
|
33
|
+
* - If the user tabs through the skip navigation without selecting an option the Co‑op logo should be the next element that has the focus ring applied.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SkipNav: ({ ariaLabel, className, isVisible, links, }: SkipNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export default SkipNav;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coopdigital/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"private": false,
|
|
7
7
|
"publishConfig": {
|
|
@@ -38,31 +38,31 @@
|
|
|
38
38
|
"description": "",
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@axe-core/playwright": "^4.10.1",
|
|
41
|
-
"@coopdigital/styles": "^0.5.
|
|
41
|
+
"@coopdigital/styles": "^0.5.5",
|
|
42
42
|
"@playwright/test": "^1.50.1",
|
|
43
43
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
44
44
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
45
45
|
"@storybook/addon-a11y": "^8.6.4",
|
|
46
|
-
"@storybook/addon-essentials": "^8.6.
|
|
47
|
-
"@storybook/addon-interactions": "^8.6.
|
|
48
|
-
"@storybook/addon-mdx-gfm": "^8.6.
|
|
49
|
-
"@storybook/addon-onboarding": "^8.6.
|
|
50
|
-
"@storybook/blocks": "^8.6.
|
|
51
|
-
"@storybook/manager-api": "^8.6.
|
|
52
|
-
"@storybook/react": "^8.6.
|
|
53
|
-
"@storybook/react-vite": "^8.6.
|
|
54
|
-
"@storybook/test": "^8.6.
|
|
55
|
-
"@storybook/theming": "^8.6.
|
|
46
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
47
|
+
"@storybook/addon-interactions": "^8.6.4",
|
|
48
|
+
"@storybook/addon-mdx-gfm": "^8.6.4",
|
|
49
|
+
"@storybook/addon-onboarding": "^8.6.4",
|
|
50
|
+
"@storybook/blocks": "^8.6.4",
|
|
51
|
+
"@storybook/manager-api": "^8.6.4",
|
|
52
|
+
"@storybook/react": "^8.6.4",
|
|
53
|
+
"@storybook/react-vite": "^8.6.4",
|
|
54
|
+
"@storybook/test": "^8.6.4",
|
|
55
|
+
"@storybook/theming": "^8.6.4",
|
|
56
56
|
"@testing-library/jest-dom": "^6.6.3",
|
|
57
57
|
"@testing-library/react": "^16.2.0",
|
|
58
58
|
"@types/react": "^19.0.10",
|
|
59
59
|
"@types/react-dom": "^19.0.4",
|
|
60
60
|
"rollup": "^4.34.8",
|
|
61
|
-
"storybook": "^8.6.
|
|
61
|
+
"storybook": "^8.6.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"react": "^19.0.0",
|
|
65
65
|
"react-dom": "^19.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "f292a4bba122b73db52ff17fa53eb90e7420c651"
|
|
68
68
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import React, { AnchorHTMLAttributes, ForwardRefExoticComponent } from "react"
|
|
2
2
|
|
|
3
3
|
export interface PillProps {
|
|
4
|
-
/** Specifies the custom element to override default `a` or `span
|
|
4
|
+
/** **(Optional)** Specifies the custom element to override default `a` or `span`. */
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
6
|
as?: React.FC<AnchorHTMLAttributes<HTMLElement>> | ForwardRefExoticComponent<any> | string
|
|
7
|
-
/** Specifies a custom aria-label */
|
|
7
|
+
/** **(Optional)** Specifies a custom aria-label. */
|
|
8
8
|
ariaLabel?: string
|
|
9
|
-
/** Specifies what text Pill should display on the badge. */
|
|
9
|
+
/** **(Optional)** Specifies what text Pill should display on the badge. */
|
|
10
10
|
badge?: string
|
|
11
|
-
/** Specifies the badge background color from the available options. */
|
|
11
|
+
/** **(Optional)** Specifies the badge background color from the available options. */
|
|
12
12
|
badgeColor?: "green" | "orange" | "red" | "pink"
|
|
13
|
-
/** Represents the content inside the Pill component. It can be any valid JSX or string. */
|
|
13
|
+
/** **(Optional)** Represents the content inside the Pill component. It can be any valid JSX or string. */
|
|
14
14
|
children?: React.ReactNode
|
|
15
|
-
/** Receives any
|
|
15
|
+
/** **(Optional)** Receives any className to be applied to Pill component. */
|
|
16
16
|
className?: string
|
|
17
|
-
/** Specifies the URL that the Pill component will link to when clicked. */
|
|
17
|
+
/** **(Optional)** Specifies the URL that the Pill component will link to when clicked. */
|
|
18
18
|
href?: string
|
|
19
|
-
/** Specifies the Pill background color from the available options. */
|
|
19
|
+
/** **(Optional)** Specifies the Pill background color from the available options. */
|
|
20
20
|
pillColor?: "blue" | "pink"
|
|
21
|
-
/** Specifies what should be the Pill size. */
|
|
21
|
+
/** **(Optional)** Specifies what should be the Pill size. */
|
|
22
22
|
size?: "sm" | "md" | "lg" | "xl"
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
interface SkipNavLink {
|
|
2
|
+
href: string
|
|
3
|
+
title: string
|
|
4
|
+
}
|
|
5
|
+
export interface SkipNavProps {
|
|
6
|
+
/** **(Optional)** Specifies a custom aria-label. */
|
|
7
|
+
ariaLabel?: string
|
|
8
|
+
/** **(Optional)** Receives any className to be applied to Skip Nav component. */
|
|
9
|
+
className?: string
|
|
10
|
+
/** **(Optional)** Specifies if the component is visible straight away or only when pressing 'Tab'. */
|
|
11
|
+
isVisible?: boolean
|
|
12
|
+
/** **(Optional)** Specifies the links that are going to be shown on the Skip Nav.
|
|
13
|
+
* It is an `array` of items and each item should have `href` and `title` information.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to a single link anchored to `#main` */
|
|
16
|
+
links?: SkipNavLink[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const defaultLinks = [{ href: "#main", title: "Skip to main content" }]
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The Skip Nav component allows screen reader and keyboard users to go directly to the main content.
|
|
23
|
+
*
|
|
24
|
+
* ### Links
|
|
25
|
+
* Links within the skip navigation component should take the user directly to the main areas of the page. These are usually the:
|
|
26
|
+
* - navigation
|
|
27
|
+
* - main content
|
|
28
|
+
* - footer
|
|
29
|
+
* - search (if applicable)
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* ### Using skip navigation on a page
|
|
33
|
+
* - The skip navigation function should be the first thing that appears on a page when it has loaded and a user presses the tab key.
|
|
34
|
+
* - Pressing the tab key again should then cycle through 'skip to main content', 'skip to navigation' and 'skip to footer' links.
|
|
35
|
+
* - Pressing enter will take the user to the correct part of the page and apply the focus ring to the first interactive element in that section.
|
|
36
|
+
* - If the user tabs through the skip navigation without selecting an option the Co‑op logo should be the next element that has the focus ring applied.
|
|
37
|
+
*/
|
|
38
|
+
export const SkipNav = ({
|
|
39
|
+
ariaLabel = "",
|
|
40
|
+
className = "",
|
|
41
|
+
isVisible = false,
|
|
42
|
+
links = defaultLinks,
|
|
43
|
+
}: SkipNavProps) => {
|
|
44
|
+
const navLinks = links.length > 0 ? links : defaultLinks
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<nav className="coop-skip-nav" aria-label={ariaLabel}>
|
|
48
|
+
<ul className="coop-skip-nav__list">
|
|
49
|
+
{navLinks.map((link) => (
|
|
50
|
+
<li key={link.href}>
|
|
51
|
+
<a
|
|
52
|
+
href={link.href}
|
|
53
|
+
title={link.title}
|
|
54
|
+
className={`coop-skip-nav__link ${className}`}
|
|
55
|
+
data-visible={isVisible}
|
|
56
|
+
>
|
|
57
|
+
{link.title}
|
|
58
|
+
</a>
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ul>
|
|
62
|
+
</nav>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default SkipNav
|
package/src/styles/Text.mdx
CHANGED
|
@@ -21,6 +21,15 @@ export const SampleText = "Lorem ipsum dolor..."
|
|
|
21
21
|
> <h5 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h5: {SampleText}</h5>
|
|
22
22
|
> <h6 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h6: {SampleText}</h6>
|
|
23
23
|
|
|
24
|
+
> ```jsx
|
|
25
|
+
> <h1 className="coop-t-headline coop-t-headline-upper">h1: {SampleText}</h1>
|
|
26
|
+
> <h2 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h2: {SampleText}</h2>
|
|
27
|
+
> <h3 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h3: {SampleText}</h3>
|
|
28
|
+
> <h4 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h4: {SampleText}</h4>
|
|
29
|
+
> <h5 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h5: {SampleText}</h5>
|
|
30
|
+
> <h6 className="coop-t-headline coop-t-headline-upper coop-t-headline-blue">h6: {SampleText}</h6>
|
|
31
|
+
> ```
|
|
32
|
+
|
|
24
33
|
<br />
|
|
25
34
|
|
|
26
35
|
> <h1 className="coop-t-headline coop-t-headline-blue">h1: {SampleText}</h1>
|
|
@@ -30,6 +39,15 @@ export const SampleText = "Lorem ipsum dolor..."
|
|
|
30
39
|
> <h5 className="coop-t-headline coop-t-headline-blue">h5: {SampleText}</h5>
|
|
31
40
|
> <h6 className="coop-t-headline coop-t-headline-blue">h6: {SampleText}</h6>
|
|
32
41
|
|
|
42
|
+
> ```jsx
|
|
43
|
+
> <h1 className="coop-t-headline coop-t-headline-blue">h1: {SampleText}</h1>
|
|
44
|
+
> <h2 className="coop-t-headline coop-t-headline-blue">h2: {SampleText}</h2>
|
|
45
|
+
> <h3 className="coop-t-headline coop-t-headline-blue">h3: {SampleText}</h3>
|
|
46
|
+
> <h4 className="coop-t-headline coop-t-headline-blue">h4: {SampleText}</h4>
|
|
47
|
+
> <h5 className="coop-t-headline coop-t-headline-blue">h5: {SampleText}</h5>
|
|
48
|
+
> <h6 className="coop-t-headline coop-t-headline-blue">h6: {SampleText}</h6>
|
|
49
|
+
> ```
|
|
50
|
+
|
|
33
51
|
<br />
|
|
34
52
|
<br />
|
|
35
53
|
<br />
|
|
@@ -42,15 +60,39 @@ export const SampleText = "Lorem ipsum dolor..."
|
|
|
42
60
|
> <h4>h4: {SampleText}</h4>
|
|
43
61
|
> <h5>h5: {SampleText}</h5>
|
|
44
62
|
> <h6>h6: {SampleText}</h6>
|
|
45
|
-
|
|
63
|
+
|
|
64
|
+
> ```jsx
|
|
65
|
+
> <h1>h1: {SampleText}</h1>
|
|
66
|
+
> <h2>h2: {SampleText}</h2>
|
|
67
|
+
> <h3>h3: {SampleText}</h3>
|
|
68
|
+
> <h4>h4: {SampleText}</h4>
|
|
69
|
+
> <h5>h5: {SampleText}</h5>
|
|
70
|
+
> <h6>h6: {SampleText}</h6>
|
|
71
|
+
> ```
|
|
72
|
+
|
|
73
|
+
> <p class="coop-t-lead-p">Lead paragraph</p>
|
|
46
74
|
> <hr />
|
|
47
|
-
>
|
|
75
|
+
> <p>Paragraph text: {SampleText}</p>
|
|
76
|
+
> <a href="">Link</a>
|
|
77
|
+
|
|
78
|
+
> ```jsx
|
|
48
79
|
> <p class="coop-t-lead-p">Lead paragraph</p>
|
|
49
|
-
>
|
|
80
|
+
> <hr />
|
|
50
81
|
> <p>Paragraph text: {SampleText}</p>
|
|
51
82
|
> <a href="">Link</a>
|
|
52
|
-
>
|
|
53
|
-
|
|
83
|
+
> ```
|
|
84
|
+
|
|
85
|
+
> <p>Lists:</p>
|
|
86
|
+
> <ul>
|
|
87
|
+
> <li>Option 1</li>
|
|
88
|
+
> <li>Option 1</li>
|
|
89
|
+
> </ul>
|
|
90
|
+
> <ol>
|
|
91
|
+
> <li>Option 1</li>
|
|
92
|
+
> <li>Option 1</li>
|
|
93
|
+
> </ol>
|
|
94
|
+
|
|
95
|
+
> ```jsx
|
|
54
96
|
> <p>Lists:</p>
|
|
55
97
|
> <ul>
|
|
56
98
|
> <li>Option 1</li>
|
|
@@ -60,6 +102,7 @@ export const SampleText = "Lorem ipsum dolor..."
|
|
|
60
102
|
> <li>Option 1</li>
|
|
61
103
|
> <li>Option 1</li>
|
|
62
104
|
> </ol>
|
|
105
|
+
> ```
|
|
63
106
|
|
|
64
107
|
</Unstyled>
|
|
65
108
|
|
|
@@ -70,3 +113,7 @@ export const SampleText = "Lorem ipsum dolor..."
|
|
|
70
113
|
}
|
|
71
114
|
`}
|
|
72
115
|
</style>
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```
|
|
@@ -22,7 +22,7 @@ export const SampleTextUppercase = SampleText.toUpperCase()
|
|
|
22
22
|
|
|
23
23
|
# Typography
|
|
24
24
|
|
|
25
|
-
**Font:** Avenir Next<br />
|
|
25
|
+
**Font:** Avenir Next ( as `--font-family`)<br />
|
|
26
26
|
**Weights:** 400 (regular), 500 (medium), 600 (demi)
|
|
27
27
|
|
|
28
28
|
<Typeset
|
|
@@ -32,7 +32,7 @@ export const SampleTextUppercase = SampleText.toUpperCase()
|
|
|
32
32
|
fontFamily={typography.type.primary}
|
|
33
33
|
/>
|
|
34
34
|
|
|
35
|
-
**Font:** Co-op Headline <br />
|
|
35
|
+
**Font:** Co-op Headline ( as `--font-family-headline`)<br />
|
|
36
36
|
**Weights:** 700 (bold)
|
|
37
37
|
|
|
38
38
|
<Typeset
|
|
@@ -41,3 +41,9 @@ export const SampleTextUppercase = SampleText.toUpperCase()
|
|
|
41
41
|
sampleText={SampleTextUppercase}
|
|
42
42
|
fontFamily={typography.type.headline}
|
|
43
43
|
/>
|
|
44
|
+
|
|
45
|
+
<p>
|
|
46
|
+
<b>Note:</b>
|
|
47
|
+
The type sizes shown above have been chosen as our standard type sizes.
|
|
48
|
+
<br /> They are available as CSS variables, e.g. `--type-size-10`, `--type-size-12`, etc.
|
|
49
|
+
</p>
|