@molecule/app-auth-shell-react 3.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/AuthShell.d.ts.map +1 -1
- package/dist/AuthShell.js +10 -11
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-
|
|
6
|
+
Generated: 2026-11-12T04:39:49.274Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-auth-shell-react
|
|
@@ -552,7 +552,7 @@ const DEFAULT_AUTH_FORM_STATE_KEY: 'molecule.auth.form-state'
|
|
|
552
552
|
Peer dependencies:
|
|
553
553
|
|
|
554
554
|
- `@molecule/app-logger` ^1.0.1
|
|
555
|
-
- `@molecule/app-react` ^
|
|
555
|
+
- `@molecule/app-react` ^4.0.0
|
|
556
556
|
- `@molecule/app-storage` ^1.0.1
|
|
557
557
|
- `@molecule/app-ui` ^1.0.1
|
|
558
558
|
- `react` ^18.0.0 || ^19.0.0
|
package/dist/AuthShell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthShell.d.ts","sourceRoot":"","sources":["../src/AuthShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAe,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAK5D;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAA;IACnB,wDAAw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,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,eAAe,CAAA;IAClC,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,UAAU,EACV,QAAQ,EACR,MAAM,EACN,KAAK,EACL,UAAU,EACV,MAAY,EACZ,YAAmB,EACnB,gBAAgB,EAChB,YAAY,GACb,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAiB9B;AAED,eAAe,SAAS,CAAA"}
|
package/dist/AuthShell.js
CHANGED
|
@@ -9,8 +9,8 @@ import { AuthFormStateProvider } from './AuthFormStateProvider.js';
|
|
|
9
9
|
export function AuthShellContainer({ children, style, className, layout = 'centered', }) {
|
|
10
10
|
const cm = getClassMap();
|
|
11
11
|
const base = layout === 'column'
|
|
12
|
-
? cm.cn(cm.flex({ direction: 'col' }), cm.minH('screen'),
|
|
13
|
-
: cm.cn(cm.flex({ align: 'center', justify: 'center' }), cm.minH('screen'), cm.sp('p', 6),
|
|
12
|
+
? cm.cn(cm.flex({ direction: 'col' }), cm.minH('screen'), cm.authShellContainer)
|
|
13
|
+
: cm.cn(cm.flex({ align: 'center', justify: 'center' }), cm.minH('screen'), cm.sp('p', 6), cm.authShellContainer);
|
|
14
14
|
return (_jsx("div", { className: cm.cn(base, className), style: style, children: children }));
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -20,30 +20,29 @@ export function AuthShellContainer({ children, style, className, layout = 'cente
|
|
|
20
20
|
*/
|
|
21
21
|
export function AuthShellDecoration({ children }) {
|
|
22
22
|
const cm = getClassMap();
|
|
23
|
-
return
|
|
23
|
+
return _jsx("div", { className: cm.cn(cm.authShellDecoration), children: children });
|
|
24
24
|
}
|
|
25
|
-
const DEFAULT_SURFACE_CLASSES = 'rounded-3xl border border-white/40 bg-surface-container-lowest/80 backdrop-blur-2xl shadow-[0_30px_80px_-20px_rgba(116,47,229,0.30)]';
|
|
26
25
|
/**
|
|
27
26
|
* Centered glassmorphic card surface with fixed flex-column layout and configurable surface treatment.
|
|
28
27
|
*/
|
|
29
28
|
export function AuthShellCard({ children, surfaceClassName, className, outerClassName, dataMolId, style, }) {
|
|
30
29
|
const cm = getClassMap();
|
|
31
|
-
const outer = outerClassName ?? cm.cn(cm.w('full'),
|
|
32
|
-
return (_jsx("main", { className: outer, children: _jsx("div", { className: cm.cn(cm.flex({ direction: 'col', gap: 'lg' }), cm.sp('p', 8), surfaceClassName ??
|
|
30
|
+
const outer = outerClassName ?? cm.cn(cm.w('full'), cm.authShellCardOuter);
|
|
31
|
+
return (_jsx("main", { className: outer, children: _jsx("div", { className: cm.cn(cm.flex({ direction: 'col', gap: 'lg' }), cm.sp('p', 8), surfaceClassName ?? cm.authShellCardSurface, className), style: style, "data-mol-id": dataMolId, children: children }) }));
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* Centered heading block with optional eyebrow tag, h1 title, and subheading paragraph.
|
|
36
35
|
*/
|
|
37
36
|
export function AuthShellHeading({ heading, subheading, eyebrow, headingClassName, headingStyle, }) {
|
|
38
37
|
const cm = getClassMap();
|
|
39
|
-
return (_jsxs("header", { className: cm.flex({ direction: 'col', align: 'center', gap: 'xs' }), children: [eyebrow ? (_jsx("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('bold'),
|
|
38
|
+
return (_jsxs("header", { className: cm.flex({ direction: 'col', align: 'center', gap: 'xs' }), children: [eyebrow ? (_jsx("span", { className: cm.cn(cm.textSize('xs'), cm.fontWeight('bold'), cm.authShellHeadingEyebrow), children: eyebrow })) : null, _jsx("h1", { className: cm.cn(cm.textSize('2xl'), cm.fontWeight('bold'), cm.authShellHeadingTitle, headingClassName), style: headingStyle, children: heading }), subheading ? (_jsx("p", { className: cm.cn(cm.textSize('sm'), cm.authShellHeadingSub), children: subheading })) : null] }));
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
42
41
|
* Footer inside the card — small text with a top border.
|
|
43
42
|
*/
|
|
44
43
|
export function AuthShellFooter({ children }) {
|
|
45
44
|
const cm = getClassMap();
|
|
46
|
-
return (_jsx("footer", { className: cm.cn(cm.textCenter, cm.textSize('sm'),
|
|
45
|
+
return (_jsx("footer", { className: cm.cn(cm.textCenter, cm.textSize('sm'), cm.authShellFooter), children: children }));
|
|
47
46
|
}
|
|
48
47
|
/**
|
|
49
48
|
* Back-navigation link rendered below the card, defaulting to "Back to home" via i18n.
|
|
@@ -51,7 +50,7 @@ export function AuthShellFooter({ children }) {
|
|
|
51
50
|
export function AuthShellBackLink({ to = '/', label }) {
|
|
52
51
|
const cm = getClassMap();
|
|
53
52
|
const { t } = useTranslation();
|
|
54
|
-
return (_jsx("p", { className: cm.cn(cm.textCenter, cm.textSize('xs'), cm.sp('mt', 6),
|
|
53
|
+
return (_jsx("p", { className: cm.cn(cm.textCenter, cm.textSize('xs'), cm.sp('mt', 6), cm.authShellBackLink), children: _jsxs(Link, { to: to, className: cm.cn(cm.flex({ align: 'center', gap: 'xs' }), cm.authShellBackLinkAnchor), children: [_jsx("span", { className: cm.iconGlyphFont, style: { fontSize: 14 }, children: "arrow_back" }), label ?? t('auth.backHome', undefined, { defaultValue: 'Back to home' })] }) }));
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* Outer min-h-screen flex-col frame for the two-column brand-panel + card auth layout.
|
|
@@ -73,7 +72,7 @@ export function AuthShellSplitRow({ children, className, ...rest }) {
|
|
|
73
72
|
*/
|
|
74
73
|
export function AuthShellPanel({ children, className, ...rest }) {
|
|
75
74
|
const cm = getClassMap();
|
|
76
|
-
return (_jsx("aside", { className: cm.cn(
|
|
75
|
+
return (_jsx("aside", { className: cm.cn(cm.authShellPanel, className), ...rest, children: children }));
|
|
77
76
|
}
|
|
78
77
|
/**
|
|
79
78
|
* Centered-flex section or main column for the form-card half of a split or stacked auth layout.
|
|
@@ -87,7 +86,7 @@ export function AuthShellCardColumn({ children, className, as = 'section', ...re
|
|
|
87
86
|
// width, so a wide form pushes the whole page past the viewport on
|
|
88
87
|
// mobile (a 24-87px horizontal overflow). min-w-0 lets it shrink; the
|
|
89
88
|
// card's own max-w-* still caps its width.
|
|
90
|
-
|
|
89
|
+
cm.minW(0), className), ...rest, children: children }));
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* Convenience preset composing container, decoration, card, heading, footer, and back-link into a single component.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-auth-shell-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Auth-page layout shell — centered card with heading/subheading/form/footer + back-link below. Composable children for per-app decorative background + brand mark.",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-auth-shell-react",
|
|
6
6
|
"type": "module",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@molecule/app-logger": "^1.0.1",
|
|
39
|
-
"@molecule/app-react": "^
|
|
39
|
+
"@molecule/app-react": "^4.0.0",
|
|
40
40
|
"@molecule/app-storage": "^1.0.1",
|
|
41
41
|
"@molecule/app-ui": "^1.0.1",
|
|
42
42
|
"react": "^18.0.0 || ^19.0.0",
|
|
43
43
|
"react-router": "^7.0.0 || ^8.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@molecule/app-logger": "1.0.
|
|
47
|
-
"@molecule/app-react": "
|
|
46
|
+
"@molecule/app-logger": "1.0.6",
|
|
47
|
+
"@molecule/app-react": "4.1.2",
|
|
48
48
|
"@molecule/app-storage": "1.1.0",
|
|
49
|
-
"@molecule/app-ui": "1.3.
|
|
49
|
+
"@molecule/app-ui": "1.3.11",
|
|
50
50
|
"@testing-library/react": "16.3.3",
|
|
51
51
|
"@types/node": "26.6.5",
|
|
52
52
|
"@types/react": "19.3.0",
|