@volksverpetzer/ui-web 0.1.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/dist/Badge.css ADDED
@@ -0,0 +1,29 @@
1
+ .vvp-ui-badge {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ border-radius: var(--vvp-radius-full, 9999px);
5
+ padding: var(--vvp-spacing-xs, 4px) var(--vvp-spacing-sm, 8px);
6
+ font-size: var(--vvp-font-size-xs, 12px);
7
+ font-weight: 700;
8
+ line-height: 1.2;
9
+ }
10
+
11
+ .vvp-ui-badge--primary {
12
+ background: var(--vvp-primary, #1b7194);
13
+ color: var(--vvp-on-primary, #fff);
14
+ }
15
+
16
+ .vvp-ui-badge--accent {
17
+ background: var(--vvp-accent, #db2685);
18
+ color: var(--vvp-on-primary, #fff);
19
+ }
20
+
21
+ .vvp-ui-badge--neutral {
22
+ background: var(--vvp-surface, #e2f0f5);
23
+ color: var(--vvp-text-muted, #666);
24
+ }
25
+
26
+ .vvp-ui-badge--error {
27
+ background: var(--vvp-error, #c62828);
28
+ color: var(--vvp-on-error, #fff);
29
+ }
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import "./Badge.css";
3
+ export type BadgeVariant = "primary" | "accent" | "neutral" | "error";
4
+ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
5
+ variant?: BadgeVariant;
6
+ children: ReactNode;
7
+ }
8
+ /** Small pill label — category tags, status markers, counts. */
9
+ export declare function Badge({ variant, className, children, ...rest }: BadgeProps): import("react").JSX.Element;
package/dist/Badge.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./Badge.css";
3
+ /** Small pill label — category tags, status markers, counts. */
4
+ export function Badge({ variant = "neutral", className, children, ...rest }) {
5
+ const classes = ["vvp-ui-badge", `vvp-ui-badge--${variant}`, className].filter(Boolean).join(" ");
6
+ return (_jsx("span", { className: classes, ...rest, children: children }));
7
+ }
@@ -0,0 +1,64 @@
1
+ .vvp-ui-btn {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: var(--vvp-spacing-sm, 8px);
6
+ border: none;
7
+ border-radius: var(--vvp-radius-full, 9999px);
8
+ font-weight: 700;
9
+ cursor: pointer;
10
+ font-family: inherit;
11
+ line-height: 1;
12
+ transition:
13
+ background-color 0.15s ease,
14
+ color 0.15s ease,
15
+ opacity 0.15s ease;
16
+ }
17
+
18
+ .vvp-ui-btn:disabled {
19
+ opacity: 0.6;
20
+ cursor: not-allowed;
21
+ }
22
+
23
+ .vvp-ui-btn--sm {
24
+ padding: var(--vvp-spacing-sm, 8px) var(--vvp-spacing-lg, 16px);
25
+ font-size: var(--vvp-font-size-sm, 14px);
26
+ }
27
+
28
+ .vvp-ui-btn--md {
29
+ padding: var(--vvp-spacing-md, 10px) var(--vvp-spacing-xl, 20px);
30
+ font-size: var(--vvp-font-size-base, 16px);
31
+ }
32
+
33
+ .vvp-ui-btn--lg {
34
+ padding: var(--vvp-spacing-lg, 16px) var(--vvp-spacing-xxl, 24px);
35
+ font-size: var(--vvp-font-size-lg, 18px);
36
+ }
37
+
38
+ .vvp-ui-btn--primary {
39
+ background: var(--vvp-primary, #1b7194);
40
+ color: var(--vvp-on-primary, #fff);
41
+ }
42
+
43
+ .vvp-ui-btn--primary:hover:not(:disabled) {
44
+ background: var(--vvp-primary-muted, #3893c0);
45
+ }
46
+
47
+ .vvp-ui-btn--secondary {
48
+ background: var(--vvp-surface, #e2f0f5);
49
+ color: var(--vvp-text, #111);
50
+ }
51
+
52
+ .vvp-ui-btn--secondary:hover:not(:disabled) {
53
+ background: var(--vvp-surface-input, #badde8);
54
+ }
55
+
56
+ .vvp-ui-btn--ghost {
57
+ background: transparent;
58
+ color: var(--vvp-primary, #1b7194);
59
+ border: 2px solid var(--vvp-primary, #1b7194);
60
+ }
61
+
62
+ .vvp-ui-btn--ghost:hover:not(:disabled) {
63
+ background: var(--vvp-surface, #e2f0f5);
64
+ }
@@ -0,0 +1,16 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from "react";
2
+ import "./Button.css";
3
+ export type ButtonVariant = "primary" | "secondary" | "ghost";
4
+ export type ButtonSize = "sm" | "md" | "lg";
5
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ children: ReactNode;
9
+ }
10
+ /**
11
+ * Shared brand button. Styled entirely off the `--vvp-*` custom properties
12
+ * emitted by `@volksverpetzer/design-tokens` — the consuming app is
13
+ * responsible for loading a brand's token CSS (or SCSS, for Divi) before
14
+ * this renders.
15
+ */
16
+ export declare function Button({ variant, size, className, children, ...rest }: ButtonProps): import("react").JSX.Element;
package/dist/Button.js ADDED
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./Button.css";
3
+ /**
4
+ * Shared brand button. Styled entirely off the `--vvp-*` custom properties
5
+ * emitted by `@volksverpetzer/design-tokens` — the consuming app is
6
+ * responsible for loading a brand's token CSS (or SCSS, for Divi) before
7
+ * this renders.
8
+ */
9
+ export function Button({ variant = "primary", size = "md", className, children, ...rest }) {
10
+ const classes = ["vvp-ui-btn", `vvp-ui-btn--${variant}`, `vvp-ui-btn--${size}`, className]
11
+ .filter(Boolean)
12
+ .join(" ");
13
+ return (_jsx("button", { className: classes, ...rest, children: children }));
14
+ }
package/dist/Card.css ADDED
@@ -0,0 +1,9 @@
1
+ .vvp-ui-card {
2
+ background: var(--vvp-background, #fff);
3
+ border-radius: var(--vvp-radius-md, 12px);
4
+ padding: var(--vvp-spacing-lg, 16px);
5
+ }
6
+
7
+ .vvp-ui-card--bordered {
8
+ border: 1px solid var(--vvp-surface-input, #badde8);
9
+ }
package/dist/Card.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import "./Card.css";
3
+ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
4
+ bordered?: boolean;
5
+ children: ReactNode;
6
+ }
7
+ /** Generic content surface — section grouping, list items, form containers. */
8
+ export declare function Card({ bordered, className, children, ...rest }: CardProps): import("react").JSX.Element;
package/dist/Card.js ADDED
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./Card.css";
3
+ /** Generic content surface — section grouping, list items, form containers. */
4
+ export function Card({ bordered = false, className, children, ...rest }) {
5
+ const classes = ["vvp-ui-card", bordered && "vvp-ui-card--bordered", className].filter(Boolean).join(" ");
6
+ return (_jsx("div", { className: classes, ...rest, children: children }));
7
+ }
@@ -0,0 +1,3 @@
1
+ export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from "./Button";
2
+ export { Badge, type BadgeProps, type BadgeVariant } from "./Badge";
3
+ export { Card, type CardProps } from "./Card";
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { Button } from "./Button";
2
+ export { Badge } from "./Badge";
3
+ export { Card } from "./Card";
@@ -0,0 +1,105 @@
1
+ .vvp-ui-badge {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ border-radius: var(--vvp-radius-full, 9999px);
5
+ padding: var(--vvp-spacing-xs, 4px) var(--vvp-spacing-sm, 8px);
6
+ font-size: var(--vvp-font-size-xs, 12px);
7
+ font-weight: 700;
8
+ line-height: 1.2;
9
+ }
10
+
11
+ .vvp-ui-badge--primary {
12
+ background: var(--vvp-primary, #1b7194);
13
+ color: var(--vvp-on-primary, #fff);
14
+ }
15
+
16
+ .vvp-ui-badge--accent {
17
+ background: var(--vvp-accent, #db2685);
18
+ color: var(--vvp-on-primary, #fff);
19
+ }
20
+
21
+ .vvp-ui-badge--neutral {
22
+ background: var(--vvp-surface, #e2f0f5);
23
+ color: var(--vvp-text-muted, #666);
24
+ }
25
+
26
+ .vvp-ui-badge--error {
27
+ background: var(--vvp-error, #c62828);
28
+ color: var(--vvp-on-error, #fff);
29
+ }
30
+
31
+ .vvp-ui-btn {
32
+ display: inline-flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ gap: var(--vvp-spacing-sm, 8px);
36
+ border: none;
37
+ border-radius: var(--vvp-radius-full, 9999px);
38
+ font-weight: 700;
39
+ cursor: pointer;
40
+ font-family: inherit;
41
+ line-height: 1;
42
+ transition:
43
+ background-color 0.15s ease,
44
+ color 0.15s ease,
45
+ opacity 0.15s ease;
46
+ }
47
+
48
+ .vvp-ui-btn:disabled {
49
+ opacity: 0.6;
50
+ cursor: not-allowed;
51
+ }
52
+
53
+ .vvp-ui-btn--sm {
54
+ padding: var(--vvp-spacing-sm, 8px) var(--vvp-spacing-lg, 16px);
55
+ font-size: var(--vvp-font-size-sm, 14px);
56
+ }
57
+
58
+ .vvp-ui-btn--md {
59
+ padding: var(--vvp-spacing-md, 10px) var(--vvp-spacing-xl, 20px);
60
+ font-size: var(--vvp-font-size-base, 16px);
61
+ }
62
+
63
+ .vvp-ui-btn--lg {
64
+ padding: var(--vvp-spacing-lg, 16px) var(--vvp-spacing-xxl, 24px);
65
+ font-size: var(--vvp-font-size-lg, 18px);
66
+ }
67
+
68
+ .vvp-ui-btn--primary {
69
+ background: var(--vvp-primary, #1b7194);
70
+ color: var(--vvp-on-primary, #fff);
71
+ }
72
+
73
+ .vvp-ui-btn--primary:hover:not(:disabled) {
74
+ background: var(--vvp-primary-muted, #3893c0);
75
+ }
76
+
77
+ .vvp-ui-btn--secondary {
78
+ background: var(--vvp-surface, #e2f0f5);
79
+ color: var(--vvp-text, #111);
80
+ }
81
+
82
+ .vvp-ui-btn--secondary:hover:not(:disabled) {
83
+ background: var(--vvp-surface-input, #badde8);
84
+ }
85
+
86
+ .vvp-ui-btn--ghost {
87
+ background: transparent;
88
+ color: var(--vvp-primary, #1b7194);
89
+ border: 2px solid var(--vvp-primary, #1b7194);
90
+ }
91
+
92
+ .vvp-ui-btn--ghost:hover:not(:disabled) {
93
+ background: var(--vvp-surface, #e2f0f5);
94
+ }
95
+
96
+ .vvp-ui-card {
97
+ background: var(--vvp-background, #fff);
98
+ border-radius: var(--vvp-radius-md, 12px);
99
+ padding: var(--vvp-spacing-lg, 16px);
100
+ }
101
+
102
+ .vvp-ui-card--bordered {
103
+ border: 1px solid var(--vvp-surface-input, #badde8);
104
+ }
105
+
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@volksverpetzer/ui-web",
3
+ "version": "0.1.0",
4
+ "description": "Shared brand-visible React components (Button, Badge, Card) for vvp_link_shortener and vvp_divi5_extensions. Plain, hand-scoped CSS (vvp-ui-* class prefix) consuming the --vvp-* custom properties emitted by @volksverpetzer/design-tokens — no Tailwind classes, so it drops into a Tailwind app and Divi's WordPress-embedded CSS alike.",
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "registry": "https://registry.npmjs.org"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./styles.css": "./dist/styles.css"
19
+ },
20
+ "peerDependencies": {
21
+ "react": ">=19"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.json && node scripts/bundle-css.mjs",
25
+ "check:ts": "tsc --noEmit -p tsconfig.json"
26
+ },
27
+ "devDependencies": {
28
+ "@types/react": "^19.2.18",
29
+ "react": "^19.2.3",
30
+ "typescript": "^5.9.3"
31
+ }
32
+ }