@stevederico/skateboard-ui 2.9.9 → 2.10.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/CHANGELOG.md +11 -0
- package/core/DynamicIcon.jsx +10 -0
- package/fonts/GeistMonoVF.woff2 +0 -0
- package/fonts/GeistVF.woff2 +0 -0
- package/package.json +1 -1
- package/styles.css +16 -0
- package/views/LandingView.jsx +17 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
2.10.1
|
|
4
|
+
|
|
5
|
+
Add Geist font files self-hosted
|
|
6
|
+
Add @font-face declarations
|
|
7
|
+
|
|
8
|
+
2.10.0
|
|
9
|
+
|
|
10
|
+
Fix landing page feature icons
|
|
11
|
+
Add FeatureIcon DynamicIcon resolver
|
|
12
|
+
Export canResolveIcon utility
|
|
13
|
+
|
|
3
14
|
2.9.9
|
|
4
15
|
|
|
5
16
|
Add proportional radius cascade
|
package/core/DynamicIcon.jsx
CHANGED
|
@@ -45,4 +45,14 @@ const DynamicIcon = ({ name, size = 24, color = "currentColor", strokeWidth = 2,
|
|
|
45
45
|
return <Icon size={size} color={color} strokeWidth={strokeWidth} className={cn(className)} {...props} />;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Check if a name string resolves to a valid Lucide icon.
|
|
50
|
+
*
|
|
51
|
+
* @param {string} name - Icon name to check
|
|
52
|
+
* @returns {boolean} True if name resolves to an icon
|
|
53
|
+
*/
|
|
54
|
+
export function canResolveIcon(name) {
|
|
55
|
+
return resolveIcon(name) !== null;
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
export default DynamicIcon;
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Geist';
|
|
3
|
+
src: url('./fonts/GeistVF.woff2') format('woff2');
|
|
4
|
+
font-weight: 100 900;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-display: swap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'Geist Mono';
|
|
11
|
+
src: url('./fonts/GeistMonoVF.woff2') format('woff2');
|
|
12
|
+
font-weight: 100 900;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
}
|
|
16
|
+
|
|
1
17
|
@import "tailwindcss";
|
|
2
18
|
|
|
3
19
|
@source '../';
|
package/views/LandingView.jsx
CHANGED
|
@@ -2,13 +2,26 @@ import React from 'react';
|
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
3
|
import { useTheme } from 'next-themes';
|
|
4
4
|
import { getState } from "../core/Context.jsx";
|
|
5
|
-
import DynamicIcon from '../core/DynamicIcon.jsx';
|
|
5
|
+
import DynamicIcon, { canResolveIcon } from '../core/DynamicIcon.jsx';
|
|
6
6
|
import { Sun, Moon, Check } from 'lucide-react';
|
|
7
7
|
import { Button } from '../shadcn/ui/button.jsx';
|
|
8
8
|
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '../shadcn/ui/card.jsx';
|
|
9
9
|
import { Badge } from '../shadcn/ui/badge.jsx';
|
|
10
10
|
import { Separator } from '../shadcn/ui/separator.jsx';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Renders a feature icon from a name string or emoji.
|
|
14
|
+
* Resolves Lucide icon names (kebab-case), falls back to raw text (emoji).
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} props
|
|
17
|
+
* @param {string} props.name - Icon name (kebab-case) or emoji string
|
|
18
|
+
* @returns {JSX.Element} Icon component or text span
|
|
19
|
+
*/
|
|
20
|
+
function FeatureIcon({ name }) {
|
|
21
|
+
if (canResolveIcon(name)) return <DynamicIcon name={name} size={24} />;
|
|
22
|
+
return <span>{name}</span>;
|
|
23
|
+
}
|
|
24
|
+
|
|
12
25
|
/**
|
|
13
26
|
* Default landing page with hero section, features grid, pricing card,
|
|
14
27
|
* CTA section, and footer.
|
|
@@ -85,7 +98,9 @@ export default function LandingView() {
|
|
|
85
98
|
<Card key={index} className="text-center">
|
|
86
99
|
<CardHeader className="items-center">
|
|
87
100
|
<div className="w-full flex justify-center">
|
|
88
|
-
<Badge variant="secondary" className="text-2xl mb-2 h-auto px-3 py-1">
|
|
101
|
+
<Badge variant="secondary" className="text-2xl mb-2 h-auto px-3 py-1">
|
|
102
|
+
<FeatureIcon name={feature.icon} />
|
|
103
|
+
</Badge>
|
|
89
104
|
</div>
|
|
90
105
|
<CardTitle className="text-xl font-bold">{feature.title}</CardTitle>
|
|
91
106
|
<CardDescription>{feature.description}</CardDescription>
|