@atlaskit/tokens 0.10.4 → 0.10.7

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 (51) hide show
  1. package/.eslintrc.js +35 -0
  2. package/CHANGELOG.md +39 -0
  3. package/README.md +1 -1
  4. package/css/atlassian-dark.css +9 -1
  5. package/css/atlassian-light.css +9 -1
  6. package/dist/cjs/artifacts/rename-mapping.js +10 -10
  7. package/dist/cjs/artifacts/token-default-values.js +9 -1
  8. package/dist/cjs/artifacts/token-names.js +9 -1
  9. package/dist/cjs/artifacts/tokens-raw/atlassian-dark.js +211 -25
  10. package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +211 -25
  11. package/dist/cjs/babel-plugin/plugin.js +57 -53
  12. package/dist/cjs/get-token.js +1 -1
  13. package/dist/cjs/tokens/atlassian-dark/color/accent.js +28 -0
  14. package/dist/cjs/tokens/atlassian-light/color/accent.js +28 -0
  15. package/dist/cjs/tokens/default/color/accent.js +70 -2
  16. package/dist/cjs/tokens/default/deprecated/deprecated.js +19 -10
  17. package/dist/cjs/version.json +1 -1
  18. package/dist/es2019/artifacts/rename-mapping.js +10 -10
  19. package/dist/es2019/artifacts/token-default-values.js +9 -1
  20. package/dist/es2019/artifacts/token-names.js +9 -1
  21. package/dist/es2019/artifacts/tokens-raw/atlassian-dark.js +211 -25
  22. package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +211 -25
  23. package/dist/es2019/babel-plugin/plugin.js +50 -45
  24. package/dist/es2019/get-token.js +1 -1
  25. package/dist/es2019/tokens/atlassian-dark/color/accent.js +28 -0
  26. package/dist/es2019/tokens/atlassian-light/color/accent.js +28 -0
  27. package/dist/es2019/tokens/default/color/accent.js +70 -2
  28. package/dist/es2019/tokens/default/deprecated/deprecated.js +19 -10
  29. package/dist/es2019/version.json +1 -1
  30. package/dist/esm/artifacts/rename-mapping.js +10 -10
  31. package/dist/esm/artifacts/token-default-values.js +9 -1
  32. package/dist/esm/artifacts/token-names.js +9 -1
  33. package/dist/esm/artifacts/tokens-raw/atlassian-dark.js +211 -25
  34. package/dist/esm/artifacts/tokens-raw/atlassian-light.js +211 -25
  35. package/dist/esm/babel-plugin/plugin.js +57 -53
  36. package/dist/esm/get-token.js +1 -1
  37. package/dist/esm/tokens/atlassian-dark/color/accent.js +28 -0
  38. package/dist/esm/tokens/atlassian-light/color/accent.js +28 -0
  39. package/dist/esm/tokens/default/color/accent.js +70 -2
  40. package/dist/esm/tokens/default/deprecated/deprecated.js +19 -10
  41. package/dist/esm/version.json +1 -1
  42. package/dist/types/artifacts/rename-mapping.d.ts +1 -1
  43. package/dist/types/artifacts/token-default-values.d.ts +9 -1
  44. package/dist/types/artifacts/token-names.d.ts +17 -1
  45. package/dist/types/artifacts/tokens-raw/atlassian-dark.d.ts +1 -28
  46. package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +1 -28
  47. package/dist/types/artifacts/types-internal.d.ts +2 -2
  48. package/dist/types/artifacts/types.d.ts +2 -2
  49. package/dist/types/babel-plugin/plugin.d.ts +5 -5
  50. package/dist/types/types.d.ts +12 -0
  51. package/package.json +4 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::0e47f76666554d1a967ff51c4cae1c25>>
3
+ * @codegen <<SignedSource::9b6960398363032e220473a356d04712>>
4
4
  * @codegenCommand yarn build tokens
5
5
  */
