@quidgest/ui 0.16.26 → 0.16.28
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/ui.esm.js +1926 -1922
- package/dist/ui.js +17 -17
- package/dist/ui.min.js +730 -730
- package/dist/ui.scss +1 -1
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +20 -16
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +1 -0
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +42 -43
- package/esm/components/QPropertyList/index.d.ts +1 -0
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QPropertyList/types.d.ts +4 -0
- package/esm/components/QPropertyList/types.d.ts.map +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.d.ts.map +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +17 -23
- package/esm/framework.js +25 -25
- package/esm/utils/theme.d.ts +9 -0
- package/esm/utils/theme.d.ts.map +1 -1
- package/esm/utils/theme.js +27 -23
- package/package.json +1 -1
package/dist/ui.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QColorPicker/QColorPicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QColorPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QColorPicker/QColorPicker.vue"],"names":[],"mappings":"AA4CA;AAuJC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAMhD,KAAK,WAAW,GAAG,iBAAiB,CAAC;AAiGtC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WA4GT,OAAO,IAA6B;;iCAfb,GAAG;gCACJ,GAAG;yBACT,GAAG;wBACJ,GAAG;wBACH,GAAG;;;;EAgB/B;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;6EAQnB,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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as h, mergeModels as C, useModel as k, ref as p, computed as V, watch as m, createBlock as $, openBlock as g, unref as q, normalizeClass as B, createSlots as T, withCtx as t, renderSlot as r, withDirectives as x, createElementVNode as z, mergeProps as M,
|
|
1
|
+
import { defineComponent as h, mergeModels as C, useModel as k, ref as p, computed as V, watch as m, createBlock as $, openBlock as g, unref as q, normalizeClass as B, createSlots as T, withCtx as t, renderSlot as r, withDirectives as x, createElementVNode as z, mergeProps as M, withModifiers as S, vModelText as w } from "vue";
|
|
2
2
|
import { DEFAULT_TEXTS as D } from "./types.js";
|
|
3
3
|
import { QTextField as E } from "../QTextField/index.js";
|
|
4
4
|
import { isValidHex as F } from "../../utils/color.js";
|
|
5
|
-
const P = ["readonly", "disabled", "aria-label"],
|
|
5
|
+
const P = ["readonly", "disabled", "aria-label"], I = /* @__PURE__ */ h({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "QColorPicker",
|
|
8
8
|
props: /* @__PURE__ */ C({
|
|
@@ -21,28 +21,28 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
23
|
setup(u) {
|
|
24
|
-
const l = u, d = k(u, "modelValue"), s = p(""),
|
|
25
|
-
function
|
|
24
|
+
const l = u, d = k(u, "modelValue"), s = p(""), o = p(""), c = V(() => l.readonly || l.disabled);
|
|
25
|
+
function i(e) {
|
|
26
26
|
return F(e, !0);
|
|
27
27
|
}
|
|
28
28
|
function f(e) {
|
|
29
|
-
const
|
|
30
|
-
d.value =
|
|
29
|
+
const a = e.target;
|
|
30
|
+
d.value = i(a.value) ? a.value : "";
|
|
31
31
|
}
|
|
32
32
|
function v() {
|
|
33
|
-
|
|
33
|
+
i(o.value) ? d.value = o.value : (d.value = "", o.value = "");
|
|
34
34
|
}
|
|
35
35
|
function b(e) {
|
|
36
|
-
e &&
|
|
36
|
+
e && i(e) ? s.value = e : s.value = "#000000";
|
|
37
37
|
}
|
|
38
38
|
m(d, b, { immediate: !0 });
|
|
39
39
|
function y(e) {
|
|
40
|
-
e &&
|
|
40
|
+
e && i(e) ? o.value = e : o.value = "";
|
|
41
41
|
}
|
|
42
|
-
return m(d, y, { immediate: !0 }), (e,
|
|
42
|
+
return m(d, y, { immediate: !0 }), (e, a) => (g(), $(q(E), {
|
|
43
43
|
id: l.id,
|
|
44
|
-
modelValue:
|
|
45
|
-
"onUpdate:modelValue":
|
|
44
|
+
modelValue: o.value,
|
|
45
|
+
"onUpdate:modelValue": a[2] || (a[2] = (n) => o.value = n),
|
|
46
46
|
"max-length": 7,
|
|
47
47
|
class: B(["q-color-picker", l.class]),
|
|
48
48
|
label: l.label,
|
|
@@ -62,14 +62,18 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
62
62
|
prepend: t(() => [
|
|
63
63
|
r(e.$slots, "prepend"),
|
|
64
64
|
x(z("input", M({
|
|
65
|
-
"onUpdate:modelValue":
|
|
65
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => s.value = n),
|
|
66
66
|
type: "color",
|
|
67
67
|
class: "q-color-picker__swatch",
|
|
68
68
|
readonly: l.readonly,
|
|
69
69
|
disabled: c.value,
|
|
70
70
|
"aria-label": l.texts.selectColor
|
|
71
|
-
}, e.$attrs, {
|
|
72
|
-
|
|
71
|
+
}, e.$attrs, {
|
|
72
|
+
onChange: f,
|
|
73
|
+
onClick: a[1] || (a[1] = S(() => {
|
|
74
|
+
}, ["stop"]))
|
|
75
|
+
}), null, 16, P), [
|
|
76
|
+
[w, s.value]
|
|
73
77
|
])
|
|
74
78
|
]),
|
|
75
79
|
_: 2
|
|
@@ -93,5 +97,5 @@ const P = ["readonly", "disabled", "aria-label"], H = /* @__PURE__ */ h({
|
|
|
93
97
|
}
|
|
94
98
|
});
|
|
95
99
|
export {
|
|
96
|
-
|
|
100
|
+
I as default
|
|
97
101
|
};
|
|
@@ -9,6 +9,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
9
9
|
} & import('../../types/component').QBaseComponentProps & {
|
|
10
10
|
field: QPropertyListField;
|
|
11
11
|
readonly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
12
13
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
13
14
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
14
15
|
attrs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QPropertyListRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/QPropertyListRow.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QPropertyListRow.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/QPropertyListRow.vue"],"names":[],"mappings":"AAgCA;AAyGC,OAAO,KAAK,EAAE,kBAAkB,EAAyB,MAAM,SAAS,CAAA;yBAKvD,CAAC,eACL,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6K1D,mBAAmB,CAAC;;;;;qBA9Gf,CAAC;;;;;oBA8GgF,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBArCkB,GAAG;;UAuCzB;YA3KD,OAAO,SAAS,kBAAkB,GAAG,IAAI;YACzC,cAAc,SAAS,OAAO,GAAG,IAAI;sDA0KA;OAG/B,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvLxE,wBAuL2E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,82 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as B, mergeModels as c, useModel as M, computed as l, toRef as R, createElementBlock as m, openBlock as d, normalizeClass as f, createElementVNode as v, withModifiers as i, createVNode as h, unref as y, renderSlot as N, createCommentVNode as P, createBlock as w, resolveDynamicComponent as E, mergeProps as F } from "vue";
|
|
2
|
+
import { QLabel as I } from "../QLabel/index.js";
|
|
3
|
+
import { useId as L } from "../../composables/uid.js";
|
|
4
|
+
const Q = ["id", "data-group"], x = {
|
|
3
5
|
key: 0,
|
|
4
6
|
class: "q-property-list-field__container"
|
|
5
|
-
},
|
|
7
|
+
}, U = /* @__PURE__ */ B({
|
|
6
8
|
__name: "QPropertyListRow",
|
|
7
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ c({
|
|
8
10
|
id: {},
|
|
9
11
|
class: {},
|
|
10
12
|
field: {},
|
|
11
|
-
readonly: { type: Boolean }
|
|
13
|
+
readonly: { type: Boolean },
|
|
14
|
+
required: { type: Boolean }
|
|
12
15
|
}, {
|
|
13
16
|
modelValue: {},
|
|
14
17
|
modelModifiers: {}
|
|
15
18
|
}),
|
|
16
|
-
emits: /* @__PURE__ */
|
|
17
|
-
setup(
|
|
18
|
-
const e =
|
|
19
|
-
var
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
"q-property-list__cell-label",
|
|
23
|
-
{
|
|
24
|
-
"q-property-list__cell--required": (l = e.field.props) == null ? void 0 : l.required
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
}), v = o(() => e.readonly || (e.field.props.readonly ?? !1)), g = o(() => ({
|
|
19
|
+
emits: /* @__PURE__ */ c(["focus", "field-change"], ["update:modelValue"]),
|
|
20
|
+
setup(n, { emit: _ }) {
|
|
21
|
+
const e = n, a = _, r = M(n, "modelValue"), q = l(() => ["q-property-list__row", e.class]), C = l(() => ["q-property-list__cell", "q-property-list__cell-label"]), V = l(() => e.readonly || (e.field.props.readonly ?? !1)), u = l(() => {
|
|
22
|
+
var o;
|
|
23
|
+
return e.required || !!((o = e.field.props) != null && o.required);
|
|
24
|
+
}), p = L(R(e, "id")), g = l(() => ({
|
|
28
25
|
...e.field.props,
|
|
29
|
-
|
|
26
|
+
id: p.value,
|
|
27
|
+
readonly: V.value,
|
|
28
|
+
required: u.value
|
|
30
29
|
}));
|
|
31
30
|
function s() {
|
|
32
31
|
a("focus", e.field);
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
33
|
+
function k(o) {
|
|
34
|
+
r.value = o, a("field-change", o);
|
|
36
35
|
}
|
|
37
|
-
return (
|
|
36
|
+
return (o, t) => (d(), m("tr", {
|
|
38
37
|
id: e.id,
|
|
39
|
-
class:
|
|
38
|
+
class: f(q.value),
|
|
40
39
|
"data-group": e.field.group,
|
|
41
40
|
onFocusin: s
|
|
42
41
|
}, [
|
|
43
|
-
|
|
42
|
+
v(
|
|
44
43
|
"td",
|
|
45
44
|
{
|
|
46
|
-
class:
|
|
47
|
-
onClick:
|
|
45
|
+
class: f(C.value),
|
|
46
|
+
onClick: i(s, ["prevent", "stop"])
|
|
48
47
|
},
|
|
49
48
|
[
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
)
|
|
49
|
+
h(y(I), {
|
|
50
|
+
for: y(p),
|
|
51
|
+
label: e.field.label,
|
|
52
|
+
required: u.value,
|
|
53
|
+
onClick: t[0] || (t[0] = i(() => {
|
|
54
|
+
}, ["stop"]))
|
|
55
|
+
}, null, 8, ["for", "label", "required"])
|
|
57
56
|
],
|
|
58
57
|
2
|
|
59
58
|
/* CLASS */
|
|
60
59
|
),
|
|
61
|
-
|
|
60
|
+
v("td", {
|
|
62
61
|
class: "q-property-list__cell",
|
|
63
|
-
onClick:
|
|
62
|
+
onClick: i(s, ["prevent", "stop"])
|
|
64
63
|
}, [
|
|
65
|
-
|
|
66
|
-
e.field.component ? (
|
|
67
|
-
(
|
|
68
|
-
modelValue:
|
|
64
|
+
N(o.$slots, "default", {}, () => [
|
|
65
|
+
e.field.component ? (d(), m("div", x, [
|
|
66
|
+
(d(), w(E(e.field.component), F(g.value, {
|
|
67
|
+
modelValue: r.value,
|
|
69
68
|
"onUpdate:modelValue": [
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
t[1] || (t[1] = (b) => r.value = b),
|
|
70
|
+
k
|
|
72
71
|
]
|
|
73
72
|
}), null, 16, ["modelValue"]))
|
|
74
|
-
])) :
|
|
73
|
+
])) : P("v-if", !0)
|
|
75
74
|
])
|
|
76
75
|
])
|
|
77
|
-
], 42,
|
|
76
|
+
], 42, Q));
|
|
78
77
|
}
|
|
79
78
|
});
|
|
80
79
|
export {
|
|
81
|
-
|
|
80
|
+
U as default
|
|
82
81
|
};
|
|
@@ -81,6 +81,7 @@ declare const QPropertyListRow: <T>(__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
81
81
|
class?: string | unknown[] | undefined;
|
|
82
82
|
field: import('./types').QPropertyListField;
|
|
83
83
|
readonly?: boolean | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
84
85
|
} & import('vue').PublicProps;
|
|
85
86
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
86
87
|
attrs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,MAAM,SAAS,CAAA;AAKhB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,MAAM,SAAS,CAAA;AAKhB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkC,CAAA;AACrD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;2BAc+zQ,KAAK;;;;;;;;;cAA4J,KAAK;SAAiB,CAAC;CAdl9Q,CAAA;AAC3D,QAAA,MAAM,kBAAkB;;;;;;6FAAuC,CAAA;AAC/D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAA;AAG/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AAGlF,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,CAAA"}
|
|
@@ -118,6 +118,10 @@ export type QPropertyListRowProps = QBaseComponentProps & {
|
|
|
118
118
|
* When true, renders the field in a read-only state preventing user interaction.
|
|
119
119
|
*/
|
|
120
120
|
readonly?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* If true, indicates that the field is required, displaying a visual cue.
|
|
123
|
+
*/
|
|
124
|
+
required?: boolean;
|
|
121
125
|
};
|
|
122
126
|
/**
|
|
123
127
|
* Props for the QPropertyListPanel component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QPropertyList/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACtD;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAE7B;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,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,CAAA;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,GAAG;IACzD;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAA;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,GAAG;IAC3D;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,aAAa;;CAEQ,CAAA;AAGlC,eAAO,MAAM,aAAa;;;;;;;CAOM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QThemeProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QThemeProvider/QThemeProvider.vue"],"names":[],"mappings":"AAOA;
|
|
1
|
+
{"version":3,"file":"QThemeProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QThemeProvider/QThemeProvider.vue"],"names":[],"mappings":"AAOA;AA6DC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAmDnD,iBAAS,cAAc;WAyBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6TAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { provideTheme as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as a, toRef as d, watchEffect as i, onBeforeUnmount as u, createElementBlock as p, openBlock as f, normalizeClass as h, unref as m, renderSlot as v } from "vue";
|
|
2
|
+
import { useId as y } from "../../composables/uid.js";
|
|
3
|
+
import { provideTheme as C } from "../../composables/theme.js";
|
|
4
|
+
const _ = ["id"], P = /* @__PURE__ */ a({
|
|
5
5
|
__name: "QThemeProvider",
|
|
6
6
|
props: {
|
|
7
7
|
id: {},
|
|
8
8
|
class: {},
|
|
9
9
|
theme: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const o =
|
|
13
|
-
class: c,
|
|
14
|
-
css: r,
|
|
15
|
-
name: n
|
|
16
|
-
} = _(m(o, "theme")), l = C(m(o, "id"));
|
|
11
|
+
setup(c) {
|
|
12
|
+
const o = c, { class: r, css: n } = C(d(o, "theme")), l = y(d(o, "id"));
|
|
17
13
|
let e = null, s = null;
|
|
18
|
-
return
|
|
19
|
-
if (
|
|
20
|
-
const t =
|
|
21
|
-
s = t, e = document.getElementById(t), e || (e = document.createElement("style"), e.id = t, document.head.appendChild(e)), e.textContent =
|
|
14
|
+
return i(() => {
|
|
15
|
+
if (n.value) {
|
|
16
|
+
const t = r.value;
|
|
17
|
+
s = t, e = document.getElementById(t), e || (e = document.createElement("style"), e.id = t, document.head.appendChild(e)), e.textContent = n.value;
|
|
22
18
|
}
|
|
23
|
-
}),
|
|
19
|
+
}), u(() => {
|
|
24
20
|
if (!e || !s) return;
|
|
25
21
|
!Array.from(
|
|
26
|
-
document.querySelectorAll(
|
|
27
|
-
`.q-theme-provider.q-theme--${n.value}:not(#${l.value})`
|
|
28
|
-
)
|
|
22
|
+
document.querySelectorAll(`.q-theme-provider.${r.value}:not(#${l.value})`)
|
|
29
23
|
).length && e.parentNode && e.parentNode.removeChild(e);
|
|
30
24
|
}), (t, E) => (f(), p("div", {
|
|
31
|
-
id:
|
|
32
|
-
class:
|
|
25
|
+
id: m(l),
|
|
26
|
+
class: h(["q-theme-provider", m(r), o.class])
|
|
33
27
|
}, [
|
|
34
|
-
|
|
35
|
-
], 10,
|
|
28
|
+
v(t.$slots, "default")
|
|
29
|
+
], 10, _));
|
|
36
30
|
}
|
|
37
31
|
});
|
|
38
32
|
export {
|
|
39
|
-
|
|
33
|
+
P as default
|
|
40
34
|
};
|
package/esm/framework.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { DEFAULTS_SYMBOL as
|
|
1
|
+
import { DEFAULTS_SYMBOL as i } from "./composables/defaults.js";
|
|
2
2
|
import { ThemeSymbol as h } from "./composables/theme.js";
|
|
3
3
|
import { DismissibleLayerKey as f } from "./symbols/dismissibleLayer.js";
|
|
4
4
|
import { ToastSymbol as d } from "./composables/useToast/types.js";
|
|
5
5
|
import { useDismissibleLayerStack as u } from "./composables/useDismissibleLayerStack/index.js";
|
|
6
6
|
import { createToastInstance as p } from "./composables/useToast/index.js";
|
|
7
7
|
import { defaultLightColorScheme as r, defaultDarkColorScheme as l } from "./templates/theme.js";
|
|
8
|
-
import { ref as
|
|
8
|
+
import { ref as c, watch as S } from "vue";
|
|
9
9
|
import { createThemeInstance as T, generateRootStyle as L } from "./utils/theme.js";
|
|
10
|
-
function
|
|
10
|
+
function N(o = {}) {
|
|
11
11
|
return { install: (t) => {
|
|
12
|
-
const m =
|
|
13
|
-
for (const
|
|
14
|
-
t.component(
|
|
15
|
-
const e =
|
|
16
|
-
t.provide(
|
|
17
|
-
const
|
|
18
|
-
t.provide(f,
|
|
12
|
+
const m = o.components || {};
|
|
13
|
+
for (const n in m)
|
|
14
|
+
t.component(n, m[n]);
|
|
15
|
+
const e = o.defaults || {};
|
|
16
|
+
t.provide(i, c(e)), y(t, o.themes);
|
|
17
|
+
const a = u();
|
|
18
|
+
t.provide(f, a), b(t);
|
|
19
19
|
} };
|
|
20
20
|
}
|
|
21
|
-
function y(
|
|
21
|
+
function y(o, s) {
|
|
22
22
|
const t = [];
|
|
23
23
|
let m;
|
|
24
|
-
if (
|
|
25
|
-
for (const e of
|
|
26
|
-
const
|
|
24
|
+
if (s)
|
|
25
|
+
for (const e of s.themes) {
|
|
26
|
+
const n = { ...e.mode === "light" ? r : l, ...e.colors };
|
|
27
27
|
t.push({
|
|
28
28
|
name: e.name,
|
|
29
29
|
mode: e.mode,
|
|
30
|
-
scheme:
|
|
31
|
-
}), e.name ===
|
|
30
|
+
scheme: n
|
|
31
|
+
}), e.name === s.defaultTheme && (m = e.name);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
const e = [
|
|
@@ -46,18 +46,18 @@ function y(s, o) {
|
|
|
46
46
|
t.push(...e), m = "light";
|
|
47
47
|
}
|
|
48
48
|
if (m) {
|
|
49
|
-
const e =
|
|
50
|
-
L(t), S(
|
|
49
|
+
const e = c(m), a = T(e, t);
|
|
50
|
+
L(t), S(a.class, k, { immediate: !0 }), o.provide(h, a);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function b(
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
function b(o) {
|
|
54
|
+
const s = p();
|
|
55
|
+
o.provide(d, s);
|
|
56
56
|
}
|
|
57
|
-
function k(
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
function k(o) {
|
|
58
|
+
const s = document.documentElement, m = Array.from(s.classList).filter((e) => !e.startsWith("q-theme"));
|
|
59
|
+
s.className = m.join(" "), s.classList.add(o);
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
N as createFramework
|
|
63
63
|
};
|
package/esm/utils/theme.d.ts
CHANGED
|
@@ -51,4 +51,13 @@ export declare function toProperty(color: string): string;
|
|
|
51
51
|
* @throws Will throw an error if no theme with the specified name exists in `themes`.
|
|
52
52
|
*/
|
|
53
53
|
export declare function createThemeInstance(name: MaybeRefOrGetter<string>, themes: DeepReadonly<ThemeDefinition[]>): ThemeInstance;
|
|
54
|
+
/**
|
|
55
|
+
* Generates a CSS class name for a given theme.
|
|
56
|
+
*
|
|
57
|
+
* Converts the theme name to kebab-case and prepends it with `q-theme--`.
|
|
58
|
+
*
|
|
59
|
+
* @param name - The name of the theme (e.g., 'QuidgestTheme').
|
|
60
|
+
* @returns The corresponding CSS class name (e.g., 'q-theme--quidgest-theme').
|
|
61
|
+
*/
|
|
62
|
+
export declare function getThemeClass(name: string): string;
|
|
54
63
|
//# sourceMappingURL=theme.d.ts.map
|
package/esm/utils/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAQ1E,eAAO,MAAM,aAAa,YAAY,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,gBAAgB,CAY/C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,UAoBtD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,QAM1D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,UAOvC;AAED;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAQ1E,eAAO,MAAM,aAAa,YAAY,CAAA;AAEtC;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,gBAAgB,CAY/C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,UAoBtD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,QAM1D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,UAOvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,YAAY,CAAC,eAAe,EAAE,CAAC,GACrC,aAAa,CAqBf;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,UAEzC"}
|
package/esm/utils/theme.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { parseColor as
|
|
3
|
-
import { toKebabCase as
|
|
1
|
+
import { ref as d, toValue as p, computed as c } from "vue";
|
|
2
|
+
import { parseColor as $ } from "./color.js";
|
|
3
|
+
import { toKebabCase as l } from "./string.js";
|
|
4
4
|
const a = "q-theme";
|
|
5
|
-
function
|
|
5
|
+
function g() {
|
|
6
6
|
let e = document.getElementById(
|
|
7
7
|
a
|
|
8
8
|
);
|
|
9
9
|
return e || (e = document.createElement("style"), e.id = a, document.head.appendChild(e)), e;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
let t =
|
|
11
|
+
function i(e) {
|
|
12
|
+
let t = `.${f(e.name)} {
|
|
13
13
|
`;
|
|
14
14
|
const n = e.scheme;
|
|
15
15
|
let o;
|
|
@@ -18,42 +18,46 @@ function l(e) {
|
|
|
18
18
|
if (r) {
|
|
19
19
|
t += ` ${u(o)}: ${r};
|
|
20
20
|
`;
|
|
21
|
-
const
|
|
22
|
-
t += ` ${u(o)}-rgb: ${
|
|
21
|
+
const s = $(r);
|
|
22
|
+
t += ` ${u(o)}-rgb: ${s.r} ${s.g} ${s.b};
|
|
23
23
|
`;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
return t += `}
|
|
27
27
|
`, t;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const t = e.map(
|
|
31
|
-
`), n =
|
|
29
|
+
function b(e) {
|
|
30
|
+
const t = e.map(i).join(`
|
|
31
|
+
`), n = g();
|
|
32
32
|
n.textContent = t;
|
|
33
33
|
}
|
|
34
34
|
function u(e) {
|
|
35
|
-
return e ? `--q-theme-${
|
|
35
|
+
return e ? `--q-theme-${l(e)}` : "";
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const n =
|
|
39
|
-
const
|
|
40
|
-
if (!
|
|
37
|
+
function v(e, t) {
|
|
38
|
+
const n = d(p(e)), o = c(() => {
|
|
39
|
+
const m = t.find((h) => h.name === n.value);
|
|
40
|
+
if (!m)
|
|
41
41
|
throw new Error(`Theme "${n.value}" not found`);
|
|
42
|
-
return
|
|
43
|
-
}), r = c(() =>
|
|
42
|
+
return m;
|
|
43
|
+
}), r = c(() => f(o.value.name)), s = c(() => i(o.value));
|
|
44
44
|
return {
|
|
45
45
|
name: n,
|
|
46
46
|
current: o,
|
|
47
47
|
themes: t,
|
|
48
48
|
class: r,
|
|
49
|
-
css:
|
|
49
|
+
css: s
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
+
function f(e) {
|
|
53
|
+
return `q-theme--${l(e)}`;
|
|
54
|
+
}
|
|
52
55
|
export {
|
|
53
56
|
a as THEME_NODE_ID,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
v as createThemeInstance,
|
|
58
|
+
b as generateRootStyle,
|
|
59
|
+
i as generateThemeCss,
|
|
60
|
+
f as getThemeClass,
|
|
61
|
+
g as getThemeNode,
|
|
58
62
|
u as toProperty
|
|
59
63
|
};
|