@useinsider/design-tokens 0.3.0 → 0.4.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.
Files changed (3) hide show
  1. package/README.md +18 -13
  2. package/dist/tokens.css +1 -281
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -51,27 +51,21 @@ to the three outputs like this (`/` becomes `-`):
51
51
  `$background-primary: var(--ins-background-primary, #261a28);`
52
52
  - `tokens.json` is a flat map from source key to the light value as a string,
53
53
  for example `"background/primary": "#261a28"`. It is resolved at build time,
54
- so it does not follow the feature flag or dark mode. Dark values are
55
- available through `./source`.
54
+ so it does not follow the feature flag.
56
55
 
57
- ## Scope, feature flag and dark mode
56
+ ## Scope, feature flag and color scheme
58
57
 
59
58
  The CSS never touches `:root`. Every custom property is defined under one
60
59
  selector:
61
60
 
62
61
  ```css
63
62
  [data-ins-editor][data-ins-rebrand="on"] { --ins-background-primary: #261a28; }
64
-
65
- @media (prefers-color-scheme: dark) {
66
- [data-ins-editor][data-ins-rebrand="on"] { --ins-background-primary: #c3abc0; }
67
- }
68
63
  ```
69
64
 
70
65
  - The package reads no flag. The consumer writes `data-ins-editor` and
71
66
  `data-ins-rebrand="on"` on its mount element when the rebranding flag is on.
72
- - Dark values follow the operating system preference. Only tokens that have a
73
- `dark` value in the source appear in the dark block; the others keep their
74
- light value in dark mode.
67
+ - The package ships light values only. It has no `prefers-color-scheme`
68
+ rule, so an operating system set to dark mode does not change any colour.
75
69
  - **Keep the flag-off look unchanged:** in consumer styles use
76
70
  `var(--ins-<token>, #oldHex)`, not the bare SCSS variable. Without the attribute no
77
71
  custom property is defined, so the fallback (today's colour) is used.
@@ -121,8 +115,9 @@ npm run test:integration
121
115
  npm run test:visual # Playwright; baselines are Linux-only, see below
122
116
  ```
123
117
 
124
- The build report lists the token count per namespace, the number of dark
125
- values, the light tokens that have no dark value yet, and a hex index (which
118
+ The build report lists the token count per namespace, the number of `dark`
119
+ values in the source (not written to any output), the light tokens that have
120
+ no dark value, and a hex index (which
126
121
  token each normalised hex belongs to; `#666` and `#666666` map to the same
127
122
  tokens).
128
123
 
@@ -131,7 +126,8 @@ tokens).
131
126
  Edit `tokens/source.json` from the Figma "Variables" library (file
132
127
  `nEkPpxMBAtOoJo2FPcF5ef`: the Semantic collection in Light and Dark mode, and the
133
128
  `shadow-*` effect styles), update `$meta`, and run `npm run build`. Write `dark`
134
- only when it differs from `value`. The build
129
+ only when it differs from `value`; it is kept in the source and `./source` but
130
+ is not emitted. The build
135
131
  is offline: it never calls Figma or any other service. The build validates
136
132
  the source before writing anything and fails, naming the key, when:
137
133
 
@@ -151,6 +147,15 @@ commit the `*-linux.png` files from the `visual-baselines` artifact to
151
147
 
152
148
  ## Release
153
149
 
150
+ ### 0.4.0 changes (breaking)
151
+
152
+ - `tokens.css` no longer has the `@media (prefers-color-scheme: dark)` block:
153
+ the rebranding ships in light only, also when the operating system is in dark
154
+ mode. Light values, `_tokens.scss`, `tokens.json` and `_compat.scss` are
155
+ unchanged.
156
+ - `tokens/source.json` and `./source` still carry the `dark` values; a
157
+ consumer that needs them reads `./source`.
158
+
154
159
  ### 0.3.0 changes (breaking)
155
160
 
156
161
  - Every custom property is now prefixed with `ins-`: `--background-primary` →
package/dist/tokens.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * @useinsider/design-tokens: generated by scripts/build.mjs from tokens/source.json. Do not edit.
3
- * 299 tokens, 275 with a dark value (applied for prefers-color-scheme: dark).
3
+ * 299 tokens, light values only.
4
4
  */
5
5
 
6
6
  [data-ins-editor][data-ins-rebrand="on"] {
@@ -304,283 +304,3 @@
304
304
  --ins-shadow-success: 0 0 0 3px oklch(0.55 0.139 152 / 20%);
305
305
  --ins-shadow-warning: 0 0 0 3px oklch(0.84 0.160 82 / 40%);
306
306
  }
