@primer/primitives 8.2.4-rc.e3ccaf09 → 8.2.4-rc.ea4beb50

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 (60) hide show
  1. package/README.md +17 -18
  2. package/dist/css/functional/size/border.css +1 -0
  3. package/dist/css/functional/themes/dark-colorblind.css +6 -0
  4. package/dist/css/functional/themes/dark-dimmed.css +6 -0
  5. package/dist/css/functional/themes/dark-high-contrast.css +8 -2
  6. package/dist/css/functional/themes/dark-tritanopia.css +6 -0
  7. package/dist/css/functional/themes/dark.css +6 -0
  8. package/dist/css/functional/themes/light-colorblind.css +6 -0
  9. package/dist/css/functional/themes/light-high-contrast.css +8 -2
  10. package/dist/css/functional/themes/light-tritanopia.css +6 -0
  11. package/dist/css/functional/themes/light.css +6 -0
  12. package/dist/css/primitives.css +1 -0
  13. package/dist/docs/functional/size/border.json +31 -0
  14. package/dist/docs/functional/themes/dark-colorblind.json +87 -0
  15. package/dist/docs/functional/themes/dark-dimmed.json +87 -0
  16. package/dist/docs/functional/themes/dark-high-contrast.json +90 -3
  17. package/dist/docs/functional/themes/dark-tritanopia.json +87 -0
  18. package/dist/docs/functional/themes/dark.json +87 -0
  19. package/dist/docs/functional/themes/light-colorblind.json +87 -0
  20. package/dist/docs/functional/themes/light-high-contrast.json +90 -3
  21. package/dist/docs/functional/themes/light-tritanopia.json +87 -0
  22. package/dist/docs/functional/themes/light.json +87 -0
  23. package/dist/fallbacks/functional/size/border.json +1 -0
  24. package/dist/figma/dimension/dimension.json +14 -0
  25. package/dist/figma/themes/dark-colorblind.json +48 -0
  26. package/dist/figma/themes/dark-dimmed.json +48 -0
  27. package/dist/figma/themes/dark-high-contrast.json +64 -16
  28. package/dist/figma/themes/dark-tritanopia.json +48 -0
  29. package/dist/figma/themes/dark.json +48 -0
  30. package/dist/figma/themes/light-colorblind.json +48 -0
  31. package/dist/figma/themes/light-high-contrast.json +64 -16
  32. package/dist/figma/themes/light-tritanopia.json +48 -0
  33. package/dist/figma/themes/light.json +48 -0
  34. package/dist/internalCss/dark-colorblind.css +6 -0
  35. package/dist/internalCss/dark-dimmed.css +6 -0
  36. package/dist/internalCss/dark-high-contrast.css +8 -2
  37. package/dist/internalCss/dark-tritanopia.css +6 -0
  38. package/dist/internalCss/dark.css +6 -0
  39. package/dist/internalCss/light-colorblind.css +6 -0
  40. package/dist/internalCss/light-high-contrast.css +8 -2
  41. package/dist/internalCss/light-tritanopia.css +6 -0
  42. package/dist/internalCss/light.css +6 -0
  43. package/dist/styleLint/functional/size/border.json +31 -0
  44. package/dist/styleLint/functional/themes/dark-colorblind.json +87 -0
  45. package/dist/styleLint/functional/themes/dark-dimmed.json +87 -0
  46. package/dist/styleLint/functional/themes/dark-high-contrast.json +90 -3
  47. package/dist/styleLint/functional/themes/dark-tritanopia.json +87 -0
  48. package/dist/styleLint/functional/themes/dark.json +87 -0
  49. package/dist/styleLint/functional/themes/light-colorblind.json +87 -0
  50. package/dist/styleLint/functional/themes/light-high-contrast.json +90 -3
  51. package/dist/styleLint/functional/themes/light-tritanopia.json +87 -0
  52. package/dist/styleLint/functional/themes/light.json +87 -0
  53. package/package.json +12 -9
  54. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +16 -0
  55. package/src/tokens/functional/color/dark/patterns-dark.json5 +26 -0
  56. package/src/tokens/functional/color/dark/primitives-dark.json5 +12 -0
  57. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +6 -0
  58. package/src/tokens/functional/color/light/patterns-light.json5 +26 -0
  59. package/src/tokens/functional/color/light/primitives-light.json5 +12 -0
  60. package/src/tokens/functional/size/border.json +13 -0
