@atlaskit/icon-lab 4.12.1 → 4.13.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/icon-lab
2
2
 
3
+ ## 4.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#149822](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149822)
8
+ [`f9ab0e846ae21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f9ab0e846ae21) -
9
+ Updated to support `size` prop for new icons from `@atlaskit/icon`.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 4.12.1
4
16
 
5
17
  ### Patch Changes
package/build/index.tsx CHANGED
@@ -4,7 +4,7 @@ import fs from 'fs-extra';
4
4
  import pkgDir from 'pkg-dir';
5
5
 
6
6
  import {
7
- buildNew as buildIcons,
7
+ buildNew as buildIconsNew,
8
8
  createDeprecatedIconDocs,
9
9
  createIconDocsNew,
10
10
  createVRTest,
@@ -12,62 +12,129 @@ import {
12
12
  } from '@af/icon-build-process';
13
13
 
14
14
  import coreIconMetadata from '../icons_raw/metadata-core';
15
+ import utilityIconMetadata from '../icons_raw/metadata-utility';
15
16
  import migrationMap from '../src/migration-map';
16
17
 
17
- const root = pkgDir.sync();
18
+ async function main() {
19
+ const root = pkgDir.sync();
18
20
 
19
- if (!root) {
20
- throw new Error('Root directory was not found');
21
+ if (!root) {
22
+ throw new Error('Root directory was not found');
23
+ }
24
+
25
+ /**
26
+ * The updated icon build process for the new icons under `@atlaskit/icon/core/*`
27
+ */
28
+ const configCore: NewIconBuildConfig = {
29
+ srcDir: path.resolve(root, 'icons_raw/core'),
30
+ processedDir: path.resolve(root, 'svgs/core'),
31
+ destDir: path.resolve(root, 'core'),
32
+ maxWidth: 24,
33
+ maxHeight: 24,
34
+ glob: '**/*.svg',
35
+ iconType: 'core',
36
+ packageName: '@atlaskit/icon-lab',
37
+ baseIconEntryPoint: '@atlaskit/icon/base-new',
38
+ metadata: coreIconMetadata,
39
+ migrationMap: migrationMap,
40
+ };
41
+
42
+ await buildIconsNew(configCore).then((icons) => {
43
+ const iconDocs = createIconDocsNew(
44
+ icons,
45
+ '@atlaskit/icon-lab',
46
+ 'core',
47
+ {},
48
+ ['icon', 'icon-lab', 'core'],
49
+ coreIconMetadata,
50
+ migrationMap,
51
+ );
52
+
53
+ fs.outputFile(path.resolve(root, 'src/metadata-core.tsx'), iconDocs);
54
+
55
+ const deprecatedDocs = createDeprecatedIconDocs(
56
+ icons,
57
+ '@atlaskit/icon-lab',
58
+ 'core',
59
+ coreIconMetadata,
60
+ migrationMap,
61
+ );
62
+
63
+ fs.outputFile(path.resolve(root, 'src/deprecated-core.tsx'), deprecatedDocs);
64
+
65
+ // Generate VR tests
66
+ const [vrExampleCore, vrTestCore] = createVRTest(coreIconMetadata, '../../../..', 20, 'core');
67
+ fs.outputFile(
68
+ path.resolve(root, 'src/__tests__/vr-tests/examples/all-core-icons.tsx'),
69
+ vrExampleCore,
70
+ );
71
+ fs.outputFile(
72
+ path.resolve(root, 'src/__tests__/vr-tests/all-core-icons.test.vr.tsx'),
73
+ vrTestCore,
74
+ );
75
+ });
76
+
77
+ /**
78
+ * The updated icon build process for the new icons under `@atlaskit/icon/core/*`
79
+ */
80
+ const configUtility: NewIconBuildConfig = {
81
+ srcDir: path.resolve(root, 'icons_raw/utility'),
82
+ processedDir: path.resolve(root, 'svgs/utility'),
83
+ destDir: path.resolve(root, 'utility'),
84
+ maxWidth: 24,
85
+ maxHeight: 24,
86
+ glob: '**/*.svg',
87
+ iconType: 'utility',
88
+ packageName: '@atlaskit/icon-lab',
89
+ baseIconEntryPoint: '@atlaskit/icon/base-new',
90
+ metadata: utilityIconMetadata,
91
+ migrationMap: migrationMap,
92
+ };
93
+
94
+ await buildIconsNew(configUtility).then((icons) => {
95
+ const iconDocs = createIconDocsNew(
96
+ icons,
97
+ '@atlaskit/icon-lab',
98
+ 'utility',
99
+ {},
100
+ ['icon', 'icon-lab', 'utility'],
101
+ utilityIconMetadata,
102
+ migrationMap,
103
+ );
104
+
105
+ fs.outputFile(path.resolve(root, 'src/metadata-utility.tsx'), iconDocs);
106
+
107
+ const deprecatedDocs = createDeprecatedIconDocs(
108
+ icons,
109
+ '@atlaskit/icon-lab',
110
+ 'utility',
111
+ utilityIconMetadata,
112
+ migrationMap,
113
+ );
114
+
115
+ fs.outputFile(path.resolve(root, 'src/deprecated-utility.tsx'), deprecatedDocs);
116
+
117
+ // Generate VR tests
118
+ if (Object.entries(utilityIconMetadata).length > 0) {
119
+ const [vrExampleUtility, vrTestUtility] = createVRTest(
120
+ utilityIconMetadata,
121
+ '../../../..',
122
+ 20,
123
+ 'utility',
124
+ );
125
+ fs.outputFile(
126
+ path.resolve(root, 'src/__tests__/vr-tests/examples/all-utility-icons.tsx'),
127
+ vrExampleUtility,
128
+ );
129
+ fs.outputFile(
130
+ path.resolve(root, 'src/__tests__/vr-tests/all-utility-icons.test.vr.tsx'),
131
+ vrTestUtility,
132
+ );
133
+ }
134
+ });
21
135
  }
