@atlaskit/icon 28.2.0 → 28.3.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 (63) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-dev-agents/tsconfig.json +3 -0
  4. package/afm-jira/tsconfig.json +3 -0
  5. package/afm-passionfruit/tsconfig.json +3 -0
  6. package/afm-post-office/tsconfig.json +3 -0
  7. package/afm-rovo-extension/tsconfig.json +3 -0
  8. package/afm-townsquare/tsconfig.json +3 -0
  9. package/build/index.tsx +1 -1
  10. package/dist/cjs/components/icon-new.js +1 -1
  11. package/dist/cjs/components/icon-tile/icon-tile-new.compiled.css +12 -0
  12. package/dist/cjs/components/icon-tile/icon-tile-new.js +103 -0
  13. package/dist/cjs/components/{icon-tile.compiled.css → icon-tile/icon-tile-old.compiled.css} +2 -0
  14. package/dist/cjs/components/{icon-tile.js → icon-tile/icon-tile-old.js} +27 -25
  15. package/dist/cjs/components/icon-tile/index.js +85 -0
  16. package/dist/cjs/components/icon.js +1 -1
  17. package/dist/cjs/components/skeleton.js +1 -1
  18. package/dist/cjs/components/svg.js +1 -1
  19. package/dist/cjs/metadata-core.js +14 -14
  20. package/dist/cjs/metadata.js +1 -1
  21. package/dist/es2019/components/icon-new.js +1 -1
  22. package/dist/es2019/components/icon-tile/icon-tile-new.compiled.css +12 -0
  23. package/dist/es2019/components/icon-tile/icon-tile-new.js +95 -0
  24. package/dist/{esm/components/icon-tile.compiled.css → es2019/components/icon-tile/icon-tile-old.compiled.css} +2 -0
  25. package/dist/es2019/components/{icon-tile.js → icon-tile/icon-tile-old.js} +27 -25
  26. package/dist/es2019/components/icon-tile/index.js +79 -0
  27. package/dist/es2019/components/icon.js +1 -1
  28. package/dist/es2019/components/skeleton.js +1 -1
  29. package/dist/es2019/components/svg.js +1 -1
  30. package/dist/es2019/metadata-core.js +14 -14
  31. package/dist/es2019/metadata.js +1 -1
  32. package/dist/esm/components/icon-new.js +1 -1
  33. package/dist/esm/components/icon-tile/icon-tile-new.compiled.css +12 -0
  34. package/dist/esm/components/icon-tile/icon-tile-new.js +94 -0
  35. package/dist/{es2019/components/icon-tile.compiled.css → esm/components/icon-tile/icon-tile-old.compiled.css} +2 -0
  36. package/dist/esm/components/{icon-tile.js → icon-tile/icon-tile-old.js} +27 -25
  37. package/dist/esm/components/icon-tile/index.js +78 -0
  38. package/dist/esm/components/icon.js +1 -1
  39. package/dist/esm/components/skeleton.js +1 -1
  40. package/dist/esm/components/svg.js +1 -1
  41. package/dist/esm/metadata-core.js +14 -14
  42. package/dist/esm/metadata.js +1 -1
  43. package/dist/types/components/icon-tile/icon-tile-new.d.ts +7 -0
  44. package/dist/types/components/icon-tile/icon-tile-old.d.ts +7 -0
  45. package/dist/types/components/icon-tile/index.d.ts +8 -0
  46. package/dist/types/entry-points/types.d.ts +1 -1
  47. package/dist/types/metadata-core.d.ts +1 -1
  48. package/dist/types/metadata.d.ts +2 -8
  49. package/dist/types/types.d.ts +26 -3
  50. package/dist/types-ts4.5/components/icon-tile/icon-tile-new.d.ts +7 -0
  51. package/dist/types-ts4.5/components/icon-tile/icon-tile-old.d.ts +7 -0
  52. package/dist/types-ts4.5/components/icon-tile/index.d.ts +8 -0
  53. package/dist/types-ts4.5/entry-points/types.d.ts +1 -1
  54. package/dist/types-ts4.5/metadata-core.d.ts +1 -1
  55. package/dist/types-ts4.5/metadata.d.ts +2 -8
  56. package/dist/types-ts4.5/types.d.ts +26 -3
  57. package/docs/ai/icon-instructions.md +24 -0
  58. package/docs/ai/icon-tile-instructions.md +27 -0
  59. package/offerings.json +69 -0
  60. package/package.json +13 -5
  61. package/utils/logo-icons.tsx +48 -48
  62. package/dist/types/components/icon-tile.d.ts +0 -11
  63. package/dist/types-ts4.5/components/icon-tile.d.ts +0 -11
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
+ // Import both versions
4
+ import IconTileNew from './icon-tile-new';
5
+ import IconTileOld from './icon-tile-old';
6
+
7
+ // Color mapping for size 16 standalone icons that will no longer be tiles
8
+ var appearanceToIconColorMap = {
9
+ blue: "var(--ds-icon-accent-blue, #1D7AFC)",
10
+ blueBold: "var(--ds-icon-accent-blue, #1D7AFC)",
11
+ gray: "var(--ds-icon-accent-gray, #758195)",
12
+ grayBold: "var(--ds-icon-accent-gray, #758195)",
13
+ green: "var(--ds-icon-accent-green, #22A06B)",
14
+ greenBold: "var(--ds-icon-accent-green, #22A06B)",
15
+ lime: "var(--ds-icon-accent-lime, #6A9A23)",
16
+ limeBold: "var(--ds-icon-accent-lime, #6A9A23)",
17
+ magenta: "var(--ds-icon-accent-magenta, #CD519D)",
18
+ magentaBold: "var(--ds-icon-accent-magenta, #CD519D)",
19
+ orange: "var(--ds-icon-accent-orange, #E56910)",
20
+ orangeBold: "var(--ds-icon-accent-orange, #E56910)",
21
+ purple: "var(--ds-icon-accent-purple, #8270DB)",
22
+ purpleBold: "var(--ds-icon-accent-purple, #8270DB)",
23
+ red: "var(--ds-icon-accent-red, #C9372C)",
24
+ redBold: "var(--ds-icon-accent-red, #C9372C)",
25
+ teal: "var(--ds-icon-accent-teal, #2898BD)",
26
+ tealBold: "var(--ds-icon-accent-teal, #2898BD)",
27
+ yellow: "var(--ds-icon-accent-yellow, #B38600)",
28
+ yellowBold: "var(--ds-icon-accent-yellow, #B38600)"
29
+ };
30
+
31
+ /**
32
+ * __IconTile__
33
+ *
34
+ * An icon with background shape, color, and size properties determined by Tile.
35
+ */
36
+ export default function IconTile(_ref) {
37
+ var appearance = _ref.appearance,
38
+ Icon = _ref.icon,
39
+ label = _ref.label,
40
+ size = _ref.size,
41
+ testId = _ref.testId,
42
+ shape = _ref.shape,
43
+ LEGACY_fallbackComponent = _ref.LEGACY_fallbackComponent,
44
+ UNSAFE_circleReplacementComponent = _ref.UNSAFE_circleReplacementComponent;
45
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
46
+ if (LEGACY_fallbackComponent && !fg('platform-visual-refresh-icons')) {
47
+ return LEGACY_fallbackComponent;
48
+ }
49
+ if (UNSAFE_circleReplacementComponent && shape === 'circle' && fg('platform_dst_icon_tile_circle_replacement')) {
50
+ return UNSAFE_circleReplacementComponent;
51
+ }
52
+ if (shape !== 'circle' && fg('platform_dst_new_icon_tile')) {
53
+ // Handle size 16 - render icon directly without Tile
54
+ if (size === '16') {
55
+ return /*#__PURE__*/React.createElement(Icon, {
56
+ color: appearanceToIconColorMap[appearance],
57
+ label: label,
58
+ testId: testId
59
+ });
60
+ }
61
+ return /*#__PURE__*/React.createElement(IconTileNew, {
62
+ appearance: appearance,
63
+ icon: Icon,
64
+ label: label,
65
+ shape: shape,
66
+ size: size,
67
+ testId: testId
68
+ });
69
+ }
70
+ return /*#__PURE__*/React.createElement(IconTileOld, {
71
+ appearance: appearance,
72
+ icon: Icon,
73
+ label: label,
74
+ shape: shape,
75
+ size: size,
76
+ testId: testId
77
+ });
78
+ }
@@ -1,4 +1,4 @@
1
- /* icon.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./icon.compiled.css";
@@ -1,4 +1,4 @@
1
- /* skeleton.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* skeleton.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./skeleton.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* svg.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* svg.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./svg.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::736757b9fbc08cfe04a0dfd387060116>>
6
+ * @codegen <<SignedSource::ee18f4e5865068325a476701d51323b5>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
 
@@ -511,7 +511,7 @@ var metadata = {
511
511
  package: '@atlaskit/icon/core/cash',
512
512
  type: 'core',
513
513
  categorization: 'multi-purpose',
514
- usage: "Known usages: 'Sales' work type.",
514
+ usage: "Known usages: \'Sales\' work type.",
515
515
  team: 'Design System Team',
516
516
  status: 'published'
517
517
  },
@@ -1111,7 +1111,7 @@ var metadata = {
1111
1111
  package: '@atlaskit/icon/core/devices',
1112
1112
  type: 'core',
1113
1113
  categorization: 'multi-purpose',
1114
- usage: "Known usages: 'Asset' work type.",
1114
+ usage: "Known usages: \'Asset\' work type.",
1115
1115
  team: 'Design System Team',
1116
1116
  status: 'published'
1117
1117
  },
@@ -1204,7 +1204,7 @@ var metadata = {
1204
1204
  oldName: ['editor/emoji', 'emoji/emoji', 'emoji', 'emoji/people'],
1205
1205
  type: 'core',
1206
1206
  categorization: 'single-purpose',
1207
- usage: "Single purpose - Reserved for Editor as a category for Emoji's.",
1207
+ usage: "Single purpose - Reserved for Editor as a category for Emoji\'s.",
1208
1208
  team: 'Design System Team',
1209
1209
  status: 'published'
1210
1210
  },
@@ -1417,7 +1417,7 @@ var metadata = {
1417
1417
  oldName: ['document-filled', 'document', 'editor/file', 'file'],
1418
1418
  type: 'core',
1419
1419
  categorization: 'multi-purpose',
1420
- usage: "Multi purpose - Known uses: document, file. Do not use to represent a page — use the dedicated 'Page' icon instead.",
1420
+ usage: "Multi purpose - Known uses: document, file. Do not use to represent a page — use the dedicated \'Page\' icon instead.",
1421
1421
  team: 'Design System Team',
1422
1422
  status: 'published'
1423
1423
  },
@@ -1428,7 +1428,7 @@ var metadata = {
1428
1428
  oldName: ['documents'],
1429
1429
  type: 'core',
1430
1430
  categorization: 'multi-purpose',
1431
- usage: "Multi purpose - Known uses: documents, files. Do not use to represent pages — use the dedicated 'Pages' icon instead.",
1431
+ usage: "Multi purpose - Known uses: documents, files. Do not use to represent pages — use the dedicated \'Pages\' icon instead.",
1432
1432
  team: 'Design System Team',
1433
1433
  status: 'published'
1434
1434
  },
@@ -1713,7 +1713,7 @@ var metadata = {
1713
1713
  oldName: ['tray'],
1714
1714
  type: 'core',
1715
1715
  categorization: 'multi-purpose',
1716
- usage: "Multi purpose - Known uses: 'Your work' in Confluence, inbox, mail.",
1716
+ usage: "Multi purpose - Known uses: \'Your work\' in Confluence, inbox, mail.",
1717
1717
  team: 'Design System Team',
1718
1718
  status: 'published'
1719
1719
  },
@@ -1739,7 +1739,7 @@ var metadata = {
1739
1739
  location: '@atlaskit/icon'
1740
1740
  },
1741
1741
  categorization: 'single-purpose',
1742
- usage: "Reserved for information statuses and messaging. Filled status icons provide higher visual contrast to draw attention to important information. For information tooltips, use the unfilled 'information circle' icon.",
1742
+ usage: "Reserved for information statuses and messaging. Filled status icons provide higher visual contrast to draw attention to important information. For information tooltips, use the unfilled \'information circle\' icon.",
1743
1743
  team: 'Design System Team',
1744
1744
  status: 'deprecated'
1745
1745
  },
@@ -1901,7 +1901,7 @@ var metadata = {
1901
1901
  package: '@atlaskit/icon/core/list-checklist',
1902
1902
  type: 'core',
1903
1903
  categorization: 'multi-purpose',
1904
- usage: "Known usages: Checklist, 'Requirement' work type.",
1904
+ usage: "Known usages: Checklist, \'Requirement\' work type.",
1905
1905
  team: 'Design System Team',
1906
1906
  status: 'published'
1907
1907
  },
@@ -2115,7 +2115,7 @@ var metadata = {
2115
2115
  package: '@atlaskit/icon/core/minus-square',
2116
2116
  type: 'core',
2117
2117
  categorization: 'multi-purpose',
2118
- usage: "Known usages: 'Remove feature' work type.",
2118
+ usage: "Known usages: \'Remove feature\' work type.",
2119
2119
  team: 'Design System Team',
2120
2120
  status: 'published'
2121
2121
  },
@@ -2272,7 +2272,7 @@ var metadata = {
2272
2272
  package: '@atlaskit/icon/core/pen',
2273
2273
  type: 'core',
2274
2274
  categorization: 'multi-purpose',
2275
- usage: "Known usages: 'Design task' work type.",
2275
+ usage: "Known usages: \'Design task\' work type.",
2276
2276
  team: 'Design System Team',
2277
2277
  status: 'published'
2278
2278
  },
@@ -2400,7 +2400,7 @@ var metadata = {
2400
2400
  oldName: ['issue-raise'],
2401
2401
  type: 'core',
2402
2402
  categorization: 'multi-purpose',
2403
- usage: "Known usages: 'New feature' work type.",
2403
+ usage: "Known usages: \'New feature\' work type.",
2404
2404
  team: 'Design System Team',
2405
2405
  status: 'published'
2406
2406
  },
@@ -3073,7 +3073,7 @@ var metadata = {
3073
3073
  oldName: ['editor/info', 'editor/panel', 'info'],
3074
3074
  type: 'core',
3075
3075
  categorization: 'single-purpose',
3076
- usage: "Reserved for information statuses and messaging. Filled status icons provide higher visual contrast to draw attention to important information. For information tooltips, use the unfilled 'information circle' icon.",
3076
+ usage: "Reserved for information statuses and messaging. Filled status icons provide higher visual contrast to draw attention to important information. For information tooltips, use the unfilled \'information circle\' icon.",
3077
3077
  team: 'Design System Team',
3078
3078
  status: 'published'
3079
3079
  },
@@ -3617,7 +3617,7 @@ var metadata = {
3617
3617
  package: '@atlaskit/icon/core/tools',
3618
3618
  type: 'core',
3619
3619
  categorization: 'multi-purpose',
3620
- usage: "Known usages: 'Service request' Jira work type.",
3620
+ usage: "Known usages: \'Service request\' Jira work type.",
3621
3621
  team: 'Design System Team',
3622
3622
  status: 'published'
3623
3623
  },
@@ -6,7 +6,7 @@ var _excluded = ["packageLoader"];
6
6
  *
7
7
  * To change the format of this file, modify `createIconDocs` in icon-build-process/src/create-icon-docs.tsx.
8
8
  *
9
- * @codegen <<SignedSource::505188bcbfbd2bedd523b7a93366dd82>>
9
+ * @codegen <<SignedSource::5b9b70e1898d13b76e8faef592720556>>
10
10
  * @codegenCommand yarn build:icon-glyphs
11
11
  */
