@kernel4632/kima 0.0.0-stage → 0.6.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.
- package/LICENSE +21 -0
- package/README.md +166 -2
- package/dist/THIRD_PARTY_NOTICES.txt +2676 -0
- package/dist/kima-elements-core.js +53209 -0
- package/dist/kima-elements.js +126371 -0
- package/dist/kima-theme.js +1583 -0
- package/dist/kima.js +141 -0
- package/dist/style.css +2 -0
- package/dist/vue/_virtual/_plugin-vue_export-helper.js +7 -0
- package/dist/vue/components/advanced-input/calendar.ce.js +216 -0
- package/dist/vue/components/advanced-input/date-range-picker.ce.js +224 -0
- package/dist/vue/components/advanced-input/editable.ce.js +160 -0
- package/dist/vue/components/advanced-input/mention.ce.js +181 -0
- package/dist/vue/components/advanced-input/range-slider.ce.js +111 -0
- package/dist/vue/components/advanced-input/time-range-picker.ce.js +120 -0
- package/dist/vue/components/advanced-input/transfer.ce.js +192 -0
- package/dist/vue/components/content/chart.ce.js +282 -0
- package/dist/vue/components/content/code-editor.ce.js +309 -0
- package/dist/vue/components/content/equation.ce.js +69 -0
- package/dist/vue/components/content/heatmap.ce.js +148 -0
- package/dist/vue/components/content/rich-text-editor.ce.js +319 -0
- package/dist/vue/components/core/badge.ce.js +66 -0
- package/dist/vue/components/core/button-group.ce.js +142 -0
- package/dist/vue/components/core/button.ce.js +73 -0
- package/dist/vue/components/core/card.ce.js +73 -0
- package/dist/vue/components/core/cascader.ce.js +329 -0
- package/dist/vue/components/core/checkbox.ce.js +116 -0
- package/dist/vue/components/core/code-block.ce.js +108 -0
- package/dist/vue/components/core/combobox.ce.js +354 -0
- package/dist/vue/components/core/date-picker.ce.js +433 -0
- package/dist/vue/components/core/dialog.ce.js +118 -0
- package/dist/vue/components/core/divider.ce.js +49 -0
- package/dist/vue/components/core/drawer.ce.js +235 -0
- package/dist/vue/components/core/empty-state.ce.js +58 -0
- package/dist/vue/components/core/icon-button.ce.js +93 -0
- package/dist/vue/components/core/icon.ce.js +42 -0
- package/dist/vue/components/core/layout.ce.js +68 -0
- package/dist/vue/components/core/menu.ce.js +178 -0
- package/dist/vue/components/core/notification.ce.js +158 -0
- package/dist/vue/components/core/pagination.ce.js +158 -0
- package/dist/vue/components/core/progress.ce.js +49 -0
- package/dist/vue/components/core/select.ce.js +325 -0
- package/dist/vue/components/core/slider.ce.js +116 -0
- package/dist/vue/components/core/switch.ce.js +100 -0
- package/dist/vue/components/core/tabs.ce.js +193 -0
- package/dist/vue/components/core/text-field.ce.js +194 -0
- package/dist/vue/components/core/time-picker.ce.js +486 -0
- package/dist/vue/components/core/tooltip.ce.js +125 -0
- package/dist/vue/components/core/tree.ce.js +248 -0
- package/dist/vue/components/core/virtual-scroll.ce.js +176 -0
- package/dist/vue/components/data/copy-button.ce.js +75 -0
- package/dist/vue/components/data/image-preview.ce.js +226 -0
- package/dist/vue/components/data/infinite-scroll.ce.js +126 -0
- package/dist/vue/components/data/long-text.ce.js +70 -0
- package/dist/vue/components/data/relative-time.ce.js +77 -0
- package/dist/vue/components/data/ring-progress.ce.js +87 -0
- package/dist/vue/components/data/table.ce.js +491 -0
- package/dist/vue/components/data/virtual-table.ce.js +178 -0
- package/dist/vue/components/data/virtual-tree.ce.js +213 -0
- package/dist/vue/components/display/alert.ce.js +101 -0
- package/dist/vue/components/display/avatar-group.ce.js +65 -0
- package/dist/vue/components/display/avatar.ce.js +84 -0
- package/dist/vue/components/display/blockquote.ce.js +44 -0
- package/dist/vue/components/display/countdown.ce.js +77 -0
- package/dist/vue/components/display/descriptions.ce.js +43 -0
- package/dist/vue/components/display/highlight.ce.js +48 -0
- package/dist/vue/components/display/image.ce.js +146 -0
- package/dist/vue/components/display/list.ce.js +68 -0
- package/dist/vue/components/display/result.ce.js +57 -0
- package/dist/vue/components/display/skeleton.ce.js +67 -0
- package/dist/vue/components/display/spinner.ce.js +42 -0
- package/dist/vue/components/display/statistic.ce.js +71 -0
- package/dist/vue/components/display/timeline.ce.js +59 -0
- package/dist/vue/components/form-completion/angle-slider.ce.js +103 -0
- package/dist/vue/components/form-completion/color-picker.ce.js +286 -0
- package/dist/vue/components/form-completion/date-field.ce.js +131 -0
- package/dist/vue/components/form-completion/dynamic-input.ce.js +158 -0
- package/dist/vue/components/form-completion/form.ce.js +248 -0
- package/dist/vue/components/form-completion/json-input.ce.js +114 -0
- package/dist/vue/components/form-completion/masked-input.ce.js +88 -0
- package/dist/vue/components/form-completion/period-picker.ce.js +147 -0
- package/dist/vue/components/form-completion/time-field.ce.js +120 -0
- package/dist/vue/components/form-completion/upload-manager.ce.js +223 -0
- package/dist/vue/components/foundation/banner.ce.js +106 -0
- package/dist/vue/components/foundation/error-state.ce.js +108 -0
- package/dist/vue/components/foundation/field-group.ce.js +146 -0
- package/dist/vue/components/foundation/flex.ce.js +60 -0
- package/dist/vue/components/foundation/grid.ce.js +52 -0
- package/dist/vue/components/foundation/input-group.ce.js +34 -0
- package/dist/vue/components/foundation/page-header.ce.js +55 -0
- package/dist/vue/components/foundation/time-display.ce.js +129 -0
- package/dist/vue/components/foundation/typography.ce.js +71 -0
- package/dist/vue/components/input/checkbox-group.ce.js +93 -0
- package/dist/vue/components/input/field.ce.js +74 -0
- package/dist/vue/components/input/file-upload.ce.js +142 -0
- package/dist/vue/components/input/number-field.ce.js +103 -0
- package/dist/vue/components/input/pin-input.ce.js +112 -0
- package/dist/vue/components/input/radio-group.ce.js +96 -0
- package/dist/vue/components/input/rating.ce.js +115 -0
- package/dist/vue/components/input/tags-input.ce.js +153 -0
- package/dist/vue/components/input/textarea.ce.js +180 -0
- package/dist/vue/components/input/toggle.ce.js +58 -0
- package/dist/vue/components/interaction/chip.ce.js +95 -0
- package/dist/vue/components/interaction/command.ce.js +161 -0
- package/dist/vue/components/interaction/context-menu.ce.js +113 -0
- package/dist/vue/components/interaction/hover-card.ce.js +92 -0
- package/dist/vue/components/interaction/loading-overlay.ce.js +70 -0
- package/dist/vue/components/interaction/menubar.ce.js +134 -0
- package/dist/vue/components/interaction/multi-select.ce.js +264 -0
- package/dist/vue/components/interaction/popconfirm.ce.js +95 -0
- package/dist/vue/components/interaction/popover.ce.js +83 -0
- package/dist/vue/components/interaction/tree-select.ce.js +195 -0
- package/dist/vue/components/navigation/accordion.ce.js +114 -0
- package/dist/vue/components/navigation/anchor.ce.js +125 -0
- package/dist/vue/components/navigation/back-top.ce.js +67 -0
- package/dist/vue/components/navigation/breadcrumb.ce.js +48 -0
- package/dist/vue/components/navigation/carousel.ce.js +114 -0
- package/dist/vue/components/navigation/collapsible.ce.js +57 -0
- package/dist/vue/components/navigation/link.ce.js +62 -0
- package/dist/vue/components/navigation/navigation-menu.ce.js +91 -0
- package/dist/vue/components/navigation/overflow-list.ce.js +67 -0
- package/dist/vue/components/navigation/scroll-area.ce.js +47 -0
- package/dist/vue/components/navigation/splitter.ce.js +131 -0
- package/dist/vue/components/navigation/stepper.ce.js +74 -0
- package/dist/vue/components/navigation/toolbar.ce.js +93 -0
- package/dist/vue/components/navigation/visually-hidden.ce.js +16 -0
- package/dist/vue/components/shell/app-shell.ce.js +87 -0
- package/dist/vue/components/shell/config-provider.ce.js +110 -0
- package/dist/vue/components/shell/marquee.ce.js +92 -0
- package/dist/vue/components/shell/masonry.ce.js +50 -0
- package/dist/vue/components/shell/sidebar.ce.js +125 -0
- package/dist/vue/components/utility/affix.ce.js +64 -0
- package/dist/vue/components/utility/alert-dialog.ce.js +124 -0
- package/dist/vue/components/utility/animated-number.ce.js +66 -0
- package/dist/vue/components/utility/float-button.ce.js +104 -0
- package/dist/vue/components/utility/listbox.ce.js +81 -0
- package/dist/vue/components/utility/loading-bar.ce.js +85 -0
- package/dist/vue/components/utility/log-viewer.ce.js +124 -0
- package/dist/vue/components/utility/notification-queue.ce.js +109 -0
- package/dist/vue/components/utility/progress-group.ce.js +59 -0
- package/dist/vue/components/utility/qr-code.ce.js +62 -0
- package/dist/vue/components/utility/tag-group.ce.js +124 -0
- package/dist/vue/components/utility/tour.ce.js +214 -0
- package/dist/vue/components/utility/virtual-select.ce.js +207 -0
- package/dist/vue/components/utility/watermark.ce.js +44 -0
- package/dist/vue/internal/menu-items.js +184 -0
- package/dist/vue/internal/navigation-items.js +110 -0
- package/dist/vue/utils/code-highlight.js +142 -0
- package/dist/vue/utils/config.js +47 -0
- package/dist/vue/utils/content-motion.js +37 -0
- package/dist/vue/utils/content.js +83 -0
- package/dist/vue/utils/display-status.js +31 -0
- package/dist/vue/utils/foundation.js +65 -0
- package/dist/vue/utils/input-state.js +38 -0
- package/dist/vue/utils/interaction.js +103 -0
- package/dist/vue/utils/local-date.js +48 -0
- package/dist/vue/utils/motion.js +80 -0
- package/dist/vue/utils/native-slots.js +30 -0
- package/dist/vue/utils/navigation.js +44 -0
- package/dist/vue/utils/notifications.js +60 -0
- package/dist/vue/utils/qr.js +20 -0
- package/dist/vue/utils/remote-options.js +65 -0
- package/dist/vue/utils/ripple.js +20 -0
- package/dist/vue/utils/scoped-slots.js +22 -0
- package/dist/vue/utils/shell.js +43 -0
- package/dist/vue/utils/theme.js +50 -0
- package/dist/vue/utils/utility-choice.js +56 -0
- package/package.json +99 -4
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { useRipple as e } from "../../utils/ripple.js";
|
|
2
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
import n from "../core/button.ce.js";
|
|
4
|
+
import { presenceTransition as r } from "../../utils/motion.js";
|
|
5
|
+
import { useInputAttrs as i, useInputState as a } from "../../utils/input-state.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment as o, TransitionGroup as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, isRef as h, mergeProps as g, normalizeClass as _, normalizeStyle as v, openBlock as y, ref as b, renderList as x, toDisplayString as S, unref as C, vModelText as w, watchEffect as T, withCtx as E, withDirectives as D, withModifiers as O } from "vue";
|
|
8
|
+
// src/components/input/tags-input.ce.vue
|
|
9
|
+
var k = ["aria-disabled"], A = [
|
|
10
|
+
"name",
|
|
11
|
+
"value",
|
|
12
|
+
"disabled"
|
|
13
|
+
], j = [
|
|
14
|
+
"aria-label",
|
|
15
|
+
"disabled",
|
|
16
|
+
"readonly",
|
|
17
|
+
"required",
|
|
18
|
+
"placeholder"
|
|
19
|
+
], M = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
20
|
+
__name: "tags-input.ce",
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
label: String,
|
|
27
|
+
name: String,
|
|
28
|
+
disabled: Boolean,
|
|
29
|
+
readonly: Boolean,
|
|
30
|
+
required: Boolean,
|
|
31
|
+
placeholder: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "输入后按回车"
|
|
34
|
+
},
|
|
35
|
+
max: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: Infinity
|
|
38
|
+
},
|
|
39
|
+
separator: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ","
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: [
|
|
45
|
+
"update:modelValue",
|
|
46
|
+
"change",
|
|
47
|
+
"reject"
|
|
48
|
+
],
|
|
49
|
+
setup(t, { expose: M, emit: N }) {
|
|
50
|
+
let P = t, F = N, I = b(null), L = b(null), R = b(""), z = !1, { attrs: B, controlAttrs: V } = i(), { local: H, update: U } = a(P, F, I, (e) => Array.isArray(e) ? [...new Set(e.map(String))] : [], () => {
|
|
51
|
+
R.value = "", z = !1;
|
|
52
|
+
});
|
|
53
|
+
e(I);
|
|
54
|
+
let W = c(() => H.value.length >= P.max), G = {
|
|
55
|
+
...r,
|
|
56
|
+
onBeforeLeave(e) {
|
|
57
|
+
r.onBeforeLeave(e), Object.assign(e.style, {
|
|
58
|
+
left: `${e.offsetLeft}px`,
|
|
59
|
+
top: `${e.offsetTop}px`,
|
|
60
|
+
width: `${e.offsetWidth}px`,
|
|
61
|
+
height: `${e.offsetHeight}px`,
|
|
62
|
+
boxSizing: "border-box"
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
onBeforeEnter(e) {
|
|
66
|
+
r.onBeforeEnter(e);
|
|
67
|
+
for (let t of [
|
|
68
|
+
"left",
|
|
69
|
+
"top",
|
|
70
|
+
"width",
|
|
71
|
+
"height",
|
|
72
|
+
"box-sizing"
|
|
73
|
+
]) e.style.removeProperty(t);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
T(() => {
|
|
77
|
+
L.value?.setCustomValidity(P.required && !P.disabled && !H.value.length ? "请至少添加一个标签" : "");
|
|
78
|
+
}, { flush: "post" });
|
|
79
|
+
function K(e = R.value) {
|
|
80
|
+
if (P.disabled || P.readonly || z) return;
|
|
81
|
+
let t = P.separator ? e.split(P.separator) : [e], n = [...H.value];
|
|
82
|
+
for (let e of t) {
|
|
83
|
+
let t = e.trim();
|
|
84
|
+
t && (n.includes(t) || n.length >= P.max ? F("reject", t) : n.push(t));
|
|
85
|
+
}
|
|
86
|
+
n.length !== H.value.length && U(n), R.value = "";
|
|
87
|
+
}
|
|
88
|
+
function q(e) {
|
|
89
|
+
P.disabled || P.readonly || (U(H.value.filter((t, n) => n !== e)), L.value?.focus());
|
|
90
|
+
}
|
|
91
|
+
function J(e) {
|
|
92
|
+
P.disabled || P.readonly || (z || e.isComposing ? e.key === "Enter" && e.preventDefault() : ((e.key === "Enter" || P.separator.length === 1 && e.key === P.separator) && (e.preventDefault(), K()), e.key === "Backspace" && !R.value && H.value.length && (e.preventDefault(), q(H.value.length - 1))));
|
|
93
|
+
}
|
|
94
|
+
function Y(e) {
|
|
95
|
+
let t = e.clipboardData?.getData("text");
|
|
96
|
+
!P.separator || !t?.includes(P.separator) || z || P.disabled || P.readonly || (e.preventDefault(), K(R.value + t));
|
|
97
|
+
}
|
|
98
|
+
return M({ focus: () => L.value?.focus() }), (e, r) => (y(), d("div", {
|
|
99
|
+
ref_key: "root",
|
|
100
|
+
ref: I,
|
|
101
|
+
class: _(["kima-tags-input", C(B).class]),
|
|
102
|
+
style: v(C(B).style),
|
|
103
|
+
"aria-disabled": t.disabled || void 0
|
|
104
|
+
}, [
|
|
105
|
+
m(s, g({ name: "kima-list" }, G), {
|
|
106
|
+
default: E(() => [(y(!0), d(o, null, x(C(H), (e, i) => (y(), d("span", {
|
|
107
|
+
key: e,
|
|
108
|
+
class: "kima-tags-input__tag"
|
|
109
|
+
}, [f("span", null, S(e), 1), t.readonly ? u("", !0) : (y(), l(n, {
|
|
110
|
+
key: 0,
|
|
111
|
+
variant: "text",
|
|
112
|
+
disabled: t.disabled,
|
|
113
|
+
"aria-label": `移除 ${e}`,
|
|
114
|
+
onClick: (e) => q(i)
|
|
115
|
+
}, {
|
|
116
|
+
default: E(() => [...r[5] ||= [p("×", -1)]]),
|
|
117
|
+
_: 1
|
|
118
|
+
}, 8, [
|
|
119
|
+
"disabled",
|
|
120
|
+
"aria-label",
|
|
121
|
+
"onClick"
|
|
122
|
+
]))]))), 128))]),
|
|
123
|
+
_: 1
|
|
124
|
+
}, 16),
|
|
125
|
+
(y(!0), d(o, null, x(C(H), (e) => (y(), d("input", {
|
|
126
|
+
key: e,
|
|
127
|
+
type: "hidden",
|
|
128
|
+
name: t.name,
|
|
129
|
+
value: e,
|
|
130
|
+
disabled: t.disabled
|
|
131
|
+
}, null, 8, A))), 128)),
|
|
132
|
+
D(f("input", g({
|
|
133
|
+
ref_key: "input",
|
|
134
|
+
ref: L
|
|
135
|
+
}, C(V), {
|
|
136
|
+
"onUpdate:modelValue": r[0] ||= (e) => R.value = e,
|
|
137
|
+
type: "text",
|
|
138
|
+
"aria-label": C(V)["aria-label"] || t.label,
|
|
139
|
+
disabled: t.disabled,
|
|
140
|
+
readonly: t.readonly || W.value,
|
|
141
|
+
required: t.required && !C(H).length,
|
|
142
|
+
placeholder: W.value ? "" : t.placeholder,
|
|
143
|
+
onKeydown: J,
|
|
144
|
+
onPaste: Y,
|
|
145
|
+
onInput: r[1] ||= O(() => {}, ["stop"]),
|
|
146
|
+
onChange: r[2] ||= O(() => {}, ["stop"]),
|
|
147
|
+
onCompositionstart: r[3] ||= (e) => h(z) ? z.value = !0 : z = !0,
|
|
148
|
+
onCompositionend: r[4] ||= (e) => h(z) ? z.value = !1 : z = !1
|
|
149
|
+
}), null, 16, j), [[w, R.value]])
|
|
150
|
+
], 14, k));
|
|
151
|
+
}
|
|
152
|
+
}), [["__scopeId", "data-v-7a178bc6"]]);
|
|
153
|
+
export { M as default };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { useRipple as e } from "../../utils/ripple.js";
|
|
2
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
import n from "../core/icon.ce.js";
|
|
4
|
+
import { collapseTransition as r, presenceTransition as i } from "../../utils/motion.js";
|
|
5
|
+
import { useInputAttrs as a, useInputState as o } from "../../utils/input-state.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Fragment as s, Transition as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, isRef as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeUnmount as b, onMounted as x, openBlock as S, ref as C, toDisplayString as w, unref as T, useId as E, vShow as D, watch as O, withCtx as k, withDirectives as A, withModifiers as j } from "vue";
|
|
8
|
+
import { Cancel01Icon as M } from "@hugeicons/core-free-icons";
|
|
9
|
+
// src/components/input/textarea.ce.vue
|
|
10
|
+
var N = ["aria-disabled"], P = ["aria-disabled"], ee = [
|
|
11
|
+
"value",
|
|
12
|
+
"aria-label",
|
|
13
|
+
"aria-invalid",
|
|
14
|
+
"aria-describedby",
|
|
15
|
+
"name",
|
|
16
|
+
"disabled",
|
|
17
|
+
"readonly",
|
|
18
|
+
"required",
|
|
19
|
+
"placeholder",
|
|
20
|
+
"rows",
|
|
21
|
+
"minlength",
|
|
22
|
+
"maxlength"
|
|
23
|
+
], te = ["disabled"], ne = ["inert", "aria-hidden"], F = ["id", "role"], I = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "kima-textarea__count"
|
|
26
|
+
}, L = /*#__PURE__*/ t(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
27
|
+
__name: "textarea.ce",
|
|
28
|
+
props: {
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ""
|
|
32
|
+
},
|
|
33
|
+
label: String,
|
|
34
|
+
name: String,
|
|
35
|
+
disabled: Boolean,
|
|
36
|
+
readonly: Boolean,
|
|
37
|
+
required: Boolean,
|
|
38
|
+
placeholder: String,
|
|
39
|
+
rows: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 4
|
|
42
|
+
},
|
|
43
|
+
minlength: Number,
|
|
44
|
+
maxlength: Number,
|
|
45
|
+
showCount: Boolean,
|
|
46
|
+
error: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
hint: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
clearable: Boolean,
|
|
55
|
+
autoResize: Boolean,
|
|
56
|
+
resize: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "vertical"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:modelValue", "change"],
|
|
62
|
+
setup(t, { expose: L, emit: R }) {
|
|
63
|
+
let z = t, B = R, V = C(null), H = C(null), U = `kima-textarea-${E()}`, W = !1, { attrs: G, controlAttrs: K } = a(), { local: q, update: J } = o(z, B, V, (e) => e ?? "", (e) => {
|
|
64
|
+
W = !1, H.value && (H.value.value = e), _(Z);
|
|
65
|
+
});
|
|
66
|
+
e(V);
|
|
67
|
+
let Y = l(() => z.autoResize ? "none" : [
|
|
68
|
+
"none",
|
|
69
|
+
"vertical",
|
|
70
|
+
"horizontal",
|
|
71
|
+
"both"
|
|
72
|
+
].includes(z.resize) ? z.resize : "vertical"), X = l(() => z.clearable && !!q.value && !z.readonly), re = l(() => [z.error ? `${U}-error` : z.hint ? `${U}-hint` : "", K.value["aria-describedby"]].filter(Boolean).join(" ") || void 0);
|
|
73
|
+
function Z() {
|
|
74
|
+
let e = H.value;
|
|
75
|
+
if (!e || (e.style.height = "", !z.autoResize)) return;
|
|
76
|
+
let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e), r = parseFloat(n.borderTopWidth) + parseFloat(n.borderBottomWidth);
|
|
77
|
+
e.style.height = `${Math.max(t, e.scrollHeight) + r}px`;
|
|
78
|
+
}
|
|
79
|
+
O([
|
|
80
|
+
q,
|
|
81
|
+
() => z.rows,
|
|
82
|
+
() => z.autoResize
|
|
83
|
+
], () => _(Z), {
|
|
84
|
+
immediate: !0,
|
|
85
|
+
flush: "post"
|
|
86
|
+
});
|
|
87
|
+
let Q;
|
|
88
|
+
x(() => {
|
|
89
|
+
let e = H.value.ownerDocument.defaultView.ResizeObserver;
|
|
90
|
+
if (!e) return;
|
|
91
|
+
let t = H.value.getBoundingClientRect().width;
|
|
92
|
+
Q = new e(() => {
|
|
93
|
+
let e = H.value?.getBoundingClientRect().width;
|
|
94
|
+
e == null || Math.abs(e - t) < .5 || (t = e, Z());
|
|
95
|
+
}), Q.observe(H.value);
|
|
96
|
+
}), b(() => Q?.disconnect());
|
|
97
|
+
function $(e) {
|
|
98
|
+
!W && !e.isComposing && e.target.value !== q.value && J(e.target.value, !1), Z();
|
|
99
|
+
}
|
|
100
|
+
function ie() {
|
|
101
|
+
z.disabled || z.readonly || !q.value || (J(""), _(() => {
|
|
102
|
+
Z(), H.value?.focus();
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
return L({ focus: () => H.value?.focus() }), (e, a) => (S(), d("div", {
|
|
106
|
+
class: v([
|
|
107
|
+
"kima-textarea",
|
|
108
|
+
{ "kima-textarea--error": !!t.error },
|
|
109
|
+
T(G).class
|
|
110
|
+
]),
|
|
111
|
+
style: y(T(G).style),
|
|
112
|
+
"aria-disabled": t.disabled || void 0
|
|
113
|
+
}, [
|
|
114
|
+
f("div", {
|
|
115
|
+
ref_key: "root",
|
|
116
|
+
ref: V,
|
|
117
|
+
class: "kima-textarea__surface",
|
|
118
|
+
"aria-disabled": t.disabled || void 0
|
|
119
|
+
}, [f("textarea", g({
|
|
120
|
+
ref_key: "input",
|
|
121
|
+
ref: H
|
|
122
|
+
}, T(K), {
|
|
123
|
+
value: T(q),
|
|
124
|
+
"aria-label": T(K)["aria-label"] || t.label,
|
|
125
|
+
"aria-invalid": !!t.error || T(K)["aria-invalid"],
|
|
126
|
+
"aria-describedby": re.value,
|
|
127
|
+
name: t.name,
|
|
128
|
+
disabled: t.disabled,
|
|
129
|
+
readonly: t.readonly,
|
|
130
|
+
required: t.required,
|
|
131
|
+
placeholder: t.placeholder,
|
|
132
|
+
rows: t.rows,
|
|
133
|
+
minlength: t.minlength,
|
|
134
|
+
maxlength: t.maxlength,
|
|
135
|
+
style: { resize: Y.value },
|
|
136
|
+
onInput: j($, ["stop"]),
|
|
137
|
+
onChange: a[0] ||= j((e) => B("change", T(q)), ["stop"]),
|
|
138
|
+
onCompositionstart: a[1] ||= (e) => h(W) ? W.value = !0 : W = !0,
|
|
139
|
+
onCompositionend: a[2] ||= (e) => {
|
|
140
|
+
h(W) ? W.value = !1 : W = !1, $(e);
|
|
141
|
+
}
|
|
142
|
+
}), null, 16, ee), m(c, g({ name: "kima-fade" }, T(i)), {
|
|
143
|
+
default: k(() => [X.value ? (S(), d("button", {
|
|
144
|
+
key: 0,
|
|
145
|
+
class: "kima-textarea__clear",
|
|
146
|
+
type: "button",
|
|
147
|
+
"aria-label": "清除内容",
|
|
148
|
+
disabled: t.disabled,
|
|
149
|
+
onClick: ie
|
|
150
|
+
}, [m(n, {
|
|
151
|
+
icon: T(M),
|
|
152
|
+
size: 18,
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}, null, 8, ["icon"])], 8, te)) : u("", !0)]),
|
|
155
|
+
_: 1
|
|
156
|
+
}, 16)], 8, P),
|
|
157
|
+
m(c, g({ css: !1 }, {
|
|
158
|
+
...T(r),
|
|
159
|
+
...T(i)
|
|
160
|
+
}), {
|
|
161
|
+
default: k(() => [A(f("div", {
|
|
162
|
+
class: "kima-textarea__message-wrap",
|
|
163
|
+
inert: !(t.error || t.hint),
|
|
164
|
+
"aria-hidden": !(t.error || t.hint) || void 0
|
|
165
|
+
}, [m(c, g({ name: "kima-fade" }, T(i)), {
|
|
166
|
+
default: k(() => [t.error || t.hint ? (S(), d("p", {
|
|
167
|
+
id: `${U}-${t.error ? "error" : "hint"}`,
|
|
168
|
+
key: `${t.error ? "error" : "hint"}:${t.error || t.hint}`,
|
|
169
|
+
class: v(["kima-textarea__message", { "kima-textarea__message--error": !!t.error }]),
|
|
170
|
+
role: t.error ? "alert" : void 0
|
|
171
|
+
}, w(t.error || t.hint), 11, F)) : u("", !0)]),
|
|
172
|
+
_: 1
|
|
173
|
+
}, 16)], 8, ne), [[D, t.error || t.hint]])]),
|
|
174
|
+
_: 1
|
|
175
|
+
}, 16),
|
|
176
|
+
t.showCount ? (S(), d("p", I, [p(w(T(q).length), 1), t.maxlength == null ? u("", !0) : (S(), d(s, { key: 0 }, [p(" / " + w(t.maxlength), 1)], 64))])) : u("", !0)
|
|
177
|
+
], 14, N));
|
|
178
|
+
}
|
|
179
|
+
}), [["__scopeId", "data-v-c0cc3612"]]);
|
|
180
|
+
export { L as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useNativeSlots as e } from "../../utils/native-slots.js";
|
|
2
|
+
import { useRipple as t } from "../../utils/ripple.js";
|
|
3
|
+
import n from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
import { useInputAttrs as r, useInputState as i } from "../../utils/input-state.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, mergeProps as l, normalizeClass as u, normalizeStyle as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g } from "vue";
|
|
7
|
+
// src/components/input/toggle.ce.vue
|
|
8
|
+
var _ = [
|
|
9
|
+
"aria-label",
|
|
10
|
+
"aria-pressed",
|
|
11
|
+
"disabled"
|
|
12
|
+
], v = [
|
|
13
|
+
"name",
|
|
14
|
+
"value",
|
|
15
|
+
"disabled"
|
|
16
|
+
], y = /*#__PURE__*/ n(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
17
|
+
__name: "toggle.ce",
|
|
18
|
+
props: {
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !1
|
|
22
|
+
},
|
|
23
|
+
label: String,
|
|
24
|
+
name: String,
|
|
25
|
+
value: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "on"
|
|
28
|
+
},
|
|
29
|
+
disabled: Boolean
|
|
30
|
+
},
|
|
31
|
+
emits: ["update:modelValue", "change"],
|
|
32
|
+
setup(n, { emit: y }) {
|
|
33
|
+
let b = n, x = y, S = p(null), { attrs: C, controlAttrs: w } = r();
|
|
34
|
+
e(S);
|
|
35
|
+
let { local: T, update: E } = i(b, x, S, Boolean);
|
|
36
|
+
return t(S), (e, t) => (f(), o("span", {
|
|
37
|
+
class: u(["kima-toggle-wrap", g(C).class]),
|
|
38
|
+
style: d(g(C).style)
|
|
39
|
+
}, [s("button", l({
|
|
40
|
+
ref_key: "root",
|
|
41
|
+
ref: S
|
|
42
|
+
}, g(w), {
|
|
43
|
+
class: "kima-toggle",
|
|
44
|
+
type: "button",
|
|
45
|
+
"aria-label": g(w)["aria-label"] || n.label,
|
|
46
|
+
"aria-pressed": g(T),
|
|
47
|
+
disabled: n.disabled,
|
|
48
|
+
onClick: t[0] ||= (e) => g(E)(!g(T))
|
|
49
|
+
}), [m(e.$slots, "default", {}, () => [c(h(n.label), 1)], !0)], 16, _), g(T) && n.name ? (f(), o("input", {
|
|
50
|
+
key: 0,
|
|
51
|
+
type: "hidden",
|
|
52
|
+
name: n.name,
|
|
53
|
+
value: n.value,
|
|
54
|
+
disabled: n.disabled
|
|
55
|
+
}, null, 8, v)) : a("", !0)], 6));
|
|
56
|
+
}
|
|
57
|
+
}), [["__scopeId", "data-v-a289ae32"]]);
|
|
58
|
+
export { y as default };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import n from "../core/icon.ce.js";
|
|
4
|
+
import { useInteractionModel as r, useInteractionReset as i, useInteractionRoot as a } from "../../utils/interaction.js";
|
|
5
|
+
import o from "../core/icon-button.ce.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Transition as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createTextVNode as f, createVNode as p, mergeProps as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
8
|
+
import { Cancel01Icon as b } from "@hugeicons/core-free-icons";
|
|
9
|
+
// src/components/interaction/chip.ce.vue
|
|
10
|
+
var x = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "kima-chip__text"
|
|
13
|
+
}, S = [
|
|
14
|
+
"name",
|
|
15
|
+
"value",
|
|
16
|
+
"disabled"
|
|
17
|
+
], C = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
18
|
+
__name: "chip.ce",
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: Boolean,
|
|
21
|
+
selectable: Boolean,
|
|
22
|
+
removable: Boolean,
|
|
23
|
+
disabled: Boolean,
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "芯片"
|
|
27
|
+
},
|
|
28
|
+
removeLabel: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "移除"
|
|
31
|
+
},
|
|
32
|
+
name: String,
|
|
33
|
+
value: {
|
|
34
|
+
type: [String, Number],
|
|
35
|
+
default: "on"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: [
|
|
39
|
+
"update:modelValue",
|
|
40
|
+
"change",
|
|
41
|
+
"remove"
|
|
42
|
+
],
|
|
43
|
+
setup(e, { emit: C }) {
|
|
44
|
+
let w = e, T = C, { root: E, forwardedAttrs: D } = a(), [O, k] = r(w, "modelValue", T), A = c(() => w.selectable && O.value);
|
|
45
|
+
function j() {
|
|
46
|
+
w.disabled || (k(!O.value), T("change", O.value));
|
|
47
|
+
}
|
|
48
|
+
return i(E, O, k), (r, i) => (h(), d("span", m({
|
|
49
|
+
ref_key: "root",
|
|
50
|
+
ref: E
|
|
51
|
+
}, v(D), { class: ["kima-chip", {
|
|
52
|
+
"kima-chip--selected": A.value,
|
|
53
|
+
"kima-chip--disabled": e.disabled,
|
|
54
|
+
"kima-chip--interactive": e.selectable || e.removable
|
|
55
|
+
}] }), [
|
|
56
|
+
e.selectable ? (h(), l(t, {
|
|
57
|
+
key: 0,
|
|
58
|
+
variant: "text",
|
|
59
|
+
class: "kima-chip__select",
|
|
60
|
+
"aria-pressed": v(O),
|
|
61
|
+
disabled: e.disabled,
|
|
62
|
+
onClick: j
|
|
63
|
+
}, {
|
|
64
|
+
default: y(() => [g(r.$slots, "default", {}, () => [f(_(e.label), 1)], !0)]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 8, ["aria-pressed", "disabled"])) : (h(), d("span", x, [g(r.$slots, "default", {}, () => [f(_(e.label), 1)], !0)])),
|
|
67
|
+
p(s, { name: "kima-content" }, {
|
|
68
|
+
default: y(() => [e.removable ? (h(), l(o, {
|
|
69
|
+
key: 0,
|
|
70
|
+
variant: "text",
|
|
71
|
+
label: `${e.removeLabel} ${e.label}`,
|
|
72
|
+
disabled: e.disabled,
|
|
73
|
+
class: "kima-chip__remove",
|
|
74
|
+
onClick: i[0] ||= (t) => !e.disabled && T("remove", e.value)
|
|
75
|
+
}, {
|
|
76
|
+
default: y(() => [p(n, {
|
|
77
|
+
icon: v(b),
|
|
78
|
+
size: 18,
|
|
79
|
+
"aria-hidden": "true"
|
|
80
|
+
}, null, 8, ["icon"])]),
|
|
81
|
+
_: 1
|
|
82
|
+
}, 8, ["label", "disabled"])) : u("", !0)]),
|
|
83
|
+
_: 1
|
|
84
|
+
}),
|
|
85
|
+
e.selectable && v(O) && e.name ? (h(), d("input", {
|
|
86
|
+
key: 2,
|
|
87
|
+
type: "hidden",
|
|
88
|
+
name: e.name,
|
|
89
|
+
value: e.value,
|
|
90
|
+
disabled: e.disabled
|
|
91
|
+
}, null, 8, S)) : u("", !0)
|
|
92
|
+
], 16));
|
|
93
|
+
}
|
|
94
|
+
}), [["__scopeId", "data-v-541c9ed1"]]);
|
|
95
|
+
export { C as default };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import { useChoiceCursor as n, useInteractionModel as r, useInteractionRoot as i } from "../../utils/interaction.js";
|
|
4
|
+
import ee from "../core/icon-button.ce.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, mergeProps as f, nextTick as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, renderSlot as y, toDisplayString as b, unref as x, useId as S, vModelText as C, watch as w, withCtx as T, withDirectives as E, withModifiers as D } from "vue";
|
|
7
|
+
import { Cancel01Icon as te } from "@hugeicons/core-free-icons";
|
|
8
|
+
// src/components/interaction/command.ce.vue
|
|
9
|
+
var ne = ["aria-label"], re = { class: "kima-command__panel" }, ie = { class: "kima-command__header" }, O = [
|
|
10
|
+
"aria-label",
|
|
11
|
+
"placeholder",
|
|
12
|
+
"aria-activedescendant"
|
|
13
|
+
], k = ["aria-label"], A = ["aria-labelledby"], j = ["id"], M = [
|
|
14
|
+
"id",
|
|
15
|
+
"aria-selected",
|
|
16
|
+
"aria-disabled",
|
|
17
|
+
"data-active",
|
|
18
|
+
"onPointermove",
|
|
19
|
+
"onClick"
|
|
20
|
+
], N = { key: 0 }, P = { key: 0 }, F = {
|
|
21
|
+
key: 0,
|
|
22
|
+
role: "status"
|
|
23
|
+
}, I = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
24
|
+
__name: "command.ce",
|
|
25
|
+
props: {
|
|
26
|
+
open: Boolean,
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
label: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "命令面板"
|
|
31
|
+
},
|
|
32
|
+
triggerLabel: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "打开命令面板"
|
|
35
|
+
},
|
|
36
|
+
placeholder: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "搜索命令…"
|
|
39
|
+
},
|
|
40
|
+
items: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
},
|
|
44
|
+
emptyText: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "没有匹配命令"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:open", "select"],
|
|
50
|
+
setup(e, { emit: I }) {
|
|
51
|
+
let L = e, R = I, { root: z, forwardedAttrs: B } = i(), [V, H] = r(L, "open", R), U = _(""), W = _(null), G = _(null), K;
|
|
52
|
+
function q() {
|
|
53
|
+
let e = G.value;
|
|
54
|
+
e && (V.value && !L.disabled && !e.open ? (K = e.ownerDocument.activeElement, U.value = "", e.showModal(), p(() => {
|
|
55
|
+
G.value?.open && W.value?.focus();
|
|
56
|
+
})) : (!V.value || L.disabled) && e.open && (e.close(), K?.isConnected && K.focus({ preventScroll: !0 })));
|
|
57
|
+
}
|
|
58
|
+
function J(e) {
|
|
59
|
+
e.currentTarget.open === !1 && V.value && H(!1);
|
|
60
|
+
}
|
|
61
|
+
function ae(e) {
|
|
62
|
+
e.preventDefault(), e.stopPropagation(), H(!1);
|
|
63
|
+
}
|
|
64
|
+
let Y = `kima-command-${S()}`, X = o(() => {
|
|
65
|
+
let e = U.value.trim().toLocaleLowerCase();
|
|
66
|
+
return L.items.filter((t) => `${t.label} ${t.description || ""} ${t.group || ""} ${(t.keywords || []).join(" ")}`.toLocaleLowerCase().includes(e));
|
|
67
|
+
}), oe = o(() => {
|
|
68
|
+
let e = /* @__PURE__ */ new Map();
|
|
69
|
+
return X.value.forEach((t, n) => {
|
|
70
|
+
let r = t.group || "命令";
|
|
71
|
+
e.has(r) || e.set(r, []), e.get(r).push({
|
|
72
|
+
item: t,
|
|
73
|
+
index: n
|
|
74
|
+
});
|
|
75
|
+
}), [...e].map(([e, t]) => ({
|
|
76
|
+
label: e,
|
|
77
|
+
items: t
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
function Z(e) {
|
|
81
|
+
L.disabled || e.disabled || (R("select", e.value, e), H(!1));
|
|
82
|
+
}
|
|
83
|
+
let { active: Q, activeId: se, highlight: ce, keydown: le } = n(X, Z, `${Y}-option`);
|
|
84
|
+
function $(e) {
|
|
85
|
+
e.isComposing || (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), H(!1)) : le(e));
|
|
86
|
+
}
|
|
87
|
+
return w(V, q, { flush: "post" }), w(() => L.disabled, (e) => {
|
|
88
|
+
e && H(!1);
|
|
89
|
+
}), h(q), m(() => {
|
|
90
|
+
let e = G.value;
|
|
91
|
+
e?.open && e.close();
|
|
92
|
+
}), (n, r) => (g(), c("div", f({
|
|
93
|
+
ref_key: "root",
|
|
94
|
+
ref: z
|
|
95
|
+
}, x(B), { class: "kima-command" }), [d(t, {
|
|
96
|
+
variant: "tonal",
|
|
97
|
+
disabled: e.disabled,
|
|
98
|
+
"aria-haspopup": "dialog",
|
|
99
|
+
"aria-expanded": x(V) && !e.disabled,
|
|
100
|
+
onClick: r[0] ||= (e) => x(H)(!0)
|
|
101
|
+
}, {
|
|
102
|
+
default: T(() => [y(n.$slots, "trigger", {}, () => [u(b(e.triggerLabel), 1)], !0)]),
|
|
103
|
+
_: 3
|
|
104
|
+
}, 8, ["disabled", "aria-expanded"]), l("dialog", {
|
|
105
|
+
ref_key: "dialog",
|
|
106
|
+
ref: G,
|
|
107
|
+
class: "kima-command__dialog",
|
|
108
|
+
"aria-label": e.label,
|
|
109
|
+
onCancel: ae,
|
|
110
|
+
onClose: J,
|
|
111
|
+
onClick: r[6] ||= D((e) => x(H)(!1), ["self"])
|
|
112
|
+
}, [l("section", re, [
|
|
113
|
+
l("header", ie, [l("h2", null, b(e.label), 1), d(ee, {
|
|
114
|
+
label: "关闭命令面板",
|
|
115
|
+
icon: x(te),
|
|
116
|
+
onClick: r[1] ||= (e) => x(H)(!1)
|
|
117
|
+
}, null, 8, ["icon"])]),
|
|
118
|
+
E(l("input", {
|
|
119
|
+
ref_key: "search",
|
|
120
|
+
ref: W,
|
|
121
|
+
"onUpdate:modelValue": r[2] ||= (e) => U.value = e,
|
|
122
|
+
class: "kima-command__search",
|
|
123
|
+
role: "combobox",
|
|
124
|
+
type: "search",
|
|
125
|
+
autofocus: "",
|
|
126
|
+
"aria-expanded": "true",
|
|
127
|
+
"aria-autocomplete": "list",
|
|
128
|
+
"aria-label": e.placeholder,
|
|
129
|
+
placeholder: e.placeholder,
|
|
130
|
+
"aria-controls": Y,
|
|
131
|
+
"aria-activedescendant": x(se),
|
|
132
|
+
onInput: r[3] ||= D(() => {}, ["stop"]),
|
|
133
|
+
onChange: r[4] ||= D(() => {}, ["stop"]),
|
|
134
|
+
onKeydown: $
|
|
135
|
+
}, null, 40, O), [[C, U.value]]),
|
|
136
|
+
l("div", {
|
|
137
|
+
id: Y,
|
|
138
|
+
class: "kima-command__list",
|
|
139
|
+
role: "listbox",
|
|
140
|
+
"aria-label": e.label
|
|
141
|
+
}, [(g(!0), c(a, null, v(oe.value, (e, t) => (g(), c("div", {
|
|
142
|
+
key: e.label,
|
|
143
|
+
role: "group",
|
|
144
|
+
"aria-labelledby": `${Y}-group-${t}`
|
|
145
|
+
}, [l("h3", { id: `${Y}-group-${t}` }, b(e.label), 9, j), (g(!0), c(a, null, v(e.items, ({ item: e, index: t }) => (g(), c("div", {
|
|
146
|
+
id: `${Y}-option-${t}`,
|
|
147
|
+
key: e.value ?? t,
|
|
148
|
+
class: "kima-command__item",
|
|
149
|
+
role: "option",
|
|
150
|
+
"aria-selected": t === x(Q),
|
|
151
|
+
"aria-disabled": e.disabled || void 0,
|
|
152
|
+
"data-active": t === x(Q),
|
|
153
|
+
onPointermove: (n) => !e.disabled && x(ce)(t),
|
|
154
|
+
onPointerdown: r[5] ||= D(() => {}, ["prevent"]),
|
|
155
|
+
onClick: (t) => Z(e)
|
|
156
|
+
}, [l("span", null, [u(b(e.label), 1), e.description ? (g(), c("small", N, b(e.description), 1)) : s("", !0)]), e.shortcut ? (g(), c("small", P, b(e.shortcut), 1)) : s("", !0)], 40, M))), 128))], 8, A))), 128))], 8, k),
|
|
157
|
+
X.value.length ? s("", !0) : (g(), c("p", F, b(e.emptyText), 1))
|
|
158
|
+
])], 40, ne)], 16));
|
|
159
|
+
}
|
|
160
|
+
}), [["__scopeId", "data-v-02971a2a"]]);
|
|
161
|
+
export { I as default };
|