zartui 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) 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/cascader/Cascader.mjs +0 -2
  5. package/es/cascader/index.css +1 -1
  6. package/es/checkbox/Checkbox.d.ts +1 -1
  7. package/es/checkbox/Checker.d.ts +2 -2
  8. package/es/checkbox/index.d.ts +1 -1
  9. package/es/collapse-item/CollapseItem.mjs +3 -1
  10. package/es/date-time-picker/DateTimePicker.d.ts +1 -1
  11. package/es/date-time-picker/DateTimePicker.mjs +9 -3
  12. package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  13. package/es/date-time-picker/index.d.ts +1 -1
  14. package/es/dialog/index.css +1 -1
  15. package/es/divider/index.css +1 -1
  16. package/es/dropdown-item/DropdownItem.mjs +7 -4
  17. package/es/dropdown-menu/DropdownMenu.mjs +2 -2
  18. package/es/dropdown-menu/types.d.ts +1 -0
  19. package/es/empty/Images.mjs +9 -9
  20. package/es/empty/index.css +1 -1
  21. package/es/hierarchy-select/Breadcrumb.d.ts +43 -0
  22. package/es/hierarchy-select/Breadcrumb.mjs +56 -0
  23. package/es/hierarchy-select/HierarchySelect.d.ts +104 -0
  24. package/es/hierarchy-select/HierarchySelect.mjs +221 -0
  25. package/es/hierarchy-select/index.css +1 -0
  26. package/es/hierarchy-select/index.d.ts +79 -0
  27. package/es/hierarchy-select/index.mjs +8 -0
  28. package/es/hierarchy-select/style/index.d.ts +1 -0
  29. package/es/hierarchy-select/style/index.mjs +8 -0
  30. package/es/hierarchy-select/svg/SubIcon.d.ts +1 -0
  31. package/es/hierarchy-select/svg/SubIcon.mjs +33 -0
  32. package/es/hierarchy-select/types.d.ts +7 -0
  33. package/es/hierarchy-select/types.mjs +0 -0
  34. package/es/icon/config.mjs +3 -1
  35. package/es/icon/index.css +1 -1
  36. package/es/image-preview/ImagePreview.mjs +1 -1
  37. package/es/index-anchor/IndexAnchor.d.ts +11 -0
  38. package/es/index-anchor/IndexAnchor.mjs +88 -0
  39. package/es/index-anchor/index.css +1 -0
  40. package/es/index-anchor/index.d.ts +14 -0
  41. package/es/index-anchor/index.mjs +10 -0
  42. package/es/index-anchor/style/index.d.ts +1 -0
  43. package/es/index-anchor/style/index.mjs +3 -0
  44. package/es/index-anchor/types.d.ts +11 -0
  45. package/es/index-anchor/types.mjs +0 -0
  46. package/es/index-bar/IndexBar.d.ts +64 -0
  47. package/es/index-bar/IndexBar.mjs +275 -0
  48. package/es/index-bar/index.css +1 -0
  49. package/es/index-bar/index.d.ts +50 -0
  50. package/es/index-bar/index.mjs +10 -0
  51. package/es/index-bar/style/index.d.ts +1 -0
  52. package/es/index-bar/style/index.mjs +2 -0
  53. package/es/index-bar/types.d.ts +16 -0
  54. package/es/index-bar/types.mjs +0 -0
  55. package/es/index.d.ts +8 -1
  56. package/es/index.mjs +22 -1
  57. package/es/lazyload/vue-lazyload/index.mjs +5 -0
  58. package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
  59. package/es/lazyload/vue-lazyload/listener.mjs +45 -0
  60. package/es/list/List.mjs +2 -4
  61. package/es/list/index.css +1 -1
  62. package/es/locale/lang/en-US.d.ts +7 -23
  63. package/es/locale/lang/en-US.mjs +7 -23
  64. package/es/locale/lang/zh-CN.d.ts +7 -23
  65. package/es/locale/lang/zh-CN.mjs +7 -23
  66. package/es/media-picker/MediaPicker.mjs +20 -0
  67. package/es/media-picker/image/PickFileIcon.mjs +1 -1
  68. package/es/media-picker/image/PickPhotoIcon.mjs +1 -1
  69. package/es/media-picker/image/TakeAudioIcon.mjs +1 -1
  70. package/es/media-picker/image/TakePhotoIcon.mjs +1 -1
  71. package/es/media-picker/image/TakeVideoIcon.mjs +1 -1
  72. package/es/media-picker/index.css +1 -1
  73. package/es/media-picker/util/media-util.mjs +3 -0
  74. package/es/media-picker/watermark/image-processor.mjs +10 -6
  75. package/es/media-picker/watermark/resize-options.mjs +1 -0
  76. package/es/media-picker/watermark/watermark.mjs +4 -0
  77. package/es/multiple-picker/MultiplePicker.d.ts +4 -4
  78. package/es/multiple-picker/MultiplePicker.mjs +3 -3
  79. package/es/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  80. package/es/multiple-picker/MultiplePickerOptions.mjs +3 -3
  81. package/es/multiple-picker/index.d.ts +3 -3
  82. package/es/notice-bar/index.css +1 -1
  83. package/es/picker/Picker.mjs +7 -4
  84. package/es/picker/PickerToolbar.mjs +1 -0
  85. package/es/popover/Popover.d.ts +13 -0
  86. package/es/popover/Popover.mjs +91 -4
  87. package/es/popover/index.css +1 -1
  88. package/es/popover/index.d.ts +9 -0
  89. package/es/popup/Popup.mjs +1 -0
  90. package/es/popup/index.css +1 -1
  91. package/es/popup/shared.mjs +12 -0
  92. package/es/radio/Radio.d.ts +1 -1
  93. package/es/radio/index.d.ts +1 -1
  94. package/es/rate/index.css +1 -1
  95. package/es/search/Search.d.ts +1 -1
  96. package/es/search/Search.mjs +1 -0
  97. package/es/search/index.d.ts +1 -1
  98. package/es/signature/Signature.mjs +13 -10
  99. package/es/signature/index.css +1 -1
  100. package/es/step/Step.mjs +10 -6
  101. package/es/step/index.css +1 -1
  102. package/es/stepper/Stepper.mjs +2 -0
  103. package/es/stepper/index.css +1 -1
  104. package/es/steps/index.css +1 -1
  105. package/es/sticky/Sticky.mjs +2 -0
  106. package/es/style/base.css +1 -1
  107. package/es/style/css-variables.css +1 -1
  108. package/es/swipe/Swipe.d.ts +3 -1
  109. package/es/swipe/Swipe.mjs +19 -2
  110. package/es/swipe/index.d.ts +3 -1
  111. package/es/swipe-cell/SwipeCell.d.ts +44 -0
  112. package/es/swipe-cell/SwipeCell.mjs +163 -0
  113. package/es/swipe-cell/index.css +1 -0
  114. package/es/swipe-cell/index.d.ts +39 -0
  115. package/es/swipe-cell/index.mjs +10 -0
  116. package/es/swipe-cell/style/index.d.ts +1 -0
  117. package/es/swipe-cell/style/index.mjs +2 -0
  118. package/es/swipe-cell/types.d.ts +9 -0
  119. package/es/swipe-cell/types.mjs +0 -0
  120. package/es/switch/index.css +1 -1
  121. package/es/tabbar-item/index.css +1 -1
  122. package/es/table/Table.d.ts +113 -0
  123. package/es/table/Table.mjs +118 -0
  124. package/es/table/index.css +1 -0
  125. package/es/table/index.d.ts +75 -0
  126. package/es/table/index.mjs +10 -0
  127. package/es/table/style/index.d.ts +1 -0
  128. package/es/table/style/index.mjs +2 -0
  129. package/es/tabs/Tabs.mjs +2 -0
  130. package/es/tabs/index.css +1 -1
  131. package/es/tag/Tag.d.ts +18 -1
  132. package/es/tag/Tag.mjs +47 -2
  133. package/es/tag/index.css +1 -1
  134. package/es/tag/index.d.ts +13 -1
  135. package/es/text-ellipsis/TextEllipsis.d.ts +76 -0
  136. package/es/text-ellipsis/TextEllipsis.mjs +118 -0
  137. package/es/text-ellipsis/index.css +1 -0
  138. package/es/text-ellipsis/index.d.ts +60 -0
  139. package/es/text-ellipsis/index.mjs +10 -0
  140. package/es/text-ellipsis/style/index.d.ts +1 -0
  141. package/es/text-ellipsis/style/index.mjs +2 -0
  142. package/es/text-ellipsis/types.d.ts +3 -0
  143. package/es/text-ellipsis/types.mjs +0 -0
  144. package/es/timeline/Timeline.d.ts +113 -0
  145. package/es/timeline/Timeline.mjs +162 -0
  146. package/es/timeline/index.css +1 -0
  147. package/es/timeline/index.d.ts +75 -0
  148. package/es/timeline/index.mjs +10 -0
  149. package/es/timeline/style/index.d.ts +1 -0
  150. package/es/timeline/style/index.mjs +4 -0
  151. package/es/uploader/Uploader.d.ts +1 -1
  152. package/es/uploader/index.d.ts +1 -1
  153. package/es/uploader/utils.mjs +1 -1
  154. package/es/utils/dom.d.ts +1 -0
  155. package/es/utils/dom.mjs +11 -0
  156. package/lib/action-sheet/index.js +4 -0
  157. package/lib/avatar/Avatar.js +4 -0
  158. package/lib/avatar/index.js +4 -0
  159. package/lib/badge/index.js +4 -0
  160. package/lib/button/Button.d.ts +3 -0
  161. package/lib/button/Button.js +2 -0
  162. package/lib/button/index.d.ts +2 -0
  163. package/lib/button/index.js +4 -0
  164. package/lib/calendar/Calendar.js +4 -0
  165. package/lib/calendar/CalendarMonth.js +4 -0
  166. package/lib/calendar/index.js +4 -0
  167. package/lib/cascader/Cascader.js +4 -2
  168. package/lib/cascader/index.css +1 -1
  169. package/lib/cascader/index.js +4 -0
  170. package/lib/cell/index.js +4 -0
  171. package/lib/cell-group/index.js +4 -0
  172. package/lib/checkbox/Checkbox.d.ts +1 -1
  173. package/lib/checkbox/Checkbox.js +4 -0
  174. package/lib/checkbox/Checker.d.ts +2 -2
  175. package/lib/checkbox/index.d.ts +1 -1
  176. package/lib/checkbox/index.js +4 -0
  177. package/lib/checkbox-group/index.js +4 -0
  178. package/lib/col/index.js +4 -0
  179. package/lib/collapse/index.js +4 -0
  180. package/lib/collapse-item/CollapseItem.js +7 -1
  181. package/lib/collapse-item/index.js +4 -0
  182. package/lib/config-provider/index.js +4 -0
  183. package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
  184. package/lib/date-time-picker/DateTimePicker.js +13 -3
  185. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  186. package/lib/date-time-picker/DateTimePickerWrapper.js +4 -0
  187. package/lib/date-time-picker/index.d.ts +1 -1
  188. package/lib/date-time-picker/index.js +4 -0
  189. package/lib/dialog/function-call.js +4 -0
  190. package/lib/dialog/index.css +1 -1
  191. package/lib/dialog/index.js +4 -0
  192. package/lib/divider/index.css +1 -1
  193. package/lib/divider/index.js +4 -0
  194. package/lib/dropdown-item/DropdownItem.js +6 -3
  195. package/lib/dropdown-item/index.js +4 -0
  196. package/lib/dropdown-menu/DropdownMenu.js +6 -2
  197. package/lib/dropdown-menu/index.js +4 -0
  198. package/lib/dropdown-menu/types.d.ts +1 -0
  199. package/lib/empty/Images.js +9 -9
  200. package/lib/empty/index.css +1 -1
  201. package/lib/empty/index.js +4 -0
  202. package/lib/field/index.js +4 -0
  203. package/lib/form/index.js +4 -0
  204. package/lib/grid/index.js +4 -0
  205. package/lib/grid-item/index.js +4 -0
  206. package/lib/hierarchy-select/Breadcrumb.d.ts +43 -0
  207. package/lib/hierarchy-select/Breadcrumb.js +85 -0
  208. package/lib/hierarchy-select/HierarchySelect.d.ts +104 -0
  209. package/lib/hierarchy-select/HierarchySelect.js +250 -0
  210. package/lib/hierarchy-select/index.css +1 -0
  211. package/lib/hierarchy-select/index.d.ts +79 -0
  212. package/lib/hierarchy-select/index.js +37 -0
  213. package/lib/hierarchy-select/style/index.d.ts +1 -0
  214. package/lib/hierarchy-select/style/index.js +8 -0
  215. package/lib/hierarchy-select/svg/SubIcon.d.ts +1 -0
  216. package/lib/hierarchy-select/svg/SubIcon.js +52 -0
  217. package/lib/hierarchy-select/types.d.ts +7 -0
  218. package/lib/hierarchy-select/types.js +15 -0
  219. package/lib/icon/config.js +3 -1
  220. package/lib/icon/index.css +1 -1
  221. package/lib/icon/index.js +4 -0
  222. package/lib/image/index.js +4 -0
  223. package/lib/image-preview/ImagePreview.js +5 -1
  224. package/lib/image-preview/function-call.js +4 -0
  225. package/lib/image-preview/index.js +4 -0
  226. package/lib/index-anchor/IndexAnchor.d.ts +11 -0
  227. package/lib/index-anchor/IndexAnchor.js +107 -0
  228. package/lib/index-anchor/index.css +1 -0
  229. package/lib/index-anchor/index.d.ts +14 -0
  230. package/lib/index-anchor/index.js +39 -0
  231. package/lib/index-anchor/style/index.d.ts +1 -0
  232. package/lib/index-anchor/style/index.js +3 -0
  233. package/lib/index-anchor/types.d.ts +11 -0
  234. package/lib/index-anchor/types.js +15 -0
  235. package/lib/index-bar/IndexBar.d.ts +64 -0
  236. package/lib/index-bar/IndexBar.js +294 -0
  237. package/lib/index-bar/index.css +1 -0
  238. package/lib/index-bar/index.d.ts +50 -0
  239. package/lib/index-bar/index.js +39 -0
  240. package/lib/index-bar/style/index.d.ts +1 -0
  241. package/lib/index-bar/style/index.js +2 -0
  242. package/lib/index-bar/types.d.ts +16 -0
  243. package/lib/index-bar/types.js +15 -0
  244. package/lib/index.css +1 -1
  245. package/lib/index.d.ts +8 -1
  246. package/lib/index.js +22 -1
  247. package/lib/lazyload/vue-lazyload/index.js +9 -0
  248. package/lib/lazyload/vue-lazyload/lazy.js +85 -0
  249. package/lib/lazyload/vue-lazyload/listener.js +45 -0
  250. package/lib/list/List.js +2 -4
  251. package/lib/list/index.css +1 -1
  252. package/lib/list/index.js +4 -0
  253. package/lib/loading/index.js +4 -0
  254. package/lib/locale/index.js +4 -0
  255. package/lib/locale/lang/en-US.d.ts +7 -23
  256. package/lib/locale/lang/en-US.js +7 -23
  257. package/lib/locale/lang/zh-CN.d.ts +7 -23
  258. package/lib/locale/lang/zh-CN.js +7 -23
  259. package/lib/media-picker/MediaPicker.js +24 -0
  260. package/lib/media-picker/image/PickFileIcon.js +1 -1
  261. package/lib/media-picker/image/PickPhotoIcon.js +1 -1
  262. package/lib/media-picker/image/TakeAudioIcon.js +1 -1
  263. package/lib/media-picker/image/TakePhotoIcon.js +1 -1
  264. package/lib/media-picker/image/TakeVideoIcon.js +1 -1
  265. package/lib/media-picker/index.css +1 -1
  266. package/lib/media-picker/index.js +4 -0
  267. package/lib/media-picker/util/media-util.js +3 -0
  268. package/lib/media-picker/watermark/image-processor.js +10 -6
  269. package/lib/media-picker/watermark/resize-options.js +1 -0
  270. package/lib/media-picker/watermark/watermark.js +4 -0
  271. package/lib/media-player/MediaPlayer.js +4 -0
  272. package/lib/media-player/index.js +4 -0
  273. package/lib/multiple-picker/MultiplePicker.d.ts +4 -4
  274. package/lib/multiple-picker/MultiplePicker.js +7 -3
  275. package/lib/multiple-picker/MultiplePickerOptions.d.ts +4 -4
  276. package/lib/multiple-picker/MultiplePickerOptions.js +3 -3
  277. package/lib/multiple-picker/index.d.ts +3 -3
  278. package/lib/multiple-picker/index.js +4 -0
  279. package/lib/nav-bar/index.js +4 -0
  280. package/lib/notice-bar/NoticeBar.js +4 -0
  281. package/lib/notice-bar/index.css +1 -1
  282. package/lib/notice-bar/index.js +4 -0
  283. package/lib/notify/function-call.js +4 -0
  284. package/lib/notify/index.js +4 -0
  285. package/lib/number-keyboard/NumberKeyboard.js +4 -0
  286. package/lib/number-keyboard/NumberKeyboardKey.js +4 -0
  287. package/lib/number-keyboard/index.js +4 -0
  288. package/lib/overlay/index.js +4 -0
  289. package/lib/password-input/index.js +4 -0
  290. package/lib/picker/Picker.js +10 -3
  291. package/lib/picker/PickerToolbar.js +1 -0
  292. package/lib/picker/index.js +4 -0
  293. package/lib/popover/Popover.d.ts +13 -0
  294. package/lib/popover/Popover.js +90 -3
  295. package/lib/popover/index.css +1 -1
  296. package/lib/popover/index.d.ts +9 -0
  297. package/lib/popover/index.js +4 -0
  298. package/lib/popup/Popup.js +1 -0
  299. package/lib/popup/index.css +1 -1
  300. package/lib/popup/index.js +4 -0
  301. package/lib/popup/shared.js +12 -0
  302. package/lib/pull-refresh/index.js +4 -0
  303. package/lib/radio/Radio.d.ts +1 -1
  304. package/lib/radio/Radio.js +4 -0
  305. package/lib/radio/index.d.ts +1 -1
  306. package/lib/radio/index.js +4 -0
  307. package/lib/radio-group/index.js +4 -0
  308. package/lib/rate/index.css +1 -1
  309. package/lib/rate/index.js +4 -0
  310. package/lib/row/index.js +4 -0
  311. package/lib/search/Search.d.ts +1 -1
  312. package/lib/search/Search.js +1 -0
  313. package/lib/search/index.d.ts +1 -1
  314. package/lib/search/index.js +4 -0
  315. package/lib/signature/Signature.js +16 -9
  316. package/lib/signature/index.css +1 -1
  317. package/lib/signature/index.js +4 -0
  318. package/lib/skeleton/index.js +4 -0
  319. package/lib/step/Step.js +10 -6
  320. package/lib/step/index.css +1 -1
  321. package/lib/step/index.js +4 -0
  322. package/lib/stepper/Stepper.js +6 -0
  323. package/lib/stepper/index.css +1 -1
  324. package/lib/stepper/index.js +4 -0
  325. package/lib/steps/index.css +1 -1
  326. package/lib/steps/index.js +4 -0
  327. package/lib/sticky/Sticky.js +2 -0
  328. package/lib/sticky/index.js +4 -0
  329. package/lib/style/base.css +1 -1
  330. package/lib/style/css-variables.css +1 -1
  331. package/lib/swipe/Swipe.d.ts +3 -1
  332. package/lib/swipe/Swipe.js +19 -2
  333. package/lib/swipe/index.d.ts +3 -1
  334. package/lib/swipe/index.js +4 -0
  335. package/lib/swipe-cell/SwipeCell.d.ts +44 -0
  336. package/lib/swipe-cell/SwipeCell.js +182 -0
  337. package/lib/swipe-cell/index.css +1 -0
  338. package/lib/swipe-cell/index.d.ts +39 -0
  339. package/lib/swipe-cell/index.js +39 -0
  340. package/lib/swipe-cell/style/index.d.ts +1 -0
  341. package/lib/swipe-cell/style/index.js +2 -0
  342. package/lib/swipe-cell/types.d.ts +9 -0
  343. package/lib/swipe-cell/types.js +15 -0
  344. package/lib/swipe-item/index.js +4 -0
  345. package/lib/switch/index.css +1 -1
  346. package/lib/switch/index.js +4 -0
  347. package/lib/tab/index.js +4 -0
  348. package/lib/tabbar/index.js +4 -0
  349. package/lib/tabbar-item/index.css +1 -1
  350. package/lib/tabbar-item/index.js +4 -0
  351. package/lib/table/Table.d.ts +113 -0
  352. package/lib/table/Table.js +137 -0
  353. package/lib/table/index.css +1 -0
  354. package/lib/table/index.d.ts +75 -0
  355. package/lib/table/index.js +39 -0
  356. package/lib/table/style/index.d.ts +1 -0
  357. package/lib/table/style/index.js +2 -0
  358. package/lib/tabs/Tabs.js +6 -0
  359. package/lib/tabs/index.css +1 -1
  360. package/lib/tabs/index.js +4 -0
  361. package/lib/tag/Tag.d.ts +18 -1
  362. package/lib/tag/Tag.js +47 -2
  363. package/lib/tag/index.css +1 -1
  364. package/lib/tag/index.d.ts +13 -1
  365. package/lib/tag/index.js +4 -0
  366. package/lib/text-ellipsis/TextEllipsis.d.ts +76 -0
  367. package/lib/text-ellipsis/TextEllipsis.js +137 -0
  368. package/lib/text-ellipsis/index.css +1 -0
  369. package/lib/text-ellipsis/index.d.ts +60 -0
  370. package/lib/text-ellipsis/index.js +39 -0
  371. package/lib/text-ellipsis/style/index.d.ts +1 -0
  372. package/lib/text-ellipsis/style/index.js +2 -0
  373. package/lib/text-ellipsis/types.d.ts +3 -0
  374. package/lib/text-ellipsis/types.js +15 -0
  375. package/lib/time-picker/TimePicker.js +4 -0
  376. package/lib/time-picker/TimePickerColumn.js +4 -0
  377. package/lib/time-picker/index.js +4 -0
  378. package/lib/timeline/Timeline.d.ts +113 -0
  379. package/lib/timeline/Timeline.js +191 -0
  380. package/lib/timeline/index.css +1 -0
  381. package/lib/timeline/index.d.ts +75 -0
  382. package/lib/timeline/index.js +39 -0
  383. package/lib/timeline/style/index.d.ts +1 -0
  384. package/lib/timeline/style/index.js +4 -0
  385. package/lib/toast/function-call.js +4 -0
  386. package/lib/toast/index.js +4 -0
  387. package/lib/uploader/Uploader.d.ts +1 -1
  388. package/lib/uploader/Uploader.js +4 -0
  389. package/lib/uploader/index.d.ts +1 -1
  390. package/lib/uploader/index.js +4 -0
  391. package/lib/uploader/utils.js +1 -1
  392. package/lib/utils/create.js +4 -0
  393. package/lib/utils/dom.d.ts +1 -0
  394. package/lib/utils/dom.js +11 -0
  395. package/lib/web-types.json +1 -1
  396. package/lib/zartui.cjs.js +2619 -1019
  397. package/lib/zartui.es.js +2671 -1071
  398. package/lib/zartui.js +3354 -1218
  399. package/lib/zartui.min.js +1 -1
  400. package/package.json +24 -23
  401. package/README.md +0 -25
