@aspect-ops/exon-ui 0.2.1 → 0.3.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/dist/components/AspectRatio/AspectRatio.svelte +1 -0
- 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/Card/FlipCard.svelte +155 -0
- package/dist/components/Card/FlipCard.svelte.d.ts +13 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Container/Container.svelte +1 -0
- package/dist/components/DataTable/DataTable.svelte +460 -0
- package/dist/components/DataTable/DataTable.svelte.d.ts +49 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +1 -0
- package/dist/components/DoughnutChart/DoughnutChart.svelte +20 -2
- package/dist/components/GlobalHeader/GlobalHeader.svelte +692 -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/Icon/Icon.svelte +15 -18
- package/dist/components/Icon/Icon.svelte.d.ts +2 -1
- 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/Menu/MenuContent.svelte +1 -0
- package/dist/components/Menu/MenuSubContent.svelte +1 -0
- package/dist/components/Mermaid/Mermaid.svelte +121 -7
- package/dist/components/Mermaid/Mermaid.svelte.d.ts +10 -0
- package/dist/components/PageHeader/PageHeader.svelte +140 -0
- package/dist/components/PageHeader/PageHeader.svelte.d.ts +30 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PageHeader/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/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/StatCircle/StatCircle.svelte +172 -0
- package/dist/components/StatCircle/StatCircle.svelte.d.ts +19 -0
- package/dist/components/StatCircle/index.d.ts +1 -0
- package/dist/components/StatCircle/index.js +1 -0
- package/dist/components/StatsCard/StatsCard.svelte +301 -0
- package/dist/components/StatsCard/StatsCard.svelte.d.ts +32 -0
- package/dist/components/StatsCard/index.d.ts +2 -0
- package/dist/components/StatsCard/index.js +1 -0
- package/dist/components/StatusBadge/StatusBadge.svelte +221 -0
- package/dist/components/StatusBadge/StatusBadge.svelte.d.ts +22 -0
- package/dist/components/StatusBadge/index.d.ts +2 -0
- package/dist/components/StatusBadge/index.js +1 -0
- package/dist/components/StatusBanner/StatusBanner.svelte +325 -0
- package/dist/components/StatusBanner/StatusBanner.svelte.d.ts +13 -0
- package/dist/components/StatusBanner/index.d.ts +1 -0
- package/dist/components/StatusBanner/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 +24 -2
- package/dist/index.js +16 -1
- package/dist/types/data-display.d.ts +72 -0
- package/dist/types/feedback.d.ts +10 -0
- package/dist/types/index.d.ts +2 -2
- package/package.json +3 -2
|
@@ -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';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { IconSize } from '../../types/index.js';
|
|
3
|
+
import type { ComponentType } from 'svelte';
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
|
-
|
|
6
|
+
icon: ComponentType;
|
|
6
7
|
size?: IconSize;
|
|
7
8
|
class?: string;
|
|
8
9
|
'aria-label'?: string;
|
|
@@ -10,38 +11,34 @@
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
let {
|
|
13
|
-
|
|
14
|
+
icon: IconComponent,
|
|
14
15
|
size = 'md',
|
|
15
16
|
class: className = '',
|
|
16
17
|
'aria-label': ariaLabel,
|
|
17
18
|
'aria-hidden': ariaHidden = !ariaLabel
|
|
18
19
|
}: Props = $props();
|
|
19
20
|
|
|
20
|
-
// Size map aligned with typography scale
|
|
21
|
-
const sizeMap: Record<IconSize,
|
|
22
|
-
xs:
|
|
23
|
-
sm:
|
|
24
|
-
md:
|
|
25
|
-
lg:
|
|
26
|
-
xl:
|
|
21
|
+
// Size map aligned with typography scale (in pixels for Lucide)
|
|
22
|
+
const sizeMap: Record<IconSize, number> = {
|
|
23
|
+
xs: 12,
|
|
24
|
+
sm: 16,
|
|
25
|
+
md: 20,
|
|
26
|
+
lg: 24,
|
|
27
|
+
xl: 32
|
|
27
28
|
};
|
|
28
29
|
</script>
|
|
29
30
|
|
|
30
|
-
<
|
|
31
|
+
<IconComponent
|
|
32
|
+
size={sizeMap[size]}
|
|
31
33
|
class="icon icon--{size} {className}"
|
|
32
|
-
style="--icon-size: {sizeMap[size]}"
|
|
33
34
|
aria-label={ariaLabel}
|
|
34
35
|
aria-hidden={ariaHidden}
|
|
35
36
|
role={ariaLabel ? 'img' : undefined}
|
|
36
|
-
|
|
37
|
-
<use href="#{name}" />
|
|
38
|
-
</svg>
|
|
37
|
+
/>
|
|
39
38
|
|
|
40
39
|
<style>
|
|
41
|
-
.icon {
|
|
42
|
-
width: var(--icon-size);
|
|
43
|
-
height: var(--icon-size);
|
|
44
|
-
fill: currentColor;
|
|
40
|
+
:global(.icon) {
|
|
45
41
|
flex-shrink: 0;
|
|
42
|
+
color: currentColor;
|
|
46
43
|
}
|
|
47
44
|
</style>
|