@atlaskit/icon 23.4.0 → 23.5.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 +20 -0
- package/build/index.tsx +32 -0
- package/dist/cjs/components/icon-tile.js +1 -0
- package/dist/cjs/migration-map.js +9 -4
- package/dist/es2019/components/icon-tile.js +1 -0
- package/dist/es2019/migration-map.js +9 -4
- package/dist/esm/components/icon-tile.js +1 -0
- package/dist/esm/migration-map.js +9 -4
- package/dist/types/components/icon-facade.d.ts +2 -4
- package/dist/types-ts4.5/components/icon-facade.d.ts +2 -4
- package/package.json +17 -17
- package/__perf__/default.tsx +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/icon
|
|
2
2
|
|
|
3
|
+
## 23.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 23.4.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#103999](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103999)
|
|
20
|
+
[`9f62ecec4d422`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f62ecec4d422) -
|
|
21
|
+
Update dependencies.
|
|
22
|
+
|
|
3
23
|
## 23.4.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/build/index.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import buildIcons, {
|
|
|
8
8
|
createDeprecatedIconDocs,
|
|
9
9
|
createIconDocs,
|
|
10
10
|
createIconDocsNew,
|
|
11
|
+
createVRTest,
|
|
11
12
|
type IconBuildConfig,
|
|
12
13
|
type NewIconBuildConfig,
|
|
13
14
|
} from '@af/icon-build-process';
|
|
@@ -130,6 +131,37 @@ async function main() {
|
|
|
130
131
|
);
|
|
131
132
|
|
|
132
133
|
fs.outputFile(path.resolve(root, 'src/deprecated-utility.tsx'), deprecatedDocs);
|
|
134
|
+
|
|
135
|
+
// Generate VR tests
|
|
136
|
+
const [vrExampleCore, vrTestCore] = createVRTest(
|
|
137
|
+
coreIconMetadata,
|
|
138
|
+
'../../../../..',
|
|
139
|
+
20,
|
|
140
|
+
'core',
|
|
141
|
+
);
|
|
142
|
+
fs.outputFile(
|
|
143
|
+
path.resolve(root, 'src/components/__tests__/vr-tests/examples/all-core-icons.tsx'),
|
|
144
|
+
vrExampleCore,
|
|
145
|
+
);
|
|
146
|
+
fs.outputFile(
|
|
147
|
+
path.resolve(root, 'src/components/__tests__/vr-tests/all-core-icons.test.vr.tsx'),
|
|
148
|
+
vrTestCore,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
const [vrExampleUtility, vrTestUtility] = createVRTest(
|
|
152
|
+
utilityIconMetadata,
|
|
153
|
+
'../../../../..',
|
|
154
|
+
20,
|
|
155
|
+
'utility',
|
|
156
|
+
);
|
|
157
|
+
fs.outputFile(
|
|
158
|
+
path.resolve(root, 'src/components/__tests__/vr-tests/examples/all-utility-icons.tsx'),
|
|
159
|
+
vrExampleUtility,
|
|
160
|
+
);
|
|
161
|
+
fs.outputFile(
|
|
162
|
+
path.resolve(root, 'src/components/__tests__/vr-tests/all-utility-icons.test.vr.tsx'),
|
|
163
|
+
vrTestUtility,
|
|
164
|
+
);
|
|
133
165
|
});
|
|
134
166
|
}
|
|
135
167
|
|
|
@@ -130,6 +130,7 @@ var iconTileStyles = (0, _react.css)({
|
|
|
130
130
|
boxSizing: 'border-box',
|
|
131
131
|
alignItems: 'center',
|
|
132
132
|
justifyContent: 'center',
|
|
133
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
133
134
|
fontSize: 0 /* Prevents parent font-size from affecting the container */
|
|
134
135
|
});
|
|
135
136
|
|
|
@@ -2559,11 +2559,16 @@ var migrationMap = {
|
|
|
2559
2559
|
}
|
|
2560
2560
|
},
|
|
2561
2561
|
'issue-raise': {
|
|
2562
|
+
newIcon: {
|
|
2563
|
+
name: 'plus-square',
|
|
2564
|
+
type: 'core',
|
|
2565
|
+
package: '@atlaskit/icon'
|
|
2566
|
+
},
|
|
2562
2567
|
sizeGuidance: {
|
|
2563
|
-
small: '
|
|
2564
|
-
medium: '
|
|
2565
|
-
large: '
|
|
2566
|
-
xlarge: '
|
|
2568
|
+
small: 'swap',
|
|
2569
|
+
medium: 'swap',
|
|
2570
|
+
large: 'swap',
|
|
2571
|
+
xlarge: 'swap'
|
|
2567
2572
|
}
|
|
2568
2573
|
},
|
|
2569
2574
|
issues: {
|
|
@@ -123,6 +123,7 @@ const iconTileStyles = css({
|
|
|
123
123
|
boxSizing: 'border-box',
|
|
124
124
|
alignItems: 'center',
|
|
125
125
|
justifyContent: 'center',
|
|
126
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
126
127
|
fontSize: 0 /* Prevents parent font-size from affecting the container */
|
|
127
128
|
});
|
|
128
129
|
|
|
@@ -2553,11 +2553,16 @@ const migrationMap = {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
},
|
|
2555
2555
|
'issue-raise': {
|
|
2556
|
+
newIcon: {
|
|
2557
|
+
name: 'plus-square',
|
|
2558
|
+
type: 'core',
|
|
2559
|
+
package: '@atlaskit/icon'
|
|
2560
|
+
},
|
|
2556
2561
|
sizeGuidance: {
|
|
2557
|
-
small: '
|
|
2558
|
-
medium: '
|
|
2559
|
-
large: '
|
|
2560
|
-
xlarge: '
|
|
2562
|
+
small: 'swap',
|
|
2563
|
+
medium: 'swap',
|
|
2564
|
+
large: 'swap',
|
|
2565
|
+
xlarge: 'swap'
|
|
2561
2566
|
}
|
|
2562
2567
|
},
|
|
2563
2568
|
issues: {
|
|
@@ -123,6 +123,7 @@ var iconTileStyles = css({
|
|
|
123
123
|
boxSizing: 'border-box',
|
|
124
124
|
alignItems: 'center',
|
|
125
125
|
justifyContent: 'center',
|
|
126
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
126
127
|
fontSize: 0 /* Prevents parent font-size from affecting the container */
|
|
127
128
|
});
|
|
128
129
|
|
|
@@ -2553,11 +2553,16 @@ var migrationMap = {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
},
|
|
2555
2555
|
'issue-raise': {
|
|
2556
|
+
newIcon: {
|
|
2557
|
+
name: 'plus-square',
|
|
2558
|
+
type: 'core',
|
|
2559
|
+
package: '@atlaskit/icon'
|
|
2560
|
+
},
|
|
2556
2561
|
sizeGuidance: {
|
|
2557
|
-
small: '
|
|
2558
|
-
medium: '
|
|
2559
|
-
large: '
|
|
2560
|
-
xlarge: '
|
|
2562
|
+
small: 'swap',
|
|
2563
|
+
medium: 'swap',
|
|
2564
|
+
large: 'swap',
|
|
2565
|
+
xlarge: 'swap'
|
|
2561
2566
|
}
|
|
2562
2567
|
},
|
|
2563
2568
|
issues: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { IconFacadeProps } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* `IconFacade` is a component that conditionally renders either a new or legacy icon based on a feature flag.
|
|
4
5
|
*
|
|
@@ -7,8 +8,5 @@ import React from 'react';
|
|
|
7
8
|
* `dangerouslySetGlyph` is a prop specific to the legacy icon component for setting the icon glyph directly.
|
|
8
9
|
* @returns A React element representing either the new or legacy icon based on the feature flag and icon size.
|
|
9
10
|
*/
|
|
10
|
-
export declare const IconFacade: React.NamedExoticComponent<
|
|
11
|
-
newIcon?: React.ComponentType<import("../types").NewUtilityIconProps> | React.ComponentType<import("../types").NewCoreIconProps> | undefined;
|
|
12
|
-
iconType?: "core" | "utility" | undefined;
|
|
13
|
-
}>;
|
|
11
|
+
export declare const IconFacade: React.NamedExoticComponent<IconFacadeProps>;
|
|
14
12
|
export default IconFacade;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { IconFacadeProps } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* `IconFacade` is a component that conditionally renders either a new or legacy icon based on a feature flag.
|
|
4
5
|
*
|
|
@@ -7,8 +8,5 @@ import React from 'react';
|
|
|
7
8
|
* `dangerouslySetGlyph` is a prop specific to the legacy icon component for setting the icon glyph directly.
|
|
8
9
|
* @returns A React element representing either the new or legacy icon based on the feature flag and icon size.
|
|
9
10
|
*/
|
|
10
|
-
export declare const IconFacade: React.NamedExoticComponent<
|
|
11
|
-
newIcon?: React.ComponentType<import("../types").NewUtilityIconProps> | React.ComponentType<import("../types").NewCoreIconProps> | undefined;
|
|
12
|
-
iconType?: "core" | "utility" | undefined;
|
|
13
|
-
}>;
|
|
11
|
+
export declare const IconFacade: React.NamedExoticComponent<IconFacadeProps>;
|
|
14
12
|
export default IconFacade;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/icon",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.5.0",
|
|
4
4
|
"description": "An icon is a symbol representing a command, device, directory, or common action.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
71
|
-
"@atlaskit/tokens": "^3.
|
|
71
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
73
73
|
"@emotion/react": "^11.7.1"
|
|
74
74
|
},
|
|
@@ -80,22 +80,23 @@
|
|
|
80
80
|
"@af/icon-build-process": "^2.4.0",
|
|
81
81
|
"@af/integration-testing": "*",
|
|
82
82
|
"@af/visual-regression": "*",
|
|
83
|
-
"@atlaskit/code": "^15.
|
|
84
|
-
"@atlaskit/
|
|
85
|
-
"@atlaskit/
|
|
86
|
-
"@atlaskit/
|
|
87
|
-
"@atlaskit/
|
|
88
|
-
"@atlaskit/
|
|
89
|
-
"@atlaskit/
|
|
83
|
+
"@atlaskit/code": "^15.7.0",
|
|
84
|
+
"@atlaskit/css": "^0.8.0",
|
|
85
|
+
"@atlaskit/ds-lib": "^3.5.0",
|
|
86
|
+
"@atlaskit/heading": "^4.1.0",
|
|
87
|
+
"@atlaskit/link": "^2.1.0",
|
|
88
|
+
"@atlaskit/logo": "^15.2.0",
|
|
89
|
+
"@atlaskit/menu": "^2.14.0",
|
|
90
|
+
"@atlaskit/primitives": "^13.4.0",
|
|
90
91
|
"@atlaskit/ssr": "*",
|
|
91
|
-
"@atlaskit/textfield": "^6.
|
|
92
|
-
"@atlaskit/theme": "^14.
|
|
93
|
-
"@atlaskit/toggle": "^14.
|
|
94
|
-
"@atlaskit/tooltip": "^19.
|
|
92
|
+
"@atlaskit/textfield": "^6.8.0",
|
|
93
|
+
"@atlaskit/theme": "^14.1.0",
|
|
94
|
+
"@atlaskit/toggle": "^14.1.0",
|
|
95
|
+
"@atlaskit/tooltip": "^19.1.0",
|
|
95
96
|
"@atlaskit/visual-regression": "*",
|
|
96
97
|
"@babel/core": "7.24.9",
|
|
97
98
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
98
|
-
"@testing-library/react": "^
|
|
99
|
+
"@testing-library/react": "^13.4.0",
|
|
99
100
|
"classnames": "^2.2.5",
|
|
100
101
|
"fs-extra": "^4.0.2",
|
|
101
102
|
"jest-emotion": "^10.0.32",
|
|
@@ -103,9 +104,8 @@
|
|
|
103
104
|
"lodash": "^4.17.21",
|
|
104
105
|
"nullthrows": "^1.1.1",
|
|
105
106
|
"pkg-dir": "^4.2.0",
|
|
106
|
-
"react-dom": "^
|
|
107
|
-
"ts-node": "^10.9.1"
|
|
108
|
-
"wait-for-expect": "^1.2.0"
|
|
107
|
+
"react-dom": "^18.2.0",
|
|
108
|
+
"ts-node": "^10.9.1"
|
|
109
109
|
},
|
|
110
110
|
"keywords": [
|
|
111
111
|
"atlaskit",
|
package/__perf__/default.tsx
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Icon from '../src';
|
|
3
|
-
|
|
4
|
-
const customGlyph = () => (
|
|
5
|
-
<svg viewBox="0 0 24 24" focusable="false" role="presentation">
|
|
6
|
-
<g fill="currentColor" fillRule="evenodd">
|
|
7
|
-
<path d="M20.402 4.215a.414.414 0 0 0-.33-.166.398.398 0 0 0-.19.049c-2.427 1.328-5.24 2.03-8.134 2.03-2.895 0-5.708-.702-8.134-2.03a.397.397 0 0 0-.19-.049.405.405 0 0 0-.254.727 14.296 14.296 0 0 0 8.577 2.854h.001a14.295 14.295 0 0 0 8.579-2.855.405.405 0 0 0 .075-.56m-2.788 3.783a.326.326 0 0 0-.314-.045 15.86 15.86 0 0 1-2.069.625.407.407 0 0 0-.285.248c-.474 1.301-1.687 2.54-2.96 3.837a.329.329 0 0 1-.238.113c-.116 0-.187-.062-.24-.113-1.271-1.297-2.484-2.531-2.959-3.832a.407.407 0 0 0-.285-.249 16.06 16.06 0 0 1-2.07-.631.328.328 0 0 0-.313.045.325.325 0 0 0-.126.287c.108 1.082.535 2.14 1.307 3.247.725 1.042 1.67 2.007 2.585 2.94 1.685 1.718 3.276 3.34 3.416 5.223.012.17.154.301.324.301h1.98a.326.326 0 0 0 .325-.342c-.062-1.258-.536-2.518-1.448-3.851-.19-.28-.396-.552-.61-.818a.236.236 0 0 1 .016-.311l.199-.203c.914-.933 1.86-1.897 2.585-2.939.771-1.108 1.199-2.16 1.306-3.24a.334.334 0 0 0-.126-.292m-7.99 7.935a.301.301 0 0 0-.231-.099.326.326 0 0 0-.27.153c-.832 1.267-1.262 2.463-1.321 3.664a.33.33 0 0 0 .09.242.33.33 0 0 0 .236.101h1.976c.17 0 .314-.133.326-.303.043-.579.223-1.16.552-1.77a.458.458 0 0 0-.04-.493c-.326-.424-.725-.876-1.318-1.495" />
|
|
8
|
-
<path d="M11.75 8.968c.62 0 .98-.037 1.106-.037a.302.302 0 0 1 .275.421c-.082.22-.457 1.011-1.155 1.69a.319.319 0 0 1-.228.09.318.318 0 0 1-.229-.09c-.698-.679-1.073-1.47-1.155-1.69a.302.302 0 0 1 .275-.421c.127 0 .486.037 1.106.037h.005" />
|
|
9
|
-
</g>
|
|
10
|
-
</svg>
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
export default () => <Icon glyph={customGlyph} label="Custom icon" size="xlarge" />;
|