@supertype.ai/foundations 0.1.32 → 0.1.33

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/README.md CHANGED
@@ -66,7 +66,7 @@ untagged git dependency resolves to a different commit on a fresh install.
66
66
 
67
67
  ```jsonc
68
68
  // package.json
69
- "@supertype.ai/foundations": "https://github.com/supertypeai/foundations.git#v0.1.32"
69
+ "@supertype.ai/foundations": "https://github.com/supertypeai/foundations.git#v0.1.33"
70
70
  ```
71
71
 
72
72
  </details>
@@ -54,7 +54,8 @@ export declare function TypographyH3({ className, variant, children, ...props }:
54
54
  /** The card / panel title: 14px in the product, 20 on an editorial surface. */
55
55
  export declare function TypographyH4({ className, children, ...props }: React.ComponentProps<"h4">): import("react").JSX.Element;
56
56
  declare const eyebrowVariants: (props?: ({
57
- tone?: "label" | "heading" | null | undefined;
57
+ tone?: "muted" | "label" | "heading" | "subtle" | null | undefined;
58
+ size?: "sm" | "xs" | "2xs" | "3xs" | null | undefined;
58
59
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
59
60
  /**
60
61
  * The eyebrow's ramp as a class, for a caller that cannot render our element —
@@ -62,7 +63,7 @@ declare const eyebrowVariants: (props?: ({
62
63
  * `headingClass`. It exists so a consumer needing the class can take ours rather
63
64
  * than hand-rolling a copy that drifts from the component.
64
65
  */
65
- export declare const eyebrowClass: (tone?: VariantProps<typeof eyebrowVariants>["tone"]) => string;
66
+ export declare const eyebrowClass: (tone?: VariantProps<typeof eyebrowVariants>["tone"], size?: VariantProps<typeof eyebrowVariants>["size"]) => string;
66
67
  /**
67
68
  * An all-caps micro-label above a stat or a group of controls, and — since the
68
69
  * deck was folded into it — the standfirst that sits with a page title.
@@ -70,5 +71,5 @@ export declare const eyebrowClass: (tone?: VariantProps<typeof eyebrowVariants>[
70
71
  * `as` covers the case the span cannot: an eyebrow that is also the section's
71
72
  * heading. See `TypographyTag` in as.tsx for why the classes hold across tags.
72
73
  */
73
- export declare function TypographyEyebrow({ className, tone, as, children, ...props }: WithAs<VariantProps<typeof eyebrowVariants>>): import("react").JSX.Element;
74
+ export declare function TypographyEyebrow({ className, tone, size, as, children, ...props }: WithAs<VariantProps<typeof eyebrowVariants>>): import("react").JSX.Element;
74
75
  export {};
@@ -92,15 +92,32 @@ export function TypographyH4({ className, children, ...props }) {
92
92
  }
93
93
  const eyebrowVariants = cva("block uppercase tracking-wider", {
94
94
  variants: {
95
+ /** Ink and weight. Every tone states its ink: an eyebrow names the section
96
+ * under it, and one that takes its colour from its surroundings is not a
97
+ * heading. Weight is load-bearing too, since caps at this size lose their
98
+ * shape at 400. */
95
99
  tone: {
96
- /**
97
- * Weight is load-bearing here: uppercase at this size loses shape at 400.
98
- * Primary ink, stated not inherited — an eyebrow names the section under it,
99
- * and one that turns red from its surroundings is not a heading.
100
- */
101
100
  heading: "text-xs font-semibold text-[color:var(--ink,var(--foreground))]",
102
101
  /** Stat cards invert it: the figure is the headline, so the label yields. */
103
102
  label: "text-2xs font-medium text-accent-foreground",
103
+ /** The dense product default: a micro-label over a group of controls,
104
+ * quiet enough that the rows under it stay the thing being read. */
105
+ muted: "text-2xs font-medium text-[color:var(--ink-muted,var(--muted-foreground))]",
106
+ /** A rung quieter again, for a label the reader only needs on the way past:
107
+ * a column head in a mock, a rail marker, a key in a spec table. */
108
+ subtle: "text-2xs font-medium text-subtle-foreground",
109
+ },
110
+ /**
111
+ * The rung, when the tone's own is wrong for the surface — a dense table head
112
+ * wants the smallest one, a page standfirst the largest. Declared after the
113
+ * tone so the merge keeps this one, and omitted it leaves the tone's rung
114
+ * standing, which is what every existing call site relies on.
115
+ */
116
+ size: {
117
+ sm: "text-sm",
118
+ xs: "text-xs",
119
+ "2xs": "text-2xs",
120
+ "3xs": "text-3xs",
104
121
  },
105
122
  },
106
123
  defaultVariants: { tone: "heading" },
@@ -111,7 +128,7 @@ const eyebrowVariants = cva("block uppercase tracking-wider", {
111
128
  * `headingClass`. It exists so a consumer needing the class can take ours rather
112
129
  * than hand-rolling a copy that drifts from the component.
113
130
  */
114
- export const eyebrowClass = (tone) => eyebrowVariants({ tone });
131
+ export const eyebrowClass = (tone, size) => eyebrowVariants({ tone, size });
115
132
  /**
116
133
  * An all-caps micro-label above a stat or a group of controls, and — since the
117
134
  * deck was folded into it — the standfirst that sits with a page title.
@@ -119,6 +136,6 @@ export const eyebrowClass = (tone) => eyebrowVariants({ tone });
119
136
  * `as` covers the case the span cannot: an eyebrow that is also the section's
120
137
  * heading. See `TypographyTag` in as.tsx for why the classes hold across tags.
121
138
  */
122
- export function TypographyEyebrow({ className, tone, as, children, ...props }) {
123
- return (_jsx(TextAs, { as: as, className: cn(eyebrowVariants({ tone }), className), ...props, children: children }));
139
+ export function TypographyEyebrow({ className, tone, size, as, children, ...props }) {
140
+ return (_jsx(TextAs, { as: as, className: cn(eyebrowVariants({ tone, size }), className), ...props, children: children }));
124
141
  }
@@ -55,10 +55,11 @@ export declare function TypographyProseList(props: Preset<ListProps, typeof PROS
55
55
  * `sm` is the default because meta is separated from body by ink, not size;
56
56
  * the smaller rungs are a deliberate step down, not the norm.
57
57
  *
58
- * Leading is pinned per size rather than left to the rung. Plenty of captions
59
- * are a wrapped sentence, and the ramp's tight setting sets those cramped
60
- * descenders nearly on the caps below. `leading-normal` writes `--tw-leading`,
61
- * the variable the `text-*` step reads, so 1.5 wins at every rung.
58
+ * The two upper rungs open their leading past the ramp: plenty of captions are
59
+ * a wrapped sentence, and the ramp sets those cramped at reading rungs. The
60
+ * micro rung keeps whatever the ramp gives it, which is already tuned tight —
61
+ * half again the glyph height at 11px reads as a stray gap under a one-line
62
+ * note, and it is the rung the labels beside it are set on.
62
63
  *
63
64
  * `inherit` is the parenthetical inside a heading, an eyebrow or a stat. It
64
65
  * takes the size of whatever set it and resets the weight, because the only
@@ -86,10 +86,11 @@ export function TypographyProseList(props) {
86
86
  * `sm` is the default because meta is separated from body by ink, not size;
87
87
  * the smaller rungs are a deliberate step down, not the norm.
88
88
  *
89
- * Leading is pinned per size rather than left to the rung. Plenty of captions
90
- * are a wrapped sentence, and the ramp's tight setting sets those cramped
91
- * descenders nearly on the caps below. `leading-normal` writes `--tw-leading`,
92
- * the variable the `text-*` step reads, so 1.5 wins at every rung.
89
+ * The two upper rungs open their leading past the ramp: plenty of captions are
90
+ * a wrapped sentence, and the ramp sets those cramped at reading rungs. The
91
+ * micro rung keeps whatever the ramp gives it, which is already tuned tight —
92
+ * half again the glyph height at 11px reads as a stray gap under a one-line
93
+ * note, and it is the rung the labels beside it are set on.
93
94
  *
94
95
  * `inherit` is the parenthetical inside a heading, an eyebrow or a stat. It
95
96
  * takes the size of whatever set it and resets the weight, because the only
@@ -101,7 +102,7 @@ const captionVariants = cva("text-[color:var(--ink-muted,var(--muted-foreground)
101
102
  size: {
102
103
  sm: "text-sm leading-normal",
103
104
  xs: "text-xs leading-normal",
104
- "2xs": "text-2xs leading-normal",
105
+ "2xs": "text-2xs",
105
106
  inherit: "font-normal",
106
107
  },
107
108
  },
package/llms.txt CHANGED
@@ -90,7 +90,7 @@ silently. Full reference: https://github.com/supertypeai/foundations
90
90
  - `TypographyMuted`, `TypographyProse`, `TypographyProseList` are presets. The
91
91
  prop each one pins is dropped from its type, so passing it fails to compile.
92
92
  - `TypographyCaption`, `TypographyLabel`, `TypographySmall`: `size?: "sm" | "xs" | "2xs" | "inherit"`, `as?`.
93
- - `TypographyEyebrow`: `tone?: "heading" | "label"`, `as?`.
93
+ - `TypographyEyebrow`: `tone?: "heading" | "label" | "muted" | "subtle"`, `size?: "sm" | "xs" | "2xs" | "3xs"`, `as?`. Each tone carries the rung it is usually set at and `size` overrides it, so omitting it changes nothing. Reach for `muted` for the uppercase micro-label a dense product sets over a group of controls, and `subtle` for a column head or rail marker read on the way past — that shape hand-rolled is the most common way an app ends up spelling type classes.
94
94
  - `TypographyStat`: `size?: "inherit" | "card" | "panel" | "page" | "display"`, `figures?: "tabular" | "proportional"`. Keep tabular where a value updates in place.
95
95
  - `TypographyLink`: `href` (required), `tone?: Tone` (default `muted`), `addArrow?`, `newTab?`. The href decides internal versus external.
96
96
  - `TypographyHighlight`: `tone?: HighlightTone`, one of `"primary" | "success" | "ochre" | "terracotta" | "sage" | "fig"`, plus `seed?: number`. A separate type from `Tone` on purpose: this axis is categorical (which one it is) where `Tone` is semantic (what it means), the same split theme.css draws between the earth swatches and the status tokens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supertype.ai/foundations",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public",