@atlaskit/icon 34.4.0 → 34.6.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 (43) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/afm-cc/tsconfig.json +0 -1
  3. package/afm-products/tsconfig.json +0 -1
  4. package/core/ai-generative-text-summary.js +2 -2
  5. package/core/briefcase.js +2 -2
  6. package/core/chart-pie.js +2 -2
  7. package/core/customize.js +2 -2
  8. package/core/filter.js +2 -2
  9. package/core/paint-bucket.js +2 -2
  10. package/dist/cjs/components/icon-tile/icon-tile-new.js +1 -16
  11. package/dist/cjs/components/icon-tile/icon-tile-old.compiled.css +0 -2
  12. package/dist/cjs/components/icon-tile/icon-tile-old.js +2 -9
  13. package/dist/cjs/components/icon-tile/icon-tile.compiled.css +13 -0
  14. package/dist/cjs/components/icon-tile/icon-tile.js +91 -0
  15. package/dist/cjs/components/icon-tile/index.js +22 -62
  16. package/dist/es2019/components/icon-tile/icon-tile-new.js +1 -16
  17. package/dist/es2019/components/icon-tile/icon-tile-old.compiled.css +0 -2
  18. package/dist/es2019/components/icon-tile/icon-tile-old.js +2 -9
  19. package/dist/es2019/components/icon-tile/icon-tile.compiled.css +13 -0
  20. package/dist/es2019/components/icon-tile/icon-tile.js +83 -0
  21. package/dist/es2019/components/icon-tile/index.js +21 -61
  22. package/dist/esm/components/icon-tile/icon-tile-new.js +1 -16
  23. package/dist/esm/components/icon-tile/icon-tile-old.compiled.css +0 -2
  24. package/dist/esm/components/icon-tile/icon-tile-old.js +2 -9
  25. package/dist/esm/components/icon-tile/icon-tile.compiled.css +13 -0
  26. package/dist/esm/components/icon-tile/icon-tile.js +82 -0
  27. package/dist/esm/components/icon-tile/index.js +21 -60
  28. package/dist/types/components/icon-tile/icon-tile.d.ts +7 -0
  29. package/dist/types/components/icon-tile/index.d.ts +1 -1
  30. package/dist/types/entry-points/types.d.ts +1 -1
  31. package/dist/types/types.d.ts +29 -25
  32. package/dist/types-ts4.5/components/icon-tile/icon-tile.d.ts +7 -0
  33. package/dist/types-ts4.5/components/icon-tile/index.d.ts +1 -1
  34. package/dist/types-ts4.5/entry-points/types.d.ts +1 -1
  35. package/dist/types-ts4.5/types.d.ts +29 -25
  36. package/package.json +4 -10
  37. package/svgs/core/ai-generative-text-summary.svg +1 -1
  38. package/svgs/core/briefcase.svg +1 -1
  39. package/svgs/core/chart-pie.svg +1 -1
  40. package/svgs/core/customize.svg +1 -1
  41. package/svgs/core/filter.svg +1 -1
  42. package/svgs/core/paint-bucket.svg +1 -1
  43. package/afm-jira/tsconfig.json +0 -34
@@ -1,74 +1,34 @@
1
1
  import React from 'react';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
- // Import both versions
4
- import IconTileNew from './icon-tile-new';
3
+ import IconTileNew from './icon-tile';
5
4
  import IconTileOld from './icon-tile-old';
6
5
 
