zartui 3.1.9 → 3.1.10

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 (470) hide show
  1. package/README.md +23 -23
  2. package/es/action-sheet/index.css +1 -1
  3. package/es/action-sheet/index.d.ts +1 -0
  4. package/es/action-sheet/types.d.ts +14 -0
  5. package/es/action-sheet/types.mjs +0 -0
  6. package/es/avatar/index.css +1 -1
  7. package/es/avatar/index.d.ts +1 -1
  8. package/es/avatar/types.d.ts +10 -0
  9. package/es/badge/index.css +1 -1
  10. package/es/badge/index.d.ts +1 -0
  11. package/es/badge/types.d.ts +15 -0
  12. package/es/badge/types.mjs +0 -0
  13. package/es/button/index.css +1 -1
  14. package/es/button/index.d.ts +1 -1
  15. package/es/button/types.d.ts +35 -0
  16. package/es/calendar/CalendarDay.mjs +8 -1
  17. package/es/calendar/CalendarHeader.mjs +2 -2
  18. package/es/calendar/index.css +1 -1
  19. package/es/calendar/index.d.ts +1 -1
  20. package/es/calendar/types.d.ts +25 -0
  21. package/es/cascader/index.css +1 -1
  22. package/es/cascader/index.d.ts +1 -1
  23. package/es/cascader/types.d.ts +21 -0
  24. package/es/cell/index.css +1 -1
  25. package/es/cell/index.d.ts +1 -1
  26. package/es/cell/types.d.ts +24 -0
  27. package/es/cell-group/index.css +1 -1
  28. package/es/checkbox/Checker.mjs +6 -0
  29. package/es/checkbox/index.css +1 -1
  30. package/es/checkbox/index.d.ts +1 -1
  31. package/es/checkbox/types.d.ts +19 -0
  32. package/es/checkbox-group/index.css +1 -1
  33. package/es/collapse-item/index.css +1 -1
  34. package/es/collapse-item/index.d.ts +1 -1
  35. package/es/collapse-item/types.d.ts +8 -0
  36. package/es/config-provider/index.d.ts +2 -1
  37. package/es/config-provider/types.d.ts +138 -0
  38. package/es/config-provider/types.mjs +0 -0
  39. package/es/date-time-picker/DateTimePicker.d.ts +2 -2
  40. package/es/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
  41. package/es/date-time-picker/index.css +1 -1
  42. package/es/date-time-picker/index.d.ts +2 -2
  43. package/es/date-time-picker/utils.d.ts +1 -1
  44. package/es/dialog/Dialog.d.ts +1 -1
  45. package/es/dialog/index.css +1 -1
  46. package/es/dialog/index.d.ts +2 -2
  47. package/es/dialog/types.d.ts +18 -0
  48. package/es/divider/index.css +1 -1
  49. package/es/divider/index.d.ts +1 -0
  50. package/es/divider/types.d.ts +8 -0
  51. package/es/divider/types.mjs +0 -0
  52. package/es/dropdown-item/DropdownItem.mjs +1 -0
  53. package/es/dropdown-item/index.css +1 -1
  54. package/es/dropdown-item/index.d.ts +1 -1
  55. package/es/dropdown-item/types.d.ts +3 -0
  56. package/es/dropdown-menu/index.css +1 -1
  57. package/es/dropdown-menu/index.d.ts +1 -1
  58. package/es/dropdown-menu/types.d.ts +12 -0
  59. package/es/empty/Empty.mjs +5 -3
  60. package/es/empty/Images.d.ts +20 -9
  61. package/es/empty/Images.mjs +755 -563
  62. package/es/empty/index.css +1 -1
  63. package/es/empty/index.d.ts +1 -0
  64. package/es/empty/types.d.ts +8 -0
  65. package/es/empty/types.mjs +0 -0
  66. package/es/field/index.css +1 -1
  67. package/es/field/index.d.ts +1 -1
  68. package/es/field/types.d.ts +22 -0
  69. package/es/grid-item/index.css +1 -1
  70. package/es/grid-item/index.d.ts +1 -0
  71. package/es/grid-item/types.d.ts +7 -0
  72. package/es/grid-item/types.mjs +0 -0
  73. package/es/hierarchy-select/Breadcrumb.mjs +1 -1
  74. package/es/hierarchy-select/HierarchySelect.d.ts +13 -0
  75. package/es/hierarchy-select/HierarchySelect.mjs +132 -21
  76. package/es/hierarchy-select/index.css +1 -1
  77. package/es/hierarchy-select/index.d.ts +10 -1
  78. package/es/hierarchy-select/svg/SubIcon.d.ts +2 -1
  79. package/es/hierarchy-select/svg/SubIcon.mjs +10 -29
  80. package/es/hierarchy-select/types.d.ts +21 -0
  81. package/es/image/index.css +1 -1
  82. package/es/image/index.d.ts +1 -0
  83. package/es/image/types.d.ts +5 -0
  84. package/es/image/types.mjs +0 -0
  85. package/es/image-preview/ImagePreview.d.ts +1 -1
  86. package/es/image-preview/index.css +1 -1
  87. package/es/image-preview/index.d.ts +2 -2
  88. package/es/image-preview/types.d.ts +10 -0
  89. package/es/index-anchor/index.css +1 -1
  90. package/es/index-anchor/types.d.ts +1 -3
  91. package/es/index-bar/IndexBar.d.ts +26 -0
  92. package/es/index-bar/IndexBar.mjs +184 -50
  93. package/es/index-bar/index.css +1 -1
  94. package/es/index-bar/index.d.ts +18 -0
  95. package/es/index-bar/types.d.ts +4 -3
  96. package/es/index.d.ts +1 -1
  97. package/es/index.mjs +1 -1
  98. package/es/lazyload/vue-lazyload/index.d.ts +55 -55
  99. package/es/list/index.css +1 -1
  100. package/es/list/index.d.ts +1 -1
  101. package/es/list/types.d.ts +5 -0
  102. package/es/loading/index.css +1 -1
  103. package/es/loading/index.d.ts +1 -0
  104. package/es/loading/types.d.ts +6 -0
  105. package/es/loading/types.mjs +0 -0
  106. package/es/media-picker/index.css +1 -1
  107. package/es/media-picker/index.d.ts +1 -1
  108. package/es/media-picker/type.d.ts +12 -0
  109. package/es/media-player/index.css +1 -1
  110. package/es/multiple-picker/MultiplePicker.d.ts +3 -3
  111. package/es/multiple-picker/index.css +1 -1
  112. package/es/multiple-picker/index.d.ts +4 -3
  113. package/es/multiple-picker/types.d.ts +17 -0
  114. package/es/nav-bar/index.css +1 -1
  115. package/es/nav-bar/index.d.ts +1 -0
  116. package/es/nav-bar/types.d.ts +16 -0
  117. package/es/nav-bar/types.mjs +0 -0
  118. package/es/notice-bar/index.css +1 -1
  119. package/es/notice-bar/index.d.ts +1 -1
  120. package/es/notice-bar/types.d.ts +10 -0
  121. package/es/notify/index.css +1 -1
  122. package/es/notify/index.d.ts +1 -1
  123. package/es/notify/types.d.ts +8 -0
  124. package/es/number-keyboard/index.css +1 -1
  125. package/es/number-keyboard/index.d.ts +1 -0
  126. package/es/number-keyboard/types.d.ts +14 -0
  127. package/es/number-keyboard/types.mjs +0 -0
  128. package/es/overlay/index.d.ts +1 -0
  129. package/es/overlay/types.d.ts +4 -0
  130. package/es/overlay/types.mjs +0 -0
  131. package/es/password-input/index.css +1 -1
  132. package/es/password-input/index.d.ts +1 -0
  133. package/es/password-input/types.d.ts +15 -0
  134. package/es/password-input/types.mjs +0 -0
  135. package/es/picker/Picker.d.ts +6 -6
  136. package/es/picker/index.css +1 -1
  137. package/es/picker/index.d.ts +7 -7
  138. package/es/picker/types.d.ts +17 -0
  139. package/es/popover/Popover.mjs +1 -1
  140. package/es/popover/index.css +1 -1
  141. package/es/popover/index.d.ts +1 -1
  142. package/es/popover/types.d.ts +12 -0
  143. package/es/popup/index.css +1 -1
  144. package/es/popup/index.d.ts +1 -1
  145. package/es/popup/types.d.ts +8 -0
  146. package/es/pull-refresh/index.css +1 -1
  147. package/es/pull-refresh/index.d.ts +1 -0
  148. package/es/pull-refresh/types.d.ts +6 -0
  149. package/es/pull-refresh/types.mjs +0 -0
  150. package/es/radio/index.css +1 -1
  151. package/es/radio/index.d.ts +1 -0
  152. package/es/radio/types.d.ts +18 -0
  153. package/es/radio/types.mjs +0 -0
  154. package/es/radio-group/index.css +1 -1
  155. package/es/radio-picker/RadioPicker.d.ts +3 -3
  156. package/es/radio-picker/index.css +1 -1
  157. package/es/radio-picker/index.d.ts +4 -4
  158. package/es/radio-picker/types.d.ts +24 -0
  159. package/es/rate/index.css +1 -1
  160. package/es/rate/index.d.ts +1 -0
  161. package/es/rate/types.d.ts +6 -0
  162. package/es/rate/types.mjs +0 -0
  163. package/es/search/index.css +1 -1
  164. package/es/search/index.d.ts +1 -1
  165. package/es/search/types.d.ts +12 -0
  166. package/es/signature/index.css +1 -1
  167. package/es/signature/index.d.ts +1 -1
  168. package/es/signature/types.d.ts +9 -0
  169. package/es/skeleton/index.d.ts +1 -0
  170. package/es/skeleton/types.d.ts +9 -0
  171. package/es/skeleton/types.mjs +0 -0
  172. package/es/step/Step.mjs +2 -2
  173. package/es/step/index.css +1 -1
  174. package/es/step/index.d.ts +1 -0
  175. package/es/step/types.d.ts +6 -0
  176. package/es/step/types.mjs +0 -0
  177. package/es/stepper/index.css +1 -1
  178. package/es/stepper/index.d.ts +1 -0
  179. package/es/stepper/types.d.ts +17 -0
  180. package/es/stepper/types.mjs +0 -0
  181. package/es/steps/index.css +1 -1
  182. package/es/steps/index.d.ts +1 -0
  183. package/es/steps/types.d.ts +5 -0
  184. package/es/steps/types.mjs +0 -0
  185. package/es/sticky/index.d.ts +1 -0
  186. package/es/sticky/types.d.ts +3 -0
  187. package/es/sticky/types.mjs +0 -0
  188. package/es/style/base.css +1 -1
  189. package/es/style/css-variables.css +1 -1
  190. package/es/swipe/index.css +1 -1
  191. package/es/swipe/index.d.ts +1 -1
  192. package/es/swipe/types.d.ts +10 -0
  193. package/es/switch/index.css +1 -1
  194. package/es/switch/index.d.ts +1 -0
  195. package/es/switch/types.d.ts +18 -0
  196. package/es/switch/types.mjs +0 -0
  197. package/es/tabbar/index.d.ts +1 -0
  198. package/es/tabbar/types.d.ts +5 -0
  199. package/es/tabbar/types.mjs +0 -0
  200. package/es/tabbar-item/index.css +1 -1
  201. package/es/tabbar-item/index.d.ts +1 -0
  202. package/es/tabbar-item/types.d.ts +14 -0
  203. package/es/tabbar-item/types.mjs +0 -0
  204. package/es/table/index.css +1 -1
  205. package/es/table/index.d.ts +1 -0
  206. package/es/table/types.d.ts +10 -0
  207. package/es/tabs/index.css +1 -1
  208. package/es/tabs/index.d.ts +1 -1
  209. package/es/tabs/types.d.ts +17 -0
  210. package/es/tag/Tag.mjs +5 -4
  211. package/es/tag/index.css +1 -1
  212. package/es/tag/index.d.ts +1 -0
  213. package/es/tag/types.d.ts +17 -0
  214. package/es/tag/types.mjs +0 -0
  215. package/es/text-ellipsis/types.d.ts +1 -0
  216. package/es/time-picker/TimePicker.d.ts +2 -2
  217. package/es/time-picker/index.css +1 -1
  218. package/es/time-picker/index.d.ts +3 -2
  219. package/es/time-picker/types.d.ts +23 -0
  220. package/es/time-picker/types.mjs +0 -0
  221. package/es/timeline/index.css +1 -1
  222. package/es/timeline/index.d.ts +1 -0
  223. package/es/timeline/types.d.ts +9 -0
  224. package/es/timeline/types.mjs +0 -0
  225. package/es/toast/index.css +1 -1
  226. package/es/toast/index.d.ts +1 -1
  227. package/es/toast/types.d.ts +15 -0
  228. package/es/uploader/index.css +1 -1
  229. package/es/uploader/index.d.ts +1 -1
  230. package/es/uploader/types.d.ts +21 -0
  231. package/es/vue-sfc-shim.d.ts +6 -6
  232. package/es/vue-tsx-shim.d.ts +23 -23
  233. package/lib/action-sheet/index.css +1 -1
  234. package/lib/action-sheet/index.d.ts +1 -0
  235. package/lib/action-sheet/types.d.ts +14 -0
  236. package/lib/action-sheet/types.js +15 -0
  237. package/lib/avatar/index.css +1 -1
  238. package/lib/avatar/index.d.ts +1 -1
  239. package/lib/avatar/types.d.ts +10 -0
  240. package/lib/badge/index.css +1 -1
  241. package/lib/badge/index.d.ts +1 -0
  242. package/lib/badge/types.d.ts +15 -0
  243. package/lib/badge/types.js +15 -0
  244. package/lib/button/index.css +1 -1
  245. package/lib/button/index.d.ts +1 -1
  246. package/lib/button/types.d.ts +35 -0
  247. package/lib/calendar/CalendarDay.js +8 -1
  248. package/lib/calendar/CalendarHeader.js +2 -2
  249. package/lib/calendar/index.css +1 -1
  250. package/lib/calendar/index.d.ts +1 -1
  251. package/lib/calendar/types.d.ts +25 -0
  252. package/lib/cascader/index.css +1 -1
  253. package/lib/cascader/index.d.ts +1 -1
  254. package/lib/cascader/types.d.ts +21 -0
  255. package/lib/cell/index.css +1 -1
  256. package/lib/cell/index.d.ts +1 -1
  257. package/lib/cell/types.d.ts +24 -0
  258. package/lib/cell-group/index.css +1 -1
  259. package/lib/checkbox/Checker.js +6 -0
  260. package/lib/checkbox/index.css +1 -1
  261. package/lib/checkbox/index.d.ts +1 -1
  262. package/lib/checkbox/types.d.ts +19 -0
  263. package/lib/checkbox-group/index.css +1 -1
  264. package/lib/collapse-item/index.css +1 -1
  265. package/lib/collapse-item/index.d.ts +1 -1
  266. package/lib/collapse-item/types.d.ts +8 -0
  267. package/lib/config-provider/index.d.ts +2 -1
  268. package/lib/config-provider/types.d.ts +138 -0
  269. package/lib/config-provider/types.js +15 -0
  270. package/lib/date-time-picker/DateTimePicker.d.ts +2 -2
  271. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
  272. package/lib/date-time-picker/index.css +1 -1
  273. package/lib/date-time-picker/index.d.ts +2 -2
  274. package/lib/date-time-picker/utils.d.ts +1 -1
  275. package/lib/dialog/Dialog.d.ts +1 -1
  276. package/lib/dialog/index.css +1 -1
  277. package/lib/dialog/index.d.ts +2 -2
  278. package/lib/dialog/types.d.ts +18 -0
  279. package/lib/divider/index.css +1 -1
  280. package/lib/divider/index.d.ts +1 -0
  281. package/lib/divider/types.d.ts +8 -0
  282. package/lib/divider/types.js +15 -0
  283. package/lib/dropdown-item/DropdownItem.js +1 -0
  284. package/lib/dropdown-item/index.css +1 -1
  285. package/lib/dropdown-item/index.d.ts +1 -1
  286. package/lib/dropdown-item/types.d.ts +3 -0
  287. package/lib/dropdown-menu/index.css +1 -1
  288. package/lib/dropdown-menu/index.d.ts +1 -1
  289. package/lib/dropdown-menu/types.d.ts +12 -0
  290. package/lib/empty/Empty.js +4 -2
  291. package/lib/empty/Images.d.ts +20 -9
  292. package/lib/empty/Images.js +755 -563
  293. package/lib/empty/index.css +1 -1
  294. package/lib/empty/index.d.ts +1 -0
  295. package/lib/empty/types.d.ts +8 -0
  296. package/lib/empty/types.js +15 -0
  297. package/lib/field/index.css +1 -1
  298. package/lib/field/index.d.ts +1 -1
  299. package/lib/field/types.d.ts +22 -0
  300. package/lib/grid-item/index.css +1 -1
  301. package/lib/grid-item/index.d.ts +1 -0
  302. package/lib/grid-item/types.d.ts +7 -0
  303. package/lib/grid-item/types.js +15 -0
  304. package/lib/hierarchy-select/Breadcrumb.js +1 -1
  305. package/lib/hierarchy-select/HierarchySelect.d.ts +13 -0
  306. package/lib/hierarchy-select/HierarchySelect.js +131 -20
  307. package/lib/hierarchy-select/index.css +1 -1
  308. package/lib/hierarchy-select/index.d.ts +10 -1
  309. package/lib/hierarchy-select/svg/SubIcon.d.ts +2 -1
  310. package/lib/hierarchy-select/svg/SubIcon.js +9 -28
  311. package/lib/hierarchy-select/types.d.ts +21 -0
  312. package/lib/image/index.css +1 -1
  313. package/lib/image/index.d.ts +1 -0
  314. package/lib/image/types.d.ts +5 -0
  315. package/lib/image/types.js +15 -0
  316. package/lib/image-preview/ImagePreview.d.ts +1 -1
  317. package/lib/image-preview/index.css +1 -1
  318. package/lib/image-preview/index.d.ts +2 -2
  319. package/lib/image-preview/types.d.ts +10 -0
  320. package/lib/index-anchor/index.css +1 -1
  321. package/lib/index-anchor/types.d.ts +1 -3
  322. package/lib/index-bar/IndexBar.d.ts +26 -0
  323. package/lib/index-bar/IndexBar.js +183 -49
  324. package/lib/index-bar/index.css +1 -1
  325. package/lib/index-bar/index.d.ts +18 -0
  326. package/lib/index-bar/types.d.ts +4 -3
  327. package/lib/index.css +1 -1
  328. package/lib/index.d.ts +1 -1
  329. package/lib/index.js +1 -1
  330. package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
  331. package/lib/list/index.css +1 -1
  332. package/lib/list/index.d.ts +1 -1
  333. package/lib/list/types.d.ts +5 -0
  334. package/lib/loading/index.css +1 -1
  335. package/lib/loading/index.d.ts +1 -0
  336. package/lib/loading/types.d.ts +6 -0
  337. package/lib/loading/types.js +15 -0
  338. package/lib/media-picker/index.css +1 -1
  339. package/lib/media-picker/index.d.ts +1 -1
  340. package/lib/media-picker/type.d.ts +12 -0
  341. package/lib/media-player/index.css +1 -1
  342. package/lib/multiple-picker/MultiplePicker.d.ts +3 -3
  343. package/lib/multiple-picker/index.css +1 -1
  344. package/lib/multiple-picker/index.d.ts +4 -3
  345. package/lib/multiple-picker/types.d.ts +17 -0
  346. package/lib/nav-bar/index.css +1 -1
  347. package/lib/nav-bar/index.d.ts +1 -0
  348. package/lib/nav-bar/types.d.ts +16 -0
  349. package/lib/nav-bar/types.js +15 -0
  350. package/lib/notice-bar/index.css +1 -1
  351. package/lib/notice-bar/index.d.ts +1 -1
  352. package/lib/notice-bar/types.d.ts +10 -0
  353. package/lib/notify/index.css +1 -1
  354. package/lib/notify/index.d.ts +1 -1
  355. package/lib/notify/types.d.ts +8 -0
  356. package/lib/number-keyboard/index.css +1 -1
  357. package/lib/number-keyboard/index.d.ts +1 -0
  358. package/lib/number-keyboard/types.d.ts +14 -0
  359. package/lib/number-keyboard/types.js +15 -0
  360. package/lib/overlay/index.d.ts +1 -0
  361. package/lib/overlay/types.d.ts +4 -0
  362. package/lib/overlay/types.js +15 -0
  363. package/lib/password-input/index.css +1 -1
  364. package/lib/password-input/index.d.ts +1 -0
  365. package/lib/password-input/types.d.ts +15 -0
  366. package/lib/password-input/types.js +15 -0
  367. package/lib/picker/Picker.d.ts +6 -6
  368. package/lib/picker/index.css +1 -1
  369. package/lib/picker/index.d.ts +7 -7
  370. package/lib/picker/types.d.ts +17 -0
  371. package/lib/popover/Popover.js +1 -1
  372. package/lib/popover/index.css +1 -1
  373. package/lib/popover/index.d.ts +1 -1
  374. package/lib/popover/types.d.ts +12 -0
  375. package/lib/popup/index.css +1 -1
  376. package/lib/popup/index.d.ts +1 -1
  377. package/lib/popup/types.d.ts +8 -0
  378. package/lib/pull-refresh/index.css +1 -1
  379. package/lib/pull-refresh/index.d.ts +1 -0
  380. package/lib/pull-refresh/types.d.ts +6 -0
  381. package/lib/pull-refresh/types.js +15 -0
  382. package/lib/radio/index.css +1 -1
  383. package/lib/radio/index.d.ts +1 -0
  384. package/lib/radio/types.d.ts +18 -0
  385. package/lib/radio/types.js +15 -0
  386. package/lib/radio-group/index.css +1 -1
  387. package/lib/radio-picker/RadioPicker.d.ts +3 -3
  388. package/lib/radio-picker/index.css +1 -1
  389. package/lib/radio-picker/index.d.ts +4 -4
  390. package/lib/radio-picker/types.d.ts +24 -0
  391. package/lib/rate/index.css +1 -1
  392. package/lib/rate/index.d.ts +1 -0
  393. package/lib/rate/types.d.ts +6 -0
  394. package/lib/rate/types.js +15 -0
  395. package/lib/search/index.css +1 -1
  396. package/lib/search/index.d.ts +1 -1
  397. package/lib/search/types.d.ts +12 -0
  398. package/lib/signature/index.css +1 -1
  399. package/lib/signature/index.d.ts +1 -1
  400. package/lib/signature/types.d.ts +9 -0
  401. package/lib/skeleton/index.d.ts +1 -0
  402. package/lib/skeleton/types.d.ts +9 -0
  403. package/lib/skeleton/types.js +15 -0
  404. package/lib/step/Step.js +2 -2
  405. package/lib/step/index.css +1 -1
  406. package/lib/step/index.d.ts +1 -0
  407. package/lib/step/types.d.ts +6 -0
  408. package/lib/step/types.js +15 -0
  409. package/lib/stepper/index.css +1 -1
  410. package/lib/stepper/index.d.ts +1 -0
  411. package/lib/stepper/types.d.ts +17 -0
  412. package/lib/stepper/types.js +15 -0
  413. package/lib/steps/index.css +1 -1
  414. package/lib/steps/index.d.ts +1 -0
  415. package/lib/steps/types.d.ts +5 -0
  416. package/lib/steps/types.js +15 -0
  417. package/lib/sticky/index.d.ts +1 -0
  418. package/lib/sticky/types.d.ts +3 -0
  419. package/lib/sticky/types.js +15 -0
  420. package/lib/style/base.css +1 -1
  421. package/lib/style/css-variables.css +1 -1
  422. package/lib/swipe/index.css +1 -1
  423. package/lib/swipe/index.d.ts +1 -1
  424. package/lib/swipe/types.d.ts +10 -0
  425. package/lib/switch/index.css +1 -1
  426. package/lib/switch/index.d.ts +1 -0
  427. package/lib/switch/types.d.ts +18 -0
  428. package/lib/switch/types.js +15 -0
  429. package/lib/tabbar/index.d.ts +1 -0
  430. package/lib/tabbar/types.d.ts +5 -0
  431. package/lib/tabbar/types.js +15 -0
  432. package/lib/tabbar-item/index.css +1 -1
  433. package/lib/tabbar-item/index.d.ts +1 -0
  434. package/lib/tabbar-item/types.d.ts +14 -0
  435. package/lib/tabbar-item/types.js +15 -0
  436. package/lib/table/index.css +1 -1
  437. package/lib/table/index.d.ts +1 -0
  438. package/lib/table/types.d.ts +10 -0
  439. package/lib/tabs/index.css +1 -1
  440. package/lib/tabs/index.d.ts +1 -1
  441. package/lib/tabs/types.d.ts +17 -0
  442. package/lib/tag/Tag.js +5 -4
  443. package/lib/tag/index.css +1 -1
  444. package/lib/tag/index.d.ts +1 -0
  445. package/lib/tag/types.d.ts +17 -0
  446. package/lib/tag/types.js +15 -0
  447. package/lib/text-ellipsis/types.d.ts +1 -0
  448. package/lib/time-picker/TimePicker.d.ts +2 -2
  449. package/lib/time-picker/index.css +1 -1
  450. package/lib/time-picker/index.d.ts +3 -2
  451. package/lib/time-picker/types.d.ts +23 -0
  452. package/lib/time-picker/types.js +15 -0
  453. package/lib/timeline/index.css +1 -1
  454. package/lib/timeline/index.d.ts +1 -0
  455. package/lib/timeline/types.d.ts +9 -0
  456. package/lib/timeline/types.js +15 -0
  457. package/lib/toast/index.css +1 -1
  458. package/lib/toast/index.d.ts +1 -1
  459. package/lib/toast/types.d.ts +15 -0
  460. package/lib/uploader/index.css +1 -1
  461. package/lib/uploader/index.d.ts +1 -1
  462. package/lib/uploader/types.d.ts +21 -0
  463. package/lib/vue-sfc-shim.d.ts +6 -6
  464. package/lib/vue-tsx-shim.d.ts +23 -23
  465. package/lib/web-types.json +1 -1
  466. package/lib/zartui.cjs.js +1118 -688
  467. package/lib/zartui.es.js +1118 -688
  468. package/lib/zartui.js +1118 -688
  469. package/lib/zartui.min.js +1 -1
  470. package/package.json +5 -5
