@frontpanel/vue 0.3.0 → 0.5.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/README.md +3 -1
- package/dist/FpButtonGroup.vue.d.ts +18 -0
- package/dist/FpCheckbox.vue.d.ts +29 -0
- package/dist/FpCheckboxGroup.vue.d.ts +31 -0
- package/dist/FpKnob.vue.d.ts +3 -3
- package/dist/FpMenu.vue.d.ts +51 -0
- package/dist/FpMenuItem.vue.d.ts +26 -0
- package/dist/FpMenuSeparator.vue.d.ts +3 -0
- package/dist/FpMeter.vue.d.ts +2 -2
- package/dist/FpRadioGroup.vue.d.ts +31 -0
- package/dist/FpSlider.vue.d.ts +4 -4
- package/dist/icons.d.ts +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.js +481 -148
- package/dist/keys.d.ts +16 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f,
|
|
2
|
-
import { Primitive as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, shallowRef as y, toDisplayString as b, unref as x, useAttrs as S, useId as C, useModel as w, useTemplateRef as T, warn as E, watch as D, withCtx as O } from "vue";
|
|
2
|
+
import { CheckboxGroupRoot as k, CheckboxRoot as A, DropdownMenuContent as ee, DropdownMenuItem as te, DropdownMenuPortal as j, DropdownMenuRoot as ne, DropdownMenuSeparator as re, DropdownMenuTrigger as ie, Primitive as M, RadioGroupItem as ae, RadioGroupRoot as oe, SliderRoot as se, SliderThumb as ce, SliderTrack as le, SwitchRoot as ue, SwitchThumb as de } from "reka-ui";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/FpButton.vue
|
|
5
|
-
var
|
|
5
|
+
var N = /* @__PURE__ */ c({
|
|
6
6
|
__name: "FpButton",
|
|
7
7
|
props: {
|
|
8
8
|
pressed: {
|
|
@@ -14,14 +14,14 @@ var j = /* @__PURE__ */ c({
|
|
|
14
14
|
},
|
|
15
15
|
setup(e) {
|
|
16
16
|
let t = e;
|
|
17
|
-
return (e, r) => (
|
|
17
|
+
return (e, r) => (m(), n(x(M), {
|
|
18
18
|
as: t.as,
|
|
19
19
|
"as-child": t.asChild,
|
|
20
20
|
class: "fp-chrome-btn",
|
|
21
21
|
type: t.as === "button" && !t.asChild ? "button" : void 0,
|
|
22
22
|
"aria-pressed": t.pressed
|
|
23
23
|
}, {
|
|
24
|
-
default:
|
|
24
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
25
25
|
_: 3
|
|
26
26
|
}, 8, [
|
|
27
27
|
"as",
|
|
@@ -30,7 +30,25 @@ var j = /* @__PURE__ */ c({
|
|
|
30
30
|
"aria-pressed"
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), P = /* @__PURE__ */ c({
|
|
34
|
+
__name: "FpButtonGroup",
|
|
35
|
+
props: {
|
|
36
|
+
asChild: { type: Boolean },
|
|
37
|
+
as: { default: "div" }
|
|
38
|
+
},
|
|
39
|
+
setup(e) {
|
|
40
|
+
let t = e;
|
|
41
|
+
return (e, r) => (m(), n(x(M), {
|
|
42
|
+
as: t.as,
|
|
43
|
+
"as-child": t.asChild,
|
|
44
|
+
class: "fp-button-group",
|
|
45
|
+
role: "group"
|
|
46
|
+
}, {
|
|
47
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["as", "as-child"]));
|
|
50
|
+
}
|
|
51
|
+
}), F = /* @__PURE__ */ c({
|
|
34
52
|
__name: "FpCap",
|
|
35
53
|
props: {
|
|
36
54
|
color: { default: "white" },
|
|
@@ -49,14 +67,14 @@ var j = /* @__PURE__ */ c({
|
|
|
49
67
|
graphite: "fp-cap-graphite",
|
|
50
68
|
berry: "fp-cap-berry"
|
|
51
69
|
};
|
|
52
|
-
return (e, i) => (
|
|
70
|
+
return (e, i) => (m(), n(x(M), {
|
|
53
71
|
as: t.as,
|
|
54
72
|
"as-child": t.asChild,
|
|
55
73
|
class: d(["fp-cap", r[t.color]]),
|
|
56
74
|
type: t.as === "button" && !t.asChild ? "button" : void 0,
|
|
57
75
|
"aria-pressed": t.pressed
|
|
58
76
|
}, {
|
|
59
|
-
default:
|
|
77
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
60
78
|
_: 3
|
|
61
79
|
}, 8, [
|
|
62
80
|
"as",
|
|
@@ -66,10 +84,130 @@ var j = /* @__PURE__ */ c({
|
|
|
66
84
|
"aria-pressed"
|
|
67
85
|
]));
|
|
68
86
|
}
|
|
87
|
+
}), I = {
|
|
88
|
+
green: "fp-led-green",
|
|
89
|
+
amber: "fp-led-amber",
|
|
90
|
+
red: "fp-led-red"
|
|
91
|
+
}, L = ["data-orientation"], R = ["id"], z = /* @__PURE__ */ c({
|
|
92
|
+
inheritAttrs: !1,
|
|
93
|
+
__name: "FpCheckbox",
|
|
94
|
+
props: /*@__PURE__*/ l({
|
|
95
|
+
label: {},
|
|
96
|
+
orientation: { default: "horizontal" },
|
|
97
|
+
led: { default: "strip" },
|
|
98
|
+
color: { default: "green" },
|
|
99
|
+
disabled: { type: Boolean }
|
|
100
|
+
}, {
|
|
101
|
+
modelValue: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: !1
|
|
104
|
+
},
|
|
105
|
+
modelModifiers: {}
|
|
106
|
+
}),
|
|
107
|
+
emits: ["update:modelValue"],
|
|
108
|
+
setup(e) {
|
|
109
|
+
let n = e, a = w(e, "modelValue"), c = C(), l = S(), f = t(() => ({
|
|
110
|
+
class: l.class,
|
|
111
|
+
style: l.style
|
|
112
|
+
})), p = t(() => {
|
|
113
|
+
let { class: e, style: t, ...n } = l;
|
|
114
|
+
return n;
|
|
115
|
+
});
|
|
116
|
+
return (e, t) => (m(), i("div", u({
|
|
117
|
+
class: "fp-keys",
|
|
118
|
+
"data-orientation": n.orientation
|
|
119
|
+
}, f.value), [n.label ? (m(), i("span", {
|
|
120
|
+
key: 0,
|
|
121
|
+
id: x(c),
|
|
122
|
+
class: "fp-silk"
|
|
123
|
+
}, [n.led === "above" ? (m(), i("span", {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: d(["fp-led", [x(I)[n.color], { "fp-led-lit": a.value }]]),
|
|
126
|
+
"aria-hidden": "true"
|
|
127
|
+
}, null, 2)) : r("", !0), o(b(n.label), 1)], 8, R)) : r("", !0), s(x(A), u(p.value, {
|
|
128
|
+
modelValue: a.value,
|
|
129
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
130
|
+
class: ["fp-key", n.led === "strip" ? x(I)[n.color] : void 0],
|
|
131
|
+
"data-strip": n.led === "strip" ? void 0 : "plain",
|
|
132
|
+
disabled: n.disabled,
|
|
133
|
+
"aria-labelledby": n.label ? x(c) : void 0
|
|
134
|
+
}), null, 16, [
|
|
135
|
+
"modelValue",
|
|
136
|
+
"class",
|
|
137
|
+
"data-strip",
|
|
138
|
+
"disabled",
|
|
139
|
+
"aria-labelledby"
|
|
140
|
+
])], 16, L));
|
|
141
|
+
}
|
|
142
|
+
}), B = ["id"], V = /* @__PURE__ */ c({
|
|
143
|
+
inheritAttrs: !1,
|
|
144
|
+
__name: "FpCheckboxGroup",
|
|
145
|
+
props: /*@__PURE__*/ l({
|
|
146
|
+
options: {},
|
|
147
|
+
label: {},
|
|
148
|
+
orientation: { default: "horizontal" },
|
|
149
|
+
led: { default: "strip" },
|
|
150
|
+
color: { default: "green" },
|
|
151
|
+
disabled: { type: Boolean }
|
|
152
|
+
}, {
|
|
153
|
+
modelValue: { default: () => [] },
|
|
154
|
+
modelModifiers: {}
|
|
155
|
+
}),
|
|
156
|
+
emits: ["update:modelValue"],
|
|
157
|
+
setup(n) {
|
|
158
|
+
let c = n, l = w(n, "modelValue"), f = C(), p = `${f}-label`, h = (e) => `${f}-key-${e}`, _ = (e) => I[e.color ?? c.color], v = S(), y = t(() => ({
|
|
159
|
+
class: v.class,
|
|
160
|
+
style: v.style
|
|
161
|
+
})), T = t(() => {
|
|
162
|
+
let { class: e, style: t, ...n } = v;
|
|
163
|
+
return n;
|
|
164
|
+
});
|
|
165
|
+
return (t, n) => (m(), i("div", u({ class: "fp-unit" }, y.value), [s(x(k), u(T.value, {
|
|
166
|
+
modelValue: l.value,
|
|
167
|
+
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
168
|
+
class: "fp-keys",
|
|
169
|
+
role: "group",
|
|
170
|
+
"roving-focus": !1,
|
|
171
|
+
"data-orientation": c.orientation,
|
|
172
|
+
disabled: c.disabled,
|
|
173
|
+
"aria-labelledby": c.label ? p : void 0
|
|
174
|
+
}), {
|
|
175
|
+
default: O(() => [(m(!0), i(e, null, g(c.options, (t, n) => (m(), i(e, { key: t.value }, [a("span", {
|
|
176
|
+
id: h(n),
|
|
177
|
+
class: "fp-silk"
|
|
178
|
+
}, [c.led === "above" ? (m(), i("span", {
|
|
179
|
+
key: 0,
|
|
180
|
+
class: d(["fp-led", [_(t), { "fp-led-lit": l.value.includes(t.value) }]]),
|
|
181
|
+
"aria-hidden": "true"
|
|
182
|
+
}, null, 2)) : r("", !0), o(b(t.label), 1)], 8, B), s(x(A), {
|
|
183
|
+
value: t.value,
|
|
184
|
+
disabled: t.disabled,
|
|
185
|
+
class: d(["fp-key", c.led === "strip" ? _(t) : void 0]),
|
|
186
|
+
"data-strip": c.led === "strip" ? void 0 : "plain",
|
|
187
|
+
"aria-labelledby": h(n)
|
|
188
|
+
}, null, 8, [
|
|
189
|
+
"value",
|
|
190
|
+
"disabled",
|
|
191
|
+
"class",
|
|
192
|
+
"data-strip",
|
|
193
|
+
"aria-labelledby"
|
|
194
|
+
])], 64))), 128))]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 16, [
|
|
197
|
+
"modelValue",
|
|
198
|
+
"data-orientation",
|
|
199
|
+
"disabled",
|
|
200
|
+
"aria-labelledby"
|
|
201
|
+
]), c.label ? (m(), i("span", {
|
|
202
|
+
key: 0,
|
|
203
|
+
id: p,
|
|
204
|
+
class: "fp-silk"
|
|
205
|
+
}, b(c.label), 1)) : r("", !0)], 16));
|
|
206
|
+
}
|
|
69
207
|
});
|
|
70
208
|
//#endregion
|
|
71
209
|
//#region src/fit.ts
|
|
72
|
-
function
|
|
210
|
+
function H(e, t, n, r) {
|
|
73
211
|
if (t.width <= 0 || n.width <= 0) return null;
|
|
74
212
|
let i = t.width / n.width;
|
|
75
213
|
if (e === "contain") {
|
|
@@ -80,7 +218,7 @@ function re(e, t, n, r) {
|
|
|
80
218
|
}
|
|
81
219
|
//#endregion
|
|
82
220
|
//#region src/FpDevice.vue?vue&type=script&setup=true&lang.ts
|
|
83
|
-
var
|
|
221
|
+
var fe = { class: "fp-device-body" }, pe = /* @__PURE__ */ c({
|
|
84
222
|
__name: "FpDevice",
|
|
85
223
|
props: {
|
|
86
224
|
backdrop: {
|
|
@@ -97,14 +235,14 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
97
235
|
maxScale: { default: 1 }
|
|
98
236
|
},
|
|
99
237
|
setup(e) {
|
|
100
|
-
let n = e, r =
|
|
238
|
+
let n = e, r = T("stage"), o = T("device"), s = y({
|
|
101
239
|
width: 0,
|
|
102
240
|
height: 0
|
|
103
|
-
}), c =
|
|
241
|
+
}), c = y(0), l = t(() => n.fit === "none" ? !1 : n.width !== void 0 || (E(`FpDevice: fit="${n.fit}" needs a design width; the device is not scaled.`), !1)), u = t(() => n.height ?? c.value), p = t(() => !l.value || n.fit === "none" ? null : H(n.fit, s.value, {
|
|
104
242
|
width: n.width,
|
|
105
243
|
height: u.value
|
|
106
244
|
}, n.maxScale));
|
|
107
|
-
function
|
|
245
|
+
function h() {
|
|
108
246
|
if (!r.value || !o.value) return;
|
|
109
247
|
let e = getComputedStyle(r.value), t = (e) => Number.parseFloat(e) || 0;
|
|
110
248
|
s.value = {
|
|
@@ -112,23 +250,23 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
112
250
|
height: r.value.clientHeight - t(e.paddingTop) - t(e.paddingBottom)
|
|
113
251
|
}, c.value = o.value.offsetHeight;
|
|
114
252
|
}
|
|
115
|
-
|
|
253
|
+
D([
|
|
116
254
|
l,
|
|
117
255
|
r,
|
|
118
256
|
o
|
|
119
257
|
], ([e, t, n], r, i) => {
|
|
120
258
|
if (!e || !t || !n || typeof ResizeObserver > "u") return;
|
|
121
|
-
let a = new ResizeObserver(
|
|
259
|
+
let a = new ResizeObserver(h);
|
|
122
260
|
a.observe(t), a.observe(n), i(() => a.disconnect());
|
|
123
261
|
}, {
|
|
124
262
|
flush: "post",
|
|
125
263
|
immediate: !0
|
|
126
264
|
});
|
|
127
|
-
let
|
|
265
|
+
let g = t(() => l.value ? { contain: "inline-size" } : void 0), v = t(() => {
|
|
128
266
|
if (!l.value) return { display: "contents" };
|
|
129
|
-
if (
|
|
130
|
-
width: `${n.width *
|
|
131
|
-
height: `${u.value *
|
|
267
|
+
if (p.value !== null) return {
|
|
268
|
+
width: `${n.width * p.value}px`,
|
|
269
|
+
height: `${u.value * p.value}px`,
|
|
132
270
|
marginInline: "auto"
|
|
133
271
|
};
|
|
134
272
|
}), b = t(() => {
|
|
@@ -136,31 +274,31 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
136
274
|
boxSizing: "border-box",
|
|
137
275
|
width: `${n.width}px`,
|
|
138
276
|
height: n.height === void 0 ? void 0 : `${n.height}px`,
|
|
139
|
-
scale:
|
|
277
|
+
scale: p.value ?? void 0,
|
|
140
278
|
transformOrigin: "0 0",
|
|
141
|
-
visibility:
|
|
279
|
+
visibility: p.value === null ? "hidden" : void 0
|
|
142
280
|
};
|
|
143
281
|
});
|
|
144
|
-
return (e, t) => (
|
|
282
|
+
return (e, t) => (m(), i("div", {
|
|
145
283
|
ref_key: "stage",
|
|
146
284
|
ref: r,
|
|
147
285
|
class: d({ "fp-device-backdrop": n.backdrop }),
|
|
148
|
-
style: f(
|
|
149
|
-
}, [a("div", { style: f(
|
|
286
|
+
style: f(g.value)
|
|
287
|
+
}, [a("div", { style: f(v.value) }, [n.rim ? (m(), i("div", {
|
|
150
288
|
key: 0,
|
|
151
289
|
ref_key: "device",
|
|
152
290
|
ref: o,
|
|
153
291
|
class: "fp-device-rim",
|
|
154
292
|
style: f(b.value)
|
|
155
|
-
}, [a("div",
|
|
293
|
+
}, [a("div", fe, [_(e.$slots, "default")])], 4)) : (m(), i("div", {
|
|
156
294
|
key: 1,
|
|
157
295
|
ref_key: "device",
|
|
158
296
|
ref: o,
|
|
159
297
|
class: "fp-device-body",
|
|
160
298
|
style: f(b.value)
|
|
161
|
-
}, [
|
|
299
|
+
}, [_(e.$slots, "default")], 4))], 4)], 6));
|
|
162
300
|
}
|
|
163
|
-
}),
|
|
301
|
+
}), me = /* @__PURE__ */ c({
|
|
164
302
|
__name: "FpGelButton",
|
|
165
303
|
props: {
|
|
166
304
|
asChild: { type: Boolean },
|
|
@@ -168,13 +306,13 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
168
306
|
},
|
|
169
307
|
setup(e) {
|
|
170
308
|
let t = e;
|
|
171
|
-
return (e, r) => (
|
|
309
|
+
return (e, r) => (m(), n(x(M), {
|
|
172
310
|
as: t.as,
|
|
173
311
|
"as-child": t.asChild,
|
|
174
312
|
class: "fp-gel",
|
|
175
313
|
type: t.as === "button" && !t.asChild ? "button" : void 0
|
|
176
314
|
}, {
|
|
177
|
-
default:
|
|
315
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
178
316
|
_: 3
|
|
179
317
|
}, 8, [
|
|
180
318
|
"as",
|
|
@@ -182,7 +320,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
182
320
|
"type"
|
|
183
321
|
]));
|
|
184
322
|
}
|
|
185
|
-
}),
|
|
323
|
+
}), he = /* @__PURE__ */ c({
|
|
186
324
|
__name: "FpHousing",
|
|
187
325
|
props: {
|
|
188
326
|
asChild: { type: Boolean },
|
|
@@ -190,16 +328,16 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
190
328
|
},
|
|
191
329
|
setup(e) {
|
|
192
330
|
let t = e;
|
|
193
|
-
return (e, r) => (
|
|
331
|
+
return (e, r) => (m(), n(x(M), {
|
|
194
332
|
as: t.as,
|
|
195
333
|
"as-child": t.asChild,
|
|
196
334
|
class: "fp-housing"
|
|
197
335
|
}, {
|
|
198
|
-
default:
|
|
336
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
199
337
|
_: 3
|
|
200
338
|
}, 8, ["as", "as-child"]));
|
|
201
339
|
}
|
|
202
|
-
}),
|
|
340
|
+
}), U = [
|
|
203
341
|
"................",
|
|
204
342
|
"................",
|
|
205
343
|
".....#..........",
|
|
@@ -216,7 +354,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
216
354
|
"................",
|
|
217
355
|
"................",
|
|
218
356
|
"................"
|
|
219
|
-
],
|
|
357
|
+
], W = [
|
|
220
358
|
"................",
|
|
221
359
|
"................",
|
|
222
360
|
".........##.....",
|
|
@@ -233,7 +371,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
233
371
|
".........##.....",
|
|
234
372
|
"................",
|
|
235
373
|
"................"
|
|
236
|
-
],
|
|
374
|
+
], G = (e) => e.map((e) => [...e].reverse().join("")), K = {
|
|
237
375
|
add: [
|
|
238
376
|
"................",
|
|
239
377
|
"................",
|
|
@@ -270,8 +408,26 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
270
408
|
"................",
|
|
271
409
|
"................"
|
|
272
410
|
],
|
|
273
|
-
left:
|
|
274
|
-
right:
|
|
411
|
+
left: W,
|
|
412
|
+
right: G(W),
|
|
413
|
+
down: [
|
|
414
|
+
"................",
|
|
415
|
+
"................",
|
|
416
|
+
"................",
|
|
417
|
+
"................",
|
|
418
|
+
"................",
|
|
419
|
+
"..##........##..",
|
|
420
|
+
"..###......###..",
|
|
421
|
+
"...###....###...",
|
|
422
|
+
"....###..###....",
|
|
423
|
+
".....######.....",
|
|
424
|
+
"......####......",
|
|
425
|
+
".......##.......",
|
|
426
|
+
"................",
|
|
427
|
+
"................",
|
|
428
|
+
"................",
|
|
429
|
+
"................"
|
|
430
|
+
],
|
|
275
431
|
go: [
|
|
276
432
|
"................",
|
|
277
433
|
"................",
|
|
@@ -308,8 +464,8 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
308
464
|
"................",
|
|
309
465
|
"................"
|
|
310
466
|
],
|
|
311
|
-
undo:
|
|
312
|
-
redo:
|
|
467
|
+
undo: U,
|
|
468
|
+
redo: G(U),
|
|
313
469
|
home: [
|
|
314
470
|
"................",
|
|
315
471
|
".......##.......",
|
|
@@ -507,9 +663,27 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
507
663
|
"................",
|
|
508
664
|
"................",
|
|
509
665
|
"................"
|
|
666
|
+
],
|
|
667
|
+
power: [
|
|
668
|
+
"................",
|
|
669
|
+
"................",
|
|
670
|
+
".......##.......",
|
|
671
|
+
".......##.......",
|
|
672
|
+
"...##..##..##...",
|
|
673
|
+
"..###..##..###..",
|
|
674
|
+
"..##...##...##..",
|
|
675
|
+
"..##...##...##..",
|
|
676
|
+
"..##........##..",
|
|
677
|
+
"..##........##..",
|
|
678
|
+
"..###......###..",
|
|
679
|
+
"...###....###...",
|
|
680
|
+
"....########....",
|
|
681
|
+
".....######.....",
|
|
682
|
+
"................",
|
|
683
|
+
"................"
|
|
510
684
|
]
|
|
511
685
|
};
|
|
512
|
-
function
|
|
686
|
+
function ge(e) {
|
|
513
687
|
let t = "";
|
|
514
688
|
return e.forEach((e, n) => {
|
|
515
689
|
let r = 0;
|
|
@@ -525,27 +699,27 @@ function z(e) {
|
|
|
525
699
|
}
|
|
526
700
|
}), t;
|
|
527
701
|
}
|
|
528
|
-
var
|
|
702
|
+
var q = Object.keys(K), _e = Object.fromEntries(q.map((e) => [e, ge(K[e])])), ve = [
|
|
529
703
|
"role",
|
|
530
704
|
"aria-label",
|
|
531
705
|
"aria-hidden"
|
|
532
|
-
],
|
|
706
|
+
], ye = ["d"], J = /* @__PURE__ */ c({
|
|
533
707
|
__name: "FpIcon",
|
|
534
708
|
props: {
|
|
535
709
|
name: {},
|
|
536
710
|
label: {}
|
|
537
711
|
},
|
|
538
712
|
setup(e) {
|
|
539
|
-
let n = e, r = t(() =>
|
|
540
|
-
return (e, t) => (
|
|
713
|
+
let n = e, r = t(() => _e[n.name]);
|
|
714
|
+
return (e, t) => (m(), i("svg", {
|
|
541
715
|
viewBox: "0 0 16 16",
|
|
542
716
|
class: "fp-icon",
|
|
543
717
|
role: n.label ? "img" : void 0,
|
|
544
718
|
"aria-label": n.label || void 0,
|
|
545
719
|
"aria-hidden": n.label ? void 0 : "true"
|
|
546
|
-
}, [a("path", { d: r.value }, null, 8,
|
|
720
|
+
}, [a("path", { d: r.value }, null, 8, ye)], 8, ve));
|
|
547
721
|
}
|
|
548
|
-
}),
|
|
722
|
+
}), be = [
|
|
549
723
|
"tabindex",
|
|
550
724
|
"aria-valuemin",
|
|
551
725
|
"aria-valuemax",
|
|
@@ -553,7 +727,7 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
553
727
|
"aria-valuetext",
|
|
554
728
|
"aria-labelledby",
|
|
555
729
|
"aria-disabled"
|
|
556
|
-
],
|
|
730
|
+
], xe = ["id"], Se = 200, Ce = .1, Y = 270, we = /* @__PURE__ */ c({
|
|
557
731
|
inheritAttrs: !1,
|
|
558
732
|
__name: "FpKnob",
|
|
559
733
|
props: /*@__PURE__*/ l({
|
|
@@ -569,34 +743,34 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
569
743
|
}),
|
|
570
744
|
emits: /*@__PURE__*/ l(["valueCommit"], ["update:modelValue"]),
|
|
571
745
|
setup(e, { emit: n }) {
|
|
572
|
-
let o = e, s = n, c =
|
|
746
|
+
let o = e, s = n, c = w(e, "modelValue"), l = S(), d = t(() => ({
|
|
573
747
|
class: l.class,
|
|
574
748
|
style: l.style
|
|
575
|
-
})),
|
|
749
|
+
})), p = t(() => {
|
|
576
750
|
let { class: e, style: t, ...n } = l;
|
|
577
751
|
return n;
|
|
578
|
-
}), h =
|
|
752
|
+
}), h = C(), g = t(() => (String(o.step).split(".")[1] ?? "").length);
|
|
579
753
|
function _(e) {
|
|
580
754
|
let t = Math.round((e - o.min) / o.step) * o.step + o.min, n = Math.min(o.max, Math.max(o.min, t));
|
|
581
755
|
return Number(n.toFixed(g.value));
|
|
582
756
|
}
|
|
583
|
-
let
|
|
584
|
-
let e = o.max - o.min, t = e > 0 ? (
|
|
757
|
+
let v = t(() => _(c.value)), y = t(() => {
|
|
758
|
+
let e = o.max - o.min, t = e > 0 ? (v.value - o.min) / e : 0;
|
|
585
759
|
return Math.round(t * Y - Y / 2);
|
|
586
760
|
});
|
|
587
761
|
function T(e) {
|
|
588
762
|
let t = _(e);
|
|
589
|
-
return t !==
|
|
763
|
+
return t !== v.value && (c.value = t, !0);
|
|
590
764
|
}
|
|
591
765
|
function E(e) {
|
|
592
766
|
if (o.disabled) return;
|
|
593
767
|
let t = o.step * 10, n = {
|
|
594
|
-
ArrowUp:
|
|
595
|
-
ArrowRight:
|
|
596
|
-
ArrowDown:
|
|
597
|
-
ArrowLeft:
|
|
598
|
-
PageUp:
|
|
599
|
-
PageDown:
|
|
768
|
+
ArrowUp: v.value + o.step,
|
|
769
|
+
ArrowRight: v.value + o.step,
|
|
770
|
+
ArrowDown: v.value - o.step,
|
|
771
|
+
ArrowLeft: v.value - o.step,
|
|
772
|
+
PageUp: v.value + t,
|
|
773
|
+
PageDown: v.value - t,
|
|
600
774
|
Home: o.min,
|
|
601
775
|
End: o.max
|
|
602
776
|
}[e.key];
|
|
@@ -612,13 +786,13 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
612
786
|
}), D = {
|
|
613
787
|
pointerId: e.pointerId,
|
|
614
788
|
y: e.clientY,
|
|
615
|
-
raw:
|
|
616
|
-
start:
|
|
789
|
+
raw: v.value,
|
|
790
|
+
start: v.value
|
|
617
791
|
};
|
|
618
792
|
}
|
|
619
793
|
function k(e) {
|
|
620
794
|
if (!D || e.pointerId !== D.pointerId) return;
|
|
621
|
-
let t = (o.max - o.min) /
|
|
795
|
+
let t = (o.max - o.min) / Se * (e.shiftKey ? Ce : 1);
|
|
622
796
|
D.raw = Math.min(o.max, Math.max(o.min, D.raw + (D.y - e.clientY) * t)), D.y = e.clientY, T(D.raw);
|
|
623
797
|
}
|
|
624
798
|
function A(e) {
|
|
@@ -626,15 +800,15 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
626
800
|
let t = _(D.raw), n = t !== D.start;
|
|
627
801
|
D = void 0, n && s("valueCommit", t);
|
|
628
802
|
}
|
|
629
|
-
return (e, t) => (
|
|
803
|
+
return (e, t) => (m(), i("div", u({ class: "fp-unit" }, d.value), [a("div", u(p.value, {
|
|
630
804
|
class: "fp-knob",
|
|
631
805
|
role: "slider",
|
|
632
806
|
tabindex: o.disabled ? void 0 : 0,
|
|
633
807
|
"aria-valuemin": o.min,
|
|
634
808
|
"aria-valuemax": o.max,
|
|
635
|
-
"aria-valuenow":
|
|
636
|
-
"aria-valuetext": o.valueText?.(
|
|
637
|
-
"aria-labelledby": o.label ?
|
|
809
|
+
"aria-valuenow": v.value,
|
|
810
|
+
"aria-valuetext": o.valueText?.(v.value),
|
|
811
|
+
"aria-labelledby": o.label ? x(h) : void 0,
|
|
638
812
|
"aria-disabled": o.disabled || void 0,
|
|
639
813
|
onKeydown: E,
|
|
640
814
|
onPointerdown: O,
|
|
@@ -643,14 +817,14 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
643
817
|
onPointercancel: A
|
|
644
818
|
}), [a("span", {
|
|
645
819
|
class: "fp-knob-mark",
|
|
646
|
-
style: f({ rotate: `${
|
|
647
|
-
}, null, 4)], 16,
|
|
820
|
+
style: f({ rotate: `${y.value}deg` })
|
|
821
|
+
}, null, 4)], 16, be), o.label ? (m(), i("span", {
|
|
648
822
|
key: 0,
|
|
649
|
-
id:
|
|
823
|
+
id: x(h),
|
|
650
824
|
class: "fp-silk"
|
|
651
|
-
},
|
|
825
|
+
}, b(o.label), 9, xe)) : r("", !0)], 16));
|
|
652
826
|
}
|
|
653
|
-
}),
|
|
827
|
+
}), Te = /* @__PURE__ */ c({
|
|
654
828
|
__name: "FpLcd",
|
|
655
829
|
props: {
|
|
656
830
|
asChild: { type: Boolean },
|
|
@@ -658,20 +832,20 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
658
832
|
},
|
|
659
833
|
setup(e) {
|
|
660
834
|
let t = e;
|
|
661
|
-
return (e, r) => (
|
|
835
|
+
return (e, r) => (m(), n(x(M), {
|
|
662
836
|
as: t.as,
|
|
663
837
|
"as-child": t.asChild,
|
|
664
838
|
class: "fp-lcd"
|
|
665
839
|
}, {
|
|
666
|
-
default:
|
|
840
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
667
841
|
_: 3
|
|
668
842
|
}, 8, ["as", "as-child"]));
|
|
669
843
|
}
|
|
670
|
-
}),
|
|
844
|
+
}), Ee = {
|
|
671
845
|
key: 0,
|
|
672
846
|
class: "fp-lcd-ghost",
|
|
673
847
|
"aria-hidden": "true"
|
|
674
|
-
},
|
|
848
|
+
}, De = { key: 2 }, Oe = /* @__PURE__ */ c({
|
|
675
849
|
__name: "FpLcdLine",
|
|
676
850
|
props: {
|
|
677
851
|
text: {},
|
|
@@ -683,15 +857,15 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
683
857
|
},
|
|
684
858
|
setup(e) {
|
|
685
859
|
let a = e, o = t(() => "8".repeat(a.cells ?? a.text.length));
|
|
686
|
-
return (e, t) => (
|
|
860
|
+
return (e, t) => (m(), n(x(M), {
|
|
687
861
|
as: a.as,
|
|
688
862
|
"as-child": a.asChild,
|
|
689
863
|
class: "fp-lcd-line"
|
|
690
864
|
}, {
|
|
691
|
-
default:
|
|
865
|
+
default: O(() => [a.ghost ? (m(), i("span", Ee, b(o.value), 1)) : r("", !0), a.redraw ? (m(), i("span", {
|
|
692
866
|
key: a.text,
|
|
693
867
|
class: "fp-lcd-redraw"
|
|
694
|
-
},
|
|
868
|
+
}, b(a.text), 1)) : (m(), i("span", De, b(a.text), 1))]),
|
|
695
869
|
_: 1
|
|
696
870
|
}, 8, ["as", "as-child"]));
|
|
697
871
|
}
|
|
@@ -699,11 +873,11 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
699
873
|
flat: "fp-lens-flat",
|
|
700
874
|
diffused: "fp-lens-diffused",
|
|
701
875
|
clear: "fp-lens-clear"
|
|
702
|
-
},
|
|
876
|
+
}, ke = [
|
|
703
877
|
"role",
|
|
704
878
|
"aria-label",
|
|
705
879
|
"aria-hidden"
|
|
706
|
-
],
|
|
880
|
+
], Ae = /* @__PURE__ */ c({
|
|
707
881
|
__name: "FpLed",
|
|
708
882
|
props: {
|
|
709
883
|
color: { default: "green" },
|
|
@@ -718,10 +892,10 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
718
892
|
amber: "fp-led-amber",
|
|
719
893
|
red: "fp-led-red"
|
|
720
894
|
};
|
|
721
|
-
return (e, r) => (
|
|
895
|
+
return (e, r) => (m(), i("span", {
|
|
722
896
|
class: d(["fp-led", [
|
|
723
897
|
n[t.color],
|
|
724
|
-
t.lens &&
|
|
898
|
+
t.lens && x(X)[t.lens],
|
|
725
899
|
{
|
|
726
900
|
"fp-led-lit": t.lit,
|
|
727
901
|
"fp-blink-twice": t.lit && t.blink
|
|
@@ -730,16 +904,112 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
730
904
|
role: t.label ? "img" : void 0,
|
|
731
905
|
"aria-label": t.label || void 0,
|
|
732
906
|
"aria-hidden": t.label ? void 0 : "true"
|
|
733
|
-
}, null, 10,
|
|
907
|
+
}, null, 10, ke));
|
|
908
|
+
}
|
|
909
|
+
}), je = /* @__PURE__ */ c({
|
|
910
|
+
inheritAttrs: !1,
|
|
911
|
+
__name: "FpMenu",
|
|
912
|
+
props: /*@__PURE__*/ l({
|
|
913
|
+
side: { default: "bottom" },
|
|
914
|
+
align: { default: "start" },
|
|
915
|
+
modal: {
|
|
916
|
+
type: Boolean,
|
|
917
|
+
default: !0
|
|
918
|
+
},
|
|
919
|
+
to: { default: "body" }
|
|
920
|
+
}, {
|
|
921
|
+
open: {
|
|
922
|
+
type: Boolean,
|
|
923
|
+
default: !1
|
|
924
|
+
},
|
|
925
|
+
openModifiers: {}
|
|
926
|
+
}),
|
|
927
|
+
emits: ["update:open"],
|
|
928
|
+
setup(e) {
|
|
929
|
+
let t = e, r = w(e, "open"), i = S(), a = h(), o = h();
|
|
930
|
+
function c() {
|
|
931
|
+
let e = a.value?.$el;
|
|
932
|
+
o.value = e instanceof Element ? e.closest("[data-fp-skin]")?.getAttribute("data-fp-skin") ?? void 0 : void 0;
|
|
933
|
+
}
|
|
934
|
+
return D(r, (e) => {
|
|
935
|
+
e && c();
|
|
936
|
+
}), p(() => {
|
|
937
|
+
r.value && c();
|
|
938
|
+
}), (e, c) => (m(), n(x(ne), {
|
|
939
|
+
open: r.value,
|
|
940
|
+
"onUpdate:open": c[0] ||= (e) => r.value = e,
|
|
941
|
+
modal: t.modal
|
|
942
|
+
}, {
|
|
943
|
+
default: O(() => [s(x(ie), {
|
|
944
|
+
ref_key: "trigger",
|
|
945
|
+
ref: a,
|
|
946
|
+
"as-child": ""
|
|
947
|
+
}, {
|
|
948
|
+
default: O(() => [_(e.$slots, "trigger", { open: r.value })]),
|
|
949
|
+
_: 3
|
|
950
|
+
}, 512), s(x(j), { to: t.to }, {
|
|
951
|
+
default: O(() => [s(x(ee), u(x(i), {
|
|
952
|
+
class: "fp-menu",
|
|
953
|
+
"data-fp-skin": o.value,
|
|
954
|
+
side: t.side,
|
|
955
|
+
align: t.align,
|
|
956
|
+
"side-offset": 4,
|
|
957
|
+
"collision-padding": 8,
|
|
958
|
+
style: { maxHeight: "var(--reka-dropdown-menu-content-available-height)" }
|
|
959
|
+
}), {
|
|
960
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
961
|
+
_: 3
|
|
962
|
+
}, 16, [
|
|
963
|
+
"data-fp-skin",
|
|
964
|
+
"side",
|
|
965
|
+
"align"
|
|
966
|
+
])]),
|
|
967
|
+
_: 3
|
|
968
|
+
}, 8, ["to"])]),
|
|
969
|
+
_: 3
|
|
970
|
+
}, 8, ["open", "modal"]));
|
|
971
|
+
}
|
|
972
|
+
}), Me = /* @__PURE__ */ c({
|
|
973
|
+
__name: "FpMenuItem",
|
|
974
|
+
props: {
|
|
975
|
+
disabled: { type: Boolean },
|
|
976
|
+
textValue: {},
|
|
977
|
+
asChild: { type: Boolean },
|
|
978
|
+
as: { default: "div" }
|
|
979
|
+
},
|
|
980
|
+
emits: ["select"],
|
|
981
|
+
setup(e, { emit: t }) {
|
|
982
|
+
let r = e, i = t;
|
|
983
|
+
return (e, t) => (m(), n(x(te), {
|
|
984
|
+
as: r.as,
|
|
985
|
+
"as-child": r.asChild,
|
|
986
|
+
disabled: r.disabled,
|
|
987
|
+
"text-value": r.textValue,
|
|
988
|
+
class: "fp-menu-item",
|
|
989
|
+
onSelect: t[0] ||= (e) => i("select", e)
|
|
990
|
+
}, {
|
|
991
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
992
|
+
_: 3
|
|
993
|
+
}, 8, [
|
|
994
|
+
"as",
|
|
995
|
+
"as-child",
|
|
996
|
+
"disabled",
|
|
997
|
+
"text-value"
|
|
998
|
+
]));
|
|
734
999
|
}
|
|
735
|
-
}),
|
|
1000
|
+
}), Ne = /* @__PURE__ */ c({
|
|
1001
|
+
__name: "FpMenuSeparator",
|
|
1002
|
+
setup(e) {
|
|
1003
|
+
return (e, t) => (m(), n(x(re), { class: "fp-menu-separator" }));
|
|
1004
|
+
}
|
|
1005
|
+
}), Pe = [
|
|
736
1006
|
"data-orientation",
|
|
737
1007
|
"aria-valuemin",
|
|
738
1008
|
"aria-valuemax",
|
|
739
1009
|
"aria-valuenow",
|
|
740
1010
|
"aria-valuetext",
|
|
741
1011
|
"aria-labelledby"
|
|
742
|
-
],
|
|
1012
|
+
], Fe = ["id"], Ie = /* @__PURE__ */ c({
|
|
743
1013
|
inheritAttrs: !1,
|
|
744
1014
|
__name: "FpMeter",
|
|
745
1015
|
props: {
|
|
@@ -755,44 +1025,107 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
755
1025
|
valueText: {}
|
|
756
1026
|
},
|
|
757
1027
|
setup(e) {
|
|
758
|
-
let n = e, o =
|
|
1028
|
+
let n = e, o = S(), s = t(() => ({
|
|
759
1029
|
class: o.class,
|
|
760
1030
|
style: o.style
|
|
761
1031
|
})), c = t(() => {
|
|
762
1032
|
let { class: e, style: t, ...n } = o;
|
|
763
1033
|
return n;
|
|
764
|
-
}), l =
|
|
1034
|
+
}), l = C(), d = t(() => Math.min(n.max, Math.max(n.min, n.value)));
|
|
765
1035
|
function f(e) {
|
|
766
1036
|
let t = n.max - n.min;
|
|
767
1037
|
return t > 0 ? Math.min(1, Math.max(0, (e - n.min) / t)) : 0;
|
|
768
1038
|
}
|
|
769
|
-
function
|
|
1039
|
+
function p(e, t) {
|
|
770
1040
|
return t(f(e) * n.segments + 1e-9) / n.segments;
|
|
771
1041
|
}
|
|
772
1042
|
let h = t(() => {
|
|
773
1043
|
let e = n.max - n.min;
|
|
774
1044
|
return {
|
|
775
|
-
"--fp-meter-level": String(
|
|
1045
|
+
"--fp-meter-level": String(p(d.value, Math.floor)),
|
|
776
1046
|
"--fp-meter-segments": String(n.segments),
|
|
777
|
-
"--fp-meter-amber": String(
|
|
778
|
-
"--fp-meter-red": String(
|
|
1047
|
+
"--fp-meter-amber": String(p(n.amberAt ?? n.min + e * .7, Math.round)),
|
|
1048
|
+
"--fp-meter-red": String(p(n.redAt ?? n.min + e * .9, Math.round))
|
|
779
1049
|
};
|
|
780
1050
|
});
|
|
781
|
-
return (e, t) => (
|
|
782
|
-
class: ["fp-meter", n.lens &&
|
|
1051
|
+
return (e, t) => (m(), i("div", u({ class: "fp-unit" }, s.value), [a("div", u(c.value, {
|
|
1052
|
+
class: ["fp-meter", n.lens && x(X)[n.lens]],
|
|
783
1053
|
role: "meter",
|
|
784
1054
|
"data-orientation": n.orientation,
|
|
785
1055
|
"aria-valuemin": n.min,
|
|
786
1056
|
"aria-valuemax": n.max,
|
|
787
1057
|
"aria-valuenow": d.value,
|
|
788
1058
|
"aria-valuetext": n.valueText?.(d.value),
|
|
789
|
-
"aria-labelledby": n.label ?
|
|
1059
|
+
"aria-labelledby": n.label ? x(l) : void 0,
|
|
790
1060
|
style: h.value
|
|
791
|
-
}), null, 16,
|
|
1061
|
+
}), null, 16, Pe), n.label ? (m(), i("span", {
|
|
792
1062
|
key: 0,
|
|
793
|
-
id:
|
|
1063
|
+
id: x(l),
|
|
794
1064
|
class: "fp-silk"
|
|
795
|
-
},
|
|
1065
|
+
}, b(n.label), 9, Fe)) : r("", !0)], 16));
|
|
1066
|
+
}
|
|
1067
|
+
}), Le = ["id"], Re = /* @__PURE__ */ c({
|
|
1068
|
+
inheritAttrs: !1,
|
|
1069
|
+
__name: "FpRadioGroup",
|
|
1070
|
+
props: /*@__PURE__*/ l({
|
|
1071
|
+
options: {},
|
|
1072
|
+
label: {},
|
|
1073
|
+
orientation: { default: "horizontal" },
|
|
1074
|
+
led: { default: "strip" },
|
|
1075
|
+
color: { default: "green" },
|
|
1076
|
+
disabled: { type: Boolean }
|
|
1077
|
+
}, {
|
|
1078
|
+
modelValue: {},
|
|
1079
|
+
modelModifiers: {}
|
|
1080
|
+
}),
|
|
1081
|
+
emits: ["update:modelValue"],
|
|
1082
|
+
setup(n) {
|
|
1083
|
+
let c = n, l = w(n, "modelValue"), f = C(), p = `${f}-label`, h = (e) => `${f}-key-${e}`, _ = (e) => I[e.color ?? c.color], v = S(), y = t(() => ({
|
|
1084
|
+
class: v.class,
|
|
1085
|
+
style: v.style
|
|
1086
|
+
})), T = t(() => {
|
|
1087
|
+
let { class: e, style: t, ...n } = v;
|
|
1088
|
+
return n;
|
|
1089
|
+
});
|
|
1090
|
+
return (t, n) => (m(), i("div", u({ class: "fp-unit" }, y.value), [s(x(oe), u(T.value, {
|
|
1091
|
+
modelValue: l.value,
|
|
1092
|
+
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
1093
|
+
class: "fp-keys",
|
|
1094
|
+
orientation: c.orientation,
|
|
1095
|
+
disabled: c.disabled,
|
|
1096
|
+
"aria-labelledby": c.label ? p : void 0
|
|
1097
|
+
}), {
|
|
1098
|
+
default: O(() => [(m(!0), i(e, null, g(c.options, (t, n) => (m(), i(e, { key: t.value }, [a("span", {
|
|
1099
|
+
id: h(n),
|
|
1100
|
+
class: "fp-silk"
|
|
1101
|
+
}, [c.led === "above" ? (m(), i("span", {
|
|
1102
|
+
key: 0,
|
|
1103
|
+
class: d(["fp-led", [_(t), { "fp-led-lit": l.value === t.value }]]),
|
|
1104
|
+
"aria-hidden": "true"
|
|
1105
|
+
}, null, 2)) : r("", !0), o(b(t.label), 1)], 8, Le), s(x(ae), {
|
|
1106
|
+
value: t.value,
|
|
1107
|
+
disabled: t.disabled,
|
|
1108
|
+
class: d(["fp-key", c.led === "strip" ? _(t) : void 0]),
|
|
1109
|
+
"data-strip": c.led === "strip" ? void 0 : "plain",
|
|
1110
|
+
"aria-labelledby": h(n)
|
|
1111
|
+
}, null, 8, [
|
|
1112
|
+
"value",
|
|
1113
|
+
"disabled",
|
|
1114
|
+
"class",
|
|
1115
|
+
"data-strip",
|
|
1116
|
+
"aria-labelledby"
|
|
1117
|
+
])], 64))), 128))]),
|
|
1118
|
+
_: 1
|
|
1119
|
+
}, 16, [
|
|
1120
|
+
"modelValue",
|
|
1121
|
+
"orientation",
|
|
1122
|
+
"disabled",
|
|
1123
|
+
"aria-labelledby"
|
|
1124
|
+
]), c.label ? (m(), i("span", {
|
|
1125
|
+
key: 0,
|
|
1126
|
+
id: p,
|
|
1127
|
+
class: "fp-silk"
|
|
1128
|
+
}, b(c.label), 1)) : r("", !0)], 16));
|
|
796
1129
|
}
|
|
797
1130
|
}), Z = {
|
|
798
1131
|
0: "abcdef",
|
|
@@ -838,10 +1171,10 @@ function Q(e) {
|
|
|
838
1171
|
}
|
|
839
1172
|
//#endregion
|
|
840
1173
|
//#region src/FpReadout.vue?vue&type=script&setup=true&lang.ts
|
|
841
|
-
var
|
|
1174
|
+
var ze = { class: "fp-readout-text" }, Be = ["data-colon"], Ve = { class: "fp-readout-lit" }, He = ["data-segment"], Ue = {
|
|
842
1175
|
key: 0,
|
|
843
1176
|
"data-segment": "dp"
|
|
844
|
-
},
|
|
1177
|
+
}, We = /* @__PURE__ */ c({
|
|
845
1178
|
__name: "FpReadout",
|
|
846
1179
|
props: {
|
|
847
1180
|
value: {},
|
|
@@ -876,25 +1209,25 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
876
1209
|
dot: !1
|
|
877
1210
|
})), ...e];
|
|
878
1211
|
});
|
|
879
|
-
return (t, n) => (
|
|
1212
|
+
return (t, n) => (m(), i("span", { class: d(["fp-readout", [s[o.color], o.lens && x(X)[o.lens]]]) }, [a("span", ze, b(o.valueText ? o.valueText(c.value) : c.value), 1), (m(!0), i(e, null, g(l.value, (t, o) => (m(), i("span", {
|
|
880
1213
|
key: o,
|
|
881
1214
|
class: "fp-readout-cell",
|
|
882
1215
|
"data-colon": t.colon ? "" : void 0,
|
|
883
1216
|
"aria-hidden": "true"
|
|
884
|
-
}, [a("span",
|
|
1217
|
+
}, [a("span", Ve, [t.colon ? (m(), i(e, { key: 0 }, [n[0] ||= a("span", { "data-segment": "colon-upper" }, null, -1), n[1] ||= a("span", { "data-segment": "colon-lower" }, null, -1)], 64)) : (m(), i(e, { key: 1 }, [(m(!0), i(e, null, g(t.lit, (e) => (m(), i("span", {
|
|
885
1218
|
key: e,
|
|
886
1219
|
"data-segment": e
|
|
887
|
-
}, null, 8,
|
|
1220
|
+
}, null, 8, He))), 128)), t.dot ? (m(), i("span", Ue)) : r("", !0)], 64))])], 8, Be))), 128))], 2));
|
|
888
1221
|
}
|
|
889
1222
|
}), $ = {
|
|
890
1223
|
class: "fp-screw",
|
|
891
1224
|
"aria-hidden": "true"
|
|
892
|
-
},
|
|
1225
|
+
}, Ge = /* @__PURE__ */ c({
|
|
893
1226
|
__name: "FpScrew",
|
|
894
1227
|
setup(e) {
|
|
895
|
-
return (e, t) => (
|
|
1228
|
+
return (e, t) => (m(), i("span", $));
|
|
896
1229
|
}
|
|
897
|
-
}),
|
|
1230
|
+
}), Ke = /* @__PURE__ */ c({
|
|
898
1231
|
__name: "FpSilk",
|
|
899
1232
|
props: {
|
|
900
1233
|
asChild: { type: Boolean },
|
|
@@ -902,16 +1235,16 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
902
1235
|
},
|
|
903
1236
|
setup(e) {
|
|
904
1237
|
let t = e;
|
|
905
|
-
return (e, r) => (
|
|
1238
|
+
return (e, r) => (m(), n(x(M), {
|
|
906
1239
|
as: t.as,
|
|
907
1240
|
"as-child": t.asChild,
|
|
908
1241
|
class: "fp-silk"
|
|
909
1242
|
}, {
|
|
910
|
-
default:
|
|
1243
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
911
1244
|
_: 3
|
|
912
1245
|
}, 8, ["as", "as-child"]));
|
|
913
1246
|
}
|
|
914
|
-
}),
|
|
1247
|
+
}), qe = ["id"], Je = /* @__PURE__ */ c({
|
|
915
1248
|
inheritAttrs: !1,
|
|
916
1249
|
__name: "FpSlider",
|
|
917
1250
|
props: /*@__PURE__*/ l({
|
|
@@ -928,31 +1261,31 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
928
1261
|
}),
|
|
929
1262
|
emits: /*@__PURE__*/ l(["valueCommit"], ["update:modelValue"]),
|
|
930
1263
|
setup(e, { emit: n }) {
|
|
931
|
-
let a = e, o = n, c =
|
|
1264
|
+
let a = e, o = n, c = w(e, "modelValue"), l = S(), d = t(() => ({
|
|
932
1265
|
class: l.class,
|
|
933
1266
|
style: l.style
|
|
934
1267
|
})), f = t(() => {
|
|
935
1268
|
let { class: e, style: t, ...n } = l;
|
|
936
1269
|
return n;
|
|
937
|
-
}),
|
|
1270
|
+
}), p = C(), h = t(() => [c.value]);
|
|
938
1271
|
function g(e) {
|
|
939
1272
|
e?.[0] !== void 0 && (c.value = e[0]);
|
|
940
1273
|
}
|
|
941
|
-
let _ =
|
|
942
|
-
function
|
|
1274
|
+
let _ = T("unit");
|
|
1275
|
+
function v(e) {
|
|
943
1276
|
a.disabled || e.button !== 0 || _.value?.querySelector("[role=\"slider\"]")?.focus({
|
|
944
1277
|
preventScroll: !0,
|
|
945
1278
|
focusVisible: !1
|
|
946
1279
|
});
|
|
947
1280
|
}
|
|
948
|
-
function
|
|
1281
|
+
function y(e) {
|
|
949
1282
|
e[0] !== void 0 && o("valueCommit", e[0]);
|
|
950
1283
|
}
|
|
951
|
-
return (e, t) => (
|
|
1284
|
+
return (e, t) => (m(), i("div", u({
|
|
952
1285
|
ref_key: "unit",
|
|
953
1286
|
ref: _,
|
|
954
1287
|
class: "fp-unit"
|
|
955
|
-
}, d.value, { onPointerdownCapture:
|
|
1288
|
+
}, d.value, { onPointerdownCapture: v }), [s(x(se), {
|
|
956
1289
|
class: "fp-fader",
|
|
957
1290
|
"model-value": h.value,
|
|
958
1291
|
min: a.min,
|
|
@@ -961,12 +1294,12 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
961
1294
|
orientation: a.orientation,
|
|
962
1295
|
disabled: a.disabled,
|
|
963
1296
|
"onUpdate:modelValue": g,
|
|
964
|
-
onValueCommit:
|
|
1297
|
+
onValueCommit: y
|
|
965
1298
|
}, {
|
|
966
|
-
default:
|
|
1299
|
+
default: O(() => [s(x(le), { class: "fp-fader-slot" }), s(x(ce), u(f.value, {
|
|
967
1300
|
class: "fp-fader-cap",
|
|
968
1301
|
"aria-valuetext": a.valueText?.(c.value),
|
|
969
|
-
"aria-labelledby": a.label ?
|
|
1302
|
+
"aria-labelledby": a.label ? x(p) : void 0,
|
|
970
1303
|
"aria-disabled": a.disabled || void 0
|
|
971
1304
|
}), null, 16, [
|
|
972
1305
|
"aria-valuetext",
|
|
@@ -981,13 +1314,13 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
981
1314
|
"step",
|
|
982
1315
|
"orientation",
|
|
983
1316
|
"disabled"
|
|
984
|
-
]), a.label ? (
|
|
1317
|
+
]), a.label ? (m(), i("span", {
|
|
985
1318
|
key: 0,
|
|
986
|
-
id:
|
|
1319
|
+
id: x(p),
|
|
987
1320
|
class: "fp-silk"
|
|
988
|
-
},
|
|
1321
|
+
}, b(a.label), 9, qe)) : r("", !0)], 16));
|
|
989
1322
|
}
|
|
990
|
-
}),
|
|
1323
|
+
}), Ye = ["data-label-placement"], Xe = ["id"], Ze = /* @__PURE__ */ c({
|
|
991
1324
|
inheritAttrs: !1,
|
|
992
1325
|
__name: "FpSwitch",
|
|
993
1326
|
props: /*@__PURE__*/ l({
|
|
@@ -1009,26 +1342,26 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1009
1342
|
green: "fp-led-green",
|
|
1010
1343
|
amber: "fp-led-amber",
|
|
1011
1344
|
red: "fp-led-red"
|
|
1012
|
-
}, c =
|
|
1345
|
+
}, c = w(e, "modelValue"), l = C(), d = S(), f = t(() => ({
|
|
1013
1346
|
class: d.class,
|
|
1014
1347
|
style: d.style
|
|
1015
|
-
})),
|
|
1348
|
+
})), p = t(() => {
|
|
1016
1349
|
let { class: e, style: t, ...n } = d;
|
|
1017
1350
|
return n;
|
|
1018
1351
|
});
|
|
1019
|
-
return (e, t) => (
|
|
1352
|
+
return (e, t) => (m(), i("div", u({
|
|
1020
1353
|
class: "fp-unit",
|
|
1021
1354
|
"data-label-placement": n.labelPlacement
|
|
1022
|
-
}, f.value), [s(
|
|
1355
|
+
}, f.value), [s(x(ue), u(p.value, {
|
|
1023
1356
|
modelValue: c.value,
|
|
1024
1357
|
"onUpdate:modelValue": t[0] ||= (e) => c.value = e,
|
|
1025
1358
|
class: ["fp-switch", o[n.color]],
|
|
1026
1359
|
"data-orientation": n.orientation,
|
|
1027
1360
|
disabled: n.disabled,
|
|
1028
|
-
"aria-labelledby": n.label ?
|
|
1361
|
+
"aria-labelledby": n.label ? x(l) : void 0
|
|
1029
1362
|
}), {
|
|
1030
|
-
default:
|
|
1031
|
-
default:
|
|
1363
|
+
default: O(() => [s(x(de), { class: "fp-switch-rocker" }, {
|
|
1364
|
+
default: O(() => [...t[1] ||= [a("span", { class: "fp-switch-lamp" }, null, -1), a("span", { class: "fp-switch-face" }, null, -1)]]),
|
|
1032
1365
|
_: 1
|
|
1033
1366
|
})]),
|
|
1034
1367
|
_: 1
|
|
@@ -1038,13 +1371,13 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1038
1371
|
"data-orientation",
|
|
1039
1372
|
"disabled",
|
|
1040
1373
|
"aria-labelledby"
|
|
1041
|
-
]), n.label ? (
|
|
1374
|
+
]), n.label ? (m(), i("span", {
|
|
1042
1375
|
key: 0,
|
|
1043
|
-
id:
|
|
1376
|
+
id: x(l),
|
|
1044
1377
|
class: "fp-silk"
|
|
1045
|
-
},
|
|
1378
|
+
}, b(n.label), 9, Xe)) : r("", !0)], 16, Ye));
|
|
1046
1379
|
}
|
|
1047
|
-
}),
|
|
1380
|
+
}), Qe = /* @__PURE__ */ c({
|
|
1048
1381
|
__name: "FpWell",
|
|
1049
1382
|
props: {
|
|
1050
1383
|
asChild: { type: Boolean },
|
|
@@ -1052,16 +1385,16 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1052
1385
|
},
|
|
1053
1386
|
setup(e) {
|
|
1054
1387
|
let t = e;
|
|
1055
|
-
return (e, r) => (
|
|
1388
|
+
return (e, r) => (m(), n(x(M), {
|
|
1056
1389
|
as: t.as,
|
|
1057
1390
|
"as-child": t.asChild,
|
|
1058
1391
|
class: "fp-well"
|
|
1059
1392
|
}, {
|
|
1060
|
-
default:
|
|
1393
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
1061
1394
|
_: 3
|
|
1062
1395
|
}, 8, ["as", "as-child"]));
|
|
1063
1396
|
}
|
|
1064
|
-
}),
|
|
1397
|
+
}), $e = { class: "fp-module-title" }, et = /* @__PURE__ */ c({
|
|
1065
1398
|
__name: "FpWindow",
|
|
1066
1399
|
props: {
|
|
1067
1400
|
as: { default: "section" },
|
|
@@ -1074,30 +1407,30 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1074
1407
|
},
|
|
1075
1408
|
emits: ["close"],
|
|
1076
1409
|
setup(e, { emit: t }) {
|
|
1077
|
-
let i = e, c = t, l =
|
|
1078
|
-
return (e, t) => (
|
|
1410
|
+
let i = e, c = t, l = C();
|
|
1411
|
+
return (e, t) => (m(), n(x(M), {
|
|
1079
1412
|
as: i.as,
|
|
1080
1413
|
class: d(["fp-window", [i.sheet ? "fp-sheet-panel" : "fp-module"]]),
|
|
1081
|
-
"aria-labelledby":
|
|
1414
|
+
"aria-labelledby": x(l)
|
|
1082
1415
|
}, {
|
|
1083
|
-
default:
|
|
1084
|
-
(
|
|
1085
|
-
id:
|
|
1416
|
+
default: O(() => [a("div", $e, [
|
|
1417
|
+
(m(), n(v(`h${i.level}`), {
|
|
1418
|
+
id: x(l),
|
|
1086
1419
|
class: "fp-silk fp-window-title"
|
|
1087
1420
|
}, {
|
|
1088
|
-
default:
|
|
1421
|
+
default: O(() => [o(b(i.title), 1)]),
|
|
1089
1422
|
_: 1
|
|
1090
1423
|
}, 8, ["id"])),
|
|
1091
|
-
|
|
1092
|
-
i.closable ? (
|
|
1424
|
+
_(e.$slots, "actions"),
|
|
1425
|
+
i.closable ? (m(), n(N, {
|
|
1093
1426
|
key: 0,
|
|
1094
1427
|
"aria-label": i.closeLabel ?? `Close ${i.title}`,
|
|
1095
1428
|
onClick: t[0] ||= (e) => c("close")
|
|
1096
1429
|
}, {
|
|
1097
|
-
default:
|
|
1430
|
+
default: O(() => [s(J, { name: "close" })]),
|
|
1098
1431
|
_: 1
|
|
1099
1432
|
}, 8, ["aria-label"])) : r("", !0)
|
|
1100
|
-
]), a("div", { class: d(i.flush ? void 0 : "fp-window-body") }, [
|
|
1433
|
+
]), a("div", { class: d(i.flush ? void 0 : "fp-window-body") }, [_(e.$slots, "default")], 2)]),
|
|
1101
1434
|
_: 3
|
|
1102
1435
|
}, 8, [
|
|
1103
1436
|
"as",
|
|
@@ -1107,4 +1440,4 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1107
1440
|
}
|
|
1108
1441
|
});
|
|
1109
1442
|
//#endregion
|
|
1110
|
-
export {
|
|
1443
|
+
export { N as FpButton, P as FpButtonGroup, F as FpCap, z as FpCheckbox, V as FpCheckboxGroup, pe as FpDevice, me as FpGelButton, he as FpHousing, J as FpIcon, we as FpKnob, Te as FpLcd, Oe as FpLcdLine, Ae as FpLed, je as FpMenu, Me as FpMenuItem, Ne as FpMenuSeparator, Ie as FpMeter, Re as FpRadioGroup, We as FpReadout, Ge as FpScrew, Ke as FpSilk, Je as FpSlider, Ze as FpSwitch, Qe as FpWell, et as FpWindow, q as fpIconNames, Q as fpReadoutGlyph };
|