@atlaskit/primitives 0.15.1 → 0.15.3

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/primitives
2
2
 
3
+ ## 0.15.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`27f6081edf2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/27f6081edf2) - Regenerates codegen hashes to surface changes to tokens
8
+
9
+ ## 0.15.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ab4938b0c32`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ab4938b0c32) - Remove runtime dev warning for invalid token aliases.
14
+
3
15
  ## 0.15.1
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "sideEffects": false
5
5
  }
@@ -60,11 +60,11 @@ exports.spaceMap = spaceMap;
60
60
 
61
61
  /**
62
62
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
63
- * @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
63
+ * @codegen <<SignedSource::65b57f72ff07d4c4245a3eafe8cef786>>
64
64
  * @codegenId colors
65
65
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
66
66
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
67
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
67
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::efb3dfea27ab3db2fb3756ed9657c5cb>>
68
68
  */
69
69
  var borderColorMap = {
70
70
  'color.border': "var(--ds-border, #091e4221)",
@@ -303,17 +303,17 @@ exports.layerMap = layerMap;
303
303
 
304
304
  /**
305
305
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
306
- * @codegen <<SignedSource::cc9d48c89e323c87a3a00966f631120f>>
306
+ * @codegen <<SignedSource::ffa10f95df2d9bbc0f5d91f9d19b9a69>>
307
307
  * @codegenId border
308
308
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
309
309
  * @codegenParams ["width", "radius"]
310
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::f2aa6660594ff30e42a666fb87655052>>
310
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::25105916a589322f57c322068cb0074a>>
311
311
  */
312
312
  var borderWidthMap = {
313
313
  'border.width': "var(--ds-border-width, 1px)",
314
314
  'border.width.0': "var(--ds-border-width-0, 0px)",
315
- 'border.width.050': "var(--ds-border-width-050, 1px)",
316
- 'border.width.100': "var(--ds-border-width-100, 2px)"
315
+ 'border.width.indicator': "var(--ds-border-width-indicator, 3px)",
316
+ 'border.width.outline': "var(--ds-border-width-outline, 2px)"
317
317
  };
318
318
  exports.borderWidthMap = borderWidthMap;
319
319
  var borderRadiusMap = {
@@ -10,7 +10,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
12
12
  var _react = require("@emotion/react");
13
- var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
14
13
  var _mediaHelper = require("../responsive/media-helper");
15
14
  var _styleMaps = require("./style-maps.partial");
16
15
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
@@ -127,10 +126,6 @@ var transformStyles = function transformStyles(styleObj) {
127
126
  return;
128
127
  }
129
128
  var tokenValue = tokensMap[key][value];
130
- if (!tokenValue && (typeof process === "undefined" ? "undefined" : (0, _typeof2.default)(process)) && process.env.NODE_ENV === 'development') {
131
- var message = "Invalid token alias: ".concat(key, ": ").concat(value);
132
- (0, _warnOnce.default)(message);
133
- }
134
129
  styleObj[key] = tokenValue !== null && tokenValue !== void 0 ? tokenValue : value;
135
130
  });
136
131
  return styleObj;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "sideEffects": false
5
5
  }
