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,11 @@
1
+ import { type ExtractPropTypes } from 'vue';
2
+ export declare const indexAnchorProps: {
3
+ index: (NumberConstructor | StringConstructor)[];
4
+ };
5
+ export declare type IndexAnchorProps = ExtractPropTypes<typeof indexAnchorProps>;
6
+ declare const _default: import("vue").DefineComponent<{
7
+ index: (NumberConstructor | StringConstructor)[];
8
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
9
+ index: (NumberConstructor | StringConstructor)[];
10
+ }>>, {}>;
11
+ export default _default;
@@ -0,0 +1,107 @@
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
+ indexAnchorProps: () => indexAnchorProps
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_IndexBar = require("../index-bar/IndexBar");
28
+ var import_dom = require("../utils/dom");
29
+ var import_use = require("@zartui/use");
30
+ var import_use_expose = require("../composables/use-expose");
31
+ const [name, bem] = (0, import_utils.createNamespace)("index-anchor");
32
+ const indexAnchorProps = {
33
+ index: import_utils.numericProp
34
+ };
35
+ var stdin_default = (0, import_vue2.defineComponent)({
36
+ name,
37
+ props: indexAnchorProps,
38
+ setup(props, {
39
+ slots
40
+ }) {
41
+ const state = (0, import_vue2.reactive)({
42
+ top: 0,
43
+ left: null,
44
+ rect: {
45
+ top: 0,
46
+ height: 0
47
+ },
48
+ width: null,
49
+ active: false
50
+ });
51
+ const root = (0, import_vue2.ref)();
52
+ const {
53
+ parent
54
+ } = (0, import_use.useParent)(import_IndexBar.INDEX_BAR_KEY);
55
+ if (!parent) {
56
+ if (process.env.NODE_ENV !== "production") {
57
+ console.error("[zart] <IndexAnchor> must be a child component of <IndexBar>.");
58
+ }
59
+ return;
60
+ }
61
+ const isSticky = () => state.active && parent.props.sticky;
62
+ const anchorStyle = (0, import_vue2.computed)(() => {
63
+ const {
64
+ zIndex,
65
+ highlightColor
66
+ } = parent.props;
67
+ if (isSticky()) {
68
+ return (0, import_utils.extend)((0, import_utils.getZIndexStyle)(zIndex), {
69
+ left: state.left ? `${state.left}px` : void 0,
70
+ width: state.width ? `${state.width}px` : void 0,
71
+ transform: state.top ? `translate3d(0, ${state.top}px, 0)` : void 0,
72
+ color: highlightColor
73
+ });
74
+ }
75
+ });
76
+ const getRect = (scrollParent, scrollParentRect) => {
77
+ const rootRect = (0, import_use.useRect)(root);
78
+ state.rect.height = rootRect.height;
79
+ if (scrollParent === window || scrollParent === document.body) {
80
+ state.rect.top = rootRect.top + (0, import_dom.getRootScrollTop)();
81
+ } else {
82
+ state.rect.top = rootRect.top + (0, import_dom.getScrollTop)(scrollParent) - scrollParentRect.top;
83
+ }
84
+ return state.rect;
85
+ };
86
+ (0, import_use_expose.useExpose)({
87
+ state,
88
+ getRect
89
+ });
90
+ return () => {
91
+ const sticky = isSticky();
92
+ return (0, import_vue.createVNode)("div", {
93
+ "ref": root,
94
+ "style": {
95
+ height: sticky ? `${state.rect.height}px` : void 0
96
+ }
97
+ }, [(0, import_vue.createVNode)("div", {
98
+ "style": anchorStyle.value,
99
+ "class": [bem({
100
+ sticky
101
+ }), {
102
+ [import_utils.BORDER_BOTTOM]: sticky
103
+ }]
104
+ }, [slots.default ? slots.default() : props.index])]);
105
+ };
106
+ }
107
+ });
@@ -0,0 +1 @@
1
+ :root{--zt-index-anchor-z-index: 1;--zt-index-anchor-padding: 0 var(--zt-padding-md);--zt-index-anchor-text-color: var(--zt-text-color);--zt-index-anchor-font-weight: var(--zt-font-bold);--zt-index-anchor-font-size: var(--zt-font-size-md);--zt-index-anchor-line-height: 44px;--zt-index-anchor-background: transparent;--zt-index-anchor-sticky-text-color: var(--zt-primary-color);--zt-index-anchor-sticky-background: var(--zt-background-2)}.zt-index-anchor{z-index:var(--zt-index-anchor-z-index);box-sizing:border-box;padding:var(--zt-index-anchor-padding);color:var(--zt-index-anchor-text-color);font-weight:var(--zt-index-anchor-font-weight);font-size:var(--zt-index-anchor-font-size);line-height:var(--zt-index-anchor-line-height);height:var(--zt-index-anchor-line-height);background:var(--zt-index-anchor-background);position:relative;display:flex}.zt-index-anchor:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5);top:unset}.zt-index-anchor:before{position:absolute;content:"";top:14px;left:0;width:4px;height:16px;background:#0091fa}.zt-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--zt-index-anchor-sticky-text-color);background:var(--zt-background)}
@@ -0,0 +1,14 @@
1
+ export declare const IndexAnchor: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ index: (NumberConstructor | StringConstructor)[];
3
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4
+ index: (NumberConstructor | StringConstructor)[];
5
+ }>>, {}>>;
6
+ export default IndexAnchor;
7
+ export { indexAnchorProps } from './IndexAnchor';
8
+ export type { IndexAnchorProps } from './IndexAnchor';
9
+ export type { IndexAnchorThemeVars } from './types';
10
+ declare module 'vue' {
11
+ interface GlobalComponents {
12
+ ZtIndexAnchor: typeof IndexAnchor;
13
+ }
14
+ }
@@ -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
+ IndexAnchor: () => IndexAnchor,
31
+ default: () => stdin_default,
32
+ indexAnchorProps: () => import_IndexAnchor2.indexAnchorProps
33
+ });
34
+ module.exports = __toCommonJS(stdin_exports);
35
+ var import_utils = require("../utils");
36
+ var import_IndexAnchor = __toESM(require("./IndexAnchor"));
37
+ var import_IndexAnchor2 = require("./IndexAnchor");
38
+ const IndexAnchor = (0, import_utils.withInstall)(import_IndexAnchor.default);
39
+ var stdin_default = IndexAnchor;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ require("../../style/base.css");
2
+ require("../../index-bar/index.css");
3
+ require("../index.css");
@@ -0,0 +1,11 @@
1
+ export declare type IndexAnchorThemeVars = {
2
+ indexAnchorZIndex?: number | string;
3
+ indexAnchorPadding?: string;
4
+ indexAnchorTextColor?: string;
5
+ indexAnchorFontWeight?: string;
6
+ indexAnchorFontSize?: string;
7
+ indexAnchorLineHeight?: number | string;
8
+ indexAnchorBackground?: string;
9
+ indexAnchorStickyTextColor?: string;
10
+ indexAnchorStickyBackground?: string;
11
+ };
@@ -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);
@@ -0,0 +1,64 @@
1
+ import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
3
+ import { IndexBarProvide } from './types';
4
+ declare function genAlphabet(): string[];
5
+ export declare const indexBarProps: {
6
+ sticky: {
7
+ type: BooleanConstructor;
8
+ default: true;
9
+ };
10
+ zIndex: (NumberConstructor | StringConstructor)[];
11
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
12
+ highlightColor: StringConstructor;
13
+ stickyOffsetTop: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ indexList: {
18
+ type: PropType<Numeric[]>;
19
+ default: typeof genAlphabet;
20
+ };
21
+ };
22
+ export declare type IndexBarProps = ExtractPropTypes<typeof indexBarProps>;
23
+ export declare const INDEX_BAR_KEY: InjectionKey<IndexBarProvide>;
24
+ declare const _default: import("vue").DefineComponent<{
25
+ sticky: {
26
+ type: BooleanConstructor;
27
+ default: true;
28
+ };
29
+ zIndex: (NumberConstructor | StringConstructor)[];
30
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
31
+ highlightColor: StringConstructor;
32
+ stickyOffsetTop: {
33
+ type: NumberConstructor;
34
+ default: number;
35
+ };
36
+ indexList: {
37
+ type: PropType<Numeric[]>;
38
+ default: typeof genAlphabet;
39
+ };
40
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change")[], "select" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
41
+ sticky: {
42
+ type: BooleanConstructor;
43
+ default: true;
44
+ };
45
+ zIndex: (NumberConstructor | StringConstructor)[];
46
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
47
+ highlightColor: StringConstructor;
48
+ stickyOffsetTop: {
49
+ type: NumberConstructor;
50
+ default: number;
51
+ };
52
+ indexList: {
53
+ type: PropType<Numeric[]>;
54
+ default: typeof genAlphabet;
55
+ };
56
+ }>> & {
57
+ onChange?: ((...args: any[]) => any) | undefined;
58
+ onSelect?: ((...args: any[]) => any) | undefined;
59
+ }, {
60
+ sticky: boolean;
61
+ stickyOffsetTop: number;
62
+ indexList: Numeric[];
63
+ }>;
64
+ export default _default;
@@ -0,0 +1,294 @@
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
+ INDEX_BAR_KEY: () => INDEX_BAR_KEY,
21
+ default: () => stdin_default,
22
+ indexBarProps: () => indexBarProps
23
+ });
24
+ module.exports = __toCommonJS(stdin_exports);
25
+ var import_vue = require("vue");
26
+ var import_vue2 = require("vue");
27
+ var import_utils = require("../utils");
28
+ var import_use = require("@zartui/use");
29
+ var import_use_touch = require("../composables/use-touch");
30
+ var import_use_expose = require("../composables/use-expose");
31
+ function genAlphabet() {
32
+ const charCodeOfA = "A".charCodeAt(0);
33
+ const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
34
+ return indexList;
35
+ }
36
+ const [name, bem] = (0, import_utils.createNamespace)("index-bar");
37
+ const indexBarProps = {
38
+ sticky: import_utils.truthProp,
39
+ zIndex: import_utils.numericProp,
40
+ teleport: [String, Object],
41
+ highlightColor: String,
42
+ stickyOffsetTop: (0, import_utils.makeNumberProp)(0),
43
+ indexList: {
44
+ type: Array,
45
+ default: genAlphabet
46
+ }
47
+ };
48
+ const INDEX_BAR_KEY = Symbol(name);
49
+ var stdin_default = (0, import_vue2.defineComponent)({
50
+ name,
51
+ props: indexBarProps,
52
+ emits: ["select", "change"],
53
+ setup(props, {
54
+ emit,
55
+ slots
56
+ }) {
57
+ const root = (0, import_vue2.ref)();
58
+ const sidebar = (0, import_vue2.ref)();
59
+ const activeAnchor = (0, import_vue2.ref)("");
60
+ const touchIndex = (0, import_vue2.ref)("");
61
+ const touch = (0, import_use_touch.useTouch)();
62
+ const scrollParent = (0, import_use.useScrollParent)(root);
63
+ const {
64
+ children,
65
+ linkChildren
66
+ } = (0, import_use.useChildren)(INDEX_BAR_KEY);
67
+ let selectActiveIndex;
68
+ linkChildren({
69
+ props
70
+ });
71
+ const sidebarStyle = (0, import_vue2.computed)(() => {
72
+ if ((0, import_utils.isDef)(props.zIndex)) {
73
+ return {
74
+ zIndex: +props.zIndex + 1
75
+ };
76
+ }
77
+ });
78
+ const highlightStyle = (0, import_vue2.computed)(() => {
79
+ if (props.highlightColor) {
80
+ return {
81
+ color: props.highlightColor
82
+ };
83
+ }
84
+ });
85
+ const getActiveAnchor = (scrollTop, rects) => {
86
+ for (let i = children.length - 1; i >= 0; i--) {
87
+ const prevHeight = i > 0 ? rects[i - 1].height : 0;
88
+ const reachTop = props.sticky ? prevHeight + props.stickyOffsetTop : 0;
89
+ if (scrollTop + reachTop >= rects[i].top) {
90
+ return i;
91
+ }
92
+ }
93
+ return -1;
94
+ };
95
+ const getMatchAnchor = (index) => children.find((item) => String(item.index) === index);
96
+ const onScroll = () => {
97
+ if ((0, import_utils.isHidden)(root)) {
98
+ return;
99
+ }
100
+ const {
101
+ sticky,
102
+ indexList
103
+ } = props;
104
+ const scrollTop = (0, import_utils.getScrollTop)(scrollParent.value);
105
+ const scrollParentRect = (0, import_use.useRect)(scrollParent);
106
+ const rects = children.map((item) => item.getRect(scrollParent.value, scrollParentRect));
107
+ let active = -1;
108
+ if (selectActiveIndex) {
109
+ const match = getMatchAnchor(selectActiveIndex);
110
+ if (match) {
111
+ const rect = match.getRect(scrollParent.value, scrollParentRect);
112
+ active = getActiveAnchor(rect.top, rects);
113
+ }
114
+ } else {
115
+ active = getActiveAnchor(scrollTop, rects);
116
+ }
117
+ activeAnchor.value = indexList[active];
118
+ if (sticky) {
119
+ children.forEach((item, index) => {
120
+ const {
121
+ state,
122
+ $el
123
+ } = item;
124
+ if (index === active || index === active - 1) {
125
+ const rect = $el.getBoundingClientRect();
126
+ state.left = rect.left;
127
+ state.width = rect.width;
128
+ } else {
129
+ state.left = null;
130
+ state.width = null;
131
+ }
132
+ if (index === active) {
133
+ state.active = true;
134
+ state.top = Math.max(props.stickyOffsetTop, rects[index].top - scrollTop) + scrollParentRect.top;
135
+ } else if (index === active - 1 && selectActiveIndex === "") {
136
+ const activeItemTop = rects[active].top - scrollTop;
137
+ state.active = activeItemTop > 0;
138
+ state.top = activeItemTop + scrollParentRect.top - rects[index].height;
139
+ } else {
140
+ state.active = false;
141
+ }
142
+ });
143
+ }
144
+ selectActiveIndex = "";
145
+ };
146
+ const init = () => {
147
+ (0, import_vue2.nextTick)(onScroll);
148
+ };
149
+ (0, import_use.useEventListener)("scroll", onScroll, {
150
+ target: scrollParent,
151
+ passive: true
152
+ });
153
+ (0, import_vue2.onMounted)(init);
154
+ (0, import_vue2.watch)(() => props.indexList, init);
155
+ (0, import_vue2.watch)(activeAnchor, (value) => {
156
+ if (value) {
157
+ emit("change", value);
158
+ }
159
+ });
160
+ const scrollTo = (index) => {
161
+ selectActiveIndex = String(index);
162
+ const match = getMatchAnchor(selectActiveIndex);
163
+ if (match) {
164
+ const scrollTop = (0, import_utils.getScrollTop)(scrollParent.value);
165
+ const scrollParentRect = (0, import_use.useRect)(scrollParent);
166
+ const {
167
+ offsetHeight
168
+ } = document.documentElement;
169
+ match.$el.scrollIntoView();
170
+ if (scrollTop === offsetHeight - scrollParentRect.height) {
171
+ onScroll();
172
+ return;
173
+ }
174
+ if (props.sticky && props.stickyOffsetTop) {
175
+ (0, import_utils.setRootScrollTop)((0, import_utils.getRootScrollTop)() - props.stickyOffsetTop);
176
+ }
177
+ emit("select", match.index);
178
+ }
179
+ };
180
+ const scrollToElement = (element) => {
181
+ const {
182
+ index
183
+ } = element.dataset;
184
+ if (index) {
185
+ scrollTo(index);
186
+ }
187
+ };
188
+ const onClickSidebar = (event) => {
189
+ scrollToElement(event.target);
190
+ };
191
+ const renderIndexes = () => props.indexList.map((index) => {
192
+ const active = index === activeAnchor.value;
193
+ const touch2 = index === touchIndex.value;
194
+ return (0, import_vue.createVNode)("div", {
195
+ "class": bem("index"),
196
+ "style": active ? highlightStyle.value : void 0
197
+ }, [(0, import_vue.createVNode)("div", {
198
+ "class": bem("touch", {
199
+ active: touch2
200
+ })
201
+ }, [(0, import_vue.createVNode)("div", {
202
+ "class": bem("touch-text")
203
+ }, [index]), (0, import_vue.createVNode)("svg", {
204
+ "class": bem("icon"),
205
+ "xmlns": "http://www.w3.org/2000/svg",
206
+ "viewBox": "0 0 20 32"
207
+ }, [(0, import_vue.createVNode)("defs", null, [(0, import_vue.createVNode)("path", {
208
+ "id": "7rkhbmqvk__gc482iacwa",
209
+ "d": "M0 0H20V32H0z"
210
+ }, null)]), (0, import_vue.createVNode)("g", {
211
+ "fill": "none",
212
+ "fill-rule": "evenodd"
213
+ }, [(0, import_vue.createVNode)("path", {
214
+ "d": "M-1,0 C7.836556,-1.623249e-15 15,7.163444 15,16 C15,24.836556 7.836556,32 -1,32 L-1,32 L-1,32 L-1,0 Z",
215
+ "fill": "#8093AB",
216
+ "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
217
+ }, null), (0, import_vue.createVNode)("path", {
218
+ "d": "M12.2406862,7.01475705 L19.4355101,15.3463801 C19.7597461,15.7218113 19.7597461,16.2781887 19.4355101,16.6536199 L12.2406862,24.9852429 C13.9822172,22.423901 15,19.3308084 15,16 C15,12.6691916 13.9822172,9.57609904 12.2406862,7.01475705 Z",
219
+ "fill": "#8093AB",
220
+ "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
221
+ }, null)])])]), (0, import_vue.createVNode)("div", {
222
+ "data-index": index,
223
+ "onClick": onClickSidebar,
224
+ "class": bem("index", {
225
+ active,
226
+ touch: touch2
227
+ })
228
+ }, [index])]);
229
+ });
230
+ let touchActiveIndex;
231
+ const onTouchStart = (event) => {
232
+ const {
233
+ clientX,
234
+ clientY
235
+ } = event.touches[0];
236
+ const target = document.elementFromPoint(clientX, clientY);
237
+ if (target) {
238
+ const {
239
+ index = ""
240
+ } = target.dataset;
241
+ touchIndex.value = index;
242
+ }
243
+ touch.start(event);
244
+ };
245
+ const onTouchend = () => {
246
+ touchIndex.value = "";
247
+ };
248
+ const onTouchMove = (event) => {
249
+ touch.move(event);
250
+ if (touch.isVertical()) {
251
+ (0, import_utils.preventDefault)(event);
252
+ const {
253
+ clientX,
254
+ clientY
255
+ } = event.touches[0];
256
+ const target = document.elementFromPoint(clientX, clientY);
257
+ if (target) {
258
+ const {
259
+ index
260
+ } = target.dataset;
261
+ if (index && touchActiveIndex !== index) {
262
+ touchActiveIndex = index;
263
+ touchIndex.value = index;
264
+ scrollToElement(target);
265
+ }
266
+ }
267
+ }
268
+ };
269
+ const renderSidebar = () => (0, import_vue.createVNode)("div", {
270
+ "ref": sidebar,
271
+ "class": bem("sidebar"),
272
+ "style": sidebarStyle.value,
273
+ "onTouchstartPassive": onTouchStart,
274
+ "onTouchend": onTouchend
275
+ }, [renderIndexes()]);
276
+ (0, import_use_expose.useExpose)({
277
+ scrollTo
278
+ });
279
+ (0, import_use.useEventListener)("touchmove", onTouchMove, {
280
+ target: sidebar
281
+ });
282
+ return () => {
283
+ var _a;
284
+ return (0, import_vue.createVNode)("div", {
285
+ "ref": root,
286
+ "class": bem()
287
+ }, [props.teleport ? (0, import_vue.createVNode)(import_vue2.Teleport, {
288
+ "to": props.teleport
289
+ }, {
290
+ default: () => [renderSidebar()]
291
+ }) : renderSidebar(), (_a = slots.default) == null ? void 0 : _a.call(slots)]);
292
+ };
293
+ }
294
+ });
@@ -0,0 +1 @@
1
+ :root{--zt-index-bar-sidebar-z-index: 2;--zt-index-bar-index-font-size: var(--zt-font-size-xs);--zt-index-bar-index-line-height: var(--zt-line-height-md);--zt-index-bar-index-active-color: var(--zt-primary-color)}.zt-index-bar__sidebar{position:fixed;top:50%;right:var(--zt-padding-xs);z-index:var(--zt-index-bar-sidebar-z-index);display:flex;flex-direction:column;align-items:end;text-align:center;transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;user-select:none}.zt-index-bar__index{position:relative;color:var(--zt-text-color);padding:0 var(--zt-padding-base);font-size:var(--zt-index-bar-index-font-size);line-height:var(--zt-index-bar-index-line-height);display:flex;height:20px}.zt-index-bar__index--active{color:var(--zt-primary-color);font-weight:700}.zt-index-bar__index--touch{display:inline-block;box-sizing:border-box;padding:0 4px;min-width:var(--zt-index-bar-index-line-height);color:var(--zt-white);background:var(--zt-primary-color);border-radius:10px}.zt-index-bar__touch{display:none}.zt-index-bar__touch-text{position:relative;right:-1px;height:32px;line-height:32px;border-radius:16px 0 0 16px;padding:0 0 0 14px;font-size:16px;color:var(--zt-white);text-align:center;background:#8093ab}.zt-index-bar__touch--active{display:flex;position:relative;top:-6px;right:8px}.zt-index-bar__icon{position:relative;width:20px;height:32px}
@@ -0,0 +1,50 @@
1
+ import { IndexBarProps } from './IndexBar';
2
+ export declare const IndexBar: import("../utils").WithInstall<import("vue").DefineComponent<{
3
+ sticky: {
4
+ type: BooleanConstructor;
5
+ default: true;
6
+ };
7
+ zIndex: (NumberConstructor | StringConstructor)[];
8
+ teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
9
+ highlightColor: StringConstructor;
10
+ stickyOffsetTop: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ indexList: {
15
+ type: import("vue").PropType<import("../utils").Numeric[]>;
16
+ default: () => string[];
17
+ };
18
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change")[], "select" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ sticky: {
20
+ type: BooleanConstructor;
21
+ default: true;
22
+ };
23
+ zIndex: (NumberConstructor | StringConstructor)[];
24
+ teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
25
+ highlightColor: StringConstructor;
26
+ stickyOffsetTop: {
27
+ type: NumberConstructor;
28
+ default: number;
29
+ };
30
+ indexList: {
31
+ type: import("vue").PropType<import("../utils").Numeric[]>;
32
+ default: () => string[];
33
+ };
34
+ }>> & {
35
+ onChange?: ((...args: any[]) => any) | undefined;
36
+ onSelect?: ((...args: any[]) => any) | undefined;
37
+ }, {
38
+ sticky: boolean;
39
+ stickyOffsetTop: number;
40
+ indexList: import("../utils").Numeric[];
41
+ }>>;
42
+ export default IndexBar;
43
+ export { indexBarProps } from './IndexBar';
44
+ export type { IndexBarProps };
45
+ export type { IndexBarInstance, IndexBarThemeVars } from './types';
46
+ declare module 'vue' {
47
+ interface GlobalComponents {
48
+ ZtIndexBar: typeof IndexBar;
49
+ }
50
+ }
@@ -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
+ IndexBar: () => IndexBar,
31
+ default: () => stdin_default,
32
+ indexBarProps: () => import_IndexBar2.indexBarProps
33
+ });
34
+ module.exports = __toCommonJS(stdin_exports);
35
+ var import_utils = require("../utils");
36
+ var import_IndexBar = __toESM(require("./IndexBar"));
37
+ var import_IndexBar2 = require("./IndexBar");
38
+ const IndexBar = (0, import_utils.withInstall)(import_IndexBar.default);
39
+ var stdin_default = IndexBar;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ require("../../style/base.css");
2
+ require("../index.css");