@forjacms/sections 1.2.6
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 +185 -0
- package/dist/cjs/a11y-IAJPjMwx.js +27 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/forja-blog.cjs.entry.js +16 -0
- package/dist/cjs/forja-contact.cjs.entry.js +25 -0
- package/dist/cjs/forja-cta.cjs.entry.js +15 -0
- package/dist/cjs/forja-divider.cjs.entry.js +19 -0
- package/dist/cjs/forja-faq.cjs.entry.js +16 -0
- package/dist/cjs/forja-features.cjs.entry.js +16 -0
- package/dist/cjs/forja-footer.cjs.entry.js +38 -0
- package/dist/cjs/forja-gallery.cjs.entry.js +16 -0
- package/dist/cjs/forja-hero.cjs.entry.js +20 -0
- package/dist/cjs/forja-legal.cjs.entry.js +46 -0
- package/dist/cjs/forja-logo-cloud.cjs.entry.js +20 -0
- package/dist/cjs/forja-nav.cjs.entry.js +53 -0
- package/dist/cjs/forja-newsletter.cjs.entry.js +24 -0
- package/dist/cjs/forja-portfolio.cjs.entry.js +37 -0
- package/dist/cjs/forja-pricing.cjs.entry.js +16 -0
- package/dist/cjs/forja-projects.cjs.entry.js +16 -0
- package/dist/cjs/forja-section-renderer.cjs.entry.js +42 -0
- package/dist/cjs/forja-sections.cjs.js +25 -0
- package/dist/cjs/forja-stats.cjs.entry.js +20 -0
- package/dist/cjs/forja-tag-cloud.cjs.entry.js +16 -0
- package/dist/cjs/forja-team.cjs.entry.js +18 -0
- package/dist/cjs/forja-testimonials.cjs.entry.js +16 -0
- package/dist/cjs/forja-text-block.cjs.entry.js +22 -0
- package/dist/cjs/forja-timeline.cjs.entry.js +19 -0
- package/dist/cjs/forja-video.cjs.entry.js +30 -0
- package/dist/cjs/index-Bp-SZu2Y.js +1754 -0
- package/dist/cjs/index.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/collection/collection-manifest.json +36 -0
- package/dist/collection/components/forja-blog/forja-blog.js +132 -0
- package/dist/collection/components/forja-contact/forja-contact.js +165 -0
- package/dist/collection/components/forja-cta/forja-cta.js +126 -0
- package/dist/collection/components/forja-divider/forja-divider.js +57 -0
- package/dist/collection/components/forja-faq/forja-faq.js +75 -0
- package/dist/collection/components/forja-features/forja-features.js +94 -0
- package/dist/collection/components/forja-footer/forja-footer.js +184 -0
- package/dist/collection/components/forja-gallery/forja-gallery.js +94 -0
- package/dist/collection/components/forja-hero/forja-hero.js +169 -0
- package/dist/collection/components/forja-legal/forja-legal.js +289 -0
- package/dist/collection/components/forja-logo-cloud/forja-logo-cloud.js +117 -0
- package/dist/collection/components/forja-nav/forja-nav.js +215 -0
- package/dist/collection/components/forja-newsletter/forja-newsletter.js +141 -0
- package/dist/collection/components/forja-portfolio/forja-portfolio.js +163 -0
- package/dist/collection/components/forja-pricing/forja-pricing.js +94 -0
- package/dist/collection/components/forja-projects/forja-projects.js +94 -0
- package/dist/collection/components/forja-section-renderer/forja-section-renderer.js +218 -0
- package/dist/collection/components/forja-stats/forja-stats.js +117 -0
- package/dist/collection/components/forja-tag-cloud/forja-tag-cloud.js +75 -0
- package/dist/collection/components/forja-team/forja-team.js +138 -0
- package/dist/collection/components/forja-testimonials/forja-testimonials.js +94 -0
- package/dist/collection/components/forja-text-block/forja-text-block.js +99 -0
- package/dist/collection/components/forja-timeline/forja-timeline.js +120 -0
- package/dist/collection/components/forja-video/forja-video.js +146 -0
- package/dist/collection/index.js +4 -0
- package/dist/collection/types.js +7 -0
- package/dist/collection/utils/a11y.js +22 -0
- package/dist/collection/utils/a11y.unit.js +46 -0
- package/dist/components/forja-blog.d.ts +11 -0
- package/dist/components/forja-blog.js +1 -0
- package/dist/components/forja-contact.d.ts +11 -0
- package/dist/components/forja-contact.js +1 -0
- package/dist/components/forja-cta.d.ts +11 -0
- package/dist/components/forja-cta.js +1 -0
- package/dist/components/forja-divider.d.ts +11 -0
- package/dist/components/forja-divider.js +1 -0
- package/dist/components/forja-faq.d.ts +11 -0
- package/dist/components/forja-faq.js +1 -0
- package/dist/components/forja-features.d.ts +11 -0
- package/dist/components/forja-features.js +1 -0
- package/dist/components/forja-footer.d.ts +11 -0
- package/dist/components/forja-footer.js +1 -0
- package/dist/components/forja-gallery.d.ts +11 -0
- package/dist/components/forja-gallery.js +1 -0
- package/dist/components/forja-hero.d.ts +11 -0
- package/dist/components/forja-hero.js +1 -0
- package/dist/components/forja-legal.d.ts +11 -0
- package/dist/components/forja-legal.js +1 -0
- package/dist/components/forja-logo-cloud.d.ts +11 -0
- package/dist/components/forja-logo-cloud.js +1 -0
- package/dist/components/forja-nav.d.ts +11 -0
- package/dist/components/forja-nav.js +1 -0
- package/dist/components/forja-newsletter.d.ts +11 -0
- package/dist/components/forja-newsletter.js +1 -0
- package/dist/components/forja-portfolio.d.ts +11 -0
- package/dist/components/forja-portfolio.js +1 -0
- package/dist/components/forja-pricing.d.ts +11 -0
- package/dist/components/forja-pricing.js +1 -0
- package/dist/components/forja-projects.d.ts +11 -0
- package/dist/components/forja-projects.js +1 -0
- package/dist/components/forja-section-renderer.d.ts +11 -0
- package/dist/components/forja-section-renderer.js +1 -0
- package/dist/components/forja-stats.d.ts +11 -0
- package/dist/components/forja-stats.js +1 -0
- package/dist/components/forja-tag-cloud.d.ts +11 -0
- package/dist/components/forja-tag-cloud.js +1 -0
- package/dist/components/forja-team.d.ts +11 -0
- package/dist/components/forja-team.js +1 -0
- package/dist/components/forja-testimonials.d.ts +11 -0
- package/dist/components/forja-testimonials.js +1 -0
- package/dist/components/forja-text-block.d.ts +11 -0
- package/dist/components/forja-text-block.js +1 -0
- package/dist/components/forja-timeline.d.ts +11 -0
- package/dist/components/forja-timeline.js +1 -0
- package/dist/components/forja-video.d.ts +11 -0
- package/dist/components/forja-video.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CTbyYfdB.js +1 -0
- package/dist/components/p-DTKnQcqm.js +1 -0
- package/dist/define-all.d.ts +2 -0
- package/dist/define-all.js +24 -0
- package/dist/esm/a11y-CTbyYfdB.js +24 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/forja-blog.entry.js +14 -0
- package/dist/esm/forja-contact.entry.js +23 -0
- package/dist/esm/forja-cta.entry.js +13 -0
- package/dist/esm/forja-divider.entry.js +17 -0
- package/dist/esm/forja-faq.entry.js +14 -0
- package/dist/esm/forja-features.entry.js +14 -0
- package/dist/esm/forja-footer.entry.js +36 -0
- package/dist/esm/forja-gallery.entry.js +14 -0
- package/dist/esm/forja-hero.entry.js +18 -0
- package/dist/esm/forja-legal.entry.js +44 -0
- package/dist/esm/forja-logo-cloud.entry.js +18 -0
- package/dist/esm/forja-nav.entry.js +51 -0
- package/dist/esm/forja-newsletter.entry.js +22 -0
- package/dist/esm/forja-portfolio.entry.js +35 -0
- package/dist/esm/forja-pricing.entry.js +14 -0
- package/dist/esm/forja-projects.entry.js +14 -0
- package/dist/esm/forja-section-renderer.entry.js +40 -0
- package/dist/esm/forja-sections.js +21 -0
- package/dist/esm/forja-stats.entry.js +18 -0
- package/dist/esm/forja-tag-cloud.entry.js +14 -0
- package/dist/esm/forja-team.entry.js +16 -0
- package/dist/esm/forja-testimonials.entry.js +14 -0
- package/dist/esm/forja-text-block.entry.js +20 -0
- package/dist/esm/forja-timeline.entry.js +17 -0
- package/dist/esm/forja-video.entry.js +28 -0
- package/dist/esm/index-WdE4YutY.js +1747 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/loader.js +11 -0
- package/dist/forja-sections/forja-sections.esm.js +1 -0
- package/dist/forja-sections/index.esm.js +1 -0
- package/dist/forja-sections/p-0a820467.entry.js +1 -0
- package/dist/forja-sections/p-1b0b71f5.entry.js +1 -0
- package/dist/forja-sections/p-1e7249c1.entry.js +1 -0
- package/dist/forja-sections/p-27f014b1.entry.js +1 -0
- package/dist/forja-sections/p-2834de40.entry.js +1 -0
- package/dist/forja-sections/p-2a7f54c6.entry.js +1 -0
- package/dist/forja-sections/p-2b3d6388.entry.js +1 -0
- package/dist/forja-sections/p-4180bd91.entry.js +1 -0
- package/dist/forja-sections/p-57c10a67.entry.js +1 -0
- package/dist/forja-sections/p-6e48a255.entry.js +1 -0
- package/dist/forja-sections/p-6fa65e05.entry.js +1 -0
- package/dist/forja-sections/p-732e854c.entry.js +1 -0
- package/dist/forja-sections/p-8787f878.entry.js +1 -0
- package/dist/forja-sections/p-9b242e13.entry.js +1 -0
- package/dist/forja-sections/p-CTbyYfdB.js +1 -0
- package/dist/forja-sections/p-DQuL1Twl.js +1 -0
- package/dist/forja-sections/p-WdE4YutY.js +2 -0
- package/dist/forja-sections/p-a2cdb548.entry.js +1 -0
- package/dist/forja-sections/p-aa20264b.entry.js +1 -0
- package/dist/forja-sections/p-b5280312.entry.js +1 -0
- package/dist/forja-sections/p-c2c2e0ba.entry.js +1 -0
- package/dist/forja-sections/p-c4bccd7e.entry.js +1 -0
- package/dist/forja-sections/p-d1b739dd.entry.js +1 -0
- package/dist/forja-sections/p-d762878f.entry.js +1 -0
- package/dist/forja-sections/p-de808791.entry.js +1 -0
- package/dist/forja-sections/p-f24d6578.entry.js +1 -0
- package/dist/forja-sections/p-fd969566.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/forja-blog/forja-blog.d.ts +10 -0
- package/dist/types/components/forja-contact/forja-contact.d.ts +13 -0
- package/dist/types/components/forja-cta/forja-cta.d.ts +9 -0
- package/dist/types/components/forja-divider/forja-divider.d.ts +5 -0
- package/dist/types/components/forja-faq/forja-faq.d.ts +7 -0
- package/dist/types/components/forja-features/forja-features.d.ts +8 -0
- package/dist/types/components/forja-footer/forja-footer.d.ts +11 -0
- package/dist/types/components/forja-gallery/forja-gallery.d.ts +8 -0
- package/dist/types/components/forja-hero/forja-hero.d.ts +11 -0
- package/dist/types/components/forja-legal/forja-legal.d.ts +35 -0
- package/dist/types/components/forja-logo-cloud/forja-logo-cloud.d.ts +9 -0
- package/dist/types/components/forja-nav/forja-nav.d.ts +23 -0
- package/dist/types/components/forja-newsletter/forja-newsletter.d.ts +11 -0
- package/dist/types/components/forja-portfolio/forja-portfolio.d.ts +13 -0
- package/dist/types/components/forja-pricing/forja-pricing.d.ts +8 -0
- package/dist/types/components/forja-projects/forja-projects.d.ts +8 -0
- package/dist/types/components/forja-section-renderer/forja-section-renderer.d.ts +13 -0
- package/dist/types/components/forja-stats/forja-stats.d.ts +9 -0
- package/dist/types/components/forja-tag-cloud/forja-tag-cloud.d.ts +7 -0
- package/dist/types/components/forja-team/forja-team.d.ts +10 -0
- package/dist/types/components/forja-testimonials/forja-testimonials.d.ts +8 -0
- package/dist/types/components/forja-text-block/forja-text-block.d.ts +7 -0
- package/dist/types/components/forja-timeline/forja-timeline.d.ts +9 -0
- package/dist/types/components/forja-video/forja-video.d.ts +11 -0
- package/dist/types/components.d.ts +1010 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types.d.ts +235 -0
- package/dist/types/utils/a11y.d.ts +11 -0
- package/dist/types/utils/a11y.unit.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# @forjacms/sections
|
|
2
|
+
|
|
3
|
+
Framework-agnostic Web Components for rendering Forja page sections. Built with [Stencil](https://stenciljs.com/), ships as vanilla Custom Elements with auto-generated React wrappers. Zero CSS — bring your own styles via BEM class hooks.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Vanilla / Astro / Vue / Angular
|
|
9
|
+
npm install @forjacms/sections
|
|
10
|
+
|
|
11
|
+
# React
|
|
12
|
+
npm install @forjacms/sections @forjacms/sections-react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Plain HTML
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<script type="module">
|
|
21
|
+
import { defineCustomElements } from '@forjacms/sections/loader';
|
|
22
|
+
defineCustomElements();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<forja-hero
|
|
26
|
+
section-title="Welcome to Forja"
|
|
27
|
+
text="<p>Build beautiful websites with headless CMS sections.</p>"
|
|
28
|
+
button-text="Get Started"
|
|
29
|
+
button-href="/docs"
|
|
30
|
+
></forja-hero>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### React
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { ForjaHero, ForjaPricing } from '@forjacms/sections-react';
|
|
37
|
+
|
|
38
|
+
function LandingPage() {
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
<ForjaHero sectionTitle="Welcome" buttonText="Start" buttonHref="/signup" />
|
|
42
|
+
<ForjaPricing sectionTitle="Plans" tiers={[
|
|
43
|
+
{ name: 'Free', price: '$0', features: ['1 site'] },
|
|
44
|
+
{ name: 'Pro', price: '$19', period: '/month', highlighted: true, features: ['Unlimited sites'] },
|
|
45
|
+
]} />
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Astro
|
|
52
|
+
|
|
53
|
+
```astro
|
|
54
|
+
---
|
|
55
|
+
import '@forjacms/sections/dist/forja-sections/forja-sections.esm.js';
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
<forja-hero section-title="Hello" text="<p>World</p>" />
|
|
59
|
+
<forja-features section-title="Features" items={JSON.stringify(features)} />
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Vue
|
|
63
|
+
|
|
64
|
+
Custom Elements work natively in Vue — no wrapper package needed:
|
|
65
|
+
|
|
66
|
+
```vue
|
|
67
|
+
<script setup>
|
|
68
|
+
import { defineCustomElements } from '@forjacms/sections/loader';
|
|
69
|
+
defineCustomElements();
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<forja-hero section-title="Hello" image-url="/hero.jpg" />
|
|
74
|
+
</template>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Angular
|
|
78
|
+
|
|
79
|
+
Add `CUSTOM_ELEMENTS_SCHEMA` to your module:
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
83
|
+
import { defineCustomElements } from '@forjacms/sections/loader';
|
|
84
|
+
|
|
85
|
+
defineCustomElements();
|
|
86
|
+
|
|
87
|
+
@NgModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA] })
|
|
88
|
+
export class AppModule {}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Component Catalog
|
|
92
|
+
|
|
93
|
+
| Component | Tag | Key Props |
|
|
94
|
+
|-----------|-----|-----------|
|
|
95
|
+
| Hero | `<forja-hero>` | `sectionTitle`, `text`, `imageUrl`, `buttonText`, `buttonHref`, `fullWidth`, `gradient` |
|
|
96
|
+
| Features | `<forja-features>` | `sectionTitle`, `text`, `items: FeatureItem[]`, `columns` |
|
|
97
|
+
| CTA | `<forja-cta>` | `sectionTitle`, `text`, `buttonText`, `buttonHref`, `imageUrl` |
|
|
98
|
+
| Text Block | `<forja-text-block>` | `sectionTitle`, `text`, `width`, `alignment` |
|
|
99
|
+
| Divider | `<forja-divider>` | `dividerStyle`, `label` |
|
|
100
|
+
| Gallery | `<forja-gallery>` | `sectionTitle`, `text`, `items: GalleryItem[]`, `columns` |
|
|
101
|
+
| Testimonials | `<forja-testimonials>` | `sectionTitle`, `text`, `items: TestimonialItem[]`, `columns` |
|
|
102
|
+
| Pricing | `<forja-pricing>` | `sectionTitle`, `text`, `tiers: PricingTier[]`, `columns` |
|
|
103
|
+
| Stats | `<forja-stats>` | `sectionTitle`, `text`, `items: StatItem[]`, `columns`, `statsStyle` |
|
|
104
|
+
| Team | `<forja-team>` | `sectionTitle`, `text`, `members: TeamMember[]`, `columns`, `showRole`, `showBio` |
|
|
105
|
+
| Timeline | `<forja-timeline>` | `sectionTitle`, `text`, `events: TimelineEvent[]`, `layout`, `showDates` |
|
|
106
|
+
| Logo Cloud | `<forja-logo-cloud>` | `sectionTitle`, `text`, `logos: LogoItem[]`, `columns`, `grayscale` |
|
|
107
|
+
| FAQ | `<forja-faq>` | `sectionTitle`, `text`, `items: FaqItem[]` |
|
|
108
|
+
| Contact | `<forja-contact>` | `sectionTitle`, `text`, `fields: ContactField[]`, `formAction` |
|
|
109
|
+
| Newsletter | `<forja-newsletter>` | `sectionTitle`, `text`, `buttonText`, `formAction`, `showName` |
|
|
110
|
+
| Video | `<forja-video>` | `sectionTitle`, `text`, `videoUrl`, `provider`, `autoplay`, `aspectRatio` |
|
|
111
|
+
| Portfolio | `<forja-portfolio>` | `sectionTitle`, `text`, `experiences: PortfolioExperience[]`, `education: EducationItem[]`, `skills: SkillItem[]` |
|
|
112
|
+
| Tag Cloud | `<forja-tag-cloud>` | `sectionTitle`, `text`, `tags: TagItem[]` |
|
|
113
|
+
| Projects | `<forja-projects>` | `sectionTitle`, `text`, `items: ProjectItem[]`, `columns` |
|
|
114
|
+
| Blog | `<forja-blog>` | `sectionTitle`, `text`, `posts: BlogPostItem[]`, `columns`, `buttonText`, `buttonHref` |
|
|
115
|
+
| Legal | `<forja-legal>` | `sectionTitle`, `intro`, `body`, `documentType`, `version`, `effectiveDate`, `showVersion`, `showDates` |
|
|
116
|
+
| Nav | `<forja-nav>` | `siteName`, `homeHref`, `items: NavItem[]`, `locales: LocaleOption[]`, `currentLocale`, `showThemeToggle` |
|
|
117
|
+
| Footer | `<forja-footer>` | `siteName`, `homeHref`, `items: NavItem[]`, `socialLinks: SocialLink[]`, `tagline`, `showRss`, `showSitemap` |
|
|
118
|
+
| Section Renderer | `<forja-section-renderer>` | `sectionType`, plus all common section props |
|
|
119
|
+
|
|
120
|
+
## Styling
|
|
121
|
+
|
|
122
|
+
Components ship with **zero CSS** and render in the light DOM (`shadow: false`). Style them using BEM class hooks:
|
|
123
|
+
|
|
124
|
+
```css
|
|
125
|
+
/* Example: Hero section */
|
|
126
|
+
.forja-hero { position: relative; }
|
|
127
|
+
.forja-hero__image { width: 100%; height: auto; }
|
|
128
|
+
.forja-hero__content { padding: 2rem; }
|
|
129
|
+
.forja-hero__title { font-size: 2.5rem; }
|
|
130
|
+
.forja-hero__cta { display: inline-block; padding: 0.75rem 1.5rem; }
|
|
131
|
+
|
|
132
|
+
/* Modifier classes */
|
|
133
|
+
.forja-hero--full-width { width: 100vw; }
|
|
134
|
+
.forja-hero--gradient { background: linear-gradient(...); }
|
|
135
|
+
|
|
136
|
+
/* Grid components use data-columns for responsive layouts */
|
|
137
|
+
.forja-features__grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Accessibility
|
|
141
|
+
|
|
142
|
+
All components follow WCAG 2.1 AA patterns:
|
|
143
|
+
|
|
144
|
+
- Semantic HTML: `<section>`, `<article>`, `<figure>`, `<blockquote>`, `<details>`, `<dl>`, `<time>`
|
|
145
|
+
- `aria-label` on every section (title or descriptive fallback)
|
|
146
|
+
- `aria-hidden="true"` on decorative elements (icons, avatars)
|
|
147
|
+
- `aria-required` on required form fields
|
|
148
|
+
- Proper `<label>` → `<input>` association via generated IDs
|
|
149
|
+
- Native `<details>/<summary>` for FAQ accordion (no JS needed)
|
|
150
|
+
- Keyboard navigation works via native HTML semantics
|
|
151
|
+
|
|
152
|
+
## Structured Data Props
|
|
153
|
+
|
|
154
|
+
Components that accept arrays/objects handle both JSON strings (HTML attributes) and typed objects (framework props):
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<!-- HTML: JSON string -->
|
|
158
|
+
<forja-pricing tiers='[{"name":"Free","price":"$0"}]'></forja-pricing>
|
|
159
|
+
|
|
160
|
+
<!-- React: typed prop -->
|
|
161
|
+
<ForjaPricing tiers={[{ name: 'Free', price: '$0' }]} />
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Events
|
|
165
|
+
|
|
166
|
+
Form components emit custom events:
|
|
167
|
+
|
|
168
|
+
| Component | Event | Payload |
|
|
169
|
+
|-----------|-------|---------|
|
|
170
|
+
| `<forja-contact>` | `forjaSubmit` | `FormData` |
|
|
171
|
+
| `<forja-newsletter>` | `forjaSubmit` | `FormData` |
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
// Vanilla
|
|
175
|
+
document.querySelector('forja-contact').addEventListener('forjaSubmit', (e) => {
|
|
176
|
+
console.log(e.detail); // FormData
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// React
|
|
180
|
+
<ForjaContact onForjaSubmit={(e) => console.log(e.detail)} />
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
AGPL-3.0-or-later
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ARIA and accessibility helpers for section components.
|
|
5
|
+
* These utilities help maintain consistent accessible markup across all sections.
|
|
6
|
+
*/
|
|
7
|
+
/** Build an aria-label from a title, falling back to a generic section description. */
|
|
8
|
+
function sectionLabel(title, fallback) {
|
|
9
|
+
return (title === null || title === void 0 ? void 0 : title.trim()) || fallback;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generate a unique ID for linking headings to their content.
|
|
13
|
+
* Uses a slug derived from the title, or a random suffix if no title is provided.
|
|
14
|
+
*/
|
|
15
|
+
function sectionId(title, prefix) {
|
|
16
|
+
if (title) {
|
|
17
|
+
const slug = title
|
|
18
|
+
.toLowerCase()
|
|
19
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
20
|
+
.replace(/^-|-$/g, '');
|
|
21
|
+
return `${prefix}-${slug}`;
|
|
22
|
+
}
|
|
23
|
+
return `${prefix}-${Math.random().toString(36).slice(2, 8)}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.sectionId = sectionId;
|
|
27
|
+
exports.sectionLabel = sectionLabel;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaBlog = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const hasPosts = this.posts && this.posts.length > 0;
|
|
12
|
+
return (index.h("section", { key: '2e07ceebf04b3741b7a9e9003ca4cb4c227b1f53', class: "forja-blog", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Blog') }, index.h("slot", { key: 'fa89312e96a5a9d76f9ecb35a2b884b86c724136', name: "before" }), this.sectionTitle && index.h("h2", { key: 'e2b67b101f958249015d16d3875ad4ef2045f5a9', class: "forja-blog__title" }, this.sectionTitle), this.text && index.h("div", { key: 'cfb8fe068f2ca902ebee227ff919b69a3c6e28f2', class: "forja-blog__text", innerHTML: this.text }), hasPosts ? (index.h("div", { class: "forja-blog__grid", role: "list", "data-columns": this.columns }, this.posts.map(post => (index.h("article", { class: "forja-blog__card", role: "listitem" }, post.imageUrl && (index.h("a", { href: post.href, class: "forja-blog__image-link" }, index.h("img", { src: post.imageUrl, alt: "", class: "forja-blog__image", loading: "lazy" }))), index.h("div", { class: "forja-blog__content" }, (post.date || post.author) && (index.h("div", { class: "forja-blog__meta" }, post.date && index.h("time", { class: "forja-blog__date" }, post.date), post.author && index.h("span", { class: "forja-blog__author" }, post.author))), index.h("h3", { class: "forja-blog__post-title" }, post.href ? (index.h("a", { href: post.href, class: "forja-blog__link" }, post.title)) : (post.title)), post.excerpt && (index.h("div", { class: "forja-blog__excerpt", innerHTML: post.excerpt })))))))) : (index.h("slot", null)), this.buttonText && this.buttonHref && (index.h("div", { key: 'd30200ce9a72871b17c225446e511c9792e541f1', class: "forja-blog__footer" }, index.h("a", { key: '42eb53eb15ec8a2c88cf7bf29a425b5e0c074c28', href: this.buttonHref, class: "forja-blog__cta" }, this.buttonText))), index.h("slot", { key: 'fc9ac4b7e88a64eb401abbec1cc5e93f9dea0455', name: "after" })));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.forja_blog = ForjaBlog;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaContact = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
this.forjaSubmit = index.createEvent(this, "forjaSubmit");
|
|
10
|
+
this.handleSubmit = (e) => {
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
const form = e.target;
|
|
13
|
+
this.forjaSubmit.emit(new FormData(form));
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
const hasFields = this.fields && this.fields.length > 0;
|
|
18
|
+
return (index.h("section", { key: '15bb71d6aa6d3d73c85ab4cdd7346696f3145074', class: "forja-contact", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Contact') }, index.h("slot", { key: '63820a89dd1c9812dc0b931fd8ce7b17a7b1782e', name: "before" }), index.h("div", { key: 'b74c9c884de525c6a08a92c982f0a1c8a2235c02', class: "forja-contact__content" }, this.sectionTitle && index.h("h2", { key: '53014e550127a34a191adcef4b8eaa3b01dfec7a', class: "forja-contact__title" }, this.sectionTitle), this.text && index.h("div", { key: '38d9ff63e255d33328da1113a3b7f2fe82871a23', class: "forja-contact__text", innerHTML: this.text }), this.buttonText && this.buttonHref && (index.h("a", { key: '15ebb06b95b3cb6d58fb3d4caaa1e713126a201a', href: this.buttonHref, class: "forja-contact__cta" }, this.buttonText))), hasFields ? (index.h("form", { class: "forja-contact__form", action: this.formAction, method: this.formAction ? 'post' : undefined, onSubmit: this.handleSubmit }, this.fields.map(field => {
|
|
19
|
+
const fieldId = a11y.sectionId(field.name, 'contact');
|
|
20
|
+
return (index.h("div", { class: "forja-contact__field" }, index.h("label", { class: "forja-contact__label", htmlFor: fieldId }, field.label, field.required && index.h("span", { "aria-hidden": "true" }, " *")), field.type === 'textarea' ? (index.h("textarea", { id: fieldId, name: field.name, class: "forja-contact__input forja-contact__input--textarea", required: field.required, "aria-required": field.required ? 'true' : undefined, placeholder: field.placeholder })) : (index.h("input", { id: fieldId, name: field.name, type: field.type, class: "forja-contact__input", required: field.required, "aria-required": field.required ? 'true' : undefined, placeholder: field.placeholder }))));
|
|
21
|
+
}), index.h("button", { type: "submit", class: "forja-contact__submit" }, this.buttonText || 'Send'))) : (index.h("slot", null)), index.h("slot", { key: '7ec1b5c2ee966906cbd6fa05a2c8a5a2ca13d7e2', name: "after" })));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.forja_contact = ForjaContact;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaCta = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (index.h("section", { key: '446ccf4f954e159368c7824587d8a5db98a276d2', class: "forja-cta", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Call to action') }, index.h("slot", { key: '3663547f1d3869de3c0295c8db3d2339a64c1f7b', name: "before" }), this.imageUrl && (index.h("img", { key: '192e4fa7564506794fbd55a77a9fd6f2c202eea7', src: this.imageUrl, alt: this.imageAlt || '', class: "forja-cta__image", loading: "lazy" })), index.h("div", { key: 'f480a01537524bec5b2dd7faaa973776081c5ed0', class: "forja-cta__content" }, this.sectionTitle && index.h("h2", { key: '0baa33a4f63ea70a65da02669977b261d6ca9cbe', class: "forja-cta__title" }, this.sectionTitle), this.text && index.h("div", { key: 'f67e87b654f0cb08f4415aa4ea2b7a39b5e0ca84', class: "forja-cta__text", innerHTML: this.text }), this.buttonText && this.buttonHref && (index.h("a", { key: 'bb0618dcd3fd6deb8f1ce1446167a9ff5d904f6b', href: this.buttonHref, class: "forja-cta__button" }, this.buttonText))), index.h("slot", { key: 'ff766293f87f21e4498004243d78c31d31889dfc', name: "after" })));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.forja_cta = ForjaCta;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
|
|
5
|
+
const ForjaDivider = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
index.registerInstance(this, hostRef);
|
|
8
|
+
this.dividerStyle = 'line';
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const classes = ['forja-divider', `forja-divider--${this.dividerStyle}`].join(' ');
|
|
12
|
+
if (this.label) {
|
|
13
|
+
return (index.h("div", { class: classes, role: "separator", "aria-label": this.label }, index.h("span", { class: "forja-divider__label" }, this.label)));
|
|
14
|
+
}
|
|
15
|
+
return index.h("hr", { class: classes });
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.forja_divider = ForjaDivider;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaFaq = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const hasItems = this.items && this.items.length > 0;
|
|
12
|
+
return (index.h("section", { key: '94a1ad63276f33116d60bc7e6c00445754a4e7da', class: "forja-faq", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Frequently asked questions') }, index.h("slot", { key: '4b33e56d9cd117bcfc07583a2c58a89d07be50dd', name: "before" }), this.sectionTitle && index.h("h2", { key: 'c47444fed71889ea5a693d623513328f87e6f16e', class: "forja-faq__title" }, this.sectionTitle), this.text && index.h("div", { key: 'a7992070168b9f081dbb11689cf4e333fbf75413', class: "forja-faq__text", innerHTML: this.text }), hasItems ? (index.h("div", { class: "forja-faq__list" }, this.items.map(item => (index.h("details", { class: "forja-faq__item" }, index.h("summary", { class: "forja-faq__question" }, item.question), index.h("div", { class: "forja-faq__answer", innerHTML: item.answer })))))) : (index.h("div", { class: "forja-faq__list" }, index.h("slot", null))), index.h("slot", { key: '77bac4fe776da5ecb301ad5bdb270e1823329f81', name: "after" })));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.forja_faq = ForjaFaq;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaFeatures = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const hasItems = this.items && this.items.length > 0;
|
|
12
|
+
return (index.h("section", { key: '01434127526dac604e2542876f04c5ac88768038', class: "forja-features", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Features') }, index.h("slot", { key: 'cfc0d012020d197474abc35118b5c1191575d078', name: "before" }), (this.sectionTitle || this.text) && (index.h("div", { key: 'a626af8e540db41d255ec2a637bd341686287a86', class: "forja-features__header" }, this.sectionTitle && index.h("h2", { key: '15bf163f29719490525523ff72f05566277bbcc0', class: "forja-features__title" }, this.sectionTitle), this.text && index.h("div", { key: 'e9e05b4c08e6beb7ecca32df69daddafe2b53f1a', class: "forja-features__text", innerHTML: this.text }))), hasItems ? (index.h("ul", { class: "forja-features__grid", role: "list", "data-columns": this.columns }, this.items.map(item => (index.h("li", { class: "forja-features__item" }, item.icon && index.h("span", { class: "forja-features__icon", "aria-hidden": "true" }, item.icon), index.h("h3", { class: "forja-features__item-title" }, item.title), item.text && index.h("p", { class: "forja-features__item-text" }, item.text)))))) : (index.h("div", { class: "forja-features__grid", role: "list", "data-columns": this.columns }, index.h("slot", null))), index.h("slot", { key: '9521b8a787f3fb6907dd116b568a1da5764342fa', name: "after" })));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.forja_features = ForjaFeatures;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
|
|
5
|
+
/** SVG path data for known social platforms (24x24 viewBox, fill). */
|
|
6
|
+
const SOCIAL_ICONS = {
|
|
7
|
+
github: '<path d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.49.5.09.682-.217.682-.482 0-.237-.009-.866-.013-1.7-2.782.603-3.369-1.342-3.369-1.342-.454-1.155-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.088 2.91.832.091-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0112 6.836c.85.004 1.705.114 2.504.336 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.577.688.48C19.138 20.163 22 16.418 22 12c0-5.523-4.477-10-10-10z"/>',
|
|
8
|
+
twitter: '<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>',
|
|
9
|
+
x: '<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>',
|
|
10
|
+
linkedin: '<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>',
|
|
11
|
+
youtube: '<path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>',
|
|
12
|
+
instagram: '<path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913a5.885 5.885 0 001.384 2.126A5.868 5.868 0 004.14 23.37c.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558a5.898 5.898 0 002.126-1.384 5.86 5.86 0 001.384-2.126c.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913a5.89 5.89 0 00-1.384-2.126A5.847 5.847 0 0019.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227a3.81 3.81 0 01-.899 1.382 3.744 3.744 0 01-1.38.896c-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421a3.716 3.716 0 01-1.379-.899 3.644 3.644 0 01-.9-1.38c-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678a6.162 6.162 0 100 12.324 6.162 6.162 0 100-12.324zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405a1.441 1.441 0 11-2.882 0 1.441 1.441 0 012.882 0z"/>',
|
|
13
|
+
mastodon: '<path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 00.023-.043v-1.809a.052.052 0 00-.02-.041.053.053 0 00-.046-.01 20.282 20.282 0 01-4.709.547c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 01-.319-1.433.053.053 0 01.066-.054 19.648 19.648 0 004.622.536h.348c1.587 0 3.187-.109 4.75-.409 0-.012.035-.013.042-.017 2.1-.407 4.1-1.679 4.309-5.084.008-.138.04-1.46.04-1.602.001-.489.14-3.473-.067-5.309z"/>',
|
|
14
|
+
bluesky: '<path d="M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.785 2.627 3.57 3.493 6.164 3.18-3.636.58-6.84 1.996-2.678 7.035 4.956 5.048 6.564-.485 7.89-3.597.064-.15.114-.266.143-.183.03-.083.08.033.143.183 1.326 3.112 2.934 8.645 7.89 3.597 4.163-5.04.958-6.455-2.678-7.035 2.593.313 5.379-.553 6.164-3.18.246-.829.624-5.789.624-6.479 0-.688-.139-1.86-.902-2.203-.66-.299-1.664-.621-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"/>',
|
|
15
|
+
email: '<path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z"/><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"/>',
|
|
16
|
+
};
|
|
17
|
+
const FALLBACK_ICON = '<path d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101" stroke="currentColor" stroke-width="2" fill="none"/><path d="M10.172 13.828a4 4 0 005.656 0l4-4a4 4 0 10-5.656-5.656l-1.102 1.101" stroke="currentColor" stroke-width="2" fill="none"/>';
|
|
18
|
+
function getSocialIcon(slug) {
|
|
19
|
+
const key = slug.toLowerCase().replace(/[^a-z]/g, '');
|
|
20
|
+
return SOCIAL_ICONS[key] || FALLBACK_ICON;
|
|
21
|
+
}
|
|
22
|
+
const ForjaFooter = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
index.registerInstance(this, hostRef);
|
|
25
|
+
this.homeHref = '/';
|
|
26
|
+
this.showRss = true;
|
|
27
|
+
this.showSitemap = true;
|
|
28
|
+
this.tagline = 'Built with Forja';
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
const year = new Date().getFullYear();
|
|
32
|
+
const hasItems = this.items && this.items.length > 0;
|
|
33
|
+
const hasSocial = this.socialLinks && this.socialLinks.length > 0;
|
|
34
|
+
return (index.h("footer", { key: '1779882162fb8ba27cdf21d26faac13638a4de83', class: "forja-footer" }, index.h("div", { key: 'b6881c29c09d4b17adc8f328694d9cd7478046c7', class: "forja-footer__content" }, index.h("div", { key: 'ba569c1ae094dce6c47bfcc85a9d0122b6b0f691', class: "forja-footer__brand" }, this.siteName && (index.h("a", { key: '1f976458dcdec89824792d27e89177266bd3e253', href: this.homeHref, class: "forja-footer__brand-link" }, this.siteName)), this.tagline && index.h("p", { key: '0656d9fe9946ab5f5ecc51893a62149ff754e55e', class: "forja-footer__tagline" }, this.tagline)), hasItems && (index.h("nav", { key: '04e7795e7294f5844f340882a74da59b0e656130', class: "forja-footer__nav", "aria-label": "Footer navigation" }, index.h("p", { key: 'c4802164c33cf91b85efdb1f2fbda4028ca6809e', class: "forja-footer__nav-heading" }, "Links"), index.h("ul", { key: '3f8e1d71d014a5fc37df4729a7357bc71f20d2de', class: "forja-footer__nav-list" }, this.items.map(item => (index.h("li", null, index.h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-footer__nav-link" }, item.title))))))), hasSocial && (index.h("div", { key: '72d42c4542ad1eca6ebc08a1d251656c9b7575e8', class: "forja-footer__social" }, index.h("p", { key: 'd78b27344cf900fb2d64106539184709331852f0', class: "forja-footer__nav-heading" }, "Connect"), index.h("div", { key: 'c1c9009bd10672fd8e19269cc6dd774985d0f7cf', class: "forja-footer__social-links", role: "list", "aria-label": "Social links" }, this.socialLinks.map(link => (index.h("a", { href: link.url, class: "forja-footer__social-link", target: "_blank", rel: "noopener noreferrer", title: link.title, role: "listitem" }, index.h("span", { class: "forja-footer__social-icon", "aria-hidden": "true", innerHTML: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">${getSocialIcon(link.icon)}</svg>` }), index.h("span", { class: "forja-footer__sr-only" }, link.title)))))))), index.h("div", { key: '604a27ffdbc5bd7b286ca35f649fd9e72c62824f', class: "forja-footer__bottom" }, index.h("p", { key: '93edabccfab07cacdf5570ac841e4025e58e98a2', class: "forja-footer__copyright" }, "\u00A9 ", year, " ", this.siteName || 'Site', ". All rights reserved."), index.h("div", { key: '8fc15c5d9e76a21889ce6e8402cf711dc534e608', class: "forja-footer__bottom-links" }, this.showRss && (index.h("a", { key: '91766e4997d76d43bbfe696eb7ba527615de82ce', href: "/rss.xml", class: "forja-footer__bottom-link", "aria-label": "RSS Feed" }, index.h("svg", { key: 'c9cb4ee4546eded881660739ad8a9ef39cfb0c19', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { key: 'e06f360397b49644dde50b094f951b00c2967171', d: "M4 11a9 9 0 0 1 9 9" }), index.h("path", { key: 'be15bf6ec870c88719d77c50b97ba19f97fa4ba5', d: "M4 4a16 16 0 0 1 16 16" }), index.h("circle", { key: 'fcfc19bc0c1e28b96cb0002edada579d51d57801', cx: "5", cy: "19", r: "1" })))), this.showSitemap && (index.h("a", { key: 'c2795cf4063da2bf88b1241ddb93b1d400a1f7ec', href: "/sitemap.xml", class: "forja-footer__bottom-link" }, "Sitemap"))))));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
exports.forja_footer = ForjaFooter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaGallery = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const hasItems = this.items && this.items.length > 0;
|
|
12
|
+
return (index.h("section", { key: 'b895958acc335c7a586411465baa3e5f63b96298', class: "forja-gallery", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Gallery') }, index.h("slot", { key: 'b11fe68eba917a5ba6494211ebfece03088c1d12', name: "before" }), this.sectionTitle && index.h("h2", { key: 'fd8b6ba0c5a51a4add4d1f4bada6691efe1ccaba', class: "forja-gallery__title" }, this.sectionTitle), this.text && index.h("div", { key: '99e0f4a727481d965f08c6e6028bd43472908f28', class: "forja-gallery__text", innerHTML: this.text }), hasItems ? (index.h("div", { class: "forja-gallery__grid", role: "list", "data-columns": this.columns }, this.items.map(item => (index.h("figure", { class: "forja-gallery__item", role: "listitem" }, index.h("img", { src: item.imageUrl, alt: item.alt || '', class: "forja-gallery__image", loading: "lazy" }), item.caption && index.h("figcaption", { class: "forja-gallery__caption" }, item.caption)))))) : (index.h("div", { class: "forja-gallery__grid", role: "list", "data-columns": this.columns }, index.h("slot", null))), index.h("slot", { key: '6aabc6822879290b15894b9f02b58e43205a9d75', name: "after" })));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.forja_gallery = ForjaGallery;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaHero = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const classes = [
|
|
12
|
+
'forja-hero',
|
|
13
|
+
this.fullWidth && 'forja-hero--full-width',
|
|
14
|
+
this.gradient && 'forja-hero--gradient',
|
|
15
|
+
].filter(Boolean).join(' ');
|
|
16
|
+
return (index.h("section", { key: '43ec04aba0825c70330d5a9f22d6a7c4168cabad', class: classes, "aria-label": a11y.sectionLabel(this.sectionTitle, 'Hero') }, index.h("slot", { key: 'be9b16694a02aee3fe1ae96ab4bdd822ad1c0b96', name: "before" }), this.imageUrl && (index.h("img", { key: 'd41247eb3ddb7d6782f6fdbb6df7545e20c66c2b', src: this.imageUrl, alt: this.imageAlt || '', class: "forja-hero__image", loading: "eager" })), index.h("div", { key: '9545c4a55a85f3309a61afa5c7249ae84c183e86', class: "forja-hero__content" }, this.sectionTitle && index.h("h2", { key: '1f77acc32f1aae7af9d8afaabd09fc8d2a940af6', class: "forja-hero__title" }, this.sectionTitle), this.text && index.h("div", { key: '9d95c5669bd63d68a82206740e18edace7b22ef4', class: "forja-hero__text", innerHTML: this.text }), this.buttonText && this.buttonHref && (index.h("a", { key: 'ae33f3e16544486aef89a2f33e4e0361a9a1a3ca', href: this.buttonHref, class: "forja-hero__cta" }, this.buttonText))), index.h("slot", { key: '9fce9221736717aa80332eea4b981233a896a38c', name: "after" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.forja_hero = ForjaHero;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
var index$1 = require('./index.cjs.js');
|
|
6
|
+
|
|
7
|
+
const ForjaLegal = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
// ── Visibility toggles ─────────────────────────────────
|
|
11
|
+
/** Show the document type badge. Default: true. */
|
|
12
|
+
this.showDocumentType = true;
|
|
13
|
+
/** Show the version number. Default: true. */
|
|
14
|
+
this.showVersion = true;
|
|
15
|
+
/** Show the effective / updated date. Default: true. */
|
|
16
|
+
this.showDates = true;
|
|
17
|
+
/** Show the introductory summary above the body. Default: true. */
|
|
18
|
+
this.showIntro = true;
|
|
19
|
+
}
|
|
20
|
+
formatDate(iso) {
|
|
21
|
+
try {
|
|
22
|
+
return new Date(iso).toLocaleDateString(undefined, {
|
|
23
|
+
year: 'numeric',
|
|
24
|
+
month: 'long',
|
|
25
|
+
day: 'numeric',
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (_a) {
|
|
29
|
+
return iso;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
hasMetadata() {
|
|
33
|
+
return ((this.showDocumentType && !!this.documentType) ||
|
|
34
|
+
(this.showVersion && this.version != null) ||
|
|
35
|
+
(this.showDates && !!(this.effectiveDate || this.updatedAt || this.createdAt)));
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
const typeLabel = this.documentType
|
|
39
|
+
? index$1.LEGAL_DOC_TYPE_LABELS[this.documentType] || this.documentType
|
|
40
|
+
: undefined;
|
|
41
|
+
const displayDate = this.effectiveDate || this.updatedAt || this.createdAt;
|
|
42
|
+
return (index.h("article", { key: 'cc8f30680c29057c92c9974711069119d486baf0', class: "forja-legal", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Legal document') }, index.h("header", { key: '4722e587aaaa5aafd1d5b87373366e037cb56f9f', class: "forja-legal__header" }, this.sectionTitle && index.h("h1", { key: '8ddda4f7eb1e06edcf0fb2ef151858f6359ed954', class: "forja-legal__title" }, this.sectionTitle), this.hasMetadata() && (index.h("div", { key: '5c344b92507b3961ba809c5c5ed2b3d436712a4a', class: "forja-legal__meta" }, this.showDocumentType && typeLabel && (index.h("span", { key: '18ee032889dc39068301751885f0077777095779', class: "forja-legal__type" }, typeLabel)), this.showVersion && this.version != null && (index.h("span", { key: '62cddb2b691bd00ac0f81e58a5707d9bce43b91c', class: "forja-legal__version" }, "Version ", this.version)), this.showDates && displayDate && (index.h("time", { key: 'e631e74a06ef96fb3e6d663516e2a8d7e55332cb', class: "forja-legal__date", dateTime: displayDate }, this.effectiveDate ? 'Effective ' : 'Updated ', this.formatDate(displayDate)))))), this.showIntro && this.intro && (index.h("div", { key: 'e621eccaf2fa1c0059cc7699de0a80c833c2bb8b', class: "forja-legal__intro", innerHTML: this.intro })), this.body ? (index.h("div", { class: "forja-legal__body", innerHTML: this.body })) : (index.h("div", { class: "forja-legal__body" }, index.h("slot", null)))));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.forja_legal = ForjaLegal;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaLogoCloud = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
const hasLogos = this.logos && this.logos.length > 0;
|
|
12
|
+
const classes = [
|
|
13
|
+
'forja-logo-cloud',
|
|
14
|
+
this.grayscale && 'forja-logo-cloud--grayscale',
|
|
15
|
+
].filter(Boolean).join(' ');
|
|
16
|
+
return (index.h("section", { key: 'cd65ea26049ceb3de18436c961990573c548b8ae', class: classes, "aria-label": a11y.sectionLabel(this.sectionTitle, 'Partners') }, index.h("slot", { key: '8477f0f53553d808a63b3fe241541b0625248828', name: "before" }), this.sectionTitle && index.h("h2", { key: '09e073ab7deb7ce27bf0f7e5801b10f60840b732', class: "forja-logo-cloud__title" }, this.sectionTitle), this.text && index.h("div", { key: 'ab4cd6049231cfda659fc191fd560143027bb3c0', class: "forja-logo-cloud__text", innerHTML: this.text }), hasLogos ? (index.h("ul", { class: "forja-logo-cloud__grid", role: "list", "data-columns": this.columns }, this.logos.map(logo => (index.h("li", { class: "forja-logo-cloud__item" }, logo.href ? (index.h("a", { href: logo.href, class: "forja-logo-cloud__link", target: "_blank", rel: "noopener" }, index.h("img", { src: logo.imageUrl, alt: logo.alt, class: "forja-logo-cloud__image", loading: "lazy" }))) : (index.h("img", { src: logo.imageUrl, alt: logo.alt, class: "forja-logo-cloud__image", loading: "lazy" }))))))) : (index.h("slot", null)), index.h("slot", { key: 'a56c182cd2090916395563b0c30fe21c929d1353', name: "after" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.forja_logo_cloud = ForjaLogoCloud;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
|
|
5
|
+
const ForjaNav = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
index.registerInstance(this, hostRef);
|
|
8
|
+
this.forjaThemeToggle = index.createEvent(this, "forjaThemeToggle");
|
|
9
|
+
this.forjaLocaleChange = index.createEvent(this, "forjaLocaleChange");
|
|
10
|
+
this.homeHref = '/';
|
|
11
|
+
this.showThemeToggle = true;
|
|
12
|
+
this.mobileOpen = false;
|
|
13
|
+
this.localeDropdownOpen = false;
|
|
14
|
+
this.toggleMobile = () => {
|
|
15
|
+
this.mobileOpen = !this.mobileOpen;
|
|
16
|
+
};
|
|
17
|
+
this.toggleLocaleDropdown = () => {
|
|
18
|
+
this.localeDropdownOpen = !this.localeDropdownOpen;
|
|
19
|
+
};
|
|
20
|
+
this.selectLocale = (code) => {
|
|
21
|
+
this.localeDropdownOpen = false;
|
|
22
|
+
this.forjaLocaleChange.emit(code);
|
|
23
|
+
};
|
|
24
|
+
this.handleThemeToggle = () => {
|
|
25
|
+
this.forjaThemeToggle.emit();
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
renderNavLink(item) {
|
|
29
|
+
return (index.h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__link" }, item.title));
|
|
30
|
+
}
|
|
31
|
+
renderDesktopItem(item) {
|
|
32
|
+
if (item.children && item.children.length > 0) {
|
|
33
|
+
return (index.h("div", { class: "forja-nav__dropdown" }, index.h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__link" }, item.title), index.h("div", { class: "forja-nav__dropdown-menu" }, item.children.map(child => (index.h("a", { href: child.href, target: child.openInNewTab ? '_blank' : undefined, rel: child.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__dropdown-item" }, child.title))))));
|
|
34
|
+
}
|
|
35
|
+
return this.renderNavLink(item);
|
|
36
|
+
}
|
|
37
|
+
renderThemeToggle() {
|
|
38
|
+
if (!this.showThemeToggle)
|
|
39
|
+
return null;
|
|
40
|
+
return (index.h("button", { type: "button", "aria-label": "Toggle dark mode", class: "forja-nav__theme-toggle", onClick: this.handleThemeToggle }, index.h("svg", { class: "forja-nav__icon-moon", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("path", { d: "M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z" })), index.h("svg", { class: "forja-nav__icon-sun", xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("circle", { cx: "12", cy: "12", r: "5" }), index.h("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), index.h("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), index.h("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), index.h("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), index.h("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), index.h("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), index.h("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), index.h("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" }))));
|
|
41
|
+
}
|
|
42
|
+
renderLocaleSwitcher() {
|
|
43
|
+
if (!this.locales || this.locales.length <= 1)
|
|
44
|
+
return null;
|
|
45
|
+
return (index.h("div", { class: "forja-nav__locale-switcher" }, index.h("button", { type: "button", "aria-label": "Switch language", class: "forja-nav__locale-toggle", onClick: this.toggleLocaleDropdown }, this.currentLocale || 'en'), this.localeDropdownOpen && (index.h("div", { class: "forja-nav__locale-dropdown" }, this.locales.map(locale => (index.h("button", { type: "button", class: `forja-nav__locale-option${locale.code === this.currentLocale ? ' forja-nav__locale-option--active' : ''}`, onClick: () => this.selectLocale(locale.code) }, locale.name)))))));
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
const navItems = this.items || [];
|
|
49
|
+
return (index.h("nav", { key: 'd53286c5cb8ab3a53d319bfc4f56261f14bbd0e7', class: "forja-nav", "aria-label": "Main navigation" }, index.h("div", { key: 'f6ddbb63413194a4c9b65f28685c856794da9085', class: "forja-nav__container" }, this.siteName && (index.h("a", { key: '18bf629d717e2bf64da5705900bde85958a4efcc', href: this.homeHref, class: "forja-nav__brand" }, this.siteName)), index.h("div", { key: '60df3ad46c3d3d8c69ad94956d40e50713143fe1', class: "forja-nav__desktop" }, navItems.map(item => this.renderDesktopItem(item)), this.renderLocaleSwitcher(), this.renderThemeToggle()), index.h("button", { key: '5a11fece72449bb05dfab14a49dc0e4cb08b3030', type: "button", "aria-label": "Toggle navigation", class: "forja-nav__hamburger", onClick: this.toggleMobile }, index.h("svg", { key: '19ca0c78e8a9d2c0566f5722e058fe6bfdfa5e26', xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, index.h("line", { key: '1a61567b4a0e80d1b924a8ddd82e6565e9c87896', x1: "3", y1: "12", x2: "21", y2: "12" }), index.h("line", { key: 'd57ae9589e5369942d48698b0842bd3390130747', x1: "3", y1: "6", x2: "21", y2: "6" }), index.h("line", { key: 'dc58d5f24249e2989ce33f7a366d6926a7408496', x1: "3", y1: "18", x2: "21", y2: "18" })))), this.mobileOpen && (index.h("div", { key: 'c2ae6b8da7095d8851196fc22b2e10bf7abce3b9', class: "forja-nav__mobile" }, navItems.map(item => (index.h("a", { href: item.href, target: item.openInNewTab ? '_blank' : undefined, rel: item.openInNewTab ? 'noopener noreferrer' : undefined, class: "forja-nav__mobile-link" }, item.title))), this.renderThemeToggle()))));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.forja_nav = ForjaNav;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-Bp-SZu2Y.js');
|
|
4
|
+
var a11y = require('./a11y-IAJPjMwx.js');
|
|
5
|
+
|
|
6
|
+
const ForjaNewsletter = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
this.forjaSubmit = index.createEvent(this, "forjaSubmit");
|
|
10
|
+
this.buttonText = 'Subscribe';
|
|
11
|
+
this.handleSubmit = (e) => {
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
const form = e.target;
|
|
14
|
+
this.forjaSubmit.emit(new FormData(form));
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const emailId = a11y.sectionId(this.sectionTitle, 'newsletter-email');
|
|
19
|
+
const nameId = a11y.sectionId(this.sectionTitle, 'newsletter-name');
|
|
20
|
+
return (index.h("section", { key: '2b01646d3aa10d12c9568551edc2f8836a1e6199', class: "forja-newsletter", "aria-label": a11y.sectionLabel(this.sectionTitle, 'Newsletter') }, index.h("slot", { key: '020fd3a2e10a86f6bec4f9499e217818c534885f', name: "before" }), this.sectionTitle && index.h("h2", { key: 'e540517a30deb49e8d3b1271b8099fe2c5167f02', class: "forja-newsletter__title" }, this.sectionTitle), this.text && index.h("div", { key: 'c31f0ad333733992f426ca1b564a609603ce7f43', class: "forja-newsletter__text", innerHTML: this.text }), index.h("form", { key: '08ba3a98b082670794797a08048ab1cc683aaef4', class: "forja-newsletter__form", action: this.formAction, method: this.formAction ? 'post' : undefined, onSubmit: this.handleSubmit }, this.showName && (index.h("div", { key: '9537213f04bdd4d2e2008a783bc70a7e7a268865', class: "forja-newsletter__field" }, index.h("label", { key: '8feb551b009eb8f288cbcb54b18360c9fe09a694', class: "forja-newsletter__label", htmlFor: nameId }, "Name"), index.h("input", { key: 'b2df119a4d000e46a8e1cfb1ab2a2514be2f28a4', id: nameId, name: "name", type: "text", class: "forja-newsletter__input" }))), index.h("div", { key: '7fff741fe589ee3bc7f5eb278f07dfb78a4363c1', class: "forja-newsletter__field" }, index.h("label", { key: '2dda48f90d5303de371101b1da09e0402291a704', class: "forja-newsletter__label", htmlFor: emailId }, "Email"), index.h("input", { key: '7c913bcd86483511926cd2c6df3b2d8fae202a3b', id: emailId, name: "email", type: "email", class: "forja-newsletter__input", required: true, "aria-required": "true" })), index.h("button", { key: '374357cafdc13172944199b9537f32fa252fa274', type: "submit", class: "forja-newsletter__submit" }, this.buttonText)), index.h("slot", { key: '253f3650ec3839083c2ef1a768c78627fef141b3', name: "after" })));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.forja_newsletter = ForjaNewsletter;
|