yc-design-vue 2.2.5 → 2.2.7

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 (299) 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/Anchor/Anchor.vue.d.ts +1 -1
  5. package/es/Anchor/index.d.ts +3 -3
  6. package/es/Avatar/Avatar.vue.js +1 -1
  7. package/es/BackTop/index.vue.js +1 -1
  8. package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  9. package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  10. package/es/Breadcrumb/BreadcrumbSeparator.vue.js +2 -2
  11. package/es/Calendar/Calendar.vue.js +2 -2
  12. package/es/Carousel/CarouselArrow.vue.js +1 -1
  13. package/es/Cascader/CascaderIcon.vue.js +2 -2
  14. package/es/Cascader/CascaderOption.vue.js +1 -1
  15. package/es/Checkbox/Checkbox.vue.js +2 -2
  16. package/es/Collapse/CollapseItem.vue.js +2 -2
  17. package/es/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
  18. package/es/DatePicker/DatePicker.vue.js +334 -0
  19. package/es/DatePicker/DatePicker.vue3.js +5 -0
  20. package/es/DatePicker/{YcMonthPicker.vue.js → MonthPicker.vue.js} +100 -72
  21. package/es/DatePicker/MonthPicker.vue3.js +5 -0
  22. package/es/DatePicker/WeekPicker.vue.js +301 -0
  23. package/es/DatePicker/WeekPicker.vue3.js +5 -0
  24. package/es/DatePicker/{YcYearPicker.vue.js → YearPicker.vue.js} +82 -57
  25. package/es/DatePicker/YearPicker.vue3.js +5 -0
  26. package/es/DatePicker/component/PickerHeader.vue.js +1 -1
  27. package/es/DatePicker/component/PickerInput.vue.d.ts +1 -0
  28. package/es/DatePicker/component/PickerInput.vue.js +41 -39
  29. package/es/DatePicker/component/PickerPanel.vue.d.ts +2 -0
  30. package/es/DatePicker/component/PickerPanel.vue.js +26 -29
  31. package/es/DatePicker/hooks/useContext.js +1 -1
  32. package/es/DatePicker/hooks/userPicker.d.ts +2 -0
  33. package/es/DatePicker/hooks/userPicker.js +26 -2
  34. package/es/DatePicker/index.css +3 -3
  35. package/es/DatePicker/index.d.ts +7 -7
  36. package/es/DatePicker/index.js +8 -8
  37. package/es/DatePicker/type.d.ts +6 -5
  38. package/es/Drawer/Drawer.vue.js +2 -2
  39. package/es/Dropdown/DropdownButton.vue.js +1 -1
  40. package/es/Dropdown/Dsubmenu.vue.js +1 -1
  41. package/es/Empty/index.vue.js +1 -1
  42. package/es/Image/Image.vue.js +1 -1
  43. package/es/Image/ImagePreview.vue.js +1 -1
  44. package/es/Image/ImagePreviewArrow.vue.js +1 -1
  45. package/es/Image/ImagePreviewToolbar.vue.js +1 -1
  46. package/es/Input/Input.vue.js +2 -2
  47. package/es/Input/InputPassword.vue.js +2 -2
  48. package/es/Input/InputSearch.vue.js +2 -2
  49. package/es/InputNumber/InputOperaBtn.vue.js +1 -1
  50. package/es/InputTag/index.vue.js +2 -2
  51. package/es/Layout/LayoutSider.vue.js +1 -1
  52. package/es/Link/index.vue.js +1 -1
  53. package/es/Menu/Menu.vue.js +1 -1
  54. package/es/Menu/MenuEllipsis.vue.js +1 -1
  55. package/es/Menu/SubMenu.vue.js +1 -1
  56. package/es/Message/Message.vue.js +2 -2
  57. package/es/Modal/Modal.vue.js +2 -2
  58. package/es/Notification/Notification.vue.js +2 -2
  59. package/es/PageHeader/index.vue.js +2 -2
  60. package/es/Pagination/PaginationItem.vue.js +1 -1
  61. package/es/Progress/ProgressCircle.vue.js +1 -1
  62. package/es/Radio/Radio.vue.js +2 -2
  63. package/es/Rate/index.vue.js +1 -1
  64. package/es/ResizeBox/index.vue.js +1 -1
  65. package/es/Select/SelectIcon.vue.js +2 -2
  66. package/es/Spin/index.vue.js +1 -1
  67. package/es/Split/index.vue.js +1 -1
  68. package/es/Steps/Step.vue.js +1 -1
  69. package/es/Tabs/TabButton.vue.js +2 -2
  70. package/es/Tabs/Tabs.vue.js +1 -1
  71. package/es/Tag/index.vue.js +2 -2
  72. package/es/Textarea/index.vue.js +2 -2
  73. package/es/TimePicker/TimePicker.vue.d.ts +5 -98
  74. package/es/TimePicker/TimePicker.vue.js +22 -17
  75. package/es/TimePicker/TimePickerPanel.vue.d.ts +1 -3
  76. package/es/TimePicker/TimePickerPanel.vue.js +89 -56
  77. package/es/TimePicker/hooks/useContext.d.ts +6 -0
  78. package/es/TimePicker/hooks/useContext.js +9 -0
  79. package/es/TimePicker/index.css +1 -1
  80. package/es/TimePicker/index.d.ts +10 -49
  81. package/es/TimePicker/type.d.ts +3 -0
  82. package/es/Transfer/Transfer.vue.js +1 -1
  83. package/es/Transfer/TransferPanel.vue.js +2 -2
  84. package/es/Trigger/index.vue.js +1 -1
  85. package/es/Typography/TypographyBase.vue.js +1 -1
  86. package/es/Upload/UploadButton.vue.js +1 -1
  87. package/es/Upload/UploadDrag.vue.js +1 -1
  88. package/es/Upload/UploadFileList.vue.js +2 -2
  89. package/es/Upload/UploadPictureCard.vue.js +1 -1
  90. package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
  91. package/es/_shared/components/IconButton/index.vue3.js +2 -2
  92. package/es/_shared/constants/index.js +1 -1
  93. package/es/_shared/icons/IconArrowDown.vue.js +1 -1
  94. package/es/_shared/icons/IconArrowRight.vue.js +1 -1
  95. package/es/_shared/icons/IconCalendar.vue2.js +1 -1
  96. package/es/_shared/icons/IconCheck.vue.js +1 -1
  97. package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  98. package/es/_shared/icons/IconClose.vue.js +1 -1
  99. package/es/_shared/icons/IconCopy.vue2.js +1 -1
  100. package/es/_shared/icons/IconDelete.vue2.js +1 -1
  101. package/es/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  102. package/es/_shared/icons/IconDoubleRight.vue2.js +1 -1
  103. package/es/_shared/icons/IconDragDot.vue.js +1 -1
  104. package/es/_shared/icons/IconEdit.vue2.js +1 -1
  105. package/es/_shared/icons/IconEmpty.vue.js +1 -1
  106. package/es/_shared/icons/IconError.vue.js +1 -1
  107. package/es/_shared/icons/IconExclamation.vue2.js +1 -1
  108. package/es/_shared/icons/IconEyeClose.vue.js +1 -1
  109. package/es/_shared/icons/IconEyeOpen.vue.js +1 -1
  110. package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
  111. package/es/_shared/icons/IconFile.vue2.js +1 -1
  112. package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
  113. package/es/_shared/icons/IconImageClose.vue.js +1 -1
  114. package/es/_shared/icons/IconInfo.vue.js +1 -1
  115. package/es/_shared/icons/IconInfoLine.vue.js +1 -1
  116. package/es/_shared/icons/IconLink.vue.js +1 -1
  117. package/es/_shared/icons/IconLoading.vue.js +1 -1
  118. package/es/_shared/icons/IconMenuFold.vue.js +1 -1
  119. package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
  120. package/es/_shared/icons/IconMinus.vue2.js +1 -1
  121. package/es/_shared/icons/IconMore.vue.js +1 -1
  122. package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
  123. package/es/_shared/icons/IconPlus.vue.js +1 -1
  124. package/es/_shared/icons/IconRight.vue.js +1 -1
  125. package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
  126. package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
  127. package/es/_shared/icons/IconSearch.vue.js +1 -1
  128. package/es/_shared/icons/IconSeparator.vue.js +24 -1
  129. package/es/_shared/icons/IconSeparator.vue2.js +1 -24
  130. package/es/_shared/icons/IconStar.vue.js +1 -1
  131. package/es/_shared/icons/IconSuccess.vue.js +1 -1
  132. package/es/_shared/icons/IconTime.vue.js +1 -1
  133. package/es/_shared/icons/IconToTop.vue.js +1 -1
  134. package/es/_shared/icons/IconUpload.vue2.js +1 -1
  135. package/es/_shared/icons/IconWarning.vue.js +1 -1
  136. package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
  137. package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
  138. package/es/index.d.ts +6 -6
  139. package/es/index.js +4 -4
  140. package/es/style.css +1 -1
  141. package/lib/Alert/index.vue.js +1 -1
  142. package/lib/Anchor/Anchor.vue.d.ts +1 -1
  143. package/lib/Anchor/index.d.ts +3 -3
  144. package/lib/Avatar/Avatar.vue.js +1 -1
  145. package/lib/BackTop/index.vue.js +1 -1
  146. package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
  147. package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
  148. package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
  149. package/lib/Calendar/Calendar.vue.js +1 -1
  150. package/lib/Carousel/CarouselArrow.vue.js +1 -1
  151. package/lib/Cascader/CascaderIcon.vue.js +1 -1
  152. package/lib/Cascader/CascaderOption.vue.js +1 -1
  153. package/lib/Checkbox/Checkbox.vue.js +1 -1
  154. package/lib/Collapse/CollapseItem.vue.js +1 -1
  155. package/lib/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
  156. package/lib/DatePicker/DatePicker.vue.js +1 -0
  157. package/lib/DatePicker/DatePicker.vue3.js +1 -0
  158. package/lib/DatePicker/MonthPicker.vue.js +1 -0
  159. package/lib/DatePicker/MonthPicker.vue3.js +1 -0
  160. package/lib/DatePicker/WeekPicker.vue.js +1 -0
  161. package/lib/DatePicker/WeekPicker.vue3.js +1 -0
  162. package/lib/DatePicker/YearPicker.vue.js +1 -0
  163. package/lib/DatePicker/{YcDatePicker.vue3.js → YearPicker.vue3.js} +1 -1
  164. package/lib/DatePicker/component/PickerHeader.vue.js +1 -1
  165. package/lib/DatePicker/component/PickerInput.vue.d.ts +1 -0
  166. package/lib/DatePicker/component/PickerInput.vue.js +1 -1
  167. package/lib/DatePicker/component/PickerPanel.vue.d.ts +2 -0
  168. package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
  169. package/lib/DatePicker/hooks/useContext.js +1 -1
  170. package/lib/DatePicker/hooks/userPicker.d.ts +2 -0
  171. package/lib/DatePicker/hooks/userPicker.js +1 -1
  172. package/lib/DatePicker/index.css +3 -3
  173. package/lib/DatePicker/index.d.ts +7 -7
  174. package/lib/DatePicker/index.js +1 -1
  175. package/lib/DatePicker/type.d.ts +6 -5
  176. package/lib/Drawer/Drawer.vue.js +1 -1
  177. package/lib/Dropdown/DropdownButton.vue.js +1 -1
  178. package/lib/Dropdown/Dsubmenu.vue.js +1 -1
  179. package/lib/Empty/index.vue.js +1 -1
  180. package/lib/Image/Image.vue.js +1 -1
  181. package/lib/Image/ImagePreview.vue.js +1 -1
  182. package/lib/Image/ImagePreviewArrow.vue.js +1 -1
  183. package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
  184. package/lib/Input/Input.vue.js +1 -1
  185. package/lib/Input/InputPassword.vue.js +1 -1
  186. package/lib/Input/InputSearch.vue.js +1 -1
  187. package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
  188. package/lib/InputTag/index.vue.js +1 -1
  189. package/lib/Layout/LayoutSider.vue.js +1 -1
  190. package/lib/Link/index.vue.js +1 -1
  191. package/lib/Menu/Menu.vue.js +1 -1
  192. package/lib/Menu/MenuEllipsis.vue.js +1 -1
  193. package/lib/Menu/SubMenu.vue.js +1 -1
  194. package/lib/Message/Message.vue.js +1 -1
  195. package/lib/Modal/Modal.vue.js +1 -1
  196. package/lib/Notification/Notification.vue.js +1 -1
  197. package/lib/PageHeader/index.vue.js +1 -1
  198. package/lib/Pagination/PaginationItem.vue.js +1 -1
  199. package/lib/Progress/ProgressCircle.vue.js +1 -1
  200. package/lib/Radio/Radio.vue.js +1 -1
  201. package/lib/Rate/index.vue.js +1 -1
  202. package/lib/ResizeBox/index.vue.js +1 -1
  203. package/lib/Select/SelectIcon.vue.js +1 -1
  204. package/lib/Spin/index.vue.js +1 -1
  205. package/lib/Split/index.vue.js +1 -1
  206. package/lib/Steps/Step.vue.js +1 -1
  207. package/lib/Tabs/TabButton.vue.js +1 -1
  208. package/lib/Tabs/Tabs.vue.js +1 -1
  209. package/lib/Tag/index.vue.js +1 -1
  210. package/lib/Textarea/index.vue.js +1 -1
  211. package/lib/TimePicker/TimePicker.vue.d.ts +5 -98
  212. package/lib/TimePicker/TimePicker.vue.js +1 -1
  213. package/lib/TimePicker/TimePickerPanel.vue.d.ts +1 -3
  214. package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
  215. package/lib/TimePicker/hooks/useContext.d.ts +6 -0
  216. package/lib/TimePicker/hooks/useContext.js +1 -1
  217. package/lib/TimePicker/index.css +1 -1
  218. package/lib/TimePicker/index.d.ts +10 -49
  219. package/lib/TimePicker/type.d.ts +3 -0
  220. package/lib/Transfer/Transfer.vue.js +1 -1
  221. package/lib/Transfer/TransferPanel.vue.js +1 -1
  222. package/lib/Trigger/index.vue.js +1 -1
  223. package/lib/Typography/TypographyBase.vue.js +1 -1
  224. package/lib/Upload/UploadButton.vue.js +1 -1
  225. package/lib/Upload/UploadDrag.vue.js +1 -1
  226. package/lib/Upload/UploadFileList.vue.js +1 -1
  227. package/lib/Upload/UploadPictureCard.vue.js +1 -1
  228. package/lib/_shared/components/IconButton/index.vue.js +1 -0
  229. package/lib/_shared/components/IconButton/index.vue3.js +1 -1
  230. package/lib/_shared/constants/index.js +1 -1
  231. package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
  232. package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
  233. package/lib/_shared/icons/IconCalendar.vue2.js +1 -1
  234. package/lib/_shared/icons/IconCheck.vue.js +1 -1
  235. package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
  236. package/lib/_shared/icons/IconClose.vue.js +1 -1
  237. package/lib/_shared/icons/IconCopy.vue2.js +1 -1
  238. package/lib/_shared/icons/IconDelete.vue2.js +1 -1
  239. package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -1
  240. package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -1
  241. package/lib/_shared/icons/IconDragDot.vue.js +1 -1
  242. package/lib/_shared/icons/IconEdit.vue2.js +1 -1
  243. package/lib/_shared/icons/IconEmpty.vue.js +1 -1
  244. package/lib/_shared/icons/IconError.vue.js +1 -1
  245. package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
  246. package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
  247. package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
  248. package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
  249. package/lib/_shared/icons/IconFile.vue2.js +1 -1
  250. package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
  251. package/lib/_shared/icons/IconImageClose.vue.js +1 -1
  252. package/lib/_shared/icons/IconInfo.vue.js +1 -1
  253. package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
  254. package/lib/_shared/icons/IconLink.vue.js +1 -1
  255. package/lib/_shared/icons/IconLoading.vue.js +1 -1
  256. package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
  257. package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
  258. package/lib/_shared/icons/IconMinus.vue2.js +1 -1
  259. package/lib/_shared/icons/IconMore.vue.js +1 -1
  260. package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
  261. package/lib/_shared/icons/IconPlus.vue.js +1 -1
  262. package/lib/_shared/icons/IconRight.vue.js +1 -1
  263. package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
  264. package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
  265. package/lib/_shared/icons/IconSearch.vue.js +1 -1
  266. package/lib/_shared/icons/IconSeparator.vue.js +1 -1
  267. package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
  268. package/lib/_shared/icons/IconStar.vue.js +1 -1
  269. package/lib/_shared/icons/IconSuccess.vue.js +1 -1
  270. package/lib/_shared/icons/IconTime.vue.js +1 -1
  271. package/lib/_shared/icons/IconToTop.vue.js +1 -1
  272. package/lib/_shared/icons/IconUpload.vue2.js +1 -1
  273. package/lib/_shared/icons/IconWarning.vue.js +1 -1
  274. package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
  275. package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
  276. package/lib/index.d.ts +6 -6
  277. package/lib/index.js +1 -1
  278. package/lib/style.css +1 -1
  279. package/package.json +1 -1
  280. package/es/DatePicker/YcDatePicker.vue.js +0 -268
  281. package/es/DatePicker/YcDatePicker.vue3.js +0 -5
  282. package/es/DatePicker/YcMonthPicker.vue3.js +0 -5
  283. package/es/DatePicker/YcWeekPicker.vue.js +0 -265
  284. package/es/DatePicker/YcWeekPicker.vue3.js +0 -5
  285. package/es/DatePicker/YcYearPicker.vue3.js +0 -5
  286. package/lib/DatePicker/YcDatePicker.vue.js +0 -1
  287. package/lib/DatePicker/YcMonthPicker.vue.js +0 -1
  288. package/lib/DatePicker/YcMonthPicker.vue3.js +0 -1
  289. package/lib/DatePicker/YcWeekPicker.vue.js +0 -1
  290. package/lib/DatePicker/YcWeekPicker.vue3.js +0 -1
  291. package/lib/DatePicker/YcYearPicker.vue.js +0 -1
  292. package/lib/DatePicker/YcYearPicker.vue3.js +0 -1
  293. package/lib/_shared/components/IconButton/index.vue2.js +0 -1
  294. package/{lib/DatePicker/YcMonthPicker.vue.d.ts → es/DatePicker/MonthPicker.vue.d.ts} +1 -1
  295. package/{lib/DatePicker/YcWeekPicker.vue.d.ts → es/DatePicker/WeekPicker.vue.d.ts} +1 -1
  296. package/es/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
  297. package/{es/DatePicker/YcMonthPicker.vue.d.ts → lib/DatePicker/MonthPicker.vue.d.ts} +1 -1
  298. package/{es/DatePicker/YcWeekPicker.vue.d.ts → lib/DatePicker/WeekPicker.vue.d.ts} +1 -1
  299. package/lib/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
