@stevederico/skateboard-ui 2.9.8 → 2.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ 2.10.0
4
+
5
+ Fix landing page feature icons
6
+ Add FeatureIcon DynamicIcon resolver
7
+ Export canResolveIcon utility
8
+
9
+ 2.9.9
10
+
11
+ Add proportional radius cascade
12
+ Add radius-2xl/3xl/4xl tokens
13
+
3
14
  2.9.8
4
15
 
5
16
  Add useUser hook
@@ -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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stevederico/skateboard-ui",
3
3
  "private": false,
4
- "version": "2.9.8",
4
+ "version": "2.10.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./Sidebar": {
package/styles.css CHANGED
@@ -145,10 +145,13 @@
145
145
  --color-chart-3: var(--chart-3);
146
146
  --color-chart-4: var(--chart-4);
147
147
  --color-chart-5: var(--chart-5);
148
- --radius-sm: calc(var(--radius) - 4px);
149
- --radius-md: calc(var(--radius) - 2px);
148
+ --radius-sm: calc(var(--radius) * 0.6);
149
+ --radius-md: calc(var(--radius) * 0.8);
150
150
  --radius-lg: var(--radius);
151
- --radius-xl: calc(var(--radius) + 4px);
151
+ --radius-xl: calc(var(--radius) * 1.4);
152
+ --radius-2xl: calc(var(--radius) * 1.8);
153
+ --radius-3xl: calc(var(--radius) * 2.2);
154
+ --radius-4xl: calc(var(--radius) * 2.6);
152
155
  --color-sidebar: var(--sidebar);
153
156
  --color-sidebar-foreground: var(--sidebar-foreground);
154
157
  --color-sidebar-primary: var(--sidebar-primary);
@@ -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">{feature.icon}</Badge>
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>