@quidgest/ui 0.14.18 → 0.14.20
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/manifest/components.json +3 -0
- package/dist/ui.css +76 -26
- package/dist/ui.esm.js +5925 -5571
- package/dist/ui.js +16 -16
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +691 -666
- package/dist/ui.scss +80 -27
- package/esm/components/QBadge/QBadge.d.ts +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +42 -48
- package/esm/components/QBadge/index.d.ts +3 -3
- package/esm/components/QCombobox/QCombobox.d.ts +26 -0
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +1 -0
- package/esm/components/QCombobox/index.d.ts +46 -3
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +12 -10
- package/esm/components/QDateTimePicker/index.d.ts +6 -0
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +1 -1
- package/esm/components/QDialog/index.d.ts +3 -3
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +2 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +13 -13
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +47 -39
- package/esm/components/QField/types.d.ts +6 -10
- package/esm/components/QField/types.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -1
- package/esm/components/QFileUpload/QFileUpload.vue.js +15 -13
- package/esm/components/QFileUpload/index.d.ts +6 -0
- package/esm/components/QFileUpload/index.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +25 -17
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.vue.js +9 -13
- package/esm/components/QIcon/QIconImg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconImg.vue.js +11 -15
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.vue.js +15 -19
- package/esm/components/QIcon/types.d.ts +8 -4
- package/esm/components/QIcon/types.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.d.ts +2 -0
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +40 -32
- package/esm/components/QInputGroup/index.d.ts +2 -0
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.d.ts +20 -0
- package/esm/components/QLabel/QLabel.d.ts.map +1 -0
- package/esm/components/QLabel/QLabel.vue.js +27 -0
- package/esm/components/QLabel/QLabel.vue2.js +4 -0
- package/esm/components/QLabel/index.d.ts +22 -0
- package/esm/components/QLabel/index.d.ts.map +1 -0
- package/esm/components/QLabel/index.js +6 -0
- package/esm/components/QLabel/types.d.ts +12 -0
- package/esm/components/QLabel/types.d.ts.map +1 -0
- package/esm/components/QList/QList.d.ts +2 -0
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +22 -21
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +22 -18
- package/esm/components/QList/index.d.ts +1 -0
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +4 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QMeter/QMeter.d.ts +14 -0
- package/esm/components/QMeter/QMeter.d.ts.map +1 -0
- package/esm/components/QMeter/QMeter.vue.js +60 -0
- package/esm/components/QMeter/QMeter.vue2.js +4 -0
- package/esm/components/QMeter/index.d.ts +29 -0
- package/esm/components/QMeter/index.d.ts.map +1 -0
- package/esm/components/QMeter/index.js +6 -0
- package/esm/components/QMeter/types.d.ts +20 -0
- package/esm/components/QMeter/types.d.ts.map +1 -0
- package/esm/components/QOverlay/index.d.ts +2 -0
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts +413 -0
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -0
- package/esm/components/QPasswordField/QPasswordField.vue.js +162 -0
- package/esm/components/QPasswordField/QPasswordField.vue2.js +4 -0
- package/esm/components/QPasswordField/QPasswordFieldMessages.d.ts +4 -0
- package/esm/components/QPasswordField/QPasswordFieldMessages.d.ts.map +1 -0
- package/esm/components/QPasswordField/QPasswordFieldMessages.vue.js +28 -0
- package/esm/components/QPasswordField/QPasswordFieldMessages.vue2.js +4 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.d.ts +12 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.d.ts.map +1 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +97 -0
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue2.js +4 -0
- package/esm/components/QPasswordField/constants.d.ts +9 -0
- package/esm/components/QPasswordField/constants.d.ts.map +1 -0
- package/esm/components/QPasswordField/constants.js +11 -0
- package/esm/components/QPasswordField/index.d.ts +264 -0
- package/esm/components/QPasswordField/index.d.ts.map +1 -0
- package/esm/components/QPasswordField/index.js +6 -0
- package/esm/components/QPasswordField/types.d.ts +100 -0
- package/esm/components/QPasswordField/types.d.ts.map +1 -0
- package/esm/components/QSelect/QSelect.d.ts +4 -0
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +31 -29
- package/esm/components/QSelect/index.d.ts +8 -0
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +10 -9
- package/esm/components/QTextArea/index.d.ts +6 -0
- package/esm/components/QTextArea/index.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.d.ts +2 -0
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +8 -6
- package/esm/components/QTextField/index.d.ts +9 -0
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/index.d.ts +3 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +51 -45
- package/esm/composables/useColorStyle/index.d.ts +11 -0
- package/esm/composables/useColorStyle/index.d.ts.map +1 -0
- package/esm/composables/useColorStyle/index.js +33 -0
- package/esm/composables/useColorStyle/types.d.ts +36 -0
- package/esm/composables/useColorStyle/types.d.ts.map +1 -0
- package/esm/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as f, createBlock as m, openBlock as
|
|
2
|
-
import { QField as
|
|
1
|
+
import { defineComponent as f, createBlock as m, openBlock as p, unref as a, normalizeClass as v, createSlots as b, withCtx as l, createElementBlock as s, createCommentVNode as r, renderSlot as n, createVNode as d, normalizeProps as t, guardReactiveProps as i } from "vue";
|
|
2
|
+
import { QField as y } from "../QField/index.js";
|
|
3
3
|
import { QIcon as u } from "../QIcon/index.js";
|
|
4
|
-
import { provideDefaults as
|
|
5
|
-
const
|
|
4
|
+
import { provideDefaults as I } from "../../composables/defaults.js";
|
|
5
|
+
const _ = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "q-input-group__prepend"
|
|
8
|
-
},
|
|
8
|
+
}, k = { key: 0 }, $ = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "q-input-group__append"
|
|
11
|
-
},
|
|
11
|
+
}, q = { key: 0 }, Q = /* @__PURE__ */ f({
|
|
12
12
|
__name: "QInputGroup",
|
|
13
13
|
props: {
|
|
14
14
|
id: {},
|
|
@@ -19,60 +19,68 @@ const v = {
|
|
|
19
19
|
readonly: { type: Boolean },
|
|
20
20
|
disabled: { type: Boolean },
|
|
21
21
|
required: { type: Boolean },
|
|
22
|
+
invalid: { type: Boolean },
|
|
22
23
|
prependIcon: {},
|
|
23
24
|
appendIcon: {}
|
|
24
25
|
},
|
|
25
26
|
setup(c) {
|
|
26
27
|
const e = c;
|
|
27
|
-
return
|
|
28
|
+
return I({
|
|
28
29
|
QField: {
|
|
29
30
|
size: "block"
|
|
30
31
|
}
|
|
31
|
-
}), (o,
|
|
32
|
+
}), (o, z) => (p(), m(a(y), {
|
|
32
33
|
id: e.id,
|
|
33
|
-
class:
|
|
34
|
+
class: v(["q-input-group", e.class]),
|
|
34
35
|
label: e.label,
|
|
35
36
|
required: e.required,
|
|
36
|
-
size: e.size
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
size: e.size,
|
|
38
|
+
invalid: e.invalid
|
|
39
|
+
}, b({
|
|
40
|
+
"label.prepend": l(() => [
|
|
41
|
+
n(o.$slots, "label.prepend")
|
|
42
|
+
]),
|
|
43
|
+
"label.append": l(() => [
|
|
44
|
+
n(o.$slots, "label.append")
|
|
45
|
+
]),
|
|
46
|
+
default: l(() => [
|
|
47
|
+
o.$slots.prepend || e.prependIcon ? (p(), s("div", _, [
|
|
48
|
+
e.prependIcon ? (p(), s("span", k, [
|
|
49
|
+
d(
|
|
50
|
+
a(u),
|
|
51
|
+
t(i(e.prependIcon)),
|
|
44
52
|
null,
|
|
45
53
|
16
|
|
46
54
|
/* FULL_PROPS */
|
|
47
55
|
)
|
|
48
|
-
])) :
|
|
49
|
-
|
|
50
|
-
])) :
|
|
51
|
-
|
|
52
|
-
o.$slots.append || e.appendIcon ? (
|
|
53
|
-
e.appendIcon ? (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
])) : r("v-if", !0),
|
|
57
|
+
n(o.$slots, "prepend")
|
|
58
|
+
])) : r("v-if", !0),
|
|
59
|
+
n(o.$slots, "default"),
|
|
60
|
+
o.$slots.append || e.appendIcon ? (p(), s("div", $, [
|
|
61
|
+
e.appendIcon ? (p(), s("span", q, [
|
|
62
|
+
d(
|
|
63
|
+
a(u),
|
|
64
|
+
t(i(e.appendIcon)),
|
|
57
65
|
null,
|
|
58
66
|
16
|
|
59
67
|
/* FULL_PROPS */
|
|
60
68
|
)
|
|
61
|
-
])) :
|
|
62
|
-
|
|
63
|
-
])) :
|
|
69
|
+
])) : r("v-if", !0),
|
|
70
|
+
n(o.$slots, "append")
|
|
71
|
+
])) : r("v-if", !0)
|
|
64
72
|
]),
|
|
65
73
|
_: 2
|
|
66
74
|
/* DYNAMIC */
|
|
67
75
|
}, [
|
|
68
76
|
o.$slots.extras ? {
|
|
69
77
|
name: "extras",
|
|
70
|
-
fn:
|
|
71
|
-
|
|
78
|
+
fn: l(() => [
|
|
79
|
+
n(o.$slots, "extras")
|
|
72
80
|
]),
|
|
73
81
|
key: "0"
|
|
74
82
|
} : void 0
|
|
75
|
-
]), 1032, ["id", "class", "label", "required", "size"]));
|
|
83
|
+
]), 1032, ["id", "class", "label", "required", "size", "invalid"]));
|
|
76
84
|
}
|
|
77
85
|
});
|
|
78
86
|
export {
|
|
@@ -18,6 +18,8 @@ declare const QInputGroup: {
|
|
|
18
18
|
size: import('..').QFieldSize;
|
|
19
19
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
20
20
|
$slots: {
|
|
21
|
+
'label.prepend'?(_: {}): any;
|
|
22
|
+
'label.append'?(_: {}): any;
|
|
21
23
|
prepend?(_: {}): any;
|
|
22
24
|
default?(_: {}): any;
|
|
23
25
|
append?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QInputGroup/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QInputGroup/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAA;AAGjD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { QLabelProps } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
prepend?(_: {}): any;
|
|
6
|
+
append?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
rootEl: any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<QLabelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<QLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=QLabel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QLabel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QLabel/QLabel.vue"],"names":[],"mappings":"AAaA;AA2BC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAW3C,iBAAS,cAAc;WAiCT,OAAO,IAA6B;;yBAZrB,GAAG;wBACJ,GAAG;;;;EAgB9B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as l, openBlock as a, normalizeClass as n, renderSlot as o, createElementVNode as i, mergeProps as p, toDisplayString as d } from "vue";
|
|
2
|
+
const c = ["id"], f = ["for"], b = /* @__PURE__ */ t({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "QLabel",
|
|
5
|
+
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
class: {},
|
|
8
|
+
label: {},
|
|
9
|
+
for: {}
|
|
10
|
+
},
|
|
11
|
+
setup(r) {
|
|
12
|
+
const e = r;
|
|
13
|
+
return (s, m) => (a(), l("div", {
|
|
14
|
+
id: e.id,
|
|
15
|
+
class: n(["q-label", e.class])
|
|
16
|
+
}, [
|
|
17
|
+
o(s.$slots, "prepend"),
|
|
18
|
+
i("label", p({
|
|
19
|
+
for: e.for
|
|
20
|
+
}, s.$attrs), d(e.label), 17, f),
|
|
21
|
+
o(s.$slots, "append")
|
|
22
|
+
], 10, c));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
b as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { QLabelProps } from './types';
|
|
2
|
+
declare const QLabel: {
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<QLabelProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
4
|
+
P: {};
|
|
5
|
+
B: {};
|
|
6
|
+
D: {};
|
|
7
|
+
C: {};
|
|
8
|
+
M: {};
|
|
9
|
+
Defaults: {};
|
|
10
|
+
}, Readonly<QLabelProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
11
|
+
__isFragment?: never;
|
|
12
|
+
__isTeleport?: never;
|
|
13
|
+
__isSuspense?: never;
|
|
14
|
+
} & import('vue').ComponentOptionsBase<Readonly<QLabelProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
15
|
+
$slots: {
|
|
16
|
+
prepend?(_: {}): any;
|
|
17
|
+
append?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
export { QLabel };
|
|
21
|
+
export type { QLabelProps };
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QLabel/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;EAA2B,CAAA;AAGvC,OAAO,EAAE,MAAM,EAAE,CAAA;AAGjB,YAAY,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QBaseComponentProps } from '../../types/component';
|
|
2
|
+
export type QLabelProps = QBaseComponentProps & {
|
|
3
|
+
/**
|
|
4
|
+
* The label of the input.
|
|
5
|
+
*/
|
|
6
|
+
label?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The form field associated with the label.
|
|
9
|
+
*/
|
|
10
|
+
for?: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QLabel/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA"}
|
|
@@ -60,6 +60,7 @@ declare function __VLS_template(): {
|
|
|
60
60
|
readonly value: Primitive;
|
|
61
61
|
readonly label: string;
|
|
62
62
|
readonly icon?: import('..').Icon | undefined;
|
|
63
|
+
readonly selectable?: boolean | undefined;
|
|
63
64
|
readonly selected?: boolean | undefined;
|
|
64
65
|
readonly highlighted?: boolean | undefined;
|
|
65
66
|
readonly disabled?: boolean | undefined;
|
|
@@ -145,6 +146,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
145
146
|
readonly value: Primitive;
|
|
146
147
|
readonly label: string;
|
|
147
148
|
readonly icon?: import('..').Icon | undefined;
|
|
149
|
+
readonly selectable?: boolean | undefined;
|
|
148
150
|
readonly selected?: boolean | undefined;
|
|
149
151
|
readonly highlighted?: boolean | undefined;
|
|
150
152
|
readonly disabled?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QList.vue"],"names":[],"mappings":"AA4CA;AA+XC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,KAAK,EAAE,S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AAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as K, useModel as N, ref as
|
|
1
|
+
import { defineComponent as H, mergeModels as K, useModel as N, ref as x, computed as F, createBlock as k, openBlock as d, resolveDynamicComponent as z, normalizeClass as J, withCtx as b, createElementBlock as _, Fragment as B, renderList as L, unref as M, renderSlot as D } from "vue";
|
|
2
2
|
import { QListItemGroup as P, QListItem as W } from "./index.js";
|
|
3
3
|
const Z = /* @__PURE__ */ H({
|
|
4
4
|
__name: "QList",
|
|
@@ -18,12 +18,12 @@ const Z = /* @__PURE__ */ H({
|
|
|
18
18
|
}),
|
|
19
19
|
emits: ["update:modelValue"],
|
|
20
20
|
setup(y, { expose: E }) {
|
|
21
|
-
const l = y, f = N(y, "modelValue"), p =
|
|
21
|
+
const l = y, f = N(y, "modelValue"), p = x(!1), C = F(() => a.value.length > 1 ? "div" : "ul"), a = F(() => l.groups.length ? l.groups.filter(
|
|
22
22
|
(e) => {
|
|
23
23
|
var t;
|
|
24
24
|
return (t = l.items) == null ? void 0 : t.some((n) => n.group === e.id);
|
|
25
25
|
}
|
|
26
|
-
) : [{ id: "", title: "" }]), g =
|
|
26
|
+
) : [{ id: "", title: "" }]), g = x(null), v = x(null);
|
|
27
27
|
function R(e) {
|
|
28
28
|
f.value = e;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ const Z = /* @__PURE__ */ H({
|
|
|
40
40
|
let t;
|
|
41
41
|
f.value ? t = l.items.findIndex((o) => o[l.itemValue] === f.value) : t = h();
|
|
42
42
|
const n = p.value;
|
|
43
|
-
|
|
43
|
+
r(t, n);
|
|
44
44
|
}
|
|
45
45
|
function Q(e) {
|
|
46
46
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key) && e.preventDefault(), e.key) {
|
|
@@ -62,17 +62,17 @@ const Z = /* @__PURE__ */ H({
|
|
|
62
62
|
switch (e) {
|
|
63
63
|
case "next":
|
|
64
64
|
case "prev":
|
|
65
|
-
|
|
65
|
+
r(j(e));
|
|
66
66
|
break;
|
|
67
67
|
case "first":
|
|
68
|
-
|
|
68
|
+
r(h());
|
|
69
69
|
break;
|
|
70
70
|
case "last":
|
|
71
|
-
|
|
71
|
+
r(w());
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function r(e, t = !1) {
|
|
76
76
|
var s;
|
|
77
77
|
(s = i()[e]) == null || s.focus({ preventScroll: t });
|
|
78
78
|
}
|
|
@@ -122,12 +122,12 @@ const Z = /* @__PURE__ */ H({
|
|
|
122
122
|
return e ? (t = l.items) == null ? void 0 : t.filter((n) => n.group === e) : l.items;
|
|
123
123
|
}
|
|
124
124
|
return E({
|
|
125
|
-
focusItem:
|
|
125
|
+
focusItem: r,
|
|
126
126
|
getItem: T,
|
|
127
127
|
getAdjacentItemIndex: S,
|
|
128
128
|
getFirstFocusableItemIndex: h,
|
|
129
129
|
getLastFocusableItemIndex: w
|
|
130
|
-
}), (e, t) => (d(),
|
|
130
|
+
}), (e, t) => (d(), k(z(C.value), {
|
|
131
131
|
id: l.id,
|
|
132
132
|
ref_key: "listRef",
|
|
133
133
|
ref: g,
|
|
@@ -140,19 +140,19 @@ const Z = /* @__PURE__ */ H({
|
|
|
140
140
|
onKeydown: Q
|
|
141
141
|
}, {
|
|
142
142
|
default: b(() => [
|
|
143
|
-
(d(!0),
|
|
144
|
-
|
|
143
|
+
(d(!0), _(
|
|
144
|
+
B,
|
|
145
145
|
null,
|
|
146
|
-
|
|
146
|
+
L(a.value, (n, s) => (d(), k(M(P), {
|
|
147
147
|
id: n.id,
|
|
148
148
|
key: n.id,
|
|
149
|
-
title:
|
|
149
|
+
title: a.value.length === 1 ? void 0 : n.title
|
|
150
150
|
}, {
|
|
151
151
|
default: b(() => [
|
|
152
|
-
(d(!0),
|
|
153
|
-
|
|
152
|
+
(d(!0), _(
|
|
153
|
+
B,
|
|
154
154
|
null,
|
|
155
|
-
|
|
155
|
+
L(G(n.id), (o, V) => (d(), k(M(W), {
|
|
156
156
|
key: o[l.itemValue],
|
|
157
157
|
ref_for: !0,
|
|
158
158
|
ref_key: "listItemsRef",
|
|
@@ -163,7 +163,8 @@ const Z = /* @__PURE__ */ H({
|
|
|
163
163
|
icon: o.icon,
|
|
164
164
|
disabled: l.disabled || n.disabled || o.disabled,
|
|
165
165
|
highlighted: l.highlighted === o[l.itemValue],
|
|
166
|
-
|
|
166
|
+
selectable: l.selectable,
|
|
167
|
+
selected: l.selectable && f.value === o[l.itemValue],
|
|
167
168
|
onSelect: R
|
|
168
169
|
}, {
|
|
169
170
|
append: b(() => {
|
|
@@ -171,7 +172,7 @@ const Z = /* @__PURE__ */ H({
|
|
|
171
172
|
return [
|
|
172
173
|
D(e.$slots, "item.append", {
|
|
173
174
|
item: o,
|
|
174
|
-
element: (c = (u = v.value) == null ? void 0 : u[V + s *
|
|
175
|
+
element: (c = (u = v.value) == null ? void 0 : u[V + s * a.value.length]) == null ? void 0 : c.$el
|
|
175
176
|
})
|
|
176
177
|
];
|
|
177
178
|
}),
|
|
@@ -180,13 +181,13 @@ const Z = /* @__PURE__ */ H({
|
|
|
180
181
|
return [
|
|
181
182
|
D(e.$slots, "item", {
|
|
182
183
|
item: o,
|
|
183
|
-
element: (c = (u = v.value) == null ? void 0 : u[V + s *
|
|
184
|
+
element: (c = (u = v.value) == null ? void 0 : u[V + s * a.value.length]) == null ? void 0 : c.$el
|
|
184
185
|
})
|
|
185
186
|
];
|
|
186
187
|
}),
|
|
187
188
|
_: 2
|
|
188
189
|
/* DYNAMIC */
|
|
189
|
-
}, 1032, ["value", "label", "description", "icon", "disabled", "highlighted", "selected"]))),
|
|
190
|
+
}, 1032, ["value", "label", "description", "icon", "disabled", "highlighted", "selectable", "selected"]))),
|
|
190
191
|
128
|
|
191
192
|
/* KEYED_FRAGMENT */
|
|
192
193
|
))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QList/QListItem.vue"],"names":[],"mappings":"AAgDA;AA2FC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAkCxC,iBAAS,cAAc;WAkGT,OAAO,IAA6B;;yBAZrB,GAAG;yBACH,GAAG;wBACH,GAAG;;;;EAe/B;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;uFASnB,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,16 +1,20 @@
|
|
|
1
|
-
import { defineComponent as k, createElementBlock as
|
|
1
|
+
import { defineComponent as k, createElementBlock as n, openBlock as i, withModifiers as v, normalizeClass as g, unref as o, renderSlot as a, createElementVNode as c, createCommentVNode as l, createBlock as r, createTextVNode as q, normalizeProps as p, mergeProps as m, toDisplayString as u, createVNode as B, guardReactiveProps as N } from "vue";
|
|
2
2
|
import { QIcon as d } from "../QIcon/index.js";
|
|
3
3
|
import { DEFAULT_ICONS as S } from "./types.js";
|
|
4
4
|
import { useId as C } from "../../composables/uid.js";
|
|
5
5
|
const D = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], E = { class: "q-list-item__container" }, I = { class: "q-list-item__content" }, P = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "q-list-item__description"
|
|
8
|
-
}, V = {
|
|
8
|
+
}, V = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "q-list-item__check-container"
|
|
11
|
+
}, K = /* @__PURE__ */ k({
|
|
9
12
|
__name: "QListItem",
|
|
10
13
|
props: {
|
|
11
14
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
12
15
|
label: {},
|
|
13
16
|
icon: {},
|
|
17
|
+
selectable: { type: Boolean },
|
|
14
18
|
selected: { type: Boolean },
|
|
15
19
|
highlighted: { type: Boolean },
|
|
16
20
|
disabled: { type: Boolean },
|
|
@@ -20,13 +24,13 @@ const D = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], E = { c
|
|
|
20
24
|
emits: ["select"],
|
|
21
25
|
setup(_, { emit: f }) {
|
|
22
26
|
const e = _, h = f, b = C();
|
|
23
|
-
function
|
|
27
|
+
function s() {
|
|
24
28
|
e.disabled || h("select", e.value);
|
|
25
29
|
}
|
|
26
30
|
function y(t) {
|
|
27
|
-
t.key === "Tab" &&
|
|
31
|
+
t.key === "Tab" && s(), (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s());
|
|
28
32
|
}
|
|
29
|
-
return (t, w) => (i(),
|
|
33
|
+
return (t, w) => (i(), n("li", {
|
|
30
34
|
id: o(b),
|
|
31
35
|
"data-key": e.value,
|
|
32
36
|
role: "option",
|
|
@@ -42,19 +46,19 @@ const D = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], E = { c
|
|
|
42
46
|
"aria-label": e.label,
|
|
43
47
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
44
48
|
onKeydown: y,
|
|
45
|
-
onClick: v(
|
|
49
|
+
onClick: v(s, ["stop", "prevent"])
|
|
46
50
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
a(t.$slots, "prepend"),
|
|
52
|
+
c("div", E, [
|
|
53
|
+
c("div", I, [
|
|
54
|
+
a(t.$slots, "default", {}, () => [
|
|
51
55
|
e.icon ? (i(), r(
|
|
52
56
|
o(d),
|
|
53
57
|
p(m({ key: 0 }, e.icon)),
|
|
54
58
|
null,
|
|
55
59
|
16
|
|
56
60
|
/* FULL_PROPS */
|
|
57
|
-
)) :
|
|
61
|
+
)) : l("v-if", !0),
|
|
58
62
|
q(
|
|
59
63
|
" " + u(e.label),
|
|
60
64
|
1
|
|
@@ -62,7 +66,7 @@ const D = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], E = { c
|
|
|
62
66
|
)
|
|
63
67
|
])
|
|
64
68
|
]),
|
|
65
|
-
e.description ? (i(),
|
|
69
|
+
e.description ? (i(), n("div", P, [
|
|
66
70
|
B(
|
|
67
71
|
o(d),
|
|
68
72
|
p(N(e.icons.description)),
|
|
@@ -70,25 +74,25 @@ const D = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], E = { c
|
|
|
70
74
|
16
|
|
71
75
|
/* FULL_PROPS */
|
|
72
76
|
),
|
|
73
|
-
|
|
77
|
+
c(
|
|
74
78
|
"span",
|
|
75
79
|
null,
|
|
76
80
|
u(e.description),
|
|
77
81
|
1
|
|
78
82
|
/* TEXT */
|
|
79
83
|
)
|
|
80
|
-
])) :
|
|
84
|
+
])) : l("v-if", !0)
|
|
81
85
|
]),
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
a(t.$slots, "append"),
|
|
87
|
+
e.selectable ? (i(), n("div", V, [
|
|
84
88
|
e.selected ? (i(), r(
|
|
85
89
|
o(d),
|
|
86
90
|
m({ key: 0 }, e.icons.check, { class: "q-list-item__check" }),
|
|
87
91
|
null,
|
|
88
92
|
16
|
|
89
93
|
/* FULL_PROPS */
|
|
90
|
-
)) :
|
|
91
|
-
])
|
|
94
|
+
)) : l("v-if", !0)
|
|
95
|
+
])) : l("v-if", !0)
|
|
92
96
|
], 42, D));
|
|
93
97
|
}
|
|
94
98
|
});
|
|
@@ -33,6 +33,7 @@ declare const QList: {
|
|
|
33
33
|
readonly value: import('../../types/primitive').Primitive;
|
|
34
34
|
readonly label: string;
|
|
35
35
|
readonly icon?: import('..').Icon | undefined;
|
|
36
|
+
readonly selectable?: boolean | undefined;
|
|
36
37
|
readonly selected?: boolean | undefined;
|
|
37
38
|
readonly highlighted?: boolean | undefined;
|
|
38
39
|
readonly disabled?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QList/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKlD,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCASo1yB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EATh7yB,CAAA;AACrC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAC7C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;EAAmC,CAAA;AAGvD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,C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IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IAEX;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAGD,eAAO,MAAM,aAAa;;;;;;;CAOM,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QMeterProps } from './types';
|
|
2
|
+
type __VLS_Props = QMeterProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: number;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: number) => any;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
max: number;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=QMeter.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QMeter.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QMeter/QMeter.vue"],"names":[],"mappings":"AAiBA;AAoEC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAK1C,KAAK,WAAW,GAAG,WAAW,CAAC;AAoChC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;;;;;;;;AA4EhB,wBASG"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as b, mergeModels as v, useModel as f, computed as a, toRef as h, createElementBlock as p, openBlock as y, normalizeClass as x, createElementVNode as o, createVNode as n, unref as c, normalizeStyle as C } from "vue";
|
|
2
|
+
import { QLabel as u } from "../QLabel/index.js";
|
|
3
|
+
import { useColorStyle as L } from "../../composables/useColorStyle/index.js";
|
|
4
|
+
const M = ["id"], g = { class: "q-meter__labels" }, k = { class: "q-meter__track" }, w = /* @__PURE__ */ b({
|
|
5
|
+
__name: "QMeter",
|
|
6
|
+
props: /* @__PURE__ */ v({
|
|
7
|
+
id: {},
|
|
8
|
+
class: {},
|
|
9
|
+
label: {},
|
|
10
|
+
for: {},
|
|
11
|
+
max: { default: 100 },
|
|
12
|
+
valueLabel: {},
|
|
13
|
+
color: {}
|
|
14
|
+
}, {
|
|
15
|
+
modelValue: { default: 0 },
|
|
16
|
+
modelModifiers: {}
|
|
17
|
+
}),
|
|
18
|
+
emits: ["update:modelValue"],
|
|
19
|
+
setup(r) {
|
|
20
|
+
const e = r, s = f(r, "modelValue"), d = a(() => s.value / e.max * 100), m = L(h(e, "color"), "bold"), i = a(() => {
|
|
21
|
+
var t;
|
|
22
|
+
return {
|
|
23
|
+
width: `${Math.max(0, Math.min(d.value, 100))}%`,
|
|
24
|
+
backgroundColor: (t = m.style.value) == null ? void 0 : t.backgroundColor
|
|
25
|
+
};
|
|
26
|
+
}), _ = a(() => {
|
|
27
|
+
var l;
|
|
28
|
+
return typeof e.valueLabel == "string" ? e.valueLabel : (l = e.valueLabel) == null ? void 0 : l.call(e, s.value, e.max);
|
|
29
|
+
});
|
|
30
|
+
return (l, t) => (y(), p("div", {
|
|
31
|
+
id: e.id,
|
|
32
|
+
class: x(["q-meter", e.class])
|
|
33
|
+
}, [
|
|
34
|
+
o("div", g, [
|
|
35
|
+
n(c(u), {
|
|
36
|
+
label: e.label
|
|
37
|
+
}, null, 8, ["label"]),
|
|
38
|
+
n(c(u), {
|
|
39
|
+
label: _.value,
|
|
40
|
+
class: "q-meter__value-label"
|
|
41
|
+
}, null, 8, ["label"])
|
|
42
|
+
]),
|
|
43
|
+
o("div", k, [
|
|
44
|
+
o(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
class: "q-meter__fill",
|
|
48
|
+
style: C(i.value)
|
|
49
|
+
},
|
|
50
|
+
null,
|
|
51
|
+
4
|
|
52
|
+
/* STYLE */
|
|
53
|
+
)
|
|
54
|
+
])
|
|
55
|
+
], 10, M));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
w as default
|
|
60
|
+
};
|