zartui 3.0.6 → 3.0.8

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 (446) hide show
  1. package/es/button/Button.d.ts +3 -0
  2. package/es/button/Button.mjs +2 -0
  3. package/es/button/index.d.ts +2 -0
  4. package/es/calendar/Calendar.d.ts +23 -33
  5. package/es/calendar/Calendar.mjs +124 -31
  6. package/es/calendar/CalendarDay.mjs +1 -1
  7. package/es/calendar/CalendarHeader.d.ts +15 -1
  8. package/es/calendar/CalendarHeader.mjs +106 -4
  9. package/es/calendar/CalendarMonth.d.ts +23 -24
  10. package/es/calendar/CalendarMonth.mjs +49 -8
  11. package/es/calendar/index.css +1 -1
  12. package/es/calendar/index.d.ts +15 -22
  13. package/es/calendar/types.d.ts +3 -1
  14. package/es/calendar/utils.d.ts +4 -1
  15. package/es/calendar/utils.mjs +23 -3
  16. package/es/cascader/Cascader.mjs +1 -3
  17. package/es/cascader/index.css +1 -1
  18. package/es/checkbox/Checkbox.d.ts +1 -1
  19. package/es/checkbox/Checker.d.ts +2 -2
  20. package/es/checkbox/index.d.ts +1 -1
  21. package/es/collapse-item/CollapseItem.mjs +3 -1
  22. package/es/date-time-picker/DateTimePicker.d.ts +1 -1
  23. package/es/date-time-picker/DateTimePicker.mjs +9 -3
  24. package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  25. package/es/date-time-picker/index.d.ts +1 -1
  26. package/es/dialog/Dialog.d.ts +4 -0
  27. package/es/dialog/Dialog.mjs +24 -9
  28. package/es/dialog/index.css +1 -1
  29. package/es/dialog/index.d.ts +3 -0
  30. package/es/dialog/types.d.ts +1 -0
  31. package/es/divider/index.css +1 -1
  32. package/es/dropdown-item/DropdownItem.mjs +7 -4
  33. package/es/dropdown-menu/DropdownMenu.mjs +2 -2
  34. package/es/dropdown-menu/types.d.ts +1 -0
  35. package/es/empty/Images.mjs +9 -9
  36. package/es/empty/index.css +1 -1
  37. package/es/field/Field.d.ts +3 -0
  38. package/es/field/Field.mjs +2 -1
  39. package/es/field/index.d.ts +2 -0
  40. package/es/hierarchy-select/Breadcrumb.d.ts +43 -0
  41. package/es/hierarchy-select/Breadcrumb.mjs +56 -0
  42. package/es/hierarchy-select/HierarchySelect.d.ts +104 -0
  43. package/es/hierarchy-select/HierarchySelect.mjs +221 -0
  44. package/es/hierarchy-select/index.css +1 -0
  45. package/es/hierarchy-select/index.d.ts +79 -0
  46. package/es/hierarchy-select/index.mjs +8 -0
  47. package/es/hierarchy-select/style/index.d.ts +1 -0
  48. package/es/hierarchy-select/style/index.mjs +8 -0
  49. package/es/hierarchy-select/svg/SubIcon.d.ts +1 -0
  50. package/es/hierarchy-select/svg/SubIcon.mjs +33 -0
  51. package/es/hierarchy-select/types.d.ts +7 -0
  52. package/es/hierarchy-select/types.mjs +0 -0
  53. package/es/icon/config.mjs +4 -1
  54. package/es/icon/index.css +1 -1
  55. package/es/image-preview/ImagePreview.mjs +1 -1
  56. package/es/index-anchor/IndexAnchor.d.ts +11 -0
  57. package/es/index-anchor/IndexAnchor.mjs +88 -0
  58. package/es/index-anchor/index.css +1 -0
  59. package/es/index-anchor/index.d.ts +14 -0
  60. package/es/index-anchor/index.mjs +10 -0
  61. package/es/index-anchor/style/index.d.ts +1 -0
  62. package/es/index-anchor/style/index.mjs +3 -0
  63. package/es/index-anchor/types.d.ts +11 -0
  64. package/es/index-anchor/types.mjs +0 -0
  65. package/es/index-bar/IndexBar.d.ts +64 -0
  66. package/es/index-bar/IndexBar.mjs +275 -0
  67. package/es/index-bar/index.css +1 -0
  68. package/es/index-bar/index.d.ts +50 -0
  69. package/es/index-bar/index.mjs +10 -0
  70. package/es/index-bar/style/index.d.ts +1 -0
  71. package/es/index-bar/style/index.mjs +2 -0
  72. package/es/index-bar/types.d.ts +16 -0
  73. package/es/index-bar/types.mjs +0 -0
  74. package/es/index.d.ts +8 -1
  75. package/es/index.mjs +22 -1
  76. package/es/lazyload/vue-lazyload/index.mjs +5 -0
  77. package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
  78. package/es/lazyload/vue-lazyload/listener.mjs +45 -0
  79. package/es/list/List.mjs +2 -4
  80. package/es/list/index.css +1 -1
  81. package/es/locale/lang/en-US.d.ts +7 -23
  82. package/es/locale/lang/en-US.mjs +7 -23
  83. package/es/locale/lang/zh-CN.d.ts +7 -23
  84. package/es/locale/lang/zh-CN.mjs +7 -23
  85. package/es/media-picker/MediaPicker.mjs +20 -0
  86. package/es/media-picker/image/PickFileIcon.mjs +1 -1
  87. package/es/media-picker/image/PickPhotoIcon.mjs +1 -1
  88. package/es/media-picker/image/TakeAudioIcon.mjs +1 -1
  89. package/es/media-picker/image/TakePhotoIcon.mjs +1 -1
  90. package/es/media-picker/image/TakeVideoIcon.mjs +1 -1
  91. package/es/media-picker/index.css +1 -1
  92. package/es/media-picker/util/media-util.mjs +3 -0
  93. package/es/media-picker/watermark/image-processor.mjs +10 -6
  94. package/es/media-picker/watermark/resize-options.mjs +1 -0
  95. package/es/media-picker/watermark/watermark.mjs +4 -0
  96. package/es/multiple-picker/MultiplePicker.d.ts +4 -4
  97. package/es/multiple-picker/MultiplePicker.mjs +3 -3
  98. package/es/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  99. package/es/multiple-picker/MultiplePickerOptions.mjs +3 -3
  100. package/es/multiple-picker/index.d.ts +3 -3
  101. package/es/notice-bar/index.css +1 -1
  102. package/es/overlay/index.d.ts +1 -1
  103. package/es/picker/Picker.mjs +7 -4
  104. package/es/picker/PickerToolbar.mjs +1 -0
  105. package/es/popover/Popover.d.ts +13 -0
  106. package/es/popover/Popover.mjs +99 -4
  107. package/es/popover/index.css +1 -1
  108. package/es/popover/index.d.ts +9 -0
  109. package/es/popup/Popup.mjs +1 -0
  110. package/es/popup/index.css +1 -1
  111. package/es/popup/shared.mjs +12 -0
  112. package/es/radio/Radio.d.ts +1 -1
  113. package/es/radio/index.d.ts +1 -1
  114. package/es/rate/index.css +1 -1
  115. package/es/search/Search.d.ts +1 -1
  116. package/es/search/Search.mjs +1 -0
  117. package/es/search/index.d.ts +1 -1
  118. package/es/signature/Signature.mjs +13 -10
  119. package/es/signature/index.css +1 -1
  120. package/es/step/Step.mjs +10 -6
  121. package/es/step/index.css +1 -1
  122. package/es/stepper/Stepper.mjs +2 -0
  123. package/es/stepper/index.css +1 -1
  124. package/es/steps/index.css +1 -1
  125. package/es/sticky/Sticky.mjs +2 -0
  126. package/es/style/base.css +1 -1
  127. package/es/style/css-variables.css +1 -1
  128. package/es/swipe/Swipe.d.ts +3 -1
  129. package/es/swipe/Swipe.mjs +19 -2
  130. package/es/swipe/index.d.ts +3 -1
  131. package/es/swipe-cell/SwipeCell.d.ts +44 -0
  132. package/es/swipe-cell/SwipeCell.mjs +163 -0
  133. package/es/swipe-cell/index.css +1 -0
  134. package/es/swipe-cell/index.d.ts +39 -0
  135. package/es/swipe-cell/index.mjs +10 -0
  136. package/es/swipe-cell/style/index.d.ts +1 -0
  137. package/es/swipe-cell/style/index.mjs +2 -0
  138. package/es/swipe-cell/types.d.ts +9 -0
  139. package/es/swipe-cell/types.mjs +0 -0
  140. package/es/switch/index.css +1 -1
  141. package/es/tabbar-item/index.css +1 -1
  142. package/es/table/Table.d.ts +118 -0
  143. package/es/table/Table.mjs +209 -0
  144. package/es/table/index.css +1 -0
  145. package/es/table/index.d.ts +77 -0
  146. package/es/table/index.mjs +10 -0
  147. package/es/table/style/index.d.ts +1 -0
  148. package/es/table/style/index.mjs +4 -0
  149. package/es/table/types.d.ts +5 -0
  150. package/es/table/types.mjs +8 -0
  151. package/es/tabs/Tabs.mjs +2 -0
  152. package/es/tabs/index.css +1 -1
  153. package/es/tag/Tag.d.ts +21 -1
  154. package/es/tag/Tag.mjs +63 -10
  155. package/es/tag/index.css +1 -1
  156. package/es/tag/index.d.ts +15 -1
  157. package/es/tag/style/index.mjs +1 -0
  158. package/es/text-ellipsis/TextEllipsis.d.ts +76 -0
  159. package/es/text-ellipsis/TextEllipsis.mjs +118 -0
  160. package/es/text-ellipsis/index.css +1 -0
  161. package/es/text-ellipsis/index.d.ts +60 -0
  162. package/es/text-ellipsis/index.mjs +10 -0
  163. package/es/text-ellipsis/style/index.d.ts +1 -0
  164. package/es/text-ellipsis/style/index.mjs +2 -0
  165. package/es/text-ellipsis/types.d.ts +3 -0
  166. package/es/text-ellipsis/types.mjs +0 -0
  167. package/es/timeline/Timeline.d.ts +113 -0
  168. package/es/timeline/Timeline.mjs +162 -0
  169. package/es/timeline/index.css +1 -0
  170. package/es/timeline/index.d.ts +75 -0
  171. package/es/timeline/index.mjs +10 -0
  172. package/es/timeline/style/index.d.ts +1 -0
  173. package/es/timeline/style/index.mjs +4 -0
  174. package/es/uploader/Uploader.d.ts +1 -1
  175. package/es/uploader/UploaderPreviewItem.d.ts +1 -1
  176. package/es/uploader/index.d.ts +1 -1
  177. package/es/uploader/utils.mjs +1 -1
  178. package/es/utils/dom.d.ts +1 -0
  179. package/es/utils/dom.mjs +11 -0
  180. package/lib/action-sheet/index.js +4 -0
  181. package/lib/avatar/Avatar.js +4 -0
  182. package/lib/avatar/index.js +4 -0
  183. package/lib/badge/index.js +4 -0
  184. package/lib/button/Button.d.ts +3 -0
  185. package/lib/button/Button.js +2 -0
  186. package/lib/button/index.d.ts +2 -0
  187. package/lib/button/index.js +4 -0
  188. package/lib/calendar/Calendar.d.ts +23 -33
  189. package/lib/calendar/Calendar.js +127 -30
  190. package/lib/calendar/CalendarDay.js +1 -1
  191. package/lib/calendar/CalendarHeader.d.ts +15 -1
  192. package/lib/calendar/CalendarHeader.js +106 -4
  193. package/lib/calendar/CalendarMonth.d.ts +23 -24
  194. package/lib/calendar/CalendarMonth.js +52 -7
  195. package/lib/calendar/index.css +1 -1
  196. package/lib/calendar/index.d.ts +15 -22
  197. package/lib/calendar/index.js +4 -0
  198. package/lib/calendar/types.d.ts +3 -1
  199. package/lib/calendar/utils.d.ts +4 -1
  200. package/lib/calendar/utils.js +23 -3
  201. package/lib/cascader/Cascader.js +5 -3
  202. package/lib/cascader/index.css +1 -1
  203. package/lib/cascader/index.js +4 -0
  204. package/lib/cell/index.js +4 -0
  205. package/lib/cell-group/index.js +4 -0
  206. package/lib/checkbox/Checkbox.d.ts +1 -1
  207. package/lib/checkbox/Checkbox.js +4 -0
  208. package/lib/checkbox/Checker.d.ts +2 -2
  209. package/lib/checkbox/index.d.ts +1 -1
  210. package/lib/checkbox/index.js +4 -0
  211. package/lib/checkbox-group/index.js +4 -0
  212. package/lib/col/index.js +4 -0
  213. package/lib/collapse/index.js +4 -0
  214. package/lib/collapse-item/CollapseItem.js +7 -1
  215. package/lib/collapse-item/index.js +4 -0
  216. package/lib/config-provider/index.js +4 -0
  217. package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
  218. package/lib/date-time-picker/DateTimePicker.js +13 -3
  219. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  220. package/lib/date-time-picker/DateTimePickerWrapper.js +4 -0
  221. package/lib/date-time-picker/index.d.ts +1 -1
  222. package/lib/date-time-picker/index.js +4 -0
  223. package/lib/dialog/Dialog.d.ts +4 -0
  224. package/lib/dialog/Dialog.js +24 -9
  225. package/lib/dialog/function-call.js +4 -0
  226. package/lib/dialog/index.css +1 -1
  227. package/lib/dialog/index.d.ts +3 -0
  228. package/lib/dialog/index.js +4 -0
  229. package/lib/dialog/types.d.ts +1 -0
  230. package/lib/divider/index.css +1 -1
  231. package/lib/divider/index.js +4 -0
  232. package/lib/dropdown-item/DropdownItem.js +6 -3
  233. package/lib/dropdown-item/index.js +4 -0
  234. package/lib/dropdown-menu/DropdownMenu.js +6 -2
  235. package/lib/dropdown-menu/index.js +4 -0
  236. package/lib/dropdown-menu/types.d.ts +1 -0
  237. package/lib/empty/Images.js +9 -9
  238. package/lib/empty/index.css +1 -1
  239. package/lib/empty/index.js +4 -0
  240. package/lib/field/Field.d.ts +3 -0
  241. package/lib/field/Field.js +2 -1
  242. package/lib/field/index.d.ts +2 -0
  243. package/lib/field/index.js +4 -0
  244. package/lib/form/index.js +4 -0
  245. package/lib/grid/index.js +4 -0
  246. package/lib/grid-item/index.js +4 -0
  247. package/lib/hierarchy-select/Breadcrumb.d.ts +43 -0
  248. package/lib/hierarchy-select/Breadcrumb.js +85 -0
  249. package/lib/hierarchy-select/HierarchySelect.d.ts +104 -0
  250. package/lib/hierarchy-select/HierarchySelect.js +250 -0
  251. package/lib/hierarchy-select/index.css +1 -0
  252. package/lib/hierarchy-select/index.d.ts +79 -0
  253. package/lib/hierarchy-select/index.js +37 -0
  254. package/lib/hierarchy-select/style/index.d.ts +1 -0
  255. package/lib/hierarchy-select/style/index.js +8 -0
  256. package/lib/hierarchy-select/svg/SubIcon.d.ts +1 -0
  257. package/lib/hierarchy-select/svg/SubIcon.js +52 -0
  258. package/lib/hierarchy-select/types.d.ts +7 -0
  259. package/lib/hierarchy-select/types.js +15 -0
  260. package/lib/icon/config.js +4 -1
  261. package/lib/icon/index.css +1 -1
  262. package/lib/icon/index.js +4 -0
  263. package/lib/image/index.js +4 -0
  264. package/lib/image-preview/ImagePreview.js +5 -1
  265. package/lib/image-preview/function-call.js +4 -0
  266. package/lib/image-preview/index.js +4 -0
  267. package/lib/index-anchor/IndexAnchor.d.ts +11 -0
  268. package/lib/index-anchor/IndexAnchor.js +107 -0
  269. package/lib/index-anchor/index.css +1 -0
  270. package/lib/index-anchor/index.d.ts +14 -0
  271. package/lib/index-anchor/index.js +39 -0
  272. package/lib/index-anchor/style/index.d.ts +1 -0
  273. package/lib/index-anchor/style/index.js +3 -0
  274. package/lib/index-anchor/types.d.ts +11 -0
  275. package/lib/index-anchor/types.js +15 -0
  276. package/lib/index-bar/IndexBar.d.ts +64 -0
  277. package/lib/index-bar/IndexBar.js +294 -0
  278. package/lib/index-bar/index.css +1 -0
  279. package/lib/index-bar/index.d.ts +50 -0
  280. package/lib/index-bar/index.js +39 -0
  281. package/lib/index-bar/style/index.d.ts +1 -0
  282. package/lib/index-bar/style/index.js +2 -0
  283. package/lib/index-bar/types.d.ts +16 -0
  284. package/lib/index-bar/types.js +15 -0
  285. package/lib/index.css +1 -1
  286. package/lib/index.d.ts +8 -1
  287. package/lib/index.js +22 -1
  288. package/lib/lazyload/vue-lazyload/index.js +9 -0
  289. package/lib/lazyload/vue-lazyload/lazy.js +85 -0
  290. package/lib/lazyload/vue-lazyload/listener.js +45 -0
  291. package/lib/list/List.js +2 -4
  292. package/lib/list/index.css +1 -1
  293. package/lib/list/index.js +4 -0
  294. package/lib/loading/index.js +4 -0
  295. package/lib/locale/index.js +4 -0
  296. package/lib/locale/lang/en-US.d.ts +7 -23
  297. package/lib/locale/lang/en-US.js +7 -23
  298. package/lib/locale/lang/zh-CN.d.ts +7 -23
  299. package/lib/locale/lang/zh-CN.js +7 -23
  300. package/lib/media-picker/MediaPicker.js +24 -0
  301. package/lib/media-picker/image/PickFileIcon.js +1 -1
  302. package/lib/media-picker/image/PickPhotoIcon.js +1 -1
  303. package/lib/media-picker/image/TakeAudioIcon.js +1 -1
  304. package/lib/media-picker/image/TakePhotoIcon.js +1 -1
  305. package/lib/media-picker/image/TakeVideoIcon.js +1 -1
  306. package/lib/media-picker/index.css +1 -1
  307. package/lib/media-picker/index.js +4 -0
  308. package/lib/media-picker/util/media-util.js +3 -0
  309. package/lib/media-picker/watermark/image-processor.js +10 -6
  310. package/lib/media-picker/watermark/resize-options.js +1 -0
  311. package/lib/media-picker/watermark/watermark.js +4 -0
  312. package/lib/media-player/MediaPlayer.js +4 -0
  313. package/lib/media-player/index.js +4 -0
  314. package/lib/multiple-picker/MultiplePicker.d.ts +4 -4
  315. package/lib/multiple-picker/MultiplePicker.js +7 -3
  316. package/lib/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  317. package/lib/multiple-picker/MultiplePickerOptions.js +3 -3
  318. package/lib/multiple-picker/index.d.ts +3 -3
  319. package/lib/multiple-picker/index.js +4 -0
  320. package/lib/nav-bar/index.js +4 -0
  321. package/lib/notice-bar/NoticeBar.js +4 -0
  322. package/lib/notice-bar/index.css +1 -1
  323. package/lib/notice-bar/index.js +4 -0
  324. package/lib/notify/function-call.js +4 -0
  325. package/lib/notify/index.js +4 -0
  326. package/lib/number-keyboard/NumberKeyboard.js +4 -0
  327. package/lib/number-keyboard/NumberKeyboardKey.js +4 -0
  328. package/lib/number-keyboard/index.js +4 -0
  329. package/lib/overlay/index.d.ts +1 -1
  330. package/lib/overlay/index.js +4 -0
  331. package/lib/password-input/index.js +4 -0
  332. package/lib/picker/Picker.js +10 -3
  333. package/lib/picker/PickerToolbar.js +1 -0
  334. package/lib/picker/index.js +4 -0
  335. package/lib/popover/Popover.d.ts +13 -0
  336. package/lib/popover/Popover.js +98 -3
  337. package/lib/popover/index.css +1 -1
  338. package/lib/popover/index.d.ts +9 -0
  339. package/lib/popover/index.js +4 -0
  340. package/lib/popup/Popup.js +1 -0
  341. package/lib/popup/index.css +1 -1
  342. package/lib/popup/index.js +4 -0
  343. package/lib/popup/shared.js +12 -0
  344. package/lib/pull-refresh/index.js +4 -0
  345. package/lib/radio/Radio.d.ts +1 -1
  346. package/lib/radio/Radio.js +4 -0
  347. package/lib/radio/index.d.ts +1 -1
  348. package/lib/radio/index.js +4 -0
  349. package/lib/radio-group/index.js +4 -0
  350. package/lib/rate/index.css +1 -1
  351. package/lib/rate/index.js +4 -0
  352. package/lib/row/index.js +4 -0
  353. package/lib/search/Search.d.ts +1 -1
  354. package/lib/search/Search.js +1 -0
  355. package/lib/search/index.d.ts +1 -1
  356. package/lib/search/index.js +4 -0
  357. package/lib/signature/Signature.js +16 -9
  358. package/lib/signature/index.css +1 -1
  359. package/lib/signature/index.js +4 -0
  360. package/lib/skeleton/index.js +4 -0
  361. package/lib/step/Step.js +10 -6
  362. package/lib/step/index.css +1 -1
  363. package/lib/step/index.js +4 -0
  364. package/lib/stepper/Stepper.js +6 -0
  365. package/lib/stepper/index.css +1 -1
  366. package/lib/stepper/index.js +4 -0
  367. package/lib/steps/index.css +1 -1
  368. package/lib/steps/index.js +4 -0
  369. package/lib/sticky/Sticky.js +2 -0
  370. package/lib/sticky/index.js +4 -0
  371. package/lib/style/base.css +1 -1
  372. package/lib/style/css-variables.css +1 -1
  373. package/lib/swipe/Swipe.d.ts +3 -1
  374. package/lib/swipe/Swipe.js +19 -2
  375. package/lib/swipe/index.d.ts +3 -1
  376. package/lib/swipe/index.js +4 -0
  377. package/lib/swipe-cell/SwipeCell.d.ts +44 -0
  378. package/lib/swipe-cell/SwipeCell.js +182 -0
  379. package/lib/swipe-cell/index.css +1 -0
  380. package/lib/swipe-cell/index.d.ts +39 -0
  381. package/lib/swipe-cell/index.js +39 -0
  382. package/lib/swipe-cell/style/index.d.ts +1 -0
  383. package/lib/swipe-cell/style/index.js +2 -0
  384. package/lib/swipe-cell/types.d.ts +9 -0
  385. package/lib/swipe-cell/types.js +15 -0
  386. package/lib/swipe-item/index.js +4 -0
  387. package/lib/switch/index.css +1 -1
  388. package/lib/switch/index.js +4 -0
  389. package/lib/tab/index.js +4 -0
  390. package/lib/tabbar/index.js +4 -0
  391. package/lib/tabbar-item/index.css +1 -1
  392. package/lib/tabbar-item/index.js +4 -0
  393. package/lib/table/Table.d.ts +118 -0
  394. package/lib/table/Table.js +228 -0
  395. package/lib/table/index.css +1 -0
  396. package/lib/table/index.d.ts +77 -0
  397. package/lib/table/index.js +39 -0
  398. package/lib/table/style/index.d.ts +1 -0
  399. package/lib/table/style/index.js +4 -0
  400. package/lib/table/types.d.ts +5 -0
  401. package/lib/table/types.js +27 -0
  402. package/lib/tabs/Tabs.js +6 -0
  403. package/lib/tabs/index.css +1 -1
  404. package/lib/tabs/index.js +4 -0
  405. package/lib/tag/Tag.d.ts +21 -1
  406. package/lib/tag/Tag.js +73 -10
  407. package/lib/tag/index.css +1 -1
  408. package/lib/tag/index.d.ts +15 -1
  409. package/lib/tag/index.js +4 -0
  410. package/lib/tag/style/index.js +1 -0
  411. package/lib/text-ellipsis/TextEllipsis.d.ts +76 -0
  412. package/lib/text-ellipsis/TextEllipsis.js +137 -0
  413. package/lib/text-ellipsis/index.css +1 -0
  414. package/lib/text-ellipsis/index.d.ts +60 -0
  415. package/lib/text-ellipsis/index.js +39 -0
  416. package/lib/text-ellipsis/style/index.d.ts +1 -0
  417. package/lib/text-ellipsis/style/index.js +2 -0
  418. package/lib/text-ellipsis/types.d.ts +3 -0
  419. package/lib/text-ellipsis/types.js +15 -0
  420. package/lib/time-picker/TimePicker.js +4 -0
  421. package/lib/time-picker/TimePickerColumn.js +4 -0
  422. package/lib/time-picker/index.js +4 -0
  423. package/lib/timeline/Timeline.d.ts +113 -0
  424. package/lib/timeline/Timeline.js +191 -0
  425. package/lib/timeline/index.css +1 -0
  426. package/lib/timeline/index.d.ts +75 -0
  427. package/lib/timeline/index.js +39 -0
  428. package/lib/timeline/style/index.d.ts +1 -0
  429. package/lib/timeline/style/index.js +4 -0
  430. package/lib/toast/function-call.js +4 -0
  431. package/lib/toast/index.js +4 -0
  432. package/lib/uploader/Uploader.d.ts +1 -1
  433. package/lib/uploader/Uploader.js +4 -0
  434. package/lib/uploader/UploaderPreviewItem.d.ts +1 -1
  435. package/lib/uploader/index.d.ts +1 -1
  436. package/lib/uploader/index.js +4 -0
  437. package/lib/uploader/utils.js +1 -1
  438. package/lib/utils/create.js +4 -0
  439. package/lib/utils/dom.d.ts +1 -0
  440. package/lib/utils/dom.js +11 -0
  441. package/lib/web-types.json +1 -1
  442. package/lib/zartui.cjs.js +3054 -1076
  443. package/lib/zartui.es.js +3102 -1124
  444. package/lib/zartui.js +3817 -1303
  445. package/lib/zartui.min.js +1 -1
  446. package/package.json +18 -17
