@atlaskit/icon 22.15.1 → 22.16.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 +17 -0
- package/dist/cjs/components/icon-new.js +6 -2
- package/dist/cjs/metadata-utility.js +1 -0
- package/dist/cjs/migration-map.js +10 -0
- package/dist/es2019/components/icon-new.js +6 -1
- package/dist/es2019/metadata-utility.js +1 -0
- package/dist/es2019/migration-map.js +10 -0
- package/dist/esm/components/icon-new.js +6 -2
- package/dist/esm/metadata-utility.js +1 -0
- package/dist/esm/migration-map.js +10 -0
- package/package.json +6 -7
- package/utility/migration/cross--editor-close.d.ts +14 -0
- package/utility/migration/cross--editor-close.js +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 22.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#137781](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137781)
|
|
8
|
+
[`21bfb50836bad`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/21bfb50836bad) -
|
|
9
|
+
Added a new icon to the utility migration icon set: 'cross--editor-close'
|
|
10
|
+
|
|
11
|
+
## 22.15.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#135696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/135696)
|
|
16
|
+
[`81ef1300efc63`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/81ef1300efc63) -
|
|
17
|
+
This release tests changes to the default color value for new icons in `/core` and `/utility`
|
|
18
|
+
entrypoints behind a feature flag. These changes will roll out in an upcoming major release.
|
|
19
|
+
|
|
3
20
|
## 22.15.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -94,8 +94,7 @@ var baseSizeMap = {
|
|
|
94
94
|
*/
|
|
95
95
|
var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
96
96
|
var _ref = props,
|
|
97
|
-
|
|
98
|
-
color = _ref$color === void 0 ? "var(--ds-icon, #44546F)" : _ref$color,
|
|
97
|
+
providedColor = _ref.color,
|
|
99
98
|
_ref$spacing = _ref.spacing,
|
|
100
99
|
providedSpacing = _ref$spacing === void 0 ? 'none' : _ref$spacing,
|
|
101
100
|
testId = _ref.testId,
|
|
@@ -109,6 +108,11 @@ var Icon = exports.Icon = /*#__PURE__*/(0, _react.memo)(function Icon(props) {
|
|
|
109
108
|
dangerouslySetGlyph = _ref.dangerouslySetGlyph,
|
|
110
109
|
shouldScale = _ref.shouldScale,
|
|
111
110
|
LEGACY_margin = _ref.LEGACY_margin;
|
|
111
|
+
var fallbackColor = "var(--ds-icon, #44546F)";
|
|
112
|
+
if ((0, _platformFeatureFlags.fg)('platform-design-system-new-icon-default-color')) {
|
|
113
|
+
fallbackColor = 'currentColor';
|
|
114
|
+
}
|
|
115
|
+
var color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
|
|
112
116
|
var dangerouslySetInnerHTML = dangerouslySetGlyph ? {
|
|
113
117
|
__html: dangerouslySetGlyph
|
|
114
118
|
} : undefined;
|
|
@@ -128,6 +128,7 @@ var metadata = {
|
|
|
128
128
|
keywords: ['cross', 'close', 'x', 'cancel', 'icon', 'utility', 'remove', 'clear', 'x'],
|
|
129
129
|
componentName: 'CrossIcon',
|
|
130
130
|
package: '@atlaskit/icon/utility/cross',
|
|
131
|
+
oldName: ['editor/close'],
|
|
131
132
|
type: 'utility',
|
|
132
133
|
categorization: 'utility',
|
|
133
134
|
usage: 'Known uses: remove tag.',
|
|
@@ -1275,6 +1275,11 @@ var migrationMap = {
|
|
|
1275
1275
|
type: 'core',
|
|
1276
1276
|
package: '@atlaskit/icon'
|
|
1277
1277
|
},
|
|
1278
|
+
additionalIcons: [{
|
|
1279
|
+
name: 'cross',
|
|
1280
|
+
type: 'utility',
|
|
1281
|
+
package: '@atlaskit/icon'
|
|
1282
|
+
}],
|
|
1278
1283
|
sizeGuidance: {
|
|
1279
1284
|
small: 'swap',
|
|
1280
1285
|
medium: 'swap',
|
|
@@ -1353,6 +1358,11 @@ var migrationMap = {
|
|
|
1353
1358
|
type: 'core',
|
|
1354
1359
|
package: '@atlaskit/icon'
|
|
1355
1360
|
},
|
|
1361
|
+
additionalIcons: [{
|
|
1362
|
+
name: 'check-mark',
|
|
1363
|
+
type: 'utility',
|
|
1364
|
+
package: '@atlaskit/icon'
|
|
1365
|
+
}],
|
|
1356
1366
|
sizeGuidance: {
|
|
1357
1367
|
small: 'swap',
|
|
1358
1368
|
medium: 'swap',
|
|
@@ -88,7 +88,7 @@ const baseSizeMap = {
|
|
|
88
88
|
*/
|
|
89
89
|
export const Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
90
90
|
const {
|
|
91
|
-
color
|
|
91
|
+
color: providedColor,
|
|
92
92
|
spacing: providedSpacing = 'none',
|
|
93
93
|
testId,
|
|
94
94
|
label,
|
|
@@ -104,6 +104,11 @@ export const Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
104
104
|
shouldScale,
|
|
105
105
|
LEGACY_margin
|
|
106
106
|
} = props;
|
|
107
|
+
let fallbackColor = "var(--ds-icon, #44546F)";
|
|
108
|
+
if (fg('platform-design-system-new-icon-default-color')) {
|
|
109
|
+
fallbackColor = 'currentColor';
|
|
110
|
+
}
|
|
111
|
+
const color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
|
|
107
112
|
const dangerouslySetInnerHTML = dangerouslySetGlyph ? {
|
|
108
113
|
__html: dangerouslySetGlyph
|
|
109
114
|
} : undefined;
|
|
@@ -122,6 +122,7 @@ const metadata = {
|
|
|
122
122
|
keywords: ['cross', 'close', 'x', 'cancel', 'icon', 'utility', 'remove', 'clear', 'x'],
|
|
123
123
|
componentName: 'CrossIcon',
|
|
124
124
|
package: '@atlaskit/icon/utility/cross',
|
|
125
|
+
oldName: ['editor/close'],
|
|
125
126
|
type: 'utility',
|
|
126
127
|
categorization: 'utility',
|
|
127
128
|
usage: 'Known uses: remove tag.',
|
|
@@ -1269,6 +1269,11 @@ const migrationMap = {
|
|
|
1269
1269
|
type: 'core',
|
|
1270
1270
|
package: '@atlaskit/icon'
|
|
1271
1271
|
},
|
|
1272
|
+
additionalIcons: [{
|
|
1273
|
+
name: 'cross',
|
|
1274
|
+
type: 'utility',
|
|
1275
|
+
package: '@atlaskit/icon'
|
|
1276
|
+
}],
|
|
1272
1277
|
sizeGuidance: {
|
|
1273
1278
|
small: 'swap',
|
|
1274
1279
|
medium: 'swap',
|
|
@@ -1347,6 +1352,11 @@ const migrationMap = {
|
|
|
1347
1352
|
type: 'core',
|
|
1348
1353
|
package: '@atlaskit/icon'
|
|
1349
1354
|
},
|
|
1355
|
+
additionalIcons: [{
|
|
1356
|
+
name: 'check-mark',
|
|
1357
|
+
type: 'utility',
|
|
1358
|
+
package: '@atlaskit/icon'
|
|
1359
|
+
}],
|
|
1350
1360
|
sizeGuidance: {
|
|
1351
1361
|
small: 'swap',
|
|
1352
1362
|
medium: 'swap',
|
|
@@ -88,8 +88,7 @@ var baseSizeMap = {
|
|
|
88
88
|
*/
|
|
89
89
|
export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
90
90
|
var _ref = props,
|
|
91
|
-
|
|
92
|
-
color = _ref$color === void 0 ? "var(--ds-icon, #44546F)" : _ref$color,
|
|
91
|
+
providedColor = _ref.color,
|
|
93
92
|
_ref$spacing = _ref.spacing,
|
|
94
93
|
providedSpacing = _ref$spacing === void 0 ? 'none' : _ref$spacing,
|
|
95
94
|
testId = _ref.testId,
|
|
@@ -103,6 +102,11 @@ export var Icon = /*#__PURE__*/memo(function Icon(props) {
|
|
|
103
102
|
dangerouslySetGlyph = _ref.dangerouslySetGlyph,
|
|
104
103
|
shouldScale = _ref.shouldScale,
|
|
105
104
|
LEGACY_margin = _ref.LEGACY_margin;
|
|
105
|
+
var fallbackColor = "var(--ds-icon, #44546F)";
|
|
106
|
+
if (fg('platform-design-system-new-icon-default-color')) {
|
|
107
|
+
fallbackColor = 'currentColor';
|
|
108
|
+
}
|
|
109
|
+
var color = providedColor !== null && providedColor !== void 0 ? providedColor : fallbackColor;
|
|
106
110
|
var dangerouslySetInnerHTML = dangerouslySetGlyph ? {
|
|
107
111
|
__html: dangerouslySetGlyph
|
|
108
112
|
} : undefined;
|
|
@@ -122,6 +122,7 @@ var metadata = {
|
|
|
122
122
|
keywords: ['cross', 'close', 'x', 'cancel', 'icon', 'utility', 'remove', 'clear', 'x'],
|
|
123
123
|
componentName: 'CrossIcon',
|
|
124
124
|
package: '@atlaskit/icon/utility/cross',
|
|
125
|
+
oldName: ['editor/close'],
|
|
125
126
|
type: 'utility',
|
|
126
127
|
categorization: 'utility',
|
|
127
128
|
usage: 'Known uses: remove tag.',
|
|
@@ -1269,6 +1269,11 @@ var migrationMap = {
|
|
|
1269
1269
|
type: 'core',
|
|
1270
1270
|
package: '@atlaskit/icon'
|
|
1271
1271
|
},
|
|
1272
|
+
additionalIcons: [{
|
|
1273
|
+
name: 'cross',
|
|
1274
|
+
type: 'utility',
|
|
1275
|
+
package: '@atlaskit/icon'
|
|
1276
|
+
}],
|
|
1272
1277
|
sizeGuidance: {
|
|
1273
1278
|
small: 'swap',
|
|
1274
1279
|
medium: 'swap',
|
|
@@ -1347,6 +1352,11 @@ var migrationMap = {
|
|
|
1347
1352
|
type: 'core',
|
|
1348
1353
|
package: '@atlaskit/icon'
|
|
1349
1354
|
},
|
|
1355
|
+
additionalIcons: [{
|
|
1356
|
+
name: 'check-mark',
|
|
1357
|
+
type: 'utility',
|
|
1358
|
+
package: '@atlaskit/icon'
|
|
1359
|
+
}],
|
|
1350
1360
|
sizeGuidance: {
|
|
1351
1361
|
small: 'swap',
|
|
1352
1362
|
medium: 'swap',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/icon",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.16.0",
|
|
4
4
|
"description": "An icon is a visual representation of a command, device, directory, or common action.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Design System Team",
|
|
19
|
-
"productPushConsumption": [
|
|
20
|
-
"jira"
|
|
21
|
-
],
|
|
22
|
-
"releaseModel": "continuous",
|
|
23
19
|
"website": {
|
|
24
20
|
"name": "Icon",
|
|
25
21
|
"category": "Components"
|
|
@@ -45,11 +41,11 @@
|
|
|
45
41
|
"@atlaskit/code": "^15.6.0",
|
|
46
42
|
"@atlaskit/ds-lib": "^2.5.0",
|
|
47
43
|
"@atlaskit/logo": "^14.2.0",
|
|
48
|
-
"@atlaskit/primitives": "^12.
|
|
44
|
+
"@atlaskit/primitives": "^12.1.0",
|
|
49
45
|
"@atlaskit/ssr": "*",
|
|
50
46
|
"@atlaskit/textfield": "^6.5.0",
|
|
51
47
|
"@atlaskit/theme": "^13.0.0",
|
|
52
|
-
"@atlaskit/toggle": "^13.
|
|
48
|
+
"@atlaskit/toggle": "^13.4.0",
|
|
53
49
|
"@atlaskit/tooltip": "^18.7.0",
|
|
54
50
|
"@atlaskit/visual-regression": "*",
|
|
55
51
|
"@babel/core": "^7.20.0",
|
|
@@ -119,6 +115,9 @@
|
|
|
119
115
|
"platform-visual-refresh-icons-legacy-facade": {
|
|
120
116
|
"type": "boolean",
|
|
121
117
|
"showOnWebsiteForTransitiveDependencies": true
|
|
118
|
+
},
|
|
119
|
+
"platform-design-system-new-icon-default-color": {
|
|
120
|
+
"type": "boolean"
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
123
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::fe12111f9fd9352caac76e6700547352>>
|
|
4
|
+
* @codegenCommand yarn build:icon-glyphs
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import Icon from '@atlaskit/icon/UNSAFE_base-new';
|
|
9
|
+
|
|
10
|
+
declare const CrossIconMigration: {
|
|
11
|
+
(props: Omit<React.ComponentProps<typeof Icon>, 'dangerouslySetGlyph' | 'type' | 'spacing' | 'LEGACY_fallbackIcon'> ): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default CrossIconMigration;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::7f4a9a14e2cbd991149ff35fe23cef8b>>
|
|
4
|
+
* @codegenCommand yarn build:icon-glyphs
|
|
5
|
+
*/
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "__esModule", {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
11
|
+
exports.default = void 0;
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/utility/cross"));
|
|
14
|
+
var _close = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/close"));
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
/**
|
|
17
|
+
* ⚠️ EXPERIMENTAL ⚠️ - New icons are in alpha - and subject to change or removal in future minor or patch releases.
|
|
18
|
+
*
|
|
19
|
+
* Migration Icon component for CrossIcon.
|
|
20
|
+
* This component is CrossIcon, with `UNSAFE_fallbackIcon` set to "EditorCloseIcon".
|
|
21
|
+
*
|
|
22
|
+
* Category: utility
|
|
23
|
+
* Location: @atlaskit/icon
|
|
24
|
+
* Usage guidance: Known uses: remove tag.
|
|
25
|
+
* - [Examples](https://atlaskit.atlassian.com/packages/design-system/icon)
|
|
26
|
+
* - [Code](https://atlaskit.atlassian.com/packages/design-system/icon/docs/custom-icons)
|
|
27
|
+
*/
|
|
28
|
+
const CrossIcon = props => /*#__PURE__*/_react.default.createElement(_cross.default, Object.assign({
|
|
29
|
+
LEGACY_fallbackIcon: _close.default
|
|
30
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
31
|
+
}, props));
|
|
32
|
+
CrossIcon.Name = 'CrossIconMigration';
|
|
33
|
+
var _default = exports.default = CrossIcon;
|