@atlaskit/icon 33.0.2 → 33.1.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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/icon
2
2
 
3
+ ## 33.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`af37f7d87df51`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/af37f7d87df51) -
8
+ Deprecate `spacing` prop on icon components via JSDoc `@deprecated` annotation, and update ADS
9
+ website docs (Icon > Examples, Icon > Usage) to reflect the deprecation with migration guidance.
10
+
11
+ ## 33.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`0daada0469ab8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0daada0469ab8) -
16
+ Remove `@atlaskit/icon/migration-map` entry point, `IconMigrationMap` and
17
+ `IconMigrationSizeGuidance` types from `@atlaskit/icon`, and `@atlaskit/icon-lab/migration-map`
18
+ entry point. These were only needed to support the legacy glyph icon migration path which has now
19
+ been fully completed. Remove the `no-legacy-icons` ESLint rule from
20
+ `@atlaskit/eslint-plugin-design-system` as `@atlaskit/icon/glyph` and
21
+ `@atlaskit/icon/core/migration` no longer exist.
22
+
3
23
  ## 33.0.2
4
24
 
5
25
  ### Patch Changes
package/build/index.tsx CHANGED
@@ -49,11 +49,7 @@ async function main() {
49
49
 
50
50
  fs.outputFile(path.resolve(root, 'src/metadata-core.tsx'), iconDocs);
51
51
 
52
- const deprecatedDocs = createDeprecatedIconDocs(
53
- icons,
54
- '@atlaskit/icon',
55
- coreIconMetadata,
56
- );
52
+ const deprecatedDocs = createDeprecatedIconDocs(icons, '@atlaskit/icon', coreIconMetadata);
57
53
 
58
54
  fs.outputFile(path.resolve(root, 'src/deprecated-core.tsx'), deprecatedDocs);
59
55
  });
@@ -12,8 +12,7 @@ var React = _react;
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
14
  /**
15
- * We are hiding this props from consumers as it's reserved
16
- * for use by Icon Tile.
15
+ * We are hiding this props from consumers as it's reserved for use by Icon Tile.
17
16
  */
18
17
 
19
18
  var svgStyles = null;
@@ -5,8 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { memo } from 'react';
6
6
 
7
7
  /**
8
- * We are hiding this props from consumers as it's reserved
9
- * for use by Icon Tile.
8
+ * We are hiding this props from consumers as it's reserved for use by Icon Tile.
10
9
  */
11
10
 
12
11
  const svgStyles = null;
@@ -5,8 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { memo } from 'react';
6
6
 
7
7
  /**
8
- * We are hiding this props from consumers as it's reserved
9
- * for use by Icon Tile.
8
+ * We are hiding this props from consumers as it's reserved for use by Icon Tile.
10
9
  */
11
10
 
12
11
  var svgStyles = null;
@@ -1,7 +1,6 @@
1
1
  import type { UNSAFE_NewGlyphProps } from '../types';
2
2
  /**
3
- * We are hiding this props from consumers as it's reserved
4
- * for use by Icon Tile.
3
+ * We are hiding this props from consumers as it's reserved for use by Icon Tile.
5
4
  */
