@aspect-ops/exon-ui 0.2.2 → 0.4.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/README.md +0 -45
- package/dist/components/BottomNav/BottomNavItem.svelte +4 -3
- package/dist/components/BottomNav/BottomNavItem.svelte.d.ts +2 -1
- package/dist/components/CTASection/CTASection.svelte +298 -0
- package/dist/components/CTASection/CTASection.svelte.d.ts +15 -0
- package/dist/components/CTASection/index.d.ts +2 -0
- package/dist/components/CTASection/index.js +1 -0
- package/dist/components/DoughnutChart/DoughnutChart.svelte +4 -4
- package/dist/components/FlexibleGrid/FlexibleGrid.svelte +118 -0
- package/dist/components/FlexibleGrid/FlexibleGrid.svelte.d.ts +7 -0
- package/dist/components/FlexibleGrid/README.md +212 -0
- package/dist/components/FlexibleGrid/index.d.ts +2 -0
- package/dist/components/FlexibleGrid/index.js +1 -0
- package/dist/components/GlobalHeader/GlobalHeader.svelte +806 -0
- package/dist/components/GlobalHeader/GlobalHeader.svelte.d.ts +3 -0
- package/dist/components/GlobalHeader/index.d.ts +2 -0
- package/dist/components/GlobalHeader/index.js +1 -0
- package/dist/components/Hero/Hero.svelte +306 -0
- package/dist/components/Hero/Hero.svelte.d.ts +18 -0
- package/dist/components/Hero/index.d.ts +2 -0
- package/dist/components/Hero/index.js +1 -0
- package/dist/components/HeroLeftAligned/HeroLeftAligned.svelte +182 -0
- package/dist/components/HeroLeftAligned/HeroLeftAligned.svelte.d.ts +8 -0
- package/dist/components/HeroLeftAligned/README.md +168 -0
- package/dist/components/HeroLeftAligned/index.d.ts +2 -0
- package/dist/components/HeroLeftAligned/index.js +1 -0
- package/dist/components/IconFeatureCard/IconFeatureCard.svelte +173 -0
- package/dist/components/IconFeatureCard/IconFeatureCard.svelte.d.ts +4 -0
- package/dist/components/IconFeatureCard/README.md +234 -0
- package/dist/components/IconFeatureCard/index.d.ts +2 -0
- package/dist/components/IconFeatureCard/index.js +1 -0
- package/dist/components/ImageTextCard/ImageTextCard.svelte +149 -0
- package/dist/components/ImageTextCard/ImageTextCard.svelte.d.ts +22 -0
- package/dist/components/ImageTextCard/README.md +177 -0
- package/dist/components/ImageTextCard/index.d.ts +2 -0
- package/dist/components/ImageTextCard/index.js +1 -0
- package/dist/components/LogoCloud/LogoCloud.svelte +333 -0
- package/dist/components/LogoCloud/LogoCloud.svelte.d.ts +20 -0
- package/dist/components/LogoCloud/index.d.ts +2 -0
- package/dist/components/LogoCloud/index.js +1 -0
- package/dist/components/ServiceCard/ServiceCard.svelte +359 -0
- package/dist/components/ServiceCard/ServiceCard.svelte.d.ts +16 -0
- package/dist/components/ServiceCard/index.d.ts +1 -0
- package/dist/components/ServiceCard/index.js +1 -0
- package/dist/components/Sidebar/SidebarGroup.svelte +1 -4
- package/dist/components/SplitSection/SplitSection.svelte +194 -0
- package/dist/components/SplitSection/SplitSection.svelte.d.ts +15 -0
- package/dist/components/SplitSection/index.d.ts +1 -0
- package/dist/components/SplitSection/index.js +1 -0
- package/dist/components/TestimonialCard/TestimonialCard.svelte +290 -0
- package/dist/components/TestimonialCard/TestimonialCard.svelte.d.ts +14 -0
- package/dist/components/TestimonialCard/index.d.ts +1 -0
- package/dist/components/TestimonialCard/index.js +1 -0
- package/dist/components/Timeline/Timeline.svelte +444 -0
- package/dist/components/Timeline/Timeline.svelte.d.ts +19 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Timeline/index.js +1 -0
- package/dist/index.d.ts +23 -1
- package/dist/index.js +13 -1
- package/dist/types/index.d.ts +49 -1
- package/dist/types/layout.d.ts +20 -0
- package/package.json +9 -2
- package/dist/components/Mermaid/Mermaid.svelte +0 -320
- package/dist/components/Mermaid/Mermaid.svelte.d.ts +0 -38
- package/dist/components/Mermaid/index.d.ts +0 -1
- package/dist/components/Mermaid/index.js +0 -1
- package/dist/components/Mermaid/mermaid.d.ts +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GlobalHeader } from './GlobalHeader.svelte';
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
export interface HeroProps {
|
|
5
|
+
variant?: 'default' | 'centered' | 'split' | 'video';
|
|
6
|
+
backgroundImage?: string;
|
|
7
|
+
backgroundVideo?: string;
|
|
8
|
+
overlay?: boolean | string;
|
|
9
|
+
overlayOpacity?: number;
|
|
10
|
+
height?: 'auto' | 'screen' | 'half' | string;
|
|
11
|
+
align?: 'left' | 'center' | 'right';
|
|
12
|
+
class?: string;
|
|
13
|
+
children: Snippet;
|
|
14
|
+
actions?: Snippet;
|
|
15
|
+
badge?: Snippet;
|
|
16
|
+
media?: Snippet;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
variant = 'default',
|
|
21
|
+
backgroundImage,
|
|
22
|
+
backgroundVideo,
|
|
23
|
+
overlay = false,
|
|
24
|
+
overlayOpacity = 0.6,
|
|
25
|
+
height = 'screen',
|
|
26
|
+
align = 'left',
|
|
27
|
+
class: className = '',
|
|
28
|
+
children,
|
|
29
|
+
actions,
|
|
30
|
+
badge,
|
|
31
|
+
media
|
|
32
|
+
}: HeroProps = $props();
|
|
33
|
+
|
|
34
|
+
const heightValue = $derived(() => {
|
|
35
|
+
switch (height) {
|
|
36
|
+
case 'screen':
|
|
37
|
+
return '100vh';
|
|
38
|
+
case 'half':
|
|
39
|
+
return '50vh';
|
|
40
|
+
case 'auto':
|
|
41
|
+
return 'auto';
|
|
42
|
+
default:
|
|
43
|
+
return height;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const overlayColor = $derived(() => {
|
|
48
|
+
if (overlay === true)
|
|
49
|
+
return 'rgba(0, 0, 0, var(--hero-overlay-opacity, ' + overlayOpacity + '))';
|
|
50
|
+
if (typeof overlay === 'string') return overlay;
|
|
51
|
+
return 'transparent';
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<section
|
|
56
|
+
class="hero hero--{variant} hero--align-{align} {className}"
|
|
57
|
+
role="banner"
|
|
58
|
+
style:--hero-height={heightValue()}
|
|
59
|
+
style:--hero-overlay-color={overlayColor()}
|
|
60
|
+
style:--hero-overlay-opacity={overlayOpacity}
|
|
61
|
+
>
|
|
62
|
+
{#if backgroundImage && variant !== 'video'}
|
|
63
|
+
<div class="hero__background" aria-hidden="true">
|
|
64
|
+
<img src={backgroundImage} alt="" loading="lazy" />
|
|
65
|
+
</div>
|
|
66
|
+
{/if}
|
|
67
|
+
|
|
68
|
+
{#if variant === 'video' && backgroundVideo}
|
|
69
|
+
<div class="hero__background hero__background--video" aria-hidden="true">
|
|
70
|
+
<video autoplay muted loop playsinline poster={backgroundImage}>
|
|
71
|
+
<source src={backgroundVideo} type="video/mp4" />
|
|
72
|
+
</video>
|
|
73
|
+
</div>
|
|
74
|
+
{/if}
|
|
75
|
+
|
|
76
|
+
{#if overlay}
|
|
77
|
+
<div class="hero__overlay" aria-hidden="true"></div>
|
|
78
|
+
{/if}
|
|
79
|
+
|
|
80
|
+
<div class="hero__content">
|
|
81
|
+
{#if badge}
|
|
82
|
+
<div class="hero__badge">
|
|
83
|
+
{@render badge()}
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
86
|
+
|
|
87
|
+
<div class="hero__main">
|
|
88
|
+
{@render children()}
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
{#if actions}
|
|
92
|
+
<div class="hero__actions">
|
|
93
|
+
{@render actions()}
|
|
94
|
+
</div>
|
|
95
|
+
{/if}
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
{#if variant === 'split' && media}
|
|
99
|
+
<div class="hero__media">
|
|
100
|
+
{@render media()}
|
|
101
|
+
</div>
|
|
102
|
+
{/if}
|
|
103
|
+
</section>
|
|
104
|
+
|
|
105
|
+
<style>
|
|
106
|
+
.hero {
|
|
107
|
+
position: relative;
|
|
108
|
+
display: flex;
|
|
109
|
+
min-height: var(--hero-min-height, var(--hero-height, 100vh));
|
|
110
|
+
padding: var(
|
|
111
|
+
--hero-padding,
|
|
112
|
+
max(env(safe-area-inset-top), 3rem) max(env(safe-area-inset-right), 1.5rem)
|
|
113
|
+
max(env(safe-area-inset-bottom), 3rem) max(env(safe-area-inset-left), 1.5rem)
|
|
114
|
+
);
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
animation: hero-fade-in 0.6s ease-out;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@media (prefers-reduced-motion: reduce) {
|
|
120
|
+
.hero {
|
|
121
|
+
animation: none;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes hero-fade-in {
|
|
126
|
+
from {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
transform: translateY(1rem);
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
transform: translateY(0);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Background */
|
|
137
|
+
.hero__background {
|
|
138
|
+
position: absolute;
|
|
139
|
+
top: 0;
|
|
140
|
+
left: 0;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
z-index: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.hero__background img,
|
|
147
|
+
.hero__background video {
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 100%;
|
|
150
|
+
object-fit: cover;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.hero__background--video video {
|
|
154
|
+
pointer-events: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Overlay */
|
|
158
|
+
.hero__overlay {
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 0;
|
|
161
|
+
left: 0;
|
|
162
|
+
width: 100%;
|
|
163
|
+
height: 100%;
|
|
164
|
+
background: var(--hero-overlay-color);
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Content */
|
|
169
|
+
.hero__content {
|
|
170
|
+
position: relative;
|
|
171
|
+
z-index: 2;
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
gap: 1.5rem;
|
|
175
|
+
width: 100%;
|
|
176
|
+
max-width: var(--hero-content-max-width, 75rem);
|
|
177
|
+
margin: 0 auto;
|
|
178
|
+
color: var(--hero-text-color, inherit);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.hero__badge {
|
|
182
|
+
display: inline-flex;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.hero__main {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
gap: 1rem;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.hero__actions {
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-wrap: wrap;
|
|
194
|
+
gap: 1rem;
|
|
195
|
+
margin-top: 0.5rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Variants */
|
|
199
|
+
.hero--default {
|
|
200
|
+
align-items: center;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.hero--centered {
|
|
204
|
+
align-items: center;
|
|
205
|
+
text-align: center;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.hero--centered .hero__content {
|
|
209
|
+
align-items: center;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.hero--centered .hero__badge {
|
|
213
|
+
align-self: center;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.hero--centered .hero__actions {
|
|
217
|
+
justify-content: center;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.hero--split {
|
|
221
|
+
display: grid;
|
|
222
|
+
grid-template-columns: 1fr;
|
|
223
|
+
gap: 2rem;
|
|
224
|
+
align-items: center;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.hero--split .hero__content {
|
|
228
|
+
max-width: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.hero__media {
|
|
232
|
+
position: relative;
|
|
233
|
+
z-index: 2;
|
|
234
|
+
width: 100%;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.hero__media :global(img),
|
|
238
|
+
.hero__media :global(video) {
|
|
239
|
+
width: 100%;
|
|
240
|
+
height: auto;
|
|
241
|
+
border-radius: 0.5rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.hero--video {
|
|
245
|
+
align-items: center;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Alignment */
|
|
249
|
+
.hero--align-left .hero__content {
|
|
250
|
+
align-items: flex-start;
|
|
251
|
+
text-align: left;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.hero--align-center .hero__content {
|
|
255
|
+
align-items: center;
|
|
256
|
+
text-align: center;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.hero--align-right .hero__content {
|
|
260
|
+
align-items: flex-end;
|
|
261
|
+
text-align: right;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* Responsive */
|
|
265
|
+
@media (min-width: 48rem) {
|
|
266
|
+
.hero {
|
|
267
|
+
padding: var(
|
|
268
|
+
--hero-padding,
|
|
269
|
+
max(env(safe-area-inset-top), 4rem) max(env(safe-area-inset-right), 2rem)
|
|
270
|
+
max(env(safe-area-inset-bottom), 4rem) max(env(safe-area-inset-left), 2rem)
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.hero--split {
|
|
275
|
+
grid-template-columns: 1fr 1fr;
|
|
276
|
+
gap: 3rem;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.hero__content {
|
|
280
|
+
gap: 2rem;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.hero__main {
|
|
284
|
+
gap: 1.5rem;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.hero__actions {
|
|
288
|
+
gap: 1.5rem;
|
|
289
|
+
margin-top: 1rem;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@media (min-width: 64rem) {
|
|
294
|
+
.hero {
|
|
295
|
+
padding: var(
|
|
296
|
+
--hero-padding,
|
|
297
|
+
max(env(safe-area-inset-top), 5rem) max(env(safe-area-inset-right), 3rem)
|
|
298
|
+
max(env(safe-area-inset-bottom), 5rem) max(env(safe-area-inset-left), 3rem)
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.hero--split {
|
|
303
|
+
gap: 4rem;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
export interface HeroProps {
|
|
3
|
+
variant?: 'default' | 'centered' | 'split' | 'video';
|
|
4
|
+
backgroundImage?: string;
|
|
5
|
+
backgroundVideo?: string;
|
|
6
|
+
overlay?: boolean | string;
|
|
7
|
+
overlayOpacity?: number;
|
|
8
|
+
height?: 'auto' | 'screen' | 'half' | string;
|
|
9
|
+
align?: 'left' | 'center' | 'right';
|
|
10
|
+
class?: string;
|
|
11
|
+
children: Snippet;
|
|
12
|
+
actions?: Snippet;
|
|
13
|
+
badge?: Snippet;
|
|
14
|
+
media?: Snippet;
|
|
15
|
+
}
|
|
16
|
+
declare const Hero: import("svelte").Component<HeroProps, {}, "">;
|
|
17
|
+
type Hero = ReturnType<typeof Hero>;
|
|
18
|
+
export default Hero;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Hero } from './Hero.svelte';
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HeroLeftAlignedProps } from '../../types/index.js';
|
|
3
|
+
|
|
4
|
+
interface Props extends HeroLeftAlignedProps {
|
|
5
|
+
children?: import('svelte').Snippet;
|
|
6
|
+
actions?: import('svelte').Snippet;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
title,
|
|
11
|
+
subtitle,
|
|
12
|
+
backgroundImage,
|
|
13
|
+
backgroundColor = 'var(--color-primary, #3b82f6)',
|
|
14
|
+
textColor = 'var(--color-text-inverse, #ffffff)',
|
|
15
|
+
overlayOpacity = 0.7,
|
|
16
|
+
height = 'auto',
|
|
17
|
+
class: className = '',
|
|
18
|
+
children,
|
|
19
|
+
actions
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<section
|
|
24
|
+
class="hero-left-aligned {className}"
|
|
25
|
+
style="background-color: {backgroundColor}; color: {textColor}; --overlay-opacity: {overlayOpacity}; min-height: {height};"
|
|
26
|
+
role="banner"
|
|
27
|
+
>
|
|
28
|
+
<!-- Background Image with Overlay -->
|
|
29
|
+
{#if backgroundImage}
|
|
30
|
+
<div
|
|
31
|
+
class="hero-left-aligned__background"
|
|
32
|
+
style="background-image: url({backgroundImage});"
|
|
33
|
+
aria-hidden="true"
|
|
34
|
+
></div>
|
|
35
|
+
<div class="hero-left-aligned__overlay" style="background-color: {backgroundColor};"></div>
|
|
36
|
+
{/if}
|
|
37
|
+
|
|
38
|
+
<!-- Content Container -->
|
|
39
|
+
<div class="hero-left-aligned__container">
|
|
40
|
+
<div class="hero-left-aligned__content">
|
|
41
|
+
<!-- Title -->
|
|
42
|
+
<h1 class="hero-left-aligned__title">
|
|
43
|
+
{@html title}
|
|
44
|
+
</h1>
|
|
45
|
+
|
|
46
|
+
<!-- Subtitle -->
|
|
47
|
+
{#if subtitle}
|
|
48
|
+
<p class="hero-left-aligned__subtitle">
|
|
49
|
+
{@html subtitle}
|
|
50
|
+
</p>
|
|
51
|
+
{/if}
|
|
52
|
+
|
|
53
|
+
<!-- Custom Content Slot -->
|
|
54
|
+
{#if children}
|
|
55
|
+
<div class="hero-left-aligned__body">
|
|
56
|
+
{@render children()}
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
59
|
+
|
|
60
|
+
<!-- Actions (Buttons) -->
|
|
61
|
+
{#if actions}
|
|
62
|
+
<div class="hero-left-aligned__actions">
|
|
63
|
+
{@render actions()}
|
|
64
|
+
</div>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<style>
|
|
71
|
+
.hero-left-aligned {
|
|
72
|
+
position: relative;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
min-height: 700px;
|
|
75
|
+
font-family: var(--font-family, system-ui, sans-serif);
|
|
76
|
+
animation: heroFadeIn 1s ease-out;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes heroFadeIn {
|
|
80
|
+
from {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
transform: translateY(20px);
|
|
83
|
+
}
|
|
84
|
+
to {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
transform: translateY(0);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.hero-left-aligned__background {
|
|
91
|
+
position: absolute;
|
|
92
|
+
inset: 0;
|
|
93
|
+
background-size: contain;
|
|
94
|
+
background-repeat: no-repeat;
|
|
95
|
+
background-position: 120% center;
|
|
96
|
+
opacity: calc(1 - var(--overlay-opacity, 0.7));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.hero-left-aligned__overlay {
|
|
100
|
+
position: absolute;
|
|
101
|
+
inset: 0;
|
|
102
|
+
background: linear-gradient(to right, var(--color-primary, currentColor) 0%, transparent 60%);
|
|
103
|
+
opacity: 0.85;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.hero-left-aligned__container {
|
|
107
|
+
position: relative;
|
|
108
|
+
z-index: 10;
|
|
109
|
+
max-width: var(--max-width, 80rem);
|
|
110
|
+
margin: 0 auto;
|
|
111
|
+
padding: var(--space-xl, 3rem) var(--space-lg, 1.5rem);
|
|
112
|
+
padding-right: var(--space-2xl, 4rem);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.hero-left-aligned__content {
|
|
116
|
+
max-width: 64rem;
|
|
117
|
+
text-align: left;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.hero-left-aligned__title {
|
|
121
|
+
font-size: var(--text-5xl, 3rem);
|
|
122
|
+
font-weight: 700;
|
|
123
|
+
line-height: 1.1;
|
|
124
|
+
letter-spacing: -0.02em;
|
|
125
|
+
margin-bottom: var(--space-lg, 1.5rem);
|
|
126
|
+
color: inherit;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.hero-left-aligned__subtitle {
|
|
130
|
+
font-size: var(--text-lg, 1.125rem);
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
line-height: 1.6;
|
|
133
|
+
margin-bottom: var(--space-xl, 3rem);
|
|
134
|
+
max-width: 48rem;
|
|
135
|
+
opacity: 0.95;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.hero-left-aligned__body {
|
|
139
|
+
margin-bottom: var(--space-xl, 3rem);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.hero-left-aligned__actions {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
gap: var(--space-md, 1rem);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* Responsive Styles */
|
|
149
|
+
@media (min-width: 768px) {
|
|
150
|
+
.hero-left-aligned__container {
|
|
151
|
+
padding: var(--space-2xl, 4rem) var(--space-xl, 3rem);
|
|
152
|
+
padding-right: var(--space-3xl, 6rem);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.hero-left-aligned__title {
|
|
156
|
+
font-size: var(--text-6xl, 3.75rem);
|
|
157
|
+
margin-bottom: var(--space-xl, 3rem);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media (min-width: 1024px) {
|
|
162
|
+
.hero-left-aligned__container {
|
|
163
|
+
padding: var(--space-3xl, 6rem) var(--space-2xl, 4rem);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.hero-left-aligned__title {
|
|
167
|
+
font-size: var(--text-7xl, 4.5rem);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.hero-left-aligned__subtitle {
|
|
171
|
+
font-size: var(--text-xl, 1.25rem);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Dark mode support */
|
|
176
|
+
@media (prefers-color-scheme: dark) {
|
|
177
|
+
.hero-left-aligned {
|
|
178
|
+
--color-primary: var(--color-primary-dark, #3b82f6);
|
|
179
|
+
--color-text-inverse: var(--color-text-inverse-dark, #f9fafb);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HeroLeftAlignedProps } from '../../types/index.js';
|
|
2
|
+
interface Props extends HeroLeftAlignedProps {
|
|
3
|
+
children?: import('svelte').Snippet;
|
|
4
|
+
actions?: import('svelte').Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const HeroLeftAligned: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type HeroLeftAligned = ReturnType<typeof HeroLeftAligned>;
|
|
8
|
+
export default HeroLeftAligned;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# HeroLeftAligned
|
|
2
|
+
|
|
3
|
+
A hero section component with left-aligned content, optional background image, and customizable actions. Perfect for landing pages and website headers.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Left-aligned text layout
|
|
8
|
+
- Optional background image with overlay
|
|
9
|
+
- Customizable colors and opacity
|
|
10
|
+
- Flexible content with snippets
|
|
11
|
+
- Responsive design
|
|
12
|
+
- Fade-in animation
|
|
13
|
+
- Full accessibility support
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Basic Example
|
|
18
|
+
|
|
19
|
+
```svelte
|
|
20
|
+
<script>
|
|
21
|
+
import { HeroLeftAligned, Button } from '@aspect-ops/exon-ui';
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<HeroLeftAligned
|
|
25
|
+
title="Welcome to Our Platform"
|
|
26
|
+
subtitle="Build amazing web applications with our UI library"
|
|
27
|
+
backgroundColor="#3b82f6"
|
|
28
|
+
>
|
|
29
|
+
{#snippet actions()}
|
|
30
|
+
<Button variant="primary">Get Started</Button>
|
|
31
|
+
<Button variant="outline">Learn More</Button>
|
|
32
|
+
{/snippet}
|
|
33
|
+
</HeroLeftAligned>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With Background Image
|
|
37
|
+
|
|
38
|
+
```svelte
|
|
39
|
+
<HeroLeftAligned
|
|
40
|
+
title="Transform Your Business"
|
|
41
|
+
subtitle="Powerful tools to help you succeed"
|
|
42
|
+
backgroundImage="/hero-bg.jpg"
|
|
43
|
+
backgroundColor="#002147"
|
|
44
|
+
overlayOpacity={0.7}
|
|
45
|
+
>
|
|
46
|
+
{#snippet actions()}
|
|
47
|
+
<Button variant="primary">Start Free Trial</Button>
|
|
48
|
+
<Button variant="secondary">Watch Demo</Button>
|
|
49
|
+
{/snippet}
|
|
50
|
+
</HeroLeftAligned>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### With Custom Content
|
|
54
|
+
|
|
55
|
+
```svelte
|
|
56
|
+
<HeroLeftAligned title="Advanced Analytics" subtitle="Get insights from your data">
|
|
57
|
+
{#snippet children()}
|
|
58
|
+
<ul class="feature-list">
|
|
59
|
+
<li>Real-time data processing</li>
|
|
60
|
+
<li>Beautiful visualizations</li>
|
|
61
|
+
<li>Custom reports</li>
|
|
62
|
+
</ul>
|
|
63
|
+
{/snippet}
|
|
64
|
+
|
|
65
|
+
{#snippet actions()}
|
|
66
|
+
<Button variant="primary">Try It Now</Button>
|
|
67
|
+
{/snippet}
|
|
68
|
+
</HeroLeftAligned>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Props
|
|
72
|
+
|
|
73
|
+
| Prop | Type | Default | Description |
|
|
74
|
+
| ----------------- | -------- | --------------------------- | --------------------------------------- |
|
|
75
|
+
| `title` | `string` | **required** | Main heading text (supports HTML) |
|
|
76
|
+
| `subtitle` | `string` | `undefined` | Subheading text (supports HTML) |
|
|
77
|
+
| `backgroundImage` | `string` | `undefined` | URL to background image |
|
|
78
|
+
| `backgroundColor` | `string` | `var(--color-primary)` | Background color |
|
|
79
|
+
| `textColor` | `string` | `var(--color-text-inverse)` | Text color |
|
|
80
|
+
| `overlayOpacity` | `number` | `0.7` | Overlay opacity (0-1) |
|
|
81
|
+
| `height` | `string` | `auto` | Minimum height (e.g., '500px', '100vh') |
|
|
82
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
83
|
+
|
|
84
|
+
## Snippets
|
|
85
|
+
|
|
86
|
+
### `children`
|
|
87
|
+
|
|
88
|
+
Custom content area between subtitle and actions.
|
|
89
|
+
|
|
90
|
+
```svelte
|
|
91
|
+
{#snippet children()}
|
|
92
|
+
<p>Your custom content here</p>
|
|
93
|
+
{/snippet}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `actions`
|
|
97
|
+
|
|
98
|
+
Action buttons area (typically buttons or links).
|
|
99
|
+
|
|
100
|
+
```svelte
|
|
101
|
+
{#snippet actions()}
|
|
102
|
+
<Button>Primary Action</Button>
|
|
103
|
+
<Button variant="outline">Secondary Action</Button>
|
|
104
|
+
{/snippet}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Styling
|
|
108
|
+
|
|
109
|
+
The component uses CSS custom properties that can be customized:
|
|
110
|
+
|
|
111
|
+
```css
|
|
112
|
+
.hero-left-aligned {
|
|
113
|
+
--color-primary: #3b82f6;
|
|
114
|
+
--color-text-inverse: #ffffff;
|
|
115
|
+
--font-family: system-ui, sans-serif;
|
|
116
|
+
--max-width: 80rem;
|
|
117
|
+
--space-xl: 3rem;
|
|
118
|
+
--text-5xl: 3rem;
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Accessibility
|
|
123
|
+
|
|
124
|
+
- Uses semantic `<section>` with `role="banner"`
|
|
125
|
+
- Proper heading hierarchy with `<h1>`
|
|
126
|
+
- Background images marked with `aria-hidden="true"`
|
|
127
|
+
- Supports HTML in title/subtitle for semantic markup
|
|
128
|
+
|
|
129
|
+
## Examples
|
|
130
|
+
|
|
131
|
+
### Landing Page Hero
|
|
132
|
+
|
|
133
|
+
```svelte
|
|
134
|
+
<HeroLeftAligned
|
|
135
|
+
title="Build <strong>Faster</strong> with Exon UI"
|
|
136
|
+
subtitle="60+ production-ready components for Svelte applications"
|
|
137
|
+
backgroundImage="/hero-pattern.svg"
|
|
138
|
+
height="100vh"
|
|
139
|
+
>
|
|
140
|
+
{#snippet actions()}
|
|
141
|
+
<Button size="lg" variant="primary">Get Started</Button>
|
|
142
|
+
<Button size="lg" variant="outline">View Docs</Button>
|
|
143
|
+
{/snippet}
|
|
144
|
+
</HeroLeftAligned>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Product Launch
|
|
148
|
+
|
|
149
|
+
```svelte
|
|
150
|
+
<HeroLeftAligned
|
|
151
|
+
title="Introducing Our New Product"
|
|
152
|
+
subtitle="The next generation of productivity tools"
|
|
153
|
+
backgroundColor="#6366f1"
|
|
154
|
+
overlayOpacity={0.8}
|
|
155
|
+
>
|
|
156
|
+
{#snippet children()}
|
|
157
|
+
<div class="stats">
|
|
158
|
+
<div>10k+ Users</div>
|
|
159
|
+
<div>99% Uptime</div>
|
|
160
|
+
<div>24/7 Support</div>
|
|
161
|
+
</div>
|
|
162
|
+
{/snippet}
|
|
163
|
+
|
|
164
|
+
{#snippet actions()}
|
|
165
|
+
<Button variant="primary">Join Waitlist</Button>
|
|
166
|
+
{/snippet}
|
|
167
|
+
</HeroLeftAligned>
|
|
168
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HeroLeftAligned } from './HeroLeftAligned.svelte';
|