Skip to content

Commit 7e643ab

Browse files
chore(close-button): add Cross400 and Cross500 icons for l and xl sizes
Wire close-button l/xl to spectrum-css UI icon paths instead of reusing Cross300. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 771a8c0 commit 7e643ab

4 files changed

Lines changed: 54 additions & 5 deletions

File tree

2nd-gen/packages/swc/components/close-button/CloseButton.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@ import {
1919
type CloseButtonSize,
2020
} from '@spectrum-web-components/core/components/close-button';
2121

22-
import { Cross200Icon, Cross300Icon } from '../icon/elements/index.js';
22+
import {
23+
Cross200Icon,
24+
Cross300Icon,
25+
Cross400Icon,
26+
Cross500Icon,
27+
} from '../icon/elements/index.js';
2328

2429
import styles from './close-button.css';
2530

2631
const crossIconBySize: Record<CloseButtonSize, () => TemplateResult> = {
2732
s: Cross200Icon,
2833
m: Cross300Icon,
29-
// @todo map to Cross400Icon when added to the 2nd-gen icon set.
30-
l: Cross300Icon,
31-
// @todo map to Cross500Icon when added to the 2nd-gen icon set.
32-
xl: Cross300Icon,
34+
l: Cross400Icon,
35+
xl: Cross500Icon,
3336
};
3437

3538
/**
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright 2026 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
import { html, TemplateResult } from 'lit';
13+
14+
export const Cross400Icon = (): TemplateResult => {
15+
return html`
16+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12">
17+
<path
18+
d="m7.398 6 3.932-3.932A.989.989 0 0 0 9.932.67L6 4.602 2.068.67A.989.989 0 0 0 .67 2.068L4.602 6 .67 9.932a.989.989 0 1 0 1.398 1.398L6 7.398l3.932 3.932a.989.989 0 0 0 1.398-1.398z"
19+
/>
20+
</svg>
21+
`;
22+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright 2026 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
import { html, TemplateResult } from 'lit';
13+
14+
export const Cross500Icon = (): TemplateResult => {
15+
return html`
16+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
17+
<path
18+
d="m8.457 7 4.54-4.54a1.03 1.03 0 0 0-1.458-1.456L7 5.543l-4.54-4.54a1.03 1.03 0 0 0-1.457 1.458L5.543 7l-4.54 4.54a1.03 1.03 0 1 0 1.457 1.456L7 8.457l4.54 4.54a1.03 1.03 0 0 0 1.456-1.458z"
19+
/>
20+
</svg>
21+
`;
22+
};

2nd-gen/packages/swc/components/icon/elements/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export * from './Cross75Icon.js';
2525
export * from './Cross100Icon.js';
2626
export * from './Cross200Icon.js';
2727
export * from './Cross300Icon.js';
28+
export * from './Cross400Icon.js';
29+
export * from './Cross500Icon.js';
2830
export * from './Dash75Icon.js';
2931
export * from './Dash100Icon.js';
3032
export * from './Dash200Icon.js';

0 commit comments

Comments
 (0)