@lovince/icons 1.0.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.
@@ -0,0 +1,70 @@
1
+ /**
2
+ * One family, one grid.
3
+ *
4
+ * 24x24 canvas · 2px centred stroke · round caps and joins · geometry kept
5
+ * simple enough to stay legible at 16px. Every glyph is drawn on the same
6
+ * optical weight so they sit together without one shouting.
7
+ *
8
+ * Paths only — no `<svg>` wrapper, no colour, no size. The renderer supplies
9
+ * those, which is what lets one definition serve every size and weight.
10
+ */
11
+ export declare const paths: {
12
+ readonly arrowRight: readonly ["M4 12h15", "m13 6 6 6-6 6"];
13
+ readonly arrowLeft: readonly ["M20 12H5", "m11 6-6 6 6 6"];
14
+ readonly arrowUp: readonly ["M12 20V5", "m6 11 6-6 6 6"];
15
+ readonly arrowDown: readonly ["M12 4v15", "m6 13 6 6 6-6"];
16
+ readonly chevronRight: readonly ["m9 6 6 6-6 6"];
17
+ readonly chevronLeft: readonly ["m15 6-6 6 6 6"];
18
+ readonly chevronUp: readonly ["m6 15 6-6 6 6"];
19
+ readonly chevronDown: readonly ["m6 9 6 6 6-6"];
20
+ readonly close: readonly ["m6 6 12 12", "m18 6-12 12"];
21
+ readonly menu: readonly ["M4 7h16", "M4 12h16", "M4 17h16"];
22
+ readonly external: readonly ["M14 4h6v6", "M20 4 11 13", "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"];
23
+ readonly start: readonly ["M9.5 7.5v9l7-4.5z", "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"];
24
+ readonly skip: readonly ["m6 6 7 6-7 6", "M18 5v14"];
25
+ readonly complete: readonly ["m5 12.5 4.5 4.5L19 7.5"];
26
+ readonly target: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z", "M12 11.25a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"];
27
+ readonly spark: readonly ["M12 3.5 13.9 9l5.6 1.9-5.6 1.9L12 18.5l-1.9-5.7L4.5 10.9 10.1 9Z", "M18.5 4v3", "M20 5.5h-3"];
28
+ readonly pause: readonly ["M9.5 5v14", "M14.5 5v14"];
29
+ readonly restart: readonly ["M20 12a8 8 0 1 1-2.6-5.9", "M20 4v5h-5"];
30
+ readonly success: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "m8.25 12.25 2.5 2.5 5-5.5"];
31
+ readonly warning: readonly ["M10.6 4.3 2.9 17.5A1.6 1.6 0 0 0 4.3 20h15.4a1.6 1.6 0 0 0 1.4-2.5L13.4 4.3a1.6 1.6 0 0 0-2.8 0Z", "M12 9.5v4", "M12 16.75h.01"];
32
+ readonly info: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "M12 11v5", "M12 8h.01"];
33
+ readonly error: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "m9 9 6 6", "m15 9-6 6"];
34
+ readonly welcome: readonly ["M4 11.5 12 4l8 7.5", "M6.5 10.2V19a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-8.8", "M9.5 20v-4.5a2.5 2.5 0 0 1 5 0V20"];
35
+ readonly discover: readonly ["M11 4.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z", "m20 20-4.4-4.4", "M11 8.5v5", "M8.5 11h5"];
36
+ readonly click: readonly ["M9 4.5v3", "M4.5 9h3", "M6.2 6.2 8 8", "m11 11 8.5 3.2-3.6 1.4-1.4 3.6z"];
37
+ readonly swipe: readonly ["M7 12h10", "m10 9-3 3 3 3", "m14 9 3 3-3 3", "M12 4v2", "M12 18v2"];
38
+ readonly drag: readonly ["M9 6.5h.01", "M15 6.5h.01", "M9 12h.01", "M15 12h.01", "M9 17.5h.01", "M15 17.5h.01"];
39
+ readonly scroll: readonly ["M12 5.5a3.5 3.5 0 0 0-3.5 3.5v6a3.5 3.5 0 0 0 7 0V9A3.5 3.5 0 0 0 12 5.5Z", "M12 9v2.5"];
40
+ readonly tip: readonly ["M9 18h6", "M10 21h4", "M12 3a6 6 0 0 0-3.5 10.9c.6.4 1 1 1 1.6v.5h5v-.5c0-.6.4-1.2 1-1.6A6 6 0 0 0 12 3Z"];
41
+ readonly help: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "M9.6 9.5a2.5 2.5 0 1 1 3.3 2.4c-.6.2-.9.8-.9 1.4v.4", "M12 16.5h.01"];
42
+ readonly shortcut: readonly ["M6 8.5a2.5 2.5 0 1 1 2.5 2.5H6z", "M8.5 13H6v2.5A2.5 2.5 0 1 0 8.5 13Z", "M15.5 11H18V8.5A2.5 2.5 0 1 0 15.5 11Z", "M15.5 13a2.5 2.5 0 1 0 2.5 2.5V13z"];
43
+ readonly newFeature: readonly ["M12 3.5 13.6 9l5.4 1.8-5.4 1.8L12 18l-1.6-5.4L5 10.8 10.4 9Z", "M18.5 15v3.5", "M20.25 16.75h-3.5"];
44
+ readonly home: readonly ["M3 10.4 12 3l9 7.4", "M5.5 9.2V20a1 1 0 0 0 1 1H10v-6h4v6h3.5a1 1 0 0 0 1-1V9.2"];
45
+ readonly search: readonly ["M11 4.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z", "m20 20-4.4-4.4"];
46
+ readonly install: readonly ["M12 3v11", "m7.5 10 4.5 4 4.5-4", "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"];
47
+ readonly book: readonly ["M4 4.5h5a3 3 0 0 1 3 3V20a2.5 2.5 0 0 0-2.5-2.5H4Z", "M20 4.5h-5a3 3 0 0 0-3 3V20a2.5 2.5 0 0 1 2.5-2.5H20Z"];
48
+ readonly code: readonly ["m8.5 7-5 5 5 5", "m15.5 7 5 5-5 5", "m13.5 4-3 16"];
49
+ readonly palette: readonly ["M12 3a9 9 0 0 0 0 18 2 2 0 0 0 1.6-3.2 2 2 0 0 1 1.6-3.2H18a3 3 0 0 0 3-3 9 9 0 0 0-9-8.6Z", "M7.5 12.5h.01", "M9.5 8h.01", "M14 7h.01", "M17 10h.01"];
50
+ readonly shield: readonly ["M12 3l7.5 3v6c0 4.4-3 8.1-7.5 9.4C7.5 20.1 4.5 16.4 4.5 12V6Z", "m9 12 2.2 2.2L15.5 10"];
51
+ readonly accessibility: readonly ["M12 3.2a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8Z", "M4.5 8.4 12 9.8l7.5-1.4", "M12 9.8v4.4", "m9 20.4 3-6.2 3 6.2"];
52
+ readonly sun: readonly ["M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z", "M12 2.5v2", "M12 19.5v2", "M4.6 4.6 6 6", "M18 18l1.4 1.4", "M2.5 12h2", "M19.5 12h2", "M4.6 19.4 6 18", "M18 6l1.4-1.4"];
53
+ readonly moon: readonly ["M20 14.2A8.2 8.2 0 0 1 9.8 4 8.4 8.4 0 1 0 20 14.2Z"];
54
+ readonly monitor: readonly ["M4 5h16a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Z", "M9 20h6", "M12 16v4"];
55
+ readonly plus: readonly ["M12 5v14", "M5 12h14"];
56
+ readonly minus: readonly ["M5 12h14"];
57
+ readonly copy: readonly ["M9 9h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Z", "M5 15H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v1"];
58
+ readonly settings: readonly ["M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z", "M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-2.7 1.1v.3a2 2 0 1 1-4 0v-.2a1.6 1.6 0 0 0-2.8-1.1l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.6 1.6 0 0 0 3.5 15H3a2 2 0 1 1 0-4h.2a1.6 1.6 0 0 0 1.1-2.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.6 1.6 0 0 0 10 4.5V4a2 2 0 1 1 4 0v.2a1.6 1.6 0 0 0 2.8 1.1l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0 1.1 2.8h.3a2 2 0 1 1 0 4h-.2a1.6 1.6 0 0 0-1.4.9Z"];
59
+ };
60
+ export type IconName = keyof typeof paths;
61
+ export declare const iconNames: IconName[];
62
+ /** Grouped for documentation and pickers; every name appears exactly once. */
63
+ export declare const iconGroups: {
64
+ readonly navigation: readonly ["arrowRight", "arrowLeft", "arrowUp", "arrowDown", "chevronRight", "chevronLeft", "chevronUp", "chevronDown", "close", "menu", "external"];
65
+ readonly journey: readonly ["start", "skip", "complete", "target", "spark", "pause", "restart"];
66
+ readonly status: readonly ["success", "warning", "info", "error"];
67
+ readonly onboarding: readonly ["welcome", "discover", "click", "swipe", "drag", "scroll", "tip", "help", "shortcut", "newFeature"];
68
+ readonly interface: readonly ["home", "search", "install", "book", "code", "palette", "shield", "accessibility", "sun", "moon", "monitor", "plus", "minus", "copy", "settings"];
69
+ };
70
+ export declare const isIconName: (value: unknown) => value is IconName;
package/dist/paths.js ADDED
@@ -0,0 +1,215 @@
1
+ //#region src/paths.ts
2
+ var e = {
3
+ arrowRight: ["M4 12h15", "m13 6 6 6-6 6"],
4
+ arrowLeft: ["M20 12H5", "m11 6-6 6 6 6"],
5
+ arrowUp: ["M12 20V5", "m6 11 6-6 6 6"],
6
+ arrowDown: ["M12 4v15", "m6 13 6 6 6-6"],
7
+ chevronRight: ["m9 6 6 6-6 6"],
8
+ chevronLeft: ["m15 6-6 6 6 6"],
9
+ chevronUp: ["m6 15 6-6 6 6"],
10
+ chevronDown: ["m6 9 6 6 6-6"],
11
+ close: ["m6 6 12 12", "m18 6-12 12"],
12
+ menu: [
13
+ "M4 7h16",
14
+ "M4 12h16",
15
+ "M4 17h16"
16
+ ],
17
+ external: [
18
+ "M14 4h6v6",
19
+ "M20 4 11 13",
20
+ "M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"
21
+ ],
22
+ start: ["M9.5 7.5v9l7-4.5z", "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"],
23
+ skip: ["m6 6 7 6-7 6", "M18 5v14"],
24
+ complete: ["m5 12.5 4.5 4.5L19 7.5"],
25
+ target: [
26
+ "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z",
27
+ "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z",
28
+ "M12 11.25a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"
29
+ ],
30
+ spark: [
31
+ "M12 3.5 13.9 9l5.6 1.9-5.6 1.9L12 18.5l-1.9-5.7L4.5 10.9 10.1 9Z",
32
+ "M18.5 4v3",
33
+ "M20 5.5h-3"
34
+ ],
35
+ pause: ["M9.5 5v14", "M14.5 5v14"],
36
+ restart: ["M20 12a8 8 0 1 1-2.6-5.9", "M20 4v5h-5"],
37
+ success: ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z", "m8.25 12.25 2.5 2.5 5-5.5"],
38
+ warning: [
39
+ "M10.6 4.3 2.9 17.5A1.6 1.6 0 0 0 4.3 20h15.4a1.6 1.6 0 0 0 1.4-2.5L13.4 4.3a1.6 1.6 0 0 0-2.8 0Z",
40
+ "M12 9.5v4",
41
+ "M12 16.75h.01"
42
+ ],
43
+ info: [
44
+ "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z",
45
+ "M12 11v5",
46
+ "M12 8h.01"
47
+ ],
48
+ error: [
49
+ "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z",
50
+ "m9 9 6 6",
51
+ "m15 9-6 6"
52
+ ],
53
+ welcome: [
54
+ "M4 11.5 12 4l8 7.5",
55
+ "M6.5 10.2V19a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-8.8",
56
+ "M9.5 20v-4.5a2.5 2.5 0 0 1 5 0V20"
57
+ ],
58
+ discover: [
59
+ "M11 4.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z",
60
+ "m20 20-4.4-4.4",
61
+ "M11 8.5v5",
62
+ "M8.5 11h5"
63
+ ],
64
+ click: [
65
+ "M9 4.5v3",
66
+ "M4.5 9h3",
67
+ "M6.2 6.2 8 8",
68
+ "m11 11 8.5 3.2-3.6 1.4-1.4 3.6z"
69
+ ],
70
+ swipe: [
71
+ "M7 12h10",
72
+ "m10 9-3 3 3 3",
73
+ "m14 9 3 3-3 3",
74
+ "M12 4v2",
75
+ "M12 18v2"
76
+ ],
77
+ drag: [
78
+ "M9 6.5h.01",
79
+ "M15 6.5h.01",
80
+ "M9 12h.01",
81
+ "M15 12h.01",
82
+ "M9 17.5h.01",
83
+ "M15 17.5h.01"
84
+ ],
85
+ scroll: ["M12 5.5a3.5 3.5 0 0 0-3.5 3.5v6a3.5 3.5 0 0 0 7 0V9A3.5 3.5 0 0 0 12 5.5Z", "M12 9v2.5"],
86
+ tip: [
87
+ "M9 18h6",
88
+ "M10 21h4",
89
+ "M12 3a6 6 0 0 0-3.5 10.9c.6.4 1 1 1 1.6v.5h5v-.5c0-.6.4-1.2 1-1.6A6 6 0 0 0 12 3Z"
90
+ ],
91
+ help: [
92
+ "M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z",
93
+ "M9.6 9.5a2.5 2.5 0 1 1 3.3 2.4c-.6.2-.9.8-.9 1.4v.4",
94
+ "M12 16.5h.01"
95
+ ],
96
+ shortcut: [
97
+ "M6 8.5a2.5 2.5 0 1 1 2.5 2.5H6z",
98
+ "M8.5 13H6v2.5A2.5 2.5 0 1 0 8.5 13Z",
99
+ "M15.5 11H18V8.5A2.5 2.5 0 1 0 15.5 11Z",
100
+ "M15.5 13a2.5 2.5 0 1 0 2.5 2.5V13z"
101
+ ],
102
+ newFeature: [
103
+ "M12 3.5 13.6 9l5.4 1.8-5.4 1.8L12 18l-1.6-5.4L5 10.8 10.4 9Z",
104
+ "M18.5 15v3.5",
105
+ "M20.25 16.75h-3.5"
106
+ ],
107
+ home: ["M3 10.4 12 3l9 7.4", "M5.5 9.2V20a1 1 0 0 0 1 1H10v-6h4v6h3.5a1 1 0 0 0 1-1V9.2"],
108
+ search: ["M11 4.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z", "m20 20-4.4-4.4"],
109
+ install: [
110
+ "M12 3v11",
111
+ "m7.5 10 4.5 4 4.5-4",
112
+ "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"
113
+ ],
114
+ book: ["M4 4.5h5a3 3 0 0 1 3 3V20a2.5 2.5 0 0 0-2.5-2.5H4Z", "M20 4.5h-5a3 3 0 0 0-3 3V20a2.5 2.5 0 0 1 2.5-2.5H20Z"],
115
+ code: [
116
+ "m8.5 7-5 5 5 5",
117
+ "m15.5 7 5 5-5 5",
118
+ "m13.5 4-3 16"
119
+ ],
120
+ palette: [
121
+ "M12 3a9 9 0 0 0 0 18 2 2 0 0 0 1.6-3.2 2 2 0 0 1 1.6-3.2H18a3 3 0 0 0 3-3 9 9 0 0 0-9-8.6Z",
122
+ "M7.5 12.5h.01",
123
+ "M9.5 8h.01",
124
+ "M14 7h.01",
125
+ "M17 10h.01"
126
+ ],
127
+ shield: ["M12 3l7.5 3v6c0 4.4-3 8.1-7.5 9.4C7.5 20.1 4.5 16.4 4.5 12V6Z", "m9 12 2.2 2.2L15.5 10"],
128
+ accessibility: [
129
+ "M12 3.2a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8Z",
130
+ "M4.5 8.4 12 9.8l7.5-1.4",
131
+ "M12 9.8v4.4",
132
+ "m9 20.4 3-6.2 3 6.2"
133
+ ],
134
+ sun: [
135
+ "M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z",
136
+ "M12 2.5v2",
137
+ "M12 19.5v2",
138
+ "M4.6 4.6 6 6",
139
+ "M18 18l1.4 1.4",
140
+ "M2.5 12h2",
141
+ "M19.5 12h2",
142
+ "M4.6 19.4 6 18",
143
+ "M18 6l1.4-1.4"
144
+ ],
145
+ moon: ["M20 14.2A8.2 8.2 0 0 1 9.8 4 8.4 8.4 0 1 0 20 14.2Z"],
146
+ monitor: [
147
+ "M4 5h16a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Z",
148
+ "M9 20h6",
149
+ "M12 16v4"
150
+ ],
151
+ plus: ["M12 5v14", "M5 12h14"],
152
+ minus: ["M5 12h14"],
153
+ copy: ["M9 9h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Z", "M5 15H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v1"],
154
+ settings: ["M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z", "M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-2.7 1.1v.3a2 2 0 1 1-4 0v-.2a1.6 1.6 0 0 0-2.8-1.1l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.6 1.6 0 0 0 3.5 15H3a2 2 0 1 1 0-4h.2a1.6 1.6 0 0 0 1.1-2.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.6 1.6 0 0 0 10 4.5V4a2 2 0 1 1 4 0v.2a1.6 1.6 0 0 0 2.8 1.1l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0 1.1 2.8h.3a2 2 0 1 1 0 4h-.2a1.6 1.6 0 0 0-1.4.9Z"]
155
+ }, t = Object.keys(e), n = {
156
+ navigation: [
157
+ "arrowRight",
158
+ "arrowLeft",
159
+ "arrowUp",
160
+ "arrowDown",
161
+ "chevronRight",
162
+ "chevronLeft",
163
+ "chevronUp",
164
+ "chevronDown",
165
+ "close",
166
+ "menu",
167
+ "external"
168
+ ],
169
+ journey: [
170
+ "start",
171
+ "skip",
172
+ "complete",
173
+ "target",
174
+ "spark",
175
+ "pause",
176
+ "restart"
177
+ ],
178
+ status: [
179
+ "success",
180
+ "warning",
181
+ "info",
182
+ "error"
183
+ ],
184
+ onboarding: [
185
+ "welcome",
186
+ "discover",
187
+ "click",
188
+ "swipe",
189
+ "drag",
190
+ "scroll",
191
+ "tip",
192
+ "help",
193
+ "shortcut",
194
+ "newFeature"
195
+ ],
196
+ interface: [
197
+ "home",
198
+ "search",
199
+ "install",
200
+ "book",
201
+ "code",
202
+ "palette",
203
+ "shield",
204
+ "accessibility",
205
+ "sun",
206
+ "moon",
207
+ "monitor",
208
+ "plus",
209
+ "minus",
210
+ "copy",
211
+ "settings"
212
+ ]
213
+ }, r = (t) => typeof t == "string" && Object.prototype.hasOwnProperty.call(e, t);
214
+ //#endregion
215
+ export { n as iconGroups, t as iconNames, r as isIconName, e as paths };
@@ -0,0 +1,25 @@
1
+ import { IconName } from './paths';
2
+ import { IconFlip } from './core/props';
3
+ export interface RenderOptions {
4
+ readonly size?: number | string;
5
+ readonly strokeWidth?: number | string;
6
+ readonly absoluteStrokeWidth?: boolean;
7
+ readonly fill?: number | boolean;
8
+ readonly rotate?: number | string;
9
+ readonly flip?: IconFlip;
10
+ /** Accessible name. Omit for decorative icons beside visible text. */
11
+ readonly label?: string;
12
+ readonly class?: string;
13
+ }
14
+ /**
15
+ * SVG markup as a string. No framework, no DOM — usable in a React component,
16
+ * a Svelte `{@html}` block, an email template, or a server response.
17
+ */
18
+ export declare const renderIcon: (name: IconName, options?: RenderOptions) => string;
19
+ /**
20
+ * A live `SVGElement`. Use this where you need a node rather than a string —
21
+ * vanilla JS, a directive, or an imperative widget.
22
+ */
23
+ export declare const createIcon: (name: IconName, options?: RenderOptions) => SVGSVGElement | null;
24
+ /** A data URI, for `background-image` or an `<img src>`. */
25
+ export declare const iconDataUri: (name: IconName, options?: RenderOptions) => string;
package/dist/style.css ADDED
@@ -0,0 +1,226 @@
1
+ /* Motion for the animated icons.
2
+ Only needed if you use them — the static `LvIcon` and `<lv-icon>` need no CSS.
3
+
4
+ Every transition is reversible and driven by one property, so the icon reads
5
+ as a single object changing state rather than two icons swapping. */
6
+
7
+ .lv-icon {
8
+ display: inline-block;
9
+ flex-shrink: 0;
10
+ vertical-align: middle;
11
+ }
12
+
13
+ /* ── Menu ⇄ Close ─────────────────────────────────────────────────────────
14
+ The outer bars travel to the centre, then rotate onto the diagonal. Moving
15
+ first and rotating second is what makes it read as folding rather than
16
+ spinning. The middle bar collapses along its own length instead of fading,
17
+ so nothing dissolves. */
18
+
19
+ .lv-icon--menu .lv-icon__bar {
20
+ transition:
21
+ transform var(--lv-duration, 0.36s) var(--lv-ease, cubic-bezier(0.65, 0, 0.35, 1)),
22
+ opacity calc(var(--lv-duration, 0.36s) * 0.5) linear;
23
+ transform-origin: 12px 12px;
24
+ }
25
+
26
+ .lv-icon--menu.is-open .lv-icon__bar--top {
27
+ transform: translateY(5px) rotate(45deg);
28
+ }
29
+
30
+ .lv-icon--menu.is-open .lv-icon__bar--bottom {
31
+ transform: translateY(-5px) rotate(-45deg);
32
+ }
33
+
34
+ .lv-icon--menu.is-open .lv-icon__bar--mid {
35
+ transform: scaleX(0);
36
+ opacity: 0;
37
+ }
38
+
39
+ /* ── Plus ⇄ Close ─────────────────────────────────────────────────────────
40
+ A plus already is a cross; only the angle differs. One rotation, no swap. */
41
+
42
+ .lv-icon--plus .lv-icon__cross {
43
+ transform-origin: 12px 12px;
44
+ transition: transform var(--lv-duration, 0.36s) var(--lv-ease, cubic-bezier(0.65, 0, 0.35, 1));
45
+ }
46
+
47
+ .lv-icon--plus.is-open .lv-icon__cross {
48
+ transform: rotate(45deg);
49
+ }
50
+
51
+ /* ── Checkmark ────────────────────────────────────────────────────────────
52
+ Drawn on with stroke-dashoffset rather than faded in: the direction of the
53
+ stroke is what makes it read as confirmation. The ring draws first so the
54
+ tick lands inside something. */
55
+
56
+ .lv-icon--check .lv-icon__tick {
57
+ stroke-dasharray: 22;
58
+ stroke-dashoffset: 22;
59
+ transition: stroke-dashoffset var(--lv-duration, 0.28s) var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1));
60
+ }
61
+
62
+ .lv-icon--check.is-checked .lv-icon__tick {
63
+ stroke-dashoffset: 0;
64
+ }
65
+
66
+ .lv-icon--check .lv-icon__ring {
67
+ stroke-dasharray: 57;
68
+ stroke-dashoffset: 57;
69
+ transition: stroke-dashoffset calc(var(--lv-duration, 0.28s) * 1.4)
70
+ var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1));
71
+ }
72
+
73
+ .lv-icon--check.is-checked .lv-icon__ring {
74
+ stroke-dashoffset: 0;
75
+ }
76
+
77
+ /* ── Loading ──────────────────────────────────────────────────────────────
78
+ One continuous rotation. No pulsing or easing — a spinner that accelerates
79
+ reads as stuttering rather than working. */
80
+
81
+ .lv-icon--loading .lv-icon__arc {
82
+ transform-origin: 12px 12px;
83
+ animation: lv-icon-spin var(--lv-duration, 0.9s) linear infinite;
84
+ }
85
+
86
+ @keyframes lv-icon-spin {
87
+ to {
88
+ transform: rotate(360deg);
89
+ }
90
+ }
91
+
92
+ /* ── Arrow ────────────────────────────────────────────────────────────────
93
+ Nudges on the *parent's* hover and focus, so the whole control responds as
94
+ one object rather than the icon reacting on its own. The shaft stretches
95
+ while the head travels, which is the difference between an arrow moving and
96
+ an arrow sliding off its own line. */
97
+
98
+ .lv-icon--arrow .lv-icon__arrow-inner {
99
+ transform: rotate(var(--lv-rotate, 0deg));
100
+ transform-origin: 12px 12px;
101
+ }
102
+
103
+ .lv-icon--arrow .lv-icon__shaft,
104
+ .lv-icon--arrow .lv-icon__head {
105
+ transition: transform var(--lv-duration, 0.18s) var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1));
106
+ }
107
+
108
+ :where(a, button, .lv-hover):hover .lv-icon--arrow .lv-icon__head,
109
+ :where(a, button, .lv-hover):focus-visible .lv-icon--arrow .lv-icon__head {
110
+ transform: translateX(var(--lv-travel, 3px));
111
+ }
112
+
113
+ :where(a, button, .lv-hover):hover .lv-icon--arrow .lv-icon__shaft,
114
+ :where(a, button, .lv-hover):focus-visible .lv-icon--arrow .lv-icon__shaft {
115
+ transform: scaleX(1.14);
116
+ transform-origin: 4px 12px;
117
+ }
118
+
119
+ /* ── Reduced motion ───────────────────────────────────────────────────────
120
+ Every icon still reaches its final state; it just gets there instantly. The
121
+ spinner stops rather than jumping, since a frozen frame reads as loading
122
+ while a jumping one reads as broken. */
123
+
124
+ @media (prefers-reduced-motion: reduce) {
125
+ .lv-icon *,
126
+ .lv-icon {
127
+ transition-duration: 0.01ms !important;
128
+ }
129
+
130
+ .lv-icon--loading .lv-icon__arc {
131
+ animation: none;
132
+ }
133
+ }
134
+
135
+ /* ── Icon button ──────────────────────────────────────────────────────────
136
+ Visual size and interactive size are separate: the icon can be 18px while
137
+ the target stays at least 44px. Conflating them is the most common
138
+ icon-button mistake, and it is invisible until someone tries to tap it. */
139
+
140
+ .lv-icon-button {
141
+ display: inline-flex;
142
+ align-items: center;
143
+ justify-content: center;
144
+ min-width: var(--lv-target, 44px);
145
+ min-height: var(--lv-target, 44px);
146
+ padding: 0;
147
+ color: inherit;
148
+ background: transparent;
149
+ border: 0;
150
+ border-radius: 999px;
151
+ cursor: pointer;
152
+ transition:
153
+ background 0.18s cubic-bezier(0.33, 1, 0.68, 1),
154
+ transform 0.12s cubic-bezier(0.33, 1, 0.68, 1);
155
+ }
156
+
157
+ .lv-icon-button:hover {
158
+ background: color-mix(in srgb, currentColor 10%, transparent);
159
+ }
160
+
161
+ .lv-icon-button:active {
162
+ transform: scale(0.94);
163
+ }
164
+
165
+ .lv-icon-button:focus-visible {
166
+ outline: 2px solid currentColor;
167
+ outline-offset: 2px;
168
+ }
169
+
170
+ .lv-icon-button.is-disabled,
171
+ .lv-icon-button:disabled {
172
+ opacity: 0.38;
173
+ cursor: not-allowed;
174
+ }
175
+
176
+ .lv-icon-button:disabled:hover {
177
+ background: transparent;
178
+ }
179
+
180
+ /* ── Journey step ─────────────────────────────────────────────────────────
181
+ ○ → ◉ → ✓ as one shape. The ring is present in every state, so the step
182
+ advances rather than being replaced. Never colour alone. */
183
+
184
+ .lv-icon--step .lv-icon__ring,
185
+ .lv-icon--step .lv-icon__dot,
186
+ .lv-icon--step .lv-icon__tick,
187
+ .lv-icon--step .lv-icon__dash {
188
+ transition:
189
+ transform var(--lv-duration, 0.28s) var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1)),
190
+ opacity var(--lv-duration, 0.28s) var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1)),
191
+ stroke-dashoffset var(--lv-duration, 0.28s) var(--lv-ease, cubic-bezier(0.33, 1, 0.68, 1));
192
+ transform-origin: 12px 12px;
193
+ }
194
+
195
+ .lv-icon--step .lv-icon__dot {
196
+ transform: scale(0);
197
+ opacity: 0;
198
+ }
199
+
200
+ .lv-icon--step .lv-icon__tick {
201
+ stroke-dasharray: 16;
202
+ stroke-dashoffset: 16;
203
+ }
204
+
205
+ .lv-icon--step .lv-icon__dash {
206
+ transform: scaleX(0);
207
+ opacity: 0;
208
+ }
209
+
210
+ .lv-icon--step.is-current .lv-icon__dot {
211
+ transform: scale(1);
212
+ opacity: 1;
213
+ }
214
+
215
+ .lv-icon--step.is-complete .lv-icon__tick {
216
+ stroke-dashoffset: 0;
217
+ }
218
+
219
+ .lv-icon--step.is-skipped .lv-icon__ring {
220
+ opacity: 0.5;
221
+ }
222
+
223
+ .lv-icon--step.is-skipped .lv-icon__dash {
224
+ transform: scaleX(1);
225
+ opacity: 1;
226
+ }
package/dist/vue.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /** Vue 3 components. Import from `@lovince/icons/vue`. */
2
+ export { default as LvIcon } from './LvIcon.vue';
3
+ export { default as LvIconButton } from './LvIconButton.vue';
4
+ export { default as LvJourneyStep } from './LvJourneyStep.vue';
5
+ export { default as LvMenuToClose } from './animated/LvMenuToClose.vue';
6
+ export { default as LvPlusToClose } from './animated/LvPlusToClose.vue';
7
+ export { default as LvCheckmark } from './animated/LvCheckmark.vue';
8
+ export { default as LvLoading } from './animated/LvLoading.vue';
9
+ export { default as LvArrowMotion } from './animated/LvArrowMotion.vue';
10
+ export type { IconName } from './paths';
11
+ export type { IconContext, IconState, IconVariant } from './core/variants';
12
+ export type { IconFlip } from './core/props';