Skip to content

Commit cedd174

Browse files
committed
experimenting with icons
1 parent db07596 commit cedd174

File tree

628 files changed

+20617
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

628 files changed

+20617
-93
lines changed

packages/components/src/components/hds/icon/index.hbs

Lines changed: 22 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,32 @@
33
SPDX-License-Identifier: MPL-2.0
44
}}
55

6-
<svg
7-
class={{this.classNames}}
8-
...attributes
9-
aria-hidden="{{if @title 'false' 'true'}}"
10-
aria-labelledby={{this.ariaLabelledby}}
11-
data-test-icon={{this.name}}
12-
fill="{{this.fillColor}}"
13-
id={{this._iconId}}
14-
role={{this.role}}
15-
width="{{this.svgSize.width}}"
16-
height="{{this.svgSize.height}}"
17-
viewBox={{this.viewBox}}
18-
xmlns="http://www.w3.org/2000/svg"
19-
{{this.loadCarbonIcon this.hdsCarbon.carbonModeEnabled}}
20-
>
21-
{{#if @title}}
22-
<title id={{this._titleId}}>{{@title}}</title>
23-
{{/if}}
24-
25-
{{#if this.hdsCarbon.carbonModeEnabled}}
26-
{{#if (not-eq this.carbonIcon null)}}
27-
{{#each this.carbonIcon.content as |node|}}
28-
{{#if (eq node.elem "path")}}
29-
<path
30-
d={{node.attrs.d}}
31-
fill={{node.attrs.fill}}
32-
opacity={{node.attrs.opacity}}
33-
transform={{node.attrs.transform}}
34-
/>
35-
{{else if (eq node.elem "circle")}}
36-
<circle cx={{node.attrs.cx}} cy={{node.attrs.cy}} r={{node.attrs.r}} fill={{node.attrs.fill}} />
37-
{{else if (eq node.elem "rect")}}
38-
<rect
39-
x={{node.attrs.x}}
40-
y={{node.attrs.y}}
41-
width={{node.attrs.width}}
42-
height={{node.attrs.height}}
43-
fill={{node.attrs.fill}}
44-
transform={{node.attrs.transform}}
45-
/>
46-
{{else if (eq node.elem "polygon")}}
47-
<polygon points={{node.attrs.points}} fill={{node.attrs.fill}} />
48-
{{/if}}
49-
{{/each}}
50-
{{/if}}
51-
{{else}}
6+
{{#if this.hdsCarbon.carbonModeEnabled}}
7+
{{#if (not-eq this.carbonIcon null)}}{{/if}}
8+
{{else}}
9+
<svg
10+
class={{this.classNames}}
11+
...attributes
12+
aria-hidden="{{if @title 'false' 'true'}}"
13+
aria-labelledby={{this.ariaLabelledby}}
14+
data-test-icon={{@name}}
15+
fill="{{this.fillColor}}"
16+
id={{this._iconId}}
17+
role={{this.role}}
18+
width="{{this.svgSize.width}}"
19+
height="{{this.svgSize.height}}"
20+
viewBox={{this.viewBox}}
21+
xmlns="http://www.w3.org/2000/svg"
22+
{{this.loadCarbonIcon this.hdsCarbon.carbonModeEnabled}}
23+
>
5224
{{#if @title}}
25+
<title id={{this._titleId}}>{{@title}}</title>
26+
5327
<g role="presentation">
5428
<use href="#flight-{{@name}}-{{this.size}}"></use>
5529
</g>
5630
{{else}}
5731
<use href="#flight-{{@name}}-{{this.size}}"></use>
5832
{{/if}}
59-
{{/if}}
60-
</svg>
33+
</svg>
34+
{{/if}}

packages/components/src/components/hds/icon/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ export default class HdsIcon extends Component<HdsIconSignature> {
5656
}
5757
}
5858

59-
get name(): string | undefined {
60-
if (this.hdsCarbon.carbonModeEnabled) {
61-
return this.carbonIcon?.name;
62-
} else {
63-
return this.args.name;
64-
}
65-
}
66-
6759
get isInline(): boolean {
6860
return this.args.isInline ?? false;
6961
}

packages/components/src/utils/hds-carbon-icon-map.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3446,8 +3446,4 @@ export const hdsCarbonIconList: IconMapItem[] = [
34463446
},
34473447
];
34483448

3449-
export const mappedHdsIconNames: IconName[] = hdsCarbonIconList.map(
3450-
(item) => item.hdsIconName
3451-
);
3452-
34533449
export default hdsCarbonIconList;

packages/flight-icons/catalog.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"lastRunTimeISO": "2025-11-05T17:40:01.941Z",
2+
"lastRunTimeISO": "2025-11-26T23:30:48.585Z",
33
"lastRunFigma": {
44
"id": "TLnoT5AYQfy3tZ0H68BgOr",
55
"page": "Export",

0 commit comments

Comments
 (0)