@atlaskit/icon 25.8.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/components/icon-new.compiled.css +22 -0
- package/dist/cjs/components/icon-new.js +30 -84
- package/dist/cjs/components/icon-tile.compiled.css +48 -0
- package/dist/cjs/components/icon-tile.js +40 -125
- package/dist/cjs/components/icon.compiled.css +30 -0
- package/dist/cjs/components/icon.js +31 -76
- package/dist/cjs/components/skeleton.compiled.css +12 -0
- package/dist/cjs/components/skeleton.js +20 -24
- package/dist/cjs/components/svg.compiled.css +13 -0
- package/dist/cjs/components/svg.js +20 -17
- package/dist/es2019/components/icon-new.compiled.css +22 -0
- package/dist/es2019/components/icon-new.js +26 -82
- package/dist/es2019/components/icon-tile.compiled.css +48 -0
- package/dist/es2019/components/icon-tile.js +37 -124
- package/dist/es2019/components/icon.compiled.css +30 -0
- package/dist/es2019/components/icon.js +26 -77
- package/dist/es2019/components/skeleton.compiled.css +12 -0
- package/dist/es2019/components/skeleton.js +15 -21
- package/dist/es2019/components/svg.compiled.css +13 -0
- package/dist/es2019/components/svg.js +16 -15
- package/dist/esm/components/icon-new.compiled.css +22 -0
- package/dist/esm/components/icon-new.js +26 -82
- package/dist/esm/components/icon-tile.compiled.css +48 -0
- package/dist/esm/components/icon-tile.js +37 -124
- package/dist/esm/components/icon.compiled.css +30 -0
- package/dist/esm/components/icon.js +26 -77
- package/dist/esm/components/skeleton.compiled.css +12 -0
- package/dist/esm/components/skeleton.js +15 -21
- package/dist/esm/components/svg.compiled.css +13 -0
- package/dist/esm/components/svg.js +16 -15
- package/dist/types/components/icon-tile.d.ts +2 -2
- package/dist/types-ts4.5/components/icon-tile.d.ts +2 -2
- package/package.json +3 -5
- package/dist/cjs/components/styles.js +0 -64
- package/dist/cjs/components/utils.js +0 -9
- package/dist/es2019/components/styles.js +0 -58
- package/dist/es2019/components/utils.js +0 -1
- package/dist/esm/components/styles.js +0 -57
- package/dist/esm/components/utils.js +0 -3
- package/dist/types/components/styles.d.ts +0 -28
- package/dist/types/components/utils.d.ts +0 -1
- package/dist/types-ts4.5/components/styles.d.ts +0 -28
- package/dist/types-ts4.5/components/utils.d.ts +0 -1
|
@@ -1,69 +1,29 @@
|
|
|
1
|
+
/* icon.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./icon.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { commonSVGStyles, getIconSize } from './styles';
|
|
11
|
-
import { getBackground } from './utils';
|
|
12
|
-
|
|
13
8
|
/**
|
|
14
9
|
* We are hiding these props from consumers as they're used to
|
|
15
10
|
* hack around icon sizing specifically for icon-file-type.
|
|
16
11
|
*/
|
|
17
12
|
|
|
18
|
-
const iconStyles =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...commonSVGStyles,
|
|
27
|
-
maxWidth: '100%',
|
|
28
|
-
maxHeight: '100%',
|
|
29
|
-
color: 'var(--icon-primary-color)',
|
|
30
|
-
fill: 'var(--icon-secondary-color)',
|
|
31
|
-
verticalAlign: 'bottom'
|
|
32
|
-
}
|
|
33
|
-
});
|
|
13
|
+
const iconStyles = null;
|
|
14
|
+
const sizeStyles = {
|
|
15
|
+
small: "_1bsb7vkz _4t3i7vkz _5fdi7vkz _zbji7vkz",
|
|
16
|
+
medium: "_1bsb1tcg _4t3i1tcg _5fdi1tcg _zbji1tcg",
|
|
17
|
+
large: "_1bsbzwfg _4t3izwfg _5fdizwfg _zbjizwfg",
|
|
18
|
+
xlarge: "_1bsbckbl _4t3ickbl _5fdickbl _zbjickbl"
|
|
19
|
+
};
|
|
20
|
+
|
|
34
21
|
/**
|
|
35
22
|
* For windows high contrast mode
|
|
36
23
|
*/
|
|
37
|
-
const baseHcmStyles =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
'> svg': {
|
|
41
|
-
filter: 'grayscale(1)',
|
|
42
|
-
'--icon-primary-color': 'CanvasText',
|
|
43
|
-
// foreground
|
|
44
|
-
'--icon-secondary-color': 'Canvas' // background
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const primaryEqualsSecondaryHcmStyles = css({
|
|
49
|
-
'@media screen and (forced-colors: active)': {
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'> svg': {
|
|
52
|
-
// if the primaryColor is the same as the secondaryColor we
|
|
53
|
-
// set the --icon-primary-color to Canvas
|
|
54
|
-
// this is usually to convey state i.e. Checkbox checked -> not checked
|
|
55
|
-
'--icon-primary-color': 'Canvas' // foreground
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
const secondaryTransparentHcmStyles = css({
|
|
60
|
-
'@media screen and (forced-colors: active)': {
|
|
61
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
62
|
-
'> svg': {
|
|
63
|
-
'--icon-secondary-color': 'transparent' // background
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
24
|
+
const baseHcmStyles = null;
|
|
25
|
+
const primaryEqualsSecondaryHcmStyles = null;
|
|
26
|
+
const secondaryTransparentHcmStyles = null;
|
|
67
27
|
|
|
68
28
|
/**
|
|
69
29
|
* __Icon__
|
|
@@ -91,42 +51,31 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
91
51
|
__html: dangerouslySetGlyph
|
|
92
52
|
}
|
|
93
53
|
} : {
|
|
94
|
-
children: Glyph ?
|
|
54
|
+
children: Glyph ? /*#__PURE__*/React.createElement(Glyph, {
|
|
95
55
|
role: "presentation"
|
|
96
56
|
}) : null
|
|
97
57
|
};
|
|
98
|
-
const
|
|
99
|
-
width,
|
|
100
|
-
height
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return jsx("span", _extends({
|
|
58
|
+
const customDimensions = width && height ? {
|
|
59
|
+
width: width + 'px',
|
|
60
|
+
height: height + 'px'
|
|
61
|
+
} : null;
|
|
62
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
104
63
|
"data-testid": testId,
|
|
105
64
|
"data-vc": `icon-${testId}`,
|
|
106
65
|
role: label ? 'img' : undefined,
|
|
107
66
|
"aria-label": label ? label : undefined,
|
|
108
67
|
"aria-hidden": label ? undefined : true,
|
|
109
68
|
style: {
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
70
|
+
...customDimensions,
|
|
110
71
|
'--icon-primary-color': primaryColor,
|
|
111
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
112
|
-
'--icon-secondary-color': secondaryColor
|
|
73
|
+
'--icon-secondary-color': secondaryColor,
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
113
75
|
margin: UNSAFE_margin
|
|
114
76
|
}
|
|
115
77
|
}, glyphProps, {
|
|
116
|
-
|
|
117
|
-
// NB: This can be resolved if this component, composes base SVG / and/or skeleton
|
|
118
|
-
// We could then simplify how common styles are dealt with simply by encapsulating them
|
|
119
|
-
// at their appropriate level and/or having a singular approach to css variables in the package
|
|
120
|
-
dimensions &&
|
|
121
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
122
|
-
css({
|
|
123
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
124
|
-
width: dimensions.width,
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
126
|
-
height: dimensions.height,
|
|
127
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
128
|
-
'> svg': dimensions
|
|
129
|
-
})]
|
|
78
|
+
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]])
|
|
130
79
|
}));
|
|
131
80
|
});
|
|
132
81
|
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
|
-
|
|
3
|
-
*
|
|
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
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
opacity: 0.3
|
|
18
|
-
});
|
|
6
|
+
const skeletonStyles = null;
|
|
7
|
+
const subtleOpacityStyles = null;
|
|
8
|
+
const strongOpacityStyles = null;
|
|
9
|
+
const 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__
|
|
@@ -26,14 +22,12 @@ const Skeleton = /*#__PURE__*/memo(function Skeleton({
|
|
|
26
22
|
color = 'currentColor',
|
|
27
23
|
weight = 'normal'
|
|
28
24
|
}) {
|
|
29
|
-
return
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
26
|
"data-testid": testId,
|
|
31
27
|
style: {
|
|
32
28
|
backgroundColor: color
|
|
33
29
|
},
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
36
|
-
sizeStyleMap[size]]
|
|
30
|
+
className: ax(["_2rko1q5u _1e0c1o8l", weight === 'strong' ? "_tzy4clii" : "_tzy4nh7s", sizeStyles[size]])
|
|
37
31
|
});
|
|
38
32
|
});
|
|
39
33
|
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
|
-
|
|
3
|
-
*
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const svgStyles =
|
|
6
|
+
const sizeStyles = {
|
|
7
|
+
small: "_1bsb7vkz _4t3i7vkz",
|
|
8
|
+
medium: "_1bsb1tcg _4t3i1tcg",
|
|
9
|
+
large: "_1bsbzwfg _4t3izwfg",
|
|
10
|
+
xlarge: "_1bsbckbl _4t3ickbl"
|
|
11
|
+
};
|
|
12
|
+
const svgStyles = null;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* __SVG__
|
|
@@ -27,19 +27,20 @@ const SVG = /*#__PURE__*/memo(function SVG({
|
|
|
27
27
|
testId,
|
|
28
28
|
children
|
|
29
29
|
}) {
|
|
30
|
-
return
|
|
30
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
31
31
|
viewBox: "0 0 24 24",
|
|
32
32
|
style: {
|
|
33
33
|
color: primaryColor,
|
|
34
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
35
|
-
fill: secondaryColor
|
|
35
|
+
fill: secondaryColor
|
|
36
36
|
}
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
38
38
|
,
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
"data-testid": testId,
|
|
41
41
|
"aria-label": label || undefined,
|
|
42
|
-
role: label ? 'img' : 'presentation'
|
|
42
|
+
role: label ? 'img' : 'presentation',
|
|
43
|
+
className: ax(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw _vc881r31", sizeStyles[size]])
|
|
43
44
|
}, children);
|
|
44
45
|
});
|
|
45
46
|
export 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
|
-
|
|
3
|
-
*
|
|
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
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
var svgStyles = css({
|
|
30
|
-
color: 'currentColor',
|
|
31
|
-
verticalAlign: 'bottom'
|
|
32
|
-
});
|
|
33
|
-
var 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
|
-
var utilityIconStyles = css({
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
44
|
-
lineHeight: "var(--ds-space-150, 12px)"
|
|
45
|
-
});
|
|
46
|
-
var scaleStyles = css({
|
|
47
|
-
width: 'inherit',
|
|
48
|
-
height: 'inherit'
|
|
49
|
-
});
|
|
13
|
+
var svgStyles = null;
|
|
14
|
+
var iconStyles = null;
|
|
15
|
+
var utilityIconStyles = null;
|
|
16
|
+
var scaleStyles = null;
|
|
50
17
|
|
|
51
18
|
/**
|
|
52
19
|
* For windows high contrast mode
|
|
53
20
|
*/
|
|
54
|
-
var baseHcmStyles =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
var baseHcmStyles = null;
|
|
22
|
+
var scaleSize = null;
|
|
23
|
+
var coreSizes = {
|
|
24
|
+
none: "_1bsbpxbi _4t3ipxbi",
|
|
25
|
+
compact: "",
|
|
26
|
+
spacious: "_1bsb1ejb _4t3i1ejb"
|
|
27
|
+
};
|
|
28
|
+
var utilSizes = {
|
|
29
|
+
none: "_1bsbutpp _4t3iutpp",
|
|
30
|
+
compact: "_1bsbpxbi _4t3ipxbi",
|
|
31
|
+
spacious: "_1bsb1ejb _4t3i1ejb"
|
|
89
32
|
};
|
|
90
33
|
var baseSizeMap = {
|
|
91
34
|
core: 16,
|
|
@@ -130,9 +73,10 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
130
73
|
} : undefined;
|
|
131
74
|
|
|
132
75
|
// Fall back to old icon
|
|
76
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
133
77
|
if (FallbackIcon && !fg('platform-visual-refresh-icons')) {
|
|
134
78
|
// parse out unnecessary props
|
|
135
|
-
return
|
|
79
|
+
return /*#__PURE__*/React.createElement(FallbackIcon, {
|
|
136
80
|
primaryColor: LEGACY_primaryColor !== null && LEGACY_primaryColor !== void 0 ? LEGACY_primaryColor : color,
|
|
137
81
|
secondaryColor: LEGACY_secondaryColor,
|
|
138
82
|
size: LEGACY_size,
|
|
@@ -153,7 +97,7 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
153
97
|
viewBoxPadding = paddingMap['core'][(_props$spacing2 = props.spacing) !== null && _props$spacing2 !== void 0 ? _props$spacing2 : 'none'];
|
|
154
98
|
}
|
|
155
99
|
var viewBoxSize = baseSize + 2 * viewBoxPadding;
|
|
156
|
-
return
|
|
100
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
157
101
|
"data-testid": testId,
|
|
158
102
|
role: label ? 'img' : undefined,
|
|
159
103
|
"aria-label": label ? label : undefined,
|
|
@@ -161,16 +105,16 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
161
105
|
style: {
|
|
162
106
|
color: color
|
|
163
107
|
},
|
|
164
|
-
|
|
165
|
-
},
|
|
108
|
+
className: ax(["_1e0c1o8l _vchhusvi _1o9zidpf _vwz4kb7n _y4ti1igz _bozg1mb9", "_12va1onz _jcxd1r8n", shouldScale && "_1bsb1kw7 _4t3i1kw7", props.type === 'utility' && "_vwz4utpp"])
|
|
109
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
166
110
|
fill: "none"
|
|
167
111
|
// Adjusting the viewBox allows the icon padding to scale with the contents of the SVG, which
|
|
168
112
|
// we want for Icon Tile
|
|
169
113
|
,
|
|
170
114
|
viewBox: "".concat(0 - viewBoxPadding, " ").concat(0 - viewBoxPadding, " ").concat(viewBoxSize, " ").concat(viewBoxSize),
|
|
171
115
|
role: "presentation",
|
|
172
|
-
|
|
173
|
-
|
|
116
|
+
dangerouslySetInnerHTML: dangerouslySetInnerHTML,
|
|
117
|
+
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']])
|
|
174
118
|
}));
|
|
175
119
|
});
|
|
176
120
|
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}
|