22
136
 
23
- /**
24
- * The updated icon build process for the new icons under `@atlaskit/icon/core/*`
25
- */
26
- const config: NewIconBuildConfig = {
27
- srcDir: path.resolve(root, 'icons_raw/core'),
28
- processedDir: path.resolve(root, 'svgs/core'),
29
- destDir: path.resolve(root, 'core'),
30
- maxWidth: 24,
31
- maxHeight: 24,
32
- glob: '**/*.svg',
33
- iconType: 'core',
34
- packageName: '@atlaskit/icon-lab',
35
- baseIconEntryPoint: '@atlaskit/icon/base-new',
36
- metadata: coreIconMetadata,
37
- migrationMap: migrationMap,
38
- };
39
-
40
- buildIcons(config).then((icons) => {
41
- const iconDocs = createIconDocsNew(
42
- icons,
43
- '@atlaskit/icon-lab',
44
- 'core',
45
- {},
46
- ['icon', 'icon-lab', 'core'],
47
- coreIconMetadata,
48
- migrationMap,
49
- );
50
-
51
- fs.outputFile(path.resolve(root, 'src/metadata-core.tsx'), iconDocs);
52
-
53
- const deprecatedDocs = createDeprecatedIconDocs(
54
- icons,
55
- '@atlaskit/icon-lab',
56
- 'core',
57
- coreIconMetadata,
58
- migrationMap,
59
- );
60
-
61
- fs.outputFile(path.resolve(root, 'src/deprecated-core.tsx'), deprecatedDocs);
62
-
63
- // Generate VR tests
64
- const [vrExampleCore, vrTestCore] = createVRTest(coreIconMetadata, '../../../..', 20, 'core');
65
- fs.outputFile(
66
- path.resolve(root, 'src/__tests__/vr-tests/examples/all-core-icons.tsx'),
67
- vrExampleCore,
68
- );
69
- fs.outputFile(
70
- path.resolve(root, 'src/__tests__/vr-tests/all-core-icons.test.vr.tsx'),
71
- vrTestCore,
72
- );
137
+ main().catch((error) => {
138
+ console.error(error);
139
+ process.exit(1);
73
140
  });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /**
8
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
+ *
10
+ * To change the format of this file, modify `createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
11
+ *
12
+ * @codegen <<SignedSource::8445ed95dffea52ddea417fc5752ff90>>
13
+ * @codegenCommand yarn build:icon-glyphs
14
+ */
15
+ var deprecatedIcons = {};
16
+ var _default = exports.default = deprecatedIcons;
@@ -10,4 +10,11 @@ Object.defineProperty(exports, "deprecatedCore", {
10
10
  return _deprecatedCore.default;
11
11
  }
12
12
  });
13
- var _deprecatedCore = _interopRequireDefault(require("../deprecated-core"));
13
+ Object.defineProperty(exports, "deprecatedUtility", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _deprecatedUtility.default;
17
+ }
18
+ });
19
+ var _deprecatedCore = _interopRequireDefault(require("../deprecated-core"));
20
+ var _deprecatedUtility = _interopRequireDefault(require("../deprecated-utility"));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /**
8
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
+ *
10
+ * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
11
+ *
12
+ * @codegen <<SignedSource::541c2012ded80fd7b8bb50e7c15e9333>>
13
+ * @codegenCommand yarn build:icon-glyphs
14
+ */
15
+
16
+ var metadata = {};
17
+ var _default = exports.default = metadata;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::8445ed95dffea52ddea417fc5752ff90>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ const deprecatedIcons = {};
10
+ export default deprecatedIcons;
@@ -1 +1,2 @@
1
- export { default as deprecatedCore } from '../deprecated-core';
1
+ export { default as deprecatedCore } from '../deprecated-core';
2
+ export { default as deprecatedUtility } from '../deprecated-utility';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::541c2012ded80fd7b8bb50e7c15e9333>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+
10
+ const metadata = {};
11
+ export default metadata;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::8445ed95dffea52ddea417fc5752ff90>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ var deprecatedIcons = {};
10
+ export default deprecatedIcons;
@@ -1 +1,2 @@
1
- export { default as deprecatedCore } from '../deprecated-core';
1
+ export { default as deprecatedCore } from '../deprecated-core';
2
+ export { default as deprecatedUtility } from '../deprecated-utility';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::541c2012ded80fd7b8bb50e7c15e9333>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+
10
+ var metadata = {};
11
+ export default metadata;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::8445ed95dffea52ddea417fc5752ff90>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ declare const deprecatedIcons: Record<string, {
10
+ message: string;
11
+ unfixable?: boolean;
12
+ }>;
13
+ export default deprecatedIcons;
@@ -1 +1,2 @@
1
1
  export { default as deprecatedCore } from '../deprecated-core';
