yc-design-vue 2.2.4 → 2.2.5

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 (314) hide show
  1. package/dist/index.umd.js +1 -1
  2. package/dist/style.css +1 -1
  3. package/es/Alert/index.vue.js +2 -2
  4. package/es/Avatar/Avatar.vue.js +1 -1
  5. package/es/BackTop/index.vue.js +1 -1
  6. package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  7. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  8. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  9. package/es/Calendar/Calendar.vue.js +2 -2
  10. package/es/Calendar/CalendarMonth.vue.js +2 -4
  11. package/es/Carousel/CarouselArrow.vue.js +1 -1
  12. package/es/Cascader/CascaderIcon.vue.js +2 -2
  13. package/es/Cascader/CascaderOption.vue.js +1 -1
  14. package/es/Checkbox/Checkbox.vue.js +2 -2
  15. package/es/Collapse/CollapseItem.vue.js +2 -2
  16. package/es/ColorPicker/ColorPicker.vue.d.ts +1 -1
  17. package/es/ColorPicker/index.d.ts +3 -3
  18. package/es/DatePicker/YcDatePicker.vue.d.ts +69 -1
  19. package/es/DatePicker/YcDatePicker.vue.js +257 -4
  20. package/es/DatePicker/{YcDatePicker.vue2.js → YcDatePicker.vue3.js} +1 -0
  21. package/es/DatePicker/YcMonthPicker.vue.d.ts +2 -2
  22. package/es/DatePicker/YcMonthPicker.vue.js +40 -56
  23. package/es/DatePicker/YcWeekPicker.vue.d.ts +2 -2
  24. package/es/DatePicker/YcWeekPicker.vue.js +262 -4
  25. package/es/DatePicker/YcWeekPicker.vue3.js +5 -0
  26. package/es/DatePicker/YcYearPicker.vue.d.ts +2 -2
  27. package/es/DatePicker/YcYearPicker.vue.js +44 -49
  28. package/es/DatePicker/component/PickerCell.vue.d.ts +2 -2
  29. package/es/DatePicker/component/PickerCell.vue.js +39 -5
  30. package/es/DatePicker/component/PickerCell.vue3.js +5 -0
  31. package/es/DatePicker/component/PickerHeader.vue.d.ts +40 -0
  32. package/es/DatePicker/component/PickerHeader.vue.js +83 -0
  33. package/es/DatePicker/component/PickerHeader.vue3.js +5 -0
  34. package/es/DatePicker/component/PickerInput.vue.js +119 -5
  35. package/es/DatePicker/component/PickerInput.vue3.js +5 -0
  36. package/es/DatePicker/component/PickerPanel.vue.d.ts +6 -1
  37. package/es/DatePicker/component/PickerPanel.vue.js +47 -6
  38. package/es/DatePicker/component/PickerWeekHeader.vue.d.ts +8 -0
  39. package/es/DatePicker/component/PickerWeekHeader.vue.js +58 -0
  40. package/es/DatePicker/component/PickerWeekHeader.vue3.js +5 -0
  41. package/es/DatePicker/hooks/userPicker.d.ts +7 -15
  42. package/es/DatePicker/hooks/userPicker.js +45 -49
  43. package/es/DatePicker/index.css +2 -2
  44. package/es/DatePicker/index.d.ts +156 -3
  45. package/es/DatePicker/index.js +5 -3
  46. package/es/Drawer/Drawer.vue.js +2 -2
  47. package/es/Dropdown/DropdownButton.vue.js +1 -1
  48. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  49. package/es/Empty/index.vue.js +1 -1
  50. package/es/Image/Image.vue.js +1 -1
  51. package/es/Image/ImagePreview.vue.js +1 -1
  52. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  53. package/es/Image/ImagePreviewToolbar.vue.js +1 -1
  54. package/es/Input/Input.vue.js +2 -2
  55. package/es/Input/InputPassword.vue.js +2 -2
  56. package/es/Input/InputSearch.vue.js +2 -2
  57. package/es/InputNumber/InputNumber.vue.d.ts +1 -1
  58. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  59. package/es/InputNumber/index.d.ts +3 -3
  60. package/es/InputTag/index.vue.js +2 -2
  61. package/es/Layout/LayoutSider.vue.d.ts +1 -1
  62. package/es/Layout/LayoutSider.vue.js +1 -1
  63. package/es/Layout/index.d.ts +3 -3
  64. package/es/Link/index.vue.js +1 -1
  65. package/es/Menu/Menu.vue.js +1 -1
  66. package/es/Menu/MenuEllipsis.vue.js +1 -1
  67. package/es/Menu/SubMenu.vue.js +1 -1
  68. package/es/Message/Message.vue.js +2 -2
  69. package/es/Modal/Modal.vue.js +2 -2
  70. package/es/Notification/Notification.vue.js +2 -2
  71. package/es/PageHeader/index.vue.js +2 -2
  72. package/es/Pagination/PaginationItem.vue.js +1 -1
  73. package/es/Progress/ProgressCircle.vue.js +1 -1
  74. package/es/Radio/Radio.vue.js +2 -2
  75. package/es/Rate/index.vue.js +1 -1
  76. package/es/ResizeBox/index.vue.js +1 -1
  77. package/es/Select/SelectIcon.vue.js +2 -2
  78. package/es/Slider/Slider.vue.d.ts +1 -1
  79. package/es/Slider/index.d.ts +3 -3
  80. package/es/Spin/index.vue.js +1 -1
  81. package/es/Split/index.vue.js +1 -1
  82. package/es/Statistic/Countdown.vue.d.ts +1 -1
  83. package/es/Statistic/Statistic.vue.d.ts +1 -1
  84. package/es/Statistic/index.d.ts +6 -6
  85. package/es/Steps/Step.vue.js +1 -1
  86. package/es/Tabs/TabButton.vue.js +2 -2
  87. package/es/Tabs/Tabs.vue.js +1 -1
  88. package/es/Tag/index.vue.js +2 -2
  89. package/es/Textarea/index.vue.js +2 -2
  90. package/es/TimePicker/TimePicker.vue.js +2 -2
  91. package/es/Transfer/Transfer.vue.js +1 -1
  92. package/es/Transfer/TransferPanel.vue.js +2 -2
  93. package/es/Trigger/index.vue.js +1 -1
  94. package/es/Typography/TypographyBase.vue.js +1 -1
  95. package/es/Upload/UploadButton.vue.js +1 -1
  96. package/es/Upload/UploadDrag.vue.js +1 -1
  97. package/es/Upload/UploadFileList.vue.js +2 -2
  98. package/es/Upload/UploadPictureCard.vue.js +1 -1
  99. package/es/_shared/components/IconButton/{index.vue.js → index.vue2.js} +1 -1
  100. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  101. package/es/_shared/constants/index.js +1 -1
  102. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  103. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  104. package/es/_shared/icons/IconCalendar.vue2.js +1 -1
  105. package/es/_shared/icons/IconCheck.vue.js +1 -1
  106. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  107. package/es/_shared/icons/IconClose.vue.js +1 -1
  108. package/es/_shared/icons/IconCopy.vue2.js +1 -1
  109. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  110. package/es/_shared/icons/IconDoubleLeft.vue.js +1 -24
  111. package/es/_shared/icons/IconDoubleLeft.vue2.js +24 -1
  112. package/es/_shared/icons/IconDoubleRight.vue.js +1 -24
  113. package/es/_shared/icons/IconDoubleRight.vue2.js +24 -1
  114. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  115. package/es/_shared/icons/IconEdit.vue2.js +1 -1
  116. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  117. package/es/_shared/icons/IconError.vue.js +1 -1
  118. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  119. package/es/_shared/icons/IconEyeClose.vue.js +1 -1
  120. package/es/_shared/icons/IconEyeOpen.vue.js +1 -1
  121. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  122. package/es/_shared/icons/IconFile.vue2.js +1 -1
  123. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  124. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  125. package/es/_shared/icons/IconInfo.vue.js +1 -1
  126. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  127. package/es/_shared/icons/IconLink.vue.js +1 -1
  128. package/es/_shared/icons/IconLoading.vue.js +1 -1
  129. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  130. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  131. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  132. package/es/_shared/icons/IconMore.vue.js +1 -1
  133. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  134. package/es/_shared/icons/IconPlus.vue.js +1 -1
  135. package/es/_shared/icons/IconRight.vue.js +1 -1
  136. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  137. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  138. package/es/_shared/icons/IconSearch.vue.js +1 -1
  139. package/es/_shared/icons/IconSeparator.vue2.js +1 -1
  140. package/es/_shared/icons/IconStar.vue.js +1 -1
  141. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  142. package/es/_shared/icons/IconTime.vue.js +1 -1
  143. package/es/_shared/icons/IconToTop.vue.js +1 -1
  144. package/es/_shared/icons/IconUpload.vue2.js +1 -1
  145. package/es/_shared/icons/IconWarning.vue.js +1 -1
  146. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  147. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  148. package/es/_shared/utils/time.d.ts +20 -0
  149. package/es/_shared/utils/time.js +74 -0
  150. package/es/index.d.ts +18 -18
  151. package/es/style.css +1 -1
  152. package/lib/Alert/index.vue.js +1 -1
  153. package/lib/Avatar/Avatar.vue.js +1 -1
  154. package/lib/BackTop/index.vue.js +1 -1
  155. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  156. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  157. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  158. package/lib/Calendar/Calendar.vue.js +1 -1
  159. package/lib/Calendar/CalendarMonth.vue.js +1 -1
  160. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  161. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  162. package/lib/Cascader/CascaderOption.vue.js +1 -1
  163. package/lib/Checkbox/Checkbox.vue.js +1 -1
  164. package/lib/Collapse/CollapseItem.vue.js +1 -1
  165. package/lib/ColorPicker/ColorPicker.vue.d.ts +1 -1
  166. package/lib/ColorPicker/index.d.ts +3 -3
  167. package/lib/DatePicker/YcDatePicker.vue.d.ts +69 -1
  168. package/lib/DatePicker/YcDatePicker.vue.js +1 -1
  169. package/lib/DatePicker/{YcDatePicker.vue2.js → YcDatePicker.vue3.js} +1 -1
  170. package/lib/DatePicker/YcMonthPicker.vue.d.ts +2 -2
  171. package/lib/DatePicker/YcMonthPicker.vue.js +1 -1
  172. package/lib/DatePicker/YcWeekPicker.vue.d.ts +2 -2
  173. package/lib/DatePicker/YcWeekPicker.vue.js +1 -1
  174. package/lib/DatePicker/YcWeekPicker.vue3.js +1 -0
  175. package/lib/DatePicker/YcYearPicker.vue.d.ts +2 -2
  176. package/lib/DatePicker/YcYearPicker.vue.js +1 -1
  177. package/lib/DatePicker/component/PickerCell.vue.d.ts +2 -2
  178. package/lib/DatePicker/component/PickerCell.vue.js +1 -1
  179. package/lib/DatePicker/component/PickerCell.vue3.js +1 -0
  180. package/lib/DatePicker/component/PickerHeader.vue.d.ts +40 -0
  181. package/lib/DatePicker/component/PickerHeader.vue.js +1 -0
  182. package/lib/DatePicker/component/PickerHeader.vue3.js +1 -0
  183. package/lib/DatePicker/component/PickerInput.vue.js +1 -1
  184. package/lib/DatePicker/component/PickerInput.vue3.js +1 -0
  185. package/lib/DatePicker/component/PickerPanel.vue.d.ts +6 -1
  186. package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
  187. package/lib/DatePicker/component/PickerWeekHeader.vue.d.ts +8 -0
  188. package/lib/DatePicker/component/PickerWeekHeader.vue.js +1 -0
  189. package/lib/DatePicker/component/PickerWeekHeader.vue3.js +1 -0
  190. package/lib/DatePicker/hooks/userPicker.d.ts +7 -15
  191. package/lib/DatePicker/hooks/userPicker.js +1 -1
  192. package/lib/DatePicker/index.css +2 -2
  193. package/lib/DatePicker/index.d.ts +156 -3
  194. package/lib/DatePicker/index.js +1 -1
  195. package/lib/Drawer/Drawer.vue.js +1 -1
  196. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  197. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  198. package/lib/Empty/index.vue.js +1 -1
  199. package/lib/Image/Image.vue.js +1 -1
  200. package/lib/Image/ImagePreview.vue.js +1 -1
  201. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  202. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  203. package/lib/Input/Input.vue.js +1 -1
  204. package/lib/Input/InputPassword.vue.js +1 -1
  205. package/lib/Input/InputSearch.vue.js +1 -1
  206. package/lib/InputNumber/InputNumber.vue.d.ts +1 -1
  207. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  208. package/lib/InputNumber/index.d.ts +3 -3
  209. package/lib/InputTag/index.vue.js +1 -1
  210. package/lib/Layout/LayoutSider.vue.d.ts +1 -1
  211. package/lib/Layout/LayoutSider.vue.js +1 -1
  212. package/lib/Layout/index.d.ts +3 -3
  213. package/lib/Link/index.vue.js +1 -1
  214. package/lib/Menu/Menu.vue.js +1 -1
  215. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  216. package/lib/Menu/SubMenu.vue.js +1 -1
  217. package/lib/Message/Message.vue.js +1 -1
  218. package/lib/Modal/Modal.vue.js +1 -1
  219. package/lib/Notification/Notification.vue.js +1 -1
  220. package/lib/PageHeader/index.vue.js +1 -1
  221. package/lib/Pagination/PaginationItem.vue.js +1 -1
  222. package/lib/Progress/ProgressCircle.vue.js +1 -1
  223. package/lib/Radio/Radio.vue.js +1 -1
  224. package/lib/Rate/index.vue.js +1 -1
  225. package/lib/ResizeBox/index.vue.js +1 -1
  226. package/lib/Select/SelectIcon.vue.js +1 -1
  227. package/lib/Slider/Slider.vue.d.ts +1 -1
  228. package/lib/Slider/index.d.ts +3 -3
  229. package/lib/Spin/index.vue.js +1 -1
  230. package/lib/Split/index.vue.js +1 -1
  231. package/lib/Statistic/Countdown.vue.d.ts +1 -1
  232. package/lib/Statistic/Statistic.vue.d.ts +1 -1
  233. package/lib/Statistic/index.d.ts +6 -6
  234. package/lib/Steps/Step.vue.js +1 -1
  235. package/lib/Tabs/TabButton.vue.js +1 -1
  236. package/lib/Tabs/Tabs.vue.js +1 -1
  237. package/lib/Tag/index.vue.js +1 -1
  238. package/lib/Textarea/index.vue.js +1 -1
  239. package/lib/TimePicker/TimePicker.vue.js +1 -1
  240. package/lib/Transfer/Transfer.vue.js +1 -1
  241. package/lib/Transfer/TransferPanel.vue.js +1 -1
  242. package/lib/Trigger/index.vue.js +1 -1
  243. package/lib/Typography/TypographyBase.vue.js +1 -1
  244. package/lib/Upload/UploadButton.vue.js +1 -1
  245. package/lib/Upload/UploadDrag.vue.js +1 -1
  246. package/lib/Upload/UploadFileList.vue.js +1 -1
  247. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  248. package/lib/_shared/components/IconButton/index.vue2.js +1 -0
  249. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  250. package/lib/_shared/constants/index.js +1 -1
  251. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  252. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  253. package/lib/_shared/icons/IconCalendar.vue2.js +1 -1
  254. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  255. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  256. package/lib/_shared/icons/IconClose.vue.js +1 -1
  257. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  258. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  259. package/lib/_shared/icons/IconDoubleLeft.vue.js +1 -1
  260. package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  261. package/lib/_shared/icons/IconDoubleRight.vue.js +1 -1
  262. package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -1
  263. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  264. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  265. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  266. package/lib/_shared/icons/IconError.vue.js +1 -1
  267. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  268. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  269. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  270. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  271. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  272. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  273. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  274. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  275. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  276. package/lib/_shared/icons/IconLink.vue.js +1 -1
  277. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  278. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  279. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  280. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  281. package/lib/_shared/icons/IconMore.vue.js +1 -1
  282. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  283. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  284. package/lib/_shared/icons/IconRight.vue.js +1 -1
  285. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  286. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  287. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  288. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  289. package/lib/_shared/icons/IconStar.vue.js +1 -1
  290. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  291. package/lib/_shared/icons/IconTime.vue.js +1 -1
  292. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  293. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  294. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  295. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  296. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  297. package/lib/_shared/utils/time.d.ts +20 -0
  298. package/lib/_shared/utils/time.js +1 -1
  299. package/lib/index.d.ts +18 -18
  300. package/lib/style.css +1 -1
  301. package/package.json +1 -1
  302. package/es/Calendar/hooks/useCalendar.d.ts +0 -7
  303. package/es/Calendar/hooks/useCalendar.js +0 -36
  304. package/es/DatePicker/YcWeekPicker.vue2.js +0 -315
  305. package/es/DatePicker/component/PickerCell.vue2.js +0 -41
  306. package/es/DatePicker/component/PickerInput.vue2.js +0 -121
  307. package/es/_virtual/_plugin-vue_export-helper.js +0 -10
  308. package/lib/Calendar/hooks/useCalendar.d.ts +0 -7
  309. package/lib/Calendar/hooks/useCalendar.js +0 -1
  310. package/lib/DatePicker/YcWeekPicker.vue2.js +0 -1
  311. package/lib/DatePicker/component/PickerCell.vue2.js +0 -1
  312. package/lib/DatePicker/component/PickerInput.vue2.js +0 -1
  313. package/lib/_shared/components/IconButton/index.vue.js +0 -1
  314. package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
