yc-design-vue 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/Affix/index.vue.js +0 -4
  4. package/es/Alert/index.vue.js +0 -4
  5. package/es/Anchor/Anchor.vue.js +0 -4
  6. package/es/Anchor/AnchorLink.vue.js +0 -4
  7. package/es/Anchor/hooks/useContext.js +0 -4
  8. package/es/AutoComplete/index.vue.js +0 -4
  9. package/es/Avatar/Avatar.vue.js +0 -4
  10. package/es/Avatar/AvatarGroup.vue.js +0 -4
  11. package/es/BackTop/index.vue.js +0 -4
  12. package/es/Badge/index.vue.js +0 -4
  13. package/es/Breadcrumb/Breadcrumb.vue.js +0 -4
  14. package/es/Breadcrumb/BreadcrumbItem.vue.js +0 -4
  15. package/es/Breadcrumb/BreadcrumbMore.vue.js +0 -4
  16. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +0 -4
  17. package/es/Button/hooks/useContext.js +0 -4
  18. package/es/Calendar/Calendar.vue.js +30 -49
  19. package/es/Calendar/CalendarMonth.vue.d.ts +4 -6
  20. package/es/Calendar/CalendarMonth.vue.js +34 -43
  21. package/es/Calendar/CalendarYear.vue.d.ts +3 -4
  22. package/es/Calendar/CalendarYear.vue.js +19 -38
  23. package/es/Calendar/hooks/useCalendar.d.ts +7 -0
  24. package/es/Calendar/hooks/useCalendar.js +36 -0
  25. package/es/Card/Card.vue.js +0 -4
  26. package/es/Card/CardMeta.vue.js +0 -4
  27. package/es/Carousel/Carousel.vue.js +0 -4
  28. package/es/Carousel/CarouselArrow.vue.js +0 -4
  29. package/es/Carousel/CarouselIndicator.vue.js +0 -4
  30. package/es/Carousel/hooks/useContext.js +0 -4
  31. package/es/Cascader/Cascader.vue.js +0 -4
  32. package/es/Cascader/CascaderIcon.vue.js +0 -4
  33. package/es/Cascader/CascaderOption.vue.js +0 -4
  34. package/es/Cascader/hooks/useContext.js +0 -4
  35. package/es/Checkbox/Checkbox.vue.js +0 -4
  36. package/es/Checkbox/hooks/useContext.js +0 -4
  37. package/es/Collapse/CollapseItem.vue.js +0 -4
  38. package/es/Collapse/hooks/useContext.js +0 -4
  39. package/es/ColorPicker/ColorControl.vue.js +0 -4
  40. package/es/ColorPicker/ColorInput.vue.js +0 -4
  41. package/es/ColorPicker/ColorList.vue.js +0 -4
  42. package/es/ColorPicker/ColorPalette.vue.js +0 -4
  43. package/es/ColorPicker/ColorPanel.vue.js +0 -4
  44. package/es/ColorPicker/hooks/useContext.js +0 -4
  45. package/es/Comment/hooks/useContext.js +0 -4
  46. package/es/Comment/index.vue.js +0 -4
  47. package/es/ConfigProvider/index.vue.js +0 -4
  48. package/es/DatePicker/YcMonthPicker.vue.d.ts +2 -0
  49. package/es/DatePicker/YcMonthPicker.vue.js +2 -6
  50. package/es/DatePicker/YcWeekPicker.vue.d.ts +2 -0
  51. package/es/DatePicker/YcWeekPicker.vue.js +1 -1
  52. package/es/DatePicker/YcWeekPicker.vue2.js +3 -7
  53. package/es/DatePicker/YcYearPicker.vue.d.ts +2 -0
  54. package/es/DatePicker/YcYearPicker.vue.js +2 -6
  55. package/es/DatePicker/component/PickerInput.vue2.js +0 -4
  56. package/es/DatePicker/component/PickerPanel.vue.js +0 -4
  57. package/es/DatePicker/hooks/userPicker.js +0 -4
  58. package/es/Descriptions/ReuseItem.vue.js +0 -4
  59. package/es/Descriptions/ReuseTd.vue.js +0 -4
  60. package/es/Descriptions/hooks/useContext.js +0 -4
  61. package/es/Divider/index.vue.js +0 -4
  62. package/es/Drawer/Drawer.vue.js +0 -4
  63. package/es/Drawer/DrawerService.vue.js +0 -4
  64. package/es/Dropdown/Dropdown.vue.js +0 -4
  65. package/es/Dropdown/DropdownButton.vue.js +0 -4
  66. package/es/Dropdown/Dsubmenu.vue.js +0 -4
  67. package/es/Dropdown/hooks/useContext.js +0 -4
  68. package/es/Empty/index.vue.js +0 -4
  69. package/es/Grid/Grid.vue.js +0 -4
  70. package/es/Grid/GridCol.vue.js +0 -4
  71. package/es/Grid/GridItem.vue.js +0 -4
  72. package/es/Grid/GridRow.vue.js +0 -4
  73. package/es/Grid/hooks/useContext.js +0 -4
  74. package/es/Image/Image.vue.js +0 -4
  75. package/es/Image/ImagePreview.vue.js +0 -4
  76. package/es/Image/ImagePreviewArrow.vue.js +0 -4
  77. package/es/Image/ImagePreviewGroup.vue.js +0 -4
  78. package/es/Image/ImagePreviewToolbar.vue.js +0 -4
  79. package/es/Image/hooks/useContext.js +0 -4
  80. package/es/Input/Input.vue.js +0 -4
  81. package/es/Input/InputPassword.vue.js +0 -4
  82. package/es/Input/InputSearch.vue.js +0 -4
  83. package/es/Input/hooks/useLimitedInput.js +0 -4
  84. package/es/InputNumber/InputNumber.vue.js +0 -4
  85. package/es/InputNumber/InputOperaBtn.vue.js +0 -4
  86. package/es/InputTag/index.vue.js +0 -4
  87. package/es/Layout/Layout.vue.js +0 -4
  88. package/es/Layout/LayoutSider.vue.js +0 -4
  89. package/es/Layout/hooks/useSiderContext.js +0 -4
  90. package/es/Link/index.vue.js +0 -4
  91. package/es/List/List.vue.js +0 -4
  92. package/es/List/ListVirtual.vue.js +0 -4
  93. package/es/List/hooks/useScrollReach.js +0 -4
  94. package/es/Mention/index.vue.js +0 -4
  95. package/es/Menu/Menu.vue.js +0 -4
  96. package/es/Menu/MenuEllipsis.vue.js +0 -4
  97. package/es/Menu/MenuItem.vue.js +0 -4
  98. package/es/Menu/MenuItemGroup.vue.js +0 -4
  99. package/es/Menu/SubMenu.vue.js +0 -4
  100. package/es/Menu/hooks/useCalcMaxMenuItems.js +0 -4
  101. package/es/Menu/hooks/useContext.js +0 -4
  102. package/es/Message/Message.vue.js +0 -4
  103. package/es/Message/index.js +0 -4
  104. package/es/Modal/Modal.vue.js +0 -4
  105. package/es/Modal/ModalService.vue.js +0 -4
  106. package/es/Modal/hooks/useModalClose.js +0 -4
  107. package/es/Modal/hooks/useModalDraggable.js +0 -4
  108. package/es/Modal/hooks/useOnBeforeClose.js +0 -4
  109. package/es/Notification/Notification.vue.js +0 -4
  110. package/es/Notification/index.js +0 -4
  111. package/es/OverflowList/index.vue.js +0 -4
  112. package/es/PageHeader/index.vue.js +0 -4
  113. package/es/Pagination/Pagination.vue.js +0 -4
  114. package/es/Pagination/PaginationItem.vue.js +0 -4
  115. package/es/Pagination/hooks/useContext.js +0 -4
  116. package/es/Popconfirm/index.vue.js +0 -4
  117. package/es/Popover/index.vue.js +0 -4
  118. package/es/Progress/Progress.vue.js +0 -4
  119. package/es/Progress/ProgressCircle.vue.js +0 -4
  120. package/es/Progress/ProgressLine.vue.js +0 -4
  121. package/es/Progress/ProgressSteps.vue.js +0 -4
  122. package/es/Radio/Radio.vue.js +0 -4
  123. package/es/Radio/hooks/useContext.js +0 -4
  124. package/es/Rate/index.vue.js +0 -4
  125. package/es/ResizeBox/index.vue.js +0 -4
  126. package/es/Scrollbar/Scrollbar.vue.js +0 -4
  127. package/es/Scrollbar/ScrollbarTrack.vue.js +0 -4
  128. package/es/Select/Option.vue.js +0 -4
  129. package/es/Select/Select.vue.js +0 -4
  130. package/es/Select/SelectIcon.vue.js +0 -4
  131. package/es/Select/SelectRealList.vue.js +0 -4
  132. package/es/Select/SelectView.vue.js +0 -4
  133. package/es/Select/SelectVirtualList.vue.js +0 -4
  134. package/es/Select/hooks/useContext.js +0 -4
  135. package/es/Select/hooks/useSelectHotkeys.js +0 -4
  136. package/es/Select/hooks/useSelectOptions.js +0 -4
  137. package/es/Skeleton/SkeletonLine.vue.js +0 -4
  138. package/es/Skeleton/SkeletonShape.vue.js +0 -4
  139. package/es/Slider/SliderBtn.vue.js +0 -4
  140. package/es/Slider/hooks/useContext.js +0 -4
  141. package/es/Slider/hooks/useSliderDraggable.js +0 -4
  142. package/es/Space/index.vue.js +0 -4
  143. package/es/Spin/index.vue.js +0 -4
  144. package/es/Split/index.vue.js +0 -4
  145. package/es/Statistic/Countdown.vue.js +0 -4
  146. package/es/Statistic/Statistic.vue.js +0 -4
  147. package/es/Steps/Step.vue.js +0 -4
  148. package/es/Steps/hooks/useContext.js +0 -4
  149. package/es/Switch/index.vue.js +0 -4
  150. package/es/Tabs/TabButton.vue.js +0 -4
  151. package/es/Tabs/TabPane.vue.js +0 -4
  152. package/es/Tabs/Tabs.vue.js +0 -4
  153. package/es/Tabs/TabsNavInk.vue.js +0 -4
  154. package/es/Tabs/TabsTab.vue.js +0 -4
  155. package/es/Tabs/hooks/useContext.js +0 -4
  156. package/es/Tabs/hooks/useTabsScroll.js +0 -4
  157. package/es/Tag/index.vue.js +0 -4
  158. package/es/Textarea/hooks/useTextareaHeight.js +0 -4
  159. package/es/Textarea/index.vue.js +0 -4
  160. package/es/TimePicker/TimePicker.vue.js +0 -4
  161. package/es/TimePicker/TimePickerPanel.vue.js +0 -4
  162. package/es/TimePicker/hooks/useContext.js +0 -4
  163. package/es/Timeline/TimelineItemPending.vue.js +0 -4
  164. package/es/Timeline/hooks/useContext.js +0 -4
  165. package/es/Tooltip/index.vue.js +0 -4
  166. package/es/Transfer/Transfer.vue.js +0 -4
  167. package/es/Transfer/TransferPanel.vue.js +0 -4
  168. package/es/Transfer/hooks/useContext.js +0 -4
  169. package/es/Trigger/hooks/useContext.js +0 -4
  170. package/es/Trigger/hooks/useTriggerPosition.js +0 -4
  171. package/es/Trigger/hooks/useTriggerVisible.js +0 -4
  172. package/es/Trigger/index.vue.js +0 -4
  173. package/es/Typography/TypographyBase.vue.js +0 -4
  174. package/es/Upload/UploadButton.vue.js +0 -4
  175. package/es/Upload/UploadDrag.vue.js +0 -4
  176. package/es/Upload/UploadFileList.vue.js +0 -4
  177. package/es/Upload/UploadPictureCard.vue.js +0 -4
  178. package/es/Upload/hooks/useContext.js +0 -4
  179. package/es/Upload/hooks/useUpload.js +0 -4
  180. package/es/VerificationCode/index.vue.js +0 -4
  181. package/es/Watermark/index.vue.js +0 -4
  182. package/es/_shared/components/ExpandTransition/index.vue2.js +0 -4
  183. package/es/_shared/components/Icon/index.vue3.js +0 -4
  184. package/es/_shared/components/IconButton/index.vue.js +0 -4
  185. package/es/_shared/constants/index.js +0 -4
  186. package/es/_shared/icons/IconArrowDown.vue.js +0 -4
  187. package/es/_shared/icons/IconArrowRight.vue.js +0 -4
  188. package/es/_shared/icons/IconCalendar.vue2.js +0 -4
  189. package/es/_shared/icons/IconCheck.vue.js +0 -4
  190. package/es/_shared/icons/IconCheckboxChecked.vue.js +0 -4
  191. package/es/_shared/icons/IconClose.vue.js +0 -4
  192. package/es/_shared/icons/IconCopy.vue2.js +0 -4
  193. package/es/_shared/icons/IconDelete.vue2.js +0 -4
  194. package/es/_shared/icons/IconDoubleLeft.vue.js +0 -4
  195. package/es/_shared/icons/IconDoubleRight.vue.js +0 -4
  196. package/es/_shared/icons/IconDragDot.vue.js +0 -4
  197. package/es/_shared/icons/IconEdit.vue2.js +0 -4
  198. package/es/_shared/icons/IconEmpty.vue.js +0 -4
  199. package/es/_shared/icons/IconError.vue.js +0 -4
  200. package/es/_shared/icons/IconExclamation.vue2.js +0 -4
  201. package/es/_shared/icons/IconEyeClose.vue.js +0 -4
  202. package/es/_shared/icons/IconEyeOpen.vue.js +0 -4
  203. package/es/_shared/icons/IconFaceSmile.vue.js +0 -4
  204. package/es/_shared/icons/IconFile.vue2.js +0 -4
  205. package/es/_shared/icons/IconFullScreen.vue2.js +0 -4
  206. package/es/_shared/icons/IconImageClose.vue.js +0 -4
  207. package/es/_shared/icons/IconInfo.vue.js +0 -4
  208. package/es/_shared/icons/IconInfoLine.vue.js +0 -4
  209. package/es/_shared/icons/IconLink.vue.js +0 -4
  210. package/es/_shared/icons/IconLoading.vue.js +0 -4
  211. package/es/_shared/icons/IconMenuFold.vue.js +0 -4
  212. package/es/_shared/icons/IconMenuUnfold.vue.js +0 -4
  213. package/es/_shared/icons/IconMinus.vue2.js +0 -4
  214. package/es/_shared/icons/IconMore.vue.js +0 -4
  215. package/es/_shared/icons/IconOriginSize.vue2.js +0 -4
  216. package/es/_shared/icons/IconPlus.vue.js +0 -4
  217. package/es/_shared/icons/IconRight.vue.js +0 -4
  218. package/es/_shared/icons/IconRotateLeft.vue2.js +0 -4
  219. package/es/_shared/icons/IconRotateRight.vue2.js +0 -4
  220. package/es/_shared/icons/IconSearch.vue.js +0 -4
  221. package/es/_shared/icons/IconSeparator.vue2.js +0 -4
  222. package/es/_shared/icons/IconStar.vue.js +0 -4
  223. package/es/_shared/icons/IconSuccess.vue.js +0 -4
  224. package/es/_shared/icons/IconTime.vue.js +0 -4
  225. package/es/_shared/icons/IconToTop.vue.js +0 -4
  226. package/es/_shared/icons/IconUpload.vue2.js +0 -4
  227. package/es/_shared/icons/IconWarning.vue.js +0 -4
  228. package/es/_shared/icons/IconZoomIn.vue2.js +0 -4
  229. package/es/_shared/icons/IconZoomOut.vue2.js +0 -4
  230. package/es/_shared/utils/color.js +0 -4
  231. package/es/_shared/utils/dependencies.d.ts +0 -4
  232. package/es/_shared/utils/dom.js +0 -4
  233. package/es/_shared/utils/locale.d.ts +0 -5
  234. package/es/_shared/utils/time.d.ts +0 -8
  235. package/es/_shared/utils/time.js +0 -26
  236. package/es/index.d.ts +12 -0
  237. package/es/style.css +1 -1
  238. package/lib/Affix/index.vue.js +1 -1
  239. package/lib/Alert/index.vue.js +1 -1
  240. package/lib/Anchor/Anchor.vue.js +1 -1
  241. package/lib/Anchor/AnchorLink.vue.js +1 -1
  242. package/lib/Anchor/hooks/useContext.js +1 -1
  243. package/lib/AutoComplete/index.vue.js +1 -1
  244. package/lib/Avatar/Avatar.vue.js +1 -1
  245. package/lib/Avatar/AvatarGroup.vue.js +1 -1
  246. package/lib/BackTop/index.vue.js +1 -1
  247. package/lib/Badge/index.vue.js +1 -1
  248. package/lib/Breadcrumb/Breadcrumb.vue.js +1 -1
  249. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  250. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  251. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  252. package/lib/Button/hooks/useContext.js +1 -1
  253. package/lib/Calendar/Calendar.vue.js +1 -1
  254. package/lib/Calendar/CalendarMonth.vue.d.ts +4 -6
  255. package/lib/Calendar/CalendarMonth.vue.js +1 -1
  256. package/lib/Calendar/CalendarYear.vue.d.ts +3 -4
  257. package/lib/Calendar/CalendarYear.vue.js +1 -1
  258. package/lib/Calendar/hooks/useCalendar.d.ts +7 -0
  259. package/lib/Calendar/hooks/useCalendar.js +1 -0
  260. package/lib/Card/Card.vue.js +1 -1
  261. package/lib/Card/CardMeta.vue.js +1 -1
  262. package/lib/Carousel/Carousel.vue.js +1 -1
  263. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  264. package/lib/Carousel/CarouselIndicator.vue.js +1 -1
  265. package/lib/Carousel/hooks/useContext.js +1 -1
  266. package/lib/Cascader/Cascader.vue.js +1 -1
  267. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  268. package/lib/Cascader/CascaderOption.vue.js +1 -1
  269. package/lib/Cascader/hooks/useContext.js +1 -1
  270. package/lib/Checkbox/Checkbox.vue.js +1 -1
  271. package/lib/Checkbox/hooks/useContext.js +1 -1
  272. package/lib/Collapse/CollapseItem.vue.js +1 -1
  273. package/lib/Collapse/hooks/useContext.js +1 -1
  274. package/lib/ColorPicker/ColorControl.vue.js +1 -1
  275. package/lib/ColorPicker/ColorInput.vue.js +1 -1
  276. package/lib/ColorPicker/ColorList.vue.js +1 -1
  277. package/lib/ColorPicker/ColorPalette.vue.js +1 -1
  278. package/lib/ColorPicker/ColorPanel.vue.js +1 -1
  279. package/lib/ColorPicker/hooks/useContext.js +1 -1
  280. package/lib/Comment/hooks/useContext.js +1 -1
  281. package/lib/Comment/index.vue.js +1 -1
  282. package/lib/ConfigProvider/index.vue.js +1 -1
  283. package/lib/DatePicker/YcMonthPicker.vue.d.ts +2 -0
  284. package/lib/DatePicker/YcMonthPicker.vue.js +1 -1
  285. package/lib/DatePicker/YcWeekPicker.vue.d.ts +2 -0
  286. package/lib/DatePicker/YcWeekPicker.vue.js +1 -1
  287. package/lib/DatePicker/YcWeekPicker.vue2.js +1 -1
  288. package/lib/DatePicker/YcYearPicker.vue.d.ts +2 -0
  289. package/lib/DatePicker/YcYearPicker.vue.js +1 -1
  290. package/lib/DatePicker/component/PickerInput.vue2.js +1 -1
  291. package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
  292. package/lib/DatePicker/hooks/userPicker.js +1 -1
  293. package/lib/Descriptions/ReuseItem.vue.js +1 -1
  294. package/lib/Descriptions/ReuseTd.vue.js +1 -1
  295. package/lib/Descriptions/hooks/useContext.js +1 -1
  296. package/lib/Divider/index.vue.js +1 -1
  297. package/lib/Drawer/Drawer.vue.js +1 -1
  298. package/lib/Drawer/DrawerService.vue.js +1 -1
  299. package/lib/Dropdown/Dropdown.vue.js +1 -1
  300. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  301. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  302. package/lib/Dropdown/hooks/useContext.js +1 -1
  303. package/lib/Empty/index.vue.js +1 -1
  304. package/lib/Grid/Grid.vue.js +1 -1
  305. package/lib/Grid/GridCol.vue.js +1 -1
  306. package/lib/Grid/GridItem.vue.js +1 -1
  307. package/lib/Grid/GridRow.vue.js +1 -1
  308. package/lib/Grid/hooks/useContext.js +1 -1
  309. package/lib/Image/Image.vue.js +1 -1
  310. package/lib/Image/ImagePreview.vue.js +1 -1
  311. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  312. package/lib/Image/ImagePreviewGroup.vue.js +1 -1
  313. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  314. package/lib/Image/hooks/useContext.js +1 -1
  315. package/lib/Input/Input.vue.js +1 -1
  316. package/lib/Input/InputPassword.vue.js +1 -1
  317. package/lib/Input/InputSearch.vue.js +1 -1
  318. package/lib/Input/hooks/useLimitedInput.js +1 -1
  319. package/lib/InputNumber/InputNumber.vue.js +1 -1
  320. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  321. package/lib/InputTag/index.vue.js +1 -1
  322. package/lib/Layout/Layout.vue.js +1 -1
  323. package/lib/Layout/LayoutSider.vue.js +1 -1
  324. package/lib/Layout/hooks/useSiderContext.js +1 -1
  325. package/lib/Link/index.vue.js +1 -1
  326. package/lib/List/List.vue.js +1 -1
  327. package/lib/List/ListVirtual.vue.js +1 -1
  328. package/lib/List/hooks/useScrollReach.js +1 -1
  329. package/lib/Mention/index.vue.js +1 -1
  330. package/lib/Menu/Menu.vue.js +1 -1
  331. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  332. package/lib/Menu/MenuItem.vue.js +1 -1
  333. package/lib/Menu/MenuItemGroup.vue.js +1 -1
  334. package/lib/Menu/SubMenu.vue.js +1 -1
  335. package/lib/Menu/hooks/useCalcMaxMenuItems.js +1 -1
  336. package/lib/Menu/hooks/useContext.js +1 -1
  337. package/lib/Message/Message.vue.js +1 -1
  338. package/lib/Message/index.js +1 -1
  339. package/lib/Modal/Modal.vue.js +1 -1
  340. package/lib/Modal/ModalService.vue.js +1 -1
  341. package/lib/Modal/hooks/useModalClose.js +1 -1
  342. package/lib/Modal/hooks/useModalDraggable.js +1 -1
  343. package/lib/Modal/hooks/useOnBeforeClose.js +1 -1
  344. package/lib/Notification/Notification.vue.js +1 -1
  345. package/lib/Notification/index.js +1 -1
  346. package/lib/OverflowList/index.vue.js +1 -1
  347. package/lib/PageHeader/index.vue.js +1 -1
  348. package/lib/Pagination/Pagination.vue.js +1 -1
  349. package/lib/Pagination/PaginationItem.vue.js +1 -1
  350. package/lib/Pagination/hooks/useContext.js +1 -1
  351. package/lib/Popconfirm/index.vue.js +1 -1
  352. package/lib/Popover/index.vue.js +1 -1
  353. package/lib/Progress/Progress.vue.js +1 -1
  354. package/lib/Progress/ProgressCircle.vue.js +1 -1
  355. package/lib/Progress/ProgressLine.vue.js +1 -1
  356. package/lib/Progress/ProgressSteps.vue.js +1 -1
  357. package/lib/Radio/Radio.vue.js +1 -1
  358. package/lib/Radio/hooks/useContext.js +1 -1
  359. package/lib/Rate/index.vue.js +1 -1
  360. package/lib/ResizeBox/index.vue.js +1 -1
  361. package/lib/Scrollbar/Scrollbar.vue.js +1 -1
  362. package/lib/Scrollbar/ScrollbarTrack.vue.js +1 -1
  363. package/lib/Select/Option.vue.js +1 -1
  364. package/lib/Select/Select.vue.js +1 -1
  365. package/lib/Select/SelectIcon.vue.js +1 -1
  366. package/lib/Select/SelectRealList.vue.js +1 -1
  367. package/lib/Select/SelectView.vue.js +1 -1
  368. package/lib/Select/SelectVirtualList.vue.js +1 -1
  369. package/lib/Select/hooks/useContext.js +1 -1
  370. package/lib/Select/hooks/useSelectHotkeys.js +1 -1
  371. package/lib/Select/hooks/useSelectOptions.js +1 -1
  372. package/lib/Skeleton/SkeletonLine.vue.js +1 -1
  373. package/lib/Skeleton/SkeletonShape.vue.js +1 -1
  374. package/lib/Slider/SliderBtn.vue.js +1 -1
  375. package/lib/Slider/hooks/useContext.js +1 -1
  376. package/lib/Slider/hooks/useSliderDraggable.js +1 -1
  377. package/lib/Space/index.vue.js +1 -1
  378. package/lib/Spin/index.vue.js +1 -1
  379. package/lib/Split/index.vue.js +1 -1
  380. package/lib/Statistic/Countdown.vue.js +1 -1
  381. package/lib/Statistic/Statistic.vue.js +1 -1
  382. package/lib/Steps/Step.vue.js +1 -1
  383. package/lib/Steps/hooks/useContext.js +1 -1
  384. package/lib/Switch/index.vue.js +1 -1
  385. package/lib/Tabs/TabButton.vue.js +1 -1
  386. package/lib/Tabs/TabPane.vue.js +1 -1
  387. package/lib/Tabs/Tabs.vue.js +1 -1
  388. package/lib/Tabs/TabsNavInk.vue.js +1 -1
  389. package/lib/Tabs/TabsTab.vue.js +1 -1
  390. package/lib/Tabs/hooks/useContext.js +1 -1
  391. package/lib/Tabs/hooks/useTabsScroll.js +1 -1
  392. package/lib/Tag/index.vue.js +1 -1
  393. package/lib/Textarea/hooks/useTextareaHeight.js +1 -1
  394. package/lib/Textarea/index.vue.js +1 -1
  395. package/lib/TimePicker/TimePicker.vue.js +1 -1
  396. package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
  397. package/lib/TimePicker/hooks/useContext.js +1 -1
  398. package/lib/Timeline/TimelineItemPending.vue.js +1 -1
  399. package/lib/Timeline/hooks/useContext.js +1 -1
  400. package/lib/Tooltip/index.vue.js +1 -1
  401. package/lib/Transfer/Transfer.vue.js +1 -1
  402. package/lib/Transfer/TransferPanel.vue.js +1 -1
  403. package/lib/Transfer/hooks/useContext.js +1 -1
  404. package/lib/Trigger/hooks/useContext.js +1 -1
  405. package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
  406. package/lib/Trigger/hooks/useTriggerVisible.js +1 -1
  407. package/lib/Trigger/index.vue.js +1 -1
  408. package/lib/Typography/TypographyBase.vue.js +1 -1
  409. package/lib/Upload/UploadButton.vue.js +1 -1
  410. package/lib/Upload/UploadDrag.vue.js +1 -1
  411. package/lib/Upload/UploadFileList.vue.js +1 -1
  412. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  413. package/lib/Upload/hooks/useContext.js +1 -1
  414. package/lib/Upload/hooks/useUpload.js +1 -1
  415. package/lib/VerificationCode/index.vue.js +1 -1
  416. package/lib/Watermark/index.vue.js +1 -1
  417. package/lib/_shared/components/ExpandTransition/index.vue2.js +1 -1
  418. package/lib/_shared/components/Icon/index.vue3.js +1 -1
  419. package/lib/_shared/components/IconButton/index.vue.js +1 -1
  420. package/lib/_shared/constants/index.js +1 -1
  421. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  422. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  423. package/lib/_shared/icons/IconCalendar.vue2.js +1 -1
  424. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  425. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  426. package/lib/_shared/icons/IconClose.vue.js +1 -1
  427. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  428. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  429. package/lib/_shared/icons/IconDoubleLeft.vue.js +1 -1
  430. package/lib/_shared/icons/IconDoubleRight.vue.js +1 -1
  431. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  432. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  433. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  434. package/lib/_shared/icons/IconError.vue.js +1 -1
  435. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  436. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  437. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  438. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  439. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  440. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  441. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  442. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  443. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  444. package/lib/_shared/icons/IconLink.vue.js +1 -1
  445. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  446. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  447. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  448. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  449. package/lib/_shared/icons/IconMore.vue.js +1 -1
  450. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  451. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  452. package/lib/_shared/icons/IconRight.vue.js +1 -1
  453. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  454. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  455. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  456. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  457. package/lib/_shared/icons/IconStar.vue.js +1 -1
  458. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  459. package/lib/_shared/icons/IconTime.vue.js +1 -1
  460. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  461. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  462. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  463. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  464. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  465. package/lib/_shared/utils/color.js +1 -1
  466. package/lib/_shared/utils/dependencies.d.ts +0 -4
  467. package/lib/_shared/utils/dom.js +1 -1
  468. package/lib/_shared/utils/locale.d.ts +0 -5
  469. package/lib/_shared/utils/time.d.ts +0 -8
  470. package/lib/_shared/utils/time.js +1 -1
  471. package/lib/index.d.ts +12 -0
  472. package/lib/style.css +1 -1
  473. package/package.json +1 -1
