hys-ui 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/CHANGELOG.md +149 -0
  2. package/README.md +17 -1
  3. package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
  4. package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
  5. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  6. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +639 -0
  9. package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
  10. package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
  11. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
  12. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +256 -0
  13. package/dist/components/HysBadge/HysBadge.vue.js +2 -2
  14. package/dist/components/HysBadge/HysBadge2.vue.js +154 -27
  15. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
  16. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +288 -2
  17. package/dist/components/HysButton/HysButton.vue.js +2 -2
  18. package/dist/components/HysButton/HysButton2.vue.js +29 -28
  19. package/dist/components/HysCalendar/HysCalendar.vue.js +5 -92
  20. package/dist/components/HysCalendar/HysCalendar2.vue.js +815 -2
  21. package/dist/components/HysCard/HysCard.vue.js +2 -2
  22. package/dist/components/HysCard/HysCard2.vue.js +175 -42
  23. package/dist/components/HysCascader/HysCascader.vue.js +5 -194
  24. package/dist/components/HysCascader/HysCascader2.vue.js +773 -2
  25. package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
  26. package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
  27. package/dist/components/HysCheckbox/HysCheckbox.vue.js +3 -3
  28. package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
  29. package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
  30. package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
  31. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  32. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  33. package/dist/components/HysColorPicker/HysColorPicker.vue.js +1 -1
  34. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -216
  35. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  36. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  37. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  38. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  39. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  40. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  41. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  42. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1019 -563
  43. package/dist/components/HysDatePicker/HysDatePicker.vue.js +270 -139
  44. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
  45. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +820 -0
  46. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
  47. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
  48. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +270 -158
  49. package/dist/components/HysDivider/HysDivider.vue.js +2 -2
  50. package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
  51. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  52. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  53. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  54. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  55. package/dist/components/HysFileManager/HysFileManager.vue.js +3 -3
  56. package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
  57. package/dist/components/HysForm/HysForm.vue.js +3 -3
  58. package/dist/components/HysForm/HysForm2.vue.js +578 -92
  59. package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
  60. package/dist/components/HysFormItem/HysFormItem2.vue.js +528 -2
  61. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  62. package/dist/components/HysGantt/HysGantt2.vue.js +1380 -268
  63. package/dist/components/HysInput/HysInput.vue.js +2 -2
  64. package/dist/components/HysInput/HysInput2.vue.js +467 -120
  65. package/dist/components/HysMention/HysMention.vue.js +2 -2
  66. package/dist/components/HysMention/HysMention2.vue.js +122 -109
  67. package/dist/components/HysModal/HysModal.vue.js +2 -2
  68. package/dist/components/HysModal/HysModal2.vue.js +490 -85
  69. package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
  70. package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
  71. package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
  72. package/dist/components/HysPagination/HysPagination.vue.js +1 -1
  73. package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
  74. package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
  75. package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
  76. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  77. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  78. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  79. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  80. package/dist/components/HysRadio/HysRadio.vue.js +7 -0
  81. package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
  82. package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +2 -2
  83. package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
  84. package/dist/components/HysRating/HysRating.vue.js +1 -1
  85. package/dist/components/HysRating/HysRating2.vue.js +288 -68
  86. package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
  87. package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
  88. package/dist/components/HysSearch/HysSearch.vue.js +37 -36
  89. package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
  90. package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
  91. package/dist/components/HysSelect/HysSelect.vue.js +3 -2
  92. package/dist/components/HysSelect/HysSelect2.vue.js +999 -189
  93. package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
  94. package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
  95. package/dist/components/HysSlider/HysSlider.vue.js +1 -1
  96. package/dist/components/HysSlider/HysSlider2.vue.js +536 -59
  97. package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
  98. package/dist/components/HysSlider/SliderTooltip2.vue.js +170 -0
  99. package/dist/components/HysSteps/HysSteps.vue.js +1 -1
  100. package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
  101. package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
  102. package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
  103. package/dist/components/HysTable/HysTable.vue.js +1 -1
  104. package/dist/components/HysTable/HysTable2.vue.js +1494 -88
  105. package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
  106. package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
  107. package/dist/components/HysTabs/HysTabs.vue.js +2 -2
  108. package/dist/components/HysTabs/HysTabs2.vue.js +262 -68
  109. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -81
  110. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  111. package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
  112. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  113. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  114. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  115. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  116. package/dist/components/HysTour/HysTour.vue.js +46 -42
  117. package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
  118. package/dist/components/HysTransfer/HysTransfer2.vue.js +446 -2
  119. package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
  120. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +503 -0
  121. package/dist/components/HysTree/HysTree.vue.js +2 -3
  122. package/dist/components/HysTree/HysTree2.vue.js +651 -301
  123. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
  124. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +570 -2
  125. package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
  126. package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
  127. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  128. package/dist/components/HysUpload/HysUpload2.vue.js +459 -124
  129. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  130. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  131. package/dist/composables/autocomplete.js +50 -0
  132. package/dist/composables/avatar.js +57 -0
  133. package/dist/composables/calendar.js +96 -0
  134. package/dist/composables/cascader.js +79 -0
  135. package/dist/composables/choice.js +38 -0
  136. package/dist/composables/choiceModel.js +67 -0
  137. package/dist/composables/color.js +97 -0
  138. package/dist/composables/dataGrid.js +68 -0
  139. package/dist/composables/datePicker.js +227 -0
  140. package/dist/composables/drawer.js +17 -0
  141. package/dist/composables/feedback.js +14 -0
  142. package/dist/composables/formContext.js +92 -7
  143. package/dist/composables/formLayout.js +57 -0
  144. package/dist/composables/formValidation.js +240 -0
  145. package/dist/composables/ganttConflicts.js +143 -0
  146. package/dist/composables/menu.js +96 -0
  147. package/dist/composables/modal.js +14 -0
  148. package/dist/composables/numberInput.js +91 -0
  149. package/dist/composables/overlayManager.js +48 -18
  150. package/dist/composables/progress.js +94 -0
  151. package/dist/composables/rating.js +16 -0
  152. package/dist/composables/selectOptions.js +54 -0
  153. package/dist/composables/table.js +150 -0
  154. package/dist/composables/tagInput.js +16 -0
  155. package/dist/composables/textInput.js +34 -0
  156. package/dist/composables/timeline.js +19 -0
  157. package/dist/composables/transfer.js +65 -0
  158. package/dist/composables/tree.js +118 -0
  159. package/dist/composables/treeSelect.js +71 -0
  160. package/dist/composables/upload.js +55 -0
  161. package/dist/composables/uploadRequest.js +58 -0
  162. package/dist/composables/useAlert.js +124 -0
  163. package/dist/composables/useCascader.js +438 -0
  164. package/dist/composables/useColorPicker.js +402 -0
  165. package/dist/composables/useContextMenu.js +514 -0
  166. package/dist/composables/useDataGridRemote.js +67 -0
  167. package/dist/composables/useDatePicker.js +425 -0
  168. package/dist/composables/useDialog.js +86 -43
  169. package/dist/composables/useDrawerPush.js +33 -0
  170. package/dist/composables/useDrawerResize.js +221 -0
  171. package/dist/composables/useFloating.js +136 -56
  172. package/dist/composables/useGanttDependencies.js +306 -0
  173. package/dist/composables/useGanttHistory.js +157 -0
  174. package/dist/composables/useGanttLabelResize.js +100 -0
  175. package/dist/composables/useHysModal.js +185 -0
  176. package/dist/composables/useModal.js +295 -0
  177. package/dist/composables/useModalInteraction.js +394 -0
  178. package/dist/composables/usePopupSurface.js +458 -0
  179. package/dist/composables/useTable.js +474 -0
  180. package/dist/composables/useTagInput.js +313 -0
  181. package/dist/composables/useTextareaSize.js +72 -0
  182. package/dist/composables/useTransfer.js +257 -0
  183. package/dist/composables/useTransferMotion.js +185 -0
  184. package/dist/composables/useTree.js +439 -0
  185. package/dist/composables/useTreeSelect.js +361 -0
  186. package/dist/composables/useUpload.js +472 -0
  187. package/dist/composables/useUploadModel.js +65 -0
  188. package/dist/composables/useUploadRequests.js +266 -0
  189. package/dist/composables/useVirtualTableLayout.js +277 -0
  190. package/dist/composables/virtualTable.js +43 -0
  191. package/dist/index.js +152 -139
  192. package/dist/internal/PopupReference.js +39 -0
  193. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  194. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  195. package/dist/motion/PopupMotion.js +105 -0
  196. package/dist/motion/popup.js +10 -0
  197. package/dist/style.css +1 -1
  198. package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
  199. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  200. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
  201. package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
  202. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +104 -0
  203. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
  204. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +71 -20
  205. package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
  206. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +120 -31
  207. package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
  208. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
  209. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
  210. package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +50 -39
  211. package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
  212. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  213. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  214. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  215. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  216. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  217. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  218. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  219. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
  220. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
  221. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
  222. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
  223. package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
  224. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  225. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  226. package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
  227. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
  228. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +84 -5
  229. package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
  230. package/dist/types/components/HysMention/HysMention.vue.d.ts +4 -3
  231. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  232. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -35
  233. package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
  234. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
  235. package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
  236. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  237. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  238. package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
  239. package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +34 -12
  240. package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
  241. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  242. package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
  243. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
  244. package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
  245. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +131 -22
  246. package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
  247. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +69 -11
  248. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +24 -0
  249. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +3 -3
  250. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -9
  251. package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
  252. package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
  253. package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
  254. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
  255. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +50 -28
  256. package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
  257. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  258. package/dist/types/components/HysToast/HysToast.vue.d.ts +3 -3
  259. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  260. package/dist/types/components/HysTour/HysTour.vue.d.ts +4 -3
  261. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
  262. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +107 -0
  263. package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
  264. package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
  265. package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
  266. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  267. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  268. package/dist/types/composables/autocomplete.d.ts +109 -0
  269. package/dist/types/composables/avatar.d.ts +73 -0
  270. package/dist/types/composables/calendar.d.ts +66 -0
  271. package/dist/types/composables/cascader.d.ts +195 -0
  272. package/dist/types/composables/choice.d.ts +110 -0
  273. package/dist/types/composables/choiceModel.d.ts +11 -0
  274. package/dist/types/composables/color.d.ts +97 -0
  275. package/dist/types/composables/dataGrid.d.ts +100 -0
  276. package/dist/types/composables/datePicker.d.ts +250 -0
  277. package/dist/types/composables/drawer.d.ts +102 -0
  278. package/dist/types/composables/feedback.d.ts +98 -0
  279. package/dist/types/composables/formContext.d.ts +135 -8
  280. package/dist/types/composables/formLayout.d.ts +11 -0
  281. package/dist/types/composables/formValidation.d.ts +13 -0
  282. package/dist/types/composables/gantt.d.ts +68 -0
  283. package/dist/types/composables/ganttConflicts.d.ts +30 -0
  284. package/dist/types/composables/menu.d.ts +183 -0
  285. package/dist/types/composables/modal.d.ts +183 -0
  286. package/dist/types/composables/numberInput.d.ts +45 -0
  287. package/dist/types/composables/overlayManager.d.ts +7 -3
  288. package/dist/types/composables/popupSurface.d.ts +83 -0
  289. package/dist/types/composables/progress.d.ts +92 -0
  290. package/dist/types/composables/rating.d.ts +18 -0
  291. package/dist/types/composables/segmented.d.ts +15 -0
  292. package/dist/types/composables/selectOptions.d.ts +46 -0
  293. package/dist/types/composables/slider.d.ts +21 -0
  294. package/dist/types/composables/table.d.ts +312 -0
  295. package/dist/types/composables/tagInput.d.ts +96 -0
  296. package/dist/types/composables/textInput.d.ts +76 -0
  297. package/dist/types/composables/timeline.d.ts +82 -0
  298. package/dist/types/composables/transfer.d.ts +187 -0
  299. package/dist/types/composables/tree.d.ts +240 -0
  300. package/dist/types/composables/treeSelect.d.ts +170 -0
  301. package/dist/types/composables/upload.d.ts +202 -0
  302. package/dist/types/composables/uploadRequest.d.ts +3 -0
  303. package/dist/types/composables/useAlert.d.ts +21 -0
  304. package/dist/types/composables/useCascader.d.ts +162 -0
  305. package/dist/types/composables/useColorPicker.d.ts +101 -0
  306. package/dist/types/composables/useContextMenu.d.ts +81 -0
  307. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  308. package/dist/types/composables/useDatePicker.d.ts +79 -0
  309. package/dist/types/composables/useDialog.d.ts +16 -3
  310. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  311. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  312. package/dist/types/composables/useFloating.d.ts +28 -6
  313. package/dist/types/composables/useGanttDependencies.d.ts +83 -0
  314. package/dist/types/composables/useGanttHistory.d.ts +42 -0
  315. package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
  316. package/dist/types/composables/useHysModal.d.ts +44 -0
  317. package/dist/types/composables/useModal.d.ts +62 -0
  318. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  319. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  320. package/dist/types/composables/useTable.d.ts +60 -0
  321. package/dist/types/composables/useTagInput.d.ts +66 -0
  322. package/dist/types/composables/useTextareaSize.d.ts +3 -0
  323. package/dist/types/composables/useTransfer.d.ts +58 -0
  324. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  325. package/dist/types/composables/useTree.d.ts +77 -0
  326. package/dist/types/composables/useTreeSelect.d.ts +117 -0
  327. package/dist/types/composables/useUpload.d.ts +94 -0
  328. package/dist/types/composables/useUploadModel.d.ts +14 -0
  329. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  330. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  331. package/dist/types/composables/virtualTable.d.ts +126 -0
  332. package/dist/types/index.d.ts +50 -9
  333. package/dist/types/internal/PopupReference.d.ts +18 -0
  334. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  335. package/dist/types/motion/PopupMotion.d.ts +59 -0
  336. package/dist/types/motion/popup.d.ts +12 -0
  337. package/package.json +2 -1