@@ -1,7 +1,41 @@
1
- import _sfc_main from "./PickerCell.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const PickerCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20192805"]]);
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createElementVNode, toDisplayString } from "vue";
2
+ const _hoisted_1 = { class: "yc-picker-date" };
3
+ const _hoisted_2 = { class: "yc-picker-date-value" };
4
+ const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "PickerCell",
6
+ props: {
7
+ cellInView: { type: Boolean, default: false },
8
+ isToday: { type: Boolean, default: false },
9
+ isSelected: { type: Boolean, default: false },
10
+ disabled: { type: Boolean, default: false },
11
+ value: { default: "" },
12
+ hoverable: { type: Boolean, default: true }
13
+ },
14
+ emits: ["click"],
15
+ setup(__props) {
16
+ return (_ctx, _cache) => {
17
+ return openBlock(), createElementBlock("div", {
18
+ class: normalizeClass([
19
+ "yc-picker-cell",
20
+ {
21
+ "yc-picker-cell-in-view": _ctx.cellInView,
22
+ "yc-picker-cell-today": _ctx.isToday,
23
+ "yc-picker-cell-selected": _ctx.isSelected,
24
+ "yc-picker-cell-disabled": _ctx.disabled,
25
+ "yc-picker-cell-hoverable": _ctx.hoverable
26
+ }
27
+ ]),
28
+ onClick: _cache[0] || (_cache[0] = ($event) => !_ctx.disabled && _ctx.$emit("click", $event))
29
+ }, [
30
+ renderSlot(_ctx.$slots, "cell", {}, () => [
31
+ createElementVNode("div", _hoisted_1, [
32
+ createElementVNode("div", _hoisted_2, toDisplayString(_ctx.value), 1)
33
+ ])
34
+ ])
35
+ ], 2);
36
+ };
37
+ }
38
+ });
5
39
  export {
6
- PickerCell as default
40
+ _sfc_main as default
7
41
  };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PickerCell.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -0,0 +1,40 @@
