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,817 @@
1
- import f from "./HysCalendar.vue.js";
1
+ import { defineComponent as sa, ref as B, useId as da, computed as u, watch as ae, onDeactivated as ca, openBlock as r, createElementBlock as s, mergeProps as Le, unref as b, renderSlot as S, createElementVNode as C, toDisplayString as g, Fragment as W, createVNode as $, createBlock as Y, createCommentVNode as p, withCtx as R, createTextVNode as le, normalizeStyle as ke, Transition as va, normalizeClass as se, renderList as K, withModifiers as de, Teleport as ya, nextTick as ge } from "vue";
2
+ import ma from "../../motion/PopupMotion.js";
3
+ import { ChevronsLeft as ha, ChevronLeft as fa, ChevronRight as ba, ChevronsRight as pa, LoaderCircle as ka, X as ga } from "lucide-vue-next";
4
+ import q from "../HysButton/HysButton.vue.js";
5
+ import Pe from "../HysSelect/HysSelect.vue.js";
6
+ import wa from "../HysSegmented/HysSegmented.vue.js";
7
+ import { useHysRootAttrs as Ca } from "../../config.js";
8
+ import { useMotion as Da } from "../../motion/useMotion.js";
9
+ import { useFloating as xa } from "../../composables/useFloating.js";
10
+ import { calendarDay as _e, civilDay as f, calendarParts as k, calendarWeeks as Ma, calendarISO as U, calendarEvents as $a, calendarWeek as Ta, calendarDate as we, calendarFormat as Sa, calendarShift as L } from "../../composables/calendar.js";
11
+ const Va = ["aria-busy", "aria-label"], za = {
12
+ key: 0,
13
+ class: "hys-ui-calendar-header"
14
+ }, Aa = {
15
+ class: "hys-ui-calendar-title",
16
+ "aria-live": "polite"
17
+ }, Na = {
18
+ key: 0,
19
+ class: "hys-ui-calendar-controls"
20
+ }, Ba = { class: "hys-ui-calendar-navigation" }, Fa = {
21
+ key: 0,
22
+ class: "hys-ui-calendar-loading",
23
+ role: "status"
24
+ }, Wa = ["data-calendar-panel"], Ra = ["aria-label", "aria-readonly"], La = {
25
+ key: 0,
26
+ role: "columnheader"
27
+ }, Pa = {
28
+ key: 0,
29
+ role: "rowheader",
30
+ class: "hys-ui-calendar-week-number"
31
+ }, _a = ["data-date", "aria-selected", "aria-current", "aria-disabled", "aria-label", "tabindex", "onFocus", "onKeydown", "onClick"], Ea = { class: "hys-ui-calendar-day-heading" }, Ha = ["disabled", "aria-pressed", "aria-readonly", "onClick"], Ka = {
32
+ key: 0,
33
+ class: "hys-ui-calendar-events"
34
+ }, Ua = ["tabindex", "disabled", "title", "onClick"], Oa = { key: 0 }, Ia = ["tabindex", "disabled", "aria-expanded", "onClick"], ja = ["aria-label", "aria-readonly"], Ya = ["data-month", "aria-selected", "aria-disabled", "tabindex", "onFocus", "onKeydown", "onClick"], qa = ["disabled", "aria-pressed", "onClick"], Xa = {
35
+ key: 0,
36
+ class: "hys-ui-calendar-month-count"
37
+ }, Za = {
38
+ key: 1,
39
+ class: "hys-ui-calendar-footer"
40
+ }, Ga = ["id", "aria-label"], Ja = { class: "hys-ui-calendar-popup-events" }, Qa = ["disabled", "onClick"], el = { key: 0 }, al = { key: 0 }, vl = /* @__PURE__ */ sa({
41
+ __name: "HysCalendar",
42
+ props: {
43
+ popupTransition: {},
44
+ popupTransitionDuration: {},
45
+ modelValue: {},
46
+ defaultValue: {},
47
+ valueType: {},
48
+ valueFormat: { default: "YYYY-MM-DD" },
49
+ mode: {},
50
+ defaultMode: { default: "month" },
51
+ fullscreen: { type: Boolean, default: !0 },
52
+ transition: { default: "slide" },
53
+ transitionDuration: { default: 180 },
54
+ controllerType: { default: "button" },
55
+ formatter: {},
56
+ showModeSwitch: { type: Boolean, default: !0 },
57
+ showHeader: { type: Boolean, default: !0 },
58
+ showToday: { type: Boolean, default: !0 },
59
+ firstDayOfWeek: { default: 1 },
60
+ locale: { default: "zh-CN" },
61
+ range: {},
62
+ validRange: {},
63
+ disabled: { type: Boolean },
64
+ readonly: { type: Boolean },
65
+ disabledDate: {},
66
+ showAdjacentDays: { type: Boolean, default: !0 },
67
+ fixedWeeks: { type: Boolean, default: !1 },
68
+ showWeekNumbers: { type: Boolean, default: !1 },
69
+ keyboard: { type: Boolean, default: !0 },
70
+ loading: { type: Boolean },
71
+ events: {},
72
+ maxEvents: { default: 3 },
73
+ ariaLabel: {}
74
+ },
75
+ emits: ["update:modelValue", "update:mode", "change", "select", "panelChange", "event", "more"],
76
+ setup(m, { expose: Ee, emit: He }) {
77
+ const o = m, F = He, Ce = Ca(), te = B(), Ke = da(), O = _e(/* @__PURE__ */ new Date()), X = f(1, 0, 1), Z = f(9999, 11, 31), V = (e) => _e(e, o.valueFormat), x = (e) => {
78
+ const [a, l, t] = e.split("-").map(Number);
79
+ return f(a, l - 1, t);
80
+ }, ce = V(o.modelValue ?? o.defaultValue) ?? O, De = B(ce), D = B(ce), N = B(ce), xe = B(o.defaultMode), z = u(
81
+ () => o.modelValue === void 0 ? De.value : V(o.modelValue)
82
+ ), c = u(
83
+ () => o.range ? "month" : o.mode ?? xe.value
84
+ ), d = u(() => k(D.value)), ne = u(
85
+ () => Number.isInteger(o.firstDayOfWeek) ? (o.firstDayOfWeek % 7 + 7) % 7 : 1
86
+ ), v = u(() => o.disabled || o.loading), I = u(() => o.locale.toLowerCase().startsWith("zh")), y = u(
87
+ () => I.value ? {
88
+ today: "今天",
89
+ month: "月",
90
+ year: "年",
91
+ previous: "上一",
92
+ next: "下一",
93
+ more: "更多日程",
94
+ close: "关闭",
95
+ loading: "加载中",
96
+ week: "周",
97
+ label: "日历"
98
+ } : {
99
+ today: "Today",
100
+ month: "Month",
101
+ year: "Year",
102
+ previous: "Previous ",
103
+ next: "Next ",
104
+ more: "More events",
105
+ close: "Close",
106
+ loading: "Loading",
107
+ week: "Wk",
108
+ label: "Calendar"
109
+ }
110
+ );
111
+ function oe(e) {
112
+ try {
113
+ return new Intl.DateTimeFormat(o.locale, {
114
+ ...e,
115
+ timeZone: "UTC"
116
+ });
117
+ } catch {
118
+ return new Intl.DateTimeFormat("zh-CN", { ...e, timeZone: "UTC" });
119
+ }
120
+ }
121
+ const Me = u(() => oe({ month: "long" })), Ue = u(
122
+ () => oe({ year: "numeric", month: "long", day: "numeric", weekday: "long" })
123
+ ), Oe = u(() => {
124
+ const e = oe({ weekday: "short" });
125
+ return Array.from(
126
+ { length: 7 },
127
+ (a, l) => e.format(
128
+ new Date((f(2024, 0, 7) + (ne.value + l) % 7) * 864e5)
129
+ )
130
+ );
131
+ });
132
+ function A(e) {
133
+ return o.valueType === "date" || o.valueType === void 0 && (o.modelValue instanceof Date || o.defaultValue instanceof Date) ? we(e) : Sa(e, o.valueFormat);
134
+ }
135
+ const re = u(() => {
136
+ if (!o.validRange) return [X, Z];
137
+ const e = V(o.validRange[0]), a = V(o.validRange[1]);
138
+ return e !== void 0 && a !== void 0 && e <= a ? [e, a] : [1, 0];
139
+ }), w = u(() => {
140
+ if (!o.range) return;
141
+ const e = V(o.range[0]), a = V(o.range[1]);
142
+ if (e === void 0 || a === void 0 || e > a) return;
143
+ const l = k(e), t = k(a);
144
+ if (!((t.year - l.year) * 12 + t.month - l.month > 1))
145
+ return [e, a];
146
+ }), T = u(() => {
147
+ const e = d.value;
148
+ if (c.value === "year")
149
+ return [f(e.year, 0, 1), f(e.year, 11, 31)];
150
+ const [a, l] = w.value ?? [
151
+ f(e.year, e.month, 1),
152
+ f(e.year, e.month + 1, 0)
153
+ ], [t, n] = Ma(a, l, ne.value);
154
+ return [t, o.fixedWeeks && !w.value ? t + 41 : n];
155
+ }), ve = u(() => [
156
+ U(T.value[0]),
157
+ U(T.value[1])
158
+ ]), { effectiveMotion: Ie } = Da(), $e = B("next"), Te = u(
159
+ () => d.value.year * 12 + (c.value === "year" ? 0 : d.value.month)
160
+ ), ye = u(
161
+ () => w.value ? "range:" + ve.value.join(":") : c.value + ":" + Te.value
162
+ );
163
+ ae(
164
+ Te,
165
+ (e, a) => $e.value = e >= a ? "next" : "prev",
166
+ { flush: "sync" }
167
+ );
168
+ const Se = u(
169
+ () => Math.max(
170
+ 0,
171
+ Math.min(
172
+ 800,
173
+ Number.isFinite(o.transitionDuration) ? o.transitionDuration : 180
174
+ )
175
+ )
176
+ ), je = u(
177
+ () => o.transition !== "none" && Se.value > 0 && Ie.value !== "off"
178
+ ), Ye = u(
179
+ () => "hys-ui-calendar-" + o.transition + (["slide", "slide-up"].includes(o.transition) ? "-" + $e.value : "")
180
+ );
181
+ function qe(e) {
182
+ e.setAttribute("aria-hidden", "true"), e.inert = !0;
183
+ }
184
+ const Ve = u(
185
+ () => $a(o.events ?? [], ...T.value)
186
+ );
187
+ function P(e) {
188
+ var t;
189
+ const [a, l] = re.value;
190
+ return e < X || e > Z || e < a || e > l || !!((t = o.disabledDate) != null && t.call(o, U(e))) || !!w.value && (e < w.value[0] || e > w.value[1]);
191
+ }
192
+ function ze(e) {
193
+ const a = k(e), l = a.year * 12 + a.month, t = d.value.year * 12 + d.value.month;
194
+ return {
195
+ day: U(e),
196
+ date: we(e),
197
+ type: l < t ? "prev-month" : l > t ? "next-month" : "current-month",
198
+ isSelected: z.value === e,
199
+ isToday: O === e,
200
+ disabled: !!v.value || P(e),
201
+ events: Ve.value.dates.get(e) ?? []
202
+ };
203
+ }
204
+ const me = u(
205
+ () => Array.from(
206
+ { length: T.value[1] - T.value[0] + 1 },
207
+ (e, a) => ze(T.value[0] + a)
208
+ )
209
+ ), Xe = u(
210
+ () => Array.from({ length: me.value.length / 7 }, (e, a) => ({
211
+ number: Ta(T.value[0] + a * 7),
212
+ days: me.value.slice(a * 7, a * 7 + 7)
213
+ }))
214
+ );
215
+ function Ze(e) {
216
+ const a = f(d.value.year, e, 1), l = f(d.value.year, e + 1, 0);
217
+ for (let t = a; t <= l; t++) if (!P(t)) return !1;
218
+ return !0;
219
+ }
220
+ const G = u(
221
+ () => Array.from({ length: 12 }, (e, a) => {
222
+ const l = f(d.value.year, a, 1), t = z.value === void 0 ? void 0 : k(z.value);
223
+ return {
224
+ month: a + 1,
225
+ date: we(l),
226
+ day: U(l),
227
+ isSelected: (t == null ? void 0 : t.year) === d.value.year && t.month === a,
228
+ isToday: k(O).year === d.value.year && k(O).month === a,
229
+ disabled: !!v.value || Ze(a),
230
+ events: Ve.value.months.get(d.value.year * 12 + a) ?? []
231
+ };
232
+ })
233
+ ), ie = u(
234
+ () => w.value ? `${U(w.value[0])} — ${U(w.value[1])}` : c.value === "year" ? `${d.value.year}${I.value ? "年" : ""}` : I.value ? `${d.value.year}年${d.value.month + 1}月` : oe({ year: "numeric", month: "long" }).format(
235
+ new Date(D.value * 864e5)
236
+ )
237
+ ), Ge = u(() => {
238
+ const e = d.value.year, a = Math.max(1, e - 100), l = Math.min(9999, e + 100);
239
+ return Array.from({ length: l - a + 1 }, (t, n) => {
240
+ var i;
241
+ return {
242
+ label: ((i = o.formatter) == null ? void 0 : i.call(o, a + n, "year")) ?? `${a + n}${I.value ? "年" : ""}`,
243
+ value: a + n
244
+ };
245
+ });
246
+ }), Je = u(
247
+ () => Array.from({ length: 12 }, (e, a) => {
248
+ var l;
249
+ return {
250
+ label: ((l = o.formatter) == null ? void 0 : l.call(o, a + 1, "month")) ?? Me.value.format(new Date(f(2024, a, 1) * 864e5)),
251
+ value: a
252
+ };
253
+ })
254
+ ), he = u(() => {
255
+ var a, l, t, n;
256
+ const e = me.value.filter(
257
+ (i) => !i.disabled && (o.showAdjacentDays || i.type === "current-month" || w.value)
258
+ );
259
+ return ((a = e.find((i) => V(i.day) === N.value)) == null ? void 0 : a.day) ?? ((l = e.find((i) => i.isSelected)) == null ? void 0 : l.day) ?? ((t = e.find((i) => i.type === "current-month")) == null ? void 0 : t.day) ?? ((n = e[0]) == null ? void 0 : n.day);
260
+ }), Qe = u(() => {
261
+ var a, l, t;
262
+ const e = k(N.value).month + 1;
263
+ return ((a = G.value.find((n) => n.month === e && !n.disabled)) == null ? void 0 : a.month) ?? ((l = G.value.find((n) => n.isSelected && !n.disabled)) == null ? void 0 : l.month) ?? ((t = G.value.find((n) => !n.disabled)) == null ? void 0 : t.month);
264
+ }), ue = u(
265
+ () => Math.min(
266
+ 100,
267
+ Math.max(
268
+ 0,
269
+ Math.floor(Number.isFinite(o.maxEvents) ? o.maxEvents : 3)
270
+ )
271
+ )
272
+ ), Ae = B(), fe = B(), M = B(), { placement: ea, open: Ne, style: aa, show: la, close: ta } = xa(Ae, fe, {
273
+ placement: "bottom-start",
274
+ width: () => 320,
275
+ closeOnTab: !0
276
+ });
277
+ function _() {
278
+ ta(), M.value = void 0;
279
+ }
280
+ ae([() => o.modelValue, () => o.valueFormat], () => {
281
+ const e = V(o.modelValue);
282
+ e !== void 0 && (D.value = e, N.value = e), _();
283
+ }), ae(
284
+ [
285
+ () => o.mode,
286
+ () => o.range,
287
+ () => o.validRange,
288
+ v,
289
+ () => o.readonly
290
+ ],
291
+ _
292
+ ), ae(
293
+ () => o.events,
294
+ () => {
295
+ M.value && (M.value = ze(x(M.value.day)));
296
+ },
297
+ { deep: !0 }
298
+ ), ca(_);
299
+ function E(e, a = c.value) {
300
+ const l = k(e), t = f(l.year, a === "year" ? 0 : l.month, 1), n = f(l.year, a === "year" ? 12 : l.month + 1, 0), [i, h] = re.value;
301
+ return e >= X && e <= Z && n >= i && t <= h;
302
+ }
303
+ ae(
304
+ [re, () => o.modelValue],
305
+ () => {
306
+ const [e, a] = re.value;
307
+ e <= a && !E(D.value) && (D.value = Math.max(e, Math.min(a, D.value)), N.value = D.value, _());
308
+ },
309
+ { immediate: !0 }
310
+ );
311
+ function j(e) {
312
+ if (v.value || w.value || !E(e)) return !1;
313
+ const a = k(D.value), l = k(e);
314
+ return D.value = e, N.value = e, _(), (a.year !== l.year || a.month !== l.month) && F("panelChange", A(e), c.value), !0;
315
+ }
316
+ function Be(e) {
317
+ const a = V(e);
318
+ return a === void 0 ? !1 : j(a);
319
+ }
320
+ function J(e) {
321
+ return e === "today" ? O : L(
322
+ D.value,
323
+ e === "prev-month" ? -1 : e === "next-month" ? 1 : e === "prev-year" ? -12 : 12
324
+ );
325
+ }
326
+ function H(e) {
327
+ return j(J(e));
328
+ }
329
+ function be(e) {
330
+ return v.value || w.value || !["month", "year"].includes(e) ? !1 : (e === c.value || (o.mode === void 0 && (xe.value = e), F("update:mode", e), F("panelChange", A(D.value), e), _()), !0);
331
+ }
332
+ async function Q(e, a = "date") {
333
+ if (v.value || o.readonly || P(e)) return !1;
334
+ const l = A(e), t = z.value;
335
+ return o.modelValue === void 0 && (De.value = e), F("update:modelValue", l), F("select", A(e), { source: a }), t !== e && F("change", A(e)), o.range || j(e), N.value = e, await ge(), z.value === e;
336
+ }
337
+ function na(e) {
338
+ const a = V(e);
339
+ return a === void 0 ? Promise.resolve(!1) : Q(a, "customize");
340
+ }
341
+ function pe(e) {
342
+ if (v.value || e.disabled) return;
343
+ const a = x(e.day), l = f(d.value.year, e.month, 0), t = z.value ?? a, n = k(t);
344
+ let i = Math.max(
345
+ a,
346
+ Math.min(
347
+ l,
348
+ L(
349
+ t,
350
+ (d.value.year - n.year) * 12 + e.month - 1 - n.month
351
+ )
352
+ )
353
+ );
354
+ if (P(i))
355
+ for (i = a; i <= l && P(i); ) i++;
356
+ Q(i, "month");
357
+ }
358
+ function Fe(e, a) {
359
+ !v.value && !e.disabled && F("event", e.id, e, a);
360
+ }
361
+ async function oa(e, a) {
362
+ var l, t;
363
+ v.value || (Ae.value = a.currentTarget, M.value = e, F("more", e.day, e.events), la(), await ge(), (t = (l = fe.value) == null ? void 0 : l.querySelector("button")) == null || t.focus());
364
+ }
365
+ function ra(e, a) {
366
+ a.target.closest(
367
+ 'button,a,input,select,textarea,[contenteditable="true"],[role="button"]'
368
+ ) || Q(e);
369
+ }
370
+ async function We() {
371
+ var e, a, l;
372
+ await ge(), (l = (a = Array.from(
373
+ ((e = te.value) == null ? void 0 : e.querySelectorAll(".hys-ui-calendar-page")) ?? []
374
+ ).find((t) => t.dataset.calendarPanel === ye.value)) == null ? void 0 : a.querySelector('[role="gridcell"][tabindex="0"]')) == null || l.focus();
375
+ }
376
+ async function Re(e, a, l = !1) {
377
+ if (!o.keyboard || v.value || e.altKey || e.ctrlKey || e.metaKey || e.target !== e.currentTarget && !e.target.classList.contains("hys-ui-calendar-day"))
378
+ return;
379
+ let t;
380
+ const n = getComputedStyle(te.value).direction === "rtl" ? -1 : 1;
381
+ if (e.key === "Enter" || e.key === " ") {
382
+ e.preventDefault(), l ? pe(G.value[k(a).month]) : await Q(a, "keyboard");
383
+ return;
384
+ }
385
+ if (e.key === "ArrowLeft" && (t = l ? L(a, -n) : a - n), e.key === "ArrowRight" && (t = l ? L(a, n) : a + n), e.key === "ArrowUp" && (t = l ? L(a, -3) : a - 7), e.key === "ArrowDown" && (t = l ? L(a, 3) : a + 7), e.key === "Home" && (t = l ? f(d.value.year, 0, 1) : a - (k(a).weekday - ne.value + 7) % 7), e.key === "End" && (t = l ? f(d.value.year, 11, 1) : a + (ne.value + 6 - k(a).weekday + 7) % 7), (e.key === "PageUp" || e.key === "PageDown") && (t = L(
386
+ a,
387
+ (e.key === "PageUp" ? -1 : 1) * (e.shiftKey || l ? 12 : 1)
388
+ )), t === void 0 || (e.preventDefault(), t < X || t > Z || o.range && (t < T.value[0] || t > T.value[1])))
389
+ return;
390
+ const i = e.key === "Home" ? 1 : e.key === "End" ? -1 : t >= a ? 1 : -1;
391
+ for (let h = 0; h < (l ? 12 : 366); h++) {
392
+ const ee = k(t);
393
+ if (l ? !Array.from(
394
+ { length: k(f(ee.year, ee.month + 1, 0)).day },
395
+ (ia, ua) => t - ee.day + 1 + ua
396
+ ).every(P) : !P(t))
397
+ break;
398
+ if (t = l ? L(t, i) : t + i, t < X || t > Z || o.range && (t < T.value[0] || t > T.value[1]) || h === (l ? 11 : 365)) return;
399
+ }
400
+ !o.range && !j(t) || (N.value = t, await We());
401
+ }
402
+ return Ee({
403
+ element: te,
404
+ selectedDay: u(
405
+ () => z.value === void 0 ? void 0 : A(z.value)
406
+ ),
407
+ panelValue: u(() => A(D.value)),
408
+ currentMode: c,
409
+ visibleRange: ve,
410
+ pickDay: na,
411
+ selectDate: H,
412
+ showMonth: Be,
413
+ setMode: be,
414
+ focus: We
415
+ }), (e, a) => (r(), s("section", Le({
416
+ ref_key: "element",
417
+ ref: te
418
+ }, b(Ce), {
419
+ class: ["hys-ui-calendar", {
420
+ "hys-ui-calendar--card": !m.fullscreen,
421
+ "hys-ui-calendar--disabled": m.disabled
422
+ }],
423
+ "aria-busy": m.loading || void 0,
424
+ "aria-label": m.ariaLabel || y.value.label
425
+ }), [
426
+ m.showHeader ? (r(), s("header", za, [
427
+ S(e.$slots, "header", {
428
+ date: ie.value,
429
+ value: A(D.value),
430
+ mode: c.value,
431
+ selectDate: H,
432
+ showMonth: Be,
433
+ setMode: be
434
+ }, () => [
435
+ C("strong", Aa, g(ie.value), 1),
436
+ w.value ? p("", !0) : (r(), s("div", Na, [
437
+ m.controllerType === "select" ? (r(), s(W, { key: 0 }, [
438
+ $(Pe, {
439
+ "model-value": d.value.year,
440
+ options: Ge.value,
441
+ filterable: "",
442
+ size: "sm",
443
+ disabled: v.value,
444
+ "aria-label": y.value.year,
445
+ class: "hys-ui-calendar-year-select",
446
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => j(b(f)(Number(l), d.value.month, 1)))
447
+ }, null, 8, ["model-value", "options", "disabled", "aria-label"]),
448
+ c.value === "month" ? (r(), Y(Pe, {
449
+ key: 0,
450
+ "model-value": d.value.month,
451
+ options: Je.value,
452
+ size: "sm",
453
+ disabled: v.value,
454
+ "aria-label": y.value.month,
455
+ class: "hys-ui-calendar-month-select",
456
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => j(b(f)(d.value.year, Number(l), 1)))
457
+ }, null, 8, ["model-value", "options", "disabled", "aria-label"])) : p("", !0)
458
+ ], 64)) : p("", !0),
459
+ C("div", Ba, [
460
+ m.controllerType === "button" && c.value === "month" ? (r(), Y(q, {
461
+ key: 0,
462
+ size: "sm",
463
+ variant: "ghost",
464
+ disabled: v.value || !E(J("prev-year")),
465
+ "aria-label": y.value.previous + y.value.year,
466
+ onClick: a[2] || (a[2] = (l) => H("prev-year"))
467
+ }, {
468
+ default: R(() => [
469
+ $(b(ha), { size: 16 })
470
+ ]),
471
+ _: 1
472
+ }, 8, ["disabled", "aria-label"])) : p("", !0),
473
+ $(q, {
474
+ size: "sm",
475
+ variant: "ghost",
476
+ disabled: v.value || !E(
477
+ J(
478
+ c.value === "year" ? "prev-year" : "prev-month"
479
+ )
480
+ ),
481
+ "aria-label": y.value.previous + (c.value === "year" ? y.value.year : y.value.month),
482
+ onClick: a[3] || (a[3] = (l) => H(c.value === "year" ? "prev-year" : "prev-month"))
483
+ }, {
484
+ default: R(() => [
485
+ $(b(fa), { size: 16 })
486
+ ]),
487
+ _: 1
488
+ }, 8, ["disabled", "aria-label"]),
489
+ m.showToday ? (r(), Y(q, {
490
+ key: 1,
491
+ size: "sm",
492
+ variant: "secondary",
493
+ disabled: v.value || !E(b(O)),
494
+ onClick: a[4] || (a[4] = (l) => H("today"))
495
+ }, {
496
+ default: R(() => [
497
+ le(g(y.value.today), 1)
498
+ ]),
499
+ _: 1
500
+ }, 8, ["disabled"])) : p("", !0),
501
+ $(q, {
502
+ size: "sm",
503
+ variant: "ghost",
504
+ disabled: v.value || !E(
505
+ J(
506
+ c.value === "year" ? "next-year" : "next-month"
507
+ )
508
+ ),
509
+ "aria-label": y.value.next + (c.value === "year" ? y.value.year : y.value.month),
510
+ onClick: a[5] || (a[5] = (l) => H(c.value === "year" ? "next-year" : "next-month"))
511
+ }, {
512
+ default: R(() => [
513
+ $(b(ba), { size: 16 })
514
+ ]),
515
+ _: 1
516
+ }, 8, ["disabled", "aria-label"]),
517
+ m.controllerType === "button" && c.value === "month" ? (r(), Y(q, {
518
+ key: 2,
519
+ size: "sm",
520
+ variant: "ghost",
521
+ disabled: v.value || !E(J("next-year")),
522
+ "aria-label": y.value.next + y.value.year,
523
+ onClick: a[6] || (a[6] = (l) => H("next-year"))
524
+ }, {
525
+ default: R(() => [
526
+ $(b(pa), { size: 16 })
527
+ ]),
528
+ _: 1
529
+ }, 8, ["disabled", "aria-label"])) : p("", !0)
530
+ ]),
531
+ m.showModeSwitch ? (r(), Y(wa, {
532
+ key: 1,
533
+ "model-value": c.value,
534
+ options: [
535
+ { label: y.value.month, value: "month" },
536
+ { label: y.value.year, value: "year" }
537
+ ],
538
+ size: "sm",
539
+ disabled: v.value,
540
+ "aria-label": I.value ? "日历视图" : "Calendar view",
541
+ "onUpdate:modelValue": a[7] || (a[7] = (l) => be(l))
542
+ }, null, 8, ["model-value", "options", "disabled", "aria-label"])) : p("", !0)
543
+ ]))
544
+ ], !0)
545
+ ])) : p("", !0),
546
+ C("div", {
547
+ class: "hys-ui-calendar-body",
548
+ style: ke({ "--hys-ui-calendar-duration": Se.value + "ms" })
549
+ }, [
550
+ m.loading ? (r(), s("div", Fa, [
551
+ S(e.$slots, "loading", {}, () => [
552
+ $(b(ka), {
553
+ size: 22,
554
+ class: "hys-ui-calendar-spinner"
555
+ }),
556
+ le(g(y.value.loading), 1)
557
+ ], !0)
558
+ ])) : p("", !0),
559
+ $(va, {
560
+ name: Ye.value,
561
+ css: je.value,
562
+ onBeforeLeave: qe
563
+ }, {
564
+ default: R(() => [
565
+ (r(), s("div", {
566
+ key: ye.value,
567
+ class: "hys-ui-calendar-page",
568
+ "data-calendar-panel": ye.value
569
+ }, [
570
+ c.value === "month" ? (r(), s("div", {
571
+ key: 0,
572
+ role: "grid",
573
+ "aria-label": ie.value,
574
+ "aria-readonly": m.readonly || void 0,
575
+ class: "hys-ui-calendar-grid"
576
+ }, [
577
+ C("div", {
578
+ role: "row",
579
+ class: se(["hys-ui-calendar-weekdays", { "hys-ui-calendar--weeks": m.showWeekNumbers }])
580
+ }, [
581
+ m.showWeekNumbers ? (r(), s("span", La, g(y.value.week), 1)) : p("", !0),
582
+ (r(!0), s(W, null, K(Oe.value, (l) => (r(), s("span", {
583
+ key: l,
584
+ role: "columnheader"
585
+ }, g(l), 1))), 128))
586
+ ], 2),
587
+ (r(!0), s(W, null, K(Xe.value, (l, t) => (r(), s("div", {
588
+ key: t,
589
+ role: "row",
590
+ class: se(["hys-ui-calendar-week", { "hys-ui-calendar--weeks": m.showWeekNumbers }])
591
+ }, [
592
+ m.showWeekNumbers ? (r(), s("span", Pa, g(l.number), 1)) : p("", !0),
593
+ (r(!0), s(W, null, K(l.days, (n) => (r(), s("div", {
594
+ key: n.day,
595
+ role: "gridcell",
596
+ "data-date": n.day,
597
+ "aria-selected": n.isSelected,
598
+ "aria-current": n.isToday ? "date" : void 0,
599
+ "aria-disabled": n.disabled || void 0,
600
+ "aria-label": Ue.value.format(new Date(x(n.day) * 864e5)),
601
+ tabindex: n.day === he.value ? 0 : -1,
602
+ class: se(["hys-ui-calendar-cell", {
603
+ "hys-ui-calendar-cell--outside": n.type !== "current-month" && !w.value,
604
+ "hys-ui-calendar-cell--selected": n.isSelected,
605
+ "hys-ui-calendar-cell--today": n.isToday,
606
+ "hys-ui-calendar-cell--disabled": n.disabled,
607
+ "hys-ui-calendar-cell--hidden": !m.showAdjacentDays && n.type !== "current-month" && !w.value
608
+ }]),
609
+ onFocus: (i) => N.value = x(n.day),
610
+ onKeydown: (i) => Re(i, x(n.day)),
611
+ onClick: (i) => ra(x(n.day), i)
612
+ }, [
613
+ S(e.$slots, "date-full-cell", {
614
+ date: n.date,
615
+ data: n
616
+ }, () => {
617
+ var i;
618
+ return [
619
+ C("div", Ea, [
620
+ C("button", {
621
+ type: "button",
622
+ tabindex: "-1",
623
+ disabled: n.disabled,
624
+ "aria-pressed": n.isSelected,
625
+ "aria-readonly": m.readonly || void 0,
626
+ class: "hys-ui-calendar-day",
627
+ onClick: de((h) => Q(x(n.day)), ["stop"])
628
+ }, [
629
+ S(e.$slots, "date", {
630
+ date: n.day,
631
+ day: b(k)(x(n.day)).day
632
+ }, () => [
633
+ le(g(w.value ? n.day.slice(5).replace("-", "/") : b(k)(x(n.day)).day), 1)
634
+ ], !0)
635
+ ], 8, Ha)
636
+ ]),
637
+ S(e.$slots, "date-cell", {
638
+ date: n.date,
639
+ data: n
640
+ }, void 0, !0),
641
+ n.events.length ? (r(), s("div", Ka, [
642
+ (r(!0), s(W, null, K(n.events.slice(0, ue.value), (h, ee) => (r(), s("button", {
643
+ key: h.id + ":" + ee,
644
+ type: "button",
645
+ tabindex: n.day === he.value ? 0 : -1,
646
+ class: "hys-ui-calendar-event",
647
+ disabled: v.value || h.disabled,
648
+ title: [h.time, h.title, h.description].filter(Boolean).join(" · "),
649
+ onClick: de((ia) => Fe(h, n.day), ["stop"])
650
+ }, [
651
+ S(e.$slots, "event", {
652
+ event: h,
653
+ date: n.day
654
+ }, () => [
655
+ C("span", {
656
+ class: "hys-ui-calendar-dot",
657
+ style: ke({ background: h.color })
658
+ }, null, 4),
659
+ h.time ? (r(), s("time", Oa, g(h.time), 1)) : p("", !0),
660
+ C("span", null, g(h.title), 1)
661
+ ], !0)
662
+ ], 8, Ua))), 128)),
663
+ n.events.length > ue.value ? (r(), s("button", {
664
+ key: 0,
665
+ type: "button",
666
+ tabindex: n.day === he.value ? 0 : -1,
667
+ disabled: v.value,
668
+ class: "hys-ui-calendar-more",
669
+ "aria-expanded": b(Ne) && ((i = M.value) == null ? void 0 : i.day) === n.day,
670
+ onClick: de((h) => oa(n, h), ["stop"])
671
+ }, [
672
+ S(e.$slots, "more", {
673
+ date: n.day,
674
+ count: n.events.length - ue.value
675
+ }, () => [
676
+ le("+" + g(n.events.length - ue.value) + " " + g(y.value.more), 1)
677
+ ], !0)
678
+ ], 8, Ia)) : p("", !0)
679
+ ])) : p("", !0)
680
+ ];
681
+ }, !0)
682
+ ], 42, _a))), 128))
683
+ ], 2))), 128))
684
+ ], 8, Ra)) : (r(), s("div", {
685
+ key: 1,
686
+ role: "grid",
687
+ "aria-label": ie.value,
688
+ "aria-readonly": m.readonly || void 0,
689
+ class: "hys-ui-calendar-year-grid"
690
+ }, [
691
+ (r(), s(W, null, K(4, (l) => C("div", {
692
+ key: l,
693
+ role: "row",
694
+ class: "hys-ui-calendar-month-row"
695
+ }, [
696
+ (r(!0), s(W, null, K(G.value.slice((l - 1) * 3, l * 3), (t) => (r(), s("div", {
697
+ key: t.month,
698
+ role: "gridcell",
699
+ "data-month": t.month,
700
+ "aria-selected": t.isSelected,
701
+ "aria-disabled": t.disabled || void 0,
702
+ tabindex: t.month === Qe.value ? 0 : -1,
703
+ class: se(["hys-ui-calendar-cell hys-ui-calendar-month", {
704
+ "hys-ui-calendar-cell--selected": t.isSelected,
705
+ "hys-ui-calendar-cell--today": t.isToday,
706
+ "hys-ui-calendar-cell--disabled": t.disabled
707
+ }]),
708
+ onFocus: (n) => N.value = x(t.day),
709
+ onKeydown: (n) => Re(n, x(t.day), !0),
710
+ onClick: (n) => !n.target.closest(
711
+ "button,a,input,[contenteditable]"
712
+ ) && pe(t)
713
+ }, [
714
+ S(e.$slots, "month-full-cell", {
715
+ date: t.date,
716
+ data: t
717
+ }, () => [
718
+ C("button", {
719
+ type: "button",
720
+ tabindex: "-1",
721
+ disabled: t.disabled,
722
+ class: "hys-ui-calendar-day",
723
+ "aria-pressed": t.isSelected,
724
+ onClick: de((n) => pe(t), ["stop"])
725
+ }, g(Me.value.format(
726
+ new Date(x(t.day) * 864e5)
727
+ )), 9, qa),
728
+ S(e.$slots, "month-cell", {
729
+ date: t.date,
730
+ data: t
731
+ }, () => [
732
+ t.events.length ? (r(), s("span", Xa, g(t.events.length) + " " + g(I.value ? "项日程" : "events"), 1)) : p("", !0)
733
+ ], !0)
734
+ ], !0)
735
+ ], 42, Ya))), 128))
736
+ ])), 64))
737
+ ], 8, ja))
738
+ ], 8, Wa))
739
+ ]),
740
+ _: 3
741
+ }, 8, ["name", "css"])
742
+ ], 4),
743
+ e.$slots.footer ? (r(), s("footer", Za, [
744
+ S(e.$slots, "footer", {
745
+ selected: z.value === void 0 ? void 0 : A(z.value),
746
+ value: A(D.value),
747
+ mode: c.value,
748
+ visibleRange: ve.value
749
+ }, void 0, !0)
750
+ ])) : p("", !0),
751
+ (r(), Y(ya, { to: "body" }, [
752
+ $(b(ma), {
753
+ "popup-transition": o.popupTransition,
754
+ "popup-transition-duration": o.popupTransitionDuration,
755
+ placement: b(ea)
756
+ }, {
757
+ default: R(() => [
758
+ b(Ne) && M.value ? (r(), s("div", Le({
759
+ key: 0,
760
+ id: b(Ke) + "-events",
761
+ ref_key: "popup",
762
+ ref: fe
763
+ }, b(Ce), {
764
+ role: "dialog",
765
+ "aria-label": M.value.day + " " + y.value.more,
766
+ class: "hys-ui-calendar-popup hys-ui-floating-surface",
767
+ style: b(aa)
768
+ }), [
769
+ C("header", null, [
770
+ C("strong", null, g(M.value.day), 1),
771
+ $(q, {
772
+ variant: "ghost",
773
+ size: "sm",
774
+ "aria-label": y.value.close,
775
+ onClick: _
776
+ }, {
777
+ default: R(() => [
778
+ $(b(ga), { size: 15 })
779
+ ]),
780
+ _: 1
781
+ }, 8, ["aria-label"])
782
+ ]),
783
+ C("div", Ja, [
784
+ (r(!0), s(W, null, K(M.value.events, (l, t) => (r(), s("button", {
785
+ key: l.id + ":" + t,
786
+ type: "button",
787
+ class: "hys-ui-calendar-event",
788
+ disabled: v.value || l.disabled,
789
+ onClick: (n) => Fe(l, M.value.day)
790
+ }, [
791
+ S(e.$slots, "event", {
792
+ event: l,
793
+ date: M.value.day
794
+ }, () => [
795
+ C("span", {
796
+ class: "hys-ui-calendar-dot",
797
+ style: ke({ background: l.color })
798
+ }, null, 4),
799
+ l.time ? (r(), s("time", el, g(l.time), 1)) : p("", !0),
800
+ C("span", null, [
801
+ le(g(l.title), 1),
802
+ l.description ? (r(), s("small", al, g(l.description), 1)) : p("", !0)
803
+ ])
804
+ ], !0)
805
+ ], 8, Qa))), 128))
806
+ ])
807
+ ], 16, Ga)) : p("", !0)
808
+ ]),
809
+ _: 3
810
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
811
+ ]))
812
+ ], 16, Va));
813
+ }
814
+ });
2
815
  export {
3
- f as default
816
+ vl as default
4
817
  };