@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.
package/dist/vue.js ADDED
@@ -0,0 +1,460 @@
1
+ import { paths as e } from "./paths.js";
2
+ import { _ as t, f as n, g as r, n as i, o as a, r as o, t as s, u as c } from "./motion-72rOKpWt.js";
3
+ import { Fragment as l, computed as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderList as y, unref as b } from "vue";
4
+ //#region src/LvIcon.vue?vue&type=script&setup=true&lang.ts
5
+ var x = [
6
+ "width",
7
+ "height",
8
+ "stroke-width",
9
+ "aria-hidden",
10
+ "role",
11
+ "aria-label"
12
+ ], S = ["transform"], C = [
13
+ "d",
14
+ "fill",
15
+ "fill-opacity"
16
+ ], w = /* @__PURE__ */ h({
17
+ __name: "LvIcon",
18
+ props: {
19
+ name: {},
20
+ size: { default: 24 },
21
+ strokeWidth: { default: 2 },
22
+ absoluteStrokeWidth: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ fill: {
27
+ type: [Number, Boolean],
28
+ default: 0
29
+ },
30
+ rotate: { default: 0 },
31
+ flip: {},
32
+ label: {}
33
+ },
34
+ setup(n) {
35
+ let i = n, a = u(() => e[i.name] ?? []), o = u(() => t({
36
+ size: i.size,
37
+ strokeWidth: i.strokeWidth,
38
+ absoluteStrokeWidth: i.absoluteStrokeWidth,
39
+ rotate: i.rotate,
40
+ flip: i.flip
41
+ })), s = u(() => r(i.fill)), c = u(() => i.label == null || i.label.length === 0);
42
+ return (e, t) => (v(), f("svg", {
43
+ class: "lv-icon",
44
+ xmlns: "http://www.w3.org/2000/svg",
45
+ width: o.value.size,
46
+ height: o.value.size,
47
+ viewBox: "0 0 24 24",
48
+ fill: "none",
49
+ stroke: "currentColor",
50
+ "stroke-width": o.value.strokeWidth,
51
+ "stroke-linecap": "round",
52
+ "stroke-linejoin": "round",
53
+ "aria-hidden": c.value ? "true" : void 0,
54
+ role: c.value ? void 0 : "img",
55
+ "aria-label": c.value ? void 0 : n.label
56
+ }, [p("g", { transform: o.value.transform }, [(v(!0), f(l, null, y(a.value, (e, t) => (v(), f("path", {
57
+ key: t,
58
+ d: e,
59
+ fill: s.value > 0 ? "currentColor" : "none",
60
+ "fill-opacity": s.value > 0 ? s.value : void 0
61
+ }, null, 8, C))), 128))], 8, S)], 8, x));
62
+ }
63
+ }), T = ["disabled", "aria-label"], E = /* @__PURE__ */ h({
64
+ __name: "LvIconButton",
65
+ props: {
66
+ icon: {},
67
+ label: {},
68
+ context: { default: "button" },
69
+ size: {},
70
+ hitArea: {},
71
+ variant: { default: "outline" },
72
+ disabled: {
73
+ type: Boolean,
74
+ default: !1
75
+ },
76
+ optical: {
77
+ type: Boolean,
78
+ default: !0
79
+ }
80
+ },
81
+ setup(e) {
82
+ let t = e, r = u(() => a[t.context] ?? a.button), i = u(() => t.size ?? r.value.size), o = u(() => Math.max(t.hitArea ?? r.value.hitArea, 44)), s = u(() => t.optical ? c(i.value, r.value.strokeWidth) : r.value.strokeWidth);
83
+ return (t, r) => (v(), f("button", {
84
+ type: "button",
85
+ class: g(["lv-icon-button", { "is-disabled": e.disabled }]),
86
+ style: _({ "--lv-target": `${o.value}px` }),
87
+ disabled: e.disabled,
88
+ "aria-label": e.label
89
+ }, [m(w, {
90
+ name: e.icon,
91
+ size: i.value,
92
+ "stroke-width": s.value,
93
+ fill: b(n)(e.variant)
94
+ }, null, 8, [
95
+ "name",
96
+ "size",
97
+ "stroke-width",
98
+ "fill"
99
+ ])], 14, T));
100
+ }
101
+ }), D = [
102
+ "width",
103
+ "height",
104
+ "stroke-width",
105
+ "aria-hidden",
106
+ "role",
107
+ "aria-label"
108
+ ], O = /* @__PURE__ */ h({
109
+ __name: "LvJourneyStep",
110
+ props: {
111
+ state: { default: "pending" },
112
+ size: { default: 24 },
113
+ strokeWidth: { default: 2 },
114
+ label: {}
115
+ },
116
+ setup(e) {
117
+ let t = e, n = u(() => ({
118
+ "--lv-duration": o(s.state),
119
+ "--lv-ease": i.enter
120
+ })), r = u(() => t.label == null || t.label.length === 0);
121
+ return (t, i) => (v(), f("svg", {
122
+ class: g(["lv-icon lv-icon--step", `is-${e.state}`]),
123
+ style: _(n.value),
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ width: e.size,
126
+ height: e.size,
127
+ viewBox: "0 0 24 24",
128
+ fill: "none",
129
+ stroke: "currentColor",
130
+ "stroke-width": e.strokeWidth,
131
+ "stroke-linecap": "round",
132
+ "stroke-linejoin": "round",
133
+ "aria-hidden": r.value ? "true" : void 0,
134
+ role: r.value ? void 0 : "img",
135
+ "aria-label": r.value ? void 0 : e.label
136
+ }, [...i[0] ||= [
137
+ p("circle", {
138
+ class: "lv-icon__ring",
139
+ cx: "12",
140
+ cy: "12",
141
+ r: "8.5"
142
+ }, null, -1),
143
+ p("circle", {
144
+ class: "lv-icon__dot",
145
+ cx: "12",
146
+ cy: "12",
147
+ r: "4",
148
+ fill: "currentColor",
149
+ stroke: "none"
150
+ }, null, -1),
151
+ p("path", {
152
+ class: "lv-icon__tick",
153
+ d: "m8 12.25 2.5 2.5 5.5-5.75"
154
+ }, null, -1),
155
+ p("path", {
156
+ class: "lv-icon__dash",
157
+ d: "M8.5 12h7"
158
+ }, null, -1)
159
+ ]], 14, D));
160
+ }
161
+ }), k = [
162
+ "width",
163
+ "height",
164
+ "stroke-width",
165
+ "aria-hidden",
166
+ "role",
167
+ "aria-label"
168
+ ], A = /* @__PURE__ */ h({
169
+ __name: "LvMenuToClose",
170
+ props: {
171
+ open: {
172
+ type: Boolean,
173
+ default: !1
174
+ },
175
+ size: { default: 24 },
176
+ strokeWidth: { default: 2 },
177
+ absoluteStrokeWidth: {
178
+ type: Boolean,
179
+ default: !1
180
+ },
181
+ label: {},
182
+ duration: { default: s.morph }
183
+ },
184
+ setup(e) {
185
+ let n = e, r = u(() => t({
186
+ size: n.size,
187
+ strokeWidth: n.strokeWidth,
188
+ absoluteStrokeWidth: n.absoluteStrokeWidth
189
+ })), a = u(() => ({
190
+ "--lv-duration": o(n.duration),
191
+ "--lv-ease": i.morph
192
+ })), s = u(() => n.label == null || n.label.length === 0);
193
+ return (t, n) => (v(), f("svg", {
194
+ class: g(["lv-icon lv-icon--menu", { "is-open": e.open }]),
195
+ style: _(a.value),
196
+ xmlns: "http://www.w3.org/2000/svg",
197
+ width: r.value.size,
198
+ height: r.value.size,
199
+ viewBox: "0 0 24 24",
200
+ fill: "none",
201
+ stroke: "currentColor",
202
+ "stroke-width": r.value.strokeWidth,
203
+ "stroke-linecap": "round",
204
+ "aria-hidden": s.value ? "true" : void 0,
205
+ role: s.value ? void 0 : "img",
206
+ "aria-label": s.value ? void 0 : e.label
207
+ }, [...n[0] ||= [
208
+ p("line", {
209
+ class: "lv-icon__bar lv-icon__bar--top",
210
+ x1: "4",
211
+ y1: "7",
212
+ x2: "20",
213
+ y2: "7"
214
+ }, null, -1),
215
+ p("line", {
216
+ class: "lv-icon__bar lv-icon__bar--mid",
217
+ x1: "4",
218
+ y1: "12",
219
+ x2: "20",
220
+ y2: "12"
221
+ }, null, -1),
222
+ p("line", {
223
+ class: "lv-icon__bar lv-icon__bar--bottom",
224
+ x1: "4",
225
+ y1: "17",
226
+ x2: "20",
227
+ y2: "17"
228
+ }, null, -1)
229
+ ]], 14, k));
230
+ }
231
+ }), j = [
232
+ "width",
233
+ "height",
234
+ "stroke-width",
235
+ "aria-hidden",
236
+ "role",
237
+ "aria-label"
238
+ ], M = /* @__PURE__ */ h({
239
+ __name: "LvPlusToClose",
240
+ props: {
241
+ open: {
242
+ type: Boolean,
243
+ default: !1
244
+ },
245
+ size: { default: 24 },
246
+ strokeWidth: { default: 2 },
247
+ absoluteStrokeWidth: {
248
+ type: Boolean,
249
+ default: !1
250
+ },
251
+ label: {},
252
+ duration: { default: s.morph }
253
+ },
254
+ setup(e) {
255
+ let n = e, r = u(() => t({
256
+ size: n.size,
257
+ strokeWidth: n.strokeWidth,
258
+ absoluteStrokeWidth: n.absoluteStrokeWidth
259
+ })), a = u(() => ({
260
+ "--lv-duration": o(n.duration),
261
+ "--lv-ease": i.morph
262
+ })), s = u(() => n.label == null || n.label.length === 0);
263
+ return (t, n) => (v(), f("svg", {
264
+ class: g(["lv-icon lv-icon--plus", { "is-open": e.open }]),
265
+ style: _(a.value),
266
+ xmlns: "http://www.w3.org/2000/svg",
267
+ width: r.value.size,
268
+ height: r.value.size,
269
+ viewBox: "0 0 24 24",
270
+ fill: "none",
271
+ stroke: "currentColor",
272
+ "stroke-width": r.value.strokeWidth,
273
+ "stroke-linecap": "round",
274
+ "aria-hidden": s.value ? "true" : void 0,
275
+ role: s.value ? void 0 : "img",
276
+ "aria-label": s.value ? void 0 : e.label
277
+ }, [...n[0] ||= [p("g", { class: "lv-icon__cross" }, [p("line", {
278
+ x1: "12",
279
+ y1: "5",
280
+ x2: "12",
281
+ y2: "19"
282
+ }), p("line", {
283
+ x1: "5",
284
+ y1: "12",
285
+ x2: "19",
286
+ y2: "12"
287
+ })], -1)]], 14, j));
288
+ }
289
+ }), N = [
290
+ "width",
291
+ "height",
292
+ "stroke-width",
293
+ "aria-hidden",
294
+ "role",
295
+ "aria-label"
296
+ ], P = {
297
+ key: 0,
298
+ class: "lv-icon__ring",
299
+ cx: "12",
300
+ cy: "12",
301
+ r: "9"
302
+ }, F = ["d"], I = /* @__PURE__ */ h({
303
+ __name: "LvCheckmark",
304
+ props: {
305
+ checked: {
306
+ type: Boolean,
307
+ default: !1
308
+ },
309
+ circle: {
310
+ type: Boolean,
311
+ default: !1
312
+ },
313
+ size: { default: 24 },
314
+ strokeWidth: { default: 2 },
315
+ absoluteStrokeWidth: {
316
+ type: Boolean,
317
+ default: !1
318
+ },
319
+ label: {},
320
+ duration: { default: s.state }
321
+ },
322
+ setup(e) {
323
+ let n = e, r = u(() => t({
324
+ size: n.size,
325
+ strokeWidth: n.strokeWidth,
326
+ absoluteStrokeWidth: n.absoluteStrokeWidth
327
+ })), a = u(() => ({
328
+ "--lv-duration": o(n.duration),
329
+ "--lv-ease": i.enter
330
+ })), s = u(() => n.label == null || n.label.length === 0);
331
+ return (t, n) => (v(), f("svg", {
332
+ class: g(["lv-icon lv-icon--check", { "is-checked": e.checked }]),
333
+ style: _(a.value),
334
+ xmlns: "http://www.w3.org/2000/svg",
335
+ width: r.value.size,
336
+ height: r.value.size,
337
+ viewBox: "0 0 24 24",
338
+ fill: "none",
339
+ stroke: "currentColor",
340
+ "stroke-width": r.value.strokeWidth,
341
+ "stroke-linecap": "round",
342
+ "stroke-linejoin": "round",
343
+ "aria-hidden": s.value ? "true" : void 0,
344
+ role: s.value ? void 0 : "img",
345
+ "aria-label": s.value ? void 0 : e.label
346
+ }, [e.circle ? (v(), f("circle", P)) : d("", !0), p("path", {
347
+ class: "lv-icon__tick",
348
+ d: e.circle ? "m8.25 12.25 2.5 2.5 5-5.5" : "m5 12.5 4.5 4.5L19 7.5"
349
+ }, null, 8, F)], 14, N));
350
+ }
351
+ }), L = [
352
+ "width",
353
+ "height",
354
+ "stroke-width",
355
+ "aria-label"
356
+ ], R = /* @__PURE__ */ h({
357
+ __name: "LvLoading",
358
+ props: {
359
+ size: { default: 24 },
360
+ strokeWidth: { default: 2 },
361
+ absoluteStrokeWidth: {
362
+ type: Boolean,
363
+ default: !1
364
+ },
365
+ duration: { default: .9 },
366
+ label: { default: "Loading" }
367
+ },
368
+ setup(e) {
369
+ let n = e, r = u(() => t({
370
+ size: n.size,
371
+ strokeWidth: n.strokeWidth,
372
+ absoluteStrokeWidth: n.absoluteStrokeWidth
373
+ })), i = u(() => ({ "--lv-duration": o(n.duration) }));
374
+ return (t, n) => (v(), f("svg", {
375
+ class: "lv-icon lv-icon--loading",
376
+ style: _(i.value),
377
+ xmlns: "http://www.w3.org/2000/svg",
378
+ width: r.value.size,
379
+ height: r.value.size,
380
+ viewBox: "0 0 24 24",
381
+ fill: "none",
382
+ stroke: "currentColor",
383
+ "stroke-width": r.value.strokeWidth,
384
+ "stroke-linecap": "round",
385
+ role: "status",
386
+ "aria-label": e.label
387
+ }, [...n[0] ||= [p("circle", {
388
+ class: "lv-icon__track",
389
+ cx: "12",
390
+ cy: "12",
391
+ r: "9",
392
+ opacity: "0.22"
393
+ }, null, -1), p("path", {
394
+ class: "lv-icon__arc",
395
+ d: "M21 12a9 9 0 0 0-9-9"
396
+ }, null, -1)]], 12, L));
397
+ }
398
+ }), z = [
399
+ "width",
400
+ "height",
401
+ "stroke-width",
402
+ "aria-hidden",
403
+ "role",
404
+ "aria-label"
405
+ ], B = /* @__PURE__ */ h({
406
+ __name: "LvArrowMotion",
407
+ props: {
408
+ direction: { default: "right" },
409
+ travel: { default: 3 },
410
+ size: { default: 24 },
411
+ strokeWidth: { default: 2 },
412
+ absoluteStrokeWidth: {
413
+ type: Boolean,
414
+ default: !1
415
+ },
416
+ label: {},
417
+ duration: { default: s.micro }
418
+ },
419
+ setup(e) {
420
+ let n = e, r = u(() => t({
421
+ size: n.size,
422
+ strokeWidth: n.strokeWidth,
423
+ absoluteStrokeWidth: n.absoluteStrokeWidth
424
+ })), a = {
425
+ right: 0,
426
+ down: 90,
427
+ left: 180,
428
+ up: 270
429
+ }, s = u(() => ({
430
+ "--lv-duration": o(n.duration),
431
+ "--lv-ease": i.enter,
432
+ "--lv-travel": `${n.travel}px`,
433
+ "--lv-rotate": `${a[n.direction]}deg`
434
+ })), c = u(() => n.label == null || n.label.length === 0);
435
+ return (t, n) => (v(), f("svg", {
436
+ class: "lv-icon lv-icon--arrow",
437
+ style: _(s.value),
438
+ xmlns: "http://www.w3.org/2000/svg",
439
+ width: r.value.size,
440
+ height: r.value.size,
441
+ viewBox: "0 0 24 24",
442
+ fill: "none",
443
+ stroke: "currentColor",
444
+ "stroke-width": r.value.strokeWidth,
445
+ "stroke-linecap": "round",
446
+ "stroke-linejoin": "round",
447
+ "aria-hidden": c.value ? "true" : void 0,
448
+ role: c.value ? void 0 : "img",
449
+ "aria-label": c.value ? void 0 : e.label
450
+ }, [...n[0] ||= [p("g", { class: "lv-icon__arrow-inner" }, [p("path", {
451
+ class: "lv-icon__shaft",
452
+ d: "M4 12h15"
453
+ }), p("path", {
454
+ class: "lv-icon__head",
455
+ d: "m13 6 6 6-6 6"
456
+ })], -1)]], 12, z));
457
+ }
458
+ });
459
+ //#endregion
460
+ export { B as LvArrowMotion, I as LvCheckmark, w as LvIcon, E as LvIconButton, O as LvJourneyStep, R as LvLoading, A as LvMenuToClose, M as LvPlusToClose };
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@lovince/icons",
3
+ "version": "1.0.0",
4
+ "description": "A motion-aware icon system for Vue 3 \u2014 24x24 geometry, variable weight and fill, animated state transitions.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Lovince Tech",
8
+ "keywords": [
9
+ "vue",
10
+ "vue3",
11
+ "nuxt",
12
+ "icons",
13
+ "svg",
14
+ "animated-icons",
15
+ "icon-system",
16
+ "gsap"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/Mac254/Lovince_product_journey.git",
21
+ "directory": "packages/icons"
22
+ },
23
+ "homepage": "https://github.com/Mac254/Lovince_product_journey#readme",
24
+ "bugs": {
25
+ "url": "https://github.com/Mac254/Lovince_product_journey/issues"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "README.md",
30
+ "LICENSE"
31
+ ],
32
+ "main": "./dist/index.js",
33
+ "module": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js"
39
+ },
40
+ "./vue": {
41
+ "types": "./dist/vue.d.ts",
42
+ "import": "./dist/vue.js"
43
+ },
44
+ "./paths": {
45
+ "types": "./dist/paths.d.ts",
46
+ "import": "./dist/paths.js"
47
+ },
48
+ "./style.css": "./dist/style.css",
49
+ "./package.json": "./package.json"
50
+ },
51
+ "sideEffects": [
52
+ "**/*.css"
53
+ ],
54
+ "scripts": {
55
+ "build": "vite build && cp src/style.css dist/style.css",
56
+ "typecheck": "vue-tsc --noEmit"
57
+ },
58
+ "peerDependencies": {
59
+ "vue": "^3.3.0"
60
+ },
61
+ "engines": {
62
+ "node": ">=18"
63
+ },
64
+ "browserslist": [
65
+ "last 2 Chrome versions",
66
+ "last 2 Edge versions",
67
+ "last 2 Firefox versions",
68
+ "last 2 Safari versions",
69
+ "iOS >= 15",
70
+ "not dead"
71
+ ],
72
+ "publishConfig": {
73
+ "access": "public"
74
+ }
75
+ }