@quidgest/ui 0.32.0 → 0.32.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.
- package/CHANGELOG.md +24 -0
- package/dist/json/api.json +198 -28
- package/dist/ui.css +291 -108
- package/dist/ui.esm.js +989 -966
- package/dist/ui.min.css +1 -1
- package/dist/ui.scss +433 -105
- package/lib/components/QAlert/QAlert.d.ts.map +1 -1
- package/lib/components/QAlert/QAlert.vue.js +13 -3
- package/lib/components/QAlert/types.d.ts +12 -0
- package/lib/components/QAlert/types.d.ts.map +1 -1
- package/lib/components/QBadge/QBadge.d.ts.map +1 -1
- package/lib/components/QBadge/QBadge.vue.js +20 -12
- package/lib/components/QBadge/types.d.ts +11 -0
- package/lib/components/QBadge/types.d.ts.map +1 -1
- package/lib/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/lib/components/QDateTimePicker/QDateTimePicker.vue.js +596 -574
- package/lib/components/QDefaultsProvider/QDefaultsProvider.vue.js +4 -2
- package/lib/components/QDefaultsProvider/types.d.ts +10 -0
- package/lib/components/QDefaultsProvider/types.d.ts.map +1 -1
- package/lib/components/QDrawer/QDrawer.d.ts.map +1 -1
- package/lib/components/QDrawer/QDrawer.vue.js +204 -201
- package/lib/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/lib/components/QDropdownMenu/QDropdownMenuContent.vue.js +95 -83
- package/lib/components/QField/types.d.ts +4 -4
- package/lib/components/QGauge/QGauge.d.ts.map +1 -1
- package/lib/components/QGauge/QGauge.vue.js +149 -121
- package/lib/components/QGauge/types.d.ts +16 -1
- package/lib/components/QGauge/types.d.ts.map +1 -1
- package/lib/components/QInputGroup/QInputGroup.d.ts +8 -7
- package/lib/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/lib/components/QInputGroup/QInputGroup.vue.js +82 -43
- package/lib/components/QLabel/QLabel.d.ts.map +1 -1
- package/lib/components/QLabel/QLabel.vue.js +1 -0
- package/lib/components/QList/QListItem.d.ts.map +1 -1
- package/lib/components/QList/QListItem.vue.js +39 -32
- package/lib/components/QMeter/types.d.ts +3 -0
- package/lib/components/QMeter/types.d.ts.map +1 -1
- package/lib/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/lib/components/QOverlay/QOverlay.vue.js +88 -85
- package/lib/components/QPhoneField/QPhoneField.d.ts +6 -0
- package/lib/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/lib/components/QPhoneField/QPhoneField.vue.js +1 -1
- package/lib/components/QPhoneField/index.d.ts +3 -0
- package/lib/components/QPhoneField/index.d.ts.map +1 -1
- package/lib/components/QProgress/QProgress.d.ts.map +1 -1
- package/lib/components/QProgress/QProgress.vue.js +66 -47
- package/lib/components/QProgress/types.d.ts +3 -0
- package/lib/components/QProgress/types.d.ts.map +1 -1
- package/lib/components/QRadioGroup/QRadioGroup.d.ts +1 -1
- package/lib/components/QRadioGroup/index.d.ts +3 -3
- package/lib/components/QSelect/QSelect.d.ts +6 -0
- package/lib/components/QSelect/QSelect.d.ts.map +1 -1
- package/lib/components/QSelect/index.d.ts +3 -0
- package/lib/components/QSelect/index.d.ts.map +1 -1
- package/lib/components/QToast/QToaster.d.ts.map +1 -1
- package/lib/components/QToast/QToaster.vue.js +61 -58
- package/lib/composables/defaults.d.ts +25 -1
- package/lib/composables/defaults.d.ts.map +1 -1
- package/lib/composables/defaults.js +15 -7
- package/lib/composables/useColor/index.d.ts +2 -0
- package/lib/composables/useColor/index.d.ts.map +1 -1
- package/lib/composables/useColor/index.js +25 -19
- package/lib/composables/useColor/types.d.ts +12 -0
- package/lib/composables/useColor/types.d.ts.map +1 -1
- package/lib/utils/bidi.d.ts +27 -0
- package/lib/utils/bidi.d.ts.map +1 -0
- package/lib/utils/bidi.js +15 -0
- package/package.json +1 -1
|
@@ -2,32 +2,37 @@ import { useId as e } from "../../composables/useId/index.js";
|
|
|
2
2
|
import { useTheme as t } from "../../composables/theme.js";
|
|
3
3
|
import { resolveColor as n } from "../../composables/useColor/index.js";
|
|
4
4
|
import { DEFAULT_TEXTS as r } from "./constants.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { firstStrongDirection as i } from "../../utils/bidi.js";
|
|
6
|
+
import { clamp as a } from "../../utils/boundedValue.js";
|
|
7
|
+
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, defineComponent as f, mergeModels as p, normalizeClass as m, normalizeStyle as ee, openBlock as h, renderList as g, renderSlot as te, toDisplayString as _, toRef as ne, unref as re, useModel as ie } from "vue";
|
|
7
8
|
//#region src/components/QGauge/QGauge.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
9
|
+
var ae = [
|
|
9
10
|
"id",
|
|
10
11
|
"aria-labelledby",
|
|
11
12
|
"aria-valuemin",
|
|
12
13
|
"aria-valuemax",
|
|
13
14
|
"aria-valuenow",
|
|
14
15
|
"aria-valuetext"
|
|
15
|
-
],
|
|
16
|
+
], oe = ["id"], se = { class: "q-gauge__visual" }, ce = {
|
|
16
17
|
class: "q-gauge__svg",
|
|
17
18
|
viewBox: "0 0 240 158",
|
|
18
19
|
"aria-hidden": "true",
|
|
19
20
|
focusable: "false"
|
|
20
|
-
},
|
|
21
|
+
}, le = ["d"], ue = ["d"], de = [
|
|
21
22
|
"d",
|
|
22
23
|
"stroke",
|
|
23
24
|
"data-range-from",
|
|
24
25
|
"data-range-to"
|
|
25
|
-
],
|
|
26
|
+
], fe = ["data-value"], v = [
|
|
26
27
|
"x1",
|
|
27
28
|
"y1",
|
|
28
29
|
"x2",
|
|
29
30
|
"y2"
|
|
30
|
-
], pe = [
|
|
31
|
+
], pe = [
|
|
32
|
+
"direction",
|
|
33
|
+
"x",
|
|
34
|
+
"y"
|
|
35
|
+
], me = ["data-target", "data-target-state"], he = [
|
|
31
36
|
"x1",
|
|
32
37
|
"y1",
|
|
33
38
|
"x2",
|
|
@@ -37,18 +42,25 @@ var ie = [
|
|
|
37
42
|
"y1",
|
|
38
43
|
"x2",
|
|
39
44
|
"y2"
|
|
40
|
-
], _e = [
|
|
45
|
+
], _e = [
|
|
46
|
+
"direction",
|
|
47
|
+
"x",
|
|
48
|
+
"y"
|
|
49
|
+
], ve = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "q-gauge__number"
|
|
52
|
+
}, ye = ["direction"], y = ["transform"], be = { class: "q-gauge__value-row" }, xe = { class: "q-gauge__value" }, Se = {
|
|
41
53
|
key: 0,
|
|
42
54
|
class: "q-gauge__unit"
|
|
43
|
-
},
|
|
55
|
+
}, Ce = {
|
|
44
56
|
key: 1,
|
|
45
57
|
class: "q-gauge__secondary"
|
|
46
|
-
},
|
|
58
|
+
}, we = {
|
|
47
59
|
key: 2,
|
|
48
60
|
class: "q-gauge__legend"
|
|
49
|
-
},
|
|
61
|
+
}, Te = { class: "q-gauge__legend-label" }, Ee = { class: "q-gauge__legend-label" }, b = 120, x = 126, S = 86, C = 73, w = 97, T = 59, E = 68, D = 104, De = 116, Oe = 70, O = 180, k = 360, A = /*@__PURE__*/ f({
|
|
50
62
|
__name: "QGauge",
|
|
51
|
-
props: /*@__PURE__*/
|
|
63
|
+
props: /*@__PURE__*/ p({
|
|
52
64
|
id: {},
|
|
53
65
|
class: {},
|
|
54
66
|
min: { default: 0 },
|
|
@@ -80,73 +92,82 @@ var ie = [
|
|
|
80
92
|
}),
|
|
81
93
|
emits: ["update:modelValue"],
|
|
82
94
|
setup(r) {
|
|
83
|
-
let
|
|
84
|
-
if (I.value
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
let f = r, p = ie(r, "modelValue"), A = k - O, j = e(ne(f, "id")), ke = t(), M = s(() => Number.isFinite(f.min) ? f.min : 0), N = s(() => Number.isFinite(f.max) && f.max > M.value ? f.max : M.value + 1), P = s(() => Number.isFinite(p.value) ? p.value : M.value), F = s(() => a(P.value, M.value, N.value)), I = s(() => typeof f.target == "number" && Number.isFinite(f.target) ? f.target : void 0), L = s(() => `${j.value}-label`), R = s(() => !!f.label), Ae = s(() => !!f.unit), je = s(() => !!f.secondaryLabel), z = s(() => typeof f.valueLabel == "string" ? f.valueLabel : f.valueLabel ? f.valueLabel(P.value, M.value, N.value) : String(P.value)), B = s(() => {
|
|
96
|
+
if (I.value !== void 0) return typeof f.targetLabel == "string" ? f.targetLabel : f.targetLabel ? f.targetLabel(I.value, M.value, N.value) : `${V.value}${Ne.value}`;
|
|
97
|
+
}), Me = s(() => f.targetLabel === void 0 ? void 0 : i(B.value ?? "")), V = s(() => I.value === void 0 ? "" : Q(I.value)), Ne = s(() => f.unit ? ` ${f.unit}` : ""), Pe = s(() => {
|
|
98
|
+
let e = [{
|
|
99
|
+
text: V.value,
|
|
100
|
+
kind: "number"
|
|
101
|
+
}];
|
|
102
|
+
return f.unit && e.push({
|
|
103
|
+
text: " ",
|
|
104
|
+
kind: "space"
|
|
105
|
+
}, {
|
|
106
|
+
text: f.unit,
|
|
107
|
+
kind: "unit"
|
|
108
|
+
}), e;
|
|
109
|
+
}), Fe = s(() => i(f.unit ?? "")), Ie = s(() => {
|
|
90
110
|
let e = B.value;
|
|
91
|
-
return e === void 0 ||
|
|
92
|
-
}),
|
|
93
|
-
if (I.value !== void 0) return
|
|
94
|
-
}),
|
|
95
|
-
if (
|
|
96
|
-
}),
|
|
97
|
-
if (
|
|
98
|
-
}),
|
|
111
|
+
return e === void 0 || f.targetLabel !== void 0 ? e : `${f.texts.target} ${e}`;
|
|
112
|
+
}), H = s(() => {
|
|
113
|
+
if (I.value !== void 0) return f.targetComparison === "at-most" ? P.value <= I.value : P.value >= I.value;
|
|
114
|
+
}), U = s(() => {
|
|
115
|
+
if (H.value !== void 0) return H.value ? "achieved" : "missed";
|
|
116
|
+
}), Le = s(() => {
|
|
117
|
+
if (U.value) return U.value === "achieved" ? f.texts.targetAchieved : f.texts.targetNotAchieved;
|
|
118
|
+
}), W = s(() => (f.ranges ?? []).flatMap((e) => {
|
|
99
119
|
if (!Number.isFinite(e.from) || !Number.isFinite(e.to) || e.to <= e.from) return [];
|
|
100
120
|
let t = Math.max(M.value, e.from), r = Math.min(N.value, e.to);
|
|
101
121
|
return r <= t ? [] : [{
|
|
102
122
|
from: t,
|
|
103
123
|
to: r,
|
|
104
|
-
color: n(e.color,
|
|
124
|
+
color: n(e.color, ke.current.value.scheme),
|
|
105
125
|
label: e.label,
|
|
106
|
-
path: Z(Y(t), Y(r),
|
|
126
|
+
path: Z(Y(t), Y(r), S)
|
|
107
127
|
}];
|
|
108
|
-
})),
|
|
128
|
+
})), G = s(() => W.value.flatMap((e) => e.label ? [{
|
|
109
129
|
from: e.from,
|
|
110
130
|
to: e.to,
|
|
111
131
|
color: e.color,
|
|
112
132
|
label: e.label
|
|
113
|
-
}] : [])),
|
|
133
|
+
}] : [])), K = s(() => f.showTargetLegend && q.value ? [{
|
|
114
134
|
state: "achieved",
|
|
115
|
-
label:
|
|
135
|
+
label: f.texts.targetAchieved
|
|
116
136
|
}, {
|
|
117
137
|
state: "missed",
|
|
118
|
-
label:
|
|
119
|
-
}] : []),
|
|
120
|
-
if (
|
|
121
|
-
let e = Math.max(2, Math.floor(Number.isFinite(
|
|
138
|
+
label: f.texts.targetNotAchieved
|
|
139
|
+
}] : []), Re = s(() => f.showLegend && (G.value.length > 0 || K.value.length > 0)), ze = s(() => {
|
|
140
|
+
if (f.ticks) return [...new Set(f.ticks)].filter((e) => Number.isFinite(e) && e >= M.value && e <= N.value).sort((e, t) => e - t);
|
|
141
|
+
let e = Math.max(2, Math.floor(Number.isFinite(f.tickCount) ? f.tickCount : 5)), t = (N.value - M.value) / (e - 1);
|
|
122
142
|
return Array.from({ length: e }, (e, n) => M.value + t * n);
|
|
123
|
-
}),
|
|
124
|
-
let t = Y(e);
|
|
143
|
+
}), Be = s(() => ze.value.map((e) => {
|
|
144
|
+
let t = Y(e), n = f.tickFormatter ? f.tickFormatter(e) : Q(e);
|
|
125
145
|
return {
|
|
126
146
|
value: e,
|
|
127
|
-
inner: X(t,
|
|
128
|
-
outer: X(t,
|
|
129
|
-
label:
|
|
130
|
-
text:
|
|
147
|
+
inner: X(t, C),
|
|
148
|
+
outer: X(t, w),
|
|
149
|
+
label: Ke(t),
|
|
150
|
+
text: n,
|
|
151
|
+
direction: f.tickFormatter ? i(n) : void 0
|
|
131
152
|
};
|
|
132
|
-
})),
|
|
153
|
+
})), q = s(() => {
|
|
133
154
|
if (I.value === void 0 || I.value < M.value || I.value > N.value) return;
|
|
134
155
|
let e = Y(I.value);
|
|
135
156
|
return {
|
|
136
157
|
value: I.value,
|
|
137
|
-
inner: X(e,
|
|
138
|
-
outer: X(e,
|
|
139
|
-
label:
|
|
158
|
+
inner: X(e, E),
|
|
159
|
+
outer: X(e, D),
|
|
160
|
+
label: qe(e)
|
|
140
161
|
};
|
|
141
|
-
}),
|
|
162
|
+
}), J = s(() => Z(O, k, S)), Ve = s(() => Y(F.value)), He = s(() => `rotate(${Q(Ve.value - 270)} ${b} ${x})`), Ue = s(() => {
|
|
142
163
|
let e;
|
|
143
|
-
for (let t of
|
|
164
|
+
for (let t of W.value) F.value >= t.from && F.value <= t.to && (e = t.label);
|
|
144
165
|
return e;
|
|
145
|
-
}),
|
|
166
|
+
}), We = s(() => f.valueLabel === void 0 ? [z.value, f.unit].filter(Boolean).join(" ") : z.value), Ge = s(() => [
|
|
167
|
+
We.value,
|
|
168
|
+
Ue.value,
|
|
146
169
|
Ie.value,
|
|
147
|
-
|
|
148
|
-
ke.value,
|
|
149
|
-
Ae.value
|
|
170
|
+
Le.value
|
|
150
171
|
].filter(Boolean).join(" "));
|
|
151
172
|
function Y(e) {
|
|
152
173
|
return O + (e - M.value) / (N.value - M.value) * A;
|
|
@@ -154,19 +175,19 @@ var ie = [
|
|
|
154
175
|
function X(e, t) {
|
|
155
176
|
let n = e * Math.PI / 180;
|
|
156
177
|
return {
|
|
157
|
-
x: $(
|
|
158
|
-
y: $(
|
|
178
|
+
x: $(b + t * Math.cos(n)),
|
|
179
|
+
y: $(x + t * Math.sin(n))
|
|
159
180
|
};
|
|
160
181
|
}
|
|
161
|
-
function
|
|
162
|
-
let t = X(e,
|
|
182
|
+
function Ke(e) {
|
|
183
|
+
let t = X(e, T);
|
|
163
184
|
return e === O || e === k ? {
|
|
164
185
|
x: t.x,
|
|
165
186
|
y: $(t.y + 14)
|
|
166
187
|
} : t;
|
|
167
188
|
}
|
|
168
|
-
function
|
|
169
|
-
let t = X(e,
|
|
189
|
+
function qe(e) {
|
|
190
|
+
let t = X(e, De);
|
|
170
191
|
return e === O ? {
|
|
171
192
|
x: $(t.x + 16),
|
|
172
193
|
y: t.y
|
|
@@ -185,121 +206,128 @@ var ie = [
|
|
|
185
206
|
function $(e) {
|
|
186
207
|
return Number(e.toFixed(3));
|
|
187
208
|
}
|
|
188
|
-
return (e, t) => (
|
|
189
|
-
id:
|
|
190
|
-
class:
|
|
209
|
+
return (e, t) => (h(), l("div", {
|
|
210
|
+
id: re(j),
|
|
211
|
+
class: m(["q-gauge", f.class]),
|
|
191
212
|
role: "meter",
|
|
192
213
|
"aria-labelledby": R.value ? L.value : void 0,
|
|
193
214
|
"aria-valuemin": M.value,
|
|
194
215
|
"aria-valuemax": N.value,
|
|
195
216
|
"aria-valuenow": F.value,
|
|
196
|
-
"aria-valuetext":
|
|
217
|
+
"aria-valuetext": Ge.value
|
|
197
218
|
}, [
|
|
198
|
-
R.value ? (
|
|
219
|
+
R.value ? (h(), l("div", {
|
|
199
220
|
key: 0,
|
|
200
221
|
id: L.value,
|
|
201
222
|
class: "q-gauge__label"
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
|
|
223
|
+
}, _(f.label), 9, oe)) : c("", !0),
|
|
224
|
+
u("div", se, [(h(), l("svg", ce, [
|
|
225
|
+
u("path", {
|
|
205
226
|
class: "q-gauge__track-shadow",
|
|
206
|
-
d:
|
|
207
|
-
}, null, 8, ce),
|
|
208
|
-
l("path", {
|
|
209
|
-
class: "q-gauge__track",
|
|
210
|
-
d: q.value
|
|
227
|
+
d: J.value
|
|
211
228
|
}, null, 8, le),
|
|
212
|
-
(
|
|
229
|
+
u("path", {
|
|
230
|
+
class: "q-gauge__track",
|
|
231
|
+
d: J.value
|
|
232
|
+
}, null, 8, ue),
|
|
233
|
+
(h(!0), l(o, null, g(W.value, (e, t) => (h(), l("path", {
|
|
213
234
|
key: `${e.from}-${e.to}-${t}`,
|
|
214
235
|
class: "q-gauge__range",
|
|
215
236
|
d: e.path,
|
|
216
237
|
stroke: e.color,
|
|
217
238
|
"data-range-from": e.from,
|
|
218
239
|
"data-range-to": e.to
|
|
219
|
-
}, null, 8,
|
|
220
|
-
(
|
|
240
|
+
}, null, 8, de))), 128)),
|
|
241
|
+
(h(!0), l(o, null, g(Be.value, (e) => (h(), l("g", {
|
|
221
242
|
key: e.value,
|
|
222
243
|
class: "q-gauge__tick",
|
|
223
244
|
"data-value": e.value
|
|
224
|
-
}, [
|
|
245
|
+
}, [u("line", {
|
|
225
246
|
x1: e.inner.x,
|
|
226
247
|
y1: e.inner.y,
|
|
227
248
|
x2: e.outer.x,
|
|
228
249
|
y2: e.outer.y
|
|
229
|
-
}, null, 8,
|
|
250
|
+
}, null, 8, v), u("text", {
|
|
251
|
+
class: m(f.tickFormatter ? "q-gauge__app-text" : "q-gauge__number"),
|
|
252
|
+
direction: e.direction,
|
|
230
253
|
x: e.label.x,
|
|
231
254
|
y: e.label.y
|
|
232
|
-
},
|
|
233
|
-
|
|
255
|
+
}, _(e.text), 11, pe)], 8, fe))), 128)),
|
|
256
|
+
q.value ? (h(), l("g", {
|
|
234
257
|
key: 0,
|
|
235
|
-
class:
|
|
236
|
-
"data-target":
|
|
237
|
-
"data-target-state":
|
|
258
|
+
class: m(["q-gauge__target", `q-gauge__target--${U.value}`]),
|
|
259
|
+
"data-target": q.value.value,
|
|
260
|
+
"data-target-state": U.value
|
|
238
261
|
}, [
|
|
239
|
-
|
|
262
|
+
u("line", {
|
|
240
263
|
class: "q-gauge__target-outline",
|
|
241
|
-
x1:
|
|
242
|
-
y1:
|
|
243
|
-
x2:
|
|
244
|
-
y2:
|
|
264
|
+
x1: q.value.inner.x,
|
|
265
|
+
y1: q.value.inner.y,
|
|
266
|
+
x2: q.value.outer.x,
|
|
267
|
+
y2: q.value.outer.y
|
|
245
268
|
}, null, 8, he),
|
|
246
|
-
|
|
269
|
+
u("line", {
|
|
247
270
|
class: "q-gauge__target-line",
|
|
248
|
-
x1:
|
|
249
|
-
y1:
|
|
250
|
-
x2:
|
|
251
|
-
y2:
|
|
271
|
+
x1: q.value.inner.x,
|
|
272
|
+
y1: q.value.inner.y,
|
|
273
|
+
x2: q.value.outer.x,
|
|
274
|
+
y2: q.value.outer.y
|
|
252
275
|
}, null, 8, ge),
|
|
253
|
-
|
|
276
|
+
f.showTargetValue ? (h(), l("text", {
|
|
254
277
|
key: 0,
|
|
255
|
-
class: "q-gauge__target-value",
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
278
|
+
class: m(["q-gauge__target-value", { "q-gauge__app-text": f.targetLabel !== void 0 }]),
|
|
279
|
+
direction: Me.value,
|
|
280
|
+
x: q.value.label.x,
|
|
281
|
+
y: q.value.label.y
|
|
282
|
+
}, [f.targetLabel === void 0 ? (h(!0), l(o, { key: 1 }, g(Pe.value, (e, t) => (h(), l(o, { key: t }, [e.kind === "number" ? (h(), l("tspan", ve, _(e.text), 1)) : e.kind === "unit" ? (h(), l("tspan", {
|
|
283
|
+
key: 1,
|
|
284
|
+
class: "q-gauge__target-unit",
|
|
285
|
+
direction: Fe.value
|
|
286
|
+
}, _(e.text), 9, ye)) : (h(), l(o, { key: 2 }, [d(_(e.text), 1)], 64))], 64))), 128)) : (h(), l(o, { key: 0 }, [d(_(B.value), 1)], 64))], 10, _e)) : c("", !0)
|
|
287
|
+
], 10, me)) : c("", !0),
|
|
288
|
+
u("g", {
|
|
261
289
|
class: "q-gauge__needle",
|
|
262
|
-
transform:
|
|
263
|
-
}, [
|
|
264
|
-
x1:
|
|
265
|
-
y1:
|
|
266
|
-
x2:
|
|
267
|
-
y2:
|
|
268
|
-
})], 8,
|
|
269
|
-
|
|
290
|
+
transform: He.value
|
|
291
|
+
}, [u("line", {
|
|
292
|
+
x1: b,
|
|
293
|
+
y1: x,
|
|
294
|
+
x2: b,
|
|
295
|
+
y2: Oe
|
|
296
|
+
})], 8, y),
|
|
297
|
+
u("circle", {
|
|
270
298
|
class: "q-gauge__hub",
|
|
271
|
-
cx:
|
|
272
|
-
cy:
|
|
299
|
+
cx: b,
|
|
300
|
+
cy: x,
|
|
273
301
|
r: "21"
|
|
274
302
|
}),
|
|
275
|
-
|
|
303
|
+
u("circle", {
|
|
276
304
|
class: "q-gauge__hub-center",
|
|
277
|
-
cx:
|
|
278
|
-
cy:
|
|
305
|
+
cx: b,
|
|
306
|
+
cy: x,
|
|
279
307
|
r: "12"
|
|
280
308
|
})
|
|
281
309
|
]))]),
|
|
282
|
-
|
|
310
|
+
u("div", be, [u("span", xe, [te(e.$slots, "value", {
|
|
283
311
|
value: P.value,
|
|
284
312
|
min: M.value,
|
|
285
313
|
max: N.value
|
|
286
|
-
}, () => [u(
|
|
287
|
-
|
|
288
|
-
|
|
314
|
+
}, () => [u("span", { class: m(f.valueLabel === void 0 ? "q-gauge__number" : "q-gauge__app-text") }, _(z.value), 3)])]), Ae.value ? (h(), l("span", Se, _(f.unit), 1)) : c("", !0)]),
|
|
315
|
+
je.value ? (h(), l("div", Ce, _(f.secondaryLabel), 1)) : c("", !0),
|
|
316
|
+
Re.value ? (h(), l("ul", we, [(h(!0), l(o, null, g(G.value, (e, t) => (h(), l("li", {
|
|
289
317
|
key: `${e.from}-${e.to}-${t}`,
|
|
290
318
|
class: "q-gauge__legend-item"
|
|
291
|
-
}, [
|
|
319
|
+
}, [u("span", {
|
|
292
320
|
class: "q-gauge__legend-swatch",
|
|
293
321
|
style: ee({ backgroundColor: e.color })
|
|
294
|
-
}, null, 4),
|
|
322
|
+
}, null, 4), u("span", Te, _(e.label), 1)]))), 128)), (h(!0), l(o, null, g(K.value, (e) => (h(), l("li", {
|
|
295
323
|
key: e.state,
|
|
296
|
-
class:
|
|
324
|
+
class: m([
|
|
297
325
|
"q-gauge__legend-item",
|
|
298
326
|
"q-gauge__legend-item--target",
|
|
299
|
-
{ "q-gauge__legend-item--active": e.state ===
|
|
327
|
+
{ "q-gauge__legend-item--active": e.state === U.value }
|
|
300
328
|
])
|
|
301
|
-
}, [
|
|
302
|
-
], 10,
|
|
329
|
+
}, [u("span", { class: m(["q-gauge__legend-target", `q-gauge__legend-target--${e.state}`]) }, null, 2), u("span", Ee, _(e.label), 1)], 2))), 128))])) : c("", !0)
|
|
330
|
+
], 10, ae));
|
|
303
331
|
}
|
|
304
332
|
});
|
|
305
333
|
//#endregion
|
|
@@ -77,6 +77,10 @@ export type QGaugeProps = QBaseComponentProps & {
|
|
|
77
77
|
* accessibility. When provided, it is treated as complete current-value text,
|
|
78
78
|
* so the unit is not appended there automatically.
|
|
79
79
|
*
|
|
80
|
+
* In a right-to-left page, the text reads in the direction of its first letter: Arabic or Hebrew
|
|
81
|
+
* right to left, and a text with no letter, such as `-20%`, left to right, as written. The numbers
|
|
82
|
+
* the gauge formats itself always read left to right.
|
|
83
|
+
*
|
|
80
84
|
* @category Content
|
|
81
85
|
*/
|
|
82
86
|
valueLabel?: string | ((value: number, min: number, max: number) => string);
|
|
@@ -96,6 +100,10 @@ export type QGaugeProps = QBaseComponentProps & {
|
|
|
96
100
|
/**
|
|
97
101
|
* Text or formatter used to describe the target value.
|
|
98
102
|
*
|
|
103
|
+
* In a right-to-left page, the text reads in the direction of its first letter: Arabic or Hebrew
|
|
104
|
+
* right to left, and a text with no letter, such as `-20%`, left to right, as written. The numbers
|
|
105
|
+
* the gauge formats itself always read left to right.
|
|
106
|
+
*
|
|
99
107
|
* @category Content
|
|
100
108
|
*/
|
|
101
109
|
targetLabel?: string | ((target: number, min: number, max: number) => string);
|
|
@@ -119,7 +127,10 @@ export type QGaugeProps = QBaseComponentProps & {
|
|
|
119
127
|
*/
|
|
120
128
|
showTargetLegend?: boolean;
|
|
121
129
|
/**
|
|
122
|
-
* Unit displayed next to the current value.
|
|
130
|
+
* Unit displayed next to the current value, and after the target value.
|
|
131
|
+
*
|
|
132
|
+
* In a right-to-left page, the unit reads in the direction of its first letter: `°C` as written,
|
|
133
|
+
* and a unit in Arabic or Hebrew right to left.
|
|
123
134
|
*
|
|
124
135
|
* @category Content
|
|
125
136
|
*/
|
|
@@ -139,6 +150,10 @@ export type QGaugeProps = QBaseComponentProps & {
|
|
|
139
150
|
/**
|
|
140
151
|
* Formatter used for scale labels.
|
|
141
152
|
*
|
|
153
|
+
* In a right-to-left page, the text reads in the direction of its first letter: Arabic or Hebrew
|
|
154
|
+
* right to left, and a text with no letter, such as `-20%`, left to right, as written. The numbers
|
|
155
|
+
* the gauge formats itself always read left to right.
|
|
156
|
+
*
|
|
142
157
|
* @category Configuration
|
|
143
158
|
*/
|
|
144
159
|
tickFormatter?: (value: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QGauge/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IAEtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QGauge/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,SAAS,CAAA;AAE3D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IAEtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IAE3E;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IAEzC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IAE7E;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAE1B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACzC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { QInputGroupProps } from '.';
|
|
2
|
+
import { QFieldSize } from '../QField';
|
|
2
3
|
declare function __VLS_template(): {
|
|
3
4
|
attrs: Partial<{}>;
|
|
4
5
|
slots: {
|
|
@@ -29,7 +30,7 @@ declare function __VLS_template(): {
|
|
|
29
30
|
readonly helpDisplay?: import('../..').QHelpDisplay | undefined;
|
|
30
31
|
readonly icons?: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS> | undefined;
|
|
31
32
|
readonly texts?: typeof import('../QField/constants').DEFAULT_TEXTS | undefined;
|
|
32
|
-
readonly size?:
|
|
33
|
+
readonly size?: QFieldSize | undefined;
|
|
33
34
|
readonly readonly?: boolean | undefined;
|
|
34
35
|
readonly disabled?: boolean | undefined;
|
|
35
36
|
readonly invalid?: boolean | undefined;
|
|
@@ -160,7 +161,7 @@ declare function __VLS_template(): {
|
|
|
160
161
|
fieldRef: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
|
|
161
162
|
helpDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
162
163
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
163
|
-
size:
|
|
164
|
+
size: QFieldSize;
|
|
164
165
|
icons: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS>;
|
|
165
166
|
texts: typeof import('../QField/constants').DEFAULT_TEXTS;
|
|
166
167
|
helpDisplay: import('../..').QHelpDisplay;
|
|
@@ -186,7 +187,7 @@ declare function __VLS_template(): {
|
|
|
186
187
|
$nextTick: typeof import('vue').nextTick;
|
|
187
188
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
188
189
|
} & Readonly<{
|
|
189
|
-
size:
|
|
190
|
+
size: QFieldSize;
|
|
190
191
|
icons: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS>;
|
|
191
192
|
texts: typeof import('../QField/constants').DEFAULT_TEXTS;
|
|
192
193
|
helpDisplay: import('../..').QHelpDisplay;
|
|
@@ -221,7 +222,7 @@ declare const __VLS_component: import('vue').DefineComponent<QInputGroupProps, {
|
|
|
221
222
|
fieldRef: import('vue').ComputedRef<HTMLElement | null | undefined>;
|
|
222
223
|
helpDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
223
224
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QInputGroupProps> & Readonly<{}>, {
|
|
224
|
-
size:
|
|
225
|
+
size: QFieldSize;
|
|
225
226
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
226
227
|
field: ({
|
|
227
228
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -237,7 +238,7 @@ declare const __VLS_component: import('vue').DefineComponent<QInputGroupProps, {
|
|
|
237
238
|
readonly helpDisplay?: import('../..').QHelpDisplay | undefined;
|
|
238
239
|
readonly icons?: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS> | undefined;
|
|
239
240
|
readonly texts?: typeof import('../QField/constants').DEFAULT_TEXTS | undefined;
|
|
240
|
-
readonly size?:
|
|
241
|
+
readonly size?: QFieldSize | undefined;
|
|
241
242
|
readonly readonly?: boolean | undefined;
|
|
242
243
|
readonly disabled?: boolean | undefined;
|
|
243
244
|
readonly invalid?: boolean | undefined;
|
|
@@ -368,7 +369,7 @@ declare const __VLS_component: import('vue').DefineComponent<QInputGroupProps, {
|
|
|
368
369
|
fieldRef: Readonly<import('vue').ShallowRef<HTMLElement | null>>;
|
|
369
370
|
helpDescribedBy: import('vue').ComputedRef<string | undefined>;
|
|
370
371
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
371
|
-
size:
|
|
372
|
+
size: QFieldSize;
|
|
372
373
|
icons: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS>;
|
|
373
374
|
texts: typeof import('../QField/constants').DEFAULT_TEXTS;
|
|
374
375
|
helpDisplay: import('../..').QHelpDisplay;
|
|
@@ -394,7 +395,7 @@ declare const __VLS_component: import('vue').DefineComponent<QInputGroupProps, {
|
|
|
394
395
|
$nextTick: typeof import('vue').nextTick;
|
|
395
396
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
396
397
|
} & Readonly<{
|
|
397
|
-
size:
|
|
398
|
+
size: QFieldSize;
|
|
398
399
|
icons: import('../..').QIcons<keyof typeof import('../QField/constants').DEFAULT_ICONS>;
|
|
399
400
|
texts: typeof import('../QField/constants').DEFAULT_TEXTS;
|
|
400
401
|
helpDisplay: import('../..').QHelpDisplay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QInputGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QInputGroup/QInputGroup.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QInputGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QInputGroup/QInputGroup.vue"],"names":[],"mappings":"AAgEA;AAqRC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AA0M5C,iBAAS,cAAc;WAqKT,OAAO,IAA6B;;iCAlBb,GAAG;gCACJ,GAAG;yBACT,GAAG;;;;YACH,GAAG;wBACJ,GAAG;wBACH,GAAG;0BACD,GAAG;wBACL,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDA+DowH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA/Cz5H;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA+B+wH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAtH,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OArBx5H,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|