@grantcodes/ui 2.9.2 → 2.10.1
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/components/accordion/accordion.component.js +3 -1
- package/src/components/accordion/accordion.css +78 -57
- package/src/components/accordion/accordion.react.js +4 -4
- package/src/components/app-bar/app-bar.component.js +15 -9
- package/src/components/app-bar/app-bar.css +256 -250
- package/src/components/app-bar/app-bar.react.js +4 -4
- package/src/components/app-bar/app-bar.test.js +1 -3
- package/src/components/app-bar/nav-link.component.js +3 -1
- package/src/components/app-bar/nav-link.css +50 -45
- package/src/components/app-bar/nav-link.react.js +4 -4
- package/src/components/avatar/avatar.css +19 -21
- package/src/components/avatar/avatar.react.js +4 -4
- package/src/components/badge/badge.css +51 -51
- package/src/components/badge/badge.react.js +4 -4
- package/src/components/breadcrumb/breadcrumb.component.js +3 -1
- package/src/components/breadcrumb/breadcrumb.css +73 -73
- package/src/components/breadcrumb/breadcrumb.react.js +8 -5
- package/src/components/button/button.component.js +3 -1
- package/src/components/button/button.css +38 -38
- package/src/components/button/button.react.js +4 -4
- package/src/components/button-group/button-group.css +33 -33
- package/src/components/button-group/button-group.react.js +4 -4
- package/src/components/card/card.css +150 -150
- package/src/components/card/card.react.js +4 -4
- package/src/components/code-preview/code-preview.css +11 -12
- package/src/components/code-preview/code-preview.react.js +4 -4
- package/src/components/container/container.css +37 -37
- package/src/components/container/container.react.js +4 -4
- package/src/components/countdown/countdown.component.js +5 -3
- package/src/components/countdown/countdown.stories.js +1 -2
- package/src/components/cta/cta.css +55 -55
- package/src/components/cta/cta.react.js +4 -4
- package/src/components/dialog/dialog.css +48 -49
- package/src/components/dialog/dialog.react.js +4 -4
- package/src/components/dropdown/dropdown.css +123 -121
- package/src/components/dropdown/dropdown.react.js +5 -5
- package/src/components/dropzone/dropzone.css +5 -3
- package/src/components/dropzone/dropzone.react.js +4 -4
- package/src/components/feature-list/feature-list.css +71 -71
- package/src/components/feature-list/feature-list.react.js +4 -4
- package/src/components/footer/footer-column.css +39 -39
- package/src/components/footer/footer.css +68 -69
- package/src/components/footer/footer.react.js +5 -5
- package/src/components/form-field/form-field.css +40 -40
- package/src/components/form-field/form-field.react.js +4 -4
- package/src/components/gallery/gallery-image.react.js +4 -4
- package/src/components/gallery/gallery.css +72 -72
- package/src/components/gallery/gallery.react.js +4 -4
- package/src/components/gallery/gallery.test.js +5 -1
- package/src/components/hero/hero.css +61 -57
- package/src/components/hero/hero.react.js +4 -4
- package/src/components/icon/icon.css +27 -27
- package/src/components/icon/icon.react.js +4 -4
- package/src/components/loading/loading.css +30 -31
- package/src/components/loading/loading.react.js +4 -4
- package/src/components/logo-cloud/logo-cloud.css +60 -60
- package/src/components/logo-cloud/logo-cloud.react.js +4 -4
- package/src/components/map/map.component.js +3 -4
- package/src/components/map/map.css +36 -36
- package/src/components/media-text/media-text.css +58 -58
- package/src/components/media-text/media-text.react.js +4 -4
- package/src/components/newsletter/newsletter.css +78 -78
- package/src/components/newsletter/newsletter.react.js +4 -4
- package/src/components/notice/notice.css +38 -38
- package/src/components/notice/notice.react.js +4 -4
- package/src/components/pagination/pagination.css +6 -7
- package/src/components/pagination/pagination.react.js +4 -4
- package/src/components/pricing/pricing.css +137 -137
- package/src/components/pricing/pricing.react.js +4 -4
- package/src/components/sidebar/sidebar.component.js +3 -1
- package/src/components/sidebar/sidebar.css +180 -180
- package/src/components/sidebar/sidebar.react.js +4 -4
- package/src/components/stats/stats.css +58 -58
- package/src/components/stats/stats.react.js +4 -4
- package/src/components/tabs/internal/tabs-button.component.js +3 -1
- package/src/components/tabs/internal/tabs-button.react.js +4 -4
- package/src/components/tabs/tab.component.js +3 -1
- package/src/components/tabs/tab.react.js +4 -4
- package/src/components/tabs/tabs.component.js +3 -1
- package/src/components/tabs/tabs.css +82 -82
- package/src/components/tabs/tabs.react.js +4 -4
- package/src/components/testimonials/testimonials.css +72 -72
- package/src/components/testimonials/testimonials.react.js +4 -4
- package/src/components/toast/toast.component.js +3 -1
- package/src/components/toast/toast.css +198 -198
- package/src/components/toast/toast.react.js +5 -5
- package/src/components/tooltip/tooltip.css +52 -51
- package/src/components/tooltip/tooltip.react.js +4 -4
- package/src/css/reset.css +7 -3
- package/src/css/typography.css +13 -11
- package/src/exports.test.js +101 -95
- package/src/lib/styles/all.css +37 -37
- package/src/lib/styles/focus-ring.css +20 -20
- package/src/react.js +45 -39
- package/vite-plugin-css-import-attributes.js +5 -2
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
.footer-column {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--g-spacing-12);
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
::slotted(h3) {
|
|
12
|
+
font-size: var(--g-typography-font-size-16);
|
|
13
|
+
color: var(--g-theme-color-content-default);
|
|
14
|
+
margin: 0 0 var(--g-theme-spacing-sm) 0;
|
|
15
|
+
font-weight: var(--g-typography-font-weight-600);
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
::slotted(ul) {
|
|
19
|
+
list-style: none;
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: var(--g-theme-spacing-sm);
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
::slotted(li) {
|
|
28
|
+
margin: 0;
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
::slotted(a) {
|
|
32
|
+
color: var(--g-theme-color-content-subtle);
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
transition: color 0.2s ease;
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
::slotted(a:hover) {
|
|
38
|
+
color: var(--g-theme-color-content-default);
|
|
39
|
+
text-decoration: underline;
|
|
40
|
+
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
::slotted(p) {
|
|
43
|
+
margin: 0;
|
|
44
|
+
color: var(--g-theme-color-content-subtle);
|
|
45
|
+
font: var(--g-typography-body-sm);
|
|
46
|
+
}
|
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
container-type: inline-size;
|
|
10
|
+
container-name: footer;
|
|
11
|
+
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
.footer {
|
|
14
|
+
margin-block-start: auto;
|
|
15
|
+
border-block-start: 1px solid var(--g-theme-color-border-subtle);
|
|
16
|
+
background-color: var(--g-theme-color-background-subtle);
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
.footer__container {
|
|
20
|
+
padding-block: var(--g-theme-spacing-2xl) var(--g-theme-spacing-xl);
|
|
21
|
+
padding-inline: var(--g-theme-spacing-md);
|
|
22
|
+
max-inline-size: 1400px;
|
|
23
|
+
margin-inline: auto;
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
+
.footer__columns {
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: repeat(var(--footer-columns, 3), 1fr);
|
|
29
|
+
gap: var(--g-theme-spacing-xl);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Responsive grid using container queries */
|
|
33
|
+
@container footer (max-width: 768px) {
|
|
26
34
|
.footer__columns {
|
|
27
|
-
|
|
28
|
-
grid-template-columns: repeat(var(--footer-columns, 3), 1fr);
|
|
29
|
-
gap: var(--g-theme-spacing-xl);
|
|
35
|
+
grid-template-columns: repeat(2, 1fr);
|
|
30
36
|
}
|
|
37
|
+
}
|
|
31
38
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
grid-template-columns: repeat(2, 1fr);
|
|
36
|
-
}
|
|
39
|
+
@container footer (max-width: 480px) {
|
|
40
|
+
.footer__columns {
|
|
41
|
+
grid-template-columns: 1fr;
|
|
37
42
|
}
|
|
43
|
+
}
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
/* Bottom section (copyright, social links, etc.) */
|
|
46
|
+
.footer__bottom {
|
|
47
|
+
margin-block-start: var(--g-theme-spacing-xl);
|
|
48
|
+
padding-block-start: var(--g-theme-spacing-xl);
|
|
49
|
+
border-block-start: 1px solid var(--g-theme-color-border-default);
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: var(--g-theme-spacing-md);
|
|
55
|
+
}
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
@container footer (max-width: 640px) {
|
|
46
58
|
.footer__bottom {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
border-block-start: 1px solid var(--g-theme-color-border-default);
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-wrap: wrap;
|
|
52
|
-
justify-content: space-between;
|
|
53
|
-
align-items: center;
|
|
54
|
-
gap: var(--g-theme-spacing-md);
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
text-align: center;
|
|
55
61
|
}
|
|
62
|
+
}
|
|
56
63
|
|
|
64
|
+
/* Slotted content styling */
|
|
65
|
+
::slotted(*) {
|
|
66
|
+
font: var(--g-typography-font-body-sm);
|
|
67
|
+
color: var(--g-theme-color-content-subtle);
|
|
68
|
+
}
|
|
57
69
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Slotted content styling */
|
|
66
|
-
::slotted(*) {
|
|
67
|
-
font: var(--g-typography-font-body-sm);
|
|
68
|
-
color: var(--g-theme-color-content-subtle);
|
|
69
|
-
}
|
|
70
|
+
::slotted(p) {
|
|
71
|
+
margin: 0;
|
|
72
|
+
line-height: 1.5;
|
|
73
|
+
}
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
::slotted(a) {
|
|
76
|
+
color: var(--g-theme-color-content-subtle);
|
|
77
|
+
text-decoration: none;
|
|
78
|
+
transition: color 0.2s ease;
|
|
79
|
+
}
|
|
75
80
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
::slotted(a:hover) {
|
|
83
|
-
color: var(--g-theme-color-content-default);
|
|
84
|
-
text-decoration: underline;
|
|
85
|
-
}
|
|
81
|
+
::slotted(a:hover) {
|
|
82
|
+
color: var(--g-theme-color-content-default);
|
|
83
|
+
text-decoration: underline;
|
|
84
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesFooter, GrantCodesFooterColumn } from "./footer.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesFooter, GrantCodesFooterColumn } from "./footer.js";
|
|
4
4
|
|
|
5
5
|
export const Footer = createComponent({
|
|
6
6
|
tagName: "grantcodes-footer",
|
|
7
7
|
elementClass: GrantCodesFooter,
|
|
8
8
|
react: React,
|
|
9
|
-
})
|
|
9
|
+
});
|
|
10
10
|
|
|
11
11
|
export const FooterColumn = createComponent({
|
|
12
12
|
tagName: "grantcodes-footer-column",
|
|
13
13
|
elementClass: GrantCodesFooterColumn,
|
|
14
14
|
react: React,
|
|
15
|
-
})
|
|
15
|
+
});
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
.form-field {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--g-theme-spacing-xs);
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
border: none;
|
|
14
|
+
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
.form-field label,
|
|
17
|
+
.form-field slot {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: inherit;
|
|
21
|
+
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
.form-field--inline label {
|
|
24
|
+
flex-direction: row-reverse;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
.form-field__label {
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
&:where(legend) {
|
|
34
|
+
margin-bottom: var(--g-theme-spacing-xs);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
.form-field__help {
|
|
39
|
+
font-size: var(--g-theme-typography-body-sm-font-size);
|
|
40
|
+
opacity: 0.7;
|
|
41
|
+
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
.form-field__error {
|
|
44
|
+
margin: 0;
|
|
45
|
+
font-size: var(--g-theme-typography-body-sm-font-size);
|
|
46
|
+
color: var(--g-color-utility-red-700);
|
|
47
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesFormField } from "./form-field.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesFormField } from "./form-field.js";
|
|
4
4
|
|
|
5
5
|
export const FormField = createComponent({
|
|
6
6
|
tagName: "grantcodes-form-field",
|
|
7
7
|
elementClass: GrantCodesFormField,
|
|
8
8
|
react: React,
|
|
9
|
-
})
|
|
9
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesGalleryImage } from "./gallery-image.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesGalleryImage } from "./gallery-image.js";
|
|
4
4
|
|
|
5
5
|
export const GalleryImage = createComponent({
|
|
6
6
|
tagName: "grantcodes-gallery-image",
|
|
7
7
|
elementClass: GrantCodesGalleryImage,
|
|
8
8
|
react: React,
|
|
9
|
-
})
|
|
9
|
+
});
|
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
*,
|
|
2
2
|
*::before,
|
|
3
3
|
*::after {
|
|
4
|
-
|
|
4
|
+
box-sizing: border-box;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.gallery {
|
|
8
|
-
|
|
8
|
+
display: block;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.gallery__slot {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
|
|
14
|
+
width: 100%;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: var(--gallery-gap, 0);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.gallery__slot > * {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
display: block;
|
|
22
|
+
width: 100%;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.gallery--has-lightbox > * {
|
|
26
|
-
|
|
26
|
+
cursor: pointer;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.gallery__image {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
position: relative;
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: block;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
margin: 0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.gallery__image img {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
display: block;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: auto;
|
|
41
|
+
object-fit: cover;
|
|
42
|
+
object-position: center;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.gallery__image__caption {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset: 0;
|
|
48
|
+
inset-block-start: auto;
|
|
49
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
50
|
+
padding-inline: 0.5em;
|
|
51
|
+
padding-block: 0.3em;
|
|
52
|
+
line-height: 1.2;
|
|
53
|
+
color: white;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* =============================================
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
wins on equal specificity. Uses custom properties so filmstrip mode can
|
|
63
63
|
override them via inheritance from the parent gallery element. */
|
|
64
64
|
:host .gallery__image img {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
aspect-ratio: var(--_gallery-img-aspect-ratio, 1);
|
|
66
|
+
block-size: var(--_gallery-img-block-size, auto);
|
|
67
|
+
width: var(--_gallery-img-width, 100%);
|
|
68
|
+
height: var(--_gallery-img-height, auto);
|
|
69
|
+
max-inline-size: var(--_gallery-img-max-inline-size, unset);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
:host .gallery__image {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
block-size: var(--_gallery-image-block-size, auto);
|
|
74
|
+
width: var(--_gallery-image-width, 100%);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/* =============================================
|
|
@@ -83,59 +83,59 @@
|
|
|
83
83
|
without requiring JS attribute propagation, making the filmstrip work
|
|
84
84
|
correctly with SSR-rendered content. */
|
|
85
85
|
:host([variant="filmstrip"]) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
--_gallery-image-block-size: 100%;
|
|
87
|
+
--_gallery-image-width: fit-content;
|
|
88
|
+
--_gallery-img-aspect-ratio: auto;
|
|
89
|
+
--_gallery-img-block-size: 100%;
|
|
90
|
+
--_gallery-img-width: auto;
|
|
91
|
+
--_gallery-img-height: 100%;
|
|
92
|
+
--_gallery-img-max-inline-size: none;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
:host([variant="filmstrip"]) .gallery {
|
|
96
|
-
|
|
96
|
+
overflow: hidden;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
:host([variant="filmstrip"]) .gallery__slot {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-wrap: nowrap;
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
overflow-y: hidden;
|
|
104
|
+
block-size: var(--filmstrip-height, 240px);
|
|
105
|
+
gap: var(--gallery-gap, 4px);
|
|
106
|
+
scroll-snap-type: x mandatory;
|
|
107
|
+
overscroll-behavior-x: contain;
|
|
108
|
+
scrollbar-width: none;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
:host([variant="filmstrip"]) .gallery__slot::-webkit-scrollbar {
|
|
112
|
-
|
|
112
|
+
display: none;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
:host([variant="filmstrip"]) .gallery__slot::slotted(*) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
flex: 0 0 auto;
|
|
117
|
+
block-size: 100%;
|
|
118
|
+
scroll-snap-align: start;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/* Scroll-driven reveal animation */
|
|
122
122
|
@supports (animation-timeline: view()) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
124
|
+
:host([variant="filmstrip"]) .gallery__slot::slotted(*) {
|
|
125
|
+
animation: filmstrip-reveal linear both;
|
|
126
|
+
animation-timeline: view(inline);
|
|
127
|
+
animation-range: entry 0% entry 60%;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
@keyframes filmstrip-reveal {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
from {
|
|
134
|
+
opacity: 0.3;
|
|
135
|
+
scale: 0.92;
|
|
136
|
+
}
|
|
137
|
+
to {
|
|
138
|
+
opacity: 1;
|
|
139
|
+
scale: 1;
|
|
140
|
+
}
|
|
141
141
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { createComponent } from "@lit/react"
|
|
3
|
-
import { GrantCodesGallery } from "./gallery.js"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createComponent } from "@lit/react";
|
|
3
|
+
import { GrantCodesGallery } from "./gallery.js";
|
|
4
4
|
|
|
5
5
|
export const Gallery = createComponent({
|
|
6
6
|
tagName: "grantcodes-gallery",
|
|
7
7
|
elementClass: GrantCodesGallery,
|
|
8
8
|
react: React,
|
|
9
|
-
})
|
|
9
|
+
});
|
|
@@ -68,7 +68,11 @@ describe("Gallery Component", () => {
|
|
|
68
68
|
|
|
69
69
|
it("should have variant property default to 'default'", async () => {
|
|
70
70
|
element = await fixture("grantcodes-gallery");
|
|
71
|
-
assert.strictEqual(
|
|
71
|
+
assert.strictEqual(
|
|
72
|
+
element.variant,
|
|
73
|
+
"default",
|
|
74
|
+
"variant should default to 'default'",
|
|
75
|
+
);
|
|
72
76
|
});
|
|
73
77
|
|
|
74
78
|
it("should reflect variant attribute when property is set", async () => {
|