@atlaskit/lozenge 11.4.3 → 11.4.4

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,12 @@
1
1
  # @atlaskit/lozenge
2
2
 
3
+ ## 11.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3b97837c528`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3b97837c528) - The internal composition of this component has changed. There is no expected change in behavior.
8
+ - Updated dependencies
9
+
3
10
  ## 11.4.3
4
11
 
5
12
  ### Patch Changes
@@ -7,14 +7,20 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
11
10
  var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
11
+ var _primitives = require("@atlaskit/primitives");
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
14
  /* eslint-disable @atlassian/tangerine/import/entry-points */
15
15
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
16
16
  /* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
17
17
 
18
+ var baseStyles = (0, _primitives.xcss)({
19
+ display: 'inline-flex',
20
+ borderRadius: 'border.radius',
21
+ position: 'static',
22
+ overflow: 'hidden'
23
+ });
18
24
  /**
19
25
  * __Lozenge__
20
26
  *
@@ -38,19 +44,16 @@ var Lozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
38
44
  var appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
39
45
  var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
40
46
  var maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
41
- return /*#__PURE__*/_react.default.createElement(_box.default, {
47
+ return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
42
48
  as: "span",
43
- display: "inlineFlex",
44
49
  backgroundColor: backgroundColors[appearanceStyle][appearanceType],
45
- borderRadius: "normal",
46
- paddingInline: "space.050",
47
- position: "static",
48
- testId: testId,
49
- overflow: "hidden",
50
- UNSAFE_style: {
50
+ style: {
51
51
  backgroundColor: style === null || style === void 0 ? void 0 : style.backgroundColor,
52
52
  maxWidth: maxWidthIsPc ? maxWidth : '100%'
53
- }
53
+ },
54
+ paddingInline: "space.050",
55
+ xcss: baseStyles,
56
+ testId: testId
54
57
  }, /*#__PURE__*/_react.default.createElement(_text.default, {
55
58
  fontSize: "size.050",
56
59
  fontWeight: "bold",
@@ -71,20 +74,20 @@ var _default = Lozenge; // Lozenge colors
71
74
  exports.default = _default;
72
75
  var backgroundColors = {
73
76
  bold: {
74
- default: 'neutral.bold',
75
- inprogress: 'information.bold',
76
- moved: 'warning.bold',
77
- new: 'discovery.bold',
78
- removed: 'danger.bold',
79
- success: 'success.bold'
77
+ default: 'color.background.neutral.bold',
78
+ inprogress: 'color.background.information.bold',
79
+ moved: 'color.background.warning.bold',
80
+ new: 'color.background.discovery.bold',
81
+ removed: 'color.background.danger.bold',
82
+ success: 'color.background.success.bold'
80
83
  },
81
84
  subtle: {
82
- default: 'neutral',
83
- inprogress: 'information',
84
- moved: 'warning',
85
- new: 'discovery',
86
- removed: 'danger',
87
- success: 'success'
85
+ default: 'color.background.neutral',
86
+ inprogress: 'color.background.information',
87
+ moved: 'color.background.warning',
88
+ new: 'color.background.discovery',
89
+ removed: 'color.background.danger',
90
+ success: 'color.background.success'
88
91
  }
89
92
  };
90
93
  var textColors = {
@@ -3,8 +3,14 @@
3
3
  /* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
4
4
 
5
5
  import React, { memo } from 'react';
6
- import Box from '@atlaskit/ds-explorations/box';
7
6
  import Text from '@atlaskit/ds-explorations/text';
7
+ import { Box, xcss } from '@atlaskit/primitives';
8
+ const baseStyles = xcss({
9
+ display: 'inline-flex',
10
+ borderRadius: 'border.radius',
11
+ position: 'static',
12
+ overflow: 'hidden'
13
+ });
8
14
  /**
9
15
  * __Lozenge__
10
16
  *
@@ -28,17 +34,14 @@ const Lozenge = /*#__PURE__*/memo(({
28
34
  const maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
29
35
  return /*#__PURE__*/React.createElement(Box, {
30
36
  as: "span",
31
- display: "inlineFlex",
32
37
  backgroundColor: backgroundColors[appearanceStyle][appearanceType],
33
- borderRadius: "normal",
34
- paddingInline: "space.050",
35
- position: "static",
36
- testId: testId,
37
- overflow: "hidden",
38
- UNSAFE_style: {
38
+ style: {
39
39
  backgroundColor: style === null || style === void 0 ? void 0 : style.backgroundColor,
40
40
  maxWidth: maxWidthIsPc ? maxWidth : '100%'
41
- }
41
+ },
42
+ paddingInline: "space.050",
43
+ xcss: baseStyles,
44
+ testId: testId
42
45
  }, /*#__PURE__*/React.createElement(Text, {
43
46
  fontSize: "size.050",
44
47
  fontWeight: "bold",
@@ -60,20 +63,20 @@ export default Lozenge;
60
63
  // Lozenge colors
61
64
  const backgroundColors = {
62
65
  bold: {
63
- default: 'neutral.bold',
64
- inprogress: 'information.bold',
65
- moved: 'warning.bold',
66
- new: 'discovery.bold',
67
- removed: 'danger.bold',
68
- success: 'success.bold'
66
+ default: 'color.background.neutral.bold',
67
+ inprogress: 'color.background.information.bold',
68
+ moved: 'color.background.warning.bold',
69
+ new: 'color.background.discovery.bold',
70
+ removed: 'color.background.danger.bold',
71
+ success: 'color.background.success.bold'
69
72
  },
70
73
  subtle: {
71
- default: 'neutral',
72
- inprogress: 'information',
73
- moved: 'warning',
74
- new: 'discovery',
75
- removed: 'danger',
76
- success: 'success'
74
+ default: 'color.background.neutral',
75
+ inprogress: 'color.background.information',
76
+ moved: 'color.background.warning',
77
+ new: 'color.background.discovery',
78
+ removed: 'color.background.danger',
79
+ success: 'color.background.success'
77
80
  }
78
81
  };
79
82
  const textColors = {
@@ -3,8 +3,14 @@
3
3
  /* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
4
4
 
5
5
  import React, { memo } from 'react';
6
- import Box from '@atlaskit/ds-explorations/box';
7
6
  import Text from '@atlaskit/ds-explorations/text';
7
+ import { Box, xcss } from '@atlaskit/primitives';
8
+ var baseStyles = xcss({
9
+ display: 'inline-flex',
10
+ borderRadius: 'border.radius',
11
+ position: 'static',
12
+ overflow: 'hidden'
13
+ });
8
14
  /**
9
15
  * __Lozenge__
10
16
  *
@@ -30,17 +36,14 @@ var Lozenge = /*#__PURE__*/memo(function (_ref) {
30
36
  var maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
31
37
  return /*#__PURE__*/React.createElement(Box, {
32
38
  as: "span",
33
- display: "inlineFlex",
34
39
  backgroundColor: backgroundColors[appearanceStyle][appearanceType],
35
- borderRadius: "normal",
36
- paddingInline: "space.050",
37
- position: "static",
38
- testId: testId,
39
- overflow: "hidden",
40
- UNSAFE_style: {
40
+ style: {
41
41
  backgroundColor: style === null || style === void 0 ? void 0 : style.backgroundColor,
42
42
  maxWidth: maxWidthIsPc ? maxWidth : '100%'
43
- }
43
+ },
44
+ paddingInline: "space.050",
45
+ xcss: baseStyles,
46
+ testId: testId
44
47
  }, /*#__PURE__*/React.createElement(Text, {
45
48
  fontSize: "size.050",
46
49
  fontWeight: "bold",
@@ -62,20 +65,20 @@ export default Lozenge;
62
65
  // Lozenge colors
63
66
  var backgroundColors = {
64
67
  bold: {
65
- default: 'neutral.bold',
66
- inprogress: 'information.bold',
67
- moved: 'warning.bold',
68
- new: 'discovery.bold',
69
- removed: 'danger.bold',
70
- success: 'success.bold'
68
+ default: 'color.background.neutral.bold',
69
+ inprogress: 'color.background.information.bold',
70
+ moved: 'color.background.warning.bold',
71
+ new: 'color.background.discovery.bold',
72
+ removed: 'color.background.danger.bold',
73
+ success: 'color.background.success.bold'
71
74
  },
72
75
  subtle: {
73
- default: 'neutral',
74
- inprogress: 'information',
75
- moved: 'warning',
76
- new: 'discovery',
77
- removed: 'danger',
78
- success: 'success'
76
+ default: 'color.background.neutral',
77
+ inprogress: 'color.background.information',
78
+ moved: 'color.background.warning',
79
+ new: 'color.background.discovery',
80
+ removed: 'color.background.danger',
81
+ success: 'color.background.success'
79
82
  }
80
83
  };
81
84
  var textColors = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/lozenge",
3
- "version": "11.4.3",
3
+ "version": "11.4.4",
4
4
  "description": "A lozenge is a visual indicator used to highlight an item's status for quick recognition.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
- "team": "Design System Fundamentals",
26
+ "team": "Design System Team",
27
27
  "deprecatedAutoEntryPoints": true,
28
28
  "releaseModel": "continuous",
29
29
  "productPushConsumption": [
@@ -37,8 +37,9 @@
37
37
  "dependencies": {
38
38
  "@atlaskit/codemod-utils": "^4.2.0",
39
39
  "@atlaskit/ds-explorations": "^2.2.0",
40
- "@atlaskit/theme": "^12.5.0",
41
- "@atlaskit/tokens": "^1.13.0",
40
+ "@atlaskit/primitives": "^1.5.0",
41
+ "@atlaskit/theme": "^12.6.0",
42
+ "@atlaskit/tokens": "^1.22.0",
42
43
  "@babel/runtime": "^7.0.0"
43
44
  },
44
45
  "peerDependencies": {
@@ -47,7 +48,6 @@
47
48
  "devDependencies": {
48
49
  "@af/accessibility-testing": "*",
49
50
  "@atlaskit/ds-lib": "^2.2.0",
50
- "@atlaskit/primitives": "^1.0.6",
51
51
  "@atlaskit/ssr": "*",
52
52
  "@atlaskit/visual-regression": "*",
53
53
  "@atlaskit/webdriver-runner": "*",
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/lozenge",
3
- "version": "11.4.3",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/lozenge",
3
- "version": "11.4.3",
4
- "sideEffects": false
5
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "@atlaskit/lozenge",
3
- "version": "11.4.3",
4
- "sideEffects": false
5
- }