@@ -3,10 +3,6 @@ import { useResizeObserver, useEventListener } from "../node_modules/@vueuse/cor
3
3
  import "../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../node_modules/dayjs/dayjs.min.js";
5
5
  import "../node_modules/tinycolor2/esm/tinycolor.js";
6
- import "../node_modules/dayjs/plugin/duration.js";
7
- import "../node_modules/dayjs/plugin/toObject.js";
8
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
6
  import { findFirstScrollableParent, getElement, throttleByRaf, valueToPx } from "../_shared/utils/dom.js";
11
7
  import { isUndefined } from "../_shared/utils/is.js";
12
8
  import "../_shared/utils/locale.js";
@@ -5,10 +5,6 @@ import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
5
5
  import "../node_modules/b-tween/dist/b-tween.es.js";
6
6
  import "../node_modules/dayjs/dayjs.min.js";
7
7
  import "../node_modules/tinycolor2/esm/tinycolor.js";
8
- import "../node_modules/dayjs/plugin/duration.js";
9
- import "../node_modules/dayjs/plugin/toObject.js";
10
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
11
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
12
8
  import "../_shared/utils/dom.js";
13
9
  import "../_shared/utils/locale.js";
14
10
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, ref, computed, onMounted, createElementBlock, openBloc
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import { valueToPx } from "../_shared/utils/dom.js";
10
6
  import "../_shared/utils/locale.js";