@@ -48,11 +48,11 @@ export const spaceMap = {
48
48
  */
49
49
  /**
50
50
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
51
- * @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
51
+ * @codegen <<SignedSource::65b57f72ff07d4c4245a3eafe8cef786>>
52
52
  * @codegenId colors
53
53
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
54
54
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
55
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
55
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::efb3dfea27ab3db2fb3756ed9657c5cb>>
56
56
  */
57
57
  export const borderColorMap = {
58
58
  'color.border': "var(--ds-border, #091e4221)",
@@ -283,17 +283,17 @@ export const layerMap = {
283
283
  */
284
284
  /**
285
285
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
286
- * @codegen <<SignedSource::cc9d48c89e323c87a3a00966f631120f>>
286
+ * @codegen <<SignedSource::ffa10f95df2d9bbc0f5d91f9d19b9a69>>
287
287
  * @codegenId border
288
288
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
289
289
  * @codegenParams ["width", "radius"]
290
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::f2aa6660594ff30e42a666fb87655052>>
290
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::25105916a589322f57c322068cb0074a>>
291
291
  */
292
292
  export const borderWidthMap = {
293
293
  'border.width': "var(--ds-border-width, 1px)",
294
294
  'border.width.0': "var(--ds-border-width-0, 0px)",
295
- 'border.width.050': "var(--ds-border-width-050, 1px)",
296
- 'border.width.100': "var(--ds-border-width-100, 2px)"
295
+ 'border.width.indicator': "var(--ds-border-width-indicator, 3px)",
296
+ 'border.width.outline': "var(--ds-border-width-outline, 2px)"
297
297
  };
298
298
  export const borderRadiusMap = {
299
299
  'border.radius.050': "var(--ds-border-radius-050, 2px)",
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { css as cssEmotion } from '@emotion/react';
3
- import warnOnce from '@atlaskit/ds-lib/warn-once';
4
3
  import { media } from '../responsive/media-helper';
5
4
  import { backgroundColorMap, borderColorMap, borderRadiusMap, borderWidthMap, dimensionMap, layerMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
6
5
  const tokensMap = {
@@ -108,10 +107,6 @@ const transformStyles = styleObj => {
108
107
  return;
109
108
  }
110
109
  const tokenValue = tokensMap[key][value];
111
- if (!tokenValue && typeof process && process.env.NODE_ENV === 'development') {
112
- const message = `Invalid token alias: ${key}: ${value}`;
113
- warnOnce(message);
114
- }
115
110
  styleObj[key] = tokenValue !== null && tokenValue !== void 0 ? tokenValue : value;
116
111
  });
117
112
  return styleObj;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "sideEffects": false
5
5
  }
@@ -49,11 +49,11 @@ export var spaceMap = {
49
49
  */
50
50
  /**
51
51
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
52
- * @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
52
+ * @codegen <<SignedSource::65b57f72ff07d4c4245a3eafe8cef786>>
53
53
  * @codegenId colors
54
54
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
55
55
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
56
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
56
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::efb3dfea27ab3db2fb3756ed9657c5cb>>
57
57
  */
58
58
  export var borderColorMap = {
59
59
  'color.border': "var(--ds-border, #091e4221)",
@@ -284,17 +284,17 @@ export var layerMap = {
284
284
  */
285
285
  /**
286
286
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
287
- * @codegen <<SignedSource::cc9d48c89e323c87a3a00966f631120f>>
287
+ * @codegen <<SignedSource::ffa10f95df2d9bbc0f5d91f9d19b9a69>>
288
288
  * @codegenId border
289
289
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
290
290
  * @codegenParams ["width", "radius"]
291
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::f2aa6660594ff30e42a666fb87655052>>
291
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::25105916a589322f57c322068cb0074a>>
292
292
  */
293
293
  export var borderWidthMap = {
294
294
  'border.width': "var(--ds-border-width, 1px)",
295
295
  'border.width.0': "var(--ds-border-width-0, 0px)",
296
- 'border.width.050': "var(--ds-border-width-050, 1px)",
297
- 'border.width.100': "var(--ds-border-width-100, 2px)"
296
+ 'border.width.indicator': "var(--ds-border-width-indicator, 3px)",
297
+ 'border.width.outline': "var(--ds-border-width-outline, 2px)"
298
298
  };
299
299
  export var borderRadiusMap = {
300
300
  'border.radius.050': "var(--ds-border-radius-050, 2px)",
@@ -3,7 +3,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _typeof from "@babel/runtime/helpers/typeof";
4
4
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
5
  import { css as cssEmotion } from '@emotion/react';
6
- import warnOnce from '@atlaskit/ds-lib/warn-once';
7
6
  import { media } from '../responsive/media-helper';
8
7
  import { backgroundColorMap, borderColorMap, borderRadiusMap, borderWidthMap, dimensionMap, layerMap, shadowMap, spaceMap, textColorMap } from './style-maps.partial';
9
8
  var tokensMap = {
@@ -118,10 +117,6 @@ var transformStyles = function transformStyles(styleObj) {
118
117
  return;
119
118
  }
120
119
  var tokenValue = tokensMap[key][value];
121
- if (!tokenValue && (typeof process === "undefined" ? "undefined" : _typeof(process)) && process.env.NODE_ENV === 'development') {
122
- var message = "Invalid token alias: ".concat(key, ": ").concat(value);
123
- warnOnce(message);
124
- }
125
120
  styleObj[key] = tokenValue !== null && tokenValue !== void 0 ? tokenValue : value;
126
121
  });
127
122
  return styleObj;
@@ -50,11 +50,11 @@ export type Space = keyof typeof spaceMap;
50
50
  */
51
51
  /**
52
52
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
53
- * @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
53
+ * @codegen <<SignedSource::65b57f72ff07d4c4245a3eafe8cef786>>
54
54
  * @codegenId colors
55
55
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
56
56
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
57
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
57
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::efb3dfea27ab3db2fb3756ed9657c5cb>>
58
58
  */
59
59
  export declare const borderColorMap: {
60
60
  readonly 'color.border': "var(--ds-border)";
@@ -291,17 +291,17 @@ export type Layer = keyof typeof layerMap;
291
291
  */
292
292
  /**
293
293
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
294
- * @codegen <<SignedSource::cc9d48c89e323c87a3a00966f631120f>>
294
+ * @codegen <<SignedSource::ffa10f95df2d9bbc0f5d91f9d19b9a69>>
295
295
  * @codegenId border
296
296
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
297
297
  * @codegenParams ["width", "radius"]
298
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::f2aa6660594ff30e42a666fb87655052>>
298
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::25105916a589322f57c322068cb0074a>>
299
299
  */
300
300
  export declare const borderWidthMap: {
301
301
  readonly 'border.width': "var(--ds-border-width)";
302
302
  readonly 'border.width.0': "var(--ds-border-width-0)";
303
- readonly 'border.width.050': "var(--ds-border-width-050)";
304
- readonly 'border.width.100': "var(--ds-border-width-100)";
303
+ readonly 'border.width.indicator': "var(--ds-border-width-indicator)";
304
+ readonly 'border.width.outline': "var(--ds-border-width-outline)";
305
305
  };
306
306
  export type BorderWidth = keyof typeof borderWidthMap;
307
307
  export declare const borderRadiusMap: {
@@ -50,11 +50,11 @@ export type Space = keyof typeof spaceMap;
50
50
  */
51
51
  /**
52
52
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
53
- * @codegen <<SignedSource::80db0ba91b44837306516b95e9cf080e>>
53
+ * @codegen <<SignedSource::65b57f72ff07d4c4245a3eafe8cef786>>
54
54
  * @codegenId colors
55
55
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
56
56
  * @codegenParams ["border", "background", "shadow", "text", "fill"]
57
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::c829bed8504655cd09b971d338d7f3a1>>
57
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::efb3dfea27ab3db2fb3756ed9657c5cb>>
58
58
  */
59
59
  export declare const borderColorMap: {
60
60
  readonly 'color.border': "var(--ds-border)";
@@ -291,17 +291,17 @@ export type Layer = keyof typeof layerMap;
291
291
  */
292
292
  /**
293
293
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
294
- * @codegen <<SignedSource::cc9d48c89e323c87a3a00966f631120f>>
294
+ * @codegen <<SignedSource::ffa10f95df2d9bbc0f5d91f9d19b9a69>>
295
295
  * @codegenId border
296
296
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
297
297
  * @codegenParams ["width", "radius"]
298
- * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::f2aa6660594ff30e42a666fb87655052>>
298
+ * @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-shape.tsx <<SignedSource::25105916a589322f57c322068cb0074a>>
299
299
  */
300
300
  export declare const borderWidthMap: {
301
301
  readonly 'border.width': "var(--ds-border-width)";
302
302
  readonly 'border.width.0': "var(--ds-border-width-0)";
303
- readonly 'border.width.050': "var(--ds-border-width-050)";
304
- readonly 'border.width.100': "var(--ds-border-width-100)";
303
+ readonly 'border.width.indicator': "var(--ds-border-width-indicator)";
304
+ readonly 'border.width.outline': "var(--ds-border-width-outline)";
305
305
  };
306
306
  export type BorderWidth = keyof typeof borderWidthMap;
307
307
  export declare const borderRadiusMap: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -102,8 +102,7 @@
102
102
  "./responsive": "./src/responsive/index.tsx"
103
103
  },
104
104
  "dependencies": {
105
- "@atlaskit/ds-lib": "^2.2.0",
106
- "@atlaskit/tokens": "^1.10.0",
105
+ "@atlaskit/tokens": "^1.11.0",
107
106
  "@babel/runtime": "^7.0.0",
108
107
  "@emotion/react": "^11.7.1",
109
108
  "@emotion/serialize": "^1.1.0",
@@ -113,26 +112,12 @@
113
112
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
114
113
  },
115
114
  "devDependencies": {
116
- "@atlaskit/avatar": "*",
117
- "@atlaskit/badge": "*",
118
- "@atlaskit/button": "*",
119
- "@atlaskit/code": "*",
120
- "@atlaskit/docs": "*",
121
- "@atlaskit/dropdown-menu": "*",
115
+ "@af/visual-regression": "*",
122
116
  "@atlaskit/ds-lib": "*",
123
- "@atlaskit/heading": "*",
124
- "@atlaskit/icon": "*",
125
- "@atlaskit/icon-object": "*",
126
- "@atlaskit/logo": "*",
127
- "@atlaskit/lozenge": "*",
128
- "@atlaskit/radio": "^5.6.0",
129
- "@atlaskit/range": "^7.1.0",
130
117
  "@atlaskit/ssr": "*",
131
- "@atlaskit/theme": "*",
132
118
  "@atlaskit/visual-regression": "*",
133
119
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
134
120
  "@atlassian/codegen": "^0.1.0",
135
- "@atlassian/gemini-visual-regression": "^0.0.35",
136
121
  "@testing-library/react": "^12.1.5",
137
122
  "@testing-library/react-hooks": "^8.0.1",
138
123
  "csstype": "^3.1.0",
package/report.api.md CHANGED
@@ -261,8 +261,8 @@ type BorderWidth = keyof typeof borderWidthMap;
261
261
  const borderWidthMap: {
262
262
  readonly 'border.width': 'var(--ds-border-width)';
263
263
  readonly 'border.width.0': 'var(--ds-border-width-0)';
264
- readonly 'border.width.050': 'var(--ds-border-width-050)';
265
- readonly 'border.width.100': 'var(--ds-border-width-100)';
264
+ readonly 'border.width.indicator': 'var(--ds-border-width-indicator)';
265
+ readonly 'border.width.outline': 'var(--ds-border-width-outline)';
266
266
  };
267
267
 
268
268
  // @public
@@ -232,8 +232,8 @@ type BorderWidth = keyof typeof borderWidthMap;
232
232
  const borderWidthMap: {
233
233
  readonly 'border.width': "var(--ds-border-width)";
234
234
  readonly 'border.width.0': "var(--ds-border-width-0)";
235
- readonly 'border.width.050': "var(--ds-border-width-050)";
236
- readonly 'border.width.100': "var(--ds-border-width-100)";
235
+ readonly 'border.width.indicator': "var(--ds-border-width-indicator)";
236
+ readonly 'border.width.outline': "var(--ds-border-width-outline)";
237
237
  };
238
238
 
239
239
  // @public