@codeforamerica/marcomms-design-system 1.20.0 → 1.21.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/dist/components/accordion.js +1 -1
- package/dist/components/box.js +22 -9
- package/dist/components/button.js +4 -4
- package/dist/components/card.js +3 -3
- package/dist/components/carousel.js +1 -1
- package/dist/components/label.js +2 -2
- package/dist/components/logo-card.js +2 -2
- package/dist/components/nav.js +2 -2
- package/dist/components/pager.js +6 -6
- package/dist/components/pagination.js +4 -4
- package/dist/components/person-card.js +2 -2
- package/dist/components/placeholder.js +1 -1
- package/dist/components/promo.js +2 -2
- package/dist/components/stat.js +2 -2
- package/dist/components/tab-list.js +6 -6
- package/dist/components/tab.js +2 -2
- package/dist/components/tile.js +2 -2
- package/dist/components/transcript.js +2 -2
- package/dist/core.css +3 -3
- package/dist/index.css +2 -2
- package/dist/index.js +33 -20
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/accordion.js +1 -1
- package/src/components/box.js +22 -9
- package/src/components/box.stories.js +7 -2
- package/src/components/button.js +4 -4
- package/src/components/button.scss +4 -4
- package/src/components/card.js +1 -1
- package/src/components/carousel.js +1 -1
- package/src/components/form-elements.scss +6 -6
- package/src/components/nav.js +2 -2
- package/src/components/placeholder.js +1 -1
- package/src/core/base.scss +2 -2
- package/src/core/colors.mdx +8 -1
- package/src/core/tokens.scss +64 -50
- package/src/core/typography.scss +2 -2
- package/src/shared/typography.js +2 -2
package/src/core/tokens.scss
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
@use 'grid';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
//
|
|
4
|
+
|
|
5
|
+
// COLORS AND GRADIENTS
|
|
6
|
+
|
|
7
|
+
// Colors
|
|
6
8
|
|
|
7
9
|
--black: #000;
|
|
8
10
|
--white: #fff;
|
|
@@ -54,24 +56,30 @@
|
|
|
54
56
|
--sand-60: #C19F8B;
|
|
55
57
|
--sand-80: #3D3129;
|
|
56
58
|
|
|
59
|
+
// Brand colors and aliases
|
|
60
|
+
|
|
57
61
|
--brand-purple: var(--purple-80);
|
|
58
62
|
--brand-red: var(--red-60);
|
|
59
63
|
|
|
60
|
-
--accent-color: var(--purple-60);
|
|
64
|
+
--base-accent-color: var(--purple-60);
|
|
65
|
+
--accent-color: var(--base-accent-color);
|
|
61
66
|
|
|
62
|
-
--text-color: var(--black);
|
|
67
|
+
--base-text-color: var(--black);
|
|
68
|
+
--text-color: var(--base-text-color);
|
|
63
69
|
|
|
64
70
|
--base-link-color: var(--purple-80);
|
|
65
71
|
--base-link-hover-color: var(--red-60);
|
|
66
72
|
|
|
67
73
|
--link-color: var(--base-link-color);
|
|
68
74
|
--link-hover-color: var(--base-link-hover-color);
|
|
69
|
-
|
|
70
|
-
// =====
|
|
71
75
|
|
|
72
|
-
//
|
|
76
|
+
// Gradients
|
|
77
|
+
|
|
78
|
+
--gradient-1: linear-gradient(130deg, var(--purple-80) 0%, var(--purple-40) 100%);
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
// SPACING
|
|
81
|
+
|
|
82
|
+
// Layout spacing (based on REM)
|
|
75
83
|
|
|
76
84
|
--spacing-layout-0: 0;
|
|
77
85
|
--spacing-layout-half: 0.75rem;
|
|
@@ -85,7 +93,7 @@
|
|
|
85
93
|
--spacing-layout-8: 12rem;
|
|
86
94
|
--spacing-layout-9: 13.5rem;
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
// Component spacing (based on fractions of layout spacing)
|
|
89
97
|
|
|
90
98
|
--spacing-component-0: 0;
|
|
91
99
|
--spacing-component-1: calc(0.125 * var(--spacing-layout-1));
|
|
@@ -98,38 +106,39 @@
|
|
|
98
106
|
--spacing-component-8: calc(16 * var(--spacing-layout-1));
|
|
99
107
|
--spacing-component-9: calc(32 * var(--spacing-layout-1));
|
|
100
108
|
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
// Layout and grid
|
|
109
|
+
// LAYOUT AND GRID
|
|
104
110
|
|
|
105
|
-
|
|
111
|
+
// Breakpoints
|
|
106
112
|
|
|
107
113
|
--breakpoint-mobile: 480px;
|
|
108
114
|
--breakpoint-tablet: 768px;
|
|
109
115
|
--breakpoint-desktop: 1024px;
|
|
110
116
|
--breakpoint-widescreen: 1600px;
|
|
111
117
|
|
|
112
|
-
|
|
118
|
+
// Grid
|
|
113
119
|
|
|
114
120
|
--gutter-width: var(--spacing-layout-1);
|
|
115
121
|
--outer-margin: var(--spacing-layout-1);
|
|
116
122
|
--grid-max-width: 1200px;
|
|
117
123
|
--grid-max-width-wp: calc(var(--grid-max-width) - var(--outer-margin) * 2);
|
|
118
124
|
|
|
119
|
-
|
|
125
|
+
// Column spans
|
|
120
126
|
|
|
121
127
|
@for $i from 1 through 12 {
|
|
122
128
|
--column-span-#{$i}: #{grid.column-span($i)};
|
|
123
129
|
}
|
|
124
130
|
|
|
125
|
-
//
|
|
131
|
+
// TYPOGRAPHY
|
|
126
132
|
|
|
127
|
-
//
|
|
133
|
+
// Font families
|
|
128
134
|
|
|
129
135
|
--font-family-serif: 'Source Serif 4', serif;
|
|
130
136
|
--font-family-sans-serif: 'Source Sans 3', sans-serif;
|
|
137
|
+
|
|
138
|
+
--base-font-family: var(--font-family-sans-serif);
|
|
139
|
+
--base-font-size: 20px;
|
|
131
140
|
|
|
132
|
-
--font-family-base: var(--font-family
|
|
141
|
+
--font-family-base: var(--base-font-family);
|
|
133
142
|
--font-family-heading: var(--font-family-serif);
|
|
134
143
|
--font-family-display-1: var(--font-family-heading);
|
|
135
144
|
--font-family-display-2: var(--font-family-heading);
|
|
@@ -139,7 +148,9 @@
|
|
|
139
148
|
--font-family-h4: var(--font-family-heading);
|
|
140
149
|
--font-family-eyebrow: var(--base-font-family);
|
|
141
150
|
|
|
142
|
-
|
|
151
|
+
// Font sizes
|
|
152
|
+
|
|
153
|
+
--font-size: var(--base-font-size);
|
|
143
154
|
--font-size-display-1: 3.052rem; // 61.04px
|
|
144
155
|
--font-size-display-2: 2.441rem; // 48.83px
|
|
145
156
|
--font-size-h1: 1.953rem; // 39.06px
|
|
@@ -151,6 +162,8 @@
|
|
|
151
162
|
--font-size-large: var(--font-size-h3);
|
|
152
163
|
--font-size-small: 0.8rem;
|
|
153
164
|
|
|
165
|
+
// Font weights
|
|
166
|
+
|
|
154
167
|
--font-weight-regular: 400;
|
|
155
168
|
--font-weight-bold: 700;
|
|
156
169
|
--font-weight-display-1: var(--font-weight-bold);
|
|
@@ -160,27 +173,32 @@
|
|
|
160
173
|
--font-weight-h3: var(--font-weight-bold);
|
|
161
174
|
--font-weight-h4: var(--font-weight-bold);
|
|
162
175
|
--font-weight-eyebrow: var(--font-weight-bold);
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
--line-height
|
|
167
|
-
|
|
168
|
-
--line-height
|
|
169
|
-
--line-height-
|
|
170
|
-
--line-height-
|
|
171
|
-
--line-height-
|
|
172
|
-
--line-height-
|
|
173
|
-
--line-height-
|
|
174
|
-
--line-height-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
|
|
177
|
+
// Line heights
|
|
178
|
+
|
|
179
|
+
--base-line-height: var(--spacing-layout-1);
|
|
180
|
+
|
|
181
|
+
--line-height: var(--base-line-height);
|
|
182
|
+
--line-height-display-1: calc(2 * var(--base-line-height));
|
|
183
|
+
--line-height-display-2: calc(2 * var(--base-line-height));
|
|
184
|
+
--line-height-h1: calc(1.5 * var(--base-line-height));
|
|
185
|
+
--line-height-h2: calc(1.5 * var(--base-line-height));
|
|
186
|
+
--line-height-h3: calc(1 * var(--base-line-height));
|
|
187
|
+
--line-height-h4: calc(1 * var(--base-line-height));
|
|
188
|
+
--line-height-eyebrow: calc(1 * var(--base-line-height));
|
|
189
|
+
--line-height-extra-large: calc(1.5 * var(--base-line-height));
|
|
190
|
+
--line-height-large: calc(1 * var(--base-line-height));
|
|
191
|
+
--line-height-small: calc(0.75 * var(--base-line-height));
|
|
192
|
+
|
|
177
193
|
--line-height-sm: var(--line-height-small);
|
|
178
|
-
--line-height-md: var(--line-height
|
|
194
|
+
--line-height-md: var(--line-height);
|
|
179
195
|
--line-height-lg: var(--line-height-large);
|
|
180
196
|
--line-height-xl: var(--line-height-extra-large);
|
|
181
197
|
--line-height-xxl: var(--line-height-display-2);
|
|
182
198
|
--line-height-xxxl: var(--line-height-display-1);
|
|
183
199
|
|
|
200
|
+
// Letter spacing
|
|
201
|
+
|
|
184
202
|
--letter-spacing-base: normal;
|
|
185
203
|
--letter-spacing-display-1: normal;
|
|
186
204
|
--letter-spacing-display-2: normal;
|
|
@@ -191,7 +209,6 @@
|
|
|
191
209
|
--letter-spacing-eyebrow: 0.1em;
|
|
192
210
|
--letter-spacing-small: normal;
|
|
193
211
|
|
|
194
|
-
// Letter spacing aliases
|
|
195
212
|
--letter-spacing-sm: var(--letter-spacing-small);
|
|
196
213
|
--letter-spacing-md: var(--letter-spacing-base);
|
|
197
214
|
--letter-spacing-lg: var(--letter-spacing-large);
|
|
@@ -199,34 +216,33 @@
|
|
|
199
216
|
--letter-spacing-xxl: var(--letter-spacing-display-2);
|
|
200
217
|
--letter-spacing-xxxl: var(--letter-spacing-display-1);
|
|
201
218
|
|
|
219
|
+
// Text decoration and highlights
|
|
220
|
+
|
|
202
221
|
--text-underline-offset: 0.3em;
|
|
203
222
|
|
|
204
|
-
// Text highlight
|
|
205
223
|
--highlight-color: var(--yellow-40);
|
|
206
224
|
--highlight-thickness: 0.4em;
|
|
207
225
|
|
|
208
|
-
//
|
|
226
|
+
// BORDERS
|
|
209
227
|
|
|
210
|
-
// Borner thicknesses
|
|
211
|
-
|
|
212
228
|
--hairline: 1px;
|
|
213
229
|
--thin: 2px;
|
|
214
230
|
--medium: 4px;
|
|
215
231
|
--thick: 8px;
|
|
216
232
|
|
|
217
|
-
//
|
|
218
|
-
--focus-color: var(--blue-40);
|
|
219
|
-
--focus-outline: var(--medium) solid var(--focus-color);
|
|
233
|
+
// FOCUS COLORS AND OUTLINES
|
|
220
234
|
|
|
221
|
-
|
|
235
|
+
--base-focus-color: var(--blue-40);
|
|
236
|
+
--focus-color: var(--base-focus-color);
|
|
222
237
|
|
|
223
|
-
|
|
238
|
+
--base-focus-outline: var(--medium) solid var(--focus-color);
|
|
239
|
+
--focus-outline: var(--base-focus-outline);
|
|
224
240
|
|
|
225
|
-
|
|
241
|
+
// ROUNDED CORNERS
|
|
226
242
|
|
|
227
|
-
|
|
243
|
+
--rounded-corners: var(--spacing-component-2);
|
|
228
244
|
|
|
229
|
-
//
|
|
245
|
+
// SHADOWS
|
|
230
246
|
|
|
231
247
|
--shadow-color: rgba(0,0,0,0.1);
|
|
232
248
|
|
|
@@ -245,9 +261,7 @@
|
|
|
245
261
|
8.6px 30px 35.1px -1.7px var(--shadow-color),
|
|
246
262
|
22.4px 77.8px 91.1px -2.5px var(--shadow-color);
|
|
247
263
|
|
|
248
|
-
//
|
|
249
|
-
|
|
250
|
-
// Background blobs
|
|
264
|
+
// BLOBS
|
|
251
265
|
|
|
252
266
|
--bg-blob-1: url("data:image/svg+xml,%3Csvg width='628' height='577' viewBox='0 0 628 577' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' 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' fill='currentColor'/%3E%3C/svg%3E");
|
|
253
267
|
|
package/src/core/typography.scss
CHANGED
|
@@ -52,8 +52,8 @@ h1, .h1, .display-1, .display-2 {
|
|
|
52
52
|
|
|
53
53
|
.regular {
|
|
54
54
|
font-family: var(--font-family-base);
|
|
55
|
-
font-size: var(--font-size
|
|
56
|
-
line-height: var(--line-height
|
|
55
|
+
font-size: var(--font-size);
|
|
56
|
+
line-height: var(--line-height);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.display-1 {
|
package/src/shared/typography.js
CHANGED
|
@@ -53,8 +53,8 @@ export const typographyStyles = css`
|
|
|
53
53
|
|
|
54
54
|
.regular {
|
|
55
55
|
font-family: var(--font-family-base);
|
|
56
|
-
font-size: var(--font-size
|
|
57
|
-
line-height: var(--line-height
|
|
56
|
+
font-size: var(--font-size);
|
|
57
|
+
line-height: var(--line-height);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.display-1 {
|