@primer/primitives 9.1.1 → 9.1.2

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 (64) hide show
  1. package/dist/build/PrimerStyleDictionary.js +0 -1
  2. package/dist/build/platforms/css.js +0 -1
  3. package/dist/build/platforms/docJson.js +0 -1
  4. package/dist/build/platforms/fallbacks.js +0 -1
  5. package/dist/build/platforms/javascript.js +0 -1
  6. package/dist/build/platforms/json.js +0 -1
  7. package/dist/build/platforms/styleLint.js +0 -1
  8. package/dist/build/platforms/typeDefinitions.js +0 -1
  9. package/dist/build/platforms/typescript.js +0 -1
  10. package/dist/build/transformers/colorToHex.js +9 -1
  11. package/dist/build/transformers/index.d.ts +0 -1
  12. package/dist/build/transformers/index.js +1 -3
  13. package/dist/css/functional/themes/dark-colorblind.css +2 -2
  14. package/dist/css/functional/themes/dark-dimmed.css +2 -2
  15. package/dist/css/functional/themes/dark-high-contrast.css +2 -2
  16. package/dist/css/functional/themes/dark-tritanopia.css +2 -2
  17. package/dist/css/functional/themes/dark.css +2 -2
  18. package/dist/css/functional/themes/light-colorblind.css +2 -2
  19. package/dist/css/functional/themes/light-high-contrast.css +2 -2
  20. package/dist/css/functional/themes/light-tritanopia.css +2 -2
  21. package/dist/css/functional/themes/light.css +2 -2
  22. package/dist/docs/functional/themes/dark-colorblind.json +22 -4
  23. package/dist/docs/functional/themes/dark-dimmed.json +22 -4
  24. package/dist/docs/functional/themes/dark-high-contrast.json +23 -5
  25. package/dist/docs/functional/themes/dark-tritanopia.json +22 -4
  26. package/dist/docs/functional/themes/dark.json +22 -4
  27. package/dist/docs/functional/themes/light-colorblind.json +21 -3
  28. package/dist/docs/functional/themes/light-high-contrast.json +22 -4
  29. package/dist/docs/functional/themes/light-tritanopia.json +21 -3
  30. package/dist/docs/functional/themes/light.json +21 -3
  31. package/dist/figma/themes/dark-colorblind.json +17 -0
  32. package/dist/figma/themes/dark-dimmed.json +17 -0
  33. package/dist/figma/themes/dark-high-contrast.json +17 -0
  34. package/dist/figma/themes/dark-tritanopia.json +17 -0
  35. package/dist/figma/themes/dark.json +17 -0
  36. package/dist/figma/themes/light-colorblind.json +17 -0
  37. package/dist/figma/themes/light-high-contrast.json +17 -0
  38. package/dist/figma/themes/light-tritanopia.json +17 -0
  39. package/dist/figma/themes/light.json +17 -0
  40. package/dist/internalCss/dark-colorblind.css +2 -2
  41. package/dist/internalCss/dark-dimmed.css +2 -2
  42. package/dist/internalCss/dark-high-contrast.css +2 -2
  43. package/dist/internalCss/dark-tritanopia.css +2 -2
  44. package/dist/internalCss/dark.css +2 -2
  45. package/dist/internalCss/light-colorblind.css +2 -2
  46. package/dist/internalCss/light-high-contrast.css +2 -2
  47. package/dist/internalCss/light-tritanopia.css +2 -2
  48. package/dist/internalCss/light.css +2 -2
  49. package/dist/styleLint/functional/themes/dark-colorblind.json +22 -4
  50. package/dist/styleLint/functional/themes/dark-dimmed.json +22 -4
  51. package/dist/styleLint/functional/themes/dark-high-contrast.json +23 -5
  52. package/dist/styleLint/functional/themes/dark-tritanopia.json +22 -4
  53. package/dist/styleLint/functional/themes/dark.json +22 -4
  54. package/dist/styleLint/functional/themes/light-colorblind.json +21 -3
  55. package/dist/styleLint/functional/themes/light-high-contrast.json +22 -4
  56. package/dist/styleLint/functional/themes/light-tritanopia.json +21 -3
  57. package/dist/styleLint/functional/themes/light.json +21 -3
  58. package/package.json +1 -1
  59. package/src/tokens/functional/color/dark/overrides/dark.high-contrast.json5 +7 -0
  60. package/src/tokens/functional/color/dark/patterns-dark.json5 +10 -1
  61. package/src/tokens/functional/color/light/overrides/light.high-contrast.json5 +7 -0
  62. package/src/tokens/functional/color/light/patterns-light.json5 +10 -1
  63. package/dist/build/transformers/colorToHexAlpha.d.ts +0 -8
  64. package/dist/build/transformers/colorToHexAlpha.js +0 -25
