@sdata/web-vue 3.3.0 → 3.4.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 (97) hide show
  1. package/dist/sd.css +16 -12
  2. package/dist/sd.min.css +1 -1
  3. package/es/_components/select-view/select-view.d.ts +1 -1
  4. package/es/_components/select-view/style/index.css +2 -5
  5. package/es/_components/virtual-list/interface.d.ts +13 -6
  6. package/es/_components/virtual-list/style/index.scss +3 -1
  7. package/es/_components/virtual-list/virtual-list.vue.d.ts +31 -77
  8. package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +180 -503
  9. package/es/auto-complete/auto-complete.d.ts +1 -1
  10. package/es/auto-complete/auto-complete.js +3 -1
  11. package/es/auto-complete/index.d.ts +3 -3
  12. package/es/card/card.d.ts +3 -3
  13. package/es/card/index.d.ts +6 -6
  14. package/es/cascader/base-cascader-panel.d.ts +1 -1
  15. package/es/cascader/cascader-option.d.ts +1 -1
  16. package/es/cascader/cascader-option.js +8 -3
  17. package/es/cascader/cascader-panel.vue.d.ts +1 -1
  18. package/es/cascader/cascader-search-panel.d.ts +1 -1
  19. package/es/cascader/cascader.vue.d.ts +2 -2
  20. package/es/cascader/style/index.css +4 -1
  21. package/es/cascader/style/index.d.ts +1 -0
  22. package/es/cascader/style/index.scss +4 -1
  23. package/es/config-provider/config-provider.vue.d.ts +1 -1
  24. package/es/config-provider/index.d.ts +3 -3
  25. package/es/descriptions/descriptions.d.ts +2 -2
  26. package/es/descriptions/index.d.ts +6 -6
  27. package/es/drawer/drawer.vue.d.ts +2 -2
  28. package/es/drawer/index.d.ts +5 -5
  29. package/es/dropdown/dropdown-panel.vue.d.ts +1 -1
  30. package/es/ellipsis/ellipsis.vue.d.ts +1 -1
  31. package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/es/ellipsis/index.d.ts +6 -6
  33. package/es/ellipsis/performant-ellipsis.vue.d.ts +1 -1
  34. package/es/image/preview-group.vue.d.ts +1 -1
  35. package/es/index.css +16 -12
  36. package/es/input-tag/style/index.css +2 -5
  37. package/es/input-tag/style/input-tag.scss +1 -3
  38. package/es/link/index.d.ts +6 -6
  39. package/es/link/link.vue.d.ts +2 -2
  40. package/es/list/list-item-meta.vue.d.ts +2 -2
  41. package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +10 -3
  42. package/es/list/style/index.css +5 -0
  43. package/es/list/style/index.d.ts +1 -0
  44. package/es/list/style/index.scss +6 -0
  45. package/es/menu/item.d.ts +1 -1
  46. package/es/modal/index.d.ts +5 -5
  47. package/es/modal/modal.vue.d.ts +2 -2
  48. package/es/progress/line.vue.d.ts +1 -1
  49. package/es/qr-code/index.d.ts +12 -12
  50. package/es/qr-code/qr-code.vue.d.ts +4 -4
  51. package/es/select/index.d.ts +5 -5
  52. package/es/select/select-dropdown.vue.d.ts +1 -1
  53. package/es/select/select.d.ts +2 -2
  54. package/es/select/select.js +4 -2
  55. package/es/select/style/index.d.ts +1 -0
  56. package/es/slider/index.d.ts +3 -3
  57. package/es/slider/slider.vue.d.ts +1 -1
  58. package/es/spin/index.d.ts +3 -3
  59. package/es/spin/spin.d.ts +1 -1
  60. package/es/statistic/index.d.ts +3 -3
  61. package/es/statistic/statistic.vue.d.ts +1 -1
  62. package/es/table/index.d.ts +13 -7
  63. package/es/table/style/index.css +4 -1
  64. package/es/table/style/index.scss +6 -1
  65. package/es/table/table-column.d.ts +1 -1
  66. package/es/table/table-td.d.ts +1 -1
  67. package/es/table/table.d.ts +3 -1
  68. package/es/table/table.js +66 -34
  69. package/es/tabs/index.d.ts +3 -3
  70. package/es/tabs/tabs.d.ts +1 -1
  71. package/es/tag/index.d.ts +6 -6
  72. package/es/tag/style/index.css +1 -1
  73. package/es/tag/style/index.scss +1 -1
  74. package/es/tag/tag.vue.d.ts +2 -2
  75. package/es/timeline/index.d.ts +6 -6
  76. package/es/timeline/timeline.d.ts +3 -3
  77. package/es/tree/base-node.vue.d.ts +4 -8
  78. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +14 -16
  79. package/es/tree/tree.vue.d.ts +2 -2
  80. package/es/tree-select/tree-select.vue.d.ts +4 -4
  81. package/es/typography/base.d.ts +1 -1
  82. package/es/watermark/index.d.ts +3 -3
  83. package/es/watermark/watermark.d.ts +1 -1
  84. package/json/web-types.json +1 -1
  85. package/package.json +3 -3
  86. package/es/_components/virtual-list/use-virtual-size.js +0 -94
  87. package/es/_components/virtual-list-v2/hooks/use-size.d.ts +0 -17
  88. package/es/_components/virtual-list-v2/hooks/use-size.js +0 -95
  89. package/es/_components/virtual-list-v2/index.d.ts +0 -2
  90. package/es/_components/virtual-list-v2/index.js +0 -5
  91. package/es/_components/virtual-list-v2/interface.d.ts +0 -44
  92. package/es/_components/virtual-list-v2/virtual-list-item.d.ts +0 -22
  93. package/es/_components/virtual-list-v2/virtual-list-item.js +0 -37
  94. package/es/_components/virtual-list-v2/virtual-list.js +0 -47
  95. package/es/_components/virtual-list-v2/virtual-list.vue.d.ts +0 -749
  96. package/es/_components/virtual-list-v2/virtual-list.vue_vue_type_script_lang.js +0 -179
  97. package/es/_virtual/_plugin-vue_export-helper.js +0 -8
