@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,165 +0,0 @@
1
- import { html } from "lit-html";
2
- import "./carousel";
3
- import "./card";
4
- import "./slide";
5
-
6
- export default {
7
- title: "Organisms/Carousel",
8
- };
9
-
10
- const Template = () => html`
11
- <cfa-carousel>
12
- <cfa-card
13
- visualType="image"
14
- visualUrl="https://codeforamerica.org/wp-content/uploads/2022/03/parents-with-child-768x427.png"
15
- visualAltText="Illustration of three adults embracing and smiling"
16
- title="Automatic record clearance"
17
- text="Working with communities and government to fundamentally transform the process of clearing records."
18
- actionLabel="Learn more"
19
- >
20
- </cfa-card>
21
- <cfa-card
22
- visualType="image"
23
- visualUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_grocery-768x576.png"
24
- visualAltText="Illustration of groceries in a shopping basket and paper bag"
25
- title="Food benefits"
26
- text="Improving access to food assistance and delivery of benefits."
27
- actionLabel="Learn more"
28
- >
29
- </cfa-card>
30
- <cfa-card
31
- visualType="image"
32
- visualUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_family-dinner-768x505.png"
33
- visualAltText="Illustration of two children and a child seated at a table, with a notebook and a pencil on the table, the adult pouring into a glass from a pitcher"
34
- title="Integrated benefits applications"
35
- text="Making it easier for people and families to access all their benefits in one place."
36
- actionLabel="Learn more"
37
- >
38
- </cfa-card>
39
- <cfa-card
40
- visualType="image"
41
- visualUrl="https://files.codeforamerica.org/2021/05/28124704/illustration_friends-talking-768x518.png"
42
- visualAltText="Illustration of three adults having a conversation"
43
- title="Training and capacity building"
44
- text="Helping government serve people in a more human-centered way."
45
- actionLabel="Learn more"
46
- >
47
- </cfa-card>
48
- <cfa-card
49
- visualType="image"
50
- visualUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_on-the-phone-2-768x576.png"
51
- visualAltText="Illustration of an adult and child reading together"
52
- title="Free, trustworthy tax services"
53
- text="Helping people achieve the financial stability they deserve."
54
- actionLabel="Learn more"
55
- >
56
- </cfa-card>
57
- </cfa-carousel>
58
- `;
59
-
60
- export const Default = Template.bind({});
61
- Default.args = {};
62
-
63
- const SlidesTemplate = () => html`
64
- <cfa-carousel itemsPerView="1">
65
- <cfa-slide
66
- imageUrl="https://codeforamerica.org/wp-content/uploads/2022/03/parents-with-child-768x427.png"
67
- imageAltText="Illustration of three adults embracing and smiling"
68
- linkUrl="#"
69
- >
70
- <h2>Automatic record clearance</h2>
71
- <p>Working with communities and government to fundamentally transform the process of clearing records.</p>
72
- </cfa-slide>
73
- <cfa-slide
74
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_grocery-768x576.png"
75
- imageAltText="Illustration of groceries in a shopping basket and paper bag"
76
- linkUrl="#"
77
- >
78
- <h2>Food benefits</h2>
79
- <p>Improving access to food assistance and delivery of benefits.</p>
80
- </cfa-slide>
81
- <cfa-slide
82
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_family-dinner-768x505.png"
83
- imageAltText="Illustration of two children and an adult seated at a table"
84
- linkUrl="#"
85
- >
86
- <h2>Integrated benefits applications</h2>
87
- <p>Making it easier for people and families to access all their benefits in one place.</p>
88
- </cfa-slide>
89
- <cfa-slide
90
- imageUrl="https://files.codeforamerica.org/2021/05/28124704/illustration_friends-talking-768x518.png"
91
- imageAltText="Illustration of three adults having a conversation"
92
- linkUrl="#"
93
- >
94
- <h2>Training and capacity building</h2>
95
- <p>Helping government serve people in a more human-centered way.</p>
96
- </cfa-slide>
97
- <cfa-slide
98
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_on-the-phone-2-768x576.png"
99
- imageAltText="Illustration of an adult and child reading together"
100
- linkUrl="#"
101
- >
102
- <h2>Free, trustworthy tax services</h2>
103
- <p>Helping people achieve the financial stability they deserve.</p>
104
- </cfa-slide>
105
- <cfa-slide
106
- imageUrl="https://codeforamerica.org/wp-content/uploads/2022/03/parents-with-child-768x427.png"
107
- imageAltText="Illustration showing community support"
108
- linkUrl="#"
109
- >
110
- <h2>Slide 6 - Community Support</h2>
111
- <p>Building stronger communities through technology and human-centered design.</p>
112
- </cfa-slide>
113
- <cfa-slide
114
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_grocery-768x576.png"
115
- imageAltText="Illustration representing accessibility"
116
- linkUrl="#"
117
- >
118
- <h2>Slide 7 - Accessibility</h2>
119
- <p>Ensuring digital services are accessible to everyone.</p>
120
- </cfa-slide>
121
- <cfa-slide
122
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_family-dinner-768x505.png"
123
- imageAltText="Illustration of family engagement"
124
- linkUrl="#"
125
- >
126
- <h2>Slide 8 - Family Engagement</h2>
127
- <p>Strengthening family connections through innovative services.</p>
128
- </cfa-slide>
129
- <cfa-slide
130
- imageUrl="https://files.codeforamerica.org/2021/05/28124704/illustration_friends-talking-768x518.png"
131
- imageAltText="Illustration of partnership and collaboration"
132
- linkUrl="#"
133
- >
134
- <h2>Slide 9 - Partnership</h2>
135
- <p>Working collaboratively with partners to create lasting impact.</p>
136
- </cfa-slide>
137
- <cfa-slide
138
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_on-the-phone-2-768x576.png"
139
- imageAltText="Illustration representing digital transformation"
140
- linkUrl="#"
141
- >
142
- <h2>Slide 10 - Digital Transformation</h2>
143
- <p>Modernizing government services for the digital age.</p>
144
- </cfa-slide>
145
- <cfa-slide
146
- imageUrl="https://codeforamerica.org/wp-content/uploads/2022/03/parents-with-child-768x427.png"
147
- imageAltText="Illustration of inclusive design"
148
- linkUrl="#"
149
- >
150
- <h2>Slide 11 - Inclusive Design</h2>
151
- <p>Creating services that work for everyone, including the most vulnerable.</p>
152
- </cfa-slide>
153
- <cfa-slide
154
- imageUrl="https://files.codeforamerica.org/2021/05/28124702/illustration_grocery-768x576.png"
155
- imageAltText="Illustration of sustainable solutions"
156
- linkUrl="#"
157
- >
158
- <h2>Slide 12 - Sustainable Solutions</h2>
159
- <p>Building scalable systems that create lasting positive change.</p>
160
- </cfa-slide>
161
- </cfa-carousel>
162
- `;
163
-
164
- export const Slides = SlidesTemplate.bind({});
165
- Slides.args = {};
@@ -1,71 +0,0 @@
1
- @use './icon';
2
-
3
- details {
4
- --color: var(--purple-60);
5
- --hover-bg-color: var(--blue-20);
6
-
7
- display: block;
8
- max-width: var(--column-span-8);
9
- margin-inline: auto;
10
- border-block: var(--hairline) solid var(--gray-40);
11
- padding-inline: var(--spacing-component-3);
12
- }
13
-
14
- details[open] {
15
- padding-block-end: var(--spacing-layout-half);
16
- }
17
-
18
- details[open] > summary {
19
- margin-block-end: var(--spacing-layout-half);
20
- }
21
-
22
- details + details {
23
- margin-block-start: -1px !important;
24
- }
25
-
26
- details > summary {
27
- align-items: center;
28
- color: var(--color);
29
- cursor: pointer;
30
- display: block;
31
- flex-direction: row;
32
- font-weight: bold;
33
- padding-block: var(--spacing-component-3);
34
- padding-right: var(--spacing-component-4);
35
- position: relative;
36
- }
37
-
38
- details > summary:hover {
39
- background-color: var(--hover-bg-color);
40
- box-shadow:
41
- var(--spacing-component-3) 0 var(--blue-20),
42
- calc(-1 * var(--spacing-component-3)) 0 var(--blue-20);
43
- }
44
-
45
- summary::after {
46
- @include icon.icon;
47
-
48
- content: 'expand_more';
49
- display: block;
50
- height: 1rem;
51
- line-height: 1rem;
52
- margin-top: -0.5rem;
53
- position: absolute;
54
- right: 0;
55
- text-align: right;
56
- top: 50%;
57
- }
58
-
59
- @media (prefers-reduced-motion: no-preference) {
60
- summary::after {
61
- transition: transform 0.2s;
62
- }
63
- }
64
-
65
- details[open] > summary::after {
66
- transform: rotate(180deg);
67
- }
68
-
69
- details > summary + * {
70
- margin-block-start: 0 !important;
71
- }
@@ -1,27 +0,0 @@
1
- import { html } from "lit-html";
2
- import "./details.scss";
3
-
4
- export default {
5
- title: "Molecules/Details",
6
- argTypes: {
7
- summary: { type: "string" },
8
- text: { type: "string" },
9
- },
10
- };
11
-
12
- const Template = ({ summary, text }) => html`
13
- <details>
14
- <summary>${summary}</summary>
15
- <p>${text}</p>
16
- </details>
17
- <details>
18
- <summary>${summary}</summary>
19
- <p>${text}</p>
20
- </details>
21
- `;
22
-
23
- export const Default = Template.bind({});
24
- Default.args = {
25
- summary: "Details",
26
- text: "Something small enough to escape casual notice.",
27
- };
@@ -1,304 +0,0 @@
1
- @use './icon';
2
-
3
- // Form
4
-
5
- .cfa-form {
6
- --bg-color: var(--white);
7
-
8
- background-color: var(--bg-color);
9
- box-shadow: var(--shadow-medium);
10
- }
11
-
12
- // Fieldset
13
-
14
- .cfa-fieldset {
15
- border: 0;
16
- margin: 0;
17
- padding: 0;
18
-
19
- & > * + * {
20
- margin-block-start: var(--spacing-layout-half);
21
- }
22
-
23
- legend {
24
- font-weight: bold;
25
- }
26
- }
27
-
28
- // Form group
29
-
30
- .cfa-form-group {
31
- & > * {
32
- display: block;
33
- }
34
- & + & {
35
- margin-block-start: var(--spacing-layout-1);
36
- }
37
- }
38
-
39
- // Input container
40
-
41
- .cfa-input-container {
42
- max-width: 100%;
43
- width: min(var(--column-span-6), 100%);
44
-
45
- &:focus-within {
46
- outline: var(--focus-outline);
47
- }
48
-
49
- & > * {
50
- display: block;
51
- width: 100%;
52
- }
53
- }
54
-
55
- // Label
56
-
57
- .cfa-label {
58
- flex: 1;
59
- flex-grow: 1;
60
- font-weight: bold;
61
- padding-inline-end: var(--spacing-component-2);
62
- padding-block: var(--spacing-component-2)
63
- }
64
-
65
- // Select
66
-
67
- .cfa-select {
68
- appearance: none;
69
- background-color: var(--white, #fff);
70
- background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
71
- background-position-x: calc(100% - 5px);
72
- background-position-y: 50%;
73
- background-repeat: no-repeat;
74
- border-radius: 0;
75
- border: var(--thin) solid var(--black, #000);
76
- color: var(--black, #fff);
77
- display: block;
78
- font-family: var(--font-family-sans-serif);
79
- font-size: 1rem;
80
- font-weight: normal;
81
- padding-block: var(--spacing-component-2);
82
- padding-inline: var(--spacing-component-3);
83
- max-width: 100%;
84
- position: relative;
85
-
86
- &:focus {
87
- outline: none;
88
- }
89
- }
90
-
91
- // Multiselect
92
-
93
- .cfa-multiselect {
94
- background-color: var(--white);
95
- border-radius: 0;
96
- border: var(--thin) solid var(--black);
97
- box-shadow: inset 0 var(--thin) 0 rgb(0 0 0 / 15%);
98
- font-family: var(--font-family-sans-serif);
99
- font-size: 1rem;
100
- font-weight: bold;
101
- min-width: var(--column-span-3);
102
- max-width: 100%;
103
-
104
- &:focus {
105
- outline: none;
106
- }
107
-
108
- option {
109
- padding-block: var(--spacing-component-2);
110
- padding-inline: var(--spacing-component-3);
111
- }
112
-
113
- option:focus,
114
- option:checked {
115
- background-color: var(--green-20);
116
- }
117
-
118
- }
119
-
120
- // Text field
121
-
122
- %text-field {
123
- background-color: var(--white);
124
- border-radius: 0;
125
- border: var(--thin) solid var(--black);
126
- box-shadow: inset 0px var(--thin) 0px rgb(0 0 0 / 15%);
127
- font-family: var(--font-family-sans-serif);
128
- font-size: 1rem;
129
- font-weight: normal;
130
- padding-block: var(--spacing-component-2);
131
- padding-inline: var(--spacing-component-3);
132
- max-width: 100%;
133
- }
134
-
135
- // Text input
136
-
137
- .cfa-text-input {
138
- @extend %text-field;
139
-
140
- &:focus {
141
- outline: none;
142
- }
143
- }
144
-
145
- // Text area
146
-
147
- .cfa-text-area {
148
- @extend %text-field;
149
-
150
- height: var(--spacing-layout-4);
151
- padding: var(--spacing-component-3);
152
-
153
- &:focus {
154
- outline: none;
155
- }
156
- }
157
-
158
- // Checkbox
159
-
160
- .cfa-checkbox {
161
- align-items: start;
162
- background-color: var(--white);
163
- border: var(--thin) solid var(--black);
164
- display: flex;
165
- flex-direction: row;
166
- font-size: var(--font-size-base);
167
- gap: var(--spacing-component-2);
168
- line-height: var(--line-height-base);
169
-
170
- &:has(input:checked){
171
- background-color: var(--green-20);
172
- }
173
-
174
- & + & {
175
- margin-block-start: var(--spacing-layout-half);
176
- }
177
-
178
- input {
179
- appearance: none;
180
- flex-basis: 1.5rem;
181
- flex-grow: 0;
182
- }
183
-
184
- input:focus {
185
- outline: none;
186
- }
187
-
188
- input::before {
189
- @include icon.icon;
190
-
191
- background-color: var(--white);
192
- border-radius: 10%;
193
- content: "check_box_outline_blank";
194
- flex-basis: 1.5rem;
195
- flex-grow: 0;
196
- font-size: 1.2rem;
197
- line-height: 1em;
198
- margin-block-start: calc(var(--line-height-base)/2 - 0.25rem);
199
- margin-inline-start: var(--spacing-component-2);
200
- text-align: center;
201
- width: 1.2rem;
202
- }
203
-
204
- input:checked::before {
205
- content: "check_box";
206
- }
207
-
208
- label {
209
- font-weight: normal;
210
- }
211
- }
212
-
213
- // Radio button
214
-
215
- .cfa-radio-button {
216
- align-items: start;
217
- background-color: var(--white);
218
- border: var(--thin) solid var(--black);
219
- display: flex;
220
- flex-direction: row;
221
- font-size: var(--font-size-base);
222
- gap: var(--spacing-component-2);
223
- line-height: var(--line-height-base);
224
-
225
- &:has(input:checked){
226
- background-color: var(--green-20);
227
- }
228
-
229
- & + & {
230
- margin-block-start: var(--spacing-layout-half);
231
- }
232
-
233
- input {
234
- appearance: none;
235
- flex-basis: 1.5rem;
236
- flex-grow: 0;
237
- }
238
-
239
- input:focus {
240
- outline: none;
241
- }
242
-
243
- input::before {
244
- @include icon.icon;
245
-
246
- background-color: var(--white);
247
- border-radius: 50%;
248
- content: "radio_button_unchecked";
249
- overflow: hidden;
250
- flex-basis: 1.5rem;
251
- font-size: 1.2rem;
252
- line-height: 1.2rem;
253
- margin-block-start: calc(var(--line-height-base)/2 - 0.25rem);
254
- margin-inline-start: var(--spacing-component-2);
255
- text-align: center;
256
- width: 1.2rem;
257
- }
258
-
259
- input:checked::before {
260
- content: "radio_button_checked";
261
- }
262
-
263
- label {
264
- font-weight: normal;
265
- }
266
- }
267
-
268
- // =====
269
-
270
- // Date picker
271
-
272
- .ui-datepicker {
273
- background-color: var(--white);
274
- border: solid 1px var(--gray-20);
275
- box-shadow: var(--shadow-slight);
276
- font-size: var(--font-size-small);
277
- letter-spacing: var(--letter-spacing-small);
278
- padding: var(--spacing-component-3);
279
- text-align: center;
280
-
281
- a:link {
282
- text-decoration: none;
283
- }
284
- }
285
-
286
- .ui-datepicker-header {
287
- display: flex;
288
- flex-direction: row;
289
- margin-block-end: var(--spacing-component-3);
290
-
291
- & > * {
292
- flex-grow: 1;
293
- }
294
-
295
- .ui-datepicker-title {
296
- flex-grow: 0;
297
- }
298
- }
299
-
300
- .ui-datepicker-calendar {
301
- td {
302
- padding: var(--spacing-component-2);
303
- }
304
- }
@@ -1,134 +0,0 @@
1
- import { html } from "lit-html";
2
- import "./form-elements.scss";
3
-
4
- export default {
5
- title: "Atoms/FormElements",
6
- argTypes: {},
7
- };
8
-
9
- const Template = () => html`
10
- <div class="row">
11
- <div class="col-xs-12 col-md-6">
12
- <div class="cfa-form-group">
13
- <label for="text-input-example" class="cfa-label"
14
- >What would you like to tell us about apples?</label
15
- >
16
- <div class="cfa-input-container">
17
- <input id="text-input-example" class="cfa-text-input" type="text" />
18
- </div>
19
- </div>
20
- <div class="cfa-form-group">
21
- <div class="cfa-input-container">
22
- <select class="cfa-select">
23
- <option value="" disabled selected>Select your option</option>
24
- <option value="1">Option 1</option>
25
- <option value="2">Option 2</option>
26
- </select>
27
- </div>
28
- </div>
29
- <div class="cfa-form-group">
30
- <div class="cfa-input-container">
31
- <select class="cfa-multiselect" multiple>
32
- <option value="" disabled selected>Select your option</option>
33
- <option value="1">Option 1</option>
34
- <option value="2">Option 2</option>
35
- </select>
36
- </div>
37
- </div>
38
- <div class="cfa-form-group">
39
- <div class="cfa-input-container">
40
- <textarea class="cfa-text-area" placeholder="Text Area"></textarea>
41
- </div>
42
- </div>
43
- <div class="cfa-form-group">
44
- <fieldset class="cfa-fieldset">
45
- <legend>Which newsletters would you like to receive?</legend>
46
- <div class="cfa-input-container cfa-checkbox">
47
- <input
48
- type="checkbox"
49
- id="checkbox-example-1"
50
- name="checkbox1"
51
- value="marketing"
52
- />
53
- <label for="checkbox-example-1" class="cfa-label"
54
- >Marketing updates</label
55
- >
56
- </div>
57
- <div class="cfa-input-container cfa-checkbox">
58
- <input
59
- type="checkbox"
60
- id="checkbox-example-2"
61
- name="checkbox2"
62
- value="safety-net"
63
- />
64
- <label for="checkbox-example-2" class="cfa-label"
65
- >Safety net updates</label
66
- >
67
- </div>
68
- <div class="cfa-input-container cfa-checkbox">
69
- <input
70
- type="checkbox"
71
- id="checkbox-example-3"
72
- name="checkbox3"
73
- value="tax-benefits"
74
- />
75
- <label for="checkbox-example-3" class="cfa-label"
76
- >Tax benefits updates</label
77
- >
78
- </div>
79
- </fieldset>
80
- </div>
81
- <div class="cfa-form-group">
82
- <fieldset class="cfa-fieldset">
83
- <div class="cfa-input-container cfa-checkbox">
84
- <input
85
- type="checkbox"
86
- id="checkbox-example-4"
87
- name="checkbox1"
88
- value="consent"
89
- />
90
- <label for="checkbox-example-4" class="cfa-label"
91
- >I agree to receive direct communications from Code for America,
92
- and to the privacy policy.</label
93
- >
94
- </div>
95
- </fieldset>
96
- </div>
97
- <div class="cfa-form-group">
98
- <fieldset class="cfa-fieldset">
99
- <legend>What's the best way to reach you?</legend>
100
- <div class="cfa-input-container cfa-radio-button">
101
- <input
102
- type="radio"
103
- id="radio-example-1"
104
- name="radio1"
105
- value="email"
106
- />
107
- <label for="radio-example-1" class="cfa-label">Email</label>
108
- </div>
109
- <div class="cfa-input-container cfa-radio-button">
110
- <input
111
- type="radio"
112
- id="radio-example-2"
113
- name="radio1"
114
- value="text-message"
115
- />
116
- <label for="radio-example-2" class="cfa-label">Text message</label>
117
- </div>
118
- <div class="cfa-input-container cfa-radio-button">
119
- <input
120
- type="radio"
121
- id="radio-example-3"
122
- name="radio1"
123
- value="phone-call"
124
- />
125
- <label for="radio-example-3" class="cfa-label">Phone call</label>
126
- </div>
127
- </fieldset>
128
- </div>
129
- </div>
130
- </div>
131
- `;
132
-
133
- export const Default = Template.bind({});
134
- Default.args = {};