@letterstory/design 0.2.7 → 0.2.9
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 +3 -1
- package/README.md +6 -1
- package/package.json +1 -1
- package/styled.d.ts +7 -0
- package/styled.js +15 -5
- package/tailwind-v3.cjs +7 -0
- package/tailwind-v4.css +10 -3
- package/tokens.css +14 -4
- package/tokens.json +14 -4
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
|
|
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) -
|
|
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
package/styled.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ export interface Palette {
|
|
|
16
16
|
readonly rising: string;
|
|
17
17
|
readonly falling: string;
|
|
18
18
|
readonly warning: string;
|
|
19
|
+
readonly "pr-merged": string;
|
|
20
|
+
readonly "pr-open": string;
|
|
21
|
+
readonly "pr-closed": string;
|
|
19
22
|
readonly background: string;
|
|
20
23
|
readonly foreground: string;
|
|
21
24
|
readonly card: string;
|
|
@@ -51,10 +54,14 @@ export interface Palette {
|
|
|
51
54
|
|
|
52
55
|
export interface Radius {
|
|
53
56
|
readonly DEFAULT: string;
|
|
57
|
+
readonly xs: string;
|
|
54
58
|
readonly sm: string;
|
|
55
59
|
readonly md: string;
|
|
56
60
|
readonly lg: string;
|
|
57
61
|
readonly xl: string;
|
|
62
|
+
readonly "2xl": string;
|
|
63
|
+
readonly "3xl": string;
|
|
64
|
+
readonly "4xl": string;
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
export interface FontFamily {
|
package/styled.js
CHANGED
|
@@ -22,6 +22,9 @@ export const tokens = {
|
|
|
22
22
|
rising: "oklch(0.72 0.17 155)",
|
|
23
23
|
falling: "oklch(0.63 0.21 25)",
|
|
24
24
|
warning: "oklch(0.75 0.16 75)",
|
|
25
|
+
"pr-merged": "#205f9f",
|
|
26
|
+
"pr-open": "#3fabdc",
|
|
27
|
+
"pr-closed": "#d5d4d1",
|
|
25
28
|
background: "oklch(1 0 0)",
|
|
26
29
|
foreground: "oklch(0.145 0 0)",
|
|
27
30
|
card: "oklch(1 0 0)",
|
|
@@ -70,6 +73,9 @@ export const tokens = {
|
|
|
70
73
|
rising: "oklch(0.72 0.17 155)",
|
|
71
74
|
falling: "oklch(0.63 0.21 25)",
|
|
72
75
|
warning: "oklch(0.75 0.16 75)",
|
|
76
|
+
"pr-merged": "#519fdd",
|
|
77
|
+
"pr-open": "#0e6a9b",
|
|
78
|
+
"pr-closed": "#363533",
|
|
73
79
|
background: "oklch(0.145 0 0)",
|
|
74
80
|
foreground: "oklch(0.985 0 0)",
|
|
75
81
|
card: "oklch(0.205 0 0)",
|
|
@@ -104,11 +110,15 @@ export const tokens = {
|
|
|
104
110
|
},
|
|
105
111
|
},
|
|
106
112
|
radius: {
|
|
107
|
-
DEFAULT: "0.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
DEFAULT: "0.375rem",
|
|
114
|
+
xs: "calc(0.375rem - 2px)",
|
|
115
|
+
sm: "calc(0.375rem - 2px)",
|
|
116
|
+
md: "0.375rem",
|
|
117
|
+
lg: "0.375rem",
|
|
118
|
+
xl: "0.375rem",
|
|
119
|
+
"2xl": "0.375rem",
|
|
120
|
+
"3xl": "0.375rem",
|
|
121
|
+
"4xl": "0.375rem",
|
|
112
122
|
},
|
|
113
123
|
font: {
|
|
114
124
|
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
|
@@ -24,6 +24,9 @@ module.exports = {
|
|
|
24
24
|
rising: "var(--rising)",
|
|
25
25
|
falling: "var(--falling)",
|
|
26
26
|
warning: "var(--warning)",
|
|
27
|
+
"pr-merged": "var(--pr-merged)",
|
|
28
|
+
"pr-open": "var(--pr-open)",
|
|
29
|
+
"pr-closed": "var(--pr-closed)",
|
|
27
30
|
background: "var(--background)",
|
|
28
31
|
foreground: "var(--foreground)",
|
|
29
32
|
card: "var(--card)",
|
|
@@ -58,10 +61,14 @@ module.exports = {
|
|
|
58
61
|
},
|
|
59
62
|
borderRadius: {
|
|
60
63
|
DEFAULT: "var(--radius)",
|
|
64
|
+
xs: "var(--radius-xs)",
|
|
61
65
|
sm: "var(--radius-sm)",
|
|
62
66
|
md: "var(--radius-md)",
|
|
63
67
|
lg: "var(--radius-lg)",
|
|
64
68
|
xl: "var(--radius-xl)",
|
|
69
|
+
"2xl": "var(--radius-2xl)",
|
|
70
|
+
"3xl": "var(--radius-3xl)",
|
|
71
|
+
"4xl": "var(--radius-4xl)",
|
|
65
72
|
},
|
|
66
73
|
fontFamily: {
|
|
67
74
|
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-
|
|
12
|
-
--radius-
|
|
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:
|
|
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);
|
|
@@ -27,6 +31,9 @@
|
|
|
27
31
|
--color-rising: var(--rising);
|
|
28
32
|
--color-falling: var(--falling);
|
|
29
33
|
--color-warning: var(--warning);
|
|
34
|
+
--color-pr-merged: var(--pr-merged);
|
|
35
|
+
--color-pr-open: var(--pr-open);
|
|
36
|
+
--color-pr-closed: var(--pr-closed);
|
|
30
37
|
--color-background: var(--background);
|
|
31
38
|
--color-foreground: var(--foreground);
|
|
32
39
|
--color-card: var(--card);
|
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.
|
|
14
|
-
--radius-
|
|
15
|
-
--radius-
|
|
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:
|
|
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 */
|
|
@@ -38,6 +42,9 @@
|
|
|
38
42
|
--falling: oklch(0.63 0.21 25);
|
|
39
43
|
/* amber — needs attention, not yet at risk */
|
|
40
44
|
--warning: oklch(0.75 0.16 75);
|
|
45
|
+
--pr-merged: #205f9f;
|
|
46
|
+
--pr-open: #3fabdc;
|
|
47
|
+
--pr-closed: #d5d4d1;
|
|
41
48
|
--background: oklch(1 0 0);
|
|
42
49
|
--foreground: oklch(0.145 0 0);
|
|
43
50
|
--card: oklch(1 0 0);
|
|
@@ -81,6 +88,9 @@
|
|
|
81
88
|
/* --brand and --brand-foreground inherit from :root; only the on-dark variants are lightened */
|
|
82
89
|
--brand-light: oklch(from var(--brand) 0.5 0.09 h);
|
|
83
90
|
--brand-text: oklch(from var(--brand) 0.72 0.1 h);
|
|
91
|
+
--pr-merged: #519fdd;
|
|
92
|
+
--pr-open: #0e6a9b;
|
|
93
|
+
--pr-closed: #363533;
|
|
84
94
|
--background: oklch(0.145 0 0);
|
|
85
95
|
--foreground: oklch(0.985 0 0);
|
|
86
96
|
--card: oklch(0.205 0 0);
|
package/tokens.json
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"rising": "oklch(0.72 0.17 155)",
|
|
17
17
|
"falling": "oklch(0.63 0.21 25)",
|
|
18
18
|
"warning": "oklch(0.75 0.16 75)",
|
|
19
|
+
"pr-merged": "#205f9f",
|
|
20
|
+
"pr-open": "#3fabdc",
|
|
21
|
+
"pr-closed": "#d5d4d1",
|
|
19
22
|
"background": "oklch(1 0 0)",
|
|
20
23
|
"foreground": "oklch(0.145 0 0)",
|
|
21
24
|
"card": "oklch(1 0 0)",
|
|
@@ -51,6 +54,9 @@
|
|
|
51
54
|
"dark": {
|
|
52
55
|
"brand-light": "oklch(from var(--brand) 0.5 0.09 h)",
|
|
53
56
|
"brand-text": "oklch(from var(--brand) 0.72 0.1 h)",
|
|
57
|
+
"pr-merged": "#519fdd",
|
|
58
|
+
"pr-open": "#0e6a9b",
|
|
59
|
+
"pr-closed": "#363533",
|
|
54
60
|
"background": "oklch(0.145 0 0)",
|
|
55
61
|
"foreground": "oklch(0.985 0 0)",
|
|
56
62
|
"card": "oklch(0.205 0 0)",
|
|
@@ -85,11 +91,15 @@
|
|
|
85
91
|
}
|
|
86
92
|
},
|
|
87
93
|
"radius": {
|
|
88
|
-
"DEFAULT": "0.
|
|
89
|
-
"
|
|
90
|
-
"
|
|
94
|
+
"DEFAULT": "0.375rem",
|
|
95
|
+
"xs": "calc(var(--radius) - 2px)",
|
|
96
|
+
"sm": "calc(var(--radius) - 2px)",
|
|
97
|
+
"md": "var(--radius)",
|
|
91
98
|
"lg": "var(--radius)",
|
|
92
|
-
"xl": "
|
|
99
|
+
"xl": "var(--radius)",
|
|
100
|
+
"2xl": "var(--radius)",
|
|
101
|
+
"3xl": "var(--radius)",
|
|
102
|
+
"4xl": "var(--radius)"
|
|
93
103
|
},
|
|
94
104
|
"font": {
|
|
95
105
|
"sans": [
|