@letterstory/design 0.2.7 → 0.2.8

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/PRINCIPLES.md CHANGED
@@ -46,7 +46,9 @@
46
46
  feature's private module are an ESLint error.
47
47
  Two visual rules every primitive and feature follows:
48
48
  - **No sharp corners.** Inputs, buttons, cards, panels and popovers are rounded 4px or
49
- 6px (`rounded-sm` is 6px), never square.
49
+ 6px, never square. The radius token makes the scale obey it: `rounded-xs` and `rounded-sm`
50
+ are 4px (as is Tailwind's bare `rounded`), `rounded-md` through `rounded-4xl` are 6px
51
+ (`design/tokens.json`).
50
52
  - **Borders line up.** Dividers in side-by-side panes sit on the same line (match header
51
53
  heights), and borders that meet join cleanly — no offset seams or stray stubs where
52
54
  one pane's border runs past another's.
package/README.md CHANGED
@@ -30,7 +30,12 @@ commit both.
30
30
  In `tokens.json`, `color.dark` holds only the values that differ from light (exactly what the
31
31
  `.dark` block sets); `styled.js` resolves that into a full dark palette. Derived tokens keep
32
32
  their CSS expressions (`brand-light` is `oklch(from var(--brand) …)`, `radius.sm` is
33
- `calc(var(--radius) - 4px)`), so rebranding is one value: `color.light.brand`.
33
+ `calc(var(--radius) - 2px)`), so rebranding is one value: `color.light.brand`.
34
+
35
+ The radius scale has two steps, because a corner is 4px or 6px and never anything else
36
+ (`PRINCIPLES.md`, "No sharp corners"): `--radius` is 6px, `xs` and `sm` are 4px, and `md`
37
+ through `4xl` are all `--radius`. Every step Tailwind ships is overridden, so no `rounded-*`
38
+ class falls through to Tailwind's larger defaults; `rounded-full` stays a pill.
34
39
 
35
40
  ## Consuming it
36
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/design",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Letter design tokens, the phantom theme registry, and the design principles — one source for every Letter repo.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
package/styled.d.ts CHANGED
@@ -51,10 +51,14 @@ export interface Palette {
51
51
 
52
52
  export interface Radius {
53
53
  readonly DEFAULT: string;
54
+ readonly xs: string;
54
55
  readonly sm: string;
55
56
  readonly md: string;
56
57
  readonly lg: string;
57
58
  readonly xl: string;
59
+ readonly "2xl": string;
60
+ readonly "3xl": string;
61
+ readonly "4xl": string;
58
62
  }
59
63
 
60
64
  export interface FontFamily {
package/styled.js CHANGED
@@ -104,11 +104,15 @@ export const tokens = {
104
104
  },
105
105
  },
106
106
  radius: {
107
- DEFAULT: "0.625rem",
108
- sm: "calc(0.625rem - 4px)",
109
- md: "calc(0.625rem - 2px)",
110
- lg: "0.625rem",
111
- xl: "calc(0.625rem + 4px)",
107
+ DEFAULT: "0.375rem",
108
+ xs: "calc(0.375rem - 2px)",
109
+ sm: "calc(0.375rem - 2px)",
110
+ md: "0.375rem",
111
+ lg: "0.375rem",
112
+ xl: "0.375rem",
113
+ "2xl": "0.375rem",
114
+ "3xl": "0.375rem",
115
+ "4xl": "0.375rem",
112
116
  },
113
117
  font: {
114
118
  sans: '"DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
package/tailwind-v3.cjs CHANGED
@@ -58,10 +58,14 @@ module.exports = {
58
58
  },
59
59
  borderRadius: {
60
60
  DEFAULT: "var(--radius)",
61
+ xs: "var(--radius-xs)",
61
62
  sm: "var(--radius-sm)",
62
63
  md: "var(--radius-md)",
63
64
  lg: "var(--radius-lg)",
64
65
  xl: "var(--radius-xl)",
66
+ "2xl": "var(--radius-2xl)",
67
+ "3xl": "var(--radius-3xl)",
68
+ "4xl": "var(--radius-4xl)",
65
69
  },
66
70
  fontFamily: {
67
71
  sans: "var(--font-sans)",
package/tailwind-v4.css CHANGED
@@ -8,10 +8,14 @@
8
8
  * Tailwind's own names.
9
9
  */
10
10
  @theme inline {
11
- --radius-sm: calc(var(--radius) - 4px);
12
- --radius-md: calc(var(--radius) - 2px);
11
+ --radius-xs: calc(var(--radius) - 2px);
12
+ --radius-sm: calc(var(--radius) - 2px);
13
+ --radius-md: var(--radius);
13
14
  --radius-lg: var(--radius);
14
- --radius-xl: calc(var(--radius) + 4px);
15
+ --radius-xl: var(--radius);
16
+ --radius-2xl: var(--radius);
17
+ --radius-3xl: var(--radius);
18
+ --radius-4xl: var(--radius);
15
19
  --color-brand: var(--brand);
16
20
  --color-brand-foreground: var(--brand-foreground);
17
21
  --color-brand-light: var(--brand-light);
package/tokens.css CHANGED
@@ -10,11 +10,15 @@
10
10
  * @theme mapping; radii and the type scale are mirrored in each adapter instead.
11
11
  */
12
12
  :root {
13
- --radius: 0.625rem;
14
- --radius-sm: calc(var(--radius) - 4px);
15
- --radius-md: calc(var(--radius) - 2px);
13
+ --radius: 0.375rem;
14
+ --radius-xs: calc(var(--radius) - 2px);
15
+ --radius-sm: calc(var(--radius) - 2px);
16
+ --radius-md: var(--radius);
16
17
  --radius-lg: var(--radius);
17
- --radius-xl: calc(var(--radius) + 4px);
18
+ --radius-xl: var(--radius);
19
+ --radius-2xl: var(--radius);
20
+ --radius-3xl: var(--radius);
21
+ --radius-4xl: var(--radius);
18
22
  /* BRAND COLOR — the single source (#093959). To rebrand, change color.light.brand in tokens.json. */
19
23
  --brand: oklch(0.332 0.074 243.6);
20
24
  /* text/icons on a --brand background */
package/tokens.json CHANGED
@@ -85,11 +85,15 @@
85
85
  }
86
86
  },
87
87
  "radius": {
88
- "DEFAULT": "0.625rem",
89
- "sm": "calc(var(--radius) - 4px)",
90
- "md": "calc(var(--radius) - 2px)",
88
+ "DEFAULT": "0.375rem",
89
+ "xs": "calc(var(--radius) - 2px)",
90
+ "sm": "calc(var(--radius) - 2px)",
91
+ "md": "var(--radius)",
91
92
  "lg": "var(--radius)",
92
- "xl": "calc(var(--radius) + 4px)"
93
+ "xl": "var(--radius)",
94
+ "2xl": "var(--radius)",
95
+ "3xl": "var(--radius)",
96
+ "4xl": "var(--radius)"
93
97
  },
94
98
  "font": {
95
99
  "sans": [