@sdata/web-vue 4.2.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.
Files changed (94) hide show
  1. package/dist/sd.css +17 -117
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +17 -50
  4. package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +2 -2
  5. package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
  7. package/es/_components/select-view/style/index.css +0 -39
  8. package/es/anchor/anchor.vue.d.ts +1 -1
  9. package/es/anchor/index.d.ts +3 -3
  10. package/es/auto-complete/auto-complete.vue.d.ts +4 -4
  11. package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +6 -6
  12. package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/es/button/button.vue_vue_type_script_setup_true_lang.js +1 -1
  14. package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +1 -1
  15. package/es/cascader/cascader-panel.vue.d.ts +1 -1
  16. package/es/cascader/cascader.vue.d.ts +1 -1
  17. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/es/clamp/index.d.ts +212 -0
  19. package/es/clamp/index.js +15 -0
  20. package/es/clamp/style/css.js +1 -0
  21. package/es/clamp/style/index.css +0 -0
  22. package/es/clamp/style/index.d.ts +1 -0
  23. package/es/clamp/style/index.js +1 -0
  24. package/es/clamp/style/index.scss +1 -0
  25. package/es/clamp/style/token.scss +1 -0
  26. package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/es/components.d.ts +4 -0
  28. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +2 -2
  29. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  30. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/es/ellipsis/ellipsis.vue.d.ts +8 -15
  32. package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +113 -118
  33. package/es/ellipsis/index.d.ts +14 -16
  34. package/es/ellipsis/performant-ellipsis.vue.d.ts +3 -5
  35. package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -24
  36. package/es/ellipsis/style/index.css +0 -2
  37. package/es/ellipsis/style/index.scss +3 -2
  38. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +1 -1
  39. package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
  40. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
  41. package/es/index.css +17 -117
  42. package/es/index.d.ts +2 -0
  43. package/es/index.js +4 -3
  44. package/es/index.scss +1 -0
  45. package/es/input/input.vue_vue_type_script_setup_true_lang.js +2 -2
  46. package/es/input-tag/index.d.ts +0 -4
  47. package/es/input-tag/input-tag.vue.d.ts +3 -7
  48. package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +85 -157
  49. package/es/input-tag/style/index.css +6 -39
  50. package/es/input-tag/style/index.scss +7 -0
  51. package/es/input-tag/style/input-tag.scss +0 -45
  52. package/es/link/link.vue_vue_type_script_setup_true_lang.js +2 -2
  53. package/es/list/index.d.ts +3 -3
  54. package/es/list/list.vue.d.ts +1 -1
  55. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +3 -3
  56. package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +21 -27
  57. package/es/menu/style/index.css +5 -2
  58. package/es/menu/style/index.scss +5 -2
  59. package/es/modal/index.js +1 -1
  60. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +1 -1
  61. package/es/popover/style/index.css +0 -1
  62. package/es/popover/style/index.scss +0 -1
  63. package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +1 -1
  64. package/es/sd-vue.js +7 -2
  65. package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +2 -2
  66. package/es/select/select.vue_vue_type_script_setup_true_lang.js +2 -2
  67. package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
  68. package/es/table/index.d.ts +8 -8
  69. package/es/table/table-tr.vue.d.ts +1 -1
  70. package/es/table/table.vue.d.ts +2 -2
  71. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +1 -1
  72. package/es/tag-group/index.d.ts +4 -6
  73. package/es/tag-group/style/index.css +6 -29
  74. package/es/tag-group/style/index.scss +9 -34
  75. package/es/tag-group/tag-group.vue.d.ts +8 -11
  76. package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +91 -272
  77. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +2 -2
  78. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
  79. package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
  80. package/es/tree/tree.vue.d.ts +12 -12
  81. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +1 -1
  82. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +2 -2
  83. package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +3 -3
  84. package/es/typography/base.vue.d.ts +15 -15
  85. package/es/typography/base.vue_vue_type_script_setup_true_lang.js +93 -164
  86. package/es/typography/interface.d.ts +1 -2
  87. package/es/typography/style/index.css +0 -5
  88. package/es/typography/style/index.scss +0 -7
  89. package/json/vetur-attributes.json +0 -20
  90. package/json/vetur-tags.json +2 -10
  91. package/json/web-types.json +3 -53
  92. package/package.json +2 -1
  93. package/es/typography/utils/measure.d.ts +0 -6
  94. 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 resize_observer_v2_default from "../resize-observer-v2.js";
