@lobehub/ui 6.0.0-beta.5 → 6.0.0-beta.6
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/es/Accordion/style.d.mts +1 -1
- package/es/ActionIcon/style.mjs +1 -1
- package/es/ActionIcon/style.mjs.map +1 -1
- package/es/ColorSwatches/ColorSwatches.mjs +17 -22
- package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
- package/es/ColorSwatches/CustomPicker.mjs +101 -0
- package/es/ColorSwatches/CustomPicker.mjs.map +1 -0
- package/es/ColorSwatches/index.d.mts +2 -2
- package/es/ColorSwatches/marker.stylex.mjs +9 -0
- package/es/ColorSwatches/marker.stylex.mjs.map +1 -0
- package/es/ColorSwatches/style.mjs +36 -0
- package/es/ColorSwatches/style.mjs.map +1 -1
- package/es/ColorSwatches/type.d.mts +9 -0
- package/es/Grid/style.mjs +1 -1
- package/es/Grid/style.mjs.map +1 -1
- package/es/Image/type.d.mts +1 -0
- package/es/Image/viewer/ImageViewer.mjs +1 -0
- package/es/Image/viewer/ImageViewer.mjs.map +1 -1
- package/es/Image/viewer/Toolbar.mjs +19 -6
- package/es/Image/viewer/Toolbar.mjs.map +1 -1
- package/es/Image/viewer/ViewerChrome.mjs.map +1 -1
- package/es/Input/style.mjs +3 -3
- package/es/Input/style.mjs.map +1 -1
- package/es/Text/style.d.mts +3 -3
- package/es/awesome/Grainient/Grainient.d.mts +11 -0
- package/es/awesome/Grainient/Grainient.mjs +314 -0
- package/es/awesome/Grainient/Grainient.mjs.map +1 -0
- package/es/awesome/Grainient/index.d.mts +3 -0
- package/es/awesome/Grainient/style.mjs +23 -0
- package/es/awesome/Grainient/style.mjs.map +1 -0
- package/es/awesome/Grainient/type.d.mts +121 -0
- package/es/awesome/index.d.mts +4 -1
- package/es/awesome/index.mjs +2 -1
- package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
- package/es/dashboard/AuthLayout/Aside.mjs +31 -0
- package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
- package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
- package/es/dashboard/AuthLayout/AuthLayout.mjs +93 -37
- package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
- package/es/dashboard/AuthLayout/index.d.mts +3 -2
- package/es/dashboard/AuthLayout/style.mjs +98 -1
- package/es/dashboard/AuthLayout/style.mjs.map +1 -1
- package/es/dashboard/AuthLayout/type.d.mts +38 -2
- package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +33 -0
- package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
- package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
- package/es/dashboard/AuthTools/index.d.mts +4 -0
- package/es/dashboard/AuthTools/style.mjs +27 -0
- package/es/dashboard/AuthTools/style.mjs.map +1 -0
- package/es/dashboard/AuthTools/type.d.mts +29 -0
- package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs +19 -0
- package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
- package/es/dashboard/ChartGrid/index.d.mts +3 -0
- package/es/dashboard/ChartGrid/style.mjs +18 -0
- package/es/dashboard/ChartGrid/style.mjs.map +1 -0
- package/es/dashboard/ChartGrid/type.d.mts +8 -0
- package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs +82 -0
- package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
- package/es/dashboard/ConsoleNav/index.d.mts +3 -2
- package/es/dashboard/ConsoleNav/style.mjs +18 -0
- package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
- package/es/dashboard/ConsoleNav/type.d.mts +13 -0
- package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs +26 -6
- package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/style.mjs +10 -0
- package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
- package/es/dashboard/ConsoleShell/type.d.mts +11 -0
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
- package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
- package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
- package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
- package/es/dashboard/FilterStrip/index.d.mts +3 -0
- package/es/dashboard/FilterStrip/style.mjs +78 -0
- package/es/dashboard/FilterStrip/style.mjs.map +1 -0
- package/es/dashboard/FilterStrip/type.d.mts +25 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
- package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
- package/es/dashboard/LabelWithKey/index.d.mts +3 -0
- package/es/dashboard/LabelWithKey/type.d.mts +11 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs +81 -0
- package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
- package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
- package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
- package/es/dashboard/MetricStrip/index.d.mts +3 -0
- package/es/dashboard/MetricStrip/style.mjs +156 -0
- package/es/dashboard/MetricStrip/style.mjs.map +1 -0
- package/es/dashboard/MetricStrip/type.d.mts +36 -0
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
- package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
- package/es/dashboard/PageSkeleton/style.mjs +1 -1
- package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
- package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs +22 -0
- package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
- package/es/dashboard/PageToolbar/index.d.mts +3 -0
- package/es/dashboard/PageToolbar/style.mjs +36 -0
- package/es/dashboard/PageToolbar/style.mjs.map +1 -0
- package/es/dashboard/PageToolbar/type.d.mts +11 -0
- package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs +40 -0
- package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
- package/es/dashboard/PanelSurface/index.d.mts +3 -0
- package/es/dashboard/PanelSurface/style.mjs +25 -0
- package/es/dashboard/PanelSurface/style.mjs.map +1 -0
- package/es/dashboard/PanelSurface/type.d.mts +17 -0
- package/es/dashboard/Section/Section.d.mts +10 -0
- package/es/dashboard/Section/Section.mjs +81 -0
- package/es/dashboard/Section/Section.mjs.map +1 -0
- package/es/dashboard/Section/index.d.mts +3 -0
- package/es/dashboard/Section/style.mjs +31 -0
- package/es/dashboard/Section/style.mjs.map +1 -0
- package/es/dashboard/Section/type.d.mts +23 -0
- package/es/dashboard/StatCard/StatCard.d.mts +2 -1
- package/es/dashboard/StatCard/StatCard.mjs +28 -91
- package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
- package/es/dashboard/StatCard/type.d.mts +16 -5
- package/es/dashboard/Surface/Surface.d.mts +4 -3
- package/es/dashboard/Surface/Surface.mjs +91 -8
- package/es/dashboard/Surface/Surface.mjs.map +1 -1
- package/es/dashboard/Surface/index.d.mts +3 -2
- package/es/dashboard/Surface/link.d.mts +16 -0
- package/es/dashboard/Surface/link.mjs +40 -0
- package/es/dashboard/Surface/link.mjs.map +1 -0
- package/es/dashboard/Surface/marker.stylex.mjs +9 -0
- package/es/dashboard/Surface/marker.stylex.mjs.map +1 -0
- package/es/dashboard/Surface/style.d.mts +2 -0
- package/es/dashboard/Surface/style.mjs +155 -14
- package/es/dashboard/Surface/style.mjs.map +1 -1
- package/es/dashboard/Surface/type.d.mts +29 -1
- package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
- package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
- package/es/dashboard/TableIconActions/index.d.mts +3 -0
- package/es/dashboard/TableIconActions/type.d.mts +17 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
- package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
- package/es/dashboard/TitleWithTips/index.d.mts +3 -0
- package/es/dashboard/TitleWithTips/type.d.mts +10 -0
- package/es/dashboard/index.d.mts +38 -4
- package/es/dashboard/index.mjs +17 -3
- package/es/style.css +339 -32
- package/package.json +1 -1
- package/es/dashboard/StatCard/style.mjs +0 -105
- package/es/dashboard/StatCard/style.mjs.map +0 -1
package/es/awesome/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ import { LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, acce
|
|
|
13
13
|
import FluidGradient from "./FluidGradient/FluidGradient.mjs";
|
|
14
14
|
import Giscus from "./Giscus/Giscus.mjs";
|
|
15
15
|
import GradientButton from "./GradientButton/GradientButton.mjs";
|
|
16
|
+
import Grainient from "./Grainient/Grainient.mjs";
|
|
16
17
|
import GridBackground from "./GridBackground/GridBackground.mjs";
|
|
17
18
|
import GridShowcase from "./GridBackground/GridShowcase.mjs";
|
|
18
19
|
import Hero from "./Hero/Hero.mjs";
|
|
@@ -22,4 +23,4 @@ import LandingSection from "./LandingSection/LandingSection.mjs";
|
|
|
22
23
|
import LogoMarquee from "./LogoMarquee/LogoMarquee.mjs";
|
|
23
24
|
import Spline from "./Spline/Spine.mjs";
|
|
24
25
|
import TypewriterEffect from "./TypewriterEffect/TypewriterEffect.mjs";
|
|
25
|
-
export { AgentSkillCard, AuroraBackground, BentoCard, BentoGrid, BottomGradientButton, CodeShowcase, DEFAULT_SKILL_AGENTS, FeatureGrid, Features, FluidGradient, Giscus, GradientButton, GridBackground, GridShowcase, Hero, InstallBanner, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, LandingHero, LandingSection, LogoMarquee, Spline, Spotlight, SpotlightCard, TypewriterEffect, accentGradient as landingAccentGradient };
|
|
26
|
+
export { AgentSkillCard, AuroraBackground, BentoCard, BentoGrid, BottomGradientButton, CodeShowcase, DEFAULT_SKILL_AGENTS, FeatureGrid, Features, FluidGradient, Giscus, GradientButton, Grainient, GridBackground, GridShowcase, Hero, InstallBanner, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, LandingHero, LandingSection, LogoMarquee, Spline, Spotlight, SpotlightCard, TypewriterEffect, accentGradient as landingAccentGradient };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthLayoutAsideProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/AuthLayout/Aside.d.ts
|
|
3
|
+
/** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */
|
|
4
|
+
declare function AuthLayoutAside({ background, className, kicker, line, style, ...rest }: AuthLayoutAsideProps): import("react").JSX.Element;
|
|
5
|
+
declare namespace AuthLayoutAside {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AuthLayoutAside as default };
|
|
10
|
+
//# sourceMappingURL=Aside.d.mts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { styleProps } from "../../styles/stylex/props.mjs";
|
|
3
|
+
import { styles } from "./style.mjs";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as stylex from "@stylexjs/stylex";
|
|
6
|
+
//#region src/dashboard/AuthLayout/Aside.tsx
|
|
7
|
+
/** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */
|
|
8
|
+
function AuthLayoutAside({ background, className, kicker, line, style, ...rest }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
...rest,
|
|
11
|
+
...styleProps(styles.asidePlate, className, style),
|
|
12
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
...stylex.props(styles.asidePanel),
|
|
14
|
+
children: [background, kicker || line ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { ...stylex.props(styles.asideScrim) }), /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
...stylex.props(styles.asideCopy),
|
|
16
|
+
children: [kicker ? /* @__PURE__ */ jsx("p", {
|
|
17
|
+
...stylex.props(styles.asideKicker),
|
|
18
|
+
children: kicker
|
|
19
|
+
}) : null, line ? /* @__PURE__ */ jsx("p", {
|
|
20
|
+
...stylex.props(styles.asideLine),
|
|
21
|
+
children: line
|
|
22
|
+
}) : null]
|
|
23
|
+
})] }) : null]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
AuthLayoutAside.displayName = "AuthLayoutAside";
|
|
28
|
+
//#endregion
|
|
29
|
+
export { AuthLayoutAside as default };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=Aside.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Aside.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/Aside.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\n\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { styles } from './style';\nimport type { AuthLayoutAsideProps } from './type';\n\n/** Inset art panel for `AuthLayout`'s `aside` slot, with a scrim and copy at the bottom. */\nfunction AuthLayoutAside({\n background,\n className,\n kicker,\n line,\n style,\n ...rest\n}: AuthLayoutAsideProps) {\n return (\n <div {...rest} {...styleProps(styles.asidePlate, className, style)}>\n <div {...stylex.props(styles.asidePanel)}>\n {background}\n {kicker || line ? (\n <>\n <div {...stylex.props(styles.asideScrim)} />\n <div {...stylex.props(styles.asideCopy)}>\n {kicker ? <p {...stylex.props(styles.asideKicker)}>{kicker}</p> : null}\n {line ? <p {...stylex.props(styles.asideLine)}>{line}</p> : null}\n </div>\n </>\n ) : null}\n </div>\n </div>\n );\n}\n\nAuthLayoutAside.displayName = 'AuthLayoutAside';\n\nexport default AuthLayoutAside;\n"],"mappings":";;;;;;;AAQA,SAAS,gBAAgB,EACvB,YACA,WACA,QACA,MACA,OACA,GAAG,QACoB;CACvB,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAM,GAAI,WAAW,OAAO,YAAY,WAAW,KAAK;EACpE,UAAA,qBAAC,OAAD;GAAK,GAAI,OAAO,MAAM,OAAO,UAAU;GAAvC,UAAA,CACG,YACA,UAAU,OAAO,qBAAA,UAAA,EAAA,UAAA,CACd,oBAAC,OAAD,EAAK,GAAI,OAAO,MAAM,OAAO,UAAU,EAAI,CAAA,GAC3C,qBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,SAAS;IAAtC,UAAA,CACG,SAAS,oBAAC,KAAD;KAAG,GAAI,OAAO,MAAM,OAAO,WAAW;KAAI,UAAA;IAAU,CAAA,IAAI,MACjE,OAAO,oBAAC,KAAD;KAAG,GAAI,OAAO,MAAM,OAAO,SAAS;KAAI,UAAA;IAAQ,CAAA,IAAI,IACzD;GACL,CAAA,CAAA,EAAA,CAAA,IAAI,IACL;;CACF,CAAA;AACT;AACA,gBAAgB,cAAc"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AuthLayoutProps } from "./type.mjs";
|
|
2
|
+
import AuthLayoutAside from "./Aside.mjs";
|
|
2
3
|
//#region src/dashboard/AuthLayout/AuthLayout.d.ts
|
|
3
|
-
declare function AuthLayout({ aside, brand, children, className, description, style, title, tools, ...rest }: AuthLayoutProps): import("react").JSX.Element;
|
|
4
|
+
declare function AuthLayout({ alert, aside, background, brand, card, children, className, description, footer, loading, logo, style, title, tools, variant, ...rest }: AuthLayoutProps): import("react").JSX.Element;
|
|
4
5
|
declare namespace AuthLayout {
|
|
5
6
|
var displayName: string;
|
|
7
|
+
var Aside: typeof AuthLayoutAside;
|
|
6
8
|
}
|
|
7
9
|
//#endregion
|
|
8
10
|
export { AuthLayout as default };
|
|
@@ -3,8 +3,11 @@ import { styleProps } from "../../styles/stylex/props.mjs";
|
|
|
3
3
|
import { cssVar } from "../../styles/stylex/cssVar.stylex.mjs";
|
|
4
4
|
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
|
|
5
5
|
import Text from "../../Text/Text.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { styles
|
|
6
|
+
import Skeleton from "../../Skeleton/index.mjs";
|
|
7
|
+
import { styles } from "./style.mjs";
|
|
8
|
+
import AuthLayoutAside from "./Aside.mjs";
|
|
9
|
+
import { useSurfaceCardStyles } from "../Surface/link.mjs";
|
|
10
|
+
import { isValidElement } from "react";
|
|
8
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
12
|
import * as stylex from "@stylexjs/stylex";
|
|
10
13
|
//#region src/dashboard/AuthLayout/AuthLayout.tsx
|
|
@@ -17,48 +20,101 @@ const descriptionStyle = {
|
|
|
17
20
|
color: cssVar.colorTextSecondary,
|
|
18
21
|
lineHeight: 1.6
|
|
19
22
|
};
|
|
20
|
-
|
|
23
|
+
const FormSkeleton = () => /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
24
|
+
"aria-hidden": true,
|
|
25
|
+
gap: 12,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
28
|
+
height: 36,
|
|
29
|
+
radius: 8,
|
|
30
|
+
width: "100%"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
33
|
+
height: 36,
|
|
34
|
+
radius: 8,
|
|
35
|
+
width: "100%"
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx(Skeleton, {
|
|
38
|
+
height: 36,
|
|
39
|
+
radius: 8,
|
|
40
|
+
width: "100%"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
function AuthLayout({ alert, aside, background = "plain", brand, card = true, children, className, description, footer, loading, logo, style, title, tools, variant = "default", ...rest }) {
|
|
45
|
+
const cardStyles = useSurfaceCardStyles();
|
|
21
46
|
const split = Boolean(aside);
|
|
47
|
+
const art = isValidElement(background) ? background : null;
|
|
48
|
+
const heading = title === void 0 || title === null ? null : typeof title === "string" ? /* @__PURE__ */ jsx(Text, {
|
|
49
|
+
as: "h1",
|
|
50
|
+
style: titleStyle,
|
|
51
|
+
weight: "bold",
|
|
52
|
+
children: title
|
|
53
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
54
|
+
...stylex.props(styles.titleNode),
|
|
55
|
+
children: title
|
|
56
|
+
});
|
|
57
|
+
const intro = logo || heading || description ? /* @__PURE__ */ jsxs(FlexBasic_default, {
|
|
58
|
+
gap: 8,
|
|
59
|
+
children: [
|
|
60
|
+
logo ? /* @__PURE__ */ jsx("div", {
|
|
61
|
+
...stylex.props(styles.logo),
|
|
62
|
+
children: logo
|
|
63
|
+
}) : null,
|
|
64
|
+
heading,
|
|
65
|
+
description ? /* @__PURE__ */ jsx(Text, {
|
|
66
|
+
style: descriptionStyle,
|
|
67
|
+
type: "secondary",
|
|
68
|
+
children: description
|
|
69
|
+
}) : null
|
|
70
|
+
]
|
|
71
|
+
}) : null;
|
|
22
72
|
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
|
|
73
|
+
"data-auth-layout": "",
|
|
24
74
|
...rest,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
...stylex.props(styles
|
|
29
|
-
children:
|
|
30
|
-
}) : null
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
...styleProps([styles.page, background === "grid" && styles.grid], className, style),
|
|
76
|
+
children: [
|
|
77
|
+
art ? /* @__PURE__ */ jsx("div", {
|
|
78
|
+
...stylex.props(styles.backdrop),
|
|
79
|
+
children: art
|
|
80
|
+
}) : null,
|
|
81
|
+
/* @__PURE__ */ jsxs("header", {
|
|
82
|
+
...stylex.props(styles.header),
|
|
83
|
+
children: [brand, tools ? /* @__PURE__ */ jsx("div", {
|
|
84
|
+
...stylex.props(styles.tools),
|
|
85
|
+
children: tools
|
|
86
|
+
}) : null]
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ jsx("main", {
|
|
89
|
+
...stylex.props(styles.main),
|
|
90
|
+
children: card ? /* @__PURE__ */ jsx("div", {
|
|
91
|
+
"data-auth-card": "",
|
|
92
|
+
...stylex.props(styles.lift, split && styles.liftSplit, cardStyles, variant === "elevated" && styles.elevated),
|
|
93
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
94
|
+
...stylex.props(styles.frame, split && styles.split),
|
|
95
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
96
|
+
...stylex.props(styles.form, split && styles.formSplit),
|
|
97
|
+
children: [
|
|
98
|
+
intro,
|
|
99
|
+
alert,
|
|
100
|
+
loading ? /* @__PURE__ */ jsx(FormSkeleton, {}) : children,
|
|
101
|
+
footer ? /* @__PURE__ */ jsx("div", {
|
|
102
|
+
...styleProps(styles.footer, "lobe-auth-layout-footer"),
|
|
103
|
+
children: footer
|
|
104
|
+
}) : null
|
|
105
|
+
]
|
|
106
|
+
}), aside ? /* @__PURE__ */ jsx("div", {
|
|
107
|
+
...stylex.props(styles.aside),
|
|
108
|
+
children: aside
|
|
109
|
+
}) : null]
|
|
110
|
+
})
|
|
111
|
+
}) : children
|
|
57
112
|
})
|
|
58
|
-
|
|
113
|
+
]
|
|
59
114
|
});
|
|
60
115
|
}
|
|
61
116
|
AuthLayout.displayName = "AuthLayout";
|
|
117
|
+
AuthLayout.Aside = AuthLayoutAside;
|
|
62
118
|
//#endregion
|
|
63
119
|
export { AuthLayout as default };
|
|
64
120
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthLayout.mjs","names":["
|
|
1
|
+
{"version":3,"file":"AuthLayout.mjs","names":["Flexbox","Aside"],"sources":["../../../src/dashboard/AuthLayout/AuthLayout.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { isValidElement } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport Skeleton from '@/Skeleton';\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { styleProps } from '@/styles/stylex/props';\nimport Text from '@/Text';\n\nimport { useSurfaceCardStyles } from '../Surface/link';\nimport Aside from './Aside';\nimport { styles } from './style';\nimport type { AuthLayoutProps } from './type';\n\nconst titleStyle = {\n fontSize: cssVar.fontSizeHeading3,\n lineHeight: cssVar.lineHeightHeading3,\n margin: 0,\n};\nconst descriptionStyle = { color: cssVar.colorTextSecondary, lineHeight: 1.6 };\n\nconst FormSkeleton = () => (\n <Flexbox aria-hidden gap={12}>\n <Skeleton height={36} radius={8} width=\"100%\" />\n <Skeleton height={36} radius={8} width=\"100%\" />\n <Skeleton height={36} radius={8} width=\"100%\" />\n </Flexbox>\n);\n\nfunction AuthLayout({\n alert,\n aside,\n background = 'plain',\n brand,\n card = true,\n children,\n className,\n description,\n footer,\n loading,\n logo,\n style,\n title,\n tools,\n variant = 'default',\n ...rest\n}: AuthLayoutProps) {\n const cardStyles = useSurfaceCardStyles();\n const split = Boolean(aside);\n const art = isValidElement(background) ? background : null;\n const heading =\n title === undefined || title === null ? null : typeof title === 'string' ? (\n <Text as=\"h1\" style={titleStyle} weight=\"bold\">\n {title}\n </Text>\n ) : (\n <div {...stylex.props(styles.titleNode)}>{title}</div>\n );\n const intro =\n logo || heading || description ? (\n <Flexbox gap={8}>\n {logo ? <div {...stylex.props(styles.logo)}>{logo}</div> : null}\n {heading}\n {description ? (\n <Text style={descriptionStyle} type=\"secondary\">\n {description}\n </Text>\n ) : null}\n </Flexbox>\n ) : null;\n\n return (\n <div\n data-auth-layout=\"\"\n {...rest}\n {...styleProps([styles.page, background === 'grid' && styles.grid], className, style)}\n >\n {art ? <div {...stylex.props(styles.backdrop)}>{art}</div> : null}\n <header {...stylex.props(styles.header)}>\n {brand}\n {tools ? <div {...stylex.props(styles.tools)}>{tools}</div> : null}\n </header>\n <main {...stylex.props(styles.main)}>\n {card ? (\n <div\n data-auth-card=\"\"\n {...stylex.props(\n styles.lift,\n split && styles.liftSplit,\n cardStyles,\n variant === 'elevated' && styles.elevated,\n )}\n >\n <div {...stylex.props(styles.frame, split && styles.split)}>\n <div {...stylex.props(styles.form, split && styles.formSplit)}>\n {intro}\n {alert}\n {loading ? <FormSkeleton /> : children}\n {footer ? (\n <div {...styleProps(styles.footer, 'lobe-auth-layout-footer')}>{footer}</div>\n ) : null}\n </div>\n {aside ? <div {...stylex.props(styles.aside)}>{aside}</div> : null}\n </div>\n </div>\n ) : (\n children\n )}\n </main>\n </div>\n );\n}\n\nAuthLayout.displayName = 'AuthLayout';\nAuthLayout.Aside = Aside;\n\nexport default AuthLayout;\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,aAAa;CACjB,UAAU,OAAO;CACjB,YAAY,OAAO;CACnB,QAAQ;AACV;AACA,MAAM,mBAAmB;CACvB,OAAO,OAAO;CACd,YAAY;AACd;AACA,MAAM,qBAAqB,qBAACA,mBAAD;CAAS,eAAA;CAAY,KAAK;CAA1B,UAAA;EACvB,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;EAC/C,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;EAC/C,oBAAC,UAAD;GAAU,QAAQ;GAAI,QAAQ;GAAG,OAAM;EAAQ,CAAA;CACxC;;AACX,SAAS,WAAW,EAClB,OACA,OACA,aAAa,SACb,OACA,OAAO,MACP,UACA,WACA,aACA,QACA,SACA,MACA,OACA,OACA,OACA,UAAU,WACV,GAAG,QACe;CAClB,MAAM,aAAa,qBAAqB;CACxC,MAAM,QAAQ,QAAQ,KAAK;CAC3B,MAAM,MAAM,eAAe,UAAU,IAAI,aAAa;CACtD,MAAM,UAAU,UAAU,KAAA,KAAa,UAAU,OAAO,OAAO,OAAO,UAAU,WAAW,oBAAC,MAAD;EAAM,IAAG;EAAK,OAAO;EAAY,QAAO;EAC5H,UAAA;CACG,CAAA,IAAI,oBAAC,OAAD;EAAK,GAAI,OAAO,MAAM,OAAO,SAAS;EAAI,UAAA;CAAW,CAAA;CACnE,MAAM,QAAQ,QAAQ,WAAW,cAAc,qBAACA,mBAAD;EAAS,KAAK;EAAd,UAAA;GACxC,OAAO,oBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,IAAI;IAAI,UAAA;GAAU,CAAA,IAAI;GAC1D;GACA,cAAc,oBAAC,MAAD;IAAM,OAAO;IAAkB,MAAK;IAC9C,UAAA;GACG,CAAA,IAAI;EACL;CAAI,CAAA,IAAA;CACjB,OAAO,qBAAC,OAAD;EAAK,oBAAiB;EAAG,GAAI;EAAM,GAAI,WAAW,CAAC,OAAO,MAAM,eAAe,UAAU,OAAO,IAAI,GAAG,WAAW,KAAK;EAAvH,UAAA;GACF,MAAM,oBAAC,OAAD;IAAK,GAAI,OAAO,MAAM,OAAO,QAAQ;IAAI,UAAA;GAAS,CAAA,IAAI;GAC7D,qBAAC,UAAD;IAAQ,GAAI,OAAO,MAAM,OAAO,MAAM;IAAtC,UAAA,CACG,OACA,QAAQ,oBAAC,OAAD;KAAK,GAAI,OAAO,MAAM,OAAO,KAAK;KAAI,UAAA;IAAW,CAAA,IAAI,IACxD;;GACR,oBAAC,QAAD;IAAM,GAAI,OAAO,MAAM,OAAO,IAAI;IAC/B,UAAA,OAAO,oBAAC,OAAD;KAAK,kBAAe;KAAG,GAAI,OAAO,MAAM,OAAO,MAAM,SAAS,OAAO,WAAW,YAAY,YAAY,cAAc,OAAO,QAAQ;KACzI,UAAA,qBAAC,OAAD;MAAK,GAAI,OAAO,MAAM,OAAO,OAAO,SAAS,OAAO,KAAK;MAAzD,UAAA,CACE,qBAAC,OAAD;OAAK,GAAI,OAAO,MAAM,OAAO,MAAM,SAAS,OAAO,SAAS;OAA5D,UAAA;QACG;QACA;QACA,UAAU,oBAAC,cAAD,CAAe,CAAA,IAAI;QAC7B,SAAS,oBAAC,OAAD;SAAK,GAAI,WAAW,OAAO,QAAQ,yBAAyB;SAAI,UAAA;QAAY,CAAA,IAAI;OACvF;MACJ,CAAA,GAAA,QAAQ,oBAAC,OAAD;OAAK,GAAI,OAAO,MAAM,OAAO,KAAK;OAAI,UAAA;MAAW,CAAA,IAAI,IAC3D;;IACF,CAAA,IAAI;GACP,CAAA;EACH;;AACT;AACA,WAAW,cAAc;AACzB,WAAW,QAAQC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { AuthLayoutProps } from "./type.mjs";
|
|
1
|
+
import { AuthLayoutAsideProps, AuthLayoutBackground, AuthLayoutProps, AuthLayoutVariant } from "./type.mjs";
|
|
2
|
+
import AuthLayoutAside from "./Aside.mjs";
|
|
2
3
|
import AuthLayout from "./AuthLayout.mjs";
|
|
3
|
-
export { type AuthLayoutProps, AuthLayout as default };
|
|
4
|
+
export { AuthLayoutAside, type AuthLayoutAsideProps, type AuthLayoutBackground, type AuthLayoutProps, type AuthLayoutVariant, AuthLayout as default };
|
|
@@ -11,6 +11,76 @@ const styles = {
|
|
|
11
11
|
kVAEAm: "lb1n2onr6",
|
|
12
12
|
$$css: true
|
|
13
13
|
},
|
|
14
|
+
asideCopy: {
|
|
15
|
+
kOIVth: "lb167g77z",
|
|
16
|
+
kkqhue: "lb1v2lpi6",
|
|
17
|
+
k1xSpc: "lb78zum5",
|
|
18
|
+
kXwgrk: "lbdt5ytf",
|
|
19
|
+
krVfgx: "lby75b87",
|
|
20
|
+
kfzvcC: "lb47corl",
|
|
21
|
+
kVAEAm: "lb10l6tqk",
|
|
22
|
+
kY2c9j: "lbhtitgo",
|
|
23
|
+
$$css: true
|
|
24
|
+
},
|
|
25
|
+
asideKicker: {
|
|
26
|
+
kogj98: "lb1ghz6dp",
|
|
27
|
+
kMwMTN: "lbfungia",
|
|
28
|
+
kGuDYH: "lb1pzwcx8",
|
|
29
|
+
kLWn49: "lb37zpob",
|
|
30
|
+
kSiTet: "lb19s9pn4",
|
|
31
|
+
$$css: true
|
|
32
|
+
},
|
|
33
|
+
asideLine: {
|
|
34
|
+
kogj98: "lb1ghz6dp",
|
|
35
|
+
kMwMTN: "lbfungia",
|
|
36
|
+
kGuDYH: "lb1j9mzhl",
|
|
37
|
+
k63SB2: "lb1s688f",
|
|
38
|
+
kb6lSQ: "lb72az59",
|
|
39
|
+
kLWn49: "lb132q4wb",
|
|
40
|
+
$$css: true
|
|
41
|
+
},
|
|
42
|
+
asidePanel: {
|
|
43
|
+
kpwlN0: "lbk92lsc",
|
|
44
|
+
kaIpWk: "lb1m3ak92",
|
|
45
|
+
kVQacm: "lbb3r6kr",
|
|
46
|
+
kKwaWg: "lb18434q4",
|
|
47
|
+
kVAEAm: "lb10l6tqk",
|
|
48
|
+
$$css: true
|
|
49
|
+
},
|
|
50
|
+
asidePlate: {
|
|
51
|
+
kpwlN0: "lb10a8y8t",
|
|
52
|
+
kWkggS: "lbxy8123",
|
|
53
|
+
kVAEAm: "lb10l6tqk",
|
|
54
|
+
$$css: true
|
|
55
|
+
},
|
|
56
|
+
asideScrim: {
|
|
57
|
+
kkqhue: "lb17y0mx6",
|
|
58
|
+
kKwaWg: "lb6ql2kj",
|
|
59
|
+
kZKoxP: "lbfeo3ze",
|
|
60
|
+
krVfgx: "lb1ey2m1c",
|
|
61
|
+
kfzvcC: "lb47corl",
|
|
62
|
+
kVAEAm: "lb10l6tqk",
|
|
63
|
+
kY2c9j: "lb1vjfegm",
|
|
64
|
+
$$css: true
|
|
65
|
+
},
|
|
66
|
+
backdrop: {
|
|
67
|
+
kpwlN0: "lb10a8y8t",
|
|
68
|
+
kfzvcC: "lb47corl",
|
|
69
|
+
kVAEAm: "lb10l6tqk",
|
|
70
|
+
kY2c9j: "lb1ja2u2z",
|
|
71
|
+
$$css: true
|
|
72
|
+
},
|
|
73
|
+
elevated: {
|
|
74
|
+
kaIpWk: "lb1jvnzes",
|
|
75
|
+
$$css: true
|
|
76
|
+
},
|
|
77
|
+
footer: {
|
|
78
|
+
kogj98: "lb1ghz6dp",
|
|
79
|
+
kMwMTN: "lbc77et8",
|
|
80
|
+
kGuDYH: "lbxobqjj",
|
|
81
|
+
kLWn49: "lb1dbl2gt",
|
|
82
|
+
$$css: true
|
|
83
|
+
},
|
|
14
84
|
form: {
|
|
15
85
|
kUk6DE: "lb1okw0bk",
|
|
16
86
|
kOIVth: "lb1665zp3",
|
|
@@ -38,6 +108,13 @@ const styles = {
|
|
|
38
108
|
k7Eaqz: "lbeuugli",
|
|
39
109
|
$$css: true
|
|
40
110
|
},
|
|
111
|
+
grid: {
|
|
112
|
+
k1YJky: "lbkuq44j",
|
|
113
|
+
kWkggS: "lbzyoshe",
|
|
114
|
+
kKwaWg: "lbo5mpd0",
|
|
115
|
+
kgSjnq: "lblpqoug",
|
|
116
|
+
$$css: true
|
|
117
|
+
},
|
|
41
118
|
header: {
|
|
42
119
|
kUk6DE: "lb1okw0bk",
|
|
43
120
|
kOIVth: "lb1v2ro7d",
|
|
@@ -46,17 +123,25 @@ const styles = {
|
|
|
46
123
|
kZKoxP: "lbnnlda6",
|
|
47
124
|
k1xSpc: "lb78zum5",
|
|
48
125
|
kjj79g: "lb1qughib",
|
|
126
|
+
kVAEAm: "lb1n2onr6",
|
|
127
|
+
kY2c9j: "lb1vjfegm",
|
|
49
128
|
$$css: true
|
|
50
129
|
},
|
|
51
130
|
lift: {
|
|
52
131
|
k1xSpc: "lb78zum5",
|
|
53
132
|
kzqmXN: "lb1nyppsm",
|
|
133
|
+
kVAEAm: "lb1n2onr6",
|
|
54
134
|
$$css: true
|
|
55
135
|
},
|
|
56
136
|
liftSplit: {
|
|
57
137
|
kzqmXN: "lbj135po lb1lqujif",
|
|
58
138
|
$$css: true
|
|
59
139
|
},
|
|
140
|
+
logo: {
|
|
141
|
+
k1xSpc: "lb78zum5",
|
|
142
|
+
k1K539: "lb1e56ztr",
|
|
143
|
+
$$css: true
|
|
144
|
+
},
|
|
60
145
|
main: {
|
|
61
146
|
kUk6DE: "lb98rzlu",
|
|
62
147
|
kg3NbH: "lb1hr3lfm",
|
|
@@ -64,20 +149,32 @@ const styles = {
|
|
|
64
149
|
k1xSpc: "lbrvj5dj",
|
|
65
150
|
kGO01o: "lb1sgudl8",
|
|
66
151
|
kLKAdn: "lb1p5oq8j",
|
|
152
|
+
kVAEAm: "lb1n2onr6",
|
|
153
|
+
kY2c9j: "lb1vjfegm",
|
|
67
154
|
$$css: true
|
|
68
155
|
},
|
|
69
156
|
page: {
|
|
157
|
+
kUk6DE: "lb98rzlu",
|
|
158
|
+
kVQacm: "lbysyzu8",
|
|
70
159
|
kWkggS: "lb41ilrr",
|
|
71
160
|
kZKoxP: "lb5yr21d",
|
|
161
|
+
kB7OPa: "lb9f619",
|
|
72
162
|
k1xSpc: "lb78zum5",
|
|
73
163
|
kXwgrk: "lbdt5ytf",
|
|
74
|
-
|
|
164
|
+
kzqmXN: "lbh8yej3",
|
|
165
|
+
kAzted: "lb1ov3xa9",
|
|
166
|
+
kVAEAm: "lb1n2onr6",
|
|
75
167
|
$$css: true
|
|
76
168
|
},
|
|
77
169
|
split: {
|
|
78
170
|
kAzted: "lb137vrcb lb1qlpcz1",
|
|
79
171
|
$$css: true
|
|
80
172
|
},
|
|
173
|
+
titleNode: {
|
|
174
|
+
k1xSpc: "lb78zum5",
|
|
175
|
+
k7Eaqz: "lbeuugli",
|
|
176
|
+
$$css: true
|
|
177
|
+
},
|
|
81
178
|
tools: {
|
|
82
179
|
kOIVth: "lb17d4w8g",
|
|
83
180
|
kGNEyG: "lb6s0dn4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nexport const styles = stylex.create({\n aside: {\n flex: 'none',\n backgroundColor: cssVar.colorFillSecondary,\n boxSizing: 'border-box',\n display: { default: null, [media.laptop]: 'none' },\n inlineSize: '50%',\n maxInlineSize: '50%',\n minInlineSize: 0,\n position: 'relative',\n },\n form: {\n flex: 'none',\n gap: 24,\n paddingBlock: { default: 40, [media.laptop]: 28 },\n paddingInline: { default: 36, [media.laptop]: 24 },\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n inlineSize: '100%',\n justifyContent: 'center',\n minInlineSize: 0,\n },\n formSplit: {\n inlineSize: { default: '50%', [media.laptop]: '100%' },\n maxInlineSize: { default: '50%', [media.laptop]: '100%' },\n },\n frame: {\n borderRadius: 'inherit',\n flex: 'none',\n overflow: 'hidden',\n display: 'flex',\n inlineSize: '100%',\n minInlineSize: 0,\n },\n header: {\n flex: 'none',\n gap: 12,\n paddingInline: 16,\n alignItems: 'center',\n blockSize: 56,\n display: 'flex',\n justifyContent: 'space-between',\n },\n lift: {\n display: 'flex',\n inlineSize: 'min(440px, 100%)',\n },\n liftSplit: {\n inlineSize: { default: 'min(880px, 100%)', [media.laptop]: 'min(440px, 100%)' },\n },\n main: {\n flex: '1',\n paddingInline: 16,\n placeItems: 'center',\n display: 'grid',\n paddingBlockEnd: '48px',\n paddingBlockStart: '24px',\n },\n page: {\n backgroundColor: cssVar.colorBgLayout,\n blockSize: '100%',\n display: 'flex',\n flexDirection: 'column',\n minBlockSize:
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/dashboard/AuthLayout/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\nimport { media } from '@/styles/stylex/media.stylex';\n\nexport const styles = stylex.create({\n aside: {\n flex: 'none',\n backgroundColor: cssVar.colorFillSecondary,\n boxSizing: 'border-box',\n display: { default: null, [media.laptop]: 'none' },\n inlineSize: '50%',\n maxInlineSize: '50%',\n minInlineSize: 0,\n position: 'relative',\n },\n asideCopy: {\n gap: 8,\n insetInline: 40,\n display: 'flex',\n flexDirection: 'column',\n insetBlockEnd: 64,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 2,\n },\n asideKicker: {\n margin: 0,\n color: '#fff',\n fontSize: cssVar.fontSize,\n lineHeight: 1.4,\n opacity: 0.82,\n },\n asideLine: {\n margin: 0,\n color: '#fff',\n fontSize: cssVar.fontSizeHeading2,\n fontWeight: 600,\n letterSpacing: '-0.02em',\n lineHeight: 1.25,\n },\n asidePanel: {\n inset: 8,\n borderRadius: 20,\n overflow: 'hidden',\n backgroundImage: 'linear-gradient(165deg, #ff9ffc 0%, #5227ff 46%, #b497cf 100%)',\n position: 'absolute',\n },\n asidePlate: {\n inset: 0,\n backgroundColor: `var(--lobe-surface-bg-solid, ${cssVar.colorBgContainer})`,\n position: 'absolute',\n },\n asideScrim: {\n insetInline: 0,\n backgroundImage: 'linear-gradient(to top, rgb(24 10 48 / 42%), transparent)',\n blockSize: '58%',\n insetBlockEnd: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n },\n backdrop: {\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n },\n elevated: {\n borderRadius: 28,\n },\n footer: {\n margin: 0,\n color: cssVar.colorTextSecondary,\n fontSize: cssVar.fontSizeSM,\n lineHeight: 1.6,\n },\n form: {\n flex: 'none',\n gap: 24,\n paddingBlock: { default: 40, [media.laptop]: 28 },\n paddingInline: { default: 36, [media.laptop]: 24 },\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n inlineSize: '100%',\n justifyContent: 'center',\n minInlineSize: 0,\n },\n formSplit: {\n inlineSize: { default: '50%', [media.laptop]: '100%' },\n maxInlineSize: { default: '50%', [media.laptop]: '100%' },\n },\n frame: {\n borderRadius: 'inherit',\n flex: 'none',\n overflow: 'hidden',\n display: 'flex',\n inlineSize: '100%',\n minInlineSize: 0,\n },\n grid: {\n backgroundPosition: '-1px -1px',\n backgroundColor: `color-mix(in srgb, ${cssVar.colorBgLayout}, ${cssVar.colorBgElevated} 70%)`,\n backgroundImage: `linear-gradient(color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, ${cssVar.colorText} 5%, transparent) 1px, transparent 1px)`,\n backgroundSize: '32px 32px',\n },\n header: {\n flex: 'none',\n gap: 12,\n paddingInline: 16,\n alignItems: 'center',\n blockSize: 56,\n display: 'flex',\n justifyContent: 'space-between',\n position: 'relative',\n zIndex: 1,\n },\n lift: {\n display: 'flex',\n inlineSize: 'min(440px, 100%)',\n position: 'relative',\n },\n liftSplit: {\n inlineSize: { default: 'min(880px, 100%)', [media.laptop]: 'min(440px, 100%)' },\n },\n logo: {\n display: 'flex',\n marginBlockEnd: 8,\n },\n main: {\n flex: '1',\n paddingInline: 16,\n placeItems: 'center',\n display: 'grid',\n paddingBlockEnd: '48px',\n paddingBlockStart: '24px',\n position: 'relative',\n zIndex: 1,\n },\n page: {\n flex: '1',\n overflow: 'auto',\n backgroundColor: cssVar.colorBgLayout,\n blockSize: '100%',\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n inlineSize: '100%',\n minBlockSize: '100dvh',\n position: 'relative',\n },\n split: {\n minBlockSize: { default: 520, [media.laptop]: 0 },\n },\n titleNode: {\n display: 'flex',\n minInlineSize: 0,\n },\n tools: {\n gap: 6,\n alignItems: 'center',\n display: 'flex',\n marginInlineStart: 'auto',\n },\n});\n"],"mappings":";AAKA,MAAa,SAAS;CACpB,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
|
|
@@ -1,15 +1,51 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
//#region src/dashboard/AuthLayout/type.d.ts
|
|
3
|
+
export type AuthLayoutBackground = 'plain' | 'grid';
|
|
4
|
+
export type AuthLayoutVariant = 'default' | 'elevated';
|
|
3
5
|
export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
-
/**
|
|
6
|
+
/** Message shown above the form, such as an error `Alert`. */
|
|
7
|
+
alert?: ReactNode;
|
|
8
|
+
/** Optional panel beside the form. Hidden below the laptop breakpoint. See `AuthLayout.Aside`. */
|
|
5
9
|
aside?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Page backdrop. `grid` draws a 32px line grid over a mix of the layout and elevated colors.
|
|
12
|
+
* Any other node is rendered behind the content.
|
|
13
|
+
* @default 'plain'
|
|
14
|
+
*/
|
|
15
|
+
background?: AuthLayoutBackground | ReactNode;
|
|
6
16
|
/** Home mark rendered in the corner. Pass your own logo. */
|
|
7
17
|
brand?: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Render the sign-in card. Set `false` to keep only the header, tools and backdrop,
|
|
20
|
+
* for status pages that center their own content.
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
card?: boolean;
|
|
8
24
|
children?: ReactNode;
|
|
9
25
|
description?: ReactNode;
|
|
10
|
-
|
|
26
|
+
/** Small secondary line under the form, such as support links. */
|
|
27
|
+
footer?: ReactNode;
|
|
28
|
+
/** Replace the form with a skeleton. Title and description stay. */
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
/** Mark shown above the title. */
|
|
31
|
+
logo?: ReactNode;
|
|
32
|
+
/** A string renders as the page heading. Other nodes render as is. */
|
|
33
|
+
title?: ReactNode;
|
|
11
34
|
/** Corner actions, such as a theme switch. */
|
|
12
35
|
tools?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Card shape. `elevated` uses a 28px radius for standalone sign-in pages.
|
|
38
|
+
* @default 'default'
|
|
39
|
+
*/
|
|
40
|
+
variant?: AuthLayoutVariant;
|
|
41
|
+
}
|
|
42
|
+
export interface AuthLayoutAsideProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
43
|
+
/** Art behind the copy, such as `<Grainient />`. Defaults to a static gradient. */
|
|
44
|
+
background?: ReactNode;
|
|
45
|
+
/** Small line above the headline. */
|
|
46
|
+
kicker?: ReactNode;
|
|
47
|
+
/** Headline at the bottom of the panel. */
|
|
48
|
+
line?: ReactNode;
|
|
13
49
|
}
|
|
14
50
|
//#endregion
|
|
15
51
|
//# sourceMappingURL=type.d.mts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthLocaleSwitchProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/AuthTools/AuthLocaleSwitch.d.ts
|
|
3
|
+
/** Pill language select for auth corner tools. Controlled; pass your locale list. */
|
|
4
|
+
declare function AuthLocaleSwitch({ 'aria-label': ariaLabel, className, onChange, options, style, value }: AuthLocaleSwitchProps): import("react").JSX.Element;
|
|
5
|
+
declare namespace AuthLocaleSwitch {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AuthLocaleSwitch as default };
|
|
10
|
+
//# sourceMappingURL=AuthLocaleSwitch.d.mts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import Icon from "../../Icon/Icon.mjs";
|
|
3
|
+
import Select from "../../Select/Select.mjs";
|
|
4
|
+
import { styles } from "./style.mjs";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import * as stylex from "@stylexjs/stylex";
|
|
8
|
+
import { GlobeIcon } from "lucide-react";
|
|
9
|
+
//#region src/dashboard/AuthTools/AuthLocaleSwitch.tsx
|
|
10
|
+
/** Pill language select for auth corner tools. Controlled; pass your locale list. */
|
|
11
|
+
function AuthLocaleSwitch({ "aria-label": ariaLabel = "Language", className, onChange, options, style, value }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Select, {
|
|
13
|
+
"aria-label": ariaLabel,
|
|
14
|
+
className: clsx("lobe-auth-locale-switch", className),
|
|
15
|
+
options,
|
|
16
|
+
prefix: /* @__PURE__ */ jsx(Icon, {
|
|
17
|
+
icon: GlobeIcon,
|
|
18
|
+
...stylex.props(styles.localeIcon)
|
|
19
|
+
}),
|
|
20
|
+
size: "small",
|
|
21
|
+
style,
|
|
22
|
+
value,
|
|
23
|
+
variant: "outlined",
|
|
24
|
+
onChange: (next) => {
|
|
25
|
+
if (typeof next === "string") onChange?.(next);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
AuthLocaleSwitch.displayName = "AuthLocaleSwitch";
|
|
30
|
+
//#endregion
|
|
31
|
+
export { AuthLocaleSwitch as default };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=AuthLocaleSwitch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthLocaleSwitch.mjs","names":[],"sources":["../../../src/dashboard/AuthTools/AuthLocaleSwitch.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { GlobeIcon } from 'lucide-react';\n\nimport Icon from '@/Icon';\nimport Select from '@/Select';\n\nimport { styles } from './style';\nimport type { AuthLocaleSwitchProps } from './type';\n\n/** Pill language select for auth corner tools. Controlled; pass your locale list. */\nfunction AuthLocaleSwitch({\n 'aria-label': ariaLabel = 'Language',\n className,\n onChange,\n options,\n style,\n value,\n}: AuthLocaleSwitchProps) {\n return (\n <Select\n aria-label={ariaLabel}\n className={clsx('lobe-auth-locale-switch', className)}\n options={options}\n prefix={<Icon icon={GlobeIcon} {...stylex.props(styles.localeIcon)} />}\n size=\"small\"\n style={style}\n value={value}\n variant=\"outlined\"\n onChange={(next: unknown) => {\n if (typeof next === 'string') onChange?.(next);\n }}\n />\n );\n}\n\nAuthLocaleSwitch.displayName = 'AuthLocaleSwitch';\n\nexport default AuthLocaleSwitch;\n"],"mappings":";;;;;;;;;;AAYA,SAAS,iBAAiB,EACxB,cAAc,YAAY,YAC1B,WACA,UACA,SACA,OACA,SACwB;CACxB,OAAO,oBAAC,QAAD;EAAQ,cAAY;EAAW,WAAW,KAAK,2BAA2B,SAAS;EAAY;EAAS,QAAQ,oBAAC,MAAD;GAAM,MAAM;GAAW,GAAI,OAAO,MAAM,OAAO,UAAU;EAAI,CAAA;EAAG,MAAK;EAAe;EAAc;EAAO,SAAQ;EAAW,WAAW,SAAkB;GAC9Q,IAAI,OAAO,SAAS,UAAU,WAAW,IAAI;EAC/C;CAAI,CAAA;AACN;AACA,iBAAiB,cAAc"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthThemeSwitchProps } from "./type.mjs";
|
|
2
|
+
//#region src/dashboard/AuthTools/AuthThemeSwitch.d.ts
|
|
3
|
+
/** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */
|
|
4
|
+
declare function AuthThemeSwitch({ className, labels, onChange, style, value }: AuthThemeSwitchProps): import("react").JSX.Element;
|
|
5
|
+
declare namespace AuthThemeSwitch {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AuthThemeSwitch as default };
|
|
10
|
+
//# sourceMappingURL=AuthThemeSwitch.d.mts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import Icon from "../../Icon/Icon.mjs";
|
|
3
|
+
import Segmented from "../../Segmented/Segmented.mjs";
|
|
4
|
+
import { styles } from "./style.mjs";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import clsx from "clsx";
|
|
7
|
+
import * as stylex from "@stylexjs/stylex";
|
|
8
|
+
import { Monitor, Moon, Sun } from "lucide-react";
|
|
9
|
+
//#region src/dashboard/AuthTools/AuthThemeSwitch.tsx
|
|
10
|
+
const OPTIONS = [
|
|
11
|
+
{
|
|
12
|
+
icon: Moon,
|
|
13
|
+
value: "dark"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
icon: Monitor,
|
|
17
|
+
value: "auto"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: Sun,
|
|
21
|
+
value: "light"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
const DEFAULT_LABELS = {
|
|
25
|
+
auto: "System",
|
|
26
|
+
dark: "Dark",
|
|
27
|
+
light: "Light"
|
|
28
|
+
};
|
|
29
|
+
/** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */
|
|
30
|
+
function AuthThemeSwitch({ className, labels, onChange, style, value = "auto" }) {
|
|
31
|
+
const names = {
|
|
32
|
+
...DEFAULT_LABELS,
|
|
33
|
+
...labels
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ jsx(Segmented, {
|
|
36
|
+
className: clsx("lobe-auth-theme-switch", className),
|
|
37
|
+
size: "small",
|
|
38
|
+
style,
|
|
39
|
+
value,
|
|
40
|
+
variant: "outlined",
|
|
41
|
+
classNames: {
|
|
42
|
+
item: "lobe-auth-theme-switch-item",
|
|
43
|
+
itemIcon: stylex.props(styles.themeIcon).className,
|
|
44
|
+
itemLabel: stylex.props(styles.themeLabel).className
|
|
45
|
+
},
|
|
46
|
+
options: OPTIONS.map((option) => ({
|
|
47
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: option.icon }),
|
|
48
|
+
label: names[option.value],
|
|
49
|
+
title: names[option.value],
|
|
50
|
+
value: option.value
|
|
51
|
+
})),
|
|
52
|
+
onChange: (next) => onChange?.(next)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
AuthThemeSwitch.displayName = "AuthThemeSwitch";
|
|
56
|
+
//#endregion
|
|
57
|
+
export { AuthThemeSwitch as default };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=AuthThemeSwitch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthThemeSwitch.mjs","names":[],"sources":["../../../src/dashboard/AuthTools/AuthThemeSwitch.tsx"],"sourcesContent":["'use client';\n\nimport './style.css';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { Monitor, Moon, Sun } from 'lucide-react';\n\nimport Icon from '@/Icon';\nimport Segmented from '@/Segmented';\n\nimport { styles } from './style';\nimport type { AuthThemeMode, AuthThemeSwitchProps } from './type';\n\nconst OPTIONS = [\n { icon: Moon, value: 'dark' },\n { icon: Monitor, value: 'auto' },\n { icon: Sun, value: 'light' },\n] as const;\n\nconst DEFAULT_LABELS: Record<AuthThemeMode, string> = {\n auto: 'System',\n dark: 'Dark',\n light: 'Light',\n};\n\n/** Compact icon-only theme picker for auth corner tools. Controlled; wire it to your store. */\nfunction AuthThemeSwitch({\n className,\n labels,\n onChange,\n style,\n value = 'auto',\n}: AuthThemeSwitchProps) {\n const names = { ...DEFAULT_LABELS, ...labels };\n return (\n <Segmented<AuthThemeMode>\n className={clsx('lobe-auth-theme-switch', className)}\n size=\"small\"\n style={style}\n value={value}\n variant=\"outlined\"\n classNames={{\n item: 'lobe-auth-theme-switch-item',\n itemIcon: stylex.props(styles.themeIcon).className,\n itemLabel: stylex.props(styles.themeLabel).className,\n }}\n options={OPTIONS.map((option) => ({\n icon: <Icon icon={option.icon} />,\n label: names[option.value],\n title: names[option.value],\n value: option.value,\n }))}\n onChange={(next) => onChange?.(next)}\n />\n );\n}\n\nAuthThemeSwitch.displayName = 'AuthThemeSwitch';\n\nexport default AuthThemeSwitch;\n"],"mappings":";;;;;;;;;AAUA,MAAM,UAAU;CAAC;EACf,MAAM;EACN,OAAO;CACT;CAAG;EACD,MAAM;EACN,OAAO;CACT;CAAG;EACD,MAAM;EACN,OAAO;CACT;AAAC;AACD,MAAM,iBAAgD;CACpD,MAAM;CACN,MAAM;CACN,OAAO;AACT;;AAGA,SAAS,gBAAgB,EACvB,WACA,QACA,UACA,OACA,QAAQ,UACe;CACvB,MAAM,QAAQ;EACZ,GAAG;EACH,GAAG;CACL;CACA,OAAO,oBAAC,WAAD;EAA0B,WAAW,KAAK,0BAA0B,SAAS;EAAG,MAAK;EAAe;EAAc;EAAO,SAAQ;EAAW,YAAY;GAC7J,MAAM;GACN,UAAU,OAAO,MAAM,OAAO,SAAS,CAAC,CAAC;GACzC,WAAW,OAAO,MAAM,OAAO,UAAU,CAAC,CAAC;EAC7C;EAAG,SAAS,QAAQ,KAAI,YAAW;GACjC,MAAM,oBAAC,MAAD,EAAM,MAAM,OAAO,KAAO,CAAA;GAChC,OAAO,MAAM,OAAO;GACpB,OAAO,MAAM,OAAO;GACpB,OAAO,OAAO;EAChB,EAAE;EAAG,WAAU,SAAQ,WAAW,IAAI;CAAI,CAAA;AAC5C;AACA,gBAAgB,cAAc"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthLocaleOption, AuthLocaleSwitchProps, AuthThemeMode, AuthThemeSwitchProps } from "./type.mjs";
|
|
2
|
+
import AuthLocaleSwitch from "./AuthLocaleSwitch.mjs";
|
|
3
|
+
import AuthThemeSwitch from "./AuthThemeSwitch.mjs";
|
|
4
|
+
export { type AuthLocaleOption, AuthLocaleSwitch, type AuthLocaleSwitchProps, type AuthThemeMode, AuthThemeSwitch, type AuthThemeSwitchProps };
|