@loidolt/theme-tokens 0.2.0 → 0.3.0
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/dist/dark-auto.css +4 -0
- package/dist/dark.css +2 -0
- package/dist/index.d.ts +26 -3
- package/dist/index.js +9 -3
- package/dist/tokens.css +4 -1
- package/package.json +2 -1
package/dist/dark-auto.css
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
--loidolt-border-soft: #2b2e26;
|
|
16
16
|
--loidolt-border-strong: #6a6e5f;
|
|
17
17
|
--loidolt-border-control: #787c6b;
|
|
18
|
+
--loidolt-border-sunken: #262922;
|
|
18
19
|
--loidolt-accent: #e0672f;
|
|
19
20
|
--loidolt-accent-hover: #f0895c;
|
|
20
21
|
--loidolt-on-accent: #161814;
|
|
21
22
|
--loidolt-danger: #d75f55;
|
|
23
|
+
--loidolt-danger-hover: #e07a70;
|
|
22
24
|
--loidolt-on-danger: #161814;
|
|
23
25
|
--loidolt-text-danger: #e88b81;
|
|
24
26
|
--loidolt-success: #7fa074;
|
|
@@ -52,10 +54,12 @@
|
|
|
52
54
|
--loidolt-border-soft: #2b2e26;
|
|
53
55
|
--loidolt-border-strong: #6a6e5f;
|
|
54
56
|
--loidolt-border-control: #787c6b;
|
|
57
|
+
--loidolt-border-sunken: #262922;
|
|
55
58
|
--loidolt-accent: #e0672f;
|
|
56
59
|
--loidolt-accent-hover: #f0895c;
|
|
57
60
|
--loidolt-on-accent: #161814;
|
|
58
61
|
--loidolt-danger: #d75f55;
|
|
62
|
+
--loidolt-danger-hover: #e07a70;
|
|
59
63
|
--loidolt-on-danger: #161814;
|
|
60
64
|
--loidolt-text-danger: #e88b81;
|
|
61
65
|
--loidolt-success: #7fa074;
|
package/dist/dark.css
CHANGED
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
--loidolt-border-soft: #2b2e26;
|
|
16
16
|
--loidolt-border-strong: #6a6e5f;
|
|
17
17
|
--loidolt-border-control: #787c6b;
|
|
18
|
+
--loidolt-border-sunken: #262922;
|
|
18
19
|
--loidolt-accent: #e0672f;
|
|
19
20
|
--loidolt-accent-hover: #f0895c;
|
|
20
21
|
--loidolt-on-accent: #161814;
|
|
21
22
|
--loidolt-danger: #d75f55;
|
|
23
|
+
--loidolt-danger-hover: #e07a70;
|
|
22
24
|
--loidolt-on-danger: #161814;
|
|
23
25
|
--loidolt-text-danger: #e88b81;
|
|
24
26
|
--loidolt-success: #7fa074;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare const colors: {
|
|
|
28
28
|
readonly orange: "#c65224";
|
|
29
29
|
readonly orangeDark: "#a9441d";
|
|
30
30
|
readonly error: "#9b2822";
|
|
31
|
+
readonly errorDark: "#7f1f1a";
|
|
31
32
|
readonly success: "#3f5139";
|
|
32
33
|
readonly warning: "#7c4d17";
|
|
33
34
|
readonly info: "#265162";
|
|
@@ -80,8 +81,8 @@ declare const sizing: {
|
|
|
80
81
|
};
|
|
81
82
|
declare const borders: {
|
|
82
83
|
readonly width: "1px";
|
|
83
|
-
readonly color: "#c8c1b1";
|
|
84
84
|
readonly radius: "0px";
|
|
85
|
+
readonly radiusPill: "999px";
|
|
85
86
|
};
|
|
86
87
|
declare const shadows: {
|
|
87
88
|
readonly popover: "0 12px 30px color-mix(in srgb, var(--loidolt-shadow-color) 18%, transparent)";
|
|
@@ -105,9 +106,19 @@ declare const zIndex: {
|
|
|
105
106
|
readonly tooltip: "90";
|
|
106
107
|
readonly skipLink: "1000";
|
|
107
108
|
};
|
|
108
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Breakpoints are not custom properties (`@media` cannot read `var()`), but stay tokenized here
|
|
111
|
+
* so an app and the library agree on where the layout changes.
|
|
112
|
+
*
|
|
113
|
+
* - `compact` — the phone/narrow-tablet break. The only one the package's own CSS uses: below
|
|
114
|
+
* it the workspace grid collapses to a single column and the sidebar becomes a stacked block.
|
|
115
|
+
* - `expanded` — where a sidebar plus content plus inspector all fit at once.
|
|
116
|
+
* - `wide` — where content stops growing and gutters take the extra room.
|
|
117
|
+
*/
|
|
109
118
|
declare const breakpoints: {
|
|
110
119
|
readonly compact: "760px";
|
|
120
|
+
readonly expanded: "1024px";
|
|
121
|
+
readonly wide: "1400px";
|
|
111
122
|
};
|
|
112
123
|
/**
|
|
113
124
|
* The role layer. Every value links to a primitive, so overriding a primitive propagates and
|
|
@@ -129,10 +140,13 @@ declare const semanticDefs: {
|
|
|
129
140
|
readonly borderStrong: TokenRef;
|
|
130
141
|
/** Boundary of an input, select, textarea or switch — held to 3:1 against its surface. */
|
|
131
142
|
readonly borderControl: TokenRef;
|
|
143
|
+
/** Decorative rule on the sunken surface (canvas grids, artboard guides). Not a boundary. */
|
|
144
|
+
readonly borderSunken: TokenRef;
|
|
132
145
|
readonly accent: TokenRef;
|
|
133
146
|
readonly accentHover: TokenRef;
|
|
134
147
|
readonly onAccent: TokenRef;
|
|
135
148
|
readonly danger: TokenRef;
|
|
149
|
+
readonly dangerHover: TokenRef;
|
|
136
150
|
readonly onDanger: TokenRef;
|
|
137
151
|
readonly textDanger: TokenRef;
|
|
138
152
|
readonly success: TokenRef;
|
|
@@ -178,10 +192,12 @@ declare const darkSemantic: {
|
|
|
178
192
|
readonly borderSoft: "#2b2e26";
|
|
179
193
|
readonly borderStrong: "#6a6e5f";
|
|
180
194
|
readonly borderControl: "#787c6b";
|
|
195
|
+
readonly borderSunken: "#262922";
|
|
181
196
|
readonly accent: "#e0672f";
|
|
182
197
|
readonly accentHover: "#f0895c";
|
|
183
198
|
readonly onAccent: "#161814";
|
|
184
199
|
readonly danger: "#d75f55";
|
|
200
|
+
readonly dangerHover: "#e07a70";
|
|
185
201
|
readonly onDanger: "#161814";
|
|
186
202
|
readonly textDanger: "#e88b81";
|
|
187
203
|
readonly success: "#7fa074";
|
|
@@ -220,6 +236,7 @@ declare const tokens: {
|
|
|
220
236
|
readonly orange: "#c65224";
|
|
221
237
|
readonly orangeDark: "#a9441d";
|
|
222
238
|
readonly error: "#9b2822";
|
|
239
|
+
readonly errorDark: "#7f1f1a";
|
|
223
240
|
readonly success: "#3f5139";
|
|
224
241
|
readonly warning: "#7c4d17";
|
|
225
242
|
readonly info: "#265162";
|
|
@@ -272,8 +289,8 @@ declare const tokens: {
|
|
|
272
289
|
};
|
|
273
290
|
readonly borders: {
|
|
274
291
|
readonly width: "1px";
|
|
275
|
-
readonly color: "#c8c1b1";
|
|
276
292
|
readonly radius: "0px";
|
|
293
|
+
readonly radiusPill: "999px";
|
|
277
294
|
};
|
|
278
295
|
readonly shadows: {
|
|
279
296
|
readonly popover: "0 12px 30px color-mix(in srgb, var(--loidolt-shadow-color) 18%, transparent)";
|
|
@@ -299,6 +316,8 @@ declare const tokens: {
|
|
|
299
316
|
};
|
|
300
317
|
readonly breakpoints: {
|
|
301
318
|
readonly compact: "760px";
|
|
319
|
+
readonly expanded: "1024px";
|
|
320
|
+
readonly wide: "1400px";
|
|
302
321
|
};
|
|
303
322
|
readonly semantic: {
|
|
304
323
|
readonly background: string;
|
|
@@ -315,10 +334,12 @@ declare const tokens: {
|
|
|
315
334
|
readonly borderSoft: string;
|
|
316
335
|
readonly borderStrong: string;
|
|
317
336
|
readonly borderControl: string;
|
|
337
|
+
readonly borderSunken: string;
|
|
318
338
|
readonly accent: string;
|
|
319
339
|
readonly accentHover: string;
|
|
320
340
|
readonly onAccent: string;
|
|
321
341
|
readonly danger: string;
|
|
342
|
+
readonly dangerHover: string;
|
|
322
343
|
readonly onDanger: string;
|
|
323
344
|
readonly textDanger: string;
|
|
324
345
|
readonly success: string;
|
|
@@ -349,10 +370,12 @@ declare const tokens: {
|
|
|
349
370
|
readonly borderSoft: "#2b2e26";
|
|
350
371
|
readonly borderStrong: "#6a6e5f";
|
|
351
372
|
readonly borderControl: "#787c6b";
|
|
373
|
+
readonly borderSunken: "#262922";
|
|
352
374
|
readonly accent: "#e0672f";
|
|
353
375
|
readonly accentHover: "#f0895c";
|
|
354
376
|
readonly onAccent: "#161814";
|
|
355
377
|
readonly danger: "#d75f55";
|
|
378
|
+
readonly dangerHover: "#e07a70";
|
|
356
379
|
readonly onDanger: "#161814";
|
|
357
380
|
readonly textDanger: "#e88b81";
|
|
358
381
|
readonly success: "#7fa074";
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var colors = {
|
|
|
20
20
|
orange: "#c65224",
|
|
21
21
|
orangeDark: "#a9441d",
|
|
22
22
|
error: "#9b2822",
|
|
23
|
+
errorDark: "#7f1f1a",
|
|
23
24
|
success: "#3f5139",
|
|
24
25
|
warning: "#7c4d17",
|
|
25
26
|
info: "#265162"
|
|
@@ -63,7 +64,7 @@ var sizing = {
|
|
|
63
64
|
inspector: "18rem",
|
|
64
65
|
content: "75rem"
|
|
65
66
|
};
|
|
66
|
-
var borders = { width: "1px",
|
|
67
|
+
var borders = { width: "1px", radius: "0px", radiusPill: "999px" };
|
|
67
68
|
var shadows = {
|
|
68
69
|
popover: "0 12px 30px color-mix(in srgb, var(--loidolt-shadow-color) 18%, transparent)",
|
|
69
70
|
modal: "0 24px 60px color-mix(in srgb, var(--loidolt-shadow-color) 24%, transparent)",
|
|
@@ -86,7 +87,7 @@ var zIndex = {
|
|
|
86
87
|
tooltip: "90",
|
|
87
88
|
skipLink: "1000"
|
|
88
89
|
};
|
|
89
|
-
var breakpoints = { compact: "760px" };
|
|
90
|
+
var breakpoints = { compact: "760px", expanded: "1024px", wide: "1400px" };
|
|
90
91
|
var semanticDefs = {
|
|
91
92
|
background: ref("color-paper"),
|
|
92
93
|
surface: ref("color-panel"),
|
|
@@ -103,6 +104,8 @@ var semanticDefs = {
|
|
|
103
104
|
borderStrong: ref("color-deep"),
|
|
104
105
|
/** Boundary of an input, select, textarea or switch — held to 3:1 against its surface. */
|
|
105
106
|
borderControl: ref("color-line-strong"),
|
|
107
|
+
/** Decorative rule on the sunken surface (canvas grids, artboard guides). Not a boundary. */
|
|
108
|
+
borderSunken: ref("color-canvas-line"),
|
|
106
109
|
accent: ref("color-orange"),
|
|
107
110
|
accentHover: ref("color-orange-dark"),
|
|
108
111
|
onAccent: ref("color-white"),
|
|
@@ -112,6 +115,7 @@ var semanticDefs = {
|
|
|
112
115
|
* value: a fill tuned for white ink is too light to read as text, and vice versa.
|
|
113
116
|
*/
|
|
114
117
|
danger: ref("color-error"),
|
|
118
|
+
dangerHover: ref("color-error-dark"),
|
|
115
119
|
onDanger: ref("color-white"),
|
|
116
120
|
textDanger: ref("color-error"),
|
|
117
121
|
success: ref("color-success"),
|
|
@@ -132,7 +136,7 @@ var PRIMITIVE_GROUPS = [
|
|
|
132
136
|
["font", typography],
|
|
133
137
|
["space", spacing],
|
|
134
138
|
["size", sizing],
|
|
135
|
-
["border",
|
|
139
|
+
["border", borders],
|
|
136
140
|
["shadow", shadows],
|
|
137
141
|
["motion", motion],
|
|
138
142
|
["z", zIndex]
|
|
@@ -185,10 +189,12 @@ var darkSemantic = {
|
|
|
185
189
|
borderSoft: "#2b2e26",
|
|
186
190
|
borderStrong: "#6a6e5f",
|
|
187
191
|
borderControl: "#787c6b",
|
|
192
|
+
borderSunken: "#262922",
|
|
188
193
|
accent: "#e0672f",
|
|
189
194
|
accentHover: "#f0895c",
|
|
190
195
|
onAccent: "#161814",
|
|
191
196
|
danger: "#d75f55",
|
|
197
|
+
dangerHover: "#e07a70",
|
|
192
198
|
onDanger: "#161814",
|
|
193
199
|
textDanger: "#e88b81",
|
|
194
200
|
success: "#7fa074",
|
package/dist/tokens.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
--loidolt-color-orange: #c65224;
|
|
15
15
|
--loidolt-color-orange-dark: #a9441d;
|
|
16
16
|
--loidolt-color-error: #9b2822;
|
|
17
|
+
--loidolt-color-error-dark: #7f1f1a;
|
|
17
18
|
--loidolt-color-success: #3f5139;
|
|
18
19
|
--loidolt-color-warning: #7c4d17;
|
|
19
20
|
--loidolt-color-info: #265162;
|
|
@@ -52,8 +53,8 @@
|
|
|
52
53
|
--loidolt-size-inspector: 18rem;
|
|
53
54
|
--loidolt-size-content: 75rem;
|
|
54
55
|
--loidolt-border-width: 1px;
|
|
55
|
-
--loidolt-border-color: var(--loidolt-color-line);
|
|
56
56
|
--loidolt-border-radius: 0px;
|
|
57
|
+
--loidolt-border-radius-pill: 999px;
|
|
57
58
|
--loidolt-shadow-popover: 0 12px 30px color-mix(in srgb, var(--loidolt-shadow-color) 18%, transparent);
|
|
58
59
|
--loidolt-shadow-modal: 0 24px 60px color-mix(in srgb, var(--loidolt-shadow-color) 24%, transparent);
|
|
59
60
|
--loidolt-shadow-artwork: 0 18px 23px color-mix(in srgb, var(--loidolt-shadow-color) 14%, transparent);
|
|
@@ -84,10 +85,12 @@
|
|
|
84
85
|
--loidolt-border-soft: var(--loidolt-color-line-soft);
|
|
85
86
|
--loidolt-border-strong: var(--loidolt-color-deep);
|
|
86
87
|
--loidolt-border-control: var(--loidolt-color-line-strong);
|
|
88
|
+
--loidolt-border-sunken: var(--loidolt-color-canvas-line);
|
|
87
89
|
--loidolt-accent: var(--loidolt-color-orange);
|
|
88
90
|
--loidolt-accent-hover: var(--loidolt-color-orange-dark);
|
|
89
91
|
--loidolt-on-accent: var(--loidolt-color-white);
|
|
90
92
|
--loidolt-danger: var(--loidolt-color-error);
|
|
93
|
+
--loidolt-danger-hover: var(--loidolt-color-error-dark);
|
|
91
94
|
--loidolt-on-danger: var(--loidolt-color-white);
|
|
92
95
|
--loidolt-text-danger: var(--loidolt-color-error);
|
|
93
96
|
--loidolt-success: var(--loidolt-color-success);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loidolt/theme-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Typed design tokens for Loidolt applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsup src/index.ts --format esm --dts --clean && node scripts/generate-css.mjs",
|
|
31
|
+
"prepack": "npm run build",
|
|
31
32
|
"typecheck": "tsc --noEmit",
|
|
32
33
|
"test": "vitest run",
|
|
33
34
|
"clean": "rimraf dist"
|