@atlaskit/icon 21.10.1 → 21.10.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/icon
2
2
 
3
+ ## 21.10.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 21.10.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`58884c2f6c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58884c2f6c1) - Internal code change turning on a new linting rule.
14
+
15
+ ## 21.10.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Updates usage of deprecated token names so they're aligned with the latest naming conventions. No UI or visual changes
20
+ - Updated dependencies
21
+
3
22
  ## 21.10.1
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Icon
2
2
 
3
- A React package that contains icons.
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
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/design-system/icon).
14
- For adding a new icon to the icon set please follow the [adding new icons](https://developer.atlassian.com/cloud/framework/atlassian-frontend/documentation/02-adding-new-icons/) documentation.
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).
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getBackground = void 0;
7
7
  var themedBackground = {
8
- light: "var(--ds-background-default, #FFFFFF)",
9
- dark: "var(--ds-background-default, #1B2638)"
8
+ light: "var(--ds-surface, #FFFFFF)",
9
+ dark: "var(--ds-surface, #1B2638)"
10
10
  };
11
11
  /**
12
12
  * Returns the background color depending on the passed through mode.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = CustomGlyphProps;
7
+
8
+ function CustomGlyphProps(props) {
9
+ return null;
10
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = SVGProps;
7
+
8
+ function SVGProps(props) {
9
+ return null;
10
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "21.10.1",
3
+ "version": "21.10.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  const themedBackground = {
2
- light: "var(--ds-background-default, #FFFFFF)",
3
- dark: "var(--ds-background-default, #1B2638)"
2
+ light: "var(--ds-surface, #FFFFFF)",
3
+ dark: "var(--ds-surface, #1B2638)"
4
4
  };
5
5
  /**
6
6
  * Returns the background color depending on the passed through mode.
@@ -0,0 +1,3 @@
1
+ export default function CustomGlyphProps(props) {
2
+ return null;
3
+ }
@@ -0,0 +1,3 @@
1
+ export default function SVGProps(props) {
2
+ return null;
3
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "21.10.1",
3
+ "version": "21.10.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  var themedBackground = {
2
- light: "var(--ds-background-default, #FFFFFF)",
3
- dark: "var(--ds-background-default, #1B2638)"
2
+ light: "var(--ds-surface, #FFFFFF)",
3
+ dark: "var(--ds-surface, #1B2638)"
4
4
  };
5
5
  /**
6
6
  * Returns the background color depending on the passed through mode.
@@ -0,0 +1,3 @@
1
+ export default function CustomGlyphProps(props) {
2
+ return null;
3
+ }
@@ -0,0 +1,3 @@
1
+ export default function SVGProps(props) {
2
+ return null;
3
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "21.10.1",
3
+ "version": "21.10.4",
4
4
  "sideEffects": false
5
5
  }
@@ -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/core").SerializedStyles;
6
- medium: import("@emotion/core").SerializedStyles;
7
- large: import("@emotion/core").SerializedStyles;
8
- xlarge: import("@emotion/core").SerializedStyles;
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
@@ -3,4 +3,4 @@ import type { ThemeModes } from '@atlaskit/theme/types';
3
3
  * Returns the background color depending on the passed through mode.
4
4
  * @param mode
5
5
  */
6
- export declare const getBackground: (mode?: ThemeModes) => "var(--ds-background-default)";
6
+ export declare const getBackground: (mode?: ThemeModes) => "var(--ds-surface)";
@@ -0,0 +1,2 @@
1
+ import type { CustomGlyphProps as Props } from '../types';
2
+ export default function CustomGlyphProps(props: Props): null;
@@ -0,0 +1,2 @@
1
+ import type { SVGProps as Props } from '../types';
2
+ export default function SVGProps(props: Props): null;
@@ -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
- export default md`
6
- ## Icon explorer
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
- ### Props
15
-
16
- ${(
17
- <Props
18
- heading=""
19
- props={require('!!extract-react-types-loader!../src/extract-react-types/glyph')}
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.1",
4
- "description": "An icon is used as a visual representation of common actions and commands to provide context.",
3
+ "version": "21.10.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/"
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.5.0",
39
+ "@atlaskit/tokens": "^0.7.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.1.0",
48
+ "@atlaskit/button": "^16.2.0",
48
49
  "@atlaskit/docs": "*",
49
- "@atlaskit/dynamic-table": "^14.4.0",
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.2.0",
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",
@@ -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
- `;
@@ -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
- `;