@teamimpact/veda-ui-blocks 0.1.0-beta.7 → 0.1.0-beta.9

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 (35) hide show
  1. package/README.md +6 -3
  2. package/dist/default.css +11280 -10085
  3. package/dist/default.css.map +1 -1
  4. package/dist/disasters.css +11278 -10083
  5. package/dist/disasters.css.map +1 -1
  6. package/dist/index.d.ts +169 -68
  7. package/dist/index.js +713 -152
  8. package/package.json +5 -7
  9. package/src/styles/components/banner.scss +0 -18
  10. package/src/styles/components/card-cta.scss +0 -90
  11. package/src/styles/components/card-detailed.scss +0 -164
  12. package/src/styles/components/card-mini.scss +0 -81
  13. package/src/styles/components/card-simple.scss +0 -79
  14. package/src/styles/components/card.scss +0 -284
  15. package/src/styles/components/compare-map.scss +0 -15
  16. package/src/styles/components/footer.scss +0 -256
  17. package/src/styles/components/header.scss +0 -212
  18. package/src/styles/components/index.scss +0 -11
  19. package/src/styles/components/tag.scss +0 -89
  20. package/src/styles/default/index.scss +0 -10
  21. package/src/styles/default/theme-tokens.scss +0 -84
  22. package/src/styles/disasters/card-cta.scss +0 -31
  23. package/src/styles/disasters/card-mini.scss +0 -4
  24. package/src/styles/disasters/card-simple.scss +0 -13
  25. package/src/styles/disasters/card.scss +0 -13
  26. package/src/styles/disasters/compare-map.scss +0 -3
  27. package/src/styles/disasters/fonts.scss +0 -29
  28. package/src/styles/disasters/footer.scss +0 -9
  29. package/src/styles/disasters/header.scss +0 -10
  30. package/src/styles/disasters/index.scss +0 -22
  31. package/src/styles/disasters/tag.scss +0 -6
  32. package/src/styles/disasters/theme-tokens.scss +0 -150
  33. package/src/styles/earthgov/footer.scss +0 -15
  34. package/src/styles/earthgov/index.scss +0 -12
  35. package/src/styles/earthgov/theme-tokens.scss +0 -104
