@lovince/icons 1.0.0 → 1.1.1

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,12 @@
1
+ import { IconName } from './paths';
2
+ type __VLS_Props = {
3
+ name: IconName;
4
+ size?: number;
5
+ strokeWidth?: number;
6
+ };
7
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ size: number;
9
+ strokeWidth: number;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,48 @@
1
+ export interface Cue {
2
+ readonly name: string;
3
+ /** Seconds from the timeline start. */
4
+ readonly at: number;
5
+ readonly duration: number;
6
+ readonly run: (progress: number) => void;
7
+ readonly onComplete?: () => void;
8
+ }
9
+ export interface CueInput {
10
+ readonly name: string;
11
+ readonly duration?: number;
12
+ /** Seconds after the previous cue starts. Negative overlaps it. */
13
+ readonly offset?: number;
14
+ readonly run: (progress: number) => void;
15
+ readonly onComplete?: () => void;
16
+ }
17
+ export interface Timeline {
18
+ readonly add: (cue: CueInput) => Timeline;
19
+ readonly stagger: (cues: readonly CueInput[], gap?: number) => Timeline;
20
+ readonly cues: () => readonly Cue[];
21
+ readonly duration: () => number;
22
+ readonly play: () => Promise<void>;
23
+ readonly cancel: () => void;
24
+ }
25
+ /**
26
+ * A sequencer for interface motion.
27
+ *
28
+ * The problem it solves: a spotlight, a tooltip, an icon and a progress bar
29
+ * that each animate independently read as four things twitching. Sequenced,
30
+ * with deliberate overlap, they read as one movement. Cues are declared
31
+ * relative to the previous one, so inserting a step does not require
32
+ * re-timing everything after it.
33
+ *
34
+ * Framework-free and driven by `requestAnimationFrame`. Under reduced motion
35
+ * every cue fires once at its final value, so the end state is identical.
36
+ */
37
+ export declare const createTimeline: () => Timeline;
38
+ /**
39
+ * The default choreography for a journey step: the spotlight leads, the tooltip
40
+ * follows before it settles, then progress and the icon land together. The
41
+ * overlap is what makes it one movement instead of a queue.
42
+ */
43
+ export declare const journeyChoreography: (handlers: {
44
+ spotlight: (p: number) => void;
45
+ tooltip: (p: number) => void;
46
+ progress?: (p: number) => void;
47
+ icon?: (p: number) => void;
48
+ }) => Timeline;
package/dist/element.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export declare class LvIconElement extends HTMLElement {
2
- static get observedAttributes(): readonly string[];
3
- connectedCallback(): void;
4
- attributeChangedCallback(): void;
5
- private render;
6
- }
7
- /** Idempotent, so calling it from several entry points is safe. */
1
+ import { IconName } from './paths';
2
+ import { RenderOptions } from './render';
3
+ declare const normaliseName: (value: string | null) => IconName | null;
4
+ /** Reads the element's attributes into render options. Exported for testing. */
5
+ export declare const optionsFromAttributes: (get: (name: string) => string | null, has: (name: string) => boolean) => RenderOptions;
6
+ export { normaliseName as resolveElementName };
7
+ export type LvIconElement = HTMLElement;
8
+ /** Idempotent and SSR-safe: a no-op anywhere without a DOM. */
8
9
  export declare const defineIconElement: (tag?: string) => void;
package/dist/index.d.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  */
6
6
  export { paths, iconNames, iconGroups, isIconName, type IconName } from './paths';
7
7
  export { renderIcon, createIcon, iconDataUri, type RenderOptions } from './render';
8
- export { LvIconElement, defineIconElement } from './element';
8
+ export { defineIconElement, optionsFromAttributes, resolveElementName, type LvIconElement, } from './element';
9
9
  export { CANVAS, DEFAULT_SIZE, DEFAULT_STROKE, resolveGeometry, resolveStroke, resolveTransform, resolveFill, type IconFlip, type IconGeometry, } from './core/props';
10
10
  export { CONTEXT, VARIANT_FILL, STATE_FILL, STATE_OPACITY, opticalStroke, resolveContext, resolveVariantFill, type ContextPreset, type IconContext, type IconState, type IconVariant, } from './core/variants';
11
+ export { createTimeline, journeyChoreography, type Cue, type CueInput, type Timeline, } from './core/choreography';
11
12
  export { DURATION, EASE, cssDuration, prefersReducedMotion, resolveDuration, } from './core/motion';
