@supertype.ai/foundations 0.1.27 → 0.1.29
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 +2 -3
- package/dist/blocks/badge.d.ts +24 -0
- package/dist/blocks/badge.js +80 -0
- package/dist/blocks/button.d.ts +24 -0
- package/dist/blocks/button.js +117 -0
- package/dist/blocks/callout.d.ts +2 -39
- package/dist/blocks/callout.js +13 -38
- package/dist/blocks/card.js +22 -2
- package/dist/blocks/focus.d.ts +9 -0
- package/dist/blocks/focus.js +9 -0
- package/dist/blocks/index.d.ts +3 -1
- package/dist/blocks/index.js +3 -1
- package/dist/blocks/interactive-accordion.js +2 -1
- package/dist/blocks/render-as.d.ts +11 -0
- package/dist/blocks/render-as.js +22 -0
- package/dist/blocks/segment.d.ts +22 -14
- package/dist/blocks/segment.js +23 -14
- package/dist/blocks/tabs.d.ts +52 -17
- package/dist/blocks/tabs.js +86 -37
- package/dist/cjs/eslint.js +17 -8
- package/dist/contrast.d.ts +29 -0
- package/dist/contrast.js +26 -8
- package/dist/eslint.d.ts +24 -6
- package/dist/eslint.js +16 -8
- package/dist/essay/essay.js +14 -6
- package/dist/essay/index.d.ts +1 -1
- package/dist/essay/index.js +1 -1
- package/dist/essay/layout.d.ts +36 -0
- package/dist/essay/layout.js +32 -0
- package/dist/essay/reading.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/mdx.d.ts +26 -4
- package/dist/mdx.js +30 -4
- package/dist/seo.d.ts +4 -2
- package/dist/seo.js +14 -5
- package/dist/tone.d.ts +101 -0
- package/dist/tone.js +111 -0
- package/dist/typography/header.d.ts +30 -0
- package/dist/typography/header.js +7 -2
- package/dist/typography/highlight.d.ts +4 -4
- package/dist/typography/highlight.js +4 -4
- package/dist/typography/paragraph.d.ts +3 -13
- package/dist/typography/paragraph.js +13 -9
- package/llms.txt +34 -12
- package/package.json +2 -1
- package/src/theme.css +70 -26
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { Link } from "next-view-transitions";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../cn.js";
|
|
5
|
+
import { toneClass } from "../tone.js";
|
|
5
6
|
import { TextAs } from "./as.js";
|
|
6
7
|
/** The body layer: two axes and no more. A paragraph picks a rung and an ink; a
|
|
7
8
|
* caption is always secondary ink and picks a size. `lead` was a third rung a
|
|
@@ -190,17 +191,20 @@ export function TypographyInlineCode({ className, children, ...props }) {
|
|
|
190
191
|
return (_jsx("code", { className: cn("rounded-[3px] bg-foreground/[0.03] px-[0.3em] py-[0.1em] font-mono text-[0.9em] text-secondary-ink", className), ...props, children: children }));
|
|
191
192
|
}
|
|
192
193
|
/**
|
|
193
|
-
* A statement about the surface, not the link: `
|
|
194
|
+
* A statement about the surface, not the link: `muted` inside a paragraph,
|
|
194
195
|
* `primary` when the link is the point of the line, `secondary` for a note
|
|
195
|
-
* beneath a hero where `primary` would compete with the CTA beside it.
|
|
196
|
+
* beneath a hero where `primary` would compete with the CTA beside it. The other
|
|
197
|
+
* four come free, and a link inside a warning should be able to say so.
|
|
198
|
+
*
|
|
199
|
+
* This was `foreground | primary | secondary`, a private list whose first member
|
|
200
|
+
* was "no meaning at all" spelled a third way — `foreground` here, `muted` in
|
|
201
|
+
* Callout, `default` on a button. Now it is ../tone.ts, the same seven the other
|
|
202
|
+
* two take, and the weight is uniform: `secondary` alone used to skip
|
|
203
|
+
* `font-medium`, which read as a lighter link rather than a differently-coloured
|
|
204
|
+
* one.
|
|
196
205
|
*/
|
|
197
|
-
const LINK_TONES = {
|
|
198
|
-
foreground: "font-medium text-foreground",
|
|
199
|
-
primary: "font-medium text-primary",
|
|
200
|
-
secondary: "text-secondary-ink",
|
|
201
|
-
};
|
|
202
206
|
const LINK_DECORATION = "underline decoration-dotted decoration-1 decoration-muted-foreground decoration-skip-ink-none underline-offset-2 hover:decoration-solid hover:decoration-current/70";
|
|
203
|
-
const linkClass = (tone = "
|
|
207
|
+
const linkClass = (tone = "muted", className) => cn(toneClass(tone), "font-medium text-(color:--tone-hue)", LINK_DECORATION, className);
|
|
204
208
|
/**
|
|
205
209
|
* The inline link.
|
|
206
210
|
*
|
|
@@ -217,7 +221,7 @@ const linkClass = (tone = "foreground", className) => cn(LINK_TONES[tone], LINK_
|
|
|
217
221
|
* not be imported by name. One call site ended up on the unbound version that
|
|
218
222
|
* way and lost its decoration.
|
|
219
223
|
*/
|
|
220
|
-
export function TypographyLink({ href, children, tone = "
|
|
224
|
+
export function TypographyLink({ href, children, tone = "muted", newTab, addArrow, className, ...props }) {
|
|
221
225
|
const style = linkClass(tone, className);
|
|
222
226
|
const external = /^[a-z][a-z0-9+.-]*:/i.test(href);
|
|
223
227
|
const body = (_jsxs(_Fragment, { children: [children, addArrow && (_jsx("svg", { "aria-hidden": "true", className: "ml-1 inline size-3.5 align-middle", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: external ? "M7 17 17 7M7 7h10v10" : "M5 12h14M12 5l7 7-7 7" }) }))] }));
|
package/llms.txt
CHANGED
|
@@ -41,13 +41,16 @@ reference: https://github.com/supertypeai/foundations
|
|
|
41
41
|
| inline code | `TypographyInlineCode` | root |
|
|
42
42
|
| a link | `TypographyLink` | root |
|
|
43
43
|
| a highlighted phrase | `TypographyHighlight` | root |
|
|
44
|
+
| a button, or a link that looks like one | `Button` | `/blocks` |
|
|
45
|
+
| a status label, count or chip | `Badge` | `/blocks` |
|
|
44
46
|
| a link card, or a grid of them | `Card`, `Cards` | `/blocks` |
|
|
45
47
|
| an aside, warning or note | `Callout` | `/blocks` |
|
|
46
48
|
| numbered instructions | `Steps`, `Step` | `/blocks` |
|
|
47
49
|
| an FAQ or collapsible, no JS | `Disclosure`, `DisclosureGroup` | `/blocks` |
|
|
48
50
|
| an animated accordion | `Accordion` (client) | `/blocks` |
|
|
49
|
-
| tabbed content | `
|
|
51
|
+
| tabbed content | `TabGroup` when the tabs are data, `Tabs` to compose by hand (client) | `/blocks` |
|
|
50
52
|
| a long-form article page | `EssayHeader` + `EssayLayout` + `EssaySection` | `/essay` |
|
|
53
|
+
| an article whose body is prose or MDX | `EssayHeader` + `ReadingLayout` | `/essay` |
|
|
51
54
|
| a post meta row (date, read time, tags) | `PostMetaRow` and friends | `/essay` |
|
|
52
55
|
| a table of contents | `TableOfContents`, `ReadingRail` | `/essay` |
|
|
53
56
|
| page metadata and JSON-LD | `createSeo` | `/seo` |
|
|
@@ -58,15 +61,15 @@ reference: https://github.com/supertypeai/foundations
|
|
|
58
61
|
|
|
59
62
|
| import | exports |
|
|
60
63
|
|---|---|
|
|
61
|
-
| `@supertype.ai/foundations` | `cn`, `TypographyH1`, `TypographyH2`, `TypographyH3`, `TypographyH4`, `TypographyEyebrow`, `TypographyP`, `TypographyMuted`, `TypographyProse`, `TypographyList`, `TypographyProseList`, `TypographyCaption`, `TypographySmall`, `TypographyLabel`, `TypographyStat`, `TypographyInlineCode`, `TypographyLink`, `TypographyHighlight`, `headingClass`, `eyebrowClass`. Types: `TypographyTag`, `ParagraphVariants`, `ListProps`, `CaptionVariants`, `LabelVariants`, `StatVariants`, `
|
|
62
|
-
| `@supertype.ai/foundations/blocks` | `Cards`, `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `Callout`, `Steps`, `Step`, `Disclosure`, `DisclosureGroup`, `Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`, `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent`, `TabGroup`, `
|
|
64
|
+
| `@supertype.ai/foundations` | `cn`, `TypographyH1`, `TypographyH2`, `TypographyH3`, `TypographyH4`, `TypographyEyebrow`, `TypographyP`, `TypographyMuted`, `TypographyProse`, `TypographyList`, `TypographyProseList`, `TypographyCaption`, `TypographySmall`, `TypographyLabel`, `TypographyStat`, `TypographyInlineCode`, `TypographyLink`, `TypographyHighlight`, `headingClass`, `headingFace`, `eyebrowClass`, `toneClass`, `impliedTone`. Types: `TypographyTag`, `ParagraphVariants`, `ListProps`, `CaptionVariants`, `LabelVariants`, `StatVariants`, `Tone`, `HighlightTone` |
|
|
65
|
+
| `@supertype.ai/foundations/blocks` | `Cards`, `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `Callout`, `Button`, `buttonVariants`, `Badge`, `badgeVariants`, `Steps`, `Step`, `Disclosure`, `DisclosureGroup`, `Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`, `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent`, `TabGroup`, `SEGMENT`. Types: `ButtonLook`, `BadgeLook`, `TabItem` |
|
|
63
66
|
| `@supertype.ai/foundations/mdx` | `proseMdxComponents` |
|
|
64
|
-
| `@supertype.ai/foundations/essay` | `createEssay`, `EssayHeader`, `EssayLayout`, `EssaySection`, `EssayPullQuote`, `EssayFigure`, `EssayMovements`, `EssayDocument`, `EssayColumns`, `TableOfContents`, `ReadingRail`, `ReadingProgressBar`, `Rail`, `RailLink`, `PostMetaRow`, `PostDate`, `ReadTime`, `TagPills`, `MetaDot`, `formatPostDate`, `extractHeadings`, `readingTime`, `createSlugger`, `useReadingProgress`, `useScrollSpy`. Types: `TocHeading`, `EssayDecorations`, `EssayIndexEntry`, `EssayDocSection`, `EssayMovement`, `PostDateFormat` |
|
|
67
|
+
| `@supertype.ai/foundations/essay` | `createEssay`, `EssayHeader`, `EssayLayout`, `EssaySection`, `EssayPullQuote`, `EssayFigure`, `EssayMovements`, `EssayDocument`, `EssayColumns`, `EssayAside`, `EssayBody`, `ReadingLayout`, `TableOfContents`, `ReadingRail`, `ReadingProgressBar`, `Rail`, `RailLink`, `PostMetaRow`, `PostDate`, `ReadTime`, `TagPills`, `MetaDot`, `formatPostDate`, `extractHeadings`, `readingTime`, `createSlugger`, `useReadingProgress`, `useScrollSpy`. Types: `TocHeading`, `EssayDecorations`, `EssayIndexEntry`, `EssayDocSection`, `EssayMovement`, `PostDateFormat` |
|
|
65
68
|
| `@supertype.ai/foundations/seo` | `createSeo`. Types: `SeoConfig`, `ArticleAuthor`, `ArticleOptions`, `PageMetadata` |
|
|
66
69
|
| `@supertype.ai/foundations/og` | `ogCard`, `OG_SIZE`. Types: `OgCardOptions` |
|
|
67
|
-
| `@supertype.ai/foundations/eslint` | `designConfig` (the
|
|
70
|
+
| `@supertype.ai/foundations/eslint` | `designRules` (every rule as one array — spread this), `designConfig` (the same set wrapped as a flat-config entry). The five builders `colourRules`, `typographyRules`, `themeOverrideRules`, `surfaceAsInkRules`, `renamedTokenRules` are still exported, but spreading them by hand is how a consumer ends up missing one. Types: `FlatConfigEntry`, `DesignRuleOptions`, `DesignConfigOptions`, `RestrictedSyntax`, `ColourOptions`, `TypographyOptions` |
|
|
68
71
|
| `@supertype.ai/foundations/rehype` | `rehypeProseCode`, `proseCodeOptions`, `PROSE_LANGS`, `PROSE_THEMES`. Build-time only, must not resolve React |
|
|
69
|
-
| `@supertype.ai/foundations/contrast` | `checkLegibility` (inks at 4.5:1), `checkSignals` (fills at 3:1, tinted inks at 4.5:1, labels against their own fill), `resolveTokens`, `formatFailures`, `specificity`, `parseColor`, `luminance`, `contrast
|
|
72
|
+
| `@supertype.ai/foundations/contrast` | `checkLegibility` (inks at 4.5:1), `checkSignals` (fills at 3:1, tinted inks at 4.5:1, labels against their own fill), `resolveTokens`, `formatFailures`, `specificity`, `parseColor`, `luminance`, `contrast`, `tokenCuts` (which cuts a token ships — fill, the label printed on it, the hue as words; the taxonomy `checkSignals` measures). Types: `Rgb`, `Theme`, `LegibilityFailure`, `TokenCuts`. Build-time only |
|
|
70
73
|
|
|
71
74
|
## Props worth knowing
|
|
72
75
|
|
|
@@ -78,20 +81,39 @@ reference: https://github.com/supertypeai/foundations
|
|
|
78
81
|
- `TypographyCaption`, `TypographyLabel`, `TypographySmall`: `size?: "sm" | "xs" | "2xs" | "inherit"`, `as?`.
|
|
79
82
|
- `TypographyEyebrow`: `tone?: "heading" | "label"`, `as?`.
|
|
80
83
|
- `TypographyStat`: `size?: "inherit" | "card" | "panel" | "page" | "display"`, `figures?: "tabular" | "proportional"`. Keep tabular where a value updates in place.
|
|
81
|
-
- `TypographyLink`: `href` (required), `tone?:
|
|
82
|
-
- `TypographyHighlight`: `tone?: "primary" | "success" | "ochre" | "terracotta" | "sage" | "fig"`, `seed?: number`.
|
|
84
|
+
- `TypographyLink`: `href` (required), `tone?: Tone` (default `muted`), `addArrow?`, `newTab?`. Internal versus external is decided from the href.
|
|
85
|
+
- `TypographyHighlight`: `tone?: HighlightTone` — `"primary" | "success" | "ochre" | "terracotta" | "sage" | "fig"`, `seed?: number`. Deliberately NOT `Tone`: this axis is categorical (which one it is), not semantic (what it means), which is the same split theme.css draws between the earth swatches and the status tokens.
|
|
83
86
|
- `Card`: `href`, `title`, `description`, `icon`, `external`. An href makes the whole card a link.
|
|
84
|
-
- `Callout`: `
|
|
87
|
+
- `Tone` — the one semantic colour vocabulary, shared by `Button`, `Callout` and `TypographyLink`: `"muted" | "primary" | "secondary" | "brand" | "success" | "warn" | "destructive"`, defaulting to `muted` everywhere except a solid `Button`. Seven tones, seven tokens, one to one — that is the bar for adding one. There is no `neutral` (that is `muted`, the word the rest of the package uses), no `foreground` (also `muted`), no `accent` (that is `--primary`'s hover tint, so a washed `primary` renders the same thing) and no `info` (`success | warn | destructive` is already the whole triad). `brand` falls back to `--primary` in an app that defines no `--brand`.
|
|
88
|
+
- `Button`: `variant?: "solid" | "soft" | "outline" | "ghost" | "link"` (default `solid`), `tone?: Tone` (defaults to `primary` on a solid button and `muted` on every other variant — filling a button in is how a page says this is the action), `size?: "xs" | "sm" | "md" | "lg" | "xl"` (default `md`), `icon?: boolean` for a square glyph box, `pill?: boolean` for full-round corners, `render` for the element to become. Variant is how much ink it spends; tone is what the ink means — separate axes, so a quiet delete is `variant="ghost" tone="destructive"`, not a `destructive` variant.
|
|
89
|
+
- `Badge`: `variant?: "solid" | "soft" | "outline" | "ghost"` (default `solid`), `tone?: Tone`, `size?: "xs" | "sm"` (default `sm`), `pill?: boolean`. Same axes and same spellings as `Button`, minus `link` — a badge is not a link. There is no `warning` or `supertype` variant; those were `tone="warn"` and `tone="brand"` under invented names.
|
|
90
|
+
- `Callout`: `tone?: Tone`, `density?: "compact" | "editorial"`, `title`, `icon`, `action`.
|
|
85
91
|
- `DisclosureGroup`: `type?: "multiple" | "single"`, `defaultValue` (matches the title string).
|
|
86
|
-
- `TabsList`: `variant?: "default" | "line"
|
|
92
|
+
- `TabsList`: `variant?: "default" | "line"`, `tone?: Tone` (default `primary`) — the tone
|
|
93
|
+
inks the marker only: on `line` the underline and the active icon. The boxed track's
|
|
94
|
+
marker is deliberately flat, so a tone there paints nothing.
|
|
95
|
+
- `TabGroup`: `tabs: readonly TabItem[]` (`{ value, label, icon?, content }`), `defaultValue?`,
|
|
96
|
+
`value?`, `onValueChange?`, `variant?`, `tone?`, `iconPosition?: "inline-start" | "inline-end"`.
|
|
97
|
+
`icon` is an element (`<Icons.Mic />`); the trigger sizes and inks it. Reach for it
|
|
98
|
+
whenever the tabs are data — do not rebuild it over `Tabs`/`TabsTrigger`.
|
|
87
99
|
|
|
88
100
|
## Common mistakes
|
|
89
101
|
|
|
90
102
|
- `<p className="text-sm text-muted-foreground">` — use `<TypographyMuted>`.
|
|
91
103
|
- `<h2 className="text-lg font-semibold">` — use `<TypographyH2>`, or
|
|
92
104
|
`headingClass()` if you must pass classes to someone else's component.
|
|
93
|
-
- Importing `Card` or `
|
|
94
|
-
`@supertype.ai/foundations/blocks`.
|
|
105
|
+
- Importing `Card`, `Callout` or `Button` from `@supertype.ai/foundations`. They
|
|
106
|
+
live in `@supertype.ai/foundations/blocks`.
|
|
107
|
+
- `<Button variant="destructive">` or `variant="secondary"` — those are tones, not
|
|
108
|
+
variants. Write `variant="soft" tone="destructive"`, `variant="solid" tone="secondary"`.
|
|
109
|
+
- `<Button size="icon-sm">` — there is one size ladder. Write `size="sm" icon`.
|
|
110
|
+
- `<Badge variant="warning">` / `variant="supertype"` — tones, and misspelled ones.
|
|
111
|
+
Write `variant="outline" tone="warn"` and `variant="solid" tone="brand"`.
|
|
112
|
+
- `tone="neutral"`, `tone="foreground"` or `tone="accent"` — all three were
|
|
113
|
+
removed when the tone lists merged. Write `tone="muted"` for the first two and
|
|
114
|
+
`tone="primary"` for the third.
|
|
115
|
+
- An `<a>` or `<Link>` styled by hand to look like a button. Pass it as
|
|
116
|
+
`render={<Link href="/x" />}`; the anchor keeps its link semantics.
|
|
95
117
|
- `<TypographyMuted tone="default">` — a type error. Use `TypographyP`.
|
|
96
118
|
- Binding fonts with `font.className` instead of `font.variable`. The className
|
|
97
119
|
form sets `font-family` on the element and leaves the roles unresolved.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supertype.ai/foundations",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"next": "^15.5.7",
|
|
118
118
|
"next-view-transitions": "^0.3.5",
|
|
119
119
|
"react": "^19.0.0",
|
|
120
|
+
"react-dom": "^19.0.0",
|
|
120
121
|
"typescript": "^5.7.0",
|
|
121
122
|
"vitest": "4.1.11"
|
|
122
123
|
},
|
package/src/theme.css
CHANGED
|
@@ -18,20 +18,31 @@
|
|
|
18
18
|
other's, so the ink is what tells two swatches apart. checkSignals holds the
|
|
19
19
|
fill to 3:1 and the ink to 4.5:1. */
|
|
20
20
|
--color-terracotta: var(--terracotta);
|
|
21
|
-
--color-terracotta-
|
|
21
|
+
--color-terracotta-ink: var(--terracotta-ink);
|
|
22
22
|
--color-ochre: var(--ochre);
|
|
23
|
-
--color-ochre-
|
|
23
|
+
--color-ochre-ink: var(--ochre-ink);
|
|
24
24
|
--color-moss: var(--moss);
|
|
25
|
-
--color-moss-
|
|
25
|
+
--color-moss-ink: var(--moss-ink);
|
|
26
26
|
--color-fern: var(--fern);
|
|
27
|
-
--color-fern-
|
|
27
|
+
--color-fern-ink: var(--fern-ink);
|
|
28
28
|
--color-sage: var(--sage);
|
|
29
|
-
--color-sage-
|
|
29
|
+
--color-sage-ink: var(--sage-ink);
|
|
30
30
|
--color-stone: var(--stone);
|
|
31
|
-
--color-stone-
|
|
31
|
+
--color-stone-ink: var(--stone-ink);
|
|
32
32
|
--color-fig: var(--fig);
|
|
33
|
-
--color-fig-
|
|
33
|
+
--color-fig-ink: var(--fig-ink);
|
|
34
34
|
--color-cocoa: var(--cocoa);
|
|
35
|
+
--color-cocoa-ink: var(--cocoa-ink);
|
|
36
|
+
|
|
37
|
+
/* Deprecated aliases. Registered so an unmigrated call site keeps rendering;
|
|
38
|
+
the ESLint rules flag it so it does not stay unmigrated. */
|
|
39
|
+
--color-terracotta-foreground: var(--terracotta-foreground);
|
|
40
|
+
--color-ochre-foreground: var(--ochre-foreground);
|
|
41
|
+
--color-moss-foreground: var(--moss-foreground);
|
|
42
|
+
--color-fern-foreground: var(--fern-foreground);
|
|
43
|
+
--color-sage-foreground: var(--sage-foreground);
|
|
44
|
+
--color-stone-foreground: var(--stone-foreground);
|
|
45
|
+
--color-fig-foreground: var(--fig-foreground);
|
|
35
46
|
--color-cocoa-foreground: var(--cocoa-foreground);
|
|
36
47
|
|
|
37
48
|
--color-chart-1: var(--chart-1);
|
|
@@ -57,11 +68,19 @@
|
|
|
57
68
|
--shadow-recessed: var(--elevation-recessed);
|
|
58
69
|
|
|
59
70
|
/* Additive scale off a 10px `lg` — fixed pixel offsets, so no oddball values a
|
|
60
|
-
multiplicative scale would produce. `rounded-full` stays a pill.
|
|
71
|
+
multiplicative scale would produce. `rounded-full` stays a pill.
|
|
72
|
+
|
|
73
|
+
The container rung was +4px, the one step in the run that was not 2, and 14px
|
|
74
|
+
on a card read softer than anything else the package draws — a panel rounder
|
|
75
|
+
than the button sitting inside it. At +2 the run below the marketing sizes is
|
|
76
|
+
6 / 8 / 10 / 12, evenly spaced, and the jump to `2xl` is left to say what it
|
|
77
|
+
was always meant to: this one is a feature card, not a container. Card,
|
|
78
|
+
Accordion, and the MDX pre/img/table frames all step down together, which is
|
|
79
|
+
the point of moving the token rather than the five call sites. */
|
|
61
80
|
--radius-sm: calc(var(--radius) - 4px); /* 6px */
|
|
62
81
|
--radius-md: calc(var(--radius) - 2px); /* 8px — inputs, menus, small controls */
|
|
63
82
|
--radius-lg: var(--radius); /* 10px — buttons, default control */
|
|
64
|
-
--radius-xl: calc(var(--radius) +
|
|
83
|
+
--radius-xl: calc(var(--radius) + 2px); /* 12px — cards, panels, framed blocks */
|
|
65
84
|
--radius-2xl: calc(var(--radius) + 8px); /* 18px — marketing feature cards */
|
|
66
85
|
--radius-3xl: calc(var(--radius) + 12px); /* 22px */
|
|
67
86
|
--radius-4xl: calc(var(--radius) + 16px); /* 26px */
|
|
@@ -89,23 +108,40 @@
|
|
|
89
108
|
/* Danger ships as an ink only: a vivid brick red harmonised toward terracotta. */
|
|
90
109
|
--danger: hsl(5 72% 43%);
|
|
91
110
|
|
|
92
|
-
/* Latte-warm greens, clays and stone. Both cuts of each hue, light theme.
|
|
111
|
+
/* Latte-warm greens, clays and stone. Both cuts of each hue, light theme.
|
|
112
|
+
`-ink`, not `-foreground`: in this package `-foreground` is the label printed
|
|
113
|
+
on a fill and `-ink` is the hue used as words, and these are the latter —
|
|
114
|
+
`checkSignals` holds them to 4.5:1 against the page, and printing one on its
|
|
115
|
+
own fill measures about 1.2:1. They shipped under the wrong suffix for long
|
|
116
|
+
enough that a docs page believed it and rendered them as bare squares. The
|
|
117
|
+
old names are kept below as aliases; the ESLint rules flag them. */
|
|
93
118
|
--terracotta: hsl(10 54% 60%);
|
|
94
|
-
--terracotta-
|
|
119
|
+
--terracotta-ink: hsl(10 72% 40%);
|
|
95
120
|
--ochre: hsl(44 60% 42%);
|
|
96
|
-
--ochre-
|
|
121
|
+
--ochre-ink: hsl(44 78% 27%);
|
|
97
122
|
--moss: hsl(68 42% 41%);
|
|
98
|
-
--moss-
|
|
123
|
+
--moss-ink: hsl(68 60% 26%);
|
|
99
124
|
--fern: hsl(133 30% 47%);
|
|
100
|
-
--fern-
|
|
125
|
+
--fern-ink: hsl(133 48% 30%);
|
|
101
126
|
--sage: hsl(168 28% 47%);
|
|
102
|
-
--sage-
|
|
127
|
+
--sage-ink: hsl(168 46% 29%);
|
|
103
128
|
--stone: hsl(202 24% 55%);
|
|
104
|
-
--stone-
|
|
129
|
+
--stone-ink: hsl(202 42% 36%);
|
|
105
130
|
--fig: hsl(332 32% 61%);
|
|
106
|
-
--fig-
|
|
131
|
+
--fig-ink: hsl(332 50% 43%);
|
|
107
132
|
--cocoa: hsl(20 16% 56%);
|
|
108
|
-
--cocoa-
|
|
133
|
+
--cocoa-ink: hsl(20 34% 39%);
|
|
134
|
+
|
|
135
|
+
/* Deprecated: these were always the ink, under shadcn's name for the opposite
|
|
136
|
+
thing. Use `-ink`; the ESLint rules flag the old name. */
|
|
137
|
+
--terracotta-foreground: var(--terracotta-ink);
|
|
138
|
+
--ochre-foreground: var(--ochre-ink);
|
|
139
|
+
--moss-foreground: var(--moss-ink);
|
|
140
|
+
--fern-foreground: var(--fern-ink);
|
|
141
|
+
--sage-foreground: var(--sage-ink);
|
|
142
|
+
--stone-foreground: var(--stone-ink);
|
|
143
|
+
--fig-foreground: var(--fig-ink);
|
|
144
|
+
--cocoa-foreground: var(--cocoa-ink);
|
|
109
145
|
|
|
110
146
|
--background: hsl(43 33% 96%); /* #FAF8F3 */
|
|
111
147
|
/* Near-black keyed to the latte hue, not a neutral #333: grey reads cold over
|
|
@@ -177,21 +213,29 @@
|
|
|
177
213
|
|
|
178
214
|
/* Espresso twins: fills darken and inks lift to hold the same two bars. */
|
|
179
215
|
--terracotta: hsl(10 54% 47%);
|
|
180
|
-
--terracotta-
|
|
216
|
+
--terracotta-ink: hsl(10 66% 66%);
|
|
181
217
|
--ochre: hsl(44 60% 33%);
|
|
182
|
-
--ochre-
|
|
218
|
+
--ochre-ink: hsl(44 72% 45%);
|
|
183
219
|
--moss: hsl(68 42% 32%);
|
|
184
|
-
--moss-
|
|
220
|
+
--moss-ink: hsl(68 54% 43%);
|
|
185
221
|
--fern: hsl(133 30% 37%);
|
|
186
|
-
--fern-
|
|
222
|
+
--fern-ink: hsl(133 42% 49%);
|
|
187
223
|
--sage: hsl(168 28% 37%);
|
|
188
|
-
--sage-
|
|
224
|
+
--sage-ink: hsl(168 40% 49%);
|
|
189
225
|
--stone: hsl(202 24% 42%);
|
|
190
|
-
--stone-
|
|
226
|
+
--stone-ink: hsl(202 36% 60%);
|
|
191
227
|
--fig: hsl(332 32% 49%);
|
|
192
|
-
--fig-
|
|
228
|
+
--fig-ink: hsl(332 44% 67%);
|
|
193
229
|
--cocoa: hsl(20 16% 44%);
|
|
194
|
-
--cocoa-
|
|
230
|
+
--cocoa-ink: hsl(20 28% 62%);
|
|
231
|
+
--terracotta-foreground: var(--terracotta-ink);
|
|
232
|
+
--ochre-foreground: var(--ochre-ink);
|
|
233
|
+
--moss-foreground: var(--moss-ink);
|
|
234
|
+
--fern-foreground: var(--fern-ink);
|
|
235
|
+
--sage-foreground: var(--sage-ink);
|
|
236
|
+
--stone-foreground: var(--stone-ink);
|
|
237
|
+
--fig-foreground: var(--fig-ink);
|
|
238
|
+
--cocoa-foreground: var(--cocoa-ink);
|
|
195
239
|
|
|
196
240
|
/* 4 points of lightness at L10 reads flat where the same 4 at L96 reads raised;
|
|
197
241
|
ssite wrote `bg-card dark:bg-muted` at 109 sites before the ground dropped.
|