@atlaskit/lozenge 11.3.6 → 11.3.7
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 +8 -19
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/theme.js +4 -6
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/Lozenge/index.js +3 -4
- package/dist/es2019/theme.js +5 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/Lozenge/index.js +11 -12
- package/dist/esm/theme.js +5 -4
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.default = void 0;
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
|
|
15
|
-
|
|
16
11
|
var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
|
|
17
|
-
|
|
18
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); }
|
|
19
|
-
|
|
20
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; }
|
|
21
|
-
|
|
22
14
|
/* eslint-disable @atlassian/tangerine/import/entry-points */
|
|
23
|
-
|
|
24
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
25
|
-
|
|
26
16
|
/* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
|
|
27
17
|
|
|
28
18
|
/**
|
|
@@ -36,14 +26,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
36
26
|
*/
|
|
37
27
|
var Lozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
38
28
|
var children = _ref.children,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
testId = _ref.testId,
|
|
30
|
+
_ref$isBold = _ref.isBold,
|
|
31
|
+
isBold = _ref$isBold === void 0 ? false : _ref$isBold,
|
|
32
|
+
_ref$appearance = _ref.appearance,
|
|
33
|
+
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
34
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
35
|
+
maxWidth = _ref$maxWidth === void 0 ? 200 : _ref$maxWidth,
|
|
36
|
+
style = _ref.style;
|
|
47
37
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
48
38
|
var appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
|
|
49
39
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
@@ -78,7 +68,6 @@ var Lozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
78
68
|
});
|
|
79
69
|
Lozenge.displayName = 'Lozenge';
|
|
80
70
|
var _default = Lozenge; // Lozenge colors
|
|
81
|
-
|
|
82
71
|
exports.default = _default;
|
|
83
72
|
var backgroundColors = {
|
|
84
73
|
bold: {
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
|
|
|
11
10
|
return _Lozenge.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
15
13
|
var _Lozenge = _interopRequireDefault(require("./Lozenge"));
|
package/dist/cjs/theme.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultTextColor = exports.defaultBackgroundColor = exports.boldTextColor = exports.boldBackgroundColor = void 0;
|
|
7
|
-
|
|
8
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
|
|
10
8
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
11
9
|
// TODO: DSP-1392 this file will be removed, don't import anything from this file elsewhere.
|
|
12
10
|
|
|
@@ -39,10 +37,10 @@ var defaultBackgroundColor = {
|
|
|
39
37
|
dark: _colors.G50
|
|
40
38
|
}
|
|
41
39
|
};
|
|
40
|
+
|
|
42
41
|
/**
|
|
43
42
|
* @deprecated
|
|
44
43
|
*/
|
|
45
|
-
|
|
46
44
|
exports.defaultBackgroundColor = defaultBackgroundColor;
|
|
47
45
|
var defaultTextColor = {
|
|
48
46
|
default: {
|
|
@@ -70,10 +68,10 @@ var defaultTextColor = {
|
|
|
70
68
|
dark: _colors.G500
|
|
71
69
|
}
|
|
72
70
|
};
|
|
71
|
+
|
|
73
72
|
/**
|
|
74
73
|
* @deprecated
|
|
75
74
|
*/
|
|
76
|
-
|
|
77
75
|
exports.defaultTextColor = defaultTextColor;
|
|
78
76
|
var boldBackgroundColor = {
|
|
79
77
|
default: {
|
|
@@ -101,10 +99,10 @@ var boldBackgroundColor = {
|
|
|
101
99
|
dark: _colors.G400
|
|
102
100
|
}
|
|
103
101
|
};
|
|
102
|
+
|
|
104
103
|
/**
|
|
105
104
|
* @deprecated
|
|
106
105
|
*/
|
|
107
|
-
|
|
108
106
|
exports.boldBackgroundColor = boldBackgroundColor;
|
|
109
107
|
var boldTextColor = {
|
|
110
108
|
default: {
|
|
@@ -132,8 +130,8 @@ var boldTextColor = {
|
|
|
132
130
|
dark: _colors.N0
|
|
133
131
|
}
|
|
134
132
|
};
|
|
133
|
+
|
|
135
134
|
/**
|
|
136
135
|
* @deprecated
|
|
137
136
|
*/
|
|
138
|
-
|
|
139
137
|
exports.boldTextColor = boldTextColor;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @atlassian/tangerine/import/entry-points */
|
|
2
|
-
|
|
3
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
-
|
|
5
3
|
/* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
|
|
4
|
+
|
|
6
5
|
import React, { memo } from 'react';
|
|
7
6
|
import Box from '@atlaskit/ds-explorations/box';
|
|
8
7
|
import Text from '@atlaskit/ds-explorations/text';
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* __Lozenge__
|
|
12
10
|
*
|
|
@@ -57,8 +55,9 @@ const Lozenge = /*#__PURE__*/memo(({
|
|
|
57
55
|
}, children));
|
|
58
56
|
});
|
|
59
57
|
Lozenge.displayName = 'Lozenge';
|
|
60
|
-
export default Lozenge;
|
|
58
|
+
export default Lozenge;
|
|
61
59
|
|
|
60
|
+
// Lozenge colors
|
|
62
61
|
const backgroundColors = {
|
|
63
62
|
bold: {
|
|
64
63
|
default: 'neutral.bold',
|
package/dist/es2019/theme.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
2
|
// TODO: DSP-1392 this file will be removed, don't import anything from this file elsewhere.
|
|
3
3
|
import { B400, B50, B500, G400, G50, G500, N0, N40, N500, N800, P400, P50, P500, R400, R50, R500, Y500, Y75 } from '@atlaskit/theme/colors';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
8
|
export const defaultBackgroundColor = {
|
|
9
9
|
default: {
|
|
10
10
|
light: N40,
|
|
@@ -31,10 +31,10 @@ export const defaultBackgroundColor = {
|
|
|
31
31
|
dark: G50
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
|
|
34
35
|
/**
|
|
35
36
|
* @deprecated
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
38
|
export const defaultTextColor = {
|
|
39
39
|
default: {
|
|
40
40
|
light: N500,
|
|
@@ -61,10 +61,10 @@ export const defaultTextColor = {
|
|
|
61
61
|
dark: G500
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
+
|
|
64
65
|
/**
|
|
65
66
|
* @deprecated
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
68
|
export const boldBackgroundColor = {
|
|
69
69
|
default: {
|
|
70
70
|
light: N500,
|
|
@@ -91,10 +91,10 @@ export const boldBackgroundColor = {
|
|
|
91
91
|
dark: G400
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
+
|
|
94
95
|
/**
|
|
95
96
|
* @deprecated
|
|
96
97
|
*/
|
|
97
|
-
|
|
98
98
|
export const boldTextColor = {
|
|
99
99
|
default: {
|
|
100
100
|
light: N0,
|
|
@@ -121,6 +121,7 @@ export const boldTextColor = {
|
|
|
121
121
|
dark: N0
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
+
|
|
124
125
|
/**
|
|
125
126
|
* @deprecated
|
|
126
127
|
*/
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @atlassian/tangerine/import/entry-points */
|
|
2
|
-
|
|
3
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
-
|
|
5
3
|
/* eslint-disable @atlaskit/design-system/no-unsafe-design-token-usage */
|
|
4
|
+
|
|
6
5
|
import React, { memo } from 'react';
|
|
7
6
|
import Box from '@atlaskit/ds-explorations/box';
|
|
8
7
|
import Text from '@atlaskit/ds-explorations/text';
|
|
9
|
-
|
|
10
8
|
/**
|
|
11
9
|
* __Lozenge__
|
|
12
10
|
*
|
|
@@ -18,14 +16,14 @@ import Text from '@atlaskit/ds-explorations/text';
|
|
|
18
16
|
*/
|
|
19
17
|
var Lozenge = /*#__PURE__*/memo(function (_ref) {
|
|
20
18
|
var children = _ref.children,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
testId = _ref.testId,
|
|
20
|
+
_ref$isBold = _ref.isBold,
|
|
21
|
+
isBold = _ref$isBold === void 0 ? false : _ref$isBold,
|
|
22
|
+
_ref$appearance = _ref.appearance,
|
|
23
|
+
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
24
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
25
|
+
maxWidth = _ref$maxWidth === void 0 ? 200 : _ref$maxWidth,
|
|
26
|
+
style = _ref.style;
|
|
29
27
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
30
28
|
var appearanceType = appearance in backgroundColors[appearanceStyle] ? appearance : 'default';
|
|
31
29
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
@@ -59,8 +57,9 @@ var Lozenge = /*#__PURE__*/memo(function (_ref) {
|
|
|
59
57
|
}, children));
|
|
60
58
|
});
|
|
61
59
|
Lozenge.displayName = 'Lozenge';
|
|
62
|
-
export default Lozenge;
|
|
60
|
+
export default Lozenge;
|
|
63
61
|
|
|
62
|
+
// Lozenge colors
|
|
64
63
|
var backgroundColors = {
|
|
65
64
|
bold: {
|
|
66
65
|
default: 'neutral.bold',
|
package/dist/esm/theme.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
2
|
// TODO: DSP-1392 this file will be removed, don't import anything from this file elsewhere.
|
|
3
3
|
import { B400, B50, B500, G400, G50, G500, N0, N40, N500, N800, P400, P50, P500, R400, R50, R500, Y500, Y75 } from '@atlaskit/theme/colors';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* @deprecated
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
8
|
export var defaultBackgroundColor = {
|
|
9
9
|
default: {
|
|
10
10
|
light: N40,
|
|
@@ -31,10 +31,10 @@ export var defaultBackgroundColor = {
|
|
|
31
31
|
dark: G50
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
|
|
34
35
|
/**
|
|
35
36
|
* @deprecated
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
38
|
export var defaultTextColor = {
|
|
39
39
|
default: {
|
|
40
40
|
light: N500,
|
|
@@ -61,10 +61,10 @@ export var defaultTextColor = {
|
|
|
61
61
|
dark: G500
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
+
|
|
64
65
|
/**
|
|
65
66
|
* @deprecated
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
68
|
export var boldBackgroundColor = {
|
|
69
69
|
default: {
|
|
70
70
|
light: N500,
|
|
@@ -91,10 +91,10 @@ export var boldBackgroundColor = {
|
|
|
91
91
|
dark: G400
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
+
|
|
94
95
|
/**
|
|
95
96
|
* @deprecated
|
|
96
97
|
*/
|
|
97
|
-
|
|
98
98
|
export var boldTextColor = {
|
|
99
99
|
default: {
|
|
100
100
|
light: N0,
|
|
@@ -121,6 +121,7 @@ export var boldTextColor = {
|
|
|
121
121
|
dark: N0
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
+
|
|
124
125
|
/**
|
|
125
126
|
* @deprecated
|
|
126
127
|
*/
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/lozenge",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.7",
|
|
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/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
29
29
|
"@atlaskit/ds-explorations": "^2.0.0",
|
|
30
30
|
"@atlaskit/theme": "^12.2.0",
|
|
31
|
-
"@atlaskit/tokens": "^0.
|
|
31
|
+
"@atlaskit/tokens": "^1.0.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|