@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
@@ -1,73 +1,41 @@
1
+ /* icon.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.default = exports.Icon = void 0;
10
+ require("./icon.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var React = _react;
13
+ var _runtime = require("@compiled/react/runtime");
8
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _react = require("react");
11
- var _react2 = require("@emotion/react");
12
- var _styles = require("./styles");
13
- var _utils = require("./utils");
16
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
18
  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; }
15
- 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) { (0, _defineProperty2.default)(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; } /**
16
- * @jsxRuntime classic
17
- * @jsx jsx
18
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
+ 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) { (0, _defineProperty2.default)(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; }
19
20
  /**
20
21
  * We are hiding these props from consumers as they're used to
21
22
  * hack around icon sizing specifically for icon-file-type.
22
23
  */
23
24
 
24
- var iconStyles = (0, _react2.css)({
25
- display: 'inline-block',
26
- flexShrink: 0,
27
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
28
- lineHeight: 1,
29
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
30
- '> svg': _objectSpread(_objectSpread({}, _styles.commonSVGStyles), {}, {
31
- maxWidth: '100%',
32
- maxHeight: '100%',
33
- color: 'var(--icon-primary-color)',
34
- fill: 'var(--icon-secondary-color)',
35
- verticalAlign: 'bottom'
36
- })
37
- });
25
+ var iconStyles = null;
26
+ var sizeStyles = {
27
+ small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
28
+ medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
29
+ large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
30
+ xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
31
+ };
32
+
38
33
  /**
39
34
  * For windows high contrast mode
40
35
  */
41
- var baseHcmStyles = (0, _react2.css)({
42
- '@media screen and (forced-colors: active)': {
43
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
- '> svg': {
45
- filter: 'grayscale(1)',
46
- '--icon-primary-color': 'CanvasText',
47
- // foreground
48
- '--icon-secondary-color': 'Canvas' // background
49
- }
50
- }
51
- });
52
- var primaryEqualsSecondaryHcmStyles = (0, _react2.css)({
53
- '@media screen and (forced-colors: active)': {
54
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
55
- '> svg': {
56
- // if the primaryColor is the same as the secondaryColor we
57
- // set the --icon-primary-color to Canvas
58
- // this is usually to convey state i.e. Checkbox checked -> not checked
59
- '--icon-primary-color': 'Canvas' // foreground
60
- }
61
- }
62
- });
63
- var secondaryTransparentHcmStyles = (0, _react2.css)({
64
- '@media screen and (forced-colors: active)': {
65
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
66
- '> svg': {
67
- '--icon-secondary-color': 'transparent' // background
68
- }
69
- }
70
- });
36
+ var baseHcmStyles = null;
37
+ var primaryEqualsSecondaryHcmStyles = null;
38
+ var secondaryTransparentHcmStyles = null;
71
39
 
72
40
  /**
73
41
  * __Icon__
@@ -95,42 +63,29 @@ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
95
63
  __html: dangerouslySetGlyph
96
64
  }
97
65
  } : {
98
- children: Glyph ? (0, _react2.jsx)(Glyph, {
66
+ children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
99
67
  role: "presentation"
100
68
  }) : null
101
69
  };
102
- var dimensions = (0, _styles.getIconSize)({
103
- width: width,
104
- height: height,
105
- size: size
106
- });
107
- return (0, _react2.jsx)("span", (0, _extends2.default)({
70
+ var customDimensions = width && height ? {
71
+ width: width + 'px',
72
+ height: height + 'px'
73
+ } : null;
74
+ return /*#__PURE__*/React.createElement("span", (0, _extends2.default)({
108
75
  "data-testid": testId,
109
76
  "data-vc": "icon-".concat(testId),
110
77
  role: label ? 'img' : undefined,
111
78
  "aria-label": label ? label : undefined,
112
79
  "aria-hidden": label ? undefined : true,
113
- style: {
80
+ style: _objectSpread(_objectSpread({}, customDimensions), {}, {
114
81
  '--icon-primary-color': primaryColor,
115
82
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
116
- '--icon-secondary-color': secondaryColor || (0, _utils.getBackground)(),
83
+ '--icon-secondary-color': secondaryColor,
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
117
85
  margin: UNSAFE_margin
118
- }
86
+ })
119
87
  }, glyphProps, {
120
- css: [iconStyles, baseHcmStyles, primaryColor === secondaryColor && primaryEqualsSecondaryHcmStyles, secondaryColor === 'transparent' && secondaryTransparentHcmStyles,
121
- // NB: This can be resolved if this component, composes base SVG / and/or skeleton
122
- // We could then simplify how common styles are dealt with simply by encapsulating them
123
- // at their appropriate level and/or having a singular approach to css variables in the package
124
- dimensions &&
125
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
126
- (0, _react2.css)({
127
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
128
- width: dimensions.width,
129
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
130
- height: dimensions.height,
131
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
132
- '> svg': dimensions
133
- })]
88
+ className: (0, _runtime.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]])
134
89
  }));
