@atlaskit/icon 35.3.0 → 36.0.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/base-new/package.json +1 -8
  3. package/constants/package.json +1 -8
  4. package/core/chart-pie.js +2 -2
  5. package/deprecated-core/package.json +1 -8
  6. package/deprecated-map/package.json +1 -8
  7. package/icon-new/package.json +1 -8
  8. package/icon-tile/package.json +1 -8
  9. package/metadata/package.json +1 -8
  10. package/metadata-core/package.json +1 -8
  11. package/package.json +21 -29
  12. package/skeleton/package.json +1 -8
  13. package/svgs/core/chart-pie.svg +1 -1
  14. package/types/package.json +1 -8
  15. package/dist/types-ts4.5/components/icon-new.d.ts +0 -20
  16. package/dist/types-ts4.5/components/icon-tile/icon-tile-new.d.ts +0 -7
  17. package/dist/types-ts4.5/components/icon-tile/icon-tile-old.d.ts +0 -7
  18. package/dist/types-ts4.5/components/icon-tile/icon-tile.d.ts +0 -7
  19. package/dist/types-ts4.5/components/icon-tile/index.d.ts +0 -8
  20. package/dist/types-ts4.5/components/skeleton.d.ts +0 -11
  21. package/dist/types-ts4.5/constants.d.ts +0 -21
  22. package/dist/types-ts4.5/deprecated-core.d.ts +0 -13
  23. package/dist/types-ts4.5/entry-points/base-new.d.ts +0 -2
  24. package/dist/types-ts4.5/entry-points/constants.d.ts +0 -1
  25. package/dist/types-ts4.5/entry-points/deprecated-core.d.ts +0 -1
  26. package/dist/types-ts4.5/entry-points/deprecated-map.d.ts +0 -1
  27. package/dist/types-ts4.5/entry-points/icon-new.d.ts +0 -3
  28. package/dist/types-ts4.5/entry-points/icon-tile.d.ts +0 -1
  29. package/dist/types-ts4.5/entry-points/metadata-core.d.ts +0 -1
  30. package/dist/types-ts4.5/entry-points/metadata.d.ts +0 -2
  31. package/dist/types-ts4.5/entry-points/skeleton.d.ts +0 -1
  32. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  33. package/dist/types-ts4.5/index.d.ts +0 -5
  34. package/dist/types-ts4.5/metadata-core.d.ts +0 -57
  35. package/dist/types-ts4.5/recommended-small.d.ts +0 -1
  36. package/dist/types-ts4.5/types.d.ts +0 -218
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @atlaskit/icon
2
2
 
3
+ ## 36.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 35.4.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [`9c0155c00d835`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9c0155c00d835) -
34
+ This release updates icons in `@atlaskit/icon`.
35
+
36
+ ### Updated:
37
+
38
+ **`@atlaskit/icon/core`**
39
+ - `chart-pie`
40
+
3
41
  ## 35.3.0
4
42
 
5
43
  ### Minor Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/base-new.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/base-new.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/base-new.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/constants.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/constants.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/constants.d.ts"
17
10
  }
package/core/chart-pie.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::89a410e229b9999c1554267d9566f016>>
3
+ * @codegen <<SignedSource::cc06b50e6f9dd7262fd503ef7293ad3c>>
4
4
  * @codegenCommand yarn build:icon-glyphs
5
5
  */
6
6
  "use strict";
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
22
22
  */
23
23
  const ChartPieIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
24
24
  name: "ChartPieIcon",
25
- dangerouslySetGlyph: `<mask id="mask0_68633_29461" width="16" height="16" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="currentcolor" d="M5.106 0C5.04.239 5 .49 5 .75v7.5a2.75 2.75 0 0 0 3.462 2.656l7.246-1.941q.15-.04.292-.098V16H0V0zm5.672 4.59-.278.076v-.29q.143.102.278.215M16 2.17A10.3 10.3 0 0 0 13.831 0H16z"/></mask><g mask="url(#mask0_68633_29461)"><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M1.75 8a6.25 6.25 0 1 0 12.5 0 6.25 6.25 0 0 0-12.5 0Z"/></g><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M7.75 8.25V.75c3.47 0 6.39 2.357 7.246 5.558z"/>`
25
+ dangerouslySetGlyph: `<mask id="mask0_68926_32054" width="16" height="16" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="currentcolor" d="M5.106 0C5.04.239 5 .49 5 .75v7.5a2.75 2.75 0 0 0 3.462 2.656l7.246-1.941q.15-.04.292-.098V16H0V0zm5.672 4.59-.278.076v-.29q.143.102.278.215M16 2.17A10.3 10.3 0 0 0 13.831 0H16z"/></mask><g mask="url(#mask0_68926_32054)"><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M1.75 8a6.25 6.25 0 1 0 12.5 0 6.25 6.25 0 0 0-12.5 0Z"/></g><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M7.75 8.25V.75c3.47 0 6.39 2.357 7.246 5.558z"/>`
26
26
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
27
27
  }, props));
