@atlaskit/lozenge 11.2.3 → 11.2.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 +6 -0
- package/dist/cjs/Lozenge/index.js +9 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/Lozenge/index.js +3 -6
- package/dist/es2019/version.json +1 -1
- package/dist/esm/Lozenge/index.js +3 -6
- package/dist/esm/version.json +1 -1
- package/dist/types/Lozenge/index.d.ts +2 -3
- package/dist/types-ts4.0/Lozenge/index.d.ts +2 -3
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/lozenge
|
|
2
2
|
|
|
3
|
+
## 11.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4c6b6f0c927`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4c6b6f0c927) - Removes `@emotion/core` dependency as it is no longer used within Lozenge. There is no expected behavior change.
|
|
8
|
+
|
|
3
9
|
## 11.2.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _core = require("@emotion/core");
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
12
|
var _dsExplorations = require("@atlaskit/ds-explorations");
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
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); }
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* __Lozenge__
|
|
@@ -40,7 +42,7 @@ var Lozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
40
42
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
41
43
|
var appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
|
|
42
44
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
43
|
-
return
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Box, {
|
|
44
46
|
as: "span",
|
|
45
47
|
display: "inlineFlex",
|
|
46
48
|
backgroundColor: backgroundColors[appearanceStyle][appearanceType],
|
|
@@ -53,7 +55,7 @@ var Lozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
53
55
|
verticalAlign: 'baseline',
|
|
54
56
|
maxWidth: '100%'
|
|
55
57
|
}
|
|
56
|
-
},
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Text, {
|
|
57
59
|
as: "span",
|
|
58
60
|
fontSize: "11px",
|
|
59
61
|
fontWeight: "700",
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
-
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { memo } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
2
|
+
import React, { memo } from 'react';
|
|
6
3
|
import { UNSAFE_Box as Box, UNSAFE_SPACING_SCALE as SPACING_SCALE, UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
7
4
|
import { B400, B50, B500, G400, G50, G500, N0, N40, N500, N800, P400, P50, P500, R400, R50, R500, Y500, Y75 } from '@atlaskit/theme/colors';
|
|
8
5
|
|
|
@@ -26,7 +23,7 @@ const Lozenge = /*#__PURE__*/memo(({
|
|
|
26
23
|
const appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
27
24
|
const appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
|
|
28
25
|
const maxWidthValue = typeof maxWidth === 'string' ? maxWidth : `${maxWidth}px`;
|
|
29
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
30
27
|
as: "span",
|
|
31
28
|
display: "inlineFlex",
|
|
32
29
|
backgroundColor: backgroundColors[appearanceStyle][appearanceType],
|
|
@@ -39,7 +36,7 @@ const Lozenge = /*#__PURE__*/memo(({
|
|
|
39
36
|
verticalAlign: 'baseline',
|
|
40
37
|
maxWidth: '100%'
|
|
41
38
|
}
|
|
42
|
-
},
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
43
40
|
as: "span",
|
|
44
41
|
fontSize: "11px",
|
|
45
42
|
fontWeight: "700",
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
-
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { memo } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
2
|
+
import React, { memo } from 'react';
|
|
6
3
|
import { UNSAFE_Box as Box, UNSAFE_SPACING_SCALE as SPACING_SCALE, UNSAFE_Text as Text } from '@atlaskit/ds-explorations';
|
|
7
4
|
import { B400, B50, B500, G400, G50, G500, N0, N40, N500, N800, P400, P50, P500, R400, R50, R500, Y500, Y75 } from '@atlaskit/theme/colors';
|
|
8
5
|
|
|
@@ -29,7 +26,7 @@ var Lozenge = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
26
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
30
27
|
var appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
|
|
31
28
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
32
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
33
30
|
as: "span",
|
|
34
31
|
display: "inlineFlex",
|
|
35
32
|
backgroundColor: backgroundColors[appearanceStyle][appearanceType],
|
|
@@ -42,7 +39,7 @@ var Lozenge = /*#__PURE__*/memo(function (_ref) {
|
|
|
42
39
|
verticalAlign: 'baseline',
|
|
43
40
|
maxWidth: '100%'
|
|
44
41
|
}
|
|
45
|
-
},
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
46
43
|
as: "span",
|
|
47
44
|
fontSize: "11px",
|
|
48
45
|
fontWeight: "700",
|
package/dist/esm/version.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
3
2
|
export declare type ThemeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
4
3
|
export interface LozengeProps {
|
|
5
4
|
/**
|
|
@@ -38,5 +37,5 @@ export interface LozengeProps {
|
|
|
38
37
|
* - [Code](https://atlassian.design/components/lozenge/code)
|
|
39
38
|
* - [Usage](https://atlassian.design/components/lozenge/usage)
|
|
40
39
|
*/
|
|
41
|
-
declare const Lozenge:
|
|
40
|
+
declare const Lozenge: React.MemoExoticComponent<({ children, testId, isBold, appearance, maxWidth, style, }: LozengeProps) => JSX.Element>;
|
|
42
41
|
export default Lozenge;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
3
2
|
export declare type ThemeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
4
3
|
export interface LozengeProps {
|
|
5
4
|
/**
|
|
@@ -38,5 +37,5 @@ export interface LozengeProps {
|
|
|
38
37
|
* - [Code](https://atlassian.design/components/lozenge/code)
|
|
39
38
|
* - [Usage](https://atlassian.design/components/lozenge/usage)
|
|
40
39
|
*/
|
|
41
|
-
declare const Lozenge:
|
|
40
|
+
declare const Lozenge: React.MemoExoticComponent<({ children, testId, isBold, appearance, maxWidth, style, }: LozengeProps) => JSX.Element>;
|
|
42
41
|
export default Lozenge;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/lozenge",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.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/"
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
35
35
|
"@atlaskit/ds-explorations": "^0.1.2",
|
|
36
36
|
"@atlaskit/theme": "^12.2.0",
|
|
37
|
-
"@babel/runtime": "^7.0.0"
|
|
38
|
-
"@emotion/core": "^10.0.9"
|
|
37
|
+
"@babel/runtime": "^7.0.0"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"react": "^16.8.0"
|