1
+ type __VLS_Props = {
2
+ type: 'year' | 'month' | 'week' | 'date';
3
+ year?: number;
4
+ month?: number;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ 'icon-prev-double'?(_: {}): any;
10
+ 'icon-prev'?(_: {}): any;
11
+ default?(_: {}): any;
12
+ 'icon-next'?(_: {}): any;
13
+ 'icon-next-double'?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: HTMLDivElement;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
+ "prev-double-click": () => any;
21
+ "prev-click": () => any;
22
+ "next-double-click": () => any;
23
+ "next-click": () => any;
24
+ "year-click": () => any;
25
+ "month-click": () => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ "onPrev-double-click"?: (() => any) | undefined;
28
+ "onPrev-click"?: (() => any) | undefined;
29
+ "onNext-double-click"?: (() => any) | undefined;
30
+ "onNext-click"?: (() => any) | undefined;
31
+ "onYear-click"?: (() => any) | undefined;
32
+ "onMonth-click"?: (() => any) | undefined;
33
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
34
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
+ export default _default;
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, toDisplayString, Fragment } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../../_shared/utils/dom.js";
6
+ import { isUndefined } from "../../_shared/utils/is.js";
7
+ import "../../_shared/utils/locale.js";
8
+ import "../../_shared/utils/time.js";
9
+ /* empty css */
10
+ /* empty css */
11
+ /* empty css */
12
+ import _sfc_main$2 from "../../_shared/icons/IconArrowRight.vue.js";
13
+ import _sfc_main$1 from "../../_shared/icons/IconDoubleLeft.vue2.js";
14
+ import _sfc_main$3 from "../../_shared/icons/IconDoubleRight.vue2.js";
15
+ const _hoisted_1 = { class: "yc-picker-header" };
16
+ const _hoisted_2 = { class: "yc-picker-header-title" };
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ __name: "PickerHeader",
19
+ props: {
20
+ type: {},
21
+ year: {},
22
+ month: {}
23
+ },
24
+ emits: ["prev-double-click", "prev-click", "next-double-click", "next-click", "year-click", "month-click"],
25
+ setup(__props) {
26
+ return (_ctx, _cache) => {
27
+ return openBlock(), createElementBlock("div", _hoisted_1, [
28
+ createElementVNode("div", {
29
+ class: "yc-picker-header-icon",
30
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("prev-double-click"))
31
+ }, [
32
+ renderSlot(_ctx.$slots, "icon-prev-double", {}, () => [
33
+ createVNode(unref(_sfc_main$1))
34
+ ])
35
+ ]),
36
+ ["week", "date"].includes(_ctx.type) ? (openBlock(), createElementBlock("div", {
37
+ key: 0,
38
+ class: "yc-picker-header-icon",
39
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("prev-click"))
40
+ }, [
41
+ renderSlot(_ctx.$slots, "icon-prev", {}, () => [
42
+ createVNode(unref(_sfc_main$2), { rotate: 180 })
43
+ ])
44
+ ])) : createCommentVNode("", true),
45
+ createElementVNode("div", _hoisted_2, [
46
+ renderSlot(_ctx.$slots, "default", {}, () => [
47
+ createElementVNode("span", {
48
+ class: "yc-picker-header-label",
49
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("year-click"))
50
+ }, toDisplayString(_ctx.year), 1),
51
+ !unref(isUndefined)(_ctx.month) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
52
+ _cache[6] || (_cache[6] = createElementVNode("span", null, "-", -1)),
53
+ createElementVNode("span", {
54
+ class: "yc-picker-header-label",
55
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("month-click"))
56
+ }, toDisplayString(_ctx.month < 9 ? `0${_ctx.month + 1}` : _ctx.month + 1), 1)
57
+ ], 64)) : createCommentVNode("", true)
58
+ ])
59
+ ]),
60
+ ["week", "date"].includes(_ctx.type) ? (openBlock(), createElementBlock("div", {
61
+ key: 1,
62
+ class: "yc-picker-header-icon",
63
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("next-click"))
64
+ }, [
65
+ renderSlot(_ctx.$slots, "icon-next", {}, () => [
66
+ createVNode(unref(_sfc_main$2))
67
+ ])
68
+ ])) : createCommentVNode("", true),
69
+ createElementVNode("div", {
70
+ class: "yc-picker-header-icon",
71
+ onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("next-double-click"))
72
+ }, [
73
+ renderSlot(_ctx.$slots, "icon-next-double", {}, () => [
74
+ createVNode(unref(_sfc_main$3))
75
+ ])
76
+ ])
77
+ ]);
78
+ };
79
+ }
80
+ });
81
+ export {
82
+ _sfc_main as default
83
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PickerHeader.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -1,7 +1,121 @@
1
- import _sfc_main from "./PickerInput.vue2.js";
2
- /* empty css */
3
- import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- const PickerInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9f7eea5c"]]);
1
+ import { defineComponent, toRefs, computed, ref, watch, nextTick, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode, normalizeClass, normalizeStyle, createSlots, createElementVNode, createCommentVNode, renderSlot, withModifiers } from "vue";
2
+ import _sfc_main$2 from "../../_shared/components/IconButton/index.vue2.js";
3
+ /* empty css */
4
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
5
+ import "../../node_modules/dayjs/dayjs.min.js";
6
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
7
+ import "../../_shared/utils/dom.js";
8
+ import { useI18n } from "../../_shared/utils/locale.js";
9
+ import "../../_shared/utils/time.js";
10
+ /* empty css */
11
+ /* empty css */
12
+ import _sfc_main$1 from "../../_shared/icons/IconCalendar.vue2.js";
13
+ import usePickerInputContext from "../hooks/useContext.js";
14
+ import Input from "../../Input/index.js";
15
+ import Trigger from "../../Trigger/index.js";
16
+ const _hoisted_1 = { class: "yc-picker-suffix-icon" };
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ ...{
19
+ inheritAttrs: false
20
+ },
21
+ __name: "PickerInput",
22
+ props: {
23
+ type: { default: "date" }
24
+ },
25
+ setup(__props) {
26
+ const $props = __props;
27
+ const { props, computedVisible, formatValue, showClearBtn, onClear } = usePickerInputContext().inject();
28
+ const {
29
+ popupContainer,
30
+ unmountOnClose,
31
+ readonly,
32
+ disabled,
33
+ position,
34
+ triggerProps,
35
+ size,
36
+ error,
37
+ disabledInput,
38
+ locale,
39
+ placeholder: _placeholder
40
+ } = toRefs(props);
41
+ const { t } = useI18n();
42
+ const placeholder = computed(() => {
43
+ var _a;
44
+ const key = `datePicker.placeholder.${$props.type}`;
45
+ return _placeholder.value || ((_a = locale.value) == null ? void 0 : _a[key]) || t(key);
46
+ });
47
+ const inputRef = ref();
48
+ watch(
49
+ () => computedVisible.value,
50
+ async (val) => {
51
+ var _a;
52
+ if (val) return;
53
+ await nextTick();
54
+ (_a = inputRef.value) == null ? void 0 : _a.blur();
55
+ }
56
+ );
57
+ return (_ctx, _cache) => {
58
+ return openBlock(), createBlock(unref(Trigger), mergeProps({
59
+ "popup-visible": unref(computedVisible),
60
+ "onUpdate:popupVisible": _cache[0] || (_cache[0] = ($event) => isRef(computedVisible) ? computedVisible.value = $event : null),
61
+ "popup-offset": 4,
62
+ "popup-container": unref(popupContainer),
63
+ "unmount-on-close": unref(unmountOnClose),
64
+ disabled: unref(disabled) || unref(readonly),
65
+ position: unref(position),
66
+ "prevent-focus": "",
67
+ trigger: "click",
68
+ "animation-name": "slide-dynamic-origin",
69
+ "need-transform-origin": ""
70
+ }, unref(triggerProps)), {
71
+ content: withCtx(() => [
72
+ renderSlot(_ctx.$slots, "content")
73
+ ]),
74
+ default: withCtx(() => [
75
+ createVNode(unref(Input), {
76
+ "model-value": unref(formatValue),
77
+ placeholder: placeholder.value,
78
+ disabled: unref(disabled),
79
+ error: unref(error),
80
+ size: unref(size),
81
+ readonly: unref(readonly) || unref(disabledInput) || true,
82
+ style: normalizeStyle(_ctx.$attrs.style),
83
+ class: normalizeClass([
84
+ _ctx.$attrs.class,
85
+ {
86
+ "yc-picker-allow-clear": unref(showClearBtn)
87
+ }
88
+ ]),
89
+ ref_key: "inputRef",
90
+ ref: inputRef
91
+ }, createSlots({
92
+ suffix: withCtx(() => [
93
+ createElementVNode("div", _hoisted_1, [
94
+ renderSlot(_ctx.$slots, "suffix-icon", {}, () => [
95
+ createVNode(unref(_sfc_main$1))
96
+ ])
97
+ ]),
98
+ unref(showClearBtn) ? (openBlock(), createBlock(unref(_sfc_main$2), {
99
+ key: 0,
100
+ onClick: withModifiers(unref(onClear), ["stop"])
101
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
102
+ ]),
103
+ _: 2
104
+ }, [
105
+ _ctx.$slots.prefix ? {
106
+ name: "prefix",
107
+ fn: withCtx(() => [
108
+ renderSlot(_ctx.$slots, "prefix")
109
+ ]),
110
+ key: "0"
111
+ } : void 0
112
+ ]), 1032, ["model-value", "placeholder", "disabled", "error", "size", "readonly", "style", "class"])
113
+ ]),
114
+ _: 3
115
+ }, 16, ["popup-visible", "popup-container", "unmount-on-close", "disabled", "position"]);
116
+ };
117
+ }
118
+ });
5
119
  export {
6
- PickerInput as default
120
+ _sfc_main as default
7
121
  };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PickerInput.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -6,6 +6,7 @@ type __VLS_Props = {
6
6
  previewShortcut: boolean;
7
7
  confirmBtnDisabled: boolean;
8
8
  showConfirmBtn: boolean;
9
+ showNow?: boolean;
9
10
  };
10
11
  declare function __VLS_template(): {
11
12
  attrs: Partial<{}>;
@@ -19,11 +20,15 @@ declare function __VLS_template(): {
19
20
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
21
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
22
  confirm: (ev: MouseEvent) => any;
23
+ "now-click": () => any;
22
24
  "shortcut-select": (shortcut: ShortcutType, hover: boolean) => any;
23
25
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
26
  onConfirm?: ((ev: MouseEvent) => any) | undefined;
27
+ "onNow-click"?: (() => any) | undefined;
25
28
  "onShortcut-select"?: ((shortcut: ShortcutType, hover: boolean) => any) | undefined;
26
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
29
+ }>, {
30
+ showNow: boolean;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
32
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
33
  export default _default;
29
34
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createBlock, createCommentVNode, createElementVNode, unref, withCtx, Fragment, renderList, resolveDynamicComponent, renderSlot, createTextVNode, toDisplayString } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createBlock, createCommentVNode, createElementVNode, unref, withCtx, Fragment, renderList, resolveDynamicComponent, renderSlot, withDirectives, vShow, createTextVNode, toDisplayString } from "vue";
2
2
  import { createReusableTemplate } 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";
@@ -8,6 +8,7 @@ import { useI18n } from "../../_shared/utils/locale.js";
8
8
  import "../../_shared/utils/time.js";
9
9
  import { getSlotFunction } from "../../_shared/utils/vue-utils.js";
10
10
  import Button from "../../Button/index.js";
11
+ import Link from "../../Link/index.js";
11
12
  const _hoisted_1 = { class: "yc-picker-panel-wrapper" };
12
13
  const _hoisted_2 = { class: "yc-picker-footer" };
13
14
  const _hoisted_3 = {
@@ -18,6 +19,10 @@ const _hoisted_4 = {
18
19
  key: 1,
19
20
  class: "yc-picker-footer-btn-wrapper"
20
21
  };
22
+ const _hoisted_5 = {
23
+ key: 2,
24
+ class: "yc-picker-footer-now-wrapper"
25
+ };
21
26
  const _sfc_main = /* @__PURE__ */ defineComponent({
22
27
  __name: "PickerPanel",
23
28
  props: {
@@ -26,9 +31,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
31
  shortcuts: {},
27
32
  previewShortcut: { type: Boolean },
28
33
  confirmBtnDisabled: { type: Boolean },
29
- showConfirmBtn: { type: Boolean }
34
+ showConfirmBtn: { type: Boolean },
35
+ showNow: { type: Boolean, default: false }
30
36
  },
31
- emits: ["confirm", "shortcut-select"],
37
+ emits: ["confirm", "now-click", "shortcut-select"],
32
38
  setup(__props) {
33
39
  const props = __props;
34
40
  const { define: DefineShortcuts, reuse: ReuseShortcuts } = createReusableTemplate();
@@ -38,8 +44,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
44
  const key = "datePicker.ok";
39
45
  return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
40
46
  };
47
+ const getTodayText = () => {
48
+ var _a;
49
+ const key = "datePicker.today";
50
+ return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
51
+ };
52
+ const getNowText = () => {
53
+ var _a;
54
+ const key = "datePicker.now";
55
+ return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
56
+ };
41
57
  return (_ctx, _cache) => {
42
- var _a, _b;
58
+ var _a, _b, _c, _d;
43
59
  return openBlock(), createElementBlock("div", {
44
60
  class: normalizeClass([
45
61
  "yc-picker-container",
@@ -79,19 +95,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
95
  renderSlot(_ctx.$slots, "extra")
80
96
  ])) : createCommentVNode("", true),
81
97
  _ctx.showConfirmBtn || _ctx.shortcutsPosition == "bottom" && ((_b = _ctx.shortcuts) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
82
- _ctx.shortcutsPosition == "bottom" ? (openBlock(), createBlock(unref(ReuseShortcuts), { key: 0 })) : createCommentVNode("", true),
98
+ withDirectives(createVNode(unref(ReuseShortcuts), null, null, 512), [
99
+ [
100
+ vShow,
101
+ !_ctx.showNow || _ctx.shortcutsPosition == "bottom" && ((_c = _ctx.shortcuts) == null ? void 0 : _c.length)
102
+ ]
103
+ ]),
104
+ !((_d = _ctx.shortcuts) == null ? void 0 : _d.length) && _ctx.showNow ? (openBlock(), createBlock(unref(Button), {
105
+ key: 0,
106
+ size: "mini",
107
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("now-click"))
108
+ }, {
109
+ default: withCtx(() => [
110
+ createTextVNode(toDisplayString(getNowText()), 1)
111
+ ]),
112
+ _: 1
113
+ })) : createCommentVNode("", true),
83
114
  _ctx.showConfirmBtn ? (openBlock(), createBlock(unref(Button), {
84
115
  key: 1,
85
116
  disabled: _ctx.confirmBtnDisabled,
86
117
  type: "primary",
87
118
  size: "mini",
88
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("confirm", $event))
119
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("confirm", $event))
89
120
  }, {
90
121
  default: withCtx(() => [
91
122
  createTextVNode(toDisplayString(getOkText()), 1)
92
123
  ]),
93
124
  _: 1
94
125
  }, 8, ["disabled"])) : createCommentVNode("", true)
126
+ ])) : createCommentVNode("", true),
127
+ _ctx.showNow && !_ctx.showConfirmBtn ? (openBlock(), createElementBlock("div", _hoisted_5, [
128
+ createVNode(unref(Link), {
129
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("now-click"))
130
+ }, {
131
+ default: withCtx(() => [
132
+ createTextVNode(toDisplayString(getTodayText()), 1)
133
+ ]),
134
+ _: 1
135
+ })
95
136
  ])) : createCommentVNode("", true)
96
137
  ])
