-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
design-tokens.ts
1271 lines (1161 loc) · 54.2 KB
/
design-tokens.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { DesignToken } from '@microsoft/fast-foundation';
import { Direction } from '@microsoft/fast-web-utilities';
import { Palette, PaletteRGB } from './color/palette';
import { Swatch, SwatchRGB } from './color/swatch';
import { foregroundOnAccentSet as foregroundOnAccentSetAlgorithm } from './color/recipes/foreground-on-accent';
import { gradientShadowStroke as gradientShadowStrokeAlgorithm } from './color/recipes/gradient-shadow-stroke';
import { underlineStroke as underlineStrokeAlgorithm } from './color/recipes/underline-stroke';
import { contrastSwatch } from './color/recipes/contrast-swatch';
import {
contrastAndDeltaSwatchSet,
contrastAndDeltaSwatchSetByLuminance,
} from './color/recipes/contrast-and-delta-swatch-set';
import { deltaSwatch } from './color/recipes/delta-swatch';
import { deltaSwatchSet, deltaSwatchSetByLuminance } from './color/recipes/delta-swatch-set';
import {
focusStrokeInner as focusStrokeInnerAlgorithm,
focusStrokeOuter as focusStrokeOuterAlgorithm,
} from './color/recipes/focus-stroke';
import { neutralLayerFloating as neutralLayerFloatingAlgorithm } from './color/recipes/neutral-layer-floating';
import { neutralLayer1 as neutralLayer1Algorithm } from './color/recipes/neutral-layer-1';
import { neutralLayer2 as neutralLayer2Algorithm } from './color/recipes/neutral-layer-2';
import { neutralLayer3 as neutralLayer3Algorithm } from './color/recipes/neutral-layer-3';
import { neutralLayer4 as neutralLayer4Algorithm } from './color/recipes/neutral-layer-4';
import { accentBase, middleGrey } from './color/utilities/color-constants';
import { StandardLuminance } from './color/utilities/base-layer-luminance';
import { InteractiveSwatchSet } from './color/recipe';
import { directionByIsDark } from './color/utilities/direction-by-is-dark';
import { StandardFontWeight } from './utilities/type-ramp';
/** @public @deprecated Use ColorRecipe instead */
export interface Recipe<T> {
evaluate(element: HTMLElement, reference?: Swatch): T;
}
/** @public */
export interface ColorRecipe {
evaluate(element: HTMLElement, reference?: Swatch): Swatch;
}
/** @public */
export interface InteractiveColorRecipe {
evaluate(element: HTMLElement, reference?: Swatch): InteractiveSwatchSet;
}
const { create } = DesignToken;
function createNonCss<T>(name: string): DesignToken<T> {
return DesignToken.create<T>({ name, cssCustomPropertyName: null });
}
// General tokens
/** @public */
export const direction = create<Direction>('direction').withDefault(Direction.ltr);
/** @public */
export const disabledOpacity = create<number>('disabled-opacity').withDefault(0.3);
// Density tokens
/** @public */
export const baseHeightMultiplier = create<number>('base-height-multiplier').withDefault(8);
/** @public */
export const baseHorizontalSpacingMultiplier = create<number>('base-horizontal-spacing-multiplier').withDefault(3);
/** @public */
export const density = create<number>('density').withDefault(0);
/** @public */
export const designUnit = create<number>('design-unit').withDefault(4);
// Appearance tokens
/** @public */
export const controlCornerRadius = create<number>('control-corner-radius').withDefault(4);
/** @public */
export const layerCornerRadius = create<number>('layer-corner-radius').withDefault(8);
/** @public */
export const strokeWidth = create<number>('stroke-width').withDefault(1);
/** @public */
export const focusStrokeWidth = create<number>('focus-stroke-width').withDefault(2);
// Typography values
/** @public */
export const bodyFont = create<string>('body-font').withDefault('"Segoe UI Variable", "Segoe UI", sans-serif');
/** @public */
export const fontWeight = create<number>('font-weight').withDefault(StandardFontWeight.Normal);
function fontVariations(sizeToken: DesignToken<string>): (element: HTMLElement) => string {
return (element: HTMLElement): string => {
const size = sizeToken.getValueFor(element);
const weight = fontWeight.getValueFor(element);
if (size.endsWith('px')) {
const px = Number.parseFloat(size.replace('px', ''));
if (px <= 12) {
return `"wght" ${weight}, "opsz" 8`;
} else if (px > 24) {
return `"wght" ${weight}, "opsz" 36`;
}
}
return `"wght" ${weight}, "opsz" 10.5`;
};
}
/** @public */
export const typeRampBaseFontSize = create<string>('type-ramp-base-font-size').withDefault('14px');
/** @public */
export const typeRampBaseLineHeight = create<string>('type-ramp-base-line-height').withDefault('20px');
/** @public */
export const typeRampBaseFontVariations = create<string>('type-ramp-base-font-variations').withDefault(
fontVariations(typeRampBaseFontSize),
);
/** @public */
export const typeRampMinus1FontSize = create<string>('type-ramp-minus-1-font-size').withDefault('12px');
/** @public */
export const typeRampMinus1LineHeight = create<string>('type-ramp-minus-1-line-height').withDefault('16px');
/** @public */
export const typeRampMinus1FontVariations = create<string>('type-ramp-minus-1-font-variations').withDefault(
fontVariations(typeRampMinus1FontSize),
);
/** @public */
export const typeRampMinus2FontSize = create<string>('type-ramp-minus-2-font-size').withDefault('10px');
/** @public */
export const typeRampMinus2LineHeight = create<string>('type-ramp-minus-2-line-height').withDefault('14px');
/** @public */
export const typeRampMinus2FontVariations = create<string>('type-ramp-minus-2-font-variations').withDefault(
fontVariations(typeRampMinus2FontSize),
);
/** @public */
export const typeRampPlus1FontSize = create<string>('type-ramp-plus-1-font-size').withDefault('16px');
/** @public */
export const typeRampPlus1LineHeight = create<string>('type-ramp-plus-1-line-height').withDefault('22px');
/** @public */
export const typeRampPlus1FontVariations = create<string>('type-ramp-plus-1-font-variations').withDefault(
fontVariations(typeRampPlus1FontSize),
);
/** @public */
export const typeRampPlus2FontSize = create<string>('type-ramp-plus-2-font-size').withDefault('20px');
/** @public */
export const typeRampPlus2LineHeight = create<string>('type-ramp-plus-2-line-height').withDefault('26px');
/** @public */
export const typeRampPlus2FontVariations = create<string>('type-ramp-plus-2-font-variations').withDefault(
fontVariations(typeRampPlus2FontSize),
);
/** @public */
export const typeRampPlus3FontSize = create<string>('type-ramp-plus-3-font-size').withDefault('24px');
/** @public */
export const typeRampPlus3LineHeight = create<string>('type-ramp-plus-3-line-height').withDefault('32px');
/** @public */
export const typeRampPlus3FontVariations = create<string>('type-ramp-plus-3-font-variations').withDefault(
fontVariations(typeRampPlus3FontSize),
);
/** @public */
export const typeRampPlus4FontSize = create<string>('type-ramp-plus-4-font-size').withDefault('28px');
/** @public */
export const typeRampPlus4LineHeight = create<string>('type-ramp-plus-4-line-height').withDefault('36px');
/** @public */
export const typeRampPlus4FontVariations = create<string>('type-ramp-plus-4-font-variations').withDefault(
fontVariations(typeRampPlus4FontSize),
);
/** @public */
export const typeRampPlus5FontSize = create<string>('type-ramp-plus-5-font-size').withDefault('32px');
/** @public */
export const typeRampPlus5LineHeight = create<string>('type-ramp-plus-5-line-height').withDefault('40px');
/** @public */
export const typeRampPlus5FontVariations = create<string>('type-ramp-plus-5-font-variations').withDefault(
fontVariations(typeRampPlus5FontSize),
);
/** @public */
export const typeRampPlus6FontSize = create<string>('type-ramp-plus-6-font-size').withDefault('40px');
/** @public */
export const typeRampPlus6LineHeight = create<string>('type-ramp-plus-6-line-height').withDefault('52px');
/** @public */
export const typeRampPlus6FontVariations = create<string>('type-ramp-plus-6-font-variations').withDefault(
fontVariations(typeRampPlus6FontSize),
);
// Color recipe values
/** @public */
export const baseLayerLuminance = create<number>('base-layer-luminance').withDefault(StandardLuminance.LightMode);
/** @public */
export const accentFillRestDelta = createNonCss<number>('accent-fill-rest-delta').withDefault(0);
/** @public */
export const accentFillHoverDelta = createNonCss<number>('accent-fill-hover-delta').withDefault(-2);
/** @public */
export const accentFillActiveDelta = createNonCss<number>('accent-fill-active-delta').withDefault(-5);
/** @public */
export const accentFillFocusDelta = createNonCss<number>('accent-fill-focus-delta').withDefault(0);
/** @public */
export const accentForegroundRestDelta = createNonCss<number>('accent-foreground-rest-delta').withDefault(0);
/** @public */
export const accentForegroundHoverDelta = createNonCss<number>('accent-foreground-hover-delta').withDefault(3);
/** @public */
export const accentForegroundActiveDelta = createNonCss<number>('accent-foreground-active-delta').withDefault(-8);
/** @public */
export const accentForegroundFocusDelta = createNonCss<number>('accent-foreground-focus-delta').withDefault(0);
/** @public */
export const neutralFillRestDelta = createNonCss<number>('neutral-fill-rest-delta').withDefault(-1);
/** @public */
export const neutralFillHoverDelta = createNonCss<number>('neutral-fill-hover-delta').withDefault(1);
/** @public */
export const neutralFillActiveDelta = createNonCss<number>('neutral-fill-active-delta').withDefault(0);
/** @public */
export const neutralFillFocusDelta = createNonCss<number>('neutral-fill-focus-delta').withDefault(0);
/** @public */
export const neutralFillInputRestDelta = createNonCss<number>('neutral-fill-input-rest-delta').withDefault(-1);
/** @public */
export const neutralFillInputHoverDelta = createNonCss<number>('neutral-fill-input-hover-delta').withDefault(1);
/** @public */
export const neutralFillInputActiveDelta = createNonCss<number>('neutral-fill-input-active-delta').withDefault(0);
/** @public */
export const neutralFillInputFocusDelta = createNonCss<number>('neutral-fill-input-focus-delta').withDefault(-2);
/** @public */
export const neutralFillInputAltRestDelta = createNonCss<number>('neutral-fill-input-alt-rest-delta').withDefault(2);
/** @public */
export const neutralFillInputAltHoverDelta = createNonCss<number>('neutral-fill-input-alt-hover-delta').withDefault(4);
/** @public */
export const neutralFillInputAltActiveDelta = createNonCss<number>('neutral-fill-input-alt-active-delta').withDefault(
6,
);
/** @public */
export const neutralFillInputAltFocusDelta = createNonCss<number>('neutral-fill-input-alt-focus-delta').withDefault(2);
/** @public */
export const neutralFillLayerRestDelta = createNonCss<number>('neutral-fill-layer-rest-delta').withDefault(-2);
/** @public */
export const neutralFillLayerHoverDelta = createNonCss<number>('neutral-fill-layer-hover-delta').withDefault(-3);
/** @public */
export const neutralFillLayerActiveDelta = createNonCss<number>('neutral-fill-layer-active-delta').withDefault(-3);
/** @public */
export const neutralFillLayerAltRestDelta = createNonCss<number>('neutral-fill-layer-alt-rest-delta').withDefault(-1);
/** @public */
export const neutralFillSecondaryRestDelta = createNonCss<number>('neutral-fill-secondary-rest-delta').withDefault(3);
/** @public */
export const neutralFillSecondaryHoverDelta = createNonCss<number>('neutral-fill-secondary-hover-delta').withDefault(2);
/** @public */
export const neutralFillSecondaryActiveDelta = createNonCss<number>('neutral-fill-secondary-active-delta').withDefault(
1,
);
/** @public */
export const neutralFillSecondaryFocusDelta = createNonCss<number>('neutral-fill-secondary-focus-delta').withDefault(3);
/** @public */
export const neutralFillStealthRestDelta = createNonCss<number>('neutral-fill-stealth-rest-delta').withDefault(0);
/** @public */
export const neutralFillStealthHoverDelta = createNonCss<number>('neutral-fill-stealth-hover-delta').withDefault(3);
/** @public */
export const neutralFillStealthActiveDelta = createNonCss<number>('neutral-fill-stealth-active-delta').withDefault(2);
/** @public */
export const neutralFillStealthFocusDelta = createNonCss<number>('neutral-fill-stealth-focus-delta').withDefault(0);
/** @public */
export const neutralFillStrongRestDelta = createNonCss<number>('neutral-fill-strong-rest-delta').withDefault(0);
/** @public */
export const neutralFillStrongHoverDelta = createNonCss<number>('neutral-fill-strong-hover-delta').withDefault(8);
/** @public */
export const neutralFillStrongActiveDelta = createNonCss<number>('neutral-fill-strong-active-delta').withDefault(-5);
/** @public */
export const neutralFillStrongFocusDelta = createNonCss<number>('neutral-fill-strong-focus-delta').withDefault(0);
/** @public */
export const neutralStrokeRestDelta = createNonCss<number>('neutral-stroke-rest-delta').withDefault(8);
/** @public */
export const neutralStrokeHoverDelta = createNonCss<number>('neutral-stroke-hover-delta').withDefault(12);
/** @public */
export const neutralStrokeActiveDelta = createNonCss<number>('neutral-stroke-active-delta').withDefault(6);
/** @public */
export const neutralStrokeFocusDelta = createNonCss<number>('neutral-stroke-focus-delta').withDefault(8);
/** @public */
export const neutralStrokeControlRestDelta = createNonCss<number>('neutral-stroke-control-rest-delta').withDefault(3);
/** @public */
export const neutralStrokeControlHoverDelta = createNonCss<number>('neutral-stroke-control-hover-delta').withDefault(5);
/** @public */
export const neutralStrokeControlActiveDelta = createNonCss<number>('neutral-stroke-control-active-delta').withDefault(
5,
);
/** @public */
export const neutralStrokeControlFocusDelta = createNonCss<number>('neutral-stroke-control-focus-delta').withDefault(5);
/** @public */
export const neutralStrokeDividerRestDelta = createNonCss<number>('neutral-stroke-divider-rest-delta').withDefault(4);
/** @public */
export const neutralStrokeLayerRestDelta = createNonCss<number>('neutral-stroke-layer-rest-delta').withDefault(3);
/** @public */
export const neutralStrokeLayerHoverDelta = createNonCss<number>('neutral-stroke-layer-hover-delta').withDefault(3);
/** @public */
export const neutralStrokeLayerActiveDelta = createNonCss<number>('neutral-stroke-layer-active-delta').withDefault(3);
/** @public */
export const neutralStrokeStrongHoverDelta = createNonCss<number>('neutral-stroke-strong-hover-delta').withDefault(0);
/** @public */
export const neutralStrokeStrongActiveDelta = createNonCss<number>('neutral-stroke-strong-active-delta').withDefault(0);
/** @public */
export const neutralStrokeStrongFocusDelta = createNonCss<number>('neutral-stroke-strong-focus-delta').withDefault(0);
// Color recipes
/** @public */
export const neutralBaseColor = create<Swatch>('neutral-base-color').withDefault(middleGrey);
/** @public */
export const neutralPalette = createNonCss<Palette>('neutral-palette').withDefault((element: HTMLElement) =>
PaletteRGB.from(neutralBaseColor.getValueFor(element) as SwatchRGB),
);
/** @public */
export const accentBaseColor = create<Swatch>('accent-base-color').withDefault(accentBase);
/** @public */
export const accentPalette = createNonCss<Palette>('accent-palette').withDefault((element: HTMLElement) =>
PaletteRGB.from(accentBaseColor.getValueFor(element) as SwatchRGB),
);
// Neutral Layer Card Container
/** @public */
export const neutralLayerCardContainerRecipe = createNonCss<ColorRecipe>(
'neutral-layer-card-container-recipe',
).withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayer2Algorithm(
neutralPalette.getValueFor(element),
baseLayerLuminance.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralLayerCardContainer = create<Swatch>('neutral-layer-card-container').withDefault(
(element: HTMLElement) => neutralLayerCardContainerRecipe.getValueFor(element).evaluate(element),
);
// Neutral Layer Floating
/** @public */
export const neutralLayerFloatingRecipe = createNonCss<ColorRecipe>('neutral-layer-floating-recipe').withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayerFloatingAlgorithm(
neutralPalette.getValueFor(element),
baseLayerLuminance.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralLayerFloating = create<Swatch>('neutral-layer-floating').withDefault((element: HTMLElement) =>
neutralLayerFloatingRecipe.getValueFor(element).evaluate(element),
);
// Neutral Layer 1
/** @public */
export const neutralLayer1Recipe = createNonCss<ColorRecipe>('neutral-layer-1-recipe').withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayer1Algorithm(neutralPalette.getValueFor(element), baseLayerLuminance.getValueFor(element)),
});
/** @public */
export const neutralLayer1 = create<Swatch>('neutral-layer-1').withDefault((element: HTMLElement) =>
neutralLayer1Recipe.getValueFor(element).evaluate(element),
);
// Neutral Layer 2
/** @public */
export const neutralLayer2Recipe = createNonCss<ColorRecipe>('neutral-layer-2-recipe').withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayer2Algorithm(
neutralPalette.getValueFor(element),
baseLayerLuminance.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralLayer2 = create<Swatch>('neutral-layer-2').withDefault((element: HTMLElement) =>
neutralLayer2Recipe.getValueFor(element).evaluate(element),
);
// Neutral Layer 3
/** @public */
export const neutralLayer3Recipe = createNonCss<ColorRecipe>('neutral-layer-3-recipe').withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayer3Algorithm(
neutralPalette.getValueFor(element),
baseLayerLuminance.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralLayer3 = create<Swatch>('neutral-layer-3').withDefault((element: HTMLElement) =>
neutralLayer3Recipe.getValueFor(element).evaluate(element),
);
// Neutral Layer 4
/** @public */
export const neutralLayer4Recipe = createNonCss<ColorRecipe>('neutral-layer-4-recipe').withDefault({
evaluate: (element: HTMLElement): Swatch =>
neutralLayer4Algorithm(
neutralPalette.getValueFor(element),
baseLayerLuminance.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralLayer4 = create<Swatch>('neutral-layer-4').withDefault((element: HTMLElement) =>
neutralLayer4Recipe.getValueFor(element).evaluate(element),
);
/** @public */
export const fillColor = create<Swatch>('fill-color').withDefault(element => neutralLayer1.getValueFor(element));
enum ContrastTarget {
normal = 4.5,
large = 3,
}
// Accent Fill
/** @public */
export const accentFillRecipe = createNonCss<InteractiveColorRecipe>('accent-fill-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
contrastAndDeltaSwatchSetByLuminance(
accentPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
5,
accentFillRestDelta.getValueFor(element),
accentFillHoverDelta.getValueFor(element),
accentFillActiveDelta.getValueFor(element),
accentFillFocusDelta.getValueFor(element),
undefined,
8,
accentFillRestDelta.getValueFor(element),
accentFillHoverDelta.getValueFor(element),
accentFillActiveDelta.getValueFor(element),
accentFillFocusDelta.getValueFor(element),
undefined,
),
});
/** @public */
export const accentFillRest = create<Swatch>('accent-fill-rest').withDefault((element: HTMLElement) => {
return accentFillRecipe.getValueFor(element).evaluate(element).rest;
});
/** @public */
export const accentFillHover = create<Swatch>('accent-fill-hover').withDefault((element: HTMLElement) => {
return accentFillRecipe.getValueFor(element).evaluate(element).hover;
});
/** @public */
export const accentFillActive = create<Swatch>('accent-fill-active').withDefault((element: HTMLElement) => {
return accentFillRecipe.getValueFor(element).evaluate(element).active;
});
/** @public */
export const accentFillFocus = create<Swatch>('accent-fill-focus').withDefault((element: HTMLElement) => {
return accentFillRecipe.getValueFor(element).evaluate(element).focus;
});
// Foreground On Accent
/** @public */
export const foregroundOnAccentRecipe = createNonCss<InteractiveColorRecipe>('foreground-on-accent-recipe').withDefault(
{
evaluate: (element: HTMLElement): InteractiveSwatchSet =>
foregroundOnAccentSetAlgorithm(
accentFillRest.getValueFor(element),
accentFillHover.getValueFor(element),
accentFillActive.getValueFor(element),
accentFillFocus.getValueFor(element),
ContrastTarget.normal,
),
},
);
/** @public */
export const foregroundOnAccentRest = create<Swatch>('foreground-on-accent-rest').withDefault(
(element: HTMLElement) => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const foregroundOnAccentHover = create<Swatch>('foreground-on-accent-hover').withDefault(
(element: HTMLElement) => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const foregroundOnAccentActive = create<Swatch>('foreground-on-accent-active').withDefault(
(element: HTMLElement) => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const foregroundOnAccentFocus = create<Swatch>('foreground-on-accent-focus').withDefault(
(element: HTMLElement) => foregroundOnAccentRecipe.getValueFor(element).evaluate(element).focus,
);
// Accent Foreground
/** @public */
export const accentForegroundRecipe = createNonCss<InteractiveColorRecipe>('accent-foreground-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
contrastAndDeltaSwatchSet(
accentPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
9.5,
accentForegroundRestDelta.getValueFor(element),
accentForegroundHoverDelta.getValueFor(element),
accentForegroundActiveDelta.getValueFor(element),
accentForegroundFocusDelta.getValueFor(element),
),
});
/** @public */
export const accentForegroundRest = create<Swatch>('accent-foreground-rest').withDefault(
(element: HTMLElement) => accentForegroundRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const accentForegroundHover = create<Swatch>('accent-foreground-hover').withDefault(
(element: HTMLElement) => accentForegroundRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const accentForegroundActive = create<Swatch>('accent-foreground-active').withDefault(
(element: HTMLElement) => accentForegroundRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const accentForegroundFocus = create<Swatch>('accent-foreground-focus').withDefault(
(element: HTMLElement) => accentForegroundRecipe.getValueFor(element).evaluate(element).focus,
);
// Accent Stroke Control
/** @public */
export const accentStrokeControlRecipe = createNonCss<InteractiveColorRecipe>(
'accent-stroke-control-recipe',
).withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet => {
return gradientShadowStrokeAlgorithm(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
-3,
-3,
-3,
-3,
10,
1,
undefined,
true,
);
},
});
/** @public */
export const accentStrokeControlRest = create<Swatch>('accent-stroke-control-rest').withDefault(
(element: HTMLElement) =>
accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillRest.getValueFor(element)).rest,
);
/** @public */
export const accentStrokeControlHover = create<Swatch>('accent-stroke-control-hover').withDefault(
(element: HTMLElement) =>
accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillHover.getValueFor(element)).hover,
);
/** @public */
export const accentStrokeControlActive = create<Swatch>('accent-stroke-control-active').withDefault(
(element: HTMLElement) =>
accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillActive.getValueFor(element)).active,
);
/** @public */
export const accentStrokeControlFocus = create<Swatch>('accent-stroke-control-focus').withDefault(
(element: HTMLElement) =>
accentStrokeControlRecipe.getValueFor(element).evaluate(element, accentFillFocus.getValueFor(element)).focus,
);
// Neutral Fill
/** @public */
export const neutralFillRecipe = createNonCss<InteractiveColorRecipe>('neutral-fill-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSetByLuminance(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillRestDelta.getValueFor(element),
neutralFillHoverDelta.getValueFor(element),
neutralFillActiveDelta.getValueFor(element),
neutralFillFocusDelta.getValueFor(element),
undefined,
2,
3,
1,
2,
undefined,
),
});
/** @public */
export const neutralFillRest = create<Swatch>('neutral-fill-rest').withDefault(
(element: HTMLElement) => neutralFillRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillHover = create<Swatch>('neutral-fill-hover').withDefault(
(element: HTMLElement) => neutralFillRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillActive = create<Swatch>('neutral-fill-active').withDefault(
(element: HTMLElement) => neutralFillRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillFocus = create<Swatch>('neutral-fill-focus').withDefault(
(element: HTMLElement) => neutralFillRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Fill Input
/** @public */
export const neutralFillInputRecipe = createNonCss<InteractiveColorRecipe>('neutral-fill-input-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSetByLuminance(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillInputRestDelta.getValueFor(element),
neutralFillInputHoverDelta.getValueFor(element),
neutralFillInputActiveDelta.getValueFor(element),
neutralFillInputFocusDelta.getValueFor(element),
undefined,
2,
3,
1,
0,
undefined,
),
});
/** @public */
export const neutralFillInputRest = create<Swatch>('neutral-fill-input-rest').withDefault(
(element: HTMLElement) => neutralFillInputRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillInputHover = create<Swatch>('neutral-fill-input-hover').withDefault(
(element: HTMLElement) => neutralFillInputRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillInputActive = create<Swatch>('neutral-fill-input-active').withDefault(
(element: HTMLElement) => neutralFillInputRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillInputFocus = create<Swatch>('neutral-fill-input-focus').withDefault(
(element: HTMLElement) => neutralFillInputRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Fill Input Alt
/** @public */
export const neutralFillInputAltRecipe = createNonCss<InteractiveColorRecipe>(
'neutral-fill-input-alt-recipe',
).withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSetByLuminance(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillInputAltRestDelta.getValueFor(element),
neutralFillInputAltHoverDelta.getValueFor(element),
neutralFillInputAltActiveDelta.getValueFor(element),
neutralFillInputAltFocusDelta.getValueFor(element),
1,
neutralFillInputAltRestDelta.getValueFor(element),
neutralFillInputAltRestDelta.getValueFor(element) - neutralFillInputAltHoverDelta.getValueFor(element),
neutralFillInputAltRestDelta.getValueFor(element) - neutralFillInputAltActiveDelta.getValueFor(element),
neutralFillInputAltFocusDelta.getValueFor(element),
1,
),
});
/** @public */
export const neutralFillInputAltRest = create<Swatch>('neutral-fill-input-alt-rest').withDefault(
(element: HTMLElement) => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillInputAltHover = create<Swatch>('neutral-fill-input-alt-hover').withDefault(
(element: HTMLElement) => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillInputAltActive = create<Swatch>('neutral-fill-input-alt-active').withDefault(
(element: HTMLElement) => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillInputAltFocus = create<Swatch>('neutral-fill-input-alt-focus').withDefault(
(element: HTMLElement) => neutralFillInputAltRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Fill Layer
/** @public */
export const neutralFillLayerRecipe = createNonCss<InteractiveColorRecipe>('neutral-fill-layer-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
neutralFillLayerHoverDelta.getValueFor(element),
neutralFillLayerActiveDelta.getValueFor(element),
neutralFillLayerRestDelta.getValueFor(element),
1,
),
});
/** @public */
export const neutralFillLayerRest = create<Swatch>('neutral-fill-layer-rest').withDefault(
(element: HTMLElement) => neutralFillLayerRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillLayerHover = create<Swatch>('neutral-fill-layer-hover').withDefault(
(element: HTMLElement) => neutralFillLayerRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillLayerActive = create<Swatch>('neutral-fill-layer-active').withDefault(
(element: HTMLElement) => neutralFillLayerRecipe.getValueFor(element).evaluate(element).active,
);
// Neutral Fill Layer Alt
/** @public */
export const neutralFillLayerAltRecipe = createNonCss<InteractiveColorRecipe>(
'neutral-fill-layer-alt-recipe',
).withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillLayerAltRestDelta.getValueFor(element),
neutralFillLayerAltRestDelta.getValueFor(element),
neutralFillLayerAltRestDelta.getValueFor(element),
neutralFillLayerAltRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralFillLayerAltRest = create<Swatch>('neutral-fill-layer-alt-rest').withDefault(
(element: HTMLElement) => neutralFillLayerAltRecipe.getValueFor(element).evaluate(element).rest,
);
// Neutral Fill Secondary
/** @public */
export const neutralFillSecondaryRecipe = createNonCss<InteractiveColorRecipe>(
'neutral-fill-secondary-recipe',
).withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillSecondaryRestDelta.getValueFor(element),
neutralFillSecondaryHoverDelta.getValueFor(element),
neutralFillSecondaryActiveDelta.getValueFor(element),
neutralFillSecondaryFocusDelta.getValueFor(element),
),
});
/** @public */
export const neutralFillSecondaryRest = create<Swatch>('neutral-fill-secondary-rest').withDefault(
(element: HTMLElement) => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillSecondaryHover = create<Swatch>('neutral-fill-secondary-hover').withDefault(
(element: HTMLElement) => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillSecondaryActive = create<Swatch>('neutral-fill-secondary-active').withDefault(
(element: HTMLElement) => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillSecondaryFocus = create<Swatch>('neutral-fill-secondary-focus').withDefault(
(element: HTMLElement) => neutralFillSecondaryRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Fill Stealth
/** @public */
export const neutralFillStealthRecipe = createNonCss<InteractiveColorRecipe>('neutral-fill-stealth-recipe').withDefault(
{
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralFillStealthRestDelta.getValueFor(element),
neutralFillStealthHoverDelta.getValueFor(element),
neutralFillStealthActiveDelta.getValueFor(element),
neutralFillStealthFocusDelta.getValueFor(element),
),
},
);
/** @public */
export const neutralFillStealthRest = create<Swatch>('neutral-fill-stealth-rest').withDefault(
(element: HTMLElement) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillStealthHover = create<Swatch>('neutral-fill-stealth-hover').withDefault(
(element: HTMLElement) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillStealthActive = create<Swatch>('neutral-fill-stealth-active').withDefault(
(element: HTMLElement) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillStealthFocus = create<Swatch>('neutral-fill-stealth-focus').withDefault(
(element: HTMLElement) => neutralFillStealthRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Fill Strong
/** @public */
export const neutralFillStrongRecipe = createNonCss<InteractiveColorRecipe>('neutral-fill-strong-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
contrastAndDeltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
4.5,
neutralFillStrongRestDelta.getValueFor(element),
neutralFillStrongHoverDelta.getValueFor(element),
neutralFillStrongActiveDelta.getValueFor(element),
neutralFillStrongFocusDelta.getValueFor(element),
),
});
/** @public */
export const neutralFillStrongRest = create<Swatch>('neutral-fill-strong-rest').withDefault(
(element: HTMLElement) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralFillStrongHover = create<Swatch>('neutral-fill-strong-hover').withDefault(
(element: HTMLElement) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralFillStrongActive = create<Swatch>('neutral-fill-strong-active').withDefault(
(element: HTMLElement) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralFillStrongFocus = create<Swatch>('neutral-fill-strong-focus').withDefault(
(element: HTMLElement) => neutralFillStrongRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Foreground
/** @public */
export const neutralForegroundRecipe = createNonCss<InteractiveColorRecipe>('neutral-foreground-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet =>
contrastAndDeltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
16,
0,
-19,
-30,
0,
),
});
/** @public */
export const neutralForegroundRest = create<Swatch>('neutral-foreground-rest').withDefault(
(element: HTMLElement) => neutralForegroundRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralForegroundHover = create<Swatch>('neutral-foreground-hover').withDefault(
(element: HTMLElement) => neutralForegroundRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralForegroundActive = create<Swatch>('neutral-foreground-active').withDefault(
(element: HTMLElement) => neutralForegroundRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralForegroundFocus = create<Swatch>('neutral-foreground-focus').withDefault(
(element: HTMLElement) => neutralForegroundRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Foreground Hint
/** @public */
export const neutralForegroundHintRecipe = createNonCss<ColorRecipe>('neutral-foreground-hint-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): Swatch =>
contrastSwatch(neutralPalette.getValueFor(element), reference || fillColor.getValueFor(element), 4.5),
});
/** @public */
export const neutralForegroundHint = create<Swatch>('neutral-foreground-hint').withDefault((element: HTMLElement) =>
neutralForegroundHintRecipe.getValueFor(element).evaluate(element),
);
// Neutral Stroke
/** @public */
export const neutralStrokeRecipe = createNonCss<InteractiveColorRecipe>('neutral-stroke-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet => {
return deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralStrokeRestDelta.getValueFor(element),
neutralStrokeHoverDelta.getValueFor(element),
neutralStrokeActiveDelta.getValueFor(element),
neutralStrokeFocusDelta.getValueFor(element),
);
},
});
/** @public */
export const neutralStrokeRest = create<Swatch>('neutral-stroke-rest').withDefault(
(element: HTMLElement) => neutralStrokeRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralStrokeHover = create<Swatch>('neutral-stroke-hover').withDefault(
(element: HTMLElement) => neutralStrokeRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralStrokeActive = create<Swatch>('neutral-stroke-active').withDefault(
(element: HTMLElement) => neutralStrokeRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralStrokeFocus = create<Swatch>('neutral-stroke-focus').withDefault(
(element: HTMLElement) => neutralStrokeRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Stroke Control
/** @public */
export const neutralStrokeControlRecipe = createNonCss<InteractiveColorRecipe>(
'neutral-stroke-control-recipe',
).withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet => {
return gradientShadowStrokeAlgorithm(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralStrokeControlRestDelta.getValueFor(element),
neutralStrokeControlHoverDelta.getValueFor(element),
neutralStrokeControlActiveDelta.getValueFor(element),
neutralStrokeControlFocusDelta.getValueFor(element),
5,
);
},
});
/** @public */
export const neutralStrokeControlRest = create<Swatch>('neutral-stroke-control-rest').withDefault(
(element: HTMLElement) => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralStrokeControlHover = create<Swatch>('neutral-stroke-control-hover').withDefault(
(element: HTMLElement) => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralStrokeControlActive = create<Swatch>('neutral-stroke-control-active').withDefault(
(element: HTMLElement) => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralStrokeControlFocus = create<Swatch>('neutral-stroke-control-focus').withDefault(
(element: HTMLElement) => neutralStrokeControlRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Stroke Divider
/** @public */
export const neutralStrokeDividerRecipe = createNonCss<ColorRecipe>('neutral-stroke-divider-recipe').withDefault({
evaluate: (element: HTMLElement, reference?: Swatch): Swatch =>
deltaSwatch(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralStrokeDividerRestDelta.getValueFor(element),
),
});
/** @public */
export const neutralStrokeDividerRest = create<Swatch>('neutral-stroke-divider-rest').withDefault(element =>
neutralStrokeDividerRecipe.getValueFor(element).evaluate(element),
);
// Neutral Stroke Input
/** @public */
export const neutralStrokeInputRecipe = createNonCss<InteractiveColorRecipe>('neutral-stroke-input-recipe').withDefault(
{
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet => {
return underlineStrokeAlgorithm(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralStrokeControlRestDelta.getValueFor(element),
neutralStrokeControlHoverDelta.getValueFor(element),
neutralStrokeControlActiveDelta.getValueFor(element),
neutralStrokeControlFocusDelta.getValueFor(element),
20,
strokeWidth.getValueFor(element) + 'px',
);
},
},
);
/** @public */
export const neutralStrokeInputRest = create<Swatch>('neutral-stroke-input-rest').withDefault(
(element: HTMLElement) => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).rest,
);
/** @public */
export const neutralStrokeInputHover = create<Swatch>('neutral-stroke-input-hover').withDefault(
(element: HTMLElement) => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).hover,
);
/** @public */
export const neutralStrokeInputActive = create<Swatch>('neutral-stroke-input-active').withDefault(
(element: HTMLElement) => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).active,
);
/** @public */
export const neutralStrokeInputFocus = create<Swatch>('neutral-stroke-input-focus').withDefault(
(element: HTMLElement) => neutralStrokeInputRecipe.getValueFor(element).evaluate(element).focus,
);
// Neutral Stroke Layer
/** @public */
export const neutralStrokeLayerRecipe = createNonCss<InteractiveColorRecipe>('neutral-stroke-layer-recipe').withDefault(
{
evaluate: (element: HTMLElement, reference?: Swatch): InteractiveSwatchSet => {
return deltaSwatchSet(
neutralPalette.getValueFor(element),
reference || fillColor.getValueFor(element),
neutralStrokeLayerRestDelta.getValueFor(element),
neutralStrokeLayerHoverDelta.getValueFor(element),
neutralStrokeLayerActiveDelta.getValueFor(element),
neutralStrokeLayerRestDelta.getValueFor(element),
);
},
},