@lace-cloud/design-tokens 0.15.1 → 0.16.1
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 -2
- package/tokens.css +136 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lace-cloud/design-tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup",
|
|
27
|
-
"clean": "rm -rf dist"
|
|
27
|
+
"clean": "rm -rf dist",
|
|
28
|
+
"test": "vitest run"
|
|
28
29
|
},
|
|
29
30
|
"module": "./dist/index.mjs",
|
|
30
31
|
"exports": {
|
package/tokens.css
CHANGED
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
--lace-color-neutral-800: #252526;
|
|
44
44
|
--lace-color-neutral-850: #1e1e1e;
|
|
45
45
|
--lace-color-neutral-900: #161616;
|
|
46
|
+
--lace-color-neutral-925: #111111;
|
|
46
47
|
--lace-color-neutral-950: #0f0f0f;
|
|
48
|
+
--lace-color-neutral-975: #0a0a0c;
|
|
47
49
|
--lace-color-neutral-black: #000000;
|
|
48
50
|
|
|
49
51
|
/* ── Palette: semantic accents ── */
|
|
@@ -91,10 +93,15 @@
|
|
|
91
93
|
|
|
92
94
|
/* ── Palette: alpha variants ── */
|
|
93
95
|
--lace-color-green-alpha-04: rgba(206, 254, 101, 0.04);
|
|
96
|
+
--lace-color-green-alpha-06: rgba(206, 254, 101, 0.06);
|
|
97
|
+
--lace-color-neutral-900-alpha-04: rgba(22, 22, 22, 0.04);
|
|
98
|
+
--lace-color-neutral-900-alpha-08: rgba(22, 22, 22, 0.08);
|
|
94
99
|
--lace-color-green-alpha-10: rgba(206, 254, 101, 0.1);
|
|
95
100
|
--lace-color-green-alpha-15: rgba(206, 254, 101, 0.15);
|
|
96
101
|
--lace-color-green-alpha-18: rgba(206, 254, 101, 0.18);
|
|
97
102
|
--lace-color-green-alpha-20: rgba(206, 254, 101, 0.2);
|
|
103
|
+
--lace-color-green-alpha-25: rgba(206, 254, 101, 0.25);
|
|
104
|
+
--lace-color-green-alpha-40: rgba(206, 254, 101, 0.4);
|
|
98
105
|
--lace-color-green-alpha-50: rgba(206, 254, 101, 0.5);
|
|
99
106
|
--lace-color-green-alpha-60: rgba(206, 254, 101, 0.6);
|
|
100
107
|
--lace-color-red-alpha-12: rgba(248, 113, 113, 0.12);
|
|
@@ -109,8 +116,17 @@
|
|
|
109
116
|
--lace-color-white-alpha-04: rgba(255, 255, 255, 0.04);
|
|
110
117
|
--lace-color-white-alpha-06: rgba(255, 255, 255, 0.06);
|
|
111
118
|
--lace-color-white-alpha-08: rgba(255, 255, 255, 0.08);
|
|
119
|
+
--lace-color-white-alpha-10: rgba(255, 255, 255, 0.1);
|
|
120
|
+
--lace-color-white-alpha-14: rgba(255, 255, 255, 0.14);
|
|
121
|
+
--lace-color-white-alpha-30: rgba(255, 255, 255, 0.3);
|
|
112
122
|
--lace-color-white-alpha-40: rgba(255, 255, 255, 0.4);
|
|
123
|
+
--lace-color-white-alpha-55: rgba(255, 255, 255, 0.55);
|
|
124
|
+
--lace-color-white-alpha-62: rgba(255, 255, 255, 0.62);
|
|
125
|
+
--lace-color-white-alpha-80: rgba(255, 255, 255, 0.8);
|
|
126
|
+
--lace-color-white-alpha-92: rgba(255, 255, 255, 0.92);
|
|
113
127
|
--lace-color-amber-alpha-08: rgba(255, 200, 80, 0.08);
|
|
128
|
+
--lace-color-amber-400-alpha-12: rgba(245, 166, 35, 0.12);
|
|
129
|
+
--lace-color-amber-400-alpha-40: rgba(245, 166, 35, 0.4);
|
|
114
130
|
--lace-color-black-alpha-30: rgba(0, 0, 0, 0.3);
|
|
115
131
|
--lace-color-black-alpha-35: rgba(0, 0, 0, 0.35);
|
|
116
132
|
--lace-color-black-alpha-40: rgba(0, 0, 0, 0.4);
|
|
@@ -139,6 +155,12 @@
|
|
|
139
155
|
--lace-space-6: 32px;
|
|
140
156
|
--lace-space-7: 48px;
|
|
141
157
|
|
|
158
|
+
/* ── Scale: size ── */
|
|
159
|
+
--lace-size-grid-fine: 20px;
|
|
160
|
+
--lace-size-grid-major: 100px;
|
|
161
|
+
--lace-size-page-max: 1152px;
|
|
162
|
+
--lace-size-control-rung: 36px; /* resting height every admin control family shares, so siblings on one page sit at one height */
|
|
163
|
+
|
|
142
164
|
/* ── Scale: font size ── */
|
|
143
165
|
--lace-font-size-xs: 10px;
|
|
144
166
|
--lace-font-size-sm: 11px;
|
|
@@ -146,6 +168,13 @@
|
|
|
146
168
|
--lace-font-size-lg: 13px;
|
|
147
169
|
--lace-font-size-xl: 14px;
|
|
148
170
|
--lace-font-size-2xl: 16px;
|
|
171
|
+
/* Display steps. The ramp below 22px is body copy, so a page masthead or a
|
|
172
|
+
headline numeral has no step to take there and would be written as a raw
|
|
173
|
+
px literal against no scale at all. These continue the same ramp
|
|
174
|
+
(10, 11, 12, 13, 14, 16, 22, 24); a display element takes one of them. A
|
|
175
|
+
further step is added when a display element needs one, not before. */
|
|
176
|
+
--lace-font-size-3xl: 22px;
|
|
177
|
+
--lace-font-size-4xl: 24px;
|
|
149
178
|
|
|
150
179
|
/* ── Scale: line height ── */
|
|
151
180
|
--lace-line-height-tight: 1.2;
|
|
@@ -223,6 +252,7 @@
|
|
|
223
252
|
|
|
224
253
|
/* ── Accent ── */
|
|
225
254
|
--lace-color-accent: var(--lace-color-green-500);
|
|
255
|
+
--lace-color-text-on-accent: var(--lace-color-neutral-925);
|
|
226
256
|
--lace-color-accent-alpha-subtle: var(--lace-color-green-alpha-10);
|
|
227
257
|
--lace-color-accent-alpha-medium: var(--lace-color-green-alpha-20);
|
|
228
258
|
--lace-color-accent-strong: var(--lace-color-green-bright, var(--lace-color-green-300));
|
|
@@ -233,6 +263,15 @@
|
|
|
233
263
|
--lace-color-success-strong: var(--lace-color-green-bright-700);
|
|
234
264
|
--lace-color-danger: var(--lace-color-red-500);
|
|
235
265
|
--lace-color-danger-bg-soft: var(--lace-color-red-alpha-12);
|
|
266
|
+
/* Danger as TEXT, which is a different job from danger as a fill.
|
|
267
|
+
* `--lace-color-danger` is red-500 (#e5484d) — the most saturated step,
|
|
268
|
+
* built to be a solid background under white. As 11-13px type on the card
|
|
269
|
+
* surface it measures 4.26:1, and on its own soft chip 3.57:1, both under
|
|
270
|
+
* the 4.5:1 WCAG 2.1 SC 1.4.3 needs. Lightening `--lace-color-danger`
|
|
271
|
+
* itself would fix the text and break the fill (white on red-400 drops to
|
|
272
|
+
* 2.77:1), so the two roles get two tokens — exactly as warning already
|
|
273
|
+
* splits `--lace-color-warning` from `--lace-color-warning-fg` above. */
|
|
274
|
+
--lace-color-danger-fg: var(--lace-color-red-400);
|
|
236
275
|
--lace-color-warning-bg: #3b2507;
|
|
237
276
|
--lace-color-warning-fg: var(--lace-color-amber-bright-400);
|
|
238
277
|
|
|
@@ -270,6 +309,12 @@
|
|
|
270
309
|
|
|
271
310
|
/* ── Focus ring ── */
|
|
272
311
|
--lace-color-focus-ring: var(--lace-color-accent);
|
|
312
|
+
|
|
313
|
+
/* ── Paper grid (engineering-paper background threads) ── */
|
|
314
|
+
--lace-paper-thread-fine: var(--lace-color-green-alpha-03);
|
|
315
|
+
--lace-paper-thread-major: var(--lace-color-green-alpha-06);
|
|
316
|
+
--lace-paper-pitch-fine: var(--lace-size-grid-fine);
|
|
317
|
+
--lace-paper-pitch-major: var(--lace-size-grid-major);
|
|
273
318
|
}
|
|
274
319
|
|
|
275
320
|
/* ══════════════════════════════════════════════════════════════════════
|
|
@@ -388,9 +433,19 @@
|
|
|
388
433
|
--lace-badge-purple-bg: rgba(176, 132, 240, 0.1);
|
|
389
434
|
--lace-badge-purple-border: rgba(176, 132, 240, 0.35);
|
|
390
435
|
--lace-badge-purple-text: var(--lace-color-purple-400);
|
|
436
|
+
/* Pink and orange carry CATEGORY, never severity. They are the two families
|
|
437
|
+
* with no claim above this tier, which is what qualifies them: a label that
|
|
438
|
+
* tells two members of one set apart must not borrow a hue that already means
|
|
439
|
+
* status (red, amber, green), scope (blue, purple) or brand (green, cyan). */
|
|
440
|
+
--lace-badge-pink-bg: rgba(242, 136, 198, 0.1);
|
|
441
|
+
--lace-badge-pink-border: rgba(242, 136, 198, 0.35);
|
|
442
|
+
--lace-badge-pink-text: var(--lace-color-pink-400);
|
|
443
|
+
--lace-badge-orange-bg: rgba(255, 138, 76, 0.1);
|
|
444
|
+
--lace-badge-orange-border: rgba(255, 138, 76, 0.35);
|
|
445
|
+
--lace-badge-orange-text: var(--lace-color-orange-400);
|
|
391
446
|
--lace-badge-gy-bg: var(--lace-color-green-500);
|
|
392
447
|
--lace-badge-gy-border: transparent;
|
|
393
|
-
--lace-badge-gy-text:
|
|
448
|
+
--lace-badge-gy-text: var(--lace-color-text-on-accent);
|
|
394
449
|
|
|
395
450
|
/* ── Canvas nodes (inline-styled; tokens listed for completeness) ── */
|
|
396
451
|
--lace-node-default-border: var(--lace-color-green-alpha-18);
|
|
@@ -500,6 +555,11 @@
|
|
|
500
555
|
--lace-color-success-strong: var(--lace-color-green-deep-900);
|
|
501
556
|
--lace-color-danger: #dc2626;
|
|
502
557
|
--lace-color-danger-bg-soft: #fef2f2;
|
|
558
|
+
/* Darker than the dark theme's, not lighter — the light theme's danger text
|
|
559
|
+
* sits on near-white, so it has to move away from white rather than toward
|
|
560
|
+
* it. #dc2626 clears the card at 4.62:1 but falls to 4.41:1 on its own
|
|
561
|
+
* #fef2f2 chip; this clears both (6.18 / 5.91). */
|
|
562
|
+
--lace-color-danger-fg: #b91c1c;
|
|
503
563
|
--lace-color-warning-bg: #fffbeb;
|
|
504
564
|
--lace-color-warning-fg: var(--lace-color-amber-deep-700);
|
|
505
565
|
|
|
@@ -528,6 +588,10 @@
|
|
|
528
588
|
/* ── Tier-2: Focus ── */
|
|
529
589
|
--lace-color-focus-ring: var(--lace-color-accent);
|
|
530
590
|
|
|
591
|
+
/* ── Tier-2: Paper grid (ink-on-white instead of green-on-dark) ── */
|
|
592
|
+
--lace-paper-thread-fine: var(--lace-color-neutral-900-alpha-04);
|
|
593
|
+
--lace-paper-thread-major: var(--lace-color-neutral-900-alpha-08);
|
|
594
|
+
|
|
531
595
|
/* ── Tier-3: Shadows (lighter elevation) ── */
|
|
532
596
|
--lace-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
533
597
|
--lace-shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
@@ -572,9 +636,15 @@
|
|
|
572
636
|
--lace-badge-purple-bg: #faf5ff;
|
|
573
637
|
--lace-badge-purple-border: #e9d5ff;
|
|
574
638
|
--lace-badge-purple-text: var(--lace-color-purple-700);
|
|
639
|
+
--lace-badge-pink-bg: #fdf2f8;
|
|
640
|
+
--lace-badge-pink-border: #fbcfe8;
|
|
641
|
+
--lace-badge-pink-text: var(--lace-color-pink-700);
|
|
642
|
+
--lace-badge-orange-bg: #fff7ed;
|
|
643
|
+
--lace-badge-orange-border: #fed7aa;
|
|
644
|
+
--lace-badge-orange-text: var(--lace-color-orange-700);
|
|
575
645
|
--lace-badge-gy-bg: var(--lace-color-green-500);
|
|
576
646
|
--lace-badge-gy-border: transparent;
|
|
577
|
-
--lace-badge-gy-text:
|
|
647
|
+
--lace-badge-gy-text: var(--lace-color-text-on-accent);
|
|
578
648
|
|
|
579
649
|
/* ── Tier-3: ActionBar ──
|
|
580
650
|
* Generate bg / hover cascade from Tier-2 success / success-hover. */
|
|
@@ -638,3 +708,67 @@ body {
|
|
|
638
708
|
*::after {
|
|
639
709
|
box-sizing: border-box;
|
|
640
710
|
}
|
|
711
|
+
|
|
712
|
+
/* ══════════════════════════════════════════════════════════════════════
|
|
713
|
+
* PAPER GRID
|
|
714
|
+
*
|
|
715
|
+
* The brand's engineering-paper background, split into two classes:
|
|
716
|
+
*
|
|
717
|
+
* `.lace-paper-layers` — PAINT ONLY. The four-layer background-image
|
|
718
|
+
* (fine + major threads) sized off `--lace-paper-pitch-*` and coloured
|
|
719
|
+
* off `--lace-paper-thread-*`, plus the forced-colors/print escape.
|
|
720
|
+
* No positioning. Mount this on an element that already owns its own
|
|
721
|
+
* layout (e.g. a section-scoped `position: absolute` backdrop) — the
|
|
722
|
+
* element supplies the box, this class supplies the grid paint.
|
|
723
|
+
*
|
|
724
|
+
* `.lace-paper` — PAINT + MECHANICS. Everything `.lace-paper-layers`
|
|
725
|
+
* has, plus the fixed full-viewport overlay mechanics (position: fixed,
|
|
726
|
+
* inset: 0, z-index: -1, pointer-events: none). Mount this when you
|
|
727
|
+
* want the standard shell-level "paper behind everything" surface.
|
|
728
|
+
*
|
|
729
|
+
* Consumers opt in by mounting an element with the class that matches
|
|
730
|
+
* their layout: `.lace-paper` for a viewport-fixed backdrop, or
|
|
731
|
+
* `.lace-paper-layers` on an element that positions itself and only
|
|
732
|
+
* wants the grid recipe.
|
|
733
|
+
*
|
|
734
|
+
* The canvas draws its own in-graph texture with an SVG `<pattern>` at the same
|
|
735
|
+
* fine pitch (packages/canvas/src/Canvas.tsx). SVG geometry attributes do not
|
|
736
|
+
* accept `var()`, so that pitch is a literal there and tracks
|
|
737
|
+
* `--lace-size-grid-fine` by convention, not by reference.
|
|
738
|
+
*
|
|
739
|
+
* MOUNT `.lace-paper` AT THE SHELL ROOT, OUTSIDE ANY TRANSFORMED ANCESTOR. A
|
|
740
|
+
* transformed ancestor becomes the containing block for its fixed-position
|
|
741
|
+
* descendants, so a `.lace-paper` placed inside one resolves `inset: 0`
|
|
742
|
+
* against that box rather than the viewport. The canvas is the live case:
|
|
743
|
+
* `.react-flow__viewport` carries an inline `transform`, so a surface
|
|
744
|
+
* mounted within it pans and zooms with the graph instead of staying put
|
|
745
|
+
* behind it.
|
|
746
|
+
* ══════════════════════════════════════════════════════════════════════ */
|
|
747
|
+
|
|
748
|
+
.lace-paper,
|
|
749
|
+
.lace-paper-layers {
|
|
750
|
+
background-image:
|
|
751
|
+
linear-gradient(var(--lace-paper-thread-fine) 1px, transparent 1px),
|
|
752
|
+
linear-gradient(90deg, var(--lace-paper-thread-fine) 1px, transparent 1px),
|
|
753
|
+
linear-gradient(var(--lace-paper-thread-major) 1px, transparent 1px),
|
|
754
|
+
linear-gradient(90deg, var(--lace-paper-thread-major) 1px, transparent 1px);
|
|
755
|
+
background-size:
|
|
756
|
+
var(--lace-paper-pitch-fine) var(--lace-paper-pitch-fine),
|
|
757
|
+
var(--lace-paper-pitch-fine) var(--lace-paper-pitch-fine),
|
|
758
|
+
var(--lace-paper-pitch-major) var(--lace-paper-pitch-major),
|
|
759
|
+
var(--lace-paper-pitch-major) var(--lace-paper-pitch-major);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.lace-paper {
|
|
763
|
+
position: fixed;
|
|
764
|
+
inset: 0;
|
|
765
|
+
z-index: -1;
|
|
766
|
+
pointer-events: none;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
@media (forced-colors: active), print {
|
|
770
|
+
.lace-paper,
|
|
771
|
+
.lace-paper-layers {
|
|
772
|
+
background-image: none;
|
|
773
|
+
}
|
|
774
|
+
}
|