@uzum-tech/ui 2.0.5 → 2.0.7

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 (136) hide show
  1. package/dist/index.js +1183 -573
  2. package/dist/index.mjs +1183 -573
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/_internal/icons/DragHandleRound.mjs +16 -0
  6. package/es/_internal/icons/index.d.ts +1 -1
  7. package/es/_internal/icons/index.mjs +1 -1
  8. package/es/components.d.ts +99 -30
  9. package/es/data-table/src/DataTable.d.ts +24 -0
  10. package/es/data-table/src/DataTable.mjs +31 -0
  11. package/es/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
  12. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
  13. package/es/data-table/src/TableParts/Body.d.ts +17 -9
  14. package/es/data-table/src/TableParts/Body.mjs +81 -274
  15. package/es/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
  16. package/es/data-table/src/TableParts/BodyEmpty.mjs +22 -0
  17. package/es/data-table/src/TableParts/BodyRow.d.ts +3 -0
  18. package/es/data-table/src/TableParts/BodyRow.mjs +257 -0
  19. package/es/data-table/src/TableParts/BodySkeleton.mjs +5 -2
  20. package/es/data-table/src/TableParts/Header.d.ts +6 -0
  21. package/es/data-table/src/TableParts/Header.mjs +5 -1
  22. package/es/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
  23. package/es/data-table/src/TableParts/VirtualListItemWrapper.mjs +46 -0
  24. package/es/data-table/src/interface.d.ts +161 -2
  25. package/es/data-table/src/styles/index.cssr.mjs +26 -3
  26. package/es/data-table/src/use-group-header.d.ts +3 -3
  27. package/es/data-table/src/use-row-drag.d.ts +2 -0
  28. package/es/data-table/src/use-row-drag.mjs +241 -0
  29. package/es/data-table/src/use-sorter.d.ts +4 -8
  30. package/es/data-table/src/use-sorter.mjs +14 -2
  31. package/es/data-table/src/use-table-data.d.ts +11 -14
  32. package/es/data-table/src/use-table-data.mjs +4 -2
  33. package/es/data-table/src/use-table-storage.d.ts +2 -2
  34. package/es/data-table/src/use-table-storage.mjs +1 -1
  35. package/es/data-table/src/utils/column-utils.d.ts +3 -2
  36. package/es/data-table/src/utils/column-utils.mjs +9 -1
  37. package/es/data-table/src/utils/csv-utils.mjs +1 -1
  38. package/es/data-table/src/utils/flatten-rows.d.ts +2 -0
  39. package/es/data-table/src/utils/flatten-rows.mjs +33 -0
  40. package/es/data-table/src/utils/index.d.ts +1 -0
  41. package/es/data-table/src/utils/index.mjs +1 -0
  42. package/es/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
  43. package/es/data-table/src/utils/width-utils.d.ts +2 -2
  44. package/es/data-table/styles/light.d.ts +6 -0
  45. package/es/data-table/styles/light.mjs +3 -0
  46. package/es/mapping-card/src/MappingCard.d.ts +8 -0
  47. package/es/mapping-card/src/MappingCard.mjs +3 -1
  48. package/es/mapping-card/src/MappingCardParts/Header.mjs +31 -10
  49. package/es/mapping-card/src/interface.d.ts +8 -0
  50. package/es/mapping-card/src/interface.mjs +4 -0
  51. package/es/mapping-card/src/styles/index.cssr.mjs +8 -1
  52. package/es/tree/src/Tree.d.ts +49 -24
  53. package/es/tree/src/Tree.mjs +18 -13
  54. package/es/tree/src/TreeNodeCheckbox.d.ts +4 -0
  55. package/es/tree/src/TreeNodeSwitcher.mjs +24 -26
  56. package/es/tree/src/styles/index.cssr.mjs +11 -8
  57. package/es/tree/styles/light.d.ts +4 -0
  58. package/es/tree/styles/light.mjs +2 -0
  59. package/es/tree-select/index.d.ts +1 -1
  60. package/es/tree-select/src/TreeSelect.d.ts +43 -16
  61. package/es/tree-select/src/TreeSelect.mjs +65 -35
  62. package/es/tree-select/src/interface.d.ts +6 -1
  63. package/es/tree-select/src/scroll-option-end.d.ts +3 -0
  64. package/es/tree-select/src/scroll-option-end.mjs +28 -0
  65. package/es/tree-select/styles/light.d.ts +2 -0
  66. package/es/version.d.ts +1 -1
  67. package/es/version.mjs +1 -1
  68. package/lib/_internal/icons/DragHandleRound.js +10 -0
  69. package/lib/_internal/icons/index.d.ts +1 -1
  70. package/lib/_internal/icons/index.js +4 -4
  71. package/lib/components.d.ts +99 -30
  72. package/lib/data-table/src/DataTable.d.ts +24 -0
  73. package/lib/data-table/src/DataTable.js +19 -1
  74. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +6 -0
  75. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -0
  76. package/lib/data-table/src/TableParts/Body.d.ts +18 -10
  77. package/lib/data-table/src/TableParts/Body.js +65 -237
  78. package/lib/data-table/src/TableParts/BodyEmpty.d.ts +3 -0
  79. package/lib/data-table/src/TableParts/BodyEmpty.js +15 -0
  80. package/lib/data-table/src/TableParts/BodyRow.d.ts +3 -0
  81. package/lib/data-table/src/TableParts/BodyRow.js +210 -0
  82. package/lib/data-table/src/TableParts/BodySkeleton.js +8 -2
  83. package/lib/data-table/src/TableParts/Header.d.ts +6 -0
  84. package/lib/data-table/src/TableParts/Header.js +6 -0
  85. package/lib/data-table/src/TableParts/VirtualListItemWrapper.d.ts +36 -0
  86. package/lib/data-table/src/TableParts/VirtualListItemWrapper.js +29 -0
  87. package/lib/data-table/src/interface.d.ts +161 -2
  88. package/lib/data-table/src/styles/index.cssr.js +26 -3
  89. package/lib/data-table/src/use-group-header.d.ts +3 -3
  90. package/lib/data-table/src/use-row-drag.d.ts +2 -0
  91. package/lib/data-table/src/use-row-drag.js +270 -0
  92. package/lib/data-table/src/use-sorter.d.ts +4 -8
  93. package/lib/data-table/src/use-sorter.js +14 -0
  94. package/lib/data-table/src/use-table-data.d.ts +11 -14
  95. package/lib/data-table/src/use-table-data.js +5 -1
  96. package/lib/data-table/src/use-table-storage.d.ts +2 -2
  97. package/lib/data-table/src/use-table-storage.js +1 -0
  98. package/lib/data-table/src/utils/column-utils.d.ts +3 -2
  99. package/lib/data-table/src/utils/column-utils.js +11 -2
  100. package/lib/data-table/src/utils/csv-utils.js +1 -0
  101. package/lib/data-table/src/utils/flatten-rows.d.ts +2 -0
  102. package/lib/data-table/src/utils/flatten-rows.js +35 -0
  103. package/lib/data-table/src/utils/index.d.ts +1 -0
  104. package/lib/data-table/src/utils/index.js +1 -0
  105. package/lib/data-table/src/utils/resize-orchestrator-utils.d.ts +3 -5
  106. package/lib/data-table/src/utils/width-utils.d.ts +2 -2
  107. package/lib/data-table/styles/light.d.ts +6 -0
  108. package/lib/data-table/styles/light.js +3 -0
  109. package/lib/mapping-card/src/MappingCard.d.ts +8 -0
  110. package/lib/mapping-card/src/MappingCard.js +5 -1
  111. package/lib/mapping-card/src/MappingCardParts/Header.js +29 -5
  112. package/lib/mapping-card/src/interface.d.ts +8 -0
  113. package/lib/mapping-card/src/interface.js +4 -0
  114. package/lib/mapping-card/src/styles/index.cssr.js +8 -1
  115. package/lib/tree/src/Tree.d.ts +49 -24
  116. package/lib/tree/src/Tree.js +16 -15
  117. package/lib/tree/src/TreeNodeCheckbox.d.ts +4 -0
  118. package/lib/tree/src/TreeNodeSwitcher.js +11 -14
  119. package/lib/tree/src/styles/index.cssr.js +11 -8
  120. package/lib/tree/styles/light.d.ts +4 -0
  121. package/lib/tree/styles/light.js +2 -0
  122. package/lib/tree-select/index.d.ts +1 -1
  123. package/lib/tree-select/src/TreeSelect.d.ts +43 -16
  124. package/lib/tree-select/src/TreeSelect.js +66 -40
  125. package/lib/tree-select/src/interface.d.ts +6 -1
  126. package/lib/tree-select/src/scroll-option-end.d.ts +3 -0
  127. package/lib/tree-select/src/scroll-option-end.js +30 -0
  128. package/lib/tree-select/styles/light.d.ts +2 -0
  129. package/lib/version.d.ts +1 -1
  130. package/lib/version.js +1 -1
  131. package/package.json +2 -2
  132. package/web-types.json +21 -1
  133. package/es/_internal/icons/Switcher.mjs +0 -12
  134. package/lib/_internal/icons/Switcher.js +0 -10
  135. /package/es/_internal/icons/{Switcher.d.ts → DragHandleRound.d.ts} +0 -0
  136. /package/lib/_internal/icons/{Switcher.d.ts → DragHandleRound.d.ts} +0 -0
