@volksverpetzer/ui-web 0.8.0 → 0.9.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/Button.css CHANGED
@@ -9,6 +9,7 @@
9
9
  cursor: pointer;
10
10
  font-family: inherit;
11
11
  line-height: 1;
12
+ text-decoration: none;
12
13
  transition:
13
14
  background-color 0.15s ease,
14
15
  color 0.15s ease,
@@ -0,0 +1,37 @@
1
+ /*
2
+ * LinkButton's fixed look: a subtle bordered "pill card" with a soft
3
+ * drop shadow, distinct from Button's ghost variant (see LinkButton.tsx
4
+ * for why). Colors are expressed via the same --vvp-* tokens Button.css
5
+ * uses, so this stays in sync with the shared palette automatically.
6
+ *
7
+ * The shadow comes from @volksverpetzer/design-tokens'
8
+ * --vvp-elevation-accent-* — the one brand-tinted exception to that
9
+ * package's otherwise-neutral elevation scale (see elevation-accent.json).
10
+ * The literal color-mix() here is only a fallback for apps that haven't
11
+ * loaded elevation-accent.css; it must stay in sync with that token.
12
+ */
13
+ .vvp-ui-linkbtn {
14
+ border-radius: var(--vvp-radius-md, 12px);
15
+ background: transparent;
16
+ color: var(--vvp-primary, #1b7194);
17
+ border: 1.5px solid var(--vvp-surface, #e2f0f5);
18
+ box-shadow: var(
19
+ --vvp-elevation-accent-rest,
20
+ 0px 8px 20px color-mix(in srgb, var(--vvp-primary-muted, #3893c0) 6%, transparent)
21
+ );
22
+ transition:
23
+ transform 120ms ease,
24
+ box-shadow 120ms ease,
25
+ border-color 120ms ease,
26
+ background 120ms ease;
27
+ }
28
+
29
+ .vvp-ui-linkbtn:hover {
30
+ transform: translateY(-1px);
31
+ border-color: var(--vvp-primary-muted, #3893c0);
32
+ background: var(--vvp-surface, #e2f0f5);
33
+ box-shadow: var(
34
+ --vvp-elevation-accent-hover,
35
+ 0px 8px 20px color-mix(in srgb, var(--vvp-primary-muted, #3893c0) 18%, transparent)
36
+ );
37
+ }
@@ -0,0 +1,21 @@
1
+ import type { AnchorHTMLAttributes, ReactNode } from "react";
2
+ import type { ButtonSize } from "./Button";
3
+ import "./Button.css";
4
+ import "./LinkButton.css";
5
+ export interface LinkButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
6
+ href: string;
7
+ size?: ButtonSize;
8
+ children: ReactNode;
9
+ }
10
+ /**
11
+ * Anchor-based counterpart to `Button` — for navigation (external links,
12
+ * downloads), where an actual link is the correct element, not a button
13
+ * with an onClick that changes location.
14
+ *
15
+ * Unlike `Button`, this has no `variant` choice: a link is inherently a
16
+ * secondary/tertiary action, never a page's primary CTA, so it always
17
+ * renders the one bordered, low-emphasis look (see LinkButton.css) rather
18
+ * than reusing `Button`'s ghost variant directly — `Button`'s ghost shape
19
+ * is shared with `ThemeToggle`, which needs its own pill/circle geometry.
20
+ */
21
+ export declare const LinkButton: import("react").ForwardRefExoticComponent<LinkButtonProps & import("react").RefAttributes<HTMLAnchorElement>>;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import "./Button.css";
4
+ import "./LinkButton.css";
5
+ /**
6
+ * Anchor-based counterpart to `Button` — for navigation (external links,
7
+ * downloads), where an actual link is the correct element, not a button
8
+ * with an onClick that changes location.
9
+ *
10
+ * Unlike `Button`, this has no `variant` choice: a link is inherently a
11
+ * secondary/tertiary action, never a page's primary CTA, so it always
12
+ * renders the one bordered, low-emphasis look (see LinkButton.css) rather
13
+ * than reusing `Button`'s ghost variant directly — `Button`'s ghost shape
14
+ * is shared with `ThemeToggle`, which needs its own pill/circle geometry.
15
+ */
16
+ export const LinkButton = forwardRef(function LinkButton({ size = "md", className, children, ...rest }, ref) {
17
+ const classes = [
18
+ "vvp-ui-btn",
19
+ "vvp-ui-linkbtn",
20
+ `vvp-ui-btn--${size}`,
21
+ className,
22
+ ]
23
+ .filter(Boolean)
24
+ .join(" ");
25
+ return (_jsx("a", { ref: ref, className: classes, ...rest, children: children }));
26
+ });
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Button, type ButtonProps, type ButtonVariant, type ButtonSize, } from "./Button";
2
+ export { LinkButton, type LinkButtonProps } from "./LinkButton";
2
3
  export { Badge, type BadgeProps, type BadgeVariant } from "./Badge";
3
4
  export { Card, type CardProps } from "./Card";
4
5
  export { ProgressBar, type ProgressBarProps, type ProgressBarMilestone, } from "./ProgressBar";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { Button, } from "./Button";
2
+ export { LinkButton } from "./LinkButton";
2
3
  export { Badge } from "./Badge";
3
4
  export { Card } from "./Card";
4
5
  export { ProgressBar, } from "./ProgressBar";
package/dist/styles.css CHANGED
@@ -85,6 +85,7 @@
85
85
  cursor: pointer;
86
86
  font-family: inherit;
87
87
  line-height: 1;
88
+ text-decoration: none;
88
89
  transition:
89
90
  background-color 0.15s ease,
90
91
  color 0.15s ease,
@@ -216,6 +217,44 @@
216
217
  outline-color: var(--vvp-error, #c62828);
217
218
  }
218
219
 
220
+ /*
221
+ * LinkButton's fixed look: a subtle bordered "pill card" with a soft
222
+ * drop shadow, distinct from Button's ghost variant (see LinkButton.tsx
223
+ * for why). Colors are expressed via the same --vvp-* tokens Button.css
224
+ * uses, so this stays in sync with the shared palette automatically.
225
+ *
226
+ * The shadow comes from @volksverpetzer/design-tokens'
227
+ * --vvp-elevation-accent-* — the one brand-tinted exception to that
228
+ * package's otherwise-neutral elevation scale (see elevation-accent.json).
229
+ * The literal color-mix() here is only a fallback for apps that haven't
230
+ * loaded elevation-accent.css; it must stay in sync with that token.
231
+ */
232
+ .vvp-ui-linkbtn {
233
+ border-radius: var(--vvp-radius-md, 12px);
234
+ background: transparent;
235
+ color: var(--vvp-primary, #1b7194);
236
+ border: 1.5px solid var(--vvp-surface, #e2f0f5);
237
+ box-shadow: var(
238
+ --vvp-elevation-accent-rest,
239
+ 0px 8px 20px color-mix(in srgb, var(--vvp-primary-muted, #3893c0) 6%, transparent)
240
+ );
241
+ transition:
242
+ transform 120ms ease,
243
+ box-shadow 120ms ease,
244
+ border-color 120ms ease,
245
+ background 120ms ease;
246
+ }
247
+
248
+ .vvp-ui-linkbtn:hover {
249
+ transform: translateY(-1px);
250
+ border-color: var(--vvp-primary-muted, #3893c0);
251
+ background: var(--vvp-surface, #e2f0f5);
252
+ box-shadow: var(
253
+ --vvp-elevation-accent-hover,
254
+ 0px 8px 20px color-mix(in srgb, var(--vvp-primary-muted, #3893c0) 18%, transparent)
255
+ );
256
+ }
257
+
219
258
  .vvp-ui-progress {
220
259
  width: 100%;
221
260
  text-align: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volksverpetzer/ui-web",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Shared brand-visible React components (Button, Badge, Card, ProgressBar, Input, Alert, Slider, ThemeToggle) for vvp_link_shortener, vvp_divi5_extensions, crowdfunding, and vectorcrawl. 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
5
  "type": "module",
6
6
  "license": "MIT",