@@ -12571,6 +12571,64 @@
12571
12571
  "attributes": {},
12572
12572
  "path": ["label", "coral", "fgColor", "active"]
12573
12573
  },
12574
+ "tooltip-bgColor": {
12575
+ "value": "#24292f",
12576
+ "$type": "color",
12577
+ "$extensions": {
12578
+ "org.primer.figma": {
12579
+ "collection": "mode",
12580
+ "mode": "light",
12581
+ "group": "component",
12582
+ "scopes": ["bgColor"]
12583
+ }
12584
+ },
12585
+ "filePath": "src/tokens/functional/color/light/patterns-light.json5",
12586
+ "isSource": true,
12587
+ "original": {
12588
+ "value": "{bgColor.emphasis}",
12589
+ "$type": "color",
12590
+ "$extensions": {
12591
+ "org.primer.figma": {
12592
+ "collection": "mode",
12593
+ "mode": "light",
12594
+ "group": "component",
12595
+ "scopes": ["bgColor"]
12596
+ }
12597
+ }
12598
+ },
12599
+ "name": "tooltip-bgColor",
12600
+ "attributes": {},
12601
+ "path": ["tooltip", "bgColor"]
12602
+ },
12603
+ "tooltip-fgColor": {
12604
+ "value": "#ffffff",
12605
+ "$type": "color",
12606
+ "$extensions": {
12607
+ "org.primer.figma": {
12608
+ "collection": "mode",
12609
+ "mode": "light",
12610
+ "group": "component",
12611
+ "scopes": ["fgColor"]
12612
+ }
12613
+ },
12614
+ "filePath": "src/tokens/functional/color/light/patterns-light.json5",
12615
+ "isSource": true,
12616
+ "original": {
12617
+ "value": "{fgColor.onEmphasis}",
12618
+ "$type": "color",
12619
+ "$extensions": {
12620
+ "org.primer.figma": {
12621
+ "collection": "mode",
12622
+ "mode": "light",
12623
+ "group": "component",
12624
+ "scopes": ["fgColor"]
12625
+ }
12626
+ }
12627
+ },
12628
+ "name": "tooltip-fgColor",
12629
+ "attributes": {},
12630
+ "path": ["tooltip", "fgColor"]
12631
+ },
12574
12632
  "fgColor-default": {
12575
12633
  "value": "#1f2328",
12576
12634
  "$type": "color",
@@ -12684,6 +12742,35 @@
12684
12742
  "attributes": {},
12685
12743
  "path": ["fgColor", "onEmphasis"]
12686
12744
  },
