@codeforamerica/marcomms-design-system 1.18.1 → 1.19.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.
Files changed (157) hide show
  1. package/README.md +20 -15
  2. package/dist/components/accordion.js +160 -0
  3. package/dist/components/accordion.js.LICENSE.txt +11 -0
  4. package/dist/components/avatar.js +103 -0
  5. package/dist/components/avatar.js.LICENSE.txt +11 -0
  6. package/dist/components/bar.js +122 -0
  7. package/dist/components/bar.js.LICENSE.txt +11 -0
  8. package/dist/components/blob.js +133 -0
  9. package/dist/components/blob.js.LICENSE.txt +11 -0
  10. package/dist/components/box.js +99 -0
  11. package/dist/components/box.js.LICENSE.txt +11 -0
  12. package/dist/components/breadcrumbs.js +112 -0
  13. package/dist/components/breadcrumbs.js.LICENSE.txt +11 -0
  14. package/dist/components/button.js +159 -0
  15. package/dist/components/button.js.LICENSE.txt +11 -0
  16. package/dist/components/callout.js +135 -0
  17. package/dist/components/callout.js.LICENSE.txt +11 -0
  18. package/dist/components/card.js +873 -0
  19. package/dist/components/card.js.LICENSE.txt +11 -0
  20. package/dist/components/carousel.js +291 -0
  21. package/dist/components/carousel.js.LICENSE.txt +11 -0
  22. package/dist/components/icon.js +91 -0
  23. package/dist/components/icon.js.LICENSE.txt +11 -0
  24. package/dist/components/label.js +498 -0
  25. package/dist/components/label.js.LICENSE.txt +11 -0
  26. package/dist/components/logo-card.js +514 -0
  27. package/dist/components/logo-card.js.LICENSE.txt +11 -0
  28. package/dist/components/nav.js +129 -0
  29. package/dist/components/nav.js.LICENSE.txt +11 -0
  30. package/dist/components/page-nav.js +163 -0
  31. package/dist/components/page-nav.js.LICENSE.txt +11 -0
  32. package/dist/components/pager.js +707 -0
  33. package/dist/components/pager.js.LICENSE.txt +11 -0
  34. package/dist/components/pagination.js +303 -0
  35. package/dist/components/pagination.js.LICENSE.txt +11 -0
  36. package/dist/components/person-card.js +864 -0
  37. package/dist/components/person-card.js.LICENSE.txt +11 -0
  38. package/dist/components/pill.js +80 -0
  39. package/dist/components/pill.js.LICENSE.txt +11 -0
  40. package/dist/components/placeholder.js +12 -0
  41. package/dist/components/placeholder.js.LICENSE.txt +11 -0
  42. package/dist/components/promo.js +536 -0
  43. package/dist/components/promo.js.LICENSE.txt +11 -0
  44. package/dist/components/pullquote.js +89 -0
  45. package/dist/components/pullquote.js.LICENSE.txt +11 -0
  46. package/dist/components/quote.js +155 -0
  47. package/dist/components/quote.js.LICENSE.txt +11 -0
  48. package/dist/components/reveal.js +142 -0
  49. package/dist/components/reveal.js.LICENSE.txt +11 -0
  50. package/dist/components/slide.js +157 -0
  51. package/dist/components/slide.js.LICENSE.txt +11 -0
  52. package/dist/components/social-icon.js +240 -0
  53. package/dist/components/social-icon.js.LICENSE.txt +11 -0
  54. package/dist/components/stat.js +507 -0
  55. package/dist/components/stat.js.LICENSE.txt +11 -0
  56. package/dist/components/tab-list.js +688 -0
  57. package/dist/components/tab-list.js.LICENSE.txt +11 -0
  58. package/dist/components/tab.js +494 -0
  59. package/dist/components/tab.js.LICENSE.txt +11 -0
  60. package/dist/components/tile.js +662 -0
  61. package/dist/components/tile.js.LICENSE.txt +11 -0
  62. package/dist/components/transcript.js +483 -0
  63. package/dist/components/transcript.js.LICENSE.txt +11 -0
  64. package/dist/core.css +7 -0
  65. package/dist/core.js +0 -0
  66. package/dist/index.js +2328 -2328
  67. package/dist/styles.css +1 -1
  68. package/package.json +9 -3
  69. package/src/components/accordion.js +0 -141
  70. package/src/components/accordion.stories.js +0 -56
  71. package/src/components/avatar.js +0 -62
  72. package/src/components/avatar.stories.js +0 -27
  73. package/src/components/bar.js +0 -102
  74. package/src/components/bar.stories.js +0 -22
  75. package/src/components/blob.js +0 -128
  76. package/src/components/blob.stories.js +0 -73
  77. package/src/components/box.js +0 -55
  78. package/src/components/box.stories.js +0 -24
  79. package/src/components/breadcrumbs.js +0 -80
  80. package/src/components/breadcrumbs.stories.js +0 -27
  81. package/src/components/button.js +0 -163
  82. package/src/components/button.scss +0 -157
  83. package/src/components/button.stories.js +0 -49
  84. package/src/components/callout.js +0 -62
  85. package/src/components/callout.stories.js +0 -20
  86. package/src/components/card.js +0 -456
  87. package/src/components/card.stories.js +0 -227
  88. package/src/components/carousel.js +0 -662
  89. package/src/components/carousel.stories.js +0 -165
  90. package/src/components/details.scss +0 -71
  91. package/src/components/details.stories.js +0 -27
  92. package/src/components/form-elements.scss +0 -304
  93. package/src/components/form-elements.stories.js +0 -134
  94. package/src/components/icon.js +0 -44
  95. package/src/components/icon.scss +0 -32
  96. package/src/components/icon.stories.js +0 -38
  97. package/src/components/label.js +0 -63
  98. package/src/components/label.stories.js +0 -29
  99. package/src/components/link-list.scss +0 -80
  100. package/src/components/link-list.stories.js +0 -52
  101. package/src/components/loader.scss +0 -24
  102. package/src/components/loader.stories.js +0 -12
  103. package/src/components/logo-card.js +0 -93
  104. package/src/components/logo-card.stories.js +0 -48
  105. package/src/components/nav.js +0 -98
  106. package/src/components/nav.stories.js +0 -40
  107. package/src/components/page-nav.js +0 -171
  108. package/src/components/page-nav.stories.js +0 -112
  109. package/src/components/pager.js +0 -98
  110. package/src/components/pager.stories.js +0 -30
  111. package/src/components/pagination.js +0 -116
  112. package/src/components/pagination.stories.js +0 -30
  113. package/src/components/person-card.js +0 -240
  114. package/src/components/person-card.stories.js +0 -58
  115. package/src/components/pill.js +0 -33
  116. package/src/components/pill.stories.js +0 -25
  117. package/src/components/placeholder.js +0 -25
  118. package/src/components/placeholder.stories.js +0 -10
  119. package/src/components/promo.js +0 -82
  120. package/src/components/promo.stories.js +0 -37
  121. package/src/components/pullquote.js +0 -42
  122. package/src/components/pullquote.stories.js +0 -16
  123. package/src/components/quote.js +0 -111
  124. package/src/components/quote.stories.js +0 -23
  125. package/src/components/reveal.js +0 -83
  126. package/src/components/reveal.stories.js +0 -40
  127. package/src/components/slide.js +0 -122
  128. package/src/components/slide.stories.js +0 -49
  129. package/src/components/social-icon.js +0 -236
  130. package/src/components/social-icon.stories.js +0 -36
  131. package/src/components/stat.js +0 -92
  132. package/src/components/stat.stories.js +0 -28
  133. package/src/components/tab-list.js +0 -114
  134. package/src/components/tab-list.stories.js +0 -18
  135. package/src/components/tab.js +0 -95
  136. package/src/components/tab.stories.js +0 -29
  137. package/src/components/tile.js +0 -149
  138. package/src/components/tile.stories.js +0 -41
  139. package/src/components/transcript.js +0 -44
  140. package/src/components/transcript.stories.js +0 -103
  141. package/src/core/base.scss +0 -86
  142. package/src/core/colors.mdx +0 -100
  143. package/src/core/grid.mdx +0 -244
  144. package/src/core/grid.scss +0 -394
  145. package/src/core/helpers.scss +0 -111
  146. package/src/core/layout.scss +0 -97
  147. package/src/core/layout.stories.js +0 -145
  148. package/src/core/reset.scss +0 -53
  149. package/src/core/shadows.mdx +0 -108
  150. package/src/core/tokens.scss +0 -261
  151. package/src/core/typography.mdx +0 -79
  152. package/src/core/typography.scss +0 -411
  153. package/src/index.js +0 -43
  154. package/src/shared/common.js +0 -65
  155. package/src/shared/layout.js +0 -14
  156. package/src/shared/typography.js +0 -397
  157. package/src/styles.scss +0 -15
