@voltro/ui-shadcn 0.1.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 +52 -0
- package/LICENSE +57 -0
- package/README.md +26 -0
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +3016 -0
- package/dist/brand.d.ts +73 -0
- package/dist/brand.js +177 -0
- package/dist/cn.d.ts +11 -0
- package/dist/cn.js +6 -0
- package/dist/index.d.ts +1183 -0
- package/dist/index.js +2636 -0
- package/dist/tokens.css +532 -0
- package/package.json +64 -0
- package/src/brand/README.md +60 -0
- package/src/brand/assets/voltro-favicon.svg +30 -0
- package/src/brand/assets/voltro-icon-dark.svg +26 -0
- package/src/brand/assets/voltro-icon.svg +14 -0
- package/src/brand/assets/voltro-mark-mono.svg +5 -0
- package/src/brand/assets/voltro-mark.svg +14 -0
- package/src/brand/voltroLogo.tsx +244 -0
- package/src/cn.ts +10 -0
- package/src/compositions/appShell.tsx +72 -0
- package/src/compositions/codeCompare.tsx +88 -0
- package/src/compositions/docShell.tsx +112 -0
- package/src/compositions/docsLayout.tsx +577 -0
- package/src/compositions/featureBento.tsx +103 -0
- package/src/compositions/featureGrid.tsx +41 -0
- package/src/compositions/heroSection.tsx +55 -0
- package/src/compositions/landingCta.tsx +85 -0
- package/src/compositions/landingHero.tsx +174 -0
- package/src/compositions/landingStats.tsx +99 -0
- package/src/compositions/loginCard.tsx +139 -0
- package/src/compositions/pageHeader.tsx +58 -0
- package/src/compositions/profileMenu.tsx +316 -0
- package/src/compositions/siteFooter.tsx +250 -0
- package/src/compositions/themeToggle.tsx +82 -0
- package/src/cookies.ts +109 -0
- package/src/index.ts +160 -0
- package/src/primitives/animatedNumber.tsx +73 -0
- package/src/primitives/avatar.tsx +39 -0
- package/src/primitives/badge.tsx +39 -0
- package/src/primitives/button.tsx +53 -0
- package/src/primitives/callout.tsx +97 -0
- package/src/primitives/card.tsx +68 -0
- package/src/primitives/checkbox.tsx +55 -0
- package/src/primitives/codeBlock.tsx +134 -0
- package/src/primitives/codeWindow.tsx +84 -0
- package/src/primitives/dialog.tsx +43 -0
- package/src/primitives/docCard.tsx +109 -0
- package/src/primitives/docIcons.tsx +268 -0
- package/src/primitives/dropdownMenu.tsx +162 -0
- package/src/primitives/gridOverlay.tsx +51 -0
- package/src/primitives/highlightedCode.tsx +112 -0
- package/src/primitives/input.tsx +25 -0
- package/src/primitives/label.tsx +19 -0
- package/src/primitives/localeSwitcher.tsx +90 -0
- package/src/primitives/meshBackdrop.tsx +62 -0
- package/src/primitives/scrollReveal.tsx +70 -0
- package/src/primitives/searchModal.tsx +304 -0
- package/src/primitives/select.tsx +24 -0
- package/src/primitives/separator.tsx +24 -0
- package/src/primitives/skeleton.tsx +12 -0
- package/src/primitives/sparkles.tsx +105 -0
- package/src/primitives/steps.tsx +55 -0
- package/src/primitives/tabs.tsx +102 -0
- package/src/primitives/textarea.tsx +24 -0
- package/src/primitives/toast.tsx +44 -0
- package/src/primitives/tocScrollSpy.tsx +110 -0
- package/src/primitives/toggle.tsx +50 -0
- package/src/primitives/toggleGroup.tsx +62 -0
- package/src/tokens.css +532 -0
- package/src/widgets.tsx +297 -0
package/dist/brand.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SVGProps } from 'react';
|
|
4
|
+
|
|
5
|
+
/** Raw bolt path data, for apps that need to compose their own SVG. */
|
|
6
|
+
export declare const VOLTRO_BOLT_PATH: {
|
|
7
|
+
readonly full: "M28 5 13 27 22 26 20 43 35 21 26 22Z";
|
|
8
|
+
readonly front: "M28 5 13 27 22 26 20 43Z";
|
|
9
|
+
readonly back: "M28 5 20 43 35 21 26 22Z";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** Brand violet — the canonical primary. Exposed for ad-hoc usage. */
|
|
13
|
+
export declare const VOLTRO_VIOLET = "#7C3AED";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The app / advertising icon: the bolt centred on a rounded square with
|
|
17
|
+
* its own background, so it stands on a home screen, store listing, or
|
|
18
|
+
* ad placement regardless of the surface behind it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const VoltroIcon: ({ size, tone, radius, title, className, style, }: VoltroIconProps) => ReactNode;
|
|
21
|
+
|
|
22
|
+
export declare interface VoltroIconProps {
|
|
23
|
+
/** Pixel size (square). Default 40. */
|
|
24
|
+
readonly size?: number;
|
|
25
|
+
/** `brand` (violet squircle + white bolt — works on any surface) · `dark` (near-black squircle + glowing violet bolt). */
|
|
26
|
+
readonly tone?: VoltroIconTone;
|
|
27
|
+
/** Corner radius as a fraction of size. Default 0.225 (iOS-style squircle look). */
|
|
28
|
+
readonly radius?: number;
|
|
29
|
+
readonly title?: string;
|
|
30
|
+
readonly className?: string;
|
|
31
|
+
readonly style?: CSSProperties;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare type VoltroIconTone = 'brand' | 'dark';
|
|
35
|
+
|
|
36
|
+
/** The bolt mark on a transparent background. */
|
|
37
|
+
export declare const VoltroMark: ({ size, variant, title, className, ...rest }: VoltroMarkProps) => ReactNode;
|
|
38
|
+
|
|
39
|
+
export declare interface VoltroMarkProps extends Omit<SVGProps<SVGSVGElement>, 'width' | 'height' | 'viewBox' | 'fill' | 'xmlns' | 'children' | 'ref' | 'role' | 'aria-label' | 'aria-hidden'> {
|
|
40
|
+
/** Pixel size (square). Default 32. Pass a string like '1em' to track font-size. */
|
|
41
|
+
readonly size?: number | string;
|
|
42
|
+
/** `gradient` (default, two-facet violet) · `mono` (currentColor) · `white`. */
|
|
43
|
+
readonly variant?: VoltroMarkVariant;
|
|
44
|
+
/** Accessible label. Omit + set `aria-hidden` when paired with a text label. */
|
|
45
|
+
readonly title?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export declare type VoltroMarkVariant = 'gradient' | 'mono' | 'white';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Mark + wordmark lock-up for headers / marketing. The text is real
|
|
52
|
+
* type set in the surrounding font and `currentColor`, so it inherits
|
|
53
|
+
* the app's typography and is correct in light + dark automatically.
|
|
54
|
+
*/
|
|
55
|
+
export declare const VoltroWordmark: ({ size, markVariant, label, className, style, }: VoltroWordmarkProps) => ReactNode;
|
|
56
|
+
|
|
57
|
+
export declare interface VoltroWordmarkProps {
|
|
58
|
+
/** Mark height in px; the wordmark text scales with it. Default 28. */
|
|
59
|
+
readonly size?: number;
|
|
60
|
+
readonly markVariant?: VoltroMarkVariant;
|
|
61
|
+
/** Wordmark label. Default "Voltro". */
|
|
62
|
+
readonly label?: string;
|
|
63
|
+
readonly className?: string;
|
|
64
|
+
readonly style?: CSSProperties;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { }
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
declare global {
|
|
71
|
+
var __voltroShikiHighlighter: Highlighter | null | undefined;
|
|
72
|
+
var __voltroShikiHighlighterPromise: Promise<Highlighter | null> | null | undefined;
|
|
73
|
+
}
|
package/dist/brand.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { cn as e } from "./cn.js";
|
|
2
|
+
import { useId as t } from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
//#region src/brand/voltroLogo.tsx
|
|
5
|
+
var a = "M28 5 13 27 22 26 20 43 35 21 26 22Z", o = "M28 5 13 27 22 26 20 43Z", s = "M28 5 20 43 35 21 26 22Z", c = "#7C3AED", l = ({ size: c = 32, variant: l = "gradient", title: u, className: d, ...f }) => {
|
|
6
|
+
let p = t(), m = `vmF-${p}`, h = `vmB-${p}`;
|
|
7
|
+
return /* @__PURE__ */ r("svg", {
|
|
8
|
+
width: c,
|
|
9
|
+
height: c,
|
|
10
|
+
viewBox: "0 0 48 48",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
...u === void 0 ? { "aria-hidden": !0 } : {
|
|
14
|
+
role: "img",
|
|
15
|
+
"aria-label": u
|
|
16
|
+
},
|
|
17
|
+
className: e("inline-block shrink-0", d),
|
|
18
|
+
...f,
|
|
19
|
+
children: l === "gradient" ? /* @__PURE__ */ i(n, { children: [
|
|
20
|
+
/* @__PURE__ */ i("defs", { children: [/* @__PURE__ */ i("linearGradient", {
|
|
21
|
+
id: m,
|
|
22
|
+
x1: "13",
|
|
23
|
+
y1: "5",
|
|
24
|
+
x2: "33",
|
|
25
|
+
y2: "43",
|
|
26
|
+
gradientUnits: "userSpaceOnUse",
|
|
27
|
+
children: [/* @__PURE__ */ r("stop", { stopColor: "#A874FF" }), /* @__PURE__ */ r("stop", {
|
|
28
|
+
offset: "1",
|
|
29
|
+
stopColor: "#7C3AED"
|
|
30
|
+
})]
|
|
31
|
+
}), /* @__PURE__ */ i("linearGradient", {
|
|
32
|
+
id: h,
|
|
33
|
+
x1: "22",
|
|
34
|
+
y1: "5",
|
|
35
|
+
x2: "35",
|
|
36
|
+
y2: "43",
|
|
37
|
+
gradientUnits: "userSpaceOnUse",
|
|
38
|
+
children: [/* @__PURE__ */ r("stop", { stopColor: "#6D28D9" }), /* @__PURE__ */ r("stop", {
|
|
39
|
+
offset: "1",
|
|
40
|
+
stopColor: "#4C1D95"
|
|
41
|
+
})]
|
|
42
|
+
})] }),
|
|
43
|
+
/* @__PURE__ */ r("path", {
|
|
44
|
+
d: o,
|
|
45
|
+
fill: `url(#${m})`
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ r("path", {
|
|
48
|
+
d: s,
|
|
49
|
+
fill: `url(#${h})`
|
|
50
|
+
})
|
|
51
|
+
] }) : /* @__PURE__ */ r("path", {
|
|
52
|
+
d: a,
|
|
53
|
+
fill: l === "white" ? "#FFFFFF" : "currentColor"
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
}, u = ({ size: a = 40, tone: c = "brand", radius: l = .225, title: u = "Voltro", className: d, style: f }) => {
|
|
57
|
+
let p = t(), m = `viBg-${p}`, h = `viGlow-${p}`, g = `viF-${p}`, _ = `viB-${p}`, v = (64 * l).toFixed(2);
|
|
58
|
+
return /* @__PURE__ */ i("svg", {
|
|
59
|
+
width: a,
|
|
60
|
+
height: a,
|
|
61
|
+
viewBox: "0 0 64 64",
|
|
62
|
+
fill: "none",
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
role: "img",
|
|
65
|
+
"aria-label": u,
|
|
66
|
+
className: e("inline-block shrink-0", d),
|
|
67
|
+
style: f,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ i("defs", { children: [
|
|
70
|
+
/* @__PURE__ */ r("linearGradient", {
|
|
71
|
+
id: m,
|
|
72
|
+
x1: "0",
|
|
73
|
+
y1: "0",
|
|
74
|
+
x2: "64",
|
|
75
|
+
y2: "64",
|
|
76
|
+
gradientUnits: "userSpaceOnUse",
|
|
77
|
+
children: c === "brand" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("stop", { stopColor: "#8B5CFF" }), /* @__PURE__ */ r("stop", {
|
|
78
|
+
offset: "1",
|
|
79
|
+
stopColor: "#6D28D9"
|
|
80
|
+
})] }) : /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("stop", { stopColor: "#1B1726" }), /* @__PURE__ */ r("stop", {
|
|
81
|
+
offset: "1",
|
|
82
|
+
stopColor: "#120F1A"
|
|
83
|
+
})] })
|
|
84
|
+
}),
|
|
85
|
+
c === "dark" ? /* @__PURE__ */ i("radialGradient", {
|
|
86
|
+
id: h,
|
|
87
|
+
cx: "0.5",
|
|
88
|
+
cy: "0.46",
|
|
89
|
+
r: "0.5",
|
|
90
|
+
children: [/* @__PURE__ */ r("stop", {
|
|
91
|
+
stopColor: "#7C3AED",
|
|
92
|
+
stopOpacity: "0.55"
|
|
93
|
+
}), /* @__PURE__ */ r("stop", {
|
|
94
|
+
offset: "1",
|
|
95
|
+
stopColor: "#7C3AED",
|
|
96
|
+
stopOpacity: "0"
|
|
97
|
+
})]
|
|
98
|
+
}) : null,
|
|
99
|
+
/* @__PURE__ */ i("linearGradient", {
|
|
100
|
+
id: g,
|
|
101
|
+
x1: "13",
|
|
102
|
+
y1: "5",
|
|
103
|
+
x2: "33",
|
|
104
|
+
y2: "43",
|
|
105
|
+
gradientUnits: "userSpaceOnUse",
|
|
106
|
+
children: [/* @__PURE__ */ r("stop", { stopColor: "#C4A6FF" }), /* @__PURE__ */ r("stop", {
|
|
107
|
+
offset: "1",
|
|
108
|
+
stopColor: "#9D5BFF"
|
|
109
|
+
})]
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ i("linearGradient", {
|
|
112
|
+
id: _,
|
|
113
|
+
x1: "22",
|
|
114
|
+
y1: "5",
|
|
115
|
+
x2: "35",
|
|
116
|
+
y2: "43",
|
|
117
|
+
gradientUnits: "userSpaceOnUse",
|
|
118
|
+
children: [/* @__PURE__ */ r("stop", { stopColor: "#A874FF" }), /* @__PURE__ */ r("stop", {
|
|
119
|
+
offset: "1",
|
|
120
|
+
stopColor: "#7C3AED"
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ r("rect", {
|
|
125
|
+
width: "64",
|
|
126
|
+
height: "64",
|
|
127
|
+
rx: v,
|
|
128
|
+
fill: `url(#${m})`
|
|
129
|
+
}),
|
|
130
|
+
c === "brand" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("path", {
|
|
131
|
+
transform: "translate(8 8)",
|
|
132
|
+
d: o,
|
|
133
|
+
fill: "#FFFFFF"
|
|
134
|
+
}), /* @__PURE__ */ r("path", {
|
|
135
|
+
transform: "translate(8 8)",
|
|
136
|
+
d: s,
|
|
137
|
+
fill: "#D7C4FF"
|
|
138
|
+
})] }) : /* @__PURE__ */ i(n, { children: [
|
|
139
|
+
/* @__PURE__ */ r("ellipse", {
|
|
140
|
+
cx: "32",
|
|
141
|
+
cy: "30",
|
|
142
|
+
rx: "26",
|
|
143
|
+
ry: "26",
|
|
144
|
+
fill: `url(#${h})`
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ r("path", {
|
|
147
|
+
transform: "translate(8 8)",
|
|
148
|
+
d: o,
|
|
149
|
+
fill: `url(#${g})`
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ r("path", {
|
|
152
|
+
transform: "translate(8 8)",
|
|
153
|
+
d: s,
|
|
154
|
+
fill: `url(#${_})`
|
|
155
|
+
})
|
|
156
|
+
] })
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
}, d = ({ size: t = 28, markVariant: n = "gradient", label: a = "Voltro", className: o, style: s }) => /* @__PURE__ */ i("span", {
|
|
160
|
+
className: e("inline-flex items-center font-semibold tracking-tight leading-none", o),
|
|
161
|
+
style: {
|
|
162
|
+
gap: t * .28,
|
|
163
|
+
fontSize: t * .74,
|
|
164
|
+
...s
|
|
165
|
+
},
|
|
166
|
+
children: [/* @__PURE__ */ r(l, {
|
|
167
|
+
size: Math.round(t * 1.18),
|
|
168
|
+
variant: n,
|
|
169
|
+
"aria-hidden": !0
|
|
170
|
+
}), /* @__PURE__ */ r("span", { children: a })]
|
|
171
|
+
}), f = {
|
|
172
|
+
full: a,
|
|
173
|
+
front: o,
|
|
174
|
+
back: s
|
|
175
|
+
};
|
|
176
|
+
//#endregion
|
|
177
|
+
export { f as VOLTRO_BOLT_PATH, c as VOLTRO_VIOLET, u as VoltroIcon, l as VoltroMark, d as VoltroWordmark };
|
package/dist/cn.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
export declare const cn: (...inputs: ClassValue[]) => string;
|
|
4
|
+
|
|
5
|
+
export { }
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
var __voltroShikiHighlighter: Highlighter | null | undefined;
|
|
10
|
+
var __voltroShikiHighlighterPromise: Promise<Highlighter | null> | null | undefined;
|
|
11
|
+
}
|