307
-
308
- @media (prefers-color-scheme: dark) {
309
- [data-ins-editor][data-ins-rebrand="on"] {
310
- --ins-background-accent: #ce2603;
311
- --ins-background-calendarpopover-primary-selected: #ddc8da;
312
- --ins-background-chips-secondary: #c7c0ae;
313
- --ins-background-codesnippet-sidebar: #4c4c4c;
314
- --ins-background-codesnippet-sidebar-disabled: #595959;
315
- --ins-background-elevated: #262626;
316
- --ins-background-elevated-hover: #404040;
317
- --ins-background-elevated-inverted: #f8f8f8;
318
- --ins-background-elevated-selected: #594a57;
319
- --ins-background-elevated-selected-hover: #443842;
320
- --ins-background-magenta: #8d3157;
321
- --ins-background-magenta-subtle: #230a14;
322
- --ins-background-orange: #9c5a00;
323
- --ins-background-orange-subtle: #200f01;
324
- --ins-background-page: #0d0d0d;
325
- --ins-background-primary: #c3abc0;
326
- --ins-background-primary-hover: #ab92a8;
327
- --ins-background-primary-subtle: #443842;
328
- --ins-background-primary-subtle-hover: #2f272e;
329
- --ins-background-secondary: #524e44;
330
- --ins-background-secondary-hover: #747062;
331
- --ins-background-segment-disabled-selected: #595959;
332
- --ins-background-smart: #552990;
333
- --ins-background-smart-subtle: #170d28;
334
- --ins-background-state-disabled: #4c4c4c;
335
- --ins-background-state-error: #cd1827;
336
- --ins-background-state-error-subtle: #3d0607;
337
- --ins-background-state-error-subtle-hover: #50060a;
338
- --ins-background-state-info: #113b98;
339
- --ins-background-state-info-subtle: #07122b;
340
- --ins-background-state-success: #2e834c;
341
- --ins-background-state-success-subtle: #072913;
342
- --ins-background-state-warning: #e3af14;
343
- --ins-background-state-warning-subtle: #2c1f00;
344
- --ins-background-surface: #262626;
345
- --ins-background-surface-hover: #333333;
346
- --ins-background-surface-subtle: #333;
347
- --ins-background-surface-subtle-hover: #4c4c4c;
348
- --ins-background-track: #404040;
349
- --ins-background-calendarpopover-compare-selected: #f1becd;
350
- --ins-background-calendarpopover-compare-selected-hover: #ecaabf;
351
- --ins-background-calendarpopover-compare-subtle: #230a14;
352
- --ins-background-calendarpopover-compare-subtle-hover: #461529;
353
- --ins-background-calendarpopover-primary-selected-hover: #c3abc0;
354
- --ins-background-calendarpopover-primary-subtle: #1d161d;
355
- --ins-background-calendarpopover-primary-subtle-hover: #443842;
356
- --ins-background-chips-secondary-hover: #beb7a2;
357
- --ins-background-chips-surface-error-hover: #780812;
358
- --ins-background-chips-surface-info-hover: #174abd;
359
- --ins-background-chips-surface-magenta-hover: #b14370;
360
- --ins-background-chips-surface-orange-hover: #cb7600;
361
- --ins-background-chips-surface-primary-hover: #6e5d6c;
362
- --ins-background-chips-surface-secondary-subtle-hover: #999381;
363
- --ins-background-chips-surface-smart-hover: #6b35b5;
364
- --ins-background-chips-surface-success-hover: #42ab67;
365
- --ins-background-chips-surface-warning-hover: #8c6a00;
366
- --ins-background-datatable-pagination-selected: #ddc8da;
367
- --ins-background-datatable-pagination-selected-hover: #c3abc0;
368
- --ins-background-datatable-row-selected: #0c080c;
369
- --ins-background-datatable-row-selected-hover: #6e5d6c;
370
- --ins-background-magenta-hover: #692240;
371
- --ins-background-magenta-subtle-hover: #330f1d;
372
- --ins-background-orange-hover: #703f00;
373
- --ins-background-orange-subtle-hover: #331a00;
374
- --ins-background-primary-bold: #0c080c;
375
- --ins-background-primary-bold-hover: #2f272e;
376
- --ins-background-ribbon-error: #3d0607;
377
- --ins-background-ribbon-info: #07183e;
378
- --ins-background-ribbon-success: #072913;
379
- --ins-background-ribbon-warning: #2c1f00;
380
- --ins-background-sidebar-item: #2f272e;
381
- --ins-background-sidebar-item-hover: #443842;
382
- --ins-background-sidebar-item-selected: #443842;
383
- --ins-background-sidebar-oncolor-hover: #ab92a8;
384
- --ins-background-sidebar-seconditem: #6e5d6c;
385
- --ins-background-sidebar-seconditem-hover: #6e5d6c;
386
- --ins-background-sidebar-subitem: #594a57;
387
- --ins-background-sidebar-subitem-hover: #594a57;
388
- --ins-background-sidebar-thirditem: #937b90;
389
- --ins-background-sidebar-thirditem-hover: #937b90;
390
- --ins-background-smart-hover: #3f1f6d;
391
- --ins-background-smart-subtle-hover: #21113a;
392
- --ins-background-state-error-hover: #a20e1c;
393
- --ins-background-state-info-hover: #0c2c73;
394
- --ins-background-state-info-subtle-hover: #07183e;
395
- --ins-background-state-success-hover: #1c5d34;
396
- --ins-background-state-success-subtle-hover: #072913;
397
- --ins-background-state-warning-hover: #b78b00;
398
- --ins-background-state-warning-subtle-hover: #3e2d00;
399
- --ins-border-bold: #808080;
400
- --ins-border-bolder: #fafafa;
401
- --ins-border-chips-error-subtle: #780812;
402
- --ins-border-chips-info-subtle: #174abd;
403
- --ins-border-chips-magenta-subtle: #b14370;
404
- --ins-border-chips-orange-subtle: #cb7600;
405
- --ins-border-chips-smart-subtle: #6b35b5;
406
- --ins-border-chips-warning-subtle: #8c6a00;
407
- --ins-border-default: #595959;
408
- --ins-border-inverted: #262626;
409
- --ins-border-primary: #c3abc0;
410
- --ins-border-primary-hover: #6e5d6c;
411
- --ins-border-primary-subtle: #937b90;
412
- --ins-border-primary-subtler: #6e5d6c;
413
- --ins-border-secondary: #999381;
414
- --ins-border-smart: #552990;
415
- --ins-border-state-disabled: #666666;
416
- --ins-border-state-error: #f92333;
417
- --ins-border-state-error-hover: #a20e1c;
418
- --ins-border-state-formdisabled: #4c4c4c;
419
- --ins-border-state-info: #113b98;
420
- --ins-border-state-success: #2e834c;
421
- --ins-border-state-warning: #e3af14;
422
- --ins-border-state-warning-hover: #8c6a00;
423
- --ins-border-chips-success-subtle: #42ab67;
424
- --ins-border-magenta: #8d3157;
425
- --ins-border-magenta-hover: #d25f8c;
426
- --ins-border-magenta-subtle: #692240;
427
- --ins-border-orange: #9c5a00;
428
- --ins-border-primary-subtlest: #443842;
429
- --ins-border-smart-hover: #8242da;
430
- --ins-border-state-info-hover: #1d5ae3;
431
- --ins-icon-button-secondary: #beb7a2;
432
- --ins-icon-default: #aaaaaa;
433
- --ins-icon-inverted: #333333;
434
- --ins-icon-primary: #ead9e7;
435
- --ins-icon-state-disabled: #8c8c8c;
436
- --ins-icon-bold: #ffffff;
437
- --ins-icon-button-error-pressed: #ff7b74;
438
- --ins-icon-button-error-selected: #fc6661;
439
- --ins-icon-button-inverted-pressed: #ddc8da;
440
- --ins-icon-button-inverted-selected: #c3abc0;
441
- --ins-icon-button-primary-pressed: #ead9e7;
442
- --ins-icon-button-primary-selected: #ab92a8;
443
- --ins-icon-button-secondary-pressed: #999381;
444
- --ins-icon-button-secondary-selected: #c7c0ae;
445
- --ins-icon-button-smart-pressed: #b190f5;
446
- --ins-icon-button-smart-selected: #a078eb;
447
- --ins-icon-button-warning-pressed: #f2cf80;
448
- --ins-icon-button-warning-selected: #ecc468;
449
- --ins-icon-inverted-subtle: #4c4c4c;
450
- --ins-icon-magenta: #e693af;
451
- --ins-icon-magenta-oncolor: #f1becd;
452
- --ins-icon-orange: #fb9512;
453
- --ins-icon-orange-oncolor: #ffc38e;
454
- --ins-icon-primary-subtle: #ab92a8;
455
- --ins-icon-smart: #552990;
456
- --ins-icon-smart-oncolor: #c3a7ff;
457
- --ins-icon-state-error: #f92333;
458
- --ins-icon-state-error-oncolor: #ff9088;
459
- --ins-icon-state-info: #1d5ae3;
460
- --ins-icon-state-info-oncolor: #85aeff;
461
- --ins-icon-state-success: #59d482;
462
- --ins-icon-state-success-oncolor: #aeefbe;
463
- --ins-icon-state-warning: #e3af14;
464
- --ins-icon-state-warning-oncolor: #f7d996;
465
- --ins-icon-subtle: #8c8c8c;
466
- --ins-icon-subtle-hover: #cccccc;
467
- --ins-icon-tab-hover: #ddc8da;
468
- --ins-text-button-secondary: #e0dcd0;
469
- --ins-text-default: white;
470
- --ins-text-inverted: #18181b;
471
- --ins-text-magenta: #f1becd;
472
- --ins-text-magenta-subtle: #e693af;
473
- --ins-text-orange: #ffc38e;
474
- --ins-text-primary: #ead9e7;
475
- --ins-text-primary-subtle: #ddc8da;
476
- --ins-text-smart: #c3a7ff;
477
- --ins-text-state-disabled: #8c8c8c;
478
- --ins-text-state-error: #ff9088;
479
- --ins-text-state-error-subtle: #f92333;
480
- --ins-text-state-info: #85aeff;
481
- --ins-text-state-success: #aeefbe;
482
- --ins-text-state-warning: #f7d996;
483
- --ins-text-subtle: #cccccc;
484
- --ins-text-tab-hover: #ddc8da;
485
- --ins-text-button-error-pressed: #ff7b74;
486
- --ins-text-button-error-selected: #fc6661;
487
- --ins-text-button-inverted-pressed: #ddc8da;
488
- --ins-text-button-inverted-selected: #c3abc0;
489
- --ins-text-button-primary-pressed: #ead9e7;
490
- --ins-text-button-primary-selected: #ab92a8;
491
- --ins-text-button-secondary-pressed: #999381;
492
- --ins-text-button-secondary-selected: #c7c0ae;
493
- --ins-text-button-smart-pressed: #b190f5;
494
- --ins-text-button-smart-selected: #a078eb;
495
- --ins-text-button-warning-pressed: #f2cf80;
496
- --ins-text-button-warning-selected: #ecc468;
497
- --ins-text-calendarpopover-days-label: #cccccc;
498
- --ins-text-link: #fb330b;
499
- --ins-text-link-hover: #fc6c52;
500
- --ins-text-link-oncolor: #ffffff;
501
- --ins-text-link-visited: #d25f8c;
502
- --ins-text-smart-subtle: #8242da;
503
- --ins-text-state-info-subtle: #1d5ae3;
504
- --ins-text-state-success-subtle: #59d482;
505
- --ins-text-state-warning-subtle: #e3af14;
506
- --ins-visual-dataviz-datapaint-blue: #3a71e8;
507
- --ins-visual-dataviz-datapaint-blue-bold: #6c9bf7;
508
- --ins-visual-dataviz-datapaint-green-subtle: #42ab67;
509
- --ins-visual-dataviz-datapaint-purple: #a078eb;
510
- --ins-visual-dataviz-datapaint-red: #f92333;
511
- --ins-visual-dataviz-datapaint-solar-subtle: #fb5539;
512
- --ins-visual-illustration-blue-01: #081f50;
513
- --ins-visual-illustration-blue-02: #5386ef;
514
- --ins-visual-illustration-gray-01: #666666;
515
- --ins-visual-illustration-gray-02: #737373;
516
- --ins-visual-illustration-gray-04: #aaaaaa;
517
- --ins-visual-illustration-gray-05: #18181b;
518
- --ins-visual-illustration-gray-08: #cccccc;
519
- --ins-visual-illustration-purple-01: #a078eb;
520
- --ins-visual-illustration-purple-02: #c3a7ff;
521
- --ins-visual-illustration-red-01: #290606;
522
- --ins-visual-illustration-red-02: #cd1827;
523
- --ins-visual-illustration-red-03: #fa4d4d;
524
- --ins-visual-illustration-yellow-01: #3e2d00;
525
- --ins-visual-illustration-yellow-02: #8c6a00;
526
- --ins-visual-illustration-yellow-03: #b78b00;
527
- --ins-visual-illustration-yellow-04: #e3af14;
528
- --ins-visual-illustration-yellow-05: #ecc468;
529
- --ins-visual-scrollbar-thumb: #737373;
530
- --ins-visual-dataviz-datapaint-blue-subtle: #174abd;
531
- --ins-visual-dataviz-datapaint-eclipse: #ddc8da;
532
- --ins-visual-dataviz-datapaint-eclipse-bold: #ead9e7;
533
- --ins-visual-dataviz-datapaint-eclipse-subtle: #c3abc0;
534
- --ins-visual-dataviz-datapaint-gray: #999999;
535
- --ins-visual-dataviz-datapaint-gray-bold: #cccccc;
536
- --ins-visual-dataviz-datapaint-gray-subtle: #4c4c4c;
537
- --ins-visual-dataviz-datapaint-green: #59d482;
538
- --ins-visual-dataviz-datapaint-green-bold: #9ce8b0;
539
- --ins-visual-dataviz-datapaint-lunar: #d1857b;
540
- --ins-visual-dataviz-datapaint-lunar-bold: #e09b92;
541
- --ins-visual-dataviz-datapaint-lunar-subtle: #9f584f;
542
- --ins-visual-dataviz-datapaint-magenta: #dd799d;
543
- --ins-visual-dataviz-datapaint-magenta-bold: #e693af;
544
- --ins-visual-dataviz-datapaint-magenta-subtle: #b14370;
545
- --ins-visual-dataviz-datapaint-nova: #999381;
546
- --ins-visual-dataviz-datapaint-nova-bold: #c7c0ae;
547
- --ins-visual-dataviz-datapaint-nova-subtle: #524e44;
548
- --ins-visual-dataviz-datapaint-orange: #cb7600;
549
- --ins-visual-dataviz-datapaint-orange-bold: #fba247;
550
- --ins-visual-dataviz-datapaint-orange-subtle: #9c5a00;
551
- --ins-visual-dataviz-datapaint-purple-bold: #b190f5;
552
- --ins-visual-dataviz-datapaint-purple-subtle: #8242da;
553
- --ins-visual-dataviz-datapaint-red-bold: #fc6661;
554
- --ins-visual-dataviz-datapaint-red-subtle: #a20e1c;
555
- --ins-visual-dataviz-datapaint-solar: #fe7f68;
556
- --ins-visual-dataviz-datapaint-solar-bold: #ff917c;
557
- --ins-visual-dataviz-datapaint-solar-subtler: #791100;
558
- --ins-visual-dataviz-datapaint-yellow: #e3af14;
559
- --ins-visual-dataviz-datapaint-yellow-bold: #f2cf80;
560
- --ins-visual-dataviz-datapaint-yellow-subtle: #b78b00;
561
- --ins-visual-dataviz-grid-bar: #666666cc;
562
- --ins-visual-dataviz-grid-line: #595959;
563
- --ins-visual-illustration-eclipse-01: #2f272e;
564
- --ins-visual-illustration-gray-03: #999999;
565
- --ins-visual-illustration-gray-06: #cccccc;
566
- --ins-visual-illustration-gray-07: #8c8c8c;
567
- --ins-visual-illustration-gray-09: #595959;
568
- --ins-visual-illustration-red-04: #ff9088;
569
- --ins-visual-pagination-dot-active: #c3abc0;
570
- --ins-visual-pagination-dot-inactive: #666666;
571
- --ins-visual-scrollbar-charts-zoomarea: #66666666;
572
- --ins-visual-scrollbar-charts-zoomhandle: #aaaaaa;
573
- --ins-visual-scrollbar-datatable-pinspacer: #4c4c4c;
574
- --ins-visual-scrollbar-thumb-hover: #999999;
575
- --ins-visual-scrollbar-track: #262626;
576
- --ins-shadow-elevation: 0px 4px 12px 0px oklch(0.16 0 0 / 64%);
577
- --ins-shadow-primary: 0 0 0 3px oklch(0.43 0.037 321 / 96%);
578
- --ins-shadow-inverted: 0 0 0 3px oklch(0.70 0.026 322 / 48%);
579
- --ins-shadow-error: 0 0 0 3px oklch(0.63 0.211 25 / 28%);
580
- --ins-shadow-magenta: 0 0 0 3px oklch(0.56 0.200 4 / 24%);
581
- --ins-shadow-orange: 0 0 0 3px oklch(0.70 0.156 60 / 24%);
582
- --ins-shadow-secondary: 0 0 0 3px oklch(0.54 0.025 90 / 96%);
583
- --ins-shadow-smart: 0 0 0 3px oklch(0.45 0.191 298 / 36%);
584
- --ins-shadow-warning: 0 0 0 3px oklch(0.84 0.160 82 / 20%);
585
- }
586
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/design-tokens",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Insider rebranding design tokens — CSS custom properties, SCSS references, JSON and ab-components compat layer",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",