@veltra/desktop 1.0.8 → 1.0.10
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/dist/components/action/action-group.vue.d.ts +2 -2
- package/dist/components/action/action.vue.d.ts +3 -3
- package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
- package/dist/components/batch-edit/batch-edit.js.map +1 -1
- package/dist/components/batch-edit/batch-edit.vue.d.ts +2 -2
- package/dist/components/batch-edit/use-edit.js.map +1 -1
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/button.vue.d.ts +1 -1
- package/dist/components/cascade/cascade.js +15 -13
- package/dist/components/cascade/cascade.js.map +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +7 -7
- package/dist/components/cascade/node.js.map +1 -1
- package/dist/components/cascade/use-check.js +3 -2
- package/dist/components/cascade/use-check.js.map +1 -1
- package/dist/components/cascade/use-select.js +3 -3
- package/dist/components/cascade/use-select.js.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/date-panel/date-panel.js.map +1 -1
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.js +9 -9
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +9 -9
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/empty/empty.vue.d.ts +1 -1
- package/dist/components/expression-editor/expression-editor.js.map +1 -1
- package/dist/components/expression-editor/internal/editor-runtime/create-runtime.js.map +1 -1
- package/dist/components/expression-editor/internal/features/commands/register-command-packs.js.map +1 -1
- package/dist/components/expression-editor/internal/features/insertion/insertion-service.js.map +1 -1
- package/dist/components/expression-editor/use-decorators.js.map +1 -1
- package/dist/components/expression-editor/use-expression-drag-drop.js.map +1 -1
- package/dist/components/file-picker/file-picker.js.map +1 -1
- package/dist/components/file-picker/file-picker.vue.d.ts +1 -1
- package/dist/components/file-picker/helper.js +19 -7
- package/dist/components/file-picker/helper.js.map +1 -1
- package/dist/components/file-viewer/file-viewer.js +294 -0
- package/dist/components/file-viewer/file-viewer.js.map +1 -0
- package/dist/components/file-viewer/file-viewer.vue.d.ts +42 -0
- package/dist/components/file-viewer/helper.js +185 -0
- package/dist/components/file-viewer/helper.js.map +1 -0
- package/dist/components/file-viewer/index.d.ts +1 -0
- package/dist/components/file-viewer/previewers/docx-previewer.js +76 -0
- package/dist/components/file-viewer/previewers/docx-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/image-previewer.js +64 -0
- package/dist/components/file-viewer/previewers/image-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/pdf-previewer.js +90 -0
- package/dist/components/file-viewer/previewers/pdf-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/sheet-previewer.js +175 -0
- package/dist/components/file-viewer/previewers/sheet-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/text-previewer.js +74 -0
- package/dist/components/file-viewer/previewers/text-previewer.js.map +1 -0
- package/dist/components/file-viewer/previewers/video-previewer.js +62 -0
- package/dist/components/file-viewer/previewers/video-previewer.js.map +1 -0
- package/dist/components/file-viewer/style.d.ts +1 -0
- package/dist/components/file-viewer/style.js +4 -0
- package/dist/components/file-viewer/style2.css +445 -0
- package/dist/components/form/form-model.js +2 -1
- package/dist/components/form/form-model.js.map +1 -1
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/grid/use-responsive.js.map +1 -1
- package/dist/components/grid-input/grid-input.vue.d.ts +1 -1
- package/dist/components/index.d.ts +12 -9
- package/dist/components/input/input.vue.d.ts +3 -3
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/loading/directive.js.map +1 -1
- package/dist/components/menu/menu-item.js.map +1 -1
- package/dist/components/message/message2.js.map +1 -1
- package/dist/components/multi-select/multi-select-option.js +14 -10
- package/dist/components/multi-select/multi-select-option.js.map +1 -1
- package/dist/components/multi-select/multi-select.js +16 -19
- package/dist/components/multi-select/multi-select.js.map +1 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +4 -4
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +7 -7
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.js.map +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +1 -1
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/palette/color-transform.js.map +1 -1
- package/dist/components/palette/di.js.map +1 -1
- package/dist/components/palette/palette-alpha.js +7 -10
- package/dist/components/palette/palette-alpha.js.map +1 -1
- package/dist/components/palette/palette-hue.js +5 -7
- package/dist/components/palette/palette-hue.js.map +1 -1
- package/dist/components/palette/palette-sv.js +8 -10
- package/dist/components/palette/palette-sv.js.map +1 -1
- package/dist/components/palette/palette.js +22 -24
- package/dist/components/palette/palette.js.map +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/pop-confirm/pop-confirm.vue.d.ts +2 -2
- package/dist/components/progress/progress.js +1 -1
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/progress-nodes/progress-nodes.js.map +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/rich-text-editor/toolbar.js.map +1 -1
- package/dist/components/scroll/scroll.js.map +1 -1
- package/dist/components/select/select.js +14 -12
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.vue.d.ts +3 -3
- package/dist/components/slider/slider-thumb.js +10 -13
- package/dist/components/slider/slider-thumb.js.map +1 -1
- package/dist/components/slider/slider.js +12 -15
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/table/di.js.map +1 -1
- package/dist/components/table/node/row.d.ts +10 -1
- package/dist/components/table/node/row.js +9 -0
- package/dist/components/table/node/row.js.map +1 -1
- package/dist/components/table/table-body.js +25 -26
- package/dist/components/table/table-body.js.map +1 -1
- package/dist/components/table/table-cell.js +16 -9
- package/dist/components/table/table-cell.js.map +1 -1
- package/dist/components/table/table-row.js +77 -19
- package/dist/components/table/table-row.js.map +1 -1
- package/dist/components/table/table.js +75 -34
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/table.vue.d.ts +2 -2
- package/dist/components/table/use-columns.js +4 -0
- package/dist/components/table/use-columns.js.map +1 -1
- package/dist/components/table/use-fixed-columns.js +27 -8
- package/dist/components/table/use-fixed-columns.js.map +1 -1
- package/dist/components/table/use-rows.js +2 -2
- package/dist/components/table/use-rows.js.map +1 -1
- package/dist/components/table/use-table.js +50 -3
- package/dist/components/table/use-table.js.map +1 -1
- package/dist/components/tabs/index.d.ts +3 -1
- package/dist/components/tabs/style2.css +170 -107
- package/dist/components/tabs/tabs-horizontal.js +133 -0
- package/dist/components/tabs/tabs-horizontal.js.map +1 -0
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +40 -0
- package/dist/components/tabs/tabs-vertical.js +89 -0
- package/dist/components/tabs/tabs-vertical.js.map +1 -0
- package/dist/components/tabs/tabs-vertical.vue.d.ts +38 -0
- package/dist/components/tabs/tabs.js +75 -105
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +9 -23
- package/dist/components/tabs/use-tabs-bar.js +105 -0
- package/dist/components/tabs/use-tabs-bar.js.map +1 -0
- package/dist/components/text/text.js.map +1 -1
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/theme/theme.js.map +1 -1
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree/style2.css +45 -23
- package/dist/components/tree/tree-node.js +50 -35
- package/dist/components/tree/tree-node.js.map +1 -1
- package/dist/components/tree/tree-node2.js.map +1 -1
- package/dist/components/tree/tree.js +27 -20
- package/dist/components/tree/tree.js.map +1 -1
- package/dist/components/tree/tree.vue.d.ts +5 -5
- package/dist/components/tree/use-check.js +52 -14
- package/dist/components/tree/use-check.js.map +1 -1
- package/dist/components/tree/use-tree-nodes.js +51 -24
- package/dist/components/tree/use-tree-nodes.js.map +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +7 -7
- package/dist/index.d.ts +57 -53
- package/dist/index.js +51 -48
- package/dist/types/file-viewer.d.ts +71 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/tabs.d.ts +106 -14
- package/dist/types/tree.d.ts +6 -1
- package/package.json +32 -31
- package/src/components/cascade/cascade.vue +18 -18
- package/src/components/cascade/node.ts +4 -1
- package/src/components/cascade/use-check.ts +5 -4
- package/src/components/cascade/use-select.ts +4 -5
- package/src/components/date-picker/date-picker.vue +10 -9
- package/src/components/date-range-picker/date-range-picker.vue +12 -12
- package/src/components/file-picker/helper.ts +21 -10
- package/src/components/file-viewer/file-viewer.vue +311 -0
- package/src/components/file-viewer/helper.ts +193 -0
- package/src/components/file-viewer/index.ts +1 -0
- package/src/components/file-viewer/previewers/docx-previewer.vue +78 -0
- package/src/components/file-viewer/previewers/image-previewer.vue +64 -0
- package/src/components/file-viewer/previewers/pdf-previewer.vue +90 -0
- package/src/components/file-viewer/previewers/sheet-previewer.vue +210 -0
- package/src/components/file-viewer/previewers/text-previewer.vue +76 -0
- package/src/components/file-viewer/previewers/video-previewer.vue +72 -0
- package/src/components/file-viewer/style.scss +504 -0
- package/src/components/file-viewer/style.ts +4 -0
- package/src/components/index.ts +2 -0
- package/src/components/multi-select/multi-select-option.vue +16 -3
- package/src/components/multi-select/multi-select.vue +17 -9
- package/src/components/palette/di.ts +5 -3
- package/src/components/palette/palette-alpha.vue +7 -10
- package/src/components/palette/palette-hue.vue +5 -7
- package/src/components/palette/palette-sv.vue +12 -14
- package/src/components/palette/palette.vue +19 -21
- package/src/components/progress/progress.vue +1 -1
- package/src/components/select/select.vue +21 -19
- package/src/components/slider/slider-thumb.vue +11 -14
- package/src/components/slider/slider.vue +15 -15
- package/src/components/table/di.ts +58 -43
- package/src/components/table/node/row.ts +10 -1
- package/src/components/table/table-body.vue +28 -33
- package/src/components/table/table-cell.vue +17 -9
- package/src/components/table/table-row.tsx +83 -17
- package/src/components/table/table.vue +72 -45
- package/src/components/table/use-fixed-columns.ts +46 -12
- package/src/components/table/use-rows.ts +14 -3
- package/src/components/table/use-table.ts +27 -3
- package/src/components/tabs/index.ts +2 -0
- package/src/components/tabs/style.scss +219 -133
- package/src/components/tabs/tabs-horizontal.vue +128 -0
- package/src/components/tabs/tabs-vertical.vue +77 -0
- package/src/components/tabs/tabs.vue +56 -127
- package/src/components/tabs/use-tabs-bar.ts +119 -0
- package/src/components/tree/style.scss +74 -29
- package/src/components/tree/tree-node.vue +10 -4
- package/src/components/tree/tree.vue +39 -12
- package/src/components/tree/use-check.ts +79 -23
- package/src/components/tree/use-tree-nodes.ts +85 -34
- package/src/types/file-viewer.ts +69 -0
- package/src/types/index.ts +1 -0
- package/src/types/tabs.ts +113 -19
- package/src/types/tree.ts +6 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TabItem, TabsHorizontalProps } from "../../types/tabs.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tabs/tabs-horizontal.vue.d.ts
|
|
5
|
+
type __VLS_Props = TabsHorizontalProps;
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
[key: `name:${string}`]: (props: {
|
|
8
|
+
item: TabItem;
|
|
9
|
+
}) => any;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
17
|
+
} & {
|
|
18
|
+
"update:modelValue": (value: string) => any;
|
|
19
|
+
close: (item: TabItem, index: number) => any;
|
|
20
|
+
click: (item: TabItem, index: number) => any;
|
|
21
|
+
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
24
|
+
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
block: boolean;
|
|
27
|
+
closable: boolean;
|
|
28
|
+
position: "top" | "bottom";
|
|
29
|
+
rounded: boolean;
|
|
30
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default };
|
|
40
|
+
//# sourceMappingURL=tabs-horizontal.vue.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icon/icon.js";
|
|
2
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx, withModifiers } from "vue";
|
|
3
|
+
import { bem } from "@veltra/utils";
|
|
4
|
+
import { useFallbackProps } from "@veltra/compositions";
|
|
5
|
+
import { Close } from "@veltra/icons/normal";
|
|
6
|
+
//#region src/components/tabs/tabs-vertical.vue
|
|
7
|
+
const _hoisted_1 = ["onClick"];
|
|
8
|
+
const _hoisted_2 = ["aria-label", "onClick"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
name: "TabsVertical",
|
|
11
|
+
__name: "tabs-vertical",
|
|
12
|
+
props: /* @__PURE__ */ mergeModels({
|
|
13
|
+
size: {},
|
|
14
|
+
modelValue: {},
|
|
15
|
+
items: {},
|
|
16
|
+
closable: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
rounded: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
position: { default: "left" }
|
|
25
|
+
}, {
|
|
26
|
+
"modelValue": {},
|
|
27
|
+
"modelModifiers": {}
|
|
28
|
+
}),
|
|
29
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
30
|
+
"update:modelValue",
|
|
31
|
+
"click",
|
|
32
|
+
"close"
|
|
33
|
+
], ["update:modelValue"]),
|
|
34
|
+
setup(__props, { emit: __emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emit = __emit;
|
|
37
|
+
const { size } = useFallbackProps([props], { size: "default" });
|
|
38
|
+
const cls = bem("tabs-bar");
|
|
39
|
+
const model = useModel(__props, "modelValue");
|
|
40
|
+
const isItemClosable = (item) => {
|
|
41
|
+
if (item.disabled) return false;
|
|
42
|
+
return item.closable ?? props.closable;
|
|
43
|
+
};
|
|
44
|
+
const handleClick = (item, index) => {
|
|
45
|
+
if (item.disabled) return;
|
|
46
|
+
model.value = item.key;
|
|
47
|
+
emit("click", item, index);
|
|
48
|
+
};
|
|
49
|
+
const handleClose = (item, index) => {
|
|
50
|
+
if (item.disabled) return;
|
|
51
|
+
emit("close", item, index);
|
|
52
|
+
};
|
|
53
|
+
return (_ctx, _cache) => {
|
|
54
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([
|
|
55
|
+
unref(cls).b,
|
|
56
|
+
unref(cls).m("vertical"),
|
|
57
|
+
unref(cls).m(__props.position),
|
|
58
|
+
unref(cls).m(unref(size)),
|
|
59
|
+
unref(bem).is("rounded", __props.rounded)
|
|
60
|
+
]) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
61
|
+
return openBlock(), createElementBlock("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
role: "tab",
|
|
64
|
+
key: item.key,
|
|
65
|
+
class: normalizeClass([
|
|
66
|
+
unref(cls).e("item"),
|
|
67
|
+
unref(bem).is("active", model.value === item.key),
|
|
68
|
+
unref(bem).is("disabled", item.disabled === true)
|
|
69
|
+
]),
|
|
70
|
+
onClick: withModifiers(($event) => handleClick(item, index), ["stop"])
|
|
71
|
+
}, [renderSlot(_ctx.$slots, `name:${item.key}`, { item }, () => [createElementVNode("span", { class: normalizeClass(unref(cls).e("item-label")) }, toDisplayString(item.name ?? item.key), 3)]), isItemClosable(item) ? (openBlock(), createElementBlock("span", {
|
|
72
|
+
key: 0,
|
|
73
|
+
role: "button",
|
|
74
|
+
tabindex: "0",
|
|
75
|
+
class: normalizeClass(unref(cls).e("close")),
|
|
76
|
+
"aria-label": `close ${item.name ?? item.key}`,
|
|
77
|
+
onClick: withModifiers(($event) => handleClose(item, index), ["stop"])
|
|
78
|
+
}, [createVNode(unref(_sfc_main$1), null, {
|
|
79
|
+
default: withCtx(() => [createVNode(unref(Close))]),
|
|
80
|
+
_: 1
|
|
81
|
+
})], 10, _hoisted_2)) : createCommentVNode("v-if", true)], 10, _hoisted_1);
|
|
82
|
+
}), 128))], 2);
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
export { _sfc_main as default };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=tabs-vertical.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs-vertical.js","names":[],"sources":["../../../src/components/tabs/tabs-vertical.vue"],"sourcesContent":["<template>\n <div\n :class=\"[cls.b, cls.m('vertical'), cls.m(position), cls.m(size), bem.is('rounded', rounded)]\"\n >\n <button\n type=\"button\"\n role=\"tab\"\n v-for=\"(item, index) in items\"\n :key=\"item.key\"\n :class=\"[\n cls.e('item'),\n bem.is('active', model === item.key),\n bem.is('disabled', item.disabled === true)\n ]\"\n @click.stop=\"handleClick(item, index)\"\n >\n <slot :name=\"`name:${item.key}`\" :item=\"item\">\n <span :class=\"cls.e('item-label')\">{{ item.name ?? item.key }}</span>\n </slot>\n <span\n v-if=\"isItemClosable(item)\"\n role=\"button\"\n tabindex=\"0\"\n :class=\"cls.e('close')\"\n :aria-label=\"`close ${item.name ?? item.key}`\"\n @click.stop=\"handleClose(item, index)\"\n >\n <u-icon>\n <Close />\n </u-icon>\n </span>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { Close } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\n\nimport type { ComponentSize, TabItem, TabsVerticalEmits, TabsVerticalProps } from '../../types'\nimport { UIcon } from '../icon'\n\ndefineOptions({ name: 'TabsVertical' })\n\nconst props = withDefaults(defineProps<TabsVerticalProps>(), {\n position: 'left',\n closable: false,\n rounded: false\n})\n\nconst emit = defineEmits<TabsVerticalEmits>()\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst cls = bem('tabs-bar')\n\nconst model = defineModel<string>()\n\nconst isItemClosable = (item: TabItem) => {\n if (item.disabled) return false\n return item.closable ?? props.closable\n}\n\nconst handleClick = (item: TabItem, index: number) => {\n if (item.disabled) return\n model.value = item.key\n emit('click', item, index)\n}\n\nconst handleClose = (item: TabItem, index: number) => {\n if (item.disabled) return\n emit('close', item, index)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAMd,MAAM,OAAO;EAEb,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,MAAM,IAAI,WAAU;EAE1B,MAAM,QAAQ,SAAmB,SAAA,aAAC;EAElC,MAAM,kBAAkB,SAAkB;AACxC,OAAI,KAAK,SAAU,QAAO;AAC1B,UAAO,KAAK,YAAY,MAAM;;EAGhC,MAAM,eAAe,MAAe,UAAkB;AACpD,OAAI,KAAK,SAAU;AACnB,SAAM,QAAQ,KAAK;AACnB,QAAK,SAAS,MAAM,MAAK;;EAG3B,MAAM,eAAe,MAAe,UAAkB;AACpD,OAAI,KAAK,SAAU;AACnB,QAAK,SAAS,MAAM,MAAK;;;uBAzEzB,mBA+BM,OAAA,EA9BH,OAAK,eAAA;IAAG,MAAA,IAAG,CAAC;IAAG,MAAA,IAAG,CAAC,EAAC,WAAA;IAAc,MAAA,IAAG,CAAC,EAAE,QAAA,SAAQ;IAAG,MAAA,IAAG,CAAC,EAAE,MAAA,KAAI,CAAA;IAAG,MAAA,IAAG,CAAC,GAAE,WAAY,QAAA,QAAO;IAAA,CAAA,EAAA,EAAA,EAAA,UAAA,KAAA,EAE1F,mBA2BS,UAAA,MAAA,WAxBiB,QAAA,QAAhB,MAAM,UAAK;wBAHrB,mBA2BS,UAAA;KA1BP,MAAK;KACL,MAAK;KAEJ,KAAK,KAAK;KACV,OAAK,eAAA;MAAY,MAAA,IAAG,CAAC,EAAC,OAAA;MAAkB,MAAA,IAAG,CAAC,GAAE,UAAW,MAAA,UAAU,KAAK,IAAG;MAAW,MAAA,IAAG,CAAC,GAAE,YAAa,KAAK,aAAQ,KAAA;;KAKtH,SAAK,eAAA,WAAO,YAAY,MAAM,MAAK,EAAA,CAAA,OAAA,CAAA;QAEpC,WAEO,KAAA,QAAA,QAFc,KAAK,OAAG,EAAW,MAAI,QAErC,CADL,mBAAqE,QAAA,EAA9D,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,aAAA,CAAA,EAAA,EAAA,gBAAmB,KAAK,QAAQ,KAAK,IAAG,EAAA,EAAA,CAAA,CAAA,EAGrD,eAAe,KAAI,IAAA,WAAA,EAD3B,mBAWO,QAAA;;KATL,MAAK;KACL,UAAS;KACR,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,QAAA,CAAA;KACZ,cAAU,SAAW,KAAK,QAAQ,KAAK;KACvC,SAAK,eAAA,WAAO,YAAY,MAAM,MAAK,EAAA,CAAA,OAAA,CAAA;QAEpC,YAES,MAAA,YAAA,EAAA,MAAA;4BADE,CAAT,YAAS,MAAA,MAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TabItem, TabsVerticalProps } from "../../types/tabs.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tabs/tabs-vertical.vue.d.ts
|
|
5
|
+
type __VLS_Props = TabsVerticalProps;
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare var __VLS_2: `name:${string}`, __VLS_3: {
|
|
11
|
+
item: TabItem;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any };
|
|
14
|
+
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
16
|
+
} & {
|
|
17
|
+
"update:modelValue": (value: string) => any;
|
|
18
|
+
close: (item: TabItem, index: number) => any;
|
|
19
|
+
click: (item: TabItem, index: number) => any;
|
|
20
|
+
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
23
|
+
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
closable: boolean;
|
|
26
|
+
position: "left" | "right";
|
|
27
|
+
rounded: boolean;
|
|
28
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default };
|
|
38
|
+
//# sourceMappingURL=tabs-vertical.vue.d.ts.map
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
import _sfc_main$1 from "../
|
|
2
|
-
import _sfc_main$2 from "
|
|
3
|
-
import
|
|
1
|
+
import _sfc_main$1 from "../scroll/scroll.js";
|
|
2
|
+
import _sfc_main$2 from "./tabs-horizontal.js";
|
|
3
|
+
import _sfc_main$3 from "./tabs-vertical.js";
|
|
4
|
+
import { KeepAlive, Transition, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, resolveDynamicComponent, unref, useModel, useSlots, withCtx } from "vue";
|
|
4
5
|
import { bem } from "@veltra/utils";
|
|
5
6
|
import { useFallbackProps } from "@veltra/compositions";
|
|
6
|
-
import { vRipple } from "@veltra/directives";
|
|
7
|
-
import { Close, Plus } from "@veltra/icons/normal";
|
|
8
7
|
//#region src/components/tabs/tabs.vue
|
|
9
|
-
const _hoisted_1 = ["onClick"];
|
|
10
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
9
|
name: "Tabs",
|
|
12
10
|
__name: "tabs",
|
|
13
11
|
props: /* @__PURE__ */ mergeModels({
|
|
14
12
|
modelValue: {},
|
|
15
13
|
items: {},
|
|
14
|
+
closable: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
block: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
rounded: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
16
26
|
position: { default: "top" },
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
keepAlive: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
19
31
|
size: {}
|
|
20
32
|
}, {
|
|
21
33
|
"modelValue": {},
|
|
@@ -23,122 +35,80 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
35
|
}),
|
|
24
36
|
emits: /* @__PURE__ */ mergeModels([
|
|
25
37
|
"update:modelValue",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"delete",
|
|
29
|
-
"create",
|
|
30
|
-
"click"
|
|
38
|
+
"click",
|
|
39
|
+
"close"
|
|
31
40
|
], ["update:modelValue"]),
|
|
32
41
|
setup(__props, { emit: __emit }) {
|
|
33
42
|
const props = __props;
|
|
34
43
|
const emit = __emit;
|
|
35
44
|
const slots = useSlots();
|
|
36
45
|
const { size } = useFallbackProps([props], { size: "default" });
|
|
37
|
-
const tabItems = computed(() => {
|
|
38
|
-
return props.items;
|
|
39
|
-
});
|
|
40
46
|
const cls = bem("tabs");
|
|
41
|
-
const headerRef = shallowRef();
|
|
42
|
-
/** 当前活动标签 */
|
|
43
|
-
const index = shallowRef(-1);
|
|
44
47
|
const model = useModel(__props, "modelValue");
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
() => props.editable
|
|
55
|
-
], async ([index, position, editable]) => {
|
|
56
|
-
if (index === -1 || editable) return;
|
|
57
|
-
await nextTick();
|
|
58
|
-
const headerEl = headerRef.value;
|
|
59
|
-
const headerRect = headerEl.getBoundingClientRect();
|
|
60
|
-
const el = headerEl.children[index];
|
|
61
|
-
const { offsetWidth, offsetHeight } = el;
|
|
62
|
-
const rect = el.getBoundingClientRect();
|
|
63
|
-
if (position === "top" || position === "bottom") markStyle.value = {
|
|
64
|
-
width: offsetWidth + "px",
|
|
65
|
-
transform: `translate3d(${rect.left - headerRect.left}px, 0, 0)`
|
|
66
|
-
};
|
|
67
|
-
else markStyle.value = {
|
|
68
|
-
height: offsetHeight + "px",
|
|
69
|
-
transform: `translate3d(0, ${rect.top - headerRect.top}px, 0)`
|
|
70
|
-
};
|
|
71
|
-
}, { immediate: true });
|
|
72
|
-
const handleClick = (item, _index) => {
|
|
73
|
-
if (item.disabled) return;
|
|
74
|
-
changedByEvent = true;
|
|
75
|
-
index.value = _index;
|
|
76
|
-
model.value = item.key;
|
|
77
|
-
nextTick(() => {
|
|
78
|
-
changedByEvent = false;
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
const renderSlots = () => {
|
|
48
|
+
const isHorizontal = computed(() => props.position === "top" || props.position === "bottom");
|
|
49
|
+
/** 避免模板中使用类型断言:收敛 position 到水平 / 垂直子组件所需的子集。 */
|
|
50
|
+
const horizontalPosition = computed(() => props.position === "bottom" ? "bottom" : "top");
|
|
51
|
+
const verticalPosition = computed(() => props.position === "right" ? "right" : "left");
|
|
52
|
+
/** 是否存在任一内容面板插槽;没有则不渲染内容区域。 */
|
|
53
|
+
const hasContentSlots = computed(() => Object.keys(slots).length > 0);
|
|
54
|
+
const onClick = (item, index) => emit("click", item, index);
|
|
55
|
+
const onClose = (item, index) => emit("close", item, index);
|
|
56
|
+
const renderContent = () => {
|
|
82
57
|
const key = model.value;
|
|
83
58
|
if (!key) return null;
|
|
84
59
|
const nodes = slots[key]?.({ key });
|
|
85
|
-
if (Array.isArray(nodes)) return createVNode(_sfc_main$
|
|
60
|
+
if (Array.isArray(nodes)) return createVNode(_sfc_main$1, null, { default: () => nodes });
|
|
86
61
|
return nodes;
|
|
87
62
|
};
|
|
88
|
-
/** 关闭标签 */
|
|
89
|
-
const handleClose = (item, index) => {
|
|
90
|
-
const { items } = props;
|
|
91
|
-
if (model.value === item.key) model.value = (items[index + 1] ?? items[index - 1]).key;
|
|
92
|
-
emit("update:items", [...items.slice(0, index), ...items.slice(index + 1)]);
|
|
93
|
-
emit("delete", item, index);
|
|
94
|
-
};
|
|
95
|
-
const handleAdd = () => {
|
|
96
|
-
emit("create");
|
|
97
|
-
};
|
|
98
63
|
return (_ctx, _cache) => {
|
|
99
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass([
|
|
100
|
-
unref(cls).b,
|
|
101
|
-
unref(cls).m(__props.position),
|
|
102
|
-
unref(cls).m(unref(size))
|
|
103
|
-
]) }, [createElementVNode("ul", {
|
|
104
|
-
class: normalizeClass([unref(cls).e("header"), unref(cls).em("header", __props.position)]),
|
|
105
|
-
ref_key: "headerRef",
|
|
106
|
-
ref: headerRef
|
|
107
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tabItems.value, (item, index) => {
|
|
108
|
-
return withDirectives((openBlock(), createElementBlock("li", {
|
|
109
|
-
key: item.key,
|
|
110
|
-
class: normalizeClass([
|
|
111
|
-
unref(cls).e("header-item"),
|
|
112
|
-
unref(bem).is("active", model.value === item.key),
|
|
113
|
-
unref(bem).is("disabled", item.disabled === true)
|
|
114
|
-
]),
|
|
115
|
-
onClick: withModifiers(($event) => handleClick(item, index), ["stop"])
|
|
116
|
-
}, [renderSlot(_ctx.$slots, `name:${item.key}`, {}, () => [createTextVNode(toDisplayString(item.name), 1)]), __props.editable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [!item.disabled ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
117
|
-
key: 0,
|
|
118
|
-
class: normalizeClass(unref(cls).e("close")),
|
|
119
|
-
onClick: withModifiers(($event) => handleClose(item, index), ["stop"]),
|
|
120
|
-
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
121
|
-
}, {
|
|
122
|
-
default: withCtx(() => [createVNode(unref(Close))]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["class", "onClick"])) : (openBlock(), createElementBlock("i", {
|
|
125
|
-
key: 1,
|
|
126
|
-
class: normalizeClass(unref(cls).e("close-placeholder"))
|
|
127
|
-
}, null, 2))], 64)) : createCommentVNode("v-if", true)], 10, _hoisted_1)), [[unref(vRipple), item.disabled ? false : unref(cls).e("ripple")]]);
|
|
128
|
-
}), 128)), __props.editable ? (openBlock(), createElementBlock("li", {
|
|
64
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass([unref(cls).b, unref(cls).m(__props.position)]) }, [isHorizontal.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
129
65
|
key: 0,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
66
|
+
modelValue: model.value,
|
|
67
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
68
|
+
items: __props.items,
|
|
69
|
+
position: horizontalPosition.value,
|
|
70
|
+
size: unref(size),
|
|
71
|
+
closable: __props.closable,
|
|
72
|
+
block: __props.block,
|
|
73
|
+
rounded: __props.rounded,
|
|
74
|
+
onClick,
|
|
75
|
+
onClose
|
|
76
|
+
}, null, 8, [
|
|
77
|
+
"modelValue",
|
|
78
|
+
"items",
|
|
79
|
+
"position",
|
|
80
|
+
"size",
|
|
81
|
+
"closable",
|
|
82
|
+
"block",
|
|
83
|
+
"rounded"
|
|
84
|
+
])) : (openBlock(), createBlock(_sfc_main$3, {
|
|
85
|
+
key: 1,
|
|
86
|
+
modelValue: model.value,
|
|
87
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value = $event),
|
|
88
|
+
items: __props.items,
|
|
89
|
+
position: verticalPosition.value,
|
|
90
|
+
size: unref(size),
|
|
91
|
+
closable: __props.closable,
|
|
92
|
+
rounded: __props.rounded,
|
|
93
|
+
onClick,
|
|
94
|
+
onClose
|
|
95
|
+
}, null, 8, [
|
|
96
|
+
"modelValue",
|
|
97
|
+
"items",
|
|
98
|
+
"position",
|
|
99
|
+
"size",
|
|
100
|
+
"closable",
|
|
101
|
+
"rounded"
|
|
102
|
+
])), hasContentSlots.value ? (openBlock(), createElementBlock("div", {
|
|
103
|
+
key: 2,
|
|
104
|
+
class: normalizeClass(unref(cls).e("content"))
|
|
105
|
+
}, [createVNode(Transition, {
|
|
136
106
|
name: "fade",
|
|
137
107
|
mode: "out-in"
|
|
138
108
|
}, {
|
|
139
|
-
default: withCtx(() => [__props.keepAlive ? (openBlock(), createBlock(KeepAlive, { key: 0 }, [(openBlock(), createBlock(resolveDynamicComponent(
|
|
109
|
+
default: withCtx(() => [__props.keepAlive ? (openBlock(), createBlock(KeepAlive, { key: 0 }, [(openBlock(), createBlock(resolveDynamicComponent(renderContent()), { key: model.value }))], 1024)) : (openBlock(), createBlock(resolveDynamicComponent(renderContent()), { key: model.value }))]),
|
|
140
110
|
_: 1
|
|
141
|
-
})], 2);
|
|
111
|
+
})], 2)) : createCommentVNode("v-if", true)], 2);
|
|
142
112
|
};
|
|
143
113
|
}
|
|
144
114
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/tabs/tabs.vue"],"sourcesContent":["<template>\n <div :class=\"[cls.b, cls.m(position!)
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/tabs/tabs.vue"],"sourcesContent":["<template>\n <div :class=\"[cls.b, cls.m(position!)]\">\n <u-tabs-horizontal\n v-if=\"isHorizontal\"\n v-model=\"model\"\n :items=\"items\"\n :position=\"horizontalPosition\"\n :size=\"size\"\n :closable=\"closable\"\n :block=\"block\"\n :rounded=\"rounded\"\n @click=\"onClick\"\n @close=\"onClose\"\n />\n <u-tabs-vertical\n v-else\n v-model=\"model\"\n :items=\"items\"\n :position=\"verticalPosition\"\n :size=\"size\"\n :closable=\"closable\"\n :rounded=\"rounded\"\n @click=\"onClick\"\n @close=\"onClose\"\n />\n\n <div v-if=\"hasContentSlots\" :class=\"cls.e('content')\">\n <transition name=\"fade\" mode=\"out-in\">\n <keep-alive v-if=\"keepAlive\">\n <component :key=\"model\" :is=\"renderContent()\" />\n </keep-alive>\n <component v-else :key=\"model\" :is=\"renderContent()\" />\n </transition>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useFallbackProps } from '@veltra/compositions'\nimport { bem } from '@veltra/utils'\nimport { computed, createVNode, useSlots } from 'vue'\n\nimport type { ComponentSize, TabItem, TabsEmits, TabsProps } from '../../types'\nimport { UScroll } from '../scroll'\nimport UTabsHorizontal from './tabs-horizontal.vue'\nimport UTabsVertical from './tabs-vertical.vue'\n\ndefineOptions({ name: 'Tabs' })\n\nconst props = withDefaults(defineProps<TabsProps>(), {\n position: 'top',\n closable: false,\n block: false,\n rounded: false,\n keepAlive: false\n})\n\nconst emit = defineEmits<TabsEmits>()\n\nconst slots = useSlots() as Record<string, ((props?: any) => any) | undefined>\n\nconst { size } = useFallbackProps([props], {\n size: 'default' as ComponentSize\n})\n\nconst cls = bem('tabs')\n\nconst model = defineModel<string>()\n\nconst isHorizontal = computed(() => props.position === 'top' || props.position === 'bottom')\n\n/** 避免模板中使用类型断言:收敛 position 到水平 / 垂直子组件所需的子集。 */\nconst horizontalPosition = computed<'top' | 'bottom'>(() =>\n props.position === 'bottom' ? 'bottom' : 'top'\n)\n\nconst verticalPosition = computed<'left' | 'right'>(() =>\n props.position === 'right' ? 'right' : 'left'\n)\n\n/** 是否存在任一内容面板插槽;没有则不渲染内容区域。 */\nconst hasContentSlots = computed(() => Object.keys(slots).length > 0)\n\nconst onClick = (item: TabItem, index: number) => emit('click', item, index)\nconst onClose = (item: TabItem, index: number) => emit('close', item, index)\n\nconst renderContent = () => {\n const key = model.value\n if (!key) return null\n const nodes = slots[key]?.({ key })\n if (Array.isArray(nodes)) {\n return createVNode(UScroll, null, { default: () => nodes })\n }\n return nodes\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MAAM,QAAQ,UAAU;EAExB,MAAM,EAAE,SAAS,iBAAiB,CAAC,MAAM,EAAE,EACzC,MAAM,WACP,CAAA;EAED,MAAM,MAAM,IAAI,OAAM;EAEtB,MAAM,QAAQ,SAAmB,SAAA,aAAC;EAElC,MAAM,eAAe,eAAe,MAAM,aAAa,SAAS,MAAM,aAAa,SAAQ;;EAG3F,MAAM,qBAAqB,eACzB,MAAM,aAAa,WAAW,WAAW,MAC3C;EAEA,MAAM,mBAAmB,eACvB,MAAM,aAAa,UAAU,UAAU,OACzC;;EAGA,MAAM,kBAAkB,eAAe,OAAO,KAAK,MAAM,CAAC,SAAS,EAAC;EAEpE,MAAM,WAAW,MAAe,UAAkB,KAAK,SAAS,MAAM,MAAK;EAC3E,MAAM,WAAW,MAAe,UAAkB,KAAK,SAAS,MAAM,MAAK;EAE3E,MAAM,sBAAsB;GAC1B,MAAM,MAAM,MAAM;AAClB,OAAI,CAAC,IAAK,QAAO;GACjB,MAAM,QAAQ,MAAM,OAAO,EAAE,KAAK,CAAA;AAClC,OAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,YAAY,aAAS,MAAM,EAAE,eAAe,OAAO,CAAA;AAE5D,UAAO;;;uBA5FP,mBAiCM,OAAA,EAjCA,OAAK,eAAA,CAAG,MAAA,IAAG,CAAC,GAAG,MAAA,IAAG,CAAC,EAAE,QAAA,SAAQ,CAAA,CAAA,EAAA,EAAA,CAEzB,aAAA,SAAA,WAAA,EADR,YAWE,aAAA;;gBATS,MAAA;iEAAA,MAAK,QAAA;IACb,OAAO,QAAA;IACP,UAAU,mBAAA;IACV,MAAM,MAAA,KAAI;IACV,UAAU,QAAA;IACV,OAAO,QAAA;IACP,SAAS,QAAA;IACF;IACA;;;;;;;;;uBAEV,YAUE,aAAA;;gBARS,MAAA;iEAAA,MAAK,QAAA;IACb,OAAO,QAAA;IACP,UAAU,iBAAA;IACV,MAAM,MAAA,KAAI;IACV,UAAU,QAAA;IACV,SAAS,QAAA;IACF;IACA;;;;;;;;QAGC,gBAAA,SAAA,WAAA,EAAX,mBAOM,OAAA;;IAPuB,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,UAAA,CAAA;OACvC,YAKa,YAAA;IALD,MAAK;IAAO,MAAK;;2BAGd,CAFK,QAAA,aAAA,WAAA,EAAlB,YAEa,WAAA,EAAA,KAAA,GAAA,EAAA,EAAA,WAAA,EADX,YAAgD,wBAAnB,eAAa,CAAA,EAAA,EAA9B,KAAK,MAAA,OAAK,CAAA,EAAA,EAAA,KAAA,KAAA,WAAA,EAExB,YAAuD,wBAAnB,eAAa,CAAA,EAAA,EAA9B,KAAK,MAAA,OAAK,CAAA,EAAA,CAAA"}
|
|
@@ -3,42 +3,28 @@ import * as _$vue from "vue";
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/tabs/tabs.vue.d.ts
|
|
5
5
|
type __VLS_Props = TabsProps;
|
|
6
|
-
type __VLS_Slots = {
|
|
7
|
-
[key: string]: (props: {
|
|
8
|
-
key: string;
|
|
9
|
-
}) => any;
|
|
10
|
-
[key: `name:${string}`]: () => any;
|
|
11
|
-
};
|
|
12
6
|
type __VLS_ModelProps = {
|
|
13
7
|
modelValue?: string;
|
|
14
8
|
};
|
|
15
9
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
-
declare const
|
|
10
|
+
declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
17
11
|
"update:modelValue": (value: string | undefined) => any;
|
|
18
12
|
} & {
|
|
19
|
-
"update:modelValue": (value: string
|
|
20
|
-
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
14
|
+
close: (item: TabItem, index: number) => any;
|
|
21
15
|
click: (item: TabItem, index: number) => any;
|
|
22
|
-
create: () => any;
|
|
23
|
-
"update:items": (items: TabItem[]) => any;
|
|
24
|
-
"update:active": (active: string | number) => any;
|
|
25
16
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
-
"onUpdate:modelValue"?: ((value: string
|
|
27
|
-
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
+
onClose?: ((item: TabItem, index: number) => any) | undefined;
|
|
28
19
|
onClick?: ((item: TabItem, index: number) => any) | undefined;
|
|
29
|
-
onCreate?: (() => any) | undefined;
|
|
30
|
-
"onUpdate:items"?: ((items: TabItem[]) => any) | undefined;
|
|
31
|
-
"onUpdate:active"?: ((active: string | number) => any) | undefined;
|
|
32
20
|
}>, {
|
|
21
|
+
block: boolean;
|
|
22
|
+
closable: boolean;
|
|
33
23
|
position: "left" | "right" | "top" | "bottom";
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
keepAlive: boolean;
|
|
34
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
35
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
27
|
declare const _default: typeof __VLS_export;
|
|
37
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
-
new (): {
|
|
39
|
-
$slots: S;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
28
|
//#endregion
|
|
43
29
|
export { _default };
|
|
44
30
|
//# sourceMappingURL=tabs.vue.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { nextTick, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
|
|
2
|
+
import { useResizeObserver } from "@veltra/compositions";
|
|
3
|
+
//#region src/components/tabs/use-tabs-bar.ts
|
|
4
|
+
/**
|
|
5
|
+
* 水平标签栏的溢出滚动逻辑:
|
|
6
|
+
* - 计算 nav 按钮显隐与可用状态
|
|
7
|
+
* - 提供按步滚动与活动标签自动滚入视野的方法
|
|
8
|
+
* - 绑定 wheel / scroll / resize 事件
|
|
9
|
+
*/
|
|
10
|
+
function useTabsBar(options) {
|
|
11
|
+
const { viewportRef, listRef, items, model } = options;
|
|
12
|
+
const showNav = shallowRef(false);
|
|
13
|
+
const canPrev = shallowRef(false);
|
|
14
|
+
const canNext = shallowRef(false);
|
|
15
|
+
/** 依据 viewport 与内容尺寸推导滚动按钮可用状态 */
|
|
16
|
+
const updateNavState = () => {
|
|
17
|
+
const vp = viewportRef.value;
|
|
18
|
+
if (!vp) return;
|
|
19
|
+
const { scrollLeft, scrollWidth, clientWidth } = vp;
|
|
20
|
+
const overflowing = scrollWidth - clientWidth > 1;
|
|
21
|
+
showNav.value = overflowing;
|
|
22
|
+
canPrev.value = overflowing && scrollLeft > 0;
|
|
23
|
+
canNext.value = overflowing && scrollLeft + clientWidth < scrollWidth - 1;
|
|
24
|
+
};
|
|
25
|
+
/** 箭头按钮:按视口宽度 80% 的步长平滑滚动 */
|
|
26
|
+
const scrollByStep = (dir) => {
|
|
27
|
+
const vp = viewportRef.value;
|
|
28
|
+
if (!vp) return;
|
|
29
|
+
vp.scrollTo({
|
|
30
|
+
left: vp.scrollLeft + dir * vp.clientWidth * .8,
|
|
31
|
+
behavior: "smooth"
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
/** 活动标签自动滚入视野 */
|
|
35
|
+
const ensureActiveVisible = () => {
|
|
36
|
+
const vp = viewportRef.value;
|
|
37
|
+
const list = listRef.value;
|
|
38
|
+
if (!vp || !list) return;
|
|
39
|
+
const activeKey = model.value;
|
|
40
|
+
if (!activeKey) return;
|
|
41
|
+
const activeIndex = items.value.findIndex((i) => i.key === activeKey);
|
|
42
|
+
if (activeIndex < 0) return;
|
|
43
|
+
const el = list.children[activeIndex];
|
|
44
|
+
if (!el) return;
|
|
45
|
+
const vpRect = vp.getBoundingClientRect();
|
|
46
|
+
const elRect = el.getBoundingClientRect();
|
|
47
|
+
if (elRect.left < vpRect.left) vp.scrollTo({
|
|
48
|
+
left: vp.scrollLeft + (elRect.left - vpRect.left) - 8,
|
|
49
|
+
behavior: "smooth"
|
|
50
|
+
});
|
|
51
|
+
else if (elRect.right > vpRect.right) vp.scrollTo({
|
|
52
|
+
left: vp.scrollLeft + (elRect.right - vpRect.right) + 8,
|
|
53
|
+
behavior: "smooth"
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
/** 鼠标滚轮(纵向)驱动水平滚动;触控板横滑(已有 deltaX)不拦截 */
|
|
57
|
+
const handleWheel = (e) => {
|
|
58
|
+
if (!showNav.value) return;
|
|
59
|
+
const vp = viewportRef.value;
|
|
60
|
+
if (!vp) return;
|
|
61
|
+
if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) return;
|
|
62
|
+
if (e.deltaY === 0) return;
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
vp.scrollLeft += e.deltaY;
|
|
65
|
+
};
|
|
66
|
+
useResizeObserver({
|
|
67
|
+
targets: [viewportRef, listRef],
|
|
68
|
+
onResize: () => updateNavState()
|
|
69
|
+
});
|
|
70
|
+
watch(model, async () => {
|
|
71
|
+
await nextTick();
|
|
72
|
+
ensureActiveVisible();
|
|
73
|
+
});
|
|
74
|
+
watch(items, async () => {
|
|
75
|
+
await nextTick();
|
|
76
|
+
updateNavState();
|
|
77
|
+
ensureActiveVisible();
|
|
78
|
+
}, { deep: false });
|
|
79
|
+
onMounted(() => {
|
|
80
|
+
const vp = viewportRef.value;
|
|
81
|
+
if (!vp) return;
|
|
82
|
+
vp.addEventListener("wheel", handleWheel, { passive: false });
|
|
83
|
+
vp.addEventListener("scroll", updateNavState, { passive: true });
|
|
84
|
+
updateNavState();
|
|
85
|
+
nextTick(ensureActiveVisible);
|
|
86
|
+
});
|
|
87
|
+
onBeforeUnmount(() => {
|
|
88
|
+
const vp = viewportRef.value;
|
|
89
|
+
if (!vp) return;
|
|
90
|
+
vp.removeEventListener("wheel", handleWheel);
|
|
91
|
+
vp.removeEventListener("scroll", updateNavState);
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
showNav,
|
|
95
|
+
canPrev,
|
|
96
|
+
canNext,
|
|
97
|
+
updateNavState,
|
|
98
|
+
scrollByStep,
|
|
99
|
+
ensureActiveVisible
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { useTabsBar };
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=use-tabs-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tabs-bar.js","names":[],"sources":["../../../src/components/tabs/use-tabs-bar.ts"],"sourcesContent":["import { useResizeObserver } from '@veltra/compositions'\nimport {\n type ModelRef,\n type Ref,\n type ShallowRef,\n nextTick,\n onBeforeUnmount,\n onMounted,\n shallowRef,\n watch\n} from 'vue'\n\nimport type { TabItem } from '../../types'\n\ninterface UseTabsBarOptions {\n viewportRef: ShallowRef<HTMLElement | undefined>\n listRef: ShallowRef<HTMLElement | undefined>\n items: Ref<TabItem[]>\n model: ModelRef<string | undefined>\n}\n\n/**\n * 水平标签栏的溢出滚动逻辑:\n * - 计算 nav 按钮显隐与可用状态\n * - 提供按步滚动与活动标签自动滚入视野的方法\n * - 绑定 wheel / scroll / resize 事件\n */\nexport function useTabsBar(options: UseTabsBarOptions) {\n const { viewportRef, listRef, items, model } = options\n\n const showNav = shallowRef(false)\n const canPrev = shallowRef(false)\n const canNext = shallowRef(false)\n\n /** 依据 viewport 与内容尺寸推导滚动按钮可用状态 */\n const updateNavState = () => {\n const vp = viewportRef.value\n if (!vp) return\n const { scrollLeft, scrollWidth, clientWidth } = vp\n const overflowing = scrollWidth - clientWidth > 1\n showNav.value = overflowing\n canPrev.value = overflowing && scrollLeft > 0\n canNext.value = overflowing && scrollLeft + clientWidth < scrollWidth - 1\n }\n\n /** 箭头按钮:按视口宽度 80% 的步长平滑滚动 */\n const scrollByStep = (dir: 1 | -1) => {\n const vp = viewportRef.value\n if (!vp) return\n vp.scrollTo({ left: vp.scrollLeft + dir * vp.clientWidth * 0.8, behavior: 'smooth' })\n }\n\n /** 活动标签自动滚入视野 */\n const ensureActiveVisible = () => {\n const vp = viewportRef.value\n const list = listRef.value\n if (!vp || !list) return\n const activeKey = model.value\n if (!activeKey) return\n const activeIndex = items.value.findIndex((i) => i.key === activeKey)\n if (activeIndex < 0) return\n const el = list.children[activeIndex] as HTMLElement | undefined\n if (!el) return\n\n const vpRect = vp.getBoundingClientRect()\n const elRect = el.getBoundingClientRect()\n if (elRect.left < vpRect.left) {\n vp.scrollTo({ left: vp.scrollLeft + (elRect.left - vpRect.left) - 8, behavior: 'smooth' })\n } else if (elRect.right > vpRect.right) {\n vp.scrollTo({ left: vp.scrollLeft + (elRect.right - vpRect.right) + 8, behavior: 'smooth' })\n }\n }\n\n /** 鼠标滚轮(纵向)驱动水平滚动;触控板横滑(已有 deltaX)不拦截 */\n const handleWheel = (e: WheelEvent) => {\n if (!showNav.value) return\n const vp = viewportRef.value\n if (!vp) return\n if (Math.abs(e.deltaX) > Math.abs(e.deltaY)) return\n if (e.deltaY === 0) return\n e.preventDefault()\n vp.scrollLeft += e.deltaY\n }\n\n useResizeObserver({ targets: [viewportRef, listRef], onResize: () => updateNavState() })\n\n watch(model, async () => {\n await nextTick()\n ensureActiveVisible()\n })\n\n watch(\n items,\n async () => {\n await nextTick()\n updateNavState()\n ensureActiveVisible()\n },\n { deep: false }\n )\n\n onMounted(() => {\n const vp = viewportRef.value\n if (!vp) return\n vp.addEventListener('wheel', handleWheel, { passive: false })\n vp.addEventListener('scroll', updateNavState, { passive: true })\n updateNavState()\n nextTick(ensureActiveVisible)\n })\n\n onBeforeUnmount(() => {\n const vp = viewportRef.value\n if (!vp) return\n vp.removeEventListener('wheel', handleWheel)\n vp.removeEventListener('scroll', updateNavState)\n })\n\n return { showNav, canPrev, canNext, updateNavState, scrollByStep, ensureActiveVisible }\n}\n"],"mappings":";;;;;;;;;AA2BA,SAAgB,WAAW,SAA4B;CACrD,MAAM,EAAE,aAAa,SAAS,OAAO,UAAU;CAE/C,MAAM,UAAU,WAAW,MAAM;CACjC,MAAM,UAAU,WAAW,MAAM;CACjC,MAAM,UAAU,WAAW,MAAM;;CAGjC,MAAM,uBAAuB;EAC3B,MAAM,KAAK,YAAY;AACvB,MAAI,CAAC,GAAI;EACT,MAAM,EAAE,YAAY,aAAa,gBAAgB;EACjD,MAAM,cAAc,cAAc,cAAc;AAChD,UAAQ,QAAQ;AAChB,UAAQ,QAAQ,eAAe,aAAa;AAC5C,UAAQ,QAAQ,eAAe,aAAa,cAAc,cAAc;;;CAI1E,MAAM,gBAAgB,QAAgB;EACpC,MAAM,KAAK,YAAY;AACvB,MAAI,CAAC,GAAI;AACT,KAAG,SAAS;GAAE,MAAM,GAAG,aAAa,MAAM,GAAG,cAAc;GAAK,UAAU;GAAU,CAAC;;;CAIvF,MAAM,4BAA4B;EAChC,MAAM,KAAK,YAAY;EACvB,MAAM,OAAO,QAAQ;AACrB,MAAI,CAAC,MAAM,CAAC,KAAM;EAClB,MAAM,YAAY,MAAM;AACxB,MAAI,CAAC,UAAW;EAChB,MAAM,cAAc,MAAM,MAAM,WAAW,MAAM,EAAE,QAAQ,UAAU;AACrE,MAAI,cAAc,EAAG;EACrB,MAAM,KAAK,KAAK,SAAS;AACzB,MAAI,CAAC,GAAI;EAET,MAAM,SAAS,GAAG,uBAAuB;EACzC,MAAM,SAAS,GAAG,uBAAuB;AACzC,MAAI,OAAO,OAAO,OAAO,KACvB,IAAG,SAAS;GAAE,MAAM,GAAG,cAAc,OAAO,OAAO,OAAO,QAAQ;GAAG,UAAU;GAAU,CAAC;WACjF,OAAO,QAAQ,OAAO,MAC/B,IAAG,SAAS;GAAE,MAAM,GAAG,cAAc,OAAO,QAAQ,OAAO,SAAS;GAAG,UAAU;GAAU,CAAC;;;CAKhG,MAAM,eAAe,MAAkB;AACrC,MAAI,CAAC,QAAQ,MAAO;EACpB,MAAM,KAAK,YAAY;AACvB,MAAI,CAAC,GAAI;AACT,MAAI,KAAK,IAAI,EAAE,OAAO,GAAG,KAAK,IAAI,EAAE,OAAO,CAAE;AAC7C,MAAI,EAAE,WAAW,EAAG;AACpB,IAAE,gBAAgB;AAClB,KAAG,cAAc,EAAE;;AAGrB,mBAAkB;EAAE,SAAS,CAAC,aAAa,QAAQ;EAAE,gBAAgB,gBAAgB;EAAE,CAAC;AAExF,OAAM,OAAO,YAAY;AACvB,QAAM,UAAU;AAChB,uBAAqB;GACrB;AAEF,OACE,OACA,YAAY;AACV,QAAM,UAAU;AAChB,kBAAgB;AAChB,uBAAqB;IAEvB,EAAE,MAAM,OAAO,CAChB;AAED,iBAAgB;EACd,MAAM,KAAK,YAAY;AACvB,MAAI,CAAC,GAAI;AACT,KAAG,iBAAiB,SAAS,aAAa,EAAE,SAAS,OAAO,CAAC;AAC7D,KAAG,iBAAiB,UAAU,gBAAgB,EAAE,SAAS,MAAM,CAAC;AAChE,kBAAgB;AAChB,WAAS,oBAAoB;GAC7B;AAEF,uBAAsB;EACpB,MAAM,KAAK,YAAY;AACvB,MAAI,CAAC,GAAI;AACT,KAAG,oBAAoB,SAAS,YAAY;AAC5C,KAAG,oBAAoB,UAAU,eAAe;GAChD;AAEF,QAAO;EAAE;EAAS;EAAS;EAAS;EAAgB;EAAc;EAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <p :class=\"classList\" :style=\"style\">\n <UNodeRender :content=\"getTextVNode()\" ref=\"aa\" />\n </p>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem, withUnit, isTextNode, getHighlightChunks } from '@veltra/utils'\nimport { type CSSProperties, type VNode, computed, useSlots, h, createTextVNode } from 'vue'\n\nimport type { TextProps } from '../../types'\nimport { UNodeRender } from '../node-render'\n\ndefineOptions({\n name: 'Text'\n})\n\nconst props = withDefaults(defineProps<TextProps>(), {\n as: 'content'\n})\n\nconst cls = bem('text')\n\nconst classList = computed(() => {\n return [cls.b, bem.is(props.as), bem.is('bold', props.bold), bem.is('italic', props.italic)]\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n fontSize: withUnit(props.fontSize, 'px')\n }\n const { deleted, underline } = props\n if (deleted) {\n style.textDecoration = 'line-through'\n }\n if (underline) {\n style.textDecoration = 'underline'\n }\n\n return style\n})\n\nconst slots = useSlots()\nconst getTextVNode = () => {\n const nodes = slots.default?.()\n if (!nodes?.length) return undefined\n\n // 只允许渲染文本\n const textNodes = nodes.filter((node) => isTextNode(node))\n\n const { highlight } = props\n\n if (!highlight) {\n return textNodes\n }\n\n return textNodes.reduce((nodes, textNode) => {\n const chunks = getHighlightChunks(\n textNode.children as string,\n Array.isArray(highlight) ? highlight : [highlight]\n )\n\n chunks.forEach((chunk) => {\n if (chunk.highlight) {\n nodes.push(h('mark', chunk.text))\n } else {\n nodes.push(createTextVNode(chunk.text))\n }\n })\n\n return nodes\n }, [] as VNode[])\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ;EAId,MAAM,MAAM,IAAI,OAAM;EAEtB,MAAM,YAAY,eAAe;AAC/B,UAAO;IAAC,IAAI;IAAG,IAAI,GAAG,MAAM,GAAG;IAAE,IAAI,GAAG,QAAQ,MAAM,KAAK;IAAE,IAAI,GAAG,UAAU,MAAM,OAAO;IAAA;IAC5F;EAED,MAAM,QAAQ,eAAe;GAC3B,MAAM,QAAuB,EAC3B,UAAU,SAAS,MAAM,UAAU,KAAI,EACzC;GACA,MAAM,EAAE,SAAS,cAAc;AAC/B,OAAI,QACF,OAAM,iBAAiB;AAEzB,OAAI,UACF,OAAM,iBAAiB;AAGzB,UAAO;IACR;EAED,MAAM,QAAQ,UAAS;EACvB,MAAM,qBAAqB;GACzB,MAAM,QAAQ,MAAM,WAAU;AAC9B,OAAI,CAAC,OAAO,OAAQ,QAAO,KAAA;GAG3B,MAAM,YAAY,MAAM,QAAQ,SAAS,WAAW,KAAK,CAAA;GAEzD,MAAM,EAAE,cAAc;AAEtB,OAAI,CAAC,UACH,QAAO;AAGT,UAAO,UAAU,QAAQ,OAAO,aAAa;AAC5B,uBACb,SAAS,UACT,MAAM,QAAQ,UAAU,GAAG,YAAY,CAAC,UAAS,
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../../src/components/text/text.vue"],"sourcesContent":["<template>\n <p :class=\"classList\" :style=\"style\">\n <UNodeRender :content=\"getTextVNode()\" ref=\"aa\" />\n </p>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem, withUnit, isTextNode, getHighlightChunks } from '@veltra/utils'\nimport { type CSSProperties, type VNode, computed, useSlots, h, createTextVNode } from 'vue'\n\nimport type { TextProps } from '../../types'\nimport { UNodeRender } from '../node-render'\n\ndefineOptions({\n name: 'Text'\n})\n\nconst props = withDefaults(defineProps<TextProps>(), {\n as: 'content'\n})\n\nconst cls = bem('text')\n\nconst classList = computed(() => {\n return [cls.b, bem.is(props.as), bem.is('bold', props.bold), bem.is('italic', props.italic)]\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n fontSize: withUnit(props.fontSize, 'px')\n }\n const { deleted, underline } = props\n if (deleted) {\n style.textDecoration = 'line-through'\n }\n if (underline) {\n style.textDecoration = 'underline'\n }\n\n return style\n})\n\nconst slots = useSlots()\nconst getTextVNode = () => {\n const nodes = slots.default?.()\n if (!nodes?.length) return undefined\n\n // 只允许渲染文本\n const textNodes = nodes.filter((node) => isTextNode(node))\n\n const { highlight } = props\n\n if (!highlight) {\n return textNodes\n }\n\n return textNodes.reduce((nodes, textNode) => {\n const chunks = getHighlightChunks(\n textNode.children as string,\n Array.isArray(highlight) ? highlight : [highlight]\n )\n\n chunks.forEach((chunk) => {\n if (chunk.highlight) {\n nodes.push(h('mark', chunk.text))\n } else {\n nodes.push(createTextVNode(chunk.text))\n }\n })\n\n return nodes\n }, [] as VNode[])\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ;EAId,MAAM,MAAM,IAAI,OAAM;EAEtB,MAAM,YAAY,eAAe;AAC/B,UAAO;IAAC,IAAI;IAAG,IAAI,GAAG,MAAM,GAAG;IAAE,IAAI,GAAG,QAAQ,MAAM,KAAK;IAAE,IAAI,GAAG,UAAU,MAAM,OAAO;IAAA;IAC5F;EAED,MAAM,QAAQ,eAAe;GAC3B,MAAM,QAAuB,EAC3B,UAAU,SAAS,MAAM,UAAU,KAAI,EACzC;GACA,MAAM,EAAE,SAAS,cAAc;AAC/B,OAAI,QACF,OAAM,iBAAiB;AAEzB,OAAI,UACF,OAAM,iBAAiB;AAGzB,UAAO;IACR;EAED,MAAM,QAAQ,UAAS;EACvB,MAAM,qBAAqB;GACzB,MAAM,QAAQ,MAAM,WAAU;AAC9B,OAAI,CAAC,OAAO,OAAQ,QAAO,KAAA;GAG3B,MAAM,YAAY,MAAM,QAAQ,SAAS,WAAW,KAAK,CAAA;GAEzD,MAAM,EAAE,cAAc;AAEtB,OAAI,CAAC,UACH,QAAO;AAGT,UAAO,UAAU,QAAQ,OAAO,aAAa;AAC5B,uBACb,SAAS,UACT,MAAM,QAAQ,UAAU,GAAG,YAAY,CAAC,UAAS,CAGnD,CAAO,SAAS,UAAU;AACxB,SAAI,MAAM,UACR,OAAM,KAAK,EAAE,QAAQ,MAAM,KAAK,CAAA;SAEhC,OAAM,KAAK,gBAAgB,MAAM,KAAK,CAAA;MAEzC;AAED,WAAO;MACN,EAAE,CAAW;;;uBAtEhB,mBAEI,KAAA;IAFA,OAAK,eAAE,UAAA,MAAS;IAAG,OAAK,eAAE,MAAA,MAAK;OACjC,YAAkD,MAAA,WAAA,EAAA;IAApC,SAAS,cAAY;IAAI,KAAI"}
|