4
- import Tooltip from "../../tooltip/index.js";
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 [DefineContent, ReuseContent] = createReusableTemplate();
16
- const prefix = getPrefixCls("auto-tooltip");
17
- const containerRef = ref(null);
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
- return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(DefineContent), null, {
39
- default: withCtx(() => [createElementVNode("span", mergeProps({
40
- ref_key: "containerRef",
41
- ref: containerRef,
42
- class: unref(prefix)
43
- }, _ctx.$attrs), [createVNode(unref(resize_observer_v2_default), { onResize }, {
44
- default: withCtx(() => [createElementVNode("span", {
45
- ref_key: "contentRef",
46
- ref: contentRef,
47
- class: normalizeClass(`${unref(prefix)}-content`)
48
- }, [renderSlot(_ctx.$slots, "default")], 2)]),
49
- _: 3
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;
@@ -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
- }, __VLS_50: {}, __VLS_65: {}, __VLS_68: {};
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 __VLS_50) => any;
28
+ footer?: (props: typeof __VLS_56) => any;
29
29
  } & {
30
- prefix?: (props: typeof __VLS_65) => any;
30
+ prefix?: (props: typeof __VLS_71) => any;
31
31
  } & {
32
- suffix?: (props: typeof __VLS_68) => any;
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(), createElementBlock("span", {
221
- key: 1,
222
- class: normalizeClass([unref(ellipsisPrefixCls), `${unref(ellipsisPrefixCls)}--single-line`])
223
- }, [createElementVNode("span", { class: normalizeClass(`${unref(ellipsisPrefixCls)}-content`) }, toDisplayString(item.label), 3)], 2))], 2)], 42, _hoisted_1)]),
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";
@@ -3,9 +3,9 @@ import { configProviderInjectionKey } from "../config-provider/context.js";
3
3
  import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/objectSpread2.js";
4
4
  import { getPrefixCls } from "../_utils/global-config.js";
5
5
  import { isString } from "../_utils/is.js";
6
+ import Tooltip from "../tooltip/index.js";
6
7
  import IconLoading from "../icon/icon-loading/index.js";
7
8
  import { useSize } from "../_hooks/use-size.js";
8
- import Tooltip from "../tooltip/index.js";
9
9
  import { buttonGroupInjectionKey } from "./context.js";
10
10
  import { cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, onMounted, onUpdated, openBlock, ref, renderSlot, resolveDynamicComponent, toRefs, unref, useSlots, withCtx } from "vue";
11
11
  //#region components/button/button.vue?vue&type=script&setup=true&lang.ts
@@ -1,8 +1,8 @@
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 { isFunction } from "../_utils/is.js";
4
- import IconLoading from "../icon/icon-loading/index.js";
5
4
  import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
5
+ import IconLoading from "../icon/icon-loading/index.js";
6
6
  import Checkbox from "../checkbox/index.js";
7
7
  import Radio from "../radio/index.js";
8
8
  import IconRight from "../icon/icon-right/index.js";
@@ -14,8 +14,8 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderPanelProps, {},
14
14
  options: CascaderOption[];
15
15
  ellipsis: boolean | "performant-ellipsis";
16
16
  multiple: boolean;
17
- valueKey: string;
18
17
  expandTrigger: import("./types").CascaderExpandTrigger;
