@psnext/design-system 1.0.0 → 1.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/README.md +30 -124
- package/dist/Stack.cjs +64 -0
- package/dist/Stack.cjs.map +1 -0
- package/dist/Stack.js +54 -0
- package/dist/Stack.js.map +1 -0
- package/dist/ThemeProvider.cjs +1886 -0
- package/dist/ThemeProvider.cjs.map +1 -0
- package/dist/ThemeProvider.d.cts +85 -0
- package/dist/ThemeProvider.d.cts.map +1 -0
- package/dist/ThemeProvider.d.ts +85 -0
- package/dist/ThemeProvider.d.ts.map +1 -0
- package/dist/ThemeProvider.js +1508 -0
- package/dist/ThemeProvider.js.map +1 -0
- package/dist/contexts/index.cjs +0 -60
- package/dist/contexts/index.d.cts +1 -23
- package/dist/contexts/index.d.ts +1 -23
- package/dist/contexts/index.js +1 -58
- package/dist/index.cjs +147 -72
- package/dist/index.d.cts +1009 -432
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1014 -437
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -7
- package/dist/index2.d.cts +4 -16
- package/dist/index2.d.ts +4 -16
- package/dist/layouts/index.cjs +100 -12
- package/dist/layouts/index.cjs.map +1 -0
- package/dist/layouts/index.d.cts +70 -127
- package/dist/layouts/index.d.cts.map +1 -1
- package/dist/layouts/index.d.ts +70 -127
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +92 -2
- package/dist/layouts/index.js.map +1 -0
- package/dist/patterns/index.cjs +1004 -7254
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +381 -389
- package/dist/patterns/index.d.cts.map +1 -1
- package/dist/patterns/index.d.ts +378 -386
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +970 -7225
- package/dist/patterns/index.js.map +1 -1
- package/dist/primitives/index.cjs +135 -55
- package/dist/primitives/index.d.cts +3 -2
- package/dist/primitives/index.d.ts +3 -2
- package/dist/primitives/index.js +3 -5
- package/dist/primitives.cjs +3961 -1274
- package/dist/primitives.cjs.map +1 -1
- package/dist/primitives.js +3551 -1001
- package/dist/primitives.js.map +1 -1
- package/dist/styles/base.css +43 -0
- package/dist/styles/glass.css +75 -0
- package/dist/styles/index.css +43 -23
- package/dist/styles/semantic.css +107 -0
- package/dist/styles/theme.css +42 -24
- package/dist/styles/tokens/alpha.css +39 -0
- package/dist/styles/tokens/border-radius.css +17 -0
- package/dist/styles/tokens/chart-colors-dark.css +18 -0
- package/dist/styles/tokens/chart-colors-light.css +18 -0
- package/dist/styles/tokens/colors.css +251 -0
- package/dist/styles/tokens/mode-dark.css +101 -0
- package/dist/styles/tokens/mode-light.css +101 -0
- package/dist/styles/tokens/shadows.css +14 -0
- package/dist/styles/tokens/spacing.css +44 -0
- package/dist/styles/tokens/theme-bodhi.css +35 -0
- package/dist/styles/tokens/theme-slingshot.css +35 -0
- package/dist/styles/tokens/theme-sustain.css +35 -0
- package/dist/styles/tokens/typography.css +83 -0
- package/dist/utils.cjs +67 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.js +27 -0
- package/dist/utils.js.map +1 -0
- package/package.json +15 -41
- package/dist/AiChatPanel.cjs +0 -1603
- package/dist/AiChatPanel.cjs.map +0 -1
- package/dist/AiChatPanel.js +0 -1526
- package/dist/AiChatPanel.js.map +0 -1
- package/dist/BodhiLogo.cjs +0 -240
- package/dist/BodhiLogo.cjs.map +0 -1
- package/dist/BodhiLogo.js +0 -194
- package/dist/BodhiLogo.js.map +0 -1
- package/dist/Skeleton.cjs +0 -19
- package/dist/Skeleton.cjs.map +0 -1
- package/dist/Skeleton.js +0 -14
- package/dist/Skeleton.js.map +0 -1
- package/dist/SustainLogo.cjs +0 -415
- package/dist/SustainLogo.cjs.map +0 -1
- package/dist/SustainLogo.js +0 -378
- package/dist/SustainLogo.js.map +0 -1
- package/dist/contexts/index.cjs.map +0 -1
- package/dist/contexts/index.d.cts.map +0 -1
- package/dist/contexts/index.d.ts.map +0 -1
- package/dist/contexts/index.js.map +0 -1
- package/dist/index2.d.cts.map +0 -1
- package/dist/index2.d.ts.map +0 -1
- package/dist/layouts.cjs +0 -3245
- package/dist/layouts.cjs.map +0 -1
- package/dist/layouts.js +0 -3180
- package/dist/layouts.js.map +0 -1
- package/dist/styles/base/colors.css +0 -300
- package/dist/styles/base/component-tokens.css +0 -240
- package/dist/styles/base/elevation.css +0 -7
- package/dist/styles/base/fonts.css +0 -14
- package/dist/styles/base/global.css +0 -305
- package/dist/styles/base/radius.css +0 -22
- package/dist/styles/base/semantic-aliases.css +0 -53
- package/dist/styles/base/spacing.css +0 -33
- package/dist/styles/base/typography.css +0 -48
- package/dist/styles/generated/bodhi-vars.css +0 -34
- package/dist/styles/generated/dark.css +0 -87
- package/dist/styles/generated/light.css +0 -87
- package/dist/styles/generated/slingshot-vars.css +0 -34
- package/dist/styles/generated/sustain-vars.css +0 -34
- package/dist/styles/themes/bodhi.css +0 -166
- package/dist/styles/themes/slingshot.css +0 -144
- package/dist/styles/themes/sustain.css +0 -130
package/dist/layouts/index.d.cts
CHANGED
|
@@ -1,133 +1,76 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime335 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types27 from "class-variance-authority/types";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
2
5
|
|
|
3
|
-
//#region src/layouts/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
//#region src/layouts/Container/Container.d.ts
|
|
7
|
+
declare const containerVariants: (props?: ({
|
|
8
|
+
size?: "content" | "narrow" | "wide" | "full" | null | undefined;
|
|
9
|
+
variant?: "default" | "glass" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types27.ClassProp) | undefined) => string;
|
|
11
|
+
type ContainerProps = React.ComponentProps<"div"> & VariantProps<typeof containerVariants> & {
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
};
|
|
14
|
+
declare function Container({
|
|
15
|
+
as,
|
|
16
|
+
className,
|
|
17
|
+
size,
|
|
18
|
+
variant,
|
|
19
|
+
...props
|
|
20
|
+
}: ContainerProps): react_jsx_runtime335.JSX.Element;
|
|
10
21
|
//#endregion
|
|
11
|
-
//#region src/layouts/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
brand: AppHeaderBrand;
|
|
23
|
-
isDarkMode: boolean;
|
|
24
|
-
onToggleTheme: () => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Unified product header (logo + org/project switchers + theme toggle + credit
|
|
28
|
-
* badge + avatar menu). Replaces the previously triplicated per-product headers;
|
|
29
|
-
* `BodhiHeader`, `SlingshotHeader`, and `SustainHeader` are thin wrappers around
|
|
30
|
-
* this component.
|
|
31
|
-
*/
|
|
32
|
-
declare function AppHeader({
|
|
33
|
-
brand,
|
|
34
|
-
isDarkMode,
|
|
35
|
-
onToggleTheme
|
|
36
|
-
}: AppHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
37
|
-
//# sourceMappingURL=AppHeader.d.ts.map
|
|
22
|
+
//#region src/layouts/PageBackground/PageBackground.d.ts
|
|
23
|
+
type PageBackgroundProps = React.ComponentProps<"div"> & {
|
|
24
|
+
/** Fixed to the viewport (default) vs absolute-fill of a positioned parent. */
|
|
25
|
+
fixed?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare function PageBackground({
|
|
28
|
+
fixed,
|
|
29
|
+
className,
|
|
30
|
+
style,
|
|
31
|
+
...props
|
|
32
|
+
}: PageBackgroundProps): react_jsx_runtime335.JSX.Element;
|
|
38
33
|
//#endregion
|
|
39
|
-
//#region src/layouts/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
34
|
+
//#region src/layouts/Stack/Stack.d.ts
|
|
35
|
+
declare const stackVariants: (props?: ({
|
|
36
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
37
|
+
gap?: "sm" | "md" | "lg" | "none" | "xs" | "xl" | "2xl" | null | undefined;
|
|
38
|
+
align?: "end" | "center" | "start" | "stretch" | null | undefined;
|
|
39
|
+
justify?: "end" | "center" | "start" | "between" | null | undefined;
|
|
40
|
+
} & class_variance_authority_types27.ClassProp) | undefined) => string;
|
|
41
|
+
type StackProps = React.ComponentProps<"div"> & VariantProps<typeof stackVariants> & {
|
|
42
|
+
as?: React.ElementType;
|
|
43
|
+
};
|
|
44
|
+
declare function Stack({
|
|
45
|
+
as,
|
|
46
|
+
className,
|
|
47
|
+
direction,
|
|
48
|
+
gap,
|
|
49
|
+
align,
|
|
50
|
+
justify,
|
|
51
|
+
...props
|
|
52
|
+
}: StackProps): react_jsx_runtime335.JSX.Element;
|
|
49
53
|
//#endregion
|
|
50
|
-
//#region src/layouts/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
declare function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
//#region src/layouts/TwoColumn/TwoColumn.d.ts
|
|
55
|
+
declare const twoColumnVariants: (props?: ({
|
|
56
|
+
gap?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
57
|
+
reverse?: boolean | null | undefined;
|
|
58
|
+
} & class_variance_authority_types27.ClassProp) | undefined) => string;
|
|
59
|
+
type TwoColumnProps = React.ComponentProps<"div"> & VariantProps<typeof twoColumnVariants>;
|
|
60
|
+
declare function TwoColumn({
|
|
61
|
+
className,
|
|
62
|
+
gap,
|
|
63
|
+
reverse,
|
|
64
|
+
...props
|
|
65
|
+
}: TwoColumnProps): react_jsx_runtime335.JSX.Element;
|
|
66
|
+
declare function TwoColumnAside({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<"aside">): react_jsx_runtime335.JSX.Element;
|
|
70
|
+
declare function TwoColumnMain({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: React.ComponentProps<"div">): react_jsx_runtime335.JSX.Element;
|
|
61
74
|
//#endregion
|
|
62
|
-
|
|
63
|
-
interface LeftNavigationProps {
|
|
64
|
-
activePage: string;
|
|
65
|
-
onNavigate: (page: string) => void;
|
|
66
|
-
}
|
|
67
|
-
declare function LeftNavigation({
|
|
68
|
-
activePage,
|
|
69
|
-
onNavigate
|
|
70
|
-
}: LeftNavigationProps): react_jsx_runtime0.JSX.Element;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/layouts/Logo/Logo.d.ts
|
|
73
|
-
declare function Logo({
|
|
74
|
-
isDarkMode
|
|
75
|
-
}: {
|
|
76
|
-
isDarkMode: boolean;
|
|
77
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
78
|
-
//# sourceMappingURL=Logo.d.ts.map
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/layouts/MobileGate/MobileGate.d.ts
|
|
81
|
-
declare function MobileGate(): react_jsx_runtime0.JSX.Element;
|
|
82
|
-
//# sourceMappingURL=MobileGate.d.ts.map
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/layouts/PsaiHeader/PsaiHeader.d.ts
|
|
85
|
-
interface PSAIHeaderProps {
|
|
86
|
-
isDarkMode: boolean;
|
|
87
|
-
onToggleTheme: () => void;
|
|
88
|
-
onAdminLogin?: () => void;
|
|
89
|
-
adminLoginLabel?: string;
|
|
90
|
-
onBack?: () => void;
|
|
91
|
-
showBackButton?: boolean;
|
|
92
|
-
}
|
|
93
|
-
declare function PSAIHeader({
|
|
94
|
-
isDarkMode,
|
|
95
|
-
onToggleTheme,
|
|
96
|
-
onAdminLogin,
|
|
97
|
-
adminLoginLabel,
|
|
98
|
-
onBack,
|
|
99
|
-
showBackButton
|
|
100
|
-
}: PSAIHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/layouts/RightSidebar/RightSidebar.d.ts
|
|
103
|
-
declare function RightSidebar({
|
|
104
|
-
domain
|
|
105
|
-
}: {
|
|
106
|
-
domain?: "slingshot" | "bodhi" | "sustain";
|
|
107
|
-
}): react_jsx_runtime0.JSX.Element;
|
|
108
|
-
//# sourceMappingURL=RightSidebar.d.ts.map
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/layouts/SlingshotHeader/SlingshotHeader.d.ts
|
|
111
|
-
interface SlingshotHeaderProps {
|
|
112
|
-
isDarkMode: boolean;
|
|
113
|
-
onToggleTheme: () => void;
|
|
114
|
-
}
|
|
115
|
-
/** Slingshot-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="slingshot" />`. */
|
|
116
|
-
declare function SlingshotHeader({
|
|
117
|
-
isDarkMode,
|
|
118
|
-
onToggleTheme
|
|
119
|
-
}: SlingshotHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region src/layouts/SustainHeader/SustainHeader.d.ts
|
|
122
|
-
interface SustainHeaderProps {
|
|
123
|
-
isDarkMode: boolean;
|
|
124
|
-
onToggleTheme: () => void;
|
|
125
|
-
}
|
|
126
|
-
/** Sustain-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="sustain" />`. */
|
|
127
|
-
declare function SustainHeader({
|
|
128
|
-
isDarkMode,
|
|
129
|
-
onToggleTheme
|
|
130
|
-
}: SustainHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
131
|
-
//#endregion
|
|
132
|
-
export { AnimatedBackground, AppHeader, AppHeaderBrand, AppHeaderProps, BodhiHeader, Header, LeftNavigation, Logo, MobileGate, PSAIHeader, RightSidebar, SlingshotHeader, SustainHeader };
|
|
75
|
+
export { Container, type ContainerProps, PageBackground, type PageBackgroundProps, Stack, type StackProps, TwoColumn, TwoColumnAside, TwoColumnMain, type TwoColumnProps, containerVariants, stackVariants, twoColumnVariants };
|
|
133
76
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/layouts/
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/layouts/Container/Container.tsx","../../src/layouts/PageBackground/PageBackground.tsx","../../src/layouts/Stack/Stack.tsx","../../src/layouts/TwoColumn/TwoColumn.tsx"],"mappings":";;;;;;cAOM;;;IAmBJ,gCAAA,CAAA;AAzBkC,KA2B/B,cAAA,GAAiB,KAAA,CAAM,cAF1B,CAAA,KAAA,CAAA,GAGA,YAHA,CAAA,OAGoB,iBAHpB,CAAA,GAAA;EAEG,EAAA,CAAA,EAEI,KAAA,CAAM,WAFI;CAAA;iBAKV,SAAA,CALmB;EAAA,EAAA;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAKmC,cALnC,CAAA,EAKiD,oBAAA,CAAA,GAAA,CAAA,OALjD;;;KCXvB,mBAAA,GAAsB,KAAA,CAAM;;;;iBAKxB,cAAA;;;;;GAA6D,sBAAmB,oBAAA,CAAA,GAAA,CAAA;;;cCfnF,qBFqBa;;;;EArBb,OAAA,CAAA,EAAA,KAAA,GAAA,QAmBJ,GAAA,OAAA,GAAA,SAAA,GAAA,IAAA,GAAA,SAAA;IEcA,gCAAA,CAAA,SFZiB,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;KEcd,UAAA,GAAa,KAAA,CAAM,cFdL,CAAA,KAAA,CAAA,GEejB,YFfiB,CAAA,OEeG,aFfH,CAAA,GAAA;KAAG,EEgBb,KAAA,CAAM,WFhBa;;iBEmBnB,KAAA,CFlBP;EAAA,EAAA;EAAA,SAAA;EAAA,SAAA;EAAA,GAAA;EAAA,KAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EEkB0E,UFlB1E,CAAA,EEkBoF,oBAAA,CAAA,GAAA,CAAA,OFlBpF;;;cGpBI;;;IAgBJ,gCAAA,CAAA;AHxBkC,KG0B/B,cAAA,GAAiB,KAAA,CAAM,cHD1B,CAAA,KAAA,CAAA,GGCkD,YHDlD,CAAA,OGCsE,iBHDtE,CAAA;iBGGO,SAAA,CHDU;EAAA,SAAA;EAAA,GAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EGCuC,cHDvC,CAAA,EGCqD,oBAAA,CAAA,GAAA,CAAA,OHDrD;iBGWV,cAAA,CHXU;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EGW8B,KAAA,CAAM,cHXpC,CAAA,OAAA,CAAA,CAAA,EGW2D,oBAAA,CAAA,GAAA,CAAA,OHX3D;iBGqBV,aAAA,CHrBmB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EGqBoB,KAAA,CAAM,cHrB1B,CAAA,KAAA,CAAA,CAAA,EGqB+C,oBAAA,CAAA,GAAA,CAAA,OHrB/C"}
|
package/dist/layouts/index.d.ts
CHANGED
|
@@ -1,133 +1,76 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as class_variance_authority_types1 from "class-variance-authority/types";
|
|
2
5
|
|
|
3
|
-
//#region src/layouts/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
//#region src/layouts/Container/Container.d.ts
|
|
7
|
+
declare const containerVariants: (props?: ({
|
|
8
|
+
size?: "narrow" | "content" | "wide" | "full" | null | undefined;
|
|
9
|
+
variant?: "default" | "glass" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
11
|
+
type ContainerProps = React.ComponentProps<"div"> & VariantProps<typeof containerVariants> & {
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
};
|
|
14
|
+
declare function Container({
|
|
15
|
+
as,
|
|
16
|
+
className,
|
|
17
|
+
size,
|
|
18
|
+
variant,
|
|
19
|
+
...props
|
|
20
|
+
}: ContainerProps): react_jsx_runtime20.JSX.Element;
|
|
10
21
|
//#endregion
|
|
11
|
-
//#region src/layouts/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
brand: AppHeaderBrand;
|
|
23
|
-
isDarkMode: boolean;
|
|
24
|
-
onToggleTheme: () => void;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Unified product header (logo + org/project switchers + theme toggle + credit
|
|
28
|
-
* badge + avatar menu). Replaces the previously triplicated per-product headers;
|
|
29
|
-
* `BodhiHeader`, `SlingshotHeader`, and `SustainHeader` are thin wrappers around
|
|
30
|
-
* this component.
|
|
31
|
-
*/
|
|
32
|
-
declare function AppHeader({
|
|
33
|
-
brand,
|
|
34
|
-
isDarkMode,
|
|
35
|
-
onToggleTheme
|
|
36
|
-
}: AppHeaderProps): react_jsx_runtime19.JSX.Element;
|
|
37
|
-
//# sourceMappingURL=AppHeader.d.ts.map
|
|
22
|
+
//#region src/layouts/PageBackground/PageBackground.d.ts
|
|
23
|
+
type PageBackgroundProps = React.ComponentProps<"div"> & {
|
|
24
|
+
/** Fixed to the viewport (default) vs absolute-fill of a positioned parent. */
|
|
25
|
+
fixed?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare function PageBackground({
|
|
28
|
+
fixed,
|
|
29
|
+
className,
|
|
30
|
+
style,
|
|
31
|
+
...props
|
|
32
|
+
}: PageBackgroundProps): react_jsx_runtime20.JSX.Element;
|
|
38
33
|
//#endregion
|
|
39
|
-
//#region src/layouts/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
34
|
+
//#region src/layouts/Stack/Stack.d.ts
|
|
35
|
+
declare const stackVariants: (props?: ({
|
|
36
|
+
direction?: "vertical" | "horizontal" | null | undefined;
|
|
37
|
+
gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | "2xl" | null | undefined;
|
|
38
|
+
align?: "start" | "center" | "end" | "stretch" | null | undefined;
|
|
39
|
+
justify?: "start" | "center" | "end" | "between" | null | undefined;
|
|
40
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
41
|
+
type StackProps = React.ComponentProps<"div"> & VariantProps<typeof stackVariants> & {
|
|
42
|
+
as?: React.ElementType;
|
|
43
|
+
};
|
|
44
|
+
declare function Stack({
|
|
45
|
+
as,
|
|
46
|
+
className,
|
|
47
|
+
direction,
|
|
48
|
+
gap,
|
|
49
|
+
align,
|
|
50
|
+
justify,
|
|
51
|
+
...props
|
|
52
|
+
}: StackProps): react_jsx_runtime20.JSX.Element;
|
|
49
53
|
//#endregion
|
|
50
|
-
//#region src/layouts/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
declare function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
//#region src/layouts/TwoColumn/TwoColumn.d.ts
|
|
55
|
+
declare const twoColumnVariants: (props?: ({
|
|
56
|
+
gap?: "sm" | "md" | "lg" | "none" | "xl" | null | undefined;
|
|
57
|
+
reverse?: boolean | null | undefined;
|
|
58
|
+
} & class_variance_authority_types1.ClassProp) | undefined) => string;
|
|
59
|
+
type TwoColumnProps = React.ComponentProps<"div"> & VariantProps<typeof twoColumnVariants>;
|
|
60
|
+
declare function TwoColumn({
|
|
61
|
+
className,
|
|
62
|
+
gap,
|
|
63
|
+
reverse,
|
|
64
|
+
...props
|
|
65
|
+
}: TwoColumnProps): react_jsx_runtime20.JSX.Element;
|
|
66
|
+
declare function TwoColumnAside({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<"aside">): react_jsx_runtime20.JSX.Element;
|
|
70
|
+
declare function TwoColumnMain({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: React.ComponentProps<"div">): react_jsx_runtime20.JSX.Element;
|
|
61
74
|
//#endregion
|
|
62
|
-
|
|
63
|
-
interface LeftNavigationProps {
|
|
64
|
-
activePage: string;
|
|
65
|
-
onNavigate: (page: string) => void;
|
|
66
|
-
}
|
|
67
|
-
declare function LeftNavigation({
|
|
68
|
-
activePage,
|
|
69
|
-
onNavigate
|
|
70
|
-
}: LeftNavigationProps): react_jsx_runtime19.JSX.Element;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/layouts/Logo/Logo.d.ts
|
|
73
|
-
declare function Logo({
|
|
74
|
-
isDarkMode
|
|
75
|
-
}: {
|
|
76
|
-
isDarkMode: boolean;
|
|
77
|
-
}): react_jsx_runtime19.JSX.Element;
|
|
78
|
-
//# sourceMappingURL=Logo.d.ts.map
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/layouts/MobileGate/MobileGate.d.ts
|
|
81
|
-
declare function MobileGate(): react_jsx_runtime19.JSX.Element;
|
|
82
|
-
//# sourceMappingURL=MobileGate.d.ts.map
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/layouts/PsaiHeader/PsaiHeader.d.ts
|
|
85
|
-
interface PSAIHeaderProps {
|
|
86
|
-
isDarkMode: boolean;
|
|
87
|
-
onToggleTheme: () => void;
|
|
88
|
-
onAdminLogin?: () => void;
|
|
89
|
-
adminLoginLabel?: string;
|
|
90
|
-
onBack?: () => void;
|
|
91
|
-
showBackButton?: boolean;
|
|
92
|
-
}
|
|
93
|
-
declare function PSAIHeader({
|
|
94
|
-
isDarkMode,
|
|
95
|
-
onToggleTheme,
|
|
96
|
-
onAdminLogin,
|
|
97
|
-
adminLoginLabel,
|
|
98
|
-
onBack,
|
|
99
|
-
showBackButton
|
|
100
|
-
}: PSAIHeaderProps): react_jsx_runtime19.JSX.Element;
|
|
101
|
-
//#endregion
|
|
102
|
-
//#region src/layouts/RightSidebar/RightSidebar.d.ts
|
|
103
|
-
declare function RightSidebar({
|
|
104
|
-
domain
|
|
105
|
-
}: {
|
|
106
|
-
domain?: "slingshot" | "bodhi" | "sustain";
|
|
107
|
-
}): react_jsx_runtime19.JSX.Element;
|
|
108
|
-
//# sourceMappingURL=RightSidebar.d.ts.map
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/layouts/SlingshotHeader/SlingshotHeader.d.ts
|
|
111
|
-
interface SlingshotHeaderProps {
|
|
112
|
-
isDarkMode: boolean;
|
|
113
|
-
onToggleTheme: () => void;
|
|
114
|
-
}
|
|
115
|
-
/** Slingshot-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="slingshot" />`. */
|
|
116
|
-
declare function SlingshotHeader({
|
|
117
|
-
isDarkMode,
|
|
118
|
-
onToggleTheme
|
|
119
|
-
}: SlingshotHeaderProps): react_jsx_runtime19.JSX.Element;
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region src/layouts/SustainHeader/SustainHeader.d.ts
|
|
122
|
-
interface SustainHeaderProps {
|
|
123
|
-
isDarkMode: boolean;
|
|
124
|
-
onToggleTheme: () => void;
|
|
125
|
-
}
|
|
126
|
-
/** Sustain-branded {@link AppHeader}. Kept for backwards compatibility; prefer `<AppHeader brand="sustain" />`. */
|
|
127
|
-
declare function SustainHeader({
|
|
128
|
-
isDarkMode,
|
|
129
|
-
onToggleTheme
|
|
130
|
-
}: SustainHeaderProps): react_jsx_runtime19.JSX.Element;
|
|
131
|
-
//#endregion
|
|
132
|
-
export { AnimatedBackground, AppHeader, AppHeaderBrand, AppHeaderProps, BodhiHeader, Header, LeftNavigation, Logo, MobileGate, PSAIHeader, RightSidebar, SlingshotHeader, SustainHeader };
|
|
75
|
+
export { Container, type ContainerProps, PageBackground, type PageBackgroundProps, Stack, type StackProps, TwoColumn, TwoColumnAside, TwoColumnMain, type TwoColumnProps, containerVariants, stackVariants, twoColumnVariants };
|
|
133
76
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/layouts/
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/layouts/Container/Container.tsx","../../src/layouts/PageBackground/PageBackground.tsx","../../src/layouts/Stack/Stack.tsx","../../src/layouts/TwoColumn/TwoColumn.tsx"],"mappings":";;;;;;cAOM;;;IAmBJ,+BAAA,CAAA;AAzBkC,KA2B/B,cAAA,GAAiB,KAAA,CAAM,cAF1B,CAAA,KAAA,CAAA,GAGA,YAHA,CAAA,OAGoB,iBAHpB,CAAA,GAAA;EAEG,EAAA,CAAA,EAEI,KAAA,CAAM,WAFI;CAAA;iBAKV,SAAA,CALmB;EAAA,EAAA;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAKmC,cALnC,CAAA,EAKiD,mBAAA,CAAA,GAAA,CAAA,OALjD;;;KCXvB,mBAAA,GAAsB,KAAA,CAAM;;;;iBAKxB,cAAA;;;;;GAA6D,sBAAmB,mBAAA,CAAA,GAAA,CAAA;;;cCfnF,qBFqBa;;;;EArBb,OAAA,CAAA,EAAA,OAAA,GAmBJ,QAAA,GAAA,KAAA,GAAA,SAAA,GAAA,IAAA,GAAA,SAAA;IEcA,+BAAA,CAAA,SFZiB,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;KEcd,UAAA,GAAa,KAAA,CAAM,cFdL,CAAA,KAAA,CAAA,GEejB,YFfiB,CAAA,OEeG,aFfH,CAAA,GAAA;KAAG,EEgBb,KAAA,CAAM,WFhBa;;iBEmBnB,KAAA,CFlBP;EAAA,EAAA;EAAA,SAAA;EAAA,SAAA;EAAA,GAAA;EAAA,KAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EEkB0E,UFlB1E,CAAA,EEkBoF,mBAAA,CAAA,GAAA,CAAA,OFlBpF;;;cGpBI;;;IAgBJ,+BAAA,CAAA;AHxBkC,KG0B/B,cAAA,GAAiB,KAAA,CAAM,cHD1B,CAAA,KAAA,CAAA,GGCkD,YHDlD,CAAA,OGCsE,iBHDtE,CAAA;iBGGO,SAAA,CHDU;EAAA,SAAA;EAAA,GAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EGCuC,cHDvC,CAAA,EGCqD,mBAAA,CAAA,GAAA,CAAA,OHDrD;iBGWV,cAAA,CHXU;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EGW8B,KAAA,CAAM,cHXpC,CAAA,OAAA,CAAA,CAAA,EGW2D,mBAAA,CAAA,GAAA,CAAA,OHX3D;iBGqBV,aAAA,CHrBmB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EGqBoB,KAAA,CAAM,cHrB1B,CAAA,KAAA,CAAA,CAAA,EGqB+C,mBAAA,CAAA,GAAA,CAAA,OHrB/C"}
|
package/dist/layouts/index.js
CHANGED
|
@@ -1,2 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { n as cn } from "../utils.js";
|
|
2
|
+
import { n as stackVariants, t as Stack } from "../Stack.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/layouts/Container/Container.tsx
|
|
6
|
+
const containerVariants = cva("mx-auto w-full", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
narrow: "max-w-[900px]",
|
|
10
|
+
content: "max-w-[1200px]",
|
|
11
|
+
wide: "max-w-[1440px]",
|
|
12
|
+
full: "max-w-none"
|
|
13
|
+
},
|
|
14
|
+
variant: {
|
|
15
|
+
default: "px-4",
|
|
16
|
+
glass: "rounded-2xl bg-[var(--glass-light)] px-4 py-4 backdrop-blur-[var(--glass-blur)] sm:px-6"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: "content",
|
|
21
|
+
variant: "default"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
function Container({ as, className, size, variant, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(as ?? "div", {
|
|
26
|
+
"data-slot": "container",
|
|
27
|
+
"data-variant": variant ?? "default",
|
|
28
|
+
className: cn(containerVariants({
|
|
29
|
+
size,
|
|
30
|
+
variant
|
|
31
|
+
}), className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/layouts/PageBackground/PageBackground.tsx
|
|
37
|
+
const PAGE_GRADIENT = "radial-gradient(circle at 90% 10%, var(--page-gradient-edge) 0%, var(--page-gradient-mid) 25%, var(--page-gradient-edge) 60%)";
|
|
38
|
+
function PageBackground({ fixed = true, className, style, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
"data-slot": "page-background",
|
|
41
|
+
"aria-hidden": true,
|
|
42
|
+
className: cn("pointer-events-none inset-0 bg-slate-200 dark:bg-slate-950", fixed ? "fixed -z-10" : "absolute", className),
|
|
43
|
+
style: {
|
|
44
|
+
backgroundImage: PAGE_GRADIENT,
|
|
45
|
+
...style
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/layouts/TwoColumn/TwoColumn.tsx
|
|
52
|
+
const twoColumnVariants = cva("flex flex-col lg:flex-row", {
|
|
53
|
+
variants: {
|
|
54
|
+
gap: {
|
|
55
|
+
none: "gap-0",
|
|
56
|
+
sm: "gap-3",
|
|
57
|
+
md: "gap-4",
|
|
58
|
+
lg: "gap-6",
|
|
59
|
+
xl: "gap-8"
|
|
60
|
+
},
|
|
61
|
+
reverse: { true: "lg:flex-row-reverse" }
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: { gap: "lg" }
|
|
64
|
+
});
|
|
65
|
+
function TwoColumn({ className, gap, reverse, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
"data-slot": "two-column",
|
|
68
|
+
className: cn(twoColumnVariants({
|
|
69
|
+
gap,
|
|
70
|
+
reverse
|
|
71
|
+
}), className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function TwoColumnAside({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
77
|
+
"data-slot": "two-column-aside",
|
|
78
|
+
className: cn("w-full shrink-0 lg:w-64", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function TwoColumnMain({ className, ...props }) {
|
|
83
|
+
return /* @__PURE__ */ jsx("div", {
|
|
84
|
+
"data-slot": "two-column-main",
|
|
85
|
+
className: cn("min-w-0 flex-1", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { Container, PageBackground, Stack, TwoColumn, TwoColumnAside, TwoColumnMain, containerVariants, stackVariants, twoColumnVariants };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/layouts/Container/Container.tsx","../../src/layouts/PageBackground/PageBackground.tsx","../../src/layouts/TwoColumn/TwoColumn.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Container — centered, max-width page column with consistent gutters.\n// `narrow` ~ a reading/hero column; `wide` ~ a full content area.\nconst containerVariants = cva(\"mx-auto w-full\", {\n variants: {\n size: {\n narrow: \"max-w-[900px]\",\n content: \"max-w-[1200px]\",\n wide: \"max-w-[1440px]\",\n full: \"max-w-none\",\n },\n // `glass` makes the centered column a translucent, blurred panel.\n variant: {\n default: \"px-4\",\n glass:\n \"rounded-2xl bg-[var(--glass-light)] px-4 py-4 backdrop-blur-[var(--glass-blur)] sm:px-6\",\n },\n },\n defaultVariants: {\n size: \"content\",\n variant: \"default\",\n },\n});\n\ntype ContainerProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof containerVariants> & {\n as?: React.ElementType;\n };\n\nfunction Container({ as, className, size, variant, ...props }: ContainerProps) {\n const Comp = as ?? \"div\";\n return (\n <Comp\n data-slot=\"container\"\n data-variant={variant ?? \"default\"}\n className={cn(containerVariants({ size, variant }), className)}\n {...props}\n />\n );\n}\n\nexport { Container, containerVariants, type ContainerProps };\n","import type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// PageBackground — ambient gradient backdrop that sits behind the app and makes\n// glass surfaces read. Composes a radial gradient from the theme-aware\n// `--page-gradient-mid` / `--page-gradient-edge` tokens (the middle stop is the\n// active brand tint; see styles/semantic.css), so it changes with\n// `.theme-slingshot` / `.theme-bodhi` / `.theme-sustain` and light/dark.\n// The gradient is built here (a real property) rather than as a composite token\n// so the vars resolve in this element's theme scope. Decorative (aria-hidden).\n//\n// By default it's `fixed` behind the page (the app body must be transparent);\n// set `fixed={false}` to fill a positioned parent instead.\nconst PAGE_GRADIENT =\n \"radial-gradient(circle at 90% 10%, var(--page-gradient-edge) 0%, var(--page-gradient-mid) 25%, var(--page-gradient-edge) 60%)\";\n\ntype PageBackgroundProps = React.ComponentProps<\"div\"> & {\n /** Fixed to the viewport (default) vs absolute-fill of a positioned parent. */\n fixed?: boolean;\n};\n\nfunction PageBackground({ fixed = true, className, style, ...props }: PageBackgroundProps) {\n return (\n <div\n data-slot=\"page-background\"\n aria-hidden\n // Neutral fallback color under the gradient so it's never fully empty.\n className={cn(\n \"pointer-events-none inset-0 bg-slate-200 dark:bg-slate-950\",\n fixed ? \"fixed -z-10\" : \"absolute\",\n className,\n )}\n style={{ backgroundImage: PAGE_GRADIENT, ...style }}\n {...props}\n />\n );\n}\n\nexport { PageBackground, type PageBackgroundProps };\n","import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// TwoColumn — composable two-column layout (aside + main). Stacks vertically\n// below `lg`. Compose: <TwoColumn><TwoColumnAside/><TwoColumnMain/></TwoColumn>.\n// The aside width is set on TwoColumnAside (default lg:w-64; override via className,\n// e.g. a 56px nav rail with `lg:w-14`).\nconst twoColumnVariants = cva(\"flex flex-col lg:flex-row\", {\n variants: {\n gap: {\n none: \"gap-0\",\n sm: \"gap-3\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n },\n reverse: {\n true: \"lg:flex-row-reverse\",\n },\n },\n defaultVariants: {\n gap: \"lg\",\n },\n});\n\ntype TwoColumnProps = React.ComponentProps<\"div\"> & VariantProps<typeof twoColumnVariants>;\n\nfunction TwoColumn({ className, gap, reverse, ...props }: TwoColumnProps) {\n return (\n <div\n data-slot=\"two-column\"\n className={cn(twoColumnVariants({ gap, reverse }), className)}\n {...props}\n />\n );\n}\n\nfunction TwoColumnAside({ className, ...props }: React.ComponentProps<\"aside\">) {\n return (\n <aside\n data-slot=\"two-column-aside\"\n className={cn(\"w-full shrink-0 lg:w-64\", className)}\n {...props}\n />\n );\n}\n\nfunction TwoColumnMain({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"two-column-main\" className={cn(\"min-w-0 flex-1\", className)} {...props} />;\n}\n\nexport { TwoColumn, TwoColumnAside, TwoColumnMain, twoColumnVariants, type TwoColumnProps };\n"],"mappings":";;;;;AAOA,MAAM,oBAAoB,IAAI,kBAAkB;CAC9C,UAAU;EACR,MAAM;GACJ,QAAQ;GACR,SAAS;GACT,MAAM;GACN,MAAM;EACR;EAEA,SAAS;GACP,SAAS;GACT,OACE;EACJ;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC;AAOD,SAAS,UAAU,EAAE,IAAI,WAAW,MAAM,SAAS,GAAG,SAAyB;CAE7E,OACE,oBAFW,MAAM,OAEjB;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,WAAW,GAAG,kBAAkB;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;;AC7BA,MAAM,gBACJ;AAOF,SAAS,eAAe,EAAE,QAAQ,MAAM,WAAW,OAAO,GAAG,SAA8B;CACzF,OACE,oBAAC,OAAD;EACE,aAAU;EACV,eAAA;EAEA,WAAW,GACT,8DACA,QAAQ,gBAAgB,YACxB,SACF;EACA,OAAO;GAAE,iBAAiB;GAAe,GAAG;EAAM;EAClD,GAAI;CACL,CAAA;AAEL;;;AC5BA,MAAM,oBAAoB,IAAI,6BAA6B;CACzD,UAAU;EACR,KAAK;GACH,MAAM;GACN,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS,EACP,MAAM,sBACR;CACF;CACA,iBAAiB,EACf,KAAK,KACP;AACF,CAAC;AAID,SAAS,UAAU,EAAE,WAAW,KAAK,SAAS,GAAG,SAAyB;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kBAAkB;GAAE;GAAK;EAAQ,CAAC,GAAG,SAAS;EAC5D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAwC;CAC9E,OACE,oBAAC,SAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OAAO,oBAAC,OAAD;EAAK,aAAU;EAAkB,WAAW,GAAG,kBAAkB,SAAS;EAAG,GAAI;CAAQ,CAAA;AAClG"}
|