@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.
- package/README.md +6 -3
- package/dist/default.css +11280 -10085
- package/dist/default.css.map +1 -1
- package/dist/disasters.css +11278 -10083
- package/dist/disasters.css.map +1 -1
- package/dist/index.d.ts +169 -68
- package/dist/index.js +713 -152
- package/package.json +5 -7
- package/src/styles/components/banner.scss +0 -18
- package/src/styles/components/card-cta.scss +0 -90
- package/src/styles/components/card-detailed.scss +0 -164
- package/src/styles/components/card-mini.scss +0 -81
- package/src/styles/components/card-simple.scss +0 -79
- package/src/styles/components/card.scss +0 -284
- package/src/styles/components/compare-map.scss +0 -15
- package/src/styles/components/footer.scss +0 -256
- package/src/styles/components/header.scss +0 -212
- package/src/styles/components/index.scss +0 -11
- package/src/styles/components/tag.scss +0 -89
- package/src/styles/default/index.scss +0 -10
- package/src/styles/default/theme-tokens.scss +0 -84
- package/src/styles/disasters/card-cta.scss +0 -31
- package/src/styles/disasters/card-mini.scss +0 -4
- package/src/styles/disasters/card-simple.scss +0 -13
- package/src/styles/disasters/card.scss +0 -13
- package/src/styles/disasters/compare-map.scss +0 -3
- package/src/styles/disasters/fonts.scss +0 -29
- package/src/styles/disasters/footer.scss +0 -9
- package/src/styles/disasters/header.scss +0 -10
- package/src/styles/disasters/index.scss +0 -22
- package/src/styles/disasters/tag.scss +0 -6
- package/src/styles/disasters/theme-tokens.scss +0 -150
- package/src/styles/earthgov/footer.scss +0 -15
- package/src/styles/earthgov/index.scss +0 -12
- package/src/styles/earthgov/theme-tokens.scss +0 -104
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamimpact/veda-ui-blocks",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"description": "UI component library for VEDA-based portals, built on USWDS and React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,12 +24,10 @@
|
|
|
24
24
|
"types": "./dist/index.d.ts"
|
|
25
25
|
},
|
|
26
26
|
"./default.css": "./dist/default.css",
|
|
27
|
-
"./disasters.css": "./dist/disasters.css"
|
|
28
|
-
"./earthgov.css": "./dist/earthgov.css"
|
|
27
|
+
"./disasters.css": "./dist/disasters.css"
|
|
29
28
|
},
|
|
30
29
|
"files": [
|
|
31
|
-
"dist"
|
|
32
|
-
"src/styles"
|
|
30
|
+
"dist"
|
|
33
31
|
],
|
|
34
32
|
"peerDependencies": {
|
|
35
33
|
"@developmentseed/stac-react": "^1.0.0-alpha.2",
|
|
@@ -72,10 +70,10 @@
|
|
|
72
70
|
"vitest": "^4.0.18"
|
|
73
71
|
},
|
|
74
72
|
"scripts": {
|
|
75
|
-
"build": "tsup src/index.ts --format esm --dts && pnpm run build:
|
|
73
|
+
"build": "tsup src/index.ts --format esm --dts && pnpm run build:css",
|
|
76
74
|
"build:assets": "./scripts/build-assets.sh",
|
|
77
75
|
"build:css": "./scripts/build-css.sh --quiet",
|
|
78
|
-
"build:css:watch": "./scripts/build-css.sh --quiet --watch
|
|
76
|
+
"build:css:watch": "./scripts/build-css.sh --quiet --watch",
|
|
79
77
|
"dev": "concurrently \"pnpm run build:css:watch\" \"storybook dev -p 6006\"",
|
|
80
78
|
"typecheck": "tsc --noEmit",
|
|
81
79
|
"test": "vitest run",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@use "uswds-core" as *;
|
|
2
|
-
|
|
3
|
-
.blocks-banner {
|
|
4
|
-
&__row {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-wrap: wrap;
|
|
7
|
-
gap: units(4);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&__guidance {
|
|
11
|
-
flex: 1 1 100%;
|
|
12
|
-
min-width: 0;
|
|
13
|
-
@include at-media("tablet") {
|
|
14
|
-
flex: 1 1 0;
|
|
15
|
-
max-width: 50%;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
@use "uswds-core" as *;
|
|
2
|
-
$theme-card-cta-background-color: "white" !default;
|
|
3
|
-
$theme-card-cta-border-radius: "sm" !default;
|
|
4
|
-
$theme-card-cta-border-color: "base-lighter" !default;
|
|
5
|
-
$theme-card-cta-title-color: "ink" !default;
|
|
6
|
-
$theme-card-cta-description-color: "ink" !default;
|
|
7
|
-
$theme-card-cta-accent-color: "primary" !default;
|
|
8
|
-
|
|
9
|
-
// LAYOUT
|
|
10
|
-
.blocks-card-cta {
|
|
11
|
-
--blocks-card-cta-custom-accent-color: #{color($theme-card-cta-accent-color)};
|
|
12
|
-
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
position: relative;
|
|
19
|
-
text-decoration: none;
|
|
20
|
-
|
|
21
|
-
&__body {
|
|
22
|
-
flex: 1 1 auto;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
justify-content: flex-start;
|
|
26
|
-
padding: units(2.5);
|
|
27
|
-
gap: units(1);
|
|
28
|
-
z-index: 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&__title {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
gap: units("105");
|
|
35
|
-
margin: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__icon {
|
|
39
|
-
color: var(--blocks-card-cta-custom-accent-color);
|
|
40
|
-
display: inline-flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
flex-shrink: 0;
|
|
43
|
-
vertical-align: baseline;
|
|
44
|
-
width: 1cap;
|
|
45
|
-
height: 1cap;
|
|
46
|
-
|
|
47
|
-
> svg {
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&__description {
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// THEME
|
|
59
|
-
.blocks-card-cta {
|
|
60
|
-
background-color: color($theme-card-cta-background-color);
|
|
61
|
-
border-radius: radius($theme-card-cta-border-radius);
|
|
62
|
-
border: 1px solid color($theme-card-cta-border-color);
|
|
63
|
-
|
|
64
|
-
&:hover,
|
|
65
|
-
&:focus-visible {
|
|
66
|
-
text-decoration: none;
|
|
67
|
-
|
|
68
|
-
.blocks-card-cta__title {
|
|
69
|
-
text-decoration-line: underline;
|
|
70
|
-
text-decoration-color: var(--blocks-card-cta-custom-accent-color);
|
|
71
|
-
text-decoration-thickness: 2px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&__title {
|
|
76
|
-
color: color($theme-card-cta-title-color);
|
|
77
|
-
font-family: family($theme-card-font-family);
|
|
78
|
-
font-size: size("body", "md");
|
|
79
|
-
font-weight: font-weight("bold");
|
|
80
|
-
line-height: lh("heading", 1);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&__description {
|
|
84
|
-
color: color($theme-card-cta-description-color);
|
|
85
|
-
font-family: family($theme-card-font-family);
|
|
86
|
-
font-size: size("body", "sm");
|
|
87
|
-
font-weight: font-weight("normal");
|
|
88
|
-
line-height: lh("body", 4);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
@use "uswds-core" as *;
|
|
2
|
-
|
|
3
|
-
$theme-card-background-color: $theme-body-background-color !default;
|
|
4
|
-
$theme-card-primary-accent-color: "primary-darker" !default;
|
|
5
|
-
$theme-card-secondary-accent-color: "primary-light" !default;
|
|
6
|
-
|
|
7
|
-
// LAYOUT
|
|
8
|
-
.blocks-card-detailed {
|
|
9
|
-
isolation: isolate;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
position: relative;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
width: 100%;
|
|
15
|
-
|
|
16
|
-
&--image-bottom {
|
|
17
|
-
.blocks-card-detailed__image-wrapper {
|
|
18
|
-
order: 1;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&--image-cover {
|
|
23
|
-
min-height: 15rem;
|
|
24
|
-
|
|
25
|
-
.blocks-card-detailed__image-wrapper {
|
|
26
|
-
position: absolute;
|
|
27
|
-
inset: 0;
|
|
28
|
-
z-index: 0;
|
|
29
|
-
|
|
30
|
-
> :is(img, svg, video, canvas) {
|
|
31
|
-
width: 100%;
|
|
32
|
-
height: 100%;
|
|
33
|
-
object-fit: cover;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.blocks-card-detailed__content {
|
|
38
|
-
position: relative;
|
|
39
|
-
z-index: 1;
|
|
40
|
-
margin-top: auto;
|
|
41
|
-
padding-top: units(7);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&__accent-bar {
|
|
46
|
-
position: absolute;
|
|
47
|
-
top: 0;
|
|
48
|
-
right: 0;
|
|
49
|
-
left: 0;
|
|
50
|
-
z-index: 3;
|
|
51
|
-
height: units(1);
|
|
52
|
-
pointer-events: none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&__image-wrapper {
|
|
56
|
-
position: relative;
|
|
57
|
-
order: -1;
|
|
58
|
-
width: 100%;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&__content-type-tag {
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: units(2.5);
|
|
65
|
-
left: units(4);
|
|
66
|
-
z-index: 2;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&__image-wrapper > :is(img, svg, video, canvas) {
|
|
70
|
-
width: 100%;
|
|
71
|
-
display: block;
|
|
72
|
-
|
|
73
|
-
&:is(img, svg, video, canvas) {
|
|
74
|
-
height: auto;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&__content {
|
|
79
|
-
padding: units(3) units(4) units(4) units(4);
|
|
80
|
-
display: flex;
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
gap: units(1.5);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&__title {
|
|
86
|
-
margin: 0; // preserve spacing rhythm by removing browser default
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&__tags {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-wrap: wrap;
|
|
92
|
-
gap: units(0.5);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&__action {
|
|
96
|
-
align-self: flex-start;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
@include at-media-max("mobile-lg") {
|
|
100
|
-
.blocks-card-detailed__content {
|
|
101
|
-
padding: units(2);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.blocks-card-detailed__content-type-tag {
|
|
105
|
-
left: units(2);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// THEME
|
|
110
|
-
.blocks-card-detailed {
|
|
111
|
-
background: color($theme-card-background-color);
|
|
112
|
-
border-radius: radius($theme-card-border-radius);
|
|
113
|
-
box-shadow: 0 units(0.5) units(2) rgba(color("base-dark"), 0.06);
|
|
114
|
-
|
|
115
|
-
&--image-cover {
|
|
116
|
-
.blocks-card-detailed__content {
|
|
117
|
-
background: linear-gradient(
|
|
118
|
-
180deg,
|
|
119
|
-
rgba(color($theme-card-background-color), 0) 0%,
|
|
120
|
-
rgba(color($theme-card-background-color), 0.72) 40%,
|
|
121
|
-
color($theme-card-background-color) 100%
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&__accent-bar {
|
|
127
|
-
background: linear-gradient(
|
|
128
|
-
90deg,
|
|
129
|
-
color($theme-card-primary-accent-color) 0%,
|
|
130
|
-
color($theme-card-secondary-accent-color) 100%
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&__image-wrapper {
|
|
135
|
-
background: color("base-lighter");
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&__intro {
|
|
139
|
-
color: color("base-dark");
|
|
140
|
-
font-family: family($theme-card-font-family);
|
|
141
|
-
font-size: font-size("body", "3xs");
|
|
142
|
-
font-style: normal;
|
|
143
|
-
font-weight: font-weight("normal");
|
|
144
|
-
line-height: line-height("body", 1);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&__title {
|
|
148
|
-
color: color("ink");
|
|
149
|
-
font-family: family($theme-card-font-family);
|
|
150
|
-
font-size: font-size("heading", "lg");
|
|
151
|
-
font-style: normal;
|
|
152
|
-
font-weight: font-weight("bold");
|
|
153
|
-
line-height: line-height("heading", 3);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&__description {
|
|
157
|
-
color: color("ink");
|
|
158
|
-
font-family: family($theme-card-font-family);
|
|
159
|
-
font-size: font-size("body", "3xs");
|
|
160
|
-
font-style: normal;
|
|
161
|
-
font-weight: font-weight("normal");
|
|
162
|
-
line-height: line-height("body", 5);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
@use "uswds-core" as *;
|
|
2
|
-
|
|
3
|
-
$theme-card-mini-border-radius: $theme-card-border-radius !default;
|
|
4
|
-
$theme-card-mini-border-width: 1px !default;
|
|
5
|
-
$theme-card-mini-border-color: "base-lighter" !default;
|
|
6
|
-
$theme-card-mini-bg: "white" !default;
|
|
7
|
-
$theme-card-mini-title-color: "ink" !default;
|
|
8
|
-
$theme-card-mini-title-font-weight: $theme-font-weight-bold !default;
|
|
9
|
-
$theme-card-mini-image-width: 98px !default; // matches Figma
|
|
10
|
-
$theme-card-mini-image-height: 108px !default; // matches Figma
|
|
11
|
-
|
|
12
|
-
// LAYOUT
|
|
13
|
-
.blocks-card-mini {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
align-items: stretch;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: $theme-card-mini-image-height;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
gap: units("105");
|
|
21
|
-
padding-right: units("105");
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
|
|
24
|
-
&__image {
|
|
25
|
-
flex: 0 0 $theme-card-mini-image-width;
|
|
26
|
-
width: $theme-card-mini-image-width;
|
|
27
|
-
overflow: hidden;
|
|
28
|
-
|
|
29
|
-
> :is(img, svg, video, canvas) {
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: 100%;
|
|
32
|
-
display: block;
|
|
33
|
-
object-fit: cover;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&__body {
|
|
38
|
-
flex: 1 0 0;
|
|
39
|
-
min-width: 0;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
gap: units(1);
|
|
43
|
-
justify-content: center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__tag {
|
|
47
|
-
align-self: flex-start;
|
|
48
|
-
flex-shrink: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__title {
|
|
52
|
-
margin: 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// THEME
|
|
57
|
-
.blocks-card-mini {
|
|
58
|
-
background-color: color($theme-card-mini-bg);
|
|
59
|
-
border-radius: radius($theme-card-mini-border-radius);
|
|
60
|
-
border: $theme-card-mini-border-width solid color($theme-card-mini-border-color);
|
|
61
|
-
|
|
62
|
-
&__title {
|
|
63
|
-
color: color($theme-card-mini-title-color);
|
|
64
|
-
font-family: family($theme-card-font-family);
|
|
65
|
-
font-size: size("heading", "lg");
|
|
66
|
-
font-weight: font-weight($theme-card-mini-title-font-weight);
|
|
67
|
-
line-height: lh("heading", 4);
|
|
68
|
-
|
|
69
|
-
display: -webkit-box;
|
|
70
|
-
-webkit-box-orient: vertical;
|
|
71
|
-
-webkit-line-clamp: 3;
|
|
72
|
-
line-clamp: 3;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
text-overflow: ellipsis;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&--with-tag &__title {
|
|
78
|
-
-webkit-line-clamp: 2;
|
|
79
|
-
line-clamp: 2;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
@use "uswds-core" as *;
|
|
2
|
-
|
|
3
|
-
$theme-card-simple-border-radius: "md" !default;
|
|
4
|
-
$theme-card-simple-title-color: "ink" !default;
|
|
5
|
-
$theme-card-simple-title-font-weight: "bold" !default;
|
|
6
|
-
$theme-card-simple-overlay-color: "base-light" !default;
|
|
7
|
-
|
|
8
|
-
// LAYOUT
|
|
9
|
-
.blocks-card-simple {
|
|
10
|
-
position: relative;
|
|
11
|
-
isolation: isolate;
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
border-radius: radius($theme-card-simple-border-radius);
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
|
|
20
|
-
&__media {
|
|
21
|
-
position: absolute;
|
|
22
|
-
inset: 0;
|
|
23
|
-
z-index: 0;
|
|
24
|
-
|
|
25
|
-
> :is(img, svg, video, canvas) {
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
display: block;
|
|
29
|
-
object-fit: cover;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&__overlay {
|
|
34
|
-
position: absolute;
|
|
35
|
-
inset: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__body {
|
|
39
|
-
position: relative;
|
|
40
|
-
z-index: 1;
|
|
41
|
-
flex: 1;
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
padding: units(3) units(2.5) units(2.5) units(2.5);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&__tag {
|
|
48
|
-
align-self: flex-start;
|
|
49
|
-
flex-shrink: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&__title {
|
|
53
|
-
margin: 0;
|
|
54
|
-
margin-top: auto;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// THEME
|
|
59
|
-
.blocks-card-simple {
|
|
60
|
-
&__overlay {
|
|
61
|
-
background: linear-gradient(
|
|
62
|
-
to bottom,
|
|
63
|
-
rgba(color($theme-card-simple-overlay-color), 0.1),
|
|
64
|
-
rgba(color($theme-card-simple-overlay-color), 0.8)
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&__title {
|
|
69
|
-
color: color($theme-card-simple-title-color);
|
|
70
|
-
font-family: family($theme-card-font-family);
|
|
71
|
-
font-size: size("heading", "lg");
|
|
72
|
-
font-weight: font-weight($theme-card-simple-title-font-weight);
|
|
73
|
-
line-height: lh("heading", 2);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&--compact &__title {
|
|
77
|
-
font-size: size("heading", "md");
|
|
78
|
-
}
|
|
79
|
-
}
|