@cascivo/tokens 0.3.2 → 0.3.5
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/package.json +3 -1
- package/src/index.css +20 -0
- package/src/properties.css +76 -0
- package/src/tokens.d.ts +10 -0
- package/tokens.json +70 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascivo/tokens",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Three-level CSS design tokens (primitive → semantic → component)",
|
|
6
6
|
"keywords": [
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"exports": {
|
|
32
32
|
".": "./src/index.css",
|
|
33
|
+
"./properties": "./src/properties.css",
|
|
34
|
+
"./properties.css": "./src/properties.css",
|
|
33
35
|
"./functions": "./src/functions.css",
|
|
34
36
|
"./functions.css": "./src/functions.css",
|
|
35
37
|
"./screens": "./src/screens.ts",
|
package/src/index.css
CHANGED
|
@@ -127,6 +127,26 @@
|
|
|
127
127
|
--cascivo-tracking-normal: 0em;
|
|
128
128
|
--cascivo-tracking-wide: 0.025em;
|
|
129
129
|
|
|
130
|
+
/* ── Typography roles (semantic) ───────────────────
|
|
131
|
+
Purpose-named type tokens. Each resolves to exactly ONE primitive size
|
|
132
|
+
above, so "what size is a button label?" has exactly one answer:
|
|
133
|
+
--cascivo-text-ui. These tokens carry size only; pair them with the
|
|
134
|
+
recommended weight/leading in docs/cookbooks/derivable-theming.md. */
|
|
135
|
+
--cascivo-text-display: var(--cascivo-text-4xl); /* hero / marketing display */
|
|
136
|
+
--cascivo-text-heading-lg: var(--cascivo-text-3xl); /* page title (h1) */
|
|
137
|
+
--cascivo-text-heading-md: var(--cascivo-text-2xl); /* section heading (h2) */
|
|
138
|
+
--cascivo-text-heading-sm: var(--cascivo-text-xl); /* subsection heading (h3) */
|
|
139
|
+
--cascivo-text-body: var(--cascivo-text-base); /* default body copy */
|
|
140
|
+
--cascivo-text-body-sm: var(--cascivo-text-sm); /* secondary / dense body copy */
|
|
141
|
+
--cascivo-text-ui: var(
|
|
142
|
+
--cascivo-text-sm
|
|
143
|
+
); /* control & button labels (the canonical "ui.default") */
|
|
144
|
+
--cascivo-text-label: var(--cascivo-text-sm); /* form field labels */
|
|
145
|
+
--cascivo-text-caption: var(--cascivo-text-xs); /* captions, helper text, metadata */
|
|
146
|
+
--cascivo-text-code: var(
|
|
147
|
+
--cascivo-text-sm
|
|
148
|
+
); /* inline code / mono (pair with --cascivo-font-mono) */
|
|
149
|
+
|
|
130
150
|
/* ── Border Radius — Primitive ───────────────────── */
|
|
131
151
|
--cascivo-radius-none: 0px;
|
|
132
152
|
--cascivo-radius-sm: 0.25rem; /* 4px */
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* packages/tokens/src/properties.css */
|
|
2
|
+
/* cascivo — @property registrations for themeable color custom properties.
|
|
3
|
+
*
|
|
4
|
+
* Registering the themeable color tokens as typed custom properties (<color>,
|
|
5
|
+
* inherits) buys two things:
|
|
6
|
+
* 1. Smooth interpolation when [data-theme] changes under a transition.
|
|
7
|
+
* 2. A typed substrate for future @container style() palette branching.
|
|
8
|
+
*
|
|
9
|
+
* Only *themeable* color props are registered (the values a theme overrides or
|
|
10
|
+
* that animate), not the whole primitive scale. Registration sets the property
|
|
11
|
+
* type + initial value; theme blocks still override the value as usual.
|
|
12
|
+
*
|
|
13
|
+
* Imported by @cascivo/themes/all.css (and safe to import standalone). @property
|
|
14
|
+
* is a top-level at-rule and intentionally lives outside @layer.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@property --cascivo-color-accent {
|
|
18
|
+
syntax: '<color>';
|
|
19
|
+
inherits: true;
|
|
20
|
+
initial-value: oklch(0.52 0.2 250);
|
|
21
|
+
}
|
|
22
|
+
@property --cascivo-color-accent-hover {
|
|
23
|
+
syntax: '<color>';
|
|
24
|
+
inherits: true;
|
|
25
|
+
initial-value: oklch(0.45 0.2 250);
|
|
26
|
+
}
|
|
27
|
+
@property --cascivo-color-accent-active {
|
|
28
|
+
syntax: '<color>';
|
|
29
|
+
inherits: true;
|
|
30
|
+
initial-value: oklch(0.373 0.155 250);
|
|
31
|
+
}
|
|
32
|
+
@property --cascivo-color-primary {
|
|
33
|
+
syntax: '<color>';
|
|
34
|
+
inherits: true;
|
|
35
|
+
initial-value: oklch(0.205 0 0);
|
|
36
|
+
}
|
|
37
|
+
@property --cascivo-color-primary-hover {
|
|
38
|
+
syntax: '<color>';
|
|
39
|
+
inherits: true;
|
|
40
|
+
initial-value: oklch(0.27 0 0);
|
|
41
|
+
}
|
|
42
|
+
@property --cascivo-color-primary-active {
|
|
43
|
+
syntax: '<color>';
|
|
44
|
+
inherits: true;
|
|
45
|
+
initial-value: oklch(0.32 0 0);
|
|
46
|
+
}
|
|
47
|
+
@property --cascivo-color-secondary {
|
|
48
|
+
syntax: '<color>';
|
|
49
|
+
inherits: true;
|
|
50
|
+
initial-value: oklch(0.92 0.004 264);
|
|
51
|
+
}
|
|
52
|
+
@property --cascivo-color-secondary-hover {
|
|
53
|
+
syntax: '<color>';
|
|
54
|
+
inherits: true;
|
|
55
|
+
initial-value: oklch(0.86 0.006 264);
|
|
56
|
+
}
|
|
57
|
+
@property --cascivo-color-destructive {
|
|
58
|
+
syntax: '<color>';
|
|
59
|
+
inherits: true;
|
|
60
|
+
initial-value: oklch(0.54 0.188 22);
|
|
61
|
+
}
|
|
62
|
+
@property --cascivo-color-destructive-hover {
|
|
63
|
+
syntax: '<color>';
|
|
64
|
+
inherits: true;
|
|
65
|
+
initial-value: oklch(0.448 0.17 22);
|
|
66
|
+
}
|
|
67
|
+
@property --cascivo-color-text-on-accent {
|
|
68
|
+
syntax: '<color>';
|
|
69
|
+
inherits: true;
|
|
70
|
+
initial-value: oklch(1 0 0);
|
|
71
|
+
}
|
|
72
|
+
@property --cascivo-color-text-on-destructive {
|
|
73
|
+
syntax: '<color>';
|
|
74
|
+
inherits: true;
|
|
75
|
+
initial-value: oklch(1 0 0);
|
|
76
|
+
}
|
package/src/tokens.d.ts
CHANGED
|
@@ -226,8 +226,18 @@ export type CascivoToken =
|
|
|
226
226
|
| '--cascivo-text-4xl'
|
|
227
227
|
| '--cascivo-text-4xl-fluid'
|
|
228
228
|
| '--cascivo-text-base'
|
|
229
|
+
| '--cascivo-text-body'
|
|
230
|
+
| '--cascivo-text-body-sm'
|
|
231
|
+
| '--cascivo-text-caption'
|
|
232
|
+
| '--cascivo-text-code'
|
|
233
|
+
| '--cascivo-text-display'
|
|
234
|
+
| '--cascivo-text-heading-lg'
|
|
235
|
+
| '--cascivo-text-heading-md'
|
|
236
|
+
| '--cascivo-text-heading-sm'
|
|
237
|
+
| '--cascivo-text-label'
|
|
229
238
|
| '--cascivo-text-lg'
|
|
230
239
|
| '--cascivo-text-sm'
|
|
240
|
+
| '--cascivo-text-ui'
|
|
231
241
|
| '--cascivo-text-xl'
|
|
232
242
|
| '--cascivo-text-xs'
|
|
233
243
|
| '--cascivo-tracking-normal'
|
package/tokens.json
CHANGED
|
@@ -1667,6 +1667,69 @@
|
|
|
1667
1667
|
"value": "1rem",
|
|
1668
1668
|
"canonical": true
|
|
1669
1669
|
},
|
|
1670
|
+
{
|
|
1671
|
+
"name": "--cascivo-text-body",
|
|
1672
|
+
"category": "typography",
|
|
1673
|
+
"role": "text-body",
|
|
1674
|
+
"value": "var(--cascivo-text-base)",
|
|
1675
|
+
"canonical": true
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"name": "--cascivo-text-body-sm",
|
|
1679
|
+
"category": "typography",
|
|
1680
|
+
"role": "text-body-sm",
|
|
1681
|
+
"value": "var(--cascivo-text-sm)",
|
|
1682
|
+
"canonical": true
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"name": "--cascivo-text-caption",
|
|
1686
|
+
"category": "typography",
|
|
1687
|
+
"role": "text-caption",
|
|
1688
|
+
"value": "var(--cascivo-text-xs)",
|
|
1689
|
+
"canonical": true
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
"name": "--cascivo-text-code",
|
|
1693
|
+
"category": "typography",
|
|
1694
|
+
"role": "text-code",
|
|
1695
|
+
"value": "var( --cascivo-text-sm )",
|
|
1696
|
+
"canonical": true
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"name": "--cascivo-text-display",
|
|
1700
|
+
"category": "typography",
|
|
1701
|
+
"role": "text-display",
|
|
1702
|
+
"value": "var(--cascivo-text-4xl)",
|
|
1703
|
+
"canonical": true
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"name": "--cascivo-text-heading-lg",
|
|
1707
|
+
"category": "typography",
|
|
1708
|
+
"role": "text-heading-lg",
|
|
1709
|
+
"value": "var(--cascivo-text-3xl)",
|
|
1710
|
+
"canonical": true
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"name": "--cascivo-text-heading-md",
|
|
1714
|
+
"category": "typography",
|
|
1715
|
+
"role": "text-heading-md",
|
|
1716
|
+
"value": "var(--cascivo-text-2xl)",
|
|
1717
|
+
"canonical": true
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"name": "--cascivo-text-heading-sm",
|
|
1721
|
+
"category": "typography",
|
|
1722
|
+
"role": "text-heading-sm",
|
|
1723
|
+
"value": "var(--cascivo-text-xl)",
|
|
1724
|
+
"canonical": true
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
"name": "--cascivo-text-label",
|
|
1728
|
+
"category": "typography",
|
|
1729
|
+
"role": "text-label",
|
|
1730
|
+
"value": "var(--cascivo-text-sm)",
|
|
1731
|
+
"canonical": true
|
|
1732
|
+
},
|
|
1670
1733
|
{
|
|
1671
1734
|
"name": "--cascivo-text-lg",
|
|
1672
1735
|
"category": "typography",
|
|
@@ -1681,6 +1744,13 @@
|
|
|
1681
1744
|
"value": "0.875rem",
|
|
1682
1745
|
"canonical": true
|
|
1683
1746
|
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "--cascivo-text-ui",
|
|
1749
|
+
"category": "typography",
|
|
1750
|
+
"role": "text-ui",
|
|
1751
|
+
"value": "var( --cascivo-text-sm )",
|
|
1752
|
+
"canonical": true
|
|
1753
|
+
},
|
|
1684
1754
|
{
|
|
1685
1755
|
"name": "--cascivo-text-xl",
|
|
1686
1756
|
"category": "typography",
|