package/dist/index.js CHANGED
@@ -53,32 +53,107 @@ var C = "http://www.w3.org/2000/svg", w = (e) => e.replace(/&/g, "&amp;").replac
53
53
  if (e == null) return t;
54
54
  let n = Number.parseFloat(e);
55
55
  return Number.isFinite(n) ? n : t;
56
- }, N = class extends HTMLElement {
57
- static get observedAttributes() {
58
- return k;
59
- }
60
- connectedCallback() {
61
- this.render();
62
- }
63
- attributeChangedCallback() {
64
- this.isConnected && this.render();
65
- }
66
- render() {
67
- let e = j(this.getAttribute("name"));
68
- if (this.replaceChildren(), e === null) return;
69
- let t = this.getAttribute("flip"), n = D(e, {
70
- size: M(this.getAttribute("size"), 24),
71
- strokeWidth: M(this.getAttribute("stroke-width"), 2),
72
- absoluteStrokeWidth: this.hasAttribute("absolute-stroke-width"),
73
- fill: M(this.getAttribute("fill"), 0),
74
- rotate: M(this.getAttribute("rotate"), 0),
75
- ...t === "horizontal" || t === "vertical" || t === "both" ? { flip: t } : {},
76
- ...this.getAttribute("label") == null ? {} : { label: this.getAttribute("label") }
77
- });
78
- n !== null && this.appendChild(n);
79
- }
56
+ }, N = (e, t) => {
57
+ let n = e("flip"), r = e("label");
58
+ return {
59
+ size: M(e("size"), 24),
60
+ strokeWidth: M(e("stroke-width"), 2),
61
+ absoluteStrokeWidth: t("absolute-stroke-width"),
62
+ fill: M(e("fill"), 0),
63
+ rotate: M(e("rotate"), 0),
64
+ ...n === "horizontal" || n === "vertical" || n === "both" ? { flip: n } : {},
65
+ ...r == null ? {} : { label: r }
66
+ };
80
67
  }, P = (e = "lv-icon") => {
81
- typeof window > "u" || typeof customElements > "u" || customElements.get(e) === void 0 && customElements.define(e, N);
68
+ if (typeof window > "u" || typeof customElements > "u" || typeof HTMLElement > "u" || customElements.get(e) !== void 0) return;
69
+ class t extends HTMLElement {
70
+ static get observedAttributes() {
71
+ return k;
72
+ }
73
+ connectedCallback() {
74
+ this.render();
75
+ }
76
+ attributeChangedCallback() {
77
+ this.isConnected && this.render();
78
+ }
79
+ render() {
80
+ let e = j(this.getAttribute("name"));
81
+ if (this.replaceChildren(), e === null) return;
82
+ let t = D(e, N((e) => this.getAttribute(e), (e) => this.hasAttribute(e)));
83
+ t !== null && this.appendChild(t);
84
+ }
85
+ }
86
+ customElements.define(e, t);
87
+ }, F = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, I = () => {
88
+ let e = [], t = 0, n = 0, r = !1, i = (n) => {
89
+ let r = n.duration ?? y.state, i = Math.max(0, t + (n.offset ?? 0));
90
+ e.push({
91
+ name: n.name,
92
+ at: i,
93
+ duration: r,
94
+ run: n.run,
95
+ ...n.onComplete === void 0 ? {} : { onComplete: n.onComplete }
96
+ }), t = i + r;
97
+ }, o = {
98
+ add: (e) => (i(e), o),
99
+ stagger: (e, n = y.micro / 2) => {
100
+ let r = t;
101
+ return e.forEach((e, a) => {
102
+ t = r + a * n, i({
103
+ ...e,
104
+ offset: 0
105
+ });
106
+ }), t = Math.max(t, r + (e.length - 1) * n + (e[0]?.duration ?? y.state)), o;
107
+ },
108
+ cues: () => [...e],
109
+ duration: () => e.reduce((e, t) => Math.max(e, t.at + t.duration), 0),
110
+ play: () => {
111
+ r = !1;
112
+ let t = o.duration();
113
+ if (a(t) === 0 || typeof requestAnimationFrame != "function") {
114
+ for (let t of e) t.run(1), t.onComplete?.();
115
+ return Promise.resolve();
116
+ }
117
+ return new Promise((i) => {
118
+ let a = performance.now(), o = /* @__PURE__ */ new Set(), s = (c) => {
119
+ if (r) return i();
120
+ let l = (c - a) / 1e3;
121
+ for (let t of e) {
122
+ if (l < t.at) continue;
123
+ let e = t.duration <= 0 ? 1 : (l - t.at) / t.duration, n = e >= 1 ? 1 : e;
124
+ t.run(F(n)), n === 1 && !o.has(t.name) && (o.add(t.name), t.onComplete?.());
125
+ }
126
+ if (l >= t) return i();
127
+ n = requestAnimationFrame(s);
128
+ };
129
+ n = requestAnimationFrame(s);
130
+ });
131
+ },
132
+ cancel: () => {
133
+ r = !0, n !== 0 && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(n), n = 0;
134
+ }
135
+ };
136
+ return o;
137
+ }, L = (e) => {
138
+ let t = I().add({
139
+ name: "spotlight",
140
+ duration: .72,
141
+ run: e.spotlight
142
+ }).add({
143
+ name: "tooltip",
144
+ duration: .44,
145
+ offset: -.46,
146
+ run: e.tooltip
147
+ }), n = [];
148
+ return e.progress && n.push({
149
+ name: "progress",
150
+ duration: .28,
151
+ run: e.progress
152
+ }), e.icon && n.push({
153
+ name: "icon",
154
+ duration: .28,
155
+ run: e.icon
156
+ }), n.length > 0 && t.stagger(n, .06), t;
82
157
  };
