@guoyg578/k-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -0
  3. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  4. package/dist/components/KAlert.js +7 -0
  5. package/dist/components/KAlert.vue.d.ts +40 -0
  6. package/dist/components/KAlert.vue_vue_type_script_setup_true_lang.js +76 -0
  7. package/dist/components/KAvatar.js +7 -0
  8. package/dist/components/KAvatar.vue.d.ts +15 -0
  9. package/dist/components/KAvatar.vue_vue_type_script_setup_true_lang.js +53 -0
  10. package/dist/components/KAvatarGroup.js +7 -0
  11. package/dist/components/KAvatarGroup.vue.d.ts +18 -0
  12. package/dist/components/KAvatarGroup.vue_vue_type_script_setup_true_lang.js +11 -0
  13. package/dist/components/KBreadcrumb.js +7 -0
  14. package/dist/components/KBreadcrumb.vue.d.ts +12 -0
  15. package/dist/components/KBreadcrumb.vue_vue_type_script_setup_true_lang.js +38 -0
  16. package/dist/components/KButton.js +7 -0
  17. package/dist/components/KButton.vue.d.ts +36 -0
  18. package/dist/components/KButton.vue_vue_type_script_setup_true_lang.js +50 -0
  19. package/dist/components/KCard.js +7 -0
  20. package/dist/components/KCard.vue.d.ts +33 -0
  21. package/dist/components/KCard.vue_vue_type_script_setup_true_lang.js +50 -0
  22. package/dist/components/KCarousel.js +7 -0
  23. package/dist/components/KCarousel.vue.d.ts +59 -0
  24. package/dist/components/KCarousel.vue_vue_type_script_setup_true_lang.js +141 -0
  25. package/dist/components/KCheckbox.js +7 -0
  26. package/dist/components/KCheckbox.vue.d.ts +26 -0
  27. package/dist/components/KCheckbox.vue_vue_type_script_setup_true_lang.js +48 -0
  28. package/dist/components/KCheckboxGroup.js +7 -0
  29. package/dist/components/KCheckboxGroup.vue.d.ts +27 -0
  30. package/dist/components/KCheckboxGroup.vue_vue_type_script_setup_true_lang.js +36 -0
  31. package/dist/components/KCombobox.js +8 -0
  32. package/dist/components/KCombobox.vue.d.ts +28 -0
  33. package/dist/components/KCombobox.vue_vue_type_script_setup_true_lang.js +120 -0
  34. package/dist/components/KCommandPalette.js +7 -0
  35. package/dist/components/KCommandPalette.vue.d.ts +31 -0
  36. package/dist/components/KCommandPalette.vue_vue_type_script_setup_true_lang.js +169 -0
  37. package/dist/components/KConfirmDialog.js +6 -0
  38. package/dist/components/KConfirmDialog.vue.d.ts +3 -0
  39. package/dist/components/KConfirmDialog.vue_vue_type_script_setup_true_lang.js +48 -0
  40. package/dist/components/KDataTable.js +7 -0
  41. package/dist/components/KDataTable.vue.d.ts +47 -0
  42. package/dist/components/KDataTable.vue_vue_type_script_setup_true_lang.js +62 -0
  43. package/dist/components/KDatePicker.js +6 -0
  44. package/dist/components/KDatePicker.vue.d.ts +19 -0
  45. package/dist/components/KDatePicker.vue_vue_type_script_setup_true_lang.js +57 -0
  46. package/dist/components/KDialog.js +7 -0
  47. package/dist/components/KDialog.vue.d.ts +52 -0
  48. package/dist/components/KDialog.vue_vue_type_script_setup_true_lang.js +117 -0
  49. package/dist/components/KDiff.js +7 -0
  50. package/dist/components/KDiff.vue.d.ts +13 -0
  51. package/dist/components/KDiff.vue_vue_type_script_setup_true_lang.js +116 -0
  52. package/dist/components/KDrawer.js +7 -0
  53. package/dist/components/KDrawer.vue.d.ts +37 -0
  54. package/dist/components/KDrawer.vue_vue_type_script_setup_true_lang.js +81 -0
  55. package/dist/components/KDropdown.js +7 -0
  56. package/dist/components/KDropdown.vue.d.ts +56 -0
  57. package/dist/components/KDropdown.vue_vue_type_script_setup_true_lang.js +93 -0
  58. package/dist/components/KEmpty.js +5 -0
  59. package/dist/components/KEmpty.vue.d.ts +22 -0
  60. package/dist/components/KEmpty.vue_vue_type_script_setup_true_lang.js +30 -0
  61. package/dist/components/KForm.js +7 -0
  62. package/dist/components/KForm.vue.d.ts +38 -0
  63. package/dist/components/KForm.vue_vue_type_script_setup_true_lang.js +69 -0
  64. package/dist/components/KFormField.js +7 -0
  65. package/dist/components/KFormField.vue.d.ts +32 -0
  66. package/dist/components/KFormField.vue_vue_type_script_setup_true_lang.js +84 -0
  67. package/dist/components/KGridSkeleton.js +5 -0
  68. package/dist/components/KGridSkeleton.vue.d.ts +10 -0
  69. package/dist/components/KGridSkeleton.vue_vue_type_script_setup_true_lang.js +21 -0
  70. package/dist/components/KImage.js +7 -0
  71. package/dist/components/KImage.vue.d.ts +25 -0
  72. package/dist/components/KImage.vue_vue_type_script_setup_true_lang.js +97 -0
  73. package/dist/components/KImageViewer.js +7 -0
  74. package/dist/components/KImageViewer.vue.d.ts +14 -0
  75. package/dist/components/KImageViewer.vue_vue_type_script_setup_true_lang.js +108 -0
  76. package/dist/components/KInput.js +7 -0
  77. package/dist/components/KInput.vue.d.ts +43 -0
  78. package/dist/components/KInput.vue_vue_type_script_setup_true_lang.js +89 -0
  79. package/dist/components/KInputNumber.js +7 -0
  80. package/dist/components/KInputNumber.vue.d.ts +28 -0
  81. package/dist/components/KInputNumber.vue_vue_type_script_setup_true_lang.js +109 -0
  82. package/dist/components/KListSkeleton.js +5 -0
  83. package/dist/components/KListSkeleton.vue.d.ts +8 -0
  84. package/dist/components/KListSkeleton.vue_vue_type_script_setup_true_lang.js +14 -0
  85. package/dist/components/KLoadingOverlay.js +7 -0
  86. package/dist/components/KLoadingOverlay.vue.d.ts +11 -0
  87. package/dist/components/KLoadingOverlay.vue_vue_type_script_setup_true_lang.js +34 -0
  88. package/dist/components/KMessage.d.ts +20 -0
  89. package/dist/components/KMessage.js +55 -0
  90. package/dist/components/KMessageContainer.js +7 -0
  91. package/dist/components/KMessageContainer.vue.d.ts +15 -0
  92. package/dist/components/KMessageContainer.vue_vue_type_script_setup_true_lang.js +41 -0
  93. package/dist/components/KPagination.js +7 -0
  94. package/dist/components/KPagination.vue.d.ts +14 -0
  95. package/dist/components/KPagination.vue_vue_type_script_setup_true_lang.js +104 -0
  96. package/dist/components/KPopover.js +6 -0
  97. package/dist/components/KPopover.vue.d.ts +40 -0
  98. package/dist/components/KPopover.vue_vue_type_script_setup_true_lang.js +63 -0
  99. package/dist/components/KProgress.js +7 -0
  100. package/dist/components/KProgress.vue.d.ts +21 -0
  101. package/dist/components/KProgress.vue_vue_type_script_setup_true_lang.js +108 -0
  102. package/dist/components/KRadio.js +7 -0
  103. package/dist/components/KRadio.vue.d.ts +18 -0
  104. package/dist/components/KRadio.vue_vue_type_script_setup_true_lang.js +26 -0
  105. package/dist/components/KRadioGroup.js +7 -0
  106. package/dist/components/KRadioGroup.vue.d.ts +26 -0
  107. package/dist/components/KRadioGroup.vue_vue_type_script_setup_true_lang.js +32 -0
  108. package/dist/components/KRefetchOverlay.js +5 -0
  109. package/dist/components/KRefetchOverlay.vue.d.ts +8 -0
  110. package/dist/components/KRefetchOverlay.vue_vue_type_script_setup_true_lang.js +26 -0
  111. package/dist/components/KResizablePanel.js +7 -0
  112. package/dist/components/KResizablePanel.vue.d.ts +30 -0
  113. package/dist/components/KResizablePanel.vue_vue_type_script_setup_true_lang.js +57 -0
  114. package/dist/components/KResult.js +7 -0
  115. package/dist/components/KResult.vue.d.ts +29 -0
  116. package/dist/components/KResult.vue_vue_type_script_setup_true_lang.js +82 -0
  117. package/dist/components/KSearchBar.js +5 -0
  118. package/dist/components/KSearchBar.vue.d.ts +11 -0
  119. package/dist/components/KSearchBar.vue_vue_type_script_setup_true_lang.js +38 -0
  120. package/dist/components/KSelect.js +9 -0
  121. package/dist/components/KSelect.vue.d.ts +22 -0
  122. package/dist/components/KSelect.vue_vue_type_script_setup_true_lang.js +96 -0
  123. package/dist/components/KSkeleton.js +7 -0
  124. package/dist/components/KSkeleton.vue.d.ts +14 -0
  125. package/dist/components/KSkeleton.vue_vue_type_script_setup_true_lang.js +27 -0
  126. package/dist/components/KSteps.js +7 -0
  127. package/dist/components/KSteps.vue.d.ts +20 -0
  128. package/dist/components/KSteps.vue_vue_type_script_setup_true_lang.js +39 -0
  129. package/dist/components/KSwitch.js +7 -0
  130. package/dist/components/KSwitch.vue.d.ts +16 -0
  131. package/dist/components/KSwitch.vue_vue_type_script_setup_true_lang.js +35 -0
  132. package/dist/components/KTabs.js +7 -0
  133. package/dist/components/KTabs.vue.d.ts +35 -0
  134. package/dist/components/KTabs.vue_vue_type_script_setup_true_lang.js +47 -0
  135. package/dist/components/KTag.js +7 -0
  136. package/dist/components/KTag.vue.d.ts +32 -0
  137. package/dist/components/KTag.vue_vue_type_script_setup_true_lang.js +40 -0
  138. package/dist/components/KTextarea.js +7 -0
  139. package/dist/components/KTextarea.vue.d.ts +23 -0
  140. package/dist/components/KTextarea.vue_vue_type_script_setup_true_lang.js +51 -0
  141. package/dist/components/KThemeToggleButton.js +7 -0
  142. package/dist/components/KThemeToggleButton.vue.d.ts +14 -0
  143. package/dist/components/KThemeToggleButton.vue_vue_type_script_setup_true_lang.js +48 -0
  144. package/dist/components/KTooltip.js +6 -0
  145. package/dist/components/KTooltip.vue.d.ts +23 -0
  146. package/dist/components/KTooltip.vue_vue_type_script_setup_true_lang.js +49 -0
  147. package/dist/components/KTreeNode.js +7 -0
  148. package/dist/components/KTreeNode.vue.d.ts +8 -0
  149. package/dist/components/KTreeNode.vue_vue_type_script_setup_true_lang.js +47 -0
  150. package/dist/components/KTreeView.js +7 -0
  151. package/dist/components/KTreeView.vue.d.ts +22 -0
  152. package/dist/components/KTreeView.vue_vue_type_script_setup_true_lang.js +45 -0
  153. package/dist/components/KUpload.js +7 -0
  154. package/dist/components/KUpload.vue.d.ts +81 -0
  155. package/dist/components/KUpload.vue_vue_type_script_setup_true_lang.js +181 -0
  156. package/dist/components/KVirtualList.js +7 -0
  157. package/dist/components/KVirtualList.vue.d.ts +31 -0
  158. package/dist/components/KVirtualList.vue_vue_type_script_setup_true_lang.js +41 -0
  159. package/dist/components/form-context.d.ts +25 -0
  160. package/dist/components/form-context.js +4 -0
  161. package/dist/components/tree-context.d.ts +16 -0
  162. package/dist/components/tree-context.js +4 -0
  163. package/dist/composables/useConfirm.d.ts +17 -0
  164. package/dist/composables/useConfirm.js +31 -0
  165. package/dist/directives/index.d.ts +6 -0
  166. package/dist/directives/index.js +8 -0
  167. package/dist/directives/reveal.d.ts +20 -0
  168. package/dist/directives/reveal.js +18 -0
  169. package/dist/directives/spotlight.d.ts +22 -0
  170. package/dist/directives/spotlight.js +25 -0
  171. package/dist/index.d.ts +62 -0
  172. package/dist/index.js +55 -0
  173. package/dist/k-ui.css +2 -0
  174. package/dist/styles/components.css +92 -0
  175. package/dist/styles/index.css +2 -0
  176. package/dist/styles/menu.css +59 -0
  177. package/dist/styles/tokens.css +229 -0
  178. package/dist/types.d.ts +1 -0
  179. package/package.json +79 -0
