@cosmicdrift/kumiko-renderer-web 0.129.0 → 0.130.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/package.json +4 -4
- package/src/primitives/index.tsx +21 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.1",
|
|
4
4
|
"description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"./styles.css": "./src/styles.css"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
20
|
-
"@cosmicdrift/kumiko-headless": "0.
|
|
21
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
19
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.130.1",
|
|
20
|
+
"@cosmicdrift/kumiko-headless": "0.130.1",
|
|
21
|
+
"@cosmicdrift/kumiko-renderer": "0.130.1",
|
|
22
22
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
23
23
|
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
24
24
|
"@radix-ui/react-label": "^2.1.8",
|
package/src/primitives/index.tsx
CHANGED
|
@@ -1434,22 +1434,38 @@ function DefaultForm({
|
|
|
1434
1434
|
);
|
|
1435
1435
|
}
|
|
1436
1436
|
|
|
1437
|
-
// Kanonische Form/Settings-Shell: zentrierte
|
|
1438
|
-
//
|
|
1439
|
-
//
|
|
1440
|
-
// Zentrierung statt per-Screen-Wildwuchs.
|
|
1437
|
+
// Kanonische Form/Settings-Shell: zentrierte Spalte mit Standard-Screen-
|
|
1438
|
+
// Padding. DefaultForm (configEdit/entityEdit) UND custom Settings-Screens
|
|
1439
|
+
// (url-settings, privacy-center) teilen sie → einheitliche Breite +
|
|
1440
|
+
// Zentrierung statt per-Screen-Wildwuchs. Breite über `maxWidth`-Intent statt
|
|
1441
|
+
// beliebiger max-w-*-Overrides: sm=schmale Auth-Forms, 3xl=Standard-Detail,
|
|
1442
|
+
// 4xl=tabellen-nahe Forms, full=volle Breite. Inhalt nutzt Card-Primitives;
|
|
1441
1443
|
// `className` (z.B. "flex flex-col gap-6") für Multi-Card-Stacks.
|
|
1444
|
+
export type FormScreenShellWidth = "sm" | "3xl" | "4xl" | "full";
|
|
1445
|
+
|
|
1446
|
+
const formScreenShellWidth: Record<FormScreenShellWidth, string> = {
|
|
1447
|
+
sm: "max-w-sm mx-auto",
|
|
1448
|
+
"3xl": "max-w-3xl mx-auto",
|
|
1449
|
+
"4xl": "max-w-4xl mx-auto",
|
|
1450
|
+
full: "max-w-full",
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1442
1453
|
export function FormScreenShell({
|
|
1443
1454
|
children,
|
|
1444
1455
|
className,
|
|
1445
1456
|
testId,
|
|
1457
|
+
maxWidth = "3xl",
|
|
1446
1458
|
}: {
|
|
1447
1459
|
readonly children: ReactNode;
|
|
1448
1460
|
readonly className?: string;
|
|
1449
1461
|
readonly testId?: string;
|
|
1462
|
+
readonly maxWidth?: FormScreenShellWidth;
|
|
1450
1463
|
}): ReactNode {
|
|
1451
1464
|
return (
|
|
1452
|
-
<div
|
|
1465
|
+
<div
|
|
1466
|
+
data-testid={testId}
|
|
1467
|
+
className={cn("px-6 pt-6 pb-12 w-full", formScreenShellWidth[maxWidth], className)}
|
|
1468
|
+
>
|
|
1453
1469
|
{children}
|
|
1454
1470
|
</div>
|
|
1455
1471
|
);
|