135
90
  });
136
91
  var _default = exports.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,33 +1,31 @@
1
+ /* skeleton.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
- var _react = require("@emotion/react");
8
- var _react2 = require("react");
9
- var _styles = require("./styles");
10
- /**
11
- * @jsxRuntime classic
12
- * @jsx jsx
13
- */
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
-
16
- var skeletonStyles = (0, _react.css)({
17
- display: 'inline-block',
18
- borderRadius: "var(--ds-border-radius-circle, 50%)"
19
- });
20
- var subtleOpacityStyles = (0, _react.css)({
21
- opacity: 0.15
22
- });
23
- var strongOpacityStyles = (0, _react.css)({
24
- opacity: 0.3
25
- });
9
+ require("./skeleton.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ var skeletonStyles = null;
16
+ var subtleOpacityStyles = null;
17
+ var strongOpacityStyles = null;
18
+ var sizeStyles = {
19
+ small: "_1bsb7vkz _4t3i7vkz",
20
+ medium: "_1bsb1tcg _4t3i1tcg",
21
+ large: "_1bsbzwfg _4t3izwfg",
22
+ xlarge: "_1bsbckbl _4t3ickbl"
23
+ };
26
24
 
27
25
  /**
28
26
  * __Skeleton__
29
27
  */
30
- var Skeleton = /*#__PURE__*/(0, _react2.memo)(function Skeleton(_ref) {
28
+ var Skeleton = /*#__PURE__*/(0, _react.memo)(function Skeleton(_ref) {
31
29
  var testId = _ref.testId,
32
30
  _ref$size = _ref.size,
33
31
  size = _ref$size === void 0 ? 'medium' : _ref$size,
@@ -35,14 +33,12 @@ var Skeleton = /*#__PURE__*/(0, _react2.memo)(function Skeleton(_ref) {
35
33
  color = _ref$color === void 0 ? 'currentColor' : _ref$color,
36
34
  _ref$weight = _ref.weight,
37
35
  weight = _ref$weight === void 0 ? 'normal' : _ref$weight;
38
- return (0, _react.jsx)("div", {
36
+ return /*#__PURE__*/React.createElement("div", {
39
37
  "data-testid": testId,
40
38
  style: {
41
39
  backgroundColor: color
42
40
  },
43
- css: [skeletonStyles, weight === 'strong' ? strongOpacityStyles : subtleOpacityStyles,
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
45
- _styles.sizeStyleMap[size]]
41
+ className: (0, _runtime.ax)(["_2rko1q5u _1e0c1o8l", weight === 'strong' ? "_tzy4clii" : "_tzy4nh7s", sizeStyles[size]])
46
42
  });
47
43
  });
48
44
  var _default = exports.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,22 +1,24 @@
1
+ /* svg.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.default = void 0;
7
- var _react = require("react");
8
- var _react2 = require("@emotion/react");
9
- var _utils = require("./utils");
10
- var _styles = require("./styles");
11
- /**
12
- * @jsxRuntime classic
13
- * @jsx jsx
14
- */
15
-
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
-
18
- // 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
19
- var svgStyles = (0, _react2.css)(_styles.commonSVGStyles);
9
+ require("./svg.compiled.css");
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var React = _react;
12
+ var _runtime = require("@compiled/react/runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ var sizeStyles = {
16
+ small: "_1bsb7vkz _4t3i7vkz",
17
+ medium: "_1bsb1tcg _4t3i1tcg",
18
+ large: "_1bsbzwfg _4t3izwfg",
19
+ xlarge: "_1bsbckbl _4t3ickbl"
20
+ };
21
+ var svgStyles = null;
20
22
 
21
23
  /**
22
24
  * __SVG__
@@ -35,19 +37,20 @@ var SVG = /*#__PURE__*/(0, _react.memo)(function SVG(_ref) {
35
37
  secondaryColor = _ref.secondaryColor,
36
38
  testId = _ref.testId,
37
39
  children = _ref.children;
38
- return (0, _react2.jsx)("svg", {
40
+ return /*#__PURE__*/React.createElement("svg", {
39
41
  viewBox: "0 0 24 24",
40
42
  style: {
41
43
  color: primaryColor,
42
44
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
43
- fill: secondaryColor || (0, _utils.getBackground)()
45
+ fill: secondaryColor
44
46
  }
45
47
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
46
48
  ,
47
- css: [svgStyles, _styles.sizeStyleMap[size]],
49
+
48
50
  "data-testid": testId,
49
51
  "aria-label": label || undefined,
50
- role: label ? 'img' : 'presentation'
52
+ role: label ? 'img' : 'presentation',
53
+ className: (0, _runtime.ax)(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw _vc881r31", sizeStyles[size]])
51
54
  }, children);
52
55
  });
53
56
  var _default = exports.default = SVG;
@@ -0,0 +1,22 @@
1
+ ._18m915vq{overflow-y:hidden}
2
+ ._1bsb1ejb{width:var(--ds-space-300,24px)}
3
+ ._1bsb1kw7{width:inherit}
4
+ ._1bsbpxbi{width:var(--ds-space-200,1pc)}
5
+ ._1bsbutpp{width:var(--ds-space-150,9pt)}
6
+ ._1e0c1o8l{display:inline-block}
7
+ ._1o9zidpf{flex-shrink:0}
8
+ ._1reo15vq{overflow-x:hidden}
9
+ ._4t3i1ejb{height:var(--ds-space-300,24px)}
10
+ ._4t3i1kw7{height:inherit}
11
+ ._4t3ipxbi{height:var(--ds-space-200,1pc)}
12
+ ._4t3iutpp{height:var(--ds-space-150,9pt)}
13
+ ._bozg1mb9{padding-inline-start:var(--ds--button--new-icon-padding-start,0)}
14
+ ._lcxvglyw{pointer-events:none}
15
+ ._s7n4yfq0{vertical-align:bottom}
16
+ ._syaz1r31{color:currentColor}
17
+ ._vc881r31 stop{stop-color:currentColor}
18
+ ._vchhusvi{box-sizing:border-box}
19
+ ._vwz4kb7n{line-height:1}
20
+ ._vwz4utpp{line-height:var(--ds-space-150,9pt)}
21
+ ._y4ti1igz{padding-inline-end:var(--ds--button--new-icon-padding-end,0)}
22
+ @media screen and (forced-colors:active){._12va1onz{color:CanvasText}._jcxd1r8n{filter:grayscale(1)}}
@@ -1,11 +1,8 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
1
+ /* icon-new.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./icon-new.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { memo } from 'react';
6
-
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
9
6
  import { fg } from '@atlaskit/platform-feature-flags';
10
7
 
11
8
  /**
@@ -13,79 +10,25 @@ import { fg } from '@atlaskit/platform-feature-flags';
13
10
  * for use by Icon Tile.
14
11
  */
15
12
 
16
- const commonSVGStyles = css({
17
- overflow: 'hidden',
18
- pointerEvents: 'none',
19
- /**
20
- * Stop-color doesn't properly apply in chrome when the inherited/current color changes.
21
- * We have to initially set stop-color to inherit (either via DOM attribute or an initial CSS
22
- * rule) and then override it with currentColor for the color changes to be picked up.
23
- */
24
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
- stop: {
26
- stopColor: 'currentColor'
27
- }
28
- });
29
- const svgStyles = css({
30
- color: 'currentColor',
31
- verticalAlign: 'bottom'
32
- });
33
- const iconStyles = css({
34
- display: 'inline-block',
35
- boxSizing: 'border-box',
36
- flexShrink: 0,
37
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
38
- lineHeight: 1,
39
- paddingInlineEnd: 'var(--ds--button--new-icon-padding-end, 0)',
40
- paddingInlineStart: 'var(--ds--button--new-icon-padding-start, 0)'
41
- });
42
- const utilityIconStyles = css({
43
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
44
- lineHeight: "var(--ds-space-150, 12px)"
45
- });
46
- const scaleStyles = css({
47
- width: 'inherit',
48
- height: 'inherit'
49
- });
13
+ const svgStyles = null;
14
+ const iconStyles = null;
15
+ const utilityIconStyles = null;
16
+ const scaleStyles = null;
50
17
 
51
18
  /**
52
19
  * For windows high contrast mode
53
20
  */
54
- const baseHcmStyles = css({
55
- '@media screen and (forced-colors: active)': {
56
- color: 'CanvasText',
57
- filter: 'grayscale(1)'
58
- }
59
- });
60
- const scaleSize = css({
61
- width: 'inherit',
62
- height: 'inherit'
63
- });
64
- const sizeMap = {
65
- core: {
66
- none: css({
67
- width: "var(--ds-space-200, 16px)",
68
- height: "var(--ds-space-200, 16px)"
69
- }),
70
- spacious: css({
71
- width: "var(--ds-space-300, 24px)",
72
- height: "var(--ds-space-300, 24px)"
73
- })
74
- },
75
- utility: {
76
- none: css({
77
- width: "var(--ds-space-150, 12px)",
78
- height: "var(--ds-space-150, 12px)"
79
- }),
80
- compact: css({
81
- width: "var(--ds-space-200, 16px)",
82
- height: "var(--ds-space-200, 16px)"
83
- }),
84
- spacious: css({
85
- width: "var(--ds-space-300, 24px)",
86
- height: "var(--ds-space-300, 24px)"
87
- })
88
- }
21
+ const baseHcmStyles = null;
22
+ const scaleSize = null;
23
+ const coreSizes = {
24
+ none: "_1bsbpxbi _4t3ipxbi",
25
+ compact: "",
26
+ spacious: "_1bsb1ejb _4t3i1ejb"
27
+ };
28
+ const utilSizes = {
29
+ none: "_1bsbutpp _4t3iutpp",
30
+ compact: "_1bsbpxbi _4t3ipxbi",
31
+ spacious: "_1bsb1ejb _4t3i1ejb"
89
32
  };
90
33
  const baseSizeMap = {
91
34
  core: 16,
@@ -133,9 +76,10 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
133
76
  } : undefined;
134
77
 
135
78
  // Fall back to old icon
79
+ // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
136
80
  if (FallbackIcon && !fg('platform-visual-refresh-icons')) {
137
81
  // parse out unnecessary props
138
- return jsx(FallbackIcon, {
82
+ return /*#__PURE__*/React.createElement(FallbackIcon, {
139
83
  primaryColor: LEGACY_primaryColor !== null && LEGACY_primaryColor !== void 0 ? LEGACY_primaryColor : color,
140
84
  secondaryColor: LEGACY_secondaryColor,
141
85
  size: LEGACY_size,
@@ -156,7 +100,7 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
156
100
  viewBoxPadding = paddingMap['core'][(_props$spacing2 = props.spacing) !== null && _props$spacing2 !== void 0 ? _props$spacing2 : 'none'];
157
101
  }
158
102
  const viewBoxSize = baseSize + 2 * viewBoxPadding;
159
- return jsx("span", {
103
+ return /*#__PURE__*/React.createElement("span", {
160
104
  "data-testid": testId,
161
105
  role: label ? 'img' : undefined,
162
106
  "aria-label": label ? label : undefined,
@@ -164,16 +108,16 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
164
108
  style: {
165
109
  color
166
110
  },
167
- css: [iconStyles, baseHcmStyles, shouldScale && scaleStyles, props.type === 'utility' && utilityIconStyles]
168
- }, jsx("svg", {
111
+ className: ax(["_1e0c1o8l _vchhusvi _1o9zidpf _vwz4kb7n _y4ti1igz _bozg1mb9", "_12va1onz _jcxd1r8n", shouldScale && "_1bsb1kw7 _4t3i1kw7", props.type === 'utility' && "_vwz4utpp"])
112
+ }, /*#__PURE__*/React.createElement("svg", {
169
113
  fill: "none"
170
114
  // Adjusting the viewBox allows the icon padding to scale with the contents of the SVG, which
171
115
  // we want for Icon Tile
172
116
  ,
173
117
  viewBox: `${0 - viewBoxPadding} ${0 - viewBoxPadding} ${viewBoxSize} ${viewBoxSize}`,
174
118
  role: "presentation",
175
- css: [commonSVGStyles, svgStyles, shouldScale ? scaleSize : props.type === 'utility' ? sizeMap[props.type][(_props$spacing3 = props.spacing) !== null && _props$spacing3 !== void 0 ? _props$spacing3 : 'none'] : sizeMap['core'][(_props$spacing4 = props.spacing) !== null && _props$spacing4 !== void 0 ? _props$spacing4 : 'none']],
176
- dangerouslySetInnerHTML: dangerouslySetInnerHTML
119
+ dangerouslySetInnerHTML: dangerouslySetInnerHTML,
120
+ className: ax(["_1reo15vq _18m915vq _syaz1r31 _lcxvglyw _s7n4yfq0 _vc881r31", shouldScale ? "_1bsb1kw7 _4t3i1kw7" : props.type === 'utility' ? utilSizes[(_props$spacing3 = props.spacing) !== null && _props$spacing3 !== void 0 ? _props$spacing3 : 'none'] : coreSizes[(_props$spacing4 = props.spacing) !== null && _props$spacing4 !== void 0 ? _props$spacing4 : 'none']])
177
121
  }));
178
122
  });
179
123
  export default Icon;
@@ -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}