package/es/tag/index.css CHANGED
@@ -1 +1 @@
1
- :root{--zt-tag-padding: 0 var(--zt-padding-sm);--zt-tag-text-color: var(--zt-white);--zt-tag-font-size: var(--zt-font-size-sm);--zt-tag-radius: 2px;--zt-tag-line-height: 20px;--zt-tag-icon-gap: 2px;--zt-tag-icon-size: 16px;--zt-tag-close-icon-size: 20px;--zt-tag-round-radius: 12px;--zt-tag-round-line-height: 24px;--zt-tag-closeable-font-size: var(--zt-font-size-md);--zt-tag-closeable-line-height: 28px;--zt-tag-closeable-radius: 14px;--zt-tag-danger-color: var(--zt-danger-color);--zt-tag-primary-color: var(--zt-primary-color);--zt-tag-success-color: var(--zt-success-color);--zt-tag-warning-color: var(--zt-warning-color);--zt-tag-default-color: var(--zt-gray-a08);--zt-tag-plain-background: var(--zt-background-2)}.zt-tag{position:relative;display:inline-flex;align-items:center;padding:var(--zt-tag-padding);color:var(--zt-tag-text-color);font-size:var(--zt-tag-font-size);line-height:var(--zt-tag-line-height);border-radius:var(--zt-tag-radius);overflow:hidden}.zt-tag__icon{font-size:var(--zt-tag-icon-size);margin-right:var(--zt-tag-icon-gap)}.zt-tag--default{background:var(--zt-tag-default-color)}.zt-tag--default.zt-tag--plain{color:var(--zt-tag-default-color)}.zt-tag--danger{background:var(--zt-tag-danger-color)}.zt-tag--danger.zt-tag--plain{color:var(--zt-tag-danger-color)}.zt-tag--primary{background:var(--zt-tag-primary-color)}.zt-tag--primary.zt-tag--plain{color:var(--zt-tag-primary-color)}.zt-tag--success{background:var(--zt-tag-success-color)}.zt-tag--success.zt-tag--plain{color:var(--zt-tag-success-color)}.zt-tag--warning{background:var(--zt-tag-warning-color)}.zt-tag--warning.zt-tag--plain{color:var(--zt-tag-warning-color)}.zt-tag--plain{background:var(--zt-tag-plain-background);border-color:currentColor}.zt-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-color:inherit;border-radius:inherit;content:"";pointer-events:none}.zt-tag--mark{border-radius:0 var(--zt-tag-round-radius) var(--zt-tag-round-radius) 0}.zt-tag--mark:after{display:block;width:2px;content:""}.zt-tag--round{border-radius:var(--zt-tag-round-radius);line-height:var(--zt-tag-round-line-height)}.zt-tag__close{font-size:var(--zt-tag-close-icon-size);margin-left:2px}.zt-tag--closeable{font-size:var(--zt-tag-closeable-font-size);line-height:var(--zt-tag-closeable-line-height);background:var(--zt-text-color-a6);border-radius:var(--zt-tag-closeable-radius)}.zt-tag--badge{position:absolute;text-align:center;display:block;box-sizing:border-box}
1
+ :root{--zt-tag-padding: var(--zt-padding-base) var(--zt-padding-sm);--zt-tag-text-color: var(--zt-white);--zt-tag-font-size: var(--zt-font-size-sm);--zt-tag-radius: 2px;--zt-tag-line-height: 16px;--zt-tag-icon-gap: 2px;--zt-tag-icon-size: 16px;--zt-tag-close-icon-size: 20px;--zt-tag-round-radius: 12px;--zt-tag-round-line-height: 16px;--zt-tag-badge-padding: 0 var(--zt-padding-sm);--zt-tag-closeable-font-size: var(--zt-font-size-md);--zt-tag-closeable-line-height: 20px;--zt-tag-closeable-radius: 14px;--zt-tag-closeable-background: var(--zt-gray-a6);--zt-tag-danger-color: var(--zt-danger-color);--zt-tag-primary-color: var(--zt-primary-color);--zt-tag-success-color: var(--zt-success-color);--zt-tag-warning-color: var(--zt-warning-color);--zt-tag-default-color: var(--zt-gray-a08);--zt-tag-plain-background: var(--zt-background-2);--zt-tag-stamp-diameter: 60px}.zt-tag{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;padding:var(--zt-tag-padding);color:var(--zt-tag-text-color);font-size:var(--zt-tag-font-size);line-height:var(--zt-tag-line-height);border-radius:var(--zt-tag-radius);overflow:hidden;word-break:break-all}.zt-tag__icon{font-size:var(--zt-tag-icon-size);margin-right:var(--zt-tag-icon-gap)}.zt-tag__image{width:var(--zt-tag-icon-size);height:var(--zt-tag-icon-size);margin-right:var(--zt-tag-icon-gap)}.zt-tag--default{background:var(--zt-tag-default-color)}.zt-tag--default.zt-tag--plain{color:var(--zt-tag-default-color)}.zt-tag--danger{background:var(--zt-tag-danger-color)}.zt-tag--danger.zt-tag--plain{color:var(--zt-tag-danger-color)}.zt-tag--primary{background:var(--zt-tag-primary-color)}.zt-tag--primary.zt-tag--plain{color:var(--zt-tag-primary-color)}.zt-tag--success{background:var(--zt-tag-success-color)}.zt-tag--success.zt-tag--plain{color:var(--zt-tag-success-color)}.zt-tag--warning{background:var(--zt-tag-warning-color)}.zt-tag--warning.zt-tag--plain{color:var(--zt-tag-warning-color)}.zt-tag--plain{background:var(--zt-tag-plain-background);border-color:currentColor}.zt-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-color:inherit;border-radius:inherit;content:"";pointer-events:none}.zt-tag--mark{border-radius:0 var(--zt-tag-round-radius) var(--zt-tag-round-radius) 0}.zt-tag--mark:after{display:block;width:2px;content:""}.zt-tag--round{border-radius:var(--zt-tag-round-radius);line-height:var(--zt-tag-round-line-height)}.zt-tag__close{font-size:var(--zt-tag-close-icon-size);margin-left:2px}.zt-tag--closeable{font-size:var(--zt-tag-closeable-font-size);line-height:var(--zt-tag-closeable-line-height);background:var(--zt-tag-closeable-background);border-radius:var(--zt-tag-closeable-radius)}.zt-tag--badge{position:absolute;text-align:center;display:block;box-sizing:border-box;padding:var(--zt-tag-badge-padding)}.zt-tag__stamp{width:var(--zt-tag-stamp-diameter);height:var(--zt-tag-stamp-diameter);background:rgba(0,0,0,0);padding:0}.zt-tag__stamp--text{width:50px;height:24px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:center;font-weight:600}.zt-tag__stamp--default{color:var(--zt-gray-a6)}.zt-tag__stamp--danger{color:var(--zt-tag-danger-color)}.zt-tag__stamp--primary{color:var(--zt-tag-primary-color)}.zt-tag__stamp--success{color:var(--zt-tag-success-color)}.zt-tag__stamp--warning{color:var(--zt-tag-warning-color)}.zt-theme-dark{--zt-tag-closeable-background: rgba(255, 255, 255, .1)}
package/es/tag/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
15
15
  borderColor: StringConstructor;
