@cosmicdrift/kumiko-renderer-web 0.140.0 → 0.141.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.141.0",
|
|
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.141.0",
|
|
20
|
+
"@cosmicdrift/kumiko-headless": "0.141.0",
|
|
21
|
+
"@cosmicdrift/kumiko-renderer": "0.141.0",
|
|
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
|
@@ -125,14 +125,14 @@ function DefaultButton({
|
|
|
125
125
|
variant = "primary",
|
|
126
126
|
size = "md",
|
|
127
127
|
ariaLabel,
|
|
128
|
-
|
|
128
|
+
width = "auto",
|
|
129
129
|
children,
|
|
130
130
|
testId,
|
|
131
131
|
}: ButtonProps): ReactNode {
|
|
132
132
|
// link-Variant rendert text-artig (Inline-Link im Fließtext/Banner), nicht als
|
|
133
|
-
// gepolsterte Fläche;
|
|
133
|
+
// gepolsterte Fläche; width="full" streckt CTA-Buttons in Karten/Panels.
|
|
134
134
|
const className =
|
|
135
|
-
[variant === "link" ? "h-auto px-0 py-0" : "",
|
|
135
|
+
[variant === "link" ? "h-auto px-0 py-0" : "", width === "full" ? "w-full" : ""]
|
|
136
136
|
.filter(Boolean)
|
|
137
137
|
.join(" ") || undefined;
|
|
138
138
|
return (
|
|
@@ -246,11 +246,11 @@ describe("Button size", () => {
|
|
|
246
246
|
expect(screen.getByRole("button", { name: "Entfernen" })).toBeTruthy();
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
-
test("
|
|
249
|
+
test('width="full" streckt den Button (w-full)', () => {
|
|
250
250
|
function WideBtn(): ReactNode {
|
|
251
251
|
const { Button } = usePrimitives();
|
|
252
252
|
return (
|
|
253
|
-
<Button
|
|
253
|
+
<Button width="full" onClick={() => {}}>
|
|
254
254
|
Upgrade
|
|
255
255
|
</Button>
|
|
256
256
|
);
|