@schemavaults/ui 0.78.0 → 0.78.3
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/dist/components/layout/themed-page-container/themed-page-container.d.ts +3 -1
- package/dist/components/layout/themed-page-container/themed-page-container.js +1 -1
- package/dist/components/layout/themed-page-container/themed-page-container.js.map +1 -1
- package/dist/components/ui/themed-page-background/themed-page-background.d.ts +3 -1
- package/dist/components/ui/themed-page-background/themed-page-background.js +15 -3
- package/dist/components/ui/themed-page-background/themed-page-background.js.map +1 -1
- package/dist/components/ui/wordmark/wordmark.d.ts +9 -1
- package/dist/components/ui/wordmark/wordmark.js +22 -3
- package/dist/components/ui/wordmark/wordmark.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ThemedPageBackgroundProps } from "../../ui/themed-page-background";
|
|
2
|
+
import type { PropsWithChildren, ReactElement } from "react";
|
|
2
3
|
export interface ThemedPageContainerProps extends PropsWithChildren {
|
|
3
4
|
backgroundClassName?: string;
|
|
4
5
|
contentContainerClassName?: string;
|
|
5
6
|
additionalContentContainerClassName?: string;
|
|
7
|
+
gradientColors?: ThemedPageBackgroundProps["gradientColors"];
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
*
|
|
@@ -23,7 +23,7 @@ export function ThemedPageContainer({ children, ...props }) {
|
|
|
23
23
|
const contentContainerClassName = typeof props.contentContainerClassName === "string"
|
|
24
24
|
? cn(props.contentContainerClassName, props.additionalContentContainerClassName)
|
|
25
25
|
: defaultContentContainerClassName;
|
|
26
|
-
return (_jsx(ThemedPageBackground, { className: cn("grow", "flex flex-col items-stretch justify-start", backgroundContentClassName), backgroundClassName: undefined, children: _jsx(PageColumnContainer, { className: contentContainerClassName, children: children }) }));
|
|
26
|
+
return (_jsx(ThemedPageBackground, { className: cn("grow", "flex flex-col items-stretch justify-start", backgroundContentClassName), backgroundClassName: undefined, gradientColors: props.gradientColors, children: _jsx(PageColumnContainer, { className: contentContainerClassName, children: children }) }));
|
|
27
27
|
}
|
|
28
28
|
export default ThemedPageContainer;
|
|
29
29
|
//# sourceMappingURL=themed-page-container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themed-page-container.js","sourceRoot":"","sources":["../../../../src/components/layout/themed-page-container/themed-page-container.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,
|
|
1
|
+
{"version":3,"file":"themed-page-container.js","sourceRoot":"","sources":["../../../../src/components/layout/themed-page-container/themed-page-container.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,oBAEN,MAAM,wCAAwC,CAAC;AAEhD,OAAO,mBAAmB,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAUjC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,GAAG,KAAK,EACiB;IACzB,MAAM,0BAA0B,GAAW,EAAE,CAC3C,YAAY,EACZ,mBAAmB,CACpB,CAAC;IAEF,MAAM,gCAAgC,GAAW,EAAE,CACjD,YAAY,EACZ,yBAAyB,EACzB,KAAK,CAAC,mCAAmC,CAC1C,CAAC;IAEF,MAAM,0BAA0B,GAC9B,OAAO,KAAK,CAAC,mBAAmB,KAAK,QAAQ;QAC3C,CAAC,CAAC,KAAK,CAAC,mBAAmB;QAC3B,CAAC,CAAC,0BAA0B,CAAC;IACjC,MAAM,yBAAyB,GAC7B,OAAO,KAAK,CAAC,yBAAyB,KAAK,QAAQ;QACjD,CAAC,CAAC,EAAE,CACA,KAAK,CAAC,yBAAyB,EAC/B,KAAK,CAAC,mCAAmC,CAC1C;QACH,CAAC,CAAC,gCAAgC,CAAC;IAEvC,OAAO,CACL,KAAC,oBAAoB,IACnB,SAAS,EAAE,EAAE,CACX,MAAM,EACN,2CAA2C,EAC3C,0BAA0B,CAC3B,EACD,mBAAmB,EAAE,SAAS,EAC9B,cAAc,EAAE,KAAK,CAAC,cAAc,YAEpC,KAAC,mBAAmB,IAAC,SAAS,EAAE,yBAAyB,YACtD,QAAQ,GACW,GACD,CACxB,CAAC;AACJ,CAAC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -4,6 +4,8 @@ export interface ThemedPageBackgroundProps extends PropsWithChildren {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
/** Append classnames to the background gradient container */
|
|
6
6
|
backgroundClassName?: string;
|
|
7
|
+
/** Gradient colors. Tuple of [from, to]. Any CSS color string works. */
|
|
8
|
+
gradientColors?: [from: string, to: string];
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* @name ThemedPageBackground
|
|
@@ -12,5 +14,5 @@ export interface ThemedPageBackgroundProps extends PropsWithChildren {
|
|
|
12
14
|
*
|
|
13
15
|
* @returns A component that fills the background container with a colorful SchemaVaults-themed background; child content is displayed on top
|
|
14
16
|
*/
|
|
15
|
-
export declare function ThemedPageBackground({ children, ...props }: ThemedPageBackgroundProps): ReactElement;
|
|
17
|
+
export declare function ThemedPageBackground({ children, gradientColors, ...props }: ThemedPageBackgroundProps): ReactElement;
|
|
16
18
|
export default ThemedPageBackground;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../../../lib/utils";
|
|
4
|
+
import { getSchemaVaultsBrandColor } from "@schemavaults/theme/brand_colors";
|
|
4
5
|
/**
|
|
5
6
|
* @name ThemedPageBackground
|
|
6
7
|
*
|
|
@@ -8,16 +9,27 @@ import { cn } from "../../../lib/utils";
|
|
|
8
9
|
*
|
|
9
10
|
* @returns A component that fills the background container with a colorful SchemaVaults-themed background; child content is displayed on top
|
|
10
11
|
*/
|
|
11
|
-
export function ThemedPageBackground({ children,
|
|
12
|
+
export function ThemedPageBackground({ children, gradientColors = [
|
|
13
|
+
getSchemaVaultsBrandColor("schemavaults-brand-red"),
|
|
14
|
+
getSchemaVaultsBrandColor("schemavaults-brand-blue"),
|
|
15
|
+
], ...props }) {
|
|
16
|
+
if (!Array.isArray(gradientColors) ||
|
|
17
|
+
typeof gradientColors[0] !== "string" ||
|
|
18
|
+
typeof gradientColors[1] !== "string") {
|
|
19
|
+
throw new TypeError("Expected a [from, to] tuple containing classNames for the <ThemedPageBackground /> gradient!");
|
|
20
|
+
}
|
|
21
|
+
const fromColor = gradientColors[0];
|
|
22
|
+
const toColor = gradientColors[1];
|
|
12
23
|
const backgroundClassNames = [
|
|
13
24
|
"schemavaults-themed-page-background",
|
|
14
25
|
"relative min-h-full w-full shrink-0",
|
|
15
|
-
"bg-schemavaults-brand-blue bg-gradient-to-b from-schemavaults-brand-red to-transparent",
|
|
16
26
|
];
|
|
17
27
|
if (typeof props.backgroundClassName === "string") {
|
|
18
28
|
backgroundClassNames.push(props.backgroundClassName);
|
|
19
29
|
}
|
|
20
|
-
return (_jsx("div", { className: backgroundClassNames.join(" "), children: _jsx("div", { className: cn("schemavaults-themed-page-background-internal-content", "relative z-10", "w-full min-h-full", props.className),
|
|
30
|
+
return (_jsx("div", { className: backgroundClassNames.join(" "), children: _jsx("div", { className: cn("schemavaults-themed-page-background-internal-content", "relative z-10", "w-full min-h-full", props.className), style: {
|
|
31
|
+
backgroundImage: `linear-gradient(to bottom, ${fromColor}, ${toColor})`,
|
|
32
|
+
}, children: children }) }));
|
|
21
33
|
}
|
|
22
34
|
export default ThemedPageBackground;
|
|
23
35
|
//# sourceMappingURL=themed-page-background.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themed-page-background.js","sourceRoot":"","sources":["../../../../src/components/ui/themed-page-background/themed-page-background.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"themed-page-background.js","sourceRoot":"","sources":["../../../../src/components/ui/themed-page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import type { ReactElement } from "react";
|
|
2
2
|
export interface WordmarkProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description The actual string to (beautifully) render
|
|
5
|
+
*/
|
|
6
|
+
wordmarkText?: string;
|
|
7
|
+
/**
|
|
8
|
+
* @example ["from-schemavaults-brand-blue", "to-schemavaults-brand-red"]
|
|
9
|
+
*/
|
|
10
|
+
gradientColors?: [fromClassName: string, toClassName: string];
|
|
3
11
|
className?: string;
|
|
4
12
|
}
|
|
5
|
-
export declare function Wordmark({ className }: WordmarkProps): ReactElement;
|
|
13
|
+
export declare function Wordmark({ wordmarkText, gradientColors, className, }: WordmarkProps): ReactElement;
|
|
6
14
|
export default Wordmark;
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { getSchemaVaultsBrandColor } from "@schemavaults/theme/brand_colors";
|
|
4
|
+
const DEFAULT_WORDMARK_TEXT = "SchemaVaults";
|
|
5
|
+
export function Wordmark({ wordmarkText = DEFAULT_WORDMARK_TEXT, gradientColors = [
|
|
6
|
+
getSchemaVaultsBrandColor("schemavaults-brand-blue"),
|
|
7
|
+
getSchemaVaultsBrandColor("schemavaults-brand-red"),
|
|
8
|
+
], className, }) {
|
|
9
|
+
if (typeof wordmarkText !== "string" || !(wordmarkText.length > 0)) {
|
|
10
|
+
throw new TypeError("Expected 'wordmarkText' to render to be a non-empty string!");
|
|
11
|
+
}
|
|
12
|
+
if (!Array.isArray(gradientColors) ||
|
|
13
|
+
typeof gradientColors[0] !== "string" ||
|
|
14
|
+
typeof gradientColors[1] !== "string") {
|
|
15
|
+
throw new TypeError("Expected a [from, to] tuple containing classNames for the <Wordmark /> gradient!");
|
|
16
|
+
}
|
|
17
|
+
const fromColor = gradientColors[0];
|
|
18
|
+
const toColor = gradientColors[1];
|
|
19
|
+
return (_jsx("span", { className: className, style: {
|
|
20
|
+
textWrap: "nowrap",
|
|
21
|
+
color: "transparent",
|
|
22
|
+
backgroundClip: "text",
|
|
23
|
+
backgroundImage: `linear-gradient(to bottom right, ${fromColor}, ${toColor})`,
|
|
24
|
+
}, children: wordmarkText }));
|
|
6
25
|
}
|
|
7
26
|
export default Wordmark;
|
|
8
27
|
//# sourceMappingURL=wordmark.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wordmark.js","sourceRoot":"","sources":["../../../../src/components/ui/wordmark/wordmark.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"wordmark.js","sourceRoot":"","sources":["../../../../src/components/ui/wordmark/wordmark.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAG7E,MAAM,qBAAqB,GAAG,cAAuB,CAAC;AAgBtD,MAAM,UAAU,QAAQ,CAAC,EACvB,YAAY,GAAG,qBAAqB,EACpC,cAAc,GAAG;IACf,yBAAyB,CAAC,yBAAyB,CAAC;IACpD,yBAAyB,CAAC,wBAAwB,CAAC;CAC3C,EACV,SAAS,GACK;IACd,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,SAAS,CACjB,6DAA6D,CAC9D,CAAC;IACJ,CAAC;IAED,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC;QAC9B,OAAO,cAAc,CAAC,CAAC,CAAC,KAAK,QAAQ;QACrC,OAAO,cAAc,CAAC,CAAC,CAAC,KAAK,QAAQ,EACrC,CAAC;QACD,MAAM,IAAI,SAAS,CACjB,kFAAkF,CACnF,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAW,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAW,cAAc,CAAC,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,aAAa;YACpB,cAAc,EAAE,MAAM;YACtB,eAAe,EAAE,oCAAoC,SAAS,KAAK,OAAO,GAAG;SAC9E,YAEA,YAAY,GACR,CACR,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/ui",
|
|
3
|
-
"version": "0.78.
|
|
3
|
+
"version": "0.78.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "React.js UI components for SchemaVaults frontend applications",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@radix-ui/react-toast": "1.2.14",
|
|
37
37
|
"@radix-ui/react-tooltip": "1.2.7",
|
|
38
38
|
"@radix-ui/react-visually-hidden": "1.2.3",
|
|
39
|
-
"@schemavaults/theme": "0.
|
|
39
|
+
"@schemavaults/theme": "0.26.1",
|
|
40
40
|
"@tanstack/react-table": "8.20.1",
|
|
41
41
|
"class-variance-authority": "0.7.1",
|
|
42
42
|
"clsx": "2.1.1",
|