@aspect-ops/exon-ui 0.3.0 → 0.4.1
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/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 +201 -87
- 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/Sidebar/SidebarGroup.svelte +1 -4
- package/dist/index.d.ts +7 -1
- package/dist/index.js +4 -1
- package/dist/types/index.d.ts +49 -1
- package/dist/types/layout.d.ts +20 -0
- package/dist/types/navigation.d.ts +2 -1
- 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,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';
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { IconFeatureCardProps } from '../../types/index.js';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
icon,
|
|
6
|
+
iconAlt = '',
|
|
7
|
+
title,
|
|
8
|
+
features,
|
|
9
|
+
topBgColor = '#B85C5C',
|
|
10
|
+
iconBgColor = 'white',
|
|
11
|
+
iconSize = '4rem',
|
|
12
|
+
iconContainerSize = '6rem',
|
|
13
|
+
titleColor = '#1F2937',
|
|
14
|
+
titleFontSize = '1.75rem',
|
|
15
|
+
featureColor = '#4B5563',
|
|
16
|
+
featureFontSize = '1.125rem',
|
|
17
|
+
borderRadius = '1rem',
|
|
18
|
+
padding = '2rem',
|
|
19
|
+
featureGap = '0.875rem',
|
|
20
|
+
bulletColor = '#9CA3AF',
|
|
21
|
+
class: className = ''
|
|
22
|
+
}: IconFeatureCardProps = $props();
|
|
23
|
+
|
|
24
|
+
// Validate required props
|
|
25
|
+
const hasIcon = $derived(!!icon);
|
|
26
|
+
const hasTitle = $derived(!!title);
|
|
27
|
+
const hasFeatures = $derived(features && features.length > 0);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<div
|
|
31
|
+
class="icon-feature-card {className}"
|
|
32
|
+
style:--top-bg-color={topBgColor}
|
|
33
|
+
style:--icon-bg-color={iconBgColor}
|
|
34
|
+
style:--icon-size={iconSize}
|
|
35
|
+
style:--icon-container-size={iconContainerSize}
|
|
36
|
+
style:--title-color={titleColor}
|
|
37
|
+
style:--title-font-size={titleFontSize}
|
|
38
|
+
style:--feature-color={featureColor}
|
|
39
|
+
style:--feature-font-size={featureFontSize}
|
|
40
|
+
style:--border-radius={borderRadius}
|
|
41
|
+
style:--padding={padding}
|
|
42
|
+
style:--feature-gap={featureGap}
|
|
43
|
+
style:--bullet-color={bulletColor}
|
|
44
|
+
>
|
|
45
|
+
<!-- Top Section: Icon/Badge -->
|
|
46
|
+
<div class="icon-section">
|
|
47
|
+
{#if hasIcon}
|
|
48
|
+
<div class="icon-container">
|
|
49
|
+
<img src={icon} alt={iconAlt} class="icon-image" />
|
|
50
|
+
</div>
|
|
51
|
+
{/if}
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- Bottom Section: Title and Features -->
|
|
55
|
+
<div class="content-section">
|
|
56
|
+
{#if hasTitle}
|
|
57
|
+
<h3 class="card-title">{title}</h3>
|
|
58
|
+
{/if}
|
|
59
|
+
{#if hasFeatures}
|
|
60
|
+
<ul class="features-list">
|
|
61
|
+
{#each features as feature}
|
|
62
|
+
<li class="feature-item">{feature}</li>
|
|
63
|
+
{/each}
|
|
64
|
+
</ul>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
.icon-feature-card {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
border-radius: var(--border-radius);
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
76
|
+
transition: all 0.3s ease;
|
|
77
|
+
font-family: inherit;
|
|
78
|
+
background: white;
|
|
79
|
+
height: 450px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.icon-feature-card:hover {
|
|
83
|
+
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
|
|
84
|
+
transform: translateY(-2px);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Top Section: Icon/Badge - 35% of card */
|
|
88
|
+
.icon-section {
|
|
89
|
+
background-color: var(--top-bg-color);
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
padding: var(--padding);
|
|
94
|
+
height: 35%;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.icon-container {
|
|
99
|
+
width: var(--icon-container-size);
|
|
100
|
+
height: var(--icon-container-size);
|
|
101
|
+
background-color: var(--icon-bg-color);
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.icon-image {
|
|
110
|
+
width: var(--icon-size);
|
|
111
|
+
height: var(--icon-size);
|
|
112
|
+
object-fit: contain;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Bottom Section: Content - 65% of card */
|
|
116
|
+
.content-section {
|
|
117
|
+
background-color: white;
|
|
118
|
+
padding: var(--padding);
|
|
119
|
+
height: 65%;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.card-title {
|
|
126
|
+
color: var(--title-color);
|
|
127
|
+
font-size: var(--title-font-size);
|
|
128
|
+
font-weight: 600;
|
|
129
|
+
margin: 0 0 1.5rem 0;
|
|
130
|
+
line-height: 1.3;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.features-list {
|
|
134
|
+
list-style: none;
|
|
135
|
+
padding: 0;
|
|
136
|
+
margin: 0;
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: column;
|
|
139
|
+
gap: var(--feature-gap);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.feature-item {
|
|
143
|
+
color: var(--feature-color);
|
|
144
|
+
font-size: var(--feature-font-size);
|
|
145
|
+
line-height: 1.6;
|
|
146
|
+
padding-left: 1.5rem;
|
|
147
|
+
position: relative;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.feature-item::before {
|
|
151
|
+
content: '•';
|
|
152
|
+
position: absolute;
|
|
153
|
+
left: 0;
|
|
154
|
+
color: var(--bullet-color);
|
|
155
|
+
font-size: 1.25rem;
|
|
156
|
+
line-height: 1.6;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Responsive Design */
|
|
160
|
+
@media (max-width: 768px) {
|
|
161
|
+
.icon-feature-card {
|
|
162
|
+
height: 400px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.card-title {
|
|
166
|
+
font-size: 1.5rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.feature-item {
|
|
170
|
+
font-size: 1rem;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# IconFeatureCard
|
|
2
|
+
|
|
3
|
+
A vertical card component featuring an icon section at the top and a feature list below. Perfect for showcasing services, features, or offerings with key highlights displayed as bullet points.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Vertical two-section layout (colored icon section + white content section)
|
|
8
|
+
- Top section with centered circular icon/badge on customizable colored background
|
|
9
|
+
- Bottom section with title and bulleted feature list
|
|
10
|
+
- Fully customizable colors and sizing
|
|
11
|
+
- Responsive design with mobile adjustments
|
|
12
|
+
- Hover effects with smooth transitions
|
|
13
|
+
- Accessibility support
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
### Basic Example
|
|
18
|
+
|
|
19
|
+
```svelte
|
|
20
|
+
<script>
|
|
21
|
+
import { IconFeatureCard } from '@aspect-ops/exon-ui';
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<IconFeatureCard
|
|
25
|
+
icon="/icons/support-24-7.svg"
|
|
26
|
+
iconAlt="24/7 Support icon"
|
|
27
|
+
title="Technical Support"
|
|
28
|
+
features={[
|
|
29
|
+
'Round-the-clock availability',
|
|
30
|
+
'Expert technical assistance',
|
|
31
|
+
'Fast response times',
|
|
32
|
+
'Multi-channel support'
|
|
33
|
+
]}
|
|
34
|
+
topBgColor="#3B82F6"
|
|
35
|
+
/>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### With Custom Colors
|
|
39
|
+
|
|
40
|
+
```svelte
|
|
41
|
+
<IconFeatureCard
|
|
42
|
+
icon="/icons/cloud-service.svg"
|
|
43
|
+
iconAlt="Cloud service icon"
|
|
44
|
+
title="Cloud Solutions"
|
|
45
|
+
features={['Scalable infrastructure', 'High availability', 'Automated backups', 'Global CDN']}
|
|
46
|
+
topBgColor="#10B981"
|
|
47
|
+
iconBgColor="#D1FAE5"
|
|
48
|
+
titleColor="#065F46"
|
|
49
|
+
featureColor="#047857"
|
|
50
|
+
/>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Custom Sizing
|
|
54
|
+
|
|
55
|
+
```svelte
|
|
56
|
+
<IconFeatureCard
|
|
57
|
+
icon="/icons/consulting.svg"
|
|
58
|
+
iconAlt="Consulting icon"
|
|
59
|
+
title="Expert Consulting"
|
|
60
|
+
features={['Strategic planning', 'Industry expertise', 'Best practices', 'Actionable insights']}
|
|
61
|
+
topBgColor="#8B5CF6"
|
|
62
|
+
iconSize="5rem"
|
|
63
|
+
iconContainerSize="7rem"
|
|
64
|
+
titleFontSize="2rem"
|
|
65
|
+
padding="2.5rem"
|
|
66
|
+
/>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Props
|
|
70
|
+
|
|
71
|
+
| Prop | Type | Default | Description |
|
|
72
|
+
| ------------------- | ---------- | ------------ | -------------------------------------------- |
|
|
73
|
+
| `icon` | `string` | **required** | Icon/image URL or path |
|
|
74
|
+
| `iconAlt` | `string` | `''` | Alt text for accessibility |
|
|
75
|
+
| `title` | `string` | **required** | Card title |
|
|
76
|
+
| `features` | `string[]` | **required** | Array of feature items to display as bullets |
|
|
77
|
+
| `topBgColor` | `string` | `'#B85C5C'` | Background color for top icon section |
|
|
78
|
+
| `iconBgColor` | `string` | `'white'` | Background color for circular icon container |
|
|
79
|
+
| `iconSize` | `string` | `'4rem'` | Size of the icon/image |
|
|
80
|
+
| `iconContainerSize` | `string` | `'6rem'` | Size of the circular icon container |
|
|
81
|
+
| `titleColor` | `string` | `'#1F2937'` | Title text color |
|
|
82
|
+
| `titleFontSize` | `string` | `'1.75rem'` | Title font size |
|
|
83
|
+
| `featureColor` | `string` | `'#4B5563'` | Feature list text color |
|
|
84
|
+
| `featureFontSize` | `string` | `'1.125rem'` | Feature list font size |
|
|
85
|
+
| `borderRadius` | `string` | `'1rem'` | Card border radius |
|
|
86
|
+
| `padding` | `string` | `'2rem'` | Padding for both sections |
|
|
87
|
+
| `featureGap` | `string` | `'0.875rem'` | Gap between feature list items |
|
|
88
|
+
| `bulletColor` | `string` | `'#9CA3AF'` | Color of the bullet points |
|
|
89
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
90
|
+
|
|
91
|
+
## Styling
|
|
92
|
+
|
|
93
|
+
The component uses CSS custom properties for theming and inherits font-family from the parent.
|
|
94
|
+
|
|
95
|
+
### Hover Effect
|
|
96
|
+
|
|
97
|
+
The card has a built-in hover effect that lifts the card slightly and enhances the shadow:
|
|
98
|
+
|
|
99
|
+
- Transform: `translateY(-2px)`
|
|
100
|
+
- Shadow increases from `0 4px 6px` to `0 8px 12px`
|
|
101
|
+
|
|
102
|
+
### Layout Proportions
|
|
103
|
+
|
|
104
|
+
The card maintains a fixed proportion with `box-sizing: border-box` to include padding in calculations:
|
|
105
|
+
|
|
106
|
+
- **Icon Section (Top)**: Exactly 35% of card height (including padding)
|
|
107
|
+
- **Content Section (Bottom)**: Exactly 65% of card height (including padding)
|
|
108
|
+
- **Card Height**: Fixed at 450px (400px on mobile)
|
|
109
|
+
|
|
110
|
+
### Icon Section
|
|
111
|
+
|
|
112
|
+
The icon section features:
|
|
113
|
+
|
|
114
|
+
- Customizable colored background
|
|
115
|
+
- Centered circular icon container with white background (customizable)
|
|
116
|
+
- Drop shadow on icon container for depth
|
|
117
|
+
- Takes up 35% of card height
|
|
118
|
+
|
|
119
|
+
### Content Section
|
|
120
|
+
|
|
121
|
+
The content section features:
|
|
122
|
+
|
|
123
|
+
- White background
|
|
124
|
+
- Title with configurable color and size
|
|
125
|
+
- Bulleted list with custom bullet color
|
|
126
|
+
- Flexible gap spacing between items
|
|
127
|
+
- Takes up 65% of card height
|
|
128
|
+
|
|
129
|
+
## Accessibility
|
|
130
|
+
|
|
131
|
+
- Image `alt` text supported via `iconAlt` prop
|
|
132
|
+
- Semantic HTML with `<h3>` for title and `<ul>/<li>` for features
|
|
133
|
+
- Sufficient color contrast for text
|
|
134
|
+
- Inherits font-family for consistent typography
|
|
135
|
+
- Keyboard navigation friendly
|
|
136
|
+
|
|
137
|
+
## Responsive Design
|
|
138
|
+
|
|
139
|
+
- **Desktop:** Full layout with standard sizing
|
|
140
|
+
- **Mobile (≤768px):**
|
|
141
|
+
- Reduced icon section height (12rem → 10rem)
|
|
142
|
+
- Smaller title font (1.75rem → 1.5rem)
|
|
143
|
+
- Smaller feature font (1.125rem → 1rem)
|
|
144
|
+
|
|
145
|
+
## Examples
|
|
146
|
+
|
|
147
|
+
### Service Showcase
|
|
148
|
+
|
|
149
|
+
```svelte
|
|
150
|
+
<div class="services-grid">
|
|
151
|
+
<IconFeatureCard
|
|
152
|
+
icon="/icons/support.svg"
|
|
153
|
+
iconAlt="Support"
|
|
154
|
+
title="24/7 Support"
|
|
155
|
+
features={[
|
|
156
|
+
'Round-the-clock assistance',
|
|
157
|
+
'Expert support team',
|
|
158
|
+
'Fast response times',
|
|
159
|
+
'Multi-channel support'
|
|
160
|
+
]}
|
|
161
|
+
topBgColor="#3B82F6"
|
|
162
|
+
/>
|
|
163
|
+
<IconFeatureCard
|
|
164
|
+
icon="/icons/security.svg"
|
|
165
|
+
iconAlt="Security"
|
|
166
|
+
title="Enterprise Security"
|
|
167
|
+
features={[
|
|
168
|
+
'End-to-end encryption',
|
|
169
|
+
'SOC 2 compliance',
|
|
170
|
+
'Regular security audits',
|
|
171
|
+
'Data protection'
|
|
172
|
+
]}
|
|
173
|
+
topBgColor="#10B981"
|
|
174
|
+
/>
|
|
175
|
+
<IconFeatureCard
|
|
176
|
+
icon="/icons/performance.svg"
|
|
177
|
+
iconAlt="Performance"
|
|
178
|
+
title="High Performance"
|
|
179
|
+
features={['Lightning-fast response', '99.9% uptime SLA', 'Global CDN', 'Auto-scaling']}
|
|
180
|
+
topBgColor="#F59E0B"
|
|
181
|
+
/>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<style>
|
|
185
|
+
.services-grid {
|
|
186
|
+
display: grid;
|
|
187
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
188
|
+
gap: 2rem;
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Custom Branded Cards
|
|
194
|
+
|
|
195
|
+
```svelte
|
|
196
|
+
<IconFeatureCard
|
|
197
|
+
icon="/brand/premium-badge.svg"
|
|
198
|
+
iconAlt="Premium"
|
|
199
|
+
title="Premium Plan"
|
|
200
|
+
features={[
|
|
201
|
+
'Unlimited projects',
|
|
202
|
+
'Priority support',
|
|
203
|
+
'Advanced analytics',
|
|
204
|
+
'Custom integrations',
|
|
205
|
+
'Dedicated account manager'
|
|
206
|
+
]}
|
|
207
|
+
topBgColor="#6366F1"
|
|
208
|
+
iconBgColor="#EEF2FF"
|
|
209
|
+
titleColor="#4338CA"
|
|
210
|
+
featureColor="#4F46E5"
|
|
211
|
+
bulletColor="#818CF8"
|
|
212
|
+
iconSize="4.5rem"
|
|
213
|
+
iconContainerSize="6.5rem"
|
|
214
|
+
padding="2.5rem"
|
|
215
|
+
/>
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Compact Variant
|
|
219
|
+
|
|
220
|
+
```svelte
|
|
221
|
+
<IconFeatureCard
|
|
222
|
+
icon="/icons/basic.svg"
|
|
223
|
+
iconAlt="Basic"
|
|
224
|
+
title="Starter Plan"
|
|
225
|
+
features={['Up to 5 projects', 'Email support', 'Basic analytics']}
|
|
226
|
+
topBgColor="#64748B"
|
|
227
|
+
titleFontSize="1.5rem"
|
|
228
|
+
featureFontSize="1rem"
|
|
229
|
+
iconSize="3.5rem"
|
|
230
|
+
iconContainerSize="5rem"
|
|
231
|
+
padding="1.5rem"
|
|
232
|
+
featureGap="0.75rem"
|
|
233
|
+
/>
|
|
234
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IconFeatureCard } from './IconFeatureCard.svelte';
|