@@ -143,9 +143,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
143
143
  error: boolean;
144
144
  disabled: boolean;
145
145
  showArrow: boolean;
146
- multiple: boolean;
147
146
  allowClear: boolean;
148
147
  loading: boolean;
148
+ multiple: boolean;
149
149
  bordered: boolean;
150
150
  maxTagCount: number | "responsive";
151
151
  retainInputValue: boolean;
@@ -87,7 +87,7 @@
87
87
  color: var(--sd-color-text-2);
88
88
  }
89
89
  .sd-tag-text {
90
- min-width: 0;
90
+ min-width: 1em;
91
91
  max-width: 100%;
92
92
  }
93
93
  .sd-tag-ellipsis-line-clamp {
@@ -816,21 +816,18 @@
816
816
  align-items: center;
817
817
  min-width: 0;
818
818
  margin-right: 4px;
819
- color: var(--sd-color-text-1);
820
819
  font-size: 12px;
821
820
  white-space: pre-wrap;
822
821
  word-break: break-word;
823
822
  }
824
823
  .sd-select-view-multiple .sd-select-view-inner .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) {
824
+ color: var(--sd-color-text-1);
825
825
  background-color: var(--sd-color-bg-2);
826
826
  border-color: var(--sd-color-fill-3);
827
827
  }
828
828
  .sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag .sd-icon-hover:hover::before {
829
829
  background-color: var(--sd-color-fill-2);
830
830
  }
831
- .sd-select-view-multiple .sd-select-view-inner .sd-select-view-tag.sd-tag-custom-color {
832
- color: var(--sd-color-white);
833
- }
834
831
  .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 {
835
832
  background-color: rgba(255, 255, 255, 0.2);
836
833
  }
@@ -1,4 +1,4 @@
1
- import type { CacheSnapshot, ClassValue, ItemSizeValue, KeyFieldValue, ScrollAlign, ScrollDirection, ScrollToOptions } from 'vue-virtual-scroller';
1
+ import type { CacheSnapshot } from 'virtua';
2
2
  import type { CSSProperties, VNode } from 'vue';
3
3
  import type { ScrollbarProps } from '../../scrollbar';
4
4
  export type VirtualItemKey = string | number;
@@ -11,6 +11,16 @@ export type ItemSlot = (props: {
11
11
  item: unknown;
12
12
  index: number;
13
13
  }) => VNode[];
14
+ export type ClassValue = string | Record<string, boolean> | Array<string | Record<string, boolean>>;
15
+ export type KeyFieldValue<T = unknown> = string | ((item: T, index: number) => VirtualItemKey);
16
+ export type ItemSizeValue<T = unknown> = number | string | ((item: T, index: number) => number);
17
+ export type ScrollDirection = 'vertical' | 'horizontal';
18
+ export type ScrollAlign = 'start' | 'center' | 'end' | 'nearest';
19
+ export interface ScrollToOptions {
20
+ align?: 'auto' | 'top' | 'bottom' | ScrollAlign;
21
+ smooth?: boolean;
22
+ offset?: number;
23
+ }
14
24
  export interface ScrollIntoViewOptions {
15
25
  index?: number;
16
26
  key?: VirtualItemKey;
@@ -60,13 +70,10 @@ export interface VirtualListDynamicProps<TItem = unknown> extends VirtualListCom
60
70
  minItemSize: number | string;
61
71
  }
