@atlaskit/icon 25.7.0 → 26.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 (48) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/core/refresh.js +2 -2
  3. package/core/shapes.js +2 -2
  4. package/dist/cjs/components/icon-new.compiled.css +22 -0
  5. package/dist/cjs/components/icon-new.js +30 -84
  6. package/dist/cjs/components/icon-tile.compiled.css +48 -0
  7. package/dist/cjs/components/icon-tile.js +40 -125
  8. package/dist/cjs/components/icon.compiled.css +30 -0
  9. package/dist/cjs/components/icon.js +31 -76
  10. package/dist/cjs/components/skeleton.compiled.css +12 -0
  11. package/dist/cjs/components/skeleton.js +20 -24
  12. package/dist/cjs/components/svg.compiled.css +13 -0
  13. package/dist/cjs/components/svg.js +20 -17
  14. package/dist/es2019/components/icon-new.compiled.css +22 -0
  15. package/dist/es2019/components/icon-new.js +26 -82
  16. package/dist/es2019/components/icon-tile.compiled.css +48 -0
  17. package/dist/es2019/components/icon-tile.js +37 -124
  18. package/dist/es2019/components/icon.compiled.css +30 -0
  19. package/dist/es2019/components/icon.js +26 -77
  20. package/dist/es2019/components/skeleton.compiled.css +12 -0
  21. package/dist/es2019/components/skeleton.js +15 -21
  22. package/dist/es2019/components/svg.compiled.css +13 -0
  23. package/dist/es2019/components/svg.js +16 -15
  24. package/dist/esm/components/icon-new.compiled.css +22 -0
  25. package/dist/esm/components/icon-new.js +26 -82
  26. package/dist/esm/components/icon-tile.compiled.css +48 -0
  27. package/dist/esm/components/icon-tile.js +37 -124
  28. package/dist/esm/components/icon.compiled.css +30 -0
  29. package/dist/esm/components/icon.js +26 -77
  30. package/dist/esm/components/skeleton.compiled.css +12 -0
  31. package/dist/esm/components/skeleton.js +15 -21
  32. package/dist/esm/components/svg.compiled.css +13 -0
  33. package/dist/esm/components/svg.js +16 -15
  34. package/dist/types/components/icon-tile.d.ts +2 -2
  35. package/dist/types-ts4.5/components/icon-tile.d.ts +2 -2
  36. package/package.json +3 -5
  37. package/svgs/core/refresh.svg +1 -1
  38. package/svgs/core/shapes.svg +1 -1
  39. package/dist/cjs/components/styles.js +0 -64
  40. package/dist/cjs/components/utils.js +0 -9
  41. package/dist/es2019/components/styles.js +0 -58
  42. package/dist/es2019/components/utils.js +0 -1
  43. package/dist/esm/components/styles.js +0 -57
  44. package/dist/esm/components/utils.js +0 -3
  45. package/dist/types/components/styles.d.ts +0 -28
  46. package/dist/types/components/utils.d.ts +0 -1
  47. package/dist/types-ts4.5/components/styles.d.ts +0 -28
  48. package/dist/types-ts4.5/components/utils.d.ts +0 -1