11
7
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, useSlots, toRefs, createElementBlock, openBlock, norma
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import { getElement } from "../_shared/utils/dom.js";
10
6
  import { isNumber } from "../_shared/utils/is.js";
11
7
  import "../_shared/utils/locale.js";
@@ -2,10 +2,6 @@ import { toRefs, useSlots, ref, computed, provide, inject } from "vue";
2
2
  import "../../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../../node_modules/dayjs/dayjs.min.js";
4
4
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../../node_modules/dayjs/plugin/duration.js";
6
- import "../../node_modules/dayjs/plugin/toObject.js";
7
- import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import { findFirstScrollableParent, getElement } from "../../_shared/utils/dom.js";
10
6
  import { isUndefined } from "../../_shared/utils/is.js";
11
7
  import "../../_shared/utils/locale.js";
@@ -2,10 +2,6 @@ import { defineComponent, useSlots, toRefs, ref, createBlock, openBlock, unref,
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import { isObject } from "../_shared/utils/is.js";
11
7
  import { useControlValue } from "../_shared/utils/hooks.js";
@@ -3,10 +3,6 @@ import { useResizeObserver } from "../node_modules/@vueuse/core/index.js";
3
3
  import "../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../node_modules/dayjs/dayjs.min.js";
5
5
  import "../node_modules/tinycolor2/esm/tinycolor.js";
6
- import "../node_modules/dayjs/plugin/duration.js";
7
- import "../node_modules/dayjs/plugin/toObject.js";
8
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
6
  import { valueToPx } from "../_shared/utils/dom.js";
11
7
  import "../_shared/utils/locale.js";
12
8
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, useSlots, toRefs, computed, createElementBlock, openBl
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import { valueToPx } from "../_shared/utils/dom.js";
10
6
  import "../_shared/utils/locale.js";
11
7
  import "../_shared/utils/time.js";
@@ -3,10 +3,6 @@ import { useEventListener } from "../node_modules/@vueuse/core/index.js";
3
3
  import Tween from "../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../node_modules/dayjs/dayjs.min.js";
5
5
  import "../node_modules/tinycolor2/esm/tinycolor.js";
6
- import "../node_modules/dayjs/plugin/duration.js";
7
- import "../node_modules/dayjs/plugin/toObject.js";
8
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
6
  import { findFirstScrollableParent, getElement } from "../_shared/utils/dom.js";
11
7
  import { isUndefined } from "../_shared/utils/is.js";
12
8
  import "../_shared/utils/locale.js";
@@ -3,10 +3,6 @@ import { TAG_PRESET_COLORS } from "../_shared/constants/index.js";
3
3
  import "../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../node_modules/dayjs/dayjs.min.js";
5
5
  import "../node_modules/tinycolor2/esm/tinycolor.js";
6
- import "../node_modules/dayjs/plugin/duration.js";
7
- import "../node_modules/dayjs/plugin/toObject.js";
8
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
6
  import { valueToPx } from "../_shared/utils/dom.js";
11
7
  import "../_shared/utils/locale.js";
12
8
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, useSlots, toRefs, computed, createElementBlock, openBl
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import { isString } from "../_shared/utils/is.js";
11
7
  import "../_shared/utils/locale.js";
@@ -3,10 +3,6 @@ import _sfc_main$1 from "../_shared/icons/IconArrowDown.vue.js";
3
3
  import "../node_modules/b-tween/dist/b-tween.es.js";
4
4
  import "../node_modules/dayjs/dayjs.min.js";
5
5
  import "../node_modules/tinycolor2/esm/tinycolor.js";
6
- import "../node_modules/dayjs/plugin/duration.js";
7
- import "../node_modules/dayjs/plugin/toObject.js";
8
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
9
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
10
6
  import "../_shared/utils/dom.js";
11
7
  import "../_shared/utils/locale.js";
12
8
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, createBlock, openBlock, withCtx, resolveDynamicCompone
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import "../_shared/utils/locale.js";
11
7
  import "../_shared/utils/time.js";
@@ -2,10 +2,6 @@ import { defineComponent, computed, createElementBlock, openBlock, createBlock,
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import { isUndefined } from "../_shared/utils/is.js";
11
7
  import "../_shared/utils/locale.js";
@@ -2,10 +2,6 @@ import { toRefs, provide, inject, ref, computed } from "vue";
2
2
  import "../../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../../node_modules/dayjs/dayjs.min.js";
4
4
  import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../../node_modules/dayjs/plugin/duration.js";
6
- import "../../node_modules/dayjs/plugin/toObject.js";
7
- import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../../_shared/utils/dom.js";
10
6
  import { getGlobalConfig } from "../../_shared/utils/global-config.js";
11
7
  import "../../_shared/utils/locale.js";
@@ -2,10 +2,6 @@ import { defineComponent, useSlots, toRefs, ref, computed, watch, createElementB
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import dayjs from "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import { useControlValue } from "../_shared/utils/hooks.js";
11
7
  import { useI18n } from "../_shared/utils/locale.js";
@@ -52,6 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
48
  defaultMode,
53
49
  modes: _modes
54
50
  } = toRefs(props);
51
+ const { t } = useI18n();
55
52
  const computedValue = useControlValue(
56
53
  modelValue,
57
54
  defaultValue.value,
@@ -60,26 +57,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
57
  emits("change", val);
61
58
  }
62
59
  );
63
- const { t } = useI18n();
64
- const recordDate = ref({});
65
- const recordDateFormat = computed(() => {
66
- const { year, month } = recordDate.value;
67
- return dayjs().set("year", year).set("month", month).format(t("calendar.formatMonth"));
60
+ const curYear = ref(0);
61
+ const curMonth = ref(0);
62
+ const formatValue = computed(() => {
63
+ return dayjs().set("year", curYear.value).set("month", curMonth.value).format(t("calendar.formatMonth"));
68
64
  });
69
- watch(
70
- () => computedValue.value,
71
- (val) => {
72
- const date = val ? dayjs(val) : dayjs();
73
- recordDate.value = {
74
- year: date.year(),
75
- month: date.month() + 1,
76
- day: date.date()
77
- };
78
- },
79
- {
80
- immediate: true
81
- }
82
- );
83
65
  const computedMode = useControlValue(
84
66
  mode,
85
67
  defaultMode.value,
@@ -96,29 +78,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
78
  };
97
79
  });
98
80
  });
