@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.
- package/LICENSE +21 -0
- package/README.md +209 -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 +105 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import { presenceTransition as n } from "../../utils/motion.js";
|
|
4
|
+
import { useNavigationModel as r, useNavigationRoot as i } from "../../utils/navigation.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { Fragment as a, Transition as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, mergeProps as p, openBlock as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
7
|
+
// src/components/navigation/stepper.ce.vue
|
|
8
|
+
var b = ["aria-label"], x = ["data-state"], S = {
|
|
9
|
+
class: "kima-stepper__number",
|
|
10
|
+
"aria-hidden": "true"
|
|
11
|
+
}, C = { key: 0 }, w = { class: "kima-stepper__status" }, T = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
12
|
+
__name: "stepper.ce",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 0
|
|
17
|
+
},
|
|
18
|
+
items: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
linear: Boolean,
|
|
23
|
+
disabled: Boolean,
|
|
24
|
+
orientation: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "horizontal"
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "步骤导航"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:modelValue", "change"],
|
|
34
|
+
setup(e, { emit: T }) {
|
|
35
|
+
let E = e, D = T, { root: O, forwardedAttrs: k } = i(), [A, j] = r(E, "modelValue", D), M = s(() => Math.max(0, Math.min(E.items.length - 1, Number(A.value) || 0)));
|
|
36
|
+
function N(e, t) {
|
|
37
|
+
return E.disabled || e.disabled || E.linear && t > M.value + 1;
|
|
38
|
+
}
|
|
39
|
+
return (r, i) => (m(), l("nav", p({
|
|
40
|
+
ref_key: "root",
|
|
41
|
+
ref: O
|
|
42
|
+
}, v(k), {
|
|
43
|
+
class: ["kima-stepper", { "kima-stepper--vertical": e.orientation === "vertical" }],
|
|
44
|
+
"aria-label": e.label
|
|
45
|
+
}), [u("ol", null, [(m(!0), l(a, null, h(e.items, (e, r) => (m(), l("li", {
|
|
46
|
+
key: e.id ?? r,
|
|
47
|
+
"data-state": r === M.value ? "current" : r < M.value ? "complete" : "pending"
|
|
48
|
+
}, [f(t, {
|
|
49
|
+
variant: r === M.value ? "tonal" : "text",
|
|
50
|
+
disabled: N(e, r),
|
|
51
|
+
"aria-current": r === M.value ? "step" : void 0,
|
|
52
|
+
onClick: (e) => v(j)(r)
|
|
53
|
+
}, {
|
|
54
|
+
default: y(() => [u("span", S, [f(o, { name: "kima-fade" }, {
|
|
55
|
+
default: y(() => [(m(), l("span", { key: r < M.value }, _(r < M.value ? "✓" : r + 1), 1))]),
|
|
56
|
+
_: 2
|
|
57
|
+
}, 1024)]), u("span", null, [
|
|
58
|
+
d(_(e.label), 1),
|
|
59
|
+
e.description ? (m(), l("small", C, _(e.description), 1)) : c("", !0),
|
|
60
|
+
u("span", w, [f(o, p({ name: "kima-fade" }, { ref_for: !0 }, v(n)), {
|
|
61
|
+
default: y(() => [(m(), l("span", { key: r < M.value ? "complete" : r === M.value ? "current" : "pending" }, _(r < M.value ? "已完成" : r === M.value ? "进行中" : "待开始"), 1))]),
|
|
62
|
+
_: 2
|
|
63
|
+
}, 1040)])
|
|
64
|
+
])]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, 1032, [
|
|
67
|
+
"variant",
|
|
68
|
+
"disabled",
|
|
69
|
+
"aria-current",
|
|
70
|
+
"onClick"
|
|
71
|
+
])], 8, x))), 128))]), g(r.$slots, "default", {}, void 0, !0)], 16, b));
|
|
72
|
+
}
|
|
73
|
+
}), [["__scopeId", "data-v-1c703cd8"]]);
|
|
74
|
+
export { T as default };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import { useNavigationRoot as t } from "../../utils/navigation.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { createElementBlock as n, mergeProps as r, onBeforeUnmount as i, onMounted as a, openBlock as o, renderSlot as s, unref as c, watch as l } from "vue";
|
|
5
|
+
// src/components/navigation/toolbar.ce.vue
|
|
6
|
+
var u = [
|
|
7
|
+
"aria-label",
|
|
8
|
+
"aria-orientation",
|
|
9
|
+
"aria-disabled",
|
|
10
|
+
"inert"
|
|
11
|
+
], d = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
12
|
+
__name: "toolbar.ce",
|
|
13
|
+
props: {
|
|
14
|
+
label: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "工具栏"
|
|
17
|
+
},
|
|
18
|
+
orientation: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "horizontal"
|
|
21
|
+
},
|
|
22
|
+
loop: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !0
|
|
25
|
+
},
|
|
26
|
+
disabled: Boolean
|
|
27
|
+
},
|
|
28
|
+
setup(e) {
|
|
29
|
+
let d = e, { root: f, forwardedAttrs: p } = t(), m = /* @__PURE__ */ new Map(), h, g;
|
|
30
|
+
function _() {
|
|
31
|
+
return [...f.value?.querySelectorAll("button,a[href],[role=\"button\"],input,select,textarea,[data-kima-toolbar-item]") || []].filter((e) => e.closest("[role=\"toolbar\"]") === f.value);
|
|
32
|
+
}
|
|
33
|
+
function v() {
|
|
34
|
+
return _().filter((e) => !e.matches(":disabled,[aria-disabled=\"true\"]") && !e.closest("[hidden],[inert]") && e.getClientRects().length);
|
|
35
|
+
}
|
|
36
|
+
function y() {
|
|
37
|
+
let e = _();
|
|
38
|
+
for (let t of e) m.has(t) || m.set(t, t.getAttribute("tabindex"));
|
|
39
|
+
let t = v();
|
|
40
|
+
t.includes(g) || (g = t[0]);
|
|
41
|
+
for (let t of e) {
|
|
42
|
+
let e = !d.disabled && t === g ? "0" : "-1";
|
|
43
|
+
t.getAttribute("tabindex") !== e && t.setAttribute("tabindex", e);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function b(e) {
|
|
47
|
+
v().includes(e.target) && (g = e.target, y());
|
|
48
|
+
}
|
|
49
|
+
function x(e) {
|
|
50
|
+
if (d.disabled || e.isComposing || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
51
|
+
let t = v(), n = t.indexOf(e.target);
|
|
52
|
+
if (n < 0 || e.target.matches("input,textarea,select,[contenteditable=\"true\"]")) return;
|
|
53
|
+
let r = d.orientation === "vertical", i = e.key === (r ? "ArrowDown" : "ArrowRight") ? 1 : e.key === (r ? "ArrowUp" : "ArrowLeft") ? -1 : 0;
|
|
54
|
+
!r && getComputedStyle(f.value).direction === "rtl" && (i *= -1);
|
|
55
|
+
let a;
|
|
56
|
+
if (e.key === "Home") a = 0;
|
|
57
|
+
else if (e.key === "End") a = t.length - 1;
|
|
58
|
+
else if (i) a = d.loop ? (n + i + t.length) % t.length : Math.max(0, Math.min(t.length - 1, n + i));
|
|
59
|
+
else return;
|
|
60
|
+
e.preventDefault(), g = t[a], y(), g?.focus();
|
|
61
|
+
}
|
|
62
|
+
return l(() => d.disabled, y, { flush: "post" }), a(() => {
|
|
63
|
+
y(), h = new MutationObserver(y), h.observe(f.value, {
|
|
64
|
+
childList: !0,
|
|
65
|
+
subtree: !0,
|
|
66
|
+
attributes: !0,
|
|
67
|
+
attributeFilter: [
|
|
68
|
+
"disabled",
|
|
69
|
+
"aria-disabled",
|
|
70
|
+
"hidden",
|
|
71
|
+
"inert",
|
|
72
|
+
"href"
|
|
73
|
+
]
|
|
74
|
+
});
|
|
75
|
+
}), i(() => {
|
|
76
|
+
h?.disconnect();
|
|
77
|
+
for (let [e, t] of m) t === null ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", t);
|
|
78
|
+
}), (t, i) => (o(), n("div", r({
|
|
79
|
+
ref_key: "root",
|
|
80
|
+
ref: f
|
|
81
|
+
}, c(p), {
|
|
82
|
+
class: ["kima-toolbar", { "kima-toolbar--vertical": e.orientation === "vertical" }],
|
|
83
|
+
role: "toolbar",
|
|
84
|
+
"aria-label": e.label,
|
|
85
|
+
"aria-orientation": e.orientation === "vertical" ? "vertical" : "horizontal",
|
|
86
|
+
"aria-disabled": e.disabled || void 0,
|
|
87
|
+
inert: e.disabled || void 0,
|
|
88
|
+
onFocusin: b,
|
|
89
|
+
onKeydown: x
|
|
90
|
+
}), [s(t.$slots, "default", {}, void 0, !0)], 16, u));
|
|
91
|
+
}
|
|
92
|
+
}), [["__scopeId", "data-v-327b9928"]]);
|
|
93
|
+
export { d as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import { useNavigationRoot as t } from "../../utils/navigation.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { createElementBlock as n, mergeProps as r, openBlock as i, renderSlot as a, unref as o } from "vue";
|
|
5
|
+
var s = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
6
|
+
__name: "visually-hidden.ce",
|
|
7
|
+
props: { focusable: Boolean },
|
|
8
|
+
setup(e) {
|
|
9
|
+
let { root: s, forwardedAttrs: c } = t();
|
|
10
|
+
return (t, l) => (i(), n("span", r({
|
|
11
|
+
ref_key: "root",
|
|
12
|
+
ref: s
|
|
13
|
+
}, o(c), { class: ["kima-visually-hidden", { "kima-visually-hidden--focusable": e.focusable }] }), [a(t.$slots, "default", {}, void 0, !0)], 16));
|
|
14
|
+
}
|
|
15
|
+
}), [["__scopeId", "data-v-2cc27184"]]);
|
|
16
|
+
export { s as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import { useNavigationRoot as n } from "../../utils/navigation.js";
|
|
4
|
+
import r from "../core/drawer.ce.js";
|
|
5
|
+
import { useNarrow as i, useShellModel as a } from "../../utils/shell.js";
|
|
6
|
+
import { useKimaConfig as o } from "../../utils/config.js";
|
|
7
|
+
import { useScopedSlots as s } from "../../utils/scoped-slots.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { Fragment as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, mergeProps as m, openBlock as h, ref as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useId as x, watch as S, withCtx as C, withDirectives as w, withModifiers as T } from "vue";
|
|
10
|
+
// src/components/shell/app-shell.ce.vue
|
|
11
|
+
var E = ["href"], D = { class: "kima-app-shell__header" }, O = { key: 1 }, k = { key: 0 }, A = { class: "kima-app-shell__footer" }, j = { key: 0 }, M = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
12
|
+
__name: "app-shell.ce",
|
|
13
|
+
props: {
|
|
14
|
+
open: Boolean,
|
|
15
|
+
breakpoint: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 720
|
|
18
|
+
},
|
|
19
|
+
sidebarWidth: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "288px"
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "应用导航"
|
|
26
|
+
},
|
|
27
|
+
skipLabel: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "跳到正文"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:open"],
|
|
33
|
+
setup(e, { emit: M }) {
|
|
34
|
+
let { native: N, vOutlet: P } = s(), F = e, I = M, { root: L, forwardedAttrs: R } = n(), z = o(L), B = g(null), [V, H] = a(F, "open", I), U = i(L, () => F.breakpoint), W = `kima-main-${x()}`;
|
|
35
|
+
return S(U, () => H(!1)), (n, i) => (h(), d("div", m({
|
|
36
|
+
ref_key: "root",
|
|
37
|
+
ref: L
|
|
38
|
+
}, b(R), {
|
|
39
|
+
class: ["kima-app-shell", { "kima-app-shell--narrow": b(U) }],
|
|
40
|
+
style: { "--kima-shell-sidebar-width": e.sidebarWidth }
|
|
41
|
+
}), [
|
|
42
|
+
f("a", {
|
|
43
|
+
class: "kima-app-shell__skip",
|
|
44
|
+
href: `#${W}`,
|
|
45
|
+
onClick: i[0] ||= T((e) => B.value?.focus(), ["prevent"])
|
|
46
|
+
}, y(e.skipLabel), 9, E),
|
|
47
|
+
f("header", D, [b(U) ? (h(), l(t, {
|
|
48
|
+
key: 0,
|
|
49
|
+
variant: "text",
|
|
50
|
+
"aria-expanded": b(V),
|
|
51
|
+
"aria-controls": `${W}-sidebar`,
|
|
52
|
+
onClick: i[1] ||= (e) => b(H)(!b(V))
|
|
53
|
+
}, {
|
|
54
|
+
default: C(() => [...i[2] ||= [p("打开导航", -1)]]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["aria-expanded", "aria-controls"])) : u("", !0), b(N) ? w((h(), d("div", O, null, 512)), [[b(P), "header"]]) : _(n.$slots, "header", {}, void 0, !0, 2)]),
|
|
57
|
+
(h(), l(v(b(U) ? r : "aside"), {
|
|
58
|
+
id: `${W}-sidebar`,
|
|
59
|
+
open: b(U) && b(V),
|
|
60
|
+
placement: b(z).direction === "rtl" ? "right" : "left",
|
|
61
|
+
title: e.label,
|
|
62
|
+
"aria-label": e.label,
|
|
63
|
+
class: "kima-app-shell__sidebar",
|
|
64
|
+
"onUpdate:open": b(H)
|
|
65
|
+
}, {
|
|
66
|
+
default: C(() => [b(N) ? w((h(), d("div", k, null, 512)), [[b(P), "sidebar"]]) : _(n.$slots, "sidebar", { close: () => b(H)(!1) }, void 0, !0, 1)]),
|
|
67
|
+
_: 3
|
|
68
|
+
}, 40, [
|
|
69
|
+
"id",
|
|
70
|
+
"open",
|
|
71
|
+
"placement",
|
|
72
|
+
"title",
|
|
73
|
+
"aria-label",
|
|
74
|
+
"onUpdate:open"
|
|
75
|
+
])),
|
|
76
|
+
f("main", {
|
|
77
|
+
id: W,
|
|
78
|
+
ref_key: "main",
|
|
79
|
+
ref: B,
|
|
80
|
+
tabindex: "-1",
|
|
81
|
+
class: "kima-app-shell__main"
|
|
82
|
+
}, [b(N) ? (h(), d(c, { key: 0 }, [w(f("div", null, null, 512), [[b(P), "main"]]), w(f("div", null, null, 512), [[b(P)]])], 64)) : _(n.$slots, "main", {}, () => [_(n.$slots, "default", {}, void 0, !0)], !0, 1)], 512),
|
|
83
|
+
f("footer", A, [b(N) ? w((h(), d("div", j, null, 512)), [[b(P), "footer"]]) : _(n.$slots, "footer", {}, void 0, !0, 1)])
|
|
84
|
+
], 16));
|
|
85
|
+
}
|
|
86
|
+
}), [["__scopeId", "data-v-abea9686"]]);
|
|
87
|
+
export { M as default };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import { useNavigationRoot as t } from "../../utils/navigation.js";
|
|
3
|
+
import { defaultConfig as n, kimaConfigKey as r, useKimaConfig as i } from "../../utils/config.js";
|
|
4
|
+
import { useScopedSlots as a } from "../../utils/scoped-slots.js";
|
|
5
|
+
import { applyPalette as o, generatePalette as s } from "../../utils/theme.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { computed as c, createElementBlock as l, mergeProps as u, onMounted as d, openBlock as f, provide as p, renderSlot as m, unref as h, watch as g, withDirectives as _ } from "vue";
|
|
8
|
+
// src/components/shell/config-provider.ce.vue
|
|
9
|
+
var v = [
|
|
10
|
+
"data-kima-seed",
|
|
11
|
+
"data-kima-variant",
|
|
12
|
+
"data-kima-theme",
|
|
13
|
+
"data-kima-locale",
|
|
14
|
+
"data-kima-direction",
|
|
15
|
+
"data-kima-reduced-motion",
|
|
16
|
+
"lang",
|
|
17
|
+
"dir"
|
|
18
|
+
], y = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "kima-config-provider__content"
|
|
21
|
+
}, b = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
22
|
+
__name: "config-provider.ce",
|
|
23
|
+
props: {
|
|
24
|
+
theme: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
seed: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
variant: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ""
|
|
35
|
+
},
|
|
36
|
+
locale: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
direction: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
reducedMotion: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
defaults: {
|
|
49
|
+
type: Object,
|
|
50
|
+
default: () => ({})
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
emits: ["change"],
|
|
54
|
+
setup(e, { emit: b }) {
|
|
55
|
+
let { native: x, vOutlet: S } = a(), C = e, w = b, { root: T, forwardedAttrs: E } = t(), D = i(T), O = c(() => ({
|
|
56
|
+
...n,
|
|
57
|
+
...D.value,
|
|
58
|
+
...C.defaults,
|
|
59
|
+
...Object.fromEntries([
|
|
60
|
+
"theme",
|
|
61
|
+
"locale",
|
|
62
|
+
"direction",
|
|
63
|
+
"reducedMotion"
|
|
64
|
+
].filter((e) => C[e]).map((e) => [e, C[e]])),
|
|
65
|
+
seed: C.seed || D.value.seed || "#61afef",
|
|
66
|
+
variant: C.variant || D.value.variant || "tonal-spot"
|
|
67
|
+
}));
|
|
68
|
+
p(r, O);
|
|
69
|
+
let k = c(() => ({
|
|
70
|
+
isDark: O.value.theme !== "light",
|
|
71
|
+
variant: O.value.variant
|
|
72
|
+
})), A = c(() => {
|
|
73
|
+
try {
|
|
74
|
+
return Object.fromEntries(Object.entries(s(O.value.seed, k.value)).map(([e, t]) => [`--kima-color-${e}`, t]));
|
|
75
|
+
} catch {
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
function j() {
|
|
80
|
+
if (T.value) try {
|
|
81
|
+
o(O.value.seed, {
|
|
82
|
+
...k.value,
|
|
83
|
+
target: T.value
|
|
84
|
+
});
|
|
85
|
+
} catch {}
|
|
86
|
+
}
|
|
87
|
+
return d(j), g(O, (e) => {
|
|
88
|
+
j(), w("change", e);
|
|
89
|
+
}, { deep: !0 }), (e, t) => (f(), l("div", u({
|
|
90
|
+
ref_key: "root",
|
|
91
|
+
ref: T
|
|
92
|
+
}, h(E), {
|
|
93
|
+
class: "kima-config-provider",
|
|
94
|
+
"data-kima-config": "",
|
|
95
|
+
"data-kima-seed": O.value.seed,
|
|
96
|
+
"data-kima-variant": O.value.variant,
|
|
97
|
+
"data-kima-theme": O.value.theme,
|
|
98
|
+
"data-kima-locale": O.value.locale,
|
|
99
|
+
"data-kima-direction": O.value.direction,
|
|
100
|
+
"data-kima-reduced-motion": O.value.reducedMotion,
|
|
101
|
+
lang: O.value.locale,
|
|
102
|
+
dir: O.value.direction,
|
|
103
|
+
style: [A.value, {
|
|
104
|
+
colorScheme: O.value.theme,
|
|
105
|
+
"--kima-reduced-motion": O.value.reducedMotion === "reduce" ? "reduce" : "system"
|
|
106
|
+
}]
|
|
107
|
+
}), [h(x) ? _((f(), l("div", y, null, 512)), [[h(S)]]) : m(e.$slots, "default", { config: O.value }, void 0, !0, 1)], 16, v));
|
|
108
|
+
}
|
|
109
|
+
}), [["__scopeId", "data-v-d9085095"]]);
|
|
110
|
+
export { b as default };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import { prefersReducedMotion as n } from "../../utils/motion.js";
|
|
4
|
+
import { useNavigationRoot as r } from "../../utils/navigation.js";
|
|
5
|
+
import { useShellModel as i } from "../../utils/shell.js";
|
|
6
|
+
import { useKimaConfig as a } from "../../utils/config.js";
|
|
7
|
+
import { useScopedSlots as o } from "../../utils/scoped-slots.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { computed as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, ref as y, renderSlot as b, toDisplayString as x, unref as S, vShow as C, watch as w, withCtx as T, withDirectives as E } from "vue";
|
|
10
|
+
// src/components/shell/marquee.ce.vue
|
|
11
|
+
var D = ["aria-label"], O = { class: "kima-marquee__viewport" }, k = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
12
|
+
__name: "marquee.ce",
|
|
13
|
+
props: {
|
|
14
|
+
animated: Boolean,
|
|
15
|
+
paused: Boolean,
|
|
16
|
+
duration: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 24
|
|
19
|
+
},
|
|
20
|
+
reverse: Boolean,
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "滚动内容"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:paused"],
|
|
27
|
+
setup(e, { emit: k }) {
|
|
28
|
+
let { native: A, vOutlet: j } = o(), M = e, N = k, { root: P, forwardedAttrs: F } = r(), I = a(P), [L, R] = i(M, "paused", N), z = y(null), B = y(null), V = y(!1), H = y(!1), U = y(!1), W, G, K = s(() => M.animated && !U.value && I.value.reducedMotion !== "reduce"), q = s(() => L.value || V.value || H.value || !K.value);
|
|
29
|
+
function J() {
|
|
30
|
+
if (!z.value || !B.value) return;
|
|
31
|
+
let e = [...z.value.childNodes].map((e) => e.cloneNode(!0));
|
|
32
|
+
B.value.replaceChildren(...e);
|
|
33
|
+
for (let e of B.value.querySelectorAll("*")) e.removeAttribute("id"), e.removeAttribute("name"), e.setAttribute("tabindex", "-1");
|
|
34
|
+
}
|
|
35
|
+
function Y() {
|
|
36
|
+
U.value = n(P.value);
|
|
37
|
+
}
|
|
38
|
+
return _(() => {
|
|
39
|
+
W = P.value.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)"), W.addEventListener("change", Y), Y(), G = new MutationObserver(J), G.observe(z.value, {
|
|
40
|
+
childList: !0,
|
|
41
|
+
subtree: !0,
|
|
42
|
+
characterData: !0
|
|
43
|
+
}), J();
|
|
44
|
+
}), w(K, () => p(J)), g(() => {
|
|
45
|
+
G?.disconnect(), W?.removeEventListener("change", Y);
|
|
46
|
+
}), (n, r) => (v(), c("section", f({
|
|
47
|
+
ref_key: "root",
|
|
48
|
+
ref: P
|
|
49
|
+
}, S(F), {
|
|
50
|
+
class: "kima-marquee",
|
|
51
|
+
"aria-label": e.label,
|
|
52
|
+
onPointerenter: r[1] ||= (e) => V.value = !0,
|
|
53
|
+
onPointerleave: r[2] ||= (e) => V.value = !1,
|
|
54
|
+
onFocusin: r[3] ||= (e) => H.value = !0,
|
|
55
|
+
onFocusout: r[4] ||= (e) => {
|
|
56
|
+
S(P).contains(e.relatedTarget) || (H.value = !1);
|
|
57
|
+
}
|
|
58
|
+
}), [E(d(t, {
|
|
59
|
+
variant: "text",
|
|
60
|
+
"aria-pressed": S(L),
|
|
61
|
+
disabled: !K.value,
|
|
62
|
+
onClick: r[0] ||= (e) => S(R)(!S(L))
|
|
63
|
+
}, {
|
|
64
|
+
default: T(() => [u(x(S(L) || !K.value ? "继续滚动" : "暂停滚动"), 1)]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["aria-pressed", "disabled"]), [[C, e.animated]]), l("div", O, [l("div", {
|
|
67
|
+
class: m(["kima-marquee__track", { "kima-marquee__track--moving": K.value }]),
|
|
68
|
+
style: h({
|
|
69
|
+
animationDuration: `${Math.max(1, e.duration)}s`,
|
|
70
|
+
animationDirection: e.reverse ? "reverse" : "normal",
|
|
71
|
+
animationPlayState: q.value ? "paused" : "running"
|
|
72
|
+
})
|
|
73
|
+
}, [S(A) ? E((v(), c("div", {
|
|
74
|
+
key: 0,
|
|
75
|
+
ref_key: "source",
|
|
76
|
+
ref: z,
|
|
77
|
+
class: "kima-marquee__group"
|
|
78
|
+
}, null, 512)), [[S(j)]]) : (v(), c("div", {
|
|
79
|
+
key: 1,
|
|
80
|
+
ref_key: "source",
|
|
81
|
+
ref: z,
|
|
82
|
+
class: "kima-marquee__group"
|
|
83
|
+
}, [b(n.$slots, "default", {}, void 0, !0)], 512)), E(l("div", {
|
|
84
|
+
ref_key: "duplicate",
|
|
85
|
+
ref: B,
|
|
86
|
+
class: "kima-marquee__group",
|
|
87
|
+
"aria-hidden": "true",
|
|
88
|
+
inert: ""
|
|
89
|
+
}, null, 512), [[C, K.value]])], 6)])], 16, D));
|
|
90
|
+
}
|
|
91
|
+
}), [["__scopeId", "data-v-ac73236c"]]);
|
|
92
|
+
export { k as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import { cssSize as t, useNavigationRoot as n } from "../../utils/navigation.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { computed as r, createElementBlock as i, mergeProps as a, onBeforeUnmount as o, onMounted as s, openBlock as c, ref as l, renderSlot as u, unref as d } from "vue";
|
|
5
|
+
// src/components/shell/masonry.ce.vue
|
|
6
|
+
var f = ["aria-label"], p = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
7
|
+
__name: "masonry.ce",
|
|
8
|
+
props: {
|
|
9
|
+
columns: {
|
|
10
|
+
type: [Number, Object],
|
|
11
|
+
default: 3
|
|
12
|
+
},
|
|
13
|
+
gap: {
|
|
14
|
+
type: [Number, String],
|
|
15
|
+
default: 24
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "列优先瀑布流"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: ["resize"],
|
|
23
|
+
setup(e, { emit: p }) {
|
|
24
|
+
let m = e, h = p, { root: g, forwardedAttrs: _ } = n(), v = l(0), y, b = r(() => {
|
|
25
|
+
let e = m.columns;
|
|
26
|
+
return typeof e == "object" && (e = v.value >= 1024 ? e.lg ?? e.md ?? e.sm ?? e.base : v.value >= 768 ? e.md ?? e.sm ?? e.base : v.value >= 480 ? e.sm ?? e.base : e.base), Math.max(1, Math.min(12, Number(e) || 1));
|
|
27
|
+
});
|
|
28
|
+
return s(() => {
|
|
29
|
+
y = new ResizeObserver(([e]) => {
|
|
30
|
+
v.value = e.contentRect.width, h("resize", {
|
|
31
|
+
width: v.value,
|
|
32
|
+
columns: b.value
|
|
33
|
+
});
|
|
34
|
+
}), y.observe(g.value);
|
|
35
|
+
}), o(() => y?.disconnect()), (n, r) => (c(), i("div", a({
|
|
36
|
+
ref_key: "root",
|
|
37
|
+
ref: g
|
|
38
|
+
}, d(_), {
|
|
39
|
+
class: "kima-masonry",
|
|
40
|
+
role: "group",
|
|
41
|
+
"aria-label": e.label,
|
|
42
|
+
"data-flow": "column-major",
|
|
43
|
+
style: {
|
|
44
|
+
columnCount: b.value,
|
|
45
|
+
"--kima-masonry-gap": d(t)(e.gap)
|
|
46
|
+
}
|
|
47
|
+
}), [u(n.$slots, "default", {}, void 0, !0)], 16, f));
|
|
48
|
+
}
|
|
49
|
+
}), [["__scopeId", "data-v-2fe32054"]]);
|
|
50
|
+
export { p as default };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "../core/button.ce.js";
|
|
3
|
+
import { useNavigationRoot as n } from "../../utils/navigation.js";
|
|
4
|
+
import r from "../core/drawer.ce.js";
|
|
5
|
+
import { useNarrow as i, useShellModel as a } from "../../utils/shell.js";
|
|
6
|
+
import { useKimaConfig as o } from "../../utils/config.js";
|
|
7
|
+
import { useScopedSlots as s } from "../../utils/scoped-slots.js";
|
|
8
|
+
import c from "../navigation/navigation-menu.ce.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { createBlock as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, mergeProps as m, onMounted as h, openBlock as g, renderSlot as _, resolveDynamicComponent as v, toDisplayString as y, unref as b, useId as x, watch as S, withCtx as C, withDirectives as w } from "vue";
|
|
11
|
+
// src/components/shell/sidebar.ce.vue
|
|
12
|
+
var T = ["data-collapsed", "aria-label"], E = { key: 0 }, D = { key: 0 }, O = { key: 0 }, k = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
13
|
+
__name: "sidebar.ce",
|
|
14
|
+
props: {
|
|
15
|
+
items: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => []
|
|
18
|
+
},
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
expanded: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default: () => []
|
|
26
|
+
},
|
|
27
|
+
collapsed: Boolean,
|
|
28
|
+
open: Boolean,
|
|
29
|
+
breakpoint: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 720
|
|
32
|
+
},
|
|
33
|
+
label: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
storageKey: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
disabled: Boolean
|
|
42
|
+
},
|
|
43
|
+
emits: [
|
|
44
|
+
"update:modelValue",
|
|
45
|
+
"update:expanded",
|
|
46
|
+
"update:collapsed",
|
|
47
|
+
"update:open",
|
|
48
|
+
"navigate"
|
|
49
|
+
],
|
|
50
|
+
setup(e, { emit: k }) {
|
|
51
|
+
let { native: A, vOutlet: j } = s(), M = e, N = k, { root: P, forwardedAttrs: F } = n(), I = o(P), [L, R] = a(M, "modelValue", N), [z, B] = a(M, "expanded", N), [V, H] = a(M, "collapsed", N), [U, W] = a(M, "open", N), G = i(P, () => M.breakpoint, !0), K = `kima-sidebar-${x()}`;
|
|
52
|
+
h(() => {
|
|
53
|
+
if (M.storageKey) try {
|
|
54
|
+
let e = localStorage.getItem(M.storageKey);
|
|
55
|
+
e != null && H(e === "true");
|
|
56
|
+
} catch {}
|
|
57
|
+
}), S(V, (e) => {
|
|
58
|
+
if (M.storageKey) try {
|
|
59
|
+
localStorage.setItem(M.storageKey, String(e));
|
|
60
|
+
} catch {}
|
|
61
|
+
}), S(G, () => W(!1));
|
|
62
|
+
function q(e, t) {
|
|
63
|
+
N("navigate", e, t), G.value && !t.defaultPrevented && !t.metaKey && !t.ctrlKey && W(!1);
|
|
64
|
+
}
|
|
65
|
+
return (n, i) => (g(), u("aside", m({
|
|
66
|
+
ref_key: "root",
|
|
67
|
+
ref: P
|
|
68
|
+
}, b(F), {
|
|
69
|
+
class: ["kima-sidebar", {
|
|
70
|
+
"kima-sidebar--collapsed": b(V) && !b(G),
|
|
71
|
+
"kima-sidebar--mobile": b(G)
|
|
72
|
+
}],
|
|
73
|
+
"data-collapsed": b(V),
|
|
74
|
+
"aria-label": e.label || (b(I).locale.startsWith("en") ? "Sidebar" : "侧栏")
|
|
75
|
+
}), [p(t, {
|
|
76
|
+
variant: "text",
|
|
77
|
+
disabled: e.disabled,
|
|
78
|
+
"aria-expanded": b(G) ? b(U) : !b(V),
|
|
79
|
+
"aria-controls": K,
|
|
80
|
+
onClick: i[0] ||= (e) => b(G) ? b(W)(!b(U)) : b(H)(!b(V))
|
|
81
|
+
}, {
|
|
82
|
+
default: C(() => [f(y(b(G) ? "打开导航" : b(V) ? "展开侧栏" : "折叠侧栏"), 1)]),
|
|
83
|
+
_: 1
|
|
84
|
+
}, 8, ["disabled", "aria-expanded"]), (g(), l(v(b(G) ? r : "div"), {
|
|
85
|
+
id: K,
|
|
86
|
+
open: b(G) && b(U),
|
|
87
|
+
placement: b(I).direction === "rtl" ? "right" : "left",
|
|
88
|
+
title: e.label || "侧栏导航",
|
|
89
|
+
class: "kima-sidebar__body",
|
|
90
|
+
"onUpdate:open": b(W)
|
|
91
|
+
}, {
|
|
92
|
+
default: C(() => [
|
|
93
|
+
d("header", null, [b(A) ? w((g(), u("div", E, null, 512)), [[b(j), "header"]]) : _(n.$slots, "header", { collapsed: b(V) && !b(G) }, void 0, !0, 1)]),
|
|
94
|
+
p(c, {
|
|
95
|
+
items: e.items,
|
|
96
|
+
"model-value": b(L),
|
|
97
|
+
expanded: b(z),
|
|
98
|
+
disabled: e.disabled,
|
|
99
|
+
orientation: "vertical",
|
|
100
|
+
label: e.label || "侧栏导航",
|
|
101
|
+
"onUpdate:modelValue": b(R),
|
|
102
|
+
"onUpdate:expanded": b(B),
|
|
103
|
+
onNavigate: q
|
|
104
|
+
}, null, 8, [
|
|
105
|
+
"items",
|
|
106
|
+
"model-value",
|
|
107
|
+
"expanded",
|
|
108
|
+
"disabled",
|
|
109
|
+
"label",
|
|
110
|
+
"onUpdate:modelValue",
|
|
111
|
+
"onUpdate:expanded"
|
|
112
|
+
]),
|
|
113
|
+
b(A) ? w((g(), u("div", D, null, 512)), [[b(j)]]) : _(n.$slots, "default", { collapsed: b(V) && !b(G) }, void 0, !0, 1),
|
|
114
|
+
d("footer", null, [b(A) ? w((g(), u("div", O, null, 512)), [[b(j), "footer"]]) : _(n.$slots, "footer", { collapsed: b(V) && !b(G) }, void 0, !0, 1)])
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
}, 40, [
|
|
118
|
+
"open",
|
|
119
|
+
"placement",
|
|
120
|
+
"title",
|
|
121
|
+
"onUpdate:open"
|
|
122
|
+
]))], 16, T));
|
|
123
|
+
}
|
|
124
|
+
}), [["__scopeId", "data-v-0fd95ccf"]]);
|
|
125
|
+
export { k as default };
|