vft 0.0.73 → 0.0.76

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 (369) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/component.js +67 -48
  4. package/es/components/affix/affix.js +45 -0
  5. package/es/components/affix/affix.vue.js +4 -0
  6. package/es/components/affix/affix.vue2.js +83 -0
  7. package/es/components/affix/index.js +12 -0
  8. package/es/components/affix/style/css.js +2 -0
  9. package/es/components/affix/style/index.js +2 -0
  10. package/es/components/back-top/back-top.vue2.js +10 -2
  11. package/es/components/button/button.vue2.js +58 -59
  12. package/es/components/button/use-button.js +26 -20
  13. package/es/components/card/card.vue.js +4 -0
  14. package/es/components/card/card.vue2.js +44 -0
  15. package/es/components/card/index.js +12 -0
  16. package/es/components/card/instance.js +1 -0
  17. package/es/components/card/style/css.js +2 -0
  18. package/es/components/card/style/index.js +2 -0
  19. package/es/components/check-tag/check-tag.vue.js +4 -0
  20. package/es/components/check-tag/check-tag.vue2.js +35 -0
  21. package/es/components/check-tag/index.js +12 -0
  22. package/es/components/check-tag/style/css.js +2 -0
  23. package/es/components/check-tag/style/index.js +2 -0
  24. package/es/components/color-picker/color-picker.vue2.js +1 -1
  25. package/es/components/context-menu/context-menu.vue2.js +10 -2
  26. package/es/components/date-picker/composables/use-month-range-header.js +1 -1
  27. package/es/components/date-picker/constants.js +16 -2
  28. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +37 -34
  29. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +0 -1
  30. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +177 -178
  31. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +328 -336
  32. package/es/components/date-picker/date-picker.js +18 -18
  33. package/es/components/date-picker/index.js +5 -4
  34. package/es/components/date-picker/props/shared.js +1 -1
  35. package/es/components/date-time-select/date-time-select.vue2.js +59 -59
  36. package/es/components/dialog/dialog.vue2.js +12 -12
  37. package/es/components/dialog/hooks/use-dialog.js +4 -4
  38. package/es/components/dropdown/dropdown-menu.vue2.js +4 -4
  39. package/es/components/footer-layout/footer-layout.vue2.js +10 -2
  40. package/es/components/header-layout/header-layout.vue2.js +10 -2
  41. package/es/components/horizontal-menu/constants.js +4 -0
  42. package/es/components/horizontal-menu/horizontal-menu.vue2.js +153 -86
  43. package/es/components/horizontal-menu/index.js +7 -5
  44. package/es/components/index.js +228 -194
  45. package/es/components/md-container/md-container.vue2.js +10 -2
  46. package/es/components/menu/menu-item.vue2.js +58 -58
  47. package/es/components/menu/menu.vue2.js +72 -68
  48. package/es/components/menu/sub-menu.vue2.js +139 -117
  49. package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -26
  50. package/es/components/option/style/css.js +2 -0
  51. package/es/components/option/style/index.js +2 -0
  52. package/es/components/option-group/style/css.js +2 -0
  53. package/es/components/option-group/style/index.js +2 -0
  54. package/es/components/popconfirm/index.js +12 -0
  55. package/es/components/popconfirm/popconfirm.vue.js +4 -0
  56. package/es/components/popconfirm/popconfirm.vue2.js +112 -0
  57. package/es/components/popconfirm/style/css.js +6 -0
  58. package/es/components/popconfirm/style/index.js +6 -0
  59. package/es/components/popover/style/index.js +1 -1
  60. package/es/components/result/result.vue2.js +10 -2
  61. package/es/components/roving-focus-group/roving-focus-item.vue2.js +1 -1
  62. package/es/components/search/style/css.js +2 -0
  63. package/es/components/search/style/index.js +2 -0
  64. package/es/components/select/index.js +22 -0
  65. package/es/components/select/option-group.vue.js +25 -0
  66. package/es/components/select/option-group.vue2.js +53 -0
  67. package/es/components/select/option.vue.js +27 -0
  68. package/es/components/select/option.vue2.js +58 -0
  69. package/es/components/select/options.js +34 -0
  70. package/es/components/select/select-dropdown.vue.js +15 -0
  71. package/es/components/select/select-dropdown.vue2.js +32 -0
  72. package/es/components/select/select.vue.js +327 -0
  73. package/es/components/select/select.vue2.js +348 -0
  74. package/es/components/select/style/css.js +8 -0
  75. package/es/components/select/style/index.js +8 -0
  76. package/es/components/select/token.js +5 -0
  77. package/es/components/select/useOption.js +71 -0
  78. package/es/components/select/useSelect.js +414 -0
  79. package/es/components/select-v2/select-dropdown.js +1 -1
  80. package/es/components/select-v2/useSelect.js +269 -269
  81. package/es/components/side-menu/side-menu.vue2.js +153 -142
  82. package/es/components/skeleton/index.js +16 -0
  83. package/es/components/skeleton/skeleton-item.vue.js +4 -0
  84. package/es/components/skeleton/skeleton-item.vue2.js +31 -0
  85. package/es/components/skeleton/skeleton.vue.js +4 -0
  86. package/es/components/skeleton/skeleton.vue2.js +55 -0
  87. package/es/components/skeleton/style/css.js +3 -0
  88. package/es/components/skeleton/style/index.js +3 -0
  89. package/es/components/skeleton-item/style/css.js +2 -0
  90. package/es/components/skeleton-item/style/index.js +2 -0
  91. package/es/components/space/index.js +17 -0
  92. package/es/components/space/item.js +24 -0
  93. package/es/components/space/space.js +182 -0
  94. package/es/components/space/style/css.js +2 -0
  95. package/es/components/space/style/index.js +2 -0
  96. package/es/components/space/use-space.js +44 -0
  97. package/es/components/switch/switch.vue2.js +1 -1
  98. package/es/components/tabs/tab-nav.vue2.js +30 -22
  99. package/es/components/tabs/tabs.vue2.js +37 -37
  100. package/es/components/time-picker/common/picker.vue2.js +241 -257
  101. package/es/components/time-picker/common/props.js +10 -6
  102. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +1 -1
  103. package/es/components/time-picker/time-picker.js +10 -10
  104. package/es/components/time-select/time-select.vue2.js +38 -42
  105. package/es/components/tooltip/content.vue2.js +1 -1
  106. package/es/components/tree/index.js +14 -0
  107. package/es/components/tree/model/node.js +248 -0
  108. package/es/components/tree/model/tree-store.js +197 -0
  109. package/es/components/tree/model/useDragNode.js +71 -0
  110. package/es/components/tree/model/useKeydown.js +81 -0
  111. package/es/components/tree/model/useNodeExpandEventBroadcast.js +19 -0
  112. package/es/components/tree/model/util.js +21 -0
  113. package/es/components/tree/style/css.js +3 -0
  114. package/es/components/tree/style/index.js +3 -0
  115. package/es/components/tree/tree-node-content.vue.js +4 -0
  116. package/es/components/tree/tree-node-content.vue2.js +28 -0
  117. package/es/components/tree/tree-node.vue.js +98 -0
  118. package/es/components/tree/tree-node.vue2.js +152 -0
  119. package/es/components/tree/tree.type.js +1 -0
  120. package/es/components/tree/tree.vue.js +48 -0
  121. package/es/components/tree/tree.vue2.js +268 -0
  122. package/es/components/tree-select/cache-options.js +32 -0
  123. package/es/components/tree-select/index.js +9 -0
  124. package/es/components/tree-select/select.js +38 -0
  125. package/es/components/tree-select/style/css.js +11 -0
  126. package/es/components/tree-select/style/index.js +11 -0
  127. package/es/components/tree-select/tree-select-option.js +21 -0
  128. package/es/components/tree-select/tree-select.vue.js +4 -0
  129. package/es/components/tree-select/tree-select.vue2.js +81 -0
  130. package/es/components/tree-select/tree.js +137 -0
  131. package/es/components/tree-select/utils.js +45 -0
  132. package/es/hooks/index.js +25 -21
  133. package/es/hooks/use-focus/index.js +9 -0
  134. package/es/hooks/use-throttle-render/index.js +21 -0
  135. package/es/index.js +408 -368
  136. package/es/package.json.js +1 -1
  137. package/es/utils/helper.js +5 -2
  138. package/es/utils/index.js +48 -46
  139. package/lib/component.cjs +1 -1
  140. package/lib/components/affix/affix.cjs +1 -0
  141. package/lib/components/affix/affix.vue.cjs +1 -0
  142. package/lib/components/affix/affix.vue2.cjs +1 -0
  143. package/lib/components/affix/index.cjs +1 -0
  144. package/lib/components/affix/style/css.cjs +1 -0
  145. package/lib/components/affix/style/index.cjs +1 -0
  146. package/lib/components/back-top/back-top.vue2.cjs +1 -1
  147. package/lib/components/button/button.vue2.cjs +1 -1
  148. package/lib/components/button/use-button.cjs +1 -1
  149. package/lib/components/card/card.vue.cjs +1 -0
  150. package/lib/components/card/card.vue2.cjs +1 -0
  151. package/lib/components/card/index.cjs +1 -0
  152. package/lib/components/card/instance.cjs +1 -0
  153. package/lib/components/card/style/css.cjs +1 -0
  154. package/lib/components/card/style/index.cjs +1 -0
  155. package/lib/components/check-tag/check-tag.vue.cjs +1 -0
  156. package/lib/components/check-tag/check-tag.vue2.cjs +1 -0
  157. package/lib/components/check-tag/index.cjs +1 -0
  158. package/lib/components/check-tag/style/css.cjs +1 -0
  159. package/lib/components/check-tag/style/index.cjs +1 -0
  160. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  161. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  162. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  163. package/lib/components/date-picker/constants.cjs +1 -1
  164. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  165. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  166. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  167. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  168. package/lib/components/date-picker/date-picker.cjs +1 -1
  169. package/lib/components/date-picker/index.cjs +1 -1
  170. package/lib/components/date-picker/props/shared.cjs +1 -1
  171. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  172. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  173. package/lib/components/dialog/hooks/use-dialog.cjs +1 -1
  174. package/lib/components/dropdown/dropdown-menu.vue2.cjs +1 -1
  175. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  176. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  177. package/lib/components/horizontal-menu/constants.cjs +1 -0
  178. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  179. package/lib/components/horizontal-menu/index.cjs +1 -1
  180. package/lib/components/index.cjs +1 -1
  181. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  182. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  183. package/lib/components/menu/menu.vue2.cjs +1 -1
  184. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  185. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  186. package/lib/components/option/style/css.cjs +1 -0
  187. package/lib/components/option/style/index.cjs +1 -0
  188. package/lib/components/option-group/style/css.cjs +1 -0
  189. package/lib/components/option-group/style/index.cjs +1 -0
  190. package/lib/components/popconfirm/index.cjs +1 -0
  191. package/lib/components/popconfirm/popconfirm.vue.cjs +1 -0
  192. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -0
  193. package/lib/components/popconfirm/style/css.cjs +1 -0
  194. package/lib/components/popconfirm/style/index.cjs +1 -0
  195. package/lib/components/popover/style/index.cjs +1 -1
  196. package/lib/components/result/result.vue2.cjs +1 -1
  197. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  198. package/lib/components/search/style/css.cjs +1 -1
  199. package/lib/components/search/style/index.cjs +1 -1
  200. package/lib/components/select/index.cjs +1 -0
  201. package/lib/components/select/option-group.vue.cjs +1 -0
  202. package/lib/components/select/option-group.vue2.cjs +1 -0
  203. package/lib/components/select/option.vue.cjs +1 -0
  204. package/lib/components/select/option.vue2.cjs +1 -0
  205. package/lib/components/select/options.cjs +1 -0
  206. package/lib/components/select/select-dropdown.vue.cjs +1 -0
  207. package/lib/components/select/select-dropdown.vue2.cjs +1 -0
  208. package/lib/components/select/select.vue.cjs +1 -0
  209. package/lib/components/select/select.vue2.cjs +1 -0
  210. package/lib/components/select/style/css.cjs +1 -0
  211. package/lib/components/select/style/index.cjs +1 -0
  212. package/lib/components/select/token.cjs +1 -0
  213. package/lib/components/select/useOption.cjs +1 -0
  214. package/lib/components/select/useSelect.cjs +1 -0
  215. package/lib/components/select-v2/select-dropdown.cjs +1 -1
  216. package/lib/components/select-v2/useSelect.cjs +1 -1
  217. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  218. package/lib/components/skeleton/index.cjs +1 -0
  219. package/lib/components/skeleton/skeleton-item.vue.cjs +1 -0
  220. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -0
  221. package/lib/components/skeleton/skeleton.vue.cjs +1 -0
  222. package/lib/components/skeleton/skeleton.vue2.cjs +1 -0
  223. package/lib/components/skeleton/style/css.cjs +1 -0
  224. package/lib/components/skeleton/style/index.cjs +1 -0
  225. package/lib/components/skeleton-item/style/css.cjs +1 -0
  226. package/lib/components/skeleton-item/style/index.cjs +1 -0
  227. package/lib/components/space/index.cjs +1 -0
  228. package/lib/components/space/item.cjs +1 -0
  229. package/lib/components/space/space.cjs +1 -0
  230. package/lib/components/space/style/css.cjs +1 -0
  231. package/lib/components/space/style/index.cjs +1 -0
  232. package/lib/components/space/use-space.cjs +1 -0
  233. package/lib/components/switch/switch.vue2.cjs +1 -1
  234. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  235. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  236. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  237. package/lib/components/time-picker/common/props.cjs +1 -1
  238. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  239. package/lib/components/time-picker/time-picker.cjs +1 -1
  240. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  241. package/lib/components/tooltip/content.vue2.cjs +1 -1
  242. package/lib/components/tree/index.cjs +1 -0
  243. package/lib/components/tree/model/node.cjs +1 -0
  244. package/lib/components/tree/model/tree-store.cjs +1 -0
  245. package/lib/components/tree/model/useDragNode.cjs +1 -0
  246. package/lib/components/tree/model/useKeydown.cjs +1 -0
  247. package/lib/components/tree/model/useNodeExpandEventBroadcast.cjs +1 -0
  248. package/lib/components/tree/model/util.cjs +1 -0
  249. package/lib/components/tree/style/css.cjs +1 -0
  250. package/lib/components/tree/style/index.cjs +1 -0
  251. package/lib/components/tree/tree-node-content.vue.cjs +1 -0
  252. package/lib/components/tree/tree-node-content.vue2.cjs +1 -0
  253. package/lib/components/tree/tree-node.vue.cjs +1 -0
  254. package/lib/components/tree/tree-node.vue2.cjs +1 -0
  255. package/lib/components/tree/tree.type.cjs +1 -0
  256. package/lib/components/tree/tree.vue.cjs +1 -0
  257. package/lib/components/tree/tree.vue2.cjs +1 -0
  258. package/lib/components/tree-select/cache-options.cjs +1 -0
  259. package/lib/components/tree-select/index.cjs +1 -0
  260. package/lib/components/tree-select/select.cjs +1 -0
  261. package/lib/components/tree-select/style/css.cjs +1 -0
  262. package/lib/components/tree-select/style/index.cjs +1 -0
  263. package/lib/components/tree-select/tree-select-option.cjs +1 -0
  264. package/lib/components/tree-select/tree-select.vue.cjs +1 -0
  265. package/lib/components/tree-select/tree-select.vue2.cjs +1 -0
  266. package/lib/components/tree-select/tree.cjs +1 -0
  267. package/lib/components/tree-select/utils.cjs +1 -0
  268. package/lib/hooks/index.cjs +1 -1
  269. package/lib/hooks/use-focus/index.cjs +1 -0
  270. package/lib/hooks/use-throttle-render/index.cjs +1 -0
  271. package/lib/index.cjs +1 -1
  272. package/lib/package.json.cjs +1 -1
  273. package/lib/utils/helper.cjs +1 -1
  274. package/lib/utils/index.cjs +1 -1
  275. package/package.json +1 -1
  276. package/tags.json +1 -1
  277. package/theme-style/base.css +1 -1
  278. package/theme-style/index.css +1 -1
  279. package/theme-style/src/alert.scss +1 -1
  280. package/theme-style/src/autocomplete.scss +2 -2
  281. package/theme-style/src/breadcrumb.scss +4 -4
  282. package/theme-style/src/calendar.scss +2 -2
  283. package/theme-style/src/card.scss +1 -1
  284. package/theme-style/src/carousel.scss +1 -1
  285. package/theme-style/src/cascader.scss +3 -3
  286. package/theme-style/src/check-tag.scss +3 -3
  287. package/theme-style/src/checkbox.scss +1 -1
  288. package/theme-style/src/color-picker.scss +2 -2
  289. package/theme-style/src/common/var.scss +527 -521
  290. package/theme-style/src/date-picker/date-picker.scss +1 -1
  291. package/theme-style/src/date-picker/date-range-picker.scss +2 -2
  292. package/theme-style/src/date-picker/date-table.scss +1 -1
  293. package/theme-style/src/date-picker/month-table.scss +2 -2
  294. package/theme-style/src/date-picker/picker-panel.scss +4 -5
  295. package/theme-style/src/date-picker/picker.scss +7 -9
  296. package/theme-style/src/date-picker/time-picker.scss +2 -2
  297. package/theme-style/src/date-picker/time-spinner.scss +6 -8
  298. package/theme-style/src/date-picker/year-table.scss +3 -3
  299. package/theme-style/src/date-time-select.scss +3 -4
  300. package/theme-style/src/descriptions-item.scss +4 -4
  301. package/theme-style/src/descriptions.scss +2 -2
  302. package/theme-style/src/header-layout.scss +1 -1
  303. package/theme-style/src/horizontal-menu.scss +27 -39
  304. package/theme-style/src/image-viewer.scss +1 -1
  305. package/theme-style/src/index.scss +3 -0
  306. package/theme-style/src/input-number.scss +1 -1
  307. package/theme-style/src/menu.scss +76 -66
  308. package/theme-style/src/mixins/_var.scss +2 -2
  309. package/theme-style/src/mixins/mixins.scss +2 -2
  310. package/theme-style/src/popconfirm.scss +16 -0
  311. package/theme-style/src/popper.scss +4 -2
  312. package/theme-style/src/progress.scss +1 -1
  313. package/theme-style/src/reset.scss +3 -3
  314. package/theme-style/src/result.scss +2 -2
  315. package/theme-style/src/select-dropdown-v2.scss +1 -1
  316. package/theme-style/src/select-dropdown.scss +1 -1
  317. package/theme-style/src/select-v2.scss +2 -2
  318. package/theme-style/src/select.scss +4 -5
  319. package/theme-style/src/side-menu.scss +0 -1
  320. package/theme-style/src/skeleton-item.scss +83 -0
  321. package/theme-style/src/skeleton.scss +44 -0
  322. package/theme-style/src/step.scss +10 -10
  323. package/theme-style/src/tabs.scss +15 -155
  324. package/theme-style/src/timeline-item.scss +2 -2
  325. package/theme-style/src/transfer.scss +5 -5
  326. package/theme-style/src/tree.scss +2 -5
  327. package/theme-style/src/upload.scss +11 -11
  328. package/theme-style/src/var.scss +1 -1
  329. package/theme-style/vft-alert.css +1 -1
  330. package/theme-style/vft-autocomplete.css +1 -1
  331. package/theme-style/vft-breadcrumb.css +1 -1
  332. package/theme-style/vft-calendar.css +1 -1
  333. package/theme-style/vft-card.css +1 -1
  334. package/theme-style/vft-carousel.css +1 -1
  335. package/theme-style/vft-cascader.css +1 -1
  336. package/theme-style/vft-check-tag.css +1 -1
  337. package/theme-style/vft-checkbox.css +1 -1
  338. package/theme-style/vft-color-picker.css +1 -1
  339. package/theme-style/vft-date-picker.css +1 -1
  340. package/theme-style/vft-date-time-select.css +1 -1
  341. package/theme-style/vft-descriptions-item.css +1 -1
  342. package/theme-style/vft-descriptions.css +1 -1
  343. package/theme-style/vft-header-layout.css +1 -1
  344. package/theme-style/vft-horizontal-menu.css +1 -1
  345. package/theme-style/vft-image-viewer.css +1 -1
  346. package/theme-style/vft-input-number.css +1 -1
  347. package/theme-style/vft-menu.css +1 -1
  348. package/theme-style/vft-popconfirm.css +1 -0
  349. package/theme-style/vft-popper.css +1 -1
  350. package/theme-style/vft-progress.css +1 -1
  351. package/theme-style/vft-reset.css +1 -1
  352. package/theme-style/vft-result.css +1 -1
  353. package/theme-style/vft-select-dropdown-v2.css +1 -1
  354. package/theme-style/vft-select-dropdown.css +1 -1
  355. package/theme-style/vft-select-v2.css +1 -1
  356. package/theme-style/vft-select.css +1 -1
  357. package/theme-style/vft-side-menu.css +1 -1
  358. package/theme-style/vft-skeleton-item.css +1 -0
  359. package/theme-style/vft-skeleton.css +1 -0
  360. package/theme-style/vft-step.css +1 -1
  361. package/theme-style/vft-tabs.css +1 -1
  362. package/theme-style/vft-time-picker.css +1 -1
  363. package/theme-style/vft-time-select.css +1 -1
  364. package/theme-style/vft-timeline-item.css +1 -1
  365. package/theme-style/vft-transfer.css +1 -1
  366. package/theme-style/vft-tree.css +1 -1
  367. package/theme-style/vft-upload.css +1 -1
  368. package/theme-style/vft-var.css +1 -1
  369. package/web-types.json +1 -1