@@ -1 +1 @@
1
- :root{--zt-step-text-color: var(--zt-text-color-2);--zt-step-active-color: var(--zt-gray-default);--zt-step-process-text-color: var(--zt-text-color);--zt-step-font-size: var(--zt-font-size-md);--zt-step-line-color: var(--zt-gray-a1);--zt-step-finish-line-color: var(--zt-primary-color);--zt-step-finish-text-color: var(--zt-text-color);--zt-step-icon-size: 12px;--zt-step-circle-size: 20px;--zt-step-circle-font-size: 14px;--zt-step-circle-color: var(--zt-gray-6);--zt-step-horizontal-title-font-size: var(--zt-font-size-md)}.zt-step{-webkit-user-select:none;user-select:none;position:relative;flex:1}.zt-step__circle{display:block;width:var(--zt-step-circle-size);height:var(--zt-step-circle-size);line-height:var(--zt-step-circle-size);border-radius:50%;text-align:center;font-size:var(--zt-step-circle-font-size)}.zt-step__line{position:absolute;background-color:var(--zt-step-line-color);transition:background-color var(--zt-duration-base)}.zt-step--horizontal{float:left}.zt-step--horizontal .zt-step__circle-container{position:absolute;top:10px;left:calc(50% - 10px);z-index:1;background-color:var(--zt-white);transform:translateY(-50%)}.zt-step--horizontal .zt-step__title{display:inline-block;margin-top:26px;font-size:var(--zt-step-horizontal-title-font-size);width:100%;text-align:center}.zt-step--horizontal .zt-step__line{top:10px;left:calc(50% + 14px);width:calc(100% - 28px);height:1px}.zt-step--horizontal .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step--horizontal .zt-step--process{color:var(--zt-step-process-text-color)}.zt-step--vertical{display:block;float:none;padding:10px 16px 10px 8px;line-height:var(--zt-line-height-sm)}.zt-step--vertical .zt-step__title{font-size:var(--zt-step-horizontal-title-font-size)}.zt-step--vertical .zt-step__circle-container{position:absolute;top:20px;left:0px;z-index:1;font-size:var(--zt-step-icon-size);line-height:1;transform:translate(-100%,-50%)}.zt-step--vertical .zt-step__line{left:-10px;top:34px;height:calc(100% - 28px);width:1px}.zt-step--vertical .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step:last-child .zt-step__line{width:0}.zt-step__icon,.zt-step__title{transition:color var(--zt-duration-base)}
1
+ :root{--zt-step-text-color: var(--zt-text-color-2);--zt-step-active-color: var(--zt-gray-default);--zt-step-process-text-color: var(--zt-text-color);--zt-step-font-size: var(--zt-font-size-md);--zt-step-line-color: var(--zt-gray-a1);--zt-step-finish-line-color: var(--zt-primary-color);--zt-step-finish-text-color: var(--zt-text-color);--zt-step-icon-size: 12px;--zt-step-circle-container-backgroud: var(--zt-background-2);--zt-step-circle-size: 20px;--zt-step-circle-font-size: 14px;--zt-step-circle-color: var(--zt-gray-6);--zt-step-horizontal-title-font-size: var(--zt-font-size-md)}.zt-step{-webkit-user-select:none;user-select:none;position:relative;flex:1}.zt-step__circle{display:block;width:var(--zt-step-circle-size);height:var(--zt-step-circle-size);line-height:var(--zt-step-circle-size);background:var(--zt-gray-a2);border-radius:50%;text-align:center;font-size:var(--zt-step-circle-font-size)}.zt-step__line{position:absolute;background-color:var(--zt-step-line-color);transition:background-color var(--zt-duration-base)}.zt-step--horizontal{float:left}.zt-step--horizontal .zt-step__circle-container{position:absolute;top:10px;left:calc(50% - 10px);z-index:1;background-color:var(--zt-step-circle-container-backgroud);transform:translateY(-50%)}.zt-step--horizontal .zt-step__title{display:inline-block;margin-top:26px;font-size:var(--zt-step-horizontal-title-font-size);color:var(--zt-gray-a6);width:100%;text-align:center}.zt-step--horizontal .zt-step__title--active{color:var(--zt-text-color)}.zt-step--horizontal .zt-step__line{top:10px;left:calc(50% + 14px);width:calc(100% - 28px);height:1px}.zt-step--horizontal .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step--horizontal .zt-step--process{color:var(--zt-step-process-text-color)}.zt-step--vertical{display:block;float:none;padding:10px 16px 10px 8px;line-height:var(--zt-line-height-sm)}.zt-step--vertical .zt-step__title{font-size:var(--zt-step-horizontal-title-font-size);color:var(--zt-gray-a6)}.zt-step--vertical .zt-step__circle-container{position:absolute;top:20px;left:0px;z-index:1;font-size:var(--zt-step-icon-size);line-height:1;transform:translate(-100%,-50%)}.zt-step--vertical .zt-step__line{left:-10px;top:34px;height:calc(100% - 28px);width:1px}.zt-step--vertical .zt-step__icon{display:block;font-size:var(--zt-step-icon-size);left:50%;top:50%;transform:translate(-50%,-50%)}.zt-step:last-child .zt-step__line{width:0}.zt-step__icon,.zt-step__title{transition:color var(--zt-duration-base)}
package/lib/step/index.js CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -237,6 +241,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
237
241
  bem("minus", {
238
242
  disabled: minusDisabled.value
239
243
  }),
