@adobe/spectrum-tokens 12.0.0-beta.66 → 12.0.0-beta.68

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/CHANGELOG.md CHANGED
@@ -1,8 +1,15 @@
1
- # [12.0.0-beta.66](https://github.com/adobe/spectrum-tokens/compare/v12.0.0-beta.65...v12.0.0-beta.66) (2023-01-11)
1
+ # [12.0.0-beta.68](https://github.com/adobe/spectrum-tokens/compare/v12.0.0-beta.67...v12.0.0-beta.68) (2023-02-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fixed missing token sets for color loupe ([7de5d5b](https://github.com/adobe/spectrum-tokens/commit/7de5d5bf4148e565336b65aed8691275896c0b87))
2
7
 
3
8
 
4
9
  ### Features
5
10
 
6
- * added illustrated-message tokens ([3326f28](https://github.com/adobe/spectrum-tokens/commit/3326f28d285a7cbbc9c97d74d7ca032e2442a79f))
7
- * added missing field-edge-to-visual-quiet token ([4250036](https://github.com/adobe/spectrum-tokens/commit/4250036a7923837a2e28937812b2488c40f29b61))
8
- * added search-field tokens ([3f8f544](https://github.com/adobe/spectrum-tokens/commit/3f8f54493eec685897429b6379345889073f84a3))
11
+ * added detail typography tokens for uppercase, DNA-1257 ([a4fce7e](https://github.com/adobe/spectrum-tokens/commit/a4fce7e3b197f23f92a5f8f869d4cf11f32339dc))
12
+ * added dropzone tokens, DNA-1258 ([c0ce9df](https://github.com/adobe/spectrum-tokens/commit/c0ce9dfe39f0a9a22ac5b3ba31bebb4c80aa48e4))
13
+ * added new alert dialog typography tokens, DNA-1255 ([f590663](https://github.com/adobe/spectrum-tokens/commit/f590663292178e5d261013d4e830de487fcadd25))
14
+ * new typography color tokens, DNA-1254 ([b836ae5](https://github.com/adobe/spectrum-tokens/commit/b836ae5e47014e6a5eca23e9e574b5f6d27a04b1))
15
+ * updated color-wheel-minimum-width and added color-wheel-width, DNA-1256 ([57ee5f4](https://github.com/adobe/spectrum-tokens/commit/57ee5f425abde5941c486224c91b3bd4d82a3261))
package/README.md CHANGED
@@ -1,19 +1,15 @@
1
1
  # Spectrum Tokens
2
2
 
3
3
  ---
4
-
5
-
4
+
6
5
  # Note: This project is in beta right now.
7
6
 
8
-
9
-
10
- ---
7
+ ---
11
8
 
12
9
  Design tokens are all the values needed to construct and maintain a design system — spacing, color, typography, object styles, animation, etc. — represented as data. These can represent anything defined by design: a color as a RGB value, an opacity as a number, an animation ease as Bezier coordinates. They’re used in place of hard-coded values in order to ensure flexibility and unity across all product experiences.
13
10
 
14
11
  Design tokens are directly integrated into our component libraries, UI kits, and the Spectrum XD plugin. They cover the various options of platform scales, color themes, component states, and more. We also offer teams a variety of token types to use directly within their products if they are not using a Spectrum component library.
15
12
 
16
-
17
13
  ## Getting started
18
14
 
19
15
  Start by installing all the project dependencies.
@@ -16,4 +16,4 @@ governing permissions and limitations under the License.
16
16
 
17
17
  module.exports = {
18
18
  extends: ["@commitlint/config-conventional"],
19
- };
19
+ };
@@ -55,7 +55,9 @@
55
55
  "blue-900": "rgb(2, 101, 220)",
56
56
  "blue-background-color-default": "rgb(2, 101, 220)",
57
57
  "blue-visual-color": "rgb(20, 122, 243)",
58
+ "body-color": "rgb(34, 34, 34)",
58
59
  "border-width-100": "1px",
60
+ "card-selection-background-color": "rgb(248, 248, 248)",
59
61
  "celery-100": "rgb(205, 252, 191)",
60
62
  "celery-1000": "rgb(0, 103, 15)",
61
63
  "celery-1100": "rgb(0, 83, 13)",
@@ -88,8 +90,16 @@
88
90
  "chartreuse-900": "rgb(87, 116, 0)",
89
91
  "chartreuse-background-color-default": "rgb(152, 197, 10)",
90
92
  "chartreuse-visual-color": "rgb(135, 177, 3)",
93
+ "code-color": "rgb(34, 34, 34)",
91
94
  "color-area-border-color": "rgb(0, 0, 0)",
92
95
  "color-area-border-width": "1px",
96
+ "color-loupe-bottom-to-color-handle": "12px",
97
+ "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.25)",
98
+ "color-loupe-height": "64px",
99
+ "color-loupe-inner-border": "rgba(0, 0, 0, 0.1)",
100
+ "color-loupe-inner-border-width": "2px",
101
+ "color-loupe-outer-border": "rgb(255, 255, 255)",
102
+ "color-loupe-width": "48px",
93
103
  "color-slider-border-color": "rgb(0, 0, 0)",
94
104
  "cyan-100": "rgb(197, 248, 255)",
95
105
  "cyan-1000": "rgb(0, 93, 137)",
@@ -107,6 +117,7 @@
107
117
  "cyan-900": "rgb(0, 113, 159)",
108
118
  "cyan-background-color-default": "rgb(0, 113, 159)",
109
119
  "cyan-visual-color": "rgb(18, 176, 218)",
120
+ "detail-color": "rgb(0, 0, 0)",
110
121
  "disabled-background-color": "rgb(230, 230, 230)",
111
122
  "disabled-border-color": "rgb(213, 213, 213)",
112
123
  "disabled-content-color": "rgb(177, 177, 177)",
@@ -117,6 +128,7 @@
117
128
  "disabled-static-white-border-color": "rgba(255, 255, 255, 0.25)",
118
129
  "disabled-static-white-content-color": "rgba(255, 255, 255, 0.55)",
119
130
  "drop-shadow-color": "rgba(0, 0, 0, 0.15)",
131
+ "drop-zone-background-color": "rgb(20, 122, 243)",
120
132
  "focus-indicator-color": "rgb(20, 122, 243)",
121
133
  "fuchsia-100": "rgb(255, 233, 252)",
122
134
  "fuchsia-1000": "rgb(157, 3, 158)",
@@ -164,6 +176,7 @@
164
176
  "green-background-color-default": "rgb(0, 122, 77)",
165
177
  "green-visual-color": "rgb(21, 164, 110)",
166
178
  "heading-cjk-font-weight": "extra-bold",
179
+ "heading-color": "rgb(0, 0, 0)",
167
180
  "heading-sans-serif-emphasized-font-weight": "bold",
168
181
  "heading-sans-serif-font-weight": "bold",
169
182
  "heading-serif-emphasized-font-weight": "bold",
@@ -461,7 +474,9 @@
461
474
  "blue-900": "rgb(114, 183, 249)",
462
475
  "blue-background-color-default": "rgb(52, 143, 244)",
463
476
  "blue-visual-color": "rgb(114, 183, 249)",
477
+ "body-color": "rgb(235, 235, 235)",
464
478
  "border-width-100": "1px",
479
+ "card-selection-background-color": "rgb(50, 50, 50)",
465
480
  "celery-100": "rgb(0, 69, 10)",
466
481
  "celery-1000": "rgb(105, 220, 99)",
467
482
  "celery-1100": "rgb(142, 235, 127)",
@@ -494,8 +509,16 @@
494
509
  "chartreuse-900": "rgb(148, 192, 8)",
495
510
  "chartreuse-background-color-default": "rgb(148, 192, 8)",
496
511
  "chartreuse-visual-color": "rgb(148, 192, 8)",
512
+ "code-color": "rgb(235, 235, 235)",
497
513
  "color-area-border-color": "rgb(255, 255, 255)",
498
514
  "color-area-border-width": "1px",
515
+ "color-loupe-bottom-to-color-handle": "12px",
516
+ "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.25)",
517
+ "color-loupe-height": "64px",
518
+ "color-loupe-inner-border": "rgba(0, 0, 0, 0.1)",
519
+ "color-loupe-inner-border-width": "2px",
520
+ "color-loupe-outer-border": "rgb(255, 255, 255)",
521
+ "color-loupe-width": "48px",
499
522
  "color-slider-border-color": "rgb(255, 255, 255)",
500
523
  "cyan-100": "rgb(0, 61, 98)",
501
524
  "cyan-1000": "rgb(84, 211, 241)",
@@ -513,6 +536,7 @@
513
536
  "cyan-900": "rgb(44, 193, 230)",
514
537
  "cyan-background-color-default": "rgb(0, 153, 198)",
515
538
  "cyan-visual-color": "rgb(44, 193, 230)",
539
+ "detail-color": "rgb(255, 255, 255)",
516
540
  "disabled-background-color": "rgb(63, 63, 63)",
517
541
  "disabled-border-color": "rgb(84, 84, 84)",
518
542
  "disabled-content-color": "rgb(112, 112, 112)",
@@ -523,6 +547,7 @@
523
547
  "disabled-static-white-border-color": "rgba(255, 255, 255, 0.25)",
524
548
  "disabled-static-white-content-color": "rgba(255, 255, 255, 0.55)",
525
549
  "drop-shadow-color": "rgba(0, 0, 0, 0.5)",
550
+ "drop-zone-background-color": "rgb(114, 183, 249)",
526
551
  "focus-indicator-color": "rgb(84, 163, 246)",
527
552
  "fuchsia-100": "rgb(107, 3, 106)",
528
553
  "fuchsia-1000": "rgb(250, 168, 245)",
@@ -570,6 +595,7 @@
570
595
  "green-background-color-default": "rgb(18, 162, 108)",
571
596
  "green-visual-color": "rgb(43, 180, 125)",
572
597
  "heading-cjk-font-weight": "extra-bold",
598
+ "heading-color": "rgb(255, 255, 255)",
573
599
  "heading-sans-serif-emphasized-font-weight": "bold",
574
600
  "heading-sans-serif-font-weight": "bold",
575
601
  "heading-serif-emphasized-font-weight": "bold",
@@ -867,7 +893,9 @@
867
893
  "blue-900": "rgb(94, 170, 247)",
868
894
  "blue-background-color-default": "rgb(29, 128, 245)",
869
895
  "blue-visual-color": "rgb(94, 170, 247)",
896
+ "body-color": "rgb(235, 235, 235)",
870
897
  "border-width-100": "1px",
898
+ "card-selection-background-color": "rgb(29, 29, 29)",
871
899
  "celery-100": "rgb(0, 47, 7)",
872
900
  "celery-1000": "rgb(80, 208, 82)",
873
901
  "celery-1100": "rgb(115, 224, 107)",
@@ -900,8 +928,16 @@
900
928
  "chartreuse-900": "rgb(138, 180, 3)",
901
929
  "chartreuse-background-color-default": "rgb(138, 180, 3)",
902
930
  "chartreuse-visual-color": "rgb(138, 180, 3)",
931
+ "code-color": "rgb(235, 235, 235)",
903
932
  "color-area-border-color": "rgb(255, 255, 255)",
904
933
  "color-area-border-width": "1px",
934
+ "color-loupe-bottom-to-color-handle": "12px",
935
+ "color-loupe-drop-shadow-color": "rgba(0, 0, 0, 0.25)",
936
+ "color-loupe-height": "64px",
937
+ "color-loupe-inner-border": "rgba(0, 0, 0, 0.1)",
938
+ "color-loupe-inner-border-width": "2px",
939
+ "color-loupe-outer-border": "rgb(255, 255, 255)",
940
+ "color-loupe-width": "48px",
905
941
  "color-slider-border-color": "rgb(255, 255, 255)",
906
942
  "cyan-100": "rgb(0, 41, 68)",
907
943
  "cyan-1000": "rgb(57, 199, 234)",
@@ -919,6 +955,7 @@
919
955
  "cyan-900": "rgb(23, 180, 221)",
920
956
  "cyan-background-color-default": "rgb(0, 140, 186)",
921
957
  "cyan-visual-color": "rgb(23, 180, 221)",
958
+ "detail-color": "rgb(255, 255, 255)",
922
959
  "disabled-background-color": "rgb(48, 48, 48)",
923
960
  "disabled-border-color": "rgb(75, 75, 75)",
924
961
  "disabled-content-color": "rgb(106, 106, 106)",
@@ -929,6 +966,7 @@
929
966
  "disabled-static-white-border-color": "rgba(255, 255, 255, 0.25)",
930
967
  "disabled-static-white-content-color": "rgba(255, 255, 255, 0.55)",
931
968
  "drop-shadow-color": "rgba(0, 0, 0, 0.8)",
969
+ "drop-zone-background-color": "rgb(94, 170, 247)",
932
970
  "focus-indicator-color": "rgb(64, 150, 243)",
933
971
  "fuchsia-100": "rgb(70, 14, 68)",
934
972
  "fuchsia-1000": "rgb(246, 149, 243)",
@@ -976,6 +1014,7 @@
976
1014
  "green-background-color-default": "rgb(0, 149, 98)",
977
1015
  "green-visual-color": "rgb(28, 168, 114)",
978
1016
  "heading-cjk-font-weight": "extra-bold",
1017
+ "heading-color": "rgb(255, 255, 255)",
979
1018
  "heading-sans-serif-emphasized-font-weight": "bold",
980
1019
  "heading-sans-serif-font-weight": "bold",
981
1020
  "heading-serif-emphasized-font-weight": "bold",
@@ -1245,8 +1284,10 @@
1245
1284
  "alert-banner-to-top-text": "14px",
1246
1285
  "alert-banner-to-top-workflow-icon": "15px",
1247
1286
  "alert-banner-width": "832px",
1287
+ "alert-dialog-description-size": "14px",
1248
1288
  "alert-dialog-maximum-width": "480px",
1249
1289
  "alert-dialog-minimum-width": "288px",
1290
+ "alert-dialog-title-size": "18px",
1250
1291
  "avatar-opacity-disabled": "0.3",
1251
1292
  "avatar-size-100": "20px",
1252
1293
  "avatar-size-200": "22px",
@@ -1295,6 +1336,10 @@
1295
1336
  "breadcrumbs-truncated-menu-to-bottom-text": "0px",
1296
1337
  "breadcrumbs-truncated-menu-to-separator-icon": "0px",
1297
1338
  "button-minimum-width-multiplier": "2.25",
1339
+ "card-minimum-width": "100px",
1340
+ "card-preview-minimum-height": "130px",
1341
+ "card-selection-background-color-opacity": "0.95",
1342
+ "card-selection-background-size": "40px",
1298
1343
  "character-count-to-field-quiet-extra-large": "-4px",
1299
1344
  "character-count-to-field-quiet-large": "-3px",
1300
1345
  "character-count-to-field-quiet-medium": "-3px",
@@ -1324,13 +1369,21 @@
1324
1369
  "color-area-minimum-width": "64px",
1325
1370
  "color-area-width": "192px",
1326
1371
  "color-control-track-width": "24px",
1372
+ "color-loupe-bottom-to-color-handle": "12px",
1373
+ "color-loupe-drop-shadow-blur": "8px",
1374
+ "color-loupe-drop-shadow-y": "2px",
1375
+ "color-loupe-height": "64px",
1376
+ "color-loupe-inner-border-width": "2px",
1377
+ "color-loupe-outer-border-width": "2px",
1378
+ "color-loupe-width": "48px",
1327
1379
  "color-slider-border-opacity": "0.1",
1328
1380
  "color-slider-border-rounding": "4px",
1329
1381
  "color-slider-border-width": "1px",
1330
1382
  "color-slider-length": "192px",
1331
1383
  "color-slider-minimum-length": "200px",
1332
1384
  "color-wheel-color-area-margin": "12px",
1333
- "color-wheel-minimum-width": "192px",
1385
+ "color-wheel-minimum-width": "175px",
1386
+ "color-wheel-width": "192px",
1334
1387
  "combo-box-minimum-width-multiplier": "2.5",
1335
1388
  "combo-box-visual-to-field-button-extra-large": "10px",
1336
1389
  "combo-box-visual-to-field-button-large": "9px",
@@ -1395,7 +1448,7 @@
1395
1448
  "detail-letter-spacing": "0.06em",
1396
1449
  "detail-line-height": "1.3",
1397
1450
  "detail-margin-bottom-multiplier": "0.25",
1398
- "detail-margin-top-mulitplier": "0.88888889",
1451
+ "detail-margin-top-multiplier": "0.88888889",
1399
1452
  "detail-size-l": "14px",
1400
1453
  "detail-size-m": "12px",
1401
1454
  "detail-size-s": "11px",
@@ -1410,6 +1463,15 @@
1410
1463
  "drop-shadow-blur": "4px",
1411
1464
  "drop-shadow-x": "0px",
1412
1465
  "drop-shadow-y": "1px",
1466
+ "drop-zone-background-color-opacity": "0.1",
1467
+ "drop-zone-background-color-opacity-filled": "0.3",
1468
+ "drop-zone-body-size": "14px",
1469
+ "drop-zone-border-dash-gap": "4px",
1470
+ "drop-zone-border-dash-length": "8px",
1471
+ "drop-zone-cjk-title-size": "20px",
1472
+ "drop-zone-content-maximum-width": "380px",
1473
+ "drop-zone-title-size": "22px",
1474
+ "drop-zone-width": "428px",
1413
1475
  "field-edge-to-alert-icon-extra-large": "18px",
1414
1476
  "field-edge-to-alert-icon-large": "15px",
1415
1477
  "field-edge-to-alert-icon-medium": "12px",
@@ -5853,6 +5853,211 @@
5853
5853
  "color-slider-border-opacity": {
5854
5854
  "value": "0.1"
5855
5855
  },
5856
+ "color-loupe-drop-shadow-color": {
5857
+ "ref": "{transparent-black-300}",
5858
+ "value": "rgba(0, 0, 0, 0.25)"
5859
+ },
5860
+ "color-loupe-drop-shadow-y": {
5861
+ "value": "2px"
5862
+ },
5863
+ "color-loupe-drop-shadow-blur": {
5864
+ "value": "8px"
5865
+ },
5866
+ "color-loupe-inner-border": {
5867
+ "ref": "{transparent-black-200}",
5868
+ "value": "rgba(0, 0, 0, 0.1)"
5869
+ },
5870
+ "color-loupe-outer-border": {
5871
+ "ref": "{white}",
5872
+ "value": "rgb(255, 255, 255)"
5873
+ },
5874
+ "card-selection-background-color": {
5875
+ "ref": "{gray-100}",
5876
+ "sets": {
5877
+ "light": {
5878
+ "value": "rgb(248, 248, 248)"
5879
+ },
5880
+ "dark": {
5881
+ "value": "rgb(50, 50, 50)"
5882
+ },
5883
+ "darkest": {
5884
+ "value": "rgb(29, 29, 29)"
5885
+ },
5886
+ "wireframe": {
5887
+ "value": "rgb(244, 246, 252)"
5888
+ }
5889
+ }
5890
+ },
5891
+ "card-selection-background-color-opacity": {
5892
+ "value": "0.95"
5893
+ },
5894
+ "drop-zone-background-color": {
5895
+ "ref": "{accent-visual-color}",
5896
+ "sets": {
5897
+ "light": {
5898
+ "ref": "{accent-color-800}",
5899
+ "sets": {
5900
+ "spectrum": {
5901
+ "ref": "{blue-800}",
5902
+ "sets": {
5903
+ "light": {
5904
+ "value": "rgb(20, 122, 243)"
5905
+ },
5906
+ "dark": {
5907
+ "value": "rgb(84, 163, 246)"
5908
+ },
5909
+ "darkest": {
5910
+ "value": "rgb(64, 150, 243)"
5911
+ },
5912
+ "wireframe": {
5913
+ "value": "rgb(173, 192, 233)"
5914
+ }
5915
+ }
5916
+ },
5917
+ "express": {
5918
+ "ref": "{indigo-800}",
5919
+ "sets": {
5920
+ "light": {
5921
+ "value": "rgb(104, 109, 244)"
5922
+ },
5923
+ "dark": {
5924
+ "value": "rgb(145, 149, 255)"
5925
+ },
5926
+ "darkest": {
5927
+ "value": "rgb(132, 136, 253)"
5928
+ },
5929
+ "wireframe": {
5930
+ "value": "rgb(173, 192, 233)"
5931
+ }
5932
+ }
5933
+ }
5934
+ }
5935
+ },
5936
+ "dark": {
5937
+ "ref": "{accent-color-900}",
5938
+ "sets": {
5939
+ "spectrum": {
5940
+ "ref": "{blue-900}",
5941
+ "sets": {
5942
+ "light": {
5943
+ "value": "rgb(2, 101, 220)"
5944
+ },
5945
+ "dark": {
5946
+ "value": "rgb(114, 183, 249)"
5947
+ },
5948
+ "darkest": {
5949
+ "value": "rgb(94, 170, 247)"
5950
+ },
5951
+ "wireframe": {
5952
+ "value": "rgb(154, 177, 227)"
5953
+ }
5954
+ }
5955
+ },
5956
+ "express": {
5957
+ "ref": "{indigo-900}",
5958
+ "sets": {
5959
+ "light": {
5960
+ "value": "rgb(82, 88, 228)"
5961
+ },
5962
+ "dark": {
5963
+ "value": "rgb(167, 170, 255)"
5964
+ },
5965
+ "darkest": {
5966
+ "value": "rgb(153, 157, 255)"
5967
+ },
5968
+ "wireframe": {
5969
+ "value": "rgb(154, 177, 227)"
5970
+ }
5971
+ }
5972
+ }
5973
+ }
5974
+ },
5975
+ "darkest": {
5976
+ "ref": "{accent-color-900}",
5977
+ "sets": {
5978
+ "spectrum": {
5979
+ "ref": "{blue-900}",
5980
+ "sets": {
5981
+ "light": {
5982
+ "value": "rgb(2, 101, 220)"
5983
+ },
5984
+ "dark": {
5985
+ "value": "rgb(114, 183, 249)"
5986
+ },
5987
+ "darkest": {
5988
+ "value": "rgb(94, 170, 247)"
5989
+ },
5990
+ "wireframe": {
5991
+ "value": "rgb(154, 177, 227)"
5992
+ }
5993
+ }
5994
+ },
5995
+ "express": {
5996
+ "ref": "{indigo-900}",
5997
+ "sets": {
5998
+ "light": {
5999
+ "value": "rgb(82, 88, 228)"
6000
+ },
6001
+ "dark": {
6002
+ "value": "rgb(167, 170, 255)"
6003
+ },
6004
+ "darkest": {
6005
+ "value": "rgb(153, 157, 255)"
6006
+ },
6007
+ "wireframe": {
6008
+ "value": "rgb(154, 177, 227)"
6009
+ }
6010
+ }
6011
+ }
6012
+ }
6013
+ },
6014
+ "wireframe": {
6015
+ "ref": "{accent-color-900}",
6016
+ "sets": {
6017
+ "spectrum": {
6018
+ "ref": "{blue-900}",
6019
+ "sets": {
6020
+ "light": {
6021
+ "value": "rgb(2, 101, 220)"
6022
+ },
6023
+ "dark": {
6024
+ "value": "rgb(114, 183, 249)"
6025
+ },
6026
+ "darkest": {
6027
+ "value": "rgb(94, 170, 247)"
6028
+ },
6029
+ "wireframe": {
6030
+ "value": "rgb(154, 177, 227)"
6031
+ }
6032
+ }
6033
+ },
6034
+ "express": {
6035
+ "ref": "{indigo-900}",
6036
+ "sets": {
6037
+ "light": {
6038
+ "value": "rgb(82, 88, 228)"
6039
+ },
6040
+ "dark": {
6041
+ "value": "rgb(167, 170, 255)"
6042
+ },
6043
+ "darkest": {
6044
+ "value": "rgb(153, 157, 255)"
6045
+ },
6046
+ "wireframe": {
6047
+ "value": "rgb(154, 177, 227)"
6048
+ }
6049
+ }
6050
+ }
6051
+ }
6052
+ }
6053
+ }
6054
+ },
6055
+ "drop-zone-background-color-opacity": {
6056
+ "value": "0.1"
6057
+ },
6058
+ "drop-zone-background-color-opacity-filled": {
6059
+ "value": "0.3"
6060
+ },
5856
6061
  "white": {
5857
6062
  "value": "rgb(255, 255, 255)"
5858
6063
  },
@@ -11136,6 +11341,58 @@
11136
11341
  "alert-dialog-maximum-width": {
11137
11342
  "value": "480px"
11138
11343
  },
11344
+ "alert-dialog-title-size": {
11345
+ "sets": {
11346
+ "desktop": {
11347
+ "ref": "{heading-size-s}",
11348
+ "sets": {
11349
+ "desktop": {
11350
+ "value": "18px"
11351
+ },
11352
+ "mobile": {
11353
+ "value": "22px"
11354
+ }
11355
+ }
11356
+ },
11357
+ "mobile": {
11358
+ "ref": "{heading-size-xs}",
11359
+ "sets": {
11360
+ "desktop": {
11361
+ "value": "16px"
11362
+ },
11363
+ "mobile": {
11364
+ "value": "19px"
11365
+ }
11366
+ }
11367
+ }
11368
+ }
11369
+ },
11370
+ "alert-dialog-description-size": {
11371
+ "sets": {
11372
+ "desktop": {
11373
+ "ref": "{body-size-s}",
11374
+ "sets": {
11375
+ "desktop": {
11376
+ "value": "14px"
11377
+ },
11378
+ "mobile": {
11379
+ "value": "17px"
11380
+ }
11381
+ }
11382
+ },
11383
+ "mobile": {
11384
+ "ref": "{body-size-xs}",
11385
+ "sets": {
11386
+ "desktop": {
11387
+ "value": "12px"
11388
+ },
11389
+ "mobile": {
11390
+ "value": "15px"
11391
+ }
11392
+ }
11393
+ }
11394
+ }
11395
+ },
11139
11396
  "opacity-checkerboard-square-size": {
11140
11397
  "sets": {
11141
11398
  "desktop": {
@@ -11551,7 +11808,7 @@
11551
11808
  "express": {}
11552
11809
  }
11553
11810
  },
11554
- "color-wheel-minimum-width": {
11811
+ "color-wheel-width": {
11555
11812
  "sets": {
11556
11813
  "desktop": {
11557
11814
  "value": "192px"
@@ -11561,6 +11818,16 @@
11561
11818
  }
11562
11819
  }
11563
11820
  },
11821
+ "color-wheel-minimum-width": {
11822
+ "sets": {
11823
+ "desktop": {
11824
+ "value": "175px"
11825
+ },
11826
+ "mobile": {
11827
+ "value": "219px"
11828
+ }
11829
+ }
11830
+ },
11564
11831
  "color-wheel-color-area-margin": {
11565
11832
  "value": "12px"
11566
11833
  },
@@ -11670,6 +11937,168 @@
11670
11937
  "search-field-minimum-width-multiplier": {
11671
11938
  "value": "3"
11672
11939
  },
11940
+ "color-loupe-height": {
11941
+ "sets": {
11942
+ "spectrum": {
11943
+ "value": "64px"
11944
+ },
11945
+ "express": {
11946
+ "sets": {
11947
+ "desktop": {
11948
+ "value": "40px"
11949
+ },
11950
+ "mobile": {
11951
+ "value": "50px"
11952
+ }
11953
+ }
11954
+ }
11955
+ }
11956
+ },
11957
+ "color-loupe-width": {
11958
+ "sets": {
11959
+ "spectrum": {
11960
+ "value": "48px"
11961
+ },
11962
+ "express": {
11963
+ "sets": {
11964
+ "desktop": {
11965
+ "value": "32px"
11966
+ },
11967
+ "mobile": {
11968
+ "value": "40px"
11969
+ }
11970
+ }
11971
+ }
11972
+ }
11973
+ },
11974
+ "color-loupe-bottom-to-color-handle": {
11975
+ "sets": {
11976
+ "spectrum": {
11977
+ "value": "12px"
11978
+ },
11979
+ "express": {
11980
+ "value": "6px"
11981
+ }
11982
+ }
11983
+ },
11984
+ "color-loupe-outer-border-width": {
11985
+ "ref": "{border-width-200}",
11986
+ "value": "2px"
11987
+ },
11988
+ "color-loupe-inner-border-width": {
11989
+ "sets": {
11990
+ "spectrum": {
11991
+ "ref": "{border-width-200}",
11992
+ "value": "2px"
11993
+ },
11994
+ "express": {
11995
+ "value": "3px"
11996
+ }
11997
+ }
11998
+ },
11999
+ "card-minimum-width": {
12000
+ "value": "100px"
12001
+ },
12002
+ "card-preview-minimum-height": {
12003
+ "value": "130px"
12004
+ },
12005
+ "card-selection-background-size": {
12006
+ "value": "40px"
12007
+ },
12008
+ "drop-zone-width": {
12009
+ "value": "428px"
12010
+ },
12011
+ "drop-zone-content-maximum-width": {
12012
+ "ref": "{illustrated-message-maximum-width}",
12013
+ "value": "380px"
12014
+ },
12015
+ "drop-zone-border-dash-length": {
12016
+ "value": "8px"
12017
+ },
12018
+ "drop-zone-border-dash-gap": {
12019
+ "value": "4px"
12020
+ },
12021
+ "drop-zone-title-size": {
12022
+ "ref": "{illustrated-message-title-size}",
12023
+ "sets": {
12024
+ "desktop": {
12025
+ "ref": "{heading-size-m}",
12026
+ "sets": {
12027
+ "desktop": {
12028
+ "value": "22px"
12029
+ },
12030
+ "mobile": {
12031
+ "value": "27px"
12032
+ }
12033
+ }
12034
+ },
12035
+ "mobile": {
12036
+ "ref": "{heading-size-s}",
12037
+ "sets": {
12038
+ "desktop": {
12039
+ "value": "18px"
12040
+ },
12041
+ "mobile": {
12042
+ "value": "22px"
12043
+ }
12044
+ }
12045
+ }
12046
+ }
12047
+ },
12048
+ "drop-zone-cjk-title-size": {
12049
+ "ref": "{illustrated-message-cjk-title-size}",
12050
+ "sets": {
12051
+ "desktop": {
12052
+ "ref": "{heading-cjk-size-m}",
12053
+ "sets": {
12054
+ "desktop": {
12055
+ "value": "20px"
12056
+ },
12057
+ "mobile": {
12058
+ "value": "24px"
12059
+ }
12060
+ }
12061
+ },
12062
+ "mobile": {
12063
+ "ref": "{heading-cjk-size-s}",
12064
+ "sets": {
12065
+ "desktop": {
12066
+ "value": "18px"
12067
+ },
12068
+ "mobile": {
12069
+ "value": "22px"
12070
+ }
12071
+ }
12072
+ }
12073
+ }
12074
+ },
12075
+ "drop-zone-body-size": {
12076
+ "ref": "{illustrated-message-body-size}",
12077
+ "sets": {
12078
+ "desktop": {
12079
+ "ref": "{body-size-s}",
12080
+ "sets": {
12081
+ "desktop": {
12082
+ "value": "14px"
12083
+ },
12084
+ "mobile": {
12085
+ "value": "17px"
12086
+ }
12087
+ }
12088
+ },
12089
+ "mobile": {
12090
+ "ref": "{body-size-xs}",
12091
+ "sets": {
12092
+ "desktop": {
12093
+ "value": "12px"
12094
+ },
12095
+ "mobile": {
12096
+ "value": "15px"
12097
+ }
12098
+ }
12099
+ }
12100
+ }
12101
+ },
11673
12102
  "corner-radius-75": {
11674
12103
  "sets": {
11675
12104
  "spectrum": {
@@ -15272,6 +15701,23 @@
15272
15701
  "heading-margin-bottom-multiplier": {
15273
15702
  "value": "0.25"
15274
15703
  },
15704
+ "heading-color": {
15705
+ "ref": "{gray-900}",
15706
+ "sets": {
15707
+ "light": {
15708
+ "value": "rgb(0, 0, 0)"
15709
+ },
15710
+ "dark": {
15711
+ "value": "rgb(255, 255, 255)"
15712
+ },
15713
+ "darkest": {
15714
+ "value": "rgb(255, 255, 255)"
15715
+ },
15716
+ "wireframe": {
15717
+ "value": "rgb(72, 110, 194)"
15718
+ }
15719
+ }
15720
+ },
15275
15721
  "body-sans-serif-font-family": {
15276
15722
  "ref": "{sans-serif-font-family}",
15277
15723
  "value": "Adobe Clean"
@@ -15468,6 +15914,23 @@
15468
15914
  "body-margin-multiplier": {
15469
15915
  "value": "0.75"
15470
15916
  },
15917
+ "body-color": {
15918
+ "ref": "{gray-800}",
15919
+ "sets": {
15920
+ "light": {
15921
+ "value": "rgb(34, 34, 34)"
15922
+ },
15923
+ "dark": {
15924
+ "value": "rgb(235, 235, 235)"
15925
+ },
15926
+ "darkest": {
15927
+ "value": "rgb(235, 235, 235)"
15928
+ },
15929
+ "wireframe": {
15930
+ "value": "rgb(73, 110, 194)"
15931
+ }
15932
+ }
15933
+ },
15471
15934
  "detail-sans-serif-font-family": {
15472
15935
  "ref": "{sans-serif-font-family}",
15473
15936
  "value": "Adobe Clean"
@@ -15724,7 +16187,7 @@
15724
16187
  "ref": "{cjk-line-height-100}",
15725
16188
  "value": "1.5"
15726
16189
  },
15727
- "detail-margin-top-mulitplier": {
16190
+ "detail-margin-top-multiplier": {
15728
16191
  "value": "0.88888889"
15729
16192
  },
15730
16193
  "detail-margin-bottom-multiplier": {
@@ -15733,6 +16196,29 @@
15733
16196
  "detail-letter-spacing": {
15734
16197
  "value": "0.06em"
15735
16198
  },
16199
+ "detail-sans-serif-text-transform": {
16200
+ "value": "uppercase"
16201
+ },
16202
+ "detail-serif-text-transform": {
16203
+ "value": "uppercase"
16204
+ },
16205
+ "detail-color": {
16206
+ "ref": "{gray-900}",
16207
+ "sets": {
16208
+ "light": {
16209
+ "value": "rgb(0, 0, 0)"
16210
+ },
16211
+ "dark": {
16212
+ "value": "rgb(255, 255, 255)"
16213
+ },
16214
+ "darkest": {
16215
+ "value": "rgb(255, 255, 255)"
16216
+ },
16217
+ "wireframe": {
16218
+ "value": "rgb(72, 110, 194)"
16219
+ }
16220
+ }
16221
+ },
15736
16222
  "code-font-family": {
15737
16223
  "value": "Source Code Pro"
15738
16224
  },
@@ -15866,5 +16352,22 @@
15866
16352
  "code-cjk-line-height": {
15867
16353
  "ref": "{cjk-line-height-200}",
15868
16354
  "value": "1.7"
16355
+ },
16356
+ "code-color": {
16357
+ "ref": "{gray-800}",
16358
+ "sets": {
16359
+ "light": {
16360
+ "value": "rgb(34, 34, 34)"
16361
+ },
16362
+ "dark": {
16363
+ "value": "rgb(235, 235, 235)"
16364
+ },
16365
+ "darkest": {
16366
+ "value": "rgb(235, 235, 235)"
16367
+ },
16368
+ "wireframe": {
16369
+ "value": "rgb(73, 110, 194)"
16370
+ }
16371
+ }
15869
16372
  }
15870
16373
  }
package/jest.config.cjs CHANGED
@@ -19,4 +19,4 @@ module.exports = {
19
19
  collectCoverage: true,
20
20
  coverageDirectory: "coverage",
21
21
  coverageProvider: "v8",
22
- };
22
+ };
package/manifest.json ADDED
@@ -0,0 +1,9 @@
1
+ [
2
+ "src/color-aliases.json",
3
+ "src/color-component.json",
4
+ "src/color-palette.json",
5
+ "src/layout-component.json",
6
+ "src/layout.json",
7
+ "src/semantic-color-palette.json",
8
+ "src/typography.json"
9
+ ]
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@adobe/spectrum-tokens",
3
- "version": "12.0.0-beta.66",
3
+ "version": "12.0.0-beta.68",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "config.js",
7
7
  "tokens": "dist/json/variables.json",
8
8
  "scripts": {
9
+ "buildManifest": "node tasks/buildManifest.js",
9
10
  "convert-excel": "node tasks/excel.js",
10
- "test": "yarn node --experimental-vm-modules $(yarn bin jest)",
11
+ "test": "NODE_OPTIONS=--experimental-vm-modules npx jest",
11
12
  "test-watch": "jest --runInBand --watch",
12
13
  "build": "node tasks/buildSpectrumTokens.js",
13
14
  "diffLastRelease": ". tasks/diffOutput.sh",
14
15
  "generateDiffResult": "node tasks/diff.js",
15
16
  "clean": "rm -rf dist",
16
- "pre-commit": "lint-staged --config commitlint.config.cjs",
17
- "prepare": "husky install && yarn run build",
17
+ "pre-commit": "lint-staged",
18
+ "prepare": "husky install && yarn run build && yarn run buildManifest",
18
19
  "semantic-release": "semantic-release"
19
20
  },
20
21
  "repository": {
@@ -35,16 +36,18 @@
35
36
  "@commitlint/config-conventional": "^17.1.0",
36
37
  "@semantic-release/changelog": "^6.0.1",
37
38
  "convert-excel-to-json": "^1.7.0",
38
- "hex-to-rgba": "^2.0.1",
39
- "semantic-release": "^19.0.5",
40
- "slugify": "^1.6.5",
41
39
  "deep-object-diff": "^1.1.7",
40
+ "glob": "^8.1.0",
41
+ "glob-promise": "^6.0.2",
42
+ "hex-to-rgba": "^2.0.1",
42
43
  "husky": "^8.0.1",
43
44
  "jest": "^29.0.3",
44
45
  "lint-staged": "^13.0.3",
45
46
  "node-fetch": "^2.6.7",
46
47
  "prettier": "^2.7.1",
48
+ "semantic-release": "^19.0.5",
47
49
  "semantic-release-mirror-version": "^1.1.1",
50
+ "slugify": "^1.6.5",
48
51
  "style-dictionary": "^3.7.1",
49
52
  "style-dictionary-sets": "^2.0.5"
50
53
  }
@@ -64,5 +64,45 @@
64
64
  "color-slider-border-opacity": {
65
65
  "component": "color-slider",
66
66
  "value": "0.1"
67
+ },
68
+ "color-loupe-drop-shadow-color": {
69
+ "component": "color-loupe",
70
+ "value": "{transparent-black-300}"
71
+ },
72
+ "color-loupe-drop-shadow-y": {
73
+ "component": "color-loupe",
74
+ "value": "2px"
75
+ },
76
+ "color-loupe-drop-shadow-blur": {
77
+ "component": "color-loupe",
78
+ "value": "8px"
79
+ },
80
+ "color-loupe-inner-border": {
81
+ "component": "color-loupe",
82
+ "value": "{transparent-black-200}"
83
+ },
84
+ "color-loupe-outer-border": {
85
+ "component": "color-loupe",
86
+ "value": "{white}"
87
+ },
88
+ "card-selection-background-color": {
89
+ "component": "cards",
90
+ "value": "{gray-100}"
91
+ },
92
+ "card-selection-background-color-opacity": {
93
+ "component": "cards",
94
+ "value": "0.95"
95
+ },
96
+ "drop-zone-background-color": {
97
+ "component": "drop-zone",
98
+ "value": "{accent-visual-color}"
99
+ },
100
+ "drop-zone-background-color-opacity": {
101
+ "component": "drop-zone",
102
+ "value": "0.1"
103
+ },
104
+ "drop-zone-background-color-opacity-filled": {
105
+ "component": "drop-zone",
106
+ "value": "0.3"
67
107
  }
68
108
  }
@@ -2296,6 +2296,28 @@
2296
2296
  "component": "alert-dialog",
2297
2297
  "value": "480px"
2298
2298
  },
2299
+ "alert-dialog-title-size": {
2300
+ "component": "alert-dialog",
2301
+ "sets": {
2302
+ "desktop": {
2303
+ "value": "{heading-size-s}"
2304
+ },
2305
+ "mobile": {
2306
+ "value": "{heading-size-xs}"
2307
+ }
2308
+ }
2309
+ },
2310
+ "alert-dialog-description-size": {
2311
+ "component": "alert-dialog",
2312
+ "sets": {
2313
+ "desktop": {
2314
+ "value": "{body-size-s}"
2315
+ },
2316
+ "mobile": {
2317
+ "value": "{body-size-xs}"
2318
+ }
2319
+ }
2320
+ },
2299
2321
  "opacity-checkerboard-square-size": {
2300
2322
  "component": "opacity-checkerboard",
2301
2323
  "sets": {
@@ -2728,7 +2750,7 @@
2728
2750
  "component": "color-area",
2729
2751
  "value": "{corner-radius-100}"
2730
2752
  },
2731
- "color-wheel-minimum-width": {
2753
+ "color-wheel-width": {
2732
2754
  "component": "color-wheel",
2733
2755
  "sets": {
2734
2756
  "desktop": {
@@ -2739,6 +2761,17 @@
2739
2761
  }
2740
2762
  }
2741
2763
  },
2764
+ "color-wheel-minimum-width": {
2765
+ "component": "color-wheel",
2766
+ "sets": {
2767
+ "desktop": {
2768
+ "value": "175px"
2769
+ },
2770
+ "mobile": {
2771
+ "value": "219px"
2772
+ }
2773
+ }
2774
+ },
2742
2775
  "color-wheel-color-area-margin": {
2743
2776
  "component": "color-wheel",
2744
2777
  "value": "12px"
@@ -2810,5 +2843,107 @@
2810
2843
  "search-field-minimum-width-multiplier": {
2811
2844
  "component": "search-field",
2812
2845
  "value": "3"
2846
+ },
2847
+ "color-loupe-height": {
2848
+ "component": "color-loupe",
2849
+ "sets": {
2850
+ "spectrum": {
2851
+ "value": "64px"
2852
+ },
2853
+ "express": {
2854
+ "sets": {
2855
+ "desktop": {
2856
+ "value": "40px"
2857
+ },
2858
+ "mobile": {
2859
+ "value": "50px"
2860
+ }
2861
+ }
2862
+ }
2863
+ }
2864
+ },
2865
+ "color-loupe-width": {
2866
+ "component": "color-loupe",
2867
+ "sets": {
2868
+ "spectrum": {
2869
+ "value": "48px"
2870
+ },
2871
+ "express": {
2872
+ "sets": {
2873
+ "desktop": {
2874
+ "value": "32px"
2875
+ },
2876
+ "mobile": {
2877
+ "value": "40px"
2878
+ }
2879
+ }
2880
+ }
2881
+ }
2882
+ },
2883
+ "color-loupe-bottom-to-color-handle": {
2884
+ "component": "color-loupe",
2885
+ "sets": {
2886
+ "spectrum": {
2887
+ "value": "12px"
2888
+ },
2889
+ "express": {
2890
+ "value": "6px"
2891
+ }
2892
+ }
2893
+ },
2894
+ "color-loupe-outer-border-width": {
2895
+ "component": "color-loupe",
2896
+ "value": "{border-width-200}"
2897
+ },
2898
+ "color-loupe-inner-border-width": {
2899
+ "component": "color-loupe",
2900
+ "sets": {
2901
+ "spectrum": {
2902
+ "value": "{border-width-200}"
2903
+ },
2904
+ "express": {
2905
+ "value": "3px"
2906
+ }
2907
+ }
2908
+ },
2909
+ "card-minimum-width": {
2910
+ "component": "cards",
2911
+ "value": "100px"
2912
+ },
2913
+ "card-preview-minimum-height": {
2914
+ "component": "cards",
2915
+ "value": "130px"
2916
+ },
2917
+ "card-selection-background-size": {
2918
+ "component": "cards",
2919
+ "value": "40px"
2920
+ },
2921
+ "drop-zone-width": {
2922
+ "component": "drop-zone",
2923
+ "value": "428px"
2924
+ },
2925
+ "drop-zone-content-maximum-width": {
2926
+ "component": "drop-zone",
2927
+ "value": "{illustrated-message-maximum-width}"
2928
+ },
2929
+ "drop-zone-border-dash-length": {
2930
+ "component": "drop-zone",
2931
+ "value": "8px"
2932
+ },
2933
+ "drop-zone-border-dash-gap": {
2934
+ "component": "drop-zone",
2935
+ "value": "4px"
2936
+ },
2937
+ "drop-zone-title-size": {
2938
+ "component": "drop-zone",
2939
+ "value": "{illustrated-message-title-size}"
2940
+ },
2941
+ "drop-zone-cjk-title-size": {
2942
+ "component": "drop-zone",
2943
+ "value": "{illustrated-message-cjk-title-size}"
2944
+ },
2945
+ "drop-zone-body-size": {
2946
+ "component": "drop-zone",
2947
+ "value": "{illustrated-message-body-size}"
2813
2948
  }
2814
2949
  }
@@ -615,6 +615,10 @@
615
615
  "component": "heading",
616
616
  "value": "0.25"
617
617
  },
618
+ "heading-color": {
619
+ "component": "heading",
620
+ "value": "{gray-900}"
621
+ },
618
622
  "body-sans-serif-font-family": {
619
623
  "component": "body",
620
624
  "value": "{sans-serif-font-family}"
@@ -763,6 +767,10 @@
763
767
  "component": "body",
764
768
  "value": "0.75"
765
769
  },
770
+ "body-color": {
771
+ "component": "body",
772
+ "value": "{gray-800}"
773
+ },
766
774
  "detail-sans-serif-font-family": {
767
775
  "component": "detail",
768
776
  "value": "{sans-serif-font-family}"
@@ -991,7 +999,7 @@
991
999
  "component": "detail",
992
1000
  "value": "{cjk-line-height-100}"
993
1001
  },
994
- "detail-margin-top-mulitplier": {
1002
+ "detail-margin-top-multiplier": {
995
1003
  "component": "detail",
996
1004
  "value": "0.88888889"
997
1005
  },
@@ -1003,6 +1011,18 @@
1003
1011
  "component": "detail",
1004
1012
  "value": "0.06em"
1005
1013
  },
1014
+ "detail-sans-serif-text-transform": {
1015
+ "component": "detail",
1016
+ "value": "uppercase"
1017
+ },
1018
+ "detail-serif-text-transform": {
1019
+ "component": "detail",
1020
+ "value": "uppercase"
1021
+ },
1022
+ "detail-color": {
1023
+ "component": "detail",
1024
+ "value": "{gray-900}"
1025
+ },
1006
1026
  "code-font-family": {
1007
1027
  "component": "code",
1008
1028
  "value": "Source Code Pro"
@@ -1102,5 +1122,9 @@
1102
1122
  "code-cjk-line-height": {
1103
1123
  "component": "code",
1104
1124
  "value": "{cjk-line-height-200}"
1125
+ },
1126
+ "code-color": {
1127
+ "component": "code",
1128
+ "value": "{gray-800}"
1105
1129
  }
1106
1130
  }
@@ -0,0 +1,8 @@
1
+ import glob from "glob-promise";
2
+ import { writeFile } from "fs/promises";
3
+
4
+ const manifestFileName = "manifest.json";
5
+ const files = await glob("src/**/*.json");
6
+
7
+ await writeFile(manifestFileName, JSON.stringify(files, null, 2));
8
+ console.log(`Wrote ${manifestFileName} with ${files.length} files.`);
@@ -11,7 +11,12 @@ governing permissions and limitations under the License.
11
11
  */
12
12
 
13
13
  import StyleDictionary from "style-dictionary";
14
- import {JsonSetsFormatter, NameKebabTransfom, DroverJsonFormatter, AttributeSetsTransform} from "style-dictionary-sets";
14
+ import {
15
+ JsonSetsFormatter,
16
+ NameKebabTransfom,
17
+ DroverJsonFormatter,
18
+ AttributeSetsTransform,
19
+ } from "style-dictionary-sets";
15
20
 
16
21
  StyleDictionary.registerTransform(AttributeSetsTransform);
17
22
  StyleDictionary.registerTransform(NameKebabTransfom);
@@ -0,0 +1,11 @@
1
+ import glob from "glob-promise";
2
+ import { readFile, writeFile } from "fs/promises";
3
+ import { augmentExpressTokens } from "./lib/augmentExpressTokens.js";
4
+
5
+ const files = await glob("src/**/*.json");
6
+ files.forEach(async (fileName) => {
7
+ const fileTokens = JSON.parse(await readFile(fileName, "utf8"));
8
+ const result = augmentExpressTokens(fileTokens);
9
+ await writeFile(fileName, JSON.stringify(result, null, 2));
10
+ console.log(`Updated ${fileName}.`);
11
+ });
package/tasks/diff.js CHANGED
@@ -84,7 +84,9 @@ function logResultCategory(diffResult, categoryKey, msg) {
84
84
  Array.isArray(results[oldTokenName]) &&
85
85
  results[oldTokenName].length > 1
86
86
  ) {
87
- console.log(` - Old name: \`${oldTokenName}\`, new name options:`);
87
+ console.log(
88
+ ` - Old name: \`${oldTokenName}\`, new name options:`
89
+ );
88
90
  results[oldTokenName].forEach((newTokenName) =>
89
91
  console.log(` - \`${newTokenName}\``)
90
92
  );
@@ -0,0 +1,40 @@
1
+ const deprecationObj = {
2
+ deprecated: true,
3
+ deprecated_comment:
4
+ "Express will merge with Spectrum with the release of Spectrum 2.",
5
+ };
6
+
7
+ const findExpressValue = (tokenObj) => {
8
+ if (typeof tokenObj === "object" && tokenObj !== null) {
9
+ if (tokenObj.hasOwnProperty("value")) {
10
+ return {
11
+ ...tokenObj,
12
+ ...deprecationObj,
13
+ };
14
+ } else {
15
+ const result = {};
16
+ Object.keys(tokenObj).forEach((tokenName) => {
17
+ result[tokenName] = findExpressValue(tokenObj[tokenName]);
18
+ });
19
+ return result;
20
+ }
21
+ }
22
+ };
23
+
24
+ const augmentExpressTokens = (tokenObj) => {
25
+ if (typeof tokenObj === "object" && tokenObj !== null) {
26
+ const result = {};
27
+ Object.keys(tokenObj).forEach((tokenName) => {
28
+ if (tokenName === "express") {
29
+ result[tokenName] = findExpressValue(tokenObj[tokenName]);
30
+ } else {
31
+ result[tokenName] = augmentExpressTokens(tokenObj[tokenName]);
32
+ }
33
+ });
34
+ return result;
35
+ } else {
36
+ return tokenObj;
37
+ }
38
+ };
39
+
40
+ export default augmentExpressTokens;