@@ -2,10 +2,11 @@ import "@vft/utils";
2
2
  import "vue";
3
3
  import { buildProps as t, definePropType as e } from "../../../utils/vue/props/runtime.js";
4
4
  import "@vueuse/core";
5
+ import { componentSizes as a } from "../../../constants/size.js";
5
6
  import "../../../utils/ns-cover.js";
6
7
  import "lodash";
7
- import { disabledTimeListsProps as a } from "../props/shared.js";
8
- const u = t({
8
+ import { disabledTimeListsProps as r } from "../props/shared.js";
9
+ const f = t({
9
10
  /**
10
11
  * @description same as `id` in native input
11
12
  */
@@ -52,7 +53,8 @@ const u = t({
52
53
  * @description Custom clear icon component
53
54
  */
54
55
  clearIcon: {
55
- type: e([String, Object])
56
+ type: e([String, Object]),
57
+ default: "ico-ep:circle-close"
56
58
  },
57
59
  /**
58
60
  * @description whether the input is editable
@@ -72,7 +74,9 @@ const u = t({
72
74
  * @description size of Input
73
75
  */
74
76
  size: {
75
- type: Object
77
+ type: String,
78
+ values: a,
79
+ required: !1
76
80
  },
77
81
  /**
78
82
  * @description whether TimePicker is read only
@@ -143,7 +147,7 @@ const u = t({
143
147
  type: Boolean,
144
148
  default: !1
145
149
  },
146
- ...a,
150
+ ...r,
147
151
  /**
148
152
  * @description a function determining if a date is disabled with that date as its parameter. Should return a Boolean
149
153
  */
@@ -197,5 +201,5 @@ const u = t({
197
201
  unlinkPanels: Boolean
198
202
  });
199
203
  export {
200
- u as timePickerDefaultProps
204
+ f as timePickerDefaultProps
201
205
  };
@@ -6,8 +6,8 @@ import "@popperjs/core";
6
6
  import "../../../hooks/use-z-index/index.js";
7
7
  import "@vueuse/core";
8
8
  import { isArray as M } from "@vft/utils";
9
- import "../../../utils/ns-cover.js";
10
9
  import { EVENT_CODE as ve } from "../../../constants/aria.js";
10
+ import "../../../utils/ns-cover.js";
11
11
  import { panelTimeRangeProps as he } from "../props/panel-time-range.js";
12
12
  import { useTimePanel as ke } from "../composables/use-time-panel.js";
13
13
  import { useOldValue as Se, buildAvailableTimeSlotGetter as De } from "../composables/use-time-picker.js";
@@ -1,17 +1,17 @@
1
- import { defineComponent as p, ref as s, provide as u, createVNode as m, mergeProps as f } from "vue";
1
+ import { defineComponent as p, ref as f, provide as s, createVNode as m, mergeProps as u } from "vue";
2
2
  import d from "dayjs";
3
3
  import c from "dayjs/plugin/customParseFormat.js";
4
4
  import { DEFAULT_FORMATS_TIME as P } from "./constants.js";
5
5
  import _ from "./common/picker.vue2.js";
6
6
  import h from "./time-picker-com/panel-time-pick.vue2.js";
7
- import v from "./time-picker-com/panel-time-range.vue2.js";
8
- import { timePickerDefaultProps as O } from "./common/props.js";
7
+ import V from "./time-picker-com/panel-time-range.vue2.js";
8
+ import { timePickerDefaultProps as v } from "./common/props.js";
9
9
  d.extend(c);
10
- const I = /* @__PURE__ */ p({
11
- name: "ElTimePicker",
10
+ const R = /* @__PURE__ */ p({
11
+ name: "VftTimePicker",
12
12
  install: null,
13
13
  props: {
14
- ...O,
14
+ ...v,
15
15
  /**
16
16
  * @description whether to pick a time range
17
17
  */
@@ -22,8 +22,8 @@ const I = /* @__PURE__ */ p({
22
22
  },
23
23
  emits: ["update:modelValue"],
24
24
  setup(r, a) {
25
- const t = s(), [n, l] = r.isRange ? ["timerange", v] : ["time", h], i = (e) => a.emit("update:modelValue", e);
26
- return u("ElPopperOptions", r.popperOptions), a.expose({
25
+ const t = f(), [n, l] = r.isRange ? ["timerange", V] : ["time", h], i = (e) => a.emit("update:modelValue", e);
26
+ return s("VftPopperOptions", r.popperOptions), a.expose({
27
27
  /**
28
28
  * @description focus the Input component
29
29
  */
@@ -54,7 +54,7 @@ const I = /* @__PURE__ */ p({
54
54
  }
55
55
  }), () => {
56
56
  const e = r.format ?? P;
57
- return m(_, f(r, {
57
+ return m(_, u(r, {
58
58
  ref: t,
59
59
  type: n,
60
60
  format: e,
@@ -66,5 +66,5 @@ const I = /* @__PURE__ */ p({
66
66
  }
67
67
  });
68
68
  export {
69
- I as default
69
+ R as default
70
70
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, ref as E, computed as r, openBlock as a, createBlock as i, unref as n, withCtx as p, normalizeClass as S, resolveDynamicComponent as h, createCommentVNode as w, createElementBlock as D, Fragment as H, renderList as N } from "vue";
1
+ import { defineComponent as v, ref as E, computed as r, openBlock as s, createBlock as u, unref as n, withCtx as f, normalizeClass as S, createCommentVNode as h, createElementBlock as w, Fragment as H, renderList as N } from "vue";
2
2
  import d from "dayjs";
3
3
  import O from "dayjs/plugin/customParseFormat.js";
4
4
  import b from "../select-v2/index.js";
@@ -11,59 +11,59 @@ import "../../hooks/use-z-index/index.js";
11
11
  import "@vueuse/core";
12
12
  import "@vft/utils";
13
13
  import "../../utils/ns-cover.js";
14
- import { timeSelectProps as L } from "./time-select.js";
15
- import { parseTime as m, formatTime as s, compareTime as c, nextTime as U } from "./utils.js";
16
- import { useFormDisabled as q } from "../form/hooks/use-form-common-props.js";
17
- const A = v({
14
+ import { timeSelectProps as D } from "./time-select.js";
15
+ import { parseTime as a, formatTime as m, compareTime as p, nextTime as L } from "./utils.js";
16
+ import { useFormDisabled as U } from "../form/hooks/use-form-common-props.js";
17
+ const q = v({
18
18
  name: "ElTimeSelect"
19
- }), ae = /* @__PURE__ */ v({
20
- ...A,
21
- props: L,
19
+ }), ne = /* @__PURE__ */ v({
20
+ ...q,
21
+ props: D,
22
22
  emits: ["change", "blur", "focus", "update:modelValue"],
23
23
  setup(T, { expose: k }) {
24
24
  const o = T;
25
25
  d.extend(O);
26
- const { Option: C } = b, V = j("input"), u = E(), y = q(), I = r(() => o.modelValue), g = r(() => {
27
- const e = m(o.start);
28
- return e ? s(e) : null;
29
- }), f = r(() => {
30
- const e = m(o.end);
31
- return e ? s(e) : null;
26
+ const { Option: V } = b, C = j("input"), i = E(), I = U(), g = r(() => o.modelValue), y = r(() => {
27
+ const e = a(o.start);
28
+ return e ? m(e) : null;
29
+ }), c = r(() => {
30
+ const e = a(o.end);
31
+ return e ? m(e) : null;
32
32
  }), z = r(() => {
33
- const e = m(o.step);
34
- return e ? s(e) : null;
33
+ const e = a(o.step);
34
+ return e ? m(e) : null;
35
35
  }), B = r(() => {
36
- const e = m(o.minTime || "");
37
- return e ? s(e) : null;
36
+ const e = a(o.minTime || "");
37
+ return e ? m(e) : null;
38
38
  }), F = r(() => {
39
- const e = m(o.maxTime || "");
40
- return e ? s(e) : null;
39
+ const e = a(o.maxTime || "");
40
+ return e ? m(e) : null;
41
41
  }), $ = r(() => {
42
42
  const e = [];
43
43
  if (o.start && o.end && o.step) {
44
- let t = g.value, l;
45
- for (; t && f.value && c(t, f.value) <= 0; )
44
+ let t = y.value, l;
45
+ for (; t && c.value && p(t, c.value) <= 0; )
46
46
  l = d(t, "HH:mm").format(o.format), e.push({
47
47
  value: l,
48
- disabled: c(t, B.value || "-1:-1") <= 0 || c(t, F.value || "100:100") >= 0
49
- }), t = U(t, z.value);
48
+ disabled: p(t, B.value || "-1:-1") <= 0 || p(t, F.value || "100:100") >= 0
49
+ }), t = L(t, z.value);
50
50
  }
51
51
  return e;
52
52
  });
53
53
  return k({
54
54
  blur: () => {
55
55
  var e, t;
56
- (t = (e = u.value) == null ? void 0 : e.blur) == null || t.call(e);
56
+ (t = (e = i.value) == null ? void 0 : e.blur) == null || t.call(e);
57
57
  },
58
58
  focus: () => {
59
59
  var e, t;
60
- (t = (e = u.value) == null ? void 0 : e.focus) == null || t.call(e);
60
+ (t = (e = i.value) == null ? void 0 : e.focus) == null || t.call(e);
61
61
  }
62
- }), (e, t) => (a(), i(n(b), {
62
+ }), (e, t) => (s(), u(n(b), {
63
63
  ref_key: "select",
64
- ref: u,
65
- "model-value": n(I),
66
- disabled: n(y),
64
+ ref: i,
65
+ "model-value": n(g),
66
+ disabled: n(I),
67
67
  clearable: e.clearable,
68
68
  "clear-icon": e.clearIcon,
69
69
  size: e.size,
@@ -76,19 +76,15 @@ const A = v({
76
76
  onBlur: t[2] || (t[2] = (l) => e.$emit("blur", l)),
77
77
  onFocus: t[3] || (t[3] = (l) => e.$emit("focus", l))
78
78
  }, {
79
- prefix: p(() => [
80
- e.prefixIcon ? (a(), i(n(P), {
79
+ prefix: f(() => [
80
+ e.prefixIcon ? (s(), u(n(P), {
81
81
  key: 0,
82
- class: S(n(V).e("prefix-icon"))
83
- }, {
84
- default: p(() => [
85
- (a(), i(h(e.prefixIcon)))
86
- ]),
87
- _: 1
88
- }, 8, ["class"])) : w("", !0)
82
+ icon: e.prefixIcon,
83
+ class: S(n(C).e("prefix-icon"))
84
+ }, null, 8, ["icon", "class"])) : h("", !0)
89
85
  ]),
90
- default: p(() => [
91
- (a(!0), D(H, null, N(n($), (l) => (a(), i(n(C), {
86
+ default: f(() => [
87
+ (s(!0), w(H, null, N(n($), (l) => (s(), u(n(V), {
92
88
  key: l.value,
93
89
  label: l.value,
94
90
  value: l.value,
@@ -100,5 +96,5 @@ const A = v({
100
96
  }
101
97
  });
102
98
  export {
103
- ae as default
99
+ ne as default
104
100
  };
@@ -62,7 +62,7 @@ const ae = E({
62
62
  onHide: S,
63
63
  onBeforeShow: f,
64
64
  onBeforeHide: d
65
- } = U(ne, void 0), L = o(() => e.transition || `${w.namespace.value}-fade-in-linear`), I = o(() => process.env.NODE_ENV === "test" ? !0 : e.persistent);
65
+ } = U(ne, void 0), L = o(() => e.transition ?? `${w.namespace.value}-fade-in-linear`), I = o(() => process.env.NODE_ENV === "test" ? !0 : e.persistent);
66
66
  W(() => {
67
67
  c.value = !0;
68
68
  });
@@ -0,0 +1,14 @@
1
+ import e from "./tree.vue.js";
2
+ import { dragEventsKey as s, useDragNodeHandler as d } from "./model/useDragNode.js";
3
+ import { getChildState as l } from "./model/node.js";
4
+ e.install = (t) => {
5
+ t.component(e.name, e);
6
+ };
7
+ const r = e, a = r;
8
+ export {
9
+ a as VftTree,
10
+ r as default,
11
+ s as dragEventsKey,
12
+ l as getChildState,
13
+ d as useDragNodeHandler
14
+ };
@@ -0,0 +1,248 @@
1
+ import { reactive as v } from "vue";
2
+ import { hasOwn as D } from "@vft/utils";
3
+ import { markNodeData as C, NODE_KEY as y } from "./util.js";
4
+ const N = (r) => {
5
+ let e = !0, t = !0, s = !0;
6
+ for (let i = 0, a = r.length; i < a; i++) {
7
+ const h = r[i];
8
+ (h.checked !== !0 || h.indeterminate) && (e = !1, h.disabled || (s = !1)), (h.checked !== !1 || h.indeterminate) && (t = !1);
9
+ }
10
+ return { all: e, none: t, allWithoutDisable: s, half: !e && !t };
11
+ }, o = function(r) {
12
+ if (r.childNodes.length === 0 || r.loading)
13
+ return;
14
+ const { all: e, none: t, half: s } = N(r.childNodes);
15
+ e ? (r.checked = !0, r.indeterminate = !1) : s ? (r.checked = !1, r.indeterminate = !0) : t && (r.checked = !1, r.indeterminate = !1);
16
+ const i = r.parent;
17
+ !i || i.level === 0 || r.store.checkStrictly || o(i);
18
+ }, l = function(r, e) {
19
+ const t = r.store.props, s = r.data || {}, i = t[e];
20
+ if (typeof i == "function")
21
+ return i(s, r);
22
+ if (typeof i == "string")
23
+ return s[i];
24
+ if (typeof i > "u") {
25
+ const a = s[e];
26
+ return a === void 0 ? "" : a;
27
+ }
28
+ };
29
+ let L = 0;
30
+ class f {
31
+ constructor(e) {
32
+ this.id = L++, this.text = null, this.checked = !1, this.indeterminate = !1, this.data = null, this.expanded = !1, this.parent = null, this.visible = !0, this.isCurrent = !1, this.canFocus = !1;
33
+ for (const t in e)
34
+ D(e, t) && (this[t] = e[t]);
35
+ this.level = 0, this.loaded = !1, this.childNodes = [], this.loading = !1, this.parent && (this.level = this.parent.level + 1);
36
+ }
37
+ initialize() {
38
+ const e = this.store;
39
+ if (!e)
40
+ throw new Error("[Node]store is required!");
41
+ e.registerNode(this);
42
+ const t = e.props;
43
+ if (t && typeof t.isLeaf < "u") {
44
+ const a = l(this, "isLeaf");
45
+ typeof a == "boolean" && (this.isLeafByUser = a);
46
+ }
47
+ if (e.lazy !== !0 && this.data ? (this.setData(this.data), e.defaultExpandAll && (this.expanded = !0, this.canFocus = !0)) : this.level > 0 && e.lazy && e.defaultExpandAll && this.expand(), Array.isArray(this.data) || C(this, this.data), !this.data)
48
+ return;
49
+ const s = e.defaultExpandedKeys, i = e.key;
50
+ i && s && s.includes(this.key) && this.expand(null, e.autoExpandParent), i && e.currentNodeKey !== void 0 && this.key === e.currentNodeKey && (e.currentNode = this, e.currentNode.isCurrent = !0), e.lazy && e._initDefaultCheckedNode(this), this.updateLeafState(), this.parent && (this.level === 1 || this.parent.expanded === !0) && (this.canFocus = !0);
51
+ }
52
+ setData(e) {
53
+ Array.isArray(e) || C(this, e), this.data = e, this.childNodes = [];
54
+ let t;
55
+ this.level === 0 && Array.isArray(this.data) ? t = this.data : t = l(this, "children") || [];
56
+ for (let s = 0, i = t.length; s < i; s++)
57
+ this.insertChild({ data: t[s] });
58
+ }
59
+ get label() {
60
+ return l(this, "label");
61
+ }
62
+ get key() {
63
+ const e = this.store.key;
64
+ return this.data ? this.data[e] : null;
65
+ }
66
+ get disabled() {
67
+ return l(this, "disabled");
68
+ }
69
+ get nextSibling() {
70
+ const e = this.parent;
71
+ if (e) {
72
+ const t = e.childNodes.indexOf(this);
73
+ if (t > -1)
74
+ return e.childNodes[t + 1];
75
+ }
76
+ return null;
77
+ }
78
+ get previousSibling() {
79
+ const e = this.parent;
80
+ if (e) {
81
+ const t = e.childNodes.indexOf(this);
82
+ if (t > -1)
83
+ return t > 0 ? e.childNodes[t - 1] : null;
84
+ }
85
+ return null;
86
+ }
87
+ contains(e, t = !0) {
88
+ return (this.childNodes || []).some(
89
+ (s) => s === e || t && s.contains(e)
90
+ );
91
+ }
92
+ remove() {
93
+ const e = this.parent;
94
+ e && e.removeChild(this);
95
+ }
96
+ insertChild(e, t, s) {
97
+ if (!e)
98
+ throw new Error("InsertChild error: child is required.");
99
+ if (!(e instanceof f)) {
100
+ if (!s) {
101
+ const i = this.getChildren(!0);
102
+ i.includes(e.data) || (typeof t > "u" || t < 0 ? i.push(e.data) : i.splice(t, 0, e.data));
103
+ }
104
+ Object.assign(e, {
105
+ parent: this,
106
+ store: this.store
107
+ }), e = v(new f(e)), e instanceof f && e.initialize();
108
+ }
109
+ e.level = this.level + 1, typeof t > "u" || t < 0 ? this.childNodes.push(e) : this.childNodes.splice(t, 0, e), this.updateLeafState();
110
+ }
111
+ insertBefore(e, t) {
112
+ let s;
113
+ t && (s = this.childNodes.indexOf(t)), this.insertChild(e, s);
114
+ }
115
+ insertAfter(e, t) {
116
+ let s;
117
+ t && (s = this.childNodes.indexOf(t), s !== -1 && (s += 1)), this.insertChild(e, s);
118
+ }
119
+ removeChild(e) {
120
+ const t = this.getChildren() || [], s = t.indexOf(e.data);
121
+ s > -1 && t.splice(s, 1);
122
+ const i = this.childNodes.indexOf(e);
123
+ i > -1 && (this.store && this.store.deregisterNode(e), e.parent = null, this.childNodes.splice(i, 1)), this.updateLeafState();
124
+ }
125
+ removeChildByData(e) {
126
+ let t = null;
127
+ for (let s = 0; s < this.childNodes.length; s++)
128
+ if (this.childNodes[s].data === e) {
129
+ t = this.childNodes[s];
130
+ break;
131
+ }
132
+ t && this.removeChild(t);
133
+ }
134
+ expand(e, t) {
135
+ const s = () => {
136
+ if (t) {
137
+ let i = this.parent;
138
+ for (; i.level > 0; )
139
+ i.expanded = !0, i = i.parent;
140
+ }
141
+ this.expanded = !0, e && e(), this.childNodes.forEach((i) => {
142
+ i.canFocus = !0;
143
+ });
144
+ };
145
+ this.shouldLoadData() ? this.loadData((i) => {
146
+ Array.isArray(i) && (this.checked ? this.setChecked(!0, !0) : this.store.checkStrictly || o(this), s());
147
+ }) : s();
148
+ }
149
+ doCreateChildren(e, t = {}) {
150
+ e.forEach((s) => {
151
+ this.insertChild(
152
+ Object.assign({ data: s }, t),
153
+ void 0,
154
+ !0
155
+ );
156
+ });
157
+ }
158
+ collapse() {
159
+ this.expanded = !1, this.childNodes.forEach((e) => {
160
+ e.canFocus = !1;
161
+ });
162
+ }
163
+ shouldLoadData() {
164
+ return this.store.lazy === !0 && this.store.load && !this.loaded;
165
+ }
166
+ updateLeafState() {
167
+ if (this.store.lazy === !0 && this.loaded !== !0 && typeof this.isLeafByUser < "u") {
168
+ this.isLeaf = this.isLeafByUser;
169
+ return;
170
+ }
171
+ const e = this.childNodes;
172
+ if (!this.store.lazy || this.store.lazy === !0 && this.loaded === !0) {
173
+ this.isLeaf = !e || e.length === 0;
174
+ return;
175
+ }
176
+ this.isLeaf = !1;
177
+ }
178
+ setChecked(e, t, s, i) {
179
+ if (this.indeterminate = e === "half", this.checked = e === !0, this.store.checkStrictly)
180
+ return;
181
+ if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
182
+ const { all: h, allWithoutDisable: n } = N(this.childNodes);
183
+ !this.isLeaf && !h && n && (this.checked = !1, e = !1);
184
+ const c = () => {
185
+ if (t) {
186
+ const d = this.childNodes;
187
+ for (let u = 0, x = d.length; u < x; u++) {
188
+ const p = d[u];
189
+ i = i || e !== !1;
190
+ const m = p.disabled ? p.checked : i;
191
+ p.setChecked(m, t, !0, i);
192
+ }
193
+ const { half: k, all: g } = N(d);
194
+ g || (this.checked = g, this.indeterminate = k);
195
+ }
196
+ };
197
+ if (this.shouldLoadData()) {
198
+ this.loadData(
199
+ () => {
200
+ c(), o(this);
201
+ },
202
+ {
203
+ checked: e !== !1
204
+ }
205
+ );
206
+ return;
207
+ } else
208
+ c();
209
+ }
210
+ const a = this.parent;
211
+ !a || a.level === 0 || s || o(a);
212
+ }
213
+ getChildren(e = !1) {
214
+ if (this.level === 0)
215
+ return this.data;
216
+ const t = this.data;
217
+ if (!t)
218
+ return null;
219
+ const s = this.store.props;
220
+ let i = "children";
221
+ return s && (i = s.children || "children"), t[i] === void 0 && (t[i] = null), e && !t[i] && (t[i] = []), t[i];
222
+ }
223
+ updateChildren() {
224
+ const e = this.getChildren() || [], t = this.childNodes.map((a) => a.data), s = {}, i = [];
225
+ e.forEach((a, h) => {
226
+ const n = a[y];
227
+ !!n && t.findIndex((d) => d[y] === n) >= 0 ? s[n] = { index: h, data: a } : i.push({ index: h, data: a });
228
+ }), this.store.lazy || t.forEach((a) => {
229
+ s[a[y]] || this.removeChildByData(a);
230
+ }), i.forEach(({ index: a, data: h }) => {
231
+ this.insertChild({ data: h }, a);
232
+ }), this.updateLeafState();
233
+ }
234
+ loadData(e, t = {}) {
235
+ if (this.store.lazy === !0 && this.store.load && !this.loaded && (!this.loading || Object.keys(t).length)) {
236
+ this.loading = !0;
237
+ const s = (i) => {
238
+ this.childNodes = [], this.doCreateChildren(i, t), this.loaded = !0, this.loading = !1, this.updateLeafState(), e && e.call(this, i);
239
+ };
240
+ this.store.load(this, s);
241
+ } else
242
+ e && e.call(this);
243
+ }
244
+ }
245
+ export {
246
+ f as default,
247
+ N as getChildState
248
+ };