97
138
  ])
@@ -0,0 +1,8 @@
1
+ import { DayStartOfWeek } from '../type';
2
+ type __VLS_Props = {
3
+ locale: Record<string, any>;
4
+ dayStartOfWeek: DayStartOfWeek;
5
+ abbreviation: boolean;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import { defineComponent, toRefs, computed, createElementBlock, openBlock, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../../_shared/utils/dom.js";
6
+ import { useI18n } from "../../_shared/utils/locale.js";
7
+ import "../../_shared/utils/time.js";
8
+ const _hoisted_1 = { class: "yc-picker-week-list" };
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ __name: "PickerWeekHeader",
11
+ props: {
12
+ locale: {},
13
+ dayStartOfWeek: {},
14
+ abbreviation: { type: Boolean }
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const { locale, dayStartOfWeek, abbreviation } = toRefs(props);
19
+ const { t } = useI18n();
20
+ const weekHeaders = computed(() => {
21
+ const baseDays = [0, 1, 2, 3, 4, 5, 6];
22
+ const days = [
23
+ ...baseDays.slice(dayStartOfWeek.value || 0),
24
+ ...baseDays.slice(0, dayStartOfWeek.value || 0)
25
+ ];
26
+ const map = Object.fromEntries(
27
+ [
28
+ "sunday",
29
+ "monday",
30
+ "tuesday",
31
+ "wednesday",
32
+ "thursday",
33
+ "friday",
34
+ "saturday"
35
+ ].map((v, i) => [i, v])
36
+ );
37
+ return days.map((v) => {
38
+ var _a;
39
+ const key = `datePicker.week.${abbreviation.value ? "short" : "long"}.${map[v]}`;
40
+ return ((_a = locale.value) == null ? void 0 : _a[key]) || t(key);
41
+ });
42
+ });
43
+ return (_ctx, _cache) => {
44
+ return openBlock(), createElementBlock("div", _hoisted_1, [
45
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "yc-picker-week-list-item" }, null, -1)),
46
+ (openBlock(true), createElementBlock(Fragment, null, renderList(weekHeaders.value, (v) => {
47
+ return openBlock(), createElementBlock("div", {
48
+ key: v,
49
+ class: "yc-picker-week-list-item"
50
+ }, toDisplayString(v), 1);
51
+ }), 128))
52
+ ]);
53
+ };
54
+ }
55
+ });
56
+ export {
57
+ _sfc_main as default
58
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PickerWeekHeader.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -1,18 +1,5 @@
1
1
  import { BasePickerEmits, DatePickerValue, DayStartOfWeek, ShortcutType } from '../type';
2
2
  import { RecordType } from '../../_shared/type';
3
- export type YearData = {
4
- label: string;
5
- value: Date;
6
- };
7
- export interface DayData {
8
- label: string;
9
- value: Date;
10
- }
11
- export interface WeekData {
12
- label: number;
13
- value: Date;
14
- time: DayData[];
15
- }
16
3
  export default function usePicker(params: {
17
4
  props: RecordType;
18
5
  emits: BasePickerEmits;
@@ -33,11 +20,16 @@ export default function usePicker(params: {
33
20
  t: (key: string, ...args: any[]) => string;
34
21
  getDateFromFormat: (val: DatePickerValue) => Date | "";
35
22
  getFormatFromDate: (val: Date) => string | number | Date;
23
+ isCellInView: (v: Date, type: string) => boolean;
24
+ isToday: (v: Date, type: string) => boolean;
25
+ isSelected: (v: Date, type: string) => boolean;
36
26
  getRangeOfYear: (curYear: number) => {
37
- range: YearData[][];
27
+ range: import('../../_shared/utils').YearData[][];
38
28
  startYear: number;
39
29
  };
40
- getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => WeekData[];
30
+ getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => import('../../_shared/utils').WeekData[];
31
+ getDaysOfMonth: (year: number, month: number, dayStartOfWeek?: number) => import('../../_shared/utils').DayData[][];
32
+ handleNowClick: () => void;
41
33
  handleSelect: (date: Date) => void;
42
34
  handleConfirm: () => Promise<void>;
43
35
  handleShortcut: (shortcut: ShortcutType, hover: boolean) => void;