99
- const handleClick = (col) => {
100
- computedValue.value = new Date(col.fullDate);
101
- };
102
81
  const handleDateChange = (type) => {
103
82
  if (type == "today") {
104
83
  computedValue.value = /* @__PURE__ */ new Date();
105
84
  return;
106
85
  }
107
- const { year, month } = recordDate.value;
108
- if (type == "next") {
109
- const tempMonth = month + 1 > 12 ? 1 : month + 1;
110
- const tempYear = month + 1 > 12 || computedMode.value == "year" ? 1 : 0;
111
- recordDate.value.year = year + tempYear;
112
- if (computedMode.value == "year") return;
113
- recordDate.value.month = tempMonth;
114
- } else {
115
- const tempMonth = month - 1 < 1 ? 12 : month - 1;
116
- const tempYear = month - 1 < 1 || computedMode.value == "year" ? -1 : 0;
117
- recordDate.value.year = year + tempYear;
118
- if (computedMode.value == "year") return;
119
- recordDate.value.month = tempMonth;
120
- }
86
+ let date = dayjs().set("year", curYear.value).set("month", curMonth.value);
87
+ date = type == "next" ? date.add(1, "month") : date.subtract(1, "month");
88
+ curYear.value = date.year();
89
+ curMonth.value = date.month();
121
90
  };
