@atlaskit/css 0.10.7 → 0.11.0

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,5 +1,17 @@
1
1
  # @atlaskit/css
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#172429](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172429)
8
+ [`efcc283cecdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/efcc283cecdfe) -
9
+ Added metric typography tokens which can be used via the CSS `font` shorthand.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 0.10.7
4
16
 
5
17
  ### Patch Changes
@@ -908,7 +908,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
908
908
 
909
909
  /**
910
910
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
911
- * @codegen <<SignedSource::b2a06338babbfbea48ed2205e34084fc>>
911
+ * @codegen <<SignedSource::2c0cffbebdab4e28fe2b45925623e523>>
912
912
  * @codegenId typography
913
913
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
914
914
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -964,6 +964,18 @@ export const fontMap = {
964
964
  'font.heading.xxsmall',
965
965
  'normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
966
966
  ),
967
+ 'font.metric.large': token(
968
+ 'font.metric.large',
969
+ 'normal 653 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
970
+ ),
971
+ 'font.metric.medium': token(
972
+ 'font.metric.medium',
973
+ 'normal 653 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
974
+ ),
975
+ 'font.metric.small': token(
976
+ 'font.metric.small',
977
+ 'normal 653 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
978
+ ),
967
979
  };
968
980
 
969
981
  export type Font = keyof typeof fontMap;
@@ -1008,7 +1020,7 @@ export type FontFamily = keyof typeof fontFamilyMap;
1008
1020
 
1009
1021
  /**
1010
1022
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
1011
- * @codegen <<SignedSource::159df661d29a2805a17ab6f52e842350>>
1023
+ * @codegen <<SignedSource::c207cc4caf0794de5f13707a9c28451f>>
1012
1024
  * @codegenId text
1013
1025
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
1014
1026
  * @codegenDependency ../../../primitives/scripts/codegen-file-templates/dimensions.tsx <<SignedSource::cc9b3f12104c6ede803da6a42daac0b0>>
@@ -1044,6 +1056,23 @@ export const textWeightMap = {
1044
1056
 
1045
1057
  export type TextWeight = keyof typeof textWeightMap;
1046
1058
 
1059
+ export const metricTextSizeMap = {
1060
+ large: token(
1061
+ 'font.metric.large',
1062
+ 'normal 653 28px/32px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1063
+ ),
1064
+ medium: token(
1065
+ 'font.metric.medium',
1066
+ 'normal 653 24px/28px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1067
+ ),
1068
+ small: token(
1069
+ 'font.metric.small',
1070
+ 'normal 653 16px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
1071
+ ),
1072
+ };
1073
+
1074
+ export type MetricTextSize = keyof typeof metricTextSizeMap;
1075
+
1047
1076
  /**
1048
1077
  * @codegenEnd
1049
1078
  */
@@ -1211,6 +1240,7 @@ type FontFamilyToken = keyof typeof fontFamilyMap;
1211
1240
  type FontToken = keyof typeof fontMap;
1212
1241
  type TextWeightToken = keyof typeof textWeightMap;
1213
1242
  type TextSizeToken = keyof typeof textSizeMap;
1243
+ type MetricTextSizeToken = keyof typeof metricTextSizeMap;
1214
1244
  type SpacingStyleMap = Record<SpacingProperty, Record<SpacingToken, SerializedStyles>>;
1215
1245
  type BackgroundColorStyleMap = Record<BackgroundColorToken, SerializedStyles>;
1216
1246
  type SurfaceColorStyleMap = Record<SurfaceColorToken, SerializedStyles>;
@@ -1220,6 +1250,7 @@ type FontFamilyStyleMap = Record<FontFamilyToken, SerializedStyles>;
1220
1250
  type FontStyleMap = Record<FontToken, SerializedStyles>;
1221
1251
  type TextWeightStyleMap = Record<TextWeightToken, SerializedStyles>;
1222
1252
  type TextStyleMap = Record<TextSizeToken, SerializedStyles>;
1253
+ type MetricTextStyleMap = Record<MetricTextSizeToken, SerializedStyles>;
1223
1254
 
1224
1255
  export const paddingStylesMap: SpacingStyleMap = spacingProperties.reduce(
1225
1256
  (styleMap, spacingProperty: SpacingProperty) => {
@@ -1269,3 +1300,8 @@ export const surfaceColorStylesMap: SurfaceColorStyleMap = getSerializedStylesMa
1269
1300
 
1270
1301
  export const isSurfaceColorToken = (color: unknown): color is SurfaceColorToken =>
1271
1302
  surfaceColorMap[color as SurfaceColorToken] !== undefined;
1303
+
1304
+ export const metricTextSizeStylesMap: MetricTextStyleMap = getSerializedStylesMap(
1305
+ 'font',
1306
+ metricTextSizeMap,
1307
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/css",
3
- "version": "0.10.7",
3
+ "version": "0.11.0",
4
4
  "description": "Style components backed by Atlassian Design System design tokens powered by Compiled CSS-in-JS.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "./test-utils": "./src/test-utils/index.tsx"
50
50
  },
51
51
  "dependencies": {
52
- "@atlaskit/tokens": "^5.0.0",
52
+ "@atlaskit/tokens": "^5.3.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@compiled/react": "^0.18.3"
55
55
  },
@@ -60,7 +60,7 @@
60
60
  "@af/visual-regression": "workspace:^",
61
61
  "@atlaskit/button": "^23.2.0",
62
62
  "@atlaskit/ds-lib": "^4.0.0",
63
- "@atlaskit/primitives": "^14.8.0",
63
+ "@atlaskit/primitives": "^14.9.0",
64
64
  "@emotion/react": "^11.7.1",
65
65
  "@testing-library/react": "^13.4.0",
66
66
  "@types/jscodeshift": "^0.11.0",