16
16
  closeable: BooleanConstructor;
17
17
  icon: StringConstructor;
18
+ image: StringConstructor;
18
19
  iconPrefix: StringConstructor;
19
20
  iconColor: StringConstructor;
20
21
  badge: BooleanConstructor;
@@ -26,6 +27,11 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
26
27
  type: NumberConstructor;
27
28
  default: number;
28
29
  };
30
+ stamp: BooleanConstructor;
31
+ stampDiameter: {
32
+ type: NumberConstructor;
33
+ default: number;
34
+ };
29
35
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
36
  mark: BooleanConstructor;
31
37
  show: {
@@ -43,6 +49,7 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
43
49
  borderColor: StringConstructor;
44
50
  closeable: BooleanConstructor;
45
51
  icon: StringConstructor;
52
+ image: StringConstructor;
46
53
  iconPrefix: StringConstructor;
47
54
  iconColor: StringConstructor;
48
55
  badge: BooleanConstructor;
@@ -54,18 +61,25 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
54
61
  type: NumberConstructor;
55
62
  default: number;
56
63
  };
64
+ stamp: BooleanConstructor;
65
+ stampDiameter: {
66
+ type: NumberConstructor;
67
+ default: number;
68
+ };
57
69
  }>> & {
58
70
  onClose?: ((...args: any[]) => any) | undefined;
59
71
  }, {
72
+ mark: boolean;
60
73
  type: import("./Tag").TagType;
61
74
  badge: boolean;
62
- mark: boolean;
63
75
  show: boolean;
64
76
  round: boolean;
65
77
  closeable: boolean;
66
78
  plain: boolean;
67
79
  badgeWidth: number;
68
80
  badgeHeight: number;
81
+ stamp: boolean;
82
+ stampDiameter: number;
69
83
  }>>;