83
158
  //#endregion
84
- export { g as CANVAS, h as CONTEXT, p as DEFAULT_SIZE, u as DEFAULT_STROKE, y as DURATION, m as EASE, N as LvIconElement, v as STATE_FILL, o as STATE_OPACITY, f as VARIANT_FILL, D as createIcon, _ as cssDuration, P as defineIconElement, O as iconDataUri, e as iconGroups, t as iconNames, n as isIconName, b as opticalStroke, r as paths, d as prefersReducedMotion, E as renderIcon, s as resolveContext, a as resolveDuration, l as resolveFill, i as resolveGeometry, x as resolveStroke, S as resolveTransform, c as resolveVariantFill };
159
+ export { g as CANVAS, h as CONTEXT, p as DEFAULT_SIZE, u as DEFAULT_STROKE, y as DURATION, m as EASE, v as STATE_FILL, o as STATE_OPACITY, f as VARIANT_FILL, D as createIcon, I as createTimeline, _ as cssDuration, P as defineIconElement, O as iconDataUri, e as iconGroups, t as iconNames, n as isIconName, L as journeyChoreography, b as opticalStroke, N as optionsFromAttributes, r as paths, d as prefersReducedMotion, E as renderIcon, s as resolveContext, a as resolveDuration, j as resolveElementName, l as resolveFill, i as resolveGeometry, x as resolveStroke, S as resolveTransform, c as resolveVariantFill };
package/dist/style.css CHANGED
@@ -224,3 +224,62 @@
224
224
  transform: scaleX(1);
225
225
  opacity: 1;
226
226
  }
227
+
228
+ /* ── Inspector ────────────────────────────────────────────────────────────
229
+ Development tooling. Deliberately unstyled by tokens so it looks like a tool
230
+ rather than part of the product it is inspecting. */
231
+
232
+ .lv-inspector {
233
+ display: grid;
234
+ gap: 1rem;
235
+ padding: 1rem;
236
+ border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
237
+ border-radius: 12px;
238
+ font-size: 0.8125rem;
239
+ }
240
+
241
+ .lv-inspector__states {
242
+ display: flex;
243
+ flex-wrap: wrap;
244
+ gap: 0.75rem;
245
+ }
246
+
247
+ .lv-inspector__state {
248
+ display: flex;
249
+ flex-direction: column;
250
+ align-items: center;
251
+ gap: 0.5rem;
252
+ min-width: 4.5rem;
253
+ }
254
+
255
+ .lv-inspector__swatch {
256
+ display: grid;
257
+ place-items: center;
258
+ width: 100%;
259
+ padding: 0.875rem 0;
260
+ border-radius: 8px;
261
+ background: color-mix(in srgb, currentColor 6%, transparent);
262
+ }
263
+
264
+ .lv-inspector__caption {
265
+ font-size: 0.6875rem;
266
+ letter-spacing: 0.04em;
267
+ text-transform: uppercase;
268
+ opacity: 0.6;
269
+ }
270
+
271
+ .lv-inspector__facts {
272
+ display: grid;
273
+ grid-template-columns: auto 1fr;
274
+ gap: 0.375rem 1rem;
275
+ margin: 0;
276
+ }
277
+
278
+ .lv-inspector__facts dt {
279
+ opacity: 0.6;
280
+ }
281
+
282
+ .lv-inspector__facts dd {
283
+ margin: 0;
284
+ font-family: ui-monospace, monospace;
285
+ }
package/dist/vue.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  export { default as LvIcon } from './LvIcon.vue';
3
3
  export { default as LvIconButton } from './LvIconButton.vue';
