@xenterprises/nuxt-x-marketing 1.0.3 → 1.1.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.
Files changed (62) hide show
  1. package/README.md +130 -11
  2. package/app/components/X/Mark/CodeBlock/index.vue +19 -7
  3. package/app/components/X/Mark/Divider/Glow.vue +25 -19
  4. package/app/components/X/Mark/Section/Stitch.vue +45 -31
  5. package/app/composables/{useParallax.ts → useParallax.js} +6 -7
  6. package/app/composables/{useScrollReveal.ts → useScrollReveal.js} +4 -4
  7. package/package.json +1 -1
  8. package/.claude/settings.local.json +0 -8
  9. package/.nuxtrc +0 -1
  10. package/.playground/app.config.ts +0 -74
  11. package/.playground/app.vue +0 -269
  12. package/.playground/components/AppFooter.vue +0 -103
  13. package/.playground/components/AppHeader.vue +0 -41
  14. package/.playground/components/CodeExample.vue +0 -70
  15. package/.playground/components/ComponentPlayground.vue +0 -117
  16. package/.playground/components/DocsHeader.vue +0 -19
  17. package/.playground/layouts/default.vue +0 -15
  18. package/.playground/layouts/docs-layout.vue +0 -161
  19. package/.playground/layouts/docs.vue +0 -11
  20. package/.playground/nuxt.config.ts +0 -17
  21. package/.playground/pages/blog/author.vue +0 -145
  22. package/.playground/pages/blog/card.vue +0 -149
  23. package/.playground/pages/blog/cta.vue +0 -131
  24. package/.playground/pages/blog/detail.vue +0 -471
  25. package/.playground/pages/blog/list.vue +0 -261
  26. package/.playground/pages/blog/navigation.vue +0 -228
  27. package/.playground/pages/blog/sidebar.vue +0 -279
  28. package/.playground/pages/config.vue +0 -289
  29. package/.playground/pages/content/comparison.vue +0 -253
  30. package/.playground/pages/content/cta.vue +0 -245
  31. package/.playground/pages/content/features.vue +0 -217
  32. package/.playground/pages/content/newsletter-section.vue +0 -260
  33. package/.playground/pages/content/newsletter.vue +0 -200
  34. package/.playground/pages/content/pricing.vue +0 -335
  35. package/.playground/pages/content/testimonials.vue +0 -188
  36. package/.playground/pages/hero.vue +0 -257
  37. package/.playground/pages/index.vue +0 -381
  38. package/.playground/pages/layout/footer.vue +0 -210
  39. package/.playground/pages/layout/legal-footer.vue +0 -121
  40. package/.playground/pages/layout/navbar.vue +0 -285
  41. package/.playground/pages/layout/section.vue +0 -266
  42. package/.playground/pages/layout/x-legal.vue +0 -199
  43. package/.playground/pages/modals/feature-modal.vue +0 -320
  44. package/.playground/pages/modals/image-lightbox.vue +0 -277
  45. package/.playground/pages/modals/video-modal.vue +0 -222
  46. package/.playground/pages/notifications/announcement-bar.vue +0 -164
  47. package/.playground/pages/notifications/cookie-banner.vue +0 -210
  48. package/.playground/pages/notifications/cookie-toast.vue +0 -143
  49. package/.playground/pages/notifications/gdpr.vue +0 -276
  50. package/.playground/pages/notifications/social-proof-toast.vue +0 -515
  51. package/.playground/pages/ui/badge.vue +0 -161
  52. package/.playground/pages/ui/bg-pattern.vue +0 -177
  53. package/.playground/pages/ui/glass-card.vue +0 -179
  54. package/.playground/pages/ui/glow-divider.vue +0 -179
  55. package/.playground/pages/ui/promo-card.vue +0 -259
  56. package/.playground/pages/ui/section-stitch.vue +0 -411
  57. package/.playground/pages/utilities/back-to-top.vue +0 -153
  58. package/.playground/pages/utilities/popup-chat.vue +0 -224
  59. package/componentList.json +0 -2129
  60. package/screenshots/playground-home.png +0 -0
  61. package/tsconfig.json +0 -3
  62. /package/app/composables/{useXBlog.ts → useXBlog.js} +0 -0