18
+ valueKey: string;
19
19
  checkStrictly: boolean;
20
20
  pathMode: boolean;
21
21
  expandChild: boolean;
@@ -63,12 +63,12 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {
63
63
  error: boolean;
64
64
  readonly: boolean | string;
65
65
  defaultPopupVisible: boolean;
66
+ expandTrigger: import("./types").CascaderExpandTrigger;
66
67
  allowClear: boolean;
67
68
  fitWidth: boolean;
68
69
  maxWFull: boolean;
69
70
  loading: boolean;
70
71
  valueKey: string;
71
- expandTrigger: import("./types").CascaderExpandTrigger;
72
72
  checkStrictly: boolean;
73
73
  pathMode: boolean;
74
74
  showPath: boolean;
@@ -6,9 +6,9 @@ import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
6
6
  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
- import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
10
9
  import Trigger from "../trigger/index.js";
11
10
  import Tooltip from "../tooltip/index.js";
11
+ import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
12
12
  import { debounce } from "../_utils/debounce.js";
13
13
  import select_view_default from "../_components/select-view/select-view.js";
14
14
  import { useAllowSearch } from "../_hooks/use-allow-search.js";
@@ -0,0 +1,212 @@
1
+ import type * as VueClamp from 'vue-clamp';
2
+ import { InlineClamp as _InlineClamp, LineClamp as _LineClamp, RichLineClamp as _RichLineClamp } from 'vue-clamp';
3
+ import type { SFCWithInstall } from '../_utils/types';
4
+ export declare const LineClamp: SFCWithInstall<{
5
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
6
+ text?: string | undefined;
7
+ ellipsis?: string | undefined;
8
+ as?: string | undefined;
9
+ maxLines?: number | undefined;
10
+ maxHeight?: VueClamp.ClampLength | undefined;
11
+ location?: VueClamp.LineClampLocation | undefined;
12
+ boundary?: VueClamp.ClampBoundary | undefined;
13
+ } & {
14
+ expanded?: NonNullable<VueClamp.LineClampProps["expanded"]>;
15
+ }> & Readonly<{
16
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
17
+ onClampchange?: (value: boolean) => any;
18
+ }>, {
19
+ expand: () => void;
20
+ collapse: () => void;
21
+ toggle: () => void;
22
+ readonly clamped: boolean;
23
+ readonly expanded: NonNullable<boolean | undefined>;
24
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ "update:expanded": (value: NonNullable<boolean | undefined>) => any;
26
+ clampchange: (value: boolean) => any;
27
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
28
+ P: {};
29
+ B: {};
30
+ D: {};
31
+ C: {};
32
+ M: {};
33
+ Defaults: {};
34
+ }, Readonly<{
35
+ text?: string | undefined;
36
+ ellipsis?: string | undefined;
37
+ as?: string | undefined;
38
+ maxLines?: number | undefined;
39
+ maxHeight?: VueClamp.ClampLength | undefined;
40
+ location?: VueClamp.LineClampLocation | undefined;
41
+ boundary?: VueClamp.ClampBoundary | undefined;
42
+ } & {
43
+ expanded?: NonNullable<VueClamp.LineClampProps["expanded"]>;
44
+ }> & Readonly<{
45
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
46
+ onClampchange?: (value: boolean) => any;
47
+ }>, {
48
+ expand: () => void;
49
+ collapse: () => void;
50
+ toggle: () => void;
51
+ readonly clamped: boolean;
52
+ readonly expanded: NonNullable<boolean | undefined>;
53
+ }, {}, {}, {}, {}>;
54
+ __isFragment?: never;
55
+ __isTeleport?: never;
56
+ __isSuspense?: never;
57
+ } & import("vue").ComponentOptionsBase<Readonly<{
58
+ text?: string | undefined;
59
+ ellipsis?: string | undefined;
60
+ as?: string | undefined;
61
+ maxLines?: number | undefined;
62
+ maxHeight?: VueClamp.ClampLength | undefined;
63
+ location?: VueClamp.LineClampLocation | undefined;
64
+ boundary?: VueClamp.ClampBoundary | undefined;
65
+ } & {
66
+ expanded?: NonNullable<VueClamp.LineClampProps["expanded"]>;
67
+ }> & Readonly<{
68
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
69
+ onClampchange?: (value: boolean) => any;
70
+ }>, {
71
+ expand: () => void;
72
+ collapse: () => void;
73
+ toggle: () => void;
74
+ readonly clamped: boolean;
75
+ readonly expanded: NonNullable<boolean | undefined>;
76
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
77
+ "update:expanded": (value: NonNullable<boolean | undefined>) => any;
78
+ clampchange: (value: boolean) => any;
79
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
80
+ $slots: VueClamp.LineClampSlots;
81
+ })>;
82
+ export declare const RichLineClamp: SFCWithInstall<{
83
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
84
+ ellipsis?: string | undefined;
85
+ html: string;
86
+ as?: string | undefined;
87
+ maxLines?: number | undefined;
88
+ maxHeight?: VueClamp.ClampLength | undefined;
89
+ boundary?: VueClamp.ClampBoundary | undefined;
90
+ } & {
91
+ expanded?: NonNullable<VueClamp.RichLineClampProps["expanded"]>;
92
+ }> & Readonly<{
93
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
94
+ onClampchange?: (value: boolean) => any;
95
+ }>, {
96
+ expand: () => void;
97
+ collapse: () => void;
98
+ toggle: () => void;
99
+ readonly clamped: boolean;
100
+ readonly expanded: NonNullable<boolean | undefined>;
101
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
102
+ "update:expanded": (value: NonNullable<boolean | undefined>) => any;
103
+ clampchange: (value: boolean) => any;
104
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
105
+ P: {};
106
+ B: {};
107
+ D: {};
108
+ C: {};
109
+ M: {};
110
+ Defaults: {};
111
+ }, Readonly<{
112
+ ellipsis?: string | undefined;
113
+ html: string;
114
+ as?: string | undefined;
115
+ maxLines?: number | undefined;
116
+ maxHeight?: VueClamp.ClampLength | undefined;
117
+ boundary?: VueClamp.ClampBoundary | undefined;
118
+ } & {
119
+ expanded?: NonNullable<VueClamp.RichLineClampProps["expanded"]>;
120
+ }> & Readonly<{
121
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
122
+ onClampchange?: (value: boolean) => any;
123
+ }>, {
124
+ expand: () => void;
125
+ collapse: () => void;
126
+ toggle: () => void;
127
+ readonly clamped: boolean;
128
+ readonly expanded: NonNullable<boolean | undefined>;
129
+ }, {}, {}, {}, {}>;
130
+ __isFragment?: never;
131
+ __isTeleport?: never;
132
+ __isSuspense?: never;
133
+ } & import("vue").ComponentOptionsBase<Readonly<{
134
+ ellipsis?: string | undefined;
135
+ html: string;
136
+ as?: string | undefined;
137
+ maxLines?: number | undefined;
138
+ maxHeight?: VueClamp.ClampLength | undefined;
139
+ boundary?: VueClamp.ClampBoundary | undefined;
140
+ } & {
141
+ expanded?: NonNullable<VueClamp.RichLineClampProps["expanded"]>;
142
+ }> & Readonly<{
143
+ "onUpdate:expanded"?: (value: NonNullable<boolean | undefined>) => any;
144
+ onClampchange?: (value: boolean) => any;
145
+ }>, {
146
+ expand: () => void;
147
+ collapse: () => void;
148
+ toggle: () => void;
149
+ readonly clamped: boolean;
150
+ readonly expanded: NonNullable<boolean | undefined>;
151
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
152
+ "update:expanded": (value: NonNullable<boolean | undefined>) => any;
153
+ clampchange: (value: boolean) => any;
154
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
155
+ $slots: VueClamp.RichLineClampSlots;
156
+ })>;
157
+ export declare const InlineClamp: SFCWithInstall<import("vue").DefineComponent<VueClamp.InlineClampProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VueClamp.InlineClampProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
158
+ export declare const WrapClamp: SFCWithInstall<(<T = unknown>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
159
+ emit: ((evt: "clampchange", value: boolean) => void) & ((event: "update:expanded", value: NonNullable<boolean | undefined>) => void);
160
+ slots: VueClamp.WrapClampSlots<T>;
161
+ attrs: any;
162
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
163
+ props: import("vue").PublicProps & {
164
+ items?: readonly T[] | undefined;
165
+ as?: string | undefined;
166
+ maxLines?: number | undefined;
167
+ maxHeight?: VueClamp.ClampLength | undefined;
168
+ itemKey?: VueClamp.WrapClampItemKey<T> | undefined;
169
+ expanded?: NonNullable<VueClamp.WrapClampProps<T>["expanded"]> | undefined;
170
+ "onUpdate:expanded"?: ((value: NonNullable<boolean | undefined>) => any) | undefined;
171
+ onClampchange?: ((value: boolean) => any) | undefined;
172
+ } & (typeof globalThis extends {
173
+ __VLS_PROPS_FALLBACK: infer P;
174
+ } ? P : {});
175
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
176
+ expand: () => void;
177
+ collapse: () => void;
178
+ toggle: () => void;
179
+ readonly clamped: boolean;
180
+ readonly expanded: NonNullable<boolean | undefined>;
181
+ }>) => void;
182
+ attrs: any;
183
+ slots: VueClamp.WrapClampSlots<T>;
184
+ emit: ((evt: "clampchange", value: boolean) => void) & ((event: "update:expanded", value: NonNullable<boolean | undefined>) => void);
185
+ }>) => import("vue").VNode & {
186
+ __ctx?: Awaited<typeof __VLS_setup>;
187
+ })>;
188
+ export type LineClampInstance = InstanceType<typeof _LineClamp>;
189
+ export type RichLineClampInstance = InstanceType<typeof _RichLineClamp>;
190
+ export type InlineClampInstance = InstanceType<typeof _InlineClamp>;
191
+ export type WrapClampInstance = import('vue-clamp').WrapClampExposed;
192
+ export type ClampBoundary = VueClamp.ClampBoundary;
193
+ export type ClampLength = VueClamp.ClampLength;
194
+ export type InlineClampParts = VueClamp.InlineClampParts;
195
+ export type InlineClampProps = VueClamp.InlineClampProps;
196
+ export type InlineClampSplit = VueClamp.InlineClampSplit;
197
+ export type LineClampExposed = VueClamp.LineClampExposed;
198
+ export type LineClampLocation = VueClamp.LineClampLocation;
199
+ export type LineClampProps = VueClamp.LineClampProps;
200
+ export type LineClampSlotProps = VueClamp.LineClampSlotProps;
201
+ export type LineClampSlots = VueClamp.LineClampSlots;
202
+ export type RichLineClampExposed = VueClamp.RichLineClampExposed;
203
+ export type RichLineClampProps = VueClamp.RichLineClampProps;
204
+ export type RichLineClampSlotProps = VueClamp.RichLineClampSlotProps;
205
+ export type RichLineClampSlots = VueClamp.RichLineClampSlots;
206
+ export type WrapClampExposed = VueClamp.WrapClampExposed;
207
+ export type WrapClampItemKey<T = unknown> = VueClamp.WrapClampItemKey<T>;
208
+ export type WrapClampItemSlotProps<T = unknown> = VueClamp.WrapClampItemSlotProps<T>;
209
+ export type WrapClampProps<T = unknown> = VueClamp.WrapClampProps<T>;
210
+ export type WrapClampSlotProps<T = unknown> = VueClamp.WrapClampSlotProps<T>;
211
+ export type WrapClampSlots<T = unknown> = VueClamp.WrapClampSlots<T>;
212
+ export default LineClamp;
@@ -0,0 +1,15 @@
1
+ import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
2
+ import { InlineClamp, LineClamp, RichLineClamp, WrapClamp } from "vue-clamp";
3
+ //#region components/clamp/index.ts
4
+ function withInstall(component, name) {
5
+ return Object.assign(component, { install(app, options) {
6
+ setGlobalConfig(app, options);
7
+ app.component(`${getComponentPrefix(options)}${name}`, component);
8
+ } });
9
+ }
10
+ var LineClamp$1 = withInstall(LineClamp, "LineClamp");
11
+ var RichLineClamp$1 = withInstall(RichLineClamp, "RichLineClamp");
12
+ var InlineClamp$1 = withInstall(InlineClamp, "InlineClamp");
13
+ var WrapClamp$1 = withInstall(WrapClamp, "WrapClamp");
14
+ //#endregion
15
+ export { InlineClamp$1 as InlineClamp, LineClamp$1 as LineClamp, LineClamp$1 as default, RichLineClamp$1 as RichLineClamp, WrapClamp$1 as WrapClamp };
@@ -0,0 +1 @@
1
+ import "../../style/index.css";
File without changes
@@ -0,0 +1 @@
1
+ import '../../style/index.scss';
@@ -0,0 +1 @@
1
+ import "../../style/index.scss";
@@ -0,0 +1 @@
1
+ @use './token.scss' as *;
@@ -0,0 +1 @@
1
+ // Clamp 的布局与样式由 vue-clamp 原生组件提供,本组件组不覆盖上游样式契约。
@@ -1,9 +1,9 @@
1
1
  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