91
+ watch(
92
+ () => computedValue.value,
93
+ () => {
94
+ const date = dayjs(computedValue.value ? computedValue.value : /* @__PURE__ */ new Date());
95
+ curYear.value = date.year();
96
+ curMonth.value = date.month();
97
+ },
98
+ {
99
+ immediate: true
100
+ }
101
+ );
122
102
  return (_ctx, _cache) => {
123
103
  return openBlock(), createElementBlock("div", {
124
104
  class: normalizeClass(["yc-calendar", `yc-calendar-mode-${unref(computedMode)}`])
@@ -140,10 +120,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
120
  }),
141
121
  createElementVNode("div", _hoisted_3, [
142
122
  renderSlot(_ctx.$slots, "header", {
143
- year: recordDate.value.year,
144
- month: recordDate.value.month
123
+ year: curYear.value,
124
+ month: curMonth.value
145
125
  }, () => [
146
- createTextVNode(toDisplayString(recordDateFormat.value), 1)
126
+ createTextVNode(toDisplayString(formatValue.value), 1)
147
127
  ])
148
128
  ]),
149
129
  createVNode(unref(_sfc_main$1), {
@@ -183,8 +163,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
183
163
  unref(computedMode) == "month" ? (openBlock(), createBlock(_sfc_main$4, {
184
164
  key: 0,
185
165
  "computed-value": unref(computedValue),
186
- recordDate: recordDate.value,
187
- onCellClick: handleClick
166
+ "cur-year": curYear.value,
167
+ "cur-month": curMonth.value,
168
+ onCellClick: _cache[4] || (_cache[4] = (v) => computedValue.value = v)
188
169
  }, createSlots({ _: 2 }, [
189
170
  $slots.default ? {
190
171
  name: "default",
@@ -193,11 +174,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
193
174
  ]),
194
175
  key: "0"
195
176
  } : void 0
196
- ]), 1032, ["computed-value", "recordDate"])) : (openBlock(), createBlock(_sfc_main$5, {
177
+ ]), 1032, ["computed-value", "cur-year", "cur-month"])) : (openBlock(), createBlock(_sfc_main$5, {
197
178
  key: 1,
198
179
  "computed-value": unref(computedValue),
199
- "record-date": recordDate.value,
200
- onCellClick: handleClick
180
+ "cur-year": curYear.value,
181
+ onCellClick: _cache[5] || (_cache[5] = (v) => computedValue.value = v)
201
182
  }, createSlots({ _: 2 }, [
202
183
  $slots.default ? {
203
184
  name: "default",
@@ -206,7 +187,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
187
  ]),
207
188
  key: "0"
208
189
  } : void 0
209
- ]), 1032, ["computed-value", "record-date"]))
190
+ ]), 1032, ["computed-value", "cur-year"]))
210
191
  ])
