Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -1,49 +1,58 @@
import type { ReactNode } from "react";
import { twClassNames } from "~/ui/utils";
import { Card } from "~/ui/components/Card";
import { IconWithBackground } from "~/ui/components/IconWithBackground";
import { Logo } from "~/ui/components/Logo";
type StatusTone = "positive" | "negative" | "neutral";
type CardSize = "small" | "medium" | "large" | "extra-large";
type SubtitleVariant = "regular-0" | "regular-150" | "medium-150";
const STATUS_BADGE: Record<StatusTone, string> = {
positive: "bg-surface-feedback-subtle-positive",
negative: "bg-surface-feedback-subtle-negative",
neutral: "bg-surface-feedback-subtle-neutral",
};
const STATUS_ICON: Record<StatusTone, string> = {
positive: "text-icon-feedback-positive",
negative: "text-icon-feedback-negative",
neutral: "text-icon-neutral-primary",
const SUBTITLE_CLS: Record<SubtitleVariant, string> = {
"regular-0": "text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-tertiary",
"regular-150": "text-body-small-regular-150 font-body-small-regular-150 text-text-neutral-tertiary",
"medium-150": "text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary",
};
// Gemeinsames Auth-Layout nach Davids Subframe-Auth-Screens (Login/Signup/Reset/2FA/Magic-Link):
// zentriertes Logo (64) + Card (Titel/Untertitel + Inhalt) + optionaler Footer. min-h-screen statt Davids
// h-full (Auth-Routen ohne full-height-Parent). Titel-Ausrichtung + Untertitel-Gewicht variieren je Screen
// in Davids Designs -> als Props (titleAlign/subtitleStrong). twClassNames, damit cardClassName Basis-Tokens
// (gap/shadow) sauber ueberschreibt.
// Gemeinsames Auth-Layout nach Davids WF-P2-Subframe-Auth-Screens (Login/Signup/Reset/2FA/Magic-Link):
// optionales Logo (64) + Davids ECHTE Card-Komponente (~/ui) + optionaler Footer. min-h-screen statt Davids
// h-full (Auth-Routen ohne full-height-Parent). Card-Groesse/Logo-Sichtbarkeit/Header-Abstand/Untertitel-Stil
// variieren je Screen in Davids Designs -> als Props (cardSize/showLogo/headerGap/subtitleVariant/titleAlign).
// Card statt Inline-Nachbau beseitigt Token-Drift (rounded-md/px-6/items-start kommen jetzt aus der Card).
// `items-stretch`-Override haelt Form-Kinder auf voller Breite (Davids Card-Root ist items-start).
export function AuthShell({
title,
subtitle,
children,
footer,
cardClassName = "max-w-[400px]",
cardSize = "large",
cardClassName = "max-w-[448px]",
showLogo = true,
logoIconOnly = false,
titleAlign = "start",
subtitleStrong = false,
titleAlign = "center",
headerGap = "gap-1.5",
subtitleVariant = "regular-150",
dataUiId,
}: {
title: ReactNode;
subtitle?: ReactNode;
children: ReactNode;
footer?: ReactNode;
/** Davids Card-Groesse. S01 Login/V01/V02 = large, S04 2FA = extra-large. */
cardSize?: CardSize;
/** Breite/Overrides der Card; Forms = max-w-[400px] (Default). */
cardClassName?: string;
/** Icon-only-Logo (wie Davids 2FA-/Status-Screens) statt vollem Wortmarken-Logo. */
/** Logo ueber der Card zeigen. Davids S01 Login/V01/V02 = ohne Logo. */
showLogo?: boolean;
/** Icon-only-Logo (wie Davids Auth-Screens, Logo size=64 hideText) statt vollem Wortmarken-Logo. */
logoIconOnly?: boolean;
/** Titel-/Untertitel-Ausrichtung. David: Login=center, Signup/Forgot/Reset/2FA=start. */
titleAlign?: "center" | "start";
/** Untertitel-Gewicht. David: Forgot/2FA = medium-150, sonst regular-0. */
subtitleStrong?: boolean;
/** Abstand Titel<->Untertitel. David: S01 Login = gap-1.5, sonst gap-1. */
headerGap?: string;
/** Untertitel-Stil. David: S01 Login = regular-150, 2FA/Forgot = medium-150, sonst regular-0. */
subtitleVariant?: SubtitleVariant;
dataUiId?: string;
}) {
return (
@@ -51,29 +60,16 @@ export function AuthShell({
className="flex min-h-screen w-full flex-col items-center justify-center gap-8 bg-surface-neutral-primary px-4 py-12 mobile:gap-6 mobile:py-6"
data-ui-id={dataUiId}
>
<Logo size="64" showIcon={logoIconOnly || undefined} hideText={logoIconOnly || undefined} />
<div
className={twClassNames(
"flex w-full flex-col items-stretch gap-4 rounded-lg border border-solid border-border-default bg-surface-neutral-secondary px-8 py-8 shadow-sm mobile:px-6",
cardClassName
)}
>
<div className={twClassNames("flex w-full flex-col gap-1", titleAlign === "center" ? "items-center" : "items-start")}>
{showLogo ? <Logo size="64" showIcon={logoIconOnly || undefined} hideText={logoIconOnly || undefined} /> : null}
<Card size={cardSize} variant="default" className={twClassNames("items-stretch", cardClassName)}>
<div className={twClassNames("flex w-full flex-col", headerGap, titleAlign === "center" ? "items-center" : "items-start")}>
<h1 className="text-heading- font-heading- text-text-neutral-primary">{title}</h1>
{subtitle ? (
<p
className={
subtitleStrong
? "text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary"
: "text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-tertiary"
}
>
{subtitle}
</p>
<p className={twClassNames(SUBTITLE_CLS[subtitleVariant], titleAlign === "center" ? "text-center" : "")}>{subtitle}</p>
) : null}
</div>
{children}
</div>
</Card>
{footer ? <div className="flex w-full flex-wrap items-center justify-center gap-2">{footer}</div> : null}
</div>
);
@@ -105,29 +101,44 @@ export function AuthStatus({
data-ui-id={dataUiId}
>
<Logo size="64" />
<div className="flex w-full max-w-[400px] flex-col items-center gap-6 rounded-lg border border-solid border-border-default bg-surface-neutral-secondary px-8 py-8 text-center shadow-sm mobile:px-6">
<div className={`flex h-12 w-12 flex-none items-center justify-center rounded-round ${STATUS_BADGE[tone]}`}>
<span className={`text-heading- font-heading- ${STATUS_ICON[tone]}`}>{icon}</span>
<Card size="large" variant="default" className="max-w-[448px] items-center text-center">
<div className="flex w-full flex-col items-center gap-4">
<IconWithBackground
variant={tone === "positive" ? "success" : tone === "negative" ? "destructive" : "neutral"}
size="extra-large"
round={true}
icon={icon}
/>
<div className="flex w-full flex-col items-center gap-2">
<h1 className="text-center text-heading- font-heading- text-text-neutral-primary">{title}</h1>
<p className="text-center text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary">{message}</p>
{hint ? (
<p className="text-center text-body-extra-small-regular-0 font-body-extra-small-regular-0 text-text-neutral-tertiary">{hint}</p>
) : null}
</div>
</div>
<div className="flex w-full flex-col items-center gap-2">
<h1 className="text-center text-heading- font-heading- text-text-neutral-primary">{title}</h1>
<p className="text-center text-body-small-medium-150 font-body-small-medium-150 text-text-neutral-tertiary">{message}</p>
{hint ? (
<p className="text-center text-body-extra-small-regular-0 font-body-extra-small-regular-0 text-text-neutral-tertiary">{hint}</p>
) : null}
</div>
{children ? <div className="flex w-full flex-col items-center gap-3">{children}</div> : null}
</div>
{children ? <div className="flex w-full flex-col items-center gap-3 py-1">{children}</div> : null}
</Card>
</div>
);
}
// Davids "oder"-Trenner zwischen Primär- und Sekundär-Aktion (z.B. Login vs. Magic-Link).
export function AuthDivider({ label }: { label: ReactNode }) {
export function AuthDivider({ label, labelSize = "small" }: { label: ReactNode; labelSize?: "small" | "extra-small" }) {
return (
<div className="flex w-full items-center justify-center gap-3">
<div className="flex h-px grow shrink-0 basis-0 flex-col items-center bg-border-default" />
<span className="text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-tertiary">{label}</span>
<span
className={twClassNames(
"text-body-small-regular-0 font-body-small-regular-0 text-text-neutral-tertiary",
{
"text-body-extra-small-regular-150 font-body-extra-small-regular-150":
labelSize === "extra-small",
}
)}
>
{label}
</span>
<div className="flex h-px grow shrink-0 basis-0 flex-col items-center bg-border-default" />
</div>
);