@@ -1,217 +0,0 @@
1
- <template>
2
- <div class="min-h-screen">
3
- <!-- Page Header -->
4
- <div class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6">
5
- <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">Features</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- Feature grids with icons, images, and multiple layout options.
8
- </p>
9
- </div>
10
-
11
- <!-- Demo Content -->
12
- <div class="space-y-0">
13
- <!-- Grid Layout - 3 Columns -->
14
- <XMarkSection bg="default">
15
- <div class="text-center mb-12">
16
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">layout="grid" columns="3"</span>
17
- <h2 class="xText-headline">Grid Layout - 3 Columns</h2>
18
- </div>
19
- <XMarkFeatures
20
- :features="featuresWithIcons"
21
- layout="grid"
22
- :columns="3"
23
- />
24
- </XMarkSection>
25
-
26
- <!-- Grid Layout - 2 Columns -->
27
- <XMarkSection bg="subtle">
28
- <div class="text-center mb-12">
29
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">layout="grid" columns="2"</span>
30
- <h2 class="xText-headline">Grid Layout - 2 Columns</h2>
31
- </div>
32
- <XMarkFeatures
33
- :features="featuresWithIcons.slice(0, 4)"
34
- layout="grid"
35
- :columns="2"
36
- />
37
- </XMarkSection>
38
-
39
- <!-- Grid Layout - 4 Columns -->
40
- <XMarkSection bg="default">
41
- <div class="text-center mb-12">
42
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">layout="grid" columns="4"</span>
43
- <h2 class="xText-headline">Grid Layout - 4 Columns</h2>
44
- </div>
45
- <XMarkFeatures
46
- :features="featuresWithIcons.slice(0, 4)"
47
- layout="grid"
48
- :columns="4"
49
- />
50
- </XMarkSection>
51
-
52
- <!-- List Layout -->
53
- <XMarkSection bg="subtle">
54
- <div class="text-center mb-12">
55
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">layout="list"</span>
56
- <h2 class="xText-headline">List Layout</h2>
57
- </div>
58
- <XMarkFeatures
59
- :features="featuresWithIcons.slice(0, 3)"
60
- layout="list"
61
- />
62
- </XMarkSection>
63
-
64
- <!-- With Images -->
65
- <XMarkSection bg="default">
66
- <div class="text-center mb-12">
67
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">With Images</span>
68
- <h2 class="xText-headline">Features with Images</h2>
69
- </div>
70
- <XMarkFeatures
71
- :features="featuresWithImages"
72
- layout="grid"
73
- :columns="3"
74
- />
75
- </XMarkSection>
76
-
77
- <!-- Props Documentation -->
78
- <XMarkSection bg="subtle">
79
- <h2 class="text-lg font-semibold mb-6">Props</h2>
80
- <div class="overflow-x-auto">
81
- <table class="w-full text-sm">
82
- <thead>
83
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
84
- <th class="text-left py-3 px-4 font-medium">Prop</th>
85
- <th class="text-left py-3 px-4 font-medium">Type</th>
86
- <th class="text-left py-3 px-4 font-medium">Default</th>
87
- <th class="text-left py-3 px-4 font-medium">Description</th>
88
- </tr>
89
- </thead>
90
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
91
- <tr>
92
- <td class="py-3 px-4 font-mono text-xs">features</td>
93
- <td class="py-3 px-4">Array</td>
94
- <td class="py-3 px-4">required</td>
95
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Array of { icon?, img?: { src, alt? }, title, description, link?: string | { to, label?, target? } }</td>
96
- </tr>
97
- <tr>
98
- <td class="py-3 px-4 font-mono text-xs">layout</td>
99
- <td class="py-3 px-4">String</td>
100
- <td class="py-3 px-4">'grid'</td>
101
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">grid, list, alternating</td>
102
- </tr>
103
- <tr>
104
- <td class="py-3 px-4 font-mono text-xs">columns</td>
105
- <td class="py-3 px-4">Number</td>
106
- <td class="py-3 px-4">3</td>
107
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">2, 3, or 4 columns</td>
108
- </tr>
109
- </tbody>
110
- </table>
111
- </div>
112
- </XMarkSection>
113
-
114
- <!-- Code Example -->
115
- <XMarkSection bg="default">
116
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
117
- <CodeExample title="Features Usage" :code="codeExample" />
118
- </XMarkSection>
119
- </div>
120
- </div>
121
- </template>
122
-
123
- <script setup>
124
- // Initialize scroll reveal animations
125
- useScrollReveal()
126
-
127
- const codeExample = `<XMarkFeatures
128
- :features="[
129
- {
130
- icon: 'i-lucide-zap',
131
- title: 'Lightning Fast',
132
- description: 'Optimized for performance.',
133
- link: '/features/speed'
134
- },
135
- {
136
- icon: 'i-lucide-shield',
137
- title: 'Secure',
138
- description: 'Built with security best practices.',
139
- link: '/features/security'
140
- },
141
- {
142
- icon: 'i-lucide-palette',
143
- title: 'Customizable',
144
- description: 'Easy to customize with Tailwind.',
145
- link: '/features/design'
146
- }
147
- ]"
148
- layout="grid"
149
- :columns="3"
150
- />
151
-
152
- <!-- With images instead of icons -->
153
- <XMarkFeatures
154
- :features="featuresWithImages"
155
- layout="list"
156
- />`
157
-
158
- const featuresWithIcons = [
159
- {
160
- icon: 'i-lucide-zap',
161
- title: 'Lightning Fast',
162
- description: 'Optimized for performance with minimal overhead and maximum efficiency.',
163
- link: '#'
164
- },
165
- {
166
- icon: 'i-lucide-shield',
167
- title: 'Secure by Default',
168
- description: 'Built with security best practices and regular vulnerability assessments.',
169
- link: '#'
170
- },
171
- {
172
- icon: 'i-lucide-palette',
173
- title: 'Highly Customizable',
174
- description: 'Easy to customize with Tailwind CSS and design tokens.',
175
- link: '#'
176
- },
177
- {
178
- icon: 'i-lucide-code',
179
- title: 'Developer Friendly',
180
- description: 'Clean APIs and comprehensive documentation for rapid development.',
181
- link: '#'
182
- },
183
- {
184
- icon: 'i-lucide-globe',
185
- title: 'Globally Available',
186
- description: 'Edge-deployed for low latency access from anywhere in the world.',
187
- link: '#'
188
- },
189
- {
190
- icon: 'i-lucide-headphones',
191
- title: '24/7 Support',
192
- description: 'Round-the-clock support to help you succeed with our platform.',
193
- link: '#'
194
- }
195
- ]
196
-
197
- const featuresWithImages = [
198
- {
199
- img: { src: 'https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=300&fit=crop', alt: 'Analytics dashboard' },
200
- title: 'Analytics Dashboard',
201
- description: 'Gain insights with our powerful analytics and reporting tools.',
202
- link: '#'
203
- },
204
- {
205
- img: { src: 'https://images.unsplash.com/photo-1551434678-e076c223a692?w=400&h=300&fit=crop', alt: 'Team collaboration' },
206
- title: 'Team Collaboration',
207
- description: 'Work together seamlessly with real-time collaboration features.',
208
- link: '#'
209
- },
210
- {
211
- img: { src: 'https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=400&h=300&fit=crop', alt: 'API integration' },
212
- title: 'API Integration',
213
- description: 'Connect with your favorite tools through our robust API.',
214
- link: '#'
215
- }
216
- ]
217
- </script>
@@ -1,260 +0,0 @@
1
- <template>
2
- <div>
3
- <!-- Page Header -->
4
- <div class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6">
5
- <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">Newsletter Section</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- A newsletter signup section designed to fit between Footer and LegalFooter.
8
- </p>
9
- </div>
10
-
11
- <div class="space-y-16 pb-16">
12
- <!-- Dark Variant (Default) -->
13
- <section>
14
- <div class="px-8 py-6 bg-neutral-50 dark:bg-neutral-800/50">
15
- <h2 class="text-lg font-semibold">Dark Variant (Default)</h2>
16
- <p class="text-sm text-neutral-600 dark:text-neutral-400">
17
- Matches the footer dark background
18
- </p>
19
- </div>
20
- <XMarkSectionNewsletter
21
- title="Subscribe to our newsletter"
22
- description="Get the latest news and updates."
23
- @submit="handleSubmit"
24
- />
25
- </section>
26
-
27
- <!-- Light Variant -->
28
- <section>
29
- <div class="px-8 py-6 bg-neutral-50 dark:bg-neutral-800/50">
30
- <h2 class="text-lg font-semibold">Light Variant</h2>
31
- <p class="text-sm text-neutral-600 dark:text-neutral-400">
32
- For use with light backgrounds
33
- </p>
34
- </div>
35
- <XMarkSectionNewsletter
36
- variant="light"
37
- title="Stay in the loop"
38
- description="Weekly insights delivered to your inbox."
39
- :button="{ label: 'Join' }"
40
- @submit="handleSubmit"
41
- />
42
- </section>
43
-
44
- <!-- Custom Content -->
45
- <section>
46
- <div class="px-8 py-6 bg-neutral-50 dark:bg-neutral-800/50">
47
- <h2 class="text-lg font-semibold">Custom Content</h2>
48
- <p class="text-sm text-neutral-600 dark:text-neutral-400">
49
- All text is customizable
50
- </p>
51
- </div>
52
- <XMarkSectionNewsletter
53
- title="Join 10,000+ subscribers"
54
- description="Get exclusive content, early access, and special offers."
55
- placeholder="you@company.com"
56
- :button="{ label: 'Get Started' }"
57
- privacy-text="We respect your privacy. Read our privacy policy."
58
- success-message="You're on the list!"
59
- @submit="handleSubmit"
60
- />
61
- </section>
62
-
63
- <!-- Full Page Example -->
64
- <section>
65
- <div class="px-8 py-6 bg-neutral-50 dark:bg-neutral-800/50">
66
- <h2 class="text-lg font-semibold">Full Layout Example</h2>
67
- <p class="text-sm text-neutral-600 dark:text-neutral-400">
68
- How it looks between Footer and LegalFooter
69
- </p>
70
- </div>
71
- <div class="border border-dashed border-neutral-300 dark:border-neutral-700">
72
- <!-- Simulated Footer Content -->
73
- <div class="bg-neutral-950 text-white px-8 py-12">
74
- <div class="max-w-7xl mx-auto">
75
- <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
76
- <div class="col-span-2">
77
- <div class="text-xl font-bold">Your Logo</div>
78
- <p class="mt-4 text-neutral-400 max-w-xs">
79
- Building the future of digital experiences.
80
- </p>
81
- </div>
82
- <div>
83
- <h4 class="font-semibold text-sm uppercase tracking-wider text-neutral-300 mb-4">Product</h4>
84
- <ul class="space-y-2 text-sm text-neutral-400">
85
- <li>Features</li>
86
- <li>Pricing</li>
87
- <li>Documentation</li>
88
- </ul>
89
- </div>
90
- <div>
91
- <h4 class="font-semibold text-sm uppercase tracking-wider text-neutral-300 mb-4">Company</h4>
92
- <ul class="space-y-2 text-sm text-neutral-400">
93
- <li>About</li>
94
- <li>Blog</li>
95
- <li>Careers</li>
96
- </ul>
97
- </div>
98
- </div>
99
- </div>
100
- </div>
101
-
102
- <!-- Newsletter Section -->
103
- <XMarkSectionNewsletter
104
- title="Subscribe to our newsletter"
105
- description="Get the latest news and updates."
106
- @submit="handleSubmit"
107
- />
108
-
109
- <!-- Simulated Legal Footer -->
110
- <div class="bg-neutral-950 border-t border-neutral-800 px-8 py-6">
111
- <div class="max-w-7xl mx-auto flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
112
- <p class="text-sm text-neutral-500">© 2024 Your Company. All rights reserved.</p>
113
- <nav class="flex gap-6">
114
- <span class="text-sm text-neutral-500">Privacy Policy</span>
115
- <span class="text-sm text-neutral-500">Terms of Service</span>
116
- </nav>
117
- </div>
118
- </div>
119
- </div>
120
- </section>
121
-
122
- <!-- Props Documentation -->
123
- <section class="px-8">
124
- <h2 class="text-lg font-semibold mb-6">Props</h2>
125
- <div class="overflow-x-auto">
126
- <table class="w-full text-sm">
127
- <thead>
128
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
129
- <th class="text-left py-3 px-4 font-medium">Prop</th>
130
- <th class="text-left py-3 px-4 font-medium">Type</th>
131
- <th class="text-left py-3 px-4 font-medium">Default</th>
132
- <th class="text-left py-3 px-4 font-medium">Description</th>
133
- </tr>
134
- </thead>
135
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
136
- <tr>
137
- <td class="py-3 px-4 font-mono text-xs">title</td>
138
- <td class="py-3 px-4">String</td>
139
- <td class="py-3 px-4">'Subscribe to our newsletter'</td>
140
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Section title</td>
141
- </tr>
142
- <tr>
143
- <td class="py-3 px-4 font-mono text-xs">description</td>
144
- <td class="py-3 px-4">String</td>
145
- <td class="py-3 px-4">'Get the latest news and updates.'</td>
146
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Section description</td>
147
- </tr>
148
- <tr>
149
- <td class="py-3 px-4 font-mono text-xs">placeholder</td>
150
- <td class="py-3 px-4">String</td>
151
- <td class="py-3 px-4">'Enter your email'</td>
152
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Input placeholder text</td>
153
- </tr>
154
- <tr>
155
- <td class="py-3 px-4 font-mono text-xs">button</td>
156
- <td class="py-3 px-4">Object</td>
157
- <td class="py-3 px-4">{ label: 'Subscribe' }</td>
158
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Button config { label, color? }</td>
159
- </tr>
160
- <tr>
161
- <td class="py-3 px-4 font-mono text-xs">hasPrivacy</td>
162
- <td class="py-3 px-4">Boolean</td>
163
- <td class="py-3 px-4">true</td>
164
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show privacy note</td>
165
- </tr>
166
- <tr>
167
- <td class="py-3 px-4 font-mono text-xs">privacyText</td>
168
- <td class="py-3 px-4">String</td>
169
- <td class="py-3 px-4">'No spam. Unsubscribe anytime.'</td>
170
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Privacy note text</td>
171
- </tr>
172
- <tr>
173
- <td class="py-3 px-4 font-mono text-xs">successMessage</td>
174
- <td class="py-3 px-4">String</td>
175
- <td class="py-3 px-4">'Thanks for subscribing!'</td>
176
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Message shown after submission</td>
177
- </tr>
178
- <tr>
179
- <td class="py-3 px-4 font-mono text-xs">variant</td>
180
- <td class="py-3 px-4">String</td>
181
- <td class="py-3 px-4">'dark'</td>
182
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">'dark' or 'light'</td>
183
- </tr>
184
- <tr>
185
- <td class="py-3 px-4 font-mono text-xs">resetDelay</td>
186
- <td class="py-3 px-4">Number</td>
187
- <td class="py-3 px-4">5000</td>
188
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Reset form after delay (ms), 0 to not reset</td>
189
- </tr>
190
- <tr>
191
- <td class="py-3 px-4 font-mono text-xs">pattern</td>
192
- <td class="py-3 px-4">String</td>
193
- <td class="py-3 px-4">null</td>
194
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">dots, grid, diagonal, topography, circuit, waves</td>
195
- </tr>
196
- <tr>
197
- <td class="py-3 px-4 font-mono text-xs">patternOpacity</td>
198
- <td class="py-3 px-4">Number</td>
199
- <td class="py-3 px-4">0.05</td>
200
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Pattern opacity (0 to 1)</td>
201
- </tr>
202
- </tbody>
203
- </table>
204
- </div>
205
- </section>
206
-
207
- <!-- Events -->
208
- <section class="px-8">
209
- <h2 class="text-lg font-semibold mb-4">Events</h2>
210
- <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
211
- <p class="font-mono text-sm text-primary-500">@submit</p>
212
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">
213
- Emitted when form is submitted. Payload: email address (string)
214
- </p>
215
- </div>
216
- </section>
217
-
218
- <!-- Code Example -->
219
- <section class="px-8">
220
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
221
- <CodeExample title="Newsletter Section Usage" :code="codeExample" />
222
- </section>
223
- </div>
224
- </div>
225
- </template>
226
-
227
- <script setup>
228
- const codeExample = `<!-- Dark variant (between Footer and LegalFooter) -->
229
- <XMarkLayoutFooter ... />
230
- <XMarkSectionNewsletter
231
- title="Subscribe to our newsletter"
232
- description="Get the latest news and updates."
233
- @submit="handleSubmit"
234
- />
235
- <XMarkLayoutFooterLegal />
236
-
237
- <!-- Light variant -->
238
- <XMarkSectionNewsletter
239
- variant="light"
240
- title="Stay in the loop"
241
- :button="{ label: 'Join' }"
242
- @submit="handleSubmit"
243
- />
244
-
245
- <!-- Custom content -->
246
- <XMarkSectionNewsletter
247
- title="Join 10,000+ subscribers"
248
- description="Get exclusive content and early access."
249
- placeholder="you@company.com"
250
- :button="{ label: 'Get Started' }"
251
- privacy-text="We respect your privacy."
252
- success-message="You're on the list!"
253
- :reset-delay="3000"
254
- @submit="handleSubmit"
255
- />`
256
-
257
- const handleSubmit = (email) => {
258
- console.log('Newsletter signup:', email)
259
- }
260
- </script>
@@ -1,200 +0,0 @@
1
- <template>
2
- <div class="min-h-screen">
3
- <!-- Page Header -->
4
- <div class="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800 px-8 py-6">
5
- <h1 class="text-2xl font-bold text-neutral-900 dark:text-white">Newsletter</h1>
6
- <p class="mt-2 text-neutral-600 dark:text-neutral-400">
7
- Email signup forms in multiple layout variants.
8
- </p>
9
- </div>
10
-
11
- <!-- Demo Content -->
12
- <div class="space-y-0">
13
- <!-- Default Variant -->
14
- <XMarkSection bg="default">
15
- <div class="text-center mb-8">
16
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">variant="default"</span>
17
- <h2 class="text-lg font-semibold">Default Variant</h2>
18
- <p class="text-neutral-600 dark:text-neutral-400">Centered layout with title and description</p>
19
- </div>
20
- <XMarkNewsletterForm
21
- title="Subscribe to our newsletter"
22
- description="Get the latest updates, articles, and resources delivered to your inbox weekly."
23
- :button="{ label: 'Subscribe' }"
24
- variant="default"
25
- :has-privacy="true"
26
- />
27
- </XMarkSection>
28
-
29
- <!-- Inline Variant -->
30
- <XMarkSection bg="subtle">
31
- <div class="text-center mb-8">
32
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">variant="inline"</span>
33
- <h2 class="text-lg font-semibold">Inline Variant</h2>
34
- <p class="text-neutral-600 dark:text-neutral-400">Side-by-side layout for footers and headers</p>
35
- </div>
36
- <XMarkNewsletterForm
37
- title="Stay up to date"
38
- description="No spam, just valuable content."
39
- :button="{ label: 'Join' }"
40
- variant="inline"
41
- :has-privacy="false"
42
- />
43
- </XMarkSection>
44
-
45
- <!-- Card Variant -->
46
- <XMarkSection bg="default">
47
- <div class="text-center mb-8">
48
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">variant="card"</span>
49
- <h2 class="text-lg font-semibold">Card Variant</h2>
50
- <p class="text-neutral-600 dark:text-neutral-400">Contained card with background</p>
51
- </div>
52
- <div class="max-w-2xl mx-auto">
53
- <XMarkNewsletterForm
54
- title="Join our community"
55
- description="Get exclusive content, early access, and special offers."
56
- :button="{ label: 'Sign Up' }"
57
- variant="card"
58
- :has-privacy="true"
59
- />
60
- </div>
61
- </XMarkSection>
62
-
63
- <!-- Compact Variant -->
64
- <XMarkSection bg="subtle">
65
- <div class="text-center mb-8">
66
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">variant="compact"</span>
67
- <h2 class="text-lg font-semibold">Compact Variant</h2>
68
- <p class="text-neutral-600 dark:text-neutral-400">Minimal for sidebars and tight spaces</p>
69
- </div>
70
- <div class="max-w-sm mx-auto">
71
- <XMarkNewsletterForm
72
- title="Newsletter"
73
- description="Weekly insights delivered to your inbox."
74
- :button="{ label: 'Subscribe' }"
75
- variant="compact"
76
- :has-privacy="true"
77
- />
78
- </div>
79
- </XMarkSection>
80
-
81
- <!-- Without Privacy Note -->
82
- <XMarkSection bg="default">
83
- <div class="text-center mb-8">
84
- <span class="inline-block px-3 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 text-xs font-medium mb-4">hasPrivacy="false"</span>
85
- <h2 class="text-lg font-semibold">Without Privacy Note</h2>
86
- </div>
87
- <XMarkNewsletterForm
88
- title="Get notified"
89
- description="Be the first to know when we launch new features."
90
- :button="{ label: 'Notify Me' }"
91
- variant="default"
92
- :has-privacy="false"
93
- />
94
- </XMarkSection>
95
-
96
- <!-- Props Documentation -->
97
- <XMarkSection bg="subtle">
98
- <h2 class="text-lg font-semibold mb-6">Props</h2>
99
- <div class="overflow-x-auto">
100
- <table class="w-full text-sm">
101
- <thead>
102
- <tr class="border-b border-neutral-200 dark:border-neutral-700">
103
- <th class="text-left py-3 px-4 font-medium">Prop</th>
104
- <th class="text-left py-3 px-4 font-medium">Type</th>
105
- <th class="text-left py-3 px-4 font-medium">Default</th>
106
- <th class="text-left py-3 px-4 font-medium">Description</th>
107
- </tr>
108
- </thead>
109
- <tbody class="divide-y divide-neutral-200 dark:divide-neutral-700">
110
- <tr>
111
- <td class="py-3 px-4 font-mono text-xs">title</td>
112
- <td class="py-3 px-4">String</td>
113
- <td class="py-3 px-4">'Subscribe to our newsletter'</td>
114
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Heading text</td>
115
- </tr>
116
- <tr>
117
- <td class="py-3 px-4 font-mono text-xs">description</td>
118
- <td class="py-3 px-4">String</td>
119
- <td class="py-3 px-4">''</td>
120
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Supporting text</td>
121
- </tr>
122
- <tr>
123
- <td class="py-3 px-4 font-mono text-xs">button</td>
124
- <td class="py-3 px-4">Object</td>
125
- <td class="py-3 px-4">{ label: 'Subscribe' }</td>
126
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Button config { label, color? }</td>
127
- </tr>
128
- <tr>
129
- <td class="py-3 px-4 font-mono text-xs">variant</td>
130
- <td class="py-3 px-4">String</td>
131
- <td class="py-3 px-4">'default'</td>
132
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">default, inline, card, compact</td>
133
- </tr>
134
- <tr>
135
- <td class="py-3 px-4 font-mono text-xs">hasPrivacy</td>
136
- <td class="py-3 px-4">Boolean</td>
137
- <td class="py-3 px-4">true</td>
138
- <td class="py-3 px-4 text-neutral-600 dark:text-neutral-400">Show "No spam" privacy note</td>
139
- </tr>
140
- </tbody>
141
- </table>
142
- </div>
143
- </XMarkSection>
144
-
145
- <!-- Events -->
146
- <XMarkSection bg="default">
147
- <h2 class="text-lg font-semibold mb-4">Events</h2>
148
- <div class="space-y-4">
149
- <div class="p-4 bg-neutral-50 dark:bg-neutral-800/50 rounded-lg">
150
- <p class="font-mono text-sm text-primary-500">@submit</p>
151
- <p class="text-sm text-neutral-600 dark:text-neutral-400 mt-1">Emitted with email address when form is submitted</p>
152
- </div>
153
- </div>
154
- </XMarkSection>
155
-
156
- <!-- Code Example -->
157
- <XMarkSection bg="subtle">
158
- <h2 class="text-lg font-semibold mb-4">Code Example</h2>
159
- <CodeExample title="Newsletter Form Usage" :code="codeExample" />
160
- </XMarkSection>
161
- </div>
162
- </div>
163
- </template>
164
-
165
- <script setup>
166
- // Initialize scroll reveal animations
167
- useScrollReveal()
168
-
169
- const codeExample = `<!-- Default centered layout -->
170
- <XMarkNewsletterForm
171
- title="Subscribe to our newsletter"
172
- description="Get weekly updates delivered to your inbox."
173
- :button="{ label: 'Subscribe' }"
174
- @submit="handleSubmit"
175
- />
176
-
177
- <!-- Inline layout for footers -->
178
- <XMarkNewsletterForm
179
- title="Stay updated"
180
- :button="{ label: 'Join', color: 'secondary' }"
181
- variant="inline"
182
- :has-privacy="false"
183
- @submit="handleSubmit"
184
- />
185
-
186
- <!-- Card variant -->
187
- <XMarkNewsletterForm
188
- title="Join our community"
189
- description="Get exclusive content."
190
- variant="card"
191
- @submit="handleSubmit"
192
- />
193
-
194
- <!-- Compact for sidebars -->
195
- <XMarkNewsletterForm
196
- title="Newsletter"
197
- variant="compact"
198
- @submit="handleSubmit"
199
- />`
200
- </script>