62
72
  export type VirtualListProps<TItem = unknown> = VirtualListRecycleProps<TItem> | VirtualListDynamicProps<TItem>;
63
- export type ScrollOptions = number | {
73
+ export type ScrollOptions = number | ({
64
74
  index?: number;
65
75
  key?: VirtualItemKey;
66
- align?: 'auto' | 'top' | 'bottom' | ScrollAlign;
67
- smooth?: boolean;
68
- offset?: number;
69
- };
76
+ } & ScrollToOptions);
70
77
  export interface VirtualListRef {
71
78
  scrollToItem: (index: number, options?: ScrollToOptions) => void;
72
79
  scrollToPosition: (position: number, options?: ScrollToOptions) => void;
@@ -1 +1,3 @@
1
- @import url('vue-virtual-scroller/dist/vue-virtual-scroller.css');
1
+ // virtua renders the virtual list with inline styles and does not ship a CSS
2
+ // file, so this entry no longer imports any third-party stylesheet. The file is
3
+ // kept because `components/index.scss` still `@use`s it.
@@ -1,74 +1,28 @@
1
- import { type CSSProperties, PropType } from 'vue';
2
- import { type CacheSnapshot, type ClassValue, type ItemSizeValue, type KeyFieldValue, type ScrollDirection, type ScrollToOptions } from 'vue-virtual-scroller';
1
+ import type { CacheSnapshot } from 'virtua';
2
+ import { type CSSProperties, type PropType } from 'vue';
3
3
  import type { ScrollbarProps } from '../../scrollbar';
4
- import type { ScrollOptions } from './interface';
5
- declare var __VLS_17: {}, __VLS_31: {
6
- item: unknown;
7
- index: number;
8
- active: boolean;
9
- itemWithSize: undefined;
10
- }, __VLS_33: {
11
- item: unknown;
12
- index: number;
13
- active: boolean;
14
- itemWithSize: undefined;
15
- }, __VLS_41: {
16
- item: unknown;
4
+ import type { ClassValue, ItemSizeValue, ScrollOptions, ScrollToOptions, VirtualItemKey } from './interface';
5
+ declare var __VLS_1: {}, __VLS_15: {
6
+ item: any;
17
7
  index: number;
18
8
  active: boolean;
19
9
  itemWithSize: undefined;
20
- }, __VLS_43: {
21
- item: unknown;
10
+ }, __VLS_17: {
11
+ item: any;
22
12
  index: number;
23
13
  active: boolean;
24
14
  itemWithSize: undefined;
25
- }, __VLS_45: {}, __VLS_56: {}, __VLS_65: {
26
- item: any;
27
- index: any;
28
- active: any;
29
- itemWithSize: Record<string, unknown> | undefined;
30
- }, __VLS_67: {
31
- item: any;
32
- index: any;
33
- active: any;
34
- itemWithSize: Record<string, unknown> | undefined;
35
- }, __VLS_69: {
36
- item: any;
37
- index: any;
38
- active: any;
39
- itemWithSize: Record<string, unknown> | undefined;
40
- }, __VLS_71: {
41
- item: any;
42
- index: any;
43
- active: any;
44
- itemWithSize: Record<string, unknown> | undefined;
45
- }, __VLS_74: {}, __VLS_77: {};
15
+ }, __VLS_19: {}, __VLS_21: {};
46
16
  type __VLS_Slots = {} & {
47
- before?: (props: typeof __VLS_17) => any;
17
+ before?: (props: typeof __VLS_1) => any;
48
18
  } & {
49
- item?: (props: typeof __VLS_31) => any;
19
+ item?: (props: typeof __VLS_15) => any;
50
20
  } & {
51
- default?: (props: typeof __VLS_33) => any;
21
+ default?: (props: typeof __VLS_17) => any;
52
22
  } & {
53
- item?: (props: typeof __VLS_41) => any;
23
+ after?: (props: typeof __VLS_19) => any;
54
24
  } & {
55
- default?: (props: typeof __VLS_43) => any;
56
- } & {
57
- after?: (props: typeof __VLS_45) => any;
58
- } & {
59
- before?: (props: typeof __VLS_56) => any;
60
- } & {
61
- item?: (props: typeof __VLS_65) => any;
62
- } & {
63
- default?: (props: typeof __VLS_67) => any;
64
- } & {
65
- item?: (props: typeof __VLS_69) => any;
66
- } & {
67
- default?: (props: typeof __VLS_71) => any;
68
- } & {
69
- empty?: (props: typeof __VLS_74) => any;
70
- } & {
71
- after?: (props: typeof __VLS_77) => any;
25
+ empty?: (props: typeof __VLS_21) => any;
72
26
  };
73
27
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
74
28
  items: {
@@ -80,11 +34,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
80
34
  default: undefined;
81
35
  };
82
36
  keyField: {
83
- type: PropType<KeyFieldValue<any>>;
37
+ type: PropType<string | ((item: unknown, index: number) => VirtualItemKey)>;
84
38
  default: string;
85
39
  };
86
40
  direction: {
87
- type: PropType<ScrollDirection>;
41
+ type: PropType<"vertical" | "horizontal">;
88
42
  default: string;
89
43
  };
90
44
  listTag: {
@@ -96,7 +50,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
96
50
  default: string;
97
51
  };
98
52
  itemSize: {
99
- type: PropType<ItemSizeValue<any>>;
53
+ type: PropType<ItemSizeValue>;
100
54
  default: undefined;
101
55
  };
102
56
  gridItems: NumberConstructor;
@@ -140,7 +94,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
140
94
  default: undefined;
141
95
  };
