@guoyg578/k-ui 0.1.0 → 0.1.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/README.md +66 -22
- package/dist/components/KAlert.vue.d.ts +1 -1
- package/dist/components/{KAlert.js → KAlert.vue.js} +2 -2
- package/dist/components/KAlert.vue_vue_type_script_setup_true_lang.js +35 -32
- package/dist/components/{KAvatar.js → KAvatar.vue.js} +1 -1
- package/dist/components/{KAvatarGroup.js → KAvatarGroup.vue.js} +1 -1
- package/dist/components/KBreadcrumb.vue.d.ts +30 -1
- package/dist/components/{KBreadcrumb.js → KBreadcrumb.vue.js} +2 -2
- package/dist/components/KBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -21
- package/dist/components/KButton.vue.d.ts +17 -2
- package/dist/components/{KButton.js → KButton.vue.js} +2 -2
- package/dist/components/KButton.vue_vue_type_script_setup_true_lang.js +51 -17
- package/dist/components/KCard.vue.d.ts +5 -3
- package/dist/components/{KCard.js → KCard.vue.js} +2 -2
- package/dist/components/KCard.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/{KCarousel.js → KCarousel.vue.js} +1 -1
- package/dist/components/{KCheckbox.js → KCheckbox.vue.js} +1 -1
- package/dist/components/{KCheckboxGroup.js → KCheckboxGroup.vue.js} +1 -1
- package/dist/components/KColorPicker.vue.d.ts +40 -0
- package/dist/components/KColorPicker.vue.js +7 -0
- package/dist/components/KColorPicker.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/{KCombobox.js → KCombobox.vue.js} +2 -2
- package/dist/components/{KCommandPalette.js → KCommandPalette.vue.js} +1 -1
- package/dist/components/KConfigProvider.vue.d.ts +26 -0
- package/dist/components/KConfigProvider.vue.js +5 -0
- package/dist/components/KConfigProvider.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/{KConfirmDialog.js → KConfirmDialog.vue.js} +1 -1
- package/dist/components/KDataTable.vue.d.ts +33 -10
- package/dist/components/{KDataTable.js → KDataTable.vue.js} +2 -2
- package/dist/components/KDataTable.vue_vue_type_script_setup_true_lang.js +128 -30
- package/dist/components/{KDatePicker.js → KDatePicker.vue.js} +1 -1
- package/dist/components/KDatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/KDescriptions.vue.d.ts +30 -0
- package/dist/components/KDescriptions.vue.js +6 -0
- package/dist/components/KDescriptions.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/KDescriptionsItem.vue.d.ts +17 -0
- package/dist/components/KDescriptionsItem.vue.js +5 -0
- package/dist/components/KDescriptionsItem.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/KDialog.vue.d.ts +1 -0
- package/dist/components/{KDialog.js → KDialog.vue.js} +2 -2
- package/dist/components/KDialog.vue_vue_type_script_setup_true_lang.js +45 -38
- package/dist/components/{KDiff.js → KDiff.vue.js} +1 -1
- package/dist/components/KDrawer.vue.d.ts +7 -3
- package/dist/components/{KDrawer.js → KDrawer.vue.js} +2 -2
- package/dist/components/KDrawer.vue_vue_type_script_setup_true_lang.js +41 -29
- package/dist/components/KDropdown.vue.d.ts +7 -4
- package/dist/components/{KDropdown.js → KDropdown.vue.js} +2 -2
- package/dist/components/KDropdown.vue_vue_type_script_setup_true_lang.js +40 -38
- package/dist/components/KEmpty.vue.d.ts +8 -4
- package/dist/components/KEmpty.vue_vue_type_script_setup_true_lang.js +17 -14
- package/dist/components/KForm.vue.d.ts +12 -6
- package/dist/components/{KForm.js → KForm.vue.js} +2 -2
- package/dist/components/KForm.vue_vue_type_script_setup_true_lang.js +31 -15
- package/dist/components/KFormField.vue.d.ts +3 -2
- package/dist/components/{KFormField.js → KFormField.vue.js} +2 -2
- package/dist/components/KFormField.vue_vue_type_script_setup_true_lang.js +41 -28
- package/dist/components/KIcon.vue.d.ts +22 -0
- package/dist/components/KIcon.vue.js +7 -0
- package/dist/components/KIcon.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/KImage.vue.d.ts +3 -3
- package/dist/components/{KImage.js → KImage.vue.js} +1 -1
- package/dist/components/KImage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/{KImageViewer.js → KImageViewer.vue.js} +1 -1
- package/dist/components/KInput.vue.d.ts +11 -5
- package/dist/components/{KInput.js → KInput.vue.js} +2 -2
- package/dist/components/KInput.vue_vue_type_script_setup_true_lang.js +62 -38
- package/dist/components/KInputNumber.vue.d.ts +18 -4
- package/dist/components/{KInputNumber.js → KInputNumber.vue.js} +2 -2
- package/dist/components/KInputNumber.vue_vue_type_script_setup_true_lang.js +80 -62
- package/dist/components/{KLoadingOverlay.js → KLoadingOverlay.vue.js} +1 -1
- package/dist/components/KMessage.js +1 -1
- package/dist/components/{KMessageContainer.js → KMessageContainer.vue.js} +1 -1
- package/dist/components/KNotification.d.ts +36 -0
- package/dist/components/KNotification.js +55 -0
- package/dist/components/KNotificationContainer.vue.d.ts +20 -0
- package/dist/components/KNotificationContainer.vue.js +7 -0
- package/dist/components/KNotificationContainer.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/KNotificationProvider.vue.d.ts +13 -0
- package/dist/components/KNotificationProvider.vue.js +10 -0
- package/dist/components/{KPagination.js → KPagination.vue.js} +1 -1
- package/dist/components/KPopconfirm.vue.d.ts +46 -0
- package/dist/components/KPopconfirm.vue.js +6 -0
- package/dist/components/KPopconfirm.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/{KPopover.js → KPopover.vue.js} +1 -1
- package/dist/components/KProgress.vue.d.ts +3 -2
- package/dist/components/{KProgress.js → KProgress.vue.js} +2 -2
- package/dist/components/KProgress.vue_vue_type_script_setup_true_lang.js +23 -20
- package/dist/components/{KRadio.js → KRadio.vue.js} +1 -1
- package/dist/components/{KRadioGroup.js → KRadioGroup.vue.js} +1 -1
- package/dist/components/{KResizablePanel.js → KResizablePanel.vue.js} +1 -1
- package/dist/components/{KResult.js → KResult.vue.js} +1 -1
- package/dist/components/KSelect.vue.d.ts +10 -3
- package/dist/components/{KSelect.js → KSelect.vue.js} +4 -4
- package/dist/components/KSelect.vue_vue_type_script_setup_true_lang.js +89 -48
- package/dist/components/{KSkeleton.js → KSkeleton.vue.js} +1 -1
- package/dist/components/KSlider.vue.d.ts +24 -0
- package/dist/components/KSlider.vue.js +7 -0
- package/dist/components/KSlider.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/KSpin.vue.d.ts +23 -0
- package/dist/components/KSpin.vue.js +7 -0
- package/dist/components/KSpin.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/KSteps.vue.d.ts +1 -1
- package/dist/components/{KSteps.js → KSteps.vue.js} +1 -1
- package/dist/components/KSwitch.vue.d.ts +2 -2
- package/dist/components/{KSwitch.js → KSwitch.vue.js} +2 -2
- package/dist/components/KSwitch.vue_vue_type_script_setup_true_lang.js +12 -11
- package/dist/components/KTabs.vue.d.ts +10 -5
- package/dist/components/{KTabs.js → KTabs.vue.js} +2 -2
- package/dist/components/KTabs.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/components/KTag.vue.d.ts +3 -3
- package/dist/components/{KTag.js → KTag.vue.js} +2 -2
- package/dist/components/KTag.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/components/KTextarea.vue.d.ts +17 -2
- package/dist/components/{KTextarea.js → KTextarea.vue.js} +2 -2
- package/dist/components/KTextarea.vue_vue_type_script_setup_true_lang.js +51 -22
- package/dist/components/{KThemeToggleButton.js → KThemeToggleButton.vue.js} +1 -1
- package/dist/components/{KTooltip.js → KTooltip.vue.js} +1 -1
- package/dist/components/{KTreeNode.js → KTreeNode.vue.js} +1 -1
- package/dist/components/{KTreeView.js → KTreeView.vue.js} +1 -1
- package/dist/components/KTreeView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/KUpload.vue.d.ts +100 -4
- package/dist/components/{KUpload.js → KUpload.vue.js} +2 -2
- package/dist/components/KUpload.vue_vue_type_script_setup_true_lang.js +189 -94
- package/dist/components/KUploadDragger.vue.d.ts +13 -0
- package/dist/components/KUploadDragger.vue.js +7 -0
- package/dist/components/KUploadDragger.vue_vue_type_script_setup_true_lang.js +12 -0
- package/dist/components/{KVirtualList.js → KVirtualList.vue.js} +1 -1
- package/dist/components/form-context.d.ts +7 -3
- package/dist/components/upload-context.d.ts +6 -0
- package/dist/components/upload-context.js +4 -0
- package/dist/index.d.ts +17 -3
- package/dist/index.js +66 -55
- package/dist/k-ui.css +1 -1
- package/package.json +6 -12
- /package/dist/components/{KEmpty.js → KEmpty.vue.js} +0 -0
- /package/dist/components/{KGridSkeleton.js → KGridSkeleton.vue.js} +0 -0
- /package/dist/components/{KListSkeleton.js → KListSkeleton.vue.js} +0 -0
- /package/dist/components/{KRefetchOverlay.js → KRefetchOverlay.vue.js} +0 -0
- /package/dist/components/{KSearchBar.js → KSearchBar.vue.js} +0 -0
|
@@ -37,7 +37,8 @@ var h = {
|
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: !1
|
|
39
39
|
},
|
|
40
|
-
strokeWidth: {}
|
|
40
|
+
strokeWidth: {},
|
|
41
|
+
height: {}
|
|
41
42
|
},
|
|
42
43
|
setup(o) {
|
|
43
44
|
let b = o, x = e(() => b.indeterminate ? 0 : Math.min(100, Math.max(0, b.value / b.max * 100))), S = {
|
|
@@ -45,19 +46,20 @@ var h = {
|
|
|
45
46
|
success: "#10b981",
|
|
46
47
|
warning: "#d97706",
|
|
47
48
|
error: "#dc2626"
|
|
48
|
-
}, C = e(() => S[b.color]), w = e(() => {
|
|
49
|
+
}, C = e(() => S[b.color] ?? b.color), w = e(() => ({ height: b.height === void 0 ? void 0 : typeof b.height == "number" ? `${b.height}px` : b.height })), T = e(() => {
|
|
49
50
|
let e = b.size === "sm" ? 36 : b.size === "lg" ? 72 : 56, t = b.strokeWidth ?? (b.size === "sm" ? 4 : b.size === "lg" ? 7 : 5);
|
|
50
51
|
return {
|
|
51
52
|
size: e,
|
|
52
53
|
sw: t,
|
|
53
54
|
r: (e - t) / 2
|
|
54
55
|
};
|
|
55
|
-
}),
|
|
56
|
+
}), E = e(() => 2 * Math.PI * T.value.r), D = e(() => E.value * (1 - x.value / 100));
|
|
56
57
|
return (e, b) => o.type === "line" ? (l(), t(d(m), {
|
|
57
58
|
key: 0,
|
|
58
59
|
"model-value": o.indeterminate ? null : o.value,
|
|
59
60
|
max: o.max,
|
|
60
|
-
class: s(["k-prog", [`k-prog--${o.size}`, { "k-prog--indeterminate": o.indeterminate }]])
|
|
61
|
+
class: s(["k-prog", [`k-prog--${o.size}`, { "k-prog--indeterminate": o.indeterminate }]]),
|
|
62
|
+
style: c(w.value)
|
|
61
63
|
}, {
|
|
62
64
|
default: f(() => [a(d(p), {
|
|
63
65
|
class: "k-prog__bar",
|
|
@@ -70,36 +72,37 @@ var h = {
|
|
|
70
72
|
}, 8, [
|
|
71
73
|
"model-value",
|
|
72
74
|
"max",
|
|
73
|
-
"class"
|
|
75
|
+
"class",
|
|
76
|
+
"style"
|
|
74
77
|
])) : (l(), r("div", {
|
|
75
78
|
key: 1,
|
|
76
79
|
class: "k-prog-circle",
|
|
77
80
|
style: c({
|
|
78
|
-
width:
|
|
79
|
-
height:
|
|
81
|
+
width: T.value.size + "px",
|
|
82
|
+
height: T.value.size + "px"
|
|
80
83
|
})
|
|
81
84
|
}, [(l(), r("svg", {
|
|
82
|
-
width:
|
|
83
|
-
height:
|
|
85
|
+
width: T.value.size,
|
|
86
|
+
height: T.value.size,
|
|
84
87
|
class: s({ "k-prog-circle--spin": o.indeterminate })
|
|
85
88
|
}, [i("circle", {
|
|
86
|
-
cx:
|
|
87
|
-
cy:
|
|
88
|
-
r:
|
|
89
|
-
"stroke-width":
|
|
89
|
+
cx: T.value.size / 2,
|
|
90
|
+
cy: T.value.size / 2,
|
|
91
|
+
r: T.value.r,
|
|
92
|
+
"stroke-width": T.value.sw,
|
|
90
93
|
stroke: "var(--color-ink-100)",
|
|
91
94
|
fill: "none"
|
|
92
95
|
}, null, 8, _), i("circle", {
|
|
93
|
-
cx:
|
|
94
|
-
cy:
|
|
95
|
-
r:
|
|
96
|
-
"stroke-width":
|
|
96
|
+
cx: T.value.size / 2,
|
|
97
|
+
cy: T.value.size / 2,
|
|
98
|
+
r: T.value.r,
|
|
99
|
+
"stroke-width": T.value.sw,
|
|
97
100
|
stroke: C.value,
|
|
98
|
-
"stroke-dasharray": o.indeterminate ? `${
|
|
99
|
-
"stroke-dashoffset": o.indeterminate ? 0 :
|
|
101
|
+
"stroke-dasharray": o.indeterminate ? `${E.value * .3} ${E.value}` : E.value,
|
|
102
|
+
"stroke-dashoffset": o.indeterminate ? 0 : D.value,
|
|
100
103
|
fill: "none",
|
|
101
104
|
"stroke-linecap": "round",
|
|
102
|
-
transform: `rotate(-90 ${
|
|
105
|
+
transform: `rotate(-90 ${T.value.size / 2} ${T.value.size / 2})`,
|
|
103
106
|
class: "k-prog-circle__indicator"
|
|
104
107
|
}, null, 8, v)], 10, g)), o.showText && !o.indeterminate ? (l(), r("span", y, u(Math.round(x.value)) + "% ", 1)) : n("", !0)], 4));
|
|
105
108
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KRadio.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KRadio.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-47a8aaeb"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KRadioGroup.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KRadioGroup.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-f6d3b657"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KResizablePanel.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KResizablePanel.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-d820b958"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KResult.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KResult.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-3e113a12"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
interface Option {
|
|
2
|
-
value: string;
|
|
2
|
+
value: string | number;
|
|
3
3
|
label: string;
|
|
4
4
|
hint?: string;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
type __VLS_Props = {
|
|
7
8
|
modelValue: string | number | null | undefined;
|
|
8
9
|
options: Option[];
|
|
9
10
|
placeholder?: string;
|
|
10
|
-
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
size?: 'tiny' | 'xs' | 'small' | 'sm' | 'medium' | 'md' | 'large' | 'lg';
|
|
11
12
|
disabled?: boolean;
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
filterable?: boolean;
|
|
15
|
+
filterPlaceholder?: string;
|
|
12
16
|
};
|
|
13
17
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
18
|
"update:modelValue": (v: string | number) => any;
|
|
15
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
20
|
"onUpdate:modelValue"?: ((v: string | number) => any) | undefined;
|
|
17
21
|
}>, {
|
|
18
|
-
size: "sm" | "md" | "lg";
|
|
22
|
+
size: "tiny" | "xs" | "small" | "sm" | "medium" | "md" | "large" | "lg";
|
|
19
23
|
disabled: boolean;
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
filterable: boolean;
|
|
26
|
+
filterPlaceholder: string;
|
|
20
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
28
|
declare const _default: typeof __VLS_export;
|
|
22
29
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KSelect.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
4
|
-
/* empty css
|
|
5
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
6
|
//#region components/KSelect.vue
|
|
7
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
7
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b8c18845"]]);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { n as default };
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i,
|
|
2
|
-
import { Check as
|
|
3
|
-
import { SelectContent 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, normalizeClass as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, vModelText as h, withCtx as g, withDirectives as _, withModifiers as v } from "vue";
|
|
2
|
+
import { Check as y, ChevronDown as b, X as x } from "lucide-vue-next";
|
|
3
|
+
import { SelectContent as S, SelectIcon as C, SelectItem as w, SelectItemIndicator as T, SelectItemText as E, SelectPortal as D, SelectRoot as O, SelectTrigger as k, SelectValue as A, SelectViewport as j } from "reka-ui";
|
|
4
4
|
//#region components/KSelect.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var M = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "k-select-search"
|
|
8
|
+
}, N = ["placeholder"], P = {
|
|
6
9
|
key: 0,
|
|
7
10
|
class: "k-select-hint"
|
|
8
|
-
},
|
|
11
|
+
}, F = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "k-select-empty"
|
|
14
|
+
}, I = /* @__PURE__ */ c({
|
|
9
15
|
__name: "KSelect",
|
|
10
16
|
props: {
|
|
11
17
|
modelValue: {},
|
|
@@ -15,73 +21,108 @@ var D = {
|
|
|
15
21
|
disabled: {
|
|
16
22
|
type: Boolean,
|
|
17
23
|
default: !1
|
|
18
|
-
}
|
|
24
|
+
},
|
|
25
|
+
clearable: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
filterable: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
filterPlaceholder: { default: "搜索" }
|
|
19
34
|
},
|
|
20
35
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
let
|
|
23
|
-
function
|
|
36
|
+
setup(c, { emit: I }) {
|
|
37
|
+
let L = c, R = I, z = t(() => L.modelValue == null || L.modelValue === "" ? "__none__" : String(L.modelValue)), B = t(() => L.size === "tiny" || L.size === "xs" || L.size === "small" || L.size === "sm" ? "sm" : L.size === "large" || L.size === "lg" ? "lg" : "md");
|
|
38
|
+
function V(e) {
|
|
24
39
|
let t = e === "__none__" ? "" : e ?? "";
|
|
25
|
-
typeof
|
|
40
|
+
typeof L.modelValue == "number" && t !== "" && /^-?\d+(\.\d+)?$/.test(t) ? R("update:modelValue", Number(t)) : R("update:modelValue", t);
|
|
26
41
|
}
|
|
27
|
-
let
|
|
28
|
-
let e =
|
|
29
|
-
return
|
|
30
|
-
}),
|
|
42
|
+
let H = t(() => {
|
|
43
|
+
let e = L.modelValue == null ? "" : String(L.modelValue);
|
|
44
|
+
return L.options.find((t) => String(t.value) === e)?.label ?? L.placeholder ?? "请选择";
|
|
45
|
+
}), U = d(""), W = t(() => {
|
|
46
|
+
let e = U.value.trim().toLowerCase();
|
|
47
|
+
return !L.filterable || !e ? L.options : L.options.filter((t) => `${t.label} ${t.value} ${t.hint ?? ""}`.toLowerCase().includes(e));
|
|
48
|
+
}), G = t(() => W.value.some((e) => e.value === "") ? W.value.map((e) => e.value === "" ? {
|
|
31
49
|
...e,
|
|
32
50
|
value: "__none__"
|
|
33
|
-
} : e) :
|
|
34
|
-
function
|
|
35
|
-
|
|
51
|
+
} : e) : W.value), K = d(!1);
|
|
52
|
+
function q() {
|
|
53
|
+
K.value = !1, U.value = "";
|
|
54
|
+
}
|
|
55
|
+
function J() {
|
|
56
|
+
K.value = !0;
|
|
36
57
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
58
|
+
function Y(e) {
|
|
59
|
+
e.preventDefault(), e.stopPropagation(), R("update:modelValue", "");
|
|
39
60
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"onUpdate:
|
|
61
|
+
let X = t(() => L.clearable && !L.disabled && L.modelValue !== null && L.modelValue !== void 0 && L.modelValue !== "");
|
|
62
|
+
return (t, d) => (u(), n(m(O), {
|
|
63
|
+
"model-value": z.value,
|
|
64
|
+
disabled: c.disabled,
|
|
65
|
+
"onUpdate:open": q,
|
|
66
|
+
"onUpdate:modelValue": d[4] ||= (e) => V(e)
|
|
45
67
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
default:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
default: g(() => [s(m(k), { class: l(["k-select-trigger", [`k-select-trigger--${B.value}`, { "k-select-trigger--disabled": c.disabled }]]) }, {
|
|
69
|
+
default: g(() => [
|
|
70
|
+
s(m(A), null, {
|
|
71
|
+
default: g(() => [o(p(H.value), 1)]),
|
|
72
|
+
_: 1
|
|
73
|
+
}),
|
|
74
|
+
X.value ? (u(), i("span", {
|
|
75
|
+
key: 0,
|
|
76
|
+
role: "button",
|
|
77
|
+
class: "k-select-clear",
|
|
78
|
+
tabindex: "-1",
|
|
79
|
+
"aria-label": "清空",
|
|
80
|
+
onPointerdown: d[0] ||= v(() => {}, ["stop", "prevent"]),
|
|
81
|
+
onClick: Y
|
|
82
|
+
}, [s(m(x), { size: 11 })], 32)) : r("", !0),
|
|
83
|
+
s(m(C), { class: "k-select-icon" }, {
|
|
84
|
+
default: g(() => [s(m(b), { size: 14 })]),
|
|
85
|
+
_: 1
|
|
86
|
+
})
|
|
87
|
+
]),
|
|
54
88
|
_: 1
|
|
55
|
-
}, 8, ["class"]),
|
|
56
|
-
default:
|
|
57
|
-
class:
|
|
89
|
+
}, 8, ["class"]), s(m(D), null, {
|
|
90
|
+
default: g(() => [s(m(S), {
|
|
91
|
+
class: l(["k-select-content k-menu-surface", { "k-select-content--navigating": K.value }]),
|
|
58
92
|
position: "popper",
|
|
59
93
|
"side-offset": 6,
|
|
60
94
|
align: "start",
|
|
61
95
|
"body-lock": !1,
|
|
62
96
|
"disable-outside-pointer-events": !1,
|
|
63
|
-
onPointermove:
|
|
64
|
-
onKeydown:
|
|
97
|
+
onPointermove: J,
|
|
98
|
+
onKeydown: J
|
|
65
99
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
100
|
+
default: g(() => [c.filterable ? (u(), i("div", M, [_(a("input", {
|
|
101
|
+
"onUpdate:modelValue": d[1] ||= (e) => U.value = e,
|
|
102
|
+
class: "k-select-search__input",
|
|
103
|
+
placeholder: c.filterPlaceholder,
|
|
104
|
+
onKeydown: d[2] ||= v(() => {}, ["stop"]),
|
|
105
|
+
onPointerdown: d[3] ||= v(() => {}, ["stop"])
|
|
106
|
+
}, null, 40, N), [[h, U.value]])])) : r("", !0), s(m(j), { class: "k-select-viewport" }, {
|
|
107
|
+
default: g(() => [(u(!0), i(e, null, f(G.value, (e) => (u(), n(m(w), {
|
|
68
108
|
key: e.value,
|
|
69
|
-
value: e.value,
|
|
109
|
+
value: String(e.value),
|
|
110
|
+
disabled: e.disabled,
|
|
70
111
|
class: "k-select-item k-menu-item"
|
|
71
112
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
|
|
74
|
-
default:
|
|
113
|
+
default: g(() => [
|
|
114
|
+
s(m(T), { class: "k-select-indicator" }, {
|
|
115
|
+
default: g(() => [s(m(y), { size: 12 })]),
|
|
75
116
|
_: 1
|
|
76
117
|
}),
|
|
77
|
-
|
|
78
|
-
default:
|
|
118
|
+
s(m(E), null, {
|
|
119
|
+
default: g(() => [o(p(e.label), 1)]),
|
|
79
120
|
_: 2
|
|
80
121
|
}, 1024),
|
|
81
|
-
e.hint ? (
|
|
122
|
+
e.hint ? (u(), i("span", P, p(e.hint), 1)) : r("", !0)
|
|
82
123
|
]),
|
|
83
124
|
_: 2
|
|
84
|
-
}, 1032, ["value"]))), 128))]),
|
|
125
|
+
}, 1032, ["value", "disabled"]))), 128)), G.value.length === 0 ? (u(), i("div", F, " 无匹配项 ")) : r("", !0)]),
|
|
85
126
|
_: 1
|
|
86
127
|
})]),
|
|
87
128
|
_: 1
|
|
@@ -93,4 +134,4 @@ var D = {
|
|
|
93
134
|
}
|
|
94
135
|
});
|
|
95
136
|
//#endregion
|
|
96
|
-
export {
|
|
137
|
+
export { I as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KSkeleton.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KSkeleton.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-6d46b4b4"]]);
|
|
6
6
|
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: number | [number, number];
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: number;
|
|
6
|
+
range?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
showTooltip?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
"update:modelValue": (v: number | [number, number]) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((v: number | [number, number]) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
max: number;
|
|
17
|
+
min: number;
|
|
18
|
+
modelValue: number | [number, number];
|
|
19
|
+
range: boolean;
|
|
20
|
+
step: number;
|
|
21
|
+
showTooltip: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./KSlider.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/KSlider.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-40d1535e"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, toDisplayString as c } from "vue";
|
|
2
|
+
//#region components/KSlider.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var l = { class: "k-slider__rail" }, u = [
|
|
4
|
+
"min",
|
|
5
|
+
"max",
|
|
6
|
+
"step",
|
|
7
|
+
"value",
|
|
8
|
+
"disabled"
|
|
9
|
+
], d = [
|
|
10
|
+
"min",
|
|
11
|
+
"max",
|
|
12
|
+
"step",
|
|
13
|
+
"value",
|
|
14
|
+
"disabled"
|
|
15
|
+
], f = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "k-slider__value"
|
|
18
|
+
}, p = /* @__PURE__ */ i({
|
|
19
|
+
__name: "KSlider",
|
|
20
|
+
props: {
|
|
21
|
+
modelValue: { default: 0 },
|
|
22
|
+
min: { default: 0 },
|
|
23
|
+
max: { default: 100 },
|
|
24
|
+
step: { default: 1 },
|
|
25
|
+
range: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
showTooltip: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !0
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["update:modelValue"],
|
|
39
|
+
setup(i, { emit: p }) {
|
|
40
|
+
let m = i, h = p, g = e(() => Array.isArray(m.modelValue) ? [m.modelValue[0], m.modelValue[1]] : [m.min, Number(m.modelValue ?? m.min)]), _ = e(() => Math.min(g.value[0], g.value[1])), v = e(() => Math.max(g.value[0], g.value[1])), y = e(() => (_.value - m.min) / (m.max - m.min) * 100), b = e(() => (v.value - m.min) / (m.max - m.min) * 100), x = e(() => ({
|
|
41
|
+
left: `${m.range ? y.value : 0}%`,
|
|
42
|
+
width: `${m.range ? b.value - y.value : b.value}%`
|
|
43
|
+
}));
|
|
44
|
+
function S(e) {
|
|
45
|
+
h("update:modelValue", Number(e));
|
|
46
|
+
}
|
|
47
|
+
function C(e, t) {
|
|
48
|
+
let n = [...g.value];
|
|
49
|
+
n[e] = Number(t), h("update:modelValue", [Math.min(n[0], n[1]), Math.max(n[0], n[1])]);
|
|
50
|
+
}
|
|
51
|
+
return (e, p) => (s(), n("div", { class: a(["k-slider", { "k-slider--disabled": i.disabled }]) }, [
|
|
52
|
+
r("div", l, [r("div", {
|
|
53
|
+
class: "k-slider__fill",
|
|
54
|
+
style: o(x.value)
|
|
55
|
+
}, null, 4)]),
|
|
56
|
+
i.range ? (s(), n("input", {
|
|
57
|
+
key: 0,
|
|
58
|
+
type: "range",
|
|
59
|
+
class: "k-slider__input",
|
|
60
|
+
min: i.min,
|
|
61
|
+
max: i.max,
|
|
62
|
+
step: i.step,
|
|
63
|
+
value: g.value[0],
|
|
64
|
+
disabled: i.disabled,
|
|
65
|
+
onInput: p[0] ||= (e) => C(0, e.target.value)
|
|
66
|
+
}, null, 40, u)) : t("", !0),
|
|
67
|
+
r("input", {
|
|
68
|
+
type: "range",
|
|
69
|
+
class: "k-slider__input",
|
|
70
|
+
min: i.min,
|
|
71
|
+
max: i.max,
|
|
72
|
+
step: i.step,
|
|
73
|
+
value: i.range ? g.value[1] : i.modelValue,
|
|
74
|
+
disabled: i.disabled,
|
|
75
|
+
onInput: p[1] ||= (e) => i.range ? C(1, e.target.value) : S(e.target.value)
|
|
76
|
+
}, null, 40, d),
|
|
77
|
+
i.showTooltip ? (s(), n("div", f, c(i.range ? `${_.value} - ${v.value}` : i.modelValue), 1)) : t("", !0)
|
|
78
|
+
], 2));
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
//#endregion
|
|
82
|
+
export { p as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
show?: boolean;
|
|
3
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | number;
|
|
4
|
+
label?: string;
|
|
5
|
+
overlay?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_6: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_6) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
size: "xs" | "sm" | "md" | "lg" | number;
|
|
13
|
+
show: boolean;
|
|
14
|
+
overlay: boolean;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./KSpin.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/KSpin.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-2e3fcfe6"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { computed as e, createCommentVNode as t, createElementBlock as n, createTextVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderSlot as c, toDisplayString as l, unref as u } from "vue";
|
|
2
|
+
import { Loader2 as d } from "lucide-vue-next";
|
|
3
|
+
//#region components/KSpin.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var f = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "k-spin__label"
|
|
7
|
+
}, p = /* @__PURE__ */ a({
|
|
8
|
+
__name: "KSpin",
|
|
9
|
+
props: {
|
|
10
|
+
show: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !0
|
|
13
|
+
},
|
|
14
|
+
size: { default: "md" },
|
|
15
|
+
label: {},
|
|
16
|
+
overlay: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
setup(a) {
|
|
22
|
+
let p = a, m = e(() => typeof p.size == "number" ? p.size : p.size === "xs" ? 14 : p.size === "sm" ? 16 : p.size === "lg" ? 28 : 20);
|
|
23
|
+
return (e, p) => a.show ? (s(), n("span", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: o(["k-spin", { "k-spin--overlay": a.overlay }]),
|
|
26
|
+
role: "status",
|
|
27
|
+
"aria-live": "polite"
|
|
28
|
+
}, [i(u(d), {
|
|
29
|
+
class: "k-spin__icon",
|
|
30
|
+
size: m.value
|
|
31
|
+
}, null, 8, ["size"]), a.label || e.$slots.default ? (s(), n("span", f, [c(e.$slots, "default", {}, () => [r(l(a.label), 1)], !0)])) : t("", !0)], 2)) : t("", !0);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { p as default };
|
|
@@ -13,8 +13,8 @@ type __VLS_Props = {
|
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
14
|
size: "sm" | "md";
|
|
15
15
|
direction: "horizontal" | "vertical";
|
|
16
|
-
current: number;
|
|
17
16
|
status: "process" | "finish" | "error";
|
|
17
|
+
current: number;
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
20
20
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KSteps.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KSteps.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-c4a83d5d"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
modelValue?: boolean;
|
|
3
|
-
size?: 'sm' | 'md' | 'lg';
|
|
3
|
+
size?: 'small' | 'sm' | 'medium' | 'md' | 'large' | 'lg';
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -8,7 +8,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
9
|
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
10
10
|
}>, {
|
|
11
|
-
size: "sm" | "md" | "lg";
|
|
11
|
+
size: "small" | "sm" | "medium" | "md" | "large" | "lg";
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
modelValue: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KSwitch.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KSwitch.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-da80d372"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SwitchRoot as
|
|
1
|
+
import { computed as e, createBlock as t, createVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, unref as o, withCtx as s } from "vue";
|
|
2
|
+
import { SwitchRoot as c, SwitchThumb as l } from "reka-ui";
|
|
3
3
|
//#region components/KSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var u = /* @__PURE__ */ r({
|
|
5
5
|
__name: "KSwitch",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {
|
|
@@ -15,14 +15,15 @@ var l = /* @__PURE__ */ n({
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
setup(r) {
|
|
19
|
+
let u = r, d = e(() => u.size === "small" || u.size === "sm" ? "sm" : u.size === "large" || u.size === "lg" ? "lg" : "md");
|
|
20
|
+
return (e, u) => (a(), t(o(c), {
|
|
21
|
+
"model-value": r.modelValue,
|
|
22
|
+
disabled: r.disabled,
|
|
23
|
+
class: i(["k-switch", [`k-switch--${d.value}`, { "k-switch--disabled": r.disabled }]]),
|
|
24
|
+
"onUpdate:modelValue": u[0] ||= (t) => e.$emit("update:modelValue", t)
|
|
24
25
|
}, {
|
|
25
|
-
default:
|
|
26
|
+
default: s(() => [n(o(l), { class: "k-switch__thumb" })]),
|
|
26
27
|
_: 1
|
|
27
28
|
}, 8, [
|
|
28
29
|
"model-value",
|
|
@@ -32,4 +33,4 @@ var l = /* @__PURE__ */ n({
|
|
|
32
33
|
}
|
|
33
34
|
});
|
|
34
35
|
//#endregion
|
|
35
|
-
export {
|
|
36
|
+
export { u as default };
|