naive-ui 2.30.3 → 2.30.4

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 (226) hide show
  1. package/dist/index.js +1385 -901
  2. package/dist/index.prod.js +2 -2
  3. package/es/_internal/scrollbar/src/Scrollbar.js +5 -17
  4. package/es/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -0
  5. package/es/_internal/select-menu/src/SelectGroupHeader.js +5 -3
  6. package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -3
  7. package/es/_internal/select-menu/src/SelectMenu.js +6 -8
  8. package/es/_internal/select-menu/src/SelectOption.d.ts +1 -0
  9. package/es/_internal/select-menu/src/SelectOption.js +11 -5
  10. package/es/_internal/select-menu/src/interface.d.ts +3 -1
  11. package/es/_internal/selection/src/Selection.d.ts +0 -2
  12. package/es/_internal/selection/src/Selection.js +2 -2
  13. package/es/_mixins/use-theme.js +1 -1
  14. package/es/_utils/composable/index.d.ts +3 -5
  15. package/es/_utils/composable/index.js +3 -111
  16. package/es/_utils/composable/use-collection.d.ts +4 -0
  17. package/es/_utils/composable/use-collection.js +87 -0
  18. package/es/_utils/composable/use-deferred-true.d.ts +2 -0
  19. package/es/_utils/composable/use-deferred-true.js +25 -0
  20. package/es/_utils/composable/use-reactivated.d.ts +3 -0
  21. package/es/_utils/composable/use-reactivated.js +20 -0
  22. package/es/_utils/event/index.d.ts +2 -0
  23. package/es/_utils/event/index.js +7 -0
  24. package/es/_utils/index.d.ts +2 -1
  25. package/es/_utils/index.js +2 -1
  26. package/es/_utils/vue/index.d.ts +1 -0
  27. package/es/_utils/vue/index.js +1 -0
  28. package/es/_utils/vue/merge-handlers.d.ts +1 -0
  29. package/es/_utils/vue/merge-handlers.js +15 -0
  30. package/es/button/src/Button.js +7 -2
  31. package/es/cascader/src/Cascader.d.ts +2 -3
  32. package/es/cascader/src/Cascader.js +26 -22
  33. package/es/cascader/src/CascaderMenu.d.ts +2 -2
  34. package/es/cascader/src/CascaderMenu.js +2 -4
  35. package/es/data-table/src/DataTable.d.ts +787 -0
  36. package/es/data-table/src/DataTable.js +7 -3
  37. package/es/data-table/src/HeaderButton/FilterButton.d.ts +142 -0
  38. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +142 -0
  39. package/es/data-table/src/MainTable.d.ts +2 -0
  40. package/es/data-table/src/MainTable.js +5 -1
  41. package/es/data-table/src/TableParts/Body.d.ts +143 -0
  42. package/es/data-table/src/TableParts/Body.js +11 -2
  43. package/es/data-table/src/TableParts/Cell.d.ts +284 -0
  44. package/es/data-table/src/TableParts/Header.d.ts +143 -0
  45. package/es/data-table/src/TableParts/Header.js +6 -2
  46. package/es/data-table/src/interface.d.ts +9 -5
  47. package/es/data-table/src/use-expand.d.ts +5 -3
  48. package/es/data-table/src/use-expand.js +22 -2
  49. package/es/data-table/src/utils.d.ts +2 -2
  50. package/es/data-table/src/utils.js +10 -8
  51. package/es/data-table/styles/light.d.ts +71 -0
  52. package/es/date-picker/src/DatePicker.d.ts +2 -1
  53. package/es/date-picker/src/DatePicker.js +20 -9
  54. package/es/date-picker/src/panel/month.js +3 -2
  55. package/es/drawer/src/Drawer.d.ts +1 -1
  56. package/es/drawer/src/Drawer.js +3 -3
  57. package/es/drawer/src/DrawerBodyWrapper.d.ts +2 -2
  58. package/es/dropdown/src/Dropdown.d.ts +4 -0
  59. package/es/dynamic-tags/src/DynamicTags.js +1 -1
  60. package/es/input/src/Input.d.ts +6 -3
  61. package/es/input/src/Input.js +56 -31
  62. package/es/input/src/utils.d.ts +7 -1
  63. package/es/input/src/utils.js +57 -2
  64. package/es/layout/src/Layout.d.ts +3 -1
  65. package/es/layout/src/Layout.js +22 -4
  66. package/es/layout/src/LayoutContent.d.ts +1 -0
  67. package/es/layout/src/LayoutSider.d.ts +1 -0
  68. package/es/layout/src/LayoutSider.js +22 -3
  69. package/es/menu/src/Menu.d.ts +1 -1
  70. package/es/modal/src/BodyWrapper.d.ts +2 -2
  71. package/es/modal/src/Modal.js +2 -2
  72. package/es/pagination/src/Pagination.d.ts +806 -20
  73. package/es/pagination/src/Pagination.js +115 -52
  74. package/es/pagination/src/interface.d.ts +2 -2
  75. package/es/pagination/src/styles/index.cssr.js +12 -10
  76. package/es/pagination/src/utils.d.ts +15 -5
  77. package/es/pagination/src/utils.js +117 -50
  78. package/es/pagination/styles/dark.js +3 -1
  79. package/es/pagination/styles/light.d.ts +71 -0
  80. package/es/pagination/styles/light.js +3 -1
  81. package/es/popconfirm/src/Popconfirm.d.ts +4 -0
  82. package/es/popover/src/Popover.d.ts +5 -0
  83. package/es/popover/src/Popover.js +1 -0
  84. package/es/popover/src/PopoverBody.d.ts +4 -0
  85. package/es/popover/src/PopoverBody.js +18 -10
  86. package/es/popselect/src/Popselect.d.ts +24 -0
  87. package/es/popselect/src/Popselect.js +12 -7
  88. package/es/popselect/src/PopselectPanel.d.ts +22 -2
  89. package/es/popselect/src/PopselectPanel.js +12 -1
  90. package/es/select/src/Select.d.ts +1 -1
  91. package/es/select/src/Select.js +5 -2
  92. package/es/slider/src/Slider.d.ts +1 -1
  93. package/es/slider/src/Slider.js +13 -5
  94. package/es/slider/src/styles/index.cssr.js +26 -31
  95. package/es/time-picker/src/TimePicker.d.ts +2 -1
  96. package/es/time-picker/src/TimePicker.js +18 -8
  97. package/es/tooltip/src/Tooltip.d.ts +4 -0
  98. package/es/tree/src/Tree.d.ts +2 -3
  99. package/es/tree/src/Tree.js +6 -8
  100. package/es/tree/src/TreeNode.js +4 -1
  101. package/es/tree/src/interface.d.ts +0 -1
  102. package/es/tree/src/keyboard.d.ts +0 -1
  103. package/es/tree/src/keyboard.js +6 -9
  104. package/es/tree-select/src/TreeSelect.d.ts +1 -3
  105. package/es/tree-select/src/TreeSelect.js +14 -16
  106. package/es/upload/src/UploadDragger.js +2 -2
  107. package/es/upload/src/UploadFile.d.ts +2 -2
  108. package/es/upload/src/UploadFile.js +9 -4
  109. package/es/upload/src/UploadTrigger.js +4 -3
  110. package/es/upload/src/styles/index.cssr.js +2 -2
  111. package/es/upload/src/utils.js +1 -15
  112. package/es/version.d.ts +1 -1
  113. package/es/version.js +1 -1
  114. package/lib/_internal/scrollbar/src/Scrollbar.js +4 -16
  115. package/lib/_internal/select-menu/src/SelectGroupHeader.d.ts +1 -0
  116. package/lib/_internal/select-menu/src/SelectGroupHeader.js +5 -3
  117. package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -3
  118. package/lib/_internal/select-menu/src/SelectMenu.js +5 -7
  119. package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -0
  120. package/lib/_internal/select-menu/src/SelectOption.js +10 -4
  121. package/lib/_internal/select-menu/src/interface.d.ts +3 -1
  122. package/lib/_internal/selection/src/Selection.d.ts +0 -2
  123. package/lib/_internal/selection/src/Selection.js +2 -2
  124. package/lib/_mixins/use-theme.js +1 -1
  125. package/lib/_utils/composable/index.d.ts +3 -5
  126. package/lib/_utils/composable/index.js +9 -116
  127. package/lib/_utils/composable/use-collection.d.ts +4 -0
  128. package/lib/_utils/composable/use-collection.js +93 -0
  129. package/lib/_utils/composable/use-deferred-true.d.ts +2 -0
  130. package/lib/_utils/composable/use-deferred-true.js +29 -0
  131. package/lib/_utils/composable/use-reactivated.d.ts +3 -0
  132. package/lib/_utils/composable/use-reactivated.js +24 -0
  133. package/lib/_utils/event/index.d.ts +2 -0
  134. package/lib/_utils/event/index.js +12 -0
  135. package/lib/_utils/index.d.ts +2 -1
  136. package/lib/_utils/index.js +5 -1
  137. package/lib/_utils/vue/index.d.ts +1 -0
  138. package/lib/_utils/vue/index.js +3 -1
  139. package/lib/_utils/vue/merge-handlers.d.ts +1 -0
  140. package/lib/_utils/vue/merge-handlers.js +19 -0
  141. package/lib/button/src/Button.js +7 -2
  142. package/lib/cascader/src/Cascader.d.ts +2 -3
  143. package/lib/cascader/src/Cascader.js +25 -21
  144. package/lib/cascader/src/CascaderMenu.d.ts +2 -2
  145. package/lib/cascader/src/CascaderMenu.js +2 -4
  146. package/lib/data-table/src/DataTable.d.ts +787 -0
  147. package/lib/data-table/src/DataTable.js +7 -3
  148. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +142 -0
  149. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +142 -0
  150. package/lib/data-table/src/MainTable.d.ts +2 -0
  151. package/lib/data-table/src/MainTable.js +5 -1
  152. package/lib/data-table/src/TableParts/Body.d.ts +143 -0
  153. package/lib/data-table/src/TableParts/Body.js +11 -2
  154. package/lib/data-table/src/TableParts/Cell.d.ts +284 -0
  155. package/lib/data-table/src/TableParts/Header.d.ts +143 -0
  156. package/lib/data-table/src/TableParts/Header.js +6 -2
  157. package/lib/data-table/src/interface.d.ts +9 -5
  158. package/lib/data-table/src/use-expand.d.ts +5 -3
  159. package/lib/data-table/src/use-expand.js +22 -2
  160. package/lib/data-table/src/utils.d.ts +2 -2
  161. package/lib/data-table/src/utils.js +11 -9
  162. package/lib/data-table/styles/light.d.ts +71 -0
  163. package/lib/date-picker/src/DatePicker.d.ts +2 -1
  164. package/lib/date-picker/src/DatePicker.js +19 -8
  165. package/lib/date-picker/src/panel/month.js +3 -2
  166. package/lib/drawer/src/Drawer.d.ts +1 -1
  167. package/lib/drawer/src/Drawer.js +2 -2
  168. package/lib/drawer/src/DrawerBodyWrapper.d.ts +2 -2
  169. package/lib/dropdown/src/Dropdown.d.ts +4 -0
  170. package/lib/dynamic-tags/src/DynamicTags.js +1 -1
  171. package/lib/input/src/Input.d.ts +6 -3
  172. package/lib/input/src/Input.js +55 -30
  173. package/lib/input/src/utils.d.ts +7 -1
  174. package/lib/input/src/utils.js +60 -4
  175. package/lib/layout/src/Layout.d.ts +3 -1
  176. package/lib/layout/src/Layout.js +22 -4
  177. package/lib/layout/src/LayoutContent.d.ts +1 -0
  178. package/lib/layout/src/LayoutSider.d.ts +1 -0
  179. package/lib/layout/src/LayoutSider.js +21 -2
  180. package/lib/menu/src/Menu.d.ts +1 -1
  181. package/lib/modal/src/BodyWrapper.d.ts +2 -2
  182. package/lib/modal/src/Modal.js +1 -1
  183. package/lib/pagination/src/Pagination.d.ts +806 -20
  184. package/lib/pagination/src/Pagination.js +114 -51
  185. package/lib/pagination/src/interface.d.ts +2 -2
  186. package/lib/pagination/src/styles/index.cssr.js +13 -11
  187. package/lib/pagination/src/utils.d.ts +15 -5
  188. package/lib/pagination/src/utils.js +118 -53
  189. package/lib/pagination/styles/dark.js +6 -4
  190. package/lib/pagination/styles/light.d.ts +71 -0
  191. package/lib/pagination/styles/light.js +6 -4
  192. package/lib/popconfirm/src/Popconfirm.d.ts +4 -0
  193. package/lib/popover/src/Popover.d.ts +5 -0
  194. package/lib/popover/src/Popover.js +1 -0
  195. package/lib/popover/src/PopoverBody.d.ts +4 -0
  196. package/lib/popover/src/PopoverBody.js +18 -10
  197. package/lib/popselect/src/Popselect.d.ts +24 -0
  198. package/lib/popselect/src/Popselect.js +10 -5
  199. package/lib/popselect/src/PopselectPanel.d.ts +22 -2
  200. package/lib/popselect/src/PopselectPanel.js +12 -1
  201. package/lib/select/src/Select.d.ts +1 -1
  202. package/lib/select/src/Select.js +4 -1
  203. package/lib/slider/src/Slider.d.ts +1 -1
  204. package/lib/slider/src/Slider.js +12 -4
  205. package/lib/slider/src/styles/index.cssr.js +26 -31
  206. package/lib/time-picker/src/TimePicker.d.ts +2 -1
  207. package/lib/time-picker/src/TimePicker.js +17 -7
  208. package/lib/tooltip/src/Tooltip.d.ts +4 -0
  209. package/lib/tree/src/Tree.d.ts +2 -3
  210. package/lib/tree/src/Tree.js +6 -8
  211. package/lib/tree/src/TreeNode.js +4 -1
  212. package/lib/tree/src/interface.d.ts +0 -1
  213. package/lib/tree/src/keyboard.d.ts +0 -1
  214. package/lib/tree/src/keyboard.js +6 -9
  215. package/lib/tree-select/src/TreeSelect.d.ts +1 -3
  216. package/lib/tree-select/src/TreeSelect.js +13 -15
  217. package/lib/upload/src/UploadDragger.js +2 -2
  218. package/lib/upload/src/UploadFile.d.ts +2 -2
  219. package/lib/upload/src/UploadFile.js +9 -4
  220. package/lib/upload/src/UploadTrigger.js +3 -2
  221. package/lib/upload/src/styles/index.cssr.js +2 -2
  222. package/lib/upload/src/utils.js +1 -15
  223. package/lib/version.d.ts +1 -1
  224. package/lib/version.js +1 -1
  225. package/package.json +2 -2
  226. package/web-types.json +37 -1
package/dist/index.js CHANGED
@@ -835,6 +835,19 @@
835
835
  return !(slot && ensureValidVNode(slot()));
836
836
  }
837
837
 
838
+ function mergeEventHandlers(handlers) {
839
+ const filteredHandlers = handlers.filter(handler => handler !== void 0);
840
+ if (filteredHandlers.length === 0) return void 0;
841
+ if (filteredHandlers.length === 1) return filteredHandlers[0];
842
+ return e => {
843
+ handlers.forEach(handler => {
844
+ if (handler) {
845
+ handler(e);
846
+ }
847
+ });
848
+ };
849
+ }
850
+
838
851
  const pureNumberRegex = /^(\d|\.)+$/;
839
852
  const numberRegex = /(\d|\.)+/;
840
853
  function formatLength(length) {
@@ -1706,6 +1719,107 @@
1706
1719
 
1707
1720
  const isBrowser$2 = typeof document !== "undefined" && typeof window !== "undefined";
1708
1721
 
1722
+ const eventSet = /* @__PURE__ */new WeakSet();
1723
+ function markEventEffectPerformed(event) {
1724
+ eventSet.add(event);
1725
+ }
1726
+ function eventEffectNotPerformed(event) {
1727
+ return !eventSet.has(event);
1728
+ }
1729
+
1730
+ function useInjectionInstanceCollection(injectionName, collectionKey, registerKeyRef) {
1731
+ const injection = vue.inject(injectionName, null);
1732
+ if (injection === null) return;
1733
+ const vm = vue.getCurrentInstance()?.proxy;
1734
+ vue.watch(registerKeyRef, registerInstance);
1735
+ registerInstance(registerKeyRef.value);
1736
+ vue.onBeforeUnmount(() => {
1737
+ registerInstance(void 0, registerKeyRef.value);
1738
+ });
1739
+
1740
+ function registerInstance(key, oldKey) {
1741
+ const collection = injection[collectionKey];
1742
+ if (oldKey !== void 0) removeInstance(collection, oldKey);
1743
+ if (key !== void 0) addInstance(collection, key);
1744
+ }
1745
+
1746
+ function removeInstance(collection, key) {
1747
+ if (!collection[key]) collection[key] = [];
1748
+ collection[key].splice(collection[key].findIndex(instance => instance === vm), 1);
1749
+ }
1750
+
1751
+ function addInstance(collection, key) {
1752
+ if (!collection[key]) collection[key] = [];
1753
+
1754
+ if (!~collection[key].findIndex(instance => instance === vm)) {
1755
+ collection[key].push(vm);
1756
+ }
1757
+ }
1758
+ }
1759
+ function useInjectionCollection(injectionName, collectionKey, valueRef) {
1760
+ const injection = vue.inject(injectionName, null);
1761
+ if (injection === null) return;
1762
+
1763
+ if (!(collectionKey in injection)) {
1764
+ injection[collectionKey] = [];
1765
+ }
1766
+
1767
+ injection[collectionKey].push(valueRef.value);
1768
+ vue.watch(valueRef, (value, prevValue) => {
1769
+ const collectionArray = injection[collectionKey];
1770
+ const index = collectionArray.findIndex(collectionValue => collectionValue === prevValue);
1771
+ if (~index) collectionArray.splice(index, 1);
1772
+ collectionArray.push(value);
1773
+ });
1774
+ vue.onBeforeUnmount(() => {
1775
+ const collectionArray = injection[collectionKey];
1776
+ const index = collectionArray.findIndex(collectionValue => collectionValue === valueRef.value);
1777
+ if (~index) collectionArray.splice(index, 1);
1778
+ });
1779
+ }
1780
+ function useInjectionElementCollection(injectionName, collectionKey, getElement) {
1781
+ const injection = vue.inject(injectionName, null);
1782
+ if (injection === null) return;
1783
+
1784
+ if (!(collectionKey in injection)) {
1785
+ injection[collectionKey] = [];
1786
+ }
1787
+
1788
+ vue.onMounted(() => {
1789
+ const el = getElement();
1790
+ if (!el) return;
1791
+ injection[collectionKey].push(el);
1792
+ });
1793
+ vue.onBeforeUnmount(() => {
1794
+ const collectionArray = injection[collectionKey];
1795
+ const element = getElement();
1796
+ const index = collectionArray.findIndex(collectionElement => collectionElement === element);
1797
+ if (~index) collectionArray.splice(index, 1);
1798
+ });
1799
+ }
1800
+
1801
+ function useDeferredTrue(valueRef, delay, shouldDelayRef) {
1802
+ if (!delay) return valueRef;
1803
+ const delayedRef = vue.ref(valueRef.value);
1804
+ let timerId = null;
1805
+ vue.watch(valueRef, value => {
1806
+ if (timerId !== null) window.clearTimeout(timerId);
1807
+
1808
+ if (value === true) {
1809
+ if (shouldDelayRef && !shouldDelayRef.value) {
1810
+ delayedRef.value = true;
1811
+ } else {
1812
+ timerId = window.setTimeout(() => {
1813
+ delayedRef.value = true;
1814
+ }, delay);
1815
+ }
1816
+ } else {
1817
+ delayedRef.value = false;
1818
+ }
1819
+ });
1820
+ return delayedRef;
1821
+ }
1822
+
1709
1823
  function useFalseUntilTruthy(originalRef) {
1710
1824
  const currentRef = vue.ref(!!originalRef.value);
1711
1825
  if (currentRef.value) return vue.readonly(currentRef);
@@ -3423,13 +3537,13 @@
3423
3537
 
3424
3538
 
3425
3539
  sum(i) {
3426
- if (i === 0) return 0;
3540
+ if (i === undefined) i = this.l;
3541
+ if (i <= 0) return 0;
3427
3542
  const {
3428
3543
  ft,
3429
3544
  min,
3430
3545
  l
3431
3546
  } = this;
3432
- if (i === undefined) i = l;
3433
3547
  if (i > l) throw new Error('[FinweckTree.sum]: `i` is larger than length.');
3434
3548
  let ret = i * min;
3435
3549
 
@@ -4916,6 +5030,27 @@
4916
5030
 
4917
5031
  });
4918
5032
 
5033
+ let maybeTouch;
5034
+ function ensureMaybeTouch() {
5035
+ if (maybeTouch === undefined) {
5036
+ if ('matchMedia' in window) {
5037
+ maybeTouch = window.matchMedia('(pointer:coarse)').matches;
5038
+ } else {
5039
+ maybeTouch = false;
5040
+ }
5041
+ }
5042
+
5043
+ return maybeTouch;
5044
+ }
5045
+ let wheelScale;
5046
+ function ensureWheelScale() {
5047
+ if (wheelScale === undefined) {
5048
+ wheelScale = 'chrome' in window ? window.devicePixelRatio : 1;
5049
+ }
5050
+
5051
+ return wheelScale;
5052
+ }
5053
+
4919
5054
  /* eslint-disable no-void */
4920
5055
  const styles$1 = c('.v-vl', {
4921
5056
  maxHeight: 'inherit',
@@ -5080,7 +5215,12 @@
5080
5215
  return viewportItems;
5081
5216
  });
5082
5217
 
5083
- const scrollTo = options => {
5218
+ const scrollTo = (options, y) => {
5219
+ if (typeof options === 'number') {
5220
+ scrollToPosition(options, y, 'auto');
5221
+ return;
5222
+ }
5223
+
5084
5224
  const {
5085
5225
  left,
5086
5226
  top,
@@ -5105,6 +5245,9 @@
5105
5245
  }
5106
5246
  };
5107
5247
 
5248
+ let anchorIndex;
5249
+ let anchorTimerId = null;
5250
+
5108
5251
  function scrollToIndex(index, behavior, debounce) {
5109
5252
  const {
5110
5253
  value: ft
@@ -5118,6 +5261,17 @@
5118
5261
  behavior
5119
5262
  });
5120
5263
  } else {
5264
+ anchorIndex = index;
5265
+
5266
+ if (anchorTimerId !== null) {
5267
+ window.clearTimeout(anchorTimerId);
5268
+ }
5269
+
5270
+ anchorTimerId = window.setTimeout(() => {
5271
+ anchorIndex = undefined;
5272
+ anchorTimerId = null;
5273
+ }, 16); // use 0 ms may be ealier than resize callback...
5274
+
5121
5275
  const {
5122
5276
  scrollTop,
5123
5277
  offsetHeight
@@ -5141,8 +5295,6 @@
5141
5295
  });
5142
5296
  }
5143
5297
  }
5144
-
5145
- lastScrollAnchorIndex = index;
5146
5298
  }
5147
5299
 
5148
5300
  function scrollToPosition(left, top, behavior) {
@@ -5154,7 +5306,7 @@
5154
5306
  }
5155
5307
 
