@sdata/web-vue 4.2.0 → 4.3.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/dist/sd.css +17 -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 +6 -22
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +6 -6
- package/es/auto-complete/index.d.ts +1 -17
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +4 -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 +17 -117
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -3
- package/es/index.scss +1 -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/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 +7 -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 +2 -10
- package/json/web-types.json +3 -53
- package/package.json +2 -1
- package/es/typography/utils/measure.d.ts +0 -6
- package/es/typography/utils/measure.js +0 -69
|
@@ -3,9 +3,8 @@ import { unFragment } from "../_utils/vue-utils.js";
|
|
|
3
3
|
import useMenuContext from "./hooks/use-menu-context.js";
|
|
4
4
|
import { getStyle } from "../_utils/style.js";
|
|
5
5
|
import sub_menu_default from "./sub-menu.js";
|
|
6
|
-
import { Fragment, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, onMounted, onUnmounted, openBlock, ref, renderList, resolveDynamicComponent,
|
|
6
|
+
import { Fragment, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, onMounted, onUnmounted, openBlock, ref, renderList, resolveDynamicComponent, useSlots, withCtx } from "vue";
|
|
7
7
|
import ResizeObserver from "resize-observer-polyfill";
|
|
8
|
-
import { createReusableTemplate } from "@vueuse/core";
|
|
9
8
|
//#region components/menu/overflow-wrap.vue?vue&type=script&setup=true&lang.ts
|
|
10
9
|
var OVERFLOW_THRESHOLD = 10;
|
|
11
10
|
var overflow_wrap_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "MenuOverflowWrap" }), {}, {
|
|
@@ -32,10 +31,9 @@ var overflow_wrap_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
32
31
|
});
|
|
33
32
|
const menuItems = computed(() => children.value.map((child, index) => cloneVNode(child, lastVisibleIndex.value !== null && index > lastVisibleIndex.value ? { class: overflowMenuItemClass } : { class: "" })));
|
|
34
33
|
const overflowMenuItems = computed(() => {
|
|
35
|
-
if (lastVisibleIndex.value === null) return
|
|
34
|
+
if (lastVisibleIndex.value === null) return [];
|
|
36
35
|
return children.value.slice(lastVisibleIndex.value + 1).map((child) => cloneVNode(child));
|
|
37
36
|
});
|
|
38
|
-
const [DefineOverflowSubMenu, ReuseOverflowSubMenu] = createReusableTemplate({ inheritAttrs: false });
|
|
39
37
|
function computeLastVisibleIndex() {
|
|
40
38
|
const wrapperElement = refWrapper.value;
|
|
41
39
|
if (!wrapperElement) return;
|
|
@@ -75,38 +73,34 @@ var overflow_wrap_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
75
73
|
(_refResizeObserver$va = refResizeObserver.value) === null || _refResizeObserver$va === void 0 || _refResizeObserver$va.disconnect();
|
|
76
74
|
});
|
|
77
75
|
return (_ctx, _cache) => {
|
|
78
|
-
return openBlock(), createElementBlock(
|
|
79
|
-
default: withCtx(({ children, mirror }) => [(openBlock(), createBlock(sub_menu_default, {
|
|
80
|
-
key: `__sd-menu-overflow-sub-menu${mirror ? "-mirror" : ""}`,
|
|
81
|
-
class: normalizeClass(mirror ? overflowSubMenuMirrorClass : overflowSubMenuClass)
|
|
82
|
-
}, {
|
|
83
|
-
title: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("span", null, "...", -1)])]),
|
|
84
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(children, (child) => {
|
|
85
|
-
var _child$key;
|
|
86
|
-
return openBlock(), createBlock(resolveDynamicComponent(child), { key: (_child$key = child.key) !== null && _child$key !== void 0 ? _child$key : void 0 });
|
|
87
|
-
}), 128))]),
|
|
88
|
-
_: 2
|
|
89
|
-
}, 1032, ["class"]))]),
|
|
90
|
-
_: 1
|
|
91
|
-
}), createElementVNode("div", {
|
|
76
|
+
return openBlock(), createElementBlock("div", {
|
|
92
77
|
ref_key: "refWrapper",
|
|
93
78
|
ref: refWrapper,
|
|
94
79
|
class: normalizeClass(`${overflowPrefixCls}-wrap`)
|
|
95
80
|
}, [
|
|
96
|
-
createVNode(
|
|
97
|
-
|
|
98
|
-
|
|
81
|
+
createVNode(sub_menu_default, {
|
|
82
|
+
key: "__sd-menu-overflow-sub-menu-mirror",
|
|
83
|
+
class: normalizeClass(overflowSubMenuMirrorClass)
|
|
84
|
+
}, {
|
|
85
|
+
title: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("span", null, "...", -1)])]),
|
|
86
|
+
_: 1
|
|
99
87
|
}),
|
|
100
88
|
(openBlock(true), createElementBlock(Fragment, null, renderList(menuItems.value, (item) => {
|
|
101
89
|
var _item$key;
|
|
102
90
|
return openBlock(), createBlock(resolveDynamicComponent(item), { key: (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : void 0 });
|
|
103
91
|
}), 128)),
|
|
104
|
-
overflowMenuItems.value ? (openBlock(), createBlock(
|
|
105
|
-
key:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
overflowMenuItems.value.length > 0 ? (openBlock(), createBlock(sub_menu_default, {
|
|
93
|
+
key: "__sd-menu-overflow-sub-menu",
|
|
94
|
+
class: normalizeClass(overflowSubMenuClass)
|
|
95
|
+
}, {
|
|
96
|
+
title: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("span", null, "...", -1)])]),
|
|
97
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(overflowMenuItems.value, (child) => {
|
|
98
|
+
var _child$key;
|
|
99
|
+
return openBlock(), createBlock(resolveDynamicComponent(child), { key: (_child$key = child.key) !== null && _child$key !== void 0 ? _child$key : void 0 });
|
|
100
|
+
}), 128))]),
|
|
101
|
+
_: 1
|
|
102
|
+
})) : createCommentVNode("", true)
|
|
103
|
+
], 2);
|
|
110
104
|
};
|
|
111
105
|
}
|
|
112
106
|
}));
|
package/es/menu/style/index.css
CHANGED
|
@@ -499,7 +499,10 @@
|
|
|
499
499
|
content: " ";
|
|
500
500
|
}
|
|
501
501
|
.sd-menu-overflow-wrap {
|
|
502
|
+
display: flex;
|
|
503
|
+
align-items: center;
|
|
502
504
|
width: 100%;
|
|
505
|
+
white-space: nowrap;
|
|
503
506
|
}
|
|
504
507
|
.sd-menu-overflow-sub-menu-mirror, .sd-menu-overflow-hidden-menu-item {
|
|
505
508
|
position: absolute !important;
|
|
@@ -592,7 +595,7 @@
|
|
|
592
595
|
color: inherit;
|
|
593
596
|
}
|
|
594
597
|
.sd-menu-pop-trigger.sd-trigger-position-bl {
|
|
595
|
-
|
|
598
|
+
margin-top: 14px;
|
|
596
599
|
}
|
|
597
600
|
.sd-menu-pop-trigger.sd-trigger-position-bl .sd-trigger-arrow {
|
|
598
601
|
z-index: 0;
|
|
@@ -600,7 +603,7 @@
|
|
|
600
603
|
border-left: 1px solid var(--sd-color-neutral-3);
|
|
601
604
|
}
|
|
602
605
|
.sd-menu-pop-trigger.sd-trigger-position-rt {
|
|
603
|
-
|
|
606
|
+
margin-left: 8px;
|
|
604
607
|
}
|
|
605
608
|
.sd-menu-pop-trigger.sd-trigger-position-rt .sd-trigger-arrow {
|
|
606
609
|
z-index: 0;
|
package/es/menu/style/index.scss
CHANGED
|
@@ -379,7 +379,10 @@ $token-vars: map.merge(meta.module-variables('dropdownToken'), meta.module-varia
|
|
|
379
379
|
// 水平菜单的动态折叠容器
|
|
380
380
|
&-overflow {
|
|
381
381
|
&-wrap {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
382
384
|
width: 100%;
|
|
385
|
+
white-space: nowrap;
|
|
383
386
|
}
|
|
384
387
|
|
|
385
388
|
&-sub-menu-mirror,
|
|
@@ -509,7 +512,7 @@ $token-vars: map.merge(meta.module-variables('dropdownToken'), meta.module-varia
|
|
|
509
512
|
// 弹出菜单浮层三角箭头
|
|
510
513
|
&-pop-trigger {
|
|
511
514
|
&.#{theme.$prefix}-trigger-position-bl {
|
|
512
|
-
|
|
515
|
+
margin-top: $menu-horizontal-padding-vertical;
|
|
513
516
|
|
|
514
517
|
.#{theme.$prefix}-trigger-arrow {
|
|
515
518
|
z-index: 0;
|
|
@@ -519,7 +522,7 @@ $token-vars: map.merge(meta.module-variables('dropdownToken'), meta.module-varia
|
|
|
519
522
|
}
|
|
520
523
|
|
|
521
524
|
&.#{theme.$prefix}-trigger-position-rt {
|
|
522
|
-
|
|
525
|
+
margin-left: $menu-vertical-padding-horizontal;
|
|
523
526
|
|
|
524
527
|
.#{theme.$prefix}-trigger-arrow {
|
|
525
528
|
z-index: 0;
|
package/es/modal/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import { isFunction } from "../_utils/is.js";
|
|
|
4
4
|
import { getSlotFunction } from "../_utils/vue-utils.js";
|
|
5
5
|
import { getOverlay } from "../_utils/dom.js";
|
|
6
6
|
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/asyncToGenerator.js";
|
|
7
|
-
import { MESSAGE_TYPES } from "../_utils/constant.js";
|
|
8
7
|
import { omit } from "../_utils/omit.js";
|
|
8
|
+
import { MESSAGE_TYPES } from "../_utils/constant.js";
|
|
9
9
|
import modal_default from "./modal.js";
|
|
10
10
|
import { createVNode, nextTick, render } from "vue";
|
|
11
11
|
//#region components/modal/index.ts
|
|
@@ -14,9 +14,9 @@ import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.142.0/helpers
|
|
|
14
14
|
import client_only_default from "../_components/client-only.js";
|
|
15
15
|
import usePopupManager from "../_hooks/use-popup-manager.js";
|
|
16
16
|
import { useTeleportContainer } from "../_hooks/use-teleport-container.js";
|
|
17
|
+
import Ellipsis from "../ellipsis/index.js";
|
|
17
18
|
import Button from "../button/index.js";
|
|
18
19
|
import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
|
|
19
|
-
import Ellipsis from "../ellipsis/index.js";
|
|
20
20
|
import { getFocusableElements, useFocusTrap } from "../_hooks/use-focus-trap.js";
|
|
21
21
|
import { useOverflow } from "../_hooks/use-overflow.js";
|
|
22
22
|
import { useDraggable } from "./hooks/use-draggable.js";
|
|
@@ -5,8 +5,8 @@ import { isNull, isObject, isString, isUndefined } from "../_utils/is.js";
|
|
|
5
5
|
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
6
6
|
import { useI18n } from "../locale/index.js";
|
|
7
7
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
8
|
-
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
9
8
|
import Tooltip from "../tooltip/index.js";
|
|
9
|
+
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
10
10
|
import IconFaceFrownFill from "../icon/icon-face-frown-fill/index.js";
|
|
11
11
|
import IconFaceMehFill from "../icon/icon-face-meh-fill/index.js";
|
|
12
12
|
import IconFaceSmileFill from "../icon/icon-face-smile-fill/index.js";
|
package/es/sd-vue.js
CHANGED
|
@@ -5,9 +5,11 @@ import { addI18nMessages, getLocale, useLocale } from "./locale/index.js";
|
|
|
5
5
|
import Alert from "./alert/index.js";
|
|
6
6
|
import anchor_link_default from "./anchor/anchor-link.js";
|
|
7
7
|
import Anchor from "./anchor/index.js";
|
|
8
|
-
import
|
|
8
|
+
import { InlineClamp, LineClamp, RichLineClamp, WrapClamp } from "./clamp/index.js";
|
|
9
9
|
import Trigger from "./trigger/index.js";
|
|
10
10
|
import Tooltip from "./tooltip/index.js";
|
|
11
|
+
import Ellipsis, { PerformantEllipsis } from "./ellipsis/index.js";
|
|
12
|
+
import input_group_default from "./input/input-group.js";
|
|
11
13
|
import input_password_default from "./input/input-password.js";
|
|
12
14
|
import button_group_default from "./button/button-group.js";
|
|
13
15
|
import Button from "./button/index.js";
|
|
@@ -23,7 +25,6 @@ import Avatar from "./avatar/index.js";
|
|
|
23
25
|
import BackTop from "./back-top/index.js";
|
|
24
26
|
import NumberFlow, { NumberFlowGroup } from "./number-flow/index.js";
|
|
25
27
|
import Badge from "./badge/index.js";
|
|
26
|
-
import Ellipsis, { PerformantEllipsis } from "./ellipsis/index.js";
|
|
27
28
|
import Link from "./link/index.js";
|
|
28
29
|
import Popconfirm from "./popconfirm/index.js";
|
|
29
30
|
import Space from "./space/index.js";
|
|
@@ -191,6 +192,10 @@ var components = {
|
|
|
191
192
|
AutoComplete,
|
|
192
193
|
Cascader,
|
|
193
194
|
Checkbox,
|
|
195
|
+
LineClamp,
|
|
196
|
+
InlineClamp,
|
|
197
|
+
RichLineClamp,
|
|
198
|
+
WrapClamp,
|
|
194
199
|
DatePicker,
|
|
195
200
|
Form,
|
|
196
201
|
JsonForm,
|
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
import { useI18n } from "../locale/index.js";
|
|
4
|
-
import IconEye from "../icon/icon-eye/index.js";
|
|
5
|
-
import IconEyeInvisible from "../icon/icon-eye-invisible/index.js";
|
|
6
4
|
import Tooltip from "../tooltip/index.js";
|
|
7
5
|
import { PerformantEllipsis } from "../ellipsis/index.js";
|
|
6
|
+
import IconEye from "../icon/icon-eye/index.js";
|
|
7
|
+
import IconEyeInvisible from "../icon/icon-eye-invisible/index.js";
|
|
8
8
|
import Copy from "../copy/index.js";
|
|
9
9
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
10
10
|
//#region components/secret/secret.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -7,13 +7,13 @@ import virtual_list_default from "../_components/virtual-list/index.js";
|
|
|
7
7
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
8
8
|
import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
|
|
9
9
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
10
|
-
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
11
10
|
import Trigger from "../trigger/index.js";
|
|
12
11
|
import Tooltip from "../tooltip/index.js";
|
|
12
|
+
import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
|
|
13
|
+
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
13
14
|
import { getKeyFromValue, hasEmptyStringKey, isGroupOptionInfo, isValidOption } from "./utils.js";
|
|
14
15
|
import { useSelect } from "./hooks/use-select.js";
|
|
15
16
|
import select_dropdown_default from "./select-dropdown.js";
|
|
16
|
-
import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
|
|
17
17
|
import Checkbox from "../checkbox/index.js";
|
|
18
18
|
import { debounce } from "../_utils/debounce.js";
|
|
19
19
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
@@ -2,8 +2,8 @@ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/es
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import IconClose from "../icon/icon-close/index.js";
|
|
4
4
|
import { useI18n } from "../locale/index.js";
|
|
5
|
-
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
6
5
|
import Tooltip from "../tooltip/index.js";
|
|
6
|
+
import { isReadonlyModificationKey, useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
7
7
|
import Button from "../button/index.js";
|
|
8
8
|
import Textarea from "../textarea/index.js";
|
|
9
9
|
import RichTextEditor from "../rich-text-editor/index.js";
|
package/es/table/index.d.ts
CHANGED
|
@@ -174,9 +174,9 @@ declare const Table: {
|
|
|
174
174
|
}>> & Readonly<{
|
|
175
175
|
onChange?: ((_data: import("./interface").TableData[], _extra: import("./interface").TableChangeExtra, _currentData: import("./interface").TableData[]) => any) | undefined;
|
|
176
176
|
onSelect?: ((_rowKeys: (string | number)[], _rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
177
|
+
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
177
178
|
onPageSizeChange?: ((_pageSize: number) => any) | undefined;
|
|
178
179
|
onPageChange?: ((_page: number) => any) | undefined;
|
|
179
|
-
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
180
180
|
"onUpdate:selectedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
181
181
|
"onUpdate:expandedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
182
182
|
onSelectAll?: ((_checked: boolean) => any) | undefined;
|
|
@@ -207,9 +207,9 @@ declare const Table: {
|
|
|
207
207
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
208
208
|
change: (_data: import("./interface").TableData[], _extra: import("./interface").TableChangeExtra, _currentData: import("./interface").TableData[]) => void;
|
|
209
209
|
select: (_rowKeys: (string | number)[], _rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
210
|
+
expand: (_rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
210
211
|
pageSizeChange: (_pageSize: number) => void;
|
|
211
212
|
pageChange: (_page: number) => void;
|
|
212
|
-
expand: (_rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
213
213
|
"update:selectedKeys": (_rowKeys: (string | number)[]) => void;
|
|
214
214
|
"update:expandedKeys": (_rowKeys: (string | number)[]) => void;
|
|
215
215
|
selectAll: (_checked: boolean) => void;
|
|
@@ -430,9 +430,9 @@ declare const Table: {
|
|
|
430
430
|
}>> & Readonly<{
|
|
431
431
|
onChange?: ((_data: import("./interface").TableData[], _extra: import("./interface").TableChangeExtra, _currentData: import("./interface").TableData[]) => any) | undefined;
|
|
432
432
|
onSelect?: ((_rowKeys: (string | number)[], _rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
433
|
+
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
433
434
|
onPageSizeChange?: ((_pageSize: number) => any) | undefined;
|
|
434
435
|
onPageChange?: ((_page: number) => any) | undefined;
|
|
435
|
-
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
436
436
|
"onUpdate:selectedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
437
437
|
"onUpdate:expandedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
438
438
|
onSelectAll?: ((_checked: boolean) => any) | undefined;
|
|
@@ -660,9 +660,9 @@ declare const Table: {
|
|
|
660
660
|
}>> & Readonly<{
|
|
661
661
|
onChange?: ((_data: import("./interface").TableData[], _extra: import("./interface").TableChangeExtra, _currentData: import("./interface").TableData[]) => any) | undefined;
|
|
662
662
|
onSelect?: ((_rowKeys: (string | number)[], _rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
663
|
+
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
663
664
|
onPageSizeChange?: ((_pageSize: number) => any) | undefined;
|
|
664
665
|
onPageChange?: ((_page: number) => any) | undefined;
|
|
665
|
-
onExpand?: ((_rowKey: string | number, _record: import("./interface").TableData) => any) | undefined;
|
|
666
666
|
"onUpdate:selectedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
667
667
|
"onUpdate:expandedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
668
668
|
onSelectAll?: ((_checked: boolean) => any) | undefined;
|
|
@@ -693,9 +693,9 @@ declare const Table: {
|
|
|
693
693
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
694
694
|
change: (_data: import("./interface").TableData[], _extra: import("./interface").TableChangeExtra, _currentData: import("./interface").TableData[]) => void;
|
|
695
695
|
select: (_rowKeys: (string | number)[], _rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
696
|
+
expand: (_rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
696
697
|
pageSizeChange: (_pageSize: number) => void;
|
|
697
698
|
pageChange: (_page: number) => void;
|
|
698
|
-
expand: (_rowKey: string | number, _record: import("./interface").TableData) => void;
|
|
699
699
|
"update:selectedKeys": (_rowKeys: (string | number)[]) => void;
|
|
700
700
|
"update:expandedKeys": (_rowKeys: (string | number)[]) => void;
|
|
701
701
|
selectAll: (_checked: boolean) => void;
|
|
@@ -788,9 +788,9 @@ declare const Table: {
|
|
|
788
788
|
rowIndex?: number;
|
|
789
789
|
record?: import("./interface").TableDataWithRaw;
|
|
790
790
|
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
791
|
+
expand: boolean;
|
|
791
792
|
empty: boolean;
|
|
792
793
|
checked: boolean;
|
|
793
|
-
expand: boolean;
|
|
794
794
|
record: import("./interface").TableDataWithRaw;
|
|
795
795
|
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
796
796
|
P: {};
|
|
@@ -806,9 +806,9 @@ declare const Table: {
|
|
|
806
806
|
rowIndex?: number;
|
|
807
807
|
record?: import("./interface").TableDataWithRaw;
|
|
808
808
|
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
809
|
+
expand: boolean;
|
|
809
810
|
empty: boolean;
|
|
810
811
|
checked: boolean;
|
|
811
|
-
expand: boolean;
|
|
812
812
|
record: import("./interface").TableDataWithRaw;
|
|
813
813
|
}>;
|
|
814
814
|
__isFragment?: never;
|
|
@@ -821,9 +821,9 @@ declare const Table: {
|
|
|
821
821
|
rowIndex?: number;
|
|
822
822
|
record?: import("./interface").TableDataWithRaw;
|
|
823
823
|
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
824
|
+
expand: boolean;
|
|
824
825
|
empty: boolean;
|
|
825
826
|
checked: boolean;
|
|
826
|
-
expand: boolean;
|
|
827
827
|
record: import("./interface").TableDataWithRaw;
|
|
828
828
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
829
829
|
$slots: {
|
|
@@ -15,9 +15,9 @@ type __VLS_Slots = {
|
|
|
15
15
|
}) => VNode[];
|
|
16
16
|
};
|
|
17
17
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
expand: boolean;
|
|
18
19
|
empty: boolean;
|
|
19
20
|
checked: boolean;
|
|
20
|
-
expand: boolean;
|
|
21
21
|
record: TableDataWithRaw;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/es/table/table.vue.d.ts
CHANGED
|
@@ -182,9 +182,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
182
182
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
183
183
|
change: (_data: TableData[], _extra: TableChangeExtra, _currentData: TableData[]) => void;
|
|
184
184
|
select: (_rowKeys: (string | number)[], _rowKey: string | number, _record: TableData) => void;
|
|
185
|
+
expand: (_rowKey: string | number, _record: TableData) => void;
|
|
185
186
|
pageSizeChange: (_pageSize: number) => void;
|
|
186
187
|
pageChange: (_page: number) => void;
|
|
187
|
-
expand: (_rowKey: string | number, _record: TableData) => void;
|
|
188
188
|
"update:selectedKeys": (_rowKeys: (string | number)[]) => void;
|
|
189
189
|
"update:expandedKeys": (_rowKeys: (string | number)[]) => void;
|
|
190
190
|
selectAll: (_checked: boolean) => void;
|
|
@@ -368,9 +368,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
368
368
|
}>> & Readonly<{
|
|
369
369
|
onChange?: ((_data: TableData[], _extra: TableChangeExtra, _currentData: TableData[]) => any) | undefined;
|
|
370
370
|
onSelect?: ((_rowKeys: (string | number)[], _rowKey: string | number, _record: TableData) => any) | undefined;
|
|
371
|
+
onExpand?: ((_rowKey: string | number, _record: TableData) => any) | undefined;
|
|
371
372
|
onPageSizeChange?: ((_pageSize: number) => any) | undefined;
|
|
372
373
|
onPageChange?: ((_page: number) => any) | undefined;
|
|
373
|
-
onExpand?: ((_rowKey: string | number, _record: TableData) => any) | undefined;
|
|
374
374
|
"onUpdate:selectedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
375
375
|
"onUpdate:expandedKeys"?: ((_rowKeys: (string | number)[]) => any) | undefined;
|
|
376
376
|
onSelectAll?: ((_checked: boolean) => any) | undefined;
|
|
@@ -5,9 +5,9 @@ import icon_hover_default from "../_components/icon-hover.js";
|
|
|
5
5
|
import { isActivationKey } from "../_utils/keyboard.js";
|
|
6
6
|
import IconClose from "../icon/icon-close/index.js";
|
|
7
7
|
import { useI18n } from "../locale/index.js";
|
|
8
|
+
import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
|
|
8
9
|
import IconLoading from "../icon/icon-loading/index.js";
|
|
9
10
|
import { useSize } from "../_hooks/use-size.js";
|
|
10
|
-
import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
|
|
11
11
|
import { extractColorsFromGradient, isGradientString } from "../_utils/color.js";
|
|
12
12
|
import { TAG_COLORS } from "./interface.js";
|
|
13
13
|
import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, inject, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useSlots, withCtx, withModifiers } from "vue";
|
package/es/tag-group/index.d.ts
CHANGED
|
@@ -33,10 +33,8 @@ declare const TagGroup: {
|
|
|
33
33
|
label: string | number;
|
|
34
34
|
value: string | number;
|
|
35
35
|
index: number;
|
|
36
|
-
itemClass:
|
|
37
|
-
|
|
38
|
-
})[];
|
|
39
|
-
itemStyle: import("vue").CSSProperties | undefined;
|
|
36
|
+
itemClass: string;
|
|
37
|
+
itemStyle: undefined;
|
|
40
38
|
isOverflow: boolean;
|
|
41
39
|
measure: boolean;
|
|
42
40
|
}) => any;
|
|
@@ -47,8 +45,8 @@ declare const TagGroup: {
|
|
|
47
45
|
}) => any;
|
|
48
46
|
} & {
|
|
49
47
|
counter?: (props: {
|
|
50
|
-
label: string
|
|
51
|
-
value: string
|
|
48
|
+
label: string;
|
|
49
|
+
value: string;
|
|
52
50
|
hiddenCount: number;
|
|
53
51
|
measure: boolean;
|
|
54
52
|
counterClass: string;
|
|
@@ -39,6 +39,12 @@
|
|
|
39
39
|
display: flex;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
|
+
.sd-tag-group-inner[data-part=content], .sd-tag-group-inner [data-part=content] {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
gap: 4px;
|
|
45
|
+
align-items: center;
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
}
|
|
42
48
|
.sd-tag-group-popover {
|
|
43
49
|
flex-wrap: wrap;
|
|
44
50
|
max-width: 320px;
|
|
@@ -58,35 +64,6 @@
|
|
|
58
64
|
.sd-tag-group-counter-content {
|
|
59
65
|
max-width: 100%;
|
|
60
66
|
}
|
|
61
|
-
.sd-tag-group-item-content-overflow {
|
|
62
|
-
min-width: 0;
|
|
63
|
-
}
|
|
64
67
|
.sd-tag-group-item-content > .sd-tag, .sd-tag-group-counter-content > .sd-tag, .sd-tag-group-item-content > .sd-link, .sd-tag-group-counter-content > .sd-link, .sd-tag-group-item-content > a, .sd-tag-group-counter-content > a, .sd-tag-group-item-content > span, .sd-tag-group-counter-content > span {
|
|
65
68
|
max-width: 100%;
|
|
66
|
-
}
|
|
67
|
-
.sd-tag-group-item-ellipsis {
|
|
68
|
-
max-width: 100%;
|
|
69
|
-
}
|
|
70
|
-
.sd-tag-group-measure {
|
|
71
|
-
position: absolute;
|
|
72
|
-
top: 0;
|
|
73
|
-
left: 0;
|
|
74
|
-
z-index: -1;
|
|
75
|
-
display: inline-flex;
|
|
76
|
-
gap: 4px;
|
|
77
|
-
align-items: center;
|
|
78
|
-
height: 0;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
white-space: nowrap;
|
|
81
|
-
visibility: hidden;
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
}
|
|
84
|
-
.sd-tag-group-measure .sd-tag-group-item {
|
|
85
|
-
flex: 0 0 auto;
|
|
86
|
-
max-width: none;
|
|
87
|
-
}
|
|
88
|
-
.sd-tag-group-resize-observer {
|
|
89
|
-
position: absolute;
|
|
90
|
-
inset: 0;
|
|
91
|
-
pointer-events: none;
|
|
92
69
|
}
|
|
@@ -37,6 +37,15 @@ $link-prefix-cls: string.unquote('#{theme.$prefix}-link');
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// WrapClamp 在根节点内注入一层 [data-part='content'] 包裹,gap 需要作用到这一层
|
|
41
|
+
&-inner[data-part='content'],
|
|
42
|
+
&-inner [data-part='content'] {
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
gap: $tag-group-gap;
|
|
45
|
+
align-items: center;
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
&-popover {
|
|
41
50
|
flex-wrap: wrap;
|
|
42
51
|
max-width: $tag-group-popover-max-width;
|
|
@@ -61,10 +70,6 @@ $link-prefix-cls: string.unquote('#{theme.$prefix}-link');
|
|
|
61
70
|
max-width: 100%;
|
|
62
71
|
}
|
|
63
72
|
|
|
64
|
-
&-item-content-overflow {
|
|
65
|
-
min-width: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
73
|
&-item-content > .#{$tag-prefix-cls},
|
|
69
74
|
&-counter-content > .#{$tag-prefix-cls},
|
|
70
75
|
&-item-content > .#{$link-prefix-cls},
|
|
@@ -75,34 +80,4 @@ $link-prefix-cls: string.unquote('#{theme.$prefix}-link');
|
|
|
75
80
|
&-counter-content > span {
|
|
76
81
|
max-width: 100%;
|
|
77
82
|
}
|
|
78
|
-
|
|
79
|
-
&-item-ellipsis {
|
|
80
|
-
max-width: 100%;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&-measure {
|
|
84
|
-
position: absolute;
|
|
85
|
-
top: 0;
|
|
86
|
-
left: 0;
|
|
87
|
-
z-index: -1;
|
|
88
|
-
display: inline-flex;
|
|
89
|
-
gap: $tag-group-gap;
|
|
90
|
-
align-items: center;
|
|
91
|
-
height: 0;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
white-space: nowrap;
|
|
94
|
-
visibility: hidden;
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&-measure &-item {
|
|
99
|
-
flex: 0 0 auto;
|
|
100
|
-
max-width: none;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&-resize-observer {
|
|
104
|
-
position: absolute;
|
|
105
|
-
inset: 0;
|
|
106
|
-
pointer-events: none;
|
|
107
|
-
}
|
|
108
83
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue';
|
|
2
1
|
import type { TagGroupObjectOption, TagGroupOption, TagGroupProps } from './interface';
|
|
3
2
|
declare var __VLS_13: {
|
|
4
3
|
data: TagGroupObjectOption;
|
|
@@ -6,30 +5,28 @@ declare var __VLS_13: {
|
|
|
6
5
|
label: string | number;
|
|
7
6
|
value: string | number;
|
|
8
7
|
index: number;
|
|
9
|
-
itemClass:
|
|
10
|
-
|
|
11
|
-
})[];
|
|
12
|
-
itemStyle: CSSProperties | undefined;
|
|
8
|
+
itemClass: string;
|
|
9
|
+
itemStyle: undefined;
|
|
13
10
|
isOverflow: boolean;
|
|
14
11
|
measure: boolean;
|
|
15
12
|
}, __VLS_21: {
|
|
16
13
|
data: TagGroupObjectOption;
|
|
17
14
|
option: TagGroupObjectOption;
|
|
18
|
-
},
|
|
19
|
-
label: string
|
|
20
|
-
value: string
|
|
15
|
+
}, __VLS_42: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
21
18
|
hiddenCount: number;
|
|
22
19
|
measure: boolean;
|
|
23
20
|
counterClass: string;
|
|
24
|
-
},
|
|
21
|
+
}, __VLS_55: {};
|
|
25
22
|
type __VLS_Slots = {} & {
|
|
26
23
|
item?: (props: typeof __VLS_13) => any;
|
|
27
24
|
} & {
|
|
28
25
|
label?: (props: typeof __VLS_21) => any;
|
|
29
26
|
} & {
|
|
30
|
-
counter?: (props: typeof
|
|
27
|
+
counter?: (props: typeof __VLS_42) => any;
|
|
31
28
|
} & {
|
|
32
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_55) => any;
|
|
33
30
|
};
|
|
34
31
|
declare const __VLS_base: import("vue").DefineComponent<TagGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagGroupProps> & Readonly<{}>, {
|
|
35
32
|
options: TagGroupOption[];
|