@kernel4632/kima 0.0.0-stage → 0.6.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.
Files changed (168) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +209 -2
  3. package/dist/THIRD_PARTY_NOTICES.txt +2676 -0
  4. package/dist/kima-elements-core.js +53209 -0
  5. package/dist/kima-elements.js +126371 -0
  6. package/dist/kima-theme.js +1583 -0
  7. package/dist/kima.js +141 -0
  8. package/dist/style.css +2 -0
  9. package/dist/vue/_virtual/_plugin-vue_export-helper.js +7 -0
  10. package/dist/vue/components/advanced-input/calendar.ce.js +216 -0
  11. package/dist/vue/components/advanced-input/date-range-picker.ce.js +224 -0
  12. package/dist/vue/components/advanced-input/editable.ce.js +160 -0
  13. package/dist/vue/components/advanced-input/mention.ce.js +181 -0
  14. package/dist/vue/components/advanced-input/range-slider.ce.js +111 -0
  15. package/dist/vue/components/advanced-input/time-range-picker.ce.js +120 -0
  16. package/dist/vue/components/advanced-input/transfer.ce.js +192 -0
  17. package/dist/vue/components/content/chart.ce.js +282 -0
  18. package/dist/vue/components/content/code-editor.ce.js +309 -0
  19. package/dist/vue/components/content/equation.ce.js +69 -0
  20. package/dist/vue/components/content/heatmap.ce.js +148 -0
  21. package/dist/vue/components/content/rich-text-editor.ce.js +319 -0
  22. package/dist/vue/components/core/badge.ce.js +66 -0
  23. package/dist/vue/components/core/button-group.ce.js +142 -0
  24. package/dist/vue/components/core/button.ce.js +73 -0
  25. package/dist/vue/components/core/card.ce.js +73 -0
  26. package/dist/vue/components/core/cascader.ce.js +329 -0
  27. package/dist/vue/components/core/checkbox.ce.js +116 -0
  28. package/dist/vue/components/core/code-block.ce.js +108 -0
  29. package/dist/vue/components/core/combobox.ce.js +354 -0
  30. package/dist/vue/components/core/date-picker.ce.js +433 -0
  31. package/dist/vue/components/core/dialog.ce.js +118 -0
  32. package/dist/vue/components/core/divider.ce.js +49 -0
  33. package/dist/vue/components/core/drawer.ce.js +235 -0
  34. package/dist/vue/components/core/empty-state.ce.js +58 -0
  35. package/dist/vue/components/core/icon-button.ce.js +93 -0
  36. package/dist/vue/components/core/icon.ce.js +42 -0
  37. package/dist/vue/components/core/layout.ce.js +68 -0
  38. package/dist/vue/components/core/menu.ce.js +178 -0
  39. package/dist/vue/components/core/notification.ce.js +158 -0
  40. package/dist/vue/components/core/pagination.ce.js +158 -0
  41. package/dist/vue/components/core/progress.ce.js +49 -0
  42. package/dist/vue/components/core/select.ce.js +325 -0
  43. package/dist/vue/components/core/slider.ce.js +116 -0
  44. package/dist/vue/components/core/switch.ce.js +100 -0
  45. package/dist/vue/components/core/tabs.ce.js +193 -0
  46. package/dist/vue/components/core/text-field.ce.js +194 -0
  47. package/dist/vue/components/core/time-picker.ce.js +486 -0
  48. package/dist/vue/components/core/tooltip.ce.js +125 -0
  49. package/dist/vue/components/core/tree.ce.js +248 -0
  50. package/dist/vue/components/core/virtual-scroll.ce.js +176 -0
  51. package/dist/vue/components/data/copy-button.ce.js +75 -0
  52. package/dist/vue/components/data/image-preview.ce.js +226 -0
  53. package/dist/vue/components/data/infinite-scroll.ce.js +126 -0
  54. package/dist/vue/components/data/long-text.ce.js +70 -0
  55. package/dist/vue/components/data/relative-time.ce.js +77 -0
  56. package/dist/vue/components/data/ring-progress.ce.js +87 -0
  57. package/dist/vue/components/data/table.ce.js +491 -0
  58. package/dist/vue/components/data/virtual-table.ce.js +178 -0
  59. package/dist/vue/components/data/virtual-tree.ce.js +213 -0
  60. package/dist/vue/components/display/alert.ce.js +101 -0
  61. package/dist/vue/components/display/avatar-group.ce.js +65 -0
  62. package/dist/vue/components/display/avatar.ce.js +84 -0
  63. package/dist/vue/components/display/blockquote.ce.js +44 -0
  64. package/dist/vue/components/display/countdown.ce.js +77 -0
  65. package/dist/vue/components/display/descriptions.ce.js +43 -0
  66. package/dist/vue/components/display/highlight.ce.js +48 -0
  67. package/dist/vue/components/display/image.ce.js +146 -0
  68. package/dist/vue/components/display/list.ce.js +68 -0
  69. package/dist/vue/components/display/result.ce.js +57 -0
  70. package/dist/vue/components/display/skeleton.ce.js +67 -0
  71. package/dist/vue/components/display/spinner.ce.js +42 -0
  72. package/dist/vue/components/display/statistic.ce.js +71 -0
  73. package/dist/vue/components/display/timeline.ce.js +59 -0
  74. package/dist/vue/components/form-completion/angle-slider.ce.js +103 -0
  75. package/dist/vue/components/form-completion/color-picker.ce.js +286 -0
  76. package/dist/vue/components/form-completion/date-field.ce.js +131 -0
  77. package/dist/vue/components/form-completion/dynamic-input.ce.js +158 -0
  78. package/dist/vue/components/form-completion/form.ce.js +248 -0
  79. package/dist/vue/components/form-completion/json-input.ce.js +114 -0
  80. package/dist/vue/components/form-completion/masked-input.ce.js +88 -0
  81. package/dist/vue/components/form-completion/period-picker.ce.js +147 -0
  82. package/dist/vue/components/form-completion/time-field.ce.js +120 -0
  83. package/dist/vue/components/form-completion/upload-manager.ce.js +223 -0
  84. package/dist/vue/components/foundation/banner.ce.js +106 -0
  85. package/dist/vue/components/foundation/error-state.ce.js +108 -0
  86. package/dist/vue/components/foundation/field-group.ce.js +146 -0
  87. package/dist/vue/components/foundation/flex.ce.js +60 -0
  88. package/dist/vue/components/foundation/grid.ce.js +52 -0
  89. package/dist/vue/components/foundation/input-group.ce.js +34 -0
  90. package/dist/vue/components/foundation/page-header.ce.js +55 -0
  91. package/dist/vue/components/foundation/time-display.ce.js +129 -0
  92. package/dist/vue/components/foundation/typography.ce.js +71 -0
  93. package/dist/vue/components/input/checkbox-group.ce.js +93 -0
  94. package/dist/vue/components/input/field.ce.js +74 -0
  95. package/dist/vue/components/input/file-upload.ce.js +142 -0
  96. package/dist/vue/components/input/number-field.ce.js +103 -0
  97. package/dist/vue/components/input/pin-input.ce.js +112 -0
  98. package/dist/vue/components/input/radio-group.ce.js +96 -0
  99. package/dist/vue/components/input/rating.ce.js +115 -0
  100. package/dist/vue/components/input/tags-input.ce.js +153 -0
  101. package/dist/vue/components/input/textarea.ce.js +180 -0
  102. package/dist/vue/components/input/toggle.ce.js +58 -0
  103. package/dist/vue/components/interaction/chip.ce.js +95 -0
  104. package/dist/vue/components/interaction/command.ce.js +161 -0
  105. package/dist/vue/components/interaction/context-menu.ce.js +113 -0
  106. package/dist/vue/components/interaction/hover-card.ce.js +92 -0
  107. package/dist/vue/components/interaction/loading-overlay.ce.js +70 -0
  108. package/dist/vue/components/interaction/menubar.ce.js +134 -0
  109. package/dist/vue/components/interaction/multi-select.ce.js +264 -0
  110. package/dist/vue/components/interaction/popconfirm.ce.js +95 -0
  111. package/dist/vue/components/interaction/popover.ce.js +83 -0
  112. package/dist/vue/components/interaction/tree-select.ce.js +195 -0
  113. package/dist/vue/components/navigation/accordion.ce.js +114 -0
  114. package/dist/vue/components/navigation/anchor.ce.js +125 -0
  115. package/dist/vue/components/navigation/back-top.ce.js +67 -0
  116. package/dist/vue/components/navigation/breadcrumb.ce.js +48 -0
  117. package/dist/vue/components/navigation/carousel.ce.js +114 -0
  118. package/dist/vue/components/navigation/collapsible.ce.js +57 -0
  119. package/dist/vue/components/navigation/link.ce.js +62 -0
  120. package/dist/vue/components/navigation/navigation-menu.ce.js +91 -0
  121. package/dist/vue/components/navigation/overflow-list.ce.js +67 -0
  122. package/dist/vue/components/navigation/scroll-area.ce.js +47 -0
  123. package/dist/vue/components/navigation/splitter.ce.js +131 -0
  124. package/dist/vue/components/navigation/stepper.ce.js +74 -0
  125. package/dist/vue/components/navigation/toolbar.ce.js +93 -0
  126. package/dist/vue/components/navigation/visually-hidden.ce.js +16 -0
  127. package/dist/vue/components/shell/app-shell.ce.js +87 -0
  128. package/dist/vue/components/shell/config-provider.ce.js +110 -0
  129. package/dist/vue/components/shell/marquee.ce.js +92 -0
  130. package/dist/vue/components/shell/masonry.ce.js +50 -0
  131. package/dist/vue/components/shell/sidebar.ce.js +125 -0
  132. package/dist/vue/components/utility/affix.ce.js +64 -0
  133. package/dist/vue/components/utility/alert-dialog.ce.js +124 -0
  134. package/dist/vue/components/utility/animated-number.ce.js +66 -0
  135. package/dist/vue/components/utility/float-button.ce.js +104 -0
  136. package/dist/vue/components/utility/listbox.ce.js +81 -0
  137. package/dist/vue/components/utility/loading-bar.ce.js +85 -0
  138. package/dist/vue/components/utility/log-viewer.ce.js +124 -0
  139. package/dist/vue/components/utility/notification-queue.ce.js +109 -0
  140. package/dist/vue/components/utility/progress-group.ce.js +59 -0
  141. package/dist/vue/components/utility/qr-code.ce.js +62 -0
  142. package/dist/vue/components/utility/tag-group.ce.js +124 -0
  143. package/dist/vue/components/utility/tour.ce.js +214 -0
  144. package/dist/vue/components/utility/virtual-select.ce.js +207 -0
  145. package/dist/vue/components/utility/watermark.ce.js +44 -0
  146. package/dist/vue/internal/menu-items.js +184 -0
  147. package/dist/vue/internal/navigation-items.js +110 -0
  148. package/dist/vue/utils/code-highlight.js +142 -0
  149. package/dist/vue/utils/config.js +47 -0
  150. package/dist/vue/utils/content-motion.js +37 -0
  151. package/dist/vue/utils/content.js +83 -0
  152. package/dist/vue/utils/display-status.js +31 -0
  153. package/dist/vue/utils/foundation.js +65 -0
  154. package/dist/vue/utils/input-state.js +38 -0
  155. package/dist/vue/utils/interaction.js +103 -0
  156. package/dist/vue/utils/local-date.js +48 -0
  157. package/dist/vue/utils/motion.js +80 -0
  158. package/dist/vue/utils/native-slots.js +30 -0
  159. package/dist/vue/utils/navigation.js +44 -0
  160. package/dist/vue/utils/notifications.js +60 -0
  161. package/dist/vue/utils/qr.js +20 -0
  162. package/dist/vue/utils/remote-options.js +65 -0
  163. package/dist/vue/utils/ripple.js +20 -0
  164. package/dist/vue/utils/scoped-slots.js +22 -0
  165. package/dist/vue/utils/shell.js +43 -0
  166. package/dist/vue/utils/theme.js +50 -0
  167. package/dist/vue/utils/utility-choice.js +56 -0
  168. package/package.json +105 -4