@@ -0,0 +1,57 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, normalizeStyle as a, onBeforeUnmount as o, openBlock as s, ref as c, renderSlot as l } from "vue";
2
+ //#region components/KResizablePanel.vue?vue&type=script&setup=true&lang.ts
3
+ var u = { class: "k-resize__panel k-resize__panel--b" }, d = /* @__PURE__ */ r({
4
+ __name: "KResizablePanel",
5
+ props: {
6
+ direction: { default: "horizontal" },
7
+ defaultSize: { default: 50 },
8
+ asPercent: {
9
+ type: Boolean,
10
+ default: !0
11
+ },
12
+ min: { default: 10 },
13
+ max: { default: 90 }
14
+ },
15
+ setup(r) {
16
+ let d = r, f = c(d.defaultSize), p = c(!1), m = c(null);
17
+ function h(e) {
18
+ e.preventDefault(), p.value = !0, document.addEventListener("mousemove", g), document.addEventListener("mouseup", _), document.body.style.userSelect = "none", document.body.style.cursor = d.direction === "horizontal" ? "col-resize" : "row-resize";
19
+ }
20
+ function g(e) {
21
+ if (!p.value || !m.value) return;
22
+ let t = m.value.getBoundingClientRect();
23
+ if (d.direction === "horizontal") {
24
+ let n = e.clientX - t.left, r = t.width, i = d.asPercent ? n / r * 100 : n;
25
+ i = Math.max(d.min, Math.min(d.max, i)), f.value = i;
26
+ } else {
27
+ let n = e.clientY - t.top, r = t.height, i = d.asPercent ? n / r * 100 : n;
28
+ i = Math.max(d.min, Math.min(d.max, i)), f.value = i;
29
+ }
30
+ }
31
+ function _() {
32
+ p.value = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", _), document.body.style.userSelect = "", document.body.style.cursor = "";
33
+ }
34
+ o(_);
35
+ let v = e(() => {
36
+ let e = d.asPercent ? `${f.value}%` : `${f.value}px`;
37
+ return d.direction === "horizontal" ? { width: e } : { height: e };
38
+ });
39
+ return (e, o) => (s(), t("div", {
40
+ ref_key: "containerRef",
41
+ ref: m,
42
+ class: i(["k-resize", [`k-resize--${r.direction}`, { "k-resize--dragging": p.value }]])
43
+ }, [
44
+ n("div", {
45
+ class: "k-resize__panel k-resize__panel--a",
46
+ style: a(v.value)
47
+ }, [l(e.$slots, "a", {}, void 0, !0)], 4),
48
+ n("div", {
49
+ class: "k-resize__handle",
50
+ onMousedown: h
51
+ }, [...o[0] ||= [n("div", { class: "k-resize__handle-grip" }, null, -1)]], 32),
52
+ n("div", u, [l(e.$slots, "b", {}, void 0, !0)])
53
+ ], 2));
54
+ }
55
+ });
56
+ //#endregion
57
+ export { d as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KResult.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KResult.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-3e113a12"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,29 @@
1
+ import type { Component } from 'vue';
2
+ type ResultType = 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
3
+ type __VLS_Props = {
4
+ type?: ResultType;
5
+ title?: string;
6
+ description?: string;
7
+ icon?: Component;
8
+ };
9
+ declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {};
10
+ type __VLS_Slots = {} & {
11
+ icon?: (props: typeof __VLS_1) => any;
12
+ } & {
13
+ title?: (props: typeof __VLS_8) => any;
14
+ } & {
15
+ description?: (props: typeof __VLS_10) => any;
16
+ } & {
17
+ default?: (props: typeof __VLS_12) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ type: ResultType;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,82 @@
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, normalizeStyle as s, openBlock as c, renderSlot as l, resolveDynamicComponent as u, toDisplayString as d } from "vue";
2
+ import { AlertTriangle as f, CheckCircle2 as p, FileQuestion as m, Info as h, ServerCrash as g, ShieldX as _, XCircle as v } from "lucide-vue-next";
3
+ //#region components/KResult.vue?vue&type=script&setup=true&lang.ts
4
+ var y = { class: "k-result" }, b = { class: "k-result__title" }, x = {
5
+ key: 0,
6
+ class: "k-result__desc"
7
+ }, S = {
8
+ key: 1,
9
+ class: "k-result__extra"
10
+ }, C = /* @__PURE__ */ o({
11
+ __name: "KResult",
12
+ props: {
13
+ type: { default: "info" },
14
+ title: {},
15
+ description: {},
16
+ icon: {}
17
+ },
18
+ setup(o) {
19
+ let C = o, w = {
20
+ success: {
21
+ icon: p,
22
+ color: "#10b981",
23
+ bg: "#ecfdf5"
24
+ },
25
+ error: {
26
+ icon: v,
27
+ color: "#dc2626",
28
+ bg: "#fef2f2"
29
+ },
30
+ warning: {
31
+ icon: f,
32
+ color: "#d97706",
33
+ bg: "#fffbeb"
34
+ },
35
+ info: {
36
+ icon: h,
37
+ color: "#0c78e4",
38
+ bg: "#e8f1fb"
39
+ },
40
+ 404: {
41
+ icon: m,
42
+ color: "#0c78e4",
43
+ bg: "#e8f1fb"
44
+ },
45
+ 403: {
46
+ icon: _,
47
+ color: "#dc2626",
48
+ bg: "#fef2f2"
49
+ },
50
+ 500: {
51
+ icon: g,
52
+ color: "#dc2626",
53
+ bg: "#fef2f2"
54
+ }
55
+ }, T = e(() => w[C.type]), E = {
56
+ success: "操作成功",
57
+ error: "操作失败",
58
+ warning: "请注意",
59
+ info: "提示",
60
+ 404: "页面不存在",
61
+ 403: "无权访问",
62
+ 500: "服务器错误"
63
+ };
64
+ return (e, f) => (c(), r("div", y, [
65
+ i("div", {
66
+ class: "k-result__icon-wrap",
67
+ style: s({
68
+ background: T.value.bg,
69
+ color: T.value.color
70
+ })
71
+ }, [l(e.$slots, "icon", {}, () => [(c(), t(u(o.icon || T.value.icon), {
72
+ size: 44,
73
+ "stroke-width": 1.5
74
+ }))], !0)], 4),
75
+ i("h2", b, [l(e.$slots, "title", {}, () => [a(d(o.title || E[o.type]), 1)], !0)]),
76
+ o.description || e.$slots.description ? (c(), r("p", x, [l(e.$slots, "description", {}, () => [a(d(o.description), 1)], !0)])) : n("", !0),
77
+ e.$slots.default ? (c(), r("div", S, [l(e.$slots, "default", {}, void 0, !0)])) : n("", !0)
78
+ ]));
79
+ }
80
+ });
81
+ //#endregion
82
+ export { C as default };
@@ -0,0 +1,5 @@
1
+ import e from "./KSearchBar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/KSearchBar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ modelValue: string;
3
+ placeholder?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
+ "update:modelValue": (value: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createVNode as r, defineComponent as i, openBlock as a, unref as o } from "vue";
2
+ import { Search as s, X as c } from "lucide-vue-next";
3
+ //#region components/KSearchBar.vue?vue&type=script&setup=true&lang.ts
4
+ var l = { class: "relative w-full max-w-md sm:w-72" }, u = ["value", "placeholder"], d = /* @__PURE__ */ i({
5
+ __name: "KSearchBar",
6
+ props: {
7
+ modelValue: {},
8
+ placeholder: {}
9
+ },
10
+ emits: ["update:modelValue"],
11
+ setup(i) {
12
+ return (d, f) => (a(), t("div", l, [
13
+ r(o(s), {
14
+ "stroke-width": 1.75,
15
+ class: "pointer-events-none absolute left-3.5 top-1/2 size-4 -translate-y-1/2 text-ink-400"
16
+ }),
17
+ n("input", {
18
+ value: i.modelValue,
19
+ type: "text",
20
+ placeholder: i.placeholder ?? "搜索",
21
+ class: "k-input pl-10 pr-10",
22
+ onInput: f[0] ||= (e) => d.$emit("update:modelValue", e.target.value)
23
+ }, null, 40, u),
24
+ i.modelValue ? (a(), t("button", {
25
+ key: 0,
26
+ type: "button",
27
+ class: "absolute right-2.5 top-1/2 grid size-6 -translate-y-1/2 place-items-center rounded text-ink-400 transition-colors hover:bg-ink-100 hover:text-ink-700",
28
+ title: "清空搜索",
29
+ onClick: f[1] ||= (e) => d.$emit("update:modelValue", "")
30
+ }, [r(o(c), {
31
+ "stroke-width": 1.75,
32
+ class: "size-3.5"
33
+ })])) : e("", !0)
34
+ ]));
35
+ }
36
+ });
37
+ //#endregion
38
+ export { d as default };
@@ -0,0 +1,9 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KSelect.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ //#region components/KSelect.vue
7
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-dd228d42"]]);
8
+ //#endregion
9
+ export { n as default };
@@ -0,0 +1,22 @@
1
+ interface Option {
2
+ value: string;
3
+ label: string;
4
+ hint?: string;
5
+ }
6
+ type __VLS_Props = {
7
+ modelValue: string | number | null | undefined;
8
+ options: Option[];
9
+ placeholder?: string;
10
+ size?: 'sm' | 'md' | 'lg';
11
+ disabled?: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ "update:modelValue": (v: string | number) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((v: string | number) => any) | undefined;
17
+ }>, {
18
+ size: "sm" | "md" | "lg";
19
+ disabled: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,96 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
2
+ import { Check as h, ChevronDown as g } from "lucide-vue-next";
3
+ import { SelectContent as _, SelectIcon as v, SelectItem as y, SelectItemIndicator as b, SelectItemText as x, SelectPortal as S, SelectRoot as C, SelectTrigger as w, SelectValue as T, SelectViewport as E } from "reka-ui";
4
+ //#region components/KSelect.vue?vue&type=script&setup=true&lang.ts
5
+ var D = {
6
+ key: 0,
7
+ class: "k-select-hint"
8
+ }, O = /* @__PURE__ */ s({
9
+ __name: "KSelect",
10
+ props: {
11
+ modelValue: {},
12
+ options: {},
13
+ placeholder: {},
14
+ size: { default: "md" },
15
+ disabled: {
16
+ type: Boolean,
17
+ default: !1
18
+ }
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(s, { emit: O }) {
22
+ let k = s, A = O, j = t(() => k.modelValue == null || k.modelValue === "" ? "__none__" : String(k.modelValue));
23
+ function M(e) {
24
+ let t = e === "__none__" ? "" : e ?? "";
25
+ typeof k.modelValue == "number" && t !== "" && /^-?\d+(\.\d+)?$/.test(t) ? A("update:modelValue", Number(t)) : A("update:modelValue", t);
26
+ }
27
+ let N = t(() => {
28
+ let e = k.modelValue == null ? "" : String(k.modelValue);
29
+ return k.options.find((t) => t.value === e)?.label ?? k.placeholder ?? "请选择";
30
+ }), P = t(() => k.options.some((e) => e.value === "") ? k.options.map((e) => e.value === "" ? {
31
+ ...e,
32
+ value: "__none__"
33
+ } : e) : k.options), F = u(!1);
34
+ function I() {
35
+ F.value = !1;
36
+ }
37
+ function L() {
38
+ F.value = !0;
39
+ }
40
+ return (t, u) => (l(), n(p(C), {
41
+ "model-value": j.value,
42
+ disabled: s.disabled,
43
+ "onUpdate:open": I,
44
+ "onUpdate:modelValue": u[0] ||= (e) => M(e)
45
+ }, {
46
+ default: m(() => [o(p(w), { class: c(["k-select-trigger", [`k-select-trigger--${s.size}`, { "k-select-trigger--disabled": s.disabled }]]) }, {
47
+ default: m(() => [o(p(T), null, {
48
+ default: m(() => [a(f(N.value), 1)]),
49
+ _: 1
50
+ }), o(p(v), { class: "k-select-icon" }, {
51
+ default: m(() => [o(p(g), { size: 14 })]),
52
+ _: 1
53
+ })]),
54
+ _: 1
55
+ }, 8, ["class"]), o(p(S), null, {
56
+ default: m(() => [o(p(_), {
57
+ class: c(["k-select-content k-menu-surface", { "k-select-content--navigating": F.value }]),
58
+ position: "popper",
59
+ "side-offset": 6,
60
+ align: "start",
61
+ "body-lock": !1,
62
+ "disable-outside-pointer-events": !1,
63
+ onPointermove: L,
64
+ onKeydown: L
65
+ }, {
66
+ default: m(() => [o(p(E), { class: "k-select-viewport" }, {
67
+ default: m(() => [(l(!0), i(e, null, d(P.value, (e) => (l(), n(p(y), {
68
+ key: e.value,
69
+ value: e.value,
70
+ class: "k-select-item k-menu-item"
71
+ }, {
72
+ default: m(() => [
73
+ o(p(b), { class: "k-select-indicator" }, {
74
+ default: m(() => [o(p(h), { size: 12 })]),
75
+ _: 1
76
+ }),
77
+ o(p(x), null, {
78
+ default: m(() => [a(f(e.label), 1)]),
79
+ _: 2
80
+ }, 1024),
81
+ e.hint ? (l(), i("span", D, f(e.hint), 1)) : r("", !0)
82
+ ]),
83
+ _: 2
84
+ }, 1032, ["value"]))), 128))]),
85
+ _: 1
86
+ })]),
87
+ _: 1
88
+ }, 8, ["class"])]),
89
+ _: 1
90
+ })]),
91
+ _: 1
92
+ }, 8, ["model-value", "disabled"]));
93
+ }
94
+ });
95
+ //#endregion
96
+ export { O as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KSkeleton.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KSkeleton.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-6d46b4b4"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ shape?: 'rect' | 'circle' | 'line';
3
+ width?: string;
4
+ height?: string;
5
+ /** 自定义圆角. 传 "0" 可覆盖默认 4px */
6
+ rounded?: string;
7
+ animated?: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ shape: "rect" | "circle" | "line";
11
+ animated: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, normalizeStyle as i, openBlock as a } from "vue";
2
+ //#region components/KSkeleton.vue?vue&type=script&setup=true&lang.ts
3
+ var o = /* @__PURE__ */ n({
4
+ __name: "KSkeleton",
5
+ props: {
6
+ shape: { default: "rect" },
7
+ width: {},
8
+ height: {},
9
+ rounded: {},
10
+ animated: {
11
+ type: Boolean,
12
+ default: !0
13
+ }
14
+ },
15
+ setup(n) {
16
+ let o = n, s = e(() => {
17
+ let e = {};
18
+ return o.width && (e.width = o.width), o.height && (e.height = o.height), o.rounded !== void 0 && (e.borderRadius = o.rounded), e;
19
+ });
20
+ return (e, o) => (a(), t("div", {
21
+ class: r(["k-skel", [`k-skel--${n.shape}`, { "k-skel--animated": n.animated }]]),
22
+ style: i(s.value)
23
+ }, null, 6));
24
+ }
25
+ });
26
+ //#endregion
27
+ export { o as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KSteps.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KSteps.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-c4a83d5d"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,20 @@
1
+ interface StepItem {
2
+ title: string;
3
+ description?: string;
4
+ }
5
+ type __VLS_Props = {
6
+ items: StepItem[];
7
+ current?: number;
8
+ /** current 步骤的状态 */
9
+ status?: 'process' | 'finish' | 'error';
10
+ direction?: 'horizontal' | 'vertical';
11
+ size?: 'sm' | 'md';
12
+ };
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
+ size: "sm" | "md";
15
+ direction: "horizontal" | "vertical";
16
+ current: number;
17
+ status: "process" | "finish" | "error";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,39 @@
1
+ import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c, toDisplayString as l, unref as u } from "vue";
2
+ import { Check as d, X as f } from "lucide-vue-next";
3
+ //#region components/KSteps.vue?vue&type=script&setup=true&lang.ts
4
+ var p = { class: "k-steps__indicator" }, m = { class: "k-steps__circle" }, h = { key: 2 }, g = {
5
+ key: 0,
6
+ class: "k-steps__tail"
7
+ }, _ = { class: "k-steps__content" }, v = { class: "k-steps__title" }, y = {
8
+ key: 0,
9
+ class: "k-steps__desc"
10
+ }, b = /* @__PURE__ */ a({
11
+ __name: "KSteps",
12
+ props: {
13
+ items: {},
14
+ current: { default: 0 },
15
+ status: { default: "process" },
16
+ direction: { default: "horizontal" },
17
+ size: { default: "md" }
18
+ },
19
+ setup(a) {
20
+ let b = a;
21
+ function x(e) {
22
+ return e < b.current ? "finish" : e === b.current ? b.status : "wait";
23
+ }
24
+ return (b, S) => (s(), r("div", { class: o(["k-steps", [`k-steps--${a.direction}`, `k-steps--${a.size}`]]) }, [(s(!0), r(e, null, c(a.items, (e, c) => (s(), r("div", {
25
+ key: c,
26
+ class: o(["k-steps__item", `k-steps__item--${x(c)}`])
27
+ }, [i("div", p, [i("div", m, [x(c) === "finish" ? (s(), t(u(d), {
28
+ key: 0,
29
+ size: a.size === "sm" ? 12 : 14,
30
+ "stroke-width": 3
31
+ }, null, 8, ["size"])) : x(c) === "error" ? (s(), t(u(f), {
32
+ key: 1,
33
+ size: a.size === "sm" ? 12 : 14,
34
+ "stroke-width": 3
35
+ }, null, 8, ["size"])) : (s(), r("span", h, l(c + 1), 1))]), c < a.items.length - 1 ? (s(), r("div", g)) : n("", !0)]), i("div", _, [i("div", v, l(e.title), 1), e.description ? (s(), r("div", y, l(e.description), 1)) : n("", !0)])], 2))), 128))], 2));
36
+ }
37
+ });
38
+ //#endregion
39
+ export { b as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KSwitch.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KSwitch.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-f93f1253"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ modelValue?: boolean;
3
+ size?: 'sm' | 'md' | 'lg';
4
+ disabled?: boolean;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:modelValue": (v: boolean) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
10
+ }>, {
11
+ size: "sm" | "md" | "lg";
12
+ disabled: boolean;
13
+ modelValue: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { createBlock as e, createVNode as t, defineComponent as n, normalizeClass as r, openBlock as i, unref as a, withCtx as o } from "vue";
2
+ import { SwitchRoot as s, SwitchThumb as c } from "reka-ui";
3
+ //#region components/KSwitch.vue?vue&type=script&setup=true&lang.ts
4
+ var l = /* @__PURE__ */ n({
5
+ __name: "KSwitch",
6
+ props: {
7
+ modelValue: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ size: { default: "md" },
12
+ disabled: {
13
+ type: Boolean,
14
+ default: !1
15
+ }
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(n) {
19
+ return (l, u) => (i(), e(a(s), {
20
+ "model-value": n.modelValue,
21
+ disabled: n.disabled,
22
+ class: r(["k-switch", [`k-switch--${n.size}`, { "k-switch--disabled": n.disabled }]]),
23
+ "onUpdate:modelValue": u[0] ||= (e) => l.$emit("update:modelValue", e)
24
+ }, {
25
+ default: o(() => [t(a(c), { class: "k-switch__thumb" })]),
26
+ _: 1
27
+ }, 8, [
28
+ "model-value",
29
+ "disabled",
30
+ "class"
31
+ ]));
32
+ }
33
+ });
34
+ //#endregion
35
+ export { l as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTabs.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KTabs.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-ca4f419f"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,35 @@
1
+ interface TabItem {
2
+ key: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ type __VLS_Props = {
7
+ modelValue: string;
8
+ items?: TabItem[];
9
+ variant?: 'line' | 'segment';
10
+ size?: 'sm' | 'md';
11
+ };
12
+ declare var __VLS_22: {}, __VLS_24: {}, __VLS_33: `tab-${string}`, __VLS_34: {};
13
+ type __VLS_Slots = {} & {
14
+ [K in NonNullable<typeof __VLS_33>]?: (props: typeof __VLS_34) => any;
15
+ } & {
16
+ triggers?: (props: typeof __VLS_22) => any;
17
+ } & {
18
+ default?: (props: typeof __VLS_24) => any;
19
+ };
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
+ "update:modelValue": (v: string) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
+ "onUpdate:modelValue"?: ((v: string) => any) | undefined;
24
+ }>, {
25
+ size: "sm" | "md";
26
+ variant: "line" | "segment";
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,47 @@
1
+ import { Fragment as e, createBlock as t, createElementBlock as n, createTextVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, unref as d, withCtx as f } from "vue";
2
+ import { TabsContent as p, TabsList as m, TabsRoot as h, TabsTrigger as g } from "reka-ui";
3
+ //#region components/KTabs.vue?vue&type=script&setup=true&lang.ts
4
+ var _ = /* @__PURE__ */ a({
5
+ __name: "KTabs",
6
+ props: {
7
+ modelValue: {},
8
+ items: {},
9
+ variant: { default: "line" },
10
+ size: { default: "md" }
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(a) {
14
+ return (_, v) => (s(), t(d(h), {
15
+ "model-value": a.modelValue,
16
+ class: o(["k-tabs", [`k-tabs--${a.variant}`, `k-tabs--${a.size}`]]),
17
+ "onUpdate:modelValue": v[0] ||= (e) => _.$emit("update:modelValue", String(e))
18
+ }, {
19
+ default: f(() => [
20
+ i(d(m), { class: "k-tabs__list" }, {
21
+ default: f(() => [(s(!0), n(e, null, c(a.items, (e) => (s(), t(d(g), {
22
+ key: e.key,
23
+ value: e.key,
24
+ disabled: e.disabled,
25
+ class: "k-tabs__trigger"
26
+ }, {
27
+ default: f(() => [r(u(e.label), 1)]),
28
+ _: 2
29
+ }, 1032, ["value", "disabled"]))), 128)), l(_.$slots, "triggers", {}, void 0, !0)]),
30
+ _: 3
31
+ }),
32
+ l(_.$slots, "default", {}, void 0, !0),
33
+ (s(!0), n(e, null, c(a.items, (e) => (s(), t(d(p), {
34
+ key: e.key,
35
+ value: e.key,
36
+ class: "k-tabs__content"
37
+ }, {
38
+ default: f(() => [l(_.$slots, `tab-${e.key}`, {}, void 0, !0)]),
39
+ _: 2
40
+ }, 1032, ["value"]))), 128))
41
+ ]),
42
+ _: 3
43
+ }, 8, ["model-value", "class"]));
44
+ }
45
+ });
46
+ //#endregion
47
+ export { _ as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTag.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KTag.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5f376e5a"]]);
6
+ //#endregion
7
+ export { n as default };