@@ -4,20 +4,24 @@ import _sfc_main$3 from "./component/PickerHeader.vue.js";
4
4
  /* empty css */
5
5
  import _sfc_main$4 from "./component/PickerCell.vue.js";
6
6
  /* empty css */
7
- import _sfc_main$2 from "./component/PickerPanel.vue.js";
7
+ import _sfc_main$1 from "./component/PickerPanel.vue.js";
8
8
  /* empty css */
9
9
  import _sfc_main$5 from "./component/PickerInput.vue.js";
10
10
  /* empty css */
11
- import _sfc_main$1 from "./YcYearPicker.vue.js";
12
- /* empty css */
13
- const _hoisted_1 = { class: "yc-panel-month" };
14
- const _hoisted_2 = { class: "yc-picker-body" };
11
+ import _sfc_main$2 from "./YearPicker.vue.js";
12
+ /* empty css */
13
+ const _hoisted_1 = {
14
+ key: 1,
15
+ class: "yc-panel-month"
16
+ };
17
+ const _hoisted_2 = { class: "yc-panel-month-inner" };
18
+ const _hoisted_3 = { class: "yc-picker-body" };
15
19
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
20
  ...{
17
21
  name: "MonthPicker",
18
22
  inheritAttrs: false
19
23
  },
20
- __name: "YcMonthPicker",
24
+ __name: "MonthPicker",
21
25
  props: {
22
26
  modelValue: { default: void 0 },
23
27
  defaultValue: { default: "" },
@@ -106,80 +110,82 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
110
  return openBlock(), createElementBlock(Fragment, null, [
107
111
  createVNode(unref(DefinePanel), null, {
108
112
  default: withCtx(() => [
109
- unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$1, {
110
- key: 0,
111
- "model-value": `${unref(curYear)}`,
112
- "hide-trigger": "",
113
- "value-format": "YYYY",
114
- onChange: _cache[0] || (_cache[0] = (_, date) => {
115
- curYear.value = date.getFullYear();
116
- showYearPicker.value = false;
117
- })
118
- }, null, 8, ["model-value"])) : (openBlock(), createBlock(_sfc_main$2, {
119
- key: 1,
113
+ createVNode(_sfc_main$1, {
120
114
  locale: unref(locale),
121
115
  "preview-shortcut": _ctx.previewShortcut,
122
116
  shortcuts: _ctx.shortcuts,
123
117
  "shortcuts-position": _ctx.shortcutsPosition,
124
118
  "confirm-btn-disabled": !unref(computedValue),
125
119
  "show-confirm-btn": _ctx.showConfirmBtn,
120
+ "show-footer": !unref(showYearPicker),
126
121
  onConfirm: unref(handleConfirm),
127
122
  onShortcutSelect: unref(handleShortcut)
128
123
  }, createSlots({
129
124
  default: withCtx(() => [
130
- createElementVNode("div", _hoisted_1, [
131
- createVNode(_sfc_main$3, {
132
- year: unref(curYear),
133
- type: "month",
134
- onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
135
- onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
136
- onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
137
- }, createSlots({ _: 2 }, [
138
- $slots["icon-prev-double"] ? {
139
- name: "icon-prev-double",
140
- fn: withCtx(() => [
141
- renderSlot(_ctx.$slots, "icon-next-double")
142
- ]),
143
- key: "0"
144
- } : void 0,
145
- $slots["icon-next-double"] ? {
146
- name: "icon-next-double",
147
- fn: withCtx(() => [
148
- renderSlot(_ctx.$slots, "icon-next-double")
149
- ]),
150
- key: "1"
151
- } : void 0
152
- ]), 1032, ["year"]),
125
+ unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
126
+ key: 0,
127
+ "model-value": `${unref(curYear)}`,
128
+ "hide-trigger": "",
129
+ "value-format": "YYYY",
130
+ onChange: _cache[0] || (_cache[0] = (_, date) => {
131
+ curYear.value = date.getFullYear();
132
+ showYearPicker.value = false;
133
+ })
134
+ }, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
153
135
  createElementVNode("div", _hoisted_2, [
154
- (openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
155
- return openBlock(), createElementBlock("div", {
156
- key: i,
157
- class: "yc-picker-row"
158
- }, [
159
- (openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
160
- var _a;
161
- return openBlock(), createBlock(_sfc_main$4, {
162
- key: k,
163
- value: label,
164
- "cell-in-view": unref(isCellInView)(date, "month"),
165
- "is-today": unref(isToday)(date, "month"),
166
- "is-selected": unref(isSelected)(date, "month"),
167
- disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
168
- onClick: ($event) => unref(handleSelect)(date)
169
- }, createSlots({ _: 2 }, [
170
- $slots.cell ? {
171
- name: "cell",
172
- fn: withCtx(() => [
173
- renderSlot(_ctx.$slots, "cell", { date })
174
- ]),
175
- key: "0"
176
- } : void 0
177
- ]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
178
- }), 128))
179
- ]);
180
- }), 128))
136
+ createVNode(_sfc_main$3, {
137
+ year: unref(curYear),
138
+ type: "month",
139
+ onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
140
+ onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
141
+ onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
142
+ }, createSlots({ _: 2 }, [
143
+ $slots["icon-prev-double"] ? {
144
+ name: "icon-prev-double",
145
+ fn: withCtx(() => [
146
+ renderSlot(_ctx.$slots, "icon-next-double")
147
+ ]),
148
+ key: "0"
149
+ } : void 0,
150
+ $slots["icon-next-double"] ? {
151
+ name: "icon-next-double",
152
+ fn: withCtx(() => [
153
+ renderSlot(_ctx.$slots, "icon-next-double")
154
+ ]),
155
+ key: "1"
156
+ } : void 0
157
+ ]), 1032, ["year"]),
158
+ createElementVNode("div", _hoisted_3, [
159
+ (openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
160
+ return openBlock(), createElementBlock("div", {
161
+ key: i,
162
+ class: "yc-picker-row"
163
+ }, [
164
+ (openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
165
+ var _a;
166
+ return openBlock(), createBlock(_sfc_main$4, {
167
+ key: k,
168
+ value: label,
169
+ "cell-in-view": unref(isCellInView)(date, "month"),
170
+ "is-today": unref(isToday)(date, "month"),
171
+ "is-selected": unref(isSelected)(date, "month"),
172
+ disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
173
+ onClick: ($event) => unref(handleSelect)(date)
174
+ }, createSlots({ _: 2 }, [
175
+ $slots.cell ? {
176
+ name: "cell",
177
+ fn: withCtx(() => [
178
+ renderSlot(_ctx.$slots, "cell", { date })
179
+ ]),
180
+ key: "0"
181
+ } : void 0
182
+ ]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
183
+ }), 128))
184
+ ]);
185
+ }), 128))
186
+ ])
181
187
  ])
182
- ])
188
+ ]))
183
189
  ]),
