@easy-web/content-blocks 1.3.3 → 1.4.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/README.md +10 -395
- package/dist/schemas/galleries.d.ts +3 -316
- package/dist/schemas/galleries.d.ts.map +1 -1
- package/dist/schemas/galleries.js +3 -133
- package/dist/schemas/galleries.js.map +1 -1
- package/dist/schemas/notFound.d.ts +3 -32
- package/dist/schemas/notFound.d.ts.map +1 -1
- package/dist/schemas/notFound.js +3 -27
- package/dist/schemas/notFound.js.map +1 -1
- package/package.json +3 -4
- package/src/components/BlogPostCard.astro +8 -74
- package/src/components/Card.astro +8 -65
- package/src/components/CardGrid.astro +8 -24
- package/src/components/ContactSection.astro +8 -68
- package/src/components/CtaSection.astro +8 -77
- package/src/components/DraftBanner.astro +8 -28
- package/src/components/Footer.astro +8 -76
- package/src/components/GalleryCarousel.astro +9 -292
- package/src/components/GalleryFeatureHighlight.astro +9 -149
- package/src/components/GalleryHeroSlider.astro +9 -358
- package/src/components/GalleryImageGrid.astro +9 -139
- package/src/components/GalleryLightboxGrid.astro +9 -349
- package/src/components/GalleryMasonryGrid.astro +9 -123
- package/src/components/GallerySection.astro +9 -65
- package/src/components/Header.astro +13 -217
- package/src/components/HeaderCentered.astro +17 -242
- package/src/components/HeaderFlyout.astro +13 -380
- package/src/components/HeaderHideOnScroll.astro +17 -248
- package/src/components/Hero.astro +8 -73
- package/src/components/LanguageNotice.astro +8 -27
- package/src/components/LanguageSwitch.astro +7 -65
- package/src/components/LegalLayout.astro +8 -57
- package/src/components/NotFound.astro +7 -118
- package/src/components/PageShell.astro +7 -79
- package/src/components/Prose.astro +10 -153
- package/src/components/Section.astro +8 -32
- package/src/components/ThemeToggle.astro +8 -77
- package/src/components/UniversalMedia.astro +7 -96
- package/src/schemas/galleries.ts +3 -150
- package/src/schemas/notFound.ts +3 -31
- package/dist/__tests__/exports-resolution.test.d.ts +0 -2
- package/dist/__tests__/exports-resolution.test.d.ts.map +0 -1
- package/dist/__tests__/exports-resolution.test.js +0 -83
- package/dist/__tests__/exports-resolution.test.js.map +0 -1
- package/dist/components/__tests__/UniversalMedia.test.d.ts +0 -2
- package/dist/components/__tests__/UniversalMedia.test.d.ts.map +0 -1
- package/dist/components/__tests__/UniversalMedia.test.js +0 -46
- package/dist/components/__tests__/UniversalMedia.test.js.map +0 -1
- package/dist/schemas/__tests__/notFound.test.d.ts +0 -2
- package/dist/schemas/__tests__/notFound.test.d.ts.map +0 -1
- package/dist/schemas/__tests__/notFound.test.js +0 -29
- package/dist/schemas/__tests__/notFound.test.js.map +0 -1
- package/src/components/__tests__/UniversalMedia.test.ts +0 -65
- package/src/schemas/__tests__/notFound.test.ts +0 -32
|
@@ -1,70 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Pure Astro component using --ew-* design tokens.
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/Card.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description?: string;
|
|
10
|
-
href?: string;
|
|
11
|
-
image?: string;
|
|
12
|
-
imageAlt?: string;
|
|
13
|
-
}
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import Card from '@easy-web/core/components/Card.astro';
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
const alt = imageAlt || title;
|
|
17
|
-
const Tag = href ? 'a' : 'div';
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<Tag class:list={['ew-card', { 'ew-card--link': !!href }]} {...(href ? { href } : {})}>
|
|
21
|
-
{image && (
|
|
22
|
-
<img src={image} alt={alt} class="ew-card__image" loading="lazy" />
|
|
23
|
-
)}
|
|
24
|
-
<div class="ew-card__body">
|
|
25
|
-
<h3 class="ew-card__title">{title}</h3>
|
|
26
|
-
{description && <p class="ew-card__description">{description}</p>}
|
|
27
|
-
</div>
|
|
28
|
-
</Tag>
|
|
9
|
+
type Props = ComponentProps<typeof Card>;
|
|
29
10
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
background: var(--ew-surface);
|
|
35
|
-
border: 1px solid var(--ew-border);
|
|
36
|
-
border-radius: var(--ew-radius-lg);
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
}
|
|
39
|
-
.ew-card--link {
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
color: inherit;
|
|
42
|
-
}
|
|
43
|
-
.ew-card--link:hover {
|
|
44
|
-
border-color: var(--ew-primary);
|
|
45
|
-
}
|
|
46
|
-
.ew-card__image {
|
|
47
|
-
width: 100%;
|
|
48
|
-
aspect-ratio: 16 / 9;
|
|
49
|
-
object-fit: cover;
|
|
50
|
-
display: block;
|
|
51
|
-
}
|
|
52
|
-
.ew-card__body {
|
|
53
|
-
padding: var(--ew-space-4);
|
|
54
|
-
}
|
|
55
|
-
.ew-card__title {
|
|
56
|
-
font-family: var(--ew-font-sans);
|
|
57
|
-
font-size: var(--ew-text-lg);
|
|
58
|
-
font-weight: 600;
|
|
59
|
-
color: var(--ew-on-surface);
|
|
60
|
-
margin: 0;
|
|
61
|
-
line-height: var(--ew-leading-tight);
|
|
62
|
-
}
|
|
63
|
-
.ew-card__description {
|
|
64
|
-
font-family: var(--ew-font-sans);
|
|
65
|
-
font-size: var(--ew-text-sm);
|
|
66
|
-
color: var(--ew-muted);
|
|
67
|
-
margin: var(--ew-space-2) 0 0;
|
|
68
|
-
line-height: var(--ew-leading-normal);
|
|
69
|
-
}
|
|
70
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<Card {...props} />
|
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Pure Astro component using --ew-* design tokens.
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/CardGrid.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import CardGrid from '@easy-web/core/components/CardGrid.astro';
|
|
8
8
|
|
|
9
|
-
<
|
|
10
|
-
<slot />
|
|
11
|
-
</div>
|
|
9
|
+
type Props = ComponentProps<typeof CardGrid>;
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
grid-template-columns: 1fr;
|
|
17
|
-
gap: var(--ew-space-5);
|
|
18
|
-
}
|
|
19
|
-
@media (min-width: 640px) {
|
|
20
|
-
.ew-card-grid {
|
|
21
|
-
grid-template-columns: repeat(2, 1fr);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
@media (min-width: 1024px) {
|
|
25
|
-
.ew-card-grid {
|
|
26
|
-
grid-template-columns: repeat(3, 1fr);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<CardGrid {...props}><slot /></CardGrid>
|
|
@@ -1,73 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/ContactSection.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
body?: string;
|
|
9
|
-
email: string;
|
|
10
|
-
buttonLabel: string;
|
|
11
|
-
}
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import ContactSection from '@easy-web/core/components/ContactSection.astro';
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<section class="ew-contact">
|
|
17
|
-
<div class="ew-contact__inner">
|
|
18
|
-
<h2 class="ew-contact__heading">{heading}</h2>
|
|
19
|
-
{body && <p class="ew-contact__body">{body}</p>}
|
|
20
|
-
<a href={`mailto:${email}`} class="ew-contact__button">{buttonLabel}</a>
|
|
21
|
-
</div>
|
|
22
|
-
</section>
|
|
23
|
-
|
|
24
|
-
<style>
|
|
25
|
-
.ew-contact {
|
|
26
|
-
background: var(--ew-surface-muted);
|
|
27
|
-
padding: var(--ew-space-8) var(--ew-space-5);
|
|
28
|
-
text-align: center;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.ew-contact__inner {
|
|
32
|
-
max-width: 72rem;
|
|
33
|
-
margin: 0 auto;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
9
|
+
type Props = ComponentProps<typeof ContactSection>;
|
|
38
10
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
font-weight: 800;
|
|
43
|
-
line-height: var(--ew-leading-tight);
|
|
44
|
-
color: var(--ew-on-surface);
|
|
45
|
-
margin: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.ew-contact__body {
|
|
49
|
-
font-family: var(--ew-font-sans);
|
|
50
|
-
font-size: var(--ew-text-xl);
|
|
51
|
-
line-height: var(--ew-leading-normal);
|
|
52
|
-
color: var(--ew-muted);
|
|
53
|
-
margin: var(--ew-space-4) 0 0;
|
|
54
|
-
max-width: 40rem;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ew-contact__button {
|
|
58
|
-
display: inline-block;
|
|
59
|
-
margin-top: var(--ew-space-6);
|
|
60
|
-
padding: var(--ew-space-3) var(--ew-space-6);
|
|
61
|
-
background: var(--ew-primary);
|
|
62
|
-
color: var(--ew-on-primary);
|
|
63
|
-
font-family: var(--ew-font-sans);
|
|
64
|
-
font-size: var(--ew-text-base);
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
text-decoration: none;
|
|
67
|
-
border-radius: var(--ew-radius-md);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.ew-contact__button:hover {
|
|
71
|
-
opacity: 0.9;
|
|
72
|
-
}
|
|
73
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<ContactSection {...props} />
|
|
@@ -1,82 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/CtaSection.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
body?: string;
|
|
9
|
-
buttonLabel: string;
|
|
10
|
-
buttonHref: string;
|
|
11
|
-
variant?: 'default' | 'muted' | 'primary';
|
|
12
|
-
}
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import CtaSection from '@easy-web/core/components/CtaSection.astro';
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<section class:list={['ew-cta', `ew-cta--${variant}`]}>
|
|
18
|
-
<div class="ew-cta__inner">
|
|
19
|
-
<h2 class="ew-cta__heading">{heading}</h2>
|
|
20
|
-
{body && <p class="ew-cta__body">{body}</p>}
|
|
21
|
-
<a class="ew-cta__button" href={buttonHref}>{buttonLabel}</a>
|
|
22
|
-
</div>
|
|
23
|
-
</section>
|
|
9
|
+
type Props = ComponentProps<typeof CtaSection>;
|
|
24
10
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
text-align: center;
|
|
29
|
-
}
|
|
30
|
-
.ew-cta__inner {
|
|
31
|
-
max-width: 72rem;
|
|
32
|
-
margin: 0 auto;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
align-items: center;
|
|
36
|
-
}
|
|
37
|
-
.ew-cta--default {
|
|
38
|
-
background: var(--ew-surface);
|
|
39
|
-
color: var(--ew-on-surface);
|
|
40
|
-
}
|
|
41
|
-
.ew-cta--muted {
|
|
42
|
-
background: var(--ew-surface-muted);
|
|
43
|
-
color: var(--ew-on-surface);
|
|
44
|
-
}
|
|
45
|
-
.ew-cta--primary {
|
|
46
|
-
background: var(--ew-primary);
|
|
47
|
-
color: var(--ew-on-primary);
|
|
48
|
-
}
|
|
49
|
-
.ew-cta__heading {
|
|
50
|
-
font-family: var(--ew-font-sans);
|
|
51
|
-
font-size: var(--ew-text-3xl);
|
|
52
|
-
font-weight: 800;
|
|
53
|
-
line-height: var(--ew-leading-tight);
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
.ew-cta__body {
|
|
57
|
-
font-family: var(--ew-font-sans);
|
|
58
|
-
font-size: var(--ew-text-xl);
|
|
59
|
-
line-height: var(--ew-leading-normal);
|
|
60
|
-
margin: var(--ew-space-4) 0 0;
|
|
61
|
-
max-width: 40rem;
|
|
62
|
-
}
|
|
63
|
-
.ew-cta__button {
|
|
64
|
-
display: inline-block;
|
|
65
|
-
margin-top: var(--ew-space-6);
|
|
66
|
-
padding: var(--ew-space-3) var(--ew-space-6);
|
|
67
|
-
background: var(--ew-primary);
|
|
68
|
-
color: var(--ew-on-primary);
|
|
69
|
-
font-family: var(--ew-font-sans);
|
|
70
|
-
font-size: var(--ew-text-base);
|
|
71
|
-
font-weight: 600;
|
|
72
|
-
text-decoration: none;
|
|
73
|
-
border-radius: var(--ew-radius-md);
|
|
74
|
-
}
|
|
75
|
-
.ew-cta--primary .ew-cta__button {
|
|
76
|
-
background: var(--ew-on-primary);
|
|
77
|
-
color: var(--ew-primary);
|
|
78
|
-
}
|
|
79
|
-
.ew-cta__button:hover {
|
|
80
|
-
opacity: 0.9;
|
|
81
|
-
}
|
|
82
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<CtaSection {...props} />
|
|
@@ -1,33 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/DraftBanner.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import DraftBanner from '@easy-web/core/components/DraftBanner.astro';
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<div class="ew-draft-banner" role="status">
|
|
14
|
-
<p class="ew-draft-banner__text">{message}</p>
|
|
15
|
-
</div>
|
|
9
|
+
type Props = ComponentProps<typeof DraftBanner>;
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
border: 2px solid var(--ew-border);
|
|
21
|
-
border-radius: var(--ew-radius-md);
|
|
22
|
-
padding: var(--ew-space-3) var(--ew-space-4);
|
|
23
|
-
margin: 0 0 var(--ew-space-5);
|
|
24
|
-
}
|
|
25
|
-
.ew-draft-banner__text {
|
|
26
|
-
font-family: var(--ew-font-sans);
|
|
27
|
-
font-size: var(--ew-text-sm);
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
color: var(--ew-on-surface);
|
|
30
|
-
margin: 0;
|
|
31
|
-
line-height: var(--ew-leading-normal);
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<DraftBanner {...props} />
|
|
@@ -1,81 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* @deprecated Import `@easy-web/core/components/Footer.astro` instead.
|
|
4
|
+
* Compatibility wrapper: renders the core component with the same props and slots.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
legalLinks: Array<{ label: string; href: string }>;
|
|
9
|
-
currentYear?: number;
|
|
10
|
-
}
|
|
6
|
+
import type { ComponentProps } from 'astro/types';
|
|
7
|
+
import Footer from '@easy-web/core/components/Footer.astro';
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<footer class="ew-footer">
|
|
16
|
-
<div class="ew-footer__inner">
|
|
17
|
-
<p class="ew-footer__copyright">© {currentYear} {siteName}</p>
|
|
18
|
-
{legalLinks.length > 0 && (
|
|
19
|
-
<nav class="ew-footer__legal" aria-label="Legal">
|
|
20
|
-
<ul class="ew-footer__links">
|
|
21
|
-
{legalLinks.map((link) => (
|
|
22
|
-
<li>
|
|
23
|
-
<a href={link.href} class="ew-footer__link">{link.label}</a>
|
|
24
|
-
</li>
|
|
25
|
-
))}
|
|
26
|
-
</ul>
|
|
27
|
-
</nav>
|
|
28
|
-
)}
|
|
29
|
-
</div>
|
|
30
|
-
</footer>
|
|
9
|
+
type Props = ComponentProps<typeof Footer>;
|
|
31
10
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
border-top: 1px solid var(--ew-border);
|
|
36
|
-
color: var(--ew-on-surface);
|
|
37
|
-
font-family: var(--ew-font-sans);
|
|
38
|
-
font-size: var(--ew-text-sm);
|
|
39
|
-
}
|
|
40
|
-
.ew-footer__inner {
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
align-items: center;
|
|
44
|
-
gap: var(--ew-space-3);
|
|
45
|
-
max-width: 72rem;
|
|
46
|
-
margin: 0 auto;
|
|
47
|
-
padding: var(--ew-space-6) var(--ew-space-5);
|
|
48
|
-
text-align: center;
|
|
49
|
-
}
|
|
50
|
-
.ew-footer__copyright {
|
|
51
|
-
margin: 0;
|
|
52
|
-
color: var(--ew-muted);
|
|
53
|
-
}
|
|
54
|
-
.ew-footer__links {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-wrap: wrap;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
list-style: none;
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0;
|
|
61
|
-
gap: var(--ew-space-4);
|
|
62
|
-
}
|
|
63
|
-
.ew-footer__link {
|
|
64
|
-
color: var(--ew-muted);
|
|
65
|
-
text-decoration: none;
|
|
66
|
-
}
|
|
67
|
-
.ew-footer__link:hover {
|
|
68
|
-
color: var(--ew-on-surface);
|
|
69
|
-
}
|
|
70
|
-
.ew-footer__link:focus-visible {
|
|
71
|
-
outline: 2px solid var(--ew-primary);
|
|
72
|
-
outline-offset: 2px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@media (min-width: 769px) {
|
|
76
|
-
.ew-footer__inner {
|
|
77
|
-
flex-direction: row;
|
|
78
|
-
justify-content: space-between;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
11
|
+
const props = Astro.props;
|
|
12
|
+
---
|
|
13
|
+
<Footer {...props} />
|