6
6
  var tokens = [{
@@ -339,6 +339,48 @@ var tokens = [{
339
339
  },
340
340
  "name": "color.text.accent.magenta.bolder",
341
341
  "path": ["color", "text", "accent", "magenta", "bolder"]
342
+ }, {
343
+ "attributes": {
344
+ "group": "paint",
345
+ "state": "active",
346
+ "introduced": "0.10.5",
347
+ "description": "Use for text on non-bold gray accent backgrounds, such as colored tags."
348
+ },
349
+ "value": "#44546F",
350
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
351
+ "isSource": true,
352
+ "original": {
353
+ "attributes": {
354
+ "group": "paint",
355
+ "state": "active",
356
+ "introduced": "0.10.5",
357
+ "description": "Use for text on non-bold gray accent backgrounds, such as colored tags."
358
+ },
359
+ "value": "N800"
360
+ },
361
+ "name": "color.text.accent.gray.[default]",
362
+ "path": ["color", "text", "accent", "gray", "[default]"]
363
+ }, {
364
+ "attributes": {
365
+ "group": "paint",
366
+ "state": "active",
367
+ "introduced": "0.10.5",
368
+ "description": "Use for text and icons on gray subtle accent backgrounds."
369
+ },
370
+ "value": "#172B4D",
371
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
372
+ "isSource": true,
373
+ "original": {
374
+ "attributes": {
375
+ "group": "paint",
376
+ "state": "active",
377
+ "introduced": "0.10.5",
378
+ "description": "Use for text and icons on gray subtle accent backgrounds."
379
+ },
380
+ "value": "N1000"
381
+ },
382
+ "name": "color.text.accent.gray.bolder",
383
+ "path": ["color", "text", "accent", "gray", "bolder"]
342
384
  }, {
343
385
  "attributes": {
344
386
  "group": "paint",
@@ -969,6 +1011,27 @@ var tokens = [{
969
1011
  },
970
1012
  "name": "color.icon.accent.magenta",
971
1013
  "path": ["color", "icon", "accent", "magenta"]
1014
+ }, {
1015
+ "attributes": {
1016
+ "group": "paint",
1017
+ "state": "active",
1018
+ "introduced": "0.10.5",
1019
+ "description": "Use for icons on non-bold gray accent backgrounds, such as file type icons."
1020
+ },
1021
+ "value": "#758195",
1022
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
1023
+ "isSource": true,
1024
+ "original": {
1025
+ "attributes": {
1026
+ "group": "paint",
1027
+ "state": "active",
1028
+ "introduced": "0.10.5",
1029
+ "description": "Use for icons on non-bold gray accent backgrounds, such as file type icons."
1030
+ },
1031
+ "value": "N600"
1032
+ },
1033
+ "name": "color.icon.accent.gray",
1034
+ "path": ["color", "icon", "accent", "gray"]
972
1035
  }, {
973
1036
  "attributes": {
974
1037
  "group": "paint",
@@ -1389,6 +1452,27 @@ var tokens = [{
1389
1452
  },
1390
1453
  "name": "color.border.accent.magenta",
1391
1454
  "path": ["color", "border", "accent", "magenta"]
1455
+ }, {
1456
+ "attributes": {
1457
+ "group": "paint",
1458
+ "state": "active",
1459
+ "introduced": "0.10.5",
1460
+ "description": "Use for borders on non-bold gray accent backgrounds."
1461
+ },
1462
+ "value": "#758195",
1463
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
1464
+ "isSource": true,
1465
+ "original": {
1466
+ "attributes": {
1467
+ "group": "paint",
1468
+ "state": "active",
1469
+ "introduced": "0.10.5",
1470
+ "description": "Use for borders on non-bold gray accent backgrounds."
1471
+ },
1472
+ "value": "N600"
1473
+ },
1474
+ "name": "color.border.accent.gray",
1475
+ "path": ["color", "border", "accent", "gray"]
1392
1476
  }, {
1393
1477
  "attributes": {
1394
1478
  "group": "paint",
@@ -1721,7 +1805,7 @@ var tokens = [{
1721
1805
  "group": "paint",
1722
1806
  "state": "active",
1723
1807
  "introduced": "0.7.0",
1724
- "description": "Use for blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1808
+ "description": "Use for blue backgrounds when there is no meaning tied to the color, such as colored tags."
1725
1809
  },
1726
1810
  "value": "#CCE0FF",
1727
1811
  "filePath": "src/tokens/atlassian-light/color/accent.tsx",
@@ -1731,7 +1815,7 @@ var tokens = [{
1731
1815
  "group": "paint",
1732
1816
  "state": "active",
1733
1817
  "introduced": "0.7.0",
1734
- "description": "Use for blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1818
+ "description": "Use for blue backgrounds when there is no meaning tied to the color, such as colored tags."
1735
1819
  },
1736
1820
  "value": "B200"
1737
1821
  },
@@ -1742,7 +1826,7 @@ var tokens = [{
1742
1826
  "group": "paint",
1743
1827
  "state": "active",
1744
1828
  "introduced": "0.7.0",
1745
- "description": "Use for vibrant blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1829
+ "description": "Use for vibrant blue backgrounds when there is no meaning tied to the color, such as colored tags."
1746
1830
  },
1747
1831
  "value": "#579DFF",
1748
1832
  "filePath": "src/tokens/atlassian-light/color/accent.tsx",
@@ -1752,7 +1836,7 @@ var tokens = [{
1752
1836
  "group": "paint",
1753
1837
  "state": "active",
1754
1838
  "introduced": "0.7.0",
1755
- "description": "Use for vibrant blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1839
+ "description": "Use for vibrant blue backgrounds when there is no meaning tied to the color, such as colored tags."
1756
1840
  },
1757
1841
  "value": "B400"
1758
1842
  },
@@ -1787,7 +1871,7 @@ var tokens = [{
1787
1871
  "deprecated": "0.7.0",
1788
1872
  "deleted": "0.8.0",
1789
1873
  "replacement": "color.background.accent.blue.subtler",
1790
- "description": "Use for blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1874
+ "description": "Use for blue backgrounds when there is no meaning tied to the color, such as colored tags."
1791
1875
  },
1792
1876
  "value": "#CCE0FF",
1793
1877
  "filePath": "src/tokens/atlassian-light/deprecated/deprecated.tsx",
@@ -1800,7 +1884,7 @@ var tokens = [{
1800
1884
  "deprecated": "0.7.0",
1801
1885
  "deleted": "0.8.0",
1802
1886
  "replacement": "color.background.accent.blue.subtler",
1803
- "description": "Use for blue backgrounds when there is no meaning tied to the color, such as coloured tags."
1887
+ "description": "Use for blue backgrounds when there is no meaning tied to the color, such as colored tags."
1804
1888
  },
1805
1889
  "value": "B200"
1806
1890
  },
@@ -2799,6 +2883,90 @@ var tokens = [{
2799
2883
  },
2800
2884
  "name": "color.background.accent.magenta.bold",
2801
2885
  "path": ["color", "background", "accent", "magenta", "bold"]
2886
+ }, {
2887
+ "attributes": {
2888
+ "group": "paint",
2889
+ "state": "active",
2890
+ "introduced": "0.7.0",
2891
+ "description": "Use for gray backgrounds when there is no meaning tied to the color. Reserved for when you only want a hint of color."
2892
+ },
2893
+ "value": "#F1F2F4",
2894
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
2895
+ "isSource": true,
2896
+ "original": {
2897
+ "attributes": {
2898
+ "group": "paint",
2899
+ "state": "active",
2900
+ "introduced": "0.7.0",
2901
+ "description": "Use for gray backgrounds when there is no meaning tied to the color. Reserved for when you only want a hint of color."
2902
+ },
2903
+ "value": "N200"
2904
+ },
2905
+ "name": "color.background.accent.gray.subtlest",
2906
+ "path": ["color", "background", "accent", "gray", "subtlest"]
2907
+ }, {
2908
+ "attributes": {
2909
+ "group": "paint",
2910
+ "state": "active",
2911
+ "introduced": "0.7.0",
2912
+ "description": "Use for gray backgrounds when there is no meaning tied to the color, such as colored tags."
2913
+ },
2914
+ "value": "#DCDFE4",
2915
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
2916
+ "isSource": true,
2917
+ "original": {
2918
+ "attributes": {
2919
+ "group": "paint",
2920
+ "state": "active",
2921
+ "introduced": "0.7.0",
2922
+ "description": "Use for gray backgrounds when there is no meaning tied to the color, such as colored tags."
2923
+ },
2924
+ "value": "N300"
2925
+ },
2926
+ "name": "color.background.accent.gray.subtler",
2927
+ "path": ["color", "background", "accent", "gray", "subtler"]
2928
+ }, {
2929
+ "attributes": {
2930
+ "group": "paint",
2931
+ "state": "active",
2932
+ "introduced": "0.7.0",
2933
+ "description": "Use for vibrant gray backgrounds when there is no meaning tied to the color, such as colored tags."
2934
+ },
2935
+ "value": "#8993A5",
2936
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
2937
+ "isSource": true,
2938
+ "original": {
2939
+ "attributes": {
2940
+ "group": "paint",
2941
+ "state": "active",
2942
+ "introduced": "0.7.0",
2943
+ "description": "Use for vibrant gray backgrounds when there is no meaning tied to the color, such as colored tags."
2944
+ },
2945
+ "value": "N500"
2946
+ },
2947
+ "name": "color.background.accent.gray.subtle",
2948
+ "path": ["color", "background", "accent", "gray", "subtle"]
2949
+ }, {
2950
+ "attributes": {
2951
+ "group": "paint",
2952
+ "state": "active",
2953
+ "introduced": "0.7.0",
2954
+ "description": "Use for gray backgrounds when there is no meaning tied to the color, and the background needs to pass min 3:1 contrast requirements."
2955
+ },
2956
+ "value": "#626F86",
2957
+ "filePath": "src/tokens/atlassian-light/color/accent.tsx",
2958
+ "isSource": true,
2959
+ "original": {
2960
+ "attributes": {
2961
+ "group": "paint",
2962
+ "state": "active",
2963
+ "introduced": "0.7.0",
2964
+ "description": "Use for gray backgrounds when there is no meaning tied to the color, and the background needs to pass min 3:1 contrast requirements."
2965
+ },
2966
+ "value": "N700"
2967
+ },
2968
+ "name": "color.background.accent.gray.bolder",
2969
+ "path": ["color", "background", "accent", "gray", "bolder"]
2802
2970
  }, {
2803
2971
  "attributes": {
2804
2972
  "group": "paint",
@@ -2886,9 +3054,10 @@ var tokens = [{
2886
3054
  }, {
2887
3055
  "attributes": {
2888
3056
  "group": "paint",
2889
- "state": "deprecated",
3057
+ "state": "deleted",
2890
3058
  "introduced": "0.1.0",
2891
3059
  "deprecated": "0.8.3",
3060
+ "deleted": "0.10.5",
2892
3061
  "replacement": "color.background.inverse.subtle.[default]",
2893
3062
  "description": "Use for backgrounds of elements on a bold background, such as in the buttons on spotlight cards."
2894
3063
  },
@@ -2898,9 +3067,10 @@ var tokens = [{
2898
3067
  "original": {
2899
3068
  "attributes": {
2900
3069
  "group": "paint",
2901
- "state": "deprecated",
3070
+ "state": "deleted",
2902
3071
  "introduced": "0.1.0",
2903
3072
  "deprecated": "0.8.3",
3073
+ "deleted": "0.10.5",
2904
3074
  "replacement": "color.background.inverse.subtle.[default]",
2905
3075
  "description": "Use for backgrounds of elements on a bold background, such as in the buttons on spotlight cards."
2906
3076
  },
@@ -3226,9 +3396,10 @@ var tokens = [{
3226
3396
  }, {
3227
3397
  "attributes": {
3228
3398
  "group": "paint",
3229
- "state": "deprecated",
3399
+ "state": "deleted",
3230
3400
  "introduced": "0.6.0",
3231
3401
  "deprecated": "0.6.2",
3402
+ "deleted": "0.10.5",
3232
3403
  "replacement": "color.background.selected.[default].[default]",
3233
3404
  "description": "Use for the background of elements used to reinforce our brand."
3234
3405
  },
@@ -3238,9 +3409,10 @@ var tokens = [{
3238
3409
  "original": {
3239
3410
  "attributes": {
3240
3411
  "group": "paint",
3241
- "state": "deprecated",
3412
+ "state": "deleted",
3242
3413
  "introduced": "0.6.0",
3243
3414
  "deprecated": "0.6.2",
3415
+ "deleted": "0.10.5",
3244
3416
  "replacement": "color.background.selected.[default].[default]",
3245
3417
  "description": "Use for the background of elements used to reinforce our brand."
3246
3418
  },
@@ -3251,9 +3423,10 @@ var tokens = [{
3251
3423
  }, {
3252
3424
  "attributes": {
3253
3425
  "group": "paint",
3254
- "state": "deprecated",
3426
+ "state": "deleted",
3255
3427
  "introduced": "0.6.0",
3256
3428
  "deprecated": "0.6.2",
3429
+ "deleted": "0.10.5",
3257
3430
  "replacement": "color.background.selected.[default].hovered",
3258
3431
  "description": "Hovered state for color.background.brand"
3259
3432
  },
@@ -3263,9 +3436,10 @@ var tokens = [{
3263
3436
  "original": {
3264
3437
  "attributes": {
3265
3438
  "group": "paint",
3266
- "state": "deprecated",
3439
+ "state": "deleted",
3267
3440
  "introduced": "0.6.0",
3268
3441
  "deprecated": "0.6.2",
3442
+ "deleted": "0.10.5",
3269
3443
  "replacement": "color.background.selected.[default].hovered",
3270
3444
  "description": "Hovered state for color.background.brand"
3271
3445
  },
@@ -3276,9 +3450,10 @@ var tokens = [{
3276
3450
  }, {
3277
3451
  "attributes": {
3278
3452
  "group": "paint",
3279
- "state": "deprecated",
3453
+ "state": "deleted",
3280
3454
  "introduced": "0.6.0",
3281
3455
  "deprecated": "0.6.2",
3456
+ "deleted": "0.10.5",
3282
3457
  "replacement": "color.background.selected.[default].pressed",
3283
3458
  "description": "Pressed state for color.background.brand"
3284
3459
  },
@@ -3288,9 +3463,10 @@ var tokens = [{
3288
3463
  "original": {
3289
3464
  "attributes": {
3290
3465
  "group": "paint",
3291
- "state": "deprecated",
3466
+ "state": "deleted",
3292
3467
  "introduced": "0.6.0",
3293
3468
  "deprecated": "0.6.2",
3469
+ "deleted": "0.10.5",
3294
3470
  "replacement": "color.background.selected.[default].pressed",
3295
3471
  "description": "Pressed state for color.background.brand"
3296
3472
  },
@@ -3427,9 +3603,10 @@ var tokens = [{
3427
3603
  }, {
3428
3604
  "attributes": {
3429
3605
  "group": "paint",
3430
- "state": "deprecated",
3606
+ "state": "deleted",
3431
3607
  "introduced": "0.1.0",
3432
3608
  "deprecated": "0.6.0",
3609
+ "deleted": "0.10.5",
3433
3610
  "replacement": "color.background.selected.[default].[default]",
3434
3611
  "description": "Use for backgrounds of elements in a selected state"
3435
3612
  },
@@ -3439,9 +3616,10 @@ var tokens = [{
3439
3616
  "original": {
3440
3617
  "attributes": {
3441
3618
  "group": "paint",
3442
- "state": "deprecated",
3619
+ "state": "deleted",
3443
3620
  "introduced": "0.1.0",
3444
3621
  "deprecated": "0.6.0",
3622
+ "deleted": "0.10.5",
3445
3623
  "replacement": "color.background.selected.[default].[default]",
3446
3624
  "description": "Use for backgrounds of elements in a selected state"
3447
3625
  },
@@ -3452,9 +3630,10 @@ var tokens = [{
3452
3630
  }, {
3453
3631
  "attributes": {
3454
3632
  "group": "paint",
3455
- "state": "deprecated",
3633
+ "state": "deleted",
3456
3634
  "introduced": "0.1.0",
3457
3635
  "deprecated": "0.6.0",
3636
+ "deleted": "0.10.5",
3458
3637
  "replacement": "color.background.selected.[default].hovered",
3459
3638
  "description": "Hover state for color.background.selected"
3460
3639
  },
@@ -3464,9 +3643,10 @@ var tokens = [{
3464
3643
  "original": {
3465
3644
  "attributes": {
3466
3645
  "group": "paint",
3467
- "state": "deprecated",
3646
+ "state": "deleted",
3468
3647
  "introduced": "0.1.0",
3469
3648
  "deprecated": "0.6.0",
3649
+ "deleted": "0.10.5",
3470
3650
  "replacement": "color.background.selected.[default].hovered",
3471
3651
  "description": "Hover state for color.background.selected"
3472
3652
  },
@@ -4755,9 +4935,10 @@ var tokens = [{
4755
4935
  }, {
4756
4936
  "attributes": {
4757
4937
  "group": "paint",
4758
- "state": "deprecated",
4938
+ "state": "deleted",
4759
4939
  "introduced": "0.0.15",
4760
4940
  "deprecated": "0.6.0",
4941
+ "deleted": "0.10.5",
4761
4942
  "replacement": "color.background.selected.[default].hovered",
4762
4943
  "description": "Hover state for background.subtleBrand"
4763
4944
  },
@@ -4767,9 +4948,10 @@ var tokens = [{
4767
4948
  "original": {
4768
4949
  "attributes": {
4769
4950
  "group": "paint",
4770
- "state": "deprecated",
4951
+ "state": "deleted",
4771
4952
  "introduced": "0.0.15",
4772
4953
  "deprecated": "0.6.0",
4954
+ "deleted": "0.10.5",
4773
4955
  "replacement": "color.background.selected.[default].hovered",
4774
4956
  "description": "Hover state for background.subtleBrand"
4775
4957
  },
@@ -4780,9 +4962,10 @@ var tokens = [{
4780
4962
  }, {
4781
4963
  "attributes": {
4782
4964
  "group": "paint",
4783
- "state": "deprecated",
4965
+ "state": "deleted",
4784
4966
  "introduced": "0.0.15",
4785
4967
  "deprecated": "0.6.0",
4968
+ "deleted": "0.10.5",
4786
4969
  "replacement": "color.background.selected.[default].pressed",
4787
4970
  "description": "Pressed state for background.subtleBrand"
4788
4971
  },
@@ -4792,9 +4975,10 @@ var tokens = [{
4792
4975
  "original": {
4793
4976
  "attributes": {
4794
4977
  "group": "paint",
4795
- "state": "deprecated",
4978
+ "state": "deleted",
4796
4979
  "introduced": "0.0.15",
4797
4980
  "deprecated": "0.6.0",
4981
+ "deleted": "0.10.5",
4798
4982
  "replacement": "color.background.selected.[default].pressed",
4799
4983
  "description": "Pressed state for background.subtleBrand"
4800
4984
  },
@@ -4805,9 +4989,10 @@ var tokens = [{
4805
4989
  }, {
4806
4990
  "attributes": {
4807
4991
  "group": "paint",
4808
- "state": "deprecated",
4992
+ "state": "deleted",
4809
4993
  "introduced": "0.0.15",
4810
4994
  "deprecated": "0.6.0",
4995
+ "deleted": "0.10.5",
4811
4996
  "replacement": "color.background.selected.[default].[default]",
4812
4997
  "description": "Use for subdued backgrounds of UI elements like information section messages and in progress lozenges."
4813
4998
  },
@@ -4817,9 +5002,10 @@ var tokens = [{
4817
5002
  "original": {
4818
5003
  "attributes": {
4819
5004
  "group": "paint",
4820
- "state": "deprecated",
5005
+ "state": "deleted",
4821
5006
  "introduced": "0.0.15",
4822
5007
  "deprecated": "0.6.0",
5008
+ "deleted": "0.10.5",
4823
5009
  "replacement": "color.background.selected.[default].[default]",
4824
5010
  "description": "Use for subdued backgrounds of UI elements like information section messages and in progress lozenges."
4825
5011
  },
@@ -4,75 +4,79 @@ import tokenNames from '../artifacts/token-names';
4
4
  export default function plugin() {
5
5
  return {
6
6
  visitor: {
7
- CallExpression: function (_CallExpression) {
8
- function CallExpression(_x, _x2) {
9
- return _CallExpression.apply(this, arguments);
10
- }
7
+ Program: {
8
+ enter: function enter(path, state) {
9
+ path.traverse({
10
+ CallExpression: function (_CallExpression) {
11
+ function CallExpression(_x) {
12
+ return _CallExpression.apply(this, arguments);
13
+ }
11
14
 
12
- CallExpression.toString = function () {
13
- return _CallExpression.toString();
14
- };
15
+ CallExpression.toString = function () {
16
+ return _CallExpression.toString();
17
+ };
15
18
 
16
- return CallExpression;
17
- }(function (path, state) {
18
- var tokenImportScope = getTokenImportScope(path);
19
+ return CallExpression;
20
+ }(function (path) {
21
+ var tokenImportScope = getTokenImportScope(path);
19
22
 
20
- if (!tokenImportScope) {
21
- return;
22
- } // Check arguments have correct format
23
+ if (!tokenImportScope) {
24
+ return;
25
+ } // Check arguments have correct format
23
26
 
24
27
 
25
- if (!path.node.arguments[0]) {
26
- throw new Error("token() requires at least one argument");
27
- } else if (!t.isStringLiteral(path.node.arguments[0])) {
28
- throw new Error("token() must have a string as the first argument");
29
- } else if (path.node.arguments.length > 2) {
30
- throw new Error("token() does not accept ".concat(path.node.arguments.length, " arguments"));
31
- } // Check the token exists
28
+ if (!path.node.arguments[0]) {
29
+ throw new Error("token() requires at least one argument");
30
+ } else if (!t.isStringLiteral(path.node.arguments[0])) {
31
+ throw new Error("token() must have a string as the first argument");
32
+ } else if (path.node.arguments.length > 2) {
33
+ throw new Error("token() does not accept ".concat(path.node.arguments.length, " arguments"));
34
+ } // Check the token exists
32
35
 
33
36
 
34
- var tokenName = path.node.arguments[0].value;
35
- var cssTokenValue = tokenNames[tokenName];
37
+ var tokenName = path.node.arguments[0].value;
38
+ var cssTokenValue = tokenNames[tokenName];
36
39
 
37
- if (!cssTokenValue) {
38
- throw new Error("token '".concat(tokenName, "' does not exist"));
39
- }
40
+ if (!cssTokenValue) {
41
+ throw new Error("token '".concat(tokenName, "' does not exist"));
42
+ }
40
43
 
41
- var replacementNode; // if no fallback is set, optionally find one from the default theme
44
+ var replacementNode; // if no fallback is set, optionally find one from the default theme
42
45
 
43
- if (path.node.arguments.length < 2) {
44
- if (state.opts.shouldUseAutoFallback) {
45
- replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName), ")"));
46
- } else {
47
- replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ")"));
48
- }
49
- } // Handle fallbacks
46
+ if (path.node.arguments.length < 2) {
47
+ if (state.opts.shouldUseAutoFallback) {
48
+ replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ", ").concat(getDefaultFallback(tokenName), ")"));
49
+ } else {
50
+ replacementNode = t.stringLiteral("var(".concat(cssTokenValue, ")"));
51
+ }
52
+ } // Handle fallbacks
50
53
 
51
54
 
52
- var fallback = path.node.arguments[1];
55
+ var fallback = path.node.arguments[1];
53
56
 
54
- if (t.isStringLiteral(fallback)) {
55
- // String literals can be concatenated into css variable call
56
- // Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
57
- replacementNode = t.stringLiteral(fallback.value ? "var(".concat(cssTokenValue, ", ").concat(fallback.value, ")") : "var(".concat(cssTokenValue, ")"));
58
- } else if (t.isExpression(fallback)) {
59
- // Expressions should be placed in a template string/literal
60
- replacementNode = t.templateLiteral([t.templateElement({
61
- cooked: "var(".concat(cssTokenValue, ", "),
62
- // Currently we create a "raw" value by inserting escape characters via regex (https://github.com/babel/babel/issues/9242)
63
- raw: "var(".concat(cssTokenValue.replace(/\\|`|\${/g, '\\$&'), ", ")
64
- }, false), t.templateElement({
65
- raw: ')',
66
- cooked: ')'
67
- }, true)], [fallback]);
68
- } // Replace path and call scope.crawl() to refresh the scope bindings + references
57
+ if (t.isStringLiteral(fallback)) {
58
+ // String literals can be concatenated into css variable call
59
+ // Empty string fallbacks are ignored. For now, as the user did specify a fallback, no default is inserted
60
+ replacementNode = t.stringLiteral(fallback.value ? "var(".concat(cssTokenValue, ", ").concat(fallback.value, ")") : "var(".concat(cssTokenValue, ")"));
61
+ } else if (t.isExpression(fallback)) {
62
+ // Expressions should be placed in a template string/literal
63
+ replacementNode = t.templateLiteral([t.templateElement({
64
+ cooked: "var(".concat(cssTokenValue, ", "),
65
+ // Currently we create a "raw" value by inserting escape characters via regex (https://github.com/babel/babel/issues/9242)
66
+ raw: "var(".concat(cssTokenValue.replace(/\\|`|\${/g, '\\$&'), ", ")
67
+ }, false), t.templateElement({
68
+ raw: ')',
69
+ cooked: ')'
70
+ }, true)], [fallback]);
71
+ } // Replace path and call scope.crawl() to refresh the scope bindings + references
69
72
 
70
73
 
71
- replacementNode && path.replaceWith(replacementNode); // @ts-ignore crawl is a valid property
74
+ replacementNode && path.replaceWith(replacementNode); // @ts-ignore crawl is a valid property
72
75
 
73
- tokenImportScope.crawl();
74
- }),
75
- Program: {
76
+ tokenImportScope.crawl();
77
+ })
78
+ });
79
+ },
76
80
  exit: function exit(path) {
77
81
  path.traverse({
78
82
  ImportDeclaration: function ImportDeclaration(path) {
@@ -2,7 +2,7 @@ import warnOnce from '@atlaskit/ds-lib/warn-once';
2
2
  import tokens from './artifacts/token-names';
3
3
  import { TOKEN_NOT_FOUND_CSS_VAR } from './constants';
4
4
  var name = "@atlaskit/tokens";
5
- var version = "0.10.4";
5
+ var version = "0.10.7";
6
6
 
7
7
  function token(path, fallback) {
8
8
  var token = tokens[path];
@@ -65,6 +65,14 @@ var color = {
65
65
  bolder: {
66
66
  value: 'M200'
67
67
  }
68
+ },
69
+ gray: {
70
+ '[default]': {
71
+ value: 'DN800'
72
+ },
73
+ bolder: {
74
+ value: 'DN1000'
75
+ }
68
76
  }
69
77
  }
70
78
  },
@@ -93,6 +101,9 @@ var color = {
93
101
  },
94
102
  magenta: {
95
103
  value: 'M500'
104
+ },
105
+ gray: {
106
+ value: 'DN600'
96
107
  }
97
108
  }
98
109
  },
@@ -121,6 +132,9 @@ var color = {
121
132
  },
122
133
  magenta: {
123
134
  value: 'M500'
135
+ },
136
+ gray: {
137
+ value: 'DN600'
124
138
  }
125
139
  }
126
140
  },
@@ -237,6 +251,20 @@ var color = {
237
251
  bolder: {
238
252
  value: 'M400'
239
253
  }
254
+ },
255
+ gray: {
256
+ subtlest: {
257
+ value: 'DN300'
258
+ },
259
+ subtler: {
260
+ value: 'DN400'
261
+ },
262
+ subtle: {
263
+ value: 'DN500'
264
+ },
265
+ bolder: {
266
+ value: 'DN700'
267
+ }
240
268
  }
241
269
  }
242
270
  }