70
84
  export default Tag;
71
85
  export { tagProps } from './Tag';
@@ -1,4 +1,5 @@
1
1
  import "../../style/base.css";
2
2
  import "../../badge/index.css";
3
3
  import "../../icon/index.css";
4
+ import "../../image/index.css";
4
5
  import "../index.css";
@@ -0,0 +1,76 @@
1
+ import { type ExtractPropTypes } from 'vue';
2
+ export declare const textEllipsisProps: {
3
+ rows: {
4
+ type: (NumberConstructor | StringConstructor)[];
5
+ default: number;
6
+ };
7
+ content: {
8
+ type: import("vue").PropType<string>;
9
+ default: string;
10
+ };
11
+ expandText: {
12
+ type: import("vue").PropType<string>;
13
+ default: string;
14
+ };
15
+ collapseText: {
16
+ type: import("vue").PropType<string>;
17
+ default: string;
18
+ };
19
+ highlight: {
20
+ type: import("vue").PropType<string>;
21
+ default: string;
22
+ };
23
+ };
24
+ export declare type TextEllipsisProps = ExtractPropTypes<typeof textEllipsisProps>;
25
+ declare const _default: import("vue").DefineComponent<{
26
+ rows: {
27
+ type: (NumberConstructor | StringConstructor)[];
28
+ default: number;
29
+ };
30
+ content: {
31
+ type: import("vue").PropType<string>;
32
+ default: string;
33
+ };
34
+ expandText: {
35
+ type: import("vue").PropType<string>;
36
+ default: string;
37
+ };
38
+ collapseText: {
39
+ type: import("vue").PropType<string>;
40
+ default: string;
41
+ };
42
+ highlight: {
43
+ type: import("vue").PropType<string>;
44
+ default: string;
45
+ };
46
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
47
+ rows: {
48
+ type: (NumberConstructor | StringConstructor)[];
49
+ default: number;
50
+ };
51
+ content: {
52
+ type: import("vue").PropType<string>;
53
+ default: string;
54
+ };
55
+ expandText: {
56
+ type: import("vue").PropType<string>;
57
+ default: string;
58
+ };
59
+ collapseText: {
60
+ type: import("vue").PropType<string>;
61
+ default: string;
62
+ };
63
+ highlight: {
64
+ type: import("vue").PropType<string>;
65
+ default: string;
66
+ };
67
+ }>> & {
68
+ onClickAction?: ((...args: any[]) => any) | undefined;
69
+ }, {
70
+ content: string;
71
+ rows: string | number;
72
+ expandText: string;
73
+ collapseText: string;
74
+ highlight: string;
75
+ }>;
76
+ export default _default;
@@ -0,0 +1,118 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ import { ref, watch, onMounted, defineComponent } from "vue";
3
+ import { useEventListener } from "@zartui/use";
4
+ import { makeNumericProp, makeStringProp, createNamespace } from "../utils/index.mjs";
5
+ const [name, bem] = createNamespace("text-ellipsis");
6
+ const textEllipsisProps = {
7
+ rows: makeNumericProp(1),
8
+ content: makeStringProp(""),
9
+ expandText: makeStringProp(""),
10
+ collapseText: makeStringProp(""),
11
+ highlight: makeStringProp("")
12
+ };
13
+ var stdin_default = defineComponent({
14
+ name,
15
+ props: textEllipsisProps,
16
+ emits: ["clickAction"],
17
+ setup(props, {
18
+ emit
19
+ }) {
20
+ const text = ref("");
21
+ const expanded = ref(false);
22
+ const hasAction = ref(false);
23
+ const root = ref();
24
+ const pxToNum = (value) => {
25
+ if (!value)
26
+ return 0;
27
+ const match = value.match(/^\d*(\.\d*)?/);
28
+ return match ? Number(match[0]) : 0;
29
+ };
30
+ const calcEllipsised = () => {
31
+ const cloneContainer = () => {
32
+ if (!root.value)
33
+ return;
34
+ const originStyle = window.getComputedStyle(root.value);
35
+ const container2 = document.createElement("div");
36
+ const styleNames = Array.prototype.slice.apply(originStyle);
37
+ styleNames.forEach((name2) => {
38
+ container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
39
+ });
40
+ container2.style.position = "fixed";
41
+ container2.style.zIndex = "-9999";
42
+ container2.style.top = "-9999px";
43
+ container2.style.height = "auto";
44
+ container2.style.minHeight = "auto";
45
+ container2.style.maxHeight = "auto";
46
+ container2.innerText = props.content;
47
+ document.body.appendChild(container2);
48
+ return container2;
49
+ };
50
+ const calcEllipsisText = (container2, maxHeight2) => {
51
+ const {
52
+ content,
53
+ expandText
54
+ } = props;
55
+ const dot = "...";
56
+ let left = 0;
57
+ let right = content.length;
58
+ let res = -1;
59
+ while (left <= right) {
60
+ const mid = Math.floor((left + right) / 2);
61
+ container2.innerText = content.slice(0, mid) + dot + expandText;
62
+ if (container2.offsetHeight <= maxHeight2) {
63
+ left = mid + 1;
64
+ res = mid;
65
+ } else {
66
+ right = mid - 1;
67
+ }
68
+ }
69
+ return content.slice(0, res) + dot;
70
+ };
71
+ const container = cloneContainer();
72
+ if (!container)
73
+ return;
74
+ const {
75
+ paddingBottom,
76
+ paddingTop,
77
+ lineHeight
78
+ } = container.style;
79
+ const maxHeight = (Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom);
80
+ if (maxHeight < container.offsetHeight) {
81
+ hasAction.value = true;
82
+ text.value = calcEllipsisText(container, maxHeight);
83
+ } else {
84
+ hasAction.value = false;
85
+ text.value = props.content;
86
+ }
87
+ document.body.removeChild(container);
88
+ };
89
+ const onClickAction = (event) => {
90
+ expanded.value = !expanded.value;
91
+ emit("clickAction", event);
92
+ };
93
+ const formatSearchKeyword = (keywords, text2) => {
94
+ if (!keywords)
95
+ return text2;
96
+ const replaceReg = new RegExp(keywords, "ig");
97
+ const replaceString = `<span style="color: #0091FA; background: rgba(0, 145, 250, 0.1);">${keywords}</span>`;
98
+ return text2.replace(replaceReg, replaceString);
99
+ };
100
+ const renderAction = () => _createVNode("span", {
101
+ "class": bem("action"),
102
+ "onClick": onClickAction
103
+ }, [expanded.value ? props.collapseText : props.expandText]);
104
+ onMounted(calcEllipsised);
105
+ watch(() => [props.content, props.rows], calcEllipsised);
106
+ useEventListener("resize", calcEllipsised);
107
+ return () => _createVNode("div", {
108
+ "ref": root,
109
+ "class": bem()
110
+ }, [_createVNode("span", {
111
+ "innerHTML": formatSearchKeyword(props.highlight, expanded.value ? props.content : text.value)
112
+ }, null), hasAction.value ? renderAction() : null]);
113
+ }
114
+ });
115
+ export {
116
+ stdin_default as default,
117
+ textEllipsisProps
118
+ };
@@ -0,0 +1 @@
1
+ :root{--zt-text-ellipsis-line-height:calc(200% - 8px);--zt-text-ellipsis-action-color: var(--zt-blue)}.zt-text-ellipsis{line-height:var(--zt-text-ellipsis-line-height);white-space:pre-wrap;word-break:break-all}.zt-text-ellipsis__action{cursor:pointer;color:var(--zt-text-ellipsis-action-color)}.zt-text-ellipsis__action:active{opacity:var(--zt-active-opacity)}
@@ -0,0 +1,60 @@
1
+ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ rows: {
3
+ type: (NumberConstructor | StringConstructor)[];
4
+ default: number;
5
+ };
6
+ content: {
7
+ type: import("vue").PropType<string>;
8
+ default: string;
9
+ };
10
+ expandText: {
11
+ type: import("vue").PropType<string>;
12
+ default: string;
13
+ };
14
+ collapseText: {
15
+ type: import("vue").PropType<string>;
16
+ default: string;
17
+ };
18
+ highlight: {
19
+ type: import("vue").PropType<string>;
20
+ default: string;
21
+ };
22
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
+ rows: {
24
+ type: (NumberConstructor | StringConstructor)[];
25
+ default: number;
26
+ };
27
+ content: {
28
+ type: import("vue").PropType<string>;
29
+ default: string;
30
+ };
31
+ expandText: {
32
+ type: import("vue").PropType<string>;
33
+ default: string;
34
+ };
35
+ collapseText: {
36
+ type: import("vue").PropType<string>;
37
+ default: string;
38
+ };
39
+ highlight: {
40
+ type: import("vue").PropType<string>;
41
+ default: string;
42
+ };
43
+ }>> & {
44
+ onClickAction?: ((...args: any[]) => any) | undefined;
45
+ }, {
46
+ content: string;
47
+ rows: string | number;
48
+ expandText: string;
49
+ collapseText: string;
50
+ highlight: string;
51
+ }>>;
52
+ export default TextEllipsis;
53
+ export { textEllipsisProps } from './TextEllipsis';
54
+ export type { TextEllipsisProps } from './TextEllipsis';
55
+ export type { TextEllipsisThemeVars } from './types';
56
+ declare module 'vue' {
57
+ interface GlobalComponents {
58
+ ZtTextEllipsis: typeof TextEllipsis;
59
+ }
60
+ }
@@ -0,0 +1,10 @@
1
+ import { withInstall } from "../utils/index.mjs";
2
+ import _TextEllipsis from "./TextEllipsis.mjs";
3
+ const TextEllipsis = withInstall(_TextEllipsis);
4
+ var stdin_default = TextEllipsis;
5
+ import { textEllipsisProps } from "./TextEllipsis.mjs";
6
+ export {
7
+ TextEllipsis,
8
+ stdin_default as default,
9
+ textEllipsisProps
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import "../../style/base.css";
2
+ import "../index.css";
@@ -0,0 +1,3 @@
1
+ export declare type TextEllipsisThemeVars = {
2
+ textEllipsisActionColor?: string;
3
+ };
File without changes
@@ -0,0 +1,113 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ export declare type TimelineProcessOption = {
3
+ human: string;
4
+ avatar?: string;
5
+ department: string;
6
+ timestamp: string;
7
+ opinion: string;
8
+ stage: string;
9
+ action: string;
10
+ nextAction: string;
11
+ nextDepartment: string;
12
+ nextHuman: string;
13
+ folded?: boolean;
14
+ };
15
+ export declare const timelineProps: {
16
+ title: {
17
+ type: import("vue").PropType<string>;
18
+ default: string;
19
+ };
20
+ defaultFold: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ collapseCount: {
25
+ type: NumberConstructor;
26
+ default: number;
27
+ };
28
+ processes: {
29
+ type: import("vue").PropType<TimelineProcessOption[]>;
30
+ default: () => TimelineProcessOption[];
31
+ };
32
+ opinionKey: {
33
+ type: import("vue").PropType<string>;
34
+ default: string;
35
+ };
36
+ enableSingleFold: {
37
+ type: BooleanConstructor;
38
+ default: true;
39
+ };
40
+ dot: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ };
45
+ export declare type TimelineProps = ExtractPropTypes<typeof timelineProps>;
46
+ declare const _default: import("vue").DefineComponent<{
47
+ title: {
48
+ type: import("vue").PropType<string>;
49
+ default: string;
50
+ };
51
+ defaultFold: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ collapseCount: {
56
+ type: NumberConstructor;
57
+ default: number;
58
+ };
59
+ processes: {
60
+ type: import("vue").PropType<TimelineProcessOption[]>;
61
+ default: () => TimelineProcessOption[];
62
+ };
63
+ opinionKey: {
64
+ type: import("vue").PropType<string>;
65
+ default: string;
66
+ };
67
+ enableSingleFold: {
68
+ type: BooleanConstructor;
69
+ default: true;
70
+ };
71
+ dot: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
76
+ title: {
77
+ type: import("vue").PropType<string>;
78
+ default: string;
79
+ };
80
+ defaultFold: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ collapseCount: {
85
+ type: NumberConstructor;
86
+ default: number;
87
+ };
88
+ processes: {
89
+ type: import("vue").PropType<TimelineProcessOption[]>;
90
+ default: () => TimelineProcessOption[];
91
+ };
92
+ opinionKey: {
93
+ type: import("vue").PropType<string>;
94
+ default: string;
95
+ };
96
+ enableSingleFold: {
97
+ type: BooleanConstructor;
98
+ default: true;
99
+ };
100
+ dot: {
101
+ type: BooleanConstructor;
102
+ default: boolean;
103
+ };
104
+ }>>, {
105
+ title: string;
106
+ dot: boolean;
107
+ defaultFold: boolean;
108
+ collapseCount: number;
109
+ processes: TimelineProcessOption[];
110
+ opinionKey: string;
111
+ enableSingleFold: boolean;
112
+ }>;
113
+ export default _default;
@@ -0,0 +1,162 @@
1
+ import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
2
+ import { defineComponent, computed, ref } from "vue";
3
+ import Switch from "../switch/index.mjs";
4
+ import { BORDER_BOTTOM, createNamespace, makeArrayProp, makeNumberProp, makeStringProp, truthProp } from "../utils/index.mjs";
5
+ const [name, bem] = createNamespace("timeline");
6
+ const timelineProps = {
7
+ title: makeStringProp("\u529E\u7406\u7ECF\u8FC7"),
8
+ // 默认折叠显示
9
+ defaultFold: {
10
+ type: Boolean,
11
+ default: false
12
+ },
13
+ // 折叠时显示几条数据
14
+ collapseCount: makeNumberProp(0),
15
+ processes: makeArrayProp([]),
16
+ opinionKey: makeStringProp("\u5904\u7406\u610F\u89C1"),
17
+ enableSingleFold: truthProp,
18
+ dot: {
19
+ type: Boolean,
20
+ default: false
21
+ }
22
+ };
23
+ var stdin_default = defineComponent({
24
+ name,
25
+ props: timelineProps,
26
+ setup(props, {
27
+ slots
28
+ }) {
29
+ const isFold = ref(props.defaultFold);
30
+ const genTopBar = () => {
31
+ if (slots["top-bar"]) {
32
+ return _createVNode("div", {
33
+ "class": [bem("top-bar"), BORDER_BOTTOM]
34
+ }, [slots["top-bar"]()]);
35
+ } else {
36
+ return _createVNode("div", {
37
+ "class": [bem("top-bar"), BORDER_BOTTOM]
38
+ }, [_createVNode("div", {
39
+ "class": bem("top-left")
40
+ }, [_createVNode("div", {
41
+ "class": bem("bar")
42
+ }, null), _createVNode("div", {
43
+ "class": bem("title")
44
+ }, [props.title])]), _createVNode("div", {
45
+ "class": bem("top-right")
46
+ }, [_createVNode("span", {
47
+ "class": bem("fold-text")
48
+ }, [_createTextVNode("\u6298\u53E0"), props.title]), _createVNode(Switch, {
49
+ "modelValue": isFold.value,
50
+ "onUpdate:modelValue": ($event) => isFold.value = $event
51
+ }, null)])]);
52
+ }
53
+ };
54
+ const genAvatar = (item) => {
55
+ if (slots.avatar) {
56
+ return _createVNode("div", {
57
+ "class": bem("avatar-box")
58
+ }, [slots.avatar(item)]);
59
+ }
60
+ if (props.dot) {
61
+ return _createVNode("div", {
62
+ "class": bem("dot")
63
+ }, null);
64
+ }
65
+ return _createVNode("div", {
66
+ "class": bem("avatar-box")
67
+ }, [item.avatar ? _createVNode("img", {
68
+ "class": bem("avatar"),
69
+ "src": item.avatar,
70
+ "alt": ""
71
+ }, null) : _createVNode("div", {
72
+ "class": bem("avatar")
73
+ }, [item.human.slice(-2)])]);
74
+ };
75
+ const genTitle = (item) => {
76
+ if (slots.title) {
77
+ return _createVNode("div", {
78
+ "class": bem("title-box")
79
+ }, [slots.title(item)]);
80
+ }
81
+ return _createVNode("div", {
82
+ "class": bem("title-box")
83
+ }, [_createVNode("span", {
84
+ "class": bem("title")
85
+ }, [`${item.department}[${item.human}]`]), _createVNode("span", {
86
+ "class": bem("time")
87
+ }, [item.timestamp])]);
88
+ };
89
+ const genOpinion = (item) => {
90
+ if (slots.opinion) {
91
+ return _createVNode("div", {
92
+ "class": bem("opinion-box")
93
+ }, [slots.opinion(item)]);
94
+ }
95
+ return _createVNode("div", {
96
+ "class": bem("opinion-box")
97
+ }, [_createVNode("div", {
98
+ "class": bem("opinion-label")
99
+ }, [props.opinionKey]), _createVNode("div", {
100
+ "class": bem("opinion")
101
+ }, [item.opinion || "\u65E0"])]);
102
+ };
103
+ const genContent = (item) => {
104
+ if (slots.content) {
105
+ return _createVNode("div", {
106
+ "class": [bem("content-box"), BORDER_BOTTOM]
107
+ }, [slots.content(item)]);
108
+ }
109
+ return _createVNode("div", {
110
+ "class": [bem("content-box"), BORDER_BOTTOM]
111
+ }, [_createTextVNode("\u5728"), _createVNode("span", null, [item.stage]), _createTextVNode("\u9636\u6BB5"), _createVNode("span", {
112
+ "class": bem("text-bold")
113
+ }, [_createTextVNode(" "), item.action, _createTextVNode(" ")]), _createTextVNode("\u5230"), _createVNode("span", null, [item.nextAction]), _createVNode("span", null, [item.nextDepartment]), _createVNode("span", {
114
+ "class": bem("text-bold")
115
+ }, [_createTextVNode(" ["), item.nextHuman, _createTextVNode("]")])]);
116
+ };
117
+ const genProcessItem = (item, isLast) => {
118
+ function itemClicked() {
119
+ if (!props.enableSingleFold) {
120
+ return;
121
+ }
122
+ item.folded = !item.folded;
123
+ }
124
+ return _createVNode("div", {
125
+ "class": bem("item") + ` ${isLast ? "last-item" : ""}`,
126
+ "onClick": itemClicked
127
+ }, [_createVNode("div", {
128
+ "class": [bem("left-container"), props.dot ? bem("dot-container") : ""]
129
+ }, [genAvatar(item), _createVNode("div", {
130
+ "class": bem(props.dot ? "line-dot" : "line")
131
+ }, null)]), _createVNode("div", {
132
+ "class": bem("right-container")
133
+ }, [genTitle(item), !item.folded && _createVNode("div", {
134
+ "class": bem("main-container")
135
+ }, [genContent(item), genOpinion(item)])])]);
136
+ };
137
+ const computedProcesses = computed(() => {
138
+ const wrapper = props.processes.map((v) => {
139
+ v.folded = false;
140
+ return v;
141
+ });
142
+ if (isFold.value) {
143
+ const showProcesses = wrapper.slice(0, props.collapseCount);
144
+ return showProcesses.map((item, index) => genProcessItem(item, index === showProcesses.length - 1));
145
+ } else {
146
+ return wrapper.map((item, index) => genProcessItem(item, index === wrapper.length - 1));
147
+ }
148
+ });
149
+ return () => {
150
+ var _a;
151
+ return _createVNode("div", {
152
+ "class": bem()
153
+ }, [genTopBar(), ((_a = computedProcesses.value) == null ? void 0 : _a.length) > 0 && _createVNode("div", {
154
+ "class": bem("container")
155
+ }, [computedProcesses.value])]);
156
+ };
157
+ }
158
+ });
159
+ export {
160
+ stdin_default as default,
161
+ timelineProps
162
+ };
@@ -0,0 +1 @@
1
+ :root{--zt-timeline-title-color: var(--zt-gray-default);--zt-timeline-sub-title-color: var(--zt-gray-a6);--zt-timeline-content-color: var(--zt-gray-default);--zt-timeline-background: var(--zt-white);--zt-timeline-bar-background: var(--zt-primary-color);--zt-timeline-time-color: var(--zt-gray-a8)}.zt-timeline{background-color:var(--zt-timeline-background)}.zt-timeline__top-bar{height:44px;display:flex;justify-content:space-between;align-items:center}.zt-timeline__top-left{display:flex;align-items:center}.zt-timeline__bar{width:4px;height:16px;background:var(--zt-timeline-bar-background);margin-right:12px}.zt-timeline__title{font-size:16px;font-weight:700;color:var(--zt-timeline-title-color);line-height:24px}.zt-timeline__top-right{padding-right:16px;display:flex;align-items:center}.zt-timeline__top-right .zt-switch--on{background:var(--zt-timeline-bar-background)}.zt-timeline__fold-text{font-size:16px;color:var(--zt-gray-a6);line-height:24px;margin-right:8px}.zt-timeline__container{padding-top:16px}.zt-timeline__item{padding:0 16px 16px;display:flex}.zt-timeline__item.last-item .zt-timeline__line-dot,.zt-timeline__item.last-item .zt-timeline__line{height:0}.zt-timeline__item.last-item .zt-timeline__dot{border-color:var(--zt-timeline-bar-background)}.zt-timeline__left-container{margin-right:8px;display:flex;flex-direction:column;align-items:center;position:relative}.zt-timeline__right-container{flex:1}.zt-timeline__dot-container{top:5px}.zt-timeline__dot{width:12px;height:12px;background-color:#fff;border:1px solid rgba(45,75,115,.2);border-radius:50%;z-index:2}.zt-timeline__avatar-box{width:40px;height:40px;z-index:2}.zt-timeline__avatar{width:40px;height:40px;background:#0091fa;border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt-timeline__line-dot{position:absolute;background-color:#f5f5f5;width:2px;height:calc(100% + 16px)}.zt-timeline__title-box{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.zt-timeline__time{font-size:12px;color:var(--zt-timeline-time-color);line-height:16px}.zt-timeline__content-box{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;padding-bottom:8px}.zt-timeline__main-container{background:rgba(0,0,0,.02);border-radius:4px;padding:8px 12px}.zt-timeline__main-container:before{border-radius:4px}.zt-timeline__main-container .zt-timeline__text-bold{font-weight:700}.zt-timeline__opinion-box{padding-top:7px}.zt-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:var(--zt-timeline-sub-title-color);line-height:20px}.zt-timeline__opinion{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;word-break:break-all}