@skf-design-system/ui-components 1.0.0-alpha.31 → 1.0.0-alpha.32
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.
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
|
-
import type
|
3
|
-
import { type CSSResultGroup
|
2
|
+
import { type Icon, type IconColor, type IconSize, type SeverityFgColor } from '@skf-design-system/ui-assets';
|
3
|
+
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
5
5
|
* The `<skf-icon>` component is used to clarify interface elements. When used, should always be paired with (possibly invisible) text
|
6
6
|
*
|
@@ -22,12 +22,10 @@ export declare class SkfIcon extends SkfElement {
|
|
22
22
|
* @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
|
23
23
|
*/
|
24
24
|
name: Icon;
|
25
|
-
private _icon;
|
26
|
-
handleNameChanged(): void;
|
27
25
|
/**
|
28
26
|
* Size of the icon
|
29
27
|
* @type { "xs" | "sm" | "md" | "lg" }
|
30
28
|
*/
|
31
29
|
size: IconSize;
|
32
|
-
render(): TemplateResult<1>;
|
30
|
+
render(): import("lit").TemplateResult<1>;
|
33
31
|
}
|
@@ -1,64 +1,52 @@
|
|
1
|
-
import { SkfElement as
|
2
|
-
import {
|
3
|
-
import
|
1
|
+
import { SkfElement as c } from "../../internal/components/skf-element.js";
|
2
|
+
import { ICONS as f } from "@skf-design-system/ui-assets";
|
3
|
+
import d from "../../styles/component.styles.js";
|
4
4
|
import { html as h } from "lit";
|
5
|
-
import { property as
|
6
|
-
import { classMap as
|
7
|
-
import { ifDefined as
|
8
|
-
import
|
9
|
-
var
|
10
|
-
for (var
|
11
|
-
(
|
12
|
-
return
|
5
|
+
import { property as o } from "lit/decorators.js";
|
6
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as l } from "lit/directives/if-defined.js";
|
8
|
+
import v from "./icon.styles.js";
|
9
|
+
var y = Object.defineProperty, i = (p, e, a, $) => {
|
10
|
+
for (var r = void 0, s = p.length - 1, n; s >= 0; s--)
|
11
|
+
(n = p[s]) && (r = n(e, a, r) || r);
|
12
|
+
return r && y(e, a, r), r;
|
13
13
|
};
|
14
|
-
const
|
14
|
+
const m = class m extends c {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this.color = "primary", this.
|
17
|
-
}
|
18
|
-
handleNameChanged() {
|
19
|
-
import("@skf-design-system/ui-assets").then((e) => {
|
20
|
-
this._icon = e[this.name];
|
21
|
-
}).catch((e) => {
|
22
|
-
console.error(e);
|
23
|
-
});
|
16
|
+
super(...arguments), this.color = "primary", this.size = "md";
|
24
17
|
}
|
25
18
|
render() {
|
19
|
+
const e = f[this.name];
|
26
20
|
return h`
|
27
21
|
<div
|
28
|
-
aria-hidden=${
|
29
|
-
aria-label=${
|
30
|
-
class=${
|
22
|
+
aria-hidden=${l(this.label ? void 0 : "true")}
|
23
|
+
aria-label=${l(this.label)}
|
24
|
+
class=${u({
|
31
25
|
icon: !0,
|
32
26
|
[`icon--color-${this.color}`]: !0,
|
33
27
|
[`icon--size-${this.size}`]: !0
|
34
28
|
})}
|
35
|
-
role=${
|
29
|
+
role=${l(this.label ? "img" : void 0)}
|
36
30
|
>
|
37
|
-
${
|
31
|
+
${e}
|
38
32
|
</div>
|
39
33
|
`;
|
40
34
|
}
|
41
35
|
};
|
42
|
-
|
43
|
-
let
|
44
|
-
|
45
|
-
|
46
|
-
],
|
47
|
-
|
48
|
-
|
49
|
-
],
|
50
|
-
|
51
|
-
|
52
|
-
],
|
53
|
-
|
54
|
-
|
55
|
-
],
|
56
|
-
o([
|
57
|
-
d("name")
|
58
|
-
], r.prototype, "handleNameChanged", 1);
|
59
|
-
o([
|
60
|
-
s({ reflect: !0 })
|
61
|
-
], r.prototype, "size", 2);
|
36
|
+
m.styles = [d, v];
|
37
|
+
let t = m;
|
38
|
+
i([
|
39
|
+
o({ reflect: !0 })
|
40
|
+
], t.prototype, "color");
|
41
|
+
i([
|
42
|
+
o()
|
43
|
+
], t.prototype, "label");
|
44
|
+
i([
|
45
|
+
o()
|
46
|
+
], t.prototype, "name");
|
47
|
+
i([
|
48
|
+
o({ reflect: !0 })
|
49
|
+
], t.prototype, "size");
|
62
50
|
export {
|
63
|
-
|
51
|
+
t as SkfIcon
|
64
52
|
};
|
@@ -1486,19 +1486,6 @@
|
|
1486
1486
|
"description": "Name of the icon to display",
|
1487
1487
|
"attribute": "name"
|
1488
1488
|
},
|
1489
|
-
{
|
1490
|
-
"kind": "field",
|
1491
|
-
"name": "_icon",
|
1492
|
-
"type": {
|
1493
|
-
"text": "TemplateResult"
|
1494
|
-
},
|
1495
|
-
"privacy": "private",
|
1496
|
-
"default": "html``"
|
1497
|
-
},
|
1498
|
-
{
|
1499
|
-
"kind": "method",
|
1500
|
-
"name": "handleNameChanged"
|
1501
|
-
},
|
1502
1489
|
{
|
1503
1490
|
"kind": "field",
|
1504
1491
|
"name": "size",
|