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
@@ -7,10 +7,8 @@ import { sleep } from "../../_shared/utils/dom.js";
7
7
  import { isUndefined, isString } from "../../_shared/utils/is.js";
8
8
  import { useControlValue } from "../../_shared/utils/hooks.js";
9
9
  import { useI18n } from "../../_shared/utils/locale.js";
10
- import "../../_shared/utils/time.js";
10
+ import { getDaysOfMonth, getWeeksOfMonth, getRangeOfYear } from "../../_shared/utils/time.js";
11
11
  import usePickerInputContext from "./useContext.js";
12
- import isoWeek from "../../node_modules/dayjs/plugin/isoWeek.js";
13
- dayjs.extend(isoWeek);
14
12
  function usePicker(params) {
15
13
  const { props, emits } = params;
16
14
  const {
@@ -27,6 +25,7 @@ function usePicker(params) {
27
25
  locale,
28
26
  abbreviation
29
27
  } = toRefs(props);
28
+ const { disabledDate } = props;
30
29
  const computedValue = useControlValue(
31
30
  modelValue,
32
31
  defaultValue.value,
@@ -94,6 +93,9 @@ function usePicker(params) {
94
93
  computedVisible.value = false;
95
94
  };
96
95
  const handleSelect = (date) => {
96
+ if (disabledDate == null ? void 0 : disabledDate(date)) {
97
+ return;
98
+ }
97
99
  computedValue.value = date;
98
100
  selectDate = date;
99
101
  const dateString = dayjs(date).format("YYYY-MM-DD");
@@ -109,6 +111,11 @@ function usePicker(params) {
109
111
  await sleep(0);
110
112
  computedVisible.value = false;
111
113
  };
114
+ const handleNowClick = () => {
115
+ isConfirm = true;
116
+ computedValue.value = /* @__PURE__ */ new Date();
117
+ computedVisible.value = false;
118
+ };
112
119
  const getDateFromFormat = (val) => {
113
120
  if (!val) return "";
114
121
  let date;
@@ -131,53 +138,37 @@ function usePicker(params) {
131
138
  }
132
139
  return date;
133
140
  };
134
- const getRangeOfYear = (curYear2) => {
135
- const decadeStartYear = Math.floor(curYear2 / 10) * 10;
136
- const startYear = decadeStartYear - 1;
137
- const flatYearArray = Array.from({ length: 12 }, (_, i) => {
138
- const year = startYear + i;
139
- return {
140
- label: year.toString(),
141
- value: dayjs().year(year).startOf("year").toDate()
142
- };
143
- });
144
- const grid = [];
145
- const columns = 3;
146
- for (let i = 0; i < flatYearArray.length; i += columns) {
147
- const chunk = flatYearArray.slice(i, i + columns);
148
- grid.push(chunk);
149
- }
150
- return {
151
- range: grid,
152
- startYear: decadeStartYear
153
- };
141
+ const isCellInView = (v, type) => {
142
+ const curDate = dayjs();
143
+ if (type == "year") {
144
+ const startYear = Math.floor(curDate.year() / 10) * 10;
145
+ return v.getFullYear() >= startYear && v.getFullYear() <= startYear + 10;
146
+ }
147
+ if (type == "month") {
148
+ return true;
149
+ }
150
+ return v.getFullYear() == curYear.value && v.getMonth() == curMonth.value;
154
151
  };
155
- const getWeeksOfMonth = (year, month, startOfWeek = dayStartOfWeek.value) => {
156
- const firstDayOfMonth = dayjs(new Date(year, month, 1));
157
- const weekData = [];
158
- const dayOfWeekOfFirst = firstDayOfMonth.toDate().getDay();
159
- const offset = (dayOfWeekOfFirst - startOfWeek + 7) % 7;
160
- let currentDay = firstDayOfMonth.subtract(offset, "day");
161
- for (let i = 0; i < 6; i++) {
162
- const daysOfWeek = [];
163
- const weekRowStartDate = currentDay;
164
- for (let j = 0; j < 7; j++) {
165
- daysOfWeek.push({
166
- label: String(currentDay.date()),
167
- value: currentDay.toDate()
168
- });
169
- currentDay = currentDay.add(1, "day");
170
- }
171
- const representativeDayOfWeek = weekRowStartDate.add(3, "day");
172
- const correctIsoWeek = representativeDayOfWeek.isoWeek();
173
- const mondayOfCorrectIsoWeek = representativeDayOfWeek.startOf("isoWeek").toDate();
174
- weekData.push({
175
- label: correctIsoWeek,
176
- value: mondayOfCorrectIsoWeek,
177
- time: daysOfWeek
178
- });
179
- }
180
- return weekData;
152
+ const isToday = (v, type) => {
153
+ const curDate = dayjs();
154
+ if (type == "year") {
155
+ return v.getFullYear() == curDate.year();
156
+ }
157
+ if (type == "month") {
158
+ return v.getMonth() == curDate.month() && v.getFullYear() == curDate.year();
159
+ }
160
+ return v.getFullYear() == curDate.year() && v.getMonth() == curDate.month() && v.getDate() == curDate.date();
161
+ };
162
+ const isSelected = (v, type) => {
163
+ const date = getDateFromFormat(computedValue.value);
164
+ if (!date) return false;
165
+ if (type == "year") {
166
+ return date.getFullYear() == v.getFullYear();
167
+ }
168
+ if (type == "month") {
169
+ return date.getFullYear() == v.getFullYear() && date.getMonth() == v.getMonth();
170
+ }
171
+ return date.getFullYear() == v.getFullYear() && date.getMonth() == v.getMonth() && date.getDate() == v.getDate();
181
172
  };
182
173
  usePickerInputContext().provide(
183
174
  {
@@ -205,8 +196,13 @@ function usePicker(params) {
205
196
  t,
206
197
  getDateFromFormat,
207
198
  getFormatFromDate,
199
+ isCellInView,
200
+ isToday,
201
+ isSelected,
208
202
  getRangeOfYear,
209
203
  getWeeksOfMonth,
204
+ getDaysOfMonth,
205
+ handleNowClick,
210
206
  handleSelect,
211
207
  handleConfirm,
212
208
  handleShortcut
@@ -1,3 +1,3 @@
1
- .yc-panel-year,.yc-panel-month,.yc-panel-week{width:265px;display:flex;flex-direction:column}.yc-panel-year .yc-picker-header,.yc-panel-month .yc-picker-header,.yc-panel-week .yc-picker-header{padding:8px 16px;border-bottom:1px solid var(--color-neutral-3);display:flex}.yc-panel-year .yc-picker-header .yc-picker-header-icon,.yc-panel-month .yc-picker-header .yc-picker-header-icon,.yc-panel-week .yc-picker-header .yc-picker-header-icon{cursor:pointer;width:24px;height:24px;margin-right:2px;margin-left:2px;color:var(--color-text-2);font-size:12px;line-height:24px;text-align:center;background-color:var(--color-bg-popup);border-radius:50%;transition:all .1s cubic-bezier(0, 0, 1, 1);user-select:none}.yc-panel-year .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-month .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-week .yc-picker-header .yc-picker-header-icon:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-header .yc-picker-header-title,.yc-panel-month .yc-picker-header .yc-picker-header-title,.yc-panel-week .yc-picker-header .yc-picker-header-title{flex:1;color:var(--color-text-1);font-size:14px;line-height:24px;display:flex;justify-content:center;align-items:center}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label{cursor:pointer;padding:2px;border-radius:2px;transition:all .1s}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-body,.yc-panel-month .yc-picker-body,.yc-panel-week .yc-picker-body{padding:14px 16px}.yc-panel-year .yc-picker-body .yc-picker-row,.yc-panel-month .yc-picker-body .yc-picker-row,.yc-panel-week .yc-picker-body .yc-picker-row{padding:2px 0;display:flex}.yc-panel-week{width:298px}.yc-panel-week .yc-picker-week-list{width:100%;padding:14px 16px 0 16px;display:flex}.yc-panel-week .yc-picker-week-list .yc-picker-week-list-item{flex:1;height:32px;padding:0;color:#7d7d7f;font-weight:400;display:flex;justify-content:center;align-items:center}.yc-panel-week .yc-picker-body .yc-picker-week-row:not(.yc-picker-week-row-selected):not(
1
+ .yc-panel-year,.yc-panel-month,.yc-panel-week,.yc-panel-date{width:265px;display:flex;flex-direction:column}.yc-panel-year .yc-picker-header,.yc-panel-month .yc-picker-header,.yc-panel-week .yc-picker-header,.yc-panel-date .yc-picker-header{padding:8px 16px;border-bottom:1px solid var(--color-neutral-3);display:flex}.yc-panel-year .yc-picker-header .yc-picker-header-icon,.yc-panel-month .yc-picker-header .yc-picker-header-icon,.yc-panel-week .yc-picker-header .yc-picker-header-icon,.yc-panel-date .yc-picker-header .yc-picker-header-icon{cursor:pointer;width:24px;height:24px;margin-right:2px;margin-left:2px;color:var(--color-text-2);font-size:12px;line-height:24px;text-align:center;background-color:var(--color-bg-popup);border-radius:50%;transition:all .1s cubic-bezier(0, 0, 1, 1);user-select:none}.yc-panel-year .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-month .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-week .yc-picker-header .yc-picker-header-icon:hover,.yc-panel-date .yc-picker-header .yc-picker-header-icon:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-header .yc-picker-header-title,.yc-panel-month .yc-picker-header .yc-picker-header-title,.yc-panel-week .yc-picker-header .yc-picker-header-title,.yc-panel-date .yc-picker-header .yc-picker-header-title{flex:1;color:var(--color-text-1);font-size:14px;line-height:24px;display:flex;justify-content:center;align-items:center}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label,.yc-panel-date .yc-picker-header .yc-picker-header-title .yc-picker-header-label{cursor:pointer;padding:2px;border-radius:2px;transition:all .1s}.yc-panel-year .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-month .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-week .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover,.yc-panel-date .yc-picker-header .yc-picker-header-title .yc-picker-header-label:hover{background-color:var(--color-fill-3)}.yc-panel-year .yc-picker-week-list,.yc-panel-month .yc-picker-week-list,.yc-panel-week .yc-picker-week-list,.yc-panel-date .yc-picker-week-list{width:100%;padding:14px 16px 0 16px;display:flex}.yc-panel-year .yc-picker-week-list .yc-picker-week-list-item,.yc-panel-month .yc-picker-week-list .yc-picker-week-list-item,.yc-panel-week .yc-picker-week-list .yc-picker-week-list-item,.yc-panel-date .yc-picker-week-list .yc-picker-week-list-item{flex:1;height:32px;padding:0;color:#7d7d7f;font-weight:400;display:flex;justify-content:center;align-items:center}.yc-panel-year .yc-picker-body,.yc-panel-month .yc-picker-body,.yc-panel-week .yc-picker-body,.yc-panel-date .yc-picker-body{padding:14px 16px}.yc-panel-year .yc-picker-body .yc-picker-row,.yc-panel-month .yc-picker-body .yc-picker-row,.yc-panel-week .yc-picker-body .yc-picker-row,.yc-panel-date .yc-picker-body .yc-picker-row{padding:2px 0;display:flex}.yc-panel-week{width:298px}.yc-panel-week .yc-picker-body .yc-picker-week-row:not(.yc-picker-week-row-selected):not(
2
2
  .yc-picker-week-row-disabled
3
- ):hover .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-fill-3)}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date{padding-left:0;padding-right:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date .yc-picker-date-value{border-radius:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date .yc-picker-date-value{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date .yc-picker-date-value{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:rgb(var(--primary-6));color:var(--color-white);transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected.yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-link-light-3);color:var(--color-white)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date{cursor:not-allowed;background-color:var(--color-fill-1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{cursor:not-allowed;background-color:transparent;color:var(--color-text-4)}.yc-picker-container{overflow:hidden;min-height:60px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:var(--border-radius-medium);box-shadow:0 2px 5px #0000001a;display:flex}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer{width:min-content;min-width:100%}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-extra-wrapper{padding:8px 24px;border-top:1px solid var(--color-neutral-3);color:var(--color-text-1);font-size:12px}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);display:flex;align-items:center;justify-content:flex-end;gap:10px}.yc-picker-container .yc-picker-shortcuts{overflow-y:auto;padding:10px 8px;flex:1;display:flex;flex-direction:column;gap:5px}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-left{border-right:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-right{border-left:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-bottom{padding:0;overflow:hidden;flex-direction:row;flex-wrap:wrap;gap:5px 10px}.yc-picker-container-shortcuts-right{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{justify-content:space-between}.yc-picker-cell{flex:1}.yc-picker-cell .yc-picker-date{cursor:pointer;width:100%;height:100%;padding:4px;display:flex;justify-content:center}.yc-picker-cell .yc-picker-date .yc-picker-date-value{cursor:pointer;height:24px;width:100%;border-radius:24px;color:var(--color-text-4);font-size:14px;line-height:24px;text-align:center}.yc-picker-cell-in-view .yc-picker-date .yc-picker-date-value{color:var(--color-text-1);font-weight:500}.yc-picker-cell-today{position:relative}.yc-picker-cell-today:after{position:absolute;bottom:-2px;left:50%;display:block;width:4px;height:4px;margin-left:-2px;background-color:rgb(var(--primary-6));border-radius:50%;content:''}.yc-picker-cell-selected .yc-picker-date .yc-picker-date-value{color:var(--color-white);background-color:rgb(var(--primary-6));transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-picker-cell-disabled .yc-picker-date{background-color:var(--color-fill-1);cursor:not-allowed}.yc-picker-cell-disabled .yc-picker-date .yc-picker-date-value{color:var(--color-text-4);background-color:transparent;cursor:not-allowed}.yc-picker-cell-hoverable.yc-picker-cell-in-view:not(.yc-picker-cell-selected):not(.yc-picker-cell-disabled) .yc-picker-date .yc-picker-date-value:hover{color:var(--color-text-1);background-color:var(--color-fill-3)}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-icon-button{display:flex}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-picker-suffix-icon{display:none}.yc-picker-allow-clear .yc-icon-button{font-size:16px;display:none}.yc-picker-allow-clear .yc-picker-suffix-icon{font-size:16px;height:100%;display:flex;justify-content:center;align-items:center}
3
+ ):hover .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-fill-3)}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date{padding-left:0;padding-right:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-picker-cell .yc-picker-date .yc-picker-date-value{border-radius:0}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-first .yc-picker-date .yc-picker-date-value{border-top-left-radius:24px;border-bottom-left-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row .yc-week-picker-cell-last .yc-picker-date .yc-picker-date-value{border-top-right-radius:24px;border-bottom-right-radius:24px}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:rgb(var(--primary-6));color:var(--color-white);transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-selected.yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{background-color:var(--color-link-light-3);color:var(--color-white)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date{cursor:not-allowed;background-color:var(--color-fill-1)}.yc-panel-week .yc-picker-body .yc-picker-week-row-disabled .yc-picker-cell:not(:first-child) .yc-picker-date .yc-picker-date-value{cursor:not-allowed;background-color:transparent;color:var(--color-text-4)}.yc-picker-container{overflow:hidden;min-height:60px;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:var(--border-radius-medium);box-shadow:0 2px 5px #0000001a;display:flex}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer{width:min-content;min-width:100%}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-extra-wrapper{padding:8px 24px;border-top:1px solid var(--color-neutral-3);color:var(--color-text-1);font-size:12px}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{width:100%;padding:8px;border-top:1px solid var(--color-neutral-3);display:flex;align-items:center;justify-content:space-between;gap:10px}.yc-picker-container .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-now-wrapper{height:36px;border-top:1px solid var(--color-neutral-3);line-height:36px;display:flex;justify-content:center;align-items:center}.yc-picker-container .yc-picker-shortcuts{overflow-y:auto;padding:10px 8px;flex:1;display:flex;flex-direction:column;gap:5px}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-left{border-right:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-right{border-left:1px solid var(--color-neutral-3)}.yc-picker-container .yc-picker-shortcuts.yc-picker-shortcuts-bottom{padding:0;overflow:hidden;flex-direction:row;flex-wrap:wrap;gap:5px 10px}.yc-picker-container-shortcuts-right{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom{flex-direction:row-reverse}.yc-picker-container-shortcuts-bottom .yc-picker-panel-wrapper .yc-picker-footer .yc-picker-footer-btn-wrapper{justify-content:space-between}.yc-picker-cell{flex:1}.yc-picker-cell .yc-picker-date{cursor:pointer;width:100%;height:100%;padding:4px;display:flex;justify-content:center}.yc-picker-cell .yc-picker-date .yc-picker-date-value{cursor:pointer;height:24px;width:100%;border-radius:24px;color:var(--color-text-4);font-size:14px;line-height:24px;text-align:center}.yc-picker-cell-in-view .yc-picker-date .yc-picker-date-value{color:var(--color-text-1);font-weight:500}.yc-picker-cell-today{position:relative}.yc-picker-cell-today:after{position:absolute;bottom:-2px;left:50%;display:block;width:4px;height:4px;margin-left:-2px;background-color:rgb(var(--primary-6));border-radius:50%;content:''}.yc-picker-cell-selected .yc-picker-date .yc-picker-date-value{color:var(--color-white);background-color:rgb(var(--primary-6));transition:background-color .1s cubic-bezier(0, 0, 1, 1)}.yc-picker-cell-disabled .yc-picker-date{background-color:var(--color-fill-1);cursor:not-allowed}.yc-picker-cell-disabled .yc-picker-date .yc-picker-date-value{color:var(--color-text-4);background-color:transparent;cursor:not-allowed}.yc-picker-cell-hoverable.yc-picker-cell-in-view:not(.yc-picker-cell-selected):not(.yc-picker-cell-disabled) .yc-picker-date .yc-picker-date-value:hover{color:var(--color-text-1);background-color:var(--color-fill-3)}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-icon-button{display:flex}.yc-picker-allow-clear:not(.yc-input-disabled):hover .yc-picker-suffix-icon{display:none}.yc-picker-allow-clear .yc-icon-button{font-size:16px;display:none}.yc-picker-allow-clear .yc-picker-suffix-icon{font-size:16px;height:100%;display:flex;justify-content:center;align-items:center}
@@ -11,18 +11,171 @@ export type MonthPickerInstance = InstanceType<typeof _MonthPicker>;
11
11
  export type WeekPickerInstance = InstanceType<typeof _WeekPicker>;
12
12
  export * from './type';
13
13
  declare const DatePicker: {
14
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
14
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').DatePickerProps> & Readonly<{
15
+ onChange?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
16
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
17
+ "onPopup-visible-change"?: ((visible: boolean) => any) | undefined;
18
+ onClear?: (() => any) | undefined;
19
+ onSelect?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
21
+ "onUpdate:pickerValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
22
+ onOk?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
23
+ "onPicker-value-change"?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
24
+ "onSelect-shortcut"?: ((shortcut: import('./type').ShortcutType) => any) | undefined;
25
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
+ change: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
27
+ "update:popupVisible": (value: boolean) => any;
28
+ "popup-visible-change": (visible: boolean) => any;
29
+ clear: () => any;
30
+ select: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
31
+ "update:modelValue": (value: import('./type').DatePickerValue) => any;
32
+ "update:pickerValue": (value: import('./type').DatePickerValue) => any;
33
+ ok: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
34
+ "picker-value-change": (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
35
+ "select-shortcut": (shortcut: import('./type').ShortcutType) => any;
36
+ }, import('vue').PublicProps, {
37
+ error: boolean;
38
+ size: import('..').Size;
39
+ popupVisible: boolean;
40
+ defaultPopupVisible: boolean;
41
+ disabled: boolean;
42
+ position: import('./type').DatePickerPosition;
43
+ unmountOnClose: boolean;
44
+ popupContainer: import('..').PopupContainer;
45
+ placeholder: string;
46
+ locale: Record<string, any>;
47
+ modelValue: import('./type').DatePickerValue;
48
+ defaultValue: import('./type').DatePickerValue;
49
+ allowClear: boolean;
50
+ readonly: boolean;
51
+ triggerProps: import('..').TriggerProps;
52
+ format: string;
53
+ dayStartOfWeek: import('./type').DayStartOfWeek;
54
+ showTime: boolean;
55
+ timePickerProps: import('..').TimePickerProps;
56
+ showNowBtn: boolean;
57
+ pickerValue: import('./type').DatePickerValue;
58
+ defaultPickerValue: import('./type').DatePickerValue;
59
+ valueFormat: import('./type').ValueFormat;
60
+ showConfirmBtn: boolean;
61
+ abbreviation: boolean;
62
+ disabledDate: import('./type').DisabledDate;
63
+ shortcutsPosition: import('./type').ShortcutsPosition;
64
+ shortcuts: import('./type').ShortcutType[];
65
+ previewShortcut: boolean;
66
+ disabledInput: boolean;
67
+ hideTrigger: boolean;
68
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
15
69
  P: {};
16
70
  B: {};
17
71
  D: {};
18
72
  C: {};
19
73
  M: {};
20
74
  Defaults: {};
21
- }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
75
+ }, Readonly<import('./type').DatePickerProps> & Readonly<{
76
+ onChange?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
77
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
78
+ "onPopup-visible-change"?: ((visible: boolean) => any) | undefined;
79
+ onClear?: (() => any) | undefined;
80
+ onSelect?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
81
+ "onUpdate:modelValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
82
+ "onUpdate:pickerValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
83
+ onOk?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
84
+ "onPicker-value-change"?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
85
+ "onSelect-shortcut"?: ((shortcut: import('./type').ShortcutType) => any) | undefined;
86
+ }>, {}, {}, {}, {}, {
87
+ error: boolean;
88
+ size: import('..').Size;
89
+ popupVisible: boolean;
90
+ defaultPopupVisible: boolean;
91
+ disabled: boolean;
92
+ position: import('./type').DatePickerPosition;
93
+ unmountOnClose: boolean;
94
+ popupContainer: import('..').PopupContainer;
95
+ placeholder: string;
96
+ locale: Record<string, any>;
97
+ modelValue: import('./type').DatePickerValue;
98
+ defaultValue: import('./type').DatePickerValue;
99
+ allowClear: boolean;
100
+ readonly: boolean;
101
+ triggerProps: import('..').TriggerProps;
102
+ format: string;
103
+ dayStartOfWeek: import('./type').DayStartOfWeek;
104
+ showTime: boolean;
105
+ timePickerProps: import('..').TimePickerProps;
106
+ showNowBtn: boolean;
107
+ pickerValue: import('./type').DatePickerValue;
108
+ defaultPickerValue: import('./type').DatePickerValue;
109
+ valueFormat: import('./type').ValueFormat;
110
+ showConfirmBtn: boolean;
111
+ abbreviation: boolean;
112
+ disabledDate: import('./type').DisabledDate;
113
+ shortcutsPosition: import('./type').ShortcutsPosition;
114
+ shortcuts: import('./type').ShortcutType[];
115
+ previewShortcut: boolean;
116
+ disabledInput: boolean;
117
+ hideTrigger: boolean;
118
+ }>;
22
119
  __isFragment?: never;
23
120
  __isTeleport?: never;
24
121
  __isSuspense?: never;
25
- } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
122
+ } & import('vue').ComponentOptionsBase<Readonly<import('./type').DatePickerProps> & Readonly<{
123
+ onChange?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
124
+ "onUpdate:popupVisible"?: ((value: boolean) => any) | undefined;
125
+ "onPopup-visible-change"?: ((visible: boolean) => any) | undefined;
126
+ onClear?: (() => any) | undefined;
127
+ onSelect?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
128
+ "onUpdate:modelValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
129
+ "onUpdate:pickerValue"?: ((value: import('./type').DatePickerValue) => any) | undefined;
130
+ onOk?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
131
+ "onPicker-value-change"?: ((value: import('./type').DatePickerValue, date: Date, dateString: string) => any) | undefined;
132
+ "onSelect-shortcut"?: ((shortcut: import('./type').ShortcutType) => any) | undefined;
133
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
134
+ change: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
135
+ "update:popupVisible": (value: boolean) => any;
136
+ "popup-visible-change": (visible: boolean) => any;
137
+ clear: () => any;
138
+ select: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
139
+ "update:modelValue": (value: import('./type').DatePickerValue) => any;
140
+ "update:pickerValue": (value: import('./type').DatePickerValue) => any;
141
+ ok: (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
142
+ "picker-value-change": (value: import('./type').DatePickerValue, date: Date, dateString: string) => any;
143
+ "select-shortcut": (shortcut: import('./type').ShortcutType) => any;
144
+ }, string, {
145
+ error: boolean;
146
+ size: import('..').Size;
147
+ popupVisible: boolean;
148
+ defaultPopupVisible: boolean;
149
+ disabled: boolean;
150
+ position: import('./type').DatePickerPosition;
151
+ unmountOnClose: boolean;
152
+ popupContainer: import('..').PopupContainer;
153
+ placeholder: string;
154
+ locale: Record<string, any>;
155
+ modelValue: import('./type').DatePickerValue;
156
+ defaultValue: import('./type').DatePickerValue;
157
+ allowClear: boolean;
158
+ readonly: boolean;
159
+ triggerProps: import('..').TriggerProps;
160
+ format: string;
161
+ dayStartOfWeek: import('./type').DayStartOfWeek;
162
+ showTime: boolean;
163
+ timePickerProps: import('..').TimePickerProps;
164
+ showNowBtn: boolean;
165
+ pickerValue: import('./type').DatePickerValue;
166
+ defaultPickerValue: import('./type').DatePickerValue;
167
+ valueFormat: import('./type').ValueFormat;
168
+ showConfirmBtn: boolean;
169
+ abbreviation: boolean;
170
+ disabledDate: import('./type').DisabledDate;
171
+ shortcutsPosition: import('./type').ShortcutsPosition;
172
+ shortcuts: import('./type').ShortcutType[];
173
+ previewShortcut: boolean;
174
+ disabledInput: boolean;
175
+ hideTrigger: boolean;
176
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
177
+ $slots: any;
178
+ }) & {
26
179
  install: (app: App) => void;
27
180
  };
28
181
  export { _RangePicker as RangePicker, _YearPicker as YearPicker, _MonthPicker as MonthPicker, _WeekPicker as WeekPicker, };
@@ -1,23 +1,25 @@
1
1
  import _sfc_main from "./YcDatePicker.vue.js";
2
+ /* empty css */
2
3
  import _sfc_main$1 from "./PickerRange.vue.js";
3
4
  import _sfc_main$2 from "./YcYearPicker.vue.js";
4
5
  /* empty css */
5
6
  import _sfc_main$3 from "./YcMonthPicker.vue.js";
6
7
  /* empty css */
7
- import _WeekPicker from "./YcWeekPicker.vue.js";
8
+ import _sfc_main$4 from "./YcWeekPicker.vue.js";
9
+ /* empty css */
8
10
  const DatePicker = Object.assign(_sfc_main, {
9
11
  install: (app) => {
10
12
  app.component("Yc" + _sfc_main.name, _sfc_main);
11
13
  app.component("Yc" + _sfc_main$1.name, _sfc_main$1);
12
14
  app.component("Yc" + _sfc_main$2.name, _sfc_main$2);
13
15
  app.component("Yc" + _sfc_main$3.name, _sfc_main$3);
14
- app.component("Yc" + _WeekPicker.name, _WeekPicker);
16
+ app.component("Yc" + _sfc_main$4.name, _sfc_main$4);
15
17
  }
16
18
  });
17
19
  export {
18
20
  _sfc_main$3 as MonthPicker,
19
21
  _sfc_main$1 as RangePicker,
20
- _WeekPicker as WeekPicker,
22
+ _sfc_main$4 as WeekPicker,
21
23
  _sfc_main$2 as YearPicker,
22
24
  DatePicker as default
23
25
  };
@@ -8,8 +8,8 @@ import { useI18n } from "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
9
  import useModalClose from "../Modal/hooks/useModalClose.js";
10
10
  import Button from "../Button/index.js";
11
- import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
12
- /* empty css */
11
+ import _sfc_main$1 from "../_shared/components/IconButton/index.vue2.js";
12
+ /* empty css */
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  const _hoisted_1 = { class: "yc-drawer-header" };
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$3 from "../_shared/icons/IconMore.vue.js";
@@ -8,7 +8,7 @@ import { isBoolean, isUndefined } from "../_shared/utils/is.js";
8
8
  import { useControlValue } from "../_shared/utils/hooks.js";
9
9
  import "../_shared/utils/locale.js";
10
10
  import "../_shared/utils/time.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import { useI18n } from "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconEmpty.vue.js";
@@ -6,7 +6,7 @@ import { valueToPx } from "../_shared/utils/dom.js";
6
6
  import { useControlValue } from "../_shared/utils/hooks.js";
7
7
  import { useI18n } from "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../_shared/icons/IconImageClose.vue.js";
@@ -8,7 +8,7 @@ import { getGlobalConfig } from "../_shared/utils/global-config.js";
8
8
  import { useControlValue } from "../_shared/utils/hooks.js";
9
9
  import "../_shared/utils/locale.js";
10
10
  import "../_shared/utils/time.js";
11
- /* empty css */
11
+ /* empty css */
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import _sfc_main$2 from "../_shared/icons/IconClose.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import "../_shared/utils/dom.js";
6
6
  import { useI18n } from "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$6 from "../_shared/icons/IconFullScreen.vue2.js";
@@ -7,8 +7,8 @@ import { getGlobalConfig } from "../_shared/utils/global-config.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
9
  import useLimitedInput from "./hooks/useLimitedInput.js";
10
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
11
- /* empty css */
10
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
11
+ /* empty css */
12
12
  import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
13
13
  /* empty css */
14
14
  /* empty css */
@@ -6,8 +6,8 @@ import { sleep } from "../_shared/utils/dom.js";
6
6
  import { useControlValue } from "../_shared/utils/hooks.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
10
- /* empty css */
9
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
10
+ /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
13
  import _sfc_main$4 from "../_shared/icons/IconEyeClose.vue.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, createVNode, unref, createTextVNode, toDisplayString } from "vue";
2
- import _sfc_main$3 from "../_shared/components/IconButton/index.vue.js";
3
- /* empty css */
2
+ import _sfc_main$3 from "../_shared/components/IconButton/index.vue2.js";
3
+ /* empty css */
4
4
  import "../node_modules/b-tween/dist/b-tween.es.js";
5
5
  import "../node_modules/dayjs/dayjs.min.js";
6
6
  import "../node_modules/tinycolor2/esm/tinycolor.js";
@@ -175,9 +175,9 @@ declare const __VLS_component: import('vue').DefineComponent<InputNumberProps, {
175
175
  readonly: boolean;
176
176
  inputAttrs: import('..').RecordType;
177
177
  max: number;
178
+ step: number;
178
179
  min: number;
179
180
  precision: number;
180
- step: number;
181
181
  hideButton: boolean;
182
182
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
183
183
  inputRef: ({
@@ -6,7 +6,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
6
  import "../_shared/utils/dom.js";
7
7
  import "../_shared/utils/locale.js";
8
8
  import "../_shared/utils/time.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  import _sfc_main$2 from "../_shared/icons/IconMinus.vue2.js";
@@ -36,9 +36,9 @@ declare const InputNumber: {
36
36
  readonly: boolean;
37
37
  inputAttrs: import('..').RecordType;
38
38
  max: number;
39
+ step: number;
39
40
  min: number;
40
41
  precision: number;
41
- step: number;
42
42
  hideButton: boolean;
43
43
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
44
44
  inputRef: ({
@@ -207,9 +207,9 @@ declare const InputNumber: {
207
207
  readonly: boolean;
208
208
  inputAttrs: import('..').RecordType;
209
209
  max: number;
210
+ step: number;
210
211
  min: number;
211
212
  precision: number;
212
- step: number;
213
213
  hideButton: boolean;
214
214
  }>;
215
215
  __isFragment?: never;
@@ -248,9 +248,9 @@ declare const InputNumber: {
248
248
  readonly: boolean;
249
249
  inputAttrs: import('..').RecordType;
250
250
  max: number;
251
+ step: number;
251
252
  min: number;
252
253
  precision: number;
253
- step: number;
254
254
  hideButton: boolean;
255
255
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
256
256
  $slots: any;
@@ -11,8 +11,8 @@ import { isObject, isBoolean } from "../_shared/utils/is.js";
11
11
  import "../_shared/utils/locale.js";
12
12
  import "../_shared/utils/time.js";
13
13
  import Tag from "../Tag/index.js";
14
- import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
15
- /* empty css */
14
+ import _sfc_main$2 from "../_shared/components/IconButton/index.vue2.js";
15
+ /* empty css */
16
16
  import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
17
17
  /* empty css */
18
18
  /* empty css */
@@ -16,6 +16,7 @@ declare const __VLS_component: import('vue').DefineComponent<LayoutSiderProps, {
16
16
  onBreakpoint?: ((collapsed: boolean) => any) | undefined;
17
17
  }>, {
18
18
  width: number;
19
+ hideTrigger: boolean;
19
20
  breakpoint: import('..').BreakpointName;
20
21
  collapsed: boolean;
21
22
  defaultCollapsed: boolean;
@@ -23,7 +24,6 @@ declare const __VLS_component: import('vue').DefineComponent<LayoutSiderProps, {
23
24
  collapsible: boolean;
24
25
  collapsedWidth: number;
25
26
  reverseArrow: boolean;
26
- hideTrigger: boolean;
27
27
  resizeDirections: import('..').Position[];
28
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -5,7 +5,7 @@ import "../node_modules/tinycolor2/esm/tinycolor.js";
5
5
  import { mediaQueryHandler, valueToPx } from "../_shared/utils/dom.js";
6
6
  import "../_shared/utils/locale.js";
7
7
  import "../_shared/utils/time.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import _sfc_main$1 from "../_shared/icons/IconArrowRight.vue.js";