@atlaskit/icon 34.5.0 → 35.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 +41 -0
- package/core/ai-generative-text-summary.js +2 -2
- package/core/briefcase.js +2 -2
- package/core/chart-pie.js +2 -2
- package/core/customize.js +2 -2
- package/core/filter.js +2 -2
- package/dist/cjs/components/icon-tile/icon-tile-new.js +1 -16
- package/dist/cjs/components/icon-tile/icon-tile-old.compiled.css +0 -2
- package/dist/cjs/components/icon-tile/icon-tile-old.js +2 -9
- package/dist/cjs/components/icon-tile/icon-tile.compiled.css +13 -0
- package/dist/cjs/components/icon-tile/icon-tile.js +91 -0
- package/dist/cjs/components/icon-tile/index.js +22 -62
- package/dist/es2019/components/icon-tile/icon-tile-new.js +1 -16
- package/dist/es2019/components/icon-tile/icon-tile-old.compiled.css +0 -2
- package/dist/es2019/components/icon-tile/icon-tile-old.js +2 -9
- package/dist/es2019/components/icon-tile/icon-tile.compiled.css +13 -0
- package/dist/es2019/components/icon-tile/icon-tile.js +83 -0
- package/dist/es2019/components/icon-tile/index.js +21 -61
- package/dist/esm/components/icon-tile/icon-tile-new.js +1 -16
- package/dist/esm/components/icon-tile/icon-tile-old.compiled.css +0 -2
- package/dist/esm/components/icon-tile/icon-tile-old.js +2 -9
- package/dist/esm/components/icon-tile/icon-tile.compiled.css +13 -0
- package/dist/esm/components/icon-tile/icon-tile.js +82 -0
- package/dist/esm/components/icon-tile/index.js +21 -60
- package/dist/types/components/icon-tile/icon-tile.d.ts +7 -0
- package/dist/types/components/icon-tile/index.d.ts +1 -1
- package/dist/types/entry-points/types.d.ts +1 -1
- package/dist/types/types.d.ts +29 -25
- package/dist/types-ts4.5/components/icon-tile/icon-tile.d.ts +7 -0
- package/dist/types-ts4.5/components/icon-tile/index.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +29 -25
- package/package.json +3 -9
- package/svgs/core/ai-generative-text-summary.svg +1 -1
- package/svgs/core/briefcase.svg +1 -1
- package/svgs/core/chart-pie.svg +1 -1
- package/svgs/core/customize.svg +1 -1
- package/svgs/core/filter.svg +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 35.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`2b84ca637685f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2b84ca637685f) -
|
|
8
|
+
[ux] Cleans up the `IconTile` API following the rollout of `platform_dst_new_icon_tile` and
|
|
9
|
+
`platform_dst_new_icon_tile_stage2` flags.
|
|
10
|
+
|
|
11
|
+
### Breaking changes
|
|
12
|
+
- **`size="16"` removed** — Migrate to direct icon glyph usage (e.g. `<MyIcon label="..." />`), or
|
|
13
|
+
use `size="xsmall"` for the smallest tile (20px).
|
|
14
|
+
- **Pixel number sizes removed** — `size` values `"24"`, `"32"`, `"40"`, `"48"` have been removed.
|
|
15
|
+
Migrate to t-shirt sizes:
|
|
16
|
+
- `"small"` (replaces `"24"`)
|
|
17
|
+
- `"medium"` (replaces `"32"`)
|
|
18
|
+
- `"large"` (replaces `"40"`)
|
|
19
|
+
- `"xlarge"` (replaces `"48"`)
|
|
20
|
+
- **`LegacyIconTileSize` and `NewIconTileSize` types removed** — Use `IconTileSize` directly.
|
|
21
|
+
- Icon tile defaults to size `medium` (previously - `small`).
|
|
22
|
+
- `UNSAFE_circleReplacementComponent` is required if `shape='circle'` is passed in.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
28
|
+
## 34.6.0
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- [`b75e40f942dce`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b75e40f942dce) -
|
|
33
|
+
This release updates icons in `@atlaskit/icon`.
|
|
34
|
+
|
|
35
|
+
### Updated:
|
|
36
|
+
|
|
37
|
+
**`@atlaskit/icon/core`**
|
|
38
|
+
- `ai-generative-text-summary`
|
|
39
|
+
- `briefcase`
|
|
40
|
+
- `chart-pie`
|
|
41
|
+
- `customize`
|
|
42
|
+
- `filter`
|
|
43
|
+
|
|
3
44
|
## 34.5.0
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::95423e512da4efab75a02d0a150e041a>>
|
|
4
4
|
* @codegenCommand yarn build:icon-glyphs
|
|
5
5
|
*/
|
|
6
6
|
"use strict";
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
const AiGenerativeTextSummaryIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
|
|
24
24
|
name: "AiGenerativeTextSummaryIcon",
|
|
25
|
-
dangerouslySetGlyph: `<path fill="currentcolor"
|
|
25
|
+
dangerouslySetGlyph: `<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"/>`
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
}, props));
|
|
28
28
|
AiGenerativeTextSummaryIcon.displayName = 'AiGenerativeTextSummaryIcon';
|
package/core/briefcase.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::41cd11067ce1d0d6d14f19a5e317169f>>
|
|
4
4
|
* @codegenCommand yarn build:icon-glyphs
|
|
5
5
|
*/
|
|
6
6
|
"use strict";
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
const BriefcaseIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
|
|
24
24
|
name: "BriefcaseIcon",
|
|
25
|
-
dangerouslySetGlyph: `<path fill="currentcolor"
|
|
25
|
+
dangerouslySetGlyph: `<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"/>`
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
}, props));
|
|
28
28
|
BriefcaseIcon.displayName = 'BriefcaseIcon';
|
package/core/chart-pie.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::696e8e582a2b305e33fcb167389e54e1>>
|
|
4
4
|
* @codegenCommand yarn build:icon-glyphs
|
|
5
5
|
*/
|
|
6
6
|
"use strict";
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
const ChartPieIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
|
|
24
24
|
name: "ChartPieIcon",
|
|
25
|
-
dangerouslySetGlyph: `<mask id="
|
|
25
|
+
dangerouslySetGlyph: `<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"/>`
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
}, props));
|
|
28
28
|
ChartPieIcon.displayName = 'ChartPieIcon';
|
package/core/customize.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::cdb0c4632ec53a88d1120e8b448f861e>>
|
|
4
4
|
* @codegenCommand yarn build:icon-glyphs
|
|
5
5
|
*/
|
|
6
6
|
"use strict";
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
const CustomizeIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
|
|
24
24
|
name: "CustomizeIcon",
|
|
25
|
-
dangerouslySetGlyph: `<path fill="currentcolor"
|
|
25
|
+
dangerouslySetGlyph: `<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"/>`
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
}, props));
|
|
28
28
|
CustomizeIcon.displayName = 'CustomizeIcon';
|
package/core/filter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::0b83e18362be7337c33091ec68bfbcb2>>
|
|
4
4
|
* @codegenCommand yarn build:icon-glyphs
|
|
5
5
|
*/
|
|
6
6
|
"use strict";
|
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
22
22
|
*/
|
|
23
23
|
const FilterIcon = props => /*#__PURE__*/_react.default.createElement(_baseNew.default, Object.assign({
|
|
24
24
|
name: "FilterIcon",
|
|
25
|
-
dangerouslySetGlyph: `<path fill="currentcolor"
|
|
25
|
+
dangerouslySetGlyph: `<path fill="currentcolor" d="M11 12v1.5H5V12zm2-4.75v1.5H3v-1.5zm2-4.75V4H1V2.5z"/>`
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
}, props));
|
|
28
28
|
FilterIcon.displayName = 'FilterIcon';
|
|
@@ -12,21 +12,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _tile = _interopRequireDefault(require("@atlaskit/tile"));
|
|
14
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
-
var sizeCrossCompatibleMap = {
|
|
16
|
-
// Size mapping from old pixel sizes to new t-shirt sizes
|
|
17
|
-
'16': 'xsmall',
|
|
18
|
-
// Not used
|
|
19
|
-
'24': 'small',
|
|
20
|
-
'32': 'medium',
|
|
21
|
-
'40': 'large',
|
|
22
|
-
'48': 'xlarge',
|
|
23
|
-
xsmall: 'xsmall',
|
|
24
|
-
small: 'small',
|
|
25
|
-
medium: 'medium',
|
|
26
|
-
large: 'large',
|
|
27
|
-
xlarge: 'xlarge'
|
|
28
|
-
};
|
|
29
|
-
|
|
30
15
|
// Icon color mapping for Tile-based icons
|
|
31
16
|
var iconColorMap = {
|
|
32
17
|
blue: "_syaz6txe",
|
|
@@ -89,7 +74,7 @@ function IconTileNew(props) {
|
|
|
89
74
|
testId = props.testId;
|
|
90
75
|
var ExpandedIcon = Icon;
|
|
91
76
|
return /*#__PURE__*/React.createElement(_tile.default, {
|
|
92
|
-
size:
|
|
77
|
+
size: size,
|
|
93
78
|
backgroundColor: backgroundColorMap[appearance],
|
|
94
79
|
label: label,
|
|
95
80
|
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}
|
|
@@ -11,20 +11,13 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
13
|
var sizeCrossCompatibleMap = {
|
|
14
|
-
// Size mapping from new t-shirt sizes to old pixel sizes
|
|
15
14
|
xsmall: '20',
|
|
16
15
|
small: '24',
|
|
17
16
|
medium: '32',
|
|
18
17
|
large: '40',
|
|
19
|
-
xlarge: '48'
|
|
20
|
-
'16': '16',
|
|
21
|
-
'24': '24',
|
|
22
|
-
'32': '32',
|
|
23
|
-
'40': '40',
|
|
24
|
-
'48': '48'
|
|
18
|
+
xlarge: '48'
|
|
25
19
|
};
|
|
26
20
|
var sizeMap = {
|
|
27
|
-
'16': "_1bsb7vkz _4t3i7vkz",
|
|
28
21
|
'20': "_1bsbgktf _4t3igktf",
|
|
29
22
|
'24': "_1bsb1tcg _4t3i1tcg",
|
|
30
23
|
'32': "_1bsbzwfg _4t3izwfg",
|
|
@@ -69,7 +62,7 @@ function IconTile(props) {
|
|
|
69
62
|
label = props.label,
|
|
70
63
|
appearance = props.appearance,
|
|
71
64
|
_props$size = props.size,
|
|
72
|
-
size = _props$size === void 0 ? '
|
|
65
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
73
66
|
_props$shape = props.shape,
|
|
74
67
|
shape = _props$shape === void 0 ? 'square' : _props$shape,
|
|
75
68
|
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,91 @@
|
|
|
1
|
+
/* icon-tile.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = IconTileNew;
|
|
10
|
+
require("./icon-tile.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _tile = _interopRequireDefault(require("@atlaskit/tile"));
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
// Icon color mapping for Tile-based icons
|
|
16
|
+
var iconColorMap = {
|
|
17
|
+
blue: "_syaz6txe",
|
|
18
|
+
blueBold: "_syaz1q3r",
|
|
19
|
+
gray: "_syazdgkc",
|
|
20
|
+
grayBold: "_syaz5w2r",
|
|
21
|
+
green: "_syaz17hp",
|
|
22
|
+
greenBold: "_syaz1q3r",
|
|
23
|
+
lime: "_syaz8645",
|
|
24
|
+
limeBold: "_syaz1q3r",
|
|
25
|
+
magenta: "_syazv8hk",
|
|
26
|
+
magentaBold: "_syaz1q3r",
|
|
27
|
+
orange: "_syaz1j6y",
|
|
28
|
+
orangeBold: "_syaz1q3r",
|
|
29
|
+
purple: "_syazuq3u",
|
|
30
|
+
purpleBold: "_syaz1q3r",
|
|
31
|
+
red: "_syaznbxb",
|
|
32
|
+
redBold: "_syaz1q3r",
|
|
33
|
+
teal: "_syaz8uof",
|
|
34
|
+
tealBold: "_syaz1q3r",
|
|
35
|
+
yellow: "_syaz1oqg",
|
|
36
|
+
yellowBold: "_syaz1q3r"
|
|
37
|
+
};
|
|
38
|
+
var iconWrapperStyles = {
|
|
39
|
+
root: "_vwz4idpf"
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Background color mapping for Tile component
|
|
43
|
+
var backgroundColorMap = {
|
|
44
|
+
blue: undefined,
|
|
45
|
+
blueBold: 'color.background.accent.blue.subtle',
|
|
46
|
+
gray: undefined,
|
|
47
|
+
grayBold: 'color.background.neutral.bold',
|
|
48
|
+
green: undefined,
|
|
49
|
+
greenBold: 'color.background.accent.green.subtle',
|
|
50
|
+
lime: undefined,
|
|
51
|
+
limeBold: 'color.background.accent.lime.subtle',
|
|
52
|
+
magenta: undefined,
|
|
53
|
+
magentaBold: 'color.background.accent.magenta.subtle',
|
|
54
|
+
orange: undefined,
|
|
55
|
+
orangeBold: 'color.background.accent.orange.subtle',
|
|
56
|
+
purple: undefined,
|
|
57
|
+
purpleBold: 'color.background.accent.purple.subtle',
|
|
58
|
+
red: undefined,
|
|
59
|
+
redBold: 'color.background.accent.red.subtle',
|
|
60
|
+
teal: undefined,
|
|
61
|
+
tealBold: 'color.background.accent.teal.subtle',
|
|
62
|
+
yellow: undefined,
|
|
63
|
+
yellowBold: 'color.background.accent.yellow.subtle'
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* __IconTile__
|
|
68
|
+
*
|
|
69
|
+
* An icon with background shape, color, and size properties determined by Tile.
|
|
70
|
+
*/
|
|
71
|
+
function IconTileNew(props) {
|
|
72
|
+
var Icon = props.icon,
|
|
73
|
+
label = props.label,
|
|
74
|
+
appearance = props.appearance,
|
|
75
|
+
_props$size = props.size,
|
|
76
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
77
|
+
testId = props.testId;
|
|
78
|
+
var ExpandedIcon = Icon;
|
|
79
|
+
return /*#__PURE__*/React.createElement(_tile.default, {
|
|
80
|
+
size: size,
|
|
81
|
+
backgroundColor: backgroundColorMap[appearance],
|
|
82
|
+
label: label,
|
|
83
|
+
testId: testId
|
|
84
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
className: (0, _runtime.ax)([iconColorMap[appearance], iconWrapperStyles.root])
|
|
86
|
+
}, /*#__PURE__*/React.createElement(ExpandedIcon, {
|
|
87
|
+
color: "currentColor",
|
|
88
|
+
label: "",
|
|
89
|
+
shouldScale: true
|
|
90
|
+
})));
|
|
91
|
+
}
|
|
@@ -7,74 +7,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = IconTile;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var
|
|
10
|
+
var _iconTile = _interopRequireDefault(require("./icon-tile"));
|
|
11
11
|
var _iconTileOld = _interopRequireDefault(require("./icon-tile-old"));
|
|
12
|
-
// Import both versions
|
|
13
|
-
|
|
14
|
-
// Color mapping for size 16 standalone icons that will no longer be tiles
|
|
15
|
-
var appearanceToIconColorMap = {
|
|
16
|
-
blue: "var(--ds-icon-accent-blue, #357DE8)",
|
|
17
|
-
blueBold: "var(--ds-icon-accent-blue, #357DE8)",
|
|
18
|
-
gray: "var(--ds-icon-accent-gray, #7D818A)",
|
|
19
|
-
grayBold: "var(--ds-icon-accent-gray, #7D818A)",
|
|
20
|
-
green: "var(--ds-icon-accent-green, #22A06B)",
|
|
21
|
-
greenBold: "var(--ds-icon-accent-green, #22A06B)",
|
|
22
|
-
lime: "var(--ds-icon-accent-lime, #6A9A23)",
|
|
23
|
-
limeBold: "var(--ds-icon-accent-lime, #6A9A23)",
|
|
24
|
-
magenta: "var(--ds-icon-accent-magenta, #CD519D)",
|
|
25
|
-
magentaBold: "var(--ds-icon-accent-magenta, #CD519D)",
|
|
26
|
-
orange: "var(--ds-icon-accent-orange, #E06C00)",
|
|
27
|
-
orangeBold: "var(--ds-icon-accent-orange, #E06C00)",
|
|
28
|
-
purple: "var(--ds-icon-accent-purple, #AF59E1)",
|
|
29
|
-
purpleBold: "var(--ds-icon-accent-purple, #AF59E1)",
|
|
30
|
-
red: "var(--ds-icon-accent-red, #C9372C)",
|
|
31
|
-
redBold: "var(--ds-icon-accent-red, #C9372C)",
|
|
32
|
-
teal: "var(--ds-icon-accent-teal, #2898BD)",
|
|
33
|
-
tealBold: "var(--ds-icon-accent-teal, #2898BD)",
|
|
34
|
-
yellow: "var(--ds-icon-accent-yellow, #B38600)",
|
|
35
|
-
yellowBold: "var(--ds-icon-accent-yellow, #B38600)"
|
|
36
|
-
};
|
|
37
|
-
|
|
38
12
|
/**
|
|
39
13
|
* __IconTile__
|
|
40
14
|
*
|
|
41
15
|
* An icon with background shape, color, and size properties determined by Tile.
|
|
42
16
|
*/
|
|
43
|
-
function IconTile(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
appearance: appearance,
|
|
65
|
-
icon: Icon,
|
|
66
|
-
label: label,
|
|
67
|
-
shape: shape,
|
|
68
|
-
size: size,
|
|
69
|
-
testId: testId
|
|
17
|
+
function IconTile(props) {
|
|
18
|
+
if (props.shape === 'circle' && ((0, _platformFeatureFlags.fg)('platform_dst_icon_tile_circle_replacement') || (0, _platformFeatureFlags.fg)('platform_dst_icon_tile_circle_replacement_stage2'))) {
|
|
19
|
+
return props.UNSAFE_circleReplacementComponent;
|
|
20
|
+
} else if (props.shape === 'circle') {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_iconTileOld.default, {
|
|
22
|
+
appearance: props.appearance,
|
|
23
|
+
icon: props.icon,
|
|
24
|
+
label: props.label,
|
|
25
|
+
shape: 'circle',
|
|
26
|
+
size: props.size,
|
|
27
|
+
testId: props.testId,
|
|
28
|
+
UNSAFE_circleReplacementComponent: props.UNSAFE_circleReplacementComponent
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_iconTile.default, {
|
|
32
|
+
appearance: props.appearance,
|
|
33
|
+
icon: props.icon,
|
|
34
|
+
label: props.label,
|
|
35
|
+
shape: props.shape,
|
|
36
|
+
size: props.size,
|
|
37
|
+
testId: props.testId
|
|
70
38
|
});
|
|
71
39
|
}
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(_iconTileOld.default, {
|
|
73
|
-
appearance: appearance,
|
|
74
|
-
icon: Icon,
|
|
75
|
-
label: label,
|
|
76
|
-
shape: shape,
|
|
77
|
-
size: size,
|
|
78
|
-
testId: testId
|
|
79
|
-
});
|
|
80
40
|
}
|
|
@@ -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
|
-
const 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
|
const iconColorMap = {
|
|
23
8
|
blue: "_syaz6txe",
|
|
@@ -81,7 +66,7 @@ export default function IconTileNew(props) {
|
|
|
81
66
|
} = props;
|
|
82
67
|
const ExpandedIcon = Icon;
|
|
83
68
|
return /*#__PURE__*/React.createElement(Tile, {
|
|
84
|
-
size:
|
|
69
|
+
size: size,
|
|
85
70
|
backgroundColor: backgroundColorMap[appearance],
|
|
86
71
|
label: label,
|
|
87
72
|
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
|
const 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
|
const 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
|
icon: Icon,
|
|
62
55
|
label,
|
|
63
56
|
appearance,
|
|
64
|
-
size = '
|
|
57
|
+
size = 'medium',
|
|
65
58
|
shape = 'square',
|
|
66
59
|
testId
|
|
67
60
|
} = props;
|
|
@@ -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,83 @@
|
|
|
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
|
+
const 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
|
+
const iconWrapperStyles = {
|
|
30
|
+
root: "_vwz4idpf"
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Background color mapping for Tile component
|
|
34
|
+
const 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
|
+
const {
|
|
64
|
+
icon: Icon,
|
|
65
|
+
label,
|
|
66
|
+
appearance,
|
|
67
|
+
size = 'medium',
|
|
68
|
+
testId
|
|
69
|
+
} = props;
|
|
70
|
+
const ExpandedIcon = Icon;
|
|
71
|
+
return /*#__PURE__*/React.createElement(Tile, {
|
|
72
|
+
size: size,
|
|
73
|
+
backgroundColor: backgroundColorMap[appearance],
|
|
74
|
+
label: label,
|
|
75
|
+
testId: testId
|
|
76
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
className: ax([iconColorMap[appearance], iconWrapperStyles.root])
|
|
78
|
+
}, /*#__PURE__*/React.createElement(ExpandedIcon, {
|
|
79
|
+
color: "currentColor",
|
|
80
|
+
label: "",
|
|
81
|
+
shouldScale: true
|
|
82
|
+
})));
|
|
83
|
+
}
|