5156
5308
  function handleItemResize(key, entry) {
5157
- var _a, _b, _c, _d;
5309
+ var _a, _b, _c;
5158
5310
 
5159
5311
  if (isDeactivated) return;
5160
5312
  if (props.ignoreItemResize) return;
@@ -5179,21 +5331,68 @@
5179
5331
 
5180
5332
  const delta = height - previousHeight;
5181
5333
  if (delta === 0) return;
5334
+ ft.add(index, delta);
5335
+ const listEl = listElRef.value;
5336
+
5337
+ if (listEl != null) {
5338
+ if (anchorIndex === undefined) {
5339
+ const previousHeightSum = ft.sum(index);
5340
+
5341
+ if (listEl.scrollTop > previousHeightSum) {
5342
+ listEl.scrollBy(0, delta);
5343
+ }
5344
+ } else {
5345
+ if (index < anchorIndex) {
5346
+ listEl.scrollBy(0, delta);
5347
+ } else if (index === anchorIndex) {
5348
+ const previousHeightSum = ft.sum(index);
5349
+
5350
+ if (height + previousHeightSum > // Note, listEl shouldn't have border, nor offsetHeight won't be
5351
+ // correct
5352
+ listEl.scrollTop + listEl.offsetHeight) {
5353
+ listEl.scrollBy(0, delta);
5354
+ }
5355
+ }
5356
+ }
5182
5357
 
5183
- if (lastAnchorIndex !== undefined && index <= lastAnchorIndex) {
5184
- (_d = listElRef.value) === null || _d === void 0 ? void 0 : _d.scrollBy(0, delta);
5358
+ syncViewport();
5185
5359
  }
5186
5360
 
5187
- ft.add(index, delta);
5188
5361
  finweckTreeUpdateTrigger.value++;
5189
5362
  }
5190
5363
 
5364
+ const mayUseWheel = !ensureMaybeTouch();
5365
+ let wheelCatched = false;
5366
+
5191
5367
  function handleListScroll(e) {
5192
- beforeNextFrameOnce(syncViewport);
5193
- const {
5194
- onScroll
5195
- } = props;
5196
- if (onScroll !== undefined) onScroll(e);
5368
+ var _a;
5369
+
5370
+ (_a = props.onScroll) === null || _a === void 0 ? void 0 : _a.call(props, e);
5371
+
5372
+ if (!mayUseWheel || !wheelCatched) {
5373
+ syncViewport();
5374
+ }
5375
+ }
5376
+
5377
+ function handleListWheel(e) {
5378
+ var _a;
5379
+
5380
+ (_a = props.onWheel) === null || _a === void 0 ? void 0 : _a.call(props, e);
5381
+
5382
+ if (mayUseWheel) {
5383
+ e.preventDefault();
5384
+ const listEl = listElRef.value;
5385
+
5386
+ if (listEl != null) {
5387
+ listEl.scrollTop += e.deltaY / ensureWheelScale();
5388
+ listEl.scrollLeft += e.deltaX / ensureWheelScale();
5389
+ syncViewport();
5390
+ wheelCatched = true;
5391
+ beforeNextFrameOnce(() => {
5392
+ wheelCatched = false;
5393
+ });
5394
+ }
5395
+ }
5197
5396
  }
5198
5397
 
5199
5398
  function handleListResize(entry) {
@@ -5209,9 +5408,6 @@
5209
5408
  if (onResize !== undefined) onResize(entry);
5210
5409
  }
5211
5410
 
5212
- let lastScrollAnchorIndex;
5213
- let lastAnchorIndex;
5214
-
5215
5411
  function syncViewport() {
5216
5412
  const {
5217
5413
  value: listEl
@@ -5219,10 +5415,8 @@
5219
5415
  // https://github.com/TuSimple/naive-ui/issues/811
5220
5416
 
5221
5417
  if (listEl == null) return;
5222
- lastAnchorIndex = lastScrollAnchorIndex !== null && lastScrollAnchorIndex !== void 0 ? lastScrollAnchorIndex : startIndexRef.value;
5223
- lastScrollAnchorIndex = undefined;
5224
- scrollTopRef.value = listElRef.value.scrollTop;
5225
- scrollLeft = listElRef.value.scrollLeft;
5418
+ scrollTopRef.value = listEl.scrollTop;
5419
+ scrollLeft = listEl.scrollLeft;
5226
5420
  }
5227
5421
 
5228
5422
  function isHideByVShow(el) {
@@ -5270,6 +5464,7 @@
5270
5464
  scrollTo,
5271
5465
  handleListResize,
5272
5466
  handleListScroll,
5467
+ handleListWheel,
5273
5468
  handleItemResize
5274
5469
  };
5275
5470
  },
@@ -5290,7 +5485,7 @@
5290
5485
  return vue.h('div', vue.mergeProps(this.$attrs, {
5291
5486
  class: ['v-vl', this.showScrollbar && 'v-vl--show-scrollbar'],
5292
5487
  onScroll: this.handleListScroll,
5293
- onWheel: this.onWheel,
5488
+ onWheel: this.handleListWheel,
5294
5489
  ref: 'listElRef'
5295
5490
  }), [this.items.length !== 0 ? vue.h('div', {
5296
5491
  ref: 'itemsElRef',
@@ -5653,7 +5848,7 @@
5653
5848
 
5654
5849
  if (e.code === 'Escape') {
5655
5850
  if (isCurrentActive()) {
5656
- (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props);
5851
+ (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props, e);
5657
5852
  }
5658
5853
  }
5659
5854
  }
@@ -5983,96 +6178,29 @@
5983
6178
  return isComposingRef;
5984
6179
  };
5985
6180
 
5986
- function useInjectionInstanceCollection(injectionName, collectionKey, registerKeyRef) {
5987
- const injection = vue.inject(injectionName, null);
5988
- if (injection === null) return;
5989
- const vm = vue.getCurrentInstance()?.proxy;
5990
- vue.watch(registerKeyRef, registerInstance);
5991
- registerInstance(registerKeyRef.value);
5992
- vue.onBeforeUnmount(() => {
5993
- registerInstance(void 0, registerKeyRef.value);
5994
- });
5995
-
5996
- function registerInstance(key, oldKey) {
5997
- const collection = injection[collectionKey];
5998
- if (oldKey !== void 0) removeInstance(collection, oldKey);
5999
- if (key !== void 0) addInstance(collection, key);
6000
- }
6001
-
6002
- function removeInstance(collection, key) {
6003
- if (!collection[key]) collection[key] = [];
6004
- collection[key].splice(collection[key].findIndex(instance => instance === vm), 1);
6005
- }
6006
-
6007
- function addInstance(collection, key) {
6008
- if (!collection[key]) collection[key] = [];
6181
+ function useReactivated(callback) {
6182
+ const isDeactivatedRef = {
6183
+ isDeactivated: false
6184
+ };
6185
+ let activateStateInitialized = false;
6186
+ vue.onActivated(() => {
6187
+ isDeactivatedRef.isDeactivated = false;
6009
6188
 
6010
- if (!~collection[key].findIndex(instance => instance === vm)) {
6011
- collection[key].push(vm);
6189
+ if (!activateStateInitialized) {
6190
+ activateStateInitialized = true;
6191
+ return;
6012
6192
  }
6013
- }
6014
- }
6015
- function useInjectionCollection(injectionName, collectionKey, valueRef) {
6016
- const injection = vue.inject(injectionName, null);
6017
- if (injection === null) return;
6018
-
6019
- if (!(collectionKey in injection)) {
6020
- injection[collectionKey] = [];
6021
- }
6022
6193
 
6023
- injection[collectionKey].push(valueRef.value);
6024
- vue.watch(valueRef, (value, prevValue) => {
6025
- const collectionArray = injection[collectionKey];
6026
- const index = collectionArray.findIndex(collectionValue => collectionValue === prevValue);
6027
- if (~index) collectionArray.splice(index, 1);
6028
- collectionArray.push(value);
6029
- });
6030
- vue.onBeforeUnmount(() => {
6031
- const collectionArray = injection[collectionKey];
6032
- const index = collectionArray.findIndex(collectionValue => collectionValue === valueRef.value);
6033
- if (~index) collectionArray.splice(index, 1);
6034
- });
6035
- }
6036
- function useInjectionElementCollection(injectionName, collectionKey, getElement) {
6037
- const injection = vue.inject(injectionName, null);
6038
- if (injection === null) return;
6039
-
6040
- if (!(collectionKey in injection)) {
6041
- injection[collectionKey] = [];
6042
- }
6043
-
6044
- vue.onMounted(() => {
6045
- const el = getElement();
6046
- if (!el) return;
6047
- injection[collectionKey].push(el);
6048
- });
6049
- vue.onBeforeUnmount(() => {
6050
- const collectionArray = injection[collectionKey];
6051
- const element = getElement();
6052
- const index = collectionArray.findIndex(collectionElement => collectionElement === element);
6053
- if (~index) collectionArray.splice(index, 1);
6194
+ callback();
6054
6195
  });
6055
- }
6056
- function useDeferredTrue(valueRef, delay, shouldDelayRef) {
6057
- if (!delay) return valueRef;
6058
- const delayedRef = vue.ref(valueRef.value);
6059
- let timerId = null;
6060
- vue.watch(valueRef, value => {
6061
- if (timerId !== null) window.clearTimeout(timerId);
6196
+ vue.onDeactivated(() => {
6197
+ isDeactivatedRef.isDeactivated = true;
6062
6198
 
6063
- if (value === true) {
6064
- if (shouldDelayRef && !shouldDelayRef.value) {
6065
- delayedRef.value = true;
6066
- } else {
6067
- timerId = window.setTimeout(() => {
6068
- delayedRef.value = true;
6069
- }, delay);
6070
- }
6071
- } else {
6072
- delayedRef.value = false;
6199
+ if (!activateStateInitialized) {
6200
+ activateStateInitialized = true;
6073
6201
  }
6074
6202
  });
6075
- return delayedRef;
6203
+ return isDeactivatedRef;
6076
6204
  }
6077
6205
 
6078
6206
  const formItemInjectionKey = createInjectionKey("n-form-item");
@@ -15765,7 +15893,7 @@
15765
15893
  common: mergedCommon,
15766
15894
  self: mergedSelf,
15767
15895
  peers: lodash.exports.merge({}, defaultTheme.peers, globalPeers, peers),
15768
- peerOverrides: lodash.exports.merge({}, globalPeersOverrides, peersOverrides)
15896
+ peerOverrides: lodash.exports.merge({}, builtinOverrides.peers, globalPeersOverrides, peersOverrides)
15769
15897
  };
15770
15898
  });
15771
15899
  return mergedThemeRef;
@@ -29668,14 +29796,7 @@
29668
29796
  return content();
29669
29797
  return contentRef.value;
29670
29798
  });
29671
- let isDeactivated = false;
29672
- let activateStateInitialized = false;
29673
- vue.onActivated(() => {
29674
- isDeactivated = false;
29675
- if (!activateStateInitialized) {
29676
- activateStateInitialized = true;
29677
- return;
29678
- }
29799
+ const activateState = useReactivated(() => {
29679
29800
  if (!props.container) {
29680
29801
  scrollTo({
29681
29802
  top: containerScrollTopRef.value,
@@ -29683,19 +29804,13 @@
29683
29804
  });
29684
29805
  }
29685
29806
  });
29686
- vue.onDeactivated(() => {
29687
- isDeactivated = true;
29688
- if (!activateStateInitialized) {
29689
- activateStateInitialized = true;
29690
- }
29691
- });
29692
29807
  const handleContentResize = () => {
29693
- if (isDeactivated)
29808
+ if (activateState.isDeactivated)
29694
29809
  return;
29695
29810
  sync();
29696
29811
  };
29697
29812
  const handleContainerResize = (e) => {
29698
- if (isDeactivated)
29813
+ if (activateState.isDeactivated)
29699
29814
  return;
29700
29815
  const { onResize } = props;
29701
29816
  if (onResize)
@@ -30258,6 +30373,7 @@
30258
30373
  labelFieldRef,
30259
30374
  valueFieldRef,
30260
30375
  showCheckmarkRef,
30376
+ nodePropsRef,
30261
30377
  handleOptionClick,
30262
30378
  handleOptionMouseEnter
30263
30379
  } = vue.inject(internalSelectionMenuInjectionKey);
@@ -30294,6 +30410,7 @@
30294
30410
  return parent && parent.rawNode.type === "group";
30295
30411
  }),
30296
30412
  showCheckmark: showCheckmarkRef,
30413
+ nodeProps: nodePropsRef,
30297
30414
  isPending: isPendingRef,
30298
30415
  isSelected: useMemo(() => {
30299
30416
  const { value } = valueRef;
@@ -30324,6 +30441,7 @@
30324
30441
  isPending,
30325
30442
  isGrouped,
30326
30443
  showCheckmark,
30444
+ nodeProps,
30327
30445
  renderOption,
30328
30446
  renderLabel,
30329
30447
  handleClick,
@@ -30335,10 +30453,13 @@
30335
30453
  render$1(rawNode[this.labelField], rawNode, isSelected),
30336
30454
  showCheckmark && checkmark
30337
30455
  ];
30456
+ const attrs = nodeProps?.(rawNode);
30338
30457
  const node = /* @__PURE__ */ vue.h("div", {
30458
+ ...attrs,
30339
30459
  class: [
30340
30460
  `${clsPrefix}-base-select-option`,
30341
30461
  rawNode.class,
30462
+ attrs?.class,
30342
30463
  {
30343
30464
  [`${clsPrefix}-base-select-option--disabled`]: rawNode.disabled,
30344
30465
  [`${clsPrefix}-base-select-option--selected`]: isSelected,
@@ -30347,10 +30468,13 @@
30347
30468
  [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark
30348
30469
  }
30349
30470
  ],
30350
- style: rawNode.style,
30351
- onClick: handleClick,
30352
- onMouseenter: handleMouseEnter,
30353
- onMousemove: handleMouseMove
30471
+ style: [attrs?.style || "", rawNode.style || ""],
30472
+ onClick: mergeEventHandlers([handleClick, attrs?.onClick]),
30473
+ onMouseenter: mergeEventHandlers([
30474
+ handleMouseEnter,
30475
+ attrs?.onMouseenter
30476
+ ]),
30477
+ onMousemove: mergeEventHandlers([handleMouseMove, attrs?.onMousemove])
30354
30478
  }, /* @__PURE__ */ vue.h("div", {
30355
30479
  class: `${clsPrefix}-base-select-option__content`
30356
30480
  }, children));
@@ -30374,10 +30498,12 @@
30374
30498
  const {
30375
30499
  renderLabelRef,
30376
30500
  renderOptionRef,
30377
- labelFieldRef
30501
+ labelFieldRef,
30502
+ nodePropsRef
30378
30503
  } = vue.inject(internalSelectionMenuInjectionKey);
30379
30504
  return {
30380
30505
  labelField: labelFieldRef,
30506
+ nodeProps: nodePropsRef,
30381
30507
  renderLabel: renderLabelRef,
30382
30508
  renderOption: renderOptionRef
30383
30509
  };
@@ -30387,11 +30513,14 @@
30387
30513
  clsPrefix,
30388
30514
  renderLabel,
30389
30515
  renderOption,
30516
+ nodeProps,
30390
30517
  tmNode: { rawNode }
30391
30518
  } = this;
30519
+ const attrs = nodeProps?.(rawNode);
30392
30520
  const children = renderLabel ? renderLabel(rawNode, false) : render$1(rawNode[this.labelField], rawNode, false);
30393
30521
  const node = /* @__PURE__ */ vue.h("div", {
30394
- class: `${clsPrefix}-base-select-group-header`
30522
+ ...attrs,
30523
+ class: [`${clsPrefix}-base-select-group-header`, attrs?.class]
30395
30524
  }, children);
30396
30525
  return rawNode.render ? rawNode.render({ node, option: rawNode }) : renderOption ? renderOption({ node, option: rawNode, selected: false }) : node;
30397
30526
  }
@@ -30552,7 +30681,6 @@
30552
30681
  type: [String, Number, Array],
30553
30682
  default: null
30554
30683
  },
30555
- width: [Number, String],
30556
30684
  autoPending: Boolean,
30557
30685
  virtualScroll: {
30558
30686
  type: Boolean,
@@ -30574,6 +30702,7 @@
30574
30702
  focusable: Boolean,
30575
30703
  renderLabel: Function,
30576
30704
  renderOption: Function,
30705
+ nodeProps: Function,
30577
30706
  showCheckmark: { type: Boolean, default: true },
30578
30707
  onMousedown: Function,
30579
30708
  onScroll: Function,
@@ -30766,12 +30895,13 @@
30766
30895
  handleOptionMouseEnter,
30767
30896
  handleOptionClick,
30768
30897
  valueSetRef,
30898
+ pendingTmNodeRef: pendingNodeRef,
30899
+ nodePropsRef: vue.toRef(props, "nodeProps"),
30769
30900
  showCheckmarkRef: vue.toRef(props, "showCheckmark"),
30770
30901
  multipleRef: vue.toRef(props, "multiple"),
30771
30902
  valueRef: vue.toRef(props, "value"),
30772
30903
  renderLabelRef: vue.toRef(props, "renderLabel"),
30773
30904
  renderOptionRef: vue.toRef(props, "renderOption"),
30774
- pendingTmNodeRef: pendingNodeRef,
30775
30905
  labelFieldRef: vue.toRef(props, "labelField"),
30776
30906
  valueFieldRef: vue.toRef(props, "valueField")
30777
30907
  });
@@ -30891,10 +31021,7 @@
30891
31021
  themeClass,
30892
31022
  this.multiple && `${clsPrefix}-base-select-menu--multiple`
30893
31023
  ],
30894
- style: [
30895
- { width: formatLength(this.width) },
30896
- this.cssVars
30897
- ],
31024
+ style: this.cssVars,
30898
31025
  onFocusin: this.handleFocusin,
30899
31026
  onFocusout: this.handleFocusout,
30900
31027
  onKeyup: this.handleKeyUp,
@@ -31307,6 +31434,7 @@
31307
31434
  scrollable: Boolean,
31308
31435
  contentStyle: [Object, String],
31309
31436
  headerStyle: [Object, String],
31437
+ internalDeactivateImmediately: Boolean,
31310
31438
  animated: Boolean,
31311
31439
  onClickoutside: Function,
31312
31440
  internalTrapFocus: Boolean,
@@ -31339,7 +31467,7 @@
31339
31467
  const displayedRef = vue.ref(false);
31340
31468
  vue.watchEffect(() => {
31341
31469
  const { show } = props;
31342
- if (show && !isJsdom()) {
31470
+ if (show && !isJsdom() && !props.internalDeactivateImmediately) {
31343
31471
  displayedRef.value = true;
31344
31472
  }
31345
31473
  });
@@ -31376,14 +31504,22 @@
31376
31504
  return directives;
31377
31505
  });
31378
31506
  const styleRef = vue.computed(() => {
31379
- return [
31380
- {
31381
- width: props.width === "trigger" ? "" : formatLength(props.width)
31382
- },
31383
- props.maxWidth ? { maxWidth: formatLength(props.maxWidth) } : {},
31384
- props.minWidth ? { minWidth: formatLength(props.minWidth) } : {},
31385
- inlineThemeDisabled ? void 0 : cssVarsRef.value
31386
- ];
31507
+ const width = props.width === "trigger" ? void 0 : formatLength(props.width);
31508
+ const style2 = [];
31509
+ if (width) {
31510
+ style2.push({ width });
31511
+ }
31512
+ const { maxWidth, minWidth } = props;
31513
+ if (maxWidth) {
31514
+ style2.push({ maxWidth: formatLength(maxWidth) });
31515
+ }
31516
+ if (minWidth) {
31517
+ style2.push({ maxWidth: formatLength(minWidth) });
31518
+ }
31519
+ if (!inlineThemeDisabled) {
31520
+ style2.push(cssVarsRef.value);
31521
+ }
31522
+ return style2;
31387
31523
  });
31388
31524
  const cssVarsRef = vue.computed(() => {
31389
31525
  const {
@@ -31675,6 +31811,7 @@
31675
31811
  onClickoutside: Function,
31676
31812
  "onUpdate:show": [Function, Array],
31677
31813
  onUpdateShow: [Function, Array],
31814
+ internalDeactivateImmediately: Boolean,
31678
31815
  internalSyncTargetWithParent: Boolean,
31679
31816
  internalInheritedEventHandlers: {
31680
31817
  type: Array,
@@ -33397,7 +33534,6 @@
33397
33534
  inputProps: Object,
33398
33535
  focused: Boolean,
33399
33536
  renderTag: Function,
33400
- onKeyup: Function,
33401
33537
  onKeydown: Function,
33402
33538
  onClick: Function,
33403
33539
  onBlur: Function,
@@ -34041,7 +34177,6 @@
34041
34177
  onClick: this.onClick,
34042
34178
  onMouseenter: this.handleMouseEnter,
34043
34179
  onMouseleave: this.handleMouseLeave,
34044
- onKeyup: this.onKeyup,
34045
34180
  onKeydown: this.onKeydown,
34046
34181
  onFocusin: this.handleFocusin,
34047
34182
  onFocusout: this.handleFocusout,
@@ -35738,8 +35873,88 @@
35738
35873
 
35739
35874
  return count;
35740
35875
  }
35741
- function isEmptyValue$1(value) {
35742
- return ["", void 0, null].includes(value);
35876
+ function isEmptyInputValue(value) {
35877
+ return value === "" || value == null;
35878
+ }
35879
+ function useCursor(inputElRef) {
35880
+ const selectionRef = vue.ref(null);
35881
+
35882
+ function recordCursor() {
35883
+ const {
35884
+ value: input
35885
+ } = inputElRef;
35886
+
35887
+ if (!input || !input.focus) {
35888
+ reset();
35889
+ return;
35890
+ }
35891
+
35892
+ const {
35893
+ selectionStart,
35894
+ selectionEnd,
35895
+ value
35896
+ } = input;
35897
+
35898
+ if (selectionStart == null || selectionEnd == null) {
35899
+ reset();
35900
+ return;
35901
+ }
35902
+
35903
+ selectionRef.value = {
35904
+ start: selectionStart,
35905
+ end: selectionEnd,
35906
+ beforeText: value.slice(0, selectionStart),
35907
+ afterText: value.slice(selectionEnd)
35908
+ };
35909
+ }
35910
+
35911
+ function restoreCursor() {
35912
+ const {
35913
+ value: selection
35914
+ } = selectionRef;
35915
+ const {
35916
+ value: inputEl
35917
+ } = inputElRef;
35918
+
35919
+ if (!selection || !inputEl) {
35920
+ return;
35921
+ }
35922
+
35923
+ const {
35924
+ value
35925
+ } = inputEl;
35926
+ const {
35927
+ start,
35928
+ beforeText,
35929
+ afterText
35930
+ } = selection;
35931
+ let startPos = value.length;
35932
+
35933
+ if (value.endsWith(afterText)) {
35934
+ startPos = value.length - afterText.length;
35935
+ } else if (value.startsWith(beforeText)) {
35936
+ startPos = beforeText.length;
35937
+ } else {
35938
+ const beforeLastChar = beforeText[start - 1];
35939
+ const newIndex = value.indexOf(beforeLastChar, start - 1);
35940
+
35941
+ if (newIndex !== -1) {
35942
+ startPos = newIndex + 1;
35943
+ }
35944
+ }
35945
+
35946
+ inputEl.setSelectionRange?.(startPos, startPos);
35947
+ }
35948
+
35949
+ function reset() {
35950
+ selectionRef.value = null;
35951
+ }
35952
+
35953
+ vue.watch(inputElRef, reset);
35954
+ return {
35955
+ recordCursor,
35956
+ restoreCursor
35957
+ };
35743
35958
  }
35744
35959
 
35745
35960
  var WordCount = vue.defineComponent({
@@ -36049,6 +36264,7 @@
36049
36264
  type: Boolean,
36050
36265
  default: void 0
36051
36266
  },
36267
+ allowInput: Function,
36052
36268
  onMousedown: Function,
36053
36269
  onKeydown: Function,
36054
36270
  onKeyup: Function,
@@ -36101,6 +36317,8 @@
36101
36317
  const inputMirrorElRef = vue.ref(null);
36102
36318
  const inputElRef = vue.ref(null);
36103
36319
  const inputEl2Ref = vue.ref(null);
36320
+ const currentFocusedInputRef = vue.ref(null);
36321
+ const focusedInputCursorControl = useCursor(currentFocusedInputRef);
36104
36322
  const textareaScrollbarInstRef = vue.ref(null);
36105
36323
  const { localeRef } = useLocale("Input");
36106
36324
  const uncontrolledValueRef = vue.ref(props.defaultValue);
@@ -36132,13 +36350,13 @@
36132
36350
  const { value: isComposing } = isComposingRef;
36133
36351
  const { value: mergedValue } = mergedValueRef;
36134
36352
  const { value: mergedPlaceholder } = mergedPlaceholderRef;
36135
- return !isComposing && (isEmptyValue$1(mergedValue) || Array.isArray(mergedValue) && isEmptyValue$1(mergedValue[0])) && mergedPlaceholder[0];
36353
+ return !isComposing && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[0])) && mergedPlaceholder[0];
36136
36354
  });
36137
36355
  const showPlaceholder2Ref = vue.computed(() => {
36138
36356
  const { value: isComposing } = isComposingRef;
36139
36357
  const { value: mergedValue } = mergedValueRef;
36140
36358
  const { value: mergedPlaceholder } = mergedPlaceholderRef;
36141
- return !isComposing && mergedPlaceholder[1] && (isEmptyValue$1(mergedValue) || Array.isArray(mergedValue) && isEmptyValue$1(mergedValue[1]));
36359
+ return !isComposing && mergedPlaceholder[1] && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[1]));
36142
36360
  });