6
5
  export type InternalIconPropsNew = UNSAFE_NewGlyphProps & {
7
6
  /**
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewCoreIconProps, IconMigrationMap, IconSpacing, IconSize, IconTileProps, } from '../types';
1
+ export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewCoreIconProps, IconSpacing, IconSize, IconTileProps, } from '../types';
@@ -4,4 +4,4 @@ export { default as SVG } from './components/svg';
4
4
  export { sizeMap as size, sizes } from './constants';
5
5
  export { default as Skeleton } from './components/skeleton';
6
6
  export { default as IconTile } from './components/icon-tile';
7
- export type { Size, IconSize, SkeletonProps, IconProps, GlyphProps, CustomGlyphProps, SVGProps, NewIconProps, NewCoreIconProps, IconMigrationMap, IconTileProps, } from './types';
7
+ export type { Size, IconSize, SkeletonProps, IconProps, GlyphProps, CustomGlyphProps, SVGProps, NewIconProps, NewCoreIconProps, IconTileProps, } from './types';
@@ -51,10 +51,7 @@ interface GlyphSizeProps {
51
51
  }
52
52
  interface NewCoreGlyphSpacingProps {
53
53
  /**
54
- * Core Icons can be displayed with additional spacing.
55
- * - `none` is default, and allows the icon to be placed in buttons and allows the parent component to manage spacing.
56
- * - `compact` provides accessible compact spacing between the icon and other elements. **Only available for small icons.**
57
- * - `spacious` provides accessible spacing between the icon and other elements.
54
+ * @deprecated Use a `Flex` wrapper with `cssMap` padding tokens instead. Migrate with the `32.0.2-icon-spacing-to-flex-primitive` codemod in `npx @atlaskit/codemod-cli`, or the `no-icon-spacing-prop` ESLint rule.
58
55
  */
59
56
  spacing?: IconSpacing;
60
57
  }
@@ -205,40 +202,6 @@ export interface SVGProps extends GlyphProps {
205
202
  */
206
203
  children?: ReactNode;
207
204
  }