28
28
  ChartPieIcon.displayName = 'ChartPieIcon';
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/deprecated-core.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/deprecated-core.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/deprecated-core.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/deprecated-map.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/deprecated-map.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/deprecated-map.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/icon-new.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/icon-new.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/icon-new.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/icon-tile.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/icon-tile.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/icon-tile.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/metadata.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/metadata.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/metadata.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/metadata-core.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/metadata-core.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/metadata-core.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "35.3.0",
3
+ "version": "36.0.0",
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/"
@@ -41,9 +41,9 @@
41
41
  "build-glyphs": "ts-node --project ../../../tsconfig.node.json ./build/index.tsx"
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/platform-feature-flags": "^1.1.0",
45
- "@atlaskit/tile": "^1.1.0",
46
- "@atlaskit/tokens": "^13.0.0",
44
+ "@atlaskit/platform-feature-flags": "^2.0.0",
45
+ "@atlaskit/tile": "^2.0.0",
46
+ "@atlaskit/tokens": "^14.0.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@compiled/react": "^0.20.0"
49
49
  },
@@ -55,23 +55,23 @@
55
55
  "@af/icon-build-process": "workspace:^",
56
56
  "@af/integration-testing": "workspace:^",
57
57
  "@af/visual-regression": "workspace:^",
58
- "@atlaskit/button": "^23.11.0",
59
- "@atlaskit/code": "^17.5.0",
60
- "@atlaskit/css": "^0.19.0",
61
- "@atlaskit/docs": "^11.8.0",
62
- "@atlaskit/form": "^15.5.0",
63
- "@atlaskit/heading": "^5.4.0",
64
- "@atlaskit/icon-file-type": "^7.0.0",
65
- "@atlaskit/link": "^3.4.0",
66
- "@atlaskit/logo": "^20.1.0",
67
- "@atlaskit/menu": "^8.5.0",
68
- "@atlaskit/modal-dialog": "^15.2.0",
69
- "@atlaskit/primitives": "^19.0.0",
70
- "@atlaskit/section-message": "^8.13.0",
71
- "@atlaskit/textfield": "^8.3.0",
72
- "@atlaskit/theme": "^25.0.0",
73
- "@atlaskit/toggle": "^16.0.0",
74
- "@atlaskit/tooltip": "^22.3.0",
58
+ "@atlaskit/button": "^24.0.0",
59
+ "@atlaskit/code": "^18.0.0",
60
+ "@atlaskit/css": "^1.0.0",
61
+ "@atlaskit/docs": "^12.0.0",
62
+ "@atlaskit/form": "^16.0.0",
63
+ "@atlaskit/heading": "^6.0.0",
64
+ "@atlaskit/icon-file-type": "^8.0.0",
65
+ "@atlaskit/link": "^4.0.0",
66
+ "@atlaskit/logo": "^21.0.0",
67
+ "@atlaskit/menu": "^9.0.0",
68
+ "@atlaskit/modal-dialog": "^16.0.0",
69
+ "@atlaskit/primitives": "^20.0.0",
70
+ "@atlaskit/section-message": "^9.0.0",
71
+ "@atlaskit/textfield": "^9.0.0",
72
+ "@atlaskit/theme": "^26.0.0",
73
+ "@atlaskit/toggle": "^17.0.0",
74
+ "@atlaskit/tooltip": "^23.0.0",
75
75
  "@atlassian/feature-flags-test-utils": "^1.1.0",
76
76
  "@atlassian/react-compiler-gating": "workspace:^",