36143
36361
  const mergedFocusRef = useMemo(() => {
36144
36362
  return props.internalForceFocus || focusedRef.value;
@@ -36321,20 +36539,33 @@
36321
36539
  syncSource = targetValue;
36322
36540
  if (isComposingRef.value)
36323
36541
  return;
36324
- const changedValue = targetValue;
36325
- if (!props.pair) {
36326
- event === "input" ? doUpdateValue(changedValue) : doChange(changedValue);
36327
- } else {
36328
- let { value } = mergedValueRef;
36329
- if (!Array.isArray(value)) {
36330
- value = ["", ""];
36542
+ focusedInputCursorControl.recordCursor();
36543
+ const isIncomingValueValid = allowInput(targetValue);
36544
+ if (isIncomingValueValid) {
36545
+ if (!props.pair) {
36546
+ event === "input" ? doUpdateValue(targetValue) : doChange(targetValue);
36331
36547
  } else {
36332
- value = [...value];
36548
+ let { value } = mergedValueRef;
36549
+ if (!Array.isArray(value)) {
36550
+ value = ["", ""];
36551
+ } else {
36552
+ value = [value[0], value[1]];
36553
+ }
36554
+ value[index] = targetValue;
36555
+ event === "input" ? doUpdateValue(value) : doChange(value);
36333
36556
  }
36334
- value[index] = changedValue;
36335
- event === "input" ? doUpdateValue(value) : doChange(value);
36336
36557
  }
36337
36558
  vm.$forceUpdate();
36559
+ if (!isIncomingValueValid) {
36560
+ void vue.nextTick(focusedInputCursorControl.restoreCursor);
36561
+ }
36562
+ }
36563
+ function allowInput(value) {
36564
+ const { allowInput: allowInput2 } = props;
36565
+ if (typeof allowInput2 === "function") {
36566
+ return allowInput2(value);
36567
+ }
36568
+ return true;
36338
36569
  }
36339
36570
  function handleInputBlur(e) {
36340
36571
  doUpdateValueBlur(e);
@@ -36345,13 +36576,21 @@
36345
36576
  activatedRef.value = false;
36346
36577
  }
36347
36578
  dealWithEvent(e, "blur");
36579
+ currentFocusedInputRef.value = null;
36348
36580
  }
36349
- function handleInputFocus(e) {
36581
+ function handleInputFocus(e, index) {
36350
36582
  doUpdateValueFocus(e);
36351
36583
  focusedRef.value = true;
36352
36584
  activatedRef.value = true;
36353
36585
  doActivate();
36354
36586
  dealWithEvent(e, "focus");
36587
+ if (index === 0) {
36588
+ currentFocusedInputRef.value = inputElRef.value;
36589
+ } else if (index === 1) {
36590
+ currentFocusedInputRef.value = inputEl2Ref.value;
36591
+ } else if (index === 2) {
36592
+ currentFocusedInputRef.value = textareaElRef.value;
36593
+ }
36355
36594
  }
36356
36595
  function handleWrapperBlur(e) {
36357
36596
  if (props.passivelyActivated) {
@@ -36452,23 +36691,23 @@
36452
36691
  };
36453
36692
  on("mouseup", document, hidePassword);
36454
36693
  }
36455
- function handleWrapperKeyDown(e) {
36694
+ function handleWrapperKeydown(e) {
36456
36695
  props.onKeydown?.(e);
36457
36696
  switch (e.key) {
36458
36697
  case "Escape":
36459
- handleWrapperKeyDownEsc();
36698
+ handleWrapperKeydownEsc();
36460
36699
  break;
36461
36700
  case "Enter":
36462
- handleWrapperKeyDownEnter(e);
36701
+ handleWrapperKeydownEnter(e);
36463
36702
  break;
36464
36703
  }
36465
36704
  }
36466
- function handleWrapperKeyDownEnter(e) {
36705
+ function handleWrapperKeydownEnter(e) {
36467
36706
  if (props.passivelyActivated) {
36468
36707
  const { value: focused } = activatedRef;
36469
36708
  if (focused) {
36470
36709
  if (props.internalDeactivateOnEnter) {
36471
- handleWrapperKeyDownEsc();
36710
+ handleWrapperKeydownEsc();
36472
36711
  }
36473
36712
  return;
36474
36713
  }
@@ -36480,7 +36719,7 @@
36480
36719
  }
36481
36720
  }
36482
36721
  }
36483
- function handleWrapperKeyDownEsc() {
36722
+ function handleWrapperKeydownEsc() {
36484
36723
  if (props.passivelyActivated) {
36485
36724
  activatedRef.value = false;
36486
36725
  void vue.nextTick(() => {
@@ -36518,7 +36757,7 @@
36518
36757
  function deactivate() {
36519
36758
  const { value: wrapperEl } = wrapperElRef;
36520
36759
  if (wrapperEl?.contains(document.activeElement) && wrapperEl !== document.activeElement) {
36521
- handleWrapperKeyDownEsc();
36760
+ handleWrapperKeydownEsc();
36522
36761
  }
36523
36762
  }
36524
36763
  function syncMirror(value) {
@@ -36746,7 +36985,7 @@
36746
36985
  handleClear,
36747
36986
  handlePasswordToggleClick,
36748
36987
  handlePasswordToggleMousedown,
36749
- handleWrapperKeyDown,
36988
+ handleWrapperKeydown,
36750
36989
  handleTextAreaMirrorResize,
36751
36990
  getTextareaScrollContainer: () => {
36752
36991
  return textareaElRef.value;
@@ -36790,7 +37029,7 @@
36790
37029
  onCompositionstart: this.handleCompositionStart,
36791
37030
  onCompositionend: this.handleCompositionEnd,
36792
37031
  onKeyup: this.onKeyup,
36793
- onKeydown: this.handleWrapperKeyDown
37032
+ onKeydown: this.handleWrapperKeydown
36794
37033
  }, /* @__PURE__ */ vue.h("div", {
36795
37034
  class: `${mergedClsPrefix}-input-wrapper`
36796
37035
  }, resolveWrappedSlot($slots.prefix, (children) => children && /* @__PURE__ */ vue.h("div", {
@@ -36829,7 +37068,7 @@
36829
37068
  scrollContainerWidthStyle
36830
37069
  ],
36831
37070
  onBlur: this.handleInputBlur,
36832
- onFocus: this.handleInputFocus,
37071
+ onFocus: (e) => this.handleInputFocus(e, 2),
36833
37072
  onInput: this.handleInput,
36834
37073
  onChange: this.handleChange,
36835
37074
  onScroll: this.handleTextAreaScroll
@@ -36874,7 +37113,7 @@
36874
37113
  autofocus: this.autofocus,
36875
37114
  size: this.attrSize,
36876
37115
  onBlur: this.handleInputBlur,
36877
- onFocus: this.handleInputFocus,
37116
+ onFocus: (e) => this.handleInputFocus(e, 0),
36878
37117
  onInput: (e) => this.handleInput(e, 0),
36879
37118
  onChange: (e) => this.handleChange(e, 0)
36880
37119
  }), this.showPlaceholder1 ? /* @__PURE__ */ vue.h("div", {
@@ -36942,7 +37181,7 @@
36942
37181
  readonly: this.readonly,
36943
37182
  style: this.textDecorationStyle[1],
36944
37183
  onBlur: this.handleInputBlur,
36945
- onFocus: this.handleInputFocus,
37184
+ onFocus: (e) => this.handleInputFocus(e, 1),
36946
37185
  onInput: (e) => this.handleInput(e, 1),
36947
37186
  onChange: (e) => this.handleChange(e, 1)
36948
37187
  }), this.showPlaceholder2 ? /* @__PURE__ */ vue.h("div", {
@@ -39305,11 +39544,14 @@
39305
39544
  return props.focusable && !props.disabled;
39306
39545
  });
39307
39546
  const handleMousedown = (e) => {
39308
- if (props.disabled || props.nativeFocusBehavior) {
39547
+ if (props.nativeFocusBehavior) {
39548
+ return;
39549
+ }
39550
+ e.preventDefault();
39551
+ if (props.disabled) {
39309
39552
  return;
39310
39553
  }
39311
39554
  if (mergedFocusableRef.value) {
39312
- e.preventDefault();
39313
39555
  selfElRef.value?.focus({ preventScroll: true });
39314
39556
  }
39315
39557
  };
@@ -50156,7 +50398,7 @@
50156
50398
  type: Function,
50157
50399
  required: true
50158
50400
  },
50159
- onKeyup: {
50401
+ onKeydown: {
50160
50402
  type: Function,
50161
50403
  required: true
50162
50404
  },
@@ -50248,10 +50490,7 @@
50248
50490
  onMousedown: this.onMousedown,
50249
50491
  onFocusin: this.handleFocusin,
50250
50492
  onFocusout: this.handleFocusout,
50251
- onKeyup: this.onKeyup,
50252
- style: {
50253
- "--n-col-count": this.menuModel.length
50254
- }
50493
+ onKeydown: this.onKeydown
50255
50494
  }, this.menuModel[0].length ? /* @__PURE__ */ vue.h("div", {
50256
50495
  class: `${mergedClsPrefix}-cascader-submenu-wrapper`
50257
50496
  }, this.menuModel.map((submenuOptions, index) => /* @__PURE__ */ vue.h(NCascaderSubmenu, {
@@ -50804,6 +51043,8 @@
50804
51043
  doUpdateValue(checkedKeys, checkedKeys.map((checkedKey) => getNode(checkedKey)?.rawNode || null), checkedKeys.map((checkedKey) => getRawNodePath(getPath(checkedKey)?.treeNodePath)));
50805
51044
  if (filterable)
50806
51045
  focusSelectionInput();
51046
+ keyboardKeyRef.value = key;
51047
+ hoverKeyRef.value = key;
50807
51048
  } catch (err) {
50808
51049
  if (err instanceof SubtreeNotLoadedError) {
50809
51050
  if (cascaderMenuInstRef.value) {
@@ -50843,6 +51084,8 @@
50843
51084
  allowNotLoaded: props.allowCheckingNotLoaded
50844
51085
  });
50845
51086
  doUpdateValue(checkedKeys, checkedKeys.map((checkedKey) => getNode(checkedKey)?.rawNode || null), checkedKeys.map((checkedKey) => getRawNodePath(getPath(checkedKey)?.treeNodePath)));
51087
+ keyboardKeyRef.value = key;
51088
+ hoverKeyRef.value = key;
50846
51089
  }
50847
51090
  }
50848
51091
  const selectedOptionsRef = vue.computed(() => {
@@ -51059,7 +51302,17 @@
51059
51302
  break;
51060
51303
  }
51061
51304
  }
51062
- function handleKeyUp(e) {
51305
+ function handleKeydown(e) {
51306
+ switch (e.key) {
51307
+ case " ":
51308
+ case "ArrowDown":
51309
+ case "ArrowUp":
51310
+ if (props.filterable && mergedShowRef.value) {
51311
+ break;
51312
+ }
51313
+ e.preventDefault();
51314
+ break;
51315
+ }
51063
51316
  if (happensIn(e, "action"))
51064
51317
  return;
51065
51318
  switch (e.key) {
@@ -51127,11 +51380,14 @@
51127
51380
  }
51128
51381
  break;
51129
51382
  case "Escape":
51130
- closeMenu(true);
51383
+ if (mergedShowRef.value) {
51384
+ markEventEffectPerformed(e);
51385
+ closeMenu(true);
51386
+ }
51131
51387
  }
51132
51388
  }
51133
- function handleMenuKeyUp(e) {
51134
- handleKeyUp(e);
51389
+ function handleMenuKeydown(e) {
51390
+ handleKeydown(e);
51135
51391
  }
51136
51392
  function handleClear(e) {
51137
51393
  e.stopPropagation();
@@ -51200,18 +51456,6 @@
51200
51456
  doUpdateValue(null, null, null);
51201
51457
  }
51202
51458
  }
51203
- function handleKeyDown(e) {
51204
- switch (e.key) {
51205
- case " ":
51206
- case "ArrowDown":
51207
- case "ArrowUp":
51208
- if (props.filterable && mergedShowRef.value) {
51209
- return;
51210
- }
51211
- e.preventDefault();
51212
- break;
51213
- }
51214
- }
51215
51459
  function syncSelectMenuPosition() {
51216
51460
  selectMenuFollowerRef.value?.syncPosition();
51217
51461
  }
@@ -51339,7 +51583,7 @@
51339
51583
  handleMenuTabout,
51340
51584
  handleMenuFocus,
51341
51585
  handleMenuBlur,
51342
- handleMenuKeyUp,
51586
+ handleMenuKeydown,
51343
51587
  handleMenuMousedown,
51344
51588
  handleTriggerFocus,
51345
51589
  handleTriggerBlur,
@@ -51347,8 +51591,7 @@
51347
51591
  handleClear,
51348
51592
  handleDeleteOption,
51349
51593
  handlePatternInput,
51350
- handleKeyDown,
51351
- handleKeyUp,
51594
+ handleKeydown,
51352
51595
  focused: focusedRef,
51353
51596
  optionHeight: optionHeightRef,
51354
51597
  mergedTheme: themeRef,
@@ -51390,8 +51633,7 @@
51390
51633
  onClear: this.handleClear,
51391
51634
  onDeleteOption: this.handleDeleteOption,
51392
51635
  onPatternInput: this.handlePatternInput,
51393
- onKeydown: this.handleKeyDown,
51394
- onKeyup: this.handleKeyUp
51636
+ onKeydown: this.handleKeydown
51395
51637
  })
51396
51638
  }),
51397
51639
  /* @__PURE__ */ vue.h(VFollower, {
@@ -51420,7 +51662,7 @@
51420
51662
  ],
51421
51663
  onFocus: this.handleMenuFocus,
51422
51664
  onBlur: this.handleMenuBlur,
51423
- onKeyup: this.handleMenuKeyUp,
51665
+ onKeydown: this.handleMenuKeydown,
51424
51666
  onMousedown: this.handleMenuMousedown,
51425
51667
  onTabout: this.handleMenuTabout
51426
51668
  }, {
@@ -52688,6 +52930,15 @@
52688
52930
  }
52689
52931
  });
52690
52932
 
52933
+ const popselect = {
52934
+ name: "Popselect",
52935
+ common: derived$1,
52936
+ peers: {
52937
+ Popover: popoverDark,
52938
+ InternalSelectMenu: internalSelectMenuDark
52939
+ }
52940
+ };
52941
+
52691
52942
  function self$O(vars) {
52692
52943
  const {
52693
52944
  boxShadow2
@@ -52696,6 +52947,287 @@
52696
52947
  menuBoxShadow: boxShadow2
52697
52948
  };
52698
52949
  }
52950
+ const popselectLight = createTheme$1({
52951
+ name: "Popselect",
52952
+ common: derived,
52953
+ peers: {
52954
+ Popover: popoverLight,
52955
+ InternalSelectMenu: internalSelectMenuLight
52956
+ },
52957
+ self: self$O
52958
+ });
52959
+
52960
+ const popselectInjectionKey = createInjectionKey("n-popselect");
52961
+
52962
+ var style$_ = cB("popselect-menu", `
52963
+ box-shadow: var(--n-menu-box-shadow);
52964
+ `);
52965
+
52966
+ const panelProps$1 = {
52967
+ multiple: Boolean,
52968
+ value: {
52969
+ type: [String, Number, Array],
52970
+ default: null
52971
+ },
52972
+ cancelable: Boolean,
52973
+ options: {
52974
+ type: Array,
52975
+ default: () => []
52976
+ },
52977
+ size: {
52978
+ type: String,
52979
+ default: "medium"
52980
+ },
52981
+ scrollable: Boolean,
52982
+ "onUpdate:value": [Function, Array],
52983
+ onUpdateValue: [Function, Array],
52984
+ onMouseenter: Function,
52985
+ onMouseleave: Function,
52986
+ renderLabel: Function,
52987
+ internalShowCheckmark: {
52988
+ type: Boolean,
52989
+ default: void 0
52990
+ },
52991
+ nodeProps: Function,
52992
+ virtualScroll: Boolean,
52993
+ onChange: [Function, Array]
52994
+ };
52995
+ const panelPropKeys$1 = keysOf(panelProps$1);
52996
+ var NPopselectPanel = vue.defineComponent({
52997
+ name: "PopselectPanel",
52998
+ props: panelProps$1,
52999
+ setup(props) {
53000
+ {
53001
+ vue.watchEffect(() => {
53002
+ if (props.onChange !== void 0) {
53003
+ warn$2("popselect", "`on-change` is deprecated, please use `on-update:value` instead.");
53004
+ }
53005
+ });
53006
+ }
53007
+ const NPopselect = vue.inject(popselectInjectionKey);
53008
+ const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
53009
+ const themeRef = useTheme("Popselect", "-pop-select", style$_, popselectLight, NPopselect.props, mergedClsPrefixRef);
53010
+ const treeMateRef = vue.computed(() => {
53011
+ return createTreeMate(props.options, createTmOptions("value", "children"));
53012
+ });
53013
+ function doUpdateValue(value, option) {
53014
+ const {
53015
+ onUpdateValue,
53016
+ "onUpdate:value": _onUpdateValue,
53017
+ onChange
53018
+ } = props;
53019
+ if (onUpdateValue)
53020
+ call(onUpdateValue, value, option);
53021
+ if (_onUpdateValue) {
53022
+ call(_onUpdateValue, value, option);
53023
+ }
53024
+ if (onChange)
53025
+ call(onChange, value, option);
53026
+ }
53027
+ function handleToggle(tmNode) {
53028
+ toggle(tmNode.key);
53029
+ }
53030
+ function handleMenuMousedown(e) {
53031
+ if (!happensIn(e, "action"))
53032
+ e.preventDefault();
53033
+ }
53034
+ function toggle(value) {
53035
+ const {
53036
+ value: { getNode }
53037
+ } = treeMateRef;
53038
+ if (props.multiple) {
53039
+ if (Array.isArray(props.value)) {
53040
+ const newValue = [];
53041
+ const newOptions = [];
53042
+ let shouldAddValue = true;
53043
+ props.value.forEach((v) => {
53044
+ if (v === value) {
53045
+ shouldAddValue = false;
53046
+ return;
53047
+ }
53048
+ const tmNode = getNode(v);
53049
+ if (tmNode) {
53050
+ newValue.push(tmNode.key);
53051
+ newOptions.push(tmNode.rawNode);
53052
+ }
53053
+ });
53054
+ if (shouldAddValue) {
53055
+ newValue.push(value);
53056
+ newOptions.push(getNode(value).rawNode);
53057
+ }
53058
+ doUpdateValue(newValue, newOptions);
53059
+ } else {
53060
+ const tmNode = getNode(value);
53061
+ if (tmNode) {
53062
+ doUpdateValue([value], [tmNode.rawNode]);
53063
+ }
53064
+ }
53065
+ } else {
53066
+ if (props.value === value && props.cancelable) {
53067
+ doUpdateValue(null, null);
53068
+ } else {
53069
+ const tmNode = getNode(value);
53070
+ if (tmNode) {
53071
+ doUpdateValue(value, tmNode.rawNode);
53072
+ }
53073
+ const { "onUpdate:show": _onUpdateShow, onUpdateShow } = NPopselect.props;
53074
+ if (_onUpdateShow)
53075
+ call(_onUpdateShow, false);
53076
+ if (onUpdateShow)
53077
+ call(onUpdateShow, false);
53078
+ NPopselect.setShow(false);
53079
+ }
53080
+ }
53081
+ void vue.nextTick(() => {
53082
+ NPopselect.syncPosition();
53083
+ });
53084
+ }
53085
+ vue.watch(vue.toRef(props, "options"), () => {
53086
+ void vue.nextTick(() => {
53087
+ NPopselect.syncPosition();
53088
+ });
53089
+ });
53090
+ const cssVarsRef = vue.computed(() => {
53091
+ const {
53092
+ self: { menuBoxShadow }
53093
+ } = themeRef.value;
53094
+ return {
53095
+ "--n-menu-box-shadow": menuBoxShadow
53096
+ };
53097
+ });
53098
+ const themeClassHandle = inlineThemeDisabled ? useThemeClass("select", void 0, cssVarsRef, NPopselect.props) : void 0;
53099
+ return {
53100
+ mergedTheme: NPopselect.mergedThemeRef,
53101
+ mergedClsPrefix: mergedClsPrefixRef,
53102
+ treeMate: treeMateRef,
53103
+ handleToggle,
53104
+ handleMenuMousedown,
53105
+ cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
53106
+ themeClass: themeClassHandle?.themeClass,
53107
+ onRender: themeClassHandle?.onRender
53108
+ };
53109
+ },
53110
+ render() {
53111
+ this.onRender?.();
53112
+ return /* @__PURE__ */ vue.h(NInternalSelectMenu, {
53113
+ clsPrefix: this.mergedClsPrefix,
53114
+ focusable: true,
53115
+ nodeProps: this.nodeProps,
53116
+ class: [`${this.mergedClsPrefix}-popselect-menu`, this.themeClass],
53117
+ style: this.cssVars,
53118
+ theme: this.mergedTheme.peers.InternalSelectMenu,
53119
+ themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu,
53120
+ multiple: this.multiple,
53121
+ treeMate: this.treeMate,
53122
+ size: this.size,
53123
+ value: this.value,
53124
+ virtualScroll: this.virtualScroll,
53125
+ scrollable: this.scrollable,
53126
+ renderLabel: this.renderLabel,
53127
+ onToggle: this.handleToggle,
53128
+ onMouseenter: this.onMouseenter,
53129
+ onMouseleave: this.onMouseenter,
53130
+ onMousedown: this.handleMenuMousedown,
53131
+ showCheckmark: this.internalShowCheckmark
53132
+ }, {
53133
+ action: () => this.$slots.action?.() || [],
53134
+ empty: () => this.$slots.empty?.() || []
53135
+ });
53136
+ }
53137
+ });
53138
+
53139
+ const popselectProps = {
53140
+ ...useTheme.props,
53141
+ ...omit(popoverBaseProps, ["showArrow", "arrow"]),
53142
+ placement: {
53143
+ ...popoverBaseProps.placement,
53144
+ default: "bottom"
53145
+ },
53146
+ trigger: {
53147
+ type: String,
53148
+ default: "hover"
53149
+ },
53150
+ ...panelProps$1
53151
+ };
53152
+ var NPopselect = vue.defineComponent({
53153
+ name: "Popselect",
53154
+ props: popselectProps,
53155
+ inheritAttrs: false,
53156
+ __popover__: true,
53157
+ setup(props) {
53158
+ const themeRef = useTheme("Popselect", "-popselect", void 0, popselectLight, props);
53159
+ const popoverInstRef = vue.ref(null);
53160
+ function syncPosition() {
53161
+ popoverInstRef.value?.syncPosition();
53162
+ }
53163
+ function setShow(value) {
53164
+ popoverInstRef.value?.setShow(value);
53165
+ }
53166
+ vue.provide(popselectInjectionKey, {
53167
+ props,
53168
+ mergedThemeRef: themeRef,
53169
+ syncPosition,
53170
+ setShow
53171
+ });
53172
+ const exposedMethods = {
53173
+ syncPosition,
53174
+ setShow
53175
+ };
53176
+ return {
53177
+ ...exposedMethods,
53178
+ popoverInstRef,
53179
+ mergedTheme: themeRef
53180
+ };
53181
+ },
53182
+ render() {
53183
+ const { mergedTheme } = this;
53184
+ const popoverProps = {
53185
+ theme: mergedTheme.peers.Popover,
53186
+ themeOverrides: mergedTheme.peerOverrides.Popover,
53187
+ builtinThemeOverrides: {
53188
+ padding: "0"
53189
+ },
53190
+ ref: "popoverInstRef",
53191
+ internalRenderBody: (className, ref2, style, onMouseenter, onMouseleave) => {
53192
+ const { $attrs } = this;
53193
+ return /* @__PURE__ */ vue.h(NPopselectPanel, {
53194
+ ...$attrs,
53195
+ class: [$attrs.class, className],
53196
+ style: [$attrs.style, style],
53197
+ ...keep(this.$props, panelPropKeys$1),
53198
+ ref: createRefSetter(ref2),
53199
+ onMouseenter: mergeEventHandlers([
53200
+ onMouseenter,
53201
+ $attrs.onMouseenter
53202
+ ]),
53203
+ onMouseleave: mergeEventHandlers([
53204
+ onMouseleave,
53205
+ $attrs.onMouseleave
53206
+ ])
53207
+ }, {
53208
+ action: () => this.$slots.action?.(),
53209
+ empty: () => this.$slots.empty?.()
53210
+ });
53211
+ }
53212
+ };
53213
+ return /* @__PURE__ */ vue.h(NPopover, {
53214
+ ...omit(this.$props, panelPropKeys$1),
53215
+ ...popoverProps,
53216
+ internalDeactivateImmediately: true
53217
+ }, {
53218
+ trigger: () => this.$slots.default?.()
53219
+ });
53220
+ }
53221
+ });
53222
+
53223
+ function self$N(vars) {
53224
+ const {
53225
+ boxShadow2
53226
+ } = vars;
53227
+ return {
53228
+ menuBoxShadow: boxShadow2
53229
+ };
53230
+ }
52699
53231
  const selectLight = createTheme$1({
52700
53232
  name: "Select",
52701
53233
  common: derived,
@@ -52703,7 +53235,7 @@
52703
53235
  InternalSelection: internalSelectionLight,
52704
53236
  InternalSelectMenu: internalSelectMenuLight
52705
53237
  },
52706
- self: self$O
53238
+ self: self$N
52707
53239
  });
52708
53240
 
52709
53241
  const selectDark = {
@@ -52713,10 +53245,10 @@
52713
53245
  InternalSelection: internalSelectionDark,
52714
53246
  InternalSelectMenu: internalSelectMenuDark
52715
53247
  },
52716
- self: self$O
53248
+ self: self$N
52717
53249
  };
52718
53250
 
52719
- var style$_ = c$1([cB("select", `
53251
+ var style$Z = c$1([cB("select", `
52720
53252
  z-index: auto;
52721
53253
  outline: none;
52722
53254
  width: 100%;
@@ -52853,7 +53385,7 @@
52853
53385
  namespaceRef,
52854
53386
  inlineThemeDisabled
52855
53387
  } = useConfig(props);
52856
- const themeRef = useTheme("Select", "-select", style$_, selectLight, props, mergedClsPrefixRef);
53388
+ const themeRef = useTheme("Select", "-select", style$Z, selectLight, props, mergedClsPrefixRef);
52857
53389
  const uncontrolledValueRef = vue.ref(props.defaultValue);
52858
53390
  const controlledValueRef = vue.toRef(props, "value");
52859
53391
  const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
@@ -53290,7 +53822,10 @@
53290
53822
  }
53291
53823
  break;
53292
53824
  case "Escape":
53293
- closeMenu();
53825
+ if (mergedShowRef.value) {
53826
+ markEventEffectPerformed(e);
53827
+ closeMenu();
53828
+ }
53294
53829
  triggerRef.value?.focus();
53295
53830
  break;
53296
53831
  }
@@ -53540,7 +54075,7 @@
53540
54075
  suffixMarginLarge: "0 0 0 8px"
53541
54076
  };
53542
54077
 
53543
- const self$N = vars => {
54078
+ const self$M = vars => {
53544
54079
  const {
53545
54080
  textColor2,
53546
54081
  primaryColor,
@@ -53602,9 +54137,10 @@
53602
54137
  common: derived,
53603
54138
  peers: {
53604
54139
  Select: selectLight,
53605
- Input: inputLight
54140
+ Input: inputLight,
54141
+ Popselect: popselectLight
53606
54142
  },
53607
- self: self$N
54143
+ self: self$M
53608
54144
  });
53609
54145
 
53610
54146
  const paginationDark = {
@@ -53612,7 +54148,8 @@
53612
54148
  common: derived$1,
53613
54149
  peers: {
53614
54150
  Select: selectDark,
53615
- Input: inputDark
54151
+ Input: inputDark,
54152
+ Popselect: popselect
53616
54153
  },
53617
54154
 
53618
54155
  self(vars) {
@@ -53623,7 +54160,7 @@
53623
54160
  const borderColorActive = changeColor(primaryColor, {
53624
54161
  alpha: Number(opacity3)
53625
54162
  });
53626
- const commonSelf = self$N(vars);
54163
+ const commonSelf = self$M(vars);
53627
54164
  commonSelf.itemBorderActive = `1px solid ${borderColorActive}`;
53628
54165
  commonSelf.itemBorderDisabled = "1px solid #0000";
53629
54166
  return commonSelf;
@@ -53645,10 +54182,50 @@
53645
54182
  peers: [inputRtl]
53646
54183
  };
53647
54184
 
53648
- function pagesToShow(currentPage, pageCount) {
53649
- let pageSlot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 9;
53650
- if (pageCount === 1) return [1];
53651
- if (pageCount === 2) return [1, 2];
54185
+ function createPageItemsInfo(currentPage, pageCount, pageSlot) {
54186
+ let hasFastBackward = false;
54187
+ let hasFastForward = false;
54188
+ let fastBackwardTo = 1;
54189
+ let fastForwardTo = pageCount;
54190
+
54191
+ if (pageCount === 1) {
54192
+ return {
54193
+ hasFastBackward: false,
54194
+ hasFastForward: false,
54195
+ fastForwardTo,
54196
+ fastBackwardTo,
54197
+ items: [{
54198
+ type: "page",
54199
+ label: 1,
54200
+ active: currentPage === 1,
54201
+ mayBeFastBackward: false,
54202
+ mayBeFastForward: false
54203
+ }]
54204
+ };
54205
+ }
54206
+
54207
+ if (pageCount === 2) {
54208
+ return {
54209
+ hasFastBackward: false,
54210
+ hasFastForward: false,
54211
+ fastForwardTo,
54212
+ fastBackwardTo,
54213
+ items: [{
54214
+ type: "page",
54215
+ label: 1,
54216
+ active: currentPage === 1,
54217
+ mayBeFastBackward: false,
54218
+ mayBeFastForward: false
54219
+ }, {
54220
+ type: "page",
54221
+ label: 2,
54222
+ active: currentPage === 2,
54223
+ mayBeFastBackward: true,
54224
+ mayBeFastForward: false
54225
+ }]
54226
+ };
54227
+ }
54228
+
53652
54229
  const firstPage = 1;
53653
54230
  const lastPage = pageCount;
53654
54231
  let middleStart = currentPage;
@@ -53663,68 +54240,105 @@
53663
54240
  if (middleStart > firstPage + 2) leftSplit = true;
53664
54241
  if (middleEnd < lastPage - 2) rightSplit = true;
53665
54242
  const items = [];
53666
- items.push(firstPage);
54243
+ items.push({
54244
+ type: "page",
54245
+ label: 1,
54246
+ active: currentPage === 1,
54247
+ mayBeFastBackward: false,
54248
+ mayBeFastForward: false
54249
+ });
53667
54250
 
53668
54251
  if (leftSplit) {
53669
- items.push(-2);
54252
+ hasFastBackward = true;
54253
+ fastBackwardTo = middleStart - 1;
54254
+ items.push({
54255
+ type: "fast-backward",
54256
+ active: false,
54257
+ label: void 0,
54258
+ options: createRange(firstPage + 1, middleStart - 1)
54259
+ });
53670
54260
  } else if (lastPage >= firstPage + 1) {
53671
- items.push(firstPage + 1);
54261
+ items.push({
54262
+ type: "page",
54263
+ label: firstPage + 1,
54264
+ mayBeFastBackward: true,
54265
+ mayBeFastForward: false,
54266
+ active: currentPage === firstPage + 1
54267
+ });
53672
54268
  }
53673
54269
 
53674
54270
  for (let i = middleStart; i <= middleEnd; ++i) {
53675
- items.push(i);
54271
+ items.push({
54272
+ type: "page",
54273
+ label: i,
54274
+ mayBeFastBackward: false,
54275
+ mayBeFastForward: false,
54276
+ active: currentPage === i
54277
+ });
53676
54278
  }
53677
54279
 
53678
54280
  if (rightSplit) {
53679
- items.push(-1);
53680
- } else if (middleEnd === lastPage - 2 && items[items.length - 1] !== lastPage - 1) {
53681
- items.push(lastPage - 1);
54281
+ hasFastForward = true;
54282
+ fastForwardTo = middleEnd + 1;
54283
+ items.push({
54284
+ type: "fast-forward",
54285
+ active: false,
54286
+ label: void 0,
54287
+ options: createRange(middleEnd + 1, lastPage - 1)
54288
+ });
54289
+ } else if (middleEnd === lastPage - 2 && items[items.length - 1].label !== lastPage - 1) {
54290
+ items.push({
54291
+ type: "page",
54292
+ mayBeFastForward: true,
54293
+ mayBeFastBackward: false,
54294
+ label: lastPage - 1,
54295
+ active: currentPage === lastPage - 1
54296
+ });
53682
54297
  }
53683
54298
 
53684
- if (items[items.length - 1] !== lastPage) items.push(lastPage);
53685
- return items;
53686
- }
53687
-
53688
- function mapPagesToPageItems(pages, currentPage) {
53689
- return pages.map(page => {
53690
- switch (page) {
53691
- case -2:
53692
- return {
53693
- type: "fast-backward",
53694
- active: false
53695
- };
54299
+ if (items[items.length - 1].label !== lastPage) {
54300
+ items.push({
54301
+ type: "page",
54302
+ mayBeFastForward: false,
54303
+ mayBeFastBackward: false,
54304
+ label: lastPage,
54305
+ active: currentPage === lastPage
54306
+ });
54307
+ }
53696
54308
 
53697
- case -1:
53698
- return {
53699
- type: "fast-forward",
53700
- active: false
53701
- };
54309
+ return {
54310
+ hasFastBackward,
54311
+ hasFastForward,
54312
+ fastBackwardTo,
54313
+ fastForwardTo,
54314
+ items
54315
+ };
54316
+ }
53702
54317
 
53703
- default:
53704
- if (page === currentPage) {
53705
- return {
53706
- type: "page",
53707
- label: page,
53708
- active: true
53709
- };
53710
- } else {
53711
- return {
53712
- type: "page",
53713
- label: page,
53714
- active: false
53715
- };
53716
- }
54318
+ function createRange(from, to) {
54319
+ const range = [];
53717
54320
 
53718
- }
53719
- });
53720
- }
54321
+ for (let i = from; i <= to; ++i) {
54322
+ range.push({
54323
+ label: `${i}`,
54324
+ value: i
54325
+ });
54326
+ }
53721
54327
 
53722
- function pageItems(currentPage, pageCount, pageSlot) {
53723
- const pages = pagesToShow(currentPage, pageCount, pageSlot);
53724
- return mapPagesToPageItems(pages, currentPage);
54328
+ return range;
53725
54329
  }
53726
54330
 
53727
- var style$Z = cB("pagination", `
54331
+ const hoverStyleProps = `
54332
+ background: var(--n-item-color-hover);
54333
+ color: var(--n-item-text-color-hover);
54334
+ border: var(--n-item-border-hover);
54335
+ `;
54336
+ const hoverStyleChildren$1 = [cM("button", `
54337
+ background: var(--n-button-color-hover);
54338
+ border: var(--n-button-border-hover);
54339
+ color: var(--n-button-icon-color-hover);
54340
+ `)];
54341
+ var style$Y = cB("pagination", `
53728
54342
  display: flex;
53729
54343
  vertical-align: middle;
53730
54344
  font-size: var(--n-item-font-size);
@@ -53779,15 +54393,7 @@
53779
54393
  padding: 0;
53780
54394
  `, [cB("base-icon", `
53781
54395
  font-size: var(--n-button-icon-size);
53782
- `)]), cNotM("disabled", [c$1("&:hover", `
53783
- background: var(--n-item-color-hover);
53784
- color: var(--n-item-text-color-hover);
53785
- border: var(--n-item-border-hover);
53786
- `, [cM("button", `
53787
- background: var(--n-button-color-hover);
53788
- border: var(--n-button-border-hover);
53789
- color: var(--n-button-icon-color-hover);
53790
- `)]), c$1("&:active", `
54396
+ `)]), cNotM("disabled", [cM("hover", hoverStyleProps, hoverStyleChildren$1), c$1("&:hover", hoverStyleProps, hoverStyleChildren$1), c$1("&:active", `
53791
54397
  background: var(--n-item-color-pressed);
53792
54398
  color: var(--n-item-text-color-pressed);
53793
54399
  border: var(--n-item-border-pressed);
@@ -53883,7 +54489,7 @@
53883
54489
  inlineThemeDisabled,
53884
54490
  mergedRtlRef
53885
54491
  } = useConfig(props);
53886
- const themeRef = useTheme("Pagination", "-pagination", style$Z, paginationLight, props, mergedClsPrefixRef);
54492
+ const themeRef = useTheme("Pagination", "-pagination", style$Y, paginationLight, props, mergedClsPrefixRef);
53887
54493
  const { localeRef } = useLocale("Pagination");
53888
54494
  const selfRef = vue.ref(null);
53889
54495
  const jumperRef = vue.ref(null);
@@ -53902,8 +54508,39 @@
53902
54508
  return Math.max(pageCount, 1);
53903
54509
  return 1;
53904
54510
  });
53905
- const showFastForwardRef = vue.ref(false);
53906
- const showFastBackwardRef = vue.ref(false);
54511
+ const fastForwardActiveRef = vue.ref(false);
54512
+ const fastBackwardActiveRef = vue.ref(false);
54513
+ const showFastForwardMenuRef = vue.ref(false);
54514
+ const showFastBackwardMenuRef = vue.ref(false);
54515
+ const handleFastForwardMouseenter = () => {
54516
+ fastForwardActiveRef.value = true;
54517
+ disableTransitionOneTick();
54518
+ };
54519
+ const handleFastForwardMouseleave = () => {
54520
+ fastForwardActiveRef.value = false;
54521
+ disableTransitionOneTick();
54522
+ };
54523
+ const handleFastBackwardMouseenter = () => {
54524
+ fastBackwardActiveRef.value = true;
54525
+ disableTransitionOneTick();
54526
+ };
54527
+ const handleFastBackwardMouseleave = () => {
54528
+ fastBackwardActiveRef.value = false;
54529
+ disableTransitionOneTick();
54530
+ };
54531
+ const handleMenuSelect = (value) => {
54532
+ doUpdatePage(value);
54533
+ };
54534
+ const pageItemsInfo = vue.computed(() => createPageItemsInfo(mergedPageRef.value, mergedPageCountRef.value, props.pageSlot));
54535
+ vue.watchEffect(() => {
54536
+ if (!pageItemsInfo.value.hasFastBackward) {
54537
+ fastBackwardActiveRef.value = false;
54538
+ showFastBackwardMenuRef.value = false;
54539
+ } else if (!pageItemsInfo.value.hasFastForward) {
54540
+ fastForwardActiveRef.value = false;
54541
+ showFastForwardMenuRef.value = false;
54542
+ }
54543
+ });
53907
54544
  const pageSizeOptionsRef = vue.computed(() => {
53908
54545
  const suffix = localeRef.value.selectionSuffix;
53909
54546
  return props.pageSizes.map((size) => {
@@ -53997,13 +54634,13 @@
53997
54634
  function fastForward() {
53998
54635
  if (props.disabled)
53999
54636
  return;
54000
- const page = Math.min(mergedPageRef.value + (props.pageSlot - 4), mergedPageCountRef.value);
54637
+ const page = Math.min(pageItemsInfo.value.fastForwardTo, mergedPageCountRef.value);
54001
54638
  doUpdatePage(page);
54002
54639
  }
54003
54640
  function fastBackward() {
54004
54641
  if (props.disabled)
54005
54642
  return;
54006
- const page = Math.max(mergedPageRef.value - (props.pageSlot - 4), 1);
54643
+ const page = Math.max(pageItemsInfo.value.fastBackwardTo, 1);
54007
54644
  doUpdatePage(page);
54008
54645
  }
54009
54646
  function handleSizePickerChange(value) {
@@ -54034,36 +54671,6 @@
54034
54671
  break;
54035
54672
  }
54036
54673
  }
54037
- function handlePageItemMouseEnter(pageItem) {
54038
- if (props.disabled)
54039
- return;
54040
- switch (pageItem.type) {
54041
- case "fast-backward":
54042
- showFastBackwardRef.value = true;
54043
- break;
54044
- case "fast-forward":
54045
- showFastForwardRef.value = true;
54046
- break;
54047
- default:
54048
- return;
54049
- }
54050
- disableTransitionOneTick();
54051
- }
54052
- function handlePageItemMouseLeave(pageItem) {
54053
- if (props.disabled)
54054
- return;
54055
- switch (pageItem.type) {
54056
- case "fast-backward":
54057
- showFastBackwardRef.value = false;
54058
- break;
54059
- case "fast-forward":
54060
- showFastForwardRef.value = false;
54061
- break;
54062
- default:
54063
- return;
54064
- }
54065
- disableTransitionOneTick();
54066
- }
54067
54674
  function handleJumperInput(value) {
54068
54675
  jumperValueRef.value = value.replace(/\D+/g, "");
54069
54676
  }
@@ -54180,9 +54787,9 @@
54180
54787
  selfRef,
54181
54788
  jumperRef,
54182
54789
  mergedPage: mergedPageRef,
54183
- showFastBackward: showFastBackwardRef,
54184
- showFastForward: showFastForwardRef,
54185
- pageItems: vue.computed(() => pageItems(mergedPageRef.value, mergedPageCountRef.value, props.pageSlot)),
54790
+ pageItems: vue.computed(() => {
54791
+ return pageItemsInfo.value.items;
54792
+ }),
54186
54793
  mergedItemCount: mergedItemCountRef,
54187
54794
  jumperValue: jumperValueRef,
54188
54795
  pageSizeOptions: pageSizeOptionsRef,
@@ -54193,14 +54800,21 @@
54193
54800
  mergedPageCount: mergedPageCountRef,
54194
54801
  startIndex: startIndexRef,
54195
54802
  endIndex: endIndexRef,
54803
+ showFastForwardMenu: showFastForwardMenuRef,
54804
+ showFastBackwardMenu: showFastBackwardMenuRef,
54805
+ fastForwardActive: fastForwardActiveRef,
54806
+ fastBackwardActive: fastBackwardActiveRef,
54807
+ handleMenuSelect,
54808
+ handleFastForwardMouseenter,
54809
+ handleFastForwardMouseleave,
54810
+ handleFastBackwardMouseenter,
54811
+ handleFastBackwardMouseleave,
54196
54812
  handleJumperInput,
54197
54813
  handleBackwardClick: backward,
54198
54814
  handleForwardClick: forward,
54199
54815
  handlePageItemClick,
54200
54816
  handleSizePickerChange,
54201
54817
  handleQuickJumperKeyUp,
54202
- handlePageItemMouseEnter,
54203
- handlePageItemMouseLeave,
54204
54818
  cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
54205
54819
  themeClass: themeClassHandle?.themeClass,
54206
54820
  onRender: themeClassHandle?.onRender
@@ -54214,9 +54828,7 @@
54214
54828
  cssVars,
54215
54829
  mergedPage,
54216
54830
  mergedPageCount,
54217
- pageItems: pageItems2,
54218
- showFastBackward,
54219
- showFastForward,
54831
+ pageItems,
54220
54832
  showSizePicker,
54221
54833
  showQuickJumper,
54222
54834
  mergedTheme,
@@ -54235,8 +54847,6 @@
54235
54847
  handleSizePickerChange,
54236
54848
  handleBackwardClick,
54237
54849
  handlePageItemClick,
54238
- handlePageItemMouseEnter,
54239
- handlePageItemMouseLeave,
54240
54850
  handleForwardClick,
54241
54851
  handleQuickJumperKeyUp,
54242
54852
  onRender
@@ -54283,9 +54893,12 @@
54283
54893
  clsPrefix: mergedClsPrefix
54284
54894
  }, {
54285
54895
  default: () => this.rtlEnabled ? /* @__PURE__ */ vue.h(ForwardIcon, null) : /* @__PURE__ */ vue.h(BackwardIcon, null)
54286
- })), pageItems2.map((pageItem, index) => {
54896
+ })), pageItems.map((pageItem, index) => {
54287
54897
  let contentNode;
54288
- switch (pageItem.type) {
54898
+ let onMouseenter;
54899
+ let onMouseleave;
54900
+ const { type } = pageItem;
54901
+ switch (type) {
54289
54902
  case "page":
54290
54903
  const pageNode = pageItem.label;
54291
54904
  if (renderLabel) {
@@ -54299,7 +54912,7 @@
54299
54912
  }
54300
54913
  break;
54301
54914
  case "fast-forward":
54302
- const fastForwardNode = showFastForward ? /* @__PURE__ */ vue.h(NBaseIcon, {
54915
+ const fastForwardNode = this.fastForwardActive ? /* @__PURE__ */ vue.h(NBaseIcon, {
54303
54916
  clsPrefix: mergedClsPrefix
54304
54917
  }, {
54305
54918
  default: () => this.rtlEnabled ? /* @__PURE__ */ vue.h(FastBackwardIcon, null) : /* @__PURE__ */ vue.h(FastForwardIcon, null)
@@ -54310,14 +54923,16 @@
54310
54923
  contentNode = renderLabel({
54311
54924
  type: "fast-forward",
54312
54925
  node: fastForwardNode,
54313
- active: showFastForward
54926
+ active: this.fastForwardActive || this.showFastForwardMenu
54314
54927
  });
54315
54928
  } else {
54316
54929
  contentNode = fastForwardNode;
54317
54930
  }
54931
+ onMouseenter = this.handleFastForwardMouseenter;
54932
+ onMouseleave = this.handleFastForwardMouseleave;
54318
54933
  break;
54319
54934
  case "fast-backward":
54320
- const fastBackwardNode = showFastBackward ? /* @__PURE__ */ vue.h(NBaseIcon, {
54935
+ const fastBackwardNode = this.fastBackwardActive ? /* @__PURE__ */ vue.h(NBaseIcon, {
54321
54936
  clsPrefix: mergedClsPrefix
54322
54937
  }, {
54323
54938
  default: () => this.rtlEnabled ? /* @__PURE__ */ vue.h(FastForwardIcon, null) : /* @__PURE__ */ vue.h(FastBackwardIcon, null)
@@ -54328,26 +54943,72 @@
54328
54943
  contentNode = renderLabel({
54329
54944
  type: "fast-backward",
54330
54945
  node: fastBackwardNode,
54331
- active: showFastBackward
54946
+ active: this.fastBackwardActive || this.showFastBackwardMenu
54332
54947
  });
54333
54948
  } else {
54334
54949
  contentNode = fastBackwardNode;
54335
54950
  }
54951
+ onMouseenter = this.handleFastBackwardMouseenter;
54952
+ onMouseleave = this.handleFastBackwardMouseleave;
54336
54953
  break;
54337
54954
  }
54338
- return /* @__PURE__ */ vue.h("div", {
54955
+ const itemNode = /* @__PURE__ */ vue.h("div", {
54339
54956
  key: index,
54340
54957
  class: [
54341
54958
  `${mergedClsPrefix}-pagination-item`,
54342
- {
54343
- [`${mergedClsPrefix}-pagination-item--active`]: pageItem.active,
54344
- [`${mergedClsPrefix}-pagination-item--disabled`]: disabled
54345
- }
54959
+ pageItem.active && `${mergedClsPrefix}-pagination-item--active`,
54960
+ type !== "page" && (type === "fast-backward" && this.showFastBackwardMenu || type === "fast-forward" && this.showFastForwardMenu) && `${mergedClsPrefix}-pagination-item--hover`,
54961
+ disabled && `${mergedClsPrefix}-pagination-item--disabled`,
54962
+ type === "page" && `${mergedClsPrefix}-pagination-item--clickable`
54346
54963
  ],
54347
54964
  onClick: () => handlePageItemClick(pageItem),
54348
- onMouseenter: () => handlePageItemMouseEnter(pageItem),
54349
- onMouseleave: () => handlePageItemMouseLeave(pageItem)
54965
+ onMouseenter,
54966
+ onMouseleave
54350
54967
  }, contentNode);
54968
+ if (type === "page" && !pageItem.mayBeFastBackward && !pageItem.mayBeFastForward) {
54969
+ return itemNode;
54970
+ } else {
54971
+ const key = pageItem.type === "page" ? pageItem.mayBeFastBackward ? "fast-backward" : "fast-forward" : pageItem.type;
54972
+ return /* @__PURE__ */ vue.h(NPopselect, {
54973
+ key,
54974
+ trigger: "hover",
54975
+ virtualScroll: true,
54976
+ style: { width: "60px" },
54977
+ theme: mergedTheme.peers.Popselect,
54978
+ themeOverrides: mergedTheme.peerOverrides.Popselect,
54979
+ builtinThemeOverrides: {
54980
+ peers: {
54981
+ InternalSelectMenu: {
54982
+ height: "calc(var(--n-option-height) * 4.6)"
54983
+ }
54984
+ }
54985
+ },
54986
+ nodeProps: () => ({
54987
+ style: {
54988
+ justifyContent: "center"
54989
+ }
54990
+ }),
54991
+ show: type === "page" ? false : type === "fast-backward" ? this.showFastBackwardMenu : this.showFastForwardMenu,
54992
+ onUpdateShow: (value) => {
54993
+ if (type === "page")
54994
+ return;
54995
+ if (value) {
54996
+ if (type === "fast-backward") {
54997
+ this.showFastBackwardMenu = value;
54998
+ } else {
54999
+ this.showFastForwardMenu = value;
55000
+ }
55001
+ } else {
55002
+ this.showFastBackwardMenu = false;
55003
+ this.showFastForwardMenu = false;
55004
+ }
55005
+ },
55006
+ options: pageItem.type !== "page" ? pageItem.options : [],
55007
+ onUpdateValue: this.handleMenuSelect,
55008
+ scrollable: true,
55009
+ internalShowCheckmark: false
55010
+ }, { default: () => itemNode });
55011
+ }
54351
55012
  }), /* @__PURE__ */ vue.h("div", {
54352
55013
  class: [
54353
55014
  `${mergedClsPrefix}-pagination-item`,
@@ -54431,7 +55092,7 @@
54431
55092
 
54432
55093
  };
54433
55094
 
54434
- const self$M = vars => {
55095
+ const self$L = vars => {
54435
55096
  const {
54436
55097
  borderRadius,
54437
55098
  boxShadow2,
@@ -54451,7 +55112,7 @@
54451
55112
  peers: {
54452
55113
  Popover: popoverLight
54453
55114
  },
54454
- self: self$M
55115
+ self: self$L
54455
55116
  });
54456
55117
 
54457
55118
  const ellipsisDark = {
@@ -54540,7 +55201,7 @@
54540
55201
 
54541
55202
  };
54542
55203
 
54543
- const self$L = vars => {
55204
+ const self$K = vars => {
54544
55205
  const {
54545
55206
  borderColor,
54546
55207
  primaryColor,
@@ -54600,7 +55261,7 @@
54600
55261
  const radioLight = {
54601
55262
  name: "Radio",
54602
55263
  common: derived,
54603
- self: self$L
55264
+ self: self$K
54604
55265
  };
54605
55266
 
54606
55267
  var rtlStyle$6 = c$1([cB("radio", [cM("rtl", `
@@ -54643,7 +55304,7 @@
54643
55304
  actionButtonMargin: "0 8px 0 0"
54644
55305
  };
54645
55306
 
54646
- const self$K = vars => {
55307
+ const self$J = vars => {
54647
55308
  const {
54648
55309
  cardColor,
54649
55310
  modalColor,
@@ -54716,7 +55377,7 @@
54716
55377
  Popover: popoverLight,
54717
55378
  Ellipsis: ellipsisLight
54718
55379
  },
54719
- self: self$K
55380
+ self: self$J
54720
55381
  });
54721
55382
 
54722
55383
  const dataTableDark = {
@@ -54734,7 +55395,7 @@
54734
55395
  },
54735
55396
 
54736
55397
  self(vars) {
54737
- const commonSelf = self$K(vars);
55398
+ const commonSelf = self$J(vars);
54738
55399
  commonSelf.boxShadowAfter = "inset 12px 0 8px -12px rgba(0, 0, 0, .36)";
54739
55400
  commonSelf.boxShadowBefore = "inset -12px 0 8px -12px rgba(0, 0, 0, .36)";
54740
55401
  return commonSelf;
@@ -54788,7 +55449,7 @@
54788
55449
 
54789
55450
  });
54790
55451
 
54791
- var style$Y = cB("ellipsis", {
55452
+ var style$X = cB("ellipsis", {
54792
55453
  overflow: "hidden"
54793
55454
  }, [cNotM("line-clamp", `
54794
55455
  white-space: nowrap;
@@ -54823,7 +55484,7 @@
54823
55484
  props: ellipsisProps,
54824
55485
  setup(props, { slots, attrs }) {
54825
55486
  const { mergedClsPrefixRef } = useConfig(props);
54826
- const mergedTheme = useTheme("Ellipsis", "-ellipsis", style$Y, ellipsisLight, props, mergedClsPrefixRef);
55487
+ const mergedTheme = useTheme("Ellipsis", "-ellipsis", style$X, ellipsisLight, props, mergedClsPrefixRef);
54827
55488
  const triggerRef = vue.ref(null);
54828
55489
  const triggerInnerRef = vue.ref(null);
54829
55490
  const tooltipRef = vue.ref(null);
@@ -55213,7 +55874,7 @@
55213
55874
 
55214
55875
  setup.props = radioProps;
55215
55876
 
55216
- var style$X = cB("radio", `
55877
+ var style$W = cB("radio", `
55217
55878
  line-height: var(--n-label-line-height);
55218
55879
  outline: none;
55219
55880
  position: relative;
@@ -55306,7 +55967,7 @@
55306
55967
  },
55307
55968
  setup(props) {
55308
55969
  const radio = setup(props);
55309
- const themeRef = useTheme("Radio", "-radio", style$X, radioLight, props, radio.mergedClsPrefix);
55970
+ const themeRef = useTheme("Radio", "-radio", style$W, radioLight, props, radio.mergedClsPrefix);
55310
55971
  const cssVarsRef = vue.computed(() => {
55311
55972
  const {
55312
55973
  mergedSize: { value: size }
@@ -55404,7 +56065,7 @@
55404
56065
  }
55405
56066
  });
55406
56067
 
55407
- var style$W = cB("radio-group", `
56068
+ var style$V = cB("radio-group", `
55408
56069
  display: inline-block;
55409
56070
  font-size: var(--n-font-size);
55410
56071
  `, [cE("splitor", `
@@ -55575,7 +56236,7 @@
55575
56236
  nTriggerFormFocus
55576
56237
  } = useFormItem(props);
55577
56238
  const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props);
55578
- const themeRef = useTheme("Radio", "-radio-group", style$W, radioLight, props, mergedClsPrefixRef);
56239
+ const themeRef = useTheme("Radio", "-radio-group", style$V, radioLight, props, mergedClsPrefixRef);
55579
56240
  const uncontrolledValueRef = vue.ref(props.defaultValue);
55580
56241
  const controlledValueRef = vue.toRef(props, "value");
55581
56242
  const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
@@ -55726,11 +56387,17 @@
55726
56387
  }
55727
56388
  });
55728
56389
 
55729
- const selectionColWidth = 40;
55730
- const expandColWidth = 40;
56390
+ const SELECTION_COL_WIDTH = 40;
56391
+ const EXPAND_COL_WIDTH = 40;
55731
56392
  function getNumberColWidth(col) {
55732
- if (col.type === "selection") return selectionColWidth;
55733
- if (col.type === "expand") return expandColWidth;
56393
+ if (col.type === "selection") {
56394
+ return col.width === void 0 ? SELECTION_COL_WIDTH : depx(col.width);
56395
+ }
56396
+
56397
+ if (col.type === "expand") {
56398
+ return col.width === void 0 ? EXPAND_COL_WIDTH : depx(col.width);
56399
+ }
56400
+
55734
56401
  if ("children" in col) return void 0;
55735
56402
 
55736
56403
  if (typeof col.width === "string") {
@@ -55741,11 +56408,11 @@
55741
56408
  }
55742
56409
  function getStringColWidth(col) {
55743
56410
  if (col.type === "selection") {
55744
- return formatLength(col.width ?? selectionColWidth);
56411
+ return formatLength(col.width ?? SELECTION_COL_WIDTH);
55745
56412
  }
55746
56413
 
55747
56414
  if (col.type === "expand") {
55748
- return formatLength(col.width ?? expandColWidth);
56415
+ return formatLength(col.width ?? EXPAND_COL_WIDTH);
55749
56416
  }
55750
56417
 
55751
56418
  if ("children" in col) {
@@ -56124,7 +56791,7 @@
56124
56791
  optionIconPrefixWidthHuge: "40px"
56125
56792
  };
56126
56793
 
56127
- const self$J = vars => {
56794
+ const self$I = vars => {
56128
56795
  const {
56129
56796
  primaryColor,
56130
56797
  textColor2,
@@ -56187,7 +56854,7 @@
56187
56854
  peers: {
56188
56855
  Popover: popoverLight
56189
56856
  },
56190
- self: self$J
56857
+ self: self$I
56191
56858
  });
56192
56859
 
56193
56860
  const dropdownDark = {
@@ -56203,7 +56870,7 @@
56203
56870
  primaryColor,
56204
56871
  popoverColor
56205
56872
  } = vars;
56206
- const commonSelf = self$J(vars);
56873
+ const commonSelf = self$I(vars);
56207
56874
  commonSelf.colorInverted = popoverColor;
56208
56875
  commonSelf.optionColorActive = changeColor(primaryColor, {
56209
56876
  alpha: 0.15
@@ -56230,7 +56897,7 @@
56230
56897
  }
56231
56898
  });
56232
56899
 
56233
- const self$I = vars => {
56900
+ const self$H = vars => {
56234
56901
  const {
56235
56902
  textColorBase,
56236
56903
  opacity1,
@@ -56251,16 +56918,16 @@
56251
56918
  const iconLight = {
56252
56919
  name: "Icon",
56253
56920
  common: derived,
56254
- self: self$I
56921
+ self: self$H
56255
56922
  };
56256
56923
 
56257
56924
  const iconDark$1 = {
56258
56925
  name: "Icon",
56259
56926
  common: derived$1,
56260
- self: self$I
56927
+ self: self$H
56261
56928
  };
56262
56929
 
56263
- var style$V = cB("icon", `
56930
+ var style$U = cB("icon", `
56264
56931
  height: 1em;
56265
56932
  width: 1em;
56266
56933
  line-height: 1em;
@@ -56298,7 +56965,7 @@
56298
56965
  mergedClsPrefixRef,
56299
56966
  inlineThemeDisabled
56300
56967
  } = useConfig(props);
56301
- const themeRef = useTheme("Icon", "-icon", style$V, iconLight, props, mergedClsPrefixRef);
56968
+ const themeRef = useTheme("Icon", "-icon", style$U, iconLight, props, mergedClsPrefixRef);
56302
56969
  const cssVarsRef = vue.computed(() => {
56303
56970
  const {
56304
56971
  depth
@@ -56859,7 +57526,7 @@
56859
57526
  }
56860
57527
  });
56861
57528
 
56862
- var style$U = cB("dropdown-menu", `
57529
+ var style$T = cB("dropdown-menu", `
56863
57530
  transform-origin: inherit;
56864
57531
  padding: var(--n-padding);
56865
57532
  background-color: var(--n-color);
@@ -57080,7 +57747,7 @@
57080
57747
  }
57081
57748
  }, keyboardEnabledRef);
57082
57749
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
57083
- const themeRef = useTheme("Dropdown", "-dropdown", style$U, dropdownLight, props, mergedClsPrefixRef);
57750
+ const themeRef = useTheme("Dropdown", "-dropdown", style$T, dropdownLight, props, mergedClsPrefixRef);
57084
57751
  vue.provide(dropdownInjectionKey, {
57085
57752
  labelFieldRef: vue.toRef(props, "labelField"),
57086
57753
  childrenFieldRef: vue.toRef(props, "childrenField"),
@@ -57426,6 +58093,9 @@
57426
58093
  function handleMouseenter() {
57427
58094
  scrollPartRef.value = "head";
57428
58095
  }
58096
+ function handleMouseleave() {
58097
+ scrollPartRef.value = "body";
58098
+ }
57429
58099
  return {
57430
58100
  componentId,
57431
58101
  mergedSortState: mergedSortStateRef,
@@ -57443,6 +58113,7 @@
57443
58113
  mergedTableLayout: mergedTableLayoutRef,
57444
58114
  headerCheckboxDisabled: headerCheckboxDisabledRef,
57445
58115
  handleMouseenter,
58116
+ handleMouseleave,
57446
58117
  handleCheckboxUpdateChecked,
57447
58118
  handleColHeaderClick,
57448
58119
  handleTableHeaderScroll
@@ -57532,11 +58203,17 @@
57532
58203
  if (!discrete) {
57533
58204
  return theadVNode;
57534
58205
  }
57535
- const { handleTableHeaderScroll, handleMouseenter, scrollX } = this;
58206
+ const {
58207
+ handleTableHeaderScroll,
58208
+ handleMouseenter,
58209
+ handleMouseleave,
58210
+ scrollX
58211
+ } = this;
57536
58212
  return /* @__PURE__ */ vue.h("div", {
57537
58213
  class: `${mergedClsPrefix}-data-table-base-table-header`,
57538
58214
  onScroll: handleTableHeaderScroll,
57539
- onMouseenter: handleMouseenter
58215
+ onMouseenter: handleMouseenter,
58216
+ onMouseleave: handleMouseleave
57540
58217
  }, /* @__PURE__ */ vue.h("table", {
57541
58218
  ref: "body",
57542
58219
  class: `${mergedClsPrefix}-data-table-table`,
@@ -57893,7 +58570,14 @@
57893
58570
  scrollbarInstRef.value?.sync();
57894
58571
  }
57895
58572
  const exposedMethods = {
57896
- getScrollContainer
58573
+ getScrollContainer,
58574
+ scrollTo(arg0, arg1) {
58575
+ if (virtualScrollRef.value) {
58576
+ virtualListRef.value?.scrollTo(arg0, arg1);
58577
+ } else {
58578
+ scrollbarInstRef.value?.scrollTo(arg0, arg1);
58579
+ }
58580
+ }
57897
58581
  };
57898
58582
  const style = c$1([
57899
58583
  ({ props: cProps }) => {
@@ -58254,7 +58938,7 @@
58254
58938
  rowKey,
58255
58939
  disabled: rowInfo.tmNode.disabled,
58256
58940
  onUpdateChecked: (checked, e) => handleCheckboxUpdateChecked(rowInfo.tmNode, checked, e.shiftKey)
58257
- }) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData, rowIndex) ? /* @__PURE__ */ vue.h(ExpandTrigger, {
58941
+ }) : null : column.type === "expand" ? !isSummary ? !column.expandable || column.expandable?.(rowData) ? /* @__PURE__ */ vue.h(ExpandTrigger, {
58258
58942
  clsPrefix: mergedClsPrefix,
58259
58943
  expanded,
58260
58944
  onClick: () => handleUpdateExpanded(rowKey, null)
@@ -58385,7 +59069,10 @@
58385
59069
  }
58386
59070
  const exposedMethods = {
58387
59071
  getBodyElement,
58388
- getHeaderElement
59072
+ getHeaderElement,
59073
+ scrollTo(arg0, arg1) {
59074
+ bodyInstRef.value?.scrollTo(arg0, arg1);
59075
+ }
58389
59076
  };
58390
59077
  vue.watchEffect(() => {
58391
59078
  const { value: selfEl } = selfElRef;
@@ -59486,7 +60173,7 @@
59486
60173
  };
59487
60174
  }
59488
60175
 
59489
- function useExpand(props) {
60176
+ function useExpand(props, treeMateRef) {
59490
60177
  const renderExpandRef = useMemo(() => {
59491
60178
  for (const col of props.columns) {
59492
60179
  if (col.type === "expand") {
@@ -59498,7 +60185,24 @@
59498
60185
  }
59499
60186
  }
59500
60187
  });
59501
- const uncontrolledExpandedRowKeysRef = vue.ref(props.defaultExpandedRowKeys);
60188
+ let expandable;
60189
+
60190
+ for (const col of props.columns) {
60191
+ if (col.type === "expand") {
60192
+ expandable = col.expandable;
60193
+ break;
60194
+ }
60195
+ }
60196
+
60197
+ const uncontrolledExpandedRowKeysRef = vue.ref(props.defaultExpandAll ? renderExpandRef?.value ? (() => {
60198
+ const expandedKeys = [];
60199
+ treeMateRef.value.treeNodes.forEach(tmNode => {
60200
+ if (expandable?.(tmNode.rawNode)) {
60201
+ expandedKeys.push(tmNode.key);
60202
+ }
60203
+ });
60204
+ return expandedKeys;
60205
+ })() : treeMateRef.value.getNonLeafKeys() : props.defaultExpandedRowKeys);
59502
60206
  const controlledExpandedRowKeysRef = vue.toRef(props, "expandedRowKeys");
59503
60207
  const mergedExpandedRowKeysRef = useMergedState(controlledExpandedRowKeysRef, uncontrolledExpandedRowKeysRef);
59504
60208
 
@@ -59527,7 +60231,7 @@
59527
60231
  }
59528
60232
 
59529
60233
  const fixedColumnStyle = createFixedColumnStyle();
59530
- var style$T = c$1([cB("data-table", `
60234
+ var style$S = c$1([cB("data-table", `
59531
60235
  width: 100%;
59532
60236
  font-size: var(--n-font-size);
59533
60237
  display: flex;
@@ -59906,6 +60610,7 @@
59906
60610
  type: Array,
59907
60611
  default: []
59908
60612
  },
60613
+ defaultExpandAll: Boolean,
59909
60614
  expandedRowKeys: Array,
59910
60615
  virtualScroll: Boolean,
59911
60616
  tableLayout: {
@@ -59983,7 +60688,7 @@
59983
60688
  return bottomBordered;
59984
60689
  return true;
59985
60690
  });
59986
- const themeRef = useTheme("DataTable", "-data-table", style$T, dataTableLight, props, mergedClsPrefixRef);
60691
+ const themeRef = useTheme("DataTable", "-data-table", style$S, dataTableLight, props, mergedClsPrefixRef);
59987
60692
  const bodyWidthRef = vue.ref(null);
59988
60693
  const scrollPartRef = vue.ref("body");
59989
60694
  vue.onDeactivated(() => {
@@ -60032,7 +60737,7 @@
60032
60737
  mergedExpandedRowKeysRef,
60033
60738
  renderExpandRef,
60034
60739
  doUpdateExpandedRowKeys
60035
- } = useExpand(props);
60740
+ } = useExpand(props, treeMateRef);
60036
60741
  const {
60037
60742
  handleTableBodyScroll,
60038
60743
  handleTableHeaderScroll,
@@ -60141,7 +60846,10 @@
60141
60846
  clearSorter,
60142
60847
  page,
60143
60848
  sort,
60144
- clearFilter
60849
+ clearFilter,
60850
+ scrollTo: (arg0, arg1) => {
60851
+ mainTableInstRef.value?.scrollTo(arg0, arg1);
60852
+ }
60145
60853
  };
60146
60854
  const cssVarsRef = vue.computed(() => {
60147
60855
  const { size } = props;
@@ -60305,7 +61013,7 @@
60305
61013
  panelActionPadding: "8px 0"
60306
61014
  };
60307
61015
 
60308
- const self$H = vars => {
61016
+ const self$G = vars => {
60309
61017
  const {
60310
61018
  popoverColor,
60311
61019
  textColor2,
@@ -60340,7 +61048,7 @@
60340
61048
  Button: buttonLight,
60341
61049
  Input: inputLight
60342
61050
  },
60343
- self: self$H
61051
+ self: self$G
60344
61052
  });
60345
61053
 
60346
61054
  const timePickerDark = {
@@ -60351,7 +61059,7 @@
60351
61059
  Button: buttonDark,
60352
61060
  Input: inputDark
60353
61061
  },
60354
- self: self$H
61062
+ self: self$G
60355
61063
  };
60356
61064
 
60357
61065
  var commonVars$6 = {
@@ -60386,7 +61094,7 @@
60386
61094
  calendarRightPaddingMonthrange: "0"
60387
61095
  };
60388
61096
 
60389
- const self$G = vars => {
61097
+ const self$F = vars => {
60390
61098
  const {
60391
61099
  hoverColor,
60392
61100
  fontSize,
@@ -60445,7 +61153,7 @@
60445
61153
  TimePicker: timePickerLight,
60446
61154
  Scrollbar: scrollbarLight
60447
61155
  },
60448
- self: self$G
61156
+ self: self$F
60449
61157
  });
60450
61158
 
60451
61159
  const datePickerDark = {
@@ -60464,7 +61172,7 @@
60464
61172
  hoverColor,
60465
61173
  primaryColor
60466
61174
  } = vars;
60467
- const commonSelf = self$G(vars);
61175
+ const commonSelf = self$F(vars);
60468
61176
  commonSelf.itemColorDisabled = composite(popoverColor, hoverColor);
60469
61177
  commonSelf.itemColorIncluded = changeColor(primaryColor, {
60470
61178
  alpha: 0.15
@@ -65647,7 +66355,7 @@
65647
66355
  }
65648
66356
  });
65649
66357
 
65650
- var style$S = c$1([cB("time-picker", `
66358
+ var style$R = c$1([cB("time-picker", `
65651
66359
  z-index: auto;
65652
66360
  position: relative;
65653
66361
  `, [cB("time-picker-icon", `
@@ -65832,7 +66540,7 @@
65832
66540
  const { localeRef, dateLocaleRef } = useLocale("TimePicker");
65833
66541
  const formItem = useFormItem(props);
65834
66542
  const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
65835
- const themeRef = useTheme("TimePicker", "-time-picker", style$S, timePickerLight, props, mergedClsPrefixRef);
66543
+ const themeRef = useTheme("TimePicker", "-time-picker", style$R, timePickerLight, props, mergedClsPrefixRef);
65836
66544
  const keyboardState = useKeyboard$1();
65837
66545
  const inputInstRef = vue.ref(null);
65838
66546
  const panelInstRef = vue.ref(null);
@@ -66039,12 +66747,20 @@
66039
66747
  returnFocus: true
66040
66748
  });
66041
66749
  }
66042
- function handleMenuKeyDown(e) {
66750
+ function handleInputKeydown(e) {
66751
+ if (e.key === "Escape" && mergedShowRef.value) {
66752
+ markEventEffectPerformed(e);
66753
+ }
66754
+ }
66755
+ function handleMenuKeydown(e) {
66043
66756
  switch (e.key) {
66044
66757
  case "Escape":
66045
- closePanel({
66046
- returnFocus: true
66047
- });
66758
+ if (mergedShowRef.value) {
66759
+ markEventEffectPerformed(e);
66760
+ closePanel({
66761
+ returnFocus: true
66762
+ });
66763
+ }
66048
66764
  break;
66049
66765
  case "Tab":
66050
66766
  if (keyboardState.shift && e.target === panelInstRef.value?.$el) {
@@ -66365,6 +67081,7 @@
66365
67081
  minuteValue: minuteValueRef,
66366
67082
  secondValue: secondValueRef,
66367
67083
  amPmValue: amPmValueRef,
67084
+ handleInputKeydown,
66368
67085
  handleTimeInputFocus,
66369
67086
  handleTimeInputBlur,
66370
67087
  handleNowClick,
@@ -66381,7 +67098,7 @@
66381
67098
  handleAmPmClick,
66382
67099
  handleTimeInputClear,
66383
67100
  handleFocusDetectorFocus,
66384
- handleMenuKeyDown,
67101
+ handleMenuKeydown,
66385
67102
  handleTriggerClick,
66386
67103
  mergedTheme: themeRef,
66387
67104
  triggerCssVars: inlineThemeDisabled ? void 0 : triggerCssVarsRef,
@@ -66425,7 +67142,8 @@
66425
67142
  internalDeactivateOnEnter: true,
66426
67143
  internalForceFocus: this.mergedShow,
66427
67144
  readonly: this.inputReadonly || this.mergedDisabled,
66428
- onClick: this.handleTriggerClick
67145
+ onClick: this.handleTriggerClick,
67146
+ onKeydown: this.handleInputKeydown
66429
67147
  }, this.showIcon ? {
66430
67148
  [this.clearable ? "clear-icon-placeholder" : "suffix"]: () => /* @__PURE__ */ vue.h(NBaseIcon, {
66431
67149
  clsPrefix: mergedClsPrefix,
@@ -66476,7 +67194,7 @@
66476
67194
  confirmText: this.localizedPositiveText,
66477
67195
  use12Hours: this.use12Hours,
66478
67196
  onFocusout: this.handleMenuFocusOut,
66479
- onKeydown: this.handleMenuKeyDown,
67197
+ onKeydown: this.handleMenuKeydown,
66480
67198
  onHourClick: this.handleHourClick,
66481
67199
  onMinuteClick: this.handleMinuteClick,
66482
67200
  onSecondClick: this.handleSecondClick,
@@ -67088,6 +67806,7 @@
67088
67806
  return `Q ${item.dateObject.quarter}`;
67089
67807
  }
67090
67808
  };
67809
+ const { useAsQuickJump } = props;
67091
67810
  const renderItem = (item, i, mergedClsPrefix) => {
67092
67811
  const { mergedIsDateDisabled, handleDateClick, handleQuickMonthClick } = useCalendarRef;
67093
67812
  return /* @__PURE__ */ vue.h("div", {
@@ -67098,11 +67817,11 @@
67098
67817
  {
67099
67818
  [`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--current`]: item.isCurrent,
67100
67819
  [`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--selected`]: item.selected,
67101
- [`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--disabled`]: mergedIsDateDisabled(item.ts)
67820
+ [`${mergedClsPrefix}-date-panel-month-calendar__picker-col-item--disabled`]: !useAsQuickJump && mergedIsDateDisabled(item.ts)
67102
67821
  }
67103
67822
  ],
67104
67823
  onClick: () => {
67105
- props.useAsQuickJump ? handleQuickMonthClick(item, (value) => props.onUpdateValue(value, false)) : handleDateClick(item);
67824
+ useAsQuickJump ? handleQuickMonthClick(item, (value) => props.onUpdateValue(value, false)) : handleDateClick(item);
67106
67825
  }
67107
67826
  }, getRenderContent(item));
67108
67827
  };
@@ -68901,7 +69620,7 @@
68901
69620
  }
68902
69621
  });
68903
69622
 
68904
- var style$R = c$1([cB("date-picker", `
69623
+ var style$Q = c$1([cB("date-picker", `
68905
69624
  position: relative;
68906
69625
  z-index: auto;
68907
69626
  `, [cB("date-picker-icon", `
@@ -69351,7 +70070,7 @@
69351
70070
  const singleInputValueRef = vue.ref("");
69352
70071
  const rangeStartInputValueRef = vue.ref("");
69353
70072
  const rangeEndInputValueRef = vue.ref("");
69354
- const themeRef = useTheme("DatePicker", "-date-picker", style$R, datePickerLight, props, mergedClsPrefixRef);
70073
+ const themeRef = useTheme("DatePicker", "-date-picker", style$Q, datePickerLight, props, mergedClsPrefixRef);
69355
70074
  const timePickerSizeRef = vue.computed(() => {
69356
70075
  return mergedComponentPropsRef?.value?.DatePicker?.timePickerSize || "small";
69357
70076
  });
@@ -69529,11 +70248,19 @@
69529
70248
  call(onUpdateShow, show);
69530
70249
  uncontrolledShowRef.value = show;
69531
70250
  }
69532
- function handleKeyDown(e) {
70251
+ function handleKeydown(e) {
69533
70252
  if (e.key === "Escape") {
69534
- closeCalendar({
69535
- returnFocus: true
69536
- });
70253
+ if (mergedShowRef.value) {
70254
+ markEventEffectPerformed(e);
70255
+ closeCalendar({
70256
+ returnFocus: true
70257
+ });
70258
+ }
70259
+ }
70260
+ }
70261
+ function handleInputKeydown(e) {
70262
+ if (e.key === "Escape" && mergedShowRef.value) {
70263
+ markEventEffectPerformed(e);
69537
70264
  }
69538
70265
  }
69539
70266
  function handleClear() {
@@ -69857,8 +70584,9 @@
69857
70584
  isValueInvalid: uniVaidation.isValueInvalidRef,
69858
70585
  isStartValueInvalid: dualValidation.isStartValueInvalidRef,
69859
70586
  isEndValueInvalid: dualValidation.isEndValueInvalidRef,
70587
+ handleInputKeydown,
69860
70588
  handleClickOutside,
69861
- handleKeyDown,
70589
+ handleKeydown,
69862
70590
  handleClear,
69863
70591
  handlePanelClear,
69864
70592
  handleTriggerClick,
@@ -69889,7 +70617,7 @@
69889
70617
  onTabOut: this.handlePanelTabOut,
69890
70618
  onClose: this.handlePanelClose,
69891
70619
  onClear: this.handlePanelClear,
69892
- onKeydown: this.handleKeyDown,
70620
+ onKeydown: this.handleKeydown,
69893
70621
  onConfirm: this.handlePanelConfirm,
69894
70622
  ref: "panelInstRef",
69895
70623
  value: this.pendingValue,
@@ -69940,6 +70668,7 @@
69940
70668
  clearable,
69941
70669
  onClear: this.handleClear,
69942
70670
  onClick: this.handleTriggerClick,
70671
+ onKeydown: this.handleInputKeydown,
69943
70672
  onActivate: this.handleInputActivate,
69944
70673
  onDeactivate: this.handleInputDeactivate,
69945
70674
  onFocus: this.handleInputFocus,
@@ -69954,7 +70683,7 @@
69954
70683
  this.triggerThemeClass
69955
70684
  ],
69956
70685
  style: this.triggerCssVars,
69957
- onKeydown: this.handleKeyDown
70686
+ onKeydown: this.handleKeydown
69958
70687
  }, /* @__PURE__ */ vue.h(Binder, null, {
69959
70688
  default: () => [
69960
70689
  /* @__PURE__ */ vue.h(VTarget, null, {
@@ -70062,7 +70791,7 @@
70062
70791
  tdPaddingLarge: "0 0 16px 0"
70063
70792
  };
70064
70793
 
70065
- const self$F = vars => {
70794
+ const self$E = vars => {
70066
70795
  const {
70067
70796
  tableHeaderColor,
70068
70797
  textColor2,
@@ -70102,13 +70831,13 @@
70102
70831
  const descriptionsLight = {
70103
70832
  name: "Descriptions",
70104
70833
  common: derived,
70105
- self: self$F
70834
+ self: self$E
70106
70835
  };
70107
70836
 
70108
70837
  const descriptionsDark = {
70109
70838
  name: "Descriptions",
70110
70839
  common: derived$1,
70111
- self: self$F
70840
+ self: self$E
70112
70841
  };
70113
70842
 
70114
70843
  const DESCRIPTION_ITEM_FLAG = Symbol("DESCRIPTION_ITEM_FLAG");
@@ -70120,7 +70849,7 @@
70120
70849
  return false;
70121
70850
  }
70122
70851
 
70123
- var style$Q = c$1([cB("descriptions", {
70852
+ var style$P = c$1([cB("descriptions", {
70124
70853
  fontSize: "var(--n-font-size)"
70125
70854
  }, [cB("descriptions-separator", `
70126
70855
  display: inline-block;
@@ -70252,7 +70981,7 @@
70252
70981
  props: descriptionProps,
70253
70982
  setup(props) {
70254
70983
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
70255
- const themeRef = useTheme("Descriptions", "-descriptions", style$Q, descriptionsLight, props, mergedClsPrefixRef);
70984
+ const themeRef = useTheme("Descriptions", "-descriptions", style$P, descriptionsLight, props, mergedClsPrefixRef);
70256
70985
  const cssVarsRef = vue.computed(() => {
70257
70986
  const { size, bordered } = props;
70258
70987
  const {
@@ -70469,7 +71198,7 @@
70469
71198
  closeMarginIconTop: "10px 16px 0 0"
70470
71199
  };
70471
71200
 
70472
- const self$E = vars => {
71201
+ const self$D = vars => {
70473
71202
  const {
70474
71203
  textColor1,
70475
71204
  textColor2,
@@ -70518,7 +71247,7 @@
70518
71247
  peers: {
70519
71248
  Button: buttonLight
70520
71249
  },
70521
- self: self$E
71250
+ self: self$D
70522
71251
  });
70523
71252
 
70524
71253
  const dialogDark = {
@@ -70527,7 +71256,7 @@
70527
71256
  peers: {
70528
71257
  Button: buttonDark
70529
71258
  },
70530
- self: self$E
71259
+ self: self$D
70531
71260
  };
70532
71261
 
70533
71262
  const dialogProps = {
@@ -70560,7 +71289,7 @@
70560
71289
  };
70561
71290
  const dialogPropKeys = keysOf(dialogProps);
70562
71291
 
70563
- var style$P = c$1([cB("dialog", `
71292
+ var style$O = c$1([cB("dialog", `
70564
71293
  word-break: break-word;
70565
71294
  line-height: var(--n-line-height);
70566
71295
  position: relative;
@@ -70670,7 +71399,7 @@
70670
71399
  if (onClose)
70671
71400
  onClose();
70672
71401
  }
70673
- const themeRef = useTheme("Dialog", "-dialog", style$P, dialogLight, props, mergedClsPrefixRef);
71402
+ const themeRef = useTheme("Dialog", "-dialog", style$O, dialogLight, props, mergedClsPrefixRef);
70674
71403
  const cssVarsRef = vue.computed(() => {
70675
71404
  const { type } = props;
70676
71405
  const iconPlacement = mergedIconPlacementRef.value;
@@ -70828,7 +71557,7 @@
70828
71557
  const dialogProviderInjectionKey = createInjectionKey("n-dialog-provider");
70829
71558
  const dialogApiInjectionKey = createInjectionKey("n-dialog-api");
70830
71559
 
70831
- const self$D = vars => {
71560
+ const self$C = vars => {
70832
71561
  const {
70833
71562
  modalColor,
70834
71563
  textColor2,
@@ -70848,7 +71577,7 @@
70848
71577
  Dialog: dialogLight,
70849
71578
  Card: cardLight
70850
71579
  },
70851
- self: self$D
71580
+ self: self$C
70852
71581
  });
70853
71582
 
70854
71583
  const modalDark = {
@@ -70859,7 +71588,7 @@
70859
71588
  Dialog: dialogDark,
70860
71589
  Card: cardDark
70861
71590
  },
70862
- self: self$D
71591
+ self: self$C
70863
71592
  };
70864
71593
 
70865
71594
  const presetProps = { ...cardBaseProps,
@@ -71114,7 +71843,7 @@
71114
71843
  }
71115
71844
  });
71116
71845
 
71117
- var style$O = c$1([cB("modal-container", `
71846
+ var style$N = c$1([cB("modal-container", `
71118
71847
  position: fixed;
71119
71848
  left: 0;
71120
71849
  top: 0;
@@ -71231,7 +71960,7 @@
71231
71960
  }
71232
71961
  const containerRef = vue.ref(null);
71233
71962
  const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
71234
- const themeRef = useTheme("Modal", "-modal", style$O, modalLight, props, mergedClsPrefixRef);
71963
+ const themeRef = useTheme("Modal", "-modal", style$N, modalLight, props, mergedClsPrefixRef);
71235
71964
  const clickedRef = useClicked(64);
71236
71965
  const clickedPositionRef = useClickPosition();
71237
71966
  const isMountedRef = isMounted();
@@ -71309,7 +72038,7 @@
71309
72038
  }
71310
72039
  function handleEsc(e) {
71311
72040
  props.onEsc?.();
71312
- if (props.closeOnEsc) {
72041
+ if (props.show && props.closeOnEsc && eventEffectNotPerformed(e)) {
71313
72042
  !isComposingRef.value && doUpdateShow(false);
71314
72043
  }
71315
72044
  }
@@ -71652,7 +72381,7 @@
71652
72381
  return dialog;
71653
72382
  }
71654
72383
 
71655
- const self$C = vars => {
72384
+ const self$B = vars => {
71656
72385
  const {
71657
72386
  textColor1,
71658
72387
  dividerColor,
@@ -71667,16 +72396,16 @@
71667
72396
  const dividerLight = {
71668
72397
  name: "Divider",
71669
72398
  common: derived,
71670
- self: self$C
72399
+ self: self$B
71671
72400
  };
71672
72401
 
71673
72402
  const dividerDark = {
71674
72403
  name: "Divider",
71675
72404
  common: derived$1,
71676
- self: self$C
72405
+ self: self$B
71677
72406
  };
71678
72407
 
71679
- var style$N = cB("divider", `
72408
+ var style$M = cB("divider", `
71680
72409
  position: relative;
71681
72410
  display: flex;
71682
72411
  width: 100%;
@@ -71743,7 +72472,7 @@
71743
72472
  props: dividerProps,
71744
72473
  setup(props) {
71745
72474
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
71746
- const themeRef = useTheme("Divider", "-divider", style$N, dividerLight, props, mergedClsPrefixRef);
72475
+ const themeRef = useTheme("Divider", "-divider", style$M, dividerLight, props, mergedClsPrefixRef);
71747
72476
  const cssVarsRef = vue.computed(() => {
71748
72477
  const {
71749
72478
  common: { cubicBezierEaseInOut },
@@ -71797,7 +72526,7 @@
71797
72526
  }
71798
72527
  });
71799
72528
 
71800
- const self$B = vars => {
72529
+ const self$A = vars => {
71801
72530
  const {
71802
72531
  modalColor,
71803
72532
  textColor1,
@@ -71842,7 +72571,7 @@
71842
72571
  peers: {
71843
72572
  Scrollbar: scrollbarLight
71844
72573
  },
71845
- self: self$B
72574
+ self: self$A
71846
72575
  });
71847
72576
 
71848
72577
  const drawerDark = {
@@ -71851,7 +72580,7 @@
71851
72580
  peers: {
71852
72581
  Scrollbar: scrollbarDark
71853
72582
  },
71854
- self: self$B
72583
+ self: self$A
71855
72584
  };
71856
72585
 
71857
72586
  var NDrawerBodyWrapper = vue.defineComponent({
@@ -72089,7 +72818,7 @@
72089
72818
  })];
72090
72819
  }
72091
72820
 
72092
- var style$M = c$1([cB("drawer", `
72821
+ var style$L = c$1([cB("drawer", `
72093
72822
  word-break: break-word;
72094
72823
  line-height: var(--n-line-height);
72095
72824
  position: absolute;
@@ -72275,7 +73004,7 @@
72275
73004
  }
72276
73005
  const { mergedClsPrefixRef, namespaceRef, inlineThemeDisabled } = useConfig(props);
72277
73006
  const isMountedRef = isMounted();
72278
- const themeRef = useTheme("Drawer", "-drawer", style$M, drawerLight, props, mergedClsPrefixRef);
73007
+ const themeRef = useTheme("Drawer", "-drawer", style$L, drawerLight, props, mergedClsPrefixRef);
72279
73008
  const styleWidthRef = vue.computed(() => {
72280
73009
  const { placement } = props;
72281
73010
  if (placement === "top" || placement === "bottom")
@@ -72308,9 +73037,9 @@
72308
73037
  onMaskClick(e);
72309
73038
  }
72310
73039
  const isComposingRef = useIsComposing();
72311
- function handleEsc() {
73040
+ function handleEsc(e) {
72312
73041
  props.onEsc?.();
72313
- if (props.closeOnEsc) {
73042
+ if (props.show && props.closeOnEsc && eventEffectNotPerformed(e)) {
72314
73043
  !isComposingRef.value && doUpdateShow(false);
72315
73044
  }
72316
73045
  }
@@ -72552,7 +73281,7 @@
72552
73281
 
72553
73282
  };
72554
73283
 
72555
- const self$A = () => {
73284
+ const self$z = () => {
72556
73285
  return commonVariables$5;
72557
73286
  };
72558
73287
 
@@ -72563,7 +73292,7 @@
72563
73292
  Input: inputLight,
72564
73293
  Button: buttonLight
72565
73294
  },
72566
- self: self$A
73295
+ self: self$z
72567
73296
  });
72568
73297
 
72569
73298
  var rtlStyle$5 = cB("dynamic-input", [cM("rtl", `
@@ -72733,7 +73462,7 @@
72733
73462
  }
72734
73463
  });
72735
73464
 
72736
- var style$L = cB("dynamic-input", {
73465
+ var style$K = cB("dynamic-input", {
72737
73466
  width: "100%"
72738
73467
  }, [cB("dynamic-input-item", `
72739
73468
  margin-bottom: 10px;
@@ -72830,7 +73559,7 @@
72830
73559
  const uncontrolledValueRef = vue.ref(props.defaultValue);
72831
73560
  const controlledValueRef = vue.toRef(props, "value");
72832
73561
  const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
72833
- const themeRef = useTheme("DynamicInput", "-dynamic-input", style$L, dynamicInputLight, props, mergedClsPrefixRef);
73562
+ const themeRef = useTheme("DynamicInput", "-dynamic-input", style$K, dynamicInputLight, props, mergedClsPrefixRef);
72834
73563
  const insertionDisabledRef = vue.computed(() => {
72835
73564
  const { value: mergedValue } = mergedValueRef;
72836
73565
  if (Array.isArray(mergedValue)) {
@@ -73130,13 +73859,13 @@
73130
73859
 
73131
73860
  };
73132
73861
 
73133
- const self$z = () => {
73862
+ const self$y = () => {
73134
73863
  return commonVars$4;
73135
73864
  };
73136
73865
 
73137
73866
  const spaceLight = {
73138
73867
  name: "Space",
73139
- self: self$z
73868
+ self: self$y
73140
73869
  };
73141
73870
 
73142
73871
  var rtlStyle$2 = cB("space", [cM("rtl", `
@@ -73322,7 +74051,7 @@
73322
74051
 
73323
74052
  });
73324
74053
 
73325
- var style$K = cB("dynamic-tags", [cB("input", {
74054
+ var style$J = cB("dynamic-tags", [cB("input", {
73326
74055
  minWidth: "var(--n-input-width)"
73327
74056
  })]);
73328
74057
 
@@ -73374,7 +74103,7 @@
73374
74103
  const showInputRef = vue.ref(false);
73375
74104
  const inputForceFocusedRef = vue.ref(true);
73376
74105
  const inputInstRef = vue.ref(null);
73377
- const themeRef = useTheme("DynamicTags", "-dynamic-tags", style$K, dynamicTagsLight, props, mergedClsPrefixRef);
74106
+ const themeRef = useTheme("DynamicTags", "-dynamic-tags", style$J, dynamicTagsLight, props, mergedClsPrefixRef);
73378
74107
  const uncontrolledValueRef = vue.ref(props.defaultValue);
73379
74108
  const controlledValueRef = vue.toRef(props, "value");
73380
74109
  const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef);
@@ -73419,7 +74148,7 @@
73419
74148
  const nextValue = externalValue ?? inputValueRef.value;
73420
74149
  if (nextValue) {
73421
74150
  const tags = mergedValueRef.value.slice(0);
73422
- tags.push(nextValue);
74151
+ tags.push(props.onCreate(nextValue));
73423
74152
  doChange(tags);
73424
74153
  }
73425
74154
  showInputRef.value = false;
@@ -73641,7 +74370,7 @@
73641
74370
  labelTextAlignHorizontal: "right"
73642
74371
  };
73643
74372
 
73644
- const self$y = vars => {
74373
+ const self$x = vars => {
73645
74374
  const {
73646
74375
  heightSmall,
73647
74376
  heightMedium,
@@ -73667,16 +74396,16 @@
73667
74396
  const formLight = {
73668
74397
  name: "Form",
73669
74398
  common: derived,
73670
- self: self$y
74399
+ self: self$x
73671
74400
  };
73672
74401
 
73673
74402
  const formItemDark = {
73674
74403
  name: "Form",
73675
74404
  common: derived$1,
73676
- self: self$y
74405
+ self: self$x
73677
74406
  };
73678
74407
 
73679
- var style$J = cB("form", [cM("inline", `
74408
+ var style$I = cB("form", [cM("inline", `
73680
74409
  width: 100%;
73681
74410
  display: inline-flex;
73682
74411
  align-items: flex-start;
@@ -73732,7 +74461,7 @@
73732
74461
  props: formProps,
73733
74462
  setup(props) {
73734
74463
  const { mergedClsPrefixRef } = useConfig(props);
73735
- useTheme("Form", "-form", style$J, formLight, props, mergedClsPrefixRef);
74464
+ useTheme("Form", "-form", style$I, formLight, props, mergedClsPrefixRef);
73736
74465
  const formItems = {};
73737
74466
  const maxChildLabelWidthRef = vue.ref(void 0);
73738
74467
  const deriveMaxChildLabelWidth = (currentWidth) => {
@@ -75276,7 +76005,7 @@
75276
76005
  })];
75277
76006
  }
75278
76007
 
75279
- var style$I = cB("form-item", {
76008
+ var style$H = cB("form-item", {
75280
76009
  display: "grid",
75281
76010
  lineHeight: "var(--n-line-height)"
75282
76011
  }, [cB("form-item-label", `
@@ -75425,7 +76154,7 @@
75425
76154
  const renderExplainsRef = vue.ref([]);
75426
76155
  const feedbackIdRef = vue.ref(createId());
75427
76156
  const mergedDisabledRef = NForm ? vue.toRef(NForm.props, "disabled") : vue.ref(false);
75428
- const themeRef = useTheme("Form", "-form-item", style$I, formLight, props, mergedClsPrefixRef);
76157
+ const themeRef = useTheme("Form", "-form-item", style$H, formLight, props, mergedClsPrefixRef);
75429
76158
  vue.watch(vue.toRef(props, "path"), () => {
75430
76159
  if (props.ignorePathChange)
75431
76160
  return;
@@ -75850,7 +76579,7 @@
75850
76579
  right: percent
75851
76580
  })];
75852
76581
  });
75853
- var style$H = c$1([cB("row", {
76582
+ var style$G = c$1([cB("row", {
75854
76583
  width: "100%",
75855
76584
  display: "flex",
75856
76585
  flexWrap: "wrap"
@@ -75882,7 +76611,7 @@
75882
76611
  props: rowProps,
75883
76612
  setup(props) {
75884
76613
  const { mergedClsPrefixRef } = useConfig(props);
75885
- useStyle("-legacy-grid", style$H, mergedClsPrefixRef);
76614
+ useStyle("-legacy-grid", style$G, mergedClsPrefixRef);
75886
76615
  const verticalGutterRef = useMemo(() => {
75887
76616
  const { gutter } = props;
75888
76617
  if (Array.isArray(gutter)) {
@@ -76192,7 +76921,7 @@
76192
76921
 
76193
76922
  };
76194
76923
 
76195
- const self$x = vars => {
76924
+ const self$w = vars => {
76196
76925
  const {
76197
76926
  primaryColor,
76198
76927
  successColor,
@@ -76230,10 +76959,10 @@
76230
76959
  const gradientTextLight = {
76231
76960
  name: "GradientText",
76232
76961
  common: derived,
76233
- self: self$x
76962
+ self: self$w
76234
76963
  };
76235
76964
 
76236
- var style$G = cB("gradient-text", `
76965
+ var style$F = cB("gradient-text", `
76237
76966
  display: inline-block;
76238
76967
  font-weight: var(--n-font-weight);
76239
76968
  -webkit-background-clip: text;
@@ -76287,7 +77016,7 @@
76287
77016
  }
76288
77017
  return void 0;
76289
77018
  });
76290
- const themeRef = useTheme("GradientText", "-gradient-text", style$G, gradientTextLight, props, mergedClsPrefixRef);
77019
+ const themeRef = useTheme("GradientText", "-gradient-text", style$F, gradientTextLight, props, mergedClsPrefixRef);
76291
77020
  const cssVarsRef = vue.computed(() => {
76292
77021
  const { value: type } = compatibleTypeRef;
76293
77022
  const {
@@ -76523,7 +77252,7 @@
76523
77252
  }
76524
77253
  });
76525
77254
 
76526
- const self$w = vars => {
77255
+ const self$v = vars => {
76527
77256
  const {
76528
77257
  primaryColor,
76529
77258
  baseColor
@@ -76536,16 +77265,16 @@
76536
77265
  const iconWrapperLight = {
76537
77266
  name: "IconWrapper",
76538
77267
  common: derived,
76539
- self: self$w
77268
+ self: self$v
76540
77269
  };
76541
77270
 
76542
77271
  const iconDark = {
76543
77272
  name: "IconWrapper",
76544
77273
  common: derived$1,
76545
- self: self$w
77274
+ self: self$v
76546
77275
  };
76547
77276
 
76548
- var style$F = cB("icon-wrapper", `
77277
+ var style$E = cB("icon-wrapper", `
76549
77278
  transition:
76550
77279
  color .3s var(--n-bezier),
76551
77280
  background-color .3s var(--n-bezier);
@@ -76573,7 +77302,7 @@
76573
77302
  name: "IconWrapper",
76574
77303
  props: iconWrapperProps,
76575
77304
  setup(props, { slots }) {
76576
- const themeRef = useTheme("IconWrapper", "-icon-wrapper", style$F, iconWrapperLight, props);
77305
+ const themeRef = useTheme("IconWrapper", "-icon-wrapper", style$E, iconWrapperLight, props);
76577
77306
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
76578
77307
  const cssVarsRef = vue.computed(() => {
76579
77308
  const {
@@ -76610,7 +77339,7 @@
76610
77339
  }
76611
77340
  });
76612
77341
 
76613
- function self$v() {
77342
+ function self$u() {
76614
77343
  return {
76615
77344
  toolbarIconColor: "rgba(255, 255, 255, .9)",
76616
77345
  toolbarColor: "rgba(0, 0, 0, .35)",
@@ -76625,7 +77354,7 @@
76625
77354
  peers: {
76626
77355
  Tooltip: tooltipLight
76627
77356
  },
76628
- self: self$v
77357
+ self: self$u
76629
77358
  });
76630
77359
 
76631
77360
  const buttonGroupDark = {
@@ -76657,7 +77386,7 @@
76657
77386
 
76658
77387
  };
76659
77388
 
76660
- const self$u = vars => {
77389
+ const self$t = vars => {
76661
77390
  const {
76662
77391
  textColorDisabled
76663
77392
  } = vars;
@@ -76673,7 +77402,7 @@
76673
77402
  Button: buttonLight,
76674
77403
  Input: inputLight
76675
77404
  },
76676
- self: self$u
77405
+ self: self$t
76677
77406
  });
76678
77407
 
76679
77408
  const layoutDark = {
@@ -76722,7 +77451,7 @@
76722
77451
 
76723
77452
  };
76724
77453
 
76725
- const self$t = vars => {
77454
+ const self$s = vars => {
76726
77455
  const {
76727
77456
  baseColor,
76728
77457
  textColor2,
@@ -76766,10 +77495,10 @@
76766
77495
  peers: {
76767
77496
  Scrollbar: scrollbarLight
76768
77497
  },
76769
- self: self$t
77498
+ self: self$s
76770
77499
  });
76771
77500
 
76772
- const self$s = vars => {
77501
+ const self$r = vars => {
76773
77502
  const {
76774
77503
  textColor2,
76775
77504
  cardColor,
@@ -76794,13 +77523,13 @@
76794
77523
  const listLight = {
76795
77524
  name: "List",
76796
77525
  common: derived,
76797
- self: self$s
77526
+ self: self$r
76798
77527
  };
76799
77528
 
76800
77529
  const listDark$1 = {
76801
77530
  name: "List",
76802
77531
  common: derived$1,
76803
- self: self$s
77532
+ self: self$r
76804
77533
  };
76805
77534
 
76806
77535
  const loadingBarDark = {
@@ -76820,7 +77549,7 @@
76820
77549
 
76821
77550
  };
76822
77551
 
76823
- const self$r = vars => {
77552
+ const self$q = vars => {
76824
77553
  const {
76825
77554
  primaryColor,
76826
77555
  errorColor
@@ -76835,7 +77564,7 @@
76835
77564
  const loadingBarLight = {
76836
77565
  name: "LoadingBar",
76837
77566
  common: derived,
76838
- self: self$r
77567
+ self: self$q
76839
77568
  };
76840
77569
 
76841
77570
  const logDark = {
@@ -76864,7 +77593,7 @@
76864
77593
 
76865
77594
  };
76866
77595
 
76867
- const self$q = vars => {
77596
+ const self$p = vars => {
76868
77597
  const {
76869
77598
  textColor2,
76870
77599
  modalColor,
@@ -76888,7 +77617,7 @@
76888
77617
  Scrollbar: scrollbarLight,
76889
77618
  Code: codeLight
76890
77619
  },
76891
- self: self$q
77620
+ self: self$p
76892
77621
  });
76893
77622
 
76894
77623
  const listDark = {
@@ -76910,7 +77639,7 @@
76910
77639
 
76911
77640
  };
76912
77641
 
76913
- const self$p = vars => {
77642
+ const self$o = vars => {
76914
77643
  const {
76915
77644
  boxShadow2
76916
77645
  } = vars;
@@ -76926,7 +77655,7 @@
76926
77655
  InternalSelectMenu: internalSelectMenuLight,
76927
77656
  Input: inputLight
76928
77657
  },
76929
- self: self$p
77658
+ self: self$o
76930
77659
  });
76931
77660
 
76932
77661
  function createPartialInvertedVars(color, activeItemColor, activeTextColor, groupTextColor) {
@@ -76969,7 +77698,7 @@
76969
77698
  groupTextColorInverted: groupTextColor
76970
77699
  };
76971
77700
  }
76972
- const self$o = vars => {
77701
+ const self$n = vars => {
76973
77702
  const {
76974
77703
  borderRadius,
76975
77704
  textColor3,
@@ -77041,7 +77770,7 @@
77041
77770
  Tooltip: tooltipLight,
77042
77771
  Dropdown: dropdownLight
77043
77772
  },
77044
- self: self$o
77773
+ self: self$n
77045
77774
  });
77046
77775
 
77047
77776
  const menuDark = {
@@ -77057,7 +77786,7 @@
77057
77786
  primaryColor,
77058
77787
  primaryColorSuppl
77059
77788
  } = vars;
77060
- const commonSelf = self$o(vars);
77789
+ const commonSelf = self$n(vars);
77061
77790
  commonSelf.itemColorActive = changeColor(primaryColor, {
77062
77791
  alpha: 0.15
77063
77792
  });
@@ -77088,7 +77817,7 @@
77088
77817
  fontSize: "14px"
77089
77818
  };
77090
77819
 
77091
- const self$n = vars => {
77820
+ const self$m = vars => {
77092
77821
  const {
77093
77822
  textColor2,
77094
77823
  closeIconColor,
@@ -77170,13 +77899,13 @@
77170
77899
  const messageLight = {
77171
77900
  name: "Message",
77172
77901
  common: derived,
77173
- self: self$n
77902
+ self: self$m
77174
77903
  };
77175
77904
 
77176
77905
  const messageDark = {
77177
77906
  name: "Message",
77178
77907
  common: derived$1,
77179
- self: self$n
77908
+ self: self$m
77180
77909
  };
77181
77910
 
77182
77911
  var commonVars$3 = {
@@ -77187,7 +77916,7 @@
77187
77916
  padding: "16px"
77188
77917
  };
77189
77918
 
77190
- const self$m = vars => {
77919
+ const self$l = vars => {
77191
77920
  const {
77192
77921
  textColor2,
77193
77922
  successColor,
@@ -77238,7 +77967,7 @@
77238
77967
  peers: {
77239
77968
  Scrollbar: scrollbarLight
77240
77969
  },
77241
- self: self$m
77970
+ self: self$l
77242
77971
  });
77243
77972
 
77244
77973
  const notificationDark = {
@@ -77247,7 +77976,7 @@
77247
77976
  peers: {
77248
77977
  Scrollbar: scrollbarDark
77249
77978
  },
77250
- self: self$m
77979
+ self: self$l
77251
77980
  };
77252
77981
 
77253
77982
  var common = {
@@ -77255,7 +77984,7 @@
77255
77984
  backSize: "22px"
77256
77985
  };
77257
77986
 
77258
- function self$l(vars) {
77987
+ function self$k(vars) {
77259
77988
  const {
77260
77989
  textColor1,
77261
77990
  textColor2,
@@ -77278,13 +78007,13 @@
77278
78007
  const pageHeaderLight = createTheme$1({
77279
78008
  name: "PageHeader",
77280
78009
  common: derived,
77281
- self: self$l
78010
+ self: self$k
77282
78011
  });
77283
78012
 
77284
78013
  const pageHeaderDark = {
77285
78014
  name: "PageHeader",
77286
78015
  common: derived$1,
77287
- self: self$l
78016
+ self: self$k
77288
78017
  };
77289
78018
 
77290
78019
  var rtlStyle$1 = cB("page-header-wrapper", [cM("rtl", [cB("page-header-header", `
@@ -77315,7 +78044,7 @@
77315
78044
  iconSize: "22px"
77316
78045
  };
77317
78046
 
77318
- const self$k = vars => {
78047
+ const self$j = vars => {
77319
78048
  const {
77320
78049
  fontSize,
77321
78050
  warningColor
@@ -77332,7 +78061,7 @@
77332
78061
  Button: buttonLight,
77333
78062
  Popover: popoverLight
77334
78063
  },
77335
- self: self$k
78064
+ self: self$j
77336
78065
  });
77337
78066
 
77338
78067
  const popconfirmDark = {
@@ -77342,35 +78071,8 @@
77342
78071
  Button: buttonDark,
77343
78072
  Popover: popoverDark
77344
78073
  },
77345
- self: self$k
77346
- };
77347
-
77348
- const popselect = {
77349
- name: "Popselect",
77350
- common: derived$1,
77351
- peers: {
77352
- Popover: popoverDark,
77353
- InternalSelectMenu: internalSelectMenuDark
77354
- }
77355
- };
77356
-
77357
- function self$j(vars) {
77358
- const {
77359
- boxShadow2
77360
- } = vars;
77361
- return {
77362
- menuBoxShadow: boxShadow2
77363
- };
77364
- }
77365
- const popselectLight = createTheme$1({
77366
- name: "Popselect",
77367
- common: derived,
77368
- peers: {
77369
- Popover: popoverLight,
77370
- InternalSelectMenu: internalSelectMenuLight
77371
- },
77372
78074
  self: self$j
77373
- });
78075
+ };
77374
78076
 
77375
78077
  const self$i = vars => {
77376
78078
  const {
@@ -78601,7 +79303,7 @@
78601
79303
  showToolbarTooltip: Boolean
78602
79304
  };
78603
79305
 
78604
- var style$E = c$1([c$1("body >", [cB("image-container", "position: fixed;")]), cB("image-preview-container", `
79306
+ var style$D = c$1([c$1("body >", [cB("image-container", "position: fixed;")]), cB("image-preview-container", `
78605
79307
  position: fixed;
78606
79308
  left: 0;
78607
79309
  right: 0;
@@ -78673,7 +79375,7 @@
78673
79375
  }
78674
79376
  },
78675
79377
  setup(props) {
78676
- const themeRef = useTheme("Image", "-image", style$E, imageLight, props, vue.toRef(props, "clsPrefix"));
79378
+ const themeRef = useTheme("Image", "-image", style$D, imageLight, props, vue.toRef(props, "clsPrefix"));
78677
79379
  let thumbnailEl = null;
78678
79380
  const previewRef = vue.ref(null);
78679
79381
  const previewWrapperRef = vue.ref(null);
@@ -79303,7 +80005,7 @@
79303
80005
  }
79304
80006
  }
79305
80007
 
79306
- var style$D = c$1([cB("input-number-suffix", `
80008
+ var style$C = c$1([cB("input-number-suffix", `
79307
80009
  display: inline-block;
79308
80010
  margin-right: 10px;
79309
80011
  `), cB("input-number-prefix", `
@@ -79383,7 +80085,7 @@
79383
80085
  });
79384
80086
  }
79385
80087
  const { mergedBorderedRef, mergedClsPrefixRef, mergedRtlRef } = useConfig(props);
79386
- const themeRef = useTheme("InputNumber", "-input-number", style$D, inputNumberLight, props, mergedClsPrefixRef);
80088
+ const themeRef = useTheme("InputNumber", "-input-number", style$C, inputNumberLight, props, mergedClsPrefixRef);
79387
80089
  const { localeRef } = useLocale("InputNumber");
79388
80090
  const formItem = useFormItem(props);
79389
80091
  const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem;
@@ -79925,7 +80627,13 @@
79925
80627
  }
79926
80628
  });
79927
80629
 
79928
- var style$C = cB("layout", `
80630
+ const layoutSiderInjectionKey = createInjectionKey("n-layout-sider");
80631
+ const positionProp = {
80632
+ type: String,
80633
+ default: "static"
80634
+ };
80635
+
80636
+ var style$B = cB("layout", `
79929
80637
  color: var(--n-text-color);
79930
80638
  background-color: var(--n-color);
79931
80639
  box-sizing: border-box;
@@ -79949,12 +80657,6 @@
79949
80657
  bottom: 0;
79950
80658
  `)]);
79951
80659
 
79952
- const layoutSiderInjectionKey = createInjectionKey("n-layout-sider");
79953
- const positionProp = {
79954
- type: String,
79955
- default: "static"
79956
- };
79957
-
79958
80660
  const layoutProps = {
79959
80661
  embedded: Boolean,
79960
80662
  position: positionProp,
@@ -79986,7 +80688,7 @@
79986
80688
  const scrollableElRef = vue.ref(null);
79987
80689
  const scrollbarInstRef = vue.ref(null);
79988
80690
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
79989
- const themeRef = useTheme("Layout", "-layout", style$C, layoutLight, props, mergedClsPrefixRef);
80691
+ const themeRef = useTheme("Layout", "-layout", style$B, layoutLight, props, mergedClsPrefixRef);
79990
80692
  function scrollTo(options, y) {
79991
80693
  if (props.nativeScrollbar) {
79992
80694
  const { value: scrollableEl } = scrollableElRef;
@@ -80005,6 +80707,23 @@
80005
80707
  }
80006
80708
  }
80007
80709
  vue.provide(layoutInjectionKey, props);
80710
+ let scrollX = 0;
80711
+ let scrollY = 0;
80712
+ const handleNativeElScroll = (e) => {
80713
+ const target = e.target;
80714
+ scrollX = target.scrollLeft;
80715
+ scrollY = target.scrollTop;
80716
+ props.onScroll?.(e);
80717
+ };
80718
+ useReactivated(() => {
80719
+ if (props.nativeScrollbar) {
80720
+ const el = scrollableElRef.value;
80721
+ if (el) {
80722
+ el.scrollTop = scrollY;
80723
+ el.scrollLeft = scrollX;
80724
+ }
80725
+ }
80726
+ });
80008
80727
  const hasSiderStyle = {
80009
80728
  display: "flex",
80010
80729
  flexWrap: "nowrap",
@@ -80032,6 +80751,7 @@
80032
80751
  scrollbarInstRef,
80033
80752
  hasSiderStyle,
80034
80753
  mergedTheme: themeRef,
80754
+ handleNativeElScroll,
80035
80755
  cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
80036
80756
  themeClass: themeClassHandle?.themeClass,
80037
80757
  onRender: themeClassHandle?.onRender,
@@ -80055,7 +80775,7 @@
80055
80775
  ref: "scrollableElRef",
80056
80776
  class: `${mergedClsPrefix}-layout-scroll-container`,
80057
80777
  style: [this.contentStyle, hasSiderStyle],
80058
- onScroll: this.onScroll
80778
+ onScroll: this.handleNativeElScroll
80059
80779
  }, this.$slots) : /* @__PURE__ */ vue.h(Scrollbar$1, {
80060
80780
  ...this.scrollbarProps,
80061
80781
  onScroll: this.onScroll,
@@ -80071,7 +80791,7 @@
80071
80791
 
80072
80792
  var LayoutContent = createLayoutComponent(true);
80073
80793
 
80074
- var style$B = cB("layout-header", `
80794
+ var style$A = cB("layout-header", `
80075
80795
  transition:
80076
80796
  color .3s var(--n-bezier),
80077
80797
  background-color .3s var(--n-bezier),
@@ -80106,7 +80826,7 @@
80106
80826
  },
80107
80827
  setup(props) {
80108
80828
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
80109
- const themeRef = useTheme("Layout", "-layout-header", style$B, layoutLight, props, mergedClsPrefixRef);
80829
+ const themeRef = useTheme("Layout", "-layout-header", style$A, layoutLight, props, mergedClsPrefixRef);
80110
80830
  const cssVarsRef = vue.computed(() => {
80111
80831
  const {
80112
80832
  common: { cubicBezierEaseInOut },
@@ -80149,7 +80869,7 @@
80149
80869
  }
80150
80870
  });
80151
80871
 
80152
- var style$A = cB("layout-footer", `
80872
+ var style$z = cB("layout-footer", `
80153
80873
  transition:
80154
80874
  box-shadow .3s var(--n-bezier),
80155
80875
  color .3s var(--n-bezier),
@@ -80178,7 +80898,7 @@
80178
80898
  props: layoutFooterProps,
80179
80899
  setup(props) {
80180
80900
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
80181
- const themeRef = useTheme("Layout", "-layout-footer", style$A, layoutLight, props, mergedClsPrefixRef);
80901
+ const themeRef = useTheme("Layout", "-layout-footer", style$z, layoutLight, props, mergedClsPrefixRef);
80182
80902
  const cssVarsRef = vue.computed(() => {
80183
80903
  const {
80184
80904
  common: { cubicBezierEaseInOut },
@@ -80221,7 +80941,7 @@
80221
80941
  }
80222
80942
  });
80223
80943
 
80224
- var style$z = cB("layout-sider", `
80944
+ var style$y = cB("layout-sider", `
80225
80945
  flex-shrink: 0;
80226
80946
  box-sizing: border-box;
80227
80947
  position: relative;
@@ -80518,12 +81238,29 @@
80518
81238
  call(onCollapse);
80519
81239
  }
80520
81240
  }
81241
+ let scrollX = 0;
81242
+ let scrollY = 0;
81243
+ const handleNativeElScroll = (e) => {
81244
+ const target = e.target;
81245
+ scrollX = target.scrollLeft;
81246
+ scrollY = target.scrollTop;
81247
+ props.onScroll?.(e);
81248
+ };
81249
+ useReactivated(() => {
81250
+ if (props.nativeScrollbar) {
81251
+ const el = scrollableElRef.value;
81252
+ if (el) {
81253
+ el.scrollTop = scrollY;
81254
+ el.scrollLeft = scrollX;
81255
+ }
81256
+ }
81257
+ });
80521
81258
  vue.provide(layoutSiderInjectionKey, {
80522
81259
  collapsedRef: mergedCollapsedRef,
80523
81260
  collapseModeRef: vue.toRef(props, "collapseMode")
80524
81261
  });
80525
81262
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
80526
- const themeRef = useTheme("Layout", "-layout-sider", style$z, layoutLight, props, mergedClsPrefixRef);
81263
+ const themeRef = useTheme("Layout", "-layout-sider", style$y, layoutLight, props, mergedClsPrefixRef);
80527
81264
  function handleTransitionend(e) {
80528
81265
  if (e.propertyName === "max-width") {
80529
81266
  if (mergedCollapsedRef.value) {
@@ -80578,6 +81315,7 @@
80578
81315
  mergedCollapsed: mergedCollapsedRef,
80579
81316
  scrollContainerStyle: scrollContainerStyleRef,
80580
81317
  siderPlacement: siderPlacementRef,
81318
+ handleNativeElScroll,
80581
81319
  handleTransitionend,
80582
81320
  handleTriggerClick,
80583
81321
  inlineThemeDisabled,
@@ -80622,7 +81360,7 @@
80622
81360
  } : void 0
80623
81361
  }, this.$slots) : /* @__PURE__ */ vue.h("div", {
80624
81362
  class: `${mergedClsPrefix}-layout-sider-scroll-container`,
80625
- onScroll: this.onScroll,
81363
+ onScroll: this.handleNativeElScroll,
80626
81364
  style: [
80627
81365
  this.scrollContainerStyle,
80628
81366
  {
@@ -80645,7 +81383,7 @@
80645
81383
  }
80646
81384
  });
80647
81385
 
80648
- var style$y = c$1([cB("list", `
81386
+ var style$x = c$1([cB("list", `
80649
81387
  --n-merged-border-color: var(--n-border-color);
80650
81388
  --n-merged-color: var(--n-color);
80651
81389
  font-size: var(--n-font-size);
@@ -80716,7 +81454,7 @@
80716
81454
  props: listProps,
80717
81455
  setup(props) {
80718
81456
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
80719
- const themeRef = useTheme("List", "-list", style$y, listLight, props, mergedClsPrefixRef);
81457
+ const themeRef = useTheme("List", "-list", style$x, listLight, props, mergedClsPrefixRef);
80720
81458
  vue.provide(listInjectionKey, {
80721
81459
  mergedClsPrefixRef
80722
81460
  });
@@ -80802,7 +81540,7 @@
80802
81540
  const loadingBarProviderInjectionKey = createInjectionKey("n-loading-bar");
80803
81541
  const loadingBarApiInjectionKey = createInjectionKey("n-loading-bar-api");
80804
81542
 
80805
- var style$x = cB("loading-bar-container", `
81543
+ var style$w = cB("loading-bar-container", `
80806
81544
  z-index: 5999;
80807
81545
  position: fixed;
80808
81546
  top: 0;
@@ -80925,7 +81663,7 @@
80925
81663
  async function handleAfterLeave() {
80926
81664
  await init();
80927
81665
  }
80928
- const themeRef = useTheme("LoadingBar", "-loading-bar", style$x, loadingBarLight, providerProps, mergedClsPrefixRef);
81666
+ const themeRef = useTheme("LoadingBar", "-loading-bar", style$w, loadingBarLight, providerProps, mergedClsPrefixRef);
80929
81667
  const cssVarsRef = vue.computed(() => {
80930
81668
  const {
80931
81669
  self: { height, colorError, colorLoading }
@@ -81142,7 +81880,7 @@
81142
81880
  }
81143
81881
  });
81144
81882
 
81145
- var style$w = cB("log", `
81883
+ var style$v = cB("log", `
81146
81884
  position: relative;
81147
81885
  box-sizing: border-box;
81148
81886
  transition: border-color .3s var(--n-bezier);
@@ -81241,7 +81979,7 @@
81241
81979
  return props.lines;
81242
81980
  });
81243
81981
  const scrollbarRef = vue.ref(null);
81244
- const themeRef = useTheme("Log", "-log", style$w, logLight, props, mergedClsPrefixRef);
81982
+ const themeRef = useTheme("Log", "-log", style$v, logLight, props, mergedClsPrefixRef);
81245
81983
  function handleScroll(e) {
81246
81984
  const container = e.target;
81247
81985
  const content = container.firstElementChild;
@@ -82022,7 +82760,7 @@
82022
82760
  `), cE("extra", `
82023
82761
  color: var(--n-item-text-color-hover-horizontal);
82024
82762
  `)])];
82025
- var style$v = c$1([cB("menu", `
82763
+ var style$u = c$1([cB("menu", `
82026
82764
  background-color: var(--n-color);
82027
82765
  color: var(--n-item-text-color);
82028
82766
  overflow: hidden;
@@ -82302,7 +83040,7 @@
82302
83040
  useCheckDeprecated(props);
82303
83041
  }
82304
83042
  const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
82305
- const themeRef = useTheme("Menu", "-menu", style$v, menuLight, props, mergedClsPrefixRef);
83043
+ const themeRef = useTheme("Menu", "-menu", style$u, menuLight, props, mergedClsPrefixRef);
82306
83044
  const layoutSider = vue.inject(layoutSiderInjectionKey, null);
82307
83045
  const mergedCollapsedRef = vue.computed(() => {
82308
83046
  const { collapsed } = props;
@@ -82677,7 +83415,7 @@
82677
83415
  return relativePosition;
82678
83416
  }
82679
83417
 
82680
- var style$u = c$1([cB("mention", "width: 100%; z-index: auto; position: relative;"), cB("mention-menu", `
83418
+ var style$t = c$1([cB("mention", "width: 100%; z-index: auto; position: relative;"), cB("mention-menu", `
82681
83419
  box-shadow: var(--n-menu-box-shadow);
82682
83420
  `, [fadeInScaleUpTransition({
82683
83421
  originalTransition: "background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"
@@ -82750,7 +83488,7 @@
82750
83488
  mergedBorderedRef,
82751
83489
  inlineThemeDisabled
82752
83490
  } = useConfig(props);
82753
- const themeRef = useTheme("Mention", "-mention", style$u, mentionLight, props, mergedClsPrefixRef);
83491
+ const themeRef = useTheme("Mention", "-mention", style$t, mentionLight, props, mergedClsPrefixRef);
82754
83492
  const formItem = useFormItem(props);
82755
83493
  const inputInstRef = vue.ref(null);
82756
83494
  const cursorRef = vue.ref(null);
@@ -83091,7 +83829,7 @@
83091
83829
  const messageApiInjectionKey = createInjectionKey("n-message-api");
83092
83830
  const messageProviderInjectionKey = createInjectionKey("n-message-provider");
83093
83831
 
83094
- var style$t = c$1([cB("message-wrapper", `
83832
+ var style$s = c$1([cB("message-wrapper", `
83095
83833
  margin: var(--n-margin);
83096
83834
  z-index: 0;
83097
83835
  transform-origin: top center;
@@ -83214,7 +83952,7 @@
83214
83952
  props: messageProviderProps,
83215
83953
  mergedClsPrefixRef
83216
83954
  } = vue.inject(messageProviderInjectionKey);
83217
- const themeRef = useTheme("Message", "-message", style$t, messageLight, messageProviderProps, mergedClsPrefixRef);
83955
+ const themeRef = useTheme("Message", "-message", style$s, messageLight, messageProviderProps, mergedClsPrefixRef);
83218
83956
  const cssVarsRef = vue.computed(() => {
83219
83957
  const { type } = props;
83220
83958
  const {
@@ -83904,7 +84642,7 @@
83904
84642
  }
83905
84643
  });
83906
84644
 
83907
- var style$s = c$1([cB("notification-container", `
84645
+ var style$r = c$1([cB("notification-container", `
83908
84646
  z-index: 4000;
83909
84647
  position: fixed;
83910
84648
  overflow: visible;
@@ -84169,7 +84907,7 @@
84169
84907
  leavingKeySet.delete(key);
84170
84908
  notificationListRef.value.splice(notificationListRef.value.findIndex((notification) => notification.key === key), 1);
84171
84909
  }
84172
- const themeRef = useTheme("Notification", "-notification", style$s, notificationLight, props, mergedClsPrefixRef);
84910
+ const themeRef = useTheme("Notification", "-notification", style$r, notificationLight, props, mergedClsPrefixRef);
84173
84911
  const api = {
84174
84912
  create,
84175
84913
  info: apis[0],
@@ -84245,7 +84983,7 @@
84245
84983
  return api;
84246
84984
  }
84247
84985
 
84248
- var style$r = c$1([cB("page-header-header", `
84986
+ var style$q = c$1([cB("page-header-header", `
84249
84987
  margin-bottom: 20px;
84250
84988
  `), cB("page-header", `
84251
84989
  display: flex;
@@ -84295,7 +85033,7 @@
84295
85033
  props: pageHeaderProps,
84296
85034
  setup(props) {
84297
85035
  const { mergedClsPrefixRef, mergedRtlRef, inlineThemeDisabled } = useConfig(props);
84298
- const themeRef = useTheme("PageHeader", "-page-header", style$r, pageHeaderLight, props, mergedClsPrefixRef);
85036
+ const themeRef = useTheme("PageHeader", "-page-header", style$q, pageHeaderLight, props, mergedClsPrefixRef);
84299
85037
  const rtlEnabledRef = useRtl("PageHeader", mergedRtlRef, mergedClsPrefixRef);
84300
85038
  const cssVarsRef = vue.computed(() => {
84301
85039
  const {
@@ -84396,7 +85134,7 @@
84396
85134
 
84397
85135
  const popconfirmInjectionKey = createInjectionKey("n-popconfirm");
84398
85136
 
84399
- const panelProps$1 = {
85137
+ const panelProps = {
84400
85138
  positiveText: String,
84401
85139
  negativeText: String,
84402
85140
  showIcon: {
@@ -84412,10 +85150,10 @@
84412
85150
  required: true
84413
85151
  }
84414
85152
  };
84415
- const panelPropKeys$1 = keysOf(panelProps$1);
85153
+ const panelPropKeys = keysOf(panelProps);
84416
85154
  var PopconfirmPanel = vue.defineComponent({
84417
85155
  name: "NPopconfirmPanel",
84418
- props: panelProps$1,
85156
+ props: panelProps,
84419
85157
  setup(props) {
84420
85158
  const { localeRef } = useLocale("Popconfirm");
84421
85159
  const { inlineThemeDisabled } = useConfig();
@@ -84492,7 +85230,7 @@
84492
85230
  }
84493
85231
  });
84494
85232
 
84495
- var style$q = cB("popconfirm", [cE("body", `
85233
+ var style$p = cB("popconfirm", [cE("body", `
84496
85234
  font-size: var(--n-font-size);
84497
85235
  display: flex;
84498
85236
  align-items: center;
@@ -84535,7 +85273,7 @@
84535
85273
  const {
84536
85274
  mergedClsPrefixRef
84537
85275
  } = useConfig();
84538
- const themeRef = useTheme("Popconfirm", "-popconfirm", style$q, popconfirmLight, props, mergedClsPrefixRef);
85276
+ const themeRef = useTheme("Popconfirm", "-popconfirm", style$p, popconfirmLight, props, mergedClsPrefixRef);
84539
85277
  const popoverInstRef = vue.ref(null);
84540
85278
 
84541
85279
  function handlePositiveClick(e) {
@@ -84591,7 +85329,7 @@
84591
85329
  $props: props,
84592
85330
  mergedTheme
84593
85331
  } = this;
84594
- return vue.h(NPopover, omit(props, panelPropKeys$1, {
85332
+ return vue.h(NPopover, omit(props, panelPropKeys, {
84595
85333
  theme: mergedTheme.peers.Popover,
84596
85334
  themeOverrides: mergedTheme.peerOverrides.Popover,
84597
85335
  internalExtraClass: ["popconfirm"],
@@ -84599,7 +85337,7 @@
84599
85337
  }), {
84600
85338
  trigger: slots.activator || slots.trigger,
84601
85339
  default: () => {
84602
- const panelProps = keep(props, panelPropKeys$1);
85340
+ const panelProps = keep(props, panelPropKeys);
84603
85341
  return vue.h(PopconfirmPanel, { ...panelProps,
84604
85342
  onPositiveClick: this.handlePositiveClick,
84605
85343
  onNegativeClick: this.handleNegativeClick
@@ -84610,248 +85348,6 @@
84610
85348
 
84611
85349
  });
84612
85350
 
84613
- const popselectInjectionKey = createInjectionKey("n-popselect");
84614
-
84615
- var style$p = cB("popselect-menu", `
84616
- box-shadow: var(--n-menu-box-shadow);
84617
- `);
84618
-
84619
- const panelProps = {
84620
- multiple: Boolean,
84621
- value: {
84622
- type: [String, Number, Array],
84623
- default: null
84624
- },
84625
- cancelable: Boolean,
84626
- options: {
84627
- type: Array,
84628
- default: () => []
84629
- },
84630
- size: {
84631
- type: String,
84632
- default: "medium"
84633
- },
84634
- scrollable: Boolean,
84635
- "onUpdate:value": [Function, Array],
84636
- onUpdateValue: [Function, Array],
84637
- onMouseenter: Function,
84638
- onMouseleave: Function,
84639
- renderLabel: Function,
84640
- onChange: [Function, Array]
84641
- };
84642
- const panelPropKeys = keysOf(panelProps);
84643
- var NPopselectPanel = vue.defineComponent({
84644
- name: "PopselectPanel",
84645
- props: panelProps,
84646
- setup(props) {
84647
- {
84648
- vue.watchEffect(() => {
84649
- if (props.onChange !== void 0) {
84650
- warn$2("popselect", "`on-change` is deprecated, please use `on-update:value` instead.");
84651
- }
84652
- });
84653
- }
84654
- const NPopselect = vue.inject(popselectInjectionKey);
84655
- const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
84656
- const themeRef = useTheme("Popselect", "-pop-select", style$p, popselectLight, NPopselect.props, mergedClsPrefixRef);
84657
- const treeMateRef = vue.computed(() => {
84658
- return createTreeMate(props.options, createTmOptions("value", "children"));
84659
- });
84660
- function doUpdateValue(value, option) {
84661
- const {
84662
- onUpdateValue,
84663
- "onUpdate:value": _onUpdateValue,
84664
- onChange
84665
- } = props;
84666
- if (onUpdateValue)
84667
- call(onUpdateValue, value, option);
84668
- if (_onUpdateValue) {
84669
- call(_onUpdateValue, value, option);
84670
- }
84671
- if (onChange)
84672
- call(onChange, value, option);
84673
- }
84674
- function handleToggle(tmNode) {
84675
- toggle(tmNode.key);
84676
- }
84677
- function handleMenuMousedown(e) {
84678
- if (!happensIn(e, "action"))
84679
- e.preventDefault();
84680
- }
84681
- function toggle(value) {
84682
- const {
84683
- value: { getNode }
84684
- } = treeMateRef;
84685
- if (props.multiple) {
84686
- if (Array.isArray(props.value)) {
84687
- const newValue = [];
84688
- const newOptions = [];
84689
- let shouldAddValue = true;
84690
- props.value.forEach((v) => {
84691
- if (v === value) {
84692
- shouldAddValue = false;
84693
- return;
84694
- }
84695
- const tmNode = getNode(v);
84696
- if (tmNode) {
84697
- newValue.push(tmNode.key);
84698
- newOptions.push(tmNode.rawNode);
84699
- }
84700
- });
84701
- if (shouldAddValue) {
84702
- newValue.push(value);
84703
- newOptions.push(getNode(value).rawNode);
84704
- }
84705
- doUpdateValue(newValue, newOptions);
84706
- } else {
84707
- const tmNode = getNode(value);
84708
- if (tmNode) {
84709
- doUpdateValue([value], [tmNode.rawNode]);
84710
- }
84711
- }
84712
- } else {
84713
- if (props.value === value && props.cancelable) {
84714
- doUpdateValue(null, null);
84715
- } else {
84716
- const tmNode = getNode(value);
84717
- if (tmNode) {
84718
- doUpdateValue(value, tmNode.rawNode);
84719
- }
84720
- NPopselect.setShow(false);
84721
- }
84722
- }
84723
- void vue.nextTick(() => {
84724
- NPopselect.syncPosition();
84725
- });
84726
- }
84727
- vue.watch(vue.toRef(props, "options"), () => {
84728
- void vue.nextTick(() => {
84729
- NPopselect.syncPosition();
84730
- });
84731
- });
84732
- const cssVarsRef = vue.computed(() => {
84733
- const {
84734
- self: { menuBoxShadow }
84735
- } = themeRef.value;
84736
- return {
84737
- "--n-menu-box-shadow": menuBoxShadow
84738
- };
84739
- });
84740
- const themeClassHandle = inlineThemeDisabled ? useThemeClass("select", void 0, cssVarsRef, NPopselect.props) : void 0;
84741
- return {
84742
- mergedTheme: NPopselect.mergedThemeRef,
84743
- mergedClsPrefix: mergedClsPrefixRef,
84744
- treeMate: treeMateRef,
84745
- handleToggle,
84746
- handleMenuMousedown,
84747
- cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
84748
- themeClass: themeClassHandle?.themeClass,
84749
- onRender: themeClassHandle?.onRender
84750
- };
84751
- },
84752
- render() {
84753
- this.onRender?.();
84754
- return /* @__PURE__ */ vue.h(NInternalSelectMenu, {
84755
- clsPrefix: this.mergedClsPrefix,
84756
- focusable: true,
84757
- class: [`${this.mergedClsPrefix}-popselect-menu`, this.themeClass],
84758
- style: this.cssVars,
84759
- theme: this.mergedTheme.peers.InternalSelectMenu,
84760
- themeOverrides: this.mergedTheme.peerOverrides.InternalSelectMenu,
84761
- multiple: this.multiple,
84762
- treeMate: this.treeMate,
84763
- size: this.size,
84764
- value: this.value,
84765
- virtualScroll: false,
84766
- scrollable: this.scrollable,
84767
- renderLabel: this.renderLabel,
84768
- onToggle: this.handleToggle,
84769
- onMouseenter: this.onMouseenter,
84770
- onMouseleave: this.onMouseenter,
84771
- onMousedown: this.handleMenuMousedown
84772
- }, {
84773
- action: () => this.$slots.action?.() || [],
84774
- empty: () => this.$slots.empty?.() || []
84775
- });
84776
- }
84777
- });
84778
-
84779
- const popselectProps = {
84780
- ...useTheme.props,
84781
- ...omit(popoverBaseProps, ["showArrow", "arrow"]),
84782
- placement: {
84783
- ...popoverBaseProps.placement,
84784
- default: "bottom"
84785
- },
84786
- trigger: {
84787
- type: String,
84788
- default: "hover"
84789
- },
84790
- ...panelProps
84791
- };
84792
- var Popselect = vue.defineComponent({
84793
- name: "Popselect",
84794
- props: popselectProps,
84795
- __popover__: true,
84796
- setup(props) {
84797
- const themeRef = useTheme("Popselect", "-popselect", void 0, popselectLight, props);
84798
- const popoverInstRef = vue.ref(null);
84799
- function syncPosition() {
84800
- popoverInstRef.value?.syncPosition();
84801
- }
84802
- function setShow(value) {
84803
- popoverInstRef.value?.setShow(value);
84804
- }
84805
- vue.provide(popselectInjectionKey, {
84806
- props,
84807
- mergedThemeRef: themeRef,
84808
- syncPosition,
84809
- setShow
84810
- });
84811
- const exposedMethods = {
84812
- syncPosition,
84813
- setShow
84814
- };
84815
- return {
84816
- ...exposedMethods,
84817
- popoverInstRef,
84818
- mergedTheme: themeRef
84819
- };
84820
- },
84821
- render() {
84822
- const { mergedTheme } = this;
84823
- const popoverProps = {
84824
- theme: mergedTheme.peers.Popover,
84825
- themeOverrides: mergedTheme.peerOverrides.Popover,
84826
- builtinThemeOverrides: {
84827
- padding: "0"
84828
- },
84829
- ref: "popoverInstRef",
84830
- internalRenderBody: (className, ref2, style, onMouseenter, onMouseleave) => {
84831
- return /* @__PURE__ */ vue.h(NPopselectPanel, {
84832
- ...vue.mergeProps(this.$attrs, {
84833
- class: className,
84834
- style
84835
- }),
84836
- ...keep(this.$props, panelPropKeys),
84837
- ref: createRefSetter(ref2),
84838
- onMouseenter,
84839
- onMouseleave
84840
- }, {
84841
- action: () => this.$slots.action?.(),
84842
- empty: () => this.$slots.empty?.()
84843
- });
84844
- }
84845
- };
84846
- return /* @__PURE__ */ vue.h(NPopover, {
84847
- ...omit(this.$props, panelPropKeys),
84848
- ...popoverProps
84849
- }, {
84850
- trigger: () => this.$slots.default?.()
84851
- });
84852
- }
84853
- });
84854
-
84855
85351
  var style$o = c$1([cB("progress", {
84856
85352
  display: "inline-block"
84857
85353
  }, [cB("progress-icon", `
@@ -86257,11 +86753,11 @@
86257
86753
  width: 100%;
86258
86754
  cursor: pointer;
86259
86755
  user-select: none;
86260
- `, [cM("reverse", [cB("slider-handles", [cB("slider-handle", `
86756
+ `, [cM("reverse", [cB("slider-handles", [cB("slider-handle-wrapper", `
86261
86757
  transform: translate(50%, -50%);
86262
86758
  `)]), cB("slider-dots", [cB("slider-dot", `
86263
86759
  transform: translateX(50%, -50%);
86264
- `)]), cM("vertical", [cB("slider-handles", [cB("slider-handle", `
86760
+ `)]), cM("vertical", [cB("slider-handles", [cB("slider-handle-wrapper", `
86265
86761
  transform: translate(-50%, -50%);
86266
86762
  `)]), cB("slider-marks", [cB("slider-mark", `
86267
86763
  transform: translateY(calc(-50% + var(--n-dot-height) / 2));
@@ -86276,7 +86772,7 @@
86276
86772
  right: 0;
86277
86773
  bottom: calc(var(--n-handle-size) / 2);
86278
86774
  left: 0;
86279
- `, [cB("slider-handle", `
86775
+ `, [cB("slider-handle-wrapper", `
86280
86776
  top: unset;
86281
86777
  left: 50%;
86282
86778
  transform: translate(-50%, 50%);
@@ -86330,10 +86826,11 @@
86330
86826
  top: 18px;
86331
86827
  left: calc(var(--n-handle-size) / 2);
86332
86828
  right: calc(var(--n-handle-size) / 2);
86333
- `, [cB("slider-mark", {
86334
- position: "absolute",
86335
- transform: "translateX(-50%)"
86336
- })]), cB("slider-rail", `
86829
+ `, [cB("slider-mark", `
86830
+ position: absolute;
86831
+ transform: translateX(-50%);
86832
+ white-space: nowrap;
86833
+ `)]), cB("slider-rail", `
86337
86834
  width: 100%;
86338
86835
  position: relative;
86339
86836
  height: var(--n-rail-height);
@@ -86353,33 +86850,33 @@
86353
86850
  right: calc(var(--n-handle-size) / 2);
86354
86851
  bottom: 0;
86355
86852
  left: calc(var(--n-handle-size) / 2);
86356
- `, [cB("slider-handle", `
86853
+ `, [cB("slider-handle-wrapper", `
86357
86854
  outline: none;
86358
- height: var(--n-handle-size);
86359
- width: var(--n-handle-size);
86360
- border-radius: 50%;
86361
- transition: box-shadow .2s var(--n-bezier), background-color .3s var(--n-bezier);
86362
86855
  position: absolute;
86363
86856
  top: 50%;
86364
86857
  transform: translate(-50%, -50%);
86365
- overflow: hidden;
86366
86858
  cursor: pointer;
86367
- background-color: var(--n-handle-color);
86368
- box-shadow: var(--n-handle-box-shadow);
86369
- `, [c$1("&:hover", {
86370
- boxShadow: "var(--n-handle-box-shadow-hover)"
86371
- }), c$1("&:hover:focus", {
86372
- boxShadow: "var(--n-handle-box-shadow-active)"
86373
- }), c$1("&:focus", {
86374
- boxShadow: "var(--n-handle-box-shadow-focus)"
86375
- })])]), cB("slider-dots", `
86859
+ display: flex;
86860
+ `, [cB("slider-handle", `
86861
+ height: var(--n-handle-size);
86862
+ width: var(--n-handle-size);
86863
+ border-radius: 50%;
86864
+ overflow: hidden;
86865
+ transition: box-shadow .2s var(--n-bezier), background-color .3s var(--n-bezier);
86866
+ background-color: var(--n-handle-color);
86867
+ box-shadow: var(--n-handle-box-shadow);
86868
+ `, [c$1("&:hover", `
86869
+ box-shadow: var(--n-handle-box-shadow-hover);
86870
+ `)]), c$1("&:focus", [cB("slider-handle", `
86871
+ box-shadow: var(--n-handle-box-shadow-focus);
86872
+ `, [c$1("&:hover", `
86873
+ box-shadow: var(--n-handle-box-shadow-active);
86874
+ `)])])])]), cB("slider-dots", `
86376
86875
  position: absolute;
86377
86876
  top: 50%;
86378
86877
  left: calc(var(--n-handle-size) / 2);
86379
86878
  right: calc(var(--n-handle-size) / 2);
86380
- `, [cM("transition-disabled", [cB("slider-dot", {
86381
- transition: "none"
86382
- })]), cB("slider-dot", `
86879
+ `, [cM("transition-disabled", [cB("slider-dot", "transition: none;")]), cB("slider-dot", `
86383
86880
  transition:
86384
86881
  border-color .3s var(--n-bezier),
86385
86882
  box-shadow .3s var(--n-bezier),
@@ -86393,9 +86890,7 @@
86393
86890
  box-sizing: border-box;
86394
86891
  border: var(--n-dot-border);
86395
86892
  background-color: var(--n-dot-color);
86396
- `, [cM("active", {
86397
- border: "var(--n-dot-border-active)"
86398
- })])])]), cB("slider-handle-indicator", `
86893
+ `, [cM("active", "border: var(--n-dot-border-active);")])])]), cB("slider-handle-indicator", `
86399
86894
  font-size: var(--n-font-size);
86400
86895
  padding: 6px 10px;
86401
86896
  border-radius: var(--n-indicator-border-radius);
@@ -86417,11 +86912,7 @@
86417
86912
  margin-top: 12px;
86418
86913
  `), cM("left", `
86419
86914
  margin-right: 12px;
86420
- `), fadeInScaleUpTransition()]), insideModal(cB("slider", [cB("slider-dot", {
86421
- backgroundColor: "var(--n-dot-color-modal)"
86422
- })])), insidePopover(cB("slider", [cB("slider-dot", {
86423
- backgroundColor: "var(--n-dot-color-popover)"
86424
- })]))]);
86915
+ `), fadeInScaleUpTransition()]), insideModal(cB("slider", [cB("slider-dot", "background-color: var(--n-dot-color-modal);")])), insidePopover(cB("slider", [cB("slider-dot", "background-color: var(--n-dot-color-popover);")]))]);
86425
86916
 
86426
86917
  const eventButtonLeft = 0;
86427
86918
  const sliderProps = {
@@ -86563,7 +87054,9 @@
86563
87054
  function isShowTooltip(index) {
86564
87055
  return props.showTooltip || hoverIndexRef.value === index || activeIndexRef.value === index && draggingRef.value;
86565
87056
  }
86566
- function isSkipCSSDetection(index) {
87057
+ function shouldKeepTooltipTransition(index) {
87058
+ if (!draggingRef.value)
87059
+ return true;
86567
87060
  return !(activeIndexRef.value === index && previousIndexRef.value === index);
86568
87061
  }
86569
87062
  function focusActiveHandle(index) {
@@ -86904,7 +87397,7 @@
86904
87397
  dotTransitionDisabled: dotTransitionDisabledRef,
86905
87398
  markInfos: markInfosRef,
86906
87399
  isShowTooltip,
86907
- isSkipCSSDetection,
87400
+ shouldKeepTooltipTransition,
86908
87401
  handleRailRef,
86909
87402
  setHandleRefs,
86910
87403
  setFollowerRefs,
@@ -86975,14 +87468,18 @@
86975
87468
  /* @__PURE__ */ vue.h(VTarget, null, {
86976
87469
  default: () => /* @__PURE__ */ vue.h("div", {
86977
87470
  ref: this.setHandleRefs(index),
86978
- class: `${mergedClsPrefix}-slider-handle`,
87471
+ class: `${mergedClsPrefix}-slider-handle-wrapper`,
86979
87472
  tabindex: this.mergedDisabled ? -1 : 0,
86980
87473
  style: this.getHandleStyle(value, index),
86981
87474
  onFocus: () => this.handleHandleFocus(index),
86982
87475
  onBlur: () => this.handleHandleBlur(index),
86983
87476
  onMouseenter: () => this.handleHandleMouseEnter(index),
86984
87477
  onMouseleave: () => this.handleHandleMouseLeave(index)
86985
- })
87478
+ }, resolveSlot(this.$slots.thumb, () => [
87479
+ /* @__PURE__ */ vue.h("div", {
87480
+ class: `${mergedClsPrefix}-slider-handle`
87481
+ })
87482
+ ]))
86986
87483
  }),
86987
87484
  this.tooltip && /* @__PURE__ */ vue.h(VFollower, {
86988
87485
  ref: this.setFollowerRefs(index),
@@ -86996,9 +87493,13 @@
86996
87493
  default: () => /* @__PURE__ */ vue.h(vue.Transition, {
86997
87494
  name: "fade-in-scale-up-transition",
86998
87495
  appear: this.isMounted,
86999
- css: this.isSkipCSSDetection(index),
87000
- onEnter: () => this.followerEnabledIndexSet.add(index),
87001
- onAfterLeave: () => this.followerEnabledIndexSet.delete(index)
87496
+ css: this.shouldKeepTooltipTransition(index),
87497
+ onEnter: () => {
87498
+ this.followerEnabledIndexSet.add(index);
87499
+ },
87500
+ onAfterLeave: () => {
87501
+ this.followerEnabledIndexSet.delete(index);
87502
+ }
87002
87503
  }, {
87003
87504
  default: () => {
87004
87505
  if (showTooltip) {
@@ -90968,6 +91469,8 @@
90968
91469
  if (!tmNode.isLeaf && !tmNode.shallowLoaded) {
90969
91470
  if (!NTree.loadingKeysRef.value.has(tmNode.key)) {
90970
91471
  NTree.loadingKeysRef.value.add(tmNode.key);
91472
+ } else {
91473
+ return;
90971
91474
  }
90972
91475
  const {
90973
91476
  onLoadRef: { value: onLoad }
@@ -90996,7 +91499,7 @@
90996
91499
  NTree.handleSelect(tmNode);
90997
91500
  }
90998
91501
  if (expandOnClick && !tmNode.isLeaf) {
90999
- NTree.handleSwitcherClick(tmNode);
91502
+ handleSwitcherClick();
91000
91503
  }
91001
91504
  }
91002
91505
  function handleContentClick(e) {
@@ -91346,9 +91849,12 @@
91346
91849
  const { value: mergedSelectedKeys } = mergedSelectedKeysRef;
91347
91850
  const treeSelectInjection = vue.inject(treeSelectInjectionKey, null);
91348
91851
  const pendingNodeKeyRef = treeSelectInjection ? treeSelectInjection.pendingNodeKeyRef : vue.ref(mergedSelectedKeys.length ? mergedSelectedKeys[mergedSelectedKeys.length - 1] : null);
91349
- function handleKeyup(e) {
91852
+ function handleKeydown(e) {
91350
91853
  const { value: pendingNodeKey } = pendingNodeKeyRef;
91351
91854
  if (pendingNodeKey === null) {
91855
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
91856
+ e.preventDefault();
91857
+ }
91352
91858
  if (["ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"].includes(e.key)) {
91353
91859
  if (pendingNodeKey === null) {
91354
91860
  const { value: fNodes } = fNodesRef;
@@ -91370,6 +91876,7 @@
91370
91876
  if (e.key === "Enter") {
91371
91877
  handleSelect(fNodes[fIndex]);
91372
91878
  } else if (e.key === "ArrowDown") {
91879
+ e.preventDefault();
91373
91880
  fIndex += 1;
91374
91881
  while (fIndex < fNodes.length) {
91375
91882
  if (!fNodes[fIndex].disabled) {
@@ -91379,6 +91886,7 @@
91379
91886
  fIndex += 1;
91380
91887
  }
91381
91888
  } else if (e.key === "ArrowUp") {
91889
+ e.preventDefault();
91382
91890
  fIndex -= 1;
91383
91891
  while (fIndex >= 0) {
91384
91892
  if (!fNodes[fIndex].disabled) {
@@ -91416,16 +91924,8 @@
91416
91924
  }
91417
91925
  }
91418
91926
  }
91419
- function handleKeydown(e) {
91420
- switch (e.key) {
91421
- case "ArrowUp":
91422
- case "ArrowDown":
91423
- e.preventDefault();
91424
- }
91425
- }
91426
91927
  return {
91427
91928
  pendingNodeKeyRef,
91428
- handleKeyup,
91429
91929
  handleKeydown
91430
91930
  };
91431
91931
  }
@@ -91829,7 +92329,7 @@
91829
92329
  const controlledExpandedKeysRef = vue.toRef(props, "expandedKeys");
91830
92330
  const mergedExpandedKeysRef = useMergedState(controlledExpandedKeysRef, uncontrolledExpandedKeysRef);
91831
92331
  const fNodesRef = vue.computed(() => displayTreeMateRef.value.getFlattenedNodes(mergedExpandedKeysRef.value));
91832
- const { pendingNodeKeyRef, handleKeyup, handleKeydown } = useKeyboard({
92332
+ const { pendingNodeKeyRef, handleKeydown } = useKeyboard({
91833
92333
  mergedSelectedKeysRef,
91834
92334
  fNodesRef,
91835
92335
  mergedExpandedKeysRef,
@@ -92528,8 +93028,7 @@
92528
93028
  handleCheck
92529
93029
  });
92530
93030
  const exposedMethods = {
92531
- handleKeydown,
92532
- handleKeyup
93031
+ handleKeydown
92533
93032
  };
92534
93033
  const cssVarsRef = vue.computed(() => {
92535
93034
  const {
@@ -92578,7 +93077,6 @@
92578
93077
  handleAfterEnter,
92579
93078
  handleResize,
92580
93079
  handleKeydown: exposedMethods.handleKeydown,
92581
- handleKeyup: exposedMethods.handleKeyup,
92582
93080
  cssVars: inlineThemeDisabled ? void 0 : cssVarsRef,
92583
93081
  themeClass: themeClassHandle?.themeClass,
92584
93082
  onRender: themeClassHandle?.onRender
@@ -92597,7 +93095,6 @@
92597
93095
  disabled,
92598
93096
  internalFocusable,
92599
93097
  checkable,
92600
- handleKeyup,
92601
93098
  handleKeydown,
92602
93099
  handleFocusout
92603
93100
  } = this;
@@ -92634,7 +93131,6 @@
92634
93131
  theme: mergedTheme.peers.Scrollbar,
92635
93132
  themeOverrides: mergedTheme.peerOverrides.Scrollbar,
92636
93133
  tabindex,
92637
- onKeyup: mergedFocusable ? handleKeyup : void 0,
92638
93134
  onKeydown: mergedFocusable ? handleKeydown : void 0,
92639
93135
  onFocusout: mergedFocusable ? handleFocusout : void 0
92640
93136
  }, {
@@ -92672,7 +93168,6 @@
92672
93168
  return /* @__PURE__ */ vue.h(XScrollbar, {
92673
93169
  class: treeClass,
92674
93170
  tabindex,
92675
- onKeyup: mergedFocusable ? handleKeyup : void 0,
92676
93171
  onKeydown: mergedFocusable ? handleKeydown : void 0,
92677
93172
  onFocusout: mergedFocusable ? handleFocusout : void 0,
92678
93173
  style: this.cssVars,
@@ -92689,7 +93184,6 @@
92689
93184
  tabindex,
92690
93185
  ref: "selfElRef",
92691
93186
  style: this.cssVars,
92692
- onKeyup: mergedFocusable ? handleKeyup : void 0,
92693
93187
  onKeydown: mergedFocusable ? handleKeydown : void 0,
92694
93188
  onFocusout: mergedFocusable ? handleFocusout : void 0,
92695
93189
  onDragleave: draggable ? this.handleDragLeaveTree : void 0
@@ -93136,16 +93630,16 @@
93136
93630
  const { value } = e.target;
93137
93631
  patternRef.value = value;
93138
93632
  }
93139
- function handleKeydown(e) {
93633
+ function treeHandleKeydown(e) {
93140
93634
  const { value: treeInst } = treeInstRef;
93141
93635
  if (treeInst) {
93142
93636
  treeInst.handleKeydown(e);
93143
93637
  }
93144
93638
  }
93145
- function handleKeyup(e) {
93639
+ function handleKeydown(e) {
93146
93640
  if (e.key === "Enter") {
93147
93641
  if (mergedShowRef.value) {
93148
- treeHandleKeyup(e);
93642
+ treeHandleKeydown(e);
93149
93643
  if (!props2.multiple) {
93150
93644
  closeMenu();
93151
93645
  focusSelection();
@@ -93155,22 +93649,19 @@
93155
93649
  }
93156
93650
  e.preventDefault();
93157
93651
  } else if (e.key === "Escape") {
93158
- closeMenu();
93159
- focusSelection();
93652
+ if (mergedShowRef.value) {
93653
+ markEventEffectPerformed(e);
93654
+ closeMenu();
93655
+ focusSelection();
93656
+ }
93160
93657
  } else {
93161
93658
  if (mergedShowRef.value) {
93162
- treeHandleKeyup(e);
93659
+ treeHandleKeydown(e);
93163
93660
  } else if (e.key === "ArrowDown") {
93164
93661
  openMenu();
93165
93662
  }
93166
93663
  }
93167
93664
  }
93168
- function treeHandleKeyup(e) {
93169
- const { value: treeInst } = treeInstRef;
93170
- if (treeInst) {
93171
- treeInst.handleKeyup(e);
93172
- }
93173
- }
93174
93665
  function handleTabOut() {
93175
93666
  closeMenu();
93176
93667
  focusSelection();
@@ -93256,7 +93747,6 @@
93256
93747
  handleDeleteOption,
93257
93748
  handlePatternInput,
93258
93749
  handleKeydown,
93259
- handleKeyup,
93260
93750
  handleTabOut,
93261
93751
  handleMenuMousedown,
93262
93752
  mergedTheme: themeRef,
@@ -93300,8 +93790,9 @@
93300
93790
  onFocus: this.handleTriggerFocus,
93301
93791
  onBlur: this.handleTriggerBlur,
93302
93792
  onDeleteOption: this.handleDeleteOption,
93303
- onKeydown: this.handleKeydown,
93304
- onKeyup: this.handleKeyup
93793
+ onKeydown: this.handleKeydown
93794
+ }, {
93795
+ arrow: () => [this.$slots.arrow?.()]
93305
93796
  })
93306
93797
  }),
93307
93798
  /* @__PURE__ */ vue.h(VFollower, {
@@ -93344,7 +93835,6 @@
93344
93835
  ],
93345
93836
  tabindex: 0,
93346
93837
  onMousedown: this.handleMenuMousedown,
93347
- onKeyup: this.handleKeyup,
93348
93838
  onKeydown: this.handleKeydown,
93349
93839
  onFocusin: this.handleMenuFocusin,
93350
93840
  onFocusout: this.handleMenuFocusout
@@ -94010,12 +94500,13 @@
94010
94500
  return () => {
94011
94501
  const {
94012
94502
  mergedClsPrefixRef: { value: mergedClsPrefix },
94013
- mergedDisabledRef: { value: mergedDisabled }
94503
+ mergedDisabledRef: { value: mergedDisabled },
94504
+ maxReachedRef: { value: maxReached }
94014
94505
  } = NUpload;
94015
94506
  return /* @__PURE__ */ vue.h("div", {
94016
94507
  class: [
94017
94508
  `${mergedClsPrefix}-upload-dragger`,
94018
- mergedDisabled && `${mergedClsPrefix}-upload-dragger--disabled`
94509
+ (mergedDisabled || maxReached) && `${mergedClsPrefix}-upload-dragger--disabled`
94019
94510
  ]
94020
94511
  }, slots);
94021
94512
  };
@@ -94061,25 +94552,7 @@
94061
94552
  return;
94062
94553
  }
94063
94554
 
94064
- const img = new Image();
94065
- img.src = window.URL.createObjectURL(file);
94066
-
94067
- img.onload = () => {
94068
- const {
94069
- width,
94070
- height
94071
- } = img;
94072
- const canvas = document.createElement("canvas");
94073
- const ctx = canvas.getContext("2d");
94074
- canvas.width = width;
94075
- canvas.height = height;
94076
- canvas.style.cssText = `position: fixed; left: 0; top: 0; width: ${width}px; height: ${height}px; z-index: 9999; display: none;`;
94077
- document.body.appendChild(canvas);
94078
- ctx?.drawImage(img, 0, 0, width, height);
94079
- const dataURL = canvas.toDataURL();
94080
- document.body.removeChild(canvas);
94081
- resolve(dataURL);
94082
- };
94555
+ resolve(window.URL.createObjectURL(file));
94083
94556
  });
94084
94557
  }
94085
94558
  const environmentSupportFile = isBrowser$2 && window.FileReader && window.File;
@@ -94277,9 +94750,11 @@
94277
94750
  onDragenter: handleTriggerDragEnter,
94278
94751
  onDragleave: handleTriggerDragLeave
94279
94752
  }, isImageCardTypeRef.value ? /* @__PURE__ */ vue.h(NUploadDragger, null, {
94280
- default: slots.default || (() => /* @__PURE__ */ vue.h(NBaseIcon, {
94281
- clsPrefix: mergedClsPrefix
94282
- }, { default: () => /* @__PURE__ */ vue.h(AddIcon, null) }))
94753
+ default: () => resolveSlot(slots.default, () => [
94754
+ /* @__PURE__ */ vue.h(NBaseIcon, {
94755
+ clsPrefix: mergedClsPrefix
94756
+ }, { default: () => /* @__PURE__ */ vue.h(AddIcon, null) })
94757
+ ])
94283
94758
  }) : slots);
94284
94759
  };
94285
94760
  }
@@ -94338,6 +94813,11 @@
94338
94813
  fill: "currentColor"
94339
94814
  })));
94340
94815
 
94816
+ const buttonThemeOverrides = {
94817
+ paddingMedium: "0 3px",
94818
+ heightMedium: "24px",
94819
+ iconSizeMedium: "18px"
94820
+ };
94341
94821
  var NUploadFile = vue.defineComponent({
94342
94822
  name: "UploadFile",
94343
94823
  props: {
@@ -94574,11 +95054,12 @@
94574
95054
  ]
94575
95055
  }, this.showPreviewButton ? /* @__PURE__ */ vue.h(Button, {
94576
95056
  key: "preview",
94577
- text: true,
95057
+ quaternary: true,
94578
95058
  type: this.buttonType,
94579
95059
  onClick: this.handlePreviewClick,
94580
95060
  theme: mergedTheme.peers.Button,
94581
- themeOverrides: mergedTheme.peerOverrides.Button
95061
+ themeOverrides: mergedTheme.peerOverrides.Button,
95062
+ builtinThemeOverrides: buttonThemeOverrides
94582
95063
  }, {
94583
95064
  icon: () => /* @__PURE__ */ vue.h(NBaseIcon, {
94584
95065
  clsPrefix
@@ -94587,7 +95068,8 @@
94587
95068
  key: "cancelOrTrash",
94588
95069
  theme: mergedTheme.peers.Button,
94589
95070
  themeOverrides: mergedTheme.peerOverrides.Button,
94590
- text: true,
95071
+ quaternary: true,
95072
+ builtinThemeOverrides: buttonThemeOverrides,
94591
95073
  type: this.buttonType,
94592
95074
  onClick: this.handleRemoveOrCancelClick
94593
95075
  }, {
@@ -94602,22 +95084,24 @@
94602
95084
  })
94603
95085
  }), this.showRetryButton && !this.disabled && /* @__PURE__ */ vue.h(Button, {
94604
95086
  key: "retry",
94605
- text: true,
95087
+ quaternary: true,
94606
95088
  type: this.buttonType,
94607
95089
  onClick: this.handleRetryClick,
94608
95090
  theme: mergedTheme.peers.Button,
94609
- themeOverrides: mergedTheme.peerOverrides.Button
95091
+ themeOverrides: mergedTheme.peerOverrides.Button,
95092
+ builtinThemeOverrides: buttonThemeOverrides
94610
95093
  }, {
94611
95094
  icon: () => /* @__PURE__ */ vue.h(NBaseIcon, {
94612
95095
  clsPrefix
94613
95096
  }, { default: () => /* @__PURE__ */ vue.h(RetryIcon, null) })
94614
95097
  }), this.showDownloadButton ? /* @__PURE__ */ vue.h(Button, {
94615
95098
  key: "download",
94616
- text: true,
95099
+ quaternary: true,
94617
95100
  type: this.buttonType,
94618
95101
  onClick: this.handleDownloadClick,
94619
95102
  theme: mergedTheme.peers.Button,
94620
- themeOverrides: mergedTheme.peerOverrides.Button
95103
+ themeOverrides: mergedTheme.peerOverrides.Button,
95104
+ builtinThemeOverrides: buttonThemeOverrides
94621
95105
  }, {
94622
95106
  icon: () => /* @__PURE__ */ vue.h(NBaseIcon, {
94623
95107
  clsPrefix
@@ -94698,7 +95182,6 @@
94698
95182
  `, [c$1("&:hover", `
94699
95183
  border: var(--n-dragger-border-hover);
94700
95184
  `), cM("disabled", `
94701
- opacity: var(--n-item-disabled-opacity);
94702
95185
  cursor: not-allowed;
94703
95186
  `)]), cB("upload-trigger", `
94704
95187
  display: inline-block;
@@ -94724,7 +95207,7 @@
94724
95207
  line-height: var(--n-line-height);
94725
95208
  opacity: 1;
94726
95209
  transition: opacity .3s var(--n-bezier);
94727
- `, [cM("disabled", `
95210
+ `, [c$1("a, img", "outline: none;"), cM("disabled", `
94728
95211
  opacity: var(--n-item-disabled-opacity);
94729
95212
  cursor: not-allowed;
94730
95213
  `, [cB("upload-file", "cursor: not-allowed;")]), cM("grid", `
@@ -94788,6 +95271,7 @@
94788
95271
  justify-content: center;
94789
95272
  transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
94790
95273
  border-radius: var(--n-border-radius);
95274
+ overflow: hidden;
94791
95275
  `, [cB("progress", `
94792
95276
  position: absolute;
94793
95277
  left: 8px;
@@ -95848,7 +96332,7 @@
95848
96332
  NPagination: NPagination,
95849
96333
  NPopconfirm: Popconfirm,
95850
96334
  NPopover: NPopover,
95851
- NPopselect: Popselect,
96335
+ NPopselect: NPopselect,
95852
96336
  NProgress: NProgress,
95853
96337
  NRadio: NRadio,
95854
96338
  NRadioGroup: NRadioGroup,
@@ -95906,7 +96390,7 @@
95906
96390
  createDiscreteApi: createDiscreteApi
95907
96391
  });
95908
96392
 
95909
- var version = "2.30.3";
96393
+ var version = "2.30.4";
95910
96394
 
95911
96395
  function create() {
95912
96396
  let {
@@ -96585,7 +97069,7 @@
96585
97069
  exports.NPagination = NPagination;
96586
97070
  exports.NPopconfirm = Popconfirm;
96587
97071
  exports.NPopover = NPopover;
96588
- exports.NPopselect = Popselect;
97072
+ exports.NPopselect = NPopselect;
96589
97073
  exports.NProgress = NProgress;
96590
97074
  exports.NRadio = NRadio;
96591
97075
  exports.NRadioButton = RadioButton;