@atlaskit/icon 21.10.2 → 21.10.5
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 +18 -0
- package/README.md +4 -3
- package/dist/cjs/extract-react-types/custom-glyph.js +10 -0
- package/dist/cjs/extract-react-types/svg.js +10 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/extract-react-types/custom-glyph.js +3 -0
- package/dist/es2019/extract-react-types/svg.js +3 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/extract-react-types/custom-glyph.js +3 -0
- package/dist/esm/extract-react-types/svg.js +3 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/styles.d.ts +4 -4
- package/dist/types/extract-react-types/custom-glyph.d.ts +2 -0
- package/dist/types/extract-react-types/svg.d.ts +2 -0
- package/dist/types/types.d.ts +1 -1
- package/docs/0-intro.tsx +9 -18
- package/package.json +6 -5
- package/constellation/index/examples.mdx +0 -7
- package/docs/1-custom-icons.tsx +0 -33
- package/docs/2-custom-svgs.tsx +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 21.10.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 21.10.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 21.10.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`58884c2f6c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58884c2f6c1) - Internal code change turning on a new linting rule.
|
|
20
|
+
|
|
3
21
|
## 21.10.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An icon is a visual representation of a command, device, directory, or common action.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,5 +10,6 @@ yarn add @atlaskit/icon
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Icons should be used intentionally to maximize comprehension and reduce cognitive load. Use it to call attention to a particular action, command, or section. If you’re questioning an icon’s use, it probably doesn’t need to be used.
|
|
14
|
+
|
|
15
|
+
To search through all the icons we have in our system, have a look at our [icon explorer](https://atlassian.design/components/icon/icon-explorer).
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -2,10 +2,10 @@ import type { Size } from '../types';
|
|
|
2
2
|
import { CSSObject } from '@emotion/core';
|
|
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/utils").SerializedStyles;
|
|
6
|
+
medium: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
large: import("@emotion/utils").SerializedStyles;
|
|
8
|
+
xlarge: import("@emotion/utils").SerializedStyles;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Returns the width of the icon's parent span. This function has
|
package/dist/types/types.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface OtherGlyphProps {
|
|
|
38
38
|
/**
|
|
39
39
|
* Text used to describe what the icon is in context.
|
|
40
40
|
* A label is needed when there is no pairing visible text next to the icon.
|
|
41
|
-
* An empty string marks the icon as presentation only
|
|
41
|
+
* An empty string marks the icon as presentation only.
|
|
42
42
|
*/
|
|
43
43
|
label: string;
|
|
44
44
|
/**
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { md, Props } from '@atlaskit/docs';
|
|
3
|
-
import IconExplorer from '../examples/01-icon-explorer';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
${(
|
|
9
|
-
<p>
|
|
10
|
-
<IconExplorer />
|
|
11
|
-
</p>
|
|
12
|
-
)}
|
|
3
|
+
import { md } from '@atlaskit/docs';
|
|
4
|
+
import SectionMessage from '@atlaskit/section-message';
|
|
13
5
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)}
|
|
6
|
+
export default md`
|
|
7
|
+
${(
|
|
8
|
+
<SectionMessage appearance="information">
|
|
9
|
+
This component is now documented on{' '}
|
|
10
|
+
<a href="https://atlassian.design/components/icon">atlassian.design</a>
|
|
11
|
+
</SectionMessage>
|
|
12
|
+
)}
|
|
22
13
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/icon",
|
|
3
|
-
"version": "21.10.
|
|
4
|
-
"description": "An icon is
|
|
3
|
+
"version": "21.10.5",
|
|
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/"
|
|
7
7
|
},
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"atlaskit:src": "src/index.tsx",
|
|
17
|
+
"homepage": "https://atlassian.design/components/icon/",
|
|
17
18
|
"atlassian": {
|
|
18
19
|
"team": "Design System Team",
|
|
19
20
|
"releaseModel": "scheduled",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@atlaskit/theme": "^12.1.0",
|
|
38
|
-
"@atlaskit/tokens": "^0.
|
|
39
|
+
"@atlaskit/tokens": "^0.8.0",
|
|
39
40
|
"@babel/runtime": "^7.0.0",
|
|
40
41
|
"@emotion/core": "^10.0.9"
|
|
41
42
|
},
|
|
@@ -44,12 +45,12 @@
|
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@af/icon-build-process": "^0.3.0",
|
|
47
|
-
"@atlaskit/button": "^16.
|
|
48
|
+
"@atlaskit/button": "^16.2.0",
|
|
48
49
|
"@atlaskit/docs": "*",
|
|
49
50
|
"@atlaskit/dynamic-table": "^14.5.0",
|
|
50
51
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
51
52
|
"@atlaskit/icon-object": "^6.2.0",
|
|
52
|
-
"@atlaskit/icon-priority": "^6.
|
|
53
|
+
"@atlaskit/icon-priority": "^6.3.0",
|
|
53
54
|
"@atlaskit/logo": "^13.5.0",
|
|
54
55
|
"@atlaskit/modal-dialog": "^12.2.0",
|
|
55
56
|
"@atlaskit/section-message": "^6.1.0",
|
package/docs/1-custom-icons.tsx
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { md, code, Props, Example } from '@atlaskit/docs';
|
|
3
|
-
|
|
4
|
-
export default md`
|
|
5
|
-
Use the \`Icon\` component when needing an icon outside of our icon set _([do you, though?](https://hello.atlassian.net/wiki/spaces/DST/pages/782337741/Contribution+4.0+Contribution+documentation))_.
|
|
6
|
-
|
|
7
|
-
${code`
|
|
8
|
-
import Icon from '@atlaskit/icon/base';
|
|
9
|
-
`}
|
|
10
|
-
|
|
11
|
-
${(
|
|
12
|
-
<Example
|
|
13
|
-
packageName="@atlaskit/icon"
|
|
14
|
-
Component={require('../examples/custom-icon').default}
|
|
15
|
-
title=""
|
|
16
|
-
source={require('!!raw-loader!../examples/custom-icon')}
|
|
17
|
-
/>
|
|
18
|
-
)}
|
|
19
|
-
|
|
20
|
-
## Constraints
|
|
21
|
-
|
|
22
|
-
Your custom icon needs to adhere to the following constraints.
|
|
23
|
-
|
|
24
|
-
- The root svg should be on a \`0 0 24 24\` view box
|
|
25
|
-
- The first child element should set \`fill\` to \`currentColor\` to inherit the \`primaryColor\` prop
|
|
26
|
-
- For icons with secondary colors set \`fill\` to \`inherit\` on the appropriate elements to inherit the \`secondaryColor\` prop
|
|
27
|
-
|
|
28
|
-
${(
|
|
29
|
-
<Props
|
|
30
|
-
props={require('!!extract-react-types-loader!../src/components/icon')}
|
|
31
|
-
/>
|
|
32
|
-
)}
|
|
33
|
-
`;
|
package/docs/2-custom-svgs.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { md, Example, Props, code } from '@atlaskit/docs';
|
|
3
|
-
|
|
4
|
-
export default md`
|
|
5
|
-
Use the \`SVG\` component when the wrapping positional span used in \`Icon\` is not required and needing an icon outside of our icon set _([do you, though?](https://hello.atlassian.net/wiki/spaces/DST/pages/782337741/Contribution+4.0+Contribution+documentation))_.
|
|
6
|
-
|
|
7
|
-
${code`
|
|
8
|
-
import SVG from '@atlaskit/icon/svg';
|
|
9
|
-
`}
|
|
10
|
-
|
|
11
|
-
${(
|
|
12
|
-
<Example
|
|
13
|
-
packageName="@atlaskit/icon"
|
|
14
|
-
Component={require('../examples/14-svg').default}
|
|
15
|
-
title=""
|
|
16
|
-
source={require('!!raw-loader!../examples/14-svg')}
|
|
17
|
-
/>
|
|
18
|
-
)}
|
|
19
|
-
|
|
20
|
-
## Constraints
|
|
21
|
-
|
|
22
|
-
- \`SVG\` has a 24px by 24px view box which children should adhere to
|
|
23
|
-
- The first child element should set \`fill\` to \`currentColor\` to inherit the \`primaryColor\` prop
|
|
24
|
-
- For icons with secondary colors set \`fill\` to \`inherit\` on the appropriate elements to inherit the \`secondaryColor\` prop
|
|
25
|
-
|
|
26
|
-
${(
|
|
27
|
-
<Props
|
|
28
|
-
props={require('!!extract-react-types-loader!../src/components/svg')}
|
|
29
|
-
/>
|
|
30
|
-
)}
|
|
31
|
-
`;
|