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