@@ -1,411 +0,0 @@
1
- @use '../components/icon';
2
-
3
- // =====
4
-
5
- // Typography spacing
6
-
7
- // Add a single space around paragraphs, blockquotes, and lists
8
- p, ul, ol, blockquote {
9
- & + * {
10
- margin-block-start: var(--spacing, var(--spacing-layout-1, 1.5rem));
11
- }
12
- * + & {
13
- margin-block-start: var(--spacing, var(--spacing-layout-1, 1.5rem));
14
- }
15
- }
16
-
17
- h1, h2, h3, h4, .h1, .h2, .h3, .h4, .display-1, .display-2 {
18
- // Add a single line space after headings
19
- & + * {
20
- margin-block-start: var(--spacing, var(--spacing-layout-1, 1.5rem));
21
- }
22
-
23
- // Add two line spaces before headings
24
- * + & {
25
- --spacing: var(--spacing-layout-2);
26
-
27
- margin-block-start: --spacing;
28
- }
29
-
30
- // Only add a single space between headings and other headings
31
- & + & {
32
- --spacing: var(--spacing-layout-1);
33
- }
34
-
35
- // Reduce space after breadcrumbs and eyebrows
36
- cfa-breadcrumbs + & {
37
- margin-block-start: var(--spacing-layout-half) !important;
38
- }
39
-
40
- .eyebrow + & {
41
- margin-block-start: 0 !important;
42
- }
43
- }
44
-
45
- h1, .h1, .display-1, .display-2 {
46
- text-wrap: balance;
47
- }
48
-
49
- // =====
50
-
51
- // Font styles
52
-
53
- .regular {
54
- font-family: var(--font-family-base);
55
- font-size: var(--font-size-base);
56
- line-height: var(--line-height-base);
57
- }
58
-
59
- .display-1 {
60
- font-family: var(--font-family-heading);
61
- font-size: var(--font-size-display-1);
62
- font-weight: bold;
63
- line-height: var(--line-height-display-1);
64
- letter-spacing: var(--letter-spacing-display-1);
65
- }
66
-
67
- .display-2 {
68
- font-family: var(--font-family-heading);
69
- font-size: var(--font-size-display-2);
70
- font-weight: bold;
71
- line-height: var(--line-height-display-2);
72
- letter-spacing: var(--letter-spacing-display-2);
73
- }
74
-
75
- h1,
76
- .h1 {
77
- font-family: var(--font-family-heading);
78
- font-size: var(--font-size-h1);
79
- font-weight: bold;
80
- line-height: var(--line-height-h1);
81
- letter-spacing: var(--letter-spacing-h1);
82
- }
83
-
84
- h2,
85
- .h2 {
86
- font-family: var(--font-family-heading);
87
- font-size: var(--font-size-h2);
88
- font-weight: bold;
89
- line-height: var(--line-height-h2);
90
- letter-spacing: var(--letter-spacing-h2);
91
- }
92
-
93
- h3,
94
- .h3 {
95
- font-family: var(--font-family-heading);
96
- font-size: var(--font-size-h3);
97
- font-weight: bold;
98
- line-height: var(--line-height-h3);
99
- letter-spacing: var(--letter-spacing-h3);
100
- }
101
-
102
- h4,
103
- .h4 {
104
- font-family: var(--font-family-heading);
105
- font-size: var(--font-size-h4);
106
- font-weight: bold;
107
- line-height: var(--line-height-h4);
108
- letter-spacing: var(--letter-spacing-h4);
109
- }
110
-
111
- .extra-large {
112
- font-size: var(--font-size-extra-large);
113
- line-height: var(--line-height-extra-large);
114
- letter-spacing: var(--letter-spacing-extra-large);
115
- }
116
-
117
- .large {
118
- font-size: var(--font-size-large);
119
- line-height: var(--line-height-large);
120
- letter-spacing: var(--letter-spacing-large);
121
- }
122
-
123
- .small {
124
- font-size: var(--font-size-small);
125
- line-height: var(--line-height-small);
126
- letter-spacing: var(--letter-spacing-small);
127
- }
128
-
129
- .eyebrow {
130
- font-family: var(--font-family-sans-serif);
131
- font-size: var(--font-size-eyebrow);
132
- font-weight: var(--font-weight-eyebrow);
133
- letter-spacing: var(--letter-spacing-eyebrow);
134
- line-height: var(--line-height-eyebrow);
135
- text-transform: uppercase;
136
- }
137
-
138
- .eyebrow-with-line {
139
- align-items: center;
140
- color: var(--text-color);
141
- display: flex;
142
- font-family: var(--font-family-eyebrow);
143
- font-size: var(--font-size-eyebrow);
144
- font-weight: var(--font-weight-eyebrow);
145
- letter-spacing: var(--letter-spacing-eyebrow);
146
- line-height: var(--line-height-eyebrow);
147
- margin-block-end: var(--spacing-layout-half);
148
- position: relative;
149
- text-transform: uppercase;
150
-
151
- &::after {
152
- border-block-end: var(--hairline) solid currentColor;
153
- content: "";
154
- flex-grow: 1;
155
- margin-left: var(--spacing-component-3);
156
- }
157
- }
158
-
159
- .subtle {
160
- opacity: 0.6;
161
- }
162
-
163
- .serif {
164
- font-family: var(--font-family-serif);
165
- }
166
-
167
- .sans-serif {
168
- font-family: var(--font-family-sans-serif);
169
- }
170
-
171
- i,
172
- em,
173
- .italic {
174
- font-style: italic;
175
- }
176
-
177
- b,
178
- strong,
179
- .strong {
180
- font-weight: bold;
181
- }
182
-
183
- .normal {
184
- font-weight: normal;
185
- }
186
-
187
- .prominent-link,
188
- a.prominent-link {
189
- --accent-color: var(--purple-60);
190
-
191
- font-weight: bold;
192
- text-decoration: underline;
193
- text-decoration-color: var(--accent-color);
194
- text-decoration-thickness: var(--medium);
195
- text-underline-offset: 0.4em;
196
- transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
197
-
198
- &:hover {
199
- --accent-color: var(--red-60);
200
- }
201
-
202
- &:not(:has(cfa-icon))::after {
203
- @include icon.icon;
204
-
205
- content: "arrow_right_alt";
206
- display: inline-block;
207
- padding-inline-start: 0.1em;
208
- text-decoration: none;
209
- transition: padding 0.2s ease-in-out;
210
- width: 1em;
211
- }
212
-
213
- &:not(:has(cfa-icon)):hover::after {
214
- padding-inline-start: 0.3em;
215
- }
216
-
217
- cfa-icon {
218
- text-decoration: none;
219
- }
220
- }
221
-
222
- .white-text,
223
- .text-light /* fallback */ {
224
- -moz-osx-font-smoothing: grayscale; // Sharper antialising for white text on a dark background
225
- -webkit-font-smoothing: antialiased; // Sharper antialising for white text on a dark background
226
- color: var(--white);
227
- --link-color: var(--white);
228
- --link-hover-color: var(--white);
229
- }
230
-
231
- // =====
232
-
233
- // Highlights
234
-
235
- .highlight {
236
- --highlight-offset: 0.2em;
237
-
238
- box-decoration-break: clone;
239
- display: inline;
240
- background: linear-gradient(to top, transparent 0%, transparent var(--highlight-offset), var(--highlight-color) var(--highlight-offset), var(--highlight-color) calc(var(--highlight-offset) + var(--highlight-thickness)), transparent calc(var(--highlight-offset) + var(--highlight-thickness)), transparent 100%);
241
- padding-inline: 0.1em;
242
- -webkit-box-decoration-break: clone;
243
- margin-inline-start: -0.1em;
244
- margin-inline-end: -0.1em;
245
- word-wrap: break-word;
246
- }
247
-
248
- // ======
249
-
250
- // Lists
251
-
252
- .ul,
253
- .content ul {
254
- list-style-type: disc;
255
- padding-left: var(--spacing-layout-1);
256
-
257
- & + *,
258
- * + & {
259
- margin-block-start: var(--spacing, var(--spacing-layout-1));
260
- }
261
-
262
- & > li {
263
- margin-inline-start: 0;
264
- padding-left: var(--spacing-component-2);
265
- }
266
-
267
- & > li + li {
268
- margin-block-start: var(--spacing-layout-half);
269
- }
270
-
271
- & > li > ul {
272
- margin-block-start: var(--spacing-layout-half);
273
- }
274
- }
275
-
276
- .ol,
277
- .content ol {
278
- list-style-type: decimal;
279
- padding-left: var(--spacing-layout-1);
280
-
281
- & + *,
282
- * + & {
283
- margin-block-start: var(--spacing, var(--spacing-layout-1));
284
- }
285
-
286
- & > li {
287
- margin-inline-start: 0;
288
- padding-inline-start: var(--spacing-component-2);
289
- }
290
-
291
- & > li + li {
292
- margin-block-start: var(--spacing-layout-half);
293
- }
294
-
295
- & > li > ul {
296
- margin-block-start: var(--spacing-layout-half);
297
- }
298
- }
299
-
300
- .ul--unstyled {
301
- list-style: none;
302
- padding: 0;
303
-
304
- & > li {
305
- margin-inline: 0;
306
- padding: 0;
307
- }
308
- }
309
-
310
- .ul--line-separators {
311
- & > li + li::before {
312
- border-block-start: 1px solid var(--gray-20);
313
- width: 100%;
314
- content: "";
315
- display: block;
316
- margin-block: var(--spacing-layout-half);
317
- }
318
- }
319
-
320
- .ul--inline {
321
- display: inline;
322
- list-style: none;
323
- padding-inline: 0 !important;
324
-
325
- & > li {
326
- display: inline-block;
327
- margin-inline-end: var(--spacing-component-3);
328
- padding: 0 !important;
329
- }
330
-
331
- li:last-child {
332
- margin-inline-end: 0;
333
- }
334
-
335
- & > li + li {
336
- margin-block-start: 0;
337
- }
338
- }
339
-
340
- .ul--inline-with-separators {
341
- @extend .ul--inline;
342
-
343
- li {
344
- margin-inline-end: 0;
345
- }
346
-
347
- & > li::after {
348
- content: '•';
349
- margin-inline: var(--spacing-component-2);
350
- opacity: 0.5;
351
- }
352
-
353
- & > li:last-child::after {
354
- content: '';
355
- }
356
- }
357
-
358
- .ul--inline-with-line-separators {
359
- @extend .ul--inline;
360
-
361
- li {
362
- margin-inline-end: 0;
363
- }
364
-
365
- & > li::after {
366
- content: '|';
367
- margin-inline: var(--spacing-component-2);
368
- opacity: 0.5;
369
- }
370
-
371
- & > li:last-child::after {
372
- content: '';
373
- }
374
- }
375
-
376
- // ===
377
-
378
- // Horizontal rule
379
-
380
- hr {
381
- --color: currentColor;
382
-
383
- background-color: var(--color);
384
- border: 0;
385
- color: var(--color);
386
- display: block;
387
- font-size: 0;
388
- height: var(--hairline);
389
- margin-block: var(--spacing-layout-1);
390
- opacity: 0.4;
391
- }
392
-
393
- // ===
394
-
395
- // Icons
396
-
397
- .icon {
398
- -webkit-font-feature-settings: 'liga';
399
- direction: ltr;
400
- display: inline-block;
401
- font-family: 'Material Symbols Rounded';
402
- font-feature-settings: 'liga';
403
- font-size: 1.4em;
404
- font-style: normal;
405
- font-weight: normal;
406
- letter-spacing: normal;
407
- text-transform: none;
408
- vertical-align: middle;
409
- white-space: nowrap;
410
- word-wrap: normal;
411
- }
package/src/index.js DELETED
@@ -1,43 +0,0 @@
1
- // Atoms
2
-
3
- import "./components/avatar.js";
4
- import "./components/blob.js";
5
- import "./components/button.js";
6
- import "./components/button.scss";
7
- import "./components/form-elements.scss";
8
- import "./components/icon.js";
9
- import "./components/icon.scss";
10
- import "./components/label.js";
11
- import "./components/loader.scss";
12
- import "./components/pill.js";
13
- import "./components/pullquote.js";
14
- import "./components/quote.js";
15
- import "./components/social-icon.js";
16
- import "./components/stat.js";
17
-
18
- // Molecules
19
-
20
- import "./components/accordion.js";
21
- import "./components/bar.js";
22
- import "./components/box.js";
23
- import "./components/breadcrumbs.js";
24
- import "./components/callout.js";
25
- import "./components/card.js";
26
- import "./components/link-list.scss";
27
- import "./components/logo-card.js";
28
- import "./components/nav.js";
29
- import "./components/page-nav.js";
30
- import "./components/pager.js";
31
- import "./components/pagination.js";
32
- import "./components/person-card.js";
33
- import "./components/promo.js";
34
- import "./components/reveal.js";
35
- import "./components/slide.js";
36
- import "./components/tab.js";
37
- import "./components/tab-list.js";
38
- import "./components/tile.js";
39
- import "./components/transcript.js";
40
-
41
- // Organisms
42
-
43
- import "./components/carousel.js";
@@ -1,65 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export const commonStyles = css`
4
- *:focus-visible,
5
- *:target {
6
- outline: var(--focus-outline);
7
- position: relative;
8
- }
9
-
10
- // RESET
11
-
12
- // Use a more-intuitive box-sizing model.
13
- *, *::before, *::after {
14
- box-sizing: border-box;
15
- }
16
-
17
- // Remove default margin
18
- * {
19
- margin: 0;
20
- }
21
-
22
- // Set default text-wrap of 'pretty'
23
- * {
24
- text-wrap: pretty;
25
- }
26
-
27
- // Wrap overly long words
28
- * {
29
- overflow-wrap: break-word;
30
- text-overflow: ellipsis;
31
- word-break: break-word;
32
- }
33
-
34
- // Fix Safari antialiasing for variable fonts
35
- * {
36
- font-synthesis: none !important;
37
- }
38
-
39
- // Improve text rendering
40
- body {
41
- -webkit-font-smoothing: antialiased;
42
- }
43
-
44
- // Reasonable media defaults
45
- img, picture, video, canvas, svg {
46
- display: block;
47
- height: auto;
48
- max-width: 100%;
49
- }
50
-
51
- // Remove built-in form typography styles
52
- input, button, textarea, select {
53
- font: inherit;
54
- }
55
-
56
- // Avoid text overflows
57
- p, h1, h2, h3, h4, h5, h6 {
58
- overflow-wrap: break-word;
59
- }
60
-
61
- // Create a root stacking context
62
- #root, #__next {
63
- isolation: isolate;
64
- }
65
- `;
@@ -1,14 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export const layoutStyles = css`
4
- .wrapper {
5
- box-sizing: border-box;
6
- margin: 0 auto;
7
- max-width: var(--grid-max-width);
8
- }
9
-
10
- .container-fluid {
11
- margin-inline: auto;
12
- padding-inline: var(--outer-margin);
13
- }
14
- `;