@lovince/icons 1.0.0 → 1.1.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/LvIconInspector.vue.d.ts +12 -0
- package/dist/core/choreography.d.ts +48 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +71 -1
- package/dist/style.css +59 -0
- package/dist/vue.d.ts +1 -0
- package/dist/vue.js +179 -118
- package/package.json +1 -1
|
@@ -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/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export { renderIcon, createIcon, iconDataUri, type RenderOptions } from './rende
|
|
|
8
8
|
export { LvIconElement, defineIconElement } 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
|
@@ -79,6 +79,76 @@ var C = "http://www.w3.org/2000/svg", w = (e) => e.replace(/&/g, "&").replac
|
|
|
79
79
|
}
|
|
80
80
|
}, P = (e = "lv-icon") => {
|
|
81
81
|
typeof window > "u" || typeof customElements > "u" || customElements.get(e) === void 0 && customElements.define(e, N);
|
|
82
|
+
}, F = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, I = () => {
|
|
83
|
+
let e = [], t = 0, n = 0, r = !1, i = (n) => {
|
|
84
|
+
let r = n.duration ?? y.state, i = Math.max(0, t + (n.offset ?? 0));
|
|
85
|
+
e.push({
|
|
86
|
+
name: n.name,
|
|
87
|
+
at: i,
|
|
88
|
+
duration: r,
|
|
89
|
+
run: n.run,
|
|
90
|
+
...n.onComplete === void 0 ? {} : { onComplete: n.onComplete }
|
|
91
|
+
}), t = i + r;
|
|
92
|
+
}, o = {
|
|
93
|
+
add: (e) => (i(e), o),
|
|
94
|
+
stagger: (e, n = y.micro / 2) => {
|
|
95
|
+
let r = t;
|
|
96
|
+
return e.forEach((e, a) => {
|
|
97
|
+
t = r + a * n, i({
|
|
98
|
+
...e,
|
|
99
|
+
offset: 0
|
|
100
|
+
});
|
|
101
|
+
}), t = Math.max(t, r + (e.length - 1) * n + (e[0]?.duration ?? y.state)), o;
|
|
102
|
+
},
|
|
103
|
+
cues: () => [...e],
|
|
104
|
+
duration: () => e.reduce((e, t) => Math.max(e, t.at + t.duration), 0),
|
|
105
|
+
play: () => {
|
|
106
|
+
r = !1;
|
|
107
|
+
let t = o.duration();
|
|
108
|
+
if (a(t) === 0 || typeof requestAnimationFrame != "function") {
|
|
109
|
+
for (let t of e) t.run(1), t.onComplete?.();
|
|
110
|
+
return Promise.resolve();
|
|
111
|
+
}
|
|
112
|
+
return new Promise((i) => {
|
|
113
|
+
let a = performance.now(), o = /* @__PURE__ */ new Set(), s = (c) => {
|
|
114
|
+
if (r) return i();
|
|
115
|
+
let l = (c - a) / 1e3;
|
|
116
|
+
for (let t of e) {
|
|
117
|
+
if (l < t.at) continue;
|
|
118
|
+
let e = t.duration <= 0 ? 1 : (l - t.at) / t.duration, n = e >= 1 ? 1 : e;
|
|
119
|
+
t.run(F(n)), n === 1 && !o.has(t.name) && (o.add(t.name), t.onComplete?.());
|
|
120
|
+
}
|
|
121
|
+
if (l >= t) return i();
|
|
122
|
+
n = requestAnimationFrame(s);
|
|
123
|
+
};
|
|
124
|
+
n = requestAnimationFrame(s);
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
cancel: () => {
|
|
128
|
+
r = !0, n !== 0 && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(n), n = 0;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
return o;
|
|
132
|
+
}, L = (e) => {
|
|
133
|
+
let t = I().add({
|
|
134
|
+
name: "spotlight",
|
|
135
|
+
duration: .72,
|
|
136
|
+
run: e.spotlight
|
|
137
|
+
}).add({
|
|
138
|
+
name: "tooltip",
|
|
139
|
+
duration: .44,
|
|
140
|
+
offset: -.46,
|
|
141
|
+
run: e.tooltip
|
|
142
|
+
}), n = [];
|
|
143
|
+
return e.progress && n.push({
|
|
144
|
+
name: "progress",
|
|
145
|
+
duration: .28,
|
|
146
|
+
run: e.progress
|
|
147
|
+
}), e.icon && n.push({
|
|
148
|
+
name: "icon",
|
|
149
|
+
duration: .28,
|
|
150
|
+
run: e.icon
|
|
151
|
+
}), n.length > 0 && t.stagger(n, .06), t;
|
|
82
152
|
};
|
|
83
153
|
//#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 };
|
|
154
|
+
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, 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, 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 };
|
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,
|
|
3
|
-
import { Fragment as
|
|
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
|
|
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
|
-
],
|
|
12
|
+
], E = ["transform"], D = [
|
|
13
13
|
"d",
|
|
14
14
|
"fill",
|
|
15
15
|
"fill-opacity"
|
|
16
|
-
],
|
|
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
|
|
36
|
-
size:
|
|
37
|
-
strokeWidth:
|
|
38
|
-
absoluteStrokeWidth:
|
|
39
|
-
rotate:
|
|
40
|
-
flip:
|
|
41
|
-
})), s =
|
|
42
|
-
return (e, t) => (
|
|
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
|
-
}, [
|
|
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,
|
|
61
|
+
}, null, 8, D))), 128))], 8, E)], 8, T));
|
|
62
62
|
}
|
|
63
|
-
}),
|
|
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,
|
|
83
|
-
return (t,
|
|
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:
|
|
86
|
-
style:
|
|
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
|
-
}, [
|
|
89
|
+
}, [_(O, {
|
|
90
90
|
name: e.icon,
|
|
91
91
|
size: i.value,
|
|
92
|
-
"stroke-width":
|
|
93
|
-
fill:
|
|
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,
|
|
99
|
+
])], 14, k));
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), j = [
|
|
102
102
|
"width",
|
|
103
103
|
"height",
|
|
104
104
|
"stroke-width",
|
|
105
105
|
"aria-hidden",
|
|
106
106
|
"role",
|
|
107
107
|
"aria-label"
|
|
108
|
-
],
|
|
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 =
|
|
118
|
-
"--lv-duration":
|
|
119
|
-
"--lv-ease":
|
|
120
|
-
})), r =
|
|
121
|
-
return (t, i) => (
|
|
122
|
-
class:
|
|
123
|
-
style:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
155
|
+
g("path", {
|
|
156
156
|
class: "lv-icon__dash",
|
|
157
157
|
d: "M8.5 12h7"
|
|
158
158
|
}, null, -1)
|
|
159
|
-
]], 14,
|
|
159
|
+
]], 14, j));
|
|
160
160
|
}
|
|
161
|
-
}),
|
|
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
|
-
],
|
|
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:
|
|
243
|
+
duration: { default: u.morph }
|
|
183
244
|
},
|
|
184
245
|
setup(e) {
|
|
185
|
-
let n = e, r =
|
|
246
|
+
let n = e, r = p(() => t({
|
|
186
247
|
size: n.size,
|
|
187
248
|
strokeWidth: n.strokeWidth,
|
|
188
249
|
absoluteStrokeWidth: n.absoluteStrokeWidth
|
|
189
|
-
})),
|
|
190
|
-
"--lv-duration":
|
|
191
|
-
"--lv-ease":
|
|
192
|
-
})),
|
|
193
|
-
return (t, n) => (
|
|
194
|
-
class:
|
|
195
|
-
style:
|
|
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":
|
|
205
|
-
role:
|
|
206
|
-
"aria-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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
290
|
+
]], 14, R));
|
|
230
291
|
}
|
|
231
|
-
}),
|
|
292
|
+
}), B = [
|
|
232
293
|
"width",
|
|
233
294
|
"height",
|
|
234
295
|
"stroke-width",
|
|
235
296
|
"aria-hidden",
|
|
236
297
|
"role",
|
|
237
298
|
"aria-label"
|
|
238
|
-
],
|
|
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:
|
|
313
|
+
duration: { default: u.morph }
|
|
253
314
|
},
|
|
254
315
|
setup(e) {
|
|
255
|
-
let n = e, r =
|
|
316
|
+
let n = e, r = p(() => t({
|
|
256
317
|
size: n.size,
|
|
257
318
|
strokeWidth: n.strokeWidth,
|
|
258
319
|
absoluteStrokeWidth: n.absoluteStrokeWidth
|
|
259
|
-
})),
|
|
260
|
-
"--lv-duration":
|
|
261
|
-
"--lv-ease":
|
|
262
|
-
})),
|
|
263
|
-
return (t, n) => (
|
|
264
|
-
class:
|
|
265
|
-
style:
|
|
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":
|
|
275
|
-
role:
|
|
276
|
-
"aria-label":
|
|
277
|
-
}, [...n[0] ||= [
|
|
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
|
-
}),
|
|
343
|
+
}), g("line", {
|
|
283
344
|
x1: "5",
|
|
284
345
|
y1: "12",
|
|
285
346
|
x2: "19",
|
|
286
347
|
y2: "12"
|
|
287
|
-
})], -1)]], 14,
|
|
348
|
+
})], -1)]], 14, B));
|
|
288
349
|
}
|
|
289
|
-
}),
|
|
350
|
+
}), H = [
|
|
290
351
|
"width",
|
|
291
352
|
"height",
|
|
292
353
|
"stroke-width",
|
|
293
354
|
"aria-hidden",
|
|
294
355
|
"role",
|
|
295
356
|
"aria-label"
|
|
296
|
-
],
|
|
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
|
-
},
|
|
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:
|
|
381
|
+
duration: { default: u.state }
|
|
321
382
|
},
|
|
322
383
|
setup(e) {
|
|
323
|
-
let n = e, r =
|
|
384
|
+
let n = e, r = p(() => t({
|
|
324
385
|
size: n.size,
|
|
325
386
|
strokeWidth: n.strokeWidth,
|
|
326
387
|
absoluteStrokeWidth: n.absoluteStrokeWidth
|
|
327
|
-
})),
|
|
328
|
-
"--lv-duration":
|
|
329
|
-
"--lv-ease":
|
|
330
|
-
})),
|
|
331
|
-
return (t, n) => (
|
|
332
|
-
class:
|
|
333
|
-
style:
|
|
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":
|
|
344
|
-
role:
|
|
345
|
-
"aria-label":
|
|
346
|
-
}, [e.circle ? (
|
|
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,
|
|
410
|
+
}, null, 8, W)], 14, H));
|
|
350
411
|
}
|
|
351
|
-
}),
|
|
412
|
+
}), K = [
|
|
352
413
|
"width",
|
|
353
414
|
"height",
|
|
354
415
|
"stroke-width",
|
|
355
416
|
"aria-label"
|
|
356
|
-
],
|
|
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 =
|
|
430
|
+
let n = e, r = p(() => t({
|
|
370
431
|
size: n.size,
|
|
371
432
|
strokeWidth: n.strokeWidth,
|
|
372
433
|
absoluteStrokeWidth: n.absoluteStrokeWidth
|
|
373
|
-
})), i =
|
|
374
|
-
return (t, n) => (
|
|
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:
|
|
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] ||= [
|
|
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),
|
|
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,
|
|
457
|
+
}, null, -1)]], 12, K));
|
|
397
458
|
}
|
|
398
|
-
}),
|
|
459
|
+
}), J = [
|
|
399
460
|
"width",
|
|
400
461
|
"height",
|
|
401
462
|
"stroke-width",
|
|
402
463
|
"aria-hidden",
|
|
403
464
|
"role",
|
|
404
465
|
"aria-label"
|
|
405
|
-
],
|
|
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:
|
|
478
|
+
duration: { default: u.micro }
|
|
418
479
|
},
|
|
419
480
|
setup(e) {
|
|
420
|
-
let n = e, r =
|
|
481
|
+
let n = e, r = p(() => t({
|
|
421
482
|
size: n.size,
|
|
422
483
|
strokeWidth: n.strokeWidth,
|
|
423
484
|
absoluteStrokeWidth: n.absoluteStrokeWidth
|
|
424
|
-
})),
|
|
485
|
+
})), i = {
|
|
425
486
|
right: 0,
|
|
426
487
|
down: 90,
|
|
427
488
|
left: 180,
|
|
428
489
|
up: 270
|
|
429
|
-
},
|
|
430
|
-
"--lv-duration":
|
|
431
|
-
"--lv-ease":
|
|
490
|
+
}, a = p(() => ({
|
|
491
|
+
"--lv-duration": c(n.duration),
|
|
492
|
+
"--lv-ease": o.enter,
|
|
432
493
|
"--lv-travel": `${n.travel}px`,
|
|
433
|
-
"--lv-rotate": `${
|
|
434
|
-
})),
|
|
435
|
-
return (t, n) => (
|
|
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:
|
|
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":
|
|
448
|
-
role:
|
|
449
|
-
"aria-label":
|
|
450
|
-
}, [...n[0] ||= [
|
|
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
|
-
}),
|
|
514
|
+
}), g("path", {
|
|
454
515
|
class: "lv-icon__head",
|
|
455
516
|
d: "m13 6 6 6-6 6"
|
|
456
|
-
})], -1)]], 12,
|
|
517
|
+
})], -1)]], 12, J));
|
|
457
518
|
}
|
|
458
519
|
});
|
|
459
520
|
//#endregion
|
|
460
|
-
export {
|
|
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