184
190
  _: 2
185
191
  }, [
@@ -190,7 +196,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
190
196
  ]),
191
197
  key: "0"
192
198
  } : void 0
193
- ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "onConfirm", "onShortcutSelect"]))
199
+ ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
194
200
  ]),
195
201
  _: 3
196
202
  }),
@@ -199,12 +205,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
199
205
  class: normalizeClass(_ctx.$attrs.class),
200
206
  style: normalizeStyle(_ctx.$attrs.style),
201
207
  type: "month"
202
- }, {
208
+ }, createSlots({
203
209
  content: withCtx(() => [
204
210
  createVNode(unref(ReusePanel))
205
211
  ]),
206
- _: 1
207
- }, 8, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
212
+ _: 2
213
+ }, [
214
+ $slots.default ? {
215
+ name: "trigger",
216
+ fn: withCtx(() => [
217
+ renderSlot(_ctx.$slots, "default")
218
+ ]),
219
+ key: "0"
220
+ } : void 0,
221
+ $slots["suffix-icon"] ? {
222
+ name: "suffix-icon",
223
+ fn: withCtx(() => [
224
+ renderSlot(_ctx.$slots, "suffix-icon")
225
+ ]),
226
+ key: "1"
227
+ } : void 0,
228
+ $slots.prefix ? {
229
+ name: "prefix",
230
+ fn: withCtx(() => [
231
+ renderSlot(_ctx.$slots, "prefix")
232
+ ]),
233
+ key: "2"
234
+ } : void 0
235
+ ]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
208
236
  ], 64);