7
- // Color mapping for size 16 standalone icons that will no longer be tiles
8
- const appearanceToIconColorMap = {
9
- blue: "var(--ds-icon-accent-blue, #357DE8)",
10
- blueBold: "var(--ds-icon-accent-blue, #357DE8)",
11
- gray: "var(--ds-icon-accent-gray, #7D818A)",
12
- grayBold: "var(--ds-icon-accent-gray, #7D818A)",
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, #E06C00)",
20
- orangeBold: "var(--ds-icon-accent-orange, #E06C00)",
21
- purple: "var(--ds-icon-accent-purple, #AF59E1)",
22
- purpleBold: "var(--ds-icon-accent-purple, #AF59E1)",
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
6
  /**
32
7
  * __IconTile__
33
8
  *
34
9
  * An icon with background shape, color, and size properties determined by Tile.
35
10
  */
36
- export default function IconTile({
37
- appearance,
38
- icon: Icon,
39
- label,
40
- size,
41
- testId,
42
- shape,
43
- UNSAFE_circleReplacementComponent
44
- }) {
45
- if (UNSAFE_circleReplacementComponent && shape === 'circle' && (fg('platform_dst_icon_tile_circle_replacement') || fg('platform_dst_icon_tile_circle_replacement_stage2'))) {
46
- return UNSAFE_circleReplacementComponent;
47
- }
48
- if (shape !== 'circle' && (fg('platform_dst_new_icon_tile') || fg('platform_dst_new_icon_tile_stage2'))) {
49
- // Handle size 16 - render icon directly without Tile
50
- if (size === '16') {
51
- return /*#__PURE__*/React.createElement(Icon, {
52
- color: appearanceToIconColorMap[appearance],
53
- label: label,
54
- testId: testId
55
- });
56
- }
11
+ export default function IconTile(props) {
12
+ if (props.shape === 'circle' && (fg('platform_dst_icon_tile_circle_replacement') || fg('platform_dst_icon_tile_circle_replacement_stage2'))) {
13
+ return props.UNSAFE_circleReplacementComponent;
14
+ } else if (props.shape === 'circle') {
15
+ return /*#__PURE__*/React.createElement(IconTileOld, {
16
+ appearance: props.appearance,
17
+ icon: props.icon,
18
+ label: props.label,
19
+ shape: 'circle',
20
+ size: props.size,
21
+ testId: props.testId,
22
+ UNSAFE_circleReplacementComponent: props.UNSAFE_circleReplacementComponent
23
+ });
24
+ } else {
57
25
  return /*#__PURE__*/React.createElement(IconTileNew, {
58
- appearance: appearance,
59
- icon: Icon,
60
- label: label,
61
- shape: shape,
62
- size: size,
63
- testId: testId
26
+ appearance: props.appearance,
27
+ icon: props.icon,
28
+ label: props.label,
29
+ shape: props.shape,
30
+ size: props.size,
31
+ testId: props.testId
64
32
  });
65
33
  }
66
- return /*#__PURE__*/React.createElement(IconTileOld, {
67
- appearance: appearance,
68
- icon: Icon,
69
- label: label,
70
- shape: shape,
71
- size: size,
72
- testId: testId
73
- });
74
34
  }
@@ -3,21 +3,6 @@ import "./icon-tile-new.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import Tile from '@atlaskit/tile';
6
- var sizeCrossCompatibleMap = {
7
- // Size mapping from old pixel sizes to new t-shirt sizes
8
- '16': 'xsmall',
9
- // Not used
10
- '24': 'small',
11
- '32': 'medium',
12
- '40': 'large',
13
- '48': 'xlarge',
14
- xsmall: 'xsmall',
15
- small: 'small',
16
- medium: 'medium',
17
- large: 'large',
18
- xlarge: 'xlarge'
19
- };
20
-
21
6
  // Icon color mapping for Tile-based icons
22
7
  var iconColorMap = {
23
8
  blue: "_syaz6txe",
@@ -80,7 +65,7 @@ export default function IconTileNew(props) {
80
65
  testId = props.testId;
81
66
  var ExpandedIcon = Icon;
82
67
  return /*#__PURE__*/React.createElement(Tile, {
83
- size: sizeCrossCompatibleMap[size],
68
+ size: size,
84
69
  backgroundColor: backgroundColorMap[appearance],
85
70
  label: label,
86
71
  testId: testId
@@ -3,7 +3,6 @@
3
3
  ._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}._1bah1h6o{justify-content:center}
4
4
  ._1bsb1tcg{width:24px}
5
5
  ._1bsb1ylp{width:40px}
6
- ._1bsb7vkz{width:1pc}
7
6
  ._1bsbckbl{width:3pc}
8
7
  ._1bsbgktf{width:20px}
9
8
  ._1bsbzwfg{width:2pc}
@@ -12,7 +11,6 @@
12
11
  ._4cvr1h6o{align-items:center}
13
12
  ._4t3i1tcg{height:24px}
14
13
  ._4t3i1ylp{height:40px}
15
- ._4t3i7vkz{height:1pc}
16
14
  ._4t3ickbl{height:3pc}
17
15
  ._4t3igktf{height:20px}
18
16
  ._4t3izwfg{height:2pc}
@@ -3,20 +3,13 @@ import "./icon-tile-old.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  var sizeCrossCompatibleMap = {
6
- // Size mapping from new t-shirt sizes to old pixel sizes
7
6
  xsmall: '20',
8
7
  small: '24',
9
8
  medium: '32',
10
9
  large: '40',
11
- xlarge: '48',
12
- '16': '16',
13
- '24': '24',
14
- '32': '32',
15
- '40': '40',
16
- '48': '48'
10
+ xlarge: '48'
17
11
  };
18
12
  var sizeMap = {
19
- '16': "_1bsb7vkz _4t3i7vkz",
20
13
  '20': "_1bsbgktf _4t3igktf",
21
14
  '24': "_1bsb1tcg _4t3i1tcg",
22
15
  '32': "_1bsbzwfg _4t3izwfg",
@@ -61,7 +54,7 @@ export default function IconTile(props) {
61
54
  label = props.label,
62
55
  appearance = props.appearance,
63
56
  _props$size = props.size,
64
- size = _props$size === void 0 ? '24' : _props$size,
57
+ size = _props$size === void 0 ? 'medium' : _props$size,
65
58
  _props$shape = props.shape,
66
59
  shape = _props$shape === void 0 ? 'square' : _props$shape,
67
60
  testId = props.testId;
@@ -0,0 +1,13 @@
1
+ ._syaz17hp{color:var(--ds-icon-accent-green,#22a06b)}
2
+ ._syaz1j6y{color:var(--ds-icon-accent-orange,#e06c00)}
3
+ ._syaz1oqg{color:var(--ds-icon-accent-yellow,#b38600)}
4
+ ._syaz1q3r{color:var(--ds-icon,#292a2e)}
5
+ ._syaz5w2r{color:var(--ds-icon-inverse,#fff)}
6
+ ._syaz6txe{color:var(--ds-icon-accent-blue,#357de8)}
7
+ ._syaz8645{color:var(--ds-icon-accent-lime,#6a9a23)}
8
+ ._syaz8uof{color:var(--ds-icon-accent-teal,#2898bd)}
9
+ ._syazdgkc{color:var(--ds-icon-subtle,#505258)}
10
+ ._syaznbxb{color:var(--ds-icon-accent-red,#c9372c)}
11
+ ._syazuq3u{color:var(--ds-icon-accent-purple,#af59e1)}
12
+ ._syazv8hk{color:var(--ds-icon-accent-magenta,#cd519d)}
13
+ ._vwz4idpf{line-height:0}
@@ -0,0 +1,82 @@
1
+ /* icon-tile.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import "./icon-tile.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import Tile from '@atlaskit/tile';
6
+ // Icon color mapping for Tile-based icons
7
+ var iconColorMap = {
8
+ blue: "_syaz6txe",
9
+ blueBold: "_syaz1q3r",
10
+ gray: "_syazdgkc",
11
+ grayBold: "_syaz5w2r",
12
+ green: "_syaz17hp",
13
+ greenBold: "_syaz1q3r",
14
+ lime: "_syaz8645",
15
+ limeBold: "_syaz1q3r",
16
+ magenta: "_syazv8hk",
17
+ magentaBold: "_syaz1q3r",
18
+ orange: "_syaz1j6y",
19
+ orangeBold: "_syaz1q3r",
20
+ purple: "_syazuq3u",
21
+ purpleBold: "_syaz1q3r",
22
+ red: "_syaznbxb",
23
+ redBold: "_syaz1q3r",
24
+ teal: "_syaz8uof",
25
+ tealBold: "_syaz1q3r",
26
+ yellow: "_syaz1oqg",
27
+ yellowBold: "_syaz1q3r"
28
+ };
29
+ var iconWrapperStyles = {
30
+ root: "_vwz4idpf"
31
+ };
32
+
33
+ // Background color mapping for Tile component
34
+ var backgroundColorMap = {
35
+ blue: undefined,
36
+ blueBold: 'color.background.accent.blue.subtle',
37
+ gray: undefined,
38
+ grayBold: 'color.background.neutral.bold',
39
+ green: undefined,
40
+ greenBold: 'color.background.accent.green.subtle',
41
+ lime: undefined,
42
+ limeBold: 'color.background.accent.lime.subtle',
43
+ magenta: undefined,
44
+ magentaBold: 'color.background.accent.magenta.subtle',
45
+ orange: undefined,
46
+ orangeBold: 'color.background.accent.orange.subtle',
47
+ purple: undefined,
48
+ purpleBold: 'color.background.accent.purple.subtle',
49
+ red: undefined,
50
+ redBold: 'color.background.accent.red.subtle',
51
+ teal: undefined,
52
+ tealBold: 'color.background.accent.teal.subtle',
53
+ yellow: undefined,
54
+ yellowBold: 'color.background.accent.yellow.subtle'
55
+ };
56
+
57
+ /**
58
+ * __IconTile__
59
+ *
60
+ * An icon with background shape, color, and size properties determined by Tile.
61
+ */
62
+ export default function IconTileNew(props) {
63
+ var Icon = props.icon,
64
+ label = props.label,
65
+ appearance = props.appearance,
66
+ _props$size = props.size,
67
+ size = _props$size === void 0 ? 'medium' : _props$size,
68
+ testId = props.testId;
69
+ var ExpandedIcon = Icon;
70
+ return /*#__PURE__*/React.createElement(Tile, {
71
+ size: size,
72
+ backgroundColor: backgroundColorMap[appearance],
73
+ label: label,
74
+ testId: testId
75
+ }, /*#__PURE__*/React.createElement("span", {
76
+ className: ax([iconColorMap[appearance], iconWrapperStyles.root])
77
+ }, /*#__PURE__*/React.createElement(ExpandedIcon, {
78
+ color: "currentColor",
79
+ label: "",
80
+ shouldScale: true
81
+ })));
82
+ }
@@ -1,73 +1,34 @@
1
1
  import React from 'react';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
- // Import both versions
4
- import IconTileNew from './icon-tile-new';
3
+ import IconTileNew from './icon-tile';
5
4
  import IconTileOld from './icon-tile-old';
6
5
 
7
- // Color mapping for size 16 standalone icons that will no longer be tiles
8
- var appearanceToIconColorMap = {
9
- blue: "var(--ds-icon-accent-blue, #357DE8)",
10
- blueBold: "var(--ds-icon-accent-blue, #357DE8)",
11
- gray: "var(--ds-icon-accent-gray, #7D818A)",
12
- grayBold: "var(--ds-icon-accent-gray, #7D818A)",
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, #E06C00)",
20
- orangeBold: "var(--ds-icon-accent-orange, #E06C00)",
21
- purple: "var(--ds-icon-accent-purple, #AF59E1)",
22
- purpleBold: "var(--ds-icon-accent-purple, #AF59E1)",
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
6
  /**
32
7
  * __IconTile__
33
8
  *
34
9
  * An icon with background shape, color, and size properties determined by Tile.
35
10
  */
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
- UNSAFE_circleReplacementComponent = _ref.UNSAFE_circleReplacementComponent;
44
- if (UNSAFE_circleReplacementComponent && shape === 'circle' && (fg('platform_dst_icon_tile_circle_replacement') || fg('platform_dst_icon_tile_circle_replacement_stage2'))) {
45
- return UNSAFE_circleReplacementComponent;
46
- }
47
- if (shape !== 'circle' && (fg('platform_dst_new_icon_tile') || fg('platform_dst_new_icon_tile_stage2'))) {
48
- // Handle size 16 - render icon directly without Tile
49
- if (size === '16') {
50
- return /*#__PURE__*/React.createElement(Icon, {
51
- color: appearanceToIconColorMap[appearance],
52
- label: label,
53
- testId: testId
54
- });
55
- }
11
+ export default function IconTile(props) {
12
+ if (props.shape === 'circle' && (fg('platform_dst_icon_tile_circle_replacement') || fg('platform_dst_icon_tile_circle_replacement_stage2'))) {
13
+ return props.UNSAFE_circleReplacementComponent;
14
+ } else if (props.shape === 'circle') {
15
+ return /*#__PURE__*/React.createElement(IconTileOld, {
16
+ appearance: props.appearance,
17
+ icon: props.icon,
18
+ label: props.label,
19
+ shape: 'circle',
20
+ size: props.size,
21
+ testId: props.testId,
22
+ UNSAFE_circleReplacementComponent: props.UNSAFE_circleReplacementComponent
23
+ });
24
+ } else {
56
25
  return /*#__PURE__*/React.createElement(IconTileNew, {
57
- appearance: appearance,
58
- icon: Icon,
59
- label: label,
60
- shape: shape,
61
- size: size,
62
- testId: testId
26
+ appearance: props.appearance,
27
+ icon: props.icon,
28
+ label: props.label,
29
+ shape: props.shape,
30
+ size: props.size,
31
+ testId: props.testId
63
32
  });
64
33
  }
65
- return /*#__PURE__*/React.createElement(IconTileOld, {
66
- appearance: appearance,
67
- icon: Icon,
68
- label: label,
69
- shape: shape,
70
- size: size,
71
- testId: testId
72
- });
73
34
  }
@@ -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;
@@ -5,4 +5,4 @@ import { type IconTileProps } from '../../types';
5
5
  *
6
6
  * An icon with background shape, color, and size properties determined by Tile.
7
7
  */
8
- export default function IconTile({ appearance, icon: Icon, label, size, testId, shape, UNSAFE_circleReplacementComponent, }: IconTileProps): React.JSX.Element;
8
+ export default function IconTile(props: IconTileProps): React.JSX.Element;
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, IconSize, IconSpacing, IconTileAppearance, IconTileProps, IconTileSize, LEGACY_Metadata, LegacyIconTileSize, NewCoreIconProps, NewGlyphColorProps, NewIconProps, NewIconTileSize, SVGProps, Size, SkeletonProps, UNSAFE_NewCoreGlyphProps, UNSAFE_NewGlyphProps, } from '../types';
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';
@@ -135,10 +135,8 @@ export type NewCoreIconProps = Omit<UNSAFE_NewCoreGlyphProps, 'dangerouslySetGly
135
135
  export type UNSAFE_NewGlyphProps = UNSAFE_NewCoreGlyphProps;
136
136
  export type NewIconProps = Omit<UNSAFE_NewGlyphProps, 'dangerouslySetGlyph'>;
137
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 NewIconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
139
- export type LegacyIconTileSize = '16' | '24' | '32' | '40' | '48';
140
- export type IconTileSize = NewIconTileSize | LegacyIconTileSize;
141
- export interface IconTileProps {
138
+ export type IconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
139
+ interface IconTileBaseProps {
142
140
  /**
143
141
  * The icon to display
144
142
  */
@@ -152,40 +150,46 @@ export interface IconTileProps {
152
150
  */
153
151
  appearance: IconTileAppearance;
154
152
  /**
155
- * Size of the tile, in pixels. Defaults to `24`.
153
+ * Size of the tile. Defaults to `medium`.
156
154
  *
157
- * 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.
158
- *
159
- * 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`.
160
- *
161
- * All available sizes:
162
- * - `16` (deprecated)
163
- * - `xsmall` (new)
164
- * - `small` or `24`
165
- * - `medium` or `32`
166
- * - `large` or `40`
167
- * - `xlarge` or `48`
155
+ * Available sizes: `xsmall`, `small`, `medium`, `large`, `xlarge`.
168
156
  */
169
157
  size?: IconTileSize;
170
158
  /**
171
- * Shape of the tile background. Defaults to "square"
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.
172
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.
173
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
174
181
  * implement alternatives.
175
182
  */
176
- shape?: 'square' | 'circle';
183
+ shape: 'circle';
177
184
  /**
178
185
  * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
179
186
  *
180
- * This prop is temporary, and will be used by ADS to safely rollout alternatives as circle shaped icon tiles are deprecated.
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.
181
189
  */
182
- UNSAFE_circleReplacementComponent?: ReactElement;
183
- /**
184
- * A unique string that appears as a data attribute `data-testid` in the rendered code,
185
- * serving as a hook for automated tests.
186
- */
187
- testId?: string;
190
+ UNSAFE_circleReplacementComponent: ReactElement;
188
191
  }
192
+ export type IconTileProps = IconTileSquareProps | IconTileCircleProps;
189
193
  export interface SkeletonProps {
190
194
  color?: string;
191
195
  size?: Size;
@@ -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;
@@ -5,4 +5,4 @@ import { type IconTileProps } from '../../types';
5
5
  *
6
6
  * An icon with background shape, color, and size properties determined by Tile.
7
7
  */
8
- export default function IconTile({ appearance, icon: Icon, label, size, testId, shape, UNSAFE_circleReplacementComponent, }: IconTileProps): React.JSX.Element;
8
+ export default function IconTile(props: IconTileProps): React.JSX.Element;
@@ -1 +1 @@
1
- export type { CustomGlyphProps, GlyphProps, IconProps, IconSize, IconSpacing, IconTileAppearance, IconTileProps, IconTileSize, LEGACY_Metadata, LegacyIconTileSize, NewCoreIconProps, NewGlyphColorProps, NewIconProps, NewIconTileSize, SVGProps, Size, SkeletonProps, UNSAFE_NewCoreGlyphProps, UNSAFE_NewGlyphProps, } from '../types';
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';
@@ -135,10 +135,8 @@ export type NewCoreIconProps = Omit<UNSAFE_NewCoreGlyphProps, 'dangerouslySetGly
135
135
  export type UNSAFE_NewGlyphProps = UNSAFE_NewCoreGlyphProps;
136
136
  export type NewIconProps = Omit<UNSAFE_NewGlyphProps, 'dangerouslySetGlyph'>;
137
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 NewIconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
139
- export type LegacyIconTileSize = '16' | '24' | '32' | '40' | '48';
140
- export type IconTileSize = NewIconTileSize | LegacyIconTileSize;
141
- export interface IconTileProps {
138
+ export type IconTileSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
139
+ interface IconTileBaseProps {
142
140
  /**
143
141
  * The icon to display
144
142
  */
@@ -152,40 +150,46 @@ export interface IconTileProps {
152
150
  */
153
151
  appearance: IconTileAppearance;
154
152
  /**
155
- * Size of the tile, in pixels. Defaults to `24`.
153
+ * Size of the tile. Defaults to `medium`.
156
154
  *
157
- * 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.
158
- *
159
- * 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`.
160
- *
161
- * All available sizes:
162
- * - `16` (deprecated)
163
- * - `xsmall` (new)
164
- * - `small` or `24`
165
- * - `medium` or `32`
166
- * - `large` or `40`
167
- * - `xlarge` or `48`
155
+ * Available sizes: `xsmall`, `small`, `medium`, `large`, `xlarge`.
168
156
  */
169
157
  size?: IconTileSize;
170
158
  /**
171
- * Shape of the tile background. Defaults to "square"
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.
172
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.
173
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
174
181
  * implement alternatives.
175
182
  */
176
- shape?: 'square' | 'circle';
183
+ shape: 'circle';
177
184
  /**
178
185
  * A component to render in place of circle shaped icon tiles, swapped out with a feature flag.
179
186
  *
180
- * This prop is temporary, and will be used by ADS to safely rollout alternatives as circle shaped icon tiles are deprecated.
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.
181
189
  */
182
- UNSAFE_circleReplacementComponent?: ReactElement;
183
- /**
184
- * A unique string that appears as a data attribute `data-testid` in the rendered code,
185
- * serving as a hook for automated tests.
186
- */
187
- testId?: string;
190
+ UNSAFE_circleReplacementComponent: ReactElement;
188
191
  }
192
+ export type IconTileProps = IconTileSquareProps | IconTileCircleProps;
189
193
  export interface SkeletonProps {
190
194
  color?: string;
191
195
  size?: Size;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "34.4.0",
3
+ "version": "34.6.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/"
@@ -65,14 +65,14 @@
65
65
  "@atlaskit/link": "^3.4.0",
66
66
  "@atlaskit/logo": "^20.1.0",
67
67
  "@atlaskit/menu": "^8.5.0",
68
- "@atlaskit/modal-dialog": "^14.18.0",
68
+ "@atlaskit/modal-dialog": "^15.0.0",
69
69
  "@atlaskit/primitives": "^19.0.0",
70
70
  "@atlaskit/section-message": "^8.12.0",
71
71
  "@atlaskit/textfield": "^8.3.0",
72
72
  "@atlaskit/theme": "^23.2.0",
73
73
  "@atlaskit/toggle": "^15.6.0",
74
- "@atlaskit/tooltip": "^22.0.0",
75
- "@atlassian/feature-flags-test-utils": "^1.0.0",
74
+ "@atlaskit/tooltip": "^22.2.0",
75
+ "@atlassian/feature-flags-test-utils": "^1.1.0",
76
76
  "@atlassian/react-compiler-gating": "workspace:^",
77
77
  "@atlassian/ssr-tests": "workspace:^",
78
78
  "@atlassian/structured-docs-types": "workspace:^",
@@ -120,12 +120,6 @@
120
120
  },
121
121
  "homepage": "https://atlassian.design/components/icon/",
122
122
  "platform-feature-flags": {
123
- "platform_dst_new_icon_tile": {
124
- "type": "boolean"
125
- },
126
- "platform_dst_new_icon_tile_stage2": {
127
- "type": "boolean"
128
- },
129
123
  "platform_dst_icon_tile_circle_replacement": {
130
124
  "type": "boolean"
131
125
  },
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M1 1h14v1.5H1zm0 4.166h14v1.5H1zm10.796 4.328a.75.75 0 0 1 1.41 0l.615 1.687 1.686.615a.75.75 0 0 1 0 1.41l-1.686.615-.615 1.686a.75.75 0 0 1-1.41 0l-.615-1.686-1.687-.615a.75.75 0 0 1 0-1.41l1.687-.615zM1 9.333h7v1.5H1zm0 4.166h5v1.5H1z" clip-rule="evenodd"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="M6 12.5V14H1v-1.5zm3.5-5.25v1.5H1v-1.5zM15 2v1.5H1V2zm-2.5 7a.75.75 0 0 1 .71.49l.61 1.69 1.69.62a.75.75 0 0 1 .49.7l-.01.12a.75.75 0 0 1-.48.59l-1.69.61-.61 1.69a.75.75 0 0 1-.59.48l-.12.01a.75.75 0 0 1-.7-.49l-.61-1.69-1.69-.61a.75.75 0 0 1-.48-.59L9 12.5a.75.75 0 0 1 .49-.7l1.69-.61.62-1.69a.75.75 0 0 1 .59-.48z"/></svg>
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M6 2.5a.5.5 0 0 0-.5.5v1h5V3a.5.5 0 0 0-.5-.5zM12 4V3a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v1H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM3 5.5a.5.5 0 0 0-.5.5v2h11V6a.5.5 0 0 0-.5-.5zm10.5 4H8.75V11h-1.5V9.5H2.5V13a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5z" clip-rule="evenodd"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="M14 10.555A13.4 13.4 0 0 1 8 12a13.4 13.4 0 0 1-6-1.445V13a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5zM14 6a.5.5 0 0 0-.5-.5h-11A.5.5 0 0 0 2 6v2.84q.056.036.121.075A11.9 11.9 0 0 0 8 10.5a11.9 11.9 0 0 0 5.879-1.585L14 8.84zm-4-3a.5.5 0 0 0-.5-.5h-3A.5.5 0 0 0 6 3v1h4zm1.5 1h2a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2V3a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2z"/><path fill="currentcolor" d="M8 8a.75.75 0 1 1 0 1.5A.75.75 0 0 1 8 8"/></svg>
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><mask id="mask0_66923_23419" 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_66923_23419)"><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_67965_18713" 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_67965_18713)"><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 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M3 2.375C3 1.615 3.616 1 4.375 1h1.75c.76 0 1.375.616 1.375 1.375v4.25C7.5 7.385 6.884 8 6.125 8h-1.75C3.615 8 3 7.384 3 6.625V5.25H0v-1.5h3zm1.5.125v4H6v-4zM16 5.25H8.5v-1.5H16zM8.5 9.375C8.5 8.615 9.116 8 9.875 8h1.75C12.385 8 13 8.616 13 9.375v1.375h3v1.5h-3v1.375c0 .76-.616 1.375-1.375 1.375h-1.75c-.76 0-1.375-.616-1.375-1.375zM10 9.5v4h1.5v-4zM0 12.25v-1.5h7.5v1.5z" clip-rule="evenodd"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="M7.5 10.5V12H0v-1.5zM16 4v1.5H8.5V4zm-5.5 8.75h1v-3h-1zM13 10.5h3V12h-3v.875c0 .76-.616 1.375-1.375 1.375h-1.25c-.76 0-1.375-.616-1.375-1.375v-3.25c0-.76.616-1.375 1.375-1.375h1.25c.76 0 1.375.616 1.375 1.375zM5.5 3.25h-1v3h1zM7 6.375c0 .76-.616 1.375-1.375 1.375h-1.25C3.615 7.75 3 7.134 3 6.375V5.5H0V4h3v-.875c0-.76.616-1.375 1.375-1.375h1.25C6.385 1.75 7 2.366 7 3.125z"/></svg>
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M15 3.5H1V2h14zm-2 5.25H3v-1.5h10zM11 14H5v-1.5h6z" clip-rule="evenodd"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="M11 12v1.5H5V12zm2-4.75v1.5H3v-1.5zm2-4.75V4H1V2.5z"/></svg>