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
@@ -0,0 +1,118 @@
1
+ import { CSSProperties } from 'vue';
2
+ import type { ExtractPropTypes } from 'vue';
3
+ import { SortOrderType } from './types';
4
+ export declare type TableBodyOption = {
5
+ [key: string]: any;
6
+ };
7
+ export declare type TableHeaderOption = {
8
+ label: string;
9
+ key: string;
10
+ width?: string;
11
+ fixed?: boolean;
12
+ style?: CSSProperties;
13
+ click?: (data: TableBodyOption, index?: number) => void;
14
+ defaultSortOrder?: SortOrderType;
15
+ sorter?: boolean;
16
+ [key: string]: any;
17
+ };
18
+ export declare const tableProps: {
19
+ headList: {
20
+ type: import("vue").PropType<TableHeaderOption[]>;
21
+ default: () => TableHeaderOption[];
22
+ };
23
+ dataList: {
24
+ type: import("vue").PropType<TableBodyOption[]>;
25
+ default: () => TableBodyOption[];
26
+ };
27
+ striped: {
28
+ type: BooleanConstructor;
29
+ default: true;
30
+ };
31
+ emptyValue: {
32
+ type: import("vue").PropType<string>;
33
+ default: string;
34
+ };
35
+ loading: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ skeletonRow: {
40
+ type: NumberConstructor;
41
+ default: number;
42
+ };
43
+ border: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ };
48
+ export declare type TableProps = ExtractPropTypes<typeof tableProps>;
49
+ declare const _default: import("vue").DefineComponent<{
50
+ headList: {
51
+ type: import("vue").PropType<TableHeaderOption[]>;
52
+ default: () => TableHeaderOption[];
53
+ };
54
+ dataList: {
55
+ type: import("vue").PropType<TableBodyOption[]>;
56
+ default: () => TableBodyOption[];
57
+ };
58
+ striped: {
59
+ type: BooleanConstructor;
60
+ default: true;
61
+ };
62
+ emptyValue: {
63
+ type: import("vue").PropType<string>;
64
+ default: string;
65
+ };
66
+ loading: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ skeletonRow: {
71
+ type: NumberConstructor;
72
+ default: number;
73
+ };
74
+ border: {
75
+ type: BooleanConstructor;
76
+ default: boolean;
77
+ };
78
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "sort"[], "sort", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
79
+ headList: {
80
+ type: import("vue").PropType<TableHeaderOption[]>;
81
+ default: () => TableHeaderOption[];
82
+ };
83
+ dataList: {
84
+ type: import("vue").PropType<TableBodyOption[]>;
85
+ default: () => TableBodyOption[];
86
+ };
87
+ striped: {
88
+ type: BooleanConstructor;
89
+ default: true;
90
+ };
91
+ emptyValue: {
92
+ type: import("vue").PropType<string>;
93
+ default: string;
94
+ };
95
+ loading: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ skeletonRow: {
100
+ type: NumberConstructor;
101
+ default: number;
102
+ };
103
+ border: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ }>> & {
108
+ onSort?: ((...args: any[]) => any) | undefined;
109
+ }, {
110
+ border: boolean;
111
+ loading: boolean;
112
+ headList: TableHeaderOption[];
113
+ dataList: TableBodyOption[];
114
+ striped: boolean;
115
+ emptyValue: string;
116
+ skeletonRow: number;
117
+ }>;
118
+ export default _default;
@@ -0,0 +1,209 @@
1
+ import { createVNode as _createVNode } from "vue";
2
+ import { defineComponent, computed, onMounted, ref } from "vue";
3
+ import { createNamespace, makeArrayProp, makeStringProp, truthProp } from "../utils/index.mjs";
4
+ import { Icon } from "../icon/index.mjs";
5
+ import { SortOrderEnum } from "./types.mjs";
6
+ const [name, bem] = createNamespace("table");
7
+ const tableProps = {
8
+ headList: makeArrayProp(),
9
+ dataList: makeArrayProp(),
10
+ striped: truthProp,
11
+ emptyValue: makeStringProp("-"),
12
+ loading: {
13
+ type: Boolean,
14
+ default: false
15
+ },
16
+ skeletonRow: {
17
+ type: Number,
18
+ default: 6
19
+ },
20
+ border: {
21
+ type: Boolean,
22
+ default: false
23
+ }
24
+ };
25
+ var stdin_default = defineComponent({
26
+ name,
27
+ props: tableProps,
28
+ emits: ["sort"],
29
+ setup(props, {
30
+ emit
31
+ }) {
32
+ const sortOrder = ref("");
33
+ const sortKey = ref("");
34
+ const fixedColumn = computed(() => props.headList.filter((v) => v.fixed));
35
+ const formatColumns = computed(() => {
36
+ const columns = [];
37
+ let left = 0;
38
+ props.headList.forEach((element, index) => {
39
+ var _a;
40
+ const column = Object.assign({}, element);
41
+ const preColumn = props.headList[index - 1];
42
+ const nextColumn = props.headList[index + 1];
43
+ if (preColumn) {
44
+ left += Number((_a = preColumn.width) == null ? void 0 : _a.split("px")[0]);
45
+ column.left = `${left}px`;
46
+ } else {
47
+ column.left = 0;
48
+ }
49
+ if (element.fixed && !nextColumn.fixed) {
50
+ column.lastFixLeft = true;
51
+ }
52
+ columns.push(column);
53
+ });
54
+ return columns;
55
+ });
56
+ const pingedLeft = ref(false);
57
+ const resortHeadList = computed(() => fixedColumn.value.concat(props.headList.filter((v) => !v.fixed)));
58
+ onMounted(() => {
59
+ const fixedIndexList = props.headList.map((v, i) => {
60
+ if (v.sorter && v.defaultSortOrder) {
61
+ sortOrder.value = v.defaultSortOrder || "";
62
+ sortKey.value = v.key;
63
+ }
64
+ if (v.fixed) {
65
+ return `tableHead${i}`;
66
+ } else {
67
+ return "";
68
+ }
69
+ }).filter((v) => v !== "");
70
+ if (fixedIndexList.length > 0) {
71
+ fixedIndexList.forEach((current, index) => {
72
+ const fixedDom = document.getElementById(`fixedHead${index}`);
73
+ const normalDom = document.getElementById(current);
74
+ if (fixedDom && normalDom) {
75
+ fixedDom.style.width = normalDom.offsetWidth + "px";
76
+ }
77
+ }, 0);
78
+ }
79
+ });
80
+ const getNextSortOrder = (type) => {
81
+ if (!type) {
82
+ return SortOrderEnum.ASCEND;
83
+ } else if (type === SortOrderEnum.ASCEND) {
84
+ return SortOrderEnum.DESCEND;
85
+ } else {
86
+ return "";
87
+ }
88
+ };
89
+ const onHeaderClick = (data) => {
90
+ if (!data.sorter)
91
+ return;
92
+ sortOrder.value = getNextSortOrder(data.key === sortKey.value ? sortOrder.value : "");
93
+ sortKey.value = data.key;
94
+ emit("sort", {
95
+ order: sortOrder.value,
96
+ key: data.key
97
+ });
98
+ };
99
+ const onScroll = (event) => {
100
+ const {
101
+ scrollLeft,
102
+ currentTarget
103
+ } = event;
104
+ const mergedScrollLeft = typeof scrollLeft === "number" ? scrollLeft : currentTarget == null ? void 0 : currentTarget.scrollLeft;
105
+ pingedLeft.value = mergedScrollLeft > 0;
106
+ };
107
+ const getHead = (colData) => {
108
+ if ((colData == null ? void 0 : colData.colSpan) !== 0) {
109
+ return _createVNode("th", {
110
+ "class": bem("left", {
111
+ fixed: colData.fixed,
112
+ last: colData.lastFixLeft && pingedLeft.value
113
+ }),
114
+ "style": {
115
+ left: colData.fixed ? colData.left : ""
116
+ },
117
+ "colspan": (colData == null ? void 0 : colData.colSpan) !== 1 ? colData == null ? void 0 : colData.colSpan : null
118
+ }, [_createVNode("div", {
119
+ "class": bem("head"),
120
+ "onClick": () => onHeaderClick(colData)
121
+ }, [_createVNode("span", {
122
+ "class": bem("head-label")
123
+ }, [colData.label]), colData.sorter ? _createVNode("span", {
124
+ "class": bem("head-sort")
125
+ }, [_createVNode(Icon, {
126
+ "class": [colData.key === sortKey.value && sortOrder.value === SortOrderEnum.ASCEND ? bem("sort-active") : ""],
127
+ "name": "spinner-shrink",
128
+ "size": "12",
129
+ "style": {
130
+ marginBottom: "-3px"
131
+ }
132
+ }, null), _createVNode(Icon, {
133
+ "class": [colData.key === sortKey.value && sortOrder.value === SortOrderEnum.DESCEND ? bem("sort-active") : ""],
134
+ "name": "spinner-expand",
135
+ "size": "12",
136
+ "style": {
137
+ marginTop: "-3px"
138
+ }
139
+ }, null)]) : ""])]);
140
+ }
141
+ };
142
+ const getBody = (rowData, rowIndex) => _createVNode("tr", null, [formatColumns.value.map((colData) => {
143
+ let additionalCellProps;
144
+ if (colData.customCell) {
145
+ additionalCellProps = colData.customCell(rowData, rowIndex);
146
+ }
147
+ const style = Object.assign({}, colData.style);
148
+ style.left = colData.fixed ? colData.left : "";
149
+ return (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 0 && (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 0 && _createVNode("td", {
150
+ "onClick": () => colData.click && colData.click(rowData, rowIndex),
151
+ "class": bem("left", {
152
+ fixed: colData.fixed,
153
+ last: colData.lastFixLeft && pingedLeft.value
154
+ }),
155
+ "colspan": (additionalCellProps == null ? void 0 : additionalCellProps.colSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.colSpan : null,
156
+ "rowspan": (additionalCellProps == null ? void 0 : additionalCellProps.rowSpan) !== 1 ? additionalCellProps == null ? void 0 : additionalCellProps.rowSpan : null,
157
+ "style": style
158
+ }, [rowData[colData.key]]);
159
+ })]);
160
+ const getCol = () => {
161
+ const cols = [];
162
+ const col = resortHeadList.value.length;
163
+ for (let j = 0; j < col; j++) {
164
+ cols.push(_createVNode("div", {
165
+ "class": bem("col")
166
+ }, [_createVNode("div", {
167
+ "class": bem("col-item")
168
+ }, null)]));
169
+ }
170
+ return cols;
171
+ };
172
+ const getLoadingColumn = () => {
173
+ const Rows = [];
174
+ for (let i = 0; i < props.skeletonRow; i++) {
175
+ Rows.push(_createVNode("div", {
176
+ "class": bem("row", {
177
+ head: i === 0
178
+ })
179
+ }, [getCol()]));
180
+ }
181
+ return Rows;
182
+ };
183
+ return () => props.loading ? _createVNode("div", {
184
+ "class": bem({
185
+ animate: true,
186
+ skeleton: true
187
+ })
188
+ }, [getLoadingColumn()]) : _createVNode("div", {
189
+ "class": bem({
190
+ fixed: fixedColumn.value.length > 0,
191
+ bordered: props.border,
192
+ striped: props.striped
193
+ }),
194
+ "onScroll": onScroll
195
+ }, [_createVNode("table", null, [_createVNode("colgroup", null, [props.headList.map((item) => _createVNode("col", {
196
+ "style": {
197
+ width: item.width
198
+ }
199
+ }, null))]), _createVNode("thead", {
200
+ "class": bem("thead")
201
+ }, [_createVNode("tr", null, [formatColumns.value.map((colData) => getHead(colData))])]), _createVNode("tbody", {
202
+ "class": bem("tbody")
203
+ }, [props.dataList.map((rowData, rowIndex) => getBody(rowData, rowIndex))])])]);
204
+ }
205
+ });
206
+ export {
207
+ stdin_default as default,
208
+ tableProps
209
+ };
@@ -0,0 +1 @@
1
+ :root{--zt-table-head-height: 40px;--zt-table-head-font-size: var(--zt-font-size-md);--zt-table-head-color: var(--zt-blue);--zt-table-head-background: #e6f5ff;--zt-table-body-height: 40px;--zt-table-body-line-height: 20px;--zt-table-body-font-size: var(--zt-font-size-md);--zt-table-body-color: var(--zt-gray-default);--zt-table-body-background: var(--zt-white);--zt-table-sort-default: var(--zt-gray-5);--zt-table-sort-active: var(--zt-blue)}.zt-base-hair{position:relative}.zt-base-hair:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table table{border-collapse:separate;border-spacing:0;width:100%;table-layout:auto;box-sizing:border-box}.zt-table--fixed{overflow:auto scroll}.zt-table--fixed::-webkit-scrollbar{width:0;height:0}.zt-table--fixed table{table-layout:fixed}.zt-table--thead-fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table--bordered{position:relative}.zt-table--bordered:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered:after{border-left-width:var(--zt-border-width)}.zt-table--bordered>table{position:relative}.zt-table--bordered>table:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered>table:after{border-top-width:var(--zt-border-width)}.zt-table--bordered .zt-table__thead>tr>th{position:relative}.zt-table--bordered .zt-table__thead>tr>th:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__thead>tr>th:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table--bordered .zt-table__tbody>tr>td{position:relative}.zt-table--bordered .zt-table__tbody>tr>td:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--zt-border-color);transform:scale(.5)}.zt-table--bordered .zt-table__tbody>tr>td:after{border-right-width:var(--zt-border-width);border-bottom-width:var(--zt-border-width)}.zt-table__thead>tr>th{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-head-height);font-weight:600;font-size:var(--zt-table-head-font-size);color:var(--zt-table-head-color);text-align:center;line-height:var(--zt-table-head-height);background:var(--zt-table-head-background)}.zt-table__tbody>tr>td{box-sizing:border-box;overflow-wrap:break-word;min-height:var(--zt-table-body-height);font-size:var(--zt-table-body-font-size);color:var(--zt-table-body-color);text-align:center;line-height:var(--zt-table-body-line-height);background:var(--zt-table-body-background);padding:10px 16px}.zt-table--striped .zt-table__tbody>tr:nth-child(even)>td{background:var(--zt-table-head-background)}.zt-table__left--last{border-right:none!important}.zt-table__left--last:after{content:"";position:absolute;top:0;right:-10px;width:10px;height:100%;opacity:.06;background-image:linear-gradient(90deg,#000000 0%,rgba(0,0,0,0) 100%)}.zt-table__left--fixed{position:-webkit-sticky!important;position:sticky!important;z-index:2}.zt-table__head{display:flex;justify-content:center}.zt-table__head-sort{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;color:var(--zt-table-sort-default)}.zt-table__head-label{line-height:var(--zt-table-head-height)}.zt-table__sort-active{color:var(--zt-table-sort-active)}.zt-table--skeleton{background-color:#fff;padding-bottom:10px}.zt-table__row{display:flex;box-sizing:border-box;padding:0 10px;height:40px}.zt-table__row--head{display:flex;justify-content:center;align-items:center;background-color:#e7f0fb;margin-bottom:8px}.zt-table__row--head .zt-table__col-item{background-color:#cfdae9;height:20px}.zt-table__col{display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:1;padding:4px 6px;height:40px}.zt-table__col-item{width:100%;height:100%;border-radius:4px;background-color:rgba(45,75,115,.06)}.zt-table--animate{animation:zt-table-blink var(--zt-skeleton-duration) ease-in-out infinite}@keyframes zt-table-blink{50%{opacity:.6}}
@@ -0,0 +1,77 @@
1
+ export declare const Table: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ headList: {
3
+ type: import("vue").PropType<import("./Table").TableHeaderOption[]>;
4
+ default: () => import("./Table").TableHeaderOption[];
5
+ };
6
+ dataList: {
7
+ type: import("vue").PropType<import("./Table").TableBodyOption[]>;
8
+ default: () => import("./Table").TableBodyOption[];
9
+ };
10
+ striped: {
11
+ type: BooleanConstructor;
12
+ default: true;
13
+ };
14
+ emptyValue: {
15
+ type: import("vue").PropType<string>;
16
+ default: string;
17
+ };
18
+ loading: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ skeletonRow: {
23
+ type: NumberConstructor;
24
+ default: number;
25
+ };
26
+ border: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "sort"[], "sort", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
31
+ headList: {
32
+ type: import("vue").PropType<import("./Table").TableHeaderOption[]>;
33
+ default: () => import("./Table").TableHeaderOption[];
34
+ };
35
+ dataList: {
36
+ type: import("vue").PropType<import("./Table").TableBodyOption[]>;
37
+ default: () => import("./Table").TableBodyOption[];
38
+ };
39
+ striped: {
40
+ type: BooleanConstructor;
41
+ default: true;
42
+ };
43
+ emptyValue: {
44
+ type: import("vue").PropType<string>;
45
+ default: string;
46
+ };
47
+ loading: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ skeletonRow: {
52
+ type: NumberConstructor;
53
+ default: number;
54
+ };
55
+ border: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ }>> & {
60
+ onSort?: ((...args: any[]) => any) | undefined;
61
+ }, {
62
+ border: boolean;
63
+ loading: boolean;
64
+ headList: import("./Table").TableHeaderOption[];
65
+ dataList: import("./Table").TableBodyOption[];
66
+ striped: boolean;
67
+ emptyValue: string;
68
+ skeletonRow: number;
69
+ }>>;
70
+ export default Table;
71
+ export { tableProps } from './Table';
72
+ export type { TableHeaderOption, TableProps } from './Table';
73
+ declare module 'vue' {
74
+ interface GlobalComponents {
75
+ ZtTable: typeof Table;
76
+ }
77
+ }
@@ -0,0 +1,10 @@
1
+ import { withInstall } from "../utils/index.mjs";
2
+ import _Table from "./Table.mjs";
3
+ const Table = withInstall(_Table);
4
+ var stdin_default = Table;
5
+ import { tableProps } from "./Table.mjs";
6
+ export {
7
+ Table,
8
+ stdin_default as default,
9
+ tableProps
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import "../../style/base.css";
2
+ import "../../badge/index.css";
3
+ import "../../icon/index.css";
4
+ import "../index.css";
@@ -0,0 +1,5 @@
1
+ export declare type SortOrderType = 'ascend' | 'descend';
2
+ export declare enum SortOrderEnum {
3
+ ASCEND = "ascend",
4
+ DESCEND = "descend"
5
+ }
@@ -0,0 +1,8 @@
1
+ var SortOrderEnum = /* @__PURE__ */ ((SortOrderEnum2) => {
2
+ SortOrderEnum2["ASCEND"] = "ascend";
3
+ SortOrderEnum2["DESCEND"] = "descend";
4
+ return SortOrderEnum2;
5
+ })(SortOrderEnum || {});
6
+ export {
7
+ SortOrderEnum
8
+ };
package/es/tabs/Tabs.mjs CHANGED
@@ -8,6 +8,7 @@ import { route } from "../composables/use-route.mjs";
8
8
  import { useRefs } from "../composables/use-refs.mjs";
9
9
  import { useExpose } from "../composables/use-expose.mjs";
10
10
  import { onPopupReopen } from "../composables/on-popup-reopen.mjs";
11
+ import { useVisibilityChange } from "../composables/use-visibility-change.mjs";
11
12
  import { Sticky } from "../sticky/index.mjs";
12
13
  import TabsTitle from "./TabsTitle.mjs";
13
14
  import TabsContent from "./TabsContent.mjs";
@@ -333,6 +334,7 @@ var stdin_default = defineComponent({
333
334
  onActivated(setLine);
334
335
  onPopupReopen(setLine);
335
336
  onMountedOrActivated(init);
337
+ useVisibilityChange(root, setLine);
336
338
  useEventListener("scroll", onScroll, {
337
339
  target: scroller,
338
340
  passive: true
package/es/tabs/index.css CHANGED
@@ -1 +1 @@
1
- :root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-font-size: var(--zt-font-size-md);--zt-tab-active-font-size: var(--zt-font-size-lg);--zt-tab-active-opacity: .2;--zt-tab-disabled-font-size: var(--zt-font-size-md);--zt-tab-line-height: var(--zt-line-height-md);--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 4px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-a6);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-tab-font-size);line-height:var(--zt-tab-line-height);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-size:var(--zt-tab-active-font-size);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-tab-disabled-font-size)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap{height:var(--zt-tabs-card-height)}.zt-theme-dark{--zt-tabs-nav-background: var(--zt-background-2);--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
1
+ :root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-font-size: var(--zt-font-size-md);--zt-tab-active-font-size: var(--zt-font-size-lg);--zt-tab-active-opacity: .2;--zt-tab-disabled-font-size: var(--zt-font-size-md);--zt-tab-line-height: var(--zt-line-height-md);--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 4px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-a6);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-tab-font-size);line-height:var(--zt-tab-line-height);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-size:var(--zt-tab-active-font-size);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-tab-disabled-font-size)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap{height:var(--zt-tabs-card-height)}.zt-theme-dark{--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
package/es/tag/Tag.d.ts CHANGED
@@ -17,6 +17,7 @@ export declare const tagProps: {
17
17
  borderColor: StringConstructor;
18
18
  closeable: BooleanConstructor;
19
19
  icon: StringConstructor;
20
+ image: StringConstructor;
20
21
  iconPrefix: StringConstructor;
21
22
  iconColor: StringConstructor;
22
23
  badge: BooleanConstructor;
@@ -28,6 +29,11 @@ export declare const tagProps: {
28
29
  type: NumberConstructor;
29
30
  default: number;
30
31
  };
32
+ stamp: BooleanConstructor;
33
+ stampDiameter: {
34
+ type: NumberConstructor;
35
+ default: number;
36
+ };
31
37
  };
32
38
  export declare type TagProps = ExtractPropTypes<typeof tagProps>;
33
39
  declare const _default: import("vue").DefineComponent<{
@@ -47,6 +53,7 @@ declare const _default: import("vue").DefineComponent<{
47
53
  borderColor: StringConstructor;
48
54
  closeable: BooleanConstructor;
49
55
  icon: StringConstructor;
56
+ image: StringConstructor;
50
57
  iconPrefix: StringConstructor;
51
58
  iconColor: StringConstructor;
52
59
  badge: BooleanConstructor;
@@ -58,6 +65,11 @@ declare const _default: import("vue").DefineComponent<{
58
65
  type: NumberConstructor;
59
66
  default: number;
60
67
  };
68
+ stamp: BooleanConstructor;
69
+ stampDiameter: {
70
+ type: NumberConstructor;
71
+ default: number;
72
+ };
61
73
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
62
74
  mark: BooleanConstructor;
63
75
  show: {
@@ -75,6 +87,7 @@ declare const _default: import("vue").DefineComponent<{
75
87
  borderColor: StringConstructor;
76
88
  closeable: BooleanConstructor;
77
89
  icon: StringConstructor;
90
+ image: StringConstructor;
78
91
  iconPrefix: StringConstructor;
79
92
  iconColor: StringConstructor;
80
93
  badge: BooleanConstructor;
@@ -86,17 +99,24 @@ declare const _default: import("vue").DefineComponent<{
86
99
  type: NumberConstructor;
87
100
  default: number;
88
101
  };
102
+ stamp: BooleanConstructor;
103
+ stampDiameter: {
104
+ type: NumberConstructor;
105
+ default: number;
106
+ };
89
107
  }>> & {
90
108
  onClose?: ((...args: any[]) => any) | undefined;
91
109
  }, {
110
+ mark: boolean;
92
111
  type: TagType;
93
112
  badge: boolean;
94
- mark: boolean;
95
113
  show: boolean;
96
114
  round: boolean;
97
115
  closeable: boolean;
98
116
  plain: boolean;
99
117
  badgeWidth: number;
100
118
  badgeHeight: number;
119
+ stamp: boolean;
120
+ stampDiameter: number;
101
121
  }>;
102
122
  export default _default;
package/es/tag/Tag.mjs CHANGED
@@ -3,6 +3,7 @@ import { Transition, defineComponent } from "vue";
3
3
  import { truthProp, makeStringProp, createNamespace, HAPTICS_FEEDBACK, makeNumberProp } from "../utils/index.mjs";
4
4
  import { Icon } from "../icon/index.mjs";
5
5
  import { parseNumber } from "../utils/parse.mjs";
6
+ import Image from "../image/index.mjs";
6
7
  const [name, bem] = createNamespace("tag");
7
8
  const tagProps = {
8
9
  mark: Boolean,
@@ -15,11 +16,14 @@ const tagProps = {
15
16
  borderColor: String,
16
17
  closeable: Boolean,
17
18
  icon: String,
19
+ image: String,
18
20
  iconPrefix: String,
19
21
  iconColor: String,
20
22
  badge: Boolean,
21
23
  badgeWidth: makeNumberProp(50),
22
- badgeHeight: makeNumberProp(50)
24
+ badgeHeight: makeNumberProp(50),
25
+ stamp: Boolean,
26
+ stampDiameter: makeNumberProp(60)
23
27
  };
24
28
  var stdin_default = defineComponent({
25
29
  name,
@@ -75,23 +79,72 @@ var stdin_default = defineComponent({
75
79
  "class": [bem("close"), HAPTICS_FEEDBACK],
76
80
  "onClick": onClose
77
81
  }, null);
78
- const LeftIcon = props.icon && _createVNode(Icon, {
79
- "name": props.icon,
80
- "class": bem("icon"),
81
- "classPrefix": props.iconPrefix,
82
- "style": {
83
- color: props.iconColor
82
+ const LeftIcon = () => {
83
+ if (props.image) {
84
+ return _createVNode(Image, {
85
+ "class": bem("image"),
86
+ "src": props.image
87
+ }, null);
88
+ } else if (props.icon) {
89
+ return _createVNode(Icon, {
90
+ "name": props.icon,
91
+ "class": bem("icon"),
92
+ "classPrefix": props.iconPrefix,
93
+ "style": {
94
+ color: props.iconColor
95
+ }
96
+ }, null);
84
97
  }
85
- }, null);
98
+ };
86
99
  return _createVNode("span", {
87
100
  "style": getStyle(),
88
101
  "class": bem([classes, type])
89
- }, [LeftIcon, (_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
102
+ }, [LeftIcon(), (_a = slots.default) == null ? void 0 : _a.call(slots), CloseIcon]);
103
+ };
104
+ const getStampStyle = () => ({
105
+ color: props.color || props.textColor,
106
+ width: props.stampDiameter + "px",
107
+ height: props.stampDiameter + "px"
108
+ });
109
+ const renderStampTag = () => {
110
+ var _a;
111
+ const {
112
+ type
113
+ } = props;
114
+ return _createVNode("svg", {
115
+ "style": getStampStyle(),
116
+ "class": bem("stamp", [type]),
117
+ "viewBox": "0 0 60 60",
118
+ "xmlns": "http://www.w3.org/2000/svg"
119
+ }, [_createVNode("g", {
120
+ "stroke": "none",
121
+ "stroke-width": "1",
122
+ "fill": "none",
123
+ "fill-rule": "evenodd"
124
+ }, [_createVNode("g", {
125
+ "transform": "translate(-334.000000, -500.000000)",
126
+ "fill": "currentColor"
127
+ }, [_createVNode("g", {
128
+ "transform": "translate(16.000000, 496.000000)"
129
+ }, [_createVNode("g", {
130
+ "transform": "translate(318.000000, 4.000000)"
131
+ }, [_createVNode("path", {
132
+ "d": "M30,54 C38.0297784,54 45.1385247,50.0565924 49.4952837,44.0007323 L51.9121045,44.0009744 C47.2917236,51.217056 39.20442,56 30,56 C20.79558,56 12.7082764,51.217056 8.08789552,44.0009744 L10.5047163,44.0007323 C14.8614753,50.0565924 21.9702216,54 30,54 Z M24.4914569,48.5 L25.1164192,49.7519142 L26.5,49.9601927 L25.5057346,50.9266793 L25.7498261,52.3 L24.5100062,51.6450994 L23.2778261,52.2855681 L23.5057346,50.915003 L22.5,49.9368402 L23.8812192,49.7447029 L24.4914569,48.5 Z M35.4914569,48.5 L36.1164192,49.7519142 L37.5,49.9601927 L36.5057346,50.9266793 L36.7498261,52.3 L35.5100062,51.6450994 L34.2778261,52.2855681 L34.5057346,50.915003 L33.5,49.9368402 L34.8812192,49.7447029 L35.4914569,48.5 Z M30,46 C32.8118899,46 35.4543634,45.274642 37.7505137,44.0008326 L41.3137959,44.0007062 C38.2224755,46.5018817 34.2861899,48 30,48 C25.7138101,48 21.7775245,46.5018817 18.6862041,44.0007062 L22.2494863,44.0008326 C24.5456366,45.274642 27.1881101,46 30,46 Z M16.4914569,44 L17.1164192,45.2519142 L18.5,45.4601927 L17.5057346,46.4266793 L17.7498261,47.8 L16.5100062,47.1450994 L15.2778261,47.7855681 L15.5057346,46.415003 L14.5,45.4368402 L15.8812192,45.2447029 L16.4914569,44 Z M43.4914569,44 L44.1164192,45.2519142 L45.5,45.4601927 L44.5057346,46.4266793 L44.7498261,47.8 L43.5100062,47.1450994 L42.2778261,47.7855681 L42.5057346,46.415003 L41.5,45.4368402 L42.8812192,45.2447029 L43.4914569,44 Z M56,18 C58.209139,18 60,19.790861 60,22 L60,22 L60,38.0000356 C60,40.2091746 58.209139,42.0000356 56,42.0000356 L56,42.0000356 L4,42.0000356 C1.790861,42.0000356 2.705415e-16,40.2091746 0,38.0000356 L0,38.0000356 L0,22 C-2.705415e-16,19.790861 1.790861,18 4,18 L4,18 Z M55,20 L5,20 C3.34314575,20 2,21.3431458 2,23 L2,37 C2,38.6568542 3.34314575,40 5,40 L55,40 C56.6568542,40 58,38.6568542 58,37 L58,23 C58,21.3431458 56.6568542,20 55,20 Z M30,4 C39.2048436,4 47.2924679,8.78338418 51.9127423,16.0000219 L49.4960029,16.0002674 C45.139307,9.94384156 38.0302203,6 30,6 C21.9697797,6 14.860693,9.94384156 10.5039971,16.0002674 L8.08725766,16.0000219 C12.7075321,8.78338418 20.7951564,4 30,4 Z M30,12 C34.2866501,12 38.2233209,13.49844 41.3147917,16.0000995 L37.7525036,16.0002715 C35.4558902,14.7257772 32.8127023,14 30,14 C27.1872977,14 24.5441098,14.7257772 22.2474964,16.0002715 L18.6852083,16.0000995 C21.7766791,13.49844 25.7133499,12 30,12 Z M16.4914569,12 L17.1164192,13.2519142 L18.5,13.4601927 L17.5057346,14.4266793 L17.7498261,15.8 L16.5100062,15.1450994 L15.2778261,15.7855681 L15.5057346,14.415003 L14.5,13.4368402 L15.8812192,13.2447029 L16.4914569,12 Z M43.4914569,12 L44.1164192,13.2519142 L45.5,13.4601927 L44.5057346,14.4266793 L44.7498261,15.8 L43.5100062,15.1450994 L42.2778261,15.7855681 L42.5057346,14.415003 L41.5,13.4368402 L42.8812192,13.2447029 L43.4914569,12 Z M24.4914569,7.5 L25.1164192,8.75191416 L26.5,8.96019274 L25.5057346,9.92667928 L25.7498261,11.3 L24.5100062,10.6450994 L23.2778261,11.2855681 L23.5057346,9.91500302 L22.5,8.93684023 L23.8812192,8.7447029 L24.4914569,7.5 Z M35.4914569,7.5 L36.1164192,8.75191416 L37.5,8.96019274 L36.5057346,9.92667928 L36.7498261,11.3 L35.5100062,10.6450994 L34.2778261,11.2855681 L34.5057346,9.91500302 L33.5,8.93684023 L34.8812192,8.7447029 L35.4914569,7.5 Z",
133
+ "transform": "translate(30.000000, 30.000000) rotate(35.000000) translate(-30.000000, -30.000000) "
134
+ }, null)])])])]), _createVNode("foreignObject", {
135
+ "width": "50px",
136
+ "height": "24px",
137
+ "x": "5",
138
+ "y": "19",
139
+ "transform": "rotate(35, 30, 30)"
140
+ }, [_createVNode("div", {
141
+ "class": bem("stamp", ["text"])
142
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])])]);
90
143
  };
91
144
  return () => _createVNode(Transition, {
92
145
  "name": props.closeable ? "zt-fade" : void 0
93
146
  }, {
94
- default: () => [props.show ? renderTag() : null]
147
+ default: () => [props.stamp && props.show ? renderStampTag() : props.show ? renderTag() : null]
95
148
  });
96
149
  }
97
150
  });