208
- /**
209
- * The migration outcome for a given legacy icon
210
- */
211
- type IconMigrationResult = {
212
- /**
213
- * The recommended new icon that the legacy icon should be migrated to
214
- */
215
- newIcon?: {
216
- name: string;
217
- package: string;
218
- isMigrationUnsafe?: boolean;
219
- /**
220
- * Forces the new icon to be `size="small"`, even if the legacy icon was not a small icon.
221
- *
222
- * E.g. used for chevron icons.
223
- */
224
- shouldForceSmallIcon?: boolean;
225
- };
226
- /**
227
- * Alternative new icon that the legacy icon can be migrated to
228
- * Primarily used to maintain migration guidance for icons that have since had a
229
- * change to the recommended migration path in "newIcon"
230
- */
231
- additionalIcons?: {
232
- name: string;
233
- package: string;
234
- }[];
235
- /**
236
- * For each size the legacy icon can take, the per-size migration guidance
237
- */
238
- sizeGuidance: Record<Size, IconMigrationSizeGuidance>;
239
- };
240
- export type IconMigrationSizeGuidance = '16-icon-tile' | '24-icon-tile' | '32-icon-tile' | '48-icon-tile' | 'swap' | 'swap-slight-visual-change' | 'swap-visual-change' | 'product-icon' | 'not-recommended' | 'icon-tile' | 'top-nav' | 'icon-lab' | 'no-larger-size';
241
- export type IconMigrationMap = Record<string, IconMigrationResult>;
242
205
  interface LEGACY_Data {
243
206
  keywords: string[];
244
207
  componentName: string;
@@ -1,7 +1,6 @@
1
1
  import type { UNSAFE_NewGlyphProps } from '../types';
2
2
  /**
3
- * We are hiding this props from consumers as it's reserved
4
- * for use by Icon Tile.
3
+ * We are hiding this props from consumers as it's reserved for use by Icon Tile.
5
4
  */
6
5
  export type InternalIconPropsNew = UNSAFE_NewGlyphProps & {
7
6
  /**
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewCoreIconProps, IconMigrationMap, IconSpacing, IconSize, IconTileProps, } from '../types';
1
+ export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewCoreIconProps, IconSpacing, IconSize, IconTileProps, } from '../types';
@@ -4,4 +4,4 @@ export { default as SVG } from './components/svg';
4
4
  export { sizeMap as size, sizes } from './constants';
5
5
  export { default as Skeleton } from './components/skeleton';
6
6
  export { default as IconTile } from './components/icon-tile';
7
- export type { Size, IconSize, SkeletonProps, IconProps, GlyphProps, CustomGlyphProps, SVGProps, NewIconProps, NewCoreIconProps, IconMigrationMap, IconTileProps, } from './types';
7
+ export type { Size, IconSize, SkeletonProps, IconProps, GlyphProps, CustomGlyphProps, SVGProps, NewIconProps, NewCoreIconProps, IconTileProps, } from './types';
@@ -51,10 +51,7 @@ interface GlyphSizeProps {
51
51
  }
52
52
  interface NewCoreGlyphSpacingProps {
53
53
  /**
54
- * Core Icons can be displayed with additional spacing.
55
- * - `none` is default, and allows the icon to be placed in buttons and allows the parent component to manage spacing.
56
- * - `compact` provides accessible compact spacing between the icon and other elements. **Only available for small icons.**
57
- * - `spacious` provides accessible spacing between the icon and other elements.
54
+ * @deprecated Use a `Flex` wrapper with `cssMap` padding tokens instead. Migrate with the `32.0.2-icon-spacing-to-flex-primitive` codemod in `npx @atlaskit/codemod-cli`, or the `no-icon-spacing-prop` ESLint rule.
58
55
  */
59
56
  spacing?: IconSpacing;
60
57
  }
@@ -205,40 +202,6 @@ export interface SVGProps extends GlyphProps {
205
202
  */
206
203
  children?: ReactNode;
207
204
  }
208
- /**
209
- * The migration outcome for a given legacy icon
210
- */
211
- type IconMigrationResult = {
212
- /**
213
- * The recommended new icon that the legacy icon should be migrated to
214
- */
215
- newIcon?: {
216
- name: string;
217
- package: string;
218
- isMigrationUnsafe?: boolean;
219
- /**
220
- * Forces the new icon to be `size="small"`, even if the legacy icon was not a small icon.
221
- *
222
- * E.g. used for chevron icons.
223
- */
224
- shouldForceSmallIcon?: boolean;
225
- };
226
- /**
227
- * Alternative new icon that the legacy icon can be migrated to
228
- * Primarily used to maintain migration guidance for icons that have since had a
229
- * change to the recommended migration path in "newIcon"
230
- */
231
- additionalIcons?: {
232
- name: string;
233
- package: string;
234
- }[];
235
- /**
236
- * For each size the legacy icon can take, the per-size migration guidance
237
- */
238
- sizeGuidance: Record<Size, IconMigrationSizeGuidance>;
239
- };
240
- export type IconMigrationSizeGuidance = '16-icon-tile' | '24-icon-tile' | '32-icon-tile' | '48-icon-tile' | 'swap' | 'swap-slight-visual-change' | 'swap-visual-change' | 'product-icon' | 'not-recommended' | 'icon-tile' | 'top-nav' | 'icon-lab' | 'no-larger-size';
241
- export type IconMigrationMap = Record<string, IconMigrationResult>;
242
205
  interface LEGACY_Data {
243
206
  keywords: string[];
244
207
  componentName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "33.0.2",
3
+ "version": "33.1.1",
4
4
  "description": "An icon is a symbol representing a command, device, directory, or common action.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/tile": "^1.0.0",
39
- "@atlaskit/tokens": "^11.2.0",
39
+ "@atlaskit/tokens": "^11.4.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "@compiled/react": "^0.20.0"
42
42
  },
@@ -59,8 +59,8 @@
59
59
  "@atlaskit/link": "^3.3.0",
60
60
  "@atlaskit/logo": "^19.10.0",
61
61
  "@atlaskit/menu": "^8.4.0",
62
- "@atlaskit/modal-dialog": "^14.12.0",
63
- "@atlaskit/primitives": "^18.0.0",
62
+ "@atlaskit/modal-dialog": "^14.13.0",
63
+ "@atlaskit/primitives": "^18.1.0",
64
64
  "@atlaskit/section-message": "^8.12.0",
65
65
  "@atlaskit/textfield": "^8.2.0",
66
66
  "@atlaskit/theme": "^22.0.0",
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _typeof = require("@babel/runtime/helpers/typeof");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function get() {
10
- return _migrationMap.default;
11
- }
12
- });
13
- Object.defineProperty(exports, "migrationOutcomeDescriptionMap", {
14
- enumerable: true,
15
- get: function get() {
16
- return _migrationMap.migrationOutcomeDescriptionMap;
17
- }
18
- });
19
- var _migrationMap = _interopRequireWildcard(require("../migration-map"));
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }