@codeforamerica/marcomms-design-system 1.1.4 → 1.2.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/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -23
- package/src/components/placeholder.js +25 -0
- package/src/components/placeholder.stories.js +10 -0
- package/src/components/slide.js +2 -1
- package/src/components/slide.stories.js +15 -19
- package/src/core/colors.mdx +1 -1
- package/src/core/grid.mdx +207 -4
- package/src/core/grid.scss +247 -605
- package/src/core/layout.scss +15 -4
- package/src/core/layout.stories.js +80 -0
- package/src/core/tokens.scss +36 -44
- package/src/core/typography.mdx +1 -1
- package/src/core/typography.scss +10 -9
- package/src/index.js +0 -3
- package/src/components/banner.js +0 -152
- package/src/components/banner.stories.js +0 -115
- package/src/components/cta.js +0 -99
- package/src/components/cta.stories.js +0 -22
- package/src/components/flexible-layout.js +0 -125
- package/src/components/flexible-layout.stories.js +0 -48
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
import { commonStyles } from "../shared/common";
|
|
3
|
-
import { layoutStyles } from "../shared/layout";
|
|
4
|
-
|
|
5
|
-
class FlexibleLayout extends LitElement {
|
|
6
|
-
static properties = {
|
|
7
|
-
theme: {},
|
|
8
|
-
};
|
|
9
|
-
static styles = [
|
|
10
|
-
commonStyles,
|
|
11
|
-
layoutStyles,
|
|
12
|
-
css`
|
|
13
|
-
:host {
|
|
14
|
-
--column-gap: var(--gutter-width);
|
|
15
|
-
--row-gap: var(--spacing-layout-1);
|
|
16
|
-
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.layout {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
row-gap: var(--row-gap);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Theme: one (full-width) */
|
|
27
|
-
@media (min-width: 768px) {
|
|
28
|
-
.layout {
|
|
29
|
-
column-gap: var(--column-gap);
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-template-areas: "content-area-1" "content-area-2" "content-area-3" "content-area-4";
|
|
32
|
-
row-gap: var(--row-gap);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.content-area-1 {
|
|
36
|
-
grid-area: content-area-1;
|
|
37
|
-
}
|
|
38
|
-
.content-area-2 {
|
|
39
|
-
grid-area: content-area-2;
|
|
40
|
-
}
|
|
41
|
-
.content-area-3 {
|
|
42
|
-
grid-area: content-area-3;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@media (min-width: 768px) {
|
|
47
|
-
.layout--one {
|
|
48
|
-
grid-template-columns: 1fr;
|
|
49
|
-
grid-template-areas: "content-area-1";
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Theme: one-one */
|
|
54
|
-
@media (min-width: 768px) {
|
|
55
|
-
.layout--one-one {
|
|
56
|
-
grid-template-columns: 1fr 1fr;
|
|
57
|
-
grid-template-areas: "content-area-1 content-area-2";
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Theme: one-two */
|
|
62
|
-
@media (min-width: 768px) {
|
|
63
|
-
.layout--one-two {
|
|
64
|
-
grid-template-columns: 1fr 2fr;
|
|
65
|
-
grid-template-areas: "content-area-1 content-area-2";
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Theme: two-one */
|
|
70
|
-
@media (min-width: 768px) {
|
|
71
|
-
.layout--two-one {
|
|
72
|
-
grid-template-columns: 2fr 1fr;
|
|
73
|
-
grid-template-areas: "content-area-1 content-area-2";
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Theme: one-one-one */
|
|
78
|
-
@media (min-width: 768px) {
|
|
79
|
-
.layout--one-one-one {
|
|
80
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
81
|
-
grid-template-areas: "content-area-1 content-area-2 content-area-3";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* Theme: one-one-two */
|
|
86
|
-
@media (min-width: 768px) {
|
|
87
|
-
.layout--one-one-two {
|
|
88
|
-
grid-template-columns: 1fr 1fr 2fr;
|
|
89
|
-
grid-template-areas: "content-area-1 content-area-2 content-area-3";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Theme: one-two-one */
|
|
94
|
-
@media (min-width: 768px) {
|
|
95
|
-
.layout--one-two-one {
|
|
96
|
-
grid-template-columns: 1fr 2fr 1fr;
|
|
97
|
-
grid-template-areas: "content-area-1 content-area-2 content-area-3";
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* Theme: two-one-one */
|
|
102
|
-
@media (min-width: 768px) {
|
|
103
|
-
.layout--two-one-one {
|
|
104
|
-
grid-template-columns: 2fr 1fr 1fr;
|
|
105
|
-
grid-template-areas: "content-area-1 content-area-2 content-area-3";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
`,
|
|
109
|
-
];
|
|
110
|
-
render() {
|
|
111
|
-
return html`
|
|
112
|
-
<div class="container-fluid wrapper">
|
|
113
|
-
<div class="layout layout--${this.theme}">
|
|
114
|
-
<slot name="content-area-1"></slot>
|
|
115
|
-
<slot name="content-area-2"></slot>
|
|
116
|
-
<slot name="content-area-3"></slot>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
`;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (!customElements.get("cfa-flexible-layout")) {
|
|
124
|
-
customElements.define("cfa-flexible-layout", FlexibleLayout);
|
|
125
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { html } from "lit-html";
|
|
2
|
-
import "./flexible-layout";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Organisms/FlexibleLayout",
|
|
6
|
-
argTypes: {
|
|
7
|
-
theme: {
|
|
8
|
-
defaultValue: "one-one",
|
|
9
|
-
options: [
|
|
10
|
-
"one",
|
|
11
|
-
"one-one",
|
|
12
|
-
"one-two",
|
|
13
|
-
"two-one",
|
|
14
|
-
"one-one-one",
|
|
15
|
-
"one-two-one",
|
|
16
|
-
"one-one-two",
|
|
17
|
-
"two-one-one",
|
|
18
|
-
],
|
|
19
|
-
control: { type: "radio" },
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
const Template = ({ theme }) => html`
|
|
25
|
-
<cfa-flexible-layout theme=${theme}>
|
|
26
|
-
<div slot="content-area-1" class="stack">
|
|
27
|
-
<div class="cfa-text">
|
|
28
|
-
<h1>Government can, and should, work well for everyone.</h1>
|
|
29
|
-
<p>We’ve been working for more than a decade with governments and communities across the country to break down barriers and find real solutions.</p>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div slot="content-area-2" class="stack">
|
|
33
|
-
<cfa-box>
|
|
34
|
-
<p>The past several years have shown us the stakes when it doesn’t—and what’s possible when it does. Economic volatility and the ongoing effects of the pandemic have made government services more important than ever, and digital delivery of those services has delivered stability to millions of families in an unstable time.</p>
|
|
35
|
-
</cfa-box>
|
|
36
|
-
<cfa-box>
|
|
37
|
-
<p>The public interest tech community has shown that it’s possible for government to reach people equitably, and to serve them with dignity and respect. </p>
|
|
38
|
-
</cfa-box>
|
|
39
|
-
</div>
|
|
40
|
-
<div slot="content-area-3" class="stack">
|
|
41
|
-
<div class="cfa-text">
|
|
42
|
-
<p class="small">We’ve never been as poised as we are right now to drive meaningful, lasting change in government.</p>
|
|
43
|
-
</div>
|
|
44
|
-
</cfa-flexible-layout>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
export const Default = Template.bind({});
|
|
48
|
-
Default.args = {};
|