12
12
  /* eslint-disable import/no-extraneous-dependencies -- This import is within the same package, hence self-referential. */
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,8 @@
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({ appearance, icon: Icon, label, size, testId, shape, LEGACY_fallbackComponent, UNSAFE_circleReplacementComponent, }: IconTileProps): React.JSX.Element;
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewUtilityIconProps, NewCoreIconProps, IconMigrationMap, IconSpacing, } from '../types';
1
+ export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewUtilityIconProps, NewCoreIconProps, IconMigrationMap, IconSpacing, IconTileProps, } from '../types';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::736757b9fbc08cfe04a0dfd387060116>>
6
+ * @codegen <<SignedSource::ee18f4e5865068325a476701d51323b5>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface metadata {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `createIconDocs` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::505188bcbfbd2bedd523b7a93366dd82>>
6
+ * @codegen <<SignedSource::5b9b70e1898d13b76e8faef592720556>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface Data {
@@ -15,11 +15,5 @@ interface Data {
15
15
  }>;
16
16
  }
17
17
  export declare const metaDataWithPackageLoader: Record<string, Data>;
18
- declare const metaData: {
19
- [k: string]: {
20
- keywords: string[];
21
- componentName: string;
22
- package: string;
23
- };
24
- };
18
+ declare const metaData: Record<string, Omit<Data, 'packageLoader'>>;
25
19
  export default metaData;
@@ -183,7 +183,9 @@ export type NewUtilityIconProps = Omit<UNSAFE_NewUtilityGlyphProps, 'dangerously
183
183
  export type UNSAFE_NewGlyphProps = UNSAFE_NewUtilityGlyphProps | UNSAFE_NewCoreGlyphProps;
184
184
  export type NewIconProps = Omit<UNSAFE_NewGlyphProps, 'dangerouslySetGlyph' | 'type' | 'name'>;
185
185
  export type IconTileAppearance = 'gray' | 'blue' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'grayBold' | 'blueBold' | 'tealBold' | 'greenBold' | 'limeBold' | 'yellowBold' | 'orangeBold' | 'redBold' | 'magentaBold' | 'purpleBold';
186
- export type IconTileSize = '16' | '24' | '32' | '40' | '48';
186
+ export type NewIconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
187
+ export type LegacyIconTileSize = '16' | '24' | '32' | '40' | '48';
188
+ export type IconTileSize = NewIconTileSize | LegacyIconTileSize;
187
189
  export interface IconTileProps {
188
190
  /**
189
191
  * The icon to display
@@ -198,18 +200,39 @@ export interface IconTileProps {
198
200
  */
199
201
  appearance: IconTileAppearance;
200
202
  /**
201
- * Size of the tile, in pixels. Defaults to "24".
202
- * In a future release, semantic names will be introduced, and number values will be deprecated.
203
+ * Size of the tile, in pixels. Defaults to `24`.
204
+ *
205
+ * Now supports both semantic t-shirt size names and pixel number values. Pixel number values are deprecated and will be removed in a future release, however they will both be available and backwards-compatible during a transition period.
206
+ *
207
+ * Size `16` will not have a replacement after deprecation, and should be replaced with direct icons without a tile or enlarging to the next available size `xsmall`.
208
+ *
209
+ * All available sizes:
210
+ * - `16` (deprecated)
211
+ * - `xsmall` (new)
212
+ * - `small` or `24`
213
+ * - `medium` or `32`
214
+ * - `large` or `40`
215
+ * - `xlarge` or `48`
203
216
  */
204
217
  size?: IconTileSize;
205
218
  /**
206
219
  * Shape of the tile background. Defaults to "square"
220
+ * @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.
221
+ * 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
222
+ * implement alternatives.
207
223
  */
208
224
  shape?: 'square' | 'circle';
209
225
  /**
210
226
  * Legacy component to render when the icon refresh feature flag is turned off.
227
+ * @deprecated This prop is deprecated and will be removed in a future version.
211
228
  */
212
229
  LEGACY_fallbackComponent?: ReactElement;
230
+ /**
231
+ * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
232
+ *
233
+ * This prop is temporary, and will be used by ADS to safely rollout alternatives as circle shaped icon tiles are deprecated.
234
+ */
235
+ UNSAFE_circleReplacementComponent?: ReactElement;
213
236
  /**
214
237
  * A unique string that appears as a data attribute `data-testid` in the rendered code,
215
238
  * serving as a hook for automated tests.
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,8 @@
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({ appearance, icon: Icon, label, size, testId, shape, LEGACY_fallbackComponent, UNSAFE_circleReplacementComponent, }: IconTileProps): React.JSX.Element;
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewUtilityIconProps, NewCoreIconProps, IconMigrationMap, IconSpacing, } from '../types';
1
+ export type { CustomGlyphProps, GlyphProps, IconProps, Size, SkeletonProps, SVGProps, NewIconProps, NewGlyphColorProps, NewUtilityIconProps, NewCoreIconProps, IconMigrationMap, IconSpacing, IconTileProps, } from '../types';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `createIconDocsNew` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::736757b9fbc08cfe04a0dfd387060116>>
6
+ * @codegen <<SignedSource::ee18f4e5865068325a476701d51323b5>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface metadata {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * To change the format of this file, modify `createIconDocs` in icon-build-process/src/create-icon-docs.tsx.
5
5
  *
6
- * @codegen <<SignedSource::505188bcbfbd2bedd523b7a93366dd82>>
6
+ * @codegen <<SignedSource::5b9b70e1898d13b76e8faef592720556>>
7
7
  * @codegenCommand yarn build:icon-glyphs
8
8
  */
9
9
  interface Data {
@@ -15,11 +15,5 @@ interface Data {
15
15
  }>;
16
16
  }
17
17
  export declare const metaDataWithPackageLoader: Record<string, Data>;
18
- declare const metaData: {
19
- [k: string]: {
20
- keywords: string[];
21
- componentName: string;
22
- package: string;
23
- };
24
- };
18
+ declare const metaData: Record<string, Omit<Data, 'packageLoader'>>;
25
19
  export default metaData;
@@ -183,7 +183,9 @@ export type NewUtilityIconProps = Omit<UNSAFE_NewUtilityGlyphProps, 'dangerously
183
183
  export type UNSAFE_NewGlyphProps = UNSAFE_NewUtilityGlyphProps | UNSAFE_NewCoreGlyphProps;
184
184
  export type NewIconProps = Omit<UNSAFE_NewGlyphProps, 'dangerouslySetGlyph' | 'type' | 'name'>;
185
185
  export type IconTileAppearance = 'gray' | 'blue' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'grayBold' | 'blueBold' | 'tealBold' | 'greenBold' | 'limeBold' | 'yellowBold' | 'orangeBold' | 'redBold' | 'magentaBold' | 'purpleBold';
186
- export type IconTileSize = '16' | '24' | '32' | '40' | '48';
186
+ export type NewIconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
187
+ export type LegacyIconTileSize = '16' | '24' | '32' | '40' | '48';
188
+ export type IconTileSize = NewIconTileSize | LegacyIconTileSize;
187
189
  export interface IconTileProps {
188
190
  /**
189
191
  * The icon to display
@@ -198,18 +200,39 @@ export interface IconTileProps {
198
200
  */
199
201
  appearance: IconTileAppearance;
200
202
  /**
201
- * Size of the tile, in pixels. Defaults to "24".
202
- * In a future release, semantic names will be introduced, and number values will be deprecated.
203
+ * Size of the tile, in pixels. Defaults to `24`.
204
+ *
205
+ * Now supports both semantic t-shirt size names and pixel number values. Pixel number values are deprecated and will be removed in a future release, however they will both be available and backwards-compatible during a transition period.
206
+ *
207
+ * Size `16` will not have a replacement after deprecation, and should be replaced with direct icons without a tile or enlarging to the next available size `xsmall`.
208
+ *
209
+ * All available sizes:
210
+ * - `16` (deprecated)
211
+ * - `xsmall` (new)
212
+ * - `small` or `24`
213
+ * - `medium` or `32`
214
+ * - `large` or `40`
215
+ * - `xlarge` or `48`
203
216
  */
204
217
  size?: IconTileSize;
205
218
  /**
206
219
  * Shape of the tile background. Defaults to "square"
220
+ * @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.
221
+ * 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
222
+ * implement alternatives.
207
223
  */
208
224
  shape?: 'square' | 'circle';
209
225
  /**
210
226
  * Legacy component to render when the icon refresh feature flag is turned off.
227
+ * @deprecated This prop is deprecated and will be removed in a future version.
211
228
  */
212
229
  LEGACY_fallbackComponent?: ReactElement;
230
+ /**
231
+ * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
232
+ *
233
+ * This prop is temporary, and will be used by ADS to safely rollout alternatives as circle shaped icon tiles are deprecated.
234
+ */
235
+ UNSAFE_circleReplacementComponent?: ReactElement;
213
236
  /**
214
237
  * A unique string that appears as a data attribute `data-testid` in the rendered code,
215
238
  * serving as a hook for automated tests.
@@ -0,0 +1,24 @@
1
+ # Prop guidance
2
+
3
+ - **label** - Always provide descriptive text for accessibility
4
+ - **size** - Use default 16px unless design requires different
5
+ - **color** - Use design tokens for consistent theming
6
+
7
+ # Translating from Tailwind
8
+
9
+ An example diff of a migration from Tailwind generated code to ADS generated code.
10
+
11
+ ```diff
12
+ +import AddIcon from '@atlaskit/icon/core/add';
13
+ -<div className="w-4 h-4 text-blue-600">
14
+ - <svg>...</svg>
15
+ -</div>
16
+ +<AddIcon label="Add item" />
17
+
18
+ -<span className="inline-flex items-center">
19
+ - <svg className="w-4 h-4 mr-2">...</svg>
20
+ - Text
21
+ -</span>
22
+ +<AddIcon label="Add item" />
23
+ +Text
24
+ ```
@@ -0,0 +1,27 @@
1
+ # Prop guidance
2
+
3
+ - **icon** - The icon component to display
4
+ - **label** - Required descriptive label for accessibility
5
+ - **appearance** - Color appearance (blue, green, red, etc.)
6
+ - **shape** - Circle or square tile shape
7
+ - **size** - Tile size in pixels (16, 24, 32, 40, 48)
8
+
9
+ # Translating from Tailwind
10
+
11
+ An example diff of a migration from Tailwind generated code to ADS generated code.
12
+
13
+ ```diff
14
+ +import { IconTile } from '@atlaskit/icon';
15
+ +import AddIcon from '@atlaskit/icon/core/add';
16
+ +import CheckMarkIcon from '@atlaskit/icon/core/check-mark';
17
+
18
+ -<div className="w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center">
19
+ - <AddIcon className="w-4 h-4 text-white" />
20
+ -</div>
21
+ +<IconTile icon={AddIcon} label="Add icon" appearance="blue" shape="circle" size="24" />
22
+
23
+ -<div className="w-8 h-8 bg-green-500 rounded-lg flex items-center justify-center">
24
+ - <CheckIcon className="w-5 h-5 text-white" />
25
+ -</div>
26
+ +<IconTile icon={CheckMarkIcon} label="Success icon" appearance="green" shape="square" size="32" />
27
+ ```
package/offerings.json ADDED
@@ -0,0 +1,69 @@
1
+ [
2
+ {
3
+ "name": "Icon",
4
+ "package": "@atlaskit/icon",
5
+ "import": {
6
+ "name": "Icon",
7
+ "package": "@atlaskit/icon",
8
+ "type": "default"
9
+ },
10
+ "keywords": ["icon", "symbol", "command", "device", "directory", "action", "visual"],
11
+ "categories": ["images-and-icons"],
12
+ "shortDescription": "An icon is a symbol representing a command, device, directory, or common action.",
13
+ "status": "general-availability",
14
+ "accessibilityGuidelines": [
15
+ "Provide appropriate alt text or labels for icons",
16
+ "Use meaningful icon choices that convey clear meaning",
17
+ "Ensure sufficient color contrast for icon visibility",
18
+ "Consider icon size for touch targets",
19
+ "Use consistent iconography across the interface"
20
+ ],
21
+ "usageGuidelines": [
22
+ "Use icons to enhance visual communication",
23
+ "Choose icons that clearly represent their function",
24
+ "Maintain consistent icon style and size",
25
+ "Use appropriate icon sizes for different contexts",
26
+ "Consider cultural and contextual icon meanings"
27
+ ],
28
+ "contentGuidelines": [
29
+ "Use clear, recognizable icon symbols",
30
+ "Ensure icons are culturally appropriate",
31
+ "Maintain visual consistency across icon sets",
32
+ "Use appropriate icon labels and descriptions"
33
+ ],
34
+ "generativeInstructions": "./docs/ai/icon-instructions.md",
35
+ "examples": ["./examples/ai/icon.tsx"]
36
+ },
37
+ {
38
+ "name": "IconTile",
39
+ "package": "@atlaskit/icon",
40
+ "import": {
41
+ "name": "IconTile",
42
+ "package": "@atlaskit/icon",
43
+ "type": "named"
44
+ },
45
+ "keywords": ["icon", "tile", "container", "background", "shape", "appearance"],
46
+ "categories": ["images-and-icons"],
47
+ "shortDescription": "A tile component that displays an icon with customizable background, shape, and appearance.",
48
+ "status": "release-candidate",
49
+ "accessibilityGuidelines": [
50
+ "Provide appropriate labels for icon tiles",
51
+ "Ensure sufficient color contrast",
52
+ "Use meaningful icon choices",
53
+ "Consider touch target sizes"
54
+ ],
55
+ "usageGuidelines": [
56
+ "Use for icon presentation with background styling",
57
+ "Choose appropriate shapes and appearances",
58
+ "Maintain consistent sizing across tiles",
59
+ "Use for visual emphasis or categorization"
60
+ ],
61
+ "contentGuidelines": [
62
+ "Use clear, recognizable icons",
63
+ "Choose appropriate colors and shapes",
64
+ "Ensure visual consistency across tiles"
65
+ ],
66
+ "generativeInstructions": "./docs/ai/icon-tile-instructions.md",
67
+ "examples": ["./examples/ai/icon-tile.tsx"]
68
+ }
69
+ ]