4
4
  export { default as LvJourneyStep } from './LvJourneyStep.vue';
5
+ export { default as LvIconInspector } from './LvIconInspector.vue';
5
6
  export { default as LvMenuToClose } from './animated/LvMenuToClose.vue';
6
7
  export { default as LvPlusToClose } from './animated/LvPlusToClose.vue';
7
8
  export { default as LvCheckmark } from './animated/LvCheckmark.vue';
package/dist/vue.js CHANGED
@@ -1,19 +1,19 @@
1
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";
2
+ import { _ as t, c as n, f as r, g as i, i as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./motion-72rOKpWt.js";
3
+ import { Fragment as f, computed as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, normalizeStyle as b, openBlock as x, renderList as S, toDisplayString as C, unref as w } from "vue";
4
4
  //#region src/LvIcon.vue?vue&type=script&setup=true&lang.ts
5
- var x = [
5
+ var T = [
6
6
  "width",
7
7
  "height",
8
8
  "stroke-width",
9
9
  "aria-hidden",
10
10
  "role",
11
11
  "aria-label"
12
- ], S = ["transform"], C = [
12
+ ], E = ["transform"], D = [
13
13
  "d",
14
14
  "fill",
15
15
  "fill-opacity"
16
- ], w = /* @__PURE__ */ h({
16
+ ], O = /* @__PURE__ */ v({
17
17
  __name: "LvIcon",
18
18
  props: {
19
19
  name: {},
@@ -32,14 +32,14 @@ var x = [
32
32
  label: {}
33
33
  },
34
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", {
35
+ let r = n, a = p(() => e[r.name] ?? []), o = p(() => t({
36
+ size: r.size,
37
+ strokeWidth: r.strokeWidth,
38
+ absoluteStrokeWidth: r.absoluteStrokeWidth,
39
+ rotate: r.rotate,
40
+ flip: r.flip
41
+ })), s = p(() => i(r.fill)), c = p(() => r.label == null || r.label.length === 0);
42
+ return (e, t) => (x(), h("svg", {
43
43
  class: "lv-icon",
44
44
  xmlns: "http://www.w3.org/2000/svg",
45
45
  width: o.value.size,
@@ -53,14 +53,14 @@ var x = [
53
53
  "aria-hidden": c.value ? "true" : void 0,
54
54
  role: c.value ? void 0 : "img",
55
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", {
56
+ }, [g("g", { transform: o.value.transform }, [(x(!0), h(f, null, S(a.value, (e, t) => (x(), h("path", {
57
57
  key: t,
58
58
  d: e,
59
59
  fill: s.value > 0 ? "currentColor" : "none",
60
60
  "fill-opacity": s.value > 0 ? s.value : void 0
61
- }, null, 8, C))), 128))], 8, S)], 8, x));
61
+ }, null, 8, D))), 128))], 8, E)], 8, T));
62
62
  }
63
- }), T = ["disabled", "aria-label"], E = /* @__PURE__ */ h({
63
+ }), k = ["disabled", "aria-label"], A = /* @__PURE__ */ v({
64
64
  __name: "LvIconButton",
65
65
  props: {
66
66
  icon: {},
@@ -79,33 +79,33 @@ var x = [
79
79
  }
80
80
  },
81
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", {
82
+ let t = e, n = p(() => s[t.context] ?? s.button), i = p(() => t.size ?? n.value.size), a = p(() => Math.max(t.hitArea ?? n.value.hitArea, 44)), o = p(() => t.optical ? d(i.value, n.value.strokeWidth) : n.value.strokeWidth);
83
+ return (t, n) => (x(), h("button", {
84
84
  type: "button",
85
- class: g(["lv-icon-button", { "is-disabled": e.disabled }]),
86
- style: _({ "--lv-target": `${o.value}px` }),
85
+ class: y(["lv-icon-button", { "is-disabled": e.disabled }]),
86
+ style: b({ "--lv-target": `${a.value}px` }),
87
87
  disabled: e.disabled,
88
88
  "aria-label": e.label
89
- }, [m(w, {
89
+ }, [_(O, {
90
90
  name: e.icon,
91
91
  size: i.value,
92
- "stroke-width": s.value,
93
- fill: b(n)(e.variant)
92
+ "stroke-width": o.value,
93
+ fill: w(r)(e.variant)
94
94
  }, null, 8, [
95
95
  "name",
96
96
  "size",
97
97
  "stroke-width",
98
98
  "fill"
99
- ])], 14, T));
99
+ ])], 14, k));
100
100
  }