12745
+ "fgColor-onInverse": {
12746
+ "value": "#ffffff",
12747
+ "$type": "color",
12748
+ "$extensions": {
12749
+ "org.primer.figma": {
12750
+ "collection": "mode",
12751
+ "mode": "light",
12752
+ "group": "semantic",
12753
+ "scopes": ["fgColor"]
12754
+ }
12755
+ },
12756
+ "filePath": "src/tokens/functional/color/light/primitives-light.json5",
12757
+ "isSource": true,
12758
+ "original": {
12759
+ "value": "{base.color.white}",
12760
+ "$type": "color",
12761
+ "$extensions": {
12762
+ "org.primer.figma": {
12763
+ "collection": "mode",
12764
+ "mode": "light",
12765
+ "group": "semantic",
12766
+ "scopes": ["fgColor"]
12767
+ }
12768
+ }
12769
+ },
12770
+ "name": "fgColor-onInverse",
12771
+ "attributes": {},
12772
+ "path": ["fgColor", "onInverse"]
12773
+ },
12687
12774
  "fgColor-white": {
12688
12775
  "value": "#ffffff",
12689
12776
  "$type": "color",
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "8.2.4-rc.e3ccaf09",
3
+ "version": "8.2.4-rc.ea4beb50",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
+ "engines": {
6
+ "node": ">=18.18.0 <18.19.0"
7
+ },
5
8
  "files": [
6
9
  "dist",
7
10
  "src/**/*",
@@ -25,17 +28,17 @@
25
28
  "scripts": {
26
29
  "build": "npm run build:v8 && npm run build:fallbacks && npm run build:figma",
27
30
  "build:next": "echo '\\033[31m 🛑 Use npm run build instead of npm run build:next\\033[0m'",
28
- "build:v8": "ts-node ./scripts/buildTokens.ts",
29
- "build:fallbacks": "ts-node ./scripts/buildFallbacks.ts",
30
- "build:figma": "ts-node scripts/buildFigma.ts",
31
- "tokenJson:check": "ts-node scripts/diffThemes.ts && ts-node scripts/diffTokenProps.ts",
32
- "contrast:check": "ts-node scripts/color-contrast.ts",
31
+ "build:v8": "tsx ./scripts/buildTokens.ts",
32
+ "build:fallbacks": "tsx ./scripts/buildFallbacks.ts",
33
+ "build:figma": "tsx scripts/buildFigma.ts",
34
+ "tokenJson:check": "tsx scripts/diffThemes.ts && tsx scripts/diffTokenProps.ts",
35
+ "contrast:check": "tsx scripts/color-contrast.ts",
33
36
  "format": "prettier --write '**/*.{js,jsx,ts,tsx,md,mdx,css}'",
34
37
  "format:check": "prettier --check '**/*.{js,jsx,ts,tsx,md,mdx,css}'",
35
38
  "install:storybook": "cd docs/storybook && npm ci --legacy-peer-deps --no-audit --no-fund",
36
- "lint": "ESLINT_USE_FLAT_CONFIG=false eslint '**/*.{js,ts,tsx,md,mdx}' --max-warnings=0 --config .eslintrc.cjs && npm run lint:tokens",
39
+ "lint": "ESLINT_USE_FLAT_CONFIG=false eslint '**/*.{js,ts,tsx,md,mdx}' --config .eslintrc.cjs && npm run lint:tokens",
37
40
  "lint:fix": "eslint '**/*.{js,ts,tsx,md,mdx}' --fix --max-warnings=0 --config .eslintrc.cjs",
38
- "lint:tokens": "ts-node ./scripts/validateTokenJson.ts",
41
+ "lint:tokens": "tsx ./scripts/validateTokenJson.ts",
39
42
  "prebuild": "rm -rf dist",
40
43
  "prepack": "npm run build",
41
44
  "release": "changeset publish",
@@ -71,7 +74,7 @@
71
74
  "markdown-table-ts": "^1.0.3",
72
75
  "prettier": "3.3",
73
76
  "style-dictionary": "^3.9.2",
74
- "ts-node": "^10.9.2",
77
+ "tsx": "^4.16.2",
75
78
  "typescript": "5.5",
76
79
  "vitest": "^2.0.1",
77
80
  "zod": "3.23",
@@ -362,6 +362,12 @@
362
362
  $type: 'color',
363
363
  },
364
364
  },
365
+ borderColor: {
366
+ rest: {
367
+ $value: '{borderColor.emphasis}',
368
+ $type: 'color',
369
+ },
370
+ },
365
371
  },
366
372
  button: {
367
373
  primary: {
@@ -902,4 +908,14 @@
902
908
  },
903
909
  },
904
910
  },
911
+ tooltip: {
912
+ bgColor: {
913
+ $value: '{bgColor.inverse}',
914
+ $type: 'color',
915
+ },
916
+ fgColor: {
917
+ $value: '{fgColor.onInverse}',
918
+ $type: 'color',
919
+ },
920
+ },
905
921
  }
