@stevederico/skateboard-ui 5.3.0 → 5.5.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
|
@@ -14,7 +14,7 @@ export default function ThemeToggle({ className = "", iconSize = 16, variant = "
|
|
|
14
14
|
return null;
|
|
15
15
|
const isDarkMode = resolvedTheme === 'dark';
|
|
16
16
|
const toggleTheme = () => setTheme(isDarkMode ? 'light' : 'dark');
|
|
17
|
-
return (_jsx(Button, { variant: variant === "landing" ? "outline" : "ghost", size: "icon", onClick: toggleTheme, className: cn(className), "aria-label": "Toggle dark mode", ...props, children: isDarkMode
|
|
17
|
+
return (_jsx(Button, { variant: variant === "landing" ? "outline" : "ghost", size: "icon", onClick: toggleTheme, className: cn("size-11", className), "aria-label": "Toggle dark mode", ...props, children: isDarkMode
|
|
18
18
|
? _jsx(Sun, { size: iconSize })
|
|
19
19
|
: _jsx(Moon, { size: iconSize }) }));
|
|
20
20
|
}
|
|
@@ -20,6 +20,6 @@ export default function TabBar({ className, ...props }) {
|
|
|
20
20
|
];
|
|
21
21
|
return (_jsx("nav", { className: cn("fixed md:hidden bottom-0 inset-x-0 bg-background z-50", className), role: "navigation", "aria-label": "Main navigation", ...props, children: _jsx("div", { className: "flex justify-around items-center pt-2 pb-4", children: tabs.map((tab) => {
|
|
22
22
|
const isActive = currentPage === tab.match;
|
|
23
|
-
return (_jsxs(Link, { to: tab.to, className: cn("flex flex-col items-center gap-0.5 px-3 transition-colors", isActive ? "text-foreground" : "text-muted-foreground"), "aria-label": tab.title, "aria-current": isActive ? 'page' : undefined, children: [_jsx(ConstantsIcon, { name: tab.icon, size: 24, strokeWidth: isActive ? 2 : 1.5 }), _jsx("span", { className: "text-xs", children: tab.title })] }, tab.title));
|
|
23
|
+
return (_jsxs(Link, { to: tab.to, className: cn("flex min-h-11 min-w-11 flex-col items-center justify-center gap-0.5 px-3 transition-colors", isActive ? "text-foreground" : "text-muted-foreground"), "aria-label": tab.title, "aria-current": isActive ? 'page' : undefined, children: [_jsx(ConstantsIcon, { name: tab.icon, size: 24, strokeWidth: isActive ? 2 : 1.5 }), _jsx("span", { className: "text-xs", children: tab.title })] }, tab.title));
|
|
24
24
|
}) }) }));
|
|
25
25
|
}
|
|
@@ -58,5 +58,5 @@ export default function SettingsView() {
|
|
|
58
58
|
else {
|
|
59
59
|
navigate('/signin');
|
|
60
60
|
}
|
|
61
|
-
}, children: "Sign In" }) })] }) })), showAuth && (_jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-3", children: [_jsx(Avatar, { children: _jsx(AvatarFallback, { className: "bg-app text-white uppercase font-medium text-sm", children: user.name?.split(' ').map(w => w[0]).join('') || "NA" }) }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-2 capitalize", children: [user.name || "No User", subscription?.status === "active" && _jsx(Badge, { children: "Pro" })] }), _jsx(CardDescription, { className: "font-normal normal-case", children: user.email || "no@user.com" })] })] }), _jsx(CardAction, { children: _jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { render: _jsx(Button, { variant: "outline", size: "sm", children: "Sign Out" }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Sign Out" }), _jsx(AlertDialogDescription, { children: "Are you sure you want to sign out? You'll need to sign in again to access your account." })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { onClick: signOutClicked, children: "Sign Out" })] })] })] }) })] }) })), _jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Support" }), _jsx(CardDescription, { children: "How can we help?" }), _jsx(CardAction, { children: _jsx(Button, { variant: "outline", size: "sm", onClick: () => { window.location.href = `mailto:${constants.companyEmail}`; }, children: "Contact" }) })] }) }), showAuth && (_jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-2", children: ["Billing", subscription?.status === "active" ? (_jsx(Badge, { children: "Active" })) : subscription?.status === "canceled" ? (_jsx(Badge, { variant: "destructive", children: "Canceled" })) : (_jsx(Badge, { variant: "secondary", children: "Free" }))] }), _jsx(CardDescription, { children: getBillingDescription() }), _jsx(CardAction, { children: stripeID ? (_jsx(Button, { variant: "outline", size: "sm", onClick: () => { showManage(stripeID); }, children: "Manage" })) : (_jsx(Button, { variant: "gradient", size: "sm", onClick: () => { showCheckout(user.email); }, children: "Subscribe" })) })] }) }))] }), _jsx("div", { className: "mt-8 text-center pb-24 md:pb-8", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["v", constants.version || '0.0.0'] }) })] }));
|
|
61
|
+
}, children: "Sign In" }) })] }) })), showAuth && (_jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-3", children: [_jsx(Avatar, { children: _jsx(AvatarFallback, { className: "bg-app text-white uppercase font-medium text-sm", children: user.name?.split(' ').map(w => w[0]).join('') || "NA" }) }), _jsxs("div", { children: [_jsxs("div", { className: "flex items-center gap-2 capitalize", children: [user.name || "No User", subscription?.status === "active" && _jsx(Badge, { children: "Pro" })] }), _jsx(CardDescription, { className: "font-normal normal-case", children: user.email || "no@user.com" })] })] }), _jsx(CardAction, { children: _jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { render: _jsx(Button, { variant: "outline", size: "sm", className: "min-h-11 px-4", children: "Sign Out" }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Sign Out" }), _jsx(AlertDialogDescription, { children: "Are you sure you want to sign out? You'll need to sign in again to access your account." })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: "Cancel" }), _jsx(AlertDialogAction, { onClick: signOutClicked, children: "Sign Out" })] })] })] }) })] }) })), _jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Support" }), _jsx(CardDescription, { children: "How can we help?" }), _jsx(CardAction, { children: _jsx(Button, { variant: "outline", size: "sm", onClick: () => { window.location.href = `mailto:${constants.companyEmail}`; }, children: "Contact" }) })] }) }), showAuth && (_jsx(Card, { className: "w-full max-w-lg", children: _jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center gap-2", children: ["Billing", subscription?.status === "active" ? (_jsx(Badge, { children: "Active" })) : subscription?.status === "canceled" ? (_jsx(Badge, { variant: "destructive", children: "Canceled" })) : (_jsx(Badge, { variant: "secondary", children: "Free" }))] }), _jsx(CardDescription, { children: getBillingDescription() }), _jsx(CardAction, { children: stripeID ? (_jsx(Button, { variant: "outline", size: "sm", onClick: () => { showManage(stripeID); }, children: "Manage" })) : (_jsx(Button, { variant: "gradient", size: "sm", onClick: () => { showCheckout(user.email); }, children: "Subscribe" })) })] }) }))] }), _jsx("div", { className: "mt-8 text-center pb-24 md:pb-8", children: _jsxs("p", { className: "text-xs text-muted-foreground", children: ["v", constants.version || '0.0.0'] }) })] }));
|
|
62
62
|
}
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -168,75 +168,75 @@
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.dark {
|
|
171
|
-
--background: oklch(0.
|
|
171
|
+
--background: oklch(0.145 0 0);
|
|
172
172
|
--foreground: oklch(0.985 0 0);
|
|
173
|
-
--card: oklch(0.
|
|
173
|
+
--card: oklch(0.205 0 0);
|
|
174
174
|
--card-foreground: oklch(0.985 0 0);
|
|
175
|
-
--popover: oklch(0.
|
|
175
|
+
--popover: oklch(0.205 0 0);
|
|
176
176
|
--popover-foreground: oklch(0.985 0 0);
|
|
177
177
|
--primary: oklch(0.985 0 0);
|
|
178
|
-
--primary-foreground: oklch(0.
|
|
179
|
-
--secondary: oklch(0.
|
|
178
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
179
|
+
--secondary: oklch(0.269 0 0);
|
|
180
180
|
--secondary-foreground: oklch(0.985 0 0);
|
|
181
|
-
--muted: oklch(0.
|
|
182
|
-
--muted-foreground: oklch(0.
|
|
183
|
-
--accent: oklch(0.
|
|
181
|
+
--muted: oklch(0.269 0 0);
|
|
182
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
183
|
+
--accent: oklch(0.269 0 0);
|
|
184
184
|
--accent-foreground: oklch(0.985 0 0);
|
|
185
185
|
--destructive: oklch(0.396 0.141 25.723);
|
|
186
186
|
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
187
|
-
--border: oklch(0
|
|
188
|
-
--input: oklch(0
|
|
189
|
-
--ring: oklch(0.
|
|
187
|
+
--border: oklch(1 0 0 / 10%);
|
|
188
|
+
--input: oklch(1 0 0 / 15%);
|
|
189
|
+
--ring: oklch(0.556 0 0);
|
|
190
190
|
--chart-1: oklch(0.488 0.243 264.376);
|
|
191
191
|
--chart-2: oklch(0.696 0.17 162.48);
|
|
192
192
|
--chart-3: oklch(0.769 0.188 70.08);
|
|
193
193
|
--chart-4: oklch(0.627 0.265 303.9);
|
|
194
194
|
--chart-5: oklch(0.645 0.246 16.439);
|
|
195
|
-
--sidebar: oklch(0.
|
|
195
|
+
--sidebar: oklch(0.205 0 0);
|
|
196
196
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
197
197
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
198
198
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
199
|
-
--sidebar-accent: oklch(0.
|
|
199
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
200
200
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
201
|
-
--sidebar-border: oklch(0
|
|
202
|
-
--sidebar-ring: oklch(0.
|
|
201
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
202
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
/* Fallback: Apply dark theme before JS hydrates for users who prefer dark mode */
|
|
206
206
|
@media (prefers-color-scheme: dark) {
|
|
207
207
|
:root:not(.light) {
|
|
208
|
-
--background: oklch(0.
|
|
208
|
+
--background: oklch(0.145 0 0);
|
|
209
209
|
--foreground: oklch(0.985 0 0);
|
|
210
|
-
--card: oklch(0.
|
|
210
|
+
--card: oklch(0.205 0 0);
|
|
211
211
|
--card-foreground: oklch(0.985 0 0);
|
|
212
|
-
--popover: oklch(0.
|
|
212
|
+
--popover: oklch(0.205 0 0);
|
|
213
213
|
--popover-foreground: oklch(0.985 0 0);
|
|
214
214
|
--primary: oklch(0.985 0 0);
|
|
215
|
-
--primary-foreground: oklch(0.
|
|
216
|
-
--secondary: oklch(0.
|
|
215
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
216
|
+
--secondary: oklch(0.269 0 0);
|
|
217
217
|
--secondary-foreground: oklch(0.985 0 0);
|
|
218
|
-
--muted: oklch(0.
|
|
219
|
-
--muted-foreground: oklch(0.
|
|
220
|
-
--accent: oklch(0.
|
|
218
|
+
--muted: oklch(0.269 0 0);
|
|
219
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
220
|
+
--accent: oklch(0.269 0 0);
|
|
221
221
|
--accent-foreground: oklch(0.985 0 0);
|
|
222
222
|
--destructive: oklch(0.396 0.141 25.723);
|
|
223
223
|
--destructive-foreground: oklch(0.637 0.237 25.331);
|
|
224
|
-
--border: oklch(0
|
|
225
|
-
--input: oklch(0
|
|
226
|
-
--ring: oklch(0.
|
|
224
|
+
--border: oklch(1 0 0 / 10%);
|
|
225
|
+
--input: oklch(1 0 0 / 15%);
|
|
226
|
+
--ring: oklch(0.556 0 0);
|
|
227
227
|
--chart-1: oklch(0.488 0.243 264.376);
|
|
228
228
|
--chart-2: oklch(0.696 0.17 162.48);
|
|
229
229
|
--chart-3: oklch(0.769 0.188 70.08);
|
|
230
230
|
--chart-4: oklch(0.627 0.265 303.9);
|
|
231
231
|
--chart-5: oklch(0.645 0.246 16.439);
|
|
232
|
-
--sidebar: oklch(0.
|
|
232
|
+
--sidebar: oklch(0.205 0 0);
|
|
233
233
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
234
234
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
235
235
|
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
236
|
-
--sidebar-accent: oklch(0.
|
|
236
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
237
237
|
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
238
|
-
--sidebar-border: oklch(0
|
|
239
|
-
--sidebar-ring: oklch(0.
|
|
238
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
239
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|