@atlaskit/icon 21.10.8 → 21.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 +6 -0
- package/dist/cjs/components/icon.js +8 -8
- package/dist/cjs/components/skeleton.js +7 -7
- package/dist/cjs/components/styles.js +5 -5
- package/dist/cjs/components/svg.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/icon.js +1 -1
- package/dist/es2019/components/skeleton.js +1 -1
- package/dist/es2019/components/styles.js +1 -1
- package/dist/es2019/components/svg.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/icon.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/styles.js +1 -1
- package/dist/esm/components/svg.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/styles.d.ts +5 -5
- package/dist/types-ts4.0/components/styles.d.ts +5 -5
- package/package.json +7 -7
- package/report.api.md +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 21.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a3973745679`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a3973745679) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
8
|
+
|
|
3
9
|
## 21.10.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _react2 = require("@emotion/react");
|
|
17
17
|
|
|
18
18
|
var _components = require("@atlaskit/theme/components");
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
25
25
|
|
|
26
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
27
|
|
|
28
|
-
var iconStyles = (0,
|
|
28
|
+
var iconStyles = (0, _react2.css)({
|
|
29
29
|
display: 'inline-block',
|
|
30
30
|
flexShrink: 0,
|
|
31
31
|
lineHeight: 1,
|
|
@@ -42,7 +42,7 @@ var iconStyles = (0, _core.css)({
|
|
|
42
42
|
* For windows high contrast mode
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
var baseHcmStyles = (0,
|
|
45
|
+
var baseHcmStyles = (0, _react2.css)({
|
|
46
46
|
'@media screen and (forced-colors: active)': {
|
|
47
47
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
48
48
|
'> svg': {
|
|
@@ -54,7 +54,7 @@ var baseHcmStyles = (0, _core.css)({
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
var primaryEqualsSecondaryHcmStyles = (0,
|
|
57
|
+
var primaryEqualsSecondaryHcmStyles = (0, _react2.css)({
|
|
58
58
|
'@media screen and (forced-colors: active)': {
|
|
59
59
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
60
60
|
'> svg': {
|
|
@@ -66,7 +66,7 @@ var primaryEqualsSecondaryHcmStyles = (0, _core.css)({
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
var secondaryTransparentHcmStyles = (0,
|
|
69
|
+
var secondaryTransparentHcmStyles = (0, _react2.css)({
|
|
70
70
|
'@media screen and (forced-colors: active)': {
|
|
71
71
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
72
72
|
'> svg': {
|
|
@@ -101,7 +101,7 @@ var Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
101
101
|
__html: dangerouslySetGlyph
|
|
102
102
|
}
|
|
103
103
|
} : {
|
|
104
|
-
children: Glyph ? (0,
|
|
104
|
+
children: Glyph ? (0, _react2.jsx)(Glyph, {
|
|
105
105
|
role: "presentation"
|
|
106
106
|
}) : null
|
|
107
107
|
};
|
|
@@ -114,7 +114,7 @@ var Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
114
114
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
115
115
|
mode = _useGlobalTheme.mode;
|
|
116
116
|
|
|
117
|
-
return (0,
|
|
117
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
118
118
|
"data-testid": testId,
|
|
119
119
|
role: label ? 'img' : 'presentation',
|
|
120
120
|
"aria-label": label ? label : undefined,
|
|
@@ -128,7 +128,7 @@ var Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
128
128
|
// We could then simplify how common styles are dealt with simply by encapsualting them
|
|
129
129
|
// at their appropriate level and/or having a singular approach to css variables in the package
|
|
130
130
|
dimensions && // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
131
|
-
(0,
|
|
131
|
+
(0, _react2.css)({
|
|
132
132
|
width: dimensions.width,
|
|
133
133
|
height: dimensions.height,
|
|
134
134
|
'> svg': dimensions
|
|
@@ -5,28 +5,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _react2 = require("react");
|
|
11
11
|
|
|
12
12
|
var _styles = require("./styles");
|
|
13
13
|
|
|
14
14
|
/** @jsx jsx */
|
|
15
|
-
var skeletonStyles = (0,
|
|
15
|
+
var skeletonStyles = (0, _react.css)({
|
|
16
16
|
display: 'inline-block',
|
|
17
17
|
borderRadius: '50%'
|
|
18
18
|
});
|
|
19
|
-
var subtleOpacityStyles = (0,
|
|
19
|
+
var subtleOpacityStyles = (0, _react.css)({
|
|
20
20
|
opacity: 0.15
|
|
21
21
|
});
|
|
22
|
-
var strongOpacityStyles = (0,
|
|
22
|
+
var strongOpacityStyles = (0, _react.css)({
|
|
23
23
|
opacity: 0.3
|
|
24
24
|
});
|
|
25
25
|
/**
|
|
26
26
|
* __Skeleton__
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
var Skeleton = /*#__PURE__*/(0,
|
|
29
|
+
var Skeleton = /*#__PURE__*/(0, _react2.memo)(function Skeleton(_ref) {
|
|
30
30
|
var testId = _ref.testId,
|
|
31
31
|
_ref$size = _ref.size,
|
|
32
32
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
@@ -34,7 +34,7 @@ var Skeleton = /*#__PURE__*/(0, _react.memo)(function Skeleton(_ref) {
|
|
|
34
34
|
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
35
35
|
_ref$weight = _ref.weight,
|
|
36
36
|
weight = _ref$weight === void 0 ? 'normal' : _ref$weight;
|
|
37
|
-
return (0,
|
|
37
|
+
return (0, _react.jsx)("div", {
|
|
38
38
|
"data-testid": testId,
|
|
39
39
|
style: {
|
|
40
40
|
backgroundColor: color
|
|
@@ -7,7 +7,7 @@ exports.sizeStyleMap = exports.getIconSize = exports.commonSVGStyles = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _constants = require("../constants");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
11
|
|
|
12
12
|
var commonSVGStyles = {
|
|
13
13
|
overflow: 'hidden',
|
|
@@ -23,10 +23,10 @@ var commonSVGStyles = {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
exports.commonSVGStyles = commonSVGStyles;
|
|
26
|
-
var smallStyles = (0,
|
|
27
|
-
var mediumStyles = (0,
|
|
28
|
-
var largeStyles = (0,
|
|
29
|
-
var xlargeStyles = (0,
|
|
26
|
+
var smallStyles = (0, _react.css)(_constants.dimensions.small);
|
|
27
|
+
var mediumStyles = (0, _react.css)(_constants.dimensions.medium);
|
|
28
|
+
var largeStyles = (0, _react.css)(_constants.dimensions.large);
|
|
29
|
+
var xlargeStyles = (0, _react.css)(_constants.dimensions.xlarge); // pre-built css style-size map
|
|
30
30
|
|
|
31
31
|
var sizeStyleMap = {
|
|
32
32
|
small: smallStyles,
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
11
|
|
|
12
12
|
var _components = require("@atlaskit/theme/components");
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ var _styles = require("./styles");
|
|
|
17
17
|
|
|
18
18
|
/** @jsx jsx */
|
|
19
19
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
20
|
-
var svgStyles = (0,
|
|
20
|
+
var svgStyles = (0, _react2.css)(_styles.commonSVGStyles);
|
|
21
21
|
/**
|
|
22
22
|
* __SVG__
|
|
23
23
|
*
|
|
@@ -40,7 +40,7 @@ var SVG = /*#__PURE__*/(0, _react.memo)(function SVG(_ref) {
|
|
|
40
40
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
41
41
|
mode = _useGlobalTheme.mode;
|
|
42
42
|
|
|
43
|
-
return (0,
|
|
43
|
+
return (0, _react2.jsx)("svg", {
|
|
44
44
|
viewBox: "0 0 24 24",
|
|
45
45
|
style: {
|
|
46
46
|
color: primaryColor,
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { memo } from 'react';
|
|
5
|
-
import { css, jsx } from '@emotion/
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
7
7
|
import { getBackground } from './utils';
|
|
8
8
|
import { commonSVGStyles, getIconSize } from './styles';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
5
5
|
import { getBackground } from './utils';
|
|
6
6
|
import { commonSVGStyles, sizeStyleMap } from './styles'; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,7 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
|
|
8
8
|
/** @jsx jsx */
|
|
9
9
|
import { memo } from 'react';
|
|
10
|
-
import { css, jsx } from '@emotion/
|
|
10
|
+
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
12
12
|
import { getBackground } from './utils';
|
|
13
13
|
import { commonSVGStyles, getIconSize } from './styles';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
5
5
|
import { getBackground } from './utils';
|
|
6
6
|
import { commonSVGStyles, sizeStyleMap } from './styles'; // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
package/dist/esm/version.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Size } from '../types';
|
|
2
|
-
import { CSSObject } from '@emotion/
|
|
2
|
+
import { CSSObject } from '@emotion/react';
|
|
3
3
|
export declare const commonSVGStyles: CSSObject;
|
|
4
4
|
export declare const sizeStyleMap: {
|
|
5
|
-
small: import("@emotion/
|
|
6
|
-
medium: import("@emotion/
|
|
7
|
-
large: import("@emotion/
|
|
8
|
-
xlarge: import("@emotion/
|
|
5
|
+
small: import("@emotion/react").SerializedStyles;
|
|
6
|
+
medium: import("@emotion/react").SerializedStyles;
|
|
7
|
+
large: import("@emotion/react").SerializedStyles;
|
|
8
|
+
xlarge: import("@emotion/react").SerializedStyles;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Returns the width of the icon's parent span. This function has
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Size } from '../types';
|
|
2
|
-
import { CSSObject } from '@emotion/
|
|
2
|
+
import { CSSObject } from '@emotion/react';
|
|
3
3
|
export declare const commonSVGStyles: CSSObject;
|
|
4
4
|
export declare const sizeStyleMap: {
|
|
5
|
-
small: import("@emotion/
|
|
6
|
-
medium: import("@emotion/
|
|
7
|
-
large: import("@emotion/
|
|
8
|
-
xlarge: import("@emotion/
|
|
5
|
+
small: import("@emotion/react").SerializedStyles;
|
|
6
|
+
medium: import("@emotion/react").SerializedStyles;
|
|
7
|
+
large: import("@emotion/react").SerializedStyles;
|
|
8
|
+
xlarge: import("@emotion/react").SerializedStyles;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Returns the width of the icon's parent span. This function has
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/icon",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.11.0",
|
|
4
4
|
"description": "An icon is a visual representation of a command, device, directory, or common action.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/theme": "^12.2.0",
|
|
47
47
|
"@atlaskit/tokens": "^0.10.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
|
-
"@emotion/
|
|
49
|
+
"@emotion/react": "^11.7.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^16.8.0"
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"@atlaskit/dynamic-table": "^14.8.0",
|
|
60
60
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
61
61
|
"@atlaskit/icon-object": "^6.2.0",
|
|
62
|
-
"@atlaskit/logo": "^13.
|
|
63
|
-
"@atlaskit/modal-dialog": "^12.
|
|
64
|
-
"@atlaskit/section-message": "^6.
|
|
62
|
+
"@atlaskit/logo": "^13.10.0",
|
|
63
|
+
"@atlaskit/modal-dialog": "^12.4.0",
|
|
64
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
65
65
|
"@atlaskit/ssr": "*",
|
|
66
|
-
"@atlaskit/textfield": "^5.
|
|
67
|
-
"@atlaskit/tooltip": "^17.
|
|
66
|
+
"@atlaskit/textfield": "^5.3.0",
|
|
67
|
+
"@atlaskit/tooltip": "^17.6.0",
|
|
68
68
|
"@atlaskit/visual-regression": "*",
|
|
69
69
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
70
70
|
"@babel/core": "^7.12.3",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/icon"
|
|
1
|
+
## API Report File for "@atlaskit/icon".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
/// <reference types="react" />
|