@zoyth/simple-site-framework 1.0.0
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/LICENSE +21 -0
- package/README.md +572 -0
- package/bin/create-simple-site.js +390 -0
- package/bin/simple-site.js +664 -0
- package/dist/client.js +135 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +107 -0
- package/dist/client.mjs.map +1 -0
- package/dist/components/index.d.mts +3936 -0
- package/dist/components/index.d.ts +3936 -0
- package/dist/components/index.js +38265 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +38173 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/index.d.mts +298 -0
- package/dist/config/index.d.ts +298 -0
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.mjs +1 -0
- package/dist/config/index.mjs.map +1 -0
- package/dist/index.d.mts +2184 -0
- package/dist/index.d.ts +2184 -0
- package/dist/index.js +1713 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1605 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/i18n/index.js +665 -0
- package/dist/lib/i18n/index.js.map +1 -0
- package/dist/lib/i18n/index.mjs +621 -0
- package/dist/lib/i18n/index.mjs.map +1 -0
- package/docs/DOCUMENTATION-STRUCTURE.md +1156 -0
- package/docs/EXPORTS.md +125 -0
- package/docs/PERFORMANCE.md +757 -0
- package/docs/POLICY-PAGES.md +867 -0
- package/docs/ROADMAP.md +334 -0
- package/docs/SEO.md +455 -0
- package/docs/SITEMAP.md +708 -0
- package/docs/STRUCTURED-DATA.md +671 -0
- package/docs/accessibility/common-patterns.md +529 -0
- package/docs/accessibility/keyboard-navigation.md +263 -0
- package/docs/accessibility/overview.md +122 -0
- package/docs/accessibility/screen-readers.md +311 -0
- package/docs/accessibility/wcag-compliance.md +159 -0
- package/docs/api/README.md +164 -0
- package/docs/api/components/Accessibility.md +356 -0
- package/docs/api/components/Button.md +240 -0
- package/docs/api/components/HeroSection.md +306 -0
- package/docs/architecture/decisions.md +449 -0
- package/docs/components/AnalyticsTracker.md +58 -0
- package/docs/components/AnimatedCounter.md +48 -0
- package/docs/components/AnimatedSection.md +56 -0
- package/docs/components/BlogCard.md +42 -0
- package/docs/components/Checkbox.md +56 -0
- package/docs/components/CodeBlock.md +52 -0
- package/docs/components/ComparisonTable.md +40 -0
- package/docs/components/ComponentDemo.md +38 -0
- package/docs/components/CountdownTimer.md +51 -0
- package/docs/components/ExitIntentModal.md +56 -0
- package/docs/components/FAQAccordion.md +66 -0
- package/docs/components/FeaturesGrid.md +55 -0
- package/docs/components/FileUpload.md +54 -0
- package/docs/components/I18nMetaTags.md +55 -0
- package/docs/components/Icon.md +53 -0
- package/docs/components/LazySection.md +46 -0
- package/docs/components/LiveProof.md +53 -0
- package/docs/components/LoadingSpinner.md +46 -0
- package/docs/components/MultiStepForm.md +48 -0
- package/docs/components/PolicyLayout.md +55 -0
- package/docs/components/PricingTable.md +49 -0
- package/docs/components/Radio.md +59 -0
- package/docs/components/SEOMetaTags.md +58 -0
- package/docs/components/ScriptInjector.md +50 -0
- package/docs/components/Select.md +72 -0
- package/docs/components/Skeleton.md +47 -0
- package/docs/components/StatsSection.md +48 -0
- package/docs/components/StickyBar.md +62 -0
- package/docs/components/StructuredData.md +99 -0
- package/docs/components/StyleGuide.md +46 -0
- package/docs/components/TableOfContents.md +47 -0
- package/docs/components/TestimonialCarousel.md +42 -0
- package/docs/components/Timeline.md +51 -0
- package/docs/components/Toast.md +59 -0
- package/docs/components/TrackedLink.md +62 -0
- package/docs/components/TrustBadges.md +44 -0
- package/docs/components/conversion/MobileCTA.md +363 -0
- package/docs/components/forms/ContactForm.md +75 -0
- package/docs/components/forms/FormField.md +74 -0
- package/docs/components/layout/Footer.md +601 -0
- package/docs/components/layout/Header.md +549 -0
- package/docs/components/layout/LanguageSelector.md +54 -0
- package/docs/components/layout/LanguageSwitcher.md +24 -0
- package/docs/components/overview.md +447 -0
- package/docs/components/sections/AboutSection.md +48 -0
- package/docs/components/sections/CTASection.md +596 -0
- package/docs/components/sections/CaseStudySection.md +47 -0
- package/docs/components/sections/ContactSection.md +599 -0
- package/docs/components/sections/FeatureSection.md +44 -0
- package/docs/components/sections/HeroSection.md +404 -0
- package/docs/components/sections/LogosSection.md +47 -0
- package/docs/components/sections/PersonalTaxesSection.md +23 -0
- package/docs/components/sections/RecruitingSection.md +23 -0
- package/docs/components/sections/SecurePortalSection.md +23 -0
- package/docs/components/sections/ServicePageLayout.md +52 -0
- package/docs/components/sections/ServicesSection.md +49 -0
- package/docs/components/sections/TestimonialSection.md +44 -0
- package/docs/components/sections/WhyChooseUsSection.md +54 -0
- package/docs/components/ui/Breadcrumb.md +70 -0
- package/docs/components/ui/Button.md +514 -0
- package/docs/components/ui/Card.md +501 -0
- package/docs/components/ui/Input.md +54 -0
- package/docs/components/ui/MobileLinks.md +43 -0
- package/docs/components/ui/Modal.md +60 -0
- package/docs/components/ui/Tabs.md +62 -0
- package/docs/components/ui/Textarea.md +52 -0
- package/docs/core-concepts/configuration-driven.md +552 -0
- package/docs/core-concepts/overview.md +351 -0
- package/docs/features/accessibility/README.md +73 -0
- package/docs/features/accessibility/aria-support.md +177 -0
- package/docs/features/accessibility/color-contrast.md +155 -0
- package/docs/features/accessibility/focus-management.md +187 -0
- package/docs/features/accessibility/testing.md +196 -0
- package/docs/features/analytics/README.md +51 -0
- package/docs/features/analytics/ab-testing.md +171 -0
- package/docs/features/analytics/conversion-tracking.md +207 -0
- package/docs/features/analytics/custom-events.md +219 -0
- package/docs/features/analytics/privacy.md +198 -0
- package/docs/features/analytics/setup.md +114 -0
- package/docs/features/analytics/tracking-events.md +224 -0
- package/docs/features/i18n/README.md +51 -0
- package/docs/features/i18n/best-practices.md +273 -0
- package/docs/features/i18n/configuration.md +84 -0
- package/docs/features/i18n/formatting.md +133 -0
- package/docs/features/i18n/locale-detection.md +122 -0
- package/docs/features/i18n/routing.md +99 -0
- package/docs/features/i18n/rtl-support.md +191 -0
- package/docs/features/i18n/translations.md +129 -0
- package/docs/features/internationalization.md +595 -0
- package/docs/features/performance/README.md +77 -0
- package/docs/features/performance/bundle-size.md +134 -0
- package/docs/features/performance/caching.md +131 -0
- package/docs/features/performance/code-splitting.md +121 -0
- package/docs/features/performance/image-optimization.md +110 -0
- package/docs/features/performance/lazy-loading.md +92 -0
- package/docs/features/performance/monitoring.md +148 -0
- package/docs/features/seo/README.md +51 -0
- package/docs/features/seo/best-practices.md +184 -0
- package/docs/features/seo/canonical-urls.md +182 -0
- package/docs/features/seo/meta-tags.md +126 -0
- package/docs/features/seo/open-graph.md +166 -0
- package/docs/features/seo/robots-txt.md +146 -0
- package/docs/features/seo/sitemaps.md +162 -0
- package/docs/features/seo/structured-data.md +166 -0
- package/docs/getting-started/installation.md +292 -0
- package/docs/getting-started/introduction.md +195 -0
- package/docs/getting-started/quick-start.md +460 -0
- package/docs/guides/analytics-setup.md +616 -0
- package/docs/i18n/CONFIGURATION.md +353 -0
- package/docs/i18n/EXAMPLES.md +402 -0
- package/docs/i18n/MIGRATION.md +260 -0
- package/docs/i18n/SEO.md +392 -0
- package/docs/i18n/STATIC-GENERATION-FIX.md +71 -0
- package/docs/migration/changelog.md +136 -0
- package/docs/migration/overview.md +233 -0
- package/docs/recipes/adding-animations.md +475 -0
- package/docs/recipes/forms-with-validation.md +393 -0
- package/package.json +152 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# ContactForm
|
|
2
|
+
|
|
3
|
+
Production-ready contact form with validation and accessibility.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { ContactForm } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Client Component (`/client` export)
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<ContactForm
|
|
17
|
+
fields={[
|
|
18
|
+
{ name: 'name', type: 'text', label: 'Name', required: true },
|
|
19
|
+
{ name: 'email', type: 'email', label: 'Email', required: true },
|
|
20
|
+
{ name: 'message', type: 'textarea', label: 'Message', required: true },
|
|
21
|
+
]}
|
|
22
|
+
onSubmit={async (data) => {
|
|
23
|
+
await fetch('/api/contact', {
|
|
24
|
+
method: 'POST',
|
|
25
|
+
body: JSON.stringify(data),
|
|
26
|
+
});
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Props
|
|
32
|
+
|
|
33
|
+
| Prop | Type | Required | Description |
|
|
34
|
+
|------|------|----------|-------------|
|
|
35
|
+
| `fields` | `ContactFormField[]` | Yes | Form fields |
|
|
36
|
+
| `onSubmit` | `function` | Yes | Submit handler |
|
|
37
|
+
| `submitText` | `string \| LocalizedString` | No | Submit button text |
|
|
38
|
+
| `successMessage` | `string \| LocalizedString` | No | Success message |
|
|
39
|
+
| `errorMessage` | `string \| LocalizedString` | No | Error message |
|
|
40
|
+
| `className` | `string` | No | Custom classes |
|
|
41
|
+
| `locale` | `string` | No | Current locale |
|
|
42
|
+
|
|
43
|
+
### ContactFormField
|
|
44
|
+
|
|
45
|
+
| Prop | Type | Required | Description |
|
|
46
|
+
|------|------|----------|-------------|
|
|
47
|
+
| `name` | `string` | Yes | Field name |
|
|
48
|
+
| `type` | `string` | No | Field type |
|
|
49
|
+
| `label` | `string \| LocalizedString` | Yes | Field label |
|
|
50
|
+
| `placeholder` | `string` | No | Placeholder |
|
|
51
|
+
| `required` | `boolean` | No | Required field |
|
|
52
|
+
| `rows` | `number` | No | Rows (textarea) |
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
// Quote request form
|
|
58
|
+
<ContactForm
|
|
59
|
+
fields={[
|
|
60
|
+
{ name: 'name', type: 'text', label: 'Full Name', required: true },
|
|
61
|
+
{ name: 'email', type: 'email', label: 'Email', required: true },
|
|
62
|
+
{ name: 'company', type: 'text', label: 'Company' },
|
|
63
|
+
{ name: 'budget', type: 'text', label: 'Budget' },
|
|
64
|
+
{ name: 'details', type: 'textarea', label: 'Project Details', required: true, rows: 6 },
|
|
65
|
+
]}
|
|
66
|
+
submitText="Request Quote"
|
|
67
|
+
successMessage="Thanks! We'll send you a quote within 24 hours."
|
|
68
|
+
onSubmit={handleSubmit}
|
|
69
|
+
/>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## See Also
|
|
73
|
+
|
|
74
|
+
- [ContactSection](../sections/ContactSection.md)
|
|
75
|
+
- [FormField](./FormField.md)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# FormField
|
|
2
|
+
|
|
3
|
+
Form field wrapper with label, error, and help text.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { FormField } from '@zoyth/simple-site-framework';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Type:** Server Component
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
<FormField
|
|
17
|
+
label="Email Address"
|
|
18
|
+
name="email"
|
|
19
|
+
error={errors.email}
|
|
20
|
+
helperText="We'll never share your email"
|
|
21
|
+
>
|
|
22
|
+
<Input name="email" type="email" />
|
|
23
|
+
</FormField>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Props
|
|
27
|
+
|
|
28
|
+
| Prop | Type | Required | Description |
|
|
29
|
+
|------|------|----------|-------------|
|
|
30
|
+
| `label` | `string \| LocalizedString` | Yes | Field label |
|
|
31
|
+
| `name` | `string` | Yes | Field name |
|
|
32
|
+
| `children` | `ReactNode` | Yes | Input element |
|
|
33
|
+
| `error` | `string` | No | Error message |
|
|
34
|
+
| `helperText` | `string` | No | Help text |
|
|
35
|
+
| `required` | `boolean` | No | Mark as required |
|
|
36
|
+
| `className` | `string` | No | Custom classes |
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// With error
|
|
42
|
+
<FormField
|
|
43
|
+
label="Password"
|
|
44
|
+
name="password"
|
|
45
|
+
error="Password must be at least 8 characters"
|
|
46
|
+
required
|
|
47
|
+
>
|
|
48
|
+
<Input name="password" type="password" />
|
|
49
|
+
</FormField>
|
|
50
|
+
|
|
51
|
+
// With helper text
|
|
52
|
+
<FormField
|
|
53
|
+
label="Username"
|
|
54
|
+
name="username"
|
|
55
|
+
helperText="Choose a unique username"
|
|
56
|
+
>
|
|
57
|
+
<Input name="username" />
|
|
58
|
+
</FormField>
|
|
59
|
+
|
|
60
|
+
// Multi-language
|
|
61
|
+
<FormField
|
|
62
|
+
label={{ en: 'Full Name', fr: 'Nom complet' }}
|
|
63
|
+
name="name"
|
|
64
|
+
locale={locale}
|
|
65
|
+
>
|
|
66
|
+
<Input name="name" />
|
|
67
|
+
</FormField>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## See Also
|
|
71
|
+
|
|
72
|
+
- [Input](../ui/Input.md)
|
|
73
|
+
- [Textarea](../ui/Textarea.md)
|
|
74
|
+
- [ContactForm](./ContactForm.md)
|