211
192
  ], 2);
212
193
  };
@@ -1,8 +1,7 @@
1
- import { CalendarCellData } from '../_shared/utils';
2
1
  type __VLS_Props = {
3
2
  computedValue: Date;
4
- recordDate: Record<string, number>;
5
- calendar?: CalendarCellData[][];
3
+ curYear: number;
4
+ curMonth: number;
6
5
  small?: boolean;
7
6
  };
8
7
  declare function __VLS_template(): {
@@ -19,12 +18,11 @@ declare function __VLS_template(): {
19
18
  };
20
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
21
20
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
22
- "cell-click": (col: CalendarCellData) => any;
21
+ "cell-click": (col: Date) => any;
23
22
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
- "onCell-click"?: ((col: CalendarCellData) => any) | undefined;
23
+ "onCell-click"?: ((col: Date) => any) | undefined;
25
24
  }>, {
26
25
  small: boolean;
27
- calendar: CalendarCellData[][];
28
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
29
27
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
28
  export default _default;
@@ -1,15 +1,11 @@
1
- import { defineComponent, toRefs, computed, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, Fragment, renderList, toDisplayString, renderSlot } from "vue";
1
+ import { defineComponent, toRefs, computed, ref, watch, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, Fragment, renderList, toDisplayString, renderSlot } from "vue";
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import dayjs from "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
- import { useControlValue } from "../_shared/utils/hooks.js";
11
6
  import { useI18n } from "../_shared/utils/locale.js";
12
- import { generateMonthCalendar } from "../_shared/utils/time.js";
7
+ import "../_shared/utils/time.js";
8
+ import useCalendar from "./hooks/useCalendar.js";
13
9
  const _hoisted_1 = { class: "yc-calendar-week-list" };
14
10
  const _hoisted_2 = { class: "yc-calendar-month-cell-body" };
15
11
  const _hoisted_3 = ["onClick"];
@@ -20,16 +16,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
20
16
  __name: "CalendarMonth",
21
17
  props: {
22
18
  computedValue: {},
23
- recordDate: {},
24
- calendar: { default: void 0 },
19
+ curYear: {},
20
+ curMonth: {},
25
21
  small: { type: Boolean, default: false }
26
22
  },
27
23
  emits: ["cell-click"],
28
24
  setup(__props) {
29
25
  const props = __props;
30
- const { computedValue, calendar: _calendar, small, recordDate } = toRefs(props);
26
+ const { small, curYear, curMonth, computedValue } = toRefs(props);
27
+ const { getDayOfMonth } = useCalendar();
31
28
  const { t } = useI18n();
32
- const weekList = computed(() => {
29
+ const weekHeaders = computed(() => {
33
30
  return [
34
31
  "sunday",
35
32
  "monday",
@@ -40,34 +37,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
37
  "saturday"
41
38
  ].map((v) => t(`calendar.week.${small.value ? "short" : "long"}.${v}`));
42
39
  });
43
- const calendar = useControlValue(_calendar, []);
40
+ const calendar = ref([]);
41
+ const isToday = (date) => {
42
+ const curDate = dayjs();
43
+ return date.getFullYear() == curDate.year() && date.getMonth() == curDate.month() && date.getDate() == curDate.date();
44
+ };
45
+ const isCellInView = (date) => {
46
+ return date.getFullYear() == curYear.value && date.getMonth() == curMonth.value;
47
+ };
48
+ const isSelected = (date) => {
49
+ if (!computedValue.value) return false;
50
+ const isSameDay = computedValue.value.getFullYear() == date.getFullYear() && computedValue.value.getMonth() == date.getMonth() && computedValue.value.getDate() == date.getDate();
51
+ return small.value ? isSameDay && curMonth.value == computedValue.value.getMonth() : isSameDay;
52
+ };
44
53
  watch(
45
- () => recordDate.value.month,
54
+ () => [curYear.value, curMonth.value],
46
55
  () => {
47
- if (_calendar.value) return;
48
- const { year, month } = recordDate.value;
49
- calendar.value = generateMonthCalendar(year, month);
56
+ calendar.value = getDayOfMonth(curYear.value, curMonth.value);
50
57
  },
51
58
  {
52
59
  immediate: true
53
60
  }
54
61
  );
55
- const isToday = (col) => {
56
- const { day, year, month } = col;
57
- const cur = dayjs();
58
- const _day = cur.date();
59
- const _month = cur.month();
60
- const _year = cur.year();
61
- return day == _day && month == _month && year == _year;
62
- };
63
- const isSelected = (col) => {
64
- const year = computedValue.value.getFullYear();
65
- const month = computedValue.value.getMonth();
66
- const day = computedValue.value.getDate();
67
- const { day: _day, year: _year, month: _month, isCurrentMonth } = col;
68
- const isSameDate = day == _day && month == _month && year == _year;
69
- return small.value ? isSameDate && isCurrentMonth : isSameDate;
70
- };
71
62
  return (_ctx, _cache) => {
72
63
  return openBlock(), createElementBlock("div", {
73
64
  class: normalizeClass([
@@ -78,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
69
  ])
79
70
  }, [
80
71
  createElementVNode("div", _hoisted_1, [
81
- (openBlock(true), createElementBlock(Fragment, null, renderList(weekList.value, (item) => {
72
+ (openBlock(true), createElementBlock(Fragment, null, renderList(weekHeaders.value, (item) => {
82
73
  return openBlock(), createElementBlock("div", {
83
74
  class: "yc-calendar-week-list-item",
84
75
  key: item
@@ -86,32 +77,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
86
77
  }), 128))
87
78
  ]),
88
79
  createElementVNode("div", _hoisted_2, [
89
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(calendar), (row, i) => {
80
+ (openBlock(true), createElementBlock(Fragment, null, renderList(calendar.value, (row, i) => {
90
81
  return openBlock(), createElementBlock("div", {
91
82
  key: i,
92
83
  class: "yc-calendar-month-row"
93
84
  }, [
94
- (openBlock(true), createElementBlock(Fragment, null, renderList(row, (col, i1) => {
85
+ (openBlock(true), createElementBlock(Fragment, null, renderList(row, (v, i1) => {
95
86
  return openBlock(), createElementBlock("div", {
96
87
  key: i1,
97
88
  class: normalizeClass([
98
89
  "yc-calendar-cell",
99
90
  {
100
- "yc-calendar-cell-today": isToday(col),
101
- "yc-calendar-cell-selected": isSelected(col),
102
- "yc-calendar-cell-in-view": col.isCurrentMonth
91
+ "yc-calendar-cell-today": isToday(v.value),
92
+ "yc-calendar-cell-selected": isSelected(v.value),
93
+ "yc-calendar-cell-in-view": isCellInView(v.value)
103
94
  }
104
95
  ]),
105
- onClick: ($event) => _ctx.$emit("cell-click", col)
96
+ onClick: ($event) => _ctx.$emit("cell-click", v.value)
106
97
  }, [
107
98
  renderSlot(_ctx.$slots, "default", {
108
- year: col.year,
109
- month: col.month,
110
- day: col.day
99
+ year: v.value.getFullYear(),
100
+ month: v.value.getMonth(),
101
+ day: v.value.getDate()
111
102
  }, () => [
112
103
  createElementVNode("div", _hoisted_4, [
113
104
  createElementVNode("div", _hoisted_5, [
114
- createElementVNode("div", _hoisted_6, toDisplayString(col.day), 1)
105
+ createElementVNode("div", _hoisted_6, toDisplayString(v.label), 1)
115
106
  ])
116
107
  ])
117
108
  ])
@@ -1,7 +1,6 @@
1
- import { CalendarCellData } from '../_shared/utils';
2
1
  type __VLS_Props = {
3
2
  computedValue: Date;
4
- recordDate: Record<string, number>;
3
+ curYear: number;
5
4
  };
6
5
  declare function __VLS_template(): {
7
6
  attrs: Partial<{}>;
@@ -17,9 +16,9 @@ declare function __VLS_template(): {
17
16
  };
18
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
18
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
- "cell-click": (col: CalendarCellData) => any;
19
+ "cell-click": (col: Date) => any;
21
20
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- "onCell-click"?: ((col: CalendarCellData) => any) | undefined;
21
+ "onCell-click"?: ((col: Date) => any) | undefined;
23
22
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
24
23
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
24
  export default _default;
@@ -1,14 +1,10 @@
1
- import { defineComponent, toRefs, ref, computed, watch, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, unref, createSlots, withCtx, renderSlot } from "vue";
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, createSlots, withCtx, renderSlot } from "vue";
2
2
  import "../node_modules/b-tween/dist/b-tween.es.js";
3
3
  import "../node_modules/dayjs/dayjs.min.js";
4
4
  import "../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../node_modules/dayjs/plugin/duration.js";
6
- import "../node_modules/dayjs/plugin/toObject.js";
7
- import "../node_modules/dayjs/plugin/isSameOrAfter.js";
8
- import "../node_modules/dayjs/plugin/isSameOrBefore.js";
9
5
  import "../_shared/utils/dom.js";
10
6
  import { useI18n } from "../_shared/utils/locale.js";
11
- import { generateMonthCalendar } from "../_shared/utils/time.js";
7
+ import "../_shared/utils/time.js";
12
8
  import _sfc_main$1 from "./CalendarMonth.vue.js";
13
9
  /* empty css */
14
10
  const _hoisted_1 = { class: "yc-calendar-year" };
@@ -17,15 +13,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
13
  __name: "CalendarYear",
18
14
  props: {
19
15
  computedValue: {},
20
- recordDate: {}
16
+ curYear: {}
21
17
  },
22
18
  emits: ["cell-click"],
23
19
  setup(__props) {
24
- const props = __props;
25
- const { computedValue, recordDate } = toRefs(props);
26
20
  const { t } = useI18n();
27
- const calendar = ref([]);
28
- const monthList = computed(() => {
21
+ const months = ref([
22
+ [1, 2, 3],
23
+ [4, 5, 6],
24
+ [7, 8, 9],
25
+ [10, 11, 12]
26
+ ]);
27
+ const monthHeaders = computed(() => {
29
28
  return [
30
29
  "January",
31
30
  "February",
@@ -41,57 +40,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
40
  "December"
42
41
  ].map((v) => t(`calendar.month.short.${v}`));
43
42
  });
44
- watch(
45
- () => recordDate.value.year,
46
- () => {
47
- const { year } = recordDate.value;
48
- calendar.value = [];
49
- const row = [];
50
- for (let i = 1; i <= 12; i++) {
51
- row.push(generateMonthCalendar(year, i));
52
- if (row.length == 4) {
53
- calendar.value.push([...row]);
54
- row.splice(0);
55
- }
56
- }
57
- },
58
- {
59
- immediate: true
60
- }
61
- );
62
43
  return (_ctx, _cache) => {
63
44
  return openBlock(), createElementBlock("div", _hoisted_1, [
64
- (openBlock(true), createElementBlock(Fragment, null, renderList(calendar.value, (row, i) => {
45
+ (openBlock(true), createElementBlock(Fragment, null, renderList(months.value, (row, i) => {
65
46
  return openBlock(), createElementBlock("div", {
66
47
  key: i,
67
48
  class: "yc-calendar-year-row"
68
49
  }, [
69
- (openBlock(true), createElementBlock(Fragment, null, renderList(row, (col, i1) => {
50
+ (openBlock(true), createElementBlock(Fragment, null, renderList(row, (month, i1) => {
70
51
  return openBlock(), createElementBlock("div", {
71
52
  key: i1,
72
53
  class: "yc-calendar-year-cell"
73
54
  }, [
74
- createElementVNode("div", _hoisted_2, toDisplayString(monthList.value[i * 4 + i1]), 1),
55
+ createElementVNode("div", _hoisted_2, toDisplayString(monthHeaders.value[i * 4 + i1]), 1),
75
56
  createVNode(_sfc_main$1, {
76
- "computed-value": unref(computedValue),
77
- calendar: col,
78
- "record-date": unref(recordDate),
57
+ "cur-year": _ctx.curYear,
58
+ "cur-month": month - 1,
59
+ "computed-value": _ctx.computedValue,
79
60
  small: "",
80
61
  class: "yc-calendar-year-cell-body",
81
62
  onCellClick: _cache[0] || (_cache[0] = (v) => _ctx.$emit("cell-click", v))
82
63
  }, createSlots({ _: 2 }, [
83
64
  _ctx.$slots.default ? {
84
65
  name: "default",
85
- fn: withCtx(({ year, month, day }) => [
66
+ fn: withCtx(({ year, month: month2, day }) => [
86
67
  renderSlot(_ctx.$slots, "default", {
87
68
  year,
88
- month,
69
+ month: month2,
89
70
  day
90
71
  })
91
72
  ]),
92
73
  key: "0"
93
74
  } : void 0
94
- ]), 1032, ["computed-value", "calendar", "record-date"])
75
+ ]), 1032, ["cur-year", "cur-month", "computed-value"])
95
76
  ]);
96
77
  }), 128))
97
78
  ]);
@@ -0,0 +1,7 @@
1
+ export interface CalendarCellData {
2
+ label: string | number;
3
+ value: Date;
4
+ }
5
+ export default function useCalendar(): {
6
+ getDayOfMonth: (year: number, month: number, dayStartOfWeek?: number) => CalendarCellData[][];
7
+ };