@@ -1,4 +1,775 @@
1
- import f from "./HysCascader.vue.js";
1
+ import { defineComponent as Ze, useAttrs as _e, ref as I, useId as ea, provide as aa, computed as x, watch as U, nextTick as j, onMounted as la, onUpdated as ta, onActivated as ia, onBeforeUnmount as oa, onDeactivated as na, openBlock as r, createElementBlock as u, mergeProps as ee, unref as a, createElementVNode as V, withModifiers as ae, renderSlot as f, createCommentVNode as p, toDisplayString as w, Fragment as M, renderList as fe, normalizeClass as De, createTextVNode as P, createBlock as E, resolveDynamicComponent as He, createVNode as R, withCtx as L, Teleport as sa, createSlots as Ae, normalizeProps as ra, guardReactiveProps as ua, normalizeStyle as da } from "vue";
2
+ import ca from "../../motion/PopupMotion.js";
3
+ import { X as Me, LoaderCircle as ye, ChevronDown as ha, Search as va } from "lucide-vue-next";
4
+ import fa from "../HysInput/HysInput.vue.js";
5
+ import me from "../HysButton/HysButton.vue.js";
6
+ import ya from "../HysTooltip/HysTooltip.vue.js";
7
+ import Re from "./HysCascaderColumn.vue.js";
8
+ import { useHysRootAttrs as ma } from "../../config.js";
9
+ import { useFloating as pa } from "../../composables/useFloating.js";
10
+ import { useHysControlState as ga, useHysFormItemContext as ba, fieldKey as ka } from "../../composables/formContext.js";
11
+ import { useCascader as wa } from "../../composables/useCascader.js";
12
+ import { cascaderToken as J } from "../../composables/cascader.js";
13
+ const xa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-invalid", "aria-describedby", "aria-disabled", "tabindex"], Ca = ["disabled"], Ta = ["id", "aria-controls", "aria-expanded", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], Ba = {
14
+ key: 0,
15
+ class: "hys-ui-cascader-prefix"
16
+ }, Sa = {
17
+ key: 1,
18
+ class: "hys-ui-cascader-placeholder"
19
+ }, Pa = {
20
+ key: 2,
21
+ class: "hys-ui-cascader-tags"
22
+ }, Ea = { class: "hys-ui-cascader-tag-label" }, za = ["disabled", "aria-label", "onClick"], $a = ["aria-label"], La = {
23
+ key: 3,
24
+ class: "hys-ui-cascader-value"
25
+ }, Da = { class: "hys-ui-cascader-indicators" }, Ha = ["aria-label"], Aa = ["name", "form", "value", "disabled"], Ma = ["id", "role", "aria-label", "aria-busy"], Ra = {
26
+ key: 0,
27
+ class: "hys-ui-cascader-header"
28
+ }, Wa = {
29
+ key: 2,
30
+ class: "hys-ui-cascader-status",
31
+ role: "status"
32
+ }, Na = {
33
+ key: 3,
34
+ class: "hys-ui-cascader-status hys-ui-cascader-error",
35
+ role: "alert"
36
+ }, Oa = {
37
+ key: 1,
38
+ class: "hys-ui-cascader-status",
39
+ role: "status"
40
+ }, Va = {
41
+ class: "hys-ui-cascader-status",
42
+ role: "status"
43
+ }, Fa = {
44
+ key: 6,
45
+ class: "hys-ui-cascader-footer"
46
+ }, el = /* @__PURE__ */ Ze({
47
+ inheritAttrs: !1,
48
+ __name: "HysCascader",
49
+ props: {
50
+ popupTransition: {},
51
+ popupTransitionDuration: {},
52
+ options: {},
53
+ modelValue: {},
54
+ defaultValue: {},
55
+ cacheData: {},
56
+ fieldNames: {},
57
+ valueKey: {},
58
+ disabledMethod: {},
59
+ leafMethod: {},
60
+ disabled: { type: Boolean },
61
+ readonly: { type: Boolean },
62
+ loading: { type: Boolean },
63
+ size: {},
64
+ status: {},
65
+ placeholder: { default: "选择分类" },
66
+ ariaLabel: {},
67
+ name: {},
68
+ form: {},
69
+ autofocus: { type: Boolean },
70
+ multiple: { type: Boolean },
71
+ emitPath: { type: Boolean, default: !0 },
72
+ checkStrictly: { type: Boolean },
73
+ changeOnSelect: { type: Boolean },
74
+ showCheckedStrategy: { default: "child" },
75
+ checkOnClickNode: { type: Boolean },
76
+ checkOnClickLeaf: { type: Boolean, default: !0 },
77
+ showPrefix: { type: Boolean, default: !0 },
78
+ showAllLevels: { type: Boolean, default: !0 },
79
+ separator: { default: " / " },
80
+ displayRender: {},
81
+ clearable: { type: Boolean },
82
+ clearValue: {},
83
+ removable: { type: Boolean, default: !0 },
84
+ multipleLimit: {},
85
+ maxTagCount: { default: 3 },
86
+ maxTagTextLength: {},
87
+ filterable: { type: Boolean },
88
+ searchValue: {},
89
+ defaultSearchValue: {},
90
+ searchPlaceholder: {},
91
+ filterMethod: {},
92
+ searchSort: {},
93
+ searchLimit: { type: [Number, Boolean], default: 50 },
94
+ debounce: {},
95
+ beforeFilter: {},
96
+ retainSearch: { type: Boolean },
97
+ clearSearchAfterSelect: { type: Boolean, default: !0 },
98
+ expandTrigger: { default: "click" },
99
+ hoverDelay: { default: 150 },
100
+ expandedPath: {},
101
+ defaultExpandedPath: {},
102
+ loadChildren: {},
103
+ loadRoot: {},
104
+ inline: { type: Boolean },
105
+ showFooter: { type: Boolean, default: !0 },
106
+ open: { type: Boolean, default: void 0 },
107
+ defaultOpen: { type: Boolean },
108
+ showOnFocus: { type: Boolean },
109
+ popupMatchWidth: { type: Boolean, default: !0 },
110
+ popupWidth: {},
111
+ popupClass: {},
112
+ popupStyle: {},
113
+ appendTo: { type: [String, Boolean], default: "body" },
114
+ placement: {},
115
+ columnWidth: { default: 180 },
116
+ listHeight: { default: 256 },
117
+ virtual: { type: Boolean },
118
+ itemHeight: {},
119
+ overscan: { default: 4 },
120
+ emptyText: {},
121
+ noMatchText: {},
122
+ loadingText: {},
123
+ locale: {},
124
+ validateEvent: { type: Boolean, default: !0 }
125
+ },
126
+ emits: ["update:modelValue", "change", "value-change", "update:open", "visible-change", "update:searchValue", "search", "search-error", "update:expandedPath", "expandChange", "node-expand", "node-collapse", "load-error", "children-loaded", "load", "root-load", "root-load-error", "select", "remove-tag", "clear", "limit", "focus", "blur", "scroll"],
127
+ setup(o, { expose: We, emit: Ne }) {
128
+ const n = o, D = Ne, Oe = _e(), pe = ma(), d = ga(n), g = ba(), b = I(), le = I(), ge = I(), be = I(), te = ea(), ne = I(""), F = I(!0);
129
+ aa(ka, void 0);
130
+ let X = !1, se = !1, C = 0, re = !1, ie;
131
+ const m = pa(b, le, {
132
+ get placement() {
133
+ return n.placement;
134
+ },
135
+ matchWidth: () => n.popupMatchWidth ? !0 : "min",
136
+ width: () => n.popupWidth,
137
+ requestOpen: (e, l) => (e || (re = !!l), D("update:open", e), n.open === void 0 ? void 0 : !1)
138
+ }), H = m.open, z = x(() => F.value && (n.inline || H.value)), t = wa(
139
+ n,
140
+ d.disabled,
141
+ z,
142
+ (e, ...l) => D(e, ...l),
143
+ () => {
144
+ g.validate("change");
145
+ }
146
+ ), { items: k, multiple: T, blocked: W, words: c } = t, G = t.engine.query, Ve = x(() => n.inline || H.value), Fe = x(
147
+ () => n.inline ? {
148
+ ...n.popupStyle,
149
+ position: "static",
150
+ width: "100%",
151
+ maxWidth: "100%",
152
+ boxShadow: "none"
153
+ } : {
154
+ ...n.popupStyle,
155
+ ...m.style.value,
156
+ maxHeight: "min(65dvh,calc(100dvh - 20px))"
157
+ }
158
+ ), Ke = x(() => ({
159
+ "--hys-ui-cascader-control-height": (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 44 : 38) + "px"
160
+ })), B = x(() => !!n.filterable && !!G.value.trim()), A = x(
161
+ () => W.value || t.checking.value || t.rootPending.value
162
+ ), ke = x(
163
+ () => Number.isFinite(n.maxTagCount) ? Math.max(0, Math.floor(n.maxTagCount)) : 1 / 0
164
+ ), qe = x(() => k.value.slice(0, ke.value)), K = x(() => k.value.slice(ke.value)), Ie = x(
165
+ () => n.clearable && !W.value && k.value.some((e) => !e.disabled)
166
+ ), Q = /* @__PURE__ */ new Map();
167
+ function we(e, l) {
168
+ l ? Q.set(e, l) : Q.delete(e);
169
+ }
170
+ function Ue(e) {
171
+ n.inline && (b.value = e instanceof HTMLElement ? e : void 0);
172
+ }
173
+ function ue(e) {
174
+ return e ? J(t.browsing.value.slice(0, e)) : "root";
175
+ }
176
+ function de(e) {
177
+ const l = t.engine.tree.index.value.map.get(e.value);
178
+ return {
179
+ ...t.item(e.value),
180
+ node: e.raw,
181
+ level: e.path.length - 1,
182
+ leaf: !(l != null && l.hasChildren),
183
+ expanded: t.engine.tree.expanded.value.has(e.value),
184
+ checked: T.value ? t.engine.tree.checked.value.has(e.value) : t.modelKeys.value.includes(e.value),
185
+ indeterminate: t.engine.tree.halfChecked.value.has(e.value),
186
+ loading: t.engine.tree.loadingKeys.value.has(e.value)
187
+ };
188
+ }
189
+ const $ = (e) => {
190
+ var l;
191
+ return !!((l = t.engine.tree.index.value.map.get(e.value)) != null && l.hasChildren);
192
+ }, xe = x(
193
+ () => n.itemHeight ?? (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 42 : 36)
194
+ ), Ce = (e) => t.engine.tree.failures.value.get(e.value), ce = (e, l) => e.replace("{label}", l);
195
+ function Te(e) {
196
+ var l;
197
+ return ((l = n.displayRender) == null ? void 0 : l.call(n, e)) ?? e.label;
198
+ }
199
+ function Be(e) {
200
+ return n.maxTagTextLength !== void 0 && n.maxTagTextLength >= 0 ? e.label.slice(0, n.maxTagTextLength) + (e.label.length > n.maxTagTextLength ? "…" : "") : void 0;
201
+ }
202
+ function je() {
203
+ return Object.fromEntries(
204
+ Object.entries(Oe).filter(([e]) => !["class", "style"].includes(e))
205
+ );
206
+ }
207
+ function Se() {
208
+ var i;
209
+ const e = (i = b.value) == null ? void 0 : i.closest("label");
210
+ if (!e) return;
211
+ const l = e.cloneNode(!0);
212
+ l.querySelectorAll(".hys-ui-cascader-wrap").forEach((s) => s.remove()), ne.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
213
+ }
214
+ function N() {
215
+ clearTimeout(ie), ie = void 0;
216
+ }
217
+ async function O(e, l) {
218
+ var h, v;
219
+ if (Q.has(e) || await j(), !z.value || A.value) return;
220
+ await ((h = Q.get(e)) == null ? void 0 : h.focus(l));
221
+ const i = (v = Q.get(e)) == null ? void 0 : v.element, s = be.value;
222
+ if (i && s) {
223
+ const y = i.getBoundingClientRect().left - s.getBoundingClientRect().left + s.scrollLeft;
224
+ y < s.scrollLeft ? s.scrollLeft = y : y + i.offsetWidth > s.scrollLeft + s.clientWidth && (s.scrollLeft = y + i.offsetWidth - s.clientWidth);
225
+ }
226
+ }
227
+ async function Y(e, l = !1) {
228
+ if (A.value || e.disabled) return !1;
229
+ N();
230
+ const i = C, s = await t.expandPath(e.path);
231
+ return await j(), !z.value || i !== C ? !1 : (m.update(), l && s && await O(e.path.length), s);
232
+ }
233
+ function Je(e) {
234
+ N(), !(n.expandTrigger !== "hover" || !e || !$(e) || A.value || e.disabled) && (ie = setTimeout(
235
+ () => {
236
+ ie = void 0, Y(e);
237
+ },
238
+ Math.max(0, Math.min(1e3, n.hoverDelay))
239
+ ));
240
+ }
241
+ async function oe(e, l, i) {
242
+ if (A.value || e.disabled) return;
243
+ N();
244
+ const s = C;
245
+ if ($(e) && i === void 0 && !B.value && !await Y(e) || !z.value || s !== C || !(i !== void 0 || B.value || n.changeOnSelect && !T.value || n.checkOnClickNode || !n.showPrefix || !$(e) && n.checkOnClickLeaf) || !T.value && !t.anyLevel.value && $(e))
246
+ return;
247
+ const y = await t.pick(e.value, l, i);
248
+ !z.value || s !== C || (!T.value && (y || t.modelKeys.value.includes(e.value)) && !$(e) && !n.inline || !T.value && n.checkStrictly && i !== void 0 && y && !n.inline) && m.close(!0);
249
+ }
250
+ async function Pe(e) {
251
+ await t.reloadNode(e.path) && await O(e.path.length);
252
+ }
253
+ function Ee(e, l, i) {
254
+ var Le;
255
+ if (e.isComposing || e.keyCode === 229 || A.value) return;
256
+ const s = e.target;
257
+ if (s.closest("button") || s.matches("input") && ["Enter", " "].includes(e.key))
258
+ return;
259
+ const h = B.value ? t.searchResults.value : t.columns.value[i] ?? [], v = h.filter((_) => !_.disabled), y = v.findIndex((_) => _.value === l.value);
260
+ if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
261
+ e.preventDefault();
262
+ const _ = e.key === "Home" ? 0 : e.key === "End" ? v.length - 1 : (y + (e.key === "ArrowDown" ? 1 : -1) + v.length) % v.length;
263
+ O(i, (Le = v[_]) == null ? void 0 : Le.value);
264
+ } else e.key === "ArrowRight" && !B.value ? (e.preventDefault(), $(l) && Y(l, !0)) : e.key === "ArrowLeft" && !B.value && i > 0 ? (e.preventDefault(), O(i - 1, J(l.path.slice(0, i)))) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T.value || n.checkStrictly ? oe(l, e, !de(l).checked) : $(l) ? Y(l, !0) : oe(l, e));
265
+ }
266
+ function Xe(e) {
267
+ var l, i;
268
+ if (!(e.isComposing || e.keyCode === 229 || A.value) && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
269
+ e.preventDefault();
270
+ const s = B.value ? -1 : 0, h = B.value ? t.searchResults.value : t.columns.value[0] ?? [], v = h.filter((y) => !y.disabled);
271
+ O(
272
+ s,
273
+ e.key === "ArrowUp" ? (l = v.at(-1)) == null ? void 0 : l.value : (i = v[0]) == null ? void 0 : i.value
274
+ );
275
+ }
276
+ }
277
+ async function S(e = !0, l = !1) {
278
+ var v, y;
279
+ if (!F.value || d.disabled.value || n.readonly) return !1;
280
+ const i = C, s = H.value, h = !se;
281
+ return n.inline || await m.show(l), await j(), !z.value || i !== C || (!n.inline && !s && se && !n.retainSearch && t.filter(""), se = !0, !h && !s && !n.inline && n.expandedPath === void 0 && await t.engine.tree.setExpandedKeys([]), !t.browsing.value.length && ((v = t.selectedPaths.value[0]) != null && v.length) && t.expandPath(t.selectedPaths.value[0]), await j(), !z.value || i !== C) ? !1 : (e && (n.filterable ? (y = ge.value) == null || y.focus() : await O(0)), !0);
282
+ }
283
+ function q(e = !1) {
284
+ n.inline || m.close(e);
285
+ }
286
+ function Ge(e) {
287
+ var l;
288
+ (l = e.target) != null && l.closest("button") || (H.value ? q() : S());
289
+ }
290
+ function ze(e) {
291
+ if (!(e.isComposing || e.keyCode === 229 || e.target !== b.value)) {
292
+ if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key))
293
+ e.preventDefault(), S();
294
+ else if (e.key === "Backspace" && T.value && !W.value) {
295
+ const l = [...k.value].reverse().find((i) => !i.disabled);
296
+ l && (e.preventDefault(), t.removeTag(l.path));
297
+ }
298
+ }
299
+ }
300
+ async function Z() {
301
+ const e = await t.clear();
302
+ return e && !n.inline && q(!0), e;
303
+ }
304
+ function he(e) {
305
+ X || (X = !0, D("focus", e)), e.target === b.value && n.showOnFocus && !m.restoringFocus.value && !n.inline && S(!1);
306
+ }
307
+ async function ve(e) {
308
+ var i, s;
309
+ if (await j(), !F.value) return;
310
+ const l = document.activeElement;
311
+ (i = b.value) != null && i.contains(l) || (s = le.value) != null && s.contains(l) || X && (X = !1, D("blur", e), n.validateEvent && g.validate("blur"));
312
+ }
313
+ async function Qe(e) {
314
+ await S(!1) && await t.expandPath(e) && await O(e.length - 1, J(e));
315
+ }
316
+ async function Ye(e) {
317
+ return await S(!1) ? t.expandPath(e) : !1;
318
+ }
319
+ U(
320
+ () => n.open,
321
+ (e) => {
322
+ if (!(!F.value || n.inline))
323
+ if (e) S(!1, !0);
324
+ else {
325
+ const l = re;
326
+ re = !1, m.close(l, !0);
327
+ }
328
+ }
329
+ ), U(H, (e) => {
330
+ D("visible-change", e), e || (C++, N(), n.retainSearch || t.filter(""));
331
+ }), U(
332
+ [d.disabled, () => n.readonly],
333
+ ([e, l]) => {
334
+ (e || l) && (N(), m.close(!1, !0), n.open && D("update:open", !1));
335
+ },
336
+ { flush: "sync" }
337
+ ), U(
338
+ [
339
+ k,
340
+ G,
341
+ t.browsing,
342
+ () => d.size.value,
343
+ () => n.popupWidth,
344
+ () => n.popupMatchWidth
345
+ ],
346
+ () => {
347
+ j().then(() => m.update());
348
+ }
349
+ ), U(t.browsing, N), U(t.rootPending, (e) => {
350
+ var l;
351
+ !e && z.value && !W.value && !t.rootError.value && !t.browsing.value.length && ((l = t.selectedPaths.value[0]) != null && l.length) && t.expandPath(t.selectedPaths.value[0]);
352
+ }), la(() => {
353
+ var e, l;
354
+ Se(), n.inline && ((e = t.selectedPaths.value[0]) != null && e.length) ? t.expandPath(t.selectedPaths.value[0]) : (n.open ?? n.defaultOpen) && S(!1, !0), n.autofocus && !d.disabled.value && ((l = b.value) == null || l.focus());
355
+ }), ta(Se), ia(() => {
356
+ F.value = !0, n.open && !n.inline && S(!1, !0);
357
+ });
358
+ function $e() {
359
+ F.value = !1, C++, X = !1, N(), m.close(!1, !0);
360
+ }
361
+ return oa($e), na($e), We({
362
+ element: b,
363
+ open: z,
364
+ focus: () => {
365
+ var e;
366
+ d.disabled.value || (e = b.value) == null || e.focus();
367
+ },
368
+ blur: () => {
369
+ var e, l, i;
370
+ q(), ((e = b.value) != null && e.contains(document.activeElement) || (l = le.value) != null && l.contains(document.activeElement)) && ((i = document.activeElement) == null || i.blur());
371
+ },
372
+ show: () => S(),
373
+ hide: q,
374
+ clear: Z,
375
+ clearCheckedNodes: Z,
376
+ removeTag: t.removeTag,
377
+ setValue: t.setValue,
378
+ filter: t.filter,
379
+ getSelectedItems: () => [...k.value],
380
+ getCheckedNodes: t.getCheckedNodes,
381
+ getExpandedPath: () => [...t.browsing.value],
382
+ setExpandedPath: Ye,
383
+ reloadNode: t.reloadNode,
384
+ reloadRoot: t.reloadRoot,
385
+ scrollTo: Qe
386
+ }), (e, l) => (r(), u("div", ee({ ref: Ue }, a(pe), {
387
+ class: ["hys-ui-cascader-wrap", [
388
+ e.$attrs.class,
389
+ "hys-ui-cascader-" + a(d).size.value,
390
+ { "hys-ui-cascader-inline-managed": o.inline }
391
+ ]],
392
+ style: [e.$attrs.style, Ke.value],
393
+ id: o.inline ? e.$attrs.id || a(g).id.value || a(te) : void 0,
394
+ role: o.inline ? "group" : void 0,
395
+ "data-hys-ui-field-managed": o.inline ? "" : void 0,
396
+ "aria-label": o.inline ? o.ariaLabel || a(g).label.value || ne.value || a(c).panel : void 0,
397
+ "aria-invalid": o.inline && (o.status === "error" || a(g).invalid.value) || void 0,
398
+ "aria-describedby": o.inline ? a(g).describedBy.value : void 0,
399
+ "aria-disabled": o.inline && a(d).disabled.value || void 0,
400
+ tabindex: o.inline ? a(d).disabled.value ? -1 : 0 : void 0,
401
+ onKeydown: l[6] || (l[6] = (i) => o.inline && ze(i)),
402
+ onFocusin: l[7] || (l[7] = (i) => o.inline && he(i)),
403
+ onFocusout: l[8] || (l[8] = (i) => o.inline && ve(i))
404
+ }), [
405
+ V("button", {
406
+ hidden: "",
407
+ type: "button",
408
+ tabindex: "-1",
409
+ "aria-hidden": "true",
410
+ disabled: a(d).disabled.value,
411
+ onClick: l[0] || (l[0] = ae((i) => {
412
+ var s;
413
+ (s = b.value) == null || s.focus(), S();
414
+ }, ["prevent"]))
415
+ }, null, 8, Ca),
416
+ o.inline ? p("", !0) : (r(), u("div", ee({
417
+ key: 0,
418
+ ref_key: "trigger",
419
+ ref: b
420
+ }, je(), {
421
+ id: e.$attrs.id || a(g).id.value || a(te),
422
+ "data-hys-ui-field-managed": "",
423
+ role: "combobox",
424
+ "aria-haspopup": "dialog",
425
+ "aria-controls": a(H) ? a(te) + "-panel" : void 0,
426
+ "aria-expanded": a(H),
427
+ "aria-label": o.ariaLabel || a(g).label.value || ne.value || o.placeholder || a(c).panel,
428
+ "aria-disabled": a(d).disabled.value || void 0,
429
+ "aria-readonly": o.readonly || void 0,
430
+ "aria-invalid": o.status === "error" || a(g).invalid.value || void 0,
431
+ "aria-describedby": a(g).describedBy.value,
432
+ "aria-required": a(g).required.value || void 0,
433
+ "aria-busy": o.loading || a(t).checking.value || void 0,
434
+ tabindex: a(d).disabled.value ? -1 : 0,
435
+ class: ["hys-ui-cascader-control", {
436
+ "hys-ui-cascader-control-disabled": a(d).disabled.value,
437
+ "hys-ui-cascader-control-error": o.status === "error" || a(g).invalid.value,
438
+ "hys-ui-cascader-control-warning": o.status === "warning",
439
+ "hys-ui-cascader-control-success": o.status === "success"
440
+ }],
441
+ onClick: Ge,
442
+ onKeydown: ze,
443
+ onFocusin: he,
444
+ onFocusout: ve
445
+ }), [
446
+ e.$slots.prefix ? (r(), u("span", Ba, [
447
+ f(e.$slots, "prefix", {}, void 0, !0)
448
+ ])) : p("", !0),
449
+ a(k).length ? a(T) ? (r(), u("div", Pa, [
450
+ (r(!0), u(M, null, fe(qe.value, (i) => f(e.$slots, "tag", {
451
+ item: i,
452
+ remove: () => a(t).removeTag(i.path)
453
+ }, () => [
454
+ V("span", {
455
+ class: De(["hys-ui-cascader-tag", { "hys-ui-cascader-tag-disabled": i.disabled }])
456
+ }, [
457
+ V("span", Ea, [
458
+ Be(i) !== void 0 ? (r(), u(M, { key: 0 }, [
459
+ P(w(Be(i)), 1)
460
+ ], 64)) : (r(), E(He(() => Te(i)), { key: 1 }))
461
+ ]),
462
+ o.removable ? (r(), u("button", {
463
+ key: 0,
464
+ type: "button",
465
+ class: "hys-ui-cascader-tag-remove",
466
+ disabled: a(W) || i.disabled,
467
+ "aria-label": ce(a(c).remove, i.label),
468
+ onMousedown: l[1] || (l[1] = ae(() => {
469
+ }, ["prevent"])),
470
+ onClick: ae((s) => a(t).removeTag(i.path), ["stop"])
471
+ }, [
472
+ f(e.$slots, "remove-icon", {}, () => [
473
+ R(a(Me), { size: 12 })
474
+ ], !0)
475
+ ], 40, za)) : p("", !0)
476
+ ], 2)
477
+ ], !0, a(J)(i.path))), 128)),
478
+ K.value.length ? (r(), E(ya, {
479
+ key: 0,
480
+ text: K.value.slice(0, 20).map((i) => i.label).join("、")
481
+ }, {
482
+ default: L(() => [
483
+ V("span", {
484
+ class: "hys-ui-cascader-tag hys-ui-cascader-more",
485
+ "aria-label": a(c).more.replace("{count}", String(K.value.length))
486
+ }, [
487
+ f(e.$slots, "max-tag-placeholder", {
488
+ items: K.value,
489
+ count: K.value.length
490
+ }, () => [
491
+ P("+" + w(K.value.length), 1)
492
+ ], !0)
493
+ ], 8, $a)
494
+ ]),
495
+ _: 3
496
+ }, 8, ["text"])) : p("", !0)
497
+ ])) : (r(), u("span", La, [
498
+ f(e.$slots, "display", {
499
+ item: a(k)[0]
500
+ }, () => [
501
+ (r(), E(He(() => Te(a(k)[0]))))
502
+ ], !0)
503
+ ])) : (r(), u("span", Sa, w(o.placeholder), 1)),
504
+ V("span", Da, [
505
+ o.loading || a(t).checking.value ? (r(), E(a(ye), {
506
+ key: 0,
507
+ size: 15,
508
+ class: "hys-ui-icon-spin"
509
+ })) : p("", !0),
510
+ Ie.value ? (r(), u("button", {
511
+ key: 1,
512
+ type: "button",
513
+ class: "hys-ui-cascader-clear",
514
+ "aria-label": a(c).clear,
515
+ onMousedown: l[2] || (l[2] = ae(() => {
516
+ }, ["prevent"])),
517
+ onClick: ae(Z, ["stop"])
518
+ }, [
519
+ f(e.$slots, "clear-icon", {}, () => [
520
+ R(a(Me), { size: 14 })
521
+ ], !0)
522
+ ], 40, Ha)) : p("", !0),
523
+ f(e.$slots, "suffix", {}, () => [
524
+ R(a(ha), {
525
+ size: 16,
526
+ class: De(["hys-ui-cascader-chevron", { "hys-ui-cascader-chevron-open": a(H) }])
527
+ }, null, 8, ["class"])
528
+ ], !0)
529
+ ])
530
+ ], 16, Ta)),
531
+ o.name ? (r(!0), u(M, { key: 1 }, fe(a(k), (i) => (r(), u("input", {
532
+ key: a(J)(i.path),
533
+ type: "hidden",
534
+ name: o.name,
535
+ form: o.form,
536
+ value: o.emitPath ? JSON.stringify(i.path) : i.value,
537
+ disabled: a(d).disabled.value
538
+ }, null, 8, Aa))), 128)) : p("", !0),
539
+ (r(), E(sa, {
540
+ to: o.appendTo === !1 || o.inline ? "body" : o.appendTo,
541
+ disabled: o.appendTo === !1 || o.inline
542
+ }, [
543
+ R(a(ca), {
544
+ disabled: o.inline,
545
+ "popup-transition": n.popupTransition,
546
+ "popup-transition-duration": n.popupTransitionDuration,
547
+ placement: a(m).placement.value
548
+ }, {
549
+ default: L(() => [
550
+ Ve.value ? (r(), u("div", ee({
551
+ key: 0,
552
+ id: a(te) + "-panel",
553
+ ref_key: "panel",
554
+ ref: le
555
+ }, a(pe), {
556
+ class: ["hys-ui-cascader-menu", [
557
+ o.popupClass,
558
+ "hys-ui-cascader-" + a(d).size.value,
559
+ {
560
+ "hys-ui-cascader-inline": o.inline,
561
+ "hys-ui-cascader-menu-disabled": a(d).disabled.value
562
+ }
563
+ ]],
564
+ style: Fe.value,
565
+ role: o.inline ? "group" : "dialog",
566
+ "aria-label": a(c).panel,
567
+ "aria-busy": o.loading || a(t).rootPending.value || a(t).checking.value || void 0,
568
+ onFocusin: he,
569
+ onFocusout: ve
570
+ }), [
571
+ e.$slots.header ? (r(), u("header", Ra, [
572
+ f(e.$slots, "header", {}, void 0, !0)
573
+ ])) : p("", !0),
574
+ o.filterable ? (r(), E(fa, {
575
+ key: 1,
576
+ ref_key: "search",
577
+ ref: ge,
578
+ "model-value": a(G),
579
+ class: "hys-ui-cascader-search",
580
+ "aria-label": a(c).search,
581
+ placeholder: a(c).search,
582
+ disabled: a(W),
583
+ size: a(d).size.value,
584
+ clearable: "",
585
+ "onUpdate:modelValue": a(t).filter,
586
+ onKeydown: Xe
587
+ }, {
588
+ prefix: L(() => [
589
+ R(a(va), { size: 14 })
590
+ ]),
591
+ _: 1
592
+ }, 8, ["model-value", "aria-label", "placeholder", "disabled", "size", "onUpdate:modelValue"])) : p("", !0),
593
+ o.loading || a(t).rootPending.value || B.value && a(t).filterPending.value ? (r(), u("div", Wa, [
594
+ f(e.$slots, "loading", { level: 0 }, () => [
595
+ R(a(ye), {
596
+ size: 17,
597
+ class: "hys-ui-icon-spin"
598
+ }),
599
+ P(w(a(c).loading), 1)
600
+ ], !0)
601
+ ])) : a(t).rootError.value || B.value && a(t).filterError.value ? (r(), u("div", Na, [
602
+ V("span", null, w(a(c).loadError), 1),
603
+ R(me, {
604
+ size: "sm",
605
+ variant: "ghost",
606
+ onClick: l[3] || (l[3] = (i) => a(t).rootError.value ? a(t).reloadRoot() : a(t).retrySearch())
607
+ }, {
608
+ default: L(() => [
609
+ P(w(a(c).retry), 1)
610
+ ]),
611
+ _: 1
612
+ })
613
+ ])) : B.value ? (r(), u(M, { key: 4 }, [
614
+ a(t).searchResults.value.length ? (r(), E(Re, {
615
+ key: 0,
616
+ ref: (i) => we(-1, i),
617
+ rows: a(t).searchResults.value,
618
+ level: -1,
619
+ label: a(c).search,
620
+ multiple: a(T),
621
+ strict: o.checkStrictly,
622
+ "show-prefix": o.showPrefix,
623
+ disabled: A.value,
624
+ search: !0,
625
+ size: a(d).size.value,
626
+ virtual: o.virtual,
627
+ "list-height": o.listHeight,
628
+ "item-height": xe.value,
629
+ overscan: o.overscan,
630
+ context: de,
631
+ "has-children": $,
632
+ error: Ce,
633
+ "retry-text": a(c).retry,
634
+ "expand-label": (i) => ce(a(c).expand, i.label),
635
+ onChoose: oe,
636
+ onKeyboard: Ee,
637
+ onRetry: Pe,
638
+ onScroll: l[4] || (l[4] = (i) => D("scroll", { level: -1, event: i }))
639
+ }, Ae({ _: 2 }, [
640
+ e.$slots.suggestion ? {
641
+ name: "suggestion",
642
+ fn: L((i) => [
643
+ f(e.$slots, "suggestion", ra(ua(i)), void 0, !0)
644
+ ]),
645
+ key: "0"
646
+ } : void 0
647
+ ]), 1032, ["rows", "label", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "retry-text", "expand-label"])) : (r(), u("div", Oa, [
648
+ f(e.$slots, "empty", {
649
+ query: a(G),
650
+ level: 0
651
+ }, () => [
652
+ P(w(a(c).noMatch), 1)
653
+ ], !0)
654
+ ]))
655
+ ], 64)) : (r(), u("div", {
656
+ key: 5,
657
+ ref_key: "columnsElement",
658
+ ref: be,
659
+ class: "hys-ui-cascader-columns"
660
+ }, [
661
+ (r(!0), u(M, null, fe(a(t).columns.value, (i, s) => (r(), u(M, {
662
+ key: ue(s)
663
+ }, [
664
+ i.length ? (r(), E(Re, {
665
+ key: 0,
666
+ ref_for: !0,
667
+ ref: (h) => we(s, h),
668
+ rows: i,
669
+ level: s,
670
+ label: a(c).level.replace("{level}", String(s + 1)),
671
+ "active-key": a(t).browsing.value[s] === void 0 ? void 0 : a(J)(a(t).browsing.value.slice(0, s + 1)),
672
+ multiple: a(T),
673
+ strict: o.checkStrictly,
674
+ "show-prefix": o.showPrefix,
675
+ disabled: A.value,
676
+ size: a(d).size.value,
677
+ virtual: o.virtual,
678
+ "list-height": o.listHeight,
679
+ "item-height": xe.value,
680
+ overscan: o.overscan,
681
+ "column-width": o.columnWidth,
682
+ context: de,
683
+ "has-children": $,
684
+ error: Ce,
685
+ "retry-text": a(c).retry,
686
+ "expand-label": (h) => ce(a(c).expand, h.label),
687
+ onChoose: oe,
688
+ onExpand: Y,
689
+ onHover: Je,
690
+ onKeyboard: Ee,
691
+ onRetry: Pe,
692
+ onScroll: (h) => D("scroll", { level: s, event: h })
693
+ }, Ae({ _: 2 }, [
694
+ e.$slots.option ? {
695
+ name: "option",
696
+ fn: L((h) => [
697
+ f(e.$slots, "option", ee({ ref_for: !0 }, h), void 0, !0)
698
+ ]),
699
+ key: "0"
700
+ } : void 0,
701
+ e.$slots["expand-icon"] ? {
702
+ name: "expand-icon",
703
+ fn: L((h) => [
704
+ f(e.$slots, "expand-icon", ee({ ref_for: !0 }, h), void 0, !0)
705
+ ]),
706
+ key: "1"
707
+ } : void 0
708
+ ]), 1032, ["rows", "level", "label", "active-key", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "column-width", "retry-text", "expand-label", "onScroll"])) : (r(), u("div", {
709
+ key: 1,
710
+ class: "hys-ui-cascader-empty-column",
711
+ style: da({
712
+ minWidth: typeof o.columnWidth == "number" ? o.columnWidth + "px" : o.columnWidth
713
+ })
714
+ }, [
715
+ V("div", Va, [
716
+ s && a(t).engine.tree.loadingKeys.value.has(ue(s)) ? (r(), u(M, { key: 0 }, [
717
+ R(a(ye), {
718
+ size: 16,
719
+ class: "hys-ui-icon-spin"
720
+ }),
721
+ P(w(a(c).loading), 1)
722
+ ], 64)) : s && a(t).engine.tree.failures.value.has(ue(s)) ? (r(), u(M, { key: 1 }, [
723
+ P(w(a(c).loadError), 1)
724
+ ], 64)) : f(e.$slots, "empty", {
725
+ query: a(G),
726
+ level: s
727
+ }, () => [
728
+ P(w(a(c).empty), 1)
729
+ ], !0, 2)
730
+ ])
731
+ ], 4))
732
+ ], 64))), 128))
733
+ ], 512)),
734
+ e.$slots.footer || o.showFooter && (!o.inline || o.clearable) ? (r(), u("footer", Fa, [
735
+ f(e.$slots, "footer", {
736
+ items: a(k),
737
+ clear: Z,
738
+ close: () => q(!0)
739
+ }, () => [
740
+ o.clearable ? (r(), E(me, {
741
+ key: 0,
742
+ size: "sm",
743
+ variant: "ghost",
744
+ disabled: a(W) || !a(k).some((i) => !i.disabled),
745
+ onClick: Z
746
+ }, {
747
+ default: L(() => [
748
+ P(w(a(c).clear), 1)
749
+ ]),
750
+ _: 1
751
+ }, 8, ["disabled"])) : p("", !0),
752
+ o.inline ? p("", !0) : (r(), E(me, {
753
+ key: 1,
754
+ size: "sm",
755
+ variant: "secondary",
756
+ onClick: l[5] || (l[5] = (i) => q(!0))
757
+ }, {
758
+ default: L(() => [
759
+ P(w(a(c).close), 1)
760
+ ]),
761
+ _: 1
762
+ }))
763
+ ], !0)
764
+ ])) : p("", !0)
765
+ ], 16, Ma)) : p("", !0)
766
+ ]),
767
+ _: 3
768
+ }, 8, ["disabled", "popup-transition", "popup-transition-duration", "placement"])
769
+ ], 8, ["to", "disabled"]))
770
+ ], 16, xa));
771
+ }
772
+ });
2
773
  export {
3
- f as default
774
+ el as default
4
775
  };