@@ -0,0 +1,48 @@
1
+
2
+ ._2rko14q2{border-radius:var(--ds-border-radius-circle,2002pc)}
3
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}._1bah1h6o{justify-content:center}
4
+ ._1bsb1tcg{width:24px}
5
+ ._1bsb1ylp{width:40px}
6
+ ._1bsb7vkz{width:1pc}
7
+ ._1bsbckbl{width:3pc}
8
+ ._1bsbzwfg{width:2pc}
9
+ ._1e0c116y{display:inline-flex}
10
+ ._1wybidpf{font-size:0}
11
+ ._4cvr1h6o{align-items:center}
12
+ ._4t3i1tcg{height:24px}
13
+ ._4t3i1ylp{height:40px}
14
+ ._4t3i7vkz{height:1pc}
15
+ ._4t3ickbl{height:3pc}
16
+ ._4t3izwfg{height:2pc}
17
+ ._bfhk1a17{background-color:var(--ds-background-accent-teal-subtler,#c6edfb)}
18
+ ._bfhk1e5c{background-color:var(--ds-background-accent-green-bolder,#1f845a)}
19
+ ._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
20
+ ._bfhk1rtt{background-color:var(--ds-background-accent-red-subtler,#ffd5d2)}
21
+ ._bfhk1t1b{background-color:var(--ds-background-accent-gray-bolder,#626f86)}
22
+ ._bfhk1v33{background-color:var(--ds-background-accent-gray-subtler,#dcdfe4)}
23
+ ._bfhk1vop{background-color:var(--ds-background-accent-yellow-bolder,#946f00)}
24
+ ._bfhk1wnw{background-color:var(--ds-background-accent-green-subtler,#baf3db)}
25
+ ._bfhk2c8p{background-color:var(--ds-background-accent-teal-bolder,#227d9b)}
26
+ ._bfhk3fv2{background-color:var(--ds-background-accent-yellow-subtler,#f8e6a0)}
27
+ ._bfhk4v9p{background-color:var(--ds-background-accent-blue-subtler,#cce0ff)}
28
+ ._bfhkc3uk{background-color:var(--ds-background-accent-magenta-bolder,#ae4787)}
29
+ ._bfhkc8cv{background-color:var(--ds-background-accent-blue-bolder,#0c66e4)}
30
+ ._bfhkf2vu{background-color:var(--ds-background-accent-orange-subtler,#fedec8)}
31
+ ._bfhkjgng{background-color:var(--ds-background-accent-orange-bolder,#c25100)}
32
+ ._bfhktde4{background-color:var(--ds-background-accent-lime-bolder,#5b7f24)}
33
+ ._bfhkuibq{background-color:var(--ds-background-accent-red-bolder,#c9372c)}
34
+ ._bfhkv9ra{background-color:var(--ds-background-accent-magenta-subtler,#fdd0ec)}
35
+ ._bfhkygwo{background-color:var(--ds-background-accent-purple-bolder,#6e5dc6)}
36
+ ._bfhkz2ec{background-color:var(--ds-background-accent-lime-subtler,#d3f1a7)}
37
+ ._syaz16ni{color:var(--ds-icon-accent-gray,#758195)}
38
+ ._syaz17hp{color:var(--ds-icon-accent-green,#22a06b)}
39
+ ._syaz1oqg{color:var(--ds-icon-accent-yellow,#b38600)}
40
+ ._syaz1ov1{color:var(--ds-icon-accent-blue,#1d7afc)}
41
+ ._syaz5w2r{color:var(--ds-icon-inverse,#fff)}
42
+ ._syaz5yjc{color:var(--ds-icon-accent-purple,#8270db)}
43
+ ._syaz7r97{color:var(--ds-icon-accent-orange,#e56910)}
44
+ ._syaz8645{color:var(--ds-icon-accent-lime,#6a9a23)}
45
+ ._syaz8uof{color:var(--ds-icon-accent-teal,#2898bd)}
46
+ ._syaznbxb{color:var(--ds-icon-accent-red,#c9372c)}
47
+ ._syazv8hk{color:var(--ds-icon-accent-magenta,#cd519d)}
48
+ ._vchhusvi{box-sizing:border-box}
@@ -1,131 +1,42 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
1
+ /* icon-tile.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./icon-tile.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
8
5
  import { fg } from '@atlaskit/platform-feature-flags';
9
6
  var sizeMap = {
10
- '16': css({
11
- width: '16px',
12
- height: '16px'
13
- }),
14
- '24': css({
15
- width: '24px',
16
- height: '24px'
17
- }),
18
- '32': css({
19
- width: '32px',
20
- height: '32px'
21
- }),
22
- '40': css({
23
- width: '40px',
24
- height: '40px'
25
- }),
26
- '48': css({
27
- width: '48px',
28
- height: '48px'
29
- })
7
+ '16': "_1bsb7vkz _4t3i7vkz",
8
+ '24': "_1bsb1tcg _4t3i1tcg",
9
+ '32': "_1bsbzwfg _4t3izwfg",
10
+ '40': "_1bsb1ylp _4t3i1ylp",
11
+ '48': "_1bsbckbl _4t3ickbl"
30
12
  };
31
13
  var appearanceMap = {
32
- grayBold: css({
33
- backgroundColor: "var(--ds-background-accent-gray-bolder, #626F86)",
34
- color: "var(--ds-icon-inverse, #FFFFFF)"
35
- }),
36
- limeBold: css({
37
- backgroundColor: "var(--ds-background-accent-lime-bolder, #5B7F24)",
38
- color: "var(--ds-icon-inverse, #FFFFFF)"
39
- }),
40
- greenBold: css({
41
- backgroundColor: "var(--ds-background-accent-green-bolder, #1F845A)",
42
- color: "var(--ds-icon-inverse, #FFFFFF)"
43
- }),
44
- blueBold: css({
45
- backgroundColor: "var(--ds-background-accent-blue-bolder, #0C66E4)",
46
- color: "var(--ds-icon-inverse, #FFFFFF)"
47
- }),
48
- redBold: css({
49
- backgroundColor: "var(--ds-background-accent-red-bolder, #C9372C)",
50
- color: "var(--ds-icon-inverse, #FFFFFF)"
51
- }),
52
- purpleBold: css({
53
- backgroundColor: "var(--ds-background-accent-purple-bolder, #6E5DC6)",
54
- color: "var(--ds-icon-inverse, #FFFFFF)"
55
- }),
56
- magentaBold: css({
57
- backgroundColor: "var(--ds-background-accent-magenta-bolder, #AE4787)",
58
- color: "var(--ds-icon-inverse, #FFFFFF)"
59
- }),
60
- tealBold: css({
61
- backgroundColor: "var(--ds-background-accent-teal-bolder, #227D9B)",
62
- color: "var(--ds-icon-inverse, #FFFFFF)"
63
- }),
64
- orangeBold: css({
65
- backgroundColor: "var(--ds-background-accent-orange-bolder, #C25100)",
66
- color: "var(--ds-icon-inverse, #FFFFFF)"
67
- }),
68
- yellowBold: css({
69
- backgroundColor: "var(--ds-background-accent-yellow-bolder, #946F00)",
70
- color: "var(--ds-icon-inverse, #FFFFFF)"
71
- }),
72
- gray: css({
73
- backgroundColor: "var(--ds-background-accent-gray-subtler, #DCDFE4)",
74
- color: "var(--ds-icon-accent-gray, #758195)"
75
- }),
76
- lime: css({
77
- backgroundColor: "var(--ds-background-accent-lime-subtler, #D3F1A7)",
78
- color: "var(--ds-icon-accent-lime, #6A9A23)"
79
- }),
80
- orange: css({
81
- backgroundColor: "var(--ds-background-accent-orange-subtler, #FEDEC8)",
82
- color: "var(--ds-icon-accent-orange, #E56910)"
83
- }),
84
- magenta: css({
85
- backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)",
86
- color: "var(--ds-icon-accent-magenta, #CD519D)"
87
- }),
88
- green: css({
89
- backgroundColor: "var(--ds-background-accent-green-subtler, #BAF3DB)",
90
- color: "var(--ds-icon-accent-green, #22A06B)"
91
- }),
92
- blue: css({
93
- backgroundColor: "var(--ds-background-accent-blue-subtler, #CCE0FF)",
94
- color: "var(--ds-icon-accent-blue, #1D7AFC)"
95
- }),
96
- red: css({
97
- backgroundColor: "var(--ds-background-accent-red-subtler, #FFD5D2)",
98
- color: "var(--ds-icon-accent-red, #C9372C)"
99
- }),
100
- purple: css({
101
- backgroundColor: "var(--ds-background-accent-purple-subtler, #DFD8FD)",
102
- color: "var(--ds-icon-accent-purple, #8270DB)"
103
- }),
104
- teal: css({
105
- backgroundColor: "var(--ds-background-accent-teal-subtler, #C6EDFB)",
106
- color: "var(--ds-icon-accent-teal, #2898BD)"
107
- }),
108
- yellow: css({
109
- backgroundColor: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
110
- color: "var(--ds-icon-accent-yellow, #B38600)"
111
- })
14
+ grayBold: "_bfhk1t1b _syaz5w2r",
15
+ limeBold: "_bfhktde4 _syaz5w2r",
16
+ greenBold: "_bfhk1e5c _syaz5w2r",
17
+ blueBold: "_bfhkc8cv _syaz5w2r",
18
+ redBold: "_bfhkuibq _syaz5w2r",
19
+ purpleBold: "_bfhkygwo _syaz5w2r",
20
+ magentaBold: "_bfhkc3uk _syaz5w2r",
21
+ tealBold: "_bfhk2c8p _syaz5w2r",
22
+ orangeBold: "_bfhkjgng _syaz5w2r",
23
+ yellowBold: "_bfhk1vop _syaz5w2r",
24
+ gray: "_bfhk1v33 _syaz16ni",
25
+ lime: "_bfhkz2ec _syaz8645",
26
+ orange: "_bfhkf2vu _syaz7r97",
27
+ magenta: "_bfhkv9ra _syazv8hk",
28
+ green: "_bfhk1wnw _syaz17hp",
29
+ blue: "_bfhk4v9p _syaz1ov1",
30
+ red: "_bfhk1rtt _syaznbxb",
31
+ purple: "_bfhk1jkz _syaz5yjc",
32
+ teal: "_bfhk1a17 _syaz8uof",
33
+ yellow: "_bfhk3fv2 _syaz1oqg"
112
34
  };
113
35
  var shapeMap = {
114
- square: css({
115
- borderRadius: "var(--ds-border-radius-100, 4px)"
116
- }),
117
- circle: css({
118
- borderRadius: "var(--ds-border-radius-circle, 32032px)"
119
- })
36
+ square: "_2rkoiti9",
37
+ circle: "_2rko14q2"
120
38
  };
121
- var iconTileStyles = css({
122
- display: 'inline-flex',
123
- boxSizing: 'border-box',
124
- alignItems: 'center',
125
- justifyContent: 'center',
126
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
127
- fontSize: 0 /* Prevents parent font-size from affecting the container */
128
- });
39
+ var iconTileStyles = null;
129
40
 
130
41
  /**
131
42
  * __IconTile__ -- ⚠️ Experimental ⚠️
@@ -147,13 +58,15 @@ export default function IconTile(props) {
147
58
  LEGACY_fallbackComponent = props.LEGACY_fallbackComponent,
148
59
  testId = props.testId;
149
60
  var ExpandedIcon = Icon;
61
+
62
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
150
63
  if (LEGACY_fallbackComponent && !fg('platform-visual-refresh-icons')) {
151
64
  return LEGACY_fallbackComponent;
152
65
  } else {
153
- return jsx("span", {
66
+ return /*#__PURE__*/React.createElement("span", {
154
67
  "data-testid": testId,
155
- css: [iconTileStyles, appearanceMap[appearance], sizeMap[size], shapeMap[shape]]
156
- }, jsx(ExpandedIcon, {
68
+ className: ax(["_1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1wybidpf", appearanceMap[appearance], sizeMap[size], shapeMap[shape]])
69
+ }, /*#__PURE__*/React.createElement(ExpandedIcon, {
157
70
  color: "currentColor",
158
71
  label: label,
159
72
  spacing: "spacious",
@@ -0,0 +1,30 @@
1
+ ._17jb1osq >svg{max-height:100%}
2
+ ._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._1kg81r31 >svg stop{stop-color:currentColor}
8
+ ._1ksvoz0e >svg{color:var(--icon-primary-color)}
9
+ ._1o9zidpf{flex-shrink:0}
10
+ ._1szv15vq >svg{overflow-x:hidden}
11
+ ._1tly15vq >svg{overflow-y:hidden}
12
+ ._1veoyfq0 >svg{vertical-align:bottom}
13
+ ._3se1x1jp >svg{fill:var(--icon-secondary-color)}
14
+ ._4t3i1tcg{height:24px}
15
+ ._4t3i7vkz{height:1pc}
16
+ ._4t3ickbl{height:3pc}
17
+ ._4t3izwfg{height:2pc}
18
+ ._5fdi1tcg >svg{width:24px}
19
+ ._5fdi7vkz >svg{width:1pc}
20
+ ._5fdickbl >svg{width:3pc}
21
+ ._5fdizwfg >svg{width:2pc}
22
+ ._re2rglyw >svg{pointer-events:none}
23
+ ._rzyw1osq >svg{max-width:100%}
24
+ ._vwz4kb7n{line-height:1}
25
+ ._vyfuvuon{--icon-secondary-color:var(--ds-surface,#fff)}
26
+ ._zbji1tcg >svg{height:24px}
27
+ ._zbji7vkz >svg{height:1pc}
28
+ ._zbjickbl >svg{height:3pc}
29
+ ._zbjizwfg >svg{height:2pc}
30
+ @media screen and (forced-colors:active){._18hbwc43 >svg{--icon-primary-color:Canvas}._4fyi1j28 >svg{--icon-secondary-color:transparent}._jcxd1r8n{filter:grayscale(1)}._gq0g1onz{--icon-primary-color:CanvasText}._1trkwc43{--icon-secondary-color:Canvas}}
@@ -1,70 +1,32 @@
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import "./icon.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
3
7
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
8
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- /**
6
- * @jsxRuntime classic
7
- * @jsx jsx
8
- */
9
9
  import { memo } from 'react';
10
10
 
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
- import { css, jsx } from '@emotion/react';
13
- import { commonSVGStyles, getIconSize } from './styles';
14
- import { getBackground } from './utils';
15
-
16
11
  /**
17
12
  * We are hiding these props from consumers as they're used to
18
13
  * hack around icon sizing specifically for icon-file-type.
19
14
  */
20
15
 
21
- var iconStyles = css({
22
- display: 'inline-block',
23
- flexShrink: 0,
24
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
25
- lineHeight: 1,
26
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
27
- '> svg': _objectSpread(_objectSpread({}, commonSVGStyles), {}, {
28
- maxWidth: '100%',
29
- maxHeight: '100%',
30
- color: 'var(--icon-primary-color)',
31
- fill: 'var(--icon-secondary-color)',
32
- verticalAlign: 'bottom'
33
- })
34
- });
16
+ var iconStyles = null;
17
+ var sizeStyles = {
18
+ small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
19
+ medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
20
+ large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
21
+ xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
22
+ };
23
+
35
24
  /**
36
25
  * For windows high contrast mode
37
26
  */
38
- var baseHcmStyles = css({
39
- '@media screen and (forced-colors: active)': {
40
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- '> svg': {
42
- filter: 'grayscale(1)',
43
- '--icon-primary-color': 'CanvasText',
44
- // foreground
45
- '--icon-secondary-color': 'Canvas' // background
46
- }
47
- }
48
- });
49
- var primaryEqualsSecondaryHcmStyles = css({
50
- '@media screen and (forced-colors: active)': {
51
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
52
- '> svg': {
53
- // if the primaryColor is the same as the secondaryColor we
54
- // set the --icon-primary-color to Canvas
55
- // this is usually to convey state i.e. Checkbox checked -> not checked
56
- '--icon-primary-color': 'Canvas' // foreground
57
- }
58
- }
59
- });
60
- var secondaryTransparentHcmStyles = css({
61
- '@media screen and (forced-colors: active)': {
62
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
63
- '> svg': {
64
- '--icon-secondary-color': 'transparent' // background
65
- }
66
- }
67
- });
27
+ var baseHcmStyles = null;
28
+ var primaryEqualsSecondaryHcmStyles = null;
29
+ var secondaryTransparentHcmStyles = null;
68
30
 
69
31
  /**
70
32
  * __Icon__
@@ -92,42 +54,29 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
92
54
  __html: dangerouslySetGlyph
93
55
  }
94
56
  } : {
95
- children: Glyph ? jsx(Glyph, {
57
+ children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
96
58
  role: "presentation"
97
59
  }) : null
98
60
  };
99
- var dimensions = getIconSize({
100
- width: width,
101
- height: height,
102
- size: size
103
- });
104
- return jsx("span", _extends({
61
+ var customDimensions = width && height ? {
62
+ width: width + 'px',
63
+ height: height + 'px'
64
+ } : null;
65
+ return /*#__PURE__*/React.createElement("span", _extends({
105
66
  "data-testid": testId,
106
67
  "data-vc": "icon-".concat(testId),
107
68
  role: label ? 'img' : undefined,
108
69
  "aria-label": label ? label : undefined,
109
70
  "aria-hidden": label ? undefined : true,
110
- style: {
71
+ style: _objectSpread(_objectSpread({}, customDimensions), {}, {
111
72
  '--icon-primary-color': primaryColor,
112
73
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
113
- '--icon-secondary-color': secondaryColor || getBackground(),
74
+ '--icon-secondary-color': secondaryColor,
75
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
114
76
  margin: UNSAFE_margin
115
- }
77
+ })
116
78
  }, glyphProps, {
117
- css: [iconStyles, baseHcmStyles, primaryColor === secondaryColor && primaryEqualsSecondaryHcmStyles, secondaryColor === 'transparent' && secondaryTransparentHcmStyles,
118
- // NB: This can be resolved if this component, composes base SVG / and/or skeleton
119
- // We could then simplify how common styles are dealt with simply by encapsulating them
120
- // at their appropriate level and/or having a singular approach to css variables in the package
121
- dimensions &&
122
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
123
- css({
124
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
125
- width: dimensions.width,
126
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
127
- height: dimensions.height,
128
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
129
- '> svg': dimensions
130
- })]
79
+ className: ax(["_1e0c1o8l _1o9zidpf _vyfuvuon _vwz4kb7n _1szv15vq _1tly15vq _rzyw1osq _17jb1osq _1ksvoz0e _3se1x1jp _re2rglyw _1veoyfq0 _1kg81r31", "_jcxd1r8n _gq0g1onz _1trkwc43", primaryColor === secondaryColor && "_18hbwc43", secondaryColor === 'transparent' && "_4fyi1j28", size && sizeStyles[size]])
131
80
  }));
132
81
  });
133
82
  export default Icon;
@@ -0,0 +1,12 @@
1
+
2
+ ._2rko1q5u{border-radius:var(--ds-border-radius-circle,50%)}._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._4t3i1tcg{height:24px}
8
+ ._4t3i7vkz{height:1pc}
9
+ ._4t3ickbl{height:3pc}
10
+ ._4t3izwfg{height:2pc}
11
+ ._tzy4clii{opacity:.3}
12
+ ._tzy4nh7s{opacity:.15}
@@ -1,21 +1,17 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
1
+ /* skeleton.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./skeleton.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
7
5
  import { memo } from 'react';
8
- import { sizeStyleMap } from './styles';
9
- var skeletonStyles = css({
10
- display: 'inline-block',
11
- borderRadius: "var(--ds-border-radius-circle, 50%)"
12
- });
13
- var subtleOpacityStyles = css({
14
- opacity: 0.15
15
- });
16
- var strongOpacityStyles = css({
17
- opacity: 0.3
18
- });
6
+ var skeletonStyles = null;
7
+ var subtleOpacityStyles = null;
8
+ var strongOpacityStyles = null;
9
+ var sizeStyles = {
10
+ small: "_1bsb7vkz _4t3i7vkz",
11
+ medium: "_1bsb1tcg _4t3i1tcg",
12
+ large: "_1bsbzwfg _4t3izwfg",
13
+ xlarge: "_1bsbckbl _4t3ickbl"
14
+ };
19
15
 
20
16
  /**
21
17
  * __Skeleton__
@@ -28,14 +24,12 @@ var Skeleton = /*#__PURE__*/memo(function Skeleton(_ref) {
28
24
  color = _ref$color === void 0 ? 'currentColor' : _ref$color,
29
25
  _ref$weight = _ref.weight,
30
26
  weight = _ref$weight === void 0 ? 'normal' : _ref$weight;
31
- return jsx("div", {
27
+ return /*#__PURE__*/React.createElement("div", {
32
28
  "data-testid": testId,
33
29
  style: {
34
30
  backgroundColor: color
35
31
  },
36
- css: [skeletonStyles, weight === 'strong' ? strongOpacityStyles : subtleOpacityStyles,
37
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
38
- sizeStyleMap[size]]
32
+ className: ax(["_2rko1q5u _1e0c1o8l", weight === 'strong' ? "_tzy4clii" : "_tzy4nh7s", sizeStyles[size]])
39
33
  });
40
34
  });
41
35
  export default Skeleton;
@@ -0,0 +1,13 @@
1
+ ._18m915vq{overflow-y:hidden}
2
+ ._1bsb1tcg{width:24px}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1bsbckbl{width:3pc}
5
+ ._1bsbzwfg{width:2pc}
6
+ ._1reo15vq{overflow-x:hidden}
7
+ ._4t3i1tcg{height:24px}
8
+ ._4t3i7vkz{height:1pc}
9
+ ._4t3ickbl{height:3pc}
10
+ ._4t3izwfg{height:2pc}
11
+ ._lcxvglyw{pointer-events:none}
12
+ ._lswuvuon{fill:var(--ds-surface,#fff)}
13
+ ._vc881r31 stop{stop-color:currentColor}
@@ -1,15 +1,15 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* svg.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./svg.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { memo } from 'react';
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
8
- import { getBackground } from './utils';
9
- import { commonSVGStyles, sizeStyleMap } from './styles';
10
-
11
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
- var svgStyles = css(commonSVGStyles);
6
+ var sizeStyles = {
7
+ small: "_1bsb7vkz _4t3i7vkz",
8
+ medium: "_1bsb1tcg _4t3i1tcg",
9
+ large: "_1bsbzwfg _4t3izwfg",
10
+ xlarge: "_1bsbckbl _4t3ickbl"
11
+ };
12
+ var svgStyles = null;
13
13
 
14
14
  /**
15
15
  * __SVG__
@@ -28,19 +28,20 @@ var SVG = /*#__PURE__*/memo(function SVG(_ref) {
28
28
  secondaryColor = _ref.secondaryColor,
29
29
  testId = _ref.testId,
30
30
  children = _ref.children;
31
- return jsx("svg", {
31
+ return /*#__PURE__*/React.createElement("svg", {
32
32
  viewBox: "0 0 24 24",
33
33
  style: {
34
34
  color: primaryColor,
35
35
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
36
- fill: secondaryColor || getBackground()
36
+ fill: secondaryColor
37
37
  }
38
38
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
39
39
  ,
40
- css: [svgStyles, sizeStyleMap[size]],
40
+
41
41
  "data-testid": testId,
42
42
  "aria-label": label || undefined,
43
- role: label ? 'img' : 'presentation'
43
+ role: label ? 'img' : 'presentation',
44
+ className: ax(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw _vc881r31", sizeStyles[size]])
44
45
  }, children);
45
46
  });
46
47
  export default SVG;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type IconTileProps } from '../types';
3
3
  /**
4
4
  * __IconTile__ -- ⚠️ Experimental ⚠️
@@ -9,4 +9,4 @@ import { type IconTileProps } from '../types';
9
9
  * This component is currently in an experimental state and is subject to change in minor or patch releases.
10
10
  *
11
11
  */
12
- export default function IconTile(props: IconTileProps): jsx.JSX.Element;
12
+ export default function IconTile(props: IconTileProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type IconTileProps } from '../types';
3
3
  /**
4
4
  * __IconTile__ -- ⚠️ Experimental ⚠️
@@ -9,4 +9,4 @@ import { type IconTileProps } from '../types';
9
9
  * This component is currently in an experimental state and is subject to change in minor or patch releases.
10
10
  *
11
11
  */
12
- export default function IconTile(props: IconTileProps): jsx.JSX.Element;
12
+ export default function IconTile(props: IconTileProps): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/icon",
3
- "version": "25.7.0",
3
+ "version": "26.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/"
@@ -99,7 +99,7 @@
99
99
  "@atlaskit/tokens": "^4.8.0",
100
100
  "@babel/register": "^7.25.9",
101
101
  "@babel/runtime": "^7.0.0",
102
- "@emotion/react": "^11.7.1"
102
+ "@compiled/react": "^0.18.3"
103
103
  },
104
104
  "peerDependencies": {
105
105
  "react": "^18.2.0"
@@ -132,7 +132,6 @@
132
132
  "@atlassian/ssr-tests": "^0.2.0",
133
133
  "@babel/core": "7.24.9",
134
134
  "@codeshift/utils": "^0.2.4",
135
- "@compiled/react": "^0.18.3",
136
135
  "@testing-library/react": "^13.4.0",
137
136
  "fs-extra": "^4.0.2",
138
137
  "globby": "^6.1.0",
@@ -152,8 +151,7 @@
152
151
  "dom-events": "use-bind-event-listener",
153
152
  "design-system": "v1",
154
153
  "styling": [
155
- "static",
156
- "emotion"
154
+ "static"
157
155
  ],
158
156
  "ui-components": "lite-mode",
159
157
  "analytics": "analytics-next",
@@ -1 +1 @@
1
- <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M2 .5h4.25a.75.75 0 0 1 .75.75V5.5H5.5V2.941a9 9 0 0 0-1.094.916C3.42 4.83 2.5 6.214 2.5 8c0 1.813.817 3.18 1.871 4.11 1.079.95 2.346 1.39 3.129 1.39V15c-1.217 0-2.825-.623-4.121-1.765C2.058 12.07 1 10.312 1 8c0-2.339 1.21-4.084 2.354-5.211.308-.304.615-.567.9-.789H2zm10.621 2.266C13.942 3.93 15 5.688 15 8c0 2.338-1.204 4.079-2.344 5.201-.304.3-.607.56-.889.78H14v1.5H9.75a.75.75 0 0 1-.75-.75v-4.25h1.5v2.573a9 9 0 0 0 1.104-.921C12.584 11.166 13.5 9.787 13.5 8c0-1.813-.817-3.18-1.871-4.11C10.551 2.94 9.283 2.5 8.5 2.5V1c1.217 0 2.825.623 4.121 1.766" clip-rule="evenodd"/></svg>
1
+ <svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M2.5 3.67V1H1v5c0 .414.336.75.75.75H6.5v-1.5H3.236a5.5 5.5 0 1 1-.666 3.63l-1.48.24A7.002 7.002 0 0 0 15 8 7 7 0 0 0 2.5 3.67" clip-rule="evenodd"/></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.25a3.75 3.75 0 0 0-.75 7.425V7.25a2 2 0 0 1 2-2h2.425A3.75 3.75 0 0 0 6 2.25m5.197 3a5.251 5.251 0 1 0-5.947 5.947V13a2 2 0 0 0 2 2H13a2 2 0 0 0 2-2V7.25a2 2 0 0 0-2-2zM7.25 6.75a.5.5 0 0 0-.5.5V13a.5.5 0 0 0 .5.5H13a.5.5 0 0 0 .5-.5V7.25a.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" fill-rule="evenodd" d="M15 2.38C15 1.62 14.38 1 13.63 1h-3.25C9.62 1 9 1.62 9 2.38v3.25C9 6.39 9.62 7 10.38 7h3.25C14.39 7 15 6.38 15 5.63zm-1.5.13v3h-3v-3zM3.13 1.26a1 1 0 0 1 1.74 0l2.57 4.5a1 1 0 0 1-.87 1.5H1.43a1 1 0 0 1-.87-1.5zM4 2.76 2.29 5.75h3.42zM.75 12a3.25 3.25 0 1 1 6.5 0 3.25 3.25 0 0 1-6.5 0M4 10.25a1.75 1.75 0 1 0 0 3.5 1.75 1.75 0 0 0 0-3.5M10 9h4.25a.75.75 0 0 1 .75.75V14h-1.5v-2.44l-3.72 3.72-1.06-1.06 3.72-3.72H10z" clip-rule="evenodd"/></svg>