209
237
  };
210
238
  }
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./MonthPicker.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -0,0 +1,301 @@
1
+ import { defineComponent, useSlots, ref, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, renderSlot, renderList, normalizeClass, normalizeStyle } from "vue";
2
+ import usePicker from "./hooks/userPicker.js";
3
+ import "../node_modules/b-tween/dist/b-tween.es.js";
4
+ import dayjs from "../node_modules/dayjs/dayjs.min.js";
5
+ import "../node_modules/tinycolor2/esm/tinycolor.js";
6
+ import "../_shared/utils/dom.js";
7
+ import "../_shared/utils/locale.js";
8
+ import "../_shared/utils/time.js";
9
+ import _sfc_main$4 from "./component/PickerHeader.vue.js";
10
+ /* empty css */
11
+ import _sfc_main$5 from "./component/PickerWeekHeader.vue.js";
12
+ /* empty css */
13
+ import _sfc_main$6 from "./component/PickerCell.vue.js";
14
+ /* empty css */
15
+ import _sfc_main$1 from "./component/PickerPanel.vue.js";
16
+ /* empty css */
17
+ import _sfc_main$7 from "./component/PickerInput.vue.js";
18
+ /* empty css */
19
+ import _sfc_main$2 from "./YearPicker.vue.js";
20
+ /* empty css */
21
+ import _sfc_main$3 from "./MonthPicker.vue.js";
22
+ /* empty css */
23
+ const _hoisted_1 = {
24
+ key: 2,
25
+ class: "yc-panel-week"
26
+ };
27
+ const _hoisted_2 = { class: "yc-panel-week-inner" };
28
+ const _hoisted_3 = { class: "yc-picker-body" };
29
+ const _hoisted_4 = ["onClick"];
30
+ const _sfc_main = /* @__PURE__ */ defineComponent({
31
+ ...{
32
+ name: "WeekPicker",
33
+ inheritAttrs: false
34
+ },
35
+ __name: "WeekPicker",
36
+ props: {
37
+ modelValue: { default: void 0 },
38
+ defaultValue: { default: "" },
39
+ dayStartOfWeek: { default: 0 },
40
+ locale: { default: () => ({}) },
41
+ hideTrigger: { type: Boolean, default: false },
42
+ allowClear: { type: Boolean, default: false },
43
+ readonly: { type: Boolean, default: false },
44
+ error: { type: Boolean, default: false },
45
+ size: { default: void 0 },
46
+ shortcuts: { default: () => [] },
47
+ shortcutsPosition: { default: "bottom" },
48
+ position: { default: "bl" },
49
+ popupVisible: { type: Boolean, default: void 0 },
50
+ defaultPopupVisible: { type: Boolean, default: false },
51
+ triggerProps: { default: () => ({}) },
52
+ unmountOnClose: { type: Boolean, default: false },
53
+ placeholder: { default: "" },
54
+ disabled: { type: Boolean, default: false },
55
+ disabledDate: { type: Function, default: void 0 },
56
+ disabledTime: {},
57
+ pickerValue: { default: void 0 },
58
+ defaultPickerValue: { default: "" },
59
+ popupContainer: { default: void 0 },
60
+ valueFormat: { default: "YYYY-MM-DD" },
61
+ format: { default: "gggg-wo" },
62
+ previewShortcut: { type: Boolean, default: true },
63
+ showConfirmBtn: { type: Boolean, default: false },
64
+ disabledInput: { type: Boolean, default: false },
65
+ abbreviation: { type: Boolean, default: true }
66
+ },
67
+ emits: ["update:modelValue", "update:popupVisible", "update:pickerValue", "change", "select", "ok", "picker-value-change", "popup-visible-change", "clear", "select-shortcut"],
68
+ setup(__props, { emit: __emit }) {
69
+ const $slots = useSlots();
70
+ const props = __props;
71
+ const emits = __emit;
72
+ const {
73
+ computedValue,
74
+ locale,
75
+ abbreviation,
76
+ dayStartOfWeek,
77
+ curMonth,
78
+ curYear,
79
+ showMonthPicker,
80
+ showYearPicker,
81
+ DefinePanel,
82
+ ReusePanel,
83
+ getDateFromFormat,
84
+ isCellInView,
85
+ isToday,
86
+ isSelected,
87
+ getWeeksOfMonth,
88
+ handleConfirm,
89
+ handleSelect,
90
+ handleShortcut
91
+ } = usePicker({
92
+ props,
93
+ emits
94
+ });
95
+ const weekData = ref([]);
96
+ const handleDateChange = (dateType, type) => {
97
+ if (dateType == "year") {
98
+ curYear.value = type == "pre" ? curYear.value - 1 : curYear.value + 1;
99
+ weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
100
+ } else {
101
+ const base = dayjs().set("year", curYear.value).set("month", curMonth.value);
102
+ const date = type == "pre" ? base.subtract(1, "month") : base.add(1, "month");
103
+ curYear.value = date.year();
104
+ curMonth.value = date.month();
105
+ weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
106
+ }
107
+ };
108
+ watch(
109
+ () => computedValue.value,
110
+ (val) => {
111
+ const date = val ? getDateFromFormat(val) : /* @__PURE__ */ new Date();
112
+ curYear.value = date.getFullYear();
113
+ curMonth.value = date.getMonth();
114
+ weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
115
+ },
116
+ {
117
+ immediate: true
118
+ }
119
+ );
120
+ return (_ctx, _cache) => {
121
+ return openBlock(), createElementBlock(Fragment, null, [
122
+ createVNode(unref(DefinePanel), null, {
123
+ default: withCtx(() => [
124
+ createVNode(_sfc_main$1, {
125
+ locale: unref(locale),
126
+ "preview-shortcut": _ctx.previewShortcut,
127
+ shortcuts: _ctx.shortcuts,
128
+ "shortcuts-position": _ctx.shortcutsPosition,
129
+ "confirm-btn-disabled": !unref(computedValue),
130
+ "show-confirm-btn": _ctx.showConfirmBtn,
131
+ "show-footer": !unref(showYearPicker) && !unref(showMonthPicker),
132
+ onConfirm: unref(handleConfirm),
133
+ onShortcutSelect: unref(handleShortcut)
134
+ }, createSlots({
135
+ default: withCtx(() => [
136
+ unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
137
+ key: 0,
138
+ "model-value": `${unref(curYear)}`,
139
+ "hide-trigger": "",
140
+ "value-format": "YYYY",
141
+ onChange: _cache[0] || (_cache[0] = (_, date) => {
142
+ curYear.value = date.getFullYear();
143
+ weekData.value = unref(getWeeksOfMonth)(unref(curYear), unref(curMonth));
144
+ showYearPicker.value = false;
145
+ })
146
+ }, null, 8, ["model-value"])) : unref(showMonthPicker) ? (openBlock(), createBlock(_sfc_main$3, {
147
+ key: 1,
148
+ "model-value": `${unref(curYear)}-${unref(curMonth) + 1 < 10 ? `0${unref(curMonth) + 1}` : unref(curMonth) + 1}`,
149
+ "hide-trigger": "",
150
+ "value-format": "YYYY-MM",
151
+ onChange: _cache[1] || (_cache[1] = (_, date) => {
152
+ curMonth.value = date.getMonth();
153
+ weekData.value = unref(getWeeksOfMonth)(unref(curYear), unref(curMonth));
154
+ showMonthPicker.value = false;
155
+ })
156
+ }, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
157
+ createElementVNode("div", _hoisted_2, [
158
+ createVNode(_sfc_main$4, {
159
+ year: unref(curYear),
160
+ month: unref(curMonth),
161
+ type: "week",
162
+ onPrevClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("month", "pre")),
163
+ onNextClick: _cache[3] || (_cache[3] = ($event) => handleDateChange("month", "next")),
164
+ onPrevDoubleClick: _cache[4] || (_cache[4] = ($event) => handleDateChange("year", "pre")),
165
+ onNextDoubleClick: _cache[5] || (_cache[5] = ($event) => handleDateChange("year", "next")),
166
+ onYearClick: _cache[6] || (_cache[6] = ($event) => showYearPicker.value = true),
167
+ onMonthClick: _cache[7] || (_cache[7] = ($event) => showMonthPicker.value = true)
168
+ }, createSlots({ _: 2 }, [
169
+ $slots["icon-prev"] ? {
170
+ name: "icon-prev-double",
171
+ fn: withCtx(() => [
172
+ renderSlot(_ctx.$slots, "icon-next")
173
+ ]),
174
+ key: "0"
175
+ } : void 0,
176
+ $slots["icon-next"] ? {
177
+ name: "icon-next-double",
178
+ fn: withCtx(() => [
179
+ renderSlot(_ctx.$slots, "icon-next")
180
+ ]),
181
+ key: "1"
182
+ } : void 0,
183
+ $slots["icon-prev-double"] ? {
184
+ name: "icon-prev-double",
185
+ fn: withCtx(() => [
186
+ renderSlot(_ctx.$slots, "icon-next-double")
187
+ ]),
188
+ key: "2"
189
+ } : void 0,
190
+ $slots["icon-next-double"] ? {
191
+ name: "icon-next-double",
192
+ fn: withCtx(() => [
193
+ renderSlot(_ctx.$slots, "icon-next-double")
194
+ ]),
195
+ key: "3"
196
+ } : void 0
197
+ ]), 1032, ["year", "month"]),
198
+ createVNode(_sfc_main$5, {
199
+ locale: unref(locale),
200
+ abbreviation: unref(abbreviation),
201
+ "day-start-of-week": unref(dayStartOfWeek)
202
+ }, null, 8, ["locale", "abbreviation", "day-start-of-week"]),
203
+ createElementVNode("div", _hoisted_3, [
204
+ (openBlock(true), createElementBlock(Fragment, null, renderList(weekData.value, ({ label, time, value }, i) => {
205
+ var _a;
206
+ return openBlock(), createElementBlock("div", {
207
+ key: i,
208
+ class: normalizeClass([
209
+ "yc-picker-row",
210
+ "yc-picker-week-row",
211
+ {
212
+ "yc-picker-week-row-disabled": (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, value),
213
+ "yc-picker-week-row-selected": unref(isSelected)(value, "week")
214
+ }
215
+ ]),
216
+ onClick: ($event) => unref(handleSelect)(value)
217
+ }, [
218
+ createVNode(_sfc_main$6, {
219
+ "cell-in-view": false,
220
+ value: label
221
+ }, null, 8, ["value"]),
222
+ (openBlock(true), createElementBlock(Fragment, null, renderList(time, ({ value: date, label: label2 }, k) => {
223
+ return openBlock(), createBlock(_sfc_main$6, {
224
+ key: k,
225
+ value: label2,
226
+ "cell-in-view": unref(isCellInView)(date, "week"),
227
+ "is-today": unref(isToday)(date, "week"),
228
+ hoverable: false,
229
+ class: normalizeClass({
230
+ "yc-week-picker-cell-first": !i,
231
+ "yc-week-picker-cell-last": i == time.length - 1
232
+ })
233
+ }, createSlots({ _: 2 }, [
234
+ $slots.cell ? {
235
+ name: "cell",
236
+ fn: withCtx(() => [
237
+ renderSlot(_ctx.$slots, "cell", { date })
238
+ ]),
239
+ key: "0"
240
+ } : void 0
241
+ ]), 1032, ["value", "cell-in-view", "is-today", "class"]);
242
+ }), 128))
243
+ ], 10, _hoisted_4);
244
+ }), 128))
245
+ ])
246
+ ])
247
+ ]))
248
+ ]),
249
+ _: 2
250
+ }, [
251
+ $slots.extra ? {
252
+ name: "extra",
253
+ fn: withCtx(() => [
254
+ renderSlot(_ctx.$slots, "extra")
255
+ ]),
256
+ key: "0"
257
+ } : void 0
258
+ ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
259
+ ]),
260
+ _: 3
261
+ }),
262
+ !_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$7, {
263
+ key: 0,
264
+ class: normalizeClass(_ctx.$attrs.class),
265
+ style: normalizeStyle(_ctx.$attrs.style),
266
+ type: "week"
267
+ }, createSlots({
268
+ content: withCtx(() => [
269
+ createVNode(unref(ReusePanel))
270
+ ]),
271
+ _: 2
272
+ }, [
273
+ $slots.default ? {
274
+ name: "trigger",
275
+ fn: withCtx(() => [
276
+ renderSlot(_ctx.$slots, "default")
277
+ ]),
278
+ key: "0"
279
+ } : void 0,
280
+ $slots["suffix-icon"] ? {
281
+ name: "suffix-icon",
282
+ fn: withCtx(() => [
283
+ renderSlot(_ctx.$slots, "suffix-icon")
284
+ ]),
285
+ key: "1"
286
+ } : void 0,
287
+ $slots.prefix ? {
288
+ name: "prefix",
289
+ fn: withCtx(() => [
290
+ renderSlot(_ctx.$slots, "prefix")
291
+ ]),
292
+ key: "2"
293
+ } : void 0
294
+ ]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
295
+ ], 64);
296
+ };
297
+ }
298
+ });
299
+ export {
300
+ _sfc_main as default
301
+ };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./WeekPicker.vue.js";
2
+ /* empty css */
3
+ export {
4
+ _sfc_main as default
5
+ };