142
96
  component: {
143
- type: PropType<keyof HTMLElementTagNameMap | Record<string, unknown>>;
97
+ type: PropType<string | Record<string, unknown>>;
144
98
  default: undefined;
145
99
  };
146
100
  listAttrs: {
@@ -174,11 +128,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
174
128
  getItemOffset: (index: number) => number;
175
129
  getItemSize: (index: number) => number;
176
130
  cacheSnapshot: () => CacheSnapshot | undefined;
177
- restoreCache: (snapshot: CacheSnapshot | null | undefined) => boolean;
178
- updateVisibleItems: (itemsChanged: boolean, checkPositionDiff?: boolean) => void;
131
+ restoreCache: () => boolean;
132
+ updateVisibleItems: () => void;
179
133
  scrollToBottom: () => void;
180
- forceUpdate: (clear?: boolean) => void;
181
- getDynamicItemSize: (item: unknown, index?: number) => number;
134
+ forceUpdate: () => void;
135
+ getDynamicItemSize: (_item: unknown, index?: number) => number;
182
136
  scrollTo: (options: ScrollOptions) => void;
183
137
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
184
138
  update: (_startIndex: number, _endIndex: number, _visibleStartIndex: number, _visibleEndIndex: number) => any;
@@ -199,11 +153,11 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
199
153
  default: undefined;
200
154
  };
201
155
  keyField: {
202
- type: PropType<KeyFieldValue<any>>;
156
+ type: PropType<string | ((item: unknown, index: number) => VirtualItemKey)>;
203
157
  default: string;
204
158
  };
205
159
  direction: {
206
- type: PropType<ScrollDirection>;
160
+ type: PropType<"vertical" | "horizontal">;
207
161
  default: string;
208
162
  };
209
163
  listTag: {
@@ -215,7 +169,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
215
169
  default: string;
216
170
  };
217
171
  itemSize: {
218
- type: PropType<ItemSizeValue<any>>;
172
+ type: PropType<ItemSizeValue>;
219
173
  default: undefined;
220
174
  };
221
175
  gridItems: NumberConstructor;
@@ -259,7 +213,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
259
213
  default: undefined;
260
214
  };
261
215
  component: {
262
- type: PropType<keyof HTMLElementTagNameMap | Record<string, unknown>>;
216
+ type: PropType<string | Record<string, unknown>>;
263
217
  default: undefined;
264
218
  };
265
219
  listAttrs: {
@@ -297,23 +251,23 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
297
251
  onScrollEnd?: (() => any) | undefined;
298
252
  }>, {
299
253
  shift: boolean;
300
- fixedSize: boolean;
301
- estimatedSize: number;
302
254
  emitUpdate: boolean;
303
255
  disableTransform: boolean;
304
256
  flowMode: boolean;
305
257
  skipHover: boolean;
306
258
  items: unknown[];
307
259
  height: string | number;
308
- keyField: KeyFieldValue<any>;
309
- direction: ScrollDirection;
260
+ keyField: string | ((item: unknown, index: number) => VirtualItemKey);
261
+ direction: "horizontal" | "vertical";
310
262
  listTag: string;
311
263
  itemTag: string;
312
- itemSize: ItemSizeValue<any>;
264
+ itemSize: ItemSizeValue;
313
265
  minItemSize: string | number | null;
314
266
  enabled: boolean;
315
267
  threshold: number;
316
- component: Record<string, unknown> | keyof HTMLElementTagNameMap;
268
+ fixedSize: boolean;
269
+ estimatedSize: number;
270
+ component: string | Record<string, unknown>;
317
271
  listAttrs: Record<string, unknown> | undefined;
318
272
  contentWrapperAttrs: Record<string, unknown> | undefined;
319
273
  contentAttrs: Record<string, unknown> | undefined;