- import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
5
4
  import Trigger from "../trigger/index.js";
6
5
  import Tooltip from "../tooltip/index.js";
6
+ import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
7
7
  import Input from "../input/index.js";
8
8
  import { formatColorState, getColorBackground, getColorObject, normalizeFormat, parseColorState } from "./utils.js";
9
9
  import panel_default from "./panel.js";
@@ -32,6 +32,10 @@ declare module 'vue' {
32
32
  SdCascaderPanel: SDVue['CascaderPanel'];
33
33
  SdCheckbox: SDVue['Checkbox'];
34
34
  SdCheckboxGroup: SDVue['CheckboxGroup'];
35
+ SdLineClamp: SDVue['LineClamp'];
36
+ SdInlineClamp: SDVue['InlineClamp'];
37
+ SdRichLineClamp: SDVue['RichLineClamp'];
38
+ SdWrapClamp: SDVue['WrapClamp'];
35
39
  SdCollapse: SDVue['Collapse'];
36
40
  SdCollapseItem: SDVue['CollapseItem'];
37
41
  SdColorPicker: SDVue['ColorPicker'];
@@ -4,11 +4,11 @@ import { getPrefixCls } from "../_utils/global-config.js";
4
4
  import { isBoolean, isFunction } from "../_utils/is.js";
5
5
  import { useI18n } from "../locale/index.js";
6
6
  import { useAllowClear } from "../_hooks/use-allow-clear.js";
7
+ import { omit } from "../_utils/omit.js";
8
+ import Trigger from "../trigger/index.js";
7
9
  import useState from "../_hooks/use-state.js";
8
10
  import useMergeState from "../_hooks/use-merge-state.js";
9
- import { omit } from "../_utils/omit.js";
10
11
  import pick from "../_utils/pick.js";
11
- import Trigger from "../trigger/index.js";
12
12
  import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
13
13
  import input_default from "../_components/picker/input.js";
14
14
  import { dayjs, getDateValue, getDayjsValue, getNow, initializeDateLocale, isValueChange, toLocal } from "../_utils/date.js";