@codeforamerica/marcomms-design-system 1.0.0 → 1.0.1
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/package.json +2 -1
- package/src/components/accordion.js +141 -0
- package/src/components/accordion.stories.js +56 -0
- package/src/components/avatar.js +62 -0
- package/src/components/avatar.stories.js +27 -0
- package/src/components/banner.js +152 -0
- package/src/components/banner.stories.js +115 -0
- package/src/components/bar.js +102 -0
- package/src/components/bar.stories.js +22 -0
- package/src/components/blob.js +119 -0
- package/src/components/blob.stories.js +64 -0
- package/src/components/box.js +55 -0
- package/src/components/box.stories.js +24 -0
- package/src/components/breadcrumbs.js +80 -0
- package/src/components/breadcrumbs.stories.js +27 -0
- package/src/components/button.js +167 -0
- package/src/components/button.scss +162 -0
- package/src/components/button.stories.js +49 -0
- package/src/components/callout.js +62 -0
- package/src/components/callout.stories.js +20 -0
- package/src/components/card.js +403 -0
- package/src/components/card.stories.js +170 -0
- package/src/components/carousel.js +182 -0
- package/src/components/carousel.stories.js +61 -0
- package/src/components/cta.js +99 -0
- package/src/components/cta.stories.js +22 -0
- package/src/components/details.scss +71 -0
- package/src/components/details.stories.js +27 -0
- package/src/components/flexible-layout.js +126 -0
- package/src/components/flexible-layout.stories.js +48 -0
- package/src/components/form-elements.scss +305 -0
- package/src/components/form-elements.stories.js +134 -0
- package/src/components/icon.js +41 -0
- package/src/components/icon.scss +31 -0
- package/src/components/icon.stories.js +16 -0
- package/src/components/label.js +63 -0
- package/src/components/label.stories.js +29 -0
- package/src/components/link-list.scss +80 -0
- package/src/components/link-list.stories.js +52 -0
- package/src/components/loader.scss +24 -0
- package/src/components/loader.stories.js +12 -0
- package/src/components/logo-card.js +93 -0
- package/src/components/logo-card.stories.js +48 -0
- package/src/components/nav.js +99 -0
- package/src/components/nav.stories.js +40 -0
- package/src/components/page-nav.js +171 -0
- package/src/components/page-nav.stories.js +112 -0
- package/src/components/pager.js +98 -0
- package/src/components/pager.stories.js +30 -0
- package/src/components/pagination.js +116 -0
- package/src/components/pagination.stories.js +30 -0
- package/src/components/person-card.js +240 -0
- package/src/components/person-card.stories.js +58 -0
- package/src/components/pill.js +33 -0
- package/src/components/pill.stories.js +23 -0
- package/src/components/promo.js +83 -0
- package/src/components/promo.stories.js +37 -0
- package/src/components/pullquote.js +42 -0
- package/src/components/pullquote.stories.js +16 -0
- package/src/components/quote.js +84 -0
- package/src/components/quote.stories.js +23 -0
- package/src/components/reveal.js +83 -0
- package/src/components/reveal.stories.js +40 -0
- package/src/components/slide.js +121 -0
- package/src/components/slide.stories.js +53 -0
- package/src/components/social-icon.js +233 -0
- package/src/components/social-icon.stories.js +36 -0
- package/src/components/stat.js +92 -0
- package/src/components/stat.stories.js +28 -0
- package/src/components/tab-list.js +114 -0
- package/src/components/tab-list.stories.js +18 -0
- package/src/components/tab.js +95 -0
- package/src/components/tab.stories.js +29 -0
- package/src/components/tile.js +150 -0
- package/src/components/tile.stories.js +41 -0
- package/src/components/transcript.js +44 -0
- package/src/components/transcript.stories.js +167 -0
- package/src/core/_base.scss +86 -0
- package/src/core/_grid.scss +295 -0
- package/src/core/_helpers.scss +111 -0
- package/src/core/_layout.scss +79 -0
- package/src/core/_reset.scss +53 -0
- package/src/core/_tokens.scss +251 -0
- package/src/core/_typography.scss +426 -0
- package/src/core/_wordpress.scss +27 -0
- package/src/core/colors.mdx +100 -0
- package/src/core/typography.mdx +66 -0
- package/src/shared/common.js +15 -0
- package/src/shared/layout.js +14 -0
- package/src/shared/typography.js +111 -0
- package/src/styles.scss +16 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { commonStyles } from "../shared/common";
|
|
3
|
+
|
|
4
|
+
class Blob extends LitElement {
|
|
5
|
+
static properties = {
|
|
6
|
+
color: {},
|
|
7
|
+
shape: {},
|
|
8
|
+
styles: {},
|
|
9
|
+
};
|
|
10
|
+
static styles = [
|
|
11
|
+
commonStyles,
|
|
12
|
+
css`
|
|
13
|
+
:host {
|
|
14
|
+
--color: var(--blue-20);
|
|
15
|
+
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.blob,
|
|
20
|
+
svg {
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
svg path {
|
|
26
|
+
fill: var(--color, #fff);
|
|
27
|
+
}
|
|
28
|
+
`,
|
|
29
|
+
];
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this.shape = "1";
|
|
33
|
+
}
|
|
34
|
+
blobTemplate() {
|
|
35
|
+
let svg;
|
|
36
|
+
switch (this.shape) {
|
|
37
|
+
case "1":
|
|
38
|
+
svg = html`<svg
|
|
39
|
+
width="628"
|
|
40
|
+
height="577"
|
|
41
|
+
viewBox="0 0 628 577"
|
|
42
|
+
fill="none"
|
|
43
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
44
|
+
>
|
|
45
|
+
<path
|
|
46
|
+
fill-rule="evenodd"
|
|
47
|
+
clip-rule="evenodd"
|
|
48
|
+
d="M304.482 3.44206C399.413 -5.50752 504.225 1.17063 567.446 72.5295C633.526 147.115 639.549 256.491 613.992 352.793C589.57 444.814 526.084 523.087 438.164 559.679C355.477 594.092 265.039 570.416 184.315 531.621C103.504 492.784 22.0294 438.546 3.59029 350.826C-14.5863 264.355 39.2746 183.666 97.1329 116.868C151.394 54.223 221.956 11.2221 304.482 3.44206Z"
|
|
49
|
+
/>
|
|
50
|
+
</svg>`;
|
|
51
|
+
break;
|
|
52
|
+
case "2":
|
|
53
|
+
svg = html`<svg
|
|
54
|
+
width="580"
|
|
55
|
+
height="592"
|
|
56
|
+
viewBox="0 0 580 592"
|
|
57
|
+
fill="none"
|
|
58
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
59
|
+
>
|
|
60
|
+
<path
|
|
61
|
+
d="M238.814 591.215C210.461 592.077 182.849 587.767 155.66 580.979C60.4457 557.059 4.05766 489.933 0.460672 390.376C-2.50155 306.442 8.71258 223.693 37.2769 144.499C73.2468 44.6185 170.894 -12.5948 276.159 2.81295C358.996 14.9883 437.177 39.3389 499.172 100.108C588.039 187.167 604.437 293.512 544.346 402.767C514.618 456.855 477.59 505.988 426.386 541.544C369.892 580.656 304.723 587.767 238.814 591.215Z"
|
|
62
|
+
/>
|
|
63
|
+
</svg>`;
|
|
64
|
+
break;
|
|
65
|
+
case "3":
|
|
66
|
+
svg = html`<svg
|
|
67
|
+
width="620"
|
|
68
|
+
height="613"
|
|
69
|
+
viewBox="0 0 620 613"
|
|
70
|
+
fill="none"
|
|
71
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
72
|
+
>
|
|
73
|
+
<path
|
|
74
|
+
fill-rule="evenodd"
|
|
75
|
+
clip-rule="evenodd"
|
|
76
|
+
d="M619.142 301.769C615.581 212.393 536.92 153.752 466.654 98.7402C397.998 44.9883 323.934 -10.5844 236.421 2.12929C141.656 15.8965 53.9975 76.8338 15.687 164.256C-20.6955 247.277 16.2818 336.243 54.5575 417.127C92.4807 497.265 137.965 580.831 224.139 604.752C314.166 629.742 409.183 593.817 484.092 536.359C559.738 478.336 622.883 395.641 619.142 301.769Z"
|
|
77
|
+
/>
|
|
78
|
+
</svg>`;
|
|
79
|
+
break;
|
|
80
|
+
case "4":
|
|
81
|
+
svg = html`<svg
|
|
82
|
+
width="656"
|
|
83
|
+
height="566"
|
|
84
|
+
viewBox="0 0 656 566"
|
|
85
|
+
fill="none"
|
|
86
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
87
|
+
>
|
|
88
|
+
<path
|
|
89
|
+
fill-rule="evenodd"
|
|
90
|
+
clip-rule="evenodd"
|
|
91
|
+
d="M332.011 564.695C235.808 569.34 135.091 552.4 71.2946 488.381C4.66596 421.518 -10.0767 327.738 8.2158 239.764C27.3773 147.61 73.5054 52.3693 169.88 14.2546C263.181 -22.6447 364.8 21.5179 455.491 62.8734C540.631 101.698 627.337 150.367 649.771 233.088C672.265 316.032 626.78 399.503 564.43 464.569C505.684 525.875 422.382 560.331 332.011 564.695Z"
|
|
92
|
+
/>
|
|
93
|
+
</svg>`;
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
svg = html`<svg
|
|
97
|
+
width="628"
|
|
98
|
+
height="577"
|
|
99
|
+
viewBox="0 0 628 577"
|
|
100
|
+
fill="none"
|
|
101
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
102
|
+
>
|
|
103
|
+
<path
|
|
104
|
+
fill-rule="evenodd"
|
|
105
|
+
clip-rule="evenodd"
|
|
106
|
+
d="M304.482 3.44206C399.413 -5.50752 504.225 1.17063 567.446 72.5295C633.526 147.115 639.549 256.491 613.992 352.793C589.57 444.814 526.084 523.087 438.164 559.679C355.477 594.092 265.039 570.416 184.315 531.621C103.504 492.784 22.0294 438.546 3.59029 350.826C-14.5863 264.355 39.2746 183.666 97.1329 116.868C151.394 54.223 221.956 11.2221 304.482 3.44206Z"
|
|
107
|
+
/>
|
|
108
|
+
</svg>`;
|
|
109
|
+
}
|
|
110
|
+
return svg;
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
return html` <div class="blob">${this.blobTemplate()}</div> `;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (!customElements.get("cfa-blob")) {
|
|
118
|
+
customElements.define("cfa-blob", Blob);
|
|
119
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import "./blob";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Atoms/Blob",
|
|
6
|
+
argTypes: {
|
|
7
|
+
shape: {
|
|
8
|
+
options: ["1", "2", "3", "4"],
|
|
9
|
+
control: { type: "inline-radio" },
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
options: [
|
|
13
|
+
"white",
|
|
14
|
+
"gray-20",
|
|
15
|
+
"gray-40",
|
|
16
|
+
"gray-60",
|
|
17
|
+
"gray-80",
|
|
18
|
+
"sand-20",
|
|
19
|
+
"sand-40",
|
|
20
|
+
"sand-60",
|
|
21
|
+
"sand-80",
|
|
22
|
+
"purple-20",
|
|
23
|
+
"purple-40",
|
|
24
|
+
"purple-60",
|
|
25
|
+
"purple-80",
|
|
26
|
+
"red-20",
|
|
27
|
+
"red-40",
|
|
28
|
+
"red-60",
|
|
29
|
+
"red-80",
|
|
30
|
+
"green-20",
|
|
31
|
+
"green-40",
|
|
32
|
+
"green-60",
|
|
33
|
+
"green-80",
|
|
34
|
+
"blue-20",
|
|
35
|
+
"blue-40",
|
|
36
|
+
"blue-60",
|
|
37
|
+
"blue-80",
|
|
38
|
+
"yellow-20",
|
|
39
|
+
"yellow-40",
|
|
40
|
+
"yellow-60",
|
|
41
|
+
"yellow-80",
|
|
42
|
+
],
|
|
43
|
+
control: { type: "select" },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const Template = ({ color, shape }) => html`
|
|
49
|
+
<cfa-blob
|
|
50
|
+
color="${color}"
|
|
51
|
+
shape="${shape}"
|
|
52
|
+
style="
|
|
53
|
+
height: var(--spacing-layout-6, 10rem);
|
|
54
|
+
width: var(--spacing-layout-6, 10rem);
|
|
55
|
+
"
|
|
56
|
+
>
|
|
57
|
+
</cfa-blob>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
export const Default = Template.bind({});
|
|
61
|
+
Default.args = {
|
|
62
|
+
color: "purple-40",
|
|
63
|
+
shape: "1",
|
|
64
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { commonStyles } from "../shared/common";
|
|
3
|
+
|
|
4
|
+
class Box extends LitElement {
|
|
5
|
+
static properties = {
|
|
6
|
+
theme: {},
|
|
7
|
+
};
|
|
8
|
+
static styles = [
|
|
9
|
+
commonStyles,
|
|
10
|
+
css`
|
|
11
|
+
:host {
|
|
12
|
+
--bg-color: var(--white);
|
|
13
|
+
--padding: var(--spacing-component-4);
|
|
14
|
+
--shadow: var(--shadow-small);
|
|
15
|
+
--text-color: var(--black);
|
|
16
|
+
|
|
17
|
+
display: flex;
|
|
18
|
+
flex: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.box {
|
|
22
|
+
background-color: var(--bg-color);
|
|
23
|
+
box-shadow: var(--shadow);
|
|
24
|
+
color: var(--text-color, #000);
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
gap: var(--spacing-layout-half);
|
|
28
|
+
padding: var(--padding);
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.box--rounded {
|
|
33
|
+
border-radius: var(--spacing-layout-half, 0.5rem);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
::slotted(*) {
|
|
37
|
+
--spacing: var(--spacing-layout-half);
|
|
38
|
+
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
}
|
|
41
|
+
`,
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
render() {
|
|
45
|
+
return html`
|
|
46
|
+
<div class="box ${this.theme ? "box--" + this.theme : ""}">
|
|
47
|
+
<slot />
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!customElements.get("cfa-box")) {
|
|
54
|
+
customElements.define("cfa-box", Box);
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import "./box";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Molecules/Box",
|
|
6
|
+
argTypes: {
|
|
7
|
+
theme: {
|
|
8
|
+
defaultValue: "default",
|
|
9
|
+
options: ["default", "rounded"],
|
|
10
|
+
control: { type: "radio" },
|
|
11
|
+
},
|
|
12
|
+
content: { type: "string" },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const Template = ({ theme, content }) => html`
|
|
17
|
+
<cfa-box theme="${theme}" .innerHTML="${content}"> </cfa-box>
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const Default = Template.bind({});
|
|
21
|
+
Default.args = {
|
|
22
|
+
content:
|
|
23
|
+
"<p>We deploy <em>human-centered technology</em>, the kind that respects you from the start, meets you where you are, and provides an <strong>easy, positive experience</strong>.<p><a>Learn more</a></p>",
|
|
24
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { commonStyles } from "../shared/common";
|
|
3
|
+
|
|
4
|
+
class Breadcrumbs extends LitElement {
|
|
5
|
+
static properties = {};
|
|
6
|
+
static styles = [
|
|
7
|
+
commonStyles,
|
|
8
|
+
css`
|
|
9
|
+
slot {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.breadcrumbs {
|
|
18
|
+
margin: 0;
|
|
19
|
+
margin-inline: calc(-1 * var(--outer-margin));
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
overflow-y: hidden;
|
|
22
|
+
padding: 0;
|
|
23
|
+
scrollbar-width: none;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.breadcrumbs::before,
|
|
28
|
+
.breadcrumbs::after {
|
|
29
|
+
content: "";
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: var(--outer-margin);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.breadcrumbs > * {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
font-size: var(--font-size-small);
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
line-height: var(--line-height-small);
|
|
39
|
+
margin: 0;
|
|
40
|
+
padding: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.breadcrumbs > *:not(:last-child)::after {
|
|
44
|
+
content: "/";
|
|
45
|
+
opacity: 0.5;
|
|
46
|
+
padding-inline: 0.75em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.breadcrumbs a {
|
|
50
|
+
color: var(--link-color);
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
}
|
|
53
|
+
`,
|
|
54
|
+
];
|
|
55
|
+
handleSlotchange(event) {
|
|
56
|
+
const slot = event.target;
|
|
57
|
+
const assignedNodes = slot.assignedNodes({ flatten: true });
|
|
58
|
+
console.log(assignedNodes);
|
|
59
|
+
const breadcrumbContainer = this.shadowRoot.querySelector(".breadcrumbs");
|
|
60
|
+
breadcrumbContainer.innerHTML = ""; // Clear the existing content
|
|
61
|
+
assignedNodes.forEach((node) => {
|
|
62
|
+
if (node.tagName === "UL") {
|
|
63
|
+
const liElements = node.querySelectorAll("li");
|
|
64
|
+
liElements.forEach((li) => {
|
|
65
|
+
breadcrumbContainer.appendChild(li.cloneNode(true));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
return html`
|
|
72
|
+
<slot @slotchange=${this.handleSlotchange}></slot>
|
|
73
|
+
<ul class="breadcrumbs"></ul>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!customElements.get("cfa-breadcrumbs")) {
|
|
79
|
+
customElements.define("cfa-breadcrumbs", Breadcrumbs);
|
|
80
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
import "./breadcrumbs";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Molecules/Breadcrumbs",
|
|
6
|
+
argTypes: {},
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = () => html`
|
|
10
|
+
<cfa-breadcrumbs>
|
|
11
|
+
<ul>
|
|
12
|
+
<li>
|
|
13
|
+
<a href="#">Home</a>
|
|
14
|
+
</li>
|
|
15
|
+
<li>
|
|
16
|
+
<a href="#">Programs</a>
|
|
17
|
+
</li>
|
|
18
|
+
<li>
|
|
19
|
+
<a href="#">Safety Net</a>
|
|
20
|
+
</li>
|
|
21
|
+
<li>Food benefits</li>
|
|
22
|
+
</ul>
|
|
23
|
+
</cfa-breadcrumbs>
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
export const Default = Template.bind({});
|
|
27
|
+
Default.args = {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// These are some shared button styles we can use when we need a button in a component
|
|
2
|
+
// NB: make sure the styles in here match those in button.scss
|
|
3
|
+
|
|
4
|
+
import { css } from "lit";
|
|
5
|
+
|
|
6
|
+
export const buttonStyles = css`
|
|
7
|
+
.cfa-button,
|
|
8
|
+
a.cfa-button,
|
|
9
|
+
.cfa-button > a,
|
|
10
|
+
.wp-block-button > * {
|
|
11
|
+
--bg-color: var(--white);
|
|
12
|
+
--border-color: transparent;
|
|
13
|
+
--font-family: var(--font-family-sans-serif);
|
|
14
|
+
--font-size: var(--font-size-base);
|
|
15
|
+
--hover-bg-color: var(--blue-20);
|
|
16
|
+
--hover-border-color: var(--border-color);
|
|
17
|
+
--line-height: var(--line-height-base);
|
|
18
|
+
--text-color: var(--purple-80);
|
|
19
|
+
|
|
20
|
+
background-color: var(--bg-color);
|
|
21
|
+
border: var(--hairline) solid var(--border-color);
|
|
22
|
+
border-radius: var(--rounded-corners);
|
|
23
|
+
box-shadow: var(--shadow-small);
|
|
24
|
+
color: var(--text-color);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
display: block;
|
|
27
|
+
font-family: var(--font-family);
|
|
28
|
+
font-size: var(--font-size);
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
padding: var(--spacing-component-2) var(--spacing-component-3);
|
|
31
|
+
text-align: center;
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
transition: background-color 0.5s, box-shadow 0.5s;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: var(--hover-bg-color);
|
|
37
|
+
border-color: var(--hover-border-color);
|
|
38
|
+
box-shadow: var(--shadow-medium);
|
|
39
|
+
color: var(--text-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& cfa-icon {
|
|
43
|
+
line-height: 1em;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (max-width: 768px) {
|
|
48
|
+
.cfa-button,
|
|
49
|
+
a.cfa-button,
|
|
50
|
+
.cfa-button > a,
|
|
51
|
+
.wp-block-button > * {
|
|
52
|
+
width: 100%;
|
|
53
|
+
|
|
54
|
+
& + & {
|
|
55
|
+
margin-block-start: var(--spacing-layout-half);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.wp-block-button {
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (min-width: 768px) {
|
|
65
|
+
.cfa-button,
|
|
66
|
+
a.cfa-button,
|
|
67
|
+
.cfa-button > a,
|
|
68
|
+
.wp-block-button > * {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
|
|
71
|
+
& {
|
|
72
|
+
margin-block: var(--spacing-component-2);
|
|
73
|
+
margin-inline-end: var(--spacing-component-2);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Themes / variants
|
|
79
|
+
|
|
80
|
+
.cfa-button--primary,
|
|
81
|
+
a.cfa-button--primary,
|
|
82
|
+
.cfa-button--primary > a,
|
|
83
|
+
.wp-block-button.is-style-primary > * {
|
|
84
|
+
--bg-color: var(--red-60);
|
|
85
|
+
--hover-bg-color: var(--red-80);
|
|
86
|
+
--text-color: var(--white,);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.cfa-button--outline,
|
|
90
|
+
a.cfa-button--outline,
|
|
91
|
+
.cfa-button--outline > a,
|
|
92
|
+
.wp-block-button.is-style-outline > * {
|
|
93
|
+
--border-color: var(--black-20);
|
|
94
|
+
--bg-color: transparent;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cfa-button--outline-white,
|
|
98
|
+
a.cfa-button--outline-white,
|
|
99
|
+
.cfa-button--outline-white > a,
|
|
100
|
+
.wp-block-button.is-style-outline-white > * {
|
|
101
|
+
--border-color: var(--white);
|
|
102
|
+
--bg-color: transparent;
|
|
103
|
+
--hover-bg-color: var(--black-20);
|
|
104
|
+
--shadow-color: var(--white-20);
|
|
105
|
+
--text-color: var(--white);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.cfa-button--prominent-link,
|
|
109
|
+
a.cfa-button--prominent-link,
|
|
110
|
+
.cfa-button--prominent-link > a,
|
|
111
|
+
.wp-block-button.is-style-prominent-link > * {
|
|
112
|
+
--accent-color: var(--purple-60);
|
|
113
|
+
|
|
114
|
+
background: unset;
|
|
115
|
+
box-shadow: unset;
|
|
116
|
+
color: inherit;
|
|
117
|
+
font-weight: bold;
|
|
118
|
+
padding: 0;
|
|
119
|
+
text-decoration: underline;
|
|
120
|
+
text-decoration-color: var(--accent-color);
|
|
121
|
+
text-decoration-thickness: var(--medium);
|
|
122
|
+
text-underline-offset: 0.4em;
|
|
123
|
+
transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
--accent-color: var(--red-60);
|
|
127
|
+
|
|
128
|
+
background: unset;
|
|
129
|
+
box-shadow: unset;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&::after {
|
|
133
|
+
@include icon.icon;
|
|
134
|
+
|
|
135
|
+
content: "arrow_right_alt";
|
|
136
|
+
display: inline-block;
|
|
137
|
+
padding-inline-start: 0.1em;
|
|
138
|
+
text-decoration: none;
|
|
139
|
+
transition: transform 0.2s ease-in-out;
|
|
140
|
+
width: 1em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&:hover::after {
|
|
144
|
+
transform: translateX(0.3em);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
cfa-icon {
|
|
148
|
+
text-decoration: none;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Sizes
|
|
153
|
+
|
|
154
|
+
.cfa-button--sm,
|
|
155
|
+
a.cfa-button--sm,
|
|
156
|
+
.cfa-button--sm > a {
|
|
157
|
+
--font-size: var(--font-size-small);
|
|
158
|
+
--line-height: var(--line-height-small);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.cfa-button--md,
|
|
162
|
+
a.cfa-button--md,
|
|
163
|
+
.cfa-button--md > a {
|
|
164
|
+
--font-size: var(--font-size-base);
|
|
165
|
+
--line-height: var(--line-height-base);
|
|
166
|
+
}
|
|
167
|
+
`;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
@use '../components/icon';
|
|
2
|
+
|
|
3
|
+
.cfa-button,
|
|
4
|
+
a.cfa-button,
|
|
5
|
+
.cfa-button > a,
|
|
6
|
+
.wp-block-button > * {
|
|
7
|
+
--bg-color: var(--white);
|
|
8
|
+
--border-color: transparent;
|
|
9
|
+
--font-family: var(--font-family-sans-serif);
|
|
10
|
+
--font-size: var(--font-size-base);
|
|
11
|
+
--hover-bg-color: var(--blue-20);
|
|
12
|
+
--hover-border-color: var(--border-color);
|
|
13
|
+
--line-height: var(--line-height-base);
|
|
14
|
+
--text-color: var(--purple-80);
|
|
15
|
+
|
|
16
|
+
background-color: var(--bg-color);
|
|
17
|
+
border: var(--hairline) solid var(--border-color);
|
|
18
|
+
border-radius: var(--rounded-corners);
|
|
19
|
+
box-shadow: var(--shadow-small);
|
|
20
|
+
color: var(--text-color);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
display: block;
|
|
23
|
+
font-family: var(--font-family);
|
|
24
|
+
font-size: var(--font-size);
|
|
25
|
+
font-weight: bold;
|
|
26
|
+
padding: var(--spacing-component-2) var(--spacing-component-3);
|
|
27
|
+
text-align: center;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
transition: background-color 0.5s, box-shadow 0.5s;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background-color: var(--hover-bg-color);
|
|
33
|
+
border-color: var(--hover-border-color);
|
|
34
|
+
box-shadow: var(--shadow-medium);
|
|
35
|
+
color: var(--text-color);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
& cfa-icon {
|
|
39
|
+
line-height: 1em;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@media (max-width: 768px) {
|
|
44
|
+
.cfa-button,
|
|
45
|
+
a.cfa-button,
|
|
46
|
+
.cfa-button > a,
|
|
47
|
+
.wp-block-button > * {
|
|
48
|
+
width: 100%;
|
|
49
|
+
|
|
50
|
+
& + & {
|
|
51
|
+
margin-block-start: var(--spacing-layout-half);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.wp-block-button {
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (min-width: 768px) {
|
|
61
|
+
.cfa-button,
|
|
62
|
+
a.cfa-button,
|
|
63
|
+
.cfa-button > a,
|
|
64
|
+
.wp-block-button > * {
|
|
65
|
+
display: inline-block;
|
|
66
|
+
|
|
67
|
+
& {
|
|
68
|
+
margin-block: var(--spacing-component-2);
|
|
69
|
+
margin-inline-end: var(--spacing-component-2);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Themes / variants
|
|
75
|
+
|
|
76
|
+
.cfa-button--primary,
|
|
77
|
+
a.cfa-button--primary,
|
|
78
|
+
.cfa-button--primary > a,
|
|
79
|
+
.wp-block-button.is-style-primary > * {
|
|
80
|
+
--bg-color: var(--red-60);
|
|
81
|
+
--hover-bg-color: var(--red-80);
|
|
82
|
+
--text-color: var(--white,);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.cfa-button--outline,
|
|
86
|
+
a.cfa-button--outline,
|
|
87
|
+
.cfa-button--outline > a,
|
|
88
|
+
.wp-block-button.is-style-outline > * {
|
|
89
|
+
--border-color: var(--black-20);
|
|
90
|
+
--bg-color: transparent;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.cfa-button--outline-white,
|
|
94
|
+
a.cfa-button--outline-white,
|
|
95
|
+
.cfa-button--outline-white > a,
|
|
96
|
+
.wp-block-button.is-style-outline-white > * {
|
|
97
|
+
--border-color: var(--white);
|
|
98
|
+
--bg-color: transparent;
|
|
99
|
+
--hover-bg-color: var(--black-20);
|
|
100
|
+
--shadow-color: var(--white-20);
|
|
101
|
+
--text-color: var(--white);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.cfa-button--prominent-link,
|
|
105
|
+
a.cfa-button--prominent-link,
|
|
106
|
+
.cfa-button--prominent-link > a,
|
|
107
|
+
.wp-block-button.is-style-prominent-link > * {
|
|
108
|
+
--accent-color: var(--purple-60);
|
|
109
|
+
|
|
110
|
+
background: unset;
|
|
111
|
+
box-shadow: unset;
|
|
112
|
+
color: inherit;
|
|
113
|
+
font-weight: bold;
|
|
114
|
+
padding: 0;
|
|
115
|
+
text-decoration: underline;
|
|
116
|
+
text-decoration-color: var(--accent-color);
|
|
117
|
+
text-decoration-thickness: var(--medium);
|
|
118
|
+
text-underline-offset: 0.4em;
|
|
119
|
+
transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
--accent-color: var(--red-60);
|
|
123
|
+
|
|
124
|
+
background: unset;
|
|
125
|
+
box-shadow: unset;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&::after {
|
|
129
|
+
@include icon.icon;
|
|
130
|
+
|
|
131
|
+
content: "arrow_right_alt";
|
|
132
|
+
display: inline-block;
|
|
133
|
+
padding-inline-start: 0.1em;
|
|
134
|
+
text-decoration: none;
|
|
135
|
+
transition: transform 0.2s ease-in-out;
|
|
136
|
+
width: 1em;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:hover::after {
|
|
140
|
+
transform: translateX(0.3em);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
cfa-icon {
|
|
144
|
+
text-decoration: none;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Sizes
|
|
149
|
+
|
|
150
|
+
.cfa-button--sm,
|
|
151
|
+
a.cfa-button--sm,
|
|
152
|
+
.cfa-button--sm > a {
|
|
153
|
+
--font-size: var(--font-size-small);
|
|
154
|
+
--line-height: var(--line-height-small);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.cfa-button--md,
|
|
158
|
+
a.cfa-button--md,
|
|
159
|
+
.cfa-button--md > a {
|
|
160
|
+
--font-size: var(--font-size-base);
|
|
161
|
+
--line-height: var(--line-height-base);
|
|
162
|
+
}
|