@guoyg578/k-ui 0.1.1 → 0.1.3

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 (146) hide show
  1. package/README.md +11 -9
  2. package/dist/components/KAffix.vue.d.ts +17 -0
  3. package/dist/components/KAffix.vue.js +7 -0
  4. package/dist/components/KAffix.vue_vue_type_script_setup_true_lang.js +18 -0
  5. package/dist/components/KAnchor.vue.d.ts +14 -0
  6. package/dist/components/KAnchor.vue.js +7 -0
  7. package/dist/components/KAnchor.vue_vue_type_script_setup_true_lang.js +40 -0
  8. package/dist/components/KAutoComplete.vue.d.ts +26 -0
  9. package/dist/components/KAutoComplete.vue.js +8 -0
  10. package/dist/components/KAutoComplete.vue_vue_type_script_setup_true_lang.js +58 -0
  11. package/dist/components/KBackTop.vue.d.ts +24 -0
  12. package/dist/components/KBackTop.vue.js +7 -0
  13. package/dist/components/KBackTop.vue_vue_type_script_setup_true_lang.js +56 -0
  14. package/dist/components/KBadge.vue.d.ts +31 -0
  15. package/dist/components/KBadge.vue.js +7 -0
  16. package/dist/components/KBadge.vue_vue_type_script_setup_true_lang.js +48 -0
  17. package/dist/components/KButtonGroup.vue.d.ts +18 -0
  18. package/dist/components/KButtonGroup.vue.js +6 -0
  19. package/dist/components/KButtonGroup.vue_vue_type_script_setup_true_lang.js +14 -0
  20. package/dist/components/KCalendar.vue.d.ts +33 -0
  21. package/dist/components/KCalendar.vue.js +7 -0
  22. package/dist/components/KCalendar.vue_vue_type_script_setup_true_lang.js +78 -0
  23. package/dist/components/KCascader.vue.d.ts +29 -0
  24. package/dist/components/KCascader.vue.js +8 -0
  25. package/dist/components/KCascader.vue_vue_type_script_setup_true_lang.js +114 -0
  26. package/dist/components/KCode.vue.d.ts +27 -0
  27. package/dist/components/KCode.vue.js +7 -0
  28. package/dist/components/KCode.vue_vue_type_script_setup_true_lang.js +42 -0
  29. package/dist/components/KCollapse.vue.d.ts +25 -0
  30. package/dist/components/KCollapse.vue.js +7 -0
  31. package/dist/components/KCollapse.vue_vue_type_script_setup_true_lang.js +35 -0
  32. package/dist/components/KCollapseItem.vue.d.ts +22 -0
  33. package/dist/components/KCollapseItem.vue.js +7 -0
  34. package/dist/components/KCollapseItem.vue_vue_type_script_setup_true_lang.js +46 -0
  35. package/dist/components/KCountdown.vue.d.ts +15 -0
  36. package/dist/components/KCountdown.vue.js +7 -0
  37. package/dist/components/KCountdown.vue_vue_type_script_setup_true_lang.js +36 -0
  38. package/dist/components/KDescriptions.vue.d.ts +1 -1
  39. package/dist/components/KDivider.vue.d.ts +21 -0
  40. package/dist/components/KDivider.vue.js +7 -0
  41. package/dist/components/KDivider.vue_vue_type_script_setup_true_lang.js +33 -0
  42. package/dist/components/KDropdown.vue.d.ts +1 -1
  43. package/dist/components/KDropdown.vue.js +1 -1
  44. package/dist/components/KDynamicInput.vue.d.ts +33 -0
  45. package/dist/components/KDynamicInput.vue.js +7 -0
  46. package/dist/components/KDynamicInput.vue_vue_type_script_setup_true_lang.js +81 -0
  47. package/dist/components/KDynamicTags.vue.d.ts +20 -0
  48. package/dist/components/KDynamicTags.vue.js +7 -0
  49. package/dist/components/KDynamicTags.vue_vue_type_script_setup_true_lang.js +60 -0
  50. package/dist/components/KGrid.vue.d.ts +29 -0
  51. package/dist/components/KGrid.vue.js +7 -0
  52. package/dist/components/KGrid.vue_vue_type_script_setup_true_lang.js +33 -0
  53. package/dist/components/KGridItem.vue.d.ts +20 -0
  54. package/dist/components/KGridItem.vue.js +7 -0
  55. package/dist/components/KGridItem.vue_vue_type_script_setup_true_lang.js +18 -0
  56. package/dist/components/KImage.vue.d.ts +2 -0
  57. package/dist/components/KImage.vue.js +1 -1
  58. package/dist/components/KImage.vue_vue_type_script_setup_true_lang.js +15 -4
  59. package/dist/components/KImageViewer.vue.d.ts +2 -0
  60. package/dist/components/KImageViewer.vue.js +1 -1
  61. package/dist/components/KImageViewer.vue_vue_type_script_setup_true_lang.js +8 -2
  62. package/dist/components/KLayout.vue.d.ts +19 -0
  63. package/dist/components/KLayout.vue.js +7 -0
  64. package/dist/components/KLayout.vue_vue_type_script_setup_true_lang.js +14 -0
  65. package/dist/components/KLayoutContent.vue.d.ts +17 -0
  66. package/dist/components/KLayoutContent.vue.js +7 -0
  67. package/dist/components/KLayoutContent.vue_vue_type_script_setup_true_lang.js +11 -0
  68. package/dist/components/KLayoutHeader.vue.d.ts +19 -0
  69. package/dist/components/KLayoutHeader.vue.js +7 -0
  70. package/dist/components/KLayoutHeader.vue_vue_type_script_setup_true_lang.js +14 -0
  71. package/dist/components/KLayoutSider.vue.d.ts +28 -0
  72. package/dist/components/KLayoutSider.vue.js +7 -0
  73. package/dist/components/KLayoutSider.vue_vue_type_script_setup_true_lang.js +34 -0
  74. package/dist/components/KList.vue.d.ts +24 -0
  75. package/dist/components/KList.vue.js +7 -0
  76. package/dist/components/KList.vue_vue_type_script_setup_true_lang.js +39 -0
  77. package/dist/components/KListItem.vue.d.ts +17 -0
  78. package/dist/components/KListItem.vue.js +7 -0
  79. package/dist/components/KListItem.vue_vue_type_script_setup_true_lang.js +22 -0
  80. package/dist/components/KMention.vue.d.ts +27 -0
  81. package/dist/components/KMention.vue.js +8 -0
  82. package/dist/components/KMention.vue_vue_type_script_setup_true_lang.js +73 -0
  83. package/dist/components/KMenu.vue.d.ts +30 -0
  84. package/dist/components/KMenu.vue.js +9 -0
  85. package/dist/components/KMenu.vue_vue_type_script_setup_true_lang.js +134 -0
  86. package/dist/components/KMenuItem.vue.d.ts +10 -0
  87. package/dist/components/KMenuItem.vue.js +7 -0
  88. package/dist/components/KMenuItem.vue_vue_type_script_setup_true_lang.js +58 -0
  89. package/dist/components/KNumberAnimation.vue.d.ts +33 -0
  90. package/dist/components/KNumberAnimation.vue.js +7 -0
  91. package/dist/components/KNumberAnimation.vue_vue_type_script_setup_true_lang.js +45 -0
  92. package/dist/components/KPopconfirm.vue.d.ts +1 -1
  93. package/dist/components/KPopover.vue.d.ts +1 -1
  94. package/dist/components/KRadio.vue.d.ts +4 -2
  95. package/dist/components/KRadio.vue.js +1 -1
  96. package/dist/components/KRadio.vue_vue_type_script_setup_true_lang.js +24 -11
  97. package/dist/components/KRadioGroup.vue.d.ts +3 -0
  98. package/dist/components/KRadioGroup.vue.js +1 -1
  99. package/dist/components/KRadioGroup.vue_vue_type_script_setup_true_lang.js +17 -12
  100. package/dist/components/KRate.vue.d.ts +25 -0
  101. package/dist/components/KRate.vue.js +7 -0
  102. package/dist/components/KRate.vue_vue_type_script_setup_true_lang.js +77 -0
  103. package/dist/components/KSpace.vue.d.ts +32 -0
  104. package/dist/components/KSpace.vue.js +7 -0
  105. package/dist/components/KSpace.vue_vue_type_script_setup_true_lang.js +52 -0
  106. package/dist/components/KStatistic.vue.d.ts +23 -0
  107. package/dist/components/KStatistic.vue.js +7 -0
  108. package/dist/components/KStatistic.vue_vue_type_script_setup_true_lang.js +27 -0
  109. package/dist/components/KText.vue.d.ts +26 -0
  110. package/dist/components/KText.vue.js +7 -0
  111. package/dist/components/KText.vue_vue_type_script_setup_true_lang.js +31 -0
  112. package/dist/components/KTime.vue.d.ts +14 -0
  113. package/dist/components/KTime.vue.js +7 -0
  114. package/dist/components/KTime.vue_vue_type_script_setup_true_lang.js +56 -0
  115. package/dist/components/KTimePicker.vue.d.ts +19 -0
  116. package/dist/components/KTimePicker.vue.js +8 -0
  117. package/dist/components/KTimePicker.vue_vue_type_script_setup_true_lang.js +116 -0
  118. package/dist/components/KTimeline.vue.d.ts +13 -0
  119. package/dist/components/KTimeline.vue.js +7 -0
  120. package/dist/components/KTimeline.vue_vue_type_script_setup_true_lang.js +10 -0
  121. package/dist/components/KTimelineItem.vue.d.ts +29 -0
  122. package/dist/components/KTimelineItem.vue.js +7 -0
  123. package/dist/components/KTimelineItem.vue_vue_type_script_setup_true_lang.js +37 -0
  124. package/dist/components/KTransfer.vue.d.ts +24 -0
  125. package/dist/components/KTransfer.vue.js +7 -0
  126. package/dist/components/KTransfer.vue_vue_type_script_setup_true_lang.js +114 -0
  127. package/dist/components/KTreeSelect.vue.d.ts +22 -0
  128. package/dist/components/KTreeSelect.vue.js +8 -0
  129. package/dist/components/KTreeSelect.vue_vue_type_script_setup_true_lang.js +100 -0
  130. package/dist/components/KTypography.vue.d.ts +13 -0
  131. package/dist/components/KTypography.vue.js +7 -0
  132. package/dist/components/KTypography.vue_vue_type_script_setup_true_lang.js +10 -0
  133. package/dist/components/KUpload.vue.d.ts +1 -1
  134. package/dist/components/KWatermark.vue.d.ts +27 -0
  135. package/dist/components/KWatermark.vue.js +7 -0
  136. package/dist/components/KWatermark.vue_vue_type_script_setup_true_lang.js +28 -0
  137. package/dist/components/list-context.d.ts +6 -0
  138. package/dist/components/list-context.js +4 -0
  139. package/dist/components/menu-context.d.ts +26 -0
  140. package/dist/components/menu-context.js +4 -0
  141. package/dist/components/radio-context.d.ts +6 -0
  142. package/dist/components/radio-context.js +4 -0
  143. package/dist/index.d.ts +43 -0
  144. package/dist/index.js +102 -64
  145. package/dist/k-ui.css +1 -1
  146. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KRate.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KRate.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-9306d0f6"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,77 @@
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, renderList as u, unref as d } from "vue";
2
+ import { Star as f } from "lucide-vue-next";
3
+ //#region components/KRate.vue?vue&type=script&setup=true&lang.ts
4
+ var p = ["onMousemove", "onClick"], m = /* @__PURE__ */ a({
5
+ __name: "KRate",
6
+ props: {
7
+ modelValue: { default: 0 },
8
+ count: { default: 5 },
9
+ allowHalf: {
10
+ type: Boolean,
11
+ default: !1
12
+ },
13
+ readonly: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ size: { default: 22 },
18
+ color: { default: "#f59e0b" },
19
+ clearable: {
20
+ type: Boolean,
21
+ default: !0
22
+ }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(a, { emit: m }) {
26
+ let h = a, g = m, _ = l(null), v = t(() => _.value ?? h.modelValue);
27
+ function y(e) {
28
+ let t = v.value;
29
+ return t >= e ? "full" : h.allowHalf && t >= e - .5 ? "half" : "empty";
30
+ }
31
+ function b(e, t) {
32
+ if (!h.allowHalf) return e;
33
+ let n = t.currentTarget.getBoundingClientRect();
34
+ return t.clientX - n.left < n.width / 2 ? e - .5 : e;
35
+ }
36
+ function x(e, t) {
37
+ h.readonly || (_.value = b(e, t));
38
+ }
39
+ function S() {
40
+ _.value = null;
41
+ }
42
+ function C(e, t) {
43
+ if (h.readonly) return;
44
+ let n = b(e, t);
45
+ h.clearable && h.modelValue === n && (n = 0), g("update:modelValue", n);
46
+ }
47
+ return (t, l) => (c(), n("div", {
48
+ class: o(["k-rate", { "k-rate--readonly": a.readonly }]),
49
+ onMouseleave: S
50
+ }, [(c(!0), n(e, null, u(a.count, (e) => (c(), n("span", {
51
+ key: e,
52
+ class: "k-rate__star",
53
+ style: s({
54
+ width: `${a.size}px`,
55
+ height: `${a.size}px`
56
+ }),
57
+ onMousemove: (t) => x(e, t),
58
+ onClick: (t) => C(e, t)
59
+ }, [i(d(f), {
60
+ size: a.size,
61
+ class: "k-rate__bg"
62
+ }, null, 8, ["size"]), r("span", {
63
+ class: "k-rate__fill",
64
+ style: s({ width: y(e) === "full" ? "100%" : y(e) === "half" ? "50%" : "0%" })
65
+ }, [i(d(f), {
66
+ size: a.size,
67
+ fill: a.color,
68
+ color: a.color
69
+ }, null, 8, [
70
+ "size",
71
+ "fill",
72
+ "color"
73
+ ])], 4)], 44, p))), 128))], 34));
74
+ }
75
+ });
76
+ //#endregion
77
+ export { m as default };
@@ -0,0 +1,32 @@
1
+ type __VLS_Props = {
2
+ /** 间距:数字(px) / 档位 / [水平, 垂直] */
3
+ size?: number | 'small' | 'medium' | 'large' | [number, number];
4
+ /** 纵向排列 */
5
+ vertical?: boolean;
6
+ /** 交叉轴对齐 */
7
+ align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
8
+ /** 主轴对齐 */
9
+ justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
10
+ /** 是否换行(纵向时强制不换行) */
11
+ wrap?: boolean;
12
+ /** 行内显示 */
13
+ inline?: boolean;
14
+ };
15
+ declare var __VLS_1: {};
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_1) => 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
+ size: number | "small" | "medium" | "large" | [number, number];
21
+ vertical: boolean;
22
+ inline: boolean;
23
+ wrap: boolean;
24
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KSpace.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KSpace.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-d97339d4"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,52 @@
1
+ import { computed as e, createElementBlock as t, defineComponent as n, normalizeClass as r, normalizeStyle as i, openBlock as a, renderSlot as o } from "vue";
2
+ //#region components/KSpace.vue?vue&type=script&setup=true&lang.ts
3
+ var s = /* @__PURE__ */ n({
4
+ __name: "KSpace",
5
+ props: {
6
+ size: { default: "medium" },
7
+ vertical: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ align: {},
12
+ justify: {},
13
+ wrap: {
14
+ type: Boolean,
15
+ default: !0
16
+ },
17
+ inline: {
18
+ type: Boolean,
19
+ default: !1
20
+ }
21
+ },
22
+ setup(n) {
23
+ let s = {
24
+ small: 8,
25
+ medium: 12,
26
+ large: 16
27
+ }, c = n, l = e(() => {
28
+ let e = c.size;
29
+ return Array.isArray(e) ? `${e[1]}px ${e[0]}px` : `${typeof e == "number" ? e : s[e]}px`;
30
+ }), u = e(() => {
31
+ let e = c.align;
32
+ if (e) return e === "start" || e === "end" ? `flex-${e}` : e;
33
+ }), d = e(() => {
34
+ let e = c.justify;
35
+ if (e) return e === "start" || e === "end" ? `flex-${e}` : e;
36
+ });
37
+ return (e, s) => (a(), t("div", {
38
+ class: r(["k-space", {
39
+ "k-space--inline": n.inline,
40
+ "k-space--nowrap": n.vertical || !n.wrap
41
+ }]),
42
+ style: i({
43
+ gap: l.value,
44
+ flexDirection: n.vertical ? "column" : "row",
45
+ alignItems: u.value,
46
+ justifyContent: d.value
47
+ })
48
+ }, [o(e.$slots, "default", {}, void 0, !0)], 6));
49
+ }
50
+ });
51
+ //#endregion
52
+ export { s as default };
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ value?: string | number;
4
+ };
5
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ label?: (props: typeof __VLS_1) => any;
8
+ } & {
9
+ prefix?: (props: typeof __VLS_3) => any;
10
+ } & {
11
+ default?: (props: typeof __VLS_5) => any;
12
+ } & {
13
+ suffix?: (props: typeof __VLS_7) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, 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 "./KStatistic.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KStatistic.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-8cd51e4f"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,27 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
2
+ //#region components/KStatistic.vue?vue&type=script&setup=true&lang.ts
3
+ var c = { class: "k-statistic" }, l = {
4
+ key: 0,
5
+ class: "k-statistic__label"
6
+ }, u = { class: "k-statistic__value" }, d = {
7
+ key: 0,
8
+ class: "k-statistic__affix"
9
+ }, f = { class: "k-statistic__num" }, p = {
10
+ key: 1,
11
+ class: "k-statistic__affix"
12
+ }, m = /* @__PURE__ */ i({
13
+ __name: "KStatistic",
14
+ props: {
15
+ label: {},
16
+ value: {}
17
+ },
18
+ setup(i) {
19
+ return (m, h) => (a(), t("div", c, [i.label || m.$slots.label ? (a(), t("div", l, [o(m.$slots, "label", {}, () => [r(s(i.label), 1)], !0)])) : e("", !0), n("div", u, [
20
+ m.$slots.prefix ? (a(), t("span", d, [o(m.$slots, "prefix", {}, void 0, !0)])) : e("", !0),
21
+ n("span", f, [o(m.$slots, "default", {}, () => [r(s(i.value), 1)], !0)]),
22
+ m.$slots.suffix ? (a(), t("span", p, [o(m.$slots, "suffix", {}, void 0, !0)])) : e("", !0)
23
+ ])]));
24
+ }
25
+ });
26
+ //#endregion
27
+ export { m as default };
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ /** 文字弱化层级:1=主文本 2=次要 3=更弱 */
3
+ depth?: '1' | '2' | '3' | 1 | 2 | 3;
4
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
5
+ tag?: string;
6
+ strong?: boolean;
7
+ italic?: boolean;
8
+ code?: boolean;
9
+ underline?: boolean;
10
+ };
11
+ declare var __VLS_8: {};
12
+ type __VLS_Slots = {} & {
13
+ default?: (props: typeof __VLS_8) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ type: "default" | "primary" | "success" | "warning" | "error" | "info";
17
+ tag: string;
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KText.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KText.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-ff180da1"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,31 @@
1
+ import { createBlock as e, defineComponent as t, normalizeClass as n, openBlock as r, renderSlot as i, resolveDynamicComponent as a, withCtx as o } from "vue";
2
+ //#region components/KText.vue?vue&type=script&setup=true&lang.ts
3
+ var s = /* @__PURE__ */ t({
4
+ __name: "KText",
5
+ props: {
6
+ depth: {},
7
+ type: { default: "default" },
8
+ tag: { default: "span" },
9
+ strong: { type: Boolean },
10
+ italic: { type: Boolean },
11
+ code: { type: Boolean },
12
+ underline: { type: Boolean }
13
+ },
14
+ setup(t) {
15
+ return (s, c) => (r(), e(a(t.code ? "code" : t.tag), { class: n(["k-text", [
16
+ `k-text--depth-${t.depth ?? 1}`,
17
+ `k-text--${t.type}`,
18
+ {
19
+ "k-text--strong": t.strong,
20
+ "k-text--italic": t.italic,
21
+ "k-text--code": t.code,
22
+ "k-text--underline": t.underline
23
+ }
24
+ ]]) }, {
25
+ default: o(() => [i(s.$slots, "default", {}, void 0, !0)]),
26
+ _: 3
27
+ }, 8, ["class"]));
28
+ }
29
+ });
30
+ //#endregion
31
+ export { s as default };
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ time?: Date | number | string;
3
+ /** datetime=日期时间 / date=仅日期 / relative=相对当前 */
4
+ type?: 'datetime' | 'date' | 'relative';
5
+ /** 自定义格式,支持 yyyy MM dd HH mm ss(覆盖 type 的默认格式) */
6
+ format?: string;
7
+ /** relative 模式的参照时间,默认取当前时间 */
8
+ to?: Date | number;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ type: "datetime" | "date" | "relative";
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTime.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KTime.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-854ebd38"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,56 @@
1
+ import { computed as e, createElementBlock as t, defineComponent as n, openBlock as r, toDisplayString as i } from "vue";
2
+ //#region components/KTime.vue?vue&type=script&setup=true&lang.ts
3
+ var a = ["datetime"], o = /* @__PURE__ */ n({
4
+ __name: "KTime",
5
+ props: {
6
+ time: {},
7
+ type: { default: "datetime" },
8
+ format: {},
9
+ to: {}
10
+ },
11
+ setup(n) {
12
+ let o = n;
13
+ function s(e) {
14
+ if (e == null) return null;
15
+ let t = e instanceof Date ? e : new Date(e);
16
+ return Number.isNaN(t.getTime()) ? null : t;
17
+ }
18
+ let c = (e) => String(e).padStart(2, "0");
19
+ function l(e, t) {
20
+ let n = {
21
+ yyyy: String(e.getFullYear()),
22
+ MM: c(e.getMonth() + 1),
23
+ dd: c(e.getDate()),
24
+ HH: c(e.getHours()),
25
+ mm: c(e.getMinutes()),
26
+ ss: c(e.getSeconds())
27
+ };
28
+ return t.replace(/yyyy|MM|dd|HH|mm|ss/g, (e) => n[e] ?? e);
29
+ }
30
+ function u(e, t) {
31
+ let n = t.getTime() - e.getTime(), r = n < 0, i = Math.abs(n) / 1e3, a = (e, t) => r ? `${e}${t}后` : `${e}${t}前`;
32
+ if (i < 60) return r ? "即将" : "刚刚";
33
+ let o = Math.floor(i / 60);
34
+ if (o < 60) return a(o, "分钟");
35
+ let s = Math.floor(o / 60);
36
+ if (s < 24) return a(s, "小时");
37
+ let c = Math.floor(s / 24);
38
+ if (c < 30) return a(c, "天");
39
+ let l = Math.floor(c / 30);
40
+ return l < 12 ? a(l, "个月") : a(Math.floor(l / 12), "年");
41
+ }
42
+ let d = e(() => {
43
+ let e = s(o.time);
44
+ return e ? o.type === "relative" ? u(e, o.to == null ? /* @__PURE__ */ new Date() : o.to instanceof Date ? o.to : new Date(o.to)) : l(e, o.format ?? (o.type === "date" ? "yyyy-MM-dd" : "yyyy-MM-dd HH:mm:ss")) : "";
45
+ }), f = e(() => {
46
+ let e = s(o.time);
47
+ return e ? e.toISOString() : void 0;
48
+ });
49
+ return (e, n) => (r(), t("time", {
50
+ class: "k-time",
51
+ datetime: f.value
52
+ }, i(d.value), 9, a));
53
+ }
54
+ });
55
+ //#endregion
56
+ export { o as default };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ modelValue?: string | null;
3
+ useSeconds?: boolean;
4
+ disabled?: boolean;
5
+ clearable?: boolean;
6
+ placeholder?: string;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (v: string | null) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((v: string | null) => any) | undefined;
12
+ }>, {
13
+ disabled: boolean;
14
+ placeholder: string;
15
+ clearable: boolean;
16
+ useSeconds: boolean;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTimePicker.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ /* empty css */
5
+ //#region components/KTimePicker.vue
6
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-52df9cd5"]]);
7
+ //#endregion
8
+ export { n as default };
@@ -0,0 +1,116 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode 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 { Clock as h, X as g } from "lucide-vue-next";
3
+ import { PopoverContent as _, PopoverPortal as v, PopoverRoot as y, PopoverTrigger as b } from "reka-ui";
4
+ //#region components/KTimePicker.vue?vue&type=script&setup=true&lang.ts
5
+ var x = ["disabled"], S = { class: "k-tp-field__text" }, C = { class: "k-tp-col" }, w = ["onClick"], T = { class: "k-tp-col" }, E = ["onClick"], D = {
6
+ key: 0,
7
+ class: "k-tp-col"
8
+ }, O = ["onClick"], k = /* @__PURE__ */ s({
9
+ __name: "KTimePicker",
10
+ props: {
11
+ modelValue: {},
12
+ useSeconds: {
13
+ type: Boolean,
14
+ default: !0
15
+ },
16
+ disabled: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ clearable: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ placeholder: { default: "选择时间" }
25
+ },
26
+ emits: ["update:modelValue"],
27
+ setup(s, { emit: k }) {
28
+ let A = s, j = k, M = u(!1), N = (e) => String(e).padStart(2, "0"), P = Array.from({ length: 24 }, (e, t) => t), F = Array.from({ length: 60 }, (e, t) => t), I = Array.from({ length: 60 }, (e, t) => t), L = t(() => {
29
+ let e = A.modelValue;
30
+ if (!e) return {
31
+ h: null,
32
+ m: null,
33
+ s: null
34
+ };
35
+ let [t, n, r] = e.split(":").map((e) => parseInt(e, 10));
36
+ return {
37
+ h: Number.isNaN(t) ? null : t,
38
+ m: Number.isNaN(n) ? null : n,
39
+ s: Number.isNaN(r) ? null : r
40
+ };
41
+ });
42
+ function R(e, t, n) {
43
+ j("update:modelValue", A.useSeconds ? `${N(e ?? 0)}:${N(t ?? 0)}:${N(n ?? 0)}` : `${N(e ?? 0)}:${N(t ?? 0)}`);
44
+ }
45
+ function z(e, t) {
46
+ let n = L.value;
47
+ R(e === "h" ? t : n.h, e === "m" ? t : n.m, e === "s" ? t : n.s);
48
+ }
49
+ function B(e) {
50
+ e.stopPropagation(), j("update:modelValue", null);
51
+ }
52
+ return (t, u) => (l(), n(p(y), {
53
+ open: M.value,
54
+ "onUpdate:open": u[0] ||= (e) => M.value = e
55
+ }, {
56
+ default: m(() => [o(p(b), {
57
+ "as-child": "",
58
+ disabled: s.disabled
59
+ }, {
60
+ default: m(() => [a("button", {
61
+ type: "button",
62
+ class: c(["k-tp-field", {
63
+ "k-tp-field--disabled": s.disabled,
64
+ "k-tp-field--placeholder": !s.modelValue
65
+ }]),
66
+ disabled: s.disabled
67
+ }, [
68
+ o(p(h), {
69
+ size: 15,
70
+ class: "k-tp-field__icon"
71
+ }),
72
+ a("span", S, f(s.modelValue || s.placeholder), 1),
73
+ s.clearable && s.modelValue && !s.disabled ? (l(), n(p(g), {
74
+ key: 0,
75
+ size: 14,
76
+ class: "k-tp-field__clear",
77
+ onClick: B
78
+ })) : r("", !0)
79
+ ], 10, x)]),
80
+ _: 1
81
+ }, 8, ["disabled"]), o(p(v), null, {
82
+ default: m(() => [o(p(_), {
83
+ class: "k-menu-surface k-tp-panel",
84
+ "side-offset": 6,
85
+ align: "start"
86
+ }, {
87
+ default: m(() => [
88
+ a("div", C, [(l(!0), i(e, null, d(p(P), (e) => (l(), i("button", {
89
+ key: `h${e}`,
90
+ type: "button",
91
+ class: c(["k-tp-cell", { "k-tp-cell--active": L.value.h === e }]),
92
+ onClick: (t) => z("h", e)
93
+ }, f(N(e)), 11, w))), 128))]),
94
+ a("div", T, [(l(!0), i(e, null, d(p(F), (e) => (l(), i("button", {
95
+ key: `m${e}`,
96
+ type: "button",
97
+ class: c(["k-tp-cell", { "k-tp-cell--active": L.value.m === e }]),
98
+ onClick: (t) => z("m", e)
99
+ }, f(N(e)), 11, E))), 128))]),
100
+ s.useSeconds ? (l(), i("div", D, [(l(!0), i(e, null, d(p(I), (e) => (l(), i("button", {
101
+ key: `s${e}`,
102
+ type: "button",
103
+ class: c(["k-tp-cell", { "k-tp-cell--active": L.value.s === e }]),
104
+ onClick: (t) => z("s", e)
105
+ }, f(N(e)), 11, O))), 128))])) : r("", !0)
106
+ ]),
107
+ _: 1
108
+ })]),
109
+ _: 1
110
+ })]),
111
+ _: 1
112
+ }, 8, ["open"]));
113
+ }
114
+ });
115
+ //#endregion
116
+ export { k as default };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTimeline.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KTimeline.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-bddbc80f"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,10 @@
1
+ import { createElementBlock as e, defineComponent as t, openBlock as n, renderSlot as r } from "vue";
2
+ //#region components/KTimeline.vue?vue&type=script&setup=true&lang.ts
3
+ var i = { class: "k-timeline" }, a = /* @__PURE__ */ t({
4
+ __name: "KTimeline",
5
+ setup(t) {
6
+ return (t, a) => (n(), e("div", i, [r(t.$slots, "default", {}, void 0, !0)]));
7
+ }
8
+ });
9
+ //#endregion
10
+ export { a as default };
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ type?: 'default' | 'success' | 'error' | 'warning' | 'info';
3
+ title?: string;
4
+ content?: string;
5
+ time?: string;
6
+ /** 自定义圆点颜色(覆盖 type) */
7
+ color?: string;
8
+ lineType?: 'solid' | 'dashed';
9
+ };
10
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
11
+ type __VLS_Slots = {} & {
12
+ title?: (props: typeof __VLS_1) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_3) => any;
15
+ } & {
16
+ time?: (props: typeof __VLS_5) => any;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ type: "default" | "success" | "error" | "warning" | "info";
20
+ lineType: "solid" | "dashed";
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,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./KTimelineItem.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region components/KTimelineItem.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-9ef91cc2"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,37 @@
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderSlot as c, toDisplayString as l } from "vue";
2
+ //#region components/KTimelineItem.vue?vue&type=script&setup=true&lang.ts
3
+ var u = { class: "k-timeline-item" }, d = { class: "k-timeline-item__rail" }, f = { class: "k-timeline-item__content" }, p = {
4
+ key: 0,
5
+ class: "k-timeline-item__title"
6
+ }, m = {
7
+ key: 1,
8
+ class: "k-timeline-item__desc"
9
+ }, h = {
10
+ key: 2,
11
+ class: "k-timeline-item__time"
12
+ }, g = /* @__PURE__ */ i({
13
+ __name: "KTimelineItem",
14
+ props: {
15
+ type: { default: "default" },
16
+ title: {},
17
+ content: {},
18
+ time: {},
19
+ color: {},
20
+ lineType: { default: "solid" }
21
+ },
22
+ setup(i) {
23
+ return (g, _) => (s(), t("div", u, [n("div", d, [n("span", {
24
+ class: a(["k-timeline-item__dot", `k-timeline-item__dot--${i.type}`]),
25
+ style: o(i.color ? {
26
+ background: i.color,
27
+ borderColor: i.color
28
+ } : void 0)
29
+ }, null, 6), n("span", { class: a(["k-timeline-item__line", { "k-timeline-item__line--dashed": i.lineType === "dashed" }]) }, null, 2)]), n("div", f, [
30
+ i.title || g.$slots.title ? (s(), t("div", p, [c(g.$slots, "title", {}, () => [r(l(i.title), 1)], !0)])) : e("", !0),
31
+ i.content || g.$slots.default ? (s(), t("div", m, [c(g.$slots, "default", {}, () => [r(l(i.content), 1)], !0)])) : e("", !0),
32
+ i.time || g.$slots.time ? (s(), t("div", h, [c(g.$slots, "time", {}, () => [r(l(i.time), 1)], !0)])) : e("", !0)
33
+ ])]));
34
+ }
35
+ });
36
+ //#endregion
37
+ export { g as default };