@@ -1,212 +0,0 @@
1
- @use "uswds-core" as *;
2
- $theme-header-bgcolor: $theme-body-background-color !default;
3
- $theme-header-primary-link-text-color: "ink" !default;
4
- $theme-header-primary-link-hover-border-color: "primary" !default;
5
- $theme-header-mobile-link-hover-bgcolor: "base-lightest" !default;
6
- $theme-header-primary-button-link-text-color: $theme-text-reverse-color !default;
7
- $theme-header-primary-button-link-bgcolor: "primary" !default;
8
- $theme-header-primary-button-link-hover-bgcolor: "primary-dark" !default;
9
-
10
- // LAYOUT
11
- .blocks-header.usa-header--basic {
12
- // remove the default divider border on USWDS header
13
- + .usa-hero,
14
- + .usa-section,
15
- + main {
16
- @include at-media($theme-header-min-width) {
17
- border-top: none;
18
- }
19
- }
20
-
21
- .usa-nav-container {
22
- align-items: center;
23
- display: flex;
24
- padding-top: units(1);
25
- padding-bottom: units(1);
26
- @include grid-container($theme-header-max-width);
27
-
28
- .usa-navbar {
29
- border-bottom: none;
30
- flex: 1;
31
-
32
- .usa-menu-btn {
33
- height: 100%;
34
- }
35
- }
36
-
37
- @include at-media("desktop") {
38
- .usa-nav {
39
- padding: 0;
40
- width: auto;
41
- }
42
- }
43
- }
44
-
45
- .blocks-header__portal-details {
46
- align-items: center;
47
- display: flex;
48
- flex: 1 1 0%;
49
- flex-direction: row;
50
- gap: units(2);
51
-
52
- .blocks-header__portal-logo {
53
- display: inline-flex;
54
- }
55
-
56
- .usa-logo {
57
- margin: 0;
58
- line-height: normal;
59
- }
60
- }
61
-
62
- .usa-nav__close {
63
- cursor: pointer;
64
- }
65
-
66
- a.blocks-header__custom-nav-item {
67
- margin-right: 0;
68
- }
69
-
70
- .usa-nav__primary {
71
- @include at-media-max($theme-header-min-width) {
72
- margin-top: units(3);
73
- order: 2;
74
- }
75
-
76
- .usa-nav__primary-item {
77
- .usa-nav__link {
78
- padding: units(2);
79
- }
80
-
81
- @include at-media("desktop") {
82
- > button.usa-nav__link {
83
- &:hover,
84
- &.usa-current {
85
- &:after {
86
- bottom: units(0.5);
87
- content: "";
88
- display: block;
89
- height: 0.25rem;
90
- left: 1rem;
91
- position: absolute;
92
- right: 1rem;
93
- }
94
- }
95
- &:focus {
96
- outline-offset: units(-1);
97
- }
98
- }
99
-
100
- > a.usa-nav__link {
101
- &:hover,
102
- &.usa-current {
103
- &:after {
104
- bottom: units(0.5);
105
- }
106
- }
107
- &:focus {
108
- outline-offset: units(-1);
109
- }
110
- }
111
- }
112
- }
113
-
114
- @include at-media("desktop") {
115
- .usa-nav__submenu {
116
- margin-top: 4px;
117
- padding-left: units(2);
118
- padding-right: units(2);
119
-
120
- .usa-nav__submenu-item a {
121
- padding: units(2);
122
- }
123
- }
124
- }
125
- }
126
- }
127
-
128
- // THEME
129
- .blocks-header.usa-header--basic {
130
- background-color: color($theme-header-bgcolor);
131
-
132
- .blocks-header__portal-details {
133
- a {
134
- color: color($theme-header-primary-link-text-color);
135
- }
136
- }
137
-
138
- .usa-nav.is-visible {
139
- background-color: color($theme-header-bgcolor);
140
-
141
- .usa-nav__primary {
142
- button,
143
- a {
144
- &:hover {
145
- background-color: color($theme-header-mobile-link-hover-bgcolor);
146
- }
147
- }
148
- }
149
- }
150
-
151
- .usa-menu-btn {
152
- color: color($theme-header-primary-button-link-text-color);
153
- background-color: color($theme-header-primary-button-link-bgcolor);
154
- &:hover {
155
- background-color: color($theme-header-primary-button-link-hover-bgcolor);
156
- }
157
- }
158
-
159
- a.blocks-header__custom-nav-item {
160
- background-color: color($theme-header-primary-button-link-bgcolor);
161
- color: color($theme-header-primary-button-link-text-color);
162
- font-size: size("body", "2xs");
163
-
164
- &:hover {
165
- background-color: color($theme-header-primary-button-link-hover-bgcolor);
166
- }
167
- }
168
-
169
- .usa-nav__primary {
170
- .usa-nav__primary-item {
171
- > a.usa-nav__link {
172
- color: color($theme-header-primary-link-text-color);
173
- &.usa-current,
174
- &:hover {
175
- &:after {
176
- background-color: color($theme-header-primary-link-hover-border-color);
177
- }
178
- }
179
- }
180
-
181
- > button.usa-nav__link {
182
- @include at-media("desktop") {
183
- background-color: transparent;
184
- }
185
-
186
- color: color($theme-header-primary-link-text-color);
187
-
188
- &:hover,
189
- &.usa-current {
190
- &:after {
191
- background-color: color($theme-header-primary-link-hover-border-color);
192
- }
193
- }
194
-
195
- > span::after {
196
- background-color: color($theme-header-primary-link-text-color);
197
- }
198
- }
199
- }
200
-
201
- .usa-nav__submenu {
202
- background-color: color($theme-header-bgcolor);
203
-
204
- .usa-nav__submenu-item > a {
205
- color: color($theme-header-primary-link-text-color);
206
- @include at-media("desktop") {
207
- font-weight: $theme-font-weight-bold;
208
- }
209
- }
210
- }
211
- }
212
- }
@@ -1,11 +0,0 @@
1
- // Shared partials consumed by each theme entry after USWDS is loaded.
2
- @use "banner";
3
- @use "compare-map";
4
- @use "card";
5
- @use "card-cta";
6
- @use "card-detailed";
7
- @use "card-mini";
8
- @use "card-simple";
9
- @use "footer";
10
- @use "header";
11
- @use "tag";
@@ -1,89 +0,0 @@
1
- @use "uswds-core" as *;
2
-
3
- $theme-tag-border-radius: "sm" !default;
4
- $theme-tag-font-family: "mono" !default;
5
- $theme-tag-text-transform: none !default;
6
- $theme-tag-color: "base" !default;
7
- $theme-tag-solid-text-color: "white" !default;
8
-
9
- //LAYOUT
10
- .blocks-tag {
11
- align-items: center;
12
- flex-direction: row;
13
- display: inline-flex;
14
- gap: units(0.5);
15
- padding: units(0.5);
16
-
17
- &--big {
18
- padding: units(1);
19
- }
20
-
21
- &__icon,
22
- &__close-button {
23
- display: inline-flex;
24
- align-items: center;
25
- color: inherit;
26
-
27
- :where(svg, .usa-icon) {
28
- height: 1em;
29
- vertical-align: middle;
30
- width: auto;
31
- color: inherit;
32
- fill: currentColor;
33
- stroke: currentColor;
34
- }
35
-
36
- :where(path) {
37
- fill: currentColor;
38
- stroke: currentColor;
39
- }
40
- }
41
-
42
- &__close-button {
43
- border: 0;
44
- padding: 0;
45
- background: transparent;
46
- cursor: pointer;
47
- line-height: 1;
48
- color: inherit;
49
- }
50
- }
51
-
52
- // THEME
53
- .blocks-tag {
54
- border-radius: radius($theme-tag-border-radius);
55
- border: 1px solid transparent;
56
- font-family: family($theme-tag-font-family);
57
- font-size: size($theme-tag-font-family, "3xs");
58
- font-weight: font-weight("normal");
59
- line-height: lh($theme-tag-font-family, 2);
60
- text-transform: $theme-tag-text-transform;
61
-
62
- &--solid {
63
- color: var(--blocks-tag-custom-text-color, #{color($theme-tag-solid-text-color)});
64
- background-color: var(--blocks-tag-custom-color, #{color($theme-tag-color)});
65
- border-color: var(--blocks-tag-custom-color, #{color($theme-tag-color)});
66
- }
67
-
68
- &--outline {
69
- color: var(
70
- --blocks-tag-custom-text-color,
71
- var(--blocks-tag-custom-color, #{color($theme-tag-color)})
72
- );
73
- background-color: color("transparent");
74
- border-color: var(--blocks-tag-custom-color, #{color($theme-tag-color)});
75
- }
76
-
77
- &--text {
78
- color: var(
79
- --blocks-tag-custom-text-color,
80
- var(--blocks-tag-custom-color, #{color($theme-tag-color)})
81
- );
82
- background-color: transparent;
83
- border-color: transparent;
84
- }
85
-
86
- &--big {
87
- font-size: size($theme-tag-font-family, "2xs");
88
- }
89
- }
@@ -1,10 +0,0 @@
1
- // Default USWDS theme manifest
2
-
3
- // 1. Forward theme token configuration first (must be before uswds-core/@forward)
4
- @forward "theme-tokens";
5
-
6
- // 2. Then forward USWDS itself
7
- @forward "uswds";
8
-
9
- // 3. Forward all custom component styles via default theme component style aggregator
10
- @forward "../components/index";
@@ -1,84 +0,0 @@
1
- // Default USWDS theme configuration
2
- @use "uswds-core" with (
3
- // GENERAL SETTINGS
4
- // https://designsystem.digital.gov/documentation/settings/#general-settings-2
5
- $theme-show-notifications: false,
6
- $theme-show-compile-warnings: false,
7
- $theme-image-path: "./img",
8
-
9
- // COLOR SETTINGS
10
- // https://designsystem.digital.gov/documentation/settings/#color-settings-2
11
- // uses USWDS default color palette
12
- // COMPONENT SETTINGS
13
- // https://designsystem.digital.gov/documentation/settings/#component-settings-2
14
- $theme-banner-max-width: "desktop-lg",
15
- $theme-header-max-width: "desktop-lg",
16
- $theme-footer-max-width: "desktop-lg",
17
-
18
- // SPACING SETTINGS
19
- // https://designsystem.digital.gov/documentation/settings/#spacing-settings-2
20
- $theme-grid-container-max-width: "desktop-lg",
21
- $theme-site-margins-breakpoint: "desktop-lg",
22
- $theme-site-margins-width: 4,
23
- $theme-site-margins-mobile-width: 2,
24
-
25
- // TYPE SETTINGS
26
- // https: //designsystem.digital.gov/documentation/settings/#typography-settings-2
27
- $theme-font-path: "./fonts",
28
- $theme-font-type-mono: "roboto-mono",
29
- $theme-font-type-sans: "public-sans",
30
- $theme-font-type-serif: "merriweather",
31
-
32
- $theme-font-role-ui: "sans",
33
- $theme-font-role-heading: "serif",
34
- $theme-font-role-body: "sans",
35
- $theme-font-role-code: "mono",
36
- $theme-font-role-alt: "serif",
37
-
38
- $theme-type-scale-3xs: 1,
39
- $theme-type-scale-2xs: 3,
40
- $theme-type-scale-xs: 4,
41
- $theme-type-scale-sm: 5,
42
- $theme-type-scale-md: 7,
43
- $theme-type-scale-lg: 9,
44
- $theme-type-scale-xl: 12,
45
- $theme-type-scale-2xl: 14,
46
- $theme-type-scale-3xl: 15,
47
-
48
- $theme-font-weight-thin: false,
49
- $theme-font-weight-light: 300,
50
- $theme-font-weight-normal: 400,
51
- $theme-font-weight-medium: false,
52
- $theme-font-weight-semibold: 600,
53
- $theme-font-weight-bold: 700,
54
- $theme-font-weight-heavy: 900,
55
-
56
- // UTILITY SETTINGS
57
- // https://designsystem.digital.gov/documentation/settings/#utilities-settings-2s
58
- $utilities-use-important: false,
59
- $theme-utility-breakpoints: (
60
- "card": false,
61
- "card-lg": false,
62
- "mobile": true,
63
- "mobile-lg": false,
64
- "tablet": true,
65
- "tablet-lg": false,
66
- "desktop": true,
67
- "desktop-lg": true,
68
- "widescreen": true
69
- ),
70
-
71
- $overflow-settings: (responsive: true),
72
- $position-settings: (responsive: true),
73
- $top-settings: (responsive: true),
74
- $right-settings: (responsive: true),
75
- $left-settings: (responsive: true),
76
- $bottom-settings: (responsive: true),
77
- $z-index-settings: (responsive: true),
78
- $background-color-settings: (responsive: true),
79
- $font-style-settings: (responsive: true),
80
- $color-settings: (responsive: true, hover: true),
81
- $flex-direction-settings: (responsive: true),
82
- $flex-settings: (responsive: true),
83
- $order-settings: (responsive: true)
84
- );
@@ -1,31 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/card-cta" with (
3
- $theme-card-cta-title-color: "white",
4
- $theme-card-cta-description-color: "white",
5
- $theme-card-cta-accent-color: "accent-warm",
6
- $theme-card-cta-border-color: "transparent"
7
- );
8
-
9
- // Disasters-specific overrides
10
- .blocks-card-cta {
11
- backdrop-filter: blur(10px);
12
- background-color: rgba(255, 255, 255, 0.05);
13
-
14
- &:hover,
15
- &:focus-visible {
16
- background-color: rgba(255, 255, 255, 0.1);
17
- }
18
-
19
- &__title {
20
- font-size: size("heading", "lg");
21
- font-weight: font-weight("bold");
22
- line-height: lh("heading", 3);
23
- text-underline-offset: units("05");
24
- }
25
-
26
- &__description {
27
- font-size: size("body", "sm");
28
- font-weight: font-weight("bold");
29
- line-height: lh("body", 4);
30
- }
31
- }
@@ -1,4 +0,0 @@
1
- @use "../components/card-mini" with (
2
- $theme-card-mini-border-width: 0,
3
- $theme-card-mini-border-color: "transparent"
4
- );
@@ -1,13 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/card-simple" with (
3
- $theme-card-simple-border-radius: 0,
4
- $theme-card-simple-title-color: $theme-body-background-color,
5
- $theme-card-simple-title-font-weight: "semibold",
6
- $theme-card-simple-overlay-color: "base-darkest"
7
- );
8
-
9
- // Figma node 4030-1098: disasters title carries a subtle drop-shadow absent
10
- // from the default theme — not expressible as a single token value.
11
- .blocks-card-simple__title {
12
- text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
13
- }
@@ -1,13 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/card" with (
3
- $theme-card-max-width: "widescreen",
4
- $theme-card-title-color: "primary-dark",
5
- $theme-card-text-color: "primary-dark",
6
- $theme-card-overlay-color: "base-lighter",
7
- $theme-card-title-dark-color: "white",
8
- $theme-card-text-dark-color: "white",
9
- $theme-card-overlay-dark-color: "base-darkest",
10
- $theme-card-title-brand-color: "white",
11
- $theme-card-text-brand-color: "base-lighter",
12
- $theme-card-overlay-brand-color: "primary-dark"
13
- );
@@ -1,3 +0,0 @@
1
- @use "../components/compare-map" with (
2
- $theme-compare-swiper-bgcolor: "primary-dark"
3
- );
@@ -1,29 +0,0 @@
1
- // To include custom font families not within USWDS,
2
- // 1. use https://fontsource.org/ to install the font utilities and font package
3
- // 2. use the font utilities to generate the font-face declarations in this file
4
- // Note, the directory path as "fonts/font-name/...".
5
- // This is consistent with our current implementation of USWDS fonts,
6
- // which are copied from node_modules to /dist/fonts. See build-assets.sh script for reference.
7
- // 3. reference the font family in USWDS theme definition via $theme-typeface-tokens in theme-tokens.scss
8
- // For more information on font family tokens, see the USWDS documentation:
9
- // https://designsystem.digital.gov/design-tokens/typesetting/font-family/
10
-
11
- @use "pkg:@fontsource-utils/scss" as fontsource;
12
- @use "pkg:@fontsource/dm-mono/scss" as dm-mono;
13
- @use "pkg:@fontsource-variable/inter/scss" as inter;
14
-
15
- @include fontsource.faces(
16
- $metadata: dm-mono.$metadata,
17
- $subsets: latin,
18
- $weights: 400,
19
- $styles: all,
20
- $directory: "fonts/dm-mono/files"
21
- );
22
-
23
- @include fontsource.faces(
24
- $metadata: inter.$metadata,
25
- $subsets: latin,
26
- $weights: 300 400 600 700 900,
27
- $styles: normal italic,
28
- $directory: "fonts/inter/files"
29
- );
@@ -1,9 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/footer" with (
3
- $theme-footer-background-color: "primary-dark",
4
- $theme-footer-primary-link-color: "base-lighter",
5
- $theme-footer-secondary-link-color: "base-lighter",
6
- $theme-footer-title-color: "base-lighter",
7
- $theme-footer-text-color: "base-lighter",
8
- $theme-footer-separator-color: $theme-link-reverse-color
9
- );
@@ -1,10 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/header" with (
3
- $theme-header-bgcolor: "primary-dark",
4
- $theme-header-primary-link-text-color: $theme-link-reverse-active-color,
5
- $theme-header-primary-link-hover-border-color: "primary-vivid",
6
- $theme-header-mobile-link-hover-bgcolor: "primary-darker",
7
- $theme-header-primary-button-link-text-color: $theme-link-reverse-active-color,
8
- $theme-header-primary-button-link-bgcolor: "primary",
9
- $theme-header-primary-button-link-hover-bgcolor: "primary-darker"
10
- );
@@ -1,22 +0,0 @@
1
- // Disasters theme manifest
2
-
3
- // 1. Forward theme token configuration first (must be before uswds-core/@forward)
4
- @forward "theme-tokens";
5
-
6
- // 2. Then forward USWDS itself
7
- @forward "uswds";
8
-
9
- // 3. Forward all custom component styles via disasters theme component overrides files and
10
- // default theme component style aggregator
11
- @forward "card";
12
- @forward "card-cta";
13
- @forward "card-mini";
14
- @forward "card-simple";
15
- @forward "compare-map";
16
- @forward "footer";
17
- @forward "header";
18
- @forward "tag";
19
- @forward "../components/index";
20
-
21
- // 4. Forward theme specific custom fonts
22
- @forward "fonts";
@@ -1,6 +0,0 @@
1
- @use "uswds-core" as *;
2
- @use "../components/tag" with (
3
- $theme-tag-border-radius: 0,
4
- $theme-tag-font-family: "mono",
5
- $theme-tag-text-transform: uppercase
6
- );