@@ -9042,13 +9042,31 @@
9042
9042
  "path": ["sideNav", "bgColor", "selected"]
9043
9043
  },
9044
9044
  "skeletonLoader-bgColor": {
9045
- "value": "#f6f8fa",
9045
+ "value": "#818b981a",
9046
9046
  "$type": "color",
9047
+ "$extensions": {
9048
+ "org.primer.figma": {
9049
+ "collection": "mode",
9050
+ "mode": "light",
9051
+ "group": "component",
9052
+ "scopes": ["bgColor"]
9053
+ }
9054
+ },
9055
+ "alpha": 0.1,
9047
9056
  "filePath": "src/tokens/functional/color/light/patterns-light.json5",
9048
9057
  "isSource": true,
9049
9058
  "original": {
9050
- "value": "{bgColor.muted}",
9051
- "$type": "color"
9059
+ "value": "{base.color.neutral.8}",
9060
+ "$type": "color",
9061
+ "$extensions": {
9062
+ "org.primer.figma": {
9063
+ "collection": "mode",
9064
+ "mode": "light",
9065
+ "group": "component",
9066
+ "scopes": ["bgColor"]
9067
+ }
9068
+ },
9069
+ "alpha": 0.1
9052
9070
  },
9053
9071
  "name": "skeletonLoader-bgColor",
9054
9072
  "attributes": {},
@@ -9060,13 +9060,31 @@
9060
9060
  "path": ["sideNav", "bgColor", "selected"]
9061
9061
  },
9062
9062
  "skeletonLoader-bgColor": {
9063
- "value": "#e6eaef",
9063
+ "value": "#dae0e7",
9064
9064
  "$type": "color",
9065
- "filePath": "src/tokens/functional/color/light/patterns-light.json5",
9065
+ "$extensions": {
9066
+ "org.primer.figma": {
9067
+ "collection": "mode",
9068
+ "mode": "light",
9069
+ "group": "component",
9070
+ "scopes": ["bgColor"]
9071
+ }
9072
+ },
9073
+ "alpha": 1,
9074
+ "filePath": "src/tokens/functional/color/light/overrides/light.high-contrast.json5",
9066
9075
  "isSource": true,
9067
9076
  "original": {
9068
- "value": "{bgColor.muted}",
9069
- "$type": "color"
9077
+ "value": "{base.color.neutral.5}",
9078
+ "$type": "color",
9079
+ "$extensions": {
9080
+ "org.primer.figma": {
9081
+ "collection": "mode",
9082
+ "mode": "light",
9083
+ "group": "component",
9084
+ "scopes": ["bgColor"]
9085
+ }
9086
+ },
9087
+ "alpha": 1
9070
9088
  },
9071
9089
  "name": "skeletonLoader-bgColor",
9072
9090
  "attributes": {},
@@ -9038,13 +9038,31 @@
9038
9038
  "path": ["sideNav", "bgColor", "selected"]
9039
9039
  },
9040
9040
  "skeletonLoader-bgColor": {
9041
- "value": "#f6f8fa",
9041
+ "value": "#818b981a",
9042
9042
  "$type": "color",
9043
+ "$extensions": {
9044
+ "org.primer.figma": {
9045
+ "collection": "mode",
9046
+ "mode": "light",
9047
+ "group": "component",
9048
+ "scopes": ["bgColor"]
9049
+ }
9050
+ },
9051
+ "alpha": 0.1,
9043
9052
  "filePath": "src/tokens/functional/color/light/patterns-light.json5",
9044
9053
  "isSource": true,
9045
9054
  "original": {
9046
- "value": "{bgColor.muted}",
9047
- "$type": "color"
9055
+ "value": "{base.color.neutral.8}",
9056
+ "$type": "color",
9057
+ "$extensions": {
9058
+ "org.primer.figma": {
9059
+ "collection": "mode",
9060
+ "mode": "light",
9061
+ "group": "component",
9062
+ "scopes": ["bgColor"]
9063
+ }
9064
+ },
9065
+ "alpha": 0.1
9048
9066
  },
9049
9067
  "name": "skeletonLoader-bgColor",
9050
9068
  "attributes": {},
@@ -9038,13 +9038,31 @@
9038
9038
  "path": ["sideNav", "bgColor", "selected"]
9039
9039
  },
