@atlaskit/icon 21.10.8 → 21.11.1
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 +13 -0
- package/dist/cjs/components/icon.js +9 -9
- package/dist/cjs/components/skeleton.js +7 -7
- package/dist/cjs/components/styles.js +5 -5
- package/dist/cjs/components/svg.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/icon.js +2 -2
- package/dist/es2019/components/skeleton.js +1 -1
- package/dist/es2019/components/styles.js +1 -1
- package/dist/es2019/components/svg.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/icon.js +2 -2
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/styles.js +1 -1
- package/dist/esm/components/svg.js +2 -2
- 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 +11 -9
- package/report.api.md +43 -87
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 21.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`88a34a8c2dd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/88a34a8c2dd) - Remove redundant `role=presentation` on wrapping @atlaskit/icon and @atlaskit/logo spans.
|
|
8
|
+
- [`15d704e3090`](https://bitbucket.org/atlassian/atlassian-frontend/commits/15d704e3090) - For an SVG icon, do not render a `aria-label` when empty.
|
|
9
|
+
|
|
10
|
+
## 21.11.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`a3973745679`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a3973745679) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
|
|
15
|
+
|
|
3
16
|
## 21.10.8
|
|
4
17
|
|
|
5
18
|
### 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,9 +114,9 @@ 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
|
-
role: label ? 'img' :
|
|
119
|
+
role: label ? 'img' : undefined,
|
|
120
120
|
"aria-label": label ? label : undefined,
|
|
121
121
|
"aria-hidden": label ? undefined : true,
|
|
122
122
|
style: {
|
|
@@ -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,
|
|
@@ -48,7 +48,7 @@ var SVG = /*#__PURE__*/(0, _react.memo)(function SVG(_ref) {
|
|
|
48
48
|
},
|
|
49
49
|
css: [svgStyles, _styles.sizeStyleMap[size]],
|
|
50
50
|
"data-testid": testId,
|
|
51
|
-
"aria-label": label,
|
|
51
|
+
"aria-label": label || undefined,
|
|
52
52
|
role: label ? 'img' : 'presentation'
|
|
53
53
|
}, children);
|
|
54
54
|
});
|
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';
|
|
@@ -101,7 +101,7 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
101
101
|
} = useGlobalTheme();
|
|
102
102
|
return jsx("span", _extends({
|
|
103
103
|
"data-testid": testId,
|
|
104
|
-
role: label ? 'img' :
|
|
104
|
+
role: label ? 'img' : undefined,
|
|
105
105
|
"aria-label": label ? label : undefined,
|
|
106
106
|
"aria-hidden": label ? undefined : true,
|
|
107
107
|
style: {
|
|
@@ -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
|
|
@@ -34,7 +34,7 @@ const SVG = /*#__PURE__*/memo(function SVG({
|
|
|
34
34
|
},
|
|
35
35
|
css: [svgStyles, sizeStyleMap[size]],
|
|
36
36
|
"data-testid": testId,
|
|
37
|
-
"aria-label": label,
|
|
37
|
+
"aria-label": label || undefined,
|
|
38
38
|
role: label ? 'img' : 'presentation'
|
|
39
39
|
}, children);
|
|
40
40
|
});
|
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';
|
|
@@ -107,7 +107,7 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
107
107
|
|
|
108
108
|
return jsx("span", _extends({
|
|
109
109
|
"data-testid": testId,
|
|
110
|
-
role: label ? 'img' :
|
|
110
|
+
role: label ? 'img' : undefined,
|
|
111
111
|
"aria-label": label ? label : undefined,
|
|
112
112
|
"aria-hidden": label ? undefined : true,
|
|
113
113
|
style: {
|
|
@@ -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
|
|
@@ -36,7 +36,7 @@ var SVG = /*#__PURE__*/memo(function SVG(_ref) {
|
|
|
36
36
|
},
|
|
37
37
|
css: [svgStyles, sizeStyleMap[size]],
|
|
38
38
|
"data-testid": testId,
|
|
39
|
-
"aria-label": label,
|
|
39
|
+
"aria-label": label || undefined,
|
|
40
40
|
role: label ? 'img' : 'presentation'
|
|
41
41
|
}, children);
|
|
42
42
|
});
|
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.1",
|
|
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/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"atlaskit:src": "src/index.tsx",
|
|
24
25
|
"homepage": "https://atlassian.design/components/icon/",
|
|
25
26
|
"atlassian": {
|
|
27
|
+
"disableProductCI": true,
|
|
26
28
|
"team": "Design System Team",
|
|
27
29
|
"releaseModel": "scheduled",
|
|
28
30
|
"website": {
|
|
@@ -46,25 +48,25 @@
|
|
|
46
48
|
"@atlaskit/theme": "^12.2.0",
|
|
47
49
|
"@atlaskit/tokens": "^0.10.0",
|
|
48
50
|
"@babel/runtime": "^7.0.0",
|
|
49
|
-
"@emotion/
|
|
51
|
+
"@emotion/react": "^11.7.1"
|
|
50
52
|
},
|
|
51
53
|
"peerDependencies": {
|
|
52
54
|
"react": "^16.8.0"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
57
|
"@af/icon-build-process": "^0.3.0",
|
|
56
|
-
"@atlaskit/button": "^16.
|
|
58
|
+
"@atlaskit/button": "^16.4.0",
|
|
57
59
|
"@atlaskit/docs": "*",
|
|
58
60
|
"@atlaskit/ds-lib": "^2.1.1",
|
|
59
61
|
"@atlaskit/dynamic-table": "^14.8.0",
|
|
60
62
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
61
63
|
"@atlaskit/icon-object": "^6.2.0",
|
|
62
|
-
"@atlaskit/logo": "^13.
|
|
63
|
-
"@atlaskit/modal-dialog": "^12.
|
|
64
|
-
"@atlaskit/section-message": "^6.
|
|
64
|
+
"@atlaskit/logo": "^13.10.0",
|
|
65
|
+
"@atlaskit/modal-dialog": "^12.4.0",
|
|
66
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
65
67
|
"@atlaskit/ssr": "*",
|
|
66
|
-
"@atlaskit/textfield": "^5.
|
|
67
|
-
"@atlaskit/tooltip": "^17.
|
|
68
|
+
"@atlaskit/textfield": "^5.3.0",
|
|
69
|
+
"@atlaskit/tooltip": "^17.6.0",
|
|
68
70
|
"@atlaskit/visual-regression": "*",
|
|
69
71
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
70
72
|
"@babel/core": "^7.12.3",
|
package/report.api.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
4
|
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
10
|
+
|
|
5
11
|
```ts
|
|
6
12
|
/// <reference types="react" />
|
|
7
13
|
|
|
@@ -10,127 +16,77 @@ import { NamedExoticComponent } from 'react';
|
|
|
10
16
|
import type { ReactNode } from 'react';
|
|
11
17
|
import type { SVGProps as SVGProps_2 } from 'react';
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* provided to a custom glyph
|
|
16
|
-
*/
|
|
17
|
-
'data-testid'?: string;
|
|
18
|
-
/**
|
|
19
|
-
* provided to a custom glyph
|
|
20
|
-
*/
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export interface CustomGlyphProps extends SVGProps_2<SVGSVGElement> {
|
|
21
21
|
'aria-label'?: string;
|
|
22
|
-
|
|
23
|
-
* provided classname for custom glyph to match ADG styles
|
|
24
|
-
*/
|
|
22
|
+
'data-testid'?: string;
|
|
25
23
|
className?: string;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
* Primary color for the icon.
|
|
31
|
-
* Inherits the current font color by default.
|
|
32
|
-
*/
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
interface GlyphColorProps {
|
|
33
28
|
primaryColor?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Secondary color for the icon.
|
|
36
|
-
* Defaults to the page background for an icon that supports two colors.
|
|
37
|
-
*/
|
|
38
29
|
secondaryColor?: string;
|
|
39
30
|
}
|
|
40
31
|
|
|
41
|
-
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export interface GlyphProps
|
|
42
34
|
extends OtherGlyphProps,
|
|
43
35
|
GlyphSizeProps,
|
|
44
36
|
GlyphColorProps {}
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* There are three icon sizes – small (16px), medium (24px), and large (32px).
|
|
49
|
-
* This pixel size refers to the canvas the icon sits on,
|
|
50
|
-
* not the size of the icon shape itself.
|
|
51
|
-
*/
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
interface GlyphSizeProps {
|
|
52
40
|
size?: Size;
|
|
53
41
|
}
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
* An icon is used as a visual representation of common actions and commands to provide context.
|
|
59
|
-
*
|
|
60
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon)
|
|
61
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/icon/docs/custom-icons)
|
|
62
|
-
*/
|
|
63
|
-
declare const Icon: NamedExoticComponent<IconProps>;
|
|
43
|
+
// @public
|
|
44
|
+
const Icon: NamedExoticComponent<IconProps>;
|
|
64
45
|
export default Icon;
|
|
65
46
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* `width`, and `height` props.
|
|
70
|
-
*/
|
|
71
|
-
glyph?: ComponentType<CustomGlyphProps>;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated
|
|
74
|
-
* Custom icon string that should contain an SVG element with set `viewBox`,
|
|
75
|
-
* `width`, and `height` attributes.
|
|
76
|
-
* It's recommended to use the `glyph` prop instead.
|
|
77
|
-
*/
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export interface IconProps extends GlyphProps {
|
|
49
|
+
// @deprecated (undocumented)
|
|
78
50
|
dangerouslySetGlyph?: string;
|
|
51
|
+
glyph?: ComponentType<CustomGlyphProps>;
|
|
79
52
|
}
|
|
80
53
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* Text used to describe what the icon is in context.
|
|
84
|
-
* A label is needed when there is no pairing visible text next to the icon.
|
|
85
|
-
* An empty string marks the icon as presentation only.
|
|
86
|
-
*/
|
|
54
|
+
// @public (undocumented)
|
|
55
|
+
interface OtherGlyphProps {
|
|
87
56
|
label: string;
|
|
88
|
-
/**
|
|
89
|
-
* A `testId` prop is provided for specified elements,
|
|
90
|
-
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
91
|
-
* serving as a hook for automated tests.
|
|
92
|
-
*/
|
|
93
57
|
testId?: string;
|
|
94
58
|
}
|
|
95
59
|
|
|
96
|
-
|
|
60
|
+
// @public (undocumented)
|
|
61
|
+
export type Size = 'small' | 'medium' | 'large' | 'xlarge';
|
|
97
62
|
|
|
98
|
-
|
|
63
|
+
// @public (undocumented)
|
|
64
|
+
export const size: Record<Size, Size>;
|
|
99
65
|
|
|
100
|
-
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
export const sizes: Record<Size, string>;
|
|
101
68
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*/
|
|
105
|
-
export declare const Skeleton: NamedExoticComponent<SkeletonProps>;
|
|
69
|
+
// @public
|
|
70
|
+
export const Skeleton: NamedExoticComponent<SkeletonProps>;
|
|
106
71
|
|
|
107
|
-
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
export interface SkeletonProps {
|
|
74
|
+
// (undocumented)
|
|
108
75
|
color?: string;
|
|
76
|
+
// (undocumented)
|
|
109
77
|
size?: Size;
|
|
110
|
-
weight?: 'normal' | 'strong';
|
|
111
|
-
/**
|
|
112
|
-
* A unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
113
|
-
* serving as a hook for automated tests.
|
|
114
|
-
*/
|
|
115
78
|
testId?: string;
|
|
79
|
+
// (undocumented)
|
|
80
|
+
weight?: 'normal' | 'strong';
|
|
116
81
|
}
|
|
117
82
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon)
|
|
124
|
-
* - [Code](https://atlaskit.atlassian.com/packages/design-system/icon/docs/custom-svgs)
|
|
125
|
-
*/
|
|
126
|
-
export declare const SVG: NamedExoticComponent<SVGProps>;
|
|
127
|
-
|
|
128
|
-
export declare interface SVGProps extends GlyphProps {
|
|
129
|
-
/**
|
|
130
|
-
* The children of the SVG, should still honour the constraints of icons
|
|
131
|
-
*/
|
|
83
|
+
// @public
|
|
84
|
+
export const SVG: NamedExoticComponent<SVGProps>;
|
|
85
|
+
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
export interface SVGProps extends GlyphProps {
|
|
132
88
|
children?: ReactNode;
|
|
133
89
|
}
|
|
134
90
|
|
|
135
|
-
|
|
91
|
+
// (No @packageDocumentation comment for this package)
|
|
136
92
|
```
|