77
77
  "@atlassian/ssr-tests": "workspace:^",
@@ -111,14 +111,6 @@
111
111
  "deprecation": "no-deprecated-imports"
112
112
  }
113
113
  },
114
- "typesVersions": {
115
- ">=4.5 <4.9": {
116
- "*": [
117
- "dist/types-ts4.5/*",
118
- "dist/types-ts4.5/index.d.ts"
119
- ]
120
- }
121
- },
122
114
  "homepage": "https://atlassian.design/components/icon/",
123
115
  "platform-feature-flags": {
124
116
  "platform_dst_icon_tile_circle_replacement": {
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/skeleton.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/skeleton.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/skeleton.d.ts"
17
10
  }
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><mask id="mask0_68633_29461" width="16" height="16" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="currentcolor" d="M5.106 0C5.04.239 5 .49 5 .75v7.5a2.75 2.75 0 0 0 3.462 2.656l7.246-1.941q.15-.04.292-.098V16H0V0zm5.672 4.59-.278.076v-.29q.143.102.278.215M16 2.17A10.3 10.3 0 0 0 13.831 0H16z"/></mask><g mask="url(#mask0_68633_29461)"><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M1.75 8a6.25 6.25 0 1 0 12.5 0 6.25 6.25 0 0 0-12.5 0Z"/></g><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M7.75 8.25V.75c3.47 0 6.39 2.357 7.246 5.558z"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><mask id="mask0_68926_32054" width="16" height="16" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="currentcolor" d="M5.106 0C5.04.239 5 .49 5 .75v7.5a2.75 2.75 0 0 0 3.462 2.656l7.246-1.941q.15-.04.292-.098V16H0V0zm5.672 4.59-.278.076v-.29q.143.102.278.215M16 2.17A10.3 10.3 0 0 0 13.831 0H16z"/></mask><g mask="url(#mask0_68926_32054)"><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M1.75 8a6.25 6.25 0 1 0 12.5 0 6.25 6.25 0 0 0-12.5 0Z"/></g><path stroke="currentcolor" stroke-linejoin="round" stroke-width="1.5" d="M7.75 8.25V.75c3.47 0 6.39 2.357 7.246 5.558z"/></svg>
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1,20 +0,0 @@
1
- import type { UNSAFE_NewGlyphProps } from '../types';
2
- /**
3
- * We are hiding this props from consumers as it's reserved for use by Icon Tile.
4
- */
5
- export type InternalIconPropsNew = UNSAFE_NewGlyphProps & {
6
- /**
7
- * @internal NOT FOR PUBLIC USE.
8
- * Sets whether the icon should inherit size from a parent. Used by Icon Tile.
9
- */
10
- shouldScale?: boolean;
11
- };
12
- /**
13
- * __Icon__
14
- *
15
- * An icon is used as a visual representation of common actions and commands to provide context.
16
- *
17
- * - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon)
18
- */
19
- export declare const Icon: import('react').NamedExoticComponent<import('../types').UNSAFE_NewCoreGlyphProps>;
20
- export default Icon;
@@ -1,7 +0,0 @@
1
- import { type IconTileProps } from '../../types';
2
- /**
3
- * __IconTile__
4
- *
5
- * An icon with background shape, color, and size properties determined by Tile.
6
- */
7
- export default function IconTileNew(props: IconTileProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type IconTileProps } from '../../types';
2
- /**
3
- * __IconTile__
4
- *
5
- * An icon with background shape, color, and size properties determined by Tile.
6
- */
7
- export default function IconTile(props: IconTileProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- import { type IconTileProps } from '../../types';
2
- /**
3
- * __IconTile__
4
- *
5
- * An icon with background shape, color, and size properties determined by Tile.
6
- */
7
- export default function IconTileNew(props: IconTileProps): JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { type IconTileProps } from '../../types';
3
- /**
4
- * __IconTile__
5
- *
6
- * An icon with background shape, color, and size properties determined by Tile.
7
- */
8
- export default function IconTile(props: IconTileProps): React.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type NamedExoticComponent } from 'react';
6
- import type { SkeletonProps } from '../types';
7
- /**
8
- * __Skeleton__
9
- */
10
- declare const Skeleton: NamedExoticComponent<SkeletonProps>;
11
- export default Skeleton;
@@ -1,21 +0,0 @@
1
- import type { Size } from './types';
2
- export declare const sizes: Record<Size, string>;
3
- export declare const sizeMap: Record<Size, Size>;
4
- export declare const dimensions: {
5
- readonly small: {
6
- readonly width: string;
7
- readonly height: string;
8
- };
9
- readonly medium: {
10
- readonly width: string;
11
- readonly height: string;
12
- };
13
- readonly large: {
14
- readonly width: string;
15
- readonly height: string;
16
- };
17
- readonly xlarge: {
18
- readonly width: string;
19
- readonly height: string;
20
- };
21
- };
@@ -1,13 +0,0 @@
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::940e05b18f6bba27980b5c1fdf15c580>>
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,2 +0,0 @@
1
- export { default, Icon } from '../components/icon-new';
2
- export type { NewIconProps, NewCoreIconProps } from '../types';
@@ -1 +0,0 @@
1
- export { dimensions, sizeMap, sizes } from '../constants';
@@ -1 +0,0 @@
1
- export { default } from '../deprecated-core';
@@ -1 +0,0 @@
1
- export { default as deprecatedCore } from '../deprecated-core';
@@ -1,3 +0,0 @@
1
- export { Icon } from '../components/icon-new';
2
- export type { InternalIconPropsNew } from '../components/icon-new';
3
- export { default } from '../components/icon-new';
@@ -1 +0,0 @@
1
- export { default } from '../components/icon-tile/index';
@@ -1 +0,0 @@
1
- export { default } from '../metadata-core';
@@ -1,2 +0,0 @@
1
- export { default } from '../metadata-core';
2
- export { default as coreIconMetadata } from '../metadata-core';
@@ -1 +0,0 @@
1
- export { default } from '../components/skeleton';
@@ -1 +0,0 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, IconSize, IconSpacing, IconTileAppearance, IconTileProps, IconTileSize, LEGACY_Metadata, NewCoreIconProps, NewGlyphColorProps, NewIconProps, SVGProps, Size, SkeletonProps, UNSAFE_NewCoreGlyphProps, UNSAFE_NewGlyphProps, } from '../types';
@@ -1,5 +0,0 @@
1
- export { default as IconNew } from './components/icon-new';
2
- export { sizeMap as size, sizes } from './constants';
3
- export { default as Skeleton } from './components/skeleton';
4
- export { default as IconTile } from './components/icon-tile';
5
- export type { Size, IconSize, SkeletonProps, IconProps, GlyphProps, CustomGlyphProps, SVGProps, NewIconProps, NewCoreIconProps, IconTileProps, } from './types';
@@ -1,57 +0,0 @@
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::a4eb86ec22225f9a913ef8f15c767f6f>>
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
- */
23
- categorization: 'single-purpose' | 'multi-purpose';
24
- /**
25
- * Usage guidelines for the icon. For single-purpose icons,
26
- */
27
- usage?: string;
28
- /**
29
- * Additional keywords used to assist in search/lookup of an icon
30
- */
31
- keywords: string[];
32
- /**
33
- * The name of the team owning the icon
34
- */
35
- team: string;
36
- /**
37
- * The status of the icon
38
- */
39
- status?: 'draft' | 'ready-to-publish' | 'published' | 'modified' | 'deprecated';
40
- /**
41
- * Contact slack channel for the team owning the icon
42
- */
43
- slackChannel?: string;
44
- /**
45
- * A replacement icon if this icon has been deprecated
46
- */
47
- replacement?: {
48
- name: string;
49
- location: '@atlaskit/icon' | '@atlaskit/icon-lab' | '@atlassian/icon-private';
50
- };
51
- /**
52
- * Whether the icon should be recommended as a small icon
53
- */
54
- shouldRecommendSmallIcon?: boolean;
55
- }
56
- declare const metadata: Record<string, metadata>;
57
- export default metadata;
@@ -1 +0,0 @@
1
- export declare const recommendedSmallIcons: string[];
@@ -1,218 +0,0 @@
1
- import type { ComponentType, ReactElement, ReactNode, SVGProps as ReactSVGProps } from 'react';
2
- import type { IconColor, IconColorPressed, TextColor, TextColorPressed } from '@atlaskit/tokens/css-type-schema';
3
- export type Size = 'small' | 'medium' | 'large' | 'xlarge';
4
- export type IconSpacing = 'none' | 'spacious' | 'compact';
5
- export type IconSize = 'small' | 'medium';
6
- export interface CustomGlyphProps extends ReactSVGProps<SVGSVGElement> {
7
- /**
8
- * provided to a custom glyph
9
- */
10
- 'data-testid'?: string;
11
- /**
12
- * provided to a custom glyph
13
- */
14
- 'aria-label'?: string;
15
- /**
16
- * provided classname for custom glyph to match ADG styles
17
- */
18
- className?: string;
19
- }
20
- interface GlyphColorProps {
21
- /**
22
- * Primary color for the icon.
23
- * Inherits the current font color by default.
24
- */
25
- primaryColor?: string;
26
- /**
27
- * Secondary color for the icon.
28
- * Defaults to the page background for an icon that supports two colors.
29
- */
30
- secondaryColor?: string;
31
- }
32
- /**
33
- * NOTE: we want to move away from icons using text colors and make the icon tokens darker - so currentColor will eventually go away, and
34
- * we will be shifting existing usages down (`color.text` -> `color.icon` -> `color.icon.`) via a codemod.
35
- * For now, icon defaults to `color.text` under the hood to emulate the darker appearance.
36
- */
37
- export interface NewGlyphColorProps {
38
- /**
39
- * Color for the icon. Supports any icon or text design token, or 'currentColor' to inherit the current text color.
40
- * Defaults to `currentColor`, inheriting the current text color.
41
- */
42
- color?: IconColor | IconColorPressed | Exclude<TextColor, 'transparent'> | TextColorPressed | 'currentColor';
43
- }
44
- interface GlyphSizeProps {
45
- /**
46
- * There are three icon sizes – small (16px), medium (24px), and large (32px).
47
- * This pixel size refers to the canvas the icon sits on,
48
- * not the size of the icon shape itself.
49
- */
50
- size?: Size;
51
- }
52
- interface NewCoreGlyphSpacingProps {
53
- /**
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.
55
- */
56
- spacing?: IconSpacing;
57
- }
58
- interface NewCoreGlyphSizeProps {
59
- /**
60
- * There are two icon sizes available:
61
- * - `medium` - 16px. (default).
62
- * - `small` - 12px.
63
- *
64
- * Alternatively a function can be passed to determine the size
65
- * based on the icon's name, which can be useful for dynamic rendering.
66
- */
67
- size?: IconSize | ((iconName: string) => IconSize);
68
- }
69
- interface OtherGlyphProps {
70
- /**
71
- * Text used to describe what the icon is in context.
72
- * A label is needed when there is no pairing visible text next to the icon.
73
- * An empty string marks the icon as presentation only.
74
- */
75
- label: string;
76
- /**
77
- * A `testId` prop is provided for specified elements,
78
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
79
- * serving as a hook for automated tests.
80
- */
81
- testId?: string;
82
- }
83
- /**
84
- * Props for legacy icons –– including the children prop to resolve R18 type errors
85
- */
86
- interface LegacyOtherGlyphProps {
87
- /**
88
- * Text used to describe what the icon is in context.
89
- */
90
- label: string;
91
- /**
92
- * A `testId` prop is provided for specified elements,
93
- */
94
- testId?: string;
95
- /**
96
- * Used to opt out of the icon facade.
97
- */
98
- isFacadeDisabled?: boolean;
99
- /**
100
- * The content to be rendered inside the glyph component.
101
- * Only for legacy icons that used R16's implicit children prop.
102
- * It doesn't actually serve any purpose, but is required to resolve R18 type errors
103
- * without updating all the legacy icon usages.
104
- */
105
- children?: ReactNode;
106
- }
107
- interface IconInternalGlyphProps {
108
- /**
109
- * @deprecated
110
- * Custom icon string that should contain an SVG element with set `viewBox`,
111
- * `width`, and `height` attributes.
112
- * It's recommended to use the `glyph` prop instead.
113
- */
114
- dangerouslySetGlyph?: string;
115
- }
116
- export interface GlyphProps extends LegacyOtherGlyphProps, GlyphSizeProps, GlyphColorProps {
117
- }
118
- interface NewCoreGlyphProps extends OtherGlyphProps, NewCoreGlyphSpacingProps, NewCoreGlyphSizeProps, NewGlyphColorProps {
119
- }
120
- export interface IconProps extends GlyphProps, IconInternalGlyphProps {
121
- /**
122
- * Custom icon component that returns an SVG element with set `viewBox`,
123
- * `width`, and `height` props.
124
- */
125
- glyph?: ComponentType<CustomGlyphProps>;
126
- }
127
- export interface UNSAFE_NewCoreGlyphProps extends NewCoreGlyphProps, IconInternalGlyphProps {
128
- shouldRecommendSmallIcon?: boolean;
129
- /**
130
- * Display name of the icon.
131
- */
132
- name?: string;
133
- }
134
- export type NewCoreIconProps = Omit<UNSAFE_NewCoreGlyphProps, 'dangerouslySetGlyph'>;
135
- export type UNSAFE_NewGlyphProps = UNSAFE_NewCoreGlyphProps;
136
- export type NewIconProps = Omit<UNSAFE_NewGlyphProps, 'dangerouslySetGlyph'>;
137
- export type IconTileAppearance = 'gray' | 'blue' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'grayBold' | 'blueBold' | 'tealBold' | 'greenBold' | 'limeBold' | 'yellowBold' | 'orangeBold' | 'redBold' | 'magentaBold' | 'purpleBold';
138
- export type IconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
139
- interface IconTileBaseProps {
140
- /**
141
- * The icon to display
142
- */
143
- icon: ComponentType<NewCoreIconProps>;
144
- /**
145
- * The label for the icon
146
- */
147
- label: string;
148
- /**
149
- * The appearance of the tile
150
- */
151
- appearance: IconTileAppearance;
152
- /**
153
- * Size of the tile. Defaults to `medium`.
154
- *
155
- * Available sizes: `xsmall`, `small`, `medium`, `large`, `xlarge`.
156
- */
157
- size?: IconTileSize;
158
- /**
159
- * A unique string that appears as a data attribute `data-testid` in the rendered code,
160
- * serving as a hook for automated tests.
161
- */
162
- testId?: string;
163
- }
164
- interface IconTileSquareProps extends IconTileBaseProps {
165
- /**
166
- * Shape of the tile background. Defaults to "square".
167
- */
168
- shape?: 'square';
169
- /**
170
- * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
171
- *
172
- * Only applicable when `shape="circle"`.
173
- */
174
- UNSAFE_circleReplacementComponent?: never;
175
- }
176
- interface IconTileCircleProps extends IconTileBaseProps {
177
- /**
178
- * Shape of the tile background.
179
- * @deprecated Circle shape is deprecated and will be removed in a future version. Consider migrating to alternatives such as a square tile, or an `IconButton` for interactive elements.
180
- * If necessary, the only way to retain a circle appearance is to rebuild the component custom using ADS primitives. The prop `UNSAFE_circleReplacementComponent` can be used to
181
- * implement alternatives.
182
- */
183
- shape: 'circle';
184
- /**
185
- * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
186
- *
187
- * Required when `shape="circle"`. This prop is temporary, and will be used by ADS to safely
188
- * rollout alternatives as circle shaped icon tiles are deprecated.
189
- */
190
- UNSAFE_circleReplacementComponent: ReactElement;
191
- }
192
- export type IconTileProps = IconTileSquareProps | IconTileCircleProps;
193
- export interface SkeletonProps {
194
- color?: string;
195
- size?: Size;
196
- weight?: 'normal' | 'strong';
197
- /**
198
- * A unique string that appears as a data attribute `data-testid` in the rendered code,
199
- * serving as a hook for automated tests.
200
- */
201
- testId?: string;
202
- }
203
- export interface SVGProps extends GlyphProps {
204
- /**
205
- * The children of the SVG, should still honour the constraints of icons
206
- */
207
- children?: ReactNode;
208
- }
209
- interface LEGACY_Data {
210
- keywords: string[];
211
- componentName: string;
212
- package: string;
213
- packageLoader: () => Promise<{
214
- default: React.ComponentType<any>;
215
- }>;
216
- }
217
- export type LEGACY_Metadata = Record<string, LEGACY_Data>;
218
- export {};