2
+ export { default as deprecatedUtility } from '../deprecated-utility';
@@ -0,0 +1,63 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::541c2012ded80fd7b8bb50e7c15e9333>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ interface metadata {
10
+ /**
11
+ * Default component name for the icon
12
+ */
13
+ componentName: string;
14
+ /**
15
+ * Package path to the icon component
16
+ */
17
+ package: string;
18
+ /**
19
+ * The category of the icon:
20
+ * - 'single-purpose' icons should only be used for the purposes listed in the 'usage' field
21
+ * - 'multi-purpose' icons are designed for various use cases and don't have the same usage restrictions
22
+ * - 'utility' icons are used for utility purposes
23
+ */
24
+ categorization: 'single-purpose' | 'multi-purpose' | 'utility';
25
+ /**
26
+ * The type of the icon - either a 16px 'core' icon, or a 12px 'utility' icon
27
+ */
28
+ type: 'core' | 'utility';
29
+ /**
30
+ * Usage guidelines for the icon. For single-purpose icons,
31
+ */
32
+ usage?: string;
33
+ /**
34
+ * Additional keywords used to assist in search/lookup of an icon
35
+ */
36
+ keywords: string[];
37
+ /**
38
+ * The name of the team owning the icon
39
+ */
40
+ team: string;
41
+ /**
42
+ * The status of the icon
43
+ */
44
+ status?: 'draft' | 'ready-to-publish' | 'published' | 'modified' | 'deprecated';
45
+ /**
46
+ * Contact slack channel for the team owning the icon
47
+ */
48
+ slackChannel?: string;
49
+ /**
50
+ * A list of keys for old icons that have been replaced by this icon
51
+ */
52
+ oldName?: string[];
53
+ /**
54
+ * A replacement icon if this icon has been deprecated
55
+ */
56
+ replacement?: {
57
+ name: string;
58
+ type: 'core' | 'utility';
59
+ location: '@atlaskit/icon' | '@atlaskit/icon-lab' | '@atlassian/icon-private';
60
+ };
61
+ }
62
+ declare const metadata: Record<string, metadata>;
63
+ export default metadata;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createDeprecatedIconDocs` in icon-build-process/src/create-deprecated-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::8445ed95dffea52ddea417fc5752ff90>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ declare const deprecatedIcons: Record<string, {
10
+ message: string;
11
+ unfixable?: boolean;
12
+ }>;
13
+ export default deprecatedIcons;
@@ -1 +1,2 @@
1
1
  export { default as deprecatedCore } from '../deprecated-core';
2
+ export { default as deprecatedUtility } from '../deprecated-utility';
@@ -0,0 +1,63 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
+ *
6
+ * @codegen <<SignedSource::541c2012ded80fd7b8bb50e7c15e9333>>
7
+ * @codegenCommand yarn build:icon-glyphs
8
+ */
9
+ interface metadata {
10
+ /**
11
+ * Default component name for the icon
12
+ */
13
+ componentName: string;
14
+ /**
15
+ * Package path to the icon component
16
+ */
17
+ package: string;
18
+ /**
19
+ * The category of the icon:
20
+ * - 'single-purpose' icons should only be used for the purposes listed in the 'usage' field
21
+ * - 'multi-purpose' icons are designed for various use cases and don't have the same usage restrictions
22
+ * - 'utility' icons are used for utility purposes
23
+ */
24
+ categorization: 'single-purpose' | 'multi-purpose' | 'utility';
25
+ /**
26
+ * The type of the icon - either a 16px 'core' icon, or a 12px 'utility' icon
27
+ */
28
+ type: 'core' | 'utility';
29
+ /**
30
+ * Usage guidelines for the icon. For single-purpose icons,
31
+ */
32
+ usage?: string;
33
+ /**
34
+ * Additional keywords used to assist in search/lookup of an icon
35
+ */
36
+ keywords: string[];
37
+ /**
38
+ * The name of the team owning the icon
39
+ */
40
+ team: string;
41
+ /**
42
+ * The status of the icon
43
+ */
44
+ status?: 'draft' | 'ready-to-publish' | 'published' | 'modified' | 'deprecated';
45
+ /**
46
+ * Contact slack channel for the team owning the icon
47
+ */
48
+ slackChannel?: string;
49
+ /**
50
+ * A list of keys for old icons that have been replaced by this icon
51
+ */
52
+ oldName?: string[];
53
+ /**
54
+ * A replacement icon if this icon has been deprecated
55
+ */
56
+ replacement?: {
57
+ name: string;
58
+ type: 'core' | 'utility';
59
+ location: '@atlaskit/icon' | '@atlaskit/icon-lab' | '@atlassian/icon-private';
60
+ };
61
+ }
62
+ declare const metadata: Record<string, metadata>;
63
+ export default metadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon-lab",
3
- "version": "4.12.1",
3
+ "version": "4.13.0",
4
4
  "description": "An icon package for public icon contributions",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "build-glyphs": "ts-node --project ../../../tsconfig.node.json ./build/index.tsx"
33
33
  },
34
34
  "dependencies": {
35
- "@atlaskit/icon": "^26.0.0",
35
+ "@atlaskit/icon": "^26.1.0",
36
36
  "@babel/runtime": "^7.0.0"
37
37
  },
38
38
  "peerDependencies": {
@@ -41,14 +41,14 @@
41
41
  "devDependencies": {
42
42
  "@af/icon-build-process": "workspace:^",
43
43
  "@af/visual-regression": "workspace:^",
44
- "@atlaskit/button": "^23.0.0",
45
- "@atlaskit/code": "^17.1.0",
44
+ "@atlaskit/button": "^23.1.0",
45
+ "@atlaskit/code": "^17.2.0",
46
46
  "@atlaskit/ds-lib": "^4.0.0",
47
47
  "@atlaskit/heading": "^5.2.0",
48
- "@atlaskit/modal-dialog": "^14.1.0",
48
+ "@atlaskit/modal-dialog": "^14.2.0",
49
49
  "@atlaskit/primitives": "^14.7.0",
50
50
  "@atlaskit/textfield": "^8.0.0",
51
- "@atlaskit/tokens": "^4.8.0",
51
+ "@atlaskit/tokens": "^4.9.0",
52
52
  "@atlaskit/tooltip": "^20.0.0",
53
53
  "@atlassian/ssr-tests": "^0.2.0",
54
54
  "@compiled/react": "^0.18.3",