@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,24 +0,0 @@
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
- };
@@ -1,80 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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 = {};
@@ -1,163 +0,0 @@
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
-
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
- }
163
- `;
@@ -1,157 +0,0 @@
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
-
39
- @media (max-width: 768px) {
40
- .cfa-button,
41
- a.cfa-button,
42
- .cfa-button > a,
43
- .wp-block-button > * {
44
- width: 100%;
45
-
46
- & + & {
47
- margin-block-start: var(--spacing-layout-half);
48
- }
49
- }
50
-
51
- .wp-block-button {
52
- width: 100%;
53
- }
54
- }
55
-
56
- @media (min-width: 768px) {
57
- .cfa-button,
58
- a.cfa-button,
59
- .cfa-button > a,
60
- .wp-block-button > * {
61
- display: inline-block;
62
-
63
- & {
64
- margin-block: var(--spacing-component-2);
65
- margin-inline-end: var(--spacing-component-2);
66
- }
67
- }
68
- }
69
-
70
- // Themes / variants
71
-
72
- .cfa-button--primary,
73
- a.cfa-button--primary,
74
- .cfa-button--primary > a,
75
- .wp-block-button.is-style-primary > * {
76
- --bg-color: var(--red-60);
77
- --hover-bg-color: var(--red-80);
78
- --text-color: var(--white,);
79
- }
80
-
81
- .cfa-button--outline,
82
- a.cfa-button--outline,
83
- .cfa-button--outline > a,
84
- .wp-block-button.is-style-outline > * {
85
- --border-color: var(--black-20);
86
- --bg-color: transparent;
87
- }
88
-
89
- .cfa-button--outline-white,
90
- a.cfa-button--outline-white,
91
- .cfa-button--outline-white > a,
92
- .wp-block-button.is-style-outline-white > * {
93
- --border-color: var(--white);
94
- --bg-color: transparent;
95
- --hover-bg-color: var(--black-20);
96
- --shadow-color: var(--white-20);
97
- --text-color: var(--white);
98
- }
99
-
100
- .cfa-button--prominent-link,
101
- a.cfa-button--prominent-link,
102
- .cfa-button--prominent-link > a,
103
- .wp-block-button.is-style-prominent-link > * {
104
- --accent-color: var(--purple-60);
105
-
106
- background: unset;
107
- box-shadow: unset;
108
- color: inherit;
109
- font-weight: bold;
110
- padding: 0;
111
- text-decoration: underline;
112
- text-decoration-color: var(--accent-color);
113
- text-decoration-thickness: var(--medium);
114
- text-underline-offset: 0.4em;
115
- transition: color 0.2s ease-in-out, border-color 0.2s ease-in-out;
116
-
117
- &:hover {
118
- --accent-color: var(--red-60);
119
-
120
- background: unset;
121
- box-shadow: unset;
122
- }
123
-
124
- &::after {
125
- @include icon.icon;
126
-
127
- content: "arrow_right_alt";
128
- padding-inline-start: 0.1em;
129
- text-decoration: none;
130
- transition: transform 0.2s ease-in-out;
131
- width: 1em;
132
- }
133
-
134
- &:hover::after {
135
- transform: translateX(0.3em);
136
- }
137
-
138
- cfa-icon {
139
- text-decoration: none;
140
- }
141
- }
142
-
143
- // Sizes
144
-
145
- .cfa-button--sm,
146
- a.cfa-button--sm,
147
- .cfa-button--sm > a {
148
- --font-size: var(--font-size-small);
149
- --line-height: var(--line-height-small);
150
- }
151
-
152
- .cfa-button--md,
153
- a.cfa-button--md,
154
- .cfa-button--md > a {
155
- --font-size: var(--font-size-base);
156
- --line-height: var(--line-height-base);
157
- }
@@ -1,49 +0,0 @@
1
- import { html } from "lit-html";
2
- import "./button.scss";
3
-
4
- export default {
5
- title: "Atoms/Button",
6
- argTypes: {
7
- theme: {
8
- options: ["default", "primary", "outline", "outline-white", "prominent-link"],
9
- control: { type: "inline-radio" },
10
- },
11
- size: {
12
- options: ["sm", "md"],
13
- control: { type: "inline-radio" },
14
- defaultValue: "md",
15
- },
16
- },
17
- };
18
-
19
- const Template = ({ theme, size }) => html`
20
- <div class="cfa-button cfa-button--${theme} cfa-button--${size}">Submit</div>
21
- `;
22
-
23
- export const Default = Template.bind({});
24
- Default.args = {
25
- theme: "default",
26
- };
27
-
28
- export const Primary = Template.bind({});
29
- Primary.args = {
30
- theme: "primary",
31
- };
32
-
33
- export const Outline = Template.bind({});
34
- Outline.args = {
35
- theme: "outline",
36
- };
37
-
38
- export const OutlineWhite = Template.bind({});
39
- OutlineWhite.args = {
40
- theme: "outline-white",
41
- };
42
- OutlineWhite.parameters = {
43
- backgrounds: { default: "purple" },
44
- };
45
-
46
- export const ProminentLink = Template.bind({});
47
- ProminentLink.args = {
48
- theme: "prominent-link",
49
- };
@@ -1,62 +0,0 @@
1
- import { LitElement, html, css } from "lit";
2
- import { commonStyles } from "../shared/common";
3
- import "./icon";
4
-
5
- class CallOut extends LitElement {
6
- static styles = [
7
- commonStyles,
8
- css`
9
- :host {
10
- --background: var(--white);
11
- --icon-color: var(--purple-80);
12
- --link-color: var(--base-link-color);
13
- --link-hover-color: var(--base-link-hover-color);
14
- --text-color: var(--black);
15
-
16
- display: block;
17
- }
18
-
19
- .callout {
20
- align-items: flex-start;
21
- background: var(--background);
22
- box-shadow: var(--shadow-medium);
23
- color: var(--text-color);
24
- display: flex;
25
- flex-direction: row;
26
- gap: var(--spacing-component-2);
27
- padding: var(--spacing-component-3);
28
- }
29
-
30
- .icon {
31
- color: var(--icon-color);
32
- flex-direction: column;
33
- flex-grow: 0;
34
- font-size: var(--font-size-h3);
35
- height: 100%;
36
- margin-block-start: -0.075em;
37
- margin-inline-end: var(--spacing-component-2);
38
- }
39
-
40
- .callout + .callout {
41
- margin-top: var(--spacing-layout-half);
42
- }
43
- `,
44
- ];
45
-
46
- render() {
47
- return html`
48
- <div class="callout">
49
- <div class="icon">
50
- <cfa-icon>info</cfa-icon>
51
- </div>
52
- <div class="text">
53
- <slot></slot>
54
- </div>
55
- </div>
56
- `;
57
- }
58
- }
59
-
60
- if (!customElements.get("cfa-callout")) {
61
- customElements.define("cfa-callout", CallOut);
62
- }
@@ -1,20 +0,0 @@
1
- import { html } from "lit-html";
2
- import "./callout";
3
-
4
- export default {
5
- title: "Molecules/CallOut",
6
- argTypes: {
7
- text: { type: "string" },
8
- },
9
- };
10
-
11
- const Template = ({ text }) => html`
12
- <cfa-callout>
13
- <div .innerHTML="${text}"></div>
14
- </cfa-callout>
15
- `;
16
-
17
- export const Default = Template.bind({});
18
- Default.args = {
19
- text: 'It’s not time to go back to “normal,” but to reimagine the status quo. <a href="#">Learn more</a>',
20
- };