@@ -33,6 +33,31 @@ export default defineComponent({
33
33
  const theme = mergedThemeRef.value;
34
34
  const locale = localeRef.value;
35
35
  const renderTextProp = value => typeof value === 'function' ? value() : value;
36
+ const renderInfoText = (title, description) => {
37
+ if (!title && !description) return null;
38
+ return h("div", {
39
+ class: `${prefix}-mapping-card__header-info-text`
40
+ }, title && h("div", {
41
+ class: `${prefix}-mapping-card__header-title`
42
+ }, renderTextProp(title)), description && h("div", {
43
+ class: `${prefix}-mapping-card__header-description`
44
+ }, renderTextProp(description)));
45
+ };
46
+ const mainInfo = resolveSlot(slots.headerInfo, () => {
47
+ var _a;
48
+ const fromProp = (_a = props.headerInfo) === null || _a === void 0 ? void 0 : _a.call(props);
49
+ if (fromProp) return [fromProp];
50
+ const fallback = renderInfoText(props.title, props.description);
51
+ return fallback ? [fallback] : [];
52
+ });
53
+ const subInfo = resolveSlot(slots.headerSubInfo, () => {
54
+ var _a;
55
+ const fromProp = (_a = props.headerSubInfo) === null || _a === void 0 ? void 0 : _a.call(props);
56
+ if (fromProp) return [fromProp];
57
+ const fallback = renderInfoText(props.subTitle, props.subDescription);
58
+ return fallback ? [fallback] : [];
59
+ });
60
+ const hasSubInfo = subInfo.length > 0;
36
61
  return h("div", {
37
62
  class: `${prefix}-mapping-card__header`
38
63
  }, h(UFlex, {
@@ -40,13 +65,7 @@ export default defineComponent({
40
65
  size: "small",
41
66
  class: `${prefix}-mapping-card__header-info`
42
67
  }, {
43
- default: () => h(Fragment, null, h("div", {
44
- class: `${prefix}-mapping-card__header-info-text`
45
- }, h("div", {
46
- class: `${prefix}-mapping-card__header-title`
47
- }, renderTextProp(props.title)), props.description && h("div", {
48
- class: `${prefix}-mapping-card__header-description`
49
- }, renderTextProp(props.description))), !props.hideCopy && h(UTooltip, null, {
68
+ default: () => h(Fragment, null, mainInfo, !props.hideCopy && h(UTooltip, null, {
50
69
  trigger: () => {
51
70
  var _a;
52
71
  return h(UButton, Object.assign({
@@ -72,7 +91,9 @@ export default defineComponent({
72
91
  });
73
92
  },
74
93
  default: () => locale.copyTooltip
75
- }))
94
+ }), hasSubInfo && h("div", {
95
+ class: `${prefix}-mapping-card__header-info-divider`
96
+ }), hasSubInfo && subInfo)
76
97
  }), !props.hideHeaderActions && h(UFlex, {
77
98
  align: "center",
78
99
  size: "small"
@@ -86,9 +107,9 @@ export default defineComponent({
86
107
  return h(USwitch, Object.assign({}, (_a = props.headerSwitchProps) !== null && _a !== void 0 ? _a : {}, {
87
108
  theme: theme.peers.Switch,
88
109
  themeOverrides: theme.peerOverrides.Switch,
89
- onUpdateValue: val => {
110
+ onUpdateValue: value => {
90
111
  var _a;
91
- return (_a = props.onSwitchChange) === null || _a === void 0 ? void 0 : _a.call(props, val);
112
+ return (_a = props.onSwitchChange) === null || _a === void 0 ? void 0 : _a.call(props, value);
92
113
  }
93
114
  }));
94
115
  },
@@ -32,6 +32,10 @@ export interface MappingRow {
32
32
  export interface MappingCardInterface {
33
33
  title: string | (() => VNodeChild);
34
34
  description: string | (() => VNodeChild);
35
+ subTitle?: string | (() => VNodeChild);
36
+ subDescription?: string | (() => VNodeChild);
37
+ headerInfo?: () => VNodeChild;
38
+ headerSubInfo?: () => VNodeChild;
35
39
  rows: MappingRow[];
36
40
  cols?: number;
37
41
  defaultSpan?: number;
@@ -61,6 +65,10 @@ export interface MappingCardListInterface {
61
65
  export declare const mappingCardProps: {
62
66
  readonly title: PropType<MappingCardInterface["title"]>;
63
67
  readonly description: PropType<MappingCardInterface["description"]>;
68
+ readonly subTitle: PropType<MappingCardInterface["subTitle"]>;
69
+ readonly subDescription: PropType<MappingCardInterface["subDescription"]>;
70
+ readonly headerInfo: PropType<MappingCardInterface["headerInfo"]>;
71
+ readonly headerSubInfo: PropType<MappingCardInterface["headerSubInfo"]>;
64
72
  readonly rows: PropType<MappingCardInterface["rows"]>;
65
73
  readonly cols: {
66
74
  readonly type: PropType<MappingCardInterface["cols"]>;
@@ -1,6 +1,10 @@
1
1
  export const mappingCardProps = {
2
2
  title: [String, Function],
3
3
  description: [String, Function],
4
+ subTitle: [String, Function],
5
+ subDescription: [String, Function],
6
+ headerInfo: Function,
7
+ headerSubInfo: Function,
4
8
  rows: Array,
5
9
  cols: {
6
10
  type: Number,
@@ -14,7 +14,7 @@ export default c([cB('mapping-card', `
14
14
  border-radius: var(--u-border-radius);
15
15
  overflow: hidden;
16
16
  box-sizing: border-box;
17
- `, [cE('header', `
17
+ `, [cE('header', `
18
18
  padding: var(--u-header-padding);
19
19
  display: flex;
20
20
  align-items: center;
@@ -33,11 +33,18 @@ export default c([cB('mapping-card', `
33
33
  min-width: 0;
34
34
  `), cE('header-info-text', `
35
35
  min-width: 0;
36
+ margin-right: 12px;
36
37
  `), cE('header-title', `
37
38
  color: var(--u-title-color);
38
39
  `), cE('header-description', `
39
40
  color: var(--u-description-color);
40
41
  margin-top: 2px;
42
+ `), cE('header-info-divider', `
43
+ margin-right: 12px;
44
+ width: 1px;
45
+ align-self: stretch;
46
+ background: var(--u-border-color);
47
+ flex-shrink: 0;
41
48
  `), cE('body', `
42
49
  display: flex;
43
50
  padding: var(--u-body-padding);
@@ -180,7 +180,7 @@ export declare const treeProps: {
180
180
  readonly scrollbarProps: PropType<ScrollbarProps>;
181
181
  readonly indent: {
182
182
  readonly type: NumberConstructor;
183
- readonly default: 24;
183
+ readonly default: 36;
184
184
  };
185
185
  readonly allowDrop: {
186
186
  readonly type: PropType<AllowDrop>;
@@ -206,16 +206,17 @@ export declare const treeProps: {
206
206
  readonly default: true;
207
207
  };
208
208
  readonly getChildren: PropType<GetChildren>;
209
- readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
210
- readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
211
- readonly onDragend: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
212
- readonly onDragstart: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
213
- readonly onDragover: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
214
- readonly onDrop: PropType<MaybeArray<(e: TreeDropInfo) => void>>;
209
+ readonly onDragenter: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
210
+ readonly onDragleave: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
211
+ readonly onDragend: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
212
+ readonly onDragstart: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
213
+ readonly onDragover: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
214
+ readonly onDrop: PropType<MaybeArray<(event: TreeDropInfo) => void>>;
215
215
  readonly onUpdateCheckedKeys: PropType<MaybeArray<OnUpdateCheckedKeys>>;
216
216
  readonly 'onUpdate:checkedKeys': PropType<MaybeArray<OnUpdateCheckedKeys>>;
217
217
  readonly onUpdateSelectedKeys: PropType<MaybeArray<OnUpdateSelectedKeys>>;
218
218
  readonly 'onUpdate:selectedKeys': PropType<MaybeArray<OnUpdateSelectedKeys>>;
219
+ readonly onScroll: PropType<MaybeArray<(event: Event) => void>>;
219
220
  readonly theme: PropType<import("../../_mixins").Theme<"Tree", {
220
221
  fontSize: string;
221
222
  lineHeight: string;
@@ -226,6 +227,8 @@ export declare const treeProps: {
226
227
  nodeColorPressed: string;
227
228
  nodeColorActive: string;
228
229
  arrowColor: string;
230
+ switcherColor: string;
231
+ switcherSize: string;
229
232
  nodeTextColor: string;
230
233
  nodeTextColorDisabled: string;
231
234
  loadingColor: string;
@@ -325,6 +328,8 @@ export declare const treeProps: {
325
328
  nodeColorPressed: string;
326
329
  nodeColorActive: string;
327
330
  arrowColor: string;
331
+ switcherColor: string;
332
+ switcherSize: string;
328
333
  nodeTextColor: string;
329
334
  nodeTextColorDisabled: string;
330
335
  loadingColor: string;
@@ -424,6 +429,8 @@ export declare const treeProps: {
424
429
  nodeColorPressed: string;
425
430
  nodeColorActive: string;
426
431
  arrowColor: string;
432
+ switcherColor: string;
433
+ switcherSize: string;
427
434
  nodeTextColor: string;
428
435
  nodeTextColorDisabled: string;
429
436
  loadingColor: string;
@@ -626,7 +633,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
626
633
  readonly scrollbarProps: PropType<ScrollbarProps>;
627
634
  readonly indent: {
628
635
  readonly type: NumberConstructor;
629
- readonly default: 24;
636
+ readonly default: 36;
630
637
  };
631
638
  readonly allowDrop: {
632
639
  readonly type: PropType<AllowDrop>;
@@ -652,16 +659,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
652
659
  readonly default: true;
653
660
  };
654
661
  readonly getChildren: PropType<GetChildren>;
655
- readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
656
- readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
657
- readonly onDragend: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
658
- readonly onDragstart: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
659
- readonly onDragover: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
660
- readonly onDrop: PropType<MaybeArray<(e: TreeDropInfo) => void>>;
662
+ readonly onDragenter: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
663
+ readonly onDragleave: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
664
+ readonly onDragend: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
665
+ readonly onDragstart: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
666
+ readonly onDragover: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
667
+ readonly onDrop: PropType<MaybeArray<(event: TreeDropInfo) => void>>;
661
668
  readonly onUpdateCheckedKeys: PropType<MaybeArray<OnUpdateCheckedKeys>>;
662
669
  readonly 'onUpdate:checkedKeys': PropType<MaybeArray<OnUpdateCheckedKeys>>;
663
670
  readonly onUpdateSelectedKeys: PropType<MaybeArray<OnUpdateSelectedKeys>>;
664
671
  readonly 'onUpdate:selectedKeys': PropType<MaybeArray<OnUpdateSelectedKeys>>;
672
+ readonly onScroll: PropType<MaybeArray<(event: Event) => void>>;
665
673
  readonly theme: PropType<import("../../_mixins").Theme<"Tree", {
666
674
  fontSize: string;
667
675
  lineHeight: string;
@@ -672,6 +680,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
672
680
  nodeColorPressed: string;
673
681
  nodeColorActive: string;
674
682
  arrowColor: string;
683
+ switcherColor: string;
684
+ switcherSize: string;
675
685
  nodeTextColor: string;
676
686
  nodeTextColorDisabled: string;
677
687
  loadingColor: string;
@@ -771,6 +781,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
771
781
  nodeColorPressed: string;
772
782
  nodeColorActive: string;
773
783
  arrowColor: string;
784
+ switcherColor: string;
785
+ switcherSize: string;
774
786
  nodeTextColor: string;
775
787
  nodeTextColorDisabled: string;
776
788
  loadingColor: string;
@@ -870,6 +882,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
870
882
  nodeColorPressed: string;
871
883
  nodeColorActive: string;
872
884
  arrowColor: string;
885
+ switcherColor: string;
886
+ switcherSize: string;
873
887
  nodeTextColor: string;
874
888
  nodeTextColorDisabled: string;
875
889
  loadingColor: string;
@@ -973,6 +987,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
973
987
  nodeColorPressed: string;
974
988
  nodeColorActive: string;
975
989
  arrowColor: string;
990
+ switcherColor: string;
991
+ switcherSize: string;
976
992
  nodeTextColor: string;
977
993
  nodeTextColorDisabled: string;
978
994
  loadingColor: string;
@@ -1362,15 +1378,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1362
1378
  handleMouseEnterWrapper: () => void;
1363
1379
  handleMouseLeaveWrapper: () => void;
1364
1380
  } | null>;
1365
- handleFocusout: (e: FocusEvent) => void;
1366
- handleDragLeaveTree: (e: DragEvent) => void;
1367
- handleScroll: () => void;
1381
+ handleFocusout: (event: FocusEvent) => void;
1382
+ handleDragLeaveTree: (event: DragEvent) => void;
1383
+ handleScroll: (event: Event) => void;
1368
1384
  getScrollContainer: () => HTMLElement | null | undefined;
1369
1385
  getScrollContent: () => HTMLElement | null | undefined;
1370
1386
  handleAfterEnter: () => void;
1371
1387
  handleResize: () => void;
1372
1388
  cssVars: import("vue").ComputedRef<{
1373
1389
  '--u-arrow-color': string;
1390
+ '--u-switcher-color': string;
1391
+ '--u-switcher-size': string;
1374
1392
  '--u-loading-color': string;
1375
1393
  '--u-bezier': string;
1376
1394
  '--u-font-size': string;
@@ -1510,7 +1528,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1510
1528
  readonly scrollbarProps: PropType<ScrollbarProps>;
1511
1529
  readonly indent: {
1512
1530
  readonly type: NumberConstructor;
1513
- readonly default: 24;
1531
+ readonly default: 36;
1514
1532
  };
1515
1533
  readonly allowDrop: {
1516
1534
  readonly type: PropType<AllowDrop>;
@@ -1536,16 +1554,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1536
1554
  readonly default: true;
1537
1555
  };
1538
1556
  readonly getChildren: PropType<GetChildren>;
1539
- readonly onDragenter: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
1540
- readonly onDragleave: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
1541
- readonly onDragend: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
1542
- readonly onDragstart: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
1543
- readonly onDragover: PropType<MaybeArray<(e: TreeDragInfo) => void>>;
1544
- readonly onDrop: PropType<MaybeArray<(e: TreeDropInfo) => void>>;
1557
+ readonly onDragenter: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
1558
+ readonly onDragleave: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
1559
+ readonly onDragend: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
1560
+ readonly onDragstart: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
1561
+ readonly onDragover: PropType<MaybeArray<(event: TreeDragInfo) => void>>;
1562
+ readonly onDrop: PropType<MaybeArray<(event: TreeDropInfo) => void>>;
1545
1563
  readonly onUpdateCheckedKeys: PropType<MaybeArray<OnUpdateCheckedKeys>>;
1546
1564
  readonly 'onUpdate:checkedKeys': PropType<MaybeArray<OnUpdateCheckedKeys>>;
1547
1565
  readonly onUpdateSelectedKeys: PropType<MaybeArray<OnUpdateSelectedKeys>>;
1548
1566
  readonly 'onUpdate:selectedKeys': PropType<MaybeArray<OnUpdateSelectedKeys>>;
1567
+ readonly onScroll: PropType<MaybeArray<(event: Event) => void>>;
1549
1568
  readonly theme: PropType<import("../../_mixins").Theme<"Tree", {
1550
1569
  fontSize: string;
1551
1570
  lineHeight: string;
@@ -1556,6 +1575,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1556
1575
  nodeColorPressed: string;
1557
1576
  nodeColorActive: string;
1558
1577
  arrowColor: string;
1578
+ switcherColor: string;
1579
+ switcherSize: string;
1559
1580
  nodeTextColor: string;
1560
1581
  nodeTextColorDisabled: string;
1561
1582
  loadingColor: string;
@@ -1655,6 +1676,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1655
1676
  nodeColorPressed: string;
1656
1677
  nodeColorActive: string;
1657
1678
  arrowColor: string;
1679
+ switcherColor: string;
1680
+ switcherSize: string;
1658
1681
  nodeTextColor: string;
1659
1682
  nodeTextColorDisabled: string;
1660
1683
  loadingColor: string;
@@ -1754,6 +1777,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1754
1777
  nodeColorPressed: string;
1755
1778
  nodeColorActive: string;
1756
1779
  arrowColor: string;
1780
+ switcherColor: string;
1781
+ switcherSize: string;
1757
1782
  nodeTextColor: string;
1758
1783
  nodeTextColorDisabled: string;
1759
1784
  loadingColor: string;
@@ -146,7 +146,7 @@ export const treeProps = Object.assign(Object.assign(Object.assign(Object.assign
146
146
  scrollbarProps: Object,
147
147
  indent: {
148
148
  type: Number,
149
- default: 24
149
+ default: 36
150
150
  },
151
151
  allowDrop: {
152
152
  type: Function,
@@ -181,7 +181,8 @@ export const treeProps = Object.assign(Object.assign(Object.assign(Object.assign
181
181
  onUpdateCheckedKeys: [Function, Array],
182
182
  'onUpdate:checkedKeys': [Function, Array],
183
183
  onUpdateSelectedKeys: [Function, Array],
184
- 'onUpdate:selectedKeys': [Function, Array]
184
+ 'onUpdate:selectedKeys': [Function, Array],
185
+ onScroll: [Function, Array]
185
186
  }), treeSharedProps), {
186
187
  // internal props for tree-select
187
188
  internalTreeSelect: Boolean,
@@ -657,7 +658,6 @@ export default defineComponent({
657
658
  call(_onUpdateSelectedKeys, value, option, meta);
658
659
  }
659
660
  }
660
- // Drag & Drop
661
661
  function doDragEnter(info) {
662
662
  const {
663
663
  onDragenter
@@ -716,7 +716,6 @@ export default defineComponent({
716
716
  nodeKeyToBeExpanded = null;
717
717
  }
718
718
  function handleCheck(node, checked) {
719
- // We don't guard for leaf only since we have done it in view layer
720
719
  if (props.disabled || isNodeDisabled(node, props.disabledField)) {
721
720
  return;
722
721
  }
@@ -869,12 +868,10 @@ export default defineComponent({
869
868
  }, 1000);
870
869
  }
871
870
  }
872
- // Dnd
873
871
  function handleDragEnter({
874
872
  event,
875
873
  node
876
874
  }) {
877
- // node should be a tmNode
878
875
  if (!props.draggable || props.disabled || isNodeDisabled(node, props.disabledField)) {
879
876
  return;
880
877
  }
@@ -899,11 +896,10 @@ export default defineComponent({
899
896
  node: node.rawNode
900
897
  });
901
898
  }
902
- function handleDragLeaveTree(e) {
903
- if (e.target !== e.currentTarget) return;
899
+ function handleDragLeaveTree(event) {
900
+ if (event.target !== event.currentTarget) return;
904
901
  resetDropState();
905
902
  }
906
- // Dragend is ok, we don't need to add global listener to reset drag status
907
903
  function handleDragEnd({
908
904
  event,
909
905
  node
@@ -1180,19 +1176,23 @@ export default defineComponent({
1180
1176
  });
1181
1177
  resetDndState();
1182
1178
  }
1183
- function handleScroll() {
1179
+ function doScroll(event) {
1180
+ props.onScroll && call(props.onScroll, event);
1181
+ }
1182
+ function handleScroll(event) {
1184
1183
  syncScrollbar();
1184
+ doScroll(event);
1185
1185
  }
1186
1186
  function handleResize() {
1187
1187
  syncScrollbar();
1188
1188
  }
1189
- function handleFocusout(e) {
1189
+ function handleFocusout(event) {
1190
1190
  var _a;
1191
1191
  if (props.virtualScroll || props.internalScrollable) {
1192
1192
  const {
1193
1193
  value: scrollbarInst
1194
1194
  } = scrollbarInstRef;
1195
- if ((_a = scrollbarInst === null || scrollbarInst === void 0 ? void 0 : scrollbarInst.containerRef) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget)) {
1195
+ if ((_a = scrollbarInst === null || scrollbarInst === void 0 ? void 0 : scrollbarInst.containerRef) === null || _a === void 0 ? void 0 : _a.contains(event.relatedTarget)) {
1196
1196
  return;
1197
1197
  }
1198
1198
  pendingNodeKeyRef.value = null;
@@ -1200,7 +1200,7 @@ export default defineComponent({
1200
1200
  const {
1201
1201
  value: selfEl
1202
1202
  } = selfElRef;
1203
- if (selfEl === null || selfEl === void 0 ? void 0 : selfEl.contains(e.relatedTarget)) return;
1203
+ if (selfEl === null || selfEl === void 0 ? void 0 : selfEl.contains(event.relatedTarget)) return;
1204
1204
  pendingNodeKeyRef.value = null;
1205
1205
  }
1206
1206
  }
@@ -1320,6 +1320,8 @@ export default defineComponent({
1320
1320
  nodeColorPressed,
1321
1321
  nodeColorActive,
1322
1322
  arrowColor,
1323
+ switcherColor,
1324
+ switcherSize,
1323
1325
  loadingColor,
1324
1326
  nodeTextColor,
1325
1327
  nodeTextColorDisabled,
@@ -1334,6 +1336,8 @@ export default defineComponent({
1334
1336
  const nodeContentHeight = pxfy(depx(nodeHeight) - depx(lineOffsetTop) - depx(lineOffsetBottom));
1335
1337
  return {
1336
1338
  '--u-arrow-color': arrowColor,
1339
+ '--u-switcher-color': switcherColor,
1340
+ '--u-switcher-size': switcherSize,
1337
1341
  '--u-loading-color': loadingColor,
1338
1342
  '--u-bezier': cubicBezierEaseInOut,
1339
1343
  '--u-font-size': fontSize,
@@ -1465,6 +1469,7 @@ export default defineComponent({
1465
1469
  return h(UxScrollbar, Object.assign({}, scrollbarProps, {
1466
1470
  class: treeClass,
1467
1471
  tabindex: tabindex,
1472
+ onScroll: this.handleScroll,
1468
1473
  onKeydown: mergedFocusable ? handleKeydown : undefined,
1469
1474
  onFocusout: mergedFocusable ? handleFocusout : undefined,
1470
1475
  style: this.cssVars,
@@ -28,6 +28,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
28
28
  nodeColorPressed: string;
29
29
  nodeColorActive: string;
30
30
  arrowColor: string;
31
+ switcherColor: string;
32
+ switcherSize: string;
31
33
  nodeTextColor: string;
32
34
  nodeTextColorDisabled: string;
33
35
  loadingColor: string;
@@ -147,6 +149,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
147
149
  nodeColorPressed: string;
148
150
  nodeColorActive: string;
149
151
  arrowColor: string;
152
+ switcherColor: string;
153
+ switcherSize: string;
150
154
  nodeTextColor: string;
151
155
  nodeTextColorDisabled: string;
152
156
  loadingColor: string;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, h, inject } from 'vue';
2
2
  import { UBaseIcon, UBaseLoading, UIconSwitchTransition } from "../../_internal/index.mjs";
3
- import { SwitcherIcon } from "../../_internal/icons/index.mjs";
3
+ import { ChevronRightIcon } from "../../_internal/icons/index.mjs";
4
4
  import { treeInjectionKey } from "./interface.mjs";
5
5
  export default defineComponent({
6
6
  name: 'UTreeSwitcher',
@@ -28,6 +28,23 @@ export default defineComponent({
28
28
  renderSwitcherIconRef,
29
29
  spinPropsRef
30
30
  } = inject(treeInjectionKey, null);
31
+ const renderSwitchIcon = () => {
32
+ const {
33
+ value: renderSwitcherIcon
34
+ } = renderSwitcherIconRef;
35
+ return h(UIconSwitchTransition, null, {
36
+ default: () => renderSwitcherIcon ? renderSwitcherIcon({
37
+ expanded: props.expanded,
38
+ selected: props.selected,
39
+ option: props.tmNode.rawNode
40
+ }) : h(UBaseIcon, {
41
+ clsPrefix: props.clsPrefix,
42
+ key: "switcher"
43
+ }, {
44
+ default: () => h(ChevronRightIcon, null)
45
+ })
46
+ });
47
+ };
31
48
  return () => {
32
49
  const {
33
50
  clsPrefix,
@@ -45,31 +62,12 @@ export default defineComponent({
45
62
  onClick: onClick
46
63
  }, h("div", {
47
64
  class: `${clsPrefix}-tree-node-switcher__icon`
48
- }, h(UIconSwitchTransition, null, {
49
- default: () => {
50
- if (props.loading) {
51
- return h(UBaseLoading, Object.assign({
52
- clsPrefix: clsPrefix,
53
- key: "loading",
54
- radius: 85,
55
- strokeWidth: 20
56
- }, spinPropsRef === null || spinPropsRef === void 0 ? void 0 : spinPropsRef.value));
57
- }
58
- const {
59
- value: renderSwitcherIcon
60
- } = renderSwitcherIconRef;
61
- return renderSwitcherIcon ? renderSwitcherIcon({
62
- expanded: props.expanded,
63
- selected: props.selected,
64
- option: props.tmNode.rawNode
65
- }) : h(UBaseIcon, {
66
- clsPrefix: clsPrefix,
67
- key: "switcher"
68
- }, {
69
- default: () => h(SwitcherIcon, null)
70
- });
71
- }
72
- })));
65
+ }, props.loading ? h(UBaseLoading, Object.assign({
66
+ clsPrefix: clsPrefix,
67
+ key: "loading",
68
+ radius: 85,
69
+ strokeWidth: 20
70
+ }, spinPropsRef === null || spinPropsRef === void 0 ? void 0 : spinPropsRef.value)) : renderSwitchIcon()));
73
71
  };
74
72
  }
75
73
  });
@@ -4,6 +4,8 @@ import { c, cB, cE, cM, cNotM } from "../../../_utils/cssr/index.mjs";
4
4
  const iconSwitchTransitionNode = iconSwitchTransition();
5
5
  // vars:
6
6
  // --u-arrow-color
7
+ // --u-switcher-color
8
+ // --u-switcher-size
7
9
  // --u-bezier
8
10
  // --u-font-size
9
11
  // --u-node-border-radius
@@ -95,19 +97,20 @@ export default cB('tree', `
95
97
  vertical-align: bottom;
96
98
  `, [cE('icon', `
97
99
  position: relative;
98
- height: 14px;
99
- width: 14px;
100
+ height: var(--u-switcher-size);
101
+ width: var(--u-switcher-size);
100
102
  display: flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ border-radius: 50%;
101
106
  color: var(--u-arrow-color);
102
- transition: color .3s var(--u-bezier);
107
+ background-color: var(--u-switcher-color);
108
+ transition:
109
+ color .3s var(--u-bezier),
110
+ background-color .3s var(--u-bezier);
103
111
  font-size: 14px;
104
112
  `, [cB('icon', [iconSwitchTransitionNode]), cB('base-loading', `
105
113
  color: var(--u-loading-color);
106
- position: absolute;
107
- left: 0;
108
- top: 0;
109
- right: 0;
110
- bottom: 0;
111
114
  `, [iconSwitchTransitionNode]), cB('base-icon', [iconSwitchTransitionNode])]), cM('hide', 'visibility: hidden;'), cM('expanded', 'transform: rotate(90deg);')]), cB('tree-node-checkbox', `
112
115
  display: inline-flex;
113
116
  height: var(--u-node-content-height);
@@ -9,6 +9,8 @@ export declare function self(vars: ThemeCommonVars): {
9
9
  nodeColorPressed: string;
10
10
  nodeColorActive: string;
11
11
  arrowColor: string;
12
+ switcherColor: string;
13
+ switcherSize: string;
12
14
  nodeTextColor: string;
13
15
  nodeTextColorDisabled: string;
14
16
  loadingColor: string;
@@ -25,6 +27,8 @@ declare const treeLight: import("../../_mixins").Theme<"Tree", {
25
27
  nodeColorPressed: string;
26
28
  nodeColorActive: string;
27
29
  arrowColor: string;
30
+ switcherColor: string;
31
+ switcherSize: string;
28
32
  nodeTextColor: string;
29
33
  nodeTextColorDisabled: string;
30
34
  loadingColor: string;
@@ -25,6 +25,8 @@ export function self(vars) {
25
25
  nodeColorPressed: elementsQuaternary,
26
26
  nodeColorActive: brandPrimary100,
27
27
  arrowColor: elementsPrimary,
28
+ switcherColor: elementsTertiary,
29
+ switcherSize: '22px',
28
30
  nodeTextColor: textPrimary,
29
31
  nodeTextColorDisabled: textSecondary,
30
32
  loadingColor: elementsPrimary,
@@ -1,5 +1,5 @@
1
1
  export type { TreeOverrideNodeClickBehavior as TreeSelectOverrideNodeClickBehavior, TreeOverrideNodeClickBehaviorReturn as TreeSelectOverrideNodeClickBehaviorReturn } from '../tree';
2
- export type { TreeSelectInst, TreeSelectNodeProps, TreeSelectOption, TreeSelectRenderLabel, TreeSelectRenderPrefix, TreeSelectRenderSuffix, TreeSelectRenderTag } from './src/interface';
2
+ export type { OnScrollOptionEnd, TreeSelectInst, TreeSelectNodeProps, TreeSelectOption, TreeSelectRenderLabel, TreeSelectRenderPrefix, TreeSelectRenderSuffix, TreeSelectRenderTag } from './src/interface';
3
3
  export type * from './src/public-types';
4
4
  export { treeSelectProps, default as UTreeSelect } from './src/TreeSelect';
5
5
  export type { TreeSelectProps, TreeSelectSlots } from './src/TreeSelect';