244
+ // { [HAPTICS_FEEDBACK]: !minusDisabled.value },
240
245
  {
241
246
  [bem("could-click")]: !minusDisabled.value
242
247
  }
@@ -272,6 +277,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
272
277
  {
273
278
  [bem("could-click")]: !plusDisabled.value
274
279
  }
280
+ // { [HAPTICS_FEEDBACK]: !plusDisabled.value },
275
281
  ],
276
282
  "aria-disabled": plusDisabled.value || void 0
277
283
  }, createListeners("plus")), [(0, import_vue.createVNode)(import_icon.default, {
@@ -1 +1 @@
1
- :root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-5);--zt-stepper-button-round-theme-color: var(--zt-primary-color);--zt-stepper-button-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0px rgba(45, 75, 115, .1);--zt-stepper-input-width: 60px;--zt-stepper-input-height: 32px;--zt-stepper-input-font-size: var(--zt-font-size-md);--zt-stepper-input-line-height: 20px;--zt-stepper-input-text-color: var(--zt-text-color);--zt-stepper-input-disabled-text-color: var(--zt-text-color-3);--zt-stepper-input-disabled-background: var(--zt-active-color);--zt-stepper-input-box-shadow: inset 4px 4px 8px -4px rgba(45, 75, 115, .1);--zt-stepper-radius: var(--zt-radius-max)}.zt-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.zt-stepper__could-click:active{box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-stepper__minus,.zt-stepper__plus{display:inline-flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;width:var(--zt-stepper-input-height);height:var(--zt-stepper-input-height);margin:0;padding:0;vertical-align:middle;background:var(--zt-stepper-background);border:0;background-image:linear-gradient(135deg,#e6ebf0 0%,#ffffff 100%,#ffffff 100%);box-shadow:var(--zt-stepper-button-box-shadow)}.zt-stepper__minus i,.zt-stepper__plus i{transform:scale(.625)}.zt-stepper__minus--disabled,.zt-stepper__plus--disabled{color:var(--zt-stepper-button-disabled-icon-color);background-color:var(--zt-stepper-button-disabled-color);cursor:not-allowed}.zt-stepper__minus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__minus:after{display:none}.zt-stepper__plus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__input{box-sizing:border-box;width:var(--zt-stepper-input-width);height:var(--zt-stepper-input-height);margin:0 12px;padding:4px;color:var(--zt-stepper-input-text-color);font-size:var(--zt-stepper-input-font-size);line-height:var(--zt-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--zt-stepper-background);border:0;border-width:1px 0;border-radius:var(--zt-radius-gt);box-shadow:var(--zt-stepper-input-box-shadow);-webkit-appearance:none}.zt-stepper__input:disabled{color:var(--zt-stepper-input-disabled-text-color);background-color:var(--zt-stepper-input-disabled-background);-webkit-text-fill-color:var(--zt-stepper-input-disabled-text-color);opacity:1}.zt-stepper__input:read-only{cursor:default}.zt-stepper--round .zt-stepper__input{background-color:transparent}.zt-stepper--round .zt-stepper__plus,.zt-stepper--round .zt-stepper__minus{border-radius:100%}.zt-stepper--round .zt-stepper__plus--disabled,.zt-stepper--round .zt-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.zt-stepper--round .zt-stepper__plus{color:var(--zt-white);background:var(--zt-stepper-button-round-theme-color)}.zt-stepper--round .zt-stepper__minus{color:var(--zt-stepper-button-round-theme-color);background-color:var(--zt-background-2);border:1px solid var(--zt-stepper-button-round-theme-color)}
1
+ :root{--zt-stepper-background: rgba(45, 75, 115, .04);--zt-stepper-background-image: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%, #ffffff 100%);--zt-stepper-box-border: 0;--zt-stepper-button-icon-color: var(--zt-text-color);--zt-stepper-button-disabled-color: var(--zt-background);--zt-stepper-button-disabled-icon-color: var(--zt-gray-a2);--zt-stepper-button-round-theme-color: var(--zt-primary-color);--zt-stepper-button-box-shadow: -4px -4px 8px 0 #ffffff, 4px 4px 8px 0px rgba(45, 75, 115, .1);--zt-stepper-input-width: 60px;--zt-stepper-input-height: 32px;--zt-stepper-input-font-size: var(--zt-font-size-md);--zt-stepper-input-line-height: 20px;--zt-stepper-input-text-color: var(--zt-text-color);--zt-stepper-input-disabled-text-color: var(--zt-gray-a2);--zt-stepper-input-disabled-background: var(--zt-active-color);--zt-stepper-input-box-shadow: inset 4px 4px 8px -4px rgba(45, 75, 115, .1);--zt-stepper-radius: var(--zt-radius-max)}.zt-stepper{display:inline-block;-webkit-user-select:none;user-select:none}.zt-stepper__could-click:active{box-shadow:inset 4px 4px 8px rgba(45,75,115,.24)}.zt-stepper__minus,.zt-stepper__plus{display:inline-flex;justify-content:center;align-items:center;position:relative;box-sizing:border-box;width:var(--zt-stepper-input-height);height:var(--zt-stepper-input-height);margin:0;padding:0;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);background-image:var(--zt-stepper-background-image);box-shadow:var(--zt-stepper-button-box-shadow)}.zt-stepper__minus i,.zt-stepper__plus i{transform:scale(.625)}.zt-stepper__minus--disabled,.zt-stepper__plus--disabled{color:var(--zt-stepper-button-disabled-icon-color);background-color:var(--zt-stepper-button-disabled-color);cursor:not-allowed}.zt-stepper__minus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__minus:after{display:none}.zt-stepper__plus{border-radius:var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius) var(--zt-stepper-radius)}.zt-stepper__input{box-sizing:border-box;width:var(--zt-stepper-input-width);height:var(--zt-stepper-input-height);margin:0 12px;padding:4px;color:var(--zt-stepper-input-text-color);font-size:var(--zt-stepper-input-font-size);line-height:var(--zt-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--zt-stepper-background);border:var(--zt-stepper-box-border);border-radius:var(--zt-radius-gt);box-shadow:var(--zt-stepper-input-box-shadow);-webkit-appearance:none}.zt-stepper__input:disabled{color:var(--zt-stepper-input-disabled-text-color);background:var(--zt-stepper-input-disabled-background);-webkit-text-fill-color:var(--zt-stepper-input-disabled-text-color);opacity:1}.zt-stepper__input:read-only{cursor:default}.zt-stepper--round .zt-stepper__input{background-color:transparent}.zt-stepper--round .zt-stepper__plus,.zt-stepper--round .zt-stepper__minus{border-radius:100%}.zt-stepper--round .zt-stepper__plus--disabled,.zt-stepper--round .zt-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.zt-stepper--round .zt-stepper__plus{color:var(--zt-white);background:var(--zt-stepper-button-round-theme-color)}.zt-stepper--round .zt-stepper__minus{color:var(--zt-stepper-button-round-theme-color);background-color:var(--zt-background-2);border:1px solid var(--zt-stepper-button-round-theme-color)}.zt-theme-dark{--zt-stepper-background: #19232d;--zt-stepper-background-image: linear-gradient(135deg, #0e1824 0%, #203043 100%);--zt-stepper-box-border: 1px solid rgba(255, 255, 255, .12);--zt-stepper-button-box-shadow: -1px -1px 2px 0 rgba(255, 255, 255, .12), 0 0 3px 0 rgba(0, 12, 24, .8);--zt-stepper-input-disabled-background: linear-gradient(147deg, #0e1824 0%, #203043 100%)}
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -1 +1 @@
1
- :root{--zt-steps-background: var(--zt-background-2)}.zt-steps{overflow:hidden;background-color:var(--zt-steps-background);margin:12px;border:0 solid rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px}.zt-steps--horizontal{padding:8px 0}.zt-steps--horizontal .zt-steps__items{position:relative;display:flex}.zt-steps--vertical{padding:0 0 0 var(--zt-padding-xl)}
1
+ :root{--zt-steps-background: var(--zt-background-2);--zt-steps-vertical-title-color: rgba(0, 0, 0, .4)}.zt-steps{overflow:hidden;background-color:var(--zt-steps-background);margin:12px;border:0 solid rgba(0,0,0,.1);box-shadow:0 4px 8px rgba(0,0,0,.1);border-radius:8px}.zt-steps--horizontal{padding:8px 0}.zt-steps--horizontal .zt-steps__items{position:relative;display:flex}.zt-steps--vertical{padding:0 0 0 var(--zt-padding-xl)}.zt-theme-dark{--zt-steps-vertical-title-color: rgba(255, 255, 255, .4)}
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -46,7 +46,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
46
46
  const state = (0, import_vue2.reactive)({
47
47
  fixed: false,
48
48
  width: 0,
49
+ // root width
49
50
  height: 0,
51
+ // root height
50
52
  transform: 0
51
53
  });
52
54
  const offset = (0, import_vue2.computed)(() => (0, import_utils.unitToPx)(props.position === "top" ? props.offsetTop : props.offsetBottom));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -1 +1 @@
1
- :root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]: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-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
1
+ :root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a1: rgba(255, 255, 255, .1);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a4: rgba(255, 255, 255, .4);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}html{-webkit-tap-highlight-color:transparent}:root{margin:0;font-family:var(--zt-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=zt-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes zt-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes zt-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes zt-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes zt-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes zt-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes zt-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes zt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes zt-fade-out{0%{opacity:1}to{opacity:0}}@keyframes zt-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.zt-fade-enter-active{animation:var(--zt-duration-base) zt-fade-in both var(--zt-ease-out)}.zt-fade-leave-active{animation:var(--zt-duration-base) zt-fade-out both var(--zt-ease-in)}.zt-slide-up-enter-active{animation:zt-slide-up-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-up-leave-active{animation:zt-slide-up-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-down-enter-active{animation:zt-slide-down-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-down-leave-active{animation:zt-slide-down-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-left-enter-active{animation:zt-slide-left-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-left-leave-active{animation:zt-slide-left-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-slide-right-enter-active{animation:zt-slide-right-enter var(--zt-duration-base) both var(--zt-ease-out)}.zt-slide-right-leave-active{animation:zt-slide-right-leave var(--zt-duration-base) both var(--zt-ease-in)}.zt-clearfix:after{display:table;clear:both;content:""}.zt-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zt-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.zt-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.zt-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.zt-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-haptics-feedback{cursor:pointer}.zt-haptics-feedback:active{opacity:var(--zt-active-opacity)}[class*=zt-hairline]: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-hairline,.zt-hairline--top,.zt-hairline--left,.zt-hairline--right,.zt-hairline--bottom,.zt-hairline--surround,.zt-hairline--top-bottom{position:relative}.zt-hairline--top:after{border-top-width:var(--zt-border-width)}.zt-hairline--left:after{border-left-width:var(--zt-border-width)}.zt-hairline--right:after{border-right-width:var(--zt-border-width)}.zt-hairline--bottom:after{border-bottom-width:var(--zt-border-width)}.zt-hairline--top-bottom:after,.zt-hairline-unset--top-bottom:after{border-width:var(--zt-border-width) 0}.zt-hairline--surround:after{border-width:var(--zt-border-width)}
@@ -1 +1 @@
1
- :root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}
1
+ :root{--zt-black: #000;--zt-white: #fff;--zt-gray-default: #2d4b73;--zt-gray-1: #f7f8fa;--zt-gray-2: #f2f3f5;--zt-gray-3: #ebedf0;--zt-gray-4: #dcdee0;--zt-gray-5: #c8c9cc;--zt-gray-6: #969799;--zt-gray-7: #646566;--zt-gray-8: #323233;--zt-gray-a04: rgba(45, 75, 115, .04);--zt-gray-a08: rgba(45, 75, 115, .08);--zt-gray-a1: rgba(45, 75, 115, .1);--zt-gray-a2: rgba(45, 75, 115, .2);--zt-gray-a4: rgba(45, 75, 115, .4);--zt-gray-a5: rgba(45, 75, 115, .5);--zt-gray-a6: rgba(45, 75, 115, .6);--zt-gray-a8: rgba(45, 75, 115, .8);--zt-red: #ff5a3c;--zt-blue-light: #3caafa;--zt-blue: #0091fa;--zt-orange: #faaf5a;--zt-orange-dark: #ff5a3c;--zt-orange-light: #fffbe8;--zt-green: #00e173;--zt-yellow: #ffcd23;--zt-orange-2: #ff8700;--zt-primary-color: var(--zt-blue);--zt-success-color: var(--zt-green);--zt-danger-color: #ff5a5a;--zt-warning-color: #ffaf00;--zt-text-color: var(--zt-gray-default);--zt-text-color-a2: var(--zt-gray-a2);--zt-text-color-a4: var(--zt-gray-a4);--zt-text-color-a6: var(--zt-gray-a6);--zt-text-color-a8: var(--zt-gray-a8);--zt-text-color-2: var(--zt-gray-6);--zt-text-color-3: var(--zt-gray-5);--zt-placeholder-color: var(--zt-text-color-a2);--zt-link-color: #576b95;--zt-active-color: var(--zt-gray-2);--zt-active-opacity: .6;--zt-disabled-opacity: .4;--zt-background: #f5faff;--zt-background-2: var(--zt-white);--zt-background-3: var(--zt-white);--zt-background-4: rgba(255, 205, 35, .2);--zt-background-5: #ff4b50;--zt-background-card: var(--zt-white);--zt-padding-xxs: 2px;--zt-padding-base: 4px;--zt-padding-xs: 8px;--zt-padding-sm: 12px;--zt-padding-md: 16px;--zt-padding-lg: 24px;--zt-padding-xl: 32px;--zt-font-bold: 600;--zt-font-size-xs: 10px;--zt-font-size-sm: 12px;--zt-font-size-md: 14px;--zt-font-size-lg: 16px;--zt-font-size-gt: 18px;--zt-line-height-xs: 16px;--zt-line-height-sm: 18px;--zt-line-height-md: 20px;--zt-line-height-lg: 22px;--zt-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--zt-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--zt-duration-base: .3s;--zt-duration-fast: .2s;--zt-ease-out: ease-out;--zt-ease-in: ease-in;--zt-border-color: var(--zt-gray-a1);--zt-border-left-color: #ffcdcd;--zt-border-right-color: rgba(220, 0, 4, .8);--zt-border-width: 1px;--zt-radius-sm: 2px;--zt-radius-md: 4px;--zt-radius-lg: 8px;--zt-radius-gt: 16px;--zt-radius-max: 999px}.zt-theme-dark{--zt-text-color: var(--zt-white);--zt-text-color-2: #707070;--zt-text-color-3: #4d4d4d;--zt-border-color: #3a3a3c;--zt-active-color: #3a3a3c;--zt-background: #0f1923;--zt-background-2: #19232d;--zt-background-3: #37363b;--zt-background-card: rgba(255, 205, 205, .04);--zt-gray-default: rgba(255, 255, 255, .4);--zt-gray-a1: rgba(255, 255, 255, .1);--zt-gray-a2: rgba(255, 255, 255, .2);--zt-gray-a4: rgba(255, 255, 255, .4);--zt-gray-a6: rgba(255, 255, 255, .6);--zt-gray-a8: rgba(255, 255, 255, .8)}
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
73
73
  default: true;
74
74
  };
75
75
  title: ArrayConstructor;
76
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
76
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
77
77
  loop: {
78
78
  type: BooleanConstructor;
79
79
  default: true;
@@ -110,6 +110,8 @@ declare const _default: import("vue").DefineComponent<{
110
110
  title: ArrayConstructor;
111
111
  }>> & {
112
112
  onChange?: ((...args: any[]) => any) | undefined;
113
+ onDragStart?: ((...args: any[]) => any) | undefined;
114
+ onDragEnd?: ((...args: any[]) => any) | undefined;
113
115
  }, {
114
116
  autoplay: string | number;
115
117
  loop: boolean;
@@ -48,7 +48,7 @@ const SWIPE_KEY = Symbol(name);
48
48
  var stdin_default = (0, import_vue2.defineComponent)({
49
49
  name,
50
50
  props: swipeProps,
51
- emits: ["change"],
51
+ emits: ["change", "dragStart", "dragEnd"],
52
52
  setup(props, {
53
53
  emit,
54
54
  slots
@@ -62,6 +62,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
62
62
  active: 0,
63
63
  swiping: false
64
64
  });
65
+ let dragging = false;
65
66
  const touch = (0, import_use_touch.useTouch)();
66
67
  const {
67
68
  children,
@@ -212,6 +213,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
212
213
  if (count.value) {
213
214
  active = Math.min(count.value - 1, active);
214
215
  }
216
+ if (active === -1) {
217
+ active = count.value - 1;
218
+ }
215
219
  state.active = active;
216
220
  state.swiping = true;
217
221
  state.offset = getTargetOffset(active);
@@ -229,9 +233,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
229
233
  const resize = () => initialize(state.active);
230
234
  let touchStartTime;
231
235
  const onTouchStart = (event) => {
232
- if (!props.touchable)
236
+ if (!props.touchable || // avoid resetting position on multi-finger touch
237
+ event.touches.length > 1) {
233
238
  return;
239
+ }
234
240
  touch.start(event);
241
+ dragging = false;
235
242
  touchStartTime = Date.now();
236
243
  stopAutoplay();
237
244
  correctPosition();
@@ -244,6 +251,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
244
251
  move({
245
252
  offset: delta.value
246
253
  });
254
+ if (!dragging) {
255
+ emit("dragStart", {
256
+ index: activeIndicator.value
257
+ });
258
+ dragging = true;
259
+ }
247
260
  }
248
261
  }
249
262
  };
@@ -271,7 +284,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
271
284
  pace: 0
272
285
  });
273
286
  }
287
+ dragging = false;
274
288
  state.swiping = false;
289
+ emit("dragEnd", {
290
+ index: activeIndicator.value
291
+ });
275
292
  autoplay();
276
293
  };
277
294
  const swipeTo = (index, options = {}) => {
@@ -34,7 +34,7 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
34
34
  default: true;
35
35
  };
36
36
  title: ArrayConstructor;
37
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "dragStart" | "dragEnd")[], "change" | "dragStart" | "dragEnd", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
38
  loop: {
39
39
  type: BooleanConstructor;
40
40
  default: true;
@@ -71,6 +71,8 @@ export declare const Swipe: import("../utils").WithInstall<import("vue").DefineC
71
71
  title: ArrayConstructor;
72
72
  }>> & {
73
73
  onChange?: ((...args: any[]) => any) | undefined;
74
+ onDragStart?: ((...args: any[]) => any) | undefined;
75
+ onDragEnd?: ((...args: any[]) => any) | undefined;
74
76
  }, {
75
77
  autoplay: string | number;
76
78
  loop: boolean;
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -0,0 +1,44 @@
1
+ import { type PropType, type ExtractPropTypes } from 'vue';
2
+ import { Interceptor } from '../utils';
3
+ export declare const swipeCellProps: {
4
+ name: {
5
+ type: (NumberConstructor | StringConstructor)[];
6
+ default: string;
7
+ };
8
+ disabled: BooleanConstructor;
9
+ leftWidth: (NumberConstructor | StringConstructor)[];
10
+ rightWidth: (NumberConstructor | StringConstructor)[];
11
+ beforeClose: PropType<Interceptor>;
12
+ stopPropagation: BooleanConstructor;
13
+ };
14
+ export declare type SwipeCellProps = ExtractPropTypes<typeof swipeCellProps>;
15
+ declare const _default: import("vue").DefineComponent<{
16
+ name: {
17
+ type: (NumberConstructor | StringConstructor)[];
18
+ default: string;
19
+ };
20
+ disabled: BooleanConstructor;
21
+ leftWidth: (NumberConstructor | StringConstructor)[];
22
+ rightWidth: (NumberConstructor | StringConstructor)[];
23
+ beforeClose: PropType<Interceptor>;
24
+ stopPropagation: BooleanConstructor;
25
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close" | "open")[], "open" | "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
26
+ name: {
27
+ type: (NumberConstructor | StringConstructor)[];
28
+ default: string;
29
+ };
30
+ disabled: BooleanConstructor;
31
+ leftWidth: (NumberConstructor | StringConstructor)[];
32
+ rightWidth: (NumberConstructor | StringConstructor)[];
33
+ beforeClose: PropType<Interceptor>;
34
+ stopPropagation: BooleanConstructor;
35
+ }>> & {
36
+ onClick?: ((...args: any[]) => any) | undefined;
37
+ onClose?: ((...args: any[]) => any) | undefined;
38
+ onOpen?: ((...args: any[]) => any) | undefined;
39
+ }, {
40
+ name: string | number;
41
+ disabled: boolean;
42
+ stopPropagation: boolean;
43
+ }>;
44
+ export default _default;
@@ -0,0 +1,182 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name2 in all)
7
+ __defProp(target, name2, { get: all[name2], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default,
21
+ swipeCellProps: () => swipeCellProps
22
+ });
23
+ module.exports = __toCommonJS(stdin_exports);
24
+ var import_vue = require("vue");
25
+ var import_vue2 = require("vue");
26
+ var import_utils = require("../utils");
27
+ var import_use = require("@zartui/use");
28
+ var import_use_touch = require("../composables/use-touch");
29
+ var import_use_expose = require("../composables/use-expose");
30
+ const [name, bem] = (0, import_utils.createNamespace)("swipe-cell");
31
+ const swipeCellProps = {
32
+ name: (0, import_utils.makeNumericProp)(""),
33
+ disabled: Boolean,
34
+ leftWidth: import_utils.numericProp,
35
+ rightWidth: import_utils.numericProp,
36
+ beforeClose: Function,
37
+ stopPropagation: Boolean
38
+ };
39
+ var stdin_default = (0, import_vue2.defineComponent)({
40
+ name,
41
+ props: swipeCellProps,
42
+ emits: ["open", "close", "click"],
43
+ setup(props, {
44
+ emit,
45
+ slots
46
+ }) {
47
+ let opened;
48
+ let lockClick;
49
+ let startOffset;
50
+ const root = (0, import_vue2.ref)();
51
+ const leftRef = (0, import_vue2.ref)();
52
+ const rightRef = (0, import_vue2.ref)();
53
+ const state = (0, import_vue2.reactive)({
54
+ offset: 0,
55
+ dragging: false
56
+ });
57
+ const touch = (0, import_use_touch.useTouch)();
58
+ const getWidthByRef = (ref2) => ref2.value ? (0, import_use.useRect)(ref2).width : 0;
59
+ const leftWidth = (0, import_vue2.computed)(() => (0, import_utils.isDef)(props.leftWidth) ? +props.leftWidth : getWidthByRef(leftRef));
60
+ const rightWidth = (0, import_vue2.computed)(() => (0, import_utils.isDef)(props.rightWidth) ? +props.rightWidth : getWidthByRef(rightRef));
61
+ const open = (side) => {
62
+ state.offset = side === "left" ? leftWidth.value : -rightWidth.value;
63
+ if (!opened) {
64
+ opened = true;
65
+ emit("open", {
66
+ name: props.name,
67
+ position: side
68
+ });
69
+ }
70
+ };
71
+ const close = (position) => {
72
+ state.offset = 0;
73
+ if (opened) {
74
+ opened = false;
75
+ emit("close", {
76
+ name: props.name,
77
+ position
78
+ });
79
+ }
80
+ };
81
+ const toggle = (side) => {
82
+ const offset = Math.abs(state.offset);
83
+ const THRESHOLD = 0.15;
84
+ const threshold = opened ? 1 - THRESHOLD : THRESHOLD;
85
+ const width = side === "left" ? leftWidth.value : rightWidth.value;
86
+ if (width && offset > width * threshold) {
87
+ open(side);
88
+ } else {
89
+ close(side);
90
+ }
91
+ };
92
+ const onTouchStart = (event) => {
93
+ if (!props.disabled) {
94
+ startOffset = state.offset;
95
+ touch.start(event);
96
+ }
97
+ };
98
+ const onTouchMove = (event) => {
99
+ if (props.disabled) {
100
+ return;
101
+ }
102
+ const {
103
+ deltaX
104
+ } = touch;
105
+ touch.move(event);
106
+ if (touch.isHorizontal()) {
107
+ lockClick = true;
108
+ state.dragging = true;
109
+ const isEdge = !opened || deltaX.value * startOffset < 0;
110
+ if (isEdge) {
111
+ (0, import_utils.preventDefault)(event, props.stopPropagation);
112
+ }
113
+ state.offset = (0, import_utils.clamp)(deltaX.value + startOffset, -rightWidth.value, leftWidth.value);
114
+ }
115
+ };
116
+ const onTouchEnd = () => {
117
+ if (state.dragging) {
118
+ state.dragging = false;
119
+ toggle(state.offset > 0 ? "left" : "right");
120
+ setTimeout(() => {
121
+ lockClick = false;
122
+ }, 0);
123
+ }
124
+ };
125
+ const onClick = (position = "outside") => {
126
+ emit("click", position);
127
+ if (opened && !lockClick) {
128
+ (0, import_utils.callInterceptor)(props.beforeClose, {
129
+ args: [{
130
+ name: props.name,
131
+ position
132
+ }],
133
+ done: () => close(position)
134
+ });
135
+ }
136
+ };
137
+ const getClickHandler = (position, stop) => (event) => {
138
+ if (stop) {
139
+ event.stopPropagation();
140
+ }
141
+ onClick(position);
142
+ };
143
+ const renderSideContent = (side, ref2) => {
144
+ const contentSlot = slots[side];
145
+ if (contentSlot) {
146
+ return (0, import_vue.createVNode)("div", {
147
+ "ref": ref2,
148
+ "class": bem(side),
149
+ "onClick": getClickHandler(side, true)
150
+ }, [contentSlot()]);
151
+ }
152
+ };
153
+ (0, import_use_expose.useExpose)({
154
+ open,
155
+ close
156
+ });
157
+ (0, import_use.useClickAway)(root, () => onClick("outside"), {
158
+ eventName: "touchstart"
159
+ });
160
+ (0, import_use.useEventListener)("touchmove", onTouchMove, {
161
+ target: root
162
+ });
163
+ return () => {
164
+ var _a;
165
+ const wrapperStyle = {
166
+ transform: `translate3d(${state.offset}px, 0, 0)`,
167
+ transitionDuration: state.dragging ? "0s" : ".6s"
168
+ };
169
+ return (0, import_vue.createVNode)("div", {
170
+ "ref": root,
171
+ "class": bem(),
172
+ "onClick": getClickHandler("cell", lockClick),
173
+ "onTouchstartPassive": onTouchStart,
174
+ "onTouchend": onTouchEnd,
175
+ "onTouchcancel": onTouchEnd
176
+ }, [(0, import_vue.createVNode)("div", {
177
+ "class": bem("wrapper"),
178
+ "style": wrapperStyle
179
+ }, [renderSideContent("left", leftRef), (_a = slots.default) == null ? void 0 : _a.call(slots), renderSideContent("right", rightRef)])]);
180
+ };
181
+ }
182
+ });
@@ -0,0 +1 @@
1
+ .zt-swipe-cell{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab}.zt-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.zt-swipe-cell__left,.zt-swipe-cell__right{position:absolute;top:0;height:100%}.zt-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.zt-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}
@@ -0,0 +1,39 @@
1
+ import { SwipeCellProps } from './SwipeCell';
2
+ export declare const SwipeCell: import("../utils").WithInstall<import("vue").DefineComponent<{
3
+ name: {
4
+ type: (NumberConstructor | StringConstructor)[];
5
+ default: string;
6
+ };
7
+ disabled: BooleanConstructor;
8
+ leftWidth: (NumberConstructor | StringConstructor)[];
9
+ rightWidth: (NumberConstructor | StringConstructor)[];
10
+ beforeClose: import("vue").PropType<import("../utils").Interceptor>;
11
+ stopPropagation: BooleanConstructor;
12
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close" | "open")[], "open" | "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
+ name: {
14
+ type: (NumberConstructor | StringConstructor)[];
15
+ default: string;
16
+ };
17
+ disabled: BooleanConstructor;
18
+ leftWidth: (NumberConstructor | StringConstructor)[];
19
+ rightWidth: (NumberConstructor | StringConstructor)[];
20
+ beforeClose: import("vue").PropType<import("../utils").Interceptor>;
21
+ stopPropagation: BooleanConstructor;
22
+ }>> & {
23
+ onClick?: ((...args: any[]) => any) | undefined;
24
+ onClose?: ((...args: any[]) => any) | undefined;
25
+ onOpen?: ((...args: any[]) => any) | undefined;
26
+ }, {
27
+ name: string | number;
28
+ disabled: boolean;
29
+ stopPropagation: boolean;
30
+ }>>;
31
+ export default SwipeCell;
32
+ export { swipeCellProps } from './SwipeCell';
33
+ export type { SwipeCellProps };
34
+ export type { SwipeCellSide, SwipeCellPosition, SwipeCellInstance, } from './types';
35
+ declare module 'vue' {
36
+ interface GlobalComponents {
37
+ VanSwipeCell: typeof SwipeCell;
38
+ }
39
+ }
@@ -0,0 +1,39 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var stdin_exports = {};
29
+ __export(stdin_exports, {
30
+ SwipeCell: () => SwipeCell,
31
+ default: () => stdin_default,
32
+ swipeCellProps: () => import_SwipeCell2.swipeCellProps
33
+ });
34
+ module.exports = __toCommonJS(stdin_exports);
35
+ var import_utils = require("../utils");
36
+ var import_SwipeCell = __toESM(require("./SwipeCell"));
37
+ var import_SwipeCell2 = require("./SwipeCell");
38
+ const SwipeCell = (0, import_utils.withInstall)(import_SwipeCell.default);
39
+ var stdin_default = SwipeCell;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ require("../../style/base.css");
2
+ require("../index.css");
@@ -0,0 +1,9 @@
1
+ import type { ComponentPublicInstance } from 'vue';
2
+ import type { SwipeCellProps } from './SwipeCell';
3
+ export declare type SwipeCellSide = 'left' | 'right';
4
+ export declare type SwipeCellPosition = SwipeCellSide | 'cell' | 'outside';
5
+ export declare type SwipeCellExpose = {
6
+ open: (side: SwipeCellSide) => void;
7
+ close: (position: SwipeCellPosition) => void;
8
+ };
9
+ export declare type SwipeCellInstance = ComponentPublicInstance<SwipeCellProps, SwipeCellExpose>;
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var stdin_exports = {};
15
+ module.exports = __toCommonJS(stdin_exports);
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));