9040
9040
  "skeletonLoader-bgColor": {
9041
- "value": "#f6f8fa",
9041
+ "value": "#818b981a",
9042
9042
  "$type": "color",
9043
+ "$extensions": {
9044
+ "org.primer.figma": {
9045
+ "collection": "mode",
9046
+ "mode": "light",
9047
+ "group": "component",
9048
+ "scopes": ["bgColor"]
9049
+ }
9050
+ },
9051
+ "alpha": 0.1,
9043
9052
  "filePath": "src/tokens/functional/color/light/patterns-light.json5",
9044
9053
  "isSource": true,
9045
9054
  "original": {
9046
- "value": "{bgColor.muted}",
9047
- "$type": "color"
9055
+ "value": "{base.color.neutral.8}",
9056
+ "$type": "color",
9057
+ "$extensions": {
9058
+ "org.primer.figma": {
9059
+ "collection": "mode",
9060
+ "mode": "light",
9061
+ "group": "component",
9062
+ "scopes": ["bgColor"]
9063
+ }
9064
+ },
9065
+ "alpha": 0.1
9048
9066
  },
9049
9067
  "name": "skeletonLoader-bgColor",
9050
9068
  "attributes": {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/primitives",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "description": "Typography, spacing, and color primitives for Primer design system",
5
5
  "files": [
6
6
  "dist",
@@ -932,4 +932,11 @@
932
932
  $type: 'color',
933
933
  },
934
934
  },
935
+ skeletonLoader: {
936
+ bgColor: {
937
+ $value: '{base.color.neutral.5}',
938
+ $type: 'color',
939
+ alpha: 1,
940
+ },
941
+ }
935
942
  }
@@ -2047,8 +2047,17 @@
2047
2047
  },
2048
2048
  skeletonLoader: {
2049
2049
  bgColor: {
2050
- $value: '{bgColor.muted}',
2050
+ $value: '{base.color.neutral.8}',
2051
2051
  $type: 'color',
2052
+ $extensions: {
2053
+ 'org.primer.figma': {
2054
+ collection: 'mode',
2055
+ mode: 'dark',
2056
+ group: 'component',
2057
+ scopes: ['bgColor'],
2058
+ },
2059
+ },
2060
+ alpha: 0.2,
2052
2061
  },
2053
2062
  },
2054
2063
  timelineBadge: {
@@ -816,4 +816,11 @@
816
816
  },
817
817
  },
818
818
  },
819
+ skeletonLoader: {
820
+ bgColor: {
821
+ $value: '{base.color.neutral.5}',
822
+ $type: 'color',
823
+ alpha: 1,
824
+ },
825
+ }
819
826
  }
@@ -2041,8 +2041,17 @@
2041
2041
  },
2042
2042
  skeletonLoader: {
2043
2043
  bgColor: {
2044
- $value: '{bgColor.muted}',
2044
+ $value: '{base.color.neutral.8}',
2045
2045
  $type: 'color',
2046
+ $extensions: {
2047
+ 'org.primer.figma': {
2048
+ collection: 'mode',
2049
+ mode: 'light',
2050
+ group: 'component',
2051
+ scopes: ['bgColor'],
2052
+ },
2053
+ },
2054
+ alpha: 0.1,
2046
2055
  },
2047
2056
  },
2048
2057
  timelineBadge: {
@@ -1,8 +0,0 @@
1
- import type StyleDictionary from 'style-dictionary';
2
- /**
3
- * @description replaces tokens value with `hex8` color using the tokens `alpha` property to specify the value used for alpha
4
- * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
5
- * @matcher matches all tokens of $type `color` with an `alpha` property
6
- * @transformer returns `hex8` string
7
- */
8
- export declare const colorToHexAlpha: StyleDictionary.Transform;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.colorToHexAlpha = void 0;
4
- const color2k_1 = require("color2k");
5
- const alpha_1 = require("./utilities/alpha");
6
- const filters_1 = require("../filters");
7
- const getTokenValue_1 = require("./utilities/getTokenValue");
8
- /**
9
- * @description replaces tokens value with `hex8` color using the tokens `alpha` property to specify the value used for alpha
10
- * @type value transformer — [StyleDictionary.ValueTransform](https://github.com/amzn/style-dictionary/blob/main/types/Transform.d.ts)
11
- * @matcher matches all tokens of $type `color` with an `alpha` property
12
- * @transformer returns `hex8` string
13
- */
14
- exports.colorToHexAlpha = {
15
- type: `value`,
16
- transitive: true,
17
- matcher: filters_1.isColorWithAlpha,
18
- transformer: (token) => {
19
- // don't change if alpha is null
20
- if (token.alpha === null) {
21
- return (0, color2k_1.toHex)((0, getTokenValue_1.getTokenValue)(token));
22
- }
23
- return (0, color2k_1.toHex)((0, alpha_1.alpha)((0, getTokenValue_1.getTokenValue)(token), token.alpha, token));
24
- },
25
- };