@sdata/web-vue 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sd.css +135 -117
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +17 -50
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/style/index.css +0 -39
- package/es/anchor/anchor.vue.d.ts +1 -1
- package/es/anchor/index.d.ts +3 -3
- package/es/auto-complete/auto-complete.vue.d.ts +4 -4
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +6 -6
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/bloom-menu/bloom-menu.js +5 -0
- package/es/bloom-menu/bloom-menu.vue.d.ts +52 -0
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +380 -0
- package/es/bloom-menu/index.d.ts +6 -0
- package/es/bloom-menu/index.js +10 -0
- package/es/bloom-menu/style/css.js +2 -0
- package/es/bloom-menu/style/index.css +135 -0
- package/es/bloom-menu/style/index.d.ts +2 -0
- package/es/bloom-menu/style/index.js +2 -0
- package/es/bloom-menu/style/index.scss +153 -0
- package/es/bloom-menu/style/token.scss +24 -0
- package/es/bloom-menu/types.d.ts +11 -0
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-panel.vue.d.ts +1 -1
- package/es/cascader/cascader.vue.d.ts +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/clamp/index.d.ts +212 -0
- package/es/clamp/index.js +15 -0
- package/es/clamp/style/css.js +1 -0
- package/es/clamp/style/index.css +0 -0
- package/es/clamp/style/index.d.ts +1 -0
- package/es/clamp/style/index.js +1 -0
- package/es/clamp/style/index.scss +1 -0
- package/es/clamp/style/token.scss +1 -0
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/components.d.ts +5 -0
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +8 -15
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +113 -118
- package/es/ellipsis/index.d.ts +14 -16
- package/es/ellipsis/performant-ellipsis.vue.d.ts +3 -5
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -24
- package/es/ellipsis/style/index.css +0 -2
- package/es/ellipsis/style/index.scss +3 -2
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/index.css +135 -117
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -3
- package/es/index.scss +2 -0
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/input-tag/index.d.ts +0 -4
- package/es/input-tag/input-tag.vue.d.ts +3 -7
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +85 -157
- package/es/input-tag/style/index.css +6 -39
- package/es/input-tag/style/index.scss +7 -0
- package/es/input-tag/style/input-tag.scss +0 -45
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/list/index.d.ts +3 -3
- package/es/list/list.vue.d.ts +1 -1
- package/es/locale/interface.d.ts +2 -0
- package/es/locale/lang/en-us.js +2 -0
- package/es/locale/lang/zh-cn.js +2 -0
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +21 -27
- package/es/menu/style/index.css +5 -2
- package/es/menu/style/index.scss +5 -2
- package/es/modal/index.js +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/popover/style/index.css +0 -1
- package/es/popover/style/index.scss +0 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +9 -2
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/index.d.ts +8 -8
- package/es/table/table-tr.vue.d.ts +1 -1
- package/es/table/table.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tag-group/index.d.ts +4 -6
- package/es/tag-group/style/index.css +6 -29
- package/es/tag-group/style/index.scss +9 -34
- package/es/tag-group/tag-group.vue.d.ts +8 -11
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +91 -272
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue.d.ts +12 -12
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/typography/base.vue.d.ts +15 -15
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +93 -164
- package/es/typography/interface.d.ts +1 -2
- package/es/typography/style/index.css +0 -5
- package/es/typography/style/index.scss +0 -7
- package/json/vetur-attributes.json +0 -20
- package/json/vetur-tags.json +5 -10
- package/json/web-types.json +9 -53
- package/package.json +2 -1
- package/es/typography/utils/measure.d.ts +0 -6
- package/es/typography/utils/measure.js +0 -69
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../../_utils/global-config.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Fragment, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeProps, onMounted, onUpdated, openBlock, ref, renderSlot, unref, withCtx } from "vue";
|
|
6
|
-
import { createReusableTemplate } from "@vueuse/core";
|
|
3
|
+
import Ellipsis from "../../ellipsis/index.js";
|
|
4
|
+
import { computed, createBlock, createSlots, createTextVNode, defineComponent, mergeProps, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
7
5
|
//#region components/_components/auto-tooltip/auto-tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
8
6
|
var auto_tooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
9
7
|
name: "AutoTooltip",
|
|
@@ -12,53 +10,22 @@ var auto_tooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
12
10
|
__name: "auto-tooltip",
|
|
13
11
|
props: { tooltipProps: {} },
|
|
14
12
|
setup(__props) {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const contentRef = ref(null);
|
|
19
|
-
const text = ref("");
|
|
20
|
-
const showTooltip = ref(false);
|
|
21
|
-
const calculateTooltip = () => {
|
|
22
|
-
if (containerRef.value && contentRef.value) {
|
|
23
|
-
const shouldShow = contentRef.value.offsetWidth > containerRef.value.offsetWidth;
|
|
24
|
-
if (shouldShow !== showTooltip.value) showTooltip.value = shouldShow;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const updateText = () => {
|
|
28
|
-
var _contentRef$value;
|
|
29
|
-
if (((_contentRef$value = contentRef.value) === null || _contentRef$value === void 0 ? void 0 : _contentRef$value.textContent) && contentRef.value.textContent !== text.value) text.value = contentRef.value.textContent;
|
|
30
|
-
};
|
|
31
|
-
const onResize = () => {
|
|
32
|
-
updateText();
|
|
33
|
-
calculateTooltip();
|
|
34
|
-
};
|
|
35
|
-
onMounted(onResize);
|
|
36
|
-
onUpdated(onResize);
|
|
13
|
+
const props = __props;
|
|
14
|
+
const prefixCls = getPrefixCls("auto-tooltip");
|
|
15
|
+
const ellipsisTooltipProps = computed(() => props.tooltipProps);
|
|
37
16
|
return (_ctx, _cache) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})], 16)]),
|
|
51
|
-
_: 3
|
|
52
|
-
}), showTooltip.value ? (openBlock(), createBlock(unref(Tooltip), normalizeProps(mergeProps({ key: 0 }, _objectSpread2({ content: text.value }, __props.tooltipProps))), {
|
|
53
|
-
default: withCtx(() => [createVNode(unref(ReuseContent))]),
|
|
54
|
-
_: 1
|
|
55
|
-
}, 16)) : (openBlock(), createBlock(unref(resize_observer_v2_default), {
|
|
56
|
-
key: 1,
|
|
57
|
-
onResize
|
|
58
|
-
}, {
|
|
59
|
-
default: withCtx(() => [createVNode(unref(ReuseContent))]),
|
|
60
|
-
_: 1
|
|
61
|
-
}))], 64);
|
|
17
|
+
var _props$tooltipProps;
|
|
18
|
+
return openBlock(), createBlock(unref(Ellipsis), mergeProps(_ctx.$attrs, {
|
|
19
|
+
class: unref(prefixCls),
|
|
20
|
+
tooltip: ellipsisTooltipProps.value
|
|
21
|
+
}), createSlots({
|
|
22
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
23
|
+
_: 2
|
|
24
|
+
}, [((_props$tooltipProps = props.tooltipProps) === null || _props$tooltipProps === void 0 ? void 0 : _props$tooltipProps.content) !== void 0 ? {
|
|
25
|
+
name: "tooltip",
|
|
26
|
+
fn: withCtx(() => [createTextVNode(toDisplayString(props.tooltipProps.content), 1)]),
|
|
27
|
+
key: "0"
|
|
28
|
+
} : void 0]), 1040, ["class", "tooltip"]);
|
|
62
29
|
};
|
|
63
30
|
}
|
|
64
31
|
}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useFormItem } from "../../_hooks/use-form-item.js";
|
|
2
2
|
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../../_utils/global-config.js";
|
|
4
|
+
import { omit } from "../../_utils/omit.js";
|
|
5
|
+
import Ellipsis from "../../ellipsis/index.js";
|
|
4
6
|
import { useFitWidth } from "../../_hooks/use-fit-width.js";
|
|
5
7
|
import { useSize } from "../../_hooks/use-size.js";
|
|
6
8
|
import { INPUT_EVENTS } from "../../_utils/constant.js";
|
|
7
|
-
import { omit } from "../../_utils/omit.js";
|
|
8
9
|
import pick from "../../_utils/pick.js";
|
|
9
|
-
import Ellipsis from "../../ellipsis/index.js";
|
|
10
10
|
import { useInput } from "../../_hooks/use-input.js";
|
|
11
11
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString, toRef, unref, useAttrs, withCtx } from "vue";
|
|
12
12
|
//#region components/_components/input-label/input-label.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -4,11 +4,11 @@ import { getPrefixCls } from "../../_utils/global-config.js";
|
|
|
4
4
|
import { isArray, isDayjs, isFunction, isNumber, isUndefined } from "../../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../icon-hover.js";
|
|
6
6
|
import IconClose from "../../icon/icon-close/index.js";
|
|
7
|
+
import Tooltip from "../../tooltip/index.js";
|
|
7
8
|
import feedback_icon_default from "../feedback-icon.js";
|
|
8
9
|
import { useFitWidth } from "../../_hooks/use-fit-width.js";
|
|
9
10
|
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../../_hooks/use-readonly-tip.js";
|
|
10
11
|
import { useSize } from "../../_hooks/use-size.js";
|
|
11
|
-
import Tooltip from "../../tooltip/index.js";
|
|
12
12
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toRef, toRefs, unref, useSlots, withCtx, withKeys } from "vue";
|
|
13
13
|
//#region components/_components/picker/input-range.vue?vue&type=script&setup=true&lang.ts
|
|
14
14
|
var _hoisted_1 = [
|
|
@@ -4,11 +4,11 @@ import { getPrefixCls } from "../../_utils/global-config.js";
|
|
|
4
4
|
import { isDayjs, isFunction } from "../../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../icon-hover.js";
|
|
6
6
|
import IconClose from "../../icon/icon-close/index.js";
|
|
7
|
+
import Tooltip from "../../tooltip/index.js";
|
|
7
8
|
import feedback_icon_default from "../feedback-icon.js";
|
|
8
9
|
import { useFitWidth } from "../../_hooks/use-fit-width.js";
|
|
9
10
|
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../../_hooks/use-readonly-tip.js";
|
|
10
11
|
import { useSize } from "../../_hooks/use-size.js";
|
|
11
|
-
import Tooltip from "../../tooltip/index.js";
|
|
12
12
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, toRef, toRefs, unref, useSlots, withCtx, withKeys } from "vue";
|
|
13
13
|
//#region components/_components/picker/input.vue?vue&type=script&setup=true&lang.ts
|
|
14
14
|
var _hoisted_1 = [
|
|
@@ -849,14 +849,6 @@
|
|
|
849
849
|
.sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag.sd-tag-custom-color .sd-icon-hover.sd-tag-icon-hover:hover::before {
|
|
850
850
|
background-color: rgba(255, 255, 255, 0.2);
|
|
851
851
|
}
|
|
852
|
-
.sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag.sd-select-view-tag-overflow {
|
|
853
|
-
flex-shrink: 1;
|
|
854
|
-
white-space: nowrap;
|
|
855
|
-
word-break: normal;
|
|
856
|
-
}
|
|
857
|
-
.sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag.sd-select-view-tag-overflow .sd-tag-text {
|
|
858
|
-
max-width: 100%;
|
|
859
|
-
}
|
|
860
852
|
.sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag.sd-select-view-tag-counter {
|
|
861
853
|
flex-shrink: 0;
|
|
862
854
|
white-space: nowrap;
|
|
@@ -899,37 +891,6 @@
|
|
|
899
891
|
visibility: hidden;
|
|
900
892
|
pointer-events: none;
|
|
901
893
|
}
|
|
902
|
-
.sd-select-view-multiple .sd-select-view-resize-observer {
|
|
903
|
-
position: absolute;
|
|
904
|
-
inset: 0;
|
|
905
|
-
display: block;
|
|
906
|
-
width: 100%;
|
|
907
|
-
height: 100%;
|
|
908
|
-
visibility: hidden;
|
|
909
|
-
pointer-events: none;
|
|
910
|
-
}
|
|
911
|
-
.sd-select-view-multiple .sd-select-view-measure {
|
|
912
|
-
position: absolute;
|
|
913
|
-
top: 0;
|
|
914
|
-
left: 0;
|
|
915
|
-
display: block;
|
|
916
|
-
width: 100%;
|
|
917
|
-
max-width: 100%;
|
|
918
|
-
overflow: hidden;
|
|
919
|
-
white-space: nowrap;
|
|
920
|
-
visibility: hidden;
|
|
921
|
-
pointer-events: none;
|
|
922
|
-
}
|
|
923
|
-
.sd-select-view-multiple .sd-select-view-measure .sd-select-view-tag {
|
|
924
|
-
display: inline-flex;
|
|
925
|
-
flex-shrink: 0;
|
|
926
|
-
}
|
|
927
|
-
.sd-select-view-multiple .sd-select-view-tag-ellipsis {
|
|
928
|
-
display: block;
|
|
929
|
-
min-width: 0;
|
|
930
|
-
max-width: 100%;
|
|
931
|
-
vertical-align: bottom;
|
|
932
|
-
}
|
|
933
894
|
.sd-select-view-multiple.sd-select-view-focus .sd-select-view-tag:not(.sd-tag-custom-color):not(.sd-tag-red):not(.sd-tag-orangered):not(.sd-tag-orange):not(.sd-tag-gold):not(.sd-tag-lime):not(.sd-tag-green):not(.sd-tag-cyan):not(.sd-tag-blue):not(.sd-tag-sdblue):not(.sd-tag-purple):not(.sd-tag-pinkpurple):not(.sd-tag-magenta) {
|
|
934
895
|
background-color: var(--sd-color-fill-2);
|
|
935
896
|
border-color: var(--sd-color-fill-2);
|
|
@@ -102,8 +102,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
102
102
|
}>, {
|
|
103
103
|
smooth: boolean;
|
|
104
104
|
direction: "horizontal" | "vertical";
|
|
105
|
-
offsetTop: number;
|
|
106
105
|
boundary: number | "center" | "end" | "start" | "nearest";
|
|
106
|
+
offsetTop: number;
|
|
107
107
|
lineLess: boolean;
|
|
108
108
|
affix: boolean;
|
|
109
109
|
changeHash: boolean;
|
package/es/anchor/index.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ declare const Anchor: {
|
|
|
55
55
|
}, import("vue").PublicProps, {
|
|
56
56
|
smooth: boolean;
|
|
57
57
|
direction: "horizontal" | "vertical";
|
|
58
|
-
offsetTop: number;
|
|
59
58
|
boundary: number | "center" | "end" | "start" | "nearest";
|
|
59
|
+
offsetTop: number;
|
|
60
60
|
lineLess: boolean;
|
|
61
61
|
affix: boolean;
|
|
62
62
|
changeHash: boolean;
|
|
@@ -116,8 +116,8 @@ declare const Anchor: {
|
|
|
116
116
|
}>, {}, {}, {}, {}, {
|
|
117
117
|
smooth: boolean;
|
|
118
118
|
direction: "horizontal" | "vertical";
|
|
119
|
-
offsetTop: number;
|
|
120
119
|
boundary: number | "center" | "end" | "start" | "nearest";
|
|
120
|
+
offsetTop: number;
|
|
121
121
|
lineLess: boolean;
|
|
122
122
|
affix: boolean;
|
|
123
123
|
changeHash: boolean;
|
|
@@ -177,8 +177,8 @@ declare const Anchor: {
|
|
|
177
177
|
}, string, {
|
|
178
178
|
smooth: boolean;
|
|
179
179
|
direction: "horizontal" | "vertical";
|
|
180
|
-
offsetTop: number;
|
|
181
180
|
boundary: number | "center" | "end" | "start" | "nearest";
|
|
181
|
+
offsetTop: number;
|
|
182
182
|
lineLess: boolean;
|
|
183
183
|
affix: boolean;
|
|
184
184
|
changeHash: boolean;
|
|
@@ -21,15 +21,15 @@ declare var __VLS_7: {
|
|
|
21
21
|
disabled?: boolean | undefined;
|
|
22
22
|
tagProps?: Record<string, unknown> | undefined;
|
|
23
23
|
} | undefined;
|
|
24
|
-
},
|
|
24
|
+
}, __VLS_56: {}, __VLS_71: {}, __VLS_74: {};
|
|
25
25
|
type __VLS_Slots = {} & {
|
|
26
26
|
option?: (props: typeof __VLS_7) => any;
|
|
27
27
|
} & {
|
|
28
|
-
footer?: (props: typeof
|
|
28
|
+
footer?: (props: typeof __VLS_56) => any;
|
|
29
29
|
} & {
|
|
30
|
-
prefix?: (props: typeof
|
|
30
|
+
prefix?: (props: typeof __VLS_71) => any;
|
|
31
31
|
} & {
|
|
32
|
-
suffix?: (props: typeof
|
|
32
|
+
suffix?: (props: typeof __VLS_74) => any;
|
|
33
33
|
};
|
|
34
34
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
35
35
|
modelValue: {
|
|
@@ -7,11 +7,12 @@ import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
|
7
7
|
import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
|
|
8
8
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
9
9
|
import Trigger from "../trigger/index.js";
|
|
10
|
+
import Ellipsis from "../ellipsis/index.js";
|
|
10
11
|
import Input from "../input/index.js";
|
|
11
12
|
import { getKeyFromValue } from "../select/utils.js";
|
|
12
13
|
import { useSelect } from "../select/hooks/use-select.js";
|
|
13
14
|
import select_dropdown_default from "../select/select-dropdown.js";
|
|
14
|
-
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toRef, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
15
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, toRef, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
15
16
|
import { createReusableTemplate } from "@vueuse/core";
|
|
16
17
|
//#region components/auto-complete/auto-complete.vue?vue&type=script&setup=true&lang.ts
|
|
17
18
|
var _hoisted_1 = [
|
|
@@ -88,7 +89,6 @@ var auto_complete_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
88
89
|
const slots = useSlots();
|
|
89
90
|
const [DefineOption, ReuseOption] = createReusableTemplate();
|
|
90
91
|
const prefixCls = getPrefixCls("auto-complete");
|
|
91
|
-
const ellipsisPrefixCls = getPrefixCls("ellipsis");
|
|
92
92
|
const optionPrefixCls = getPrefixCls("select-option");
|
|
93
93
|
const { mergedDisabled, eventHandlers } = useFormItem({ disabled: toRef(props, "disabled") });
|
|
94
94
|
const { mergedAllowClear } = useAllowClear(toRef(props, "allowClear"));
|
|
@@ -217,10 +217,10 @@ var auto_complete_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
217
217
|
onClick: ($event) => handleOptionClick(item, $event),
|
|
218
218
|
onMouseenter: ($event) => handleOptionMouseEnter(item),
|
|
219
219
|
onMouseleave: ($event) => handleOptionMouseLeave(item)
|
|
220
|
-
}, [createElementVNode("span", { class: normalizeClass(`${unref(optionPrefixCls)}-content`) }, [unref(slots).option && item.value ? renderSlot(_ctx.$slots, "option", { data: unref(optionInfoMap).get(item.key) }, void 0, void 0, 0) : (openBlock(),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
},
|
|
220
|
+
}, [createElementVNode("span", { class: normalizeClass(`${unref(optionPrefixCls)}-content`) }, [unref(slots).option && item.value ? renderSlot(_ctx.$slots, "option", { data: unref(optionInfoMap).get(item.key) }, void 0, void 0, 0) : (openBlock(), createBlock(unref(Ellipsis), { key: 1 }, {
|
|
221
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
222
|
+
_: 2
|
|
223
|
+
}, 1024))], 2)], 42, _hoisted_1)]),
|
|
224
224
|
_: 3
|
|
225
225
|
}), createVNode(unref(Trigger), mergeProps(mergedTriggerProps.value, { onPopupVisibleChange: handlePopupVisibleChange }), {
|
|
226
226
|
content: withCtx(() => [createVNode(select_dropdown_default, {
|
|
@@ -2,8 +2,8 @@ import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
|
2
2
|
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isNumber } from "../_utils/is.js";
|
|
5
|
-
import IconLoading from "../icon/icon-loading/index.js";
|
|
6
5
|
import resize_observer_v2_default from "../_components/resize-observer-v2.js";
|
|
6
|
+
import IconLoading from "../icon/icon-loading/index.js";
|
|
7
7
|
import { useIndex } from "../_hooks/use-index.js";
|
|
8
8
|
import IconImageClose from "../icon/icon-image-close/index.js";
|
|
9
9
|
import { avatarGroupInjectionKey } from "./context.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import bloom_menu_vue_vue_type_script_setup_true_lang_default from "./bloom-menu.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region components/bloom-menu/bloom-menu.vue
|
|
3
|
+
var bloom_menu_default = bloom_menu_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { bloom_menu_default as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Merge, UnknownRecord } from 'type-fest';
|
|
2
|
+
import type { HTMLAttributes, VNode } from 'vue';
|
|
3
|
+
import type { ButtonInstance } from '../button';
|
|
4
|
+
import type { BloomMenuItem, BloomMenuOffset } from './types';
|
|
5
|
+
type BloomMenuButtonProps = Merge<HTMLAttributes, ButtonInstance['$props']> & UnknownRecord;
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
items: readonly BloomMenuItem[];
|
|
8
|
+
modelValue?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
columns?: number;
|
|
11
|
+
title?: string;
|
|
12
|
+
triggerText?: string;
|
|
13
|
+
buttonProps?: BloomMenuButtonProps;
|
|
14
|
+
offset?: BloomMenuOffset;
|
|
15
|
+
closeAriaLabel?: string;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_Slots = {
|
|
18
|
+
trigger(props: {
|
|
19
|
+
open: () => void;
|
|
20
|
+
}): VNode[];
|
|
21
|
+
header(props: {
|
|
22
|
+
close: (restoreFocus?: boolean) => void;
|
|
23
|
+
}): VNode[];
|
|
24
|
+
icon(props: {
|
|
25
|
+
item: BloomMenuItem;
|
|
26
|
+
index: number;
|
|
27
|
+
}): VNode[];
|
|
28
|
+
item(props: {
|
|
29
|
+
item: BloomMenuItem;
|
|
30
|
+
index: number;
|
|
31
|
+
}): VNode[];
|
|
32
|
+
empty(): VNode[];
|
|
33
|
+
};
|
|
34
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
open: () => any;
|
|
36
|
+
close: () => any;
|
|
37
|
+
select: (item: BloomMenuItem, index: number) => any;
|
|
38
|
+
"update:modelValue": (value: boolean) => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
onOpen?: (() => any) | undefined;
|
|
41
|
+
onClose?: (() => any) | undefined;
|
|
42
|
+
onSelect?: ((item: BloomMenuItem, index: number) => any) | undefined;
|
|
43
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
44
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|