@vvedantb/ui 0.28.0 → 0.29.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 +1 -1
- package/package.json +1 -1
- package/src/marketing/SiteFooter.tsx +27 -19
- package/src/ui/sonner-icons.tsx +4 -4
package/README.md
CHANGED
|
@@ -874,7 +874,7 @@ links under a separator.
|
|
|
874
874
|
| --- | --- |
|
|
875
875
|
| `brand`, `tagline` | Nodes. |
|
|
876
876
|
| `socials` | `{ href, icon, label? }[]`. `icon` is a component that takes `className`. Links open in a new tab. |
|
|
877
|
-
| `columns` | `{ heading, links }[]`. A link is `{ href, label, external?, image?: { src, alt } }`. |
|
|
877
|
+
| `columns` | `{ heading, links }[]`. A link is `{ href, label, external?, image?: { src, alt }, app?: AppName }`. `image` is a 20px round image before the label. `app` (0.29.0) is the 14px `APP_ICONS[app]` glyph before the label, in `currentColor` and `aria-hidden`. If both are set, `app` wins. |
|
|
878
878
|
| `name`, `year` | "Copyright © {year} {name}". `year` defaults to the current year. |
|
|
879
879
|
| `legalLinks` | `{ href, label }[]`, open in a new tab. |
|
|
880
880
|
| `variant` | `"muted"` (default, `text-muted`), `"muted-foreground"`, or `"touch"` (`text-muted-foreground`, `max-sm:hit-target` links, safe-area bottom padding). |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vvedantb/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared React 19 UI for web apps: one main JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), a client entry without @vvedantb/server, convex or Clerk for Chrome extensions, design-token CSS, shared Tailwind v4 CSS, a Tailwind preset and packaged Instrument Sans fonts.",
|
|
6
6
|
"type": "module",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import { APP_ICONS, type AppName } from "../brand";
|
|
2
3
|
import { Button } from "../ui/button";
|
|
3
4
|
import { Separator } from "../ui/separator";
|
|
4
5
|
import { siteFooterClasses, type SiteFooterVariant } from "./marketing-classes";
|
|
@@ -10,6 +11,8 @@ export type SiteFooterLink = {
|
|
|
10
11
|
external?: boolean;
|
|
11
12
|
/** 20px round image before the label. */
|
|
12
13
|
image?: { src: string; alt: string };
|
|
14
|
+
/** 14px app glyph before the label, in `currentColor` and `aria-hidden`. Wins over `image`. */
|
|
15
|
+
app?: AppName;
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
export type SiteFooterSocial = {
|
|
@@ -78,25 +81,30 @@ export function SiteFooter({
|
|
|
78
81
|
<div key={column.heading} className="flex-1 sm:flex-none">
|
|
79
82
|
<h4 className={c.heading}>{column.heading}</h4>
|
|
80
83
|
<div className={c.links}>
|
|
81
|
-
{column.links.map((link) =>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
{column.links.map((link) => {
|
|
85
|
+
const AppIcon = link.app ? APP_ICONS[link.app] : null;
|
|
86
|
+
return (
|
|
87
|
+
<a
|
|
88
|
+
key={link.label}
|
|
89
|
+
href={link.href}
|
|
90
|
+
{...(link.external ? { target: "_blank", rel: "noopener noreferrer" } : {})}
|
|
91
|
+
className={AppIcon || link.image ? c.imageLink : c.link}
|
|
92
|
+
>
|
|
93
|
+
{AppIcon ? (
|
|
94
|
+
<AppIcon size={14} />
|
|
95
|
+
) : link.image ? (
|
|
96
|
+
<img
|
|
97
|
+
src={link.image.src}
|
|
98
|
+
alt={link.image.alt}
|
|
99
|
+
width={20}
|
|
100
|
+
height={20}
|
|
101
|
+
className="rounded-full object-cover w-5 h-5 md:w-5 md:h-5"
|
|
102
|
+
/>
|
|
103
|
+
) : null}
|
|
104
|
+
{link.label}
|
|
105
|
+
</a>
|
|
106
|
+
);
|
|
107
|
+
})}
|
|
100
108
|
</div>
|
|
101
109
|
</div>
|
|
102
110
|
))}
|
package/src/ui/sonner-icons.tsx
CHANGED
|
@@ -8,7 +8,7 @@ function InfoIcon() {
|
|
|
8
8
|
<svg
|
|
9
9
|
aria-hidden="true"
|
|
10
10
|
className="h-6 w-6 fill-current text-primary"
|
|
11
|
-
fill="
|
|
11
|
+
fill="currentColor"
|
|
12
12
|
viewBox="0 0 24 24"
|
|
13
13
|
xmlns="http://www.w3.org/2000/svg"
|
|
14
14
|
>
|
|
@@ -22,7 +22,7 @@ function SuccessIcon() {
|
|
|
22
22
|
<svg
|
|
23
23
|
aria-hidden="true"
|
|
24
24
|
className="h-6 w-6 fill-current text-success"
|
|
25
|
-
fill="
|
|
25
|
+
fill="currentColor"
|
|
26
26
|
viewBox="0 0 24 24"
|
|
27
27
|
xmlns="http://www.w3.org/2000/svg"
|
|
28
28
|
>
|
|
@@ -36,7 +36,7 @@ function WarningIcon() {
|
|
|
36
36
|
<svg
|
|
37
37
|
aria-hidden="true"
|
|
38
38
|
className="h-6 w-6 fill-current text-warning"
|
|
39
|
-
fill="
|
|
39
|
+
fill="currentColor"
|
|
40
40
|
viewBox="0 0 24 24"
|
|
41
41
|
xmlns="http://www.w3.org/2000/svg"
|
|
42
42
|
>
|
|
@@ -54,7 +54,7 @@ function ErrorIcon() {
|
|
|
54
54
|
<svg
|
|
55
55
|
aria-hidden="true"
|
|
56
56
|
className="h-6 w-6 fill-current text-destructive"
|
|
57
|
-
fill="
|
|
57
|
+
fill="currentColor"
|
|
58
58
|
viewBox="0 0 20 20"
|
|
59
59
|
xmlns="http://www.w3.org/2000/svg"
|
|
60
60
|
>
|