@@ -3073,4 +3073,30 @@
3073
3073
  },
3074
3074
  },
3075
3075
  },
3076
+ tooltip: {
3077
+ bgColor: {
3078
+ $value: '{bgColor.emphasis}',
3079
+ $type: 'color',
3080
+ $extensions: {
3081
+ 'org.primer.figma': {
3082
+ collection: 'mode',
3083
+ mode: 'dark',
3084
+ group: 'component',
3085
+ scopes: ['bgColor'],
3086
+ },
3087
+ },
3088
+ },
3089
+ fgColor: {
3090
+ $value: '{fgColor.onEmphasis}',
3091
+ $type: 'color',
3092
+ $extensions: {
3093
+ 'org.primer.figma': {
3094
+ collection: 'mode',
3095
+ mode: 'dark',
3096
+ group: 'component',
3097
+ scopes: ['fgColor'],
3098
+ },
3099
+ },
3100
+ },
3101
+ },
3076
3102
  }
@@ -53,6 +53,18 @@
53
53
  },
54
54
  },
55
55
  },
56
+ onInverse: {
57
+ $value: '{base.color.black}',
58
+ $type: 'color',
59
+ $extensions: {
60
+ 'org.primer.figma': {
61
+ collection: 'mode',
62
+ mode: 'dark',
63
+ group: 'semantic',
64
+ scopes: ['fgColor'],
65
+ },
66
+ },
67
+ },
56
68
  white: {
57
69
  $value: '{base.color.white}',
58
70
  $type: 'color',
@@ -326,6 +326,12 @@
326
326
  $type: 'color',
327
327
  },
328
328
  },
329
+ borderColor: {
330
+ rest: {
331
+ $value: '{borderColor.emphasis}',
332
+ $type: 'color',
333
+ },
334
+ },
329
335
  },
330
336
  button: {
331
337
  default: {
@@ -3070,4 +3070,30 @@
3070
3070
  },
3071
3071
  },
3072
3072
  },
3073
+ tooltip: {
3074
+ bgColor: {
3075
+ $value: '{bgColor.emphasis}',
3076
+ $type: 'color',
3077
+ $extensions: {
3078
+ 'org.primer.figma': {
3079
+ collection: 'mode',
3080
+ mode: 'light',
3081
+ group: 'component',
3082
+ scopes: ['bgColor'],
3083
+ },
3084
+ },
3085
+ },
3086
+ fgColor: {
3087
+ $value: '{fgColor.onEmphasis}',
3088
+ $type: 'color',
3089
+ $extensions: {
3090
+ 'org.primer.figma': {
3091
+ collection: 'mode',
3092
+ mode: 'light',
3093
+ group: 'component',
3094
+ scopes: ['fgColor'],
3095
+ },
3096
+ },
3097
+ },
3098
+ },
3073
3099
  }
@@ -49,6 +49,18 @@
49
49
  },
50
50
  },
51
51
  },
52
+ onInverse: {
53
+ $value: '{base.color.white}',
54
+ $type: 'color',
55
+ $extensions: {
56
+ 'org.primer.figma': {
57
+ collection: 'mode',
58
+ mode: 'light',
59
+ group: 'semantic',
60
+ scopes: ['fgColor'],
61
+ },
62
+ },
63
+ },
52
64
  white: {
53
65
  $value: '{base.color.white}',
54
66
  $type: 'color',
@@ -81,6 +81,19 @@
81
81
  }
82
82
  }
83
83
  }
84
+ },
85
+ "default": {
86
+ "$value": "{borderRadius.medium}",
87
+ "$type": "dimension",
88
+ "$extensions": {
89
+ "org.primer.figma": {
90
+ "collection": "functional/size",
91
+ "scopes": ["radius"],
92
+ "codeSyntax": {
93
+ "web": "var(--borderRadius-default) /* utility class: .rounded-2 */"
94
+ }
95
+ }
96
+ }
84
97
  }
85
98
  },
86
99
  "outline": {