@@ -70,6 +70,7 @@ export declare const Image: import("../utils").WithInstall<import("vue").DefineC
70
70
  }, {}>>;
71
71
  export default Image;
72
72
  export type { ImageFit, ImageProps } from './Image';
73
+ export type { ImageThemeVars } from './types';
73
74
  declare module 'vue' {
74
75
  interface GlobalComponents {
75
76
  ZtImage: typeof Image;
@@ -0,0 +1,5 @@
1
+ export type ImageThemeVars = {
2
+ imagePlaceholderTextColor?: string;
3
+ imagePlaceholderBackground?: string;
4
+ imageIconFontSize?: string;
5
+ };
@@ -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);
@@ -195,11 +195,11 @@ declare const _default: import("vue").DefineComponent<{
195
195
  closeOnPopstate: boolean;
196
196
  closeIconPosition: PopupCloseIconPosition;
197
197
  showIndicators: boolean;
198
- swipeDuration: string | number;
199
198
  minZoom: string | number;
200
199
  maxZoom: string | number;
201
200
  images: ImageItem[];
202
201
  showIndex: boolean;
202
+ swipeDuration: string | number;
203
203
  startPosition: string | number;
204
204
  }, {}>;
205
205
  export default _default;
@@ -1 +1 @@
1
- :root{--zt-image-preview-index-height: 48px;--zt-image-preview-index-line-height: 24px;--zt-image-preview-index-background: var(--zt-gray-a4);--zt-image-preview-index-text-color: var(--zt-white);--zt-image-preview-index-number-font-size: var(--zt-font-size-sm);--zt-image-preview-title-font-size: var(--zt-font-size-md);--zt-image-preview-overlay-background: rgba(0, 0, 0, .9);--zt-image-preview-close-icon-size: 22px;--zt-image-preview-close-icon-color: var(--zt-gray-5);--zt-image-preview-close-icon-margin: var(--zt-padding-md);--zt-image-preview-close-icon-z-index: 1}.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image,.zt-image-preview__image-wrap{width:100%;transition-property:transform}.zt-image-preview__image--vertical,.zt-image-preview__image-wrap--vertical{width:auto;height:100%}.zt-image-preview__image img,.zt-image-preview__image-wrap img,.zt-image-preview__image video,.zt-image-preview__image-wrap video{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error,.zt-image-preview__image-wrap .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon,.zt-image-preview__image-wrap .zt-image__error-icon{font-size:36px}.zt-image-preview__image .zt-image__loading,.zt-image-preview__image-wrap .zt-image__loading{background-color:transparent}.zt-image-preview__index{box-sizing:border-box;display:flex;align-items:center;position:absolute;bottom:0;left:0;width:100%;height:var(--zt-image-preview-index-height);padding:0 16px;background-color:var(--zt-image-preview-index-background);color:var(--zt-image-preview-index-text-color);overflow:hidden}.zt-image-preview__index-number{height:var(--zt-image-preview-index-line-height);background:rgba(45,75,115,.8);border-radius:2px;font-size:var(--zt-image-preview-index-number-font-size);text-align:center;line-height:var(--zt-image-preview-index-line-height);padding:0 8px}.zt-image-preview__title{flex-shrink:0;margin-left:8px;font-size:var(--zt-image-preview-title-font-size);line-height:var(--zt-image-preview-index-line-height)}.zt-image-preview__overlay{background:var(--zt-image-preview-overlay-background)}.zt-image-preview__close-icon{position:absolute;z-index:var(--zt-image-preview-close-icon-z-index);color:var(--zt-image-preview-close-icon-color);font-size:var(--zt-image-preview-close-icon-size)}.zt-image-preview__close-icon--top-left{top:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--top-right{top:var(--zt-image-preview-close-icon-margin);right:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-left{bottom:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-right{right:var(--zt-image-preview-close-icon-margin);bottom:var(--zt-image-preview-close-icon-margin)}
1
+ :root{--zt-image-preview-index-height: 48px;--zt-image-preview-index-background: var(--zt-gray-a4);--zt-image-preview-index-text-color: var(--zt-white);--zt-image-preview-overlay-background: rgba(0, 0, 0, .9);--zt-image-preview-close-icon-color: var(--zt-gray-5);--zt-image-preview-close-icon-margin: var(--zt-padding-md);--zt-image-preview-close-icon-z-index: 1;--zt-image-preview-error-font-size: 36px}:root[zt-theme-size=large]{--zt-image-preview-error-font-size: 42px}.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image,.zt-image-preview__image-wrap{width:100%;transition-property:transform}.zt-image-preview__image--vertical,.zt-image-preview__image-wrap--vertical{width:auto;height:100%}.zt-image-preview__image img,.zt-image-preview__image-wrap img,.zt-image-preview__image video,.zt-image-preview__image-wrap video{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error,.zt-image-preview__image-wrap .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon,.zt-image-preview__image-wrap .zt-image__error-icon{font-size:var(--zt-image-preview-error-font-size)}.zt-image-preview__image .zt-image__loading,.zt-image-preview__image-wrap .zt-image__loading{background-color:transparent}.zt-image-preview__index{box-sizing:border-box;display:flex;align-items:center;position:absolute;bottom:0;left:0;width:100%;height:var(--zt-image-preview-index-height);padding:0 16px;background-color:var(--zt-image-preview-index-background);color:var(--zt-image-preview-index-text-color);overflow:hidden}.zt-image-preview__index-number{height:var(--zt-line-height-xl);background:rgba(45,75,115,.8);border-radius:2px;font-size:var(--zt-font-size-sm);text-align:center;line-height:var(--zt-line-height-xl);padding:0 8px}.zt-image-preview__title{flex-shrink:0;margin-left:8px;font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-xl)}.zt-image-preview__overlay{background:var(--zt-image-preview-overlay-background)}.zt-image-preview__close-icon{position:absolute;z-index:var(--zt-image-preview-close-icon-z-index);color:var(--zt-image-preview-close-icon-color);font-size:var(--zt-font-size-xxxl)}.zt-image-preview__close-icon--top-left{top:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--top-right{top:var(--zt-image-preview-close-icon-margin);right:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-left{bottom:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-right{right:var(--zt-image-preview-close-icon-margin);bottom:var(--zt-image-preview-close-icon-margin)}
@@ -132,18 +132,18 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
132
132
  closeOnPopstate: boolean;
133
133
  closeIconPosition: import("..").PopupCloseIconPosition;
134
134
  showIndicators: boolean;
135
- swipeDuration: string | number;
136
135
  minZoom: string | number;
137
136
  maxZoom: string | number;
138
137
  images: import("./types").ImageItem[];
139
138
  showIndex: boolean;
139
+ swipeDuration: string | number;
140
140
  startPosition: string | number;
141
141
  }, {}>>;
142
142
  export default ImagePreview;
143
143
  export { imagePreviewProps } from './ImagePreview';
144
144
  export { showImagePreview } from './function-call';
145
145
  export type { ImagePreviewProps };
146
- export type { ImageItem, ImagePreviewOptions, ImagePreviewInstance, ImagePreviewScaleEventParams, } from './types';
146
+ export type { ImageItem, ImagePreviewOptions, ImagePreviewInstance, ImagePreviewScaleEventParams, ImagePreviewThemeVars, } from './types';
147
147
  declare module 'vue' {
148
148
  interface GlobalComponents {
149
149
  ZtImagePreview: typeof ImagePreview;
@@ -42,3 +42,13 @@ export type ImagePreviewExpose = {
42
42
  swipeTo: (index: number, options?: SwipeToOptions) => void;
43
43
  };
44
44
  export type ImagePreviewInstance = ComponentPublicInstance<ImagePreviewProps, ImagePreviewExpose>;
45
+ export type ImagePreviewThemeVars = {
46
+ imagePreviewIndexHeight?: string;
47
+ imagePreviewIndexBackground?: string;
48
+ imagePreviewIndexTextColor?: string;
49
+ imagePreviewOverlayBackground?: string;
50
+ imagePreviewCloseIconColor?: string;
51
+ imagePreviewCloseIconMargin?: string;
52
+ imagePreviewCloseIconZIndex?: string;
53
+ imagePreviewErrorFontSize?: string;
54
+ };
@@ -1 +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)}
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-background: transparent;--zt-index-anchor-sticky-text-color: var(--zt-primary-color);--zt-index-anchor-height: 44px}:root[zt-theme-size=large]{--zt-index-anchor-height: 56px}.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-font-size-md);line-height:var(--zt-index-anchor-height);height:var(--zt-index-anchor-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:var(--zt-primary-color)}.zt-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--zt-index-anchor-sticky-text-color);background:var(--zt-background)}
@@ -3,9 +3,7 @@ export type IndexAnchorThemeVars = {
3
3
  indexAnchorPadding?: string;
4
4
  indexAnchorTextColor?: string;
5
5
  indexAnchorFontWeight?: string;
6
- indexAnchorFontSize?: string;
7
- indexAnchorLineHeight?: number | string;
8
6
  indexAnchorBackground?: string;
9
7
  indexAnchorStickyTextColor?: string;
10
- indexAnchorStickyBackground?: string;
8
+ indexAnchorHeight?: string;
11
9
  };
@@ -22,6 +22,14 @@ export declare const indexBarProps: {
22
22
  type: PropType<Numeric[]>;
23
23
  default: typeof genAlphabet;
24
24
  };
25
+ indexBarMaxHeight: {
26
+ type: (NumberConstructor | StringConstructor)[];
27
+ default: string;
28
+ };
29
+ contractionPointText: {
30
+ type: PropType<string>;
31
+ default: string;
32
+ };
25
33
  };
26
34
  export type IndexBarProps = ExtractPropTypes<typeof indexBarProps>;
27
35
  export declare const INDEX_BAR_KEY: InjectionKey<IndexBarProvide>;
@@ -45,6 +53,14 @@ declare const _default: import("vue").DefineComponent<{
45
53
  type: PropType<Numeric[]>;
46
54
  default: typeof genAlphabet;
47
55
  };
56
+ indexBarMaxHeight: {
57
+ type: (NumberConstructor | StringConstructor)[];
58
+ default: string;
59
+ };
60
+ contractionPointText: {
61
+ type: PropType<string>;
62
+ default: string;
63
+ };
48
64
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change" | "anchorClick" | "update:activeAnchor")[], "select" | "change" | "anchorClick" | "update:activeAnchor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
49
65
  sticky: {
50
66
  type: BooleanConstructor;
@@ -65,6 +81,14 @@ declare const _default: import("vue").DefineComponent<{
65
81
  type: PropType<Numeric[]>;
66
82
  default: typeof genAlphabet;
67
83
  };
84
+ indexBarMaxHeight: {
85
+ type: (NumberConstructor | StringConstructor)[];
86
+ default: string;
87
+ };
88
+ contractionPointText: {
89
+ type: PropType<string>;
90
+ default: string;
91
+ };
68
92
  }>> & {
69
93
  onChange?: ((...args: any[]) => any) | undefined;
70
94
  onSelect?: ((...args: any[]) => any) | undefined;
@@ -75,5 +99,7 @@ declare const _default: import("vue").DefineComponent<{
75
99
  activeAnchor: string | number;
76
100
  stickyOffsetTop: number;
77
101
  indexList: Numeric[];
102
+ indexBarMaxHeight: string | number;
103
+ contractionPointText: string;
78
104
  }, {}>;
79
105
  export default _default;
@@ -29,6 +29,8 @@ var import_use = require("@zartui/use");
29
29
  var import_use_touch = require("../composables/use-touch");
30
30
  var import_use_expose = require("../composables/use-expose");
31
31
  var import_use_sync_prop_ref = require("../composables/use-sync-prop-ref");
32
+ var import_parse = require("../utils/parse");
33
+ var import_deep_clone = require("../utils/deep-clone");
32
34
  function genAlphabet() {
33
35
  const charCodeOfA = "A".charCodeAt(0);
34
36
  const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
@@ -45,9 +47,12 @@ const indexBarProps = {
45
47
  indexList: {
46
48
  type: Array,
47
49
  default: genAlphabet
48
- }
50
+ },
51
+ indexBarMaxHeight: (0, import_utils.makeNumericProp)("70vh"),
52
+ contractionPointText: (0, import_utils.makeStringProp)("\xB7")
49
53
  };
50
54
  const INDEX_BAR_KEY = Symbol(name);
55
+ const MIN_CONTRACTION_NUM = 2;
51
56
  var stdin_default = (0, import_vue2.defineComponent)({
52
57
  name,
53
58
  props: indexBarProps,
@@ -60,6 +65,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
60
65
  const sidebar = (0, import_vue2.ref)();
61
66
  const activeAnchor = (0, import_use_sync_prop_ref.useSyncPropRef)(() => props.activeAnchor, (value) => emit("update:activeAnchor", value));
62
67
  const touchIndex = (0, import_vue2.ref)("");
68
+ const indexBarMaxHeight = () => {
69
+ return props.indexBarMaxHeight ? (0, import_utils.unitToPx)(props.indexBarMaxHeight) : (0, import_utils.unitToPx)("100vh");
70
+ };
63
71
  const touch = (0, import_use_touch.useTouch)();
64
72
  const scrollParent = (0, import_use.useScrollParent)(root);
65
73
  const {
@@ -182,54 +190,170 @@ var stdin_default = (0, import_vue2.defineComponent)({
182
190
  };
183
191
  const scrollToElement = (element) => {
184
192
  const {
185
- index
193
+ index,
194
+ indexMap = ""
186
195
  } = element.dataset;
187
- if (index) {
188
- scrollTo(index);
196
+ let indexValue = index;
197
+ if (index === props.contractionPointText) {
198
+ indexValue = getIndexMapStartIndexItem(indexMap);
199
+ }
200
+ if (indexValue) {
201
+ scrollTo(indexValue);
189
202
  }
190
203
  };
191
204
  const onClickSidebar = (event) => {
192
205
  scrollToElement(event.target);
193
206
  };
194
- const renderIndexes = () => props.indexList.map((index) => {
195
- const active = index === activeAnchor.value;
196
- const touch2 = index === touchIndex.value;
197
- return (0, import_vue.createVNode)("div", {
198
- "class": bem("index"),
199
- "style": active ? highlightStyle.value : void 0
200
- }, [(0, import_vue.createVNode)("div", {
201
- "class": bem("touch", {
202
- active: touch2
203
- })
204
- }, [(0, import_vue.createVNode)("div", {
205
- "class": bem("touch-text")
206
- }, [index]), (0, import_vue.createVNode)("svg", {
207
- "class": bem("icon"),
208
- "xmlns": "http://www.w3.org/2000/svg",
209
- "viewBox": "0 0 20 32"
210
- }, [(0, import_vue.createVNode)("defs", null, [(0, import_vue.createVNode)("path", {
211
- "id": "7rkhbmqvk__gc482iacwa",
212
- "d": "M0 0H20V32H0z"
213
- }, null)]), (0, import_vue.createVNode)("g", {
214
- "fill": "none",
215
- "fill-rule": "evenodd"
216
- }, [(0, import_vue.createVNode)("path", {
217
- "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",
218
- "fill": "#8093AB",
219
- "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
220
- }, null), (0, import_vue.createVNode)("path", {
221
- "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",
222
- "fill": "#8093AB",
223
- "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
224
- }, null)])])]), (0, import_vue.createVNode)("div", {
225
- "data-index": index,
226
- "onClick": onClickSidebar,
227
- "class": bem("index", {
228
- active,
229
- touch: touch2
230
- })
231
- }, [index])]);
232
- });
207
+ const getIndexHeight = () => {
208
+ var _a, _b;
209
+ let indexHeight = "0";
210
+ if ((_a = sidebar.value) == null ? void 0 : _a.children.length) {
211
+ const indexElement = (_b = sidebar.value) == null ? void 0 : _b.children[0];
212
+ indexHeight = getComputedStyle(indexElement).height;
213
+ }
214
+ return (0, import_parse.parseNumber)(indexHeight.replace("px", ""));
215
+ };
216
+ const toContractionListByIntervals = (options) => {
217
+ const {
218
+ hiddenIndexNum,
219
+ renderedPointNum
220
+ } = options;
221
+ let adaptedIndexList = (0, import_deep_clone.deepClone)(props.indexList);
222
+ const lastIndexItem = adaptedIndexList[adaptedIndexList.length - 1];
223
+ const contractionList = [];
224
+ const contractionMapList = [];
225
+ const remainder = hiddenIndexNum % renderedPointNum;
226
+ const contractionRate = new Array(renderedPointNum).fill(Math.floor(hiddenIndexNum / renderedPointNum));
227
+ contractionRate[0] += remainder;
228
+ const NEXT_INDEX_OFFSET = 1;
229
+ for (let index = 0; index < renderedPointNum; index++) {
230
+ contractionList.push(adaptedIndexList[0]);
231
+ contractionList.push(props.contractionPointText);
232
+ contractionMapList.push(adaptedIndexList.slice(NEXT_INDEX_OFFSET, contractionRate[index] + NEXT_INDEX_OFFSET));
233
+ adaptedIndexList = adaptedIndexList.splice(contractionRate[index] + NEXT_INDEX_OFFSET);
234
+ }
235
+ contractionList.push(lastIndexItem);
236
+ return {
237
+ contractionList,
238
+ contractionMapList
239
+ };
240
+ };
241
+ const toContractionListByProgression = (options) => {
242
+ const {
243
+ renderedNum
244
+ } = options;
245
+ let adaptedIndexList = (0, import_deep_clone.deepClone)(props.indexList);
246
+ const contractionList = [];
247
+ const contractionMapList = [];
248
+ const renderedPointNum = adaptedIndexList.length - renderedNum;
249
+ const contractionRate = new Array(renderedPointNum).fill(MIN_CONTRACTION_NUM);
250
+ const intervenedIndexListPartNum = renderedPointNum + 1;
251
+ const intervals = Math.ceil((adaptedIndexList.length - MIN_CONTRACTION_NUM * renderedPointNum) / intervenedIndexListPartNum);
252
+ for (let index = 0; index < renderedPointNum; index++) {
253
+ const slicedIndexList = adaptedIndexList.slice(0, intervals);
254
+ contractionList.push(...slicedIndexList);
255
+ contractionMapList.push(adaptedIndexList.slice(intervals, contractionRate[index] + intervals));
256
+ adaptedIndexList = adaptedIndexList.splice(contractionRate[index] + intervals);
257
+ if (adaptedIndexList.length) {
258
+ contractionList.push(props.contractionPointText);
259
+ }
260
+ }
261
+ contractionList.push(...adaptedIndexList);
262
+ return {
263
+ contractionList,
264
+ contractionMapList
265
+ };
266
+ };
267
+ const adaptorIndexListByHeight = () => {
268
+ const actualIndexListHeight = props.indexList.length * getIndexHeight();
269
+ if (actualIndexListHeight && actualIndexListHeight > indexBarMaxHeight()) {
270
+ const adaptedIndexList = (0, import_deep_clone.deepClone)(props.indexList);
271
+ const renderedNum = Math.floor(indexBarMaxHeight() / getIndexHeight());
272
+ const renderedPointNum = Math.floor(renderedNum / MIN_CONTRACTION_NUM);
273
+ const renderedIndexNum = renderedNum - renderedPointNum;
274
+ const hiddenIndexNum = adaptedIndexList.length - renderedIndexNum;
275
+ if (MIN_CONTRACTION_NUM * renderedPointNum + renderedIndexNum <= adaptedIndexList.length) {
276
+ return toContractionListByIntervals({
277
+ hiddenIndexNum,
278
+ renderedPointNum
279
+ });
280
+ } else {
281
+ return toContractionListByProgression({
282
+ renderedNum
283
+ });
284
+ }
285
+ }
286
+ return {
287
+ contractionList: props.indexList,
288
+ contractionMapList: []
289
+ };
290
+ };
291
+ const getContractionPointMapList = (contractionList, contractionMapList, order) => {
292
+ let contractionPointOrder = 0;
293
+ for (let index = 0; index < order; index++) {
294
+ const element = contractionList[index];
295
+ if (element.toString() === props.contractionPointText) {
296
+ contractionPointOrder++;
297
+ }
298
+ }
299
+ return contractionMapList[contractionPointOrder];
300
+ };
301
+ const getIndexMapStartIndexItem = (indexMap) => {
302
+ return indexMap.split(",")[0] || "";
303
+ };
304
+ const renderIndexes = () => {
305
+ const {
306
+ contractionList,
307
+ contractionMapList
308
+ } = adaptorIndexListByHeight();
309
+ return contractionList.map((index, order) => {
310
+ let active = index === activeAnchor.value;
311
+ let touch2 = index === touchIndex.value;
312
+ let contractionPointMapList = [];
313
+ if (index === props.contractionPointText) {
314
+ contractionPointMapList = getContractionPointMapList(contractionList, contractionMapList, order);
315
+ active = contractionPointMapList.includes(activeAnchor.value);
316
+ touch2 = contractionPointMapList.includes(touchIndex.value);
317
+ }
318
+ const touchActiveText = contractionPointMapList[0] || index;
319
+ return (0, import_vue.createVNode)("div", {
320
+ "class": bem("index"),
321
+ "style": active ? highlightStyle.value : void 0
322
+ }, [(0, import_vue.createVNode)("div", {
323
+ "class": bem("touch", {
324
+ active: touch2
325
+ })
326
+ }, [(0, import_vue.createVNode)("div", {
327
+ "class": bem("touch-text")
328
+ }, [touchActiveText]), (0, import_vue.createVNode)("svg", {
329
+ "class": bem("icon"),
330
+ "xmlns": "http://www.w3.org/2000/svg",
331
+ "viewBox": "0 0 20 32"
332
+ }, [(0, import_vue.createVNode)("defs", null, [(0, import_vue.createVNode)("path", {
333
+ "id": "7rkhbmqvk__gc482iacwa",
334
+ "d": "M0 0H20V32H0z"
335
+ }, null)]), (0, import_vue.createVNode)("g", {
336
+ "fill": "none",
337
+ "fill-rule": "evenodd"
338
+ }, [(0, import_vue.createVNode)("path", {
339
+ "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",
340
+ "fill": "#8093AB",
341
+ "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
342
+ }, null), (0, import_vue.createVNode)("path", {
343
+ "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",
344
+ "fill": "#8093AB",
345
+ "mask": "url(#7rkhbmqvk__9ahlxl93tb)"
346
+ }, null)])])]), (0, import_vue.createVNode)("div", {
347
+ "data-index": index,
348
+ "data-index-map": contractionPointMapList,
349
+ "onClick": onClickSidebar,
350
+ "class": bem("index", {
351
+ active,
352
+ touch: touch2
353
+ })
354
+ }, [index])]);
355
+ });
356
+ };
233
357
  let touchActiveIndex;
234
358
  const onTouchStart = (event) => {
235
359
  const {
@@ -239,9 +363,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
239
363
  const target = document.elementFromPoint(clientX, clientY);
240
364
  if (target) {
241
365
  const {
242
- index = ""
366
+ index = "",
367
+ indexMap = ""
243
368
  } = target.dataset;
244
- touchIndex.value = index;
369
+ if (index === props.contractionPointText) {
370
+ touchIndex.value = getIndexMapStartIndexItem(indexMap);
371
+ } else {
372
+ touchIndex.value = index;
373
+ }
245
374
  }
246
375
  touch.start(event);
247
376
  };
@@ -259,11 +388,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
259
388
  const target = document.elementFromPoint(clientX, clientY);
260
389
  if (target) {
261
390
  const {
262
- index
391
+ index,
392
+ indexMap = ""
263
393
  } = target.dataset;
264
- if (index && touchActiveIndex !== index) {
265
- touchActiveIndex = index;
266
- touchIndex.value = index;
394
+ let indexValue = index;
395
+ if (index === props.contractionPointText) {
396
+ indexValue = getIndexMapStartIndexItem(indexMap);
397
+ }
398
+ if (indexValue && touchActiveIndex !== indexValue) {
399
+ touchActiveIndex = indexValue;
400
+ touchIndex.value = indexValue;
267
401
  scrollToElement(target);
268
402
  }
269
403
  }
@@ -1 +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}
1
+ :root{--zt-index-bar-sidebar-z-index: 2}.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-font-size-sm);line-height:var(--zt-line-height-sm);display:flex;height:var(--zt-line-height-sm)}.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-line-height-md);color:var(--zt-white);background:var(--zt-primary-color);border-radius:calc(var(--zt-line-height-sm) / 2)}.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:var(--zt-font-size-lg);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}
@@ -19,6 +19,14 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
19
19
  type: import("vue").PropType<import("../utils").Numeric[]>;
20
20
  default: () => string[];
21
21
  };
22
+ indexBarMaxHeight: {
23
+ type: (NumberConstructor | StringConstructor)[];
24
+ default: string;
25
+ };
26
+ contractionPointText: {
27
+ type: import("vue").PropType<string>;
28
+ default: string;
29
+ };
22
30
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change" | "anchorClick" | "update:activeAnchor")[], "select" | "change" | "anchorClick" | "update:activeAnchor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
31
  sticky: {
24
32
  type: BooleanConstructor;
@@ -39,6 +47,14 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
39
47
  type: import("vue").PropType<import("../utils").Numeric[]>;
40
48
  default: () => string[];
41
49
  };
50
+ indexBarMaxHeight: {
51
+ type: (NumberConstructor | StringConstructor)[];
52
+ default: string;
53
+ };
54
+ contractionPointText: {
55
+ type: import("vue").PropType<string>;
56
+ default: string;
57
+ };
42
58
  }>> & {
43
59
  onChange?: ((...args: any[]) => any) | undefined;
44
60
  onSelect?: ((...args: any[]) => any) | undefined;
@@ -49,6 +65,8 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
49
65
  activeAnchor: string | number;
50
66
  stickyOffsetTop: number;
51
67
  indexList: import("../utils").Numeric[];
68
+ indexBarMaxHeight: string | number;
69
+ contractionPointText: string;
52
70
  }, {}>>;
53
71
  export default IndexBar;
54
72
  export { indexBarProps } from './IndexBar';
@@ -10,7 +10,8 @@ export type IndexBarExpose = {
10
10
  export type IndexBarInstance = ComponentPublicInstance<IndexBarProps, IndexBarExpose>;
11
11
  export type IndexBarThemeVars = {
12
12
  indexBarSidebarZIndex?: number | string;
13
- indexBarIndexFontSize?: string;
14
- indexBarIndexLineHeight?: number | string;
15
- indexBarIndexActiveColor?: string;
16
13
  };
14
+ export interface IndexBarContractionItem {
15
+ index: Numeric;
16
+ indexContractionMapList: Numeric[];
17
+ }