@stll/ui 0.49.0 → 0.49.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.
@@ -1,5 +1,10 @@
1
1
  import * as React$1 from "react";
2
+ import { VariantProps } from "class-variance-authority";
2
3
  //#region src/components/prose.d.ts
4
+ declare const proseVariants: (props?: ({
5
+ size?: "default" | "lede" | "sm" | null | undefined;
6
+ tone?: "default" | "muted" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
3
8
  /** A readable measure for narrative copy; task-shaped text should not use it. */
4
- export declare const Prose: ({ className, ...props }: React$1.ComponentProps<"p">) => React$1.JSX.Element;
9
+ export declare const Prose: ({ className, size, tone, ...props }: React$1.ComponentProps<"p"> & VariantProps<typeof proseVariants>) => React$1.JSX.Element;
5
10
  //#endregion
@@ -1,9 +1,33 @@
1
1
  import { cn } from "../lib/utils.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
3
4
  //#region src/components/prose.tsx
5
+ const proseVariants = cva("max-w-[80ch] leading-relaxed", {
6
+ defaultVariants: {
7
+ size: "default",
8
+ tone: "default"
9
+ },
10
+ variants: {
11
+ size: {
12
+ default: "",
13
+ /** Supporting copy under a heading or inside a card. */
14
+ sm: "text-sm leading-6 text-pretty",
15
+ /** A page lede: small on phones, body size from `sm` up. */
16
+ lede: "text-sm leading-6 text-pretty sm:text-base"
17
+ },
18
+ tone: {
19
+ default: "",
20
+ /** Secondary narrative that sits beside a primary line. */
21
+ muted: "text-muted-foreground"
22
+ }
23
+ }
24
+ });
4
25
  /** A readable measure for narrative copy; task-shaped text should not use it. */
5
- const Prose = ({ className, ...props }) => /* @__PURE__ */ jsx("p", {
6
- className: cn("max-w-[80ch] leading-relaxed", className),
26
+ const Prose = ({ className, size, tone, ...props }) => /* @__PURE__ */ jsx("p", {
27
+ className: cn(proseVariants({
28
+ size,
29
+ tone
30
+ }), className),
7
31
  ...props
8
32
  });
9
33
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/ui",
3
- "version": "0.49.0",
3
+ "version": "0.49.1",
4
4
  "description": "Stella's design system: bidi-aware React primitives built on Base UI, the dockable inspector pane, and the Tailwind v4 theme they are styled with.",
5
5
  "keywords": [
6
6
  "base-ui",