101
- }), D = [
101
+ }), j = [
102
102
  "width",
103
103
  "height",
104
104
  "stroke-width",
105
105
  "aria-hidden",
106
106
  "role",
107
107
  "aria-label"
108
- ], O = /* @__PURE__ */ h({
108
+ ], M = /* @__PURE__ */ v({
109
109
  __name: "LvJourneyStep",
110
110
  props: {
111
111
  state: { default: "pending" },
@@ -114,13 +114,13 @@ var x = [
114
114
  label: {}
115
115
  },
116
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),
117
+ let t = e, n = p(() => ({
118
+ "--lv-duration": c(u.state),
119
+ "--lv-ease": o.enter
120
+ })), r = p(() => t.label == null || t.label.length === 0);
121
+ return (t, i) => (x(), h("svg", {
122
+ class: y(["lv-icon lv-icon--step", `is-${e.state}`]),
123
+ style: b(n.value),
124
124
  xmlns: "http://www.w3.org/2000/svg",
125
125
  width: e.size,
126
126
  height: e.size,
@@ -134,13 +134,13 @@ var x = [
134
134
  role: r.value ? void 0 : "img",
135
135
  "aria-label": r.value ? void 0 : e.label
136
136
  }, [...i[0] ||= [
137
- p("circle", {
137
+ g("circle", {
138
138
  class: "lv-icon__ring",
139
139
  cx: "12",
140
140
  cy: "12",
141
141
  r: "8.5"
142
142
  }, null, -1),
143
- p("circle", {
143
+ g("circle", {
144
144
  class: "lv-icon__dot",
145
145
  cx: "12",
146
146
  cy: "12",
@@ -148,24 +148,85 @@ var x = [
148
148
  fill: "currentColor",
149
149
  stroke: "none"
150
150
  }, null, -1),
151
- p("path", {
151
+ g("path", {
152
152
  class: "lv-icon__tick",
153
153
  d: "m8 12.25 2.5 2.5 5.5-5.75"
154
154
  }, null, -1),
155
- p("path", {
155
+ g("path", {
156
156
  class: "lv-icon__dash",
157
157
  d: "M8.5 12h7"
158
158
  }, null, -1)
159
- ]], 14, D));
159
+ ]], 14, j));
160
160
  }
161
- }), k = [
161
+ }), N = { class: "lv-inspector" }, P = { class: "lv-inspector__states" }, F = { class: "lv-inspector__caption" }, I = { class: "lv-inspector__facts" }, L = /* @__PURE__ */ v({
162
+ __name: "LvIconInspector",
163
+ props: {
164
+ name: {},
165
+ size: { default: 32 },
166
+ strokeWidth: { default: 2 }
167
+ },
168
+ setup(t) {
169
+ let r = t, i = [
170
+ "default",
171
+ "hover",
172
+ "active",
173
+ "disabled"
174
+ ], o = p(() => [
175
+ {
176
+ label: "Name",
177
+ value: r.name
178
+ },
179
+ {
180
+ label: "Grid",
181
+ value: "24 × 24"
182
+ },
183
+ {
184
+ label: "Paths",
185
+ value: String(e[r.name]?.length ?? 0)
186
+ },
187
+ {
188
+ label: "Stroke",
189
+ value: `${r.strokeWidth}px`
190
+ },
191
+ {
192
+ label: "Optical stroke",
193
+ value: `${d(r.size, r.strokeWidth).toFixed(2)}px`
194
+ },
195
+ {
196
+ label: "Motion",
197
+ value: `${u.state * 1e3}ms state · ${u.morph * 1e3}ms morph`
198
+ },
199
+ {
200
+ label: "Reduced motion",
201
+ value: a() ? "active — motion off" : "supported"
202
+ }
203
+ ]);
204
+ return (e, r) => (x(), h("div", N, [g("div", P, [(x(), h(f, null, S(i, (e) => g("div", {
205
+ key: e,
206
+ class: "lv-inspector__state"
207
+ }, [g("div", {
208
+ class: "lv-inspector__swatch",
209
+ style: b({ opacity: w(n)[e] })
210
+ }, [_(O, {
211
+ name: t.name,
212
+ size: t.size,
213
+ "stroke-width": t.strokeWidth,
214
+ fill: w(l)[e]
215
+ }, null, 8, [
216
+ "name",
217
+ "size",
218
+ "stroke-width",
219
+ "fill"
220
+ ])], 4), g("span", F, C(e), 1)])), 64))]), g("dl", I, [(x(!0), h(f, null, S(o.value, (e) => (x(), h(f, { key: e.label }, [g("dt", null, C(e.label), 1), g("dd", null, C(e.value), 1)], 64))), 128))])]));
221
+ }
222
+ }), R = [
162
223
  "width",
163
224
  "height",
164
225
  "stroke-width",
165
226
  "aria-hidden",
166
227
  "role",
167
228
  "aria-label"
168
- ], A = /* @__PURE__ */ h({
229
+ ], z = /* @__PURE__ */ v({
169
230
  __name: "LvMenuToClose",
170
231
  props: {
171
232
  open: {
@@ -179,20 +240,20 @@ var x = [
179
240
  default: !1
180
241
  },
181
242
  label: {},
182
- duration: { default: s.morph }
243
+ duration: { default: u.morph }
183
244
  },
184
245
  setup(e) {
185
- let n = e, r = u(() => t({
246
+ let n = e, r = p(() => t({
186
247
  size: n.size,
187
248
  strokeWidth: n.strokeWidth,
188
249
  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),
250
+ })), i = p(() => ({
251
+ "--lv-duration": c(n.duration),
252
+ "--lv-ease": o.morph
253
+ })), a = p(() => n.label == null || n.label.length === 0);
254
+ return (t, n) => (x(), h("svg", {
255
+ class: y(["lv-icon lv-icon--menu", { "is-open": e.open }]),
256
+ style: b(i.value),
196
257
  xmlns: "http://www.w3.org/2000/svg",
197
258
  width: r.value.size,
198
259
  height: r.value.size,
@@ -201,41 +262,41 @@ var x = [
201
262
  stroke: "currentColor",
202
263
  "stroke-width": r.value.strokeWidth,
203
264
  "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
265
+ "aria-hidden": a.value ? "true" : void 0,
266
+ role: a.value ? void 0 : "img",
267
+ "aria-label": a.value ? void 0 : e.label
207
268
  }, [...n[0] ||= [
208
- p("line", {
269
+ g("line", {
209
270
  class: "lv-icon__bar lv-icon__bar--top",
210
271
  x1: "4",
211
272
  y1: "7",
212
273
  x2: "20",
213
274
  y2: "7"
214
275
  }, null, -1),
215
- p("line", {
276
+ g("line", {
216
277
  class: "lv-icon__bar lv-icon__bar--mid",
217
278
  x1: "4",
218
279
  y1: "12",
219
280
  x2: "20",
220
281
  y2: "12"
221
282
  }, null, -1),
222
- p("line", {
283
+ g("line", {
223
284
  class: "lv-icon__bar lv-icon__bar--bottom",
224
285
  x1: "4",
225
286
  y1: "17",
226
287
  x2: "20",
227
288
  y2: "17"
228
289
  }, null, -1)
229
- ]], 14, k));
290
+ ]], 14, R));
230
291
  }
231
- }), j = [
292
+ }), B = [
232
293
  "width",
233
294
  "height",
234
295
  "stroke-width",
235
296
  "aria-hidden",
236
297
  "role",
237
298
  "aria-label"
238
- ], M = /* @__PURE__ */ h({
299
+ ], V = /* @__PURE__ */ v({
239
300
  __name: "LvPlusToClose",
240
301
  props: {
241
302
  open: {
@@ -249,20 +310,20 @@ var x = [
249
310
  default: !1
250
311
  },
251
312
  label: {},
252
- duration: { default: s.morph }
313
+ duration: { default: u.morph }
253
314
  },
254
315
  setup(e) {
255
- let n = e, r = u(() => t({
316
+ let n = e, r = p(() => t({
256
317
  size: n.size,
257
318
  strokeWidth: n.strokeWidth,
258
319
  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),
320
+ })), i = p(() => ({
321
+ "--lv-duration": c(n.duration),
322
+ "--lv-ease": o.morph
323
+ })), a = p(() => n.label == null || n.label.length === 0);
324
+ return (t, n) => (x(), h("svg", {
325
+ class: y(["lv-icon lv-icon--plus", { "is-open": e.open }]),
326
+ style: b(i.value),
266
327
  xmlns: "http://www.w3.org/2000/svg",
267
328
  width: r.value.size,
268
329
  height: r.value.size,
@@ -271,35 +332,35 @@ var x = [
271
332
  stroke: "currentColor",
272
333
  "stroke-width": r.value.strokeWidth,
273
334
  "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", {
335
+ "aria-hidden": a.value ? "true" : void 0,
336
+ role: a.value ? void 0 : "img",
337
+ "aria-label": a.value ? void 0 : e.label
338
+ }, [...n[0] ||= [g("g", { class: "lv-icon__cross" }, [g("line", {
278
339
  x1: "12",
279
340
  y1: "5",
280
341
  x2: "12",
281
342
  y2: "19"
282
- }), p("line", {
343
+ }), g("line", {
283
344
  x1: "5",
284
345
  y1: "12",
285
346
  x2: "19",
286
347
  y2: "12"
287
- })], -1)]], 14, j));
348
+ })], -1)]], 14, B));
288
349
  }
289
- }), N = [
350
+ }), H = [
290
351
  "width",
291
352
  "height",
292
353
  "stroke-width",
293
354
  "aria-hidden",
294
355
  "role",
295
356
  "aria-label"
296
- ], P = {
357
+ ], U = {
297
358
  key: 0,
298
359
  class: "lv-icon__ring",
299
360
  cx: "12",
300
361
  cy: "12",
301
362
  r: "9"
302
- }, F = ["d"], I = /* @__PURE__ */ h({
363
+ }, W = ["d"], G = /* @__PURE__ */ v({
303
364
  __name: "LvCheckmark",
304
365
  props: {
305
366
  checked: {
@@ -317,20 +378,20 @@ var x = [
317
378
  default: !1
318
379
  },
319
380
  label: {},
320
- duration: { default: s.state }
381
+ duration: { default: u.state }
321
382
  },
322
383
  setup(e) {
323
- let n = e, r = u(() => t({
384
+ let n = e, r = p(() => t({
324
385
  size: n.size,
325
386
  strokeWidth: n.strokeWidth,
326
387
  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),
388
+ })), i = p(() => ({
389
+ "--lv-duration": c(n.duration),
390
+ "--lv-ease": o.enter
391
+ })), a = p(() => n.label == null || n.label.length === 0);
392
+ return (t, n) => (x(), h("svg", {
393
+ class: y(["lv-icon lv-icon--check", { "is-checked": e.checked }]),
394
+ style: b(i.value),
334
395
  xmlns: "http://www.w3.org/2000/svg",
335
396
  width: r.value.size,
336
397
  height: r.value.size,
@@ -340,20 +401,20 @@ var x = [
340
401
  "stroke-width": r.value.strokeWidth,
341
402
  "stroke-linecap": "round",
342
403
  "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", {
404
+ "aria-hidden": a.value ? "true" : void 0,
405
+ role: a.value ? void 0 : "img",
406
+ "aria-label": a.value ? void 0 : e.label
407
+ }, [e.circle ? (x(), h("circle", U)) : m("", !0), g("path", {
347
408
  class: "lv-icon__tick",
348
409
  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));
410
+ }, null, 8, W)], 14, H));
350
411
  }
351
- }), L = [
412
+ }), K = [
352
413
  "width",
353
414
  "height",
354
415
  "stroke-width",
355
416
  "aria-label"
356
- ], R = /* @__PURE__ */ h({
417
+ ], q = /* @__PURE__ */ v({
357
418
  __name: "LvLoading",
358
419
  props: {
359
420
  size: { default: 24 },
@@ -366,14 +427,14 @@ var x = [
366
427
  label: { default: "Loading" }
367
428
  },
368
429
  setup(e) {
369
- let n = e, r = u(() => t({
430
+ let n = e, r = p(() => t({
370
431
  size: n.size,
371
432
  strokeWidth: n.strokeWidth,
372
433
  absoluteStrokeWidth: n.absoluteStrokeWidth
373
- })), i = u(() => ({ "--lv-duration": o(n.duration) }));
374
- return (t, n) => (v(), f("svg", {
434
+ })), i = p(() => ({ "--lv-duration": c(n.duration) }));
435
+ return (t, n) => (x(), h("svg", {
375
436
  class: "lv-icon lv-icon--loading",
376
- style: _(i.value),
437
+ style: b(i.value),
377
438
  xmlns: "http://www.w3.org/2000/svg",
378
439
  width: r.value.size,
379
440
  height: r.value.size,
@@ -384,25 +445,25 @@ var x = [
384
445
  "stroke-linecap": "round",
385
446
  role: "status",
386
447
  "aria-label": e.label
387
- }, [...n[0] ||= [p("circle", {
448
+ }, [...n[0] ||= [g("circle", {
388
449
  class: "lv-icon__track",
389
450
  cx: "12",
390
451
  cy: "12",
391
452
  r: "9",
392
453
  opacity: "0.22"
393
- }, null, -1), p("path", {
454
+ }, null, -1), g("path", {
394
455
  class: "lv-icon__arc",
395
456
  d: "M21 12a9 9 0 0 0-9-9"
396
- }, null, -1)]], 12, L));
457
+ }, null, -1)]], 12, K));
397
458
  }
398
- }), z = [
459
+ }), J = [
399
460
  "width",
400
461
  "height",
401
462
  "stroke-width",
402
463
  "aria-hidden",
403
464
  "role",
404
465
  "aria-label"
405
- ], B = /* @__PURE__ */ h({
466
+ ], Y = /* @__PURE__ */ v({
406
467
  __name: "LvArrowMotion",
407
468
  props: {
408
469
  direction: { default: "right" },
@@ -414,27 +475,27 @@ var x = [
414
475
  default: !1
415
476
  },
416
477
  label: {},
417
- duration: { default: s.micro }
478
+ duration: { default: u.micro }
418
479
  },
419
480
  setup(e) {
420
- let n = e, r = u(() => t({
481
+ let n = e, r = p(() => t({
421
482
  size: n.size,
422
483
  strokeWidth: n.strokeWidth,
423
484
  absoluteStrokeWidth: n.absoluteStrokeWidth
424
- })), a = {
485
+ })), i = {
425
486
  right: 0,
426
487
  down: 90,
427
488
  left: 180,
428
489
  up: 270
429
- }, s = u(() => ({
430
- "--lv-duration": o(n.duration),
431
- "--lv-ease": i.enter,
490
+ }, a = p(() => ({
491
+ "--lv-duration": c(n.duration),
492
+ "--lv-ease": o.enter,
432
493
  "--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", {
494
+ "--lv-rotate": `${i[n.direction]}deg`
495
+ })), s = p(() => n.label == null || n.label.length === 0);
496
+ return (t, n) => (x(), h("svg", {
436
497
  class: "lv-icon lv-icon--arrow",
437
- style: _(s.value),
498
+ style: b(a.value),
438
499
  xmlns: "http://www.w3.org/2000/svg",
439
500
  width: r.value.size,
440
501
  height: r.value.size,
@@ -444,17 +505,17 @@ var x = [
444
505
  "stroke-width": r.value.strokeWidth,
445
506
  "stroke-linecap": "round",
446
507
  "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", {
508
+ "aria-hidden": s.value ? "true" : void 0,
509
+ role: s.value ? void 0 : "img",
510
+ "aria-label": s.value ? void 0 : e.label
511
+ }, [...n[0] ||= [g("g", { class: "lv-icon__arrow-inner" }, [g("path", {
451
512
  class: "lv-icon__shaft",
452
513
  d: "M4 12h15"
453
- }), p("path", {
514
+ }), g("path", {
454
515
  class: "lv-icon__head",
455
516
  d: "m13 6 6 6-6 6"
456
- })], -1)]], 12, z));
517
+ })], -1)]], 12, J));
457
518
  }
458
519
  });
459
520
  //#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 };
521
+ export { Y as LvArrowMotion, G as LvCheckmark, O as LvIcon, A as LvIconButton, L as LvIconInspector, M as LvJourneyStep, q as LvLoading, z as LvMenuToClose, V as LvPlusToClose };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovince/icons",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "A motion-aware icon system for Vue 3 \u2014 24x24 geometry, variable weight and fill, animated state transitions.",
5
5
  "type": "module",
6
6
  "license": "MIT",