@@ -0,0 +1,146 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ import n from "../core/icon.ce.js";
4
+ import { presenceTransition as r } from "../../utils/motion.js";
5
+ import i from "./spinner.ce.js";
6
+ /* empty css */
7
+ import { Transition as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, mergeProps as d, normalizeStyle as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useAttrs as v, vShow as y, watch as b, withCtx as x, withDirectives as S } from "vue";
8
+ import { ImageNotFound01Icon as C } from "@hugeicons/core-free-icons";
9
+ // src/components/display/image.ce.vue
10
+ var w = ["data-state"], T = ["aria-busy"], E = [
11
+ "src",
12
+ "alt",
13
+ "srcset",
14
+ "sizes",
15
+ "loading",
16
+ "width",
17
+ "height",
18
+ "inert",
19
+ "aria-hidden"
20
+ ], D = {
21
+ key: 0,
22
+ class: "kima-image__placeholder"
23
+ }, O = ["role", "aria-label"], k = { key: 0 }, A = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
24
+ __name: "image.ce",
25
+ props: {
26
+ src: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ alt: {
31
+ type: String,
32
+ default: ""
33
+ },
34
+ srcset: {
35
+ type: String,
36
+ default: void 0
37
+ },
38
+ sizes: {
39
+ type: String,
40
+ default: void 0
41
+ },
42
+ loading: {
43
+ type: String,
44
+ default: "lazy"
45
+ },
46
+ fit: {
47
+ type: String,
48
+ default: "cover"
49
+ },
50
+ width: {
51
+ type: [String, Number],
52
+ default: void 0
53
+ },
54
+ height: {
55
+ type: [String, Number],
56
+ default: void 0
57
+ },
58
+ caption: {
59
+ type: String,
60
+ default: ""
61
+ }
62
+ },
63
+ emits: ["load", "error"],
64
+ setup(t, { emit: A }) {
65
+ let j = t, M = A, N = v(), P = m(null), { isCustomElement: F, hasNativeSlot: I } = e(P), L = m(null), R = m(j.src || j.srcset ? "loading" : "error");
66
+ b(() => [
67
+ j.src,
68
+ j.srcset,
69
+ j.sizes
70
+ ], () => {
71
+ R.value = j.src || j.srcset ? "loading" : "error";
72
+ }, { flush: "sync" });
73
+ function z(e) {
74
+ return e.target === L.value && e.target.getAttribute("src") === j.src && (e.target.getAttribute("srcset") || "") === (j.srcset || "") && (e.target.getAttribute("sizes") || "") === (j.sizes || "");
75
+ }
76
+ function B(e) {
77
+ z(e) && (R.value = "loaded", M("load", e));
78
+ }
79
+ function V(e) {
80
+ z(e) && (R.value = "error", M("error", e));
81
+ }
82
+ return (e, m) => (p(), s("figure", d({
83
+ ref_key: "root",
84
+ ref: P
85
+ }, {
86
+ ..._(N),
87
+ id: _(F) ? void 0 : _(N).id
88
+ }, {
89
+ class: "kima-image",
90
+ "data-state": R.value
91
+ }), [c("div", {
92
+ class: "kima-image__frame",
93
+ "aria-busy": R.value === "loading" || void 0
94
+ }, [
95
+ u(a, { name: "kima-fade" }, {
96
+ default: x(() => [t.src || t.srcset ? S((p(), s("img", {
97
+ ref_key: "image",
98
+ ref: L,
99
+ class: "kima-image__img",
100
+ key: JSON.stringify([
101
+ t.src,
102
+ t.srcset,
103
+ t.sizes
104
+ ]),
105
+ src: t.src,
106
+ alt: t.alt,
107
+ srcset: t.srcset,
108
+ sizes: t.sizes,
109
+ loading: t.loading,
110
+ width: t.width,
111
+ height: t.height,
112
+ inert: R.value !== "loaded",
113
+ "aria-hidden": R.value !== "loaded" || void 0,
114
+ style: f({ objectFit: [
115
+ "cover",
116
+ "contain",
117
+ "fill",
118
+ "none",
119
+ "scale-down"
120
+ ].includes(t.fit) ? t.fit : "cover" }),
121
+ onLoad: B,
122
+ onError: V
123
+ }, null, 44, E)), [[y, R.value !== "error"]]) : o("", !0)]),
124
+ _: 1
125
+ }),
126
+ u(a, d({ name: "kima-fade" }, _(r)), {
127
+ default: x(() => [R.value === "loading" ? (p(), s("div", D, [h(e.$slots, "loading", {}, () => [u(i, { label: "图片加载中" })], !0)])) : o("", !0)]),
128
+ _: 3
129
+ }, 16),
130
+ u(a, d({ name: "kima-fade" }, _(r)), {
131
+ default: x(() => [R.value === "error" ? (p(), s("div", {
132
+ key: 0,
133
+ class: "kima-image__error",
134
+ role: t.alt ? "img" : void 0,
135
+ "aria-label": t.alt || void 0
136
+ }, [h(e.$slots, "error", {}, () => [u(n, {
137
+ icon: _(C),
138
+ size: 32,
139
+ "aria-hidden": "true"
140
+ }, null, 8, ["icon"]), m[0] ||= c("span", null, "图片加载失败", -1)], !0)], 8, O)) : o("", !0)]),
141
+ _: 3
142
+ }, 16)
143
+ ], 8, T), t.caption || e.$slots.caption || _(I)("caption") || _(F) ? (p(), s("figcaption", k, [h(e.$slots, "caption", {}, () => [l(g(t.caption), 1)], !0)])) : o("", !0)], 16, w));
144
+ }
145
+ }), [["__scopeId", "data-v-d16b864e"]]);
146
+ export { A as default };
@@ -0,0 +1,68 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ import { presenceTransition as n } from "../../utils/motion.js";
4
+ /* empty css */
5
+ import { Fragment as r, TransitionGroup as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, mergeProps as u, openBlock as d, ref as f, renderList as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, toRaw as _, unref as v, useAttrs as y, withCtx as b } from "vue";
6
+ // src/components/display/list.ce.vue
7
+ var x = { class: "kima-list__body" }, S = { key: 0 }, C = {
8
+ key: 0,
9
+ class: "kima-list__action"
10
+ }, w = {
11
+ key: "empty",
12
+ class: "kima-list__empty"
13
+ }, T = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
14
+ __name: "list.ce",
15
+ props: {
16
+ items: {
17
+ type: Array,
18
+ default: () => []
19
+ },
20
+ ordered: Boolean,
21
+ label: {
22
+ type: String,
23
+ default: "列表"
24
+ },
25
+ emptyText: {
26
+ type: String,
27
+ default: "暂无条目"
28
+ }
29
+ },
30
+ setup(t) {
31
+ let T = t, E = y(), D = f(null), { isCustomElement: O, hasNativeSlot: k } = e(D), A = /* @__PURE__ */ new WeakMap(), j = 0;
32
+ function M(e, t) {
33
+ let n;
34
+ if (typeof e == "object" && e) {
35
+ let t = _(e);
36
+ t.id == null ? (A.has(t) || A.set(t, ++j), n = `object:${A.get(t)}`) : n = `id:${typeof t.id}:${t.id}`;
37
+ } else n = `value:${typeof e}:${e}`;
38
+ let r = T.items.slice(0, t).filter((t) => Object.is(_(t), _(e))).length;
39
+ return `${n}:${r}`;
40
+ }
41
+ return (e, f) => (d(), a(h(t.ordered ? "ol" : "ul"), u({
42
+ ref_key: "root",
43
+ ref: D
44
+ }, {
45
+ ...v(E),
46
+ id: v(O) ? void 0 : v(E).id
47
+ }, {
48
+ class: "kima-list",
49
+ "aria-label": t.label
50
+ }), {
51
+ default: b(() => [m(e.$slots, "default", {}, () => [l(i, u({ name: "kima-list" }, v(n)), {
52
+ default: b(() => [(d(!0), s(r, null, p(t.items, (t, n) => (d(), s("li", {
53
+ key: M(t, n),
54
+ class: "kima-list__item"
55
+ }, [m(e.$slots, "item", {
56
+ item: t,
57
+ index: n
58
+ }, () => [c("div", x, [c("strong", null, g(typeof t == "object" && t ? t.title : t), 1), t?.description ? (d(), s("p", S, g(t.description), 1)) : o("", !0)]), e.$slots.action ? (d(), s("div", C, [m(e.$slots, "action", {
59
+ item: t,
60
+ index: n
61
+ }, void 0, !0)])) : o("", !0)], !0)]))), 128)), !t.items.length && !v(k)("default") ? (d(), s("li", w, g(t.emptyText), 1)) : o("", !0)]),
62
+ _: 3
63
+ }, 16)], !0)]),
64
+ _: 3
65
+ }, 16, ["aria-label"]));
66
+ }
67
+ }), [["__scopeId", "data-v-db362eec"]]);
68
+ export { T as default };
@@ -0,0 +1,57 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ import n from "../core/icon.ce.js";
4
+ import { displayStatus as r } from "../../utils/display-status.js";
5
+ /* empty css */
6
+ import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, mergeProps as l, openBlock as u, ref as d, renderSlot as f, toDisplayString as p, unref as m, useAttrs as h } from "vue";
7
+ // src/components/display/result.ce.vue
8
+ var g = ["data-variant"], _ = ["aria-label"], v = { key: 0 }, y = {
9
+ key: 1,
10
+ class: "kima-result__content"
11
+ }, b = {
12
+ key: 2,
13
+ class: "kima-result__actions"
14
+ }, x = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
15
+ __name: "result.ce",
16
+ props: {
17
+ variant: {
18
+ type: String,
19
+ default: "success"
20
+ },
21
+ heading: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ description: {
26
+ type: String,
27
+ default: ""
28
+ }
29
+ },
30
+ setup(t) {
31
+ let x = t, S = h(), C = d(null), { isCustomElement: w, hasNativeSlot: T } = e(C), E = i(() => r(x.variant));
32
+ return (e, r) => (u(), o("section", l({
33
+ ref_key: "root",
34
+ ref: C
35
+ }, {
36
+ ...m(S),
37
+ id: m(w) ? void 0 : m(S).id
38
+ }, {
39
+ class: "kima-result",
40
+ "data-variant": E.value.variant
41
+ }), [
42
+ s("span", {
43
+ class: "kima-result__icon",
44
+ role: "img",
45
+ "aria-label": E.value.label
46
+ }, [f(e.$slots, "icon", {}, () => [c(n, {
47
+ icon: E.value.icon,
48
+ size: 56
49
+ }, null, 8, ["icon"])], !0)], 8, _),
50
+ s("h2", null, p(t.heading || E.value.label), 1),
51
+ t.description ? (u(), o("p", v, p(t.description), 1)) : a("", !0),
52
+ e.$slots.default || m(T)("default") || m(w) ? (u(), o("div", y, [f(e.$slots, "default", {}, void 0, !0)])) : a("", !0),
53
+ e.$slots.action || m(T)("action") || m(w) ? (u(), o("div", b, [f(e.$slots, "action", {}, void 0, !0)])) : a("", !0)
54
+ ], 16, g));
55
+ }
56
+ }), [["__scopeId", "data-v-f08cf21f"]]);
57
+ export { x as default };
@@ -0,0 +1,67 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ import { presenceTransition as n } from "../../utils/motion.js";
4
+ /* empty css */
5
+ import { Fragment as r, Transition as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, mergeProps as u, openBlock as d, ref as f, renderList as p, renderSlot as m, unref as h, useAttrs as g, vShow as _, withCtx as v, withDirectives as y } from "vue";
6
+ // src/components/display/skeleton.ce.vue
7
+ var b = [
8
+ "aria-busy",
9
+ "aria-label",
10
+ "role"
11
+ ], x = {
12
+ class: "kima-skeleton__placeholder",
13
+ "aria-hidden": "true"
14
+ }, S = {
15
+ key: 0,
16
+ class: "kima-skeleton__avatar"
17
+ }, C = { class: "kima-skeleton__lines" }, w = ["inert", "aria-hidden"], T = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
18
+ __name: "skeleton.ce",
19
+ props: {
20
+ loading: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ rows: {
25
+ type: Number,
26
+ default: 3
27
+ },
28
+ animated: {
29
+ type: Boolean,
30
+ default: !0
31
+ },
32
+ avatar: Boolean,
33
+ label: {
34
+ type: String,
35
+ default: "正在加载内容"
36
+ }
37
+ },
38
+ setup(t) {
39
+ let T = t, E = g(), D = f(null), { isCustomElement: O } = e(D), k = a(() => Number.isFinite(T.rows) ? Math.min(50, Math.max(1, Math.floor(T.rows))) : 3);
40
+ return (e, a) => (d(), s("div", u({
41
+ ref_key: "root",
42
+ ref: D
43
+ }, {
44
+ ...h(E),
45
+ id: h(O) ? void 0 : h(E).id
46
+ }, {
47
+ class: ["kima-skeleton", { "kima-skeleton--animated": t.animated && t.loading }],
48
+ "aria-busy": t.loading || void 0,
49
+ "aria-label": t.loading ? t.label : void 0,
50
+ role: t.loading ? "status" : void 0
51
+ }), [l(i, { name: "kima-fade" }, {
52
+ default: v(() => [y(c("div", x, [t.avatar ? (d(), s("span", S)) : o("", !0), c("div", C, [(d(!0), s(r, null, p(k.value, (e) => (d(), s("span", {
53
+ key: e,
54
+ class: "kima-skeleton__line"
55
+ }))), 128))])], 512), [[_, t.loading]])]),
56
+ _: 1
57
+ }), l(i, u({ name: "kima-fade" }, h(n)), {
58
+ default: v(() => [y(c("div", {
59
+ class: "kima-skeleton__content",
60
+ inert: t.loading,
61
+ "aria-hidden": t.loading || void 0
62
+ }, [m(e.$slots, "default", {}, void 0, !0)], 8, w), [[_, !t.loading]])]),
63
+ _: 3
64
+ }, 16)], 16, b));
65
+ }
66
+ }), [["__scopeId", "data-v-d9a7d212"]]);
67
+ export { T as default };
@@ -0,0 +1,42 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ /* empty css */
4
+ import { createElementBlock as n, createElementVNode as r, mergeProps as i, openBlock as a, ref as o, unref as s, useAttrs as c } from "vue";
5
+ // src/components/display/spinner.ce.vue
6
+ var l = [
7
+ "role",
8
+ "aria-label",
9
+ "aria-hidden"
10
+ ], u = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
11
+ __name: "spinner.ce",
12
+ props: {
13
+ label: {
14
+ type: String,
15
+ default: "加载中"
16
+ },
17
+ size: {
18
+ type: String,
19
+ default: "medium"
20
+ },
21
+ decorative: Boolean
22
+ },
23
+ setup(t) {
24
+ let u = c(), d = o(null), { isCustomElement: f } = e(d);
25
+ return (e, o) => (a(), n("span", i({
26
+ ref_key: "root",
27
+ ref: d
28
+ }, {
29
+ ...s(u),
30
+ id: s(f) ? void 0 : s(u).id
31
+ }, {
32
+ class: ["kima-spinner", `kima-spinner--${t.size}`],
33
+ role: t.decorative ? void 0 : "status",
34
+ "aria-label": t.decorative ? void 0 : t.label,
35
+ "aria-hidden": t.decorative || void 0
36
+ }), [...o[0] ||= [r("span", {
37
+ class: "kima-spinner__ring",
38
+ "aria-hidden": "true"
39
+ }, null, -1)]], 16, l));
40
+ }
41
+ }), [["__scopeId", "data-v-d7ff1dc3"]]);
42
+ export { u as default };
@@ -0,0 +1,71 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ /* empty css */
4
+ import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, mergeProps as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d, unref as f, useAttrs as p } from "vue";
5
+ // src/components/display/statistic.ce.vue
6
+ var m = {
7
+ key: 0,
8
+ class: "kima-statistic__label"
9
+ }, h = { class: "kima-statistic__value" }, g = { class: "kima-statistic__affix" }, _ = { class: "kima-statistic__affix" }, v = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
10
+ __name: "statistic.ce",
11
+ props: {
12
+ value: {
13
+ type: [Number, String],
14
+ default: 0
15
+ },
16
+ label: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ locale: {
21
+ type: String,
22
+ default: "zh-CN"
23
+ },
24
+ precision: {
25
+ type: Number,
26
+ default: void 0
27
+ },
28
+ options: {
29
+ type: Object,
30
+ default: () => ({})
31
+ },
32
+ prefix: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ suffix: {
37
+ type: String,
38
+ default: ""
39
+ }
40
+ },
41
+ setup(t) {
42
+ let v = t, y = p(), b = l(null), { isCustomElement: x } = e(b), S = n(() => {
43
+ let e = Number(v.value);
44
+ if (!Number.isFinite(e)) return "—";
45
+ let t = Number.isFinite(v.precision) ? Math.min(20, Math.max(0, Math.floor(v.precision))) : void 0, n = {
46
+ ...v.options,
47
+ ...t === void 0 ? {} : {
48
+ minimumFractionDigits: t,
49
+ maximumFractionDigits: t
50
+ }
51
+ };
52
+ try {
53
+ return new Intl.NumberFormat(v.locale, n).format(e);
54
+ } catch {
55
+ return new Intl.NumberFormat("zh-CN").format(e);
56
+ }
57
+ });
58
+ return (e, n) => (c(), i("div", s({
59
+ ref_key: "root",
60
+ ref: b
61
+ }, {
62
+ ...f(y),
63
+ id: f(x) ? void 0 : f(y).id
64
+ }, { class: "kima-statistic" }), [t.label ? (c(), i("div", m, d(t.label), 1)) : r("", !0), a("div", h, [
65
+ a("span", g, [u(e.$slots, "prefix", {}, () => [o(d(t.prefix), 1)], !0)]),
66
+ a("span", null, d(S.value), 1),
67
+ a("span", _, [u(e.$slots, "suffix", {}, () => [o(d(t.suffix), 1)], !0)])
68
+ ])], 16));
69
+ }
70
+ }), [["__scopeId", "data-v-cc8448a6"]]);
71
+ export { v as default };
@@ -0,0 +1,59 @@
1
+ import { useNativeSlots as e } from "../../utils/native-slots.js";
2
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ import n from "../core/icon.ce.js";
4
+ import { presenceTransition as r } from "../../utils/motion.js";
5
+ import { displayStatus as i } from "../../utils/display-status.js";
6
+ /* empty css */
7
+ import { Fragment as a, TransitionGroup as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, mergeProps as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useAttrs as v, withCtx as y } from "vue";
8
+ // src/components/display/timeline.ce.vue
9
+ var b = ["aria-label"], x = ["data-variant"], S = ["aria-label"], C = { class: "kima-timeline__body" }, w = ["datetime"], T = { key: 1 }, E = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
10
+ __name: "timeline.ce",
11
+ props: {
12
+ items: {
13
+ type: Array,
14
+ default: () => []
15
+ },
16
+ label: {
17
+ type: String,
18
+ default: "时间线"
19
+ }
20
+ },
21
+ setup(t) {
22
+ let E = v(), D = p(null), { isCustomElement: O } = e(D);
23
+ return (e, p) => (f(), c("ol", d({
24
+ ref_key: "root",
25
+ ref: D
26
+ }, {
27
+ ..._(E),
28
+ id: _(O) ? void 0 : _(E).id
29
+ }, {
30
+ class: "kima-timeline",
31
+ "aria-label": t.label
32
+ }), [h(e.$slots, "default", {}, () => [u(o, d({ name: "kima-list" }, _(r)), {
33
+ default: y(() => [(f(!0), c(a, null, m(t.items, (t, r) => (f(), c("li", {
34
+ key: t.id ?? r,
35
+ class: "kima-timeline__item",
36
+ "data-variant": _(i)(t.variant).variant
37
+ }, [l("span", {
38
+ class: "kima-timeline__marker",
39
+ role: "img",
40
+ "aria-label": _(i)(t.variant).label
41
+ }, [u(n, {
42
+ icon: _(i)(t.variant).icon,
43
+ size: 24
44
+ }, null, 8, ["icon"])], 8, S), l("div", C, [h(e.$slots, "item", {
45
+ item: t,
46
+ index: r
47
+ }, () => [
48
+ t.time ? (f(), c("time", {
49
+ key: 0,
50
+ datetime: t.datetime
51
+ }, g(t.time), 9, w)) : s("", !0),
52
+ l("strong", null, g(t.title), 1),
53
+ t.description ? (f(), c("p", T, g(t.description), 1)) : s("", !0)
54
+ ], !0)])], 8, x))), 128))]),
55
+ _: 3
56
+ }, 16)], !0)], 16, b));
57
+ }
58
+ }), [["__scopeId", "data-v-ff6a1726"]]);
59
+ export { E as default };
@@ -0,0 +1,103 @@
1
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import { useInputState as t } from "../../utils/input-state.js";
3
+ /* empty css */
4
+ import { computed as n, createElementBlock as r, createElementVNode as i, normalizeClass as a, normalizeStyle as o, openBlock as s, ref as c, toDisplayString as l, unref as u, withModifiers as d } from "vue";
5
+ // src/components/form-completion/angle-slider.ce.vue
6
+ var f = [
7
+ "aria-label",
8
+ "aria-valuenow",
9
+ "aria-valuetext",
10
+ "aria-disabled"
11
+ ], p = [
12
+ "value",
13
+ "name",
14
+ "step",
15
+ "required",
16
+ "disabled",
17
+ "aria-label"
18
+ ], m = /*#__PURE__*/ e({
19
+ __name: "angle-slider.ce",
20
+ props: {
21
+ modelValue: {
22
+ type: Number,
23
+ default: 0
24
+ },
25
+ name: String,
26
+ label: {
27
+ type: String,
28
+ default: "角度"
29
+ },
30
+ disabled: Boolean,
31
+ required: Boolean,
32
+ step: {
33
+ type: Number,
34
+ default: 1
35
+ },
36
+ size: {
37
+ type: Number,
38
+ default: 168
39
+ }
40
+ },
41
+ emits: ["update:modelValue", "change"],
42
+ setup(e, { emit: m }) {
43
+ let h = e, g = m, _ = c(null);
44
+ c(null);
45
+ let { local: v, update: y } = t(h, g, _, (e) => Number.isFinite(Number(e)) ? (Number(e) % 360 + 360) % 360 : 0), b = n(() => ({
46
+ left: `${50 + Math.sin(v.value * Math.PI / 180) * 42}%`,
47
+ top: `${50 - Math.cos(v.value * Math.PI / 180) * 42}%`
48
+ }));
49
+ function x(e) {
50
+ if (h.disabled) return;
51
+ let t = _.value.getBoundingClientRect(), n = (Math.atan2(e.clientX - (t.left + t.width / 2), -(e.clientY - (t.top + t.height / 2))) * 180 / Math.PI + 360) % 360;
52
+ y(Math.round(n / h.step) * h.step % 360, !1);
53
+ }
54
+ function S(e) {
55
+ [
56
+ "ArrowLeft",
57
+ "ArrowDown",
58
+ "ArrowRight",
59
+ "ArrowUp",
60
+ "Home",
61
+ "End"
62
+ ].includes(e.key) && (e.preventDefault(), y(e.key === "Home" ? 0 : e.key === "End" ? 359.999 : (v.value + (e.key === "ArrowRight" || e.key === "ArrowUp" ? 1 : -1) * h.step + 360) % 360));
63
+ }
64
+ return (t, n) => (s(), r("div", {
65
+ ref_key: "root",
66
+ ref: _,
67
+ class: a(["kima-angle-slider", { "kima-angle-slider--disabled": e.disabled }]),
68
+ style: o({ "--kima-angle-size": `${e.size}px` })
69
+ }, [i("div", {
70
+ class: "kima-angle-slider__dial",
71
+ role: "slider",
72
+ tabindex: "0",
73
+ "aria-label": e.label,
74
+ "aria-valuemin": 0,
75
+ "aria-valuemax": 359,
76
+ "aria-valuenow": u(v),
77
+ "aria-valuetext": `${u(v)}°`,
78
+ "aria-disabled": e.disabled || void 0,
79
+ onPointerdown: n[0] ||= (e) => {
80
+ e.currentTarget.setPointerCapture(e.pointerId), x(e);
81
+ },
82
+ onPointermove: n[1] ||= (e) => e.buttons && x(e),
83
+ onKeydown: S
84
+ }, [i("span", {
85
+ class: "kima-angle-slider__marker",
86
+ style: o(b.value)
87
+ }, null, 4), i("output", null, l(u(v)) + "°", 1)], 40, f), i("input", {
88
+ class: "kima-angle-slider__native",
89
+ type: "number",
90
+ value: u(v),
91
+ name: e.name,
92
+ min: "0",
93
+ max: "359.999",
94
+ step: e.step,
95
+ required: e.required,
96
+ disabled: e.disabled,
97
+ "aria-label": e.label,
98
+ onInput: n[2] ||= d((e) => u(y)(Number(e.target.value)), ["stop"]),
99
+ onChange: n[3] ||= d((e) => g("change", u(v)), ["stop"])
100
+ }, null, 40, p)], 6));
101
+ }
102
+ }, [["__scopeId", "data-v-924c5f0d"]]);
103
+ export { m as default };