centui 0.0.0-stage → 3.1.0

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 (411) hide show
  1. package/LICENSE +433 -0
  2. package/README.md +54 -2
  3. package/dist/ActionBar-Bs5fkyFH.cjs +1 -0
  4. package/dist/ActionBar-CF1zMUMC.js +56 -0
  5. package/dist/ActivityIndicator-BOZRJBDn.cjs +1 -0
  6. package/dist/ActivityIndicator-Cp20c1E0.js +162 -0
  7. package/dist/Agree-ZswFiFNy.cjs +1 -0
  8. package/dist/Agree-lAcOo38C.js +43 -0
  9. package/dist/Amount-B2StZGGW.js +56 -0
  10. package/dist/Amount-CU7Oc4vv.cjs +1 -0
  11. package/dist/Bill-DDVs3Lu3.cjs +1 -0
  12. package/dist/Bill-qQ4LdkmR.js +58 -0
  13. package/dist/Button-Bu8liJQE.cjs +1 -0
  14. package/dist/Button-D7e-cuA1.js +60 -0
  15. package/dist/Captcha-BEF-de8-.cjs +1 -0
  16. package/dist/Captcha-CgpynYTc.js +283 -0
  17. package/dist/Cashier-CJLfQOXm.js +363 -0
  18. package/dist/Cashier-CLJngM0n.cjs +1 -0
  19. package/dist/CellItem-BHEh4Cp-.js +71 -0
  20. package/dist/CellItem-J0LkwZNL.cjs +1 -0
  21. package/dist/Chart-BINJAx7V.js +135 -0
  22. package/dist/Chart-DJ0Q1g1P.cjs +1 -0
  23. package/dist/CheckBox-D5bCJUXD.js +55 -0
  24. package/dist/CheckBox-DDeCshDK.cjs +1 -0
  25. package/dist/CheckBoxBase-BIPGJ-TD.js +43 -0
  26. package/dist/CheckBoxBase-CobK6-tL.cjs +1 -0
  27. package/dist/CheckList-BsKo_Fl3.cjs +1 -0
  28. package/dist/CheckList-ViiCo4yi.js +195 -0
  29. package/dist/Codebox-BLPrFnIv.js +188 -0
  30. package/dist/Codebox-yLkdTU7w.cjs +1 -0
  31. package/dist/DatePicker-CCU6gqG3.cjs +1 -0
  32. package/dist/DatePicker-CYvPJatt.js +175 -0
  33. package/dist/DetailItem-D6-zbZmd.js +21 -0
  34. package/dist/DetailItem-DDJXXao0.cjs +1 -0
  35. package/dist/Dialog-208_XUAL.cjs +1 -0
  36. package/dist/Dialog-Bb7Gth3j.js +148 -0
  37. package/dist/DropMenu-5TA_6bas.js +95 -0
  38. package/dist/DropMenu-D_ZMGOOi.cjs +1 -0
  39. package/dist/Field-0hdNWFNm.js +50 -0
  40. package/dist/Field-DDmHa4zB.cjs +1 -0
  41. package/dist/FieldItem-D79w330m.js +87 -0
  42. package/dist/FieldItem-UFKrl_5J.cjs +1 -0
  43. package/dist/Icon-83WWqE5z.cjs +31 -0
  44. package/dist/Icon-BgCtu0ZV.js +117 -0
  45. package/dist/ImageReader-DjshA_hh.cjs +1 -0
  46. package/dist/ImageReader-hUb5CEbV.js +122 -0
  47. package/dist/ImageViewer-BCEK4DOF.cjs +1 -0
  48. package/dist/ImageViewer-_dTRCIsV.js +68 -0
  49. package/dist/InputItem-DO5Yo_IH.cjs +1 -0
  50. package/dist/InputItem-yHsLFvKt.js +327 -0
  51. package/dist/Landscape-BsHyoM4N.cjs +1 -0
  52. package/dist/Landscape-Dd0abEy1.js +73 -0
  53. package/dist/LicensePlate-CTcAIbcb.js +201 -0
  54. package/dist/LicensePlate-CfwpVw0G.cjs +1 -0
  55. package/dist/NoticeBar-CV355FeO.cjs +1 -0
  56. package/dist/NoticeBar-G5aKL6VO.js +92 -0
  57. package/dist/NumberKeyboard-BWpxsbYt.cjs +1 -0
  58. package/dist/NumberKeyboard-B_TJXxki.js +335 -0
  59. package/dist/Picker-BOEGTBaN.cjs +1 -0
  60. package/dist/Picker-CA-JQ_OC.js +493 -0
  61. package/dist/Popup-Ca1jPi0t.cjs +1 -0
  62. package/dist/Popup-qLk-BsRS.js +116 -0
  63. package/dist/PopupTitleBar-9P4RUMC1.js +84 -0
  64. package/dist/PopupTitleBar-Bfl49eYJ.cjs +1 -0
  65. package/dist/Progress-CT-LHaQ0.cjs +1 -0
  66. package/dist/Progress-Clet0W_n.js +65 -0
  67. package/dist/Radio-B_MxJ65X.cjs +1 -0
  68. package/dist/Radio-DY-ZX0BP.js +67 -0
  69. package/dist/RadioGroup-B00aqM9e.js +84 -0
  70. package/dist/RadioGroup-B6ukqnm5.cjs +1 -0
  71. package/dist/RadioList-D-9PITpr.cjs +1 -0
  72. package/dist/RadioList-DNGsEzgf.js +125 -0
  73. package/dist/ResultPage-DUs8ok5R.js +64 -0
  74. package/dist/ResultPage-YQWDaFmz.cjs +1 -0
  75. package/dist/Roller-BznN57fL.js +91 -0
  76. package/dist/Roller-DALhjhfg.cjs +1 -0
  77. package/dist/RollerSuccess-BbMzNlkv.cjs +1 -0
  78. package/dist/RollerSuccess-CTh43Rh0.js +65 -0
  79. package/dist/Ruler-Bhf5J7hU.js +136 -0
  80. package/dist/Ruler-CEzB0oqG.cjs +1 -0
  81. package/dist/ScrollView-BNY62f7B.js +228 -0
  82. package/dist/ScrollView-BnadVBJC.cjs +1 -0
  83. package/dist/ScrollViewMore-BL1vpyMj.cjs +1 -0
  84. package/dist/ScrollViewMore-DBhoiI1X.js +54 -0
  85. package/dist/Selector-DOU8Af55.js +209 -0
  86. package/dist/Selector-DnFvOGbv.cjs +1 -0
  87. package/dist/Skeleton--SCiydNl.cjs +1 -0
  88. package/dist/Skeleton-DqA5IxL5.js +54 -0
  89. package/dist/Slider-BB2Nhpys.js +100 -0
  90. package/dist/Slider-vV7_nULf.cjs +1 -0
  91. package/dist/Stepper-BnDhL8IO.js +137 -0
  92. package/dist/Stepper-n_mc16V2.cjs +1 -0
  93. package/dist/Steps-BPQwab3T.js +157 -0
  94. package/dist/Steps-Dfpmgl8B.cjs +1 -0
  95. package/dist/SwiperItem-BY5cUoGn.cjs +1 -0
  96. package/dist/SwiperItem-BydyBdYU.js +323 -0
  97. package/dist/Switch-B1rsBY-M.js +31 -0
  98. package/dist/Switch-CghubImq.cjs +1 -0
  99. package/dist/TabPane-BCVsdptu.cjs +1 -0
  100. package/dist/TabPane-Q7oUFzmP.js +237 -0
  101. package/dist/TabPicker-BcL9assY.cjs +1 -0
  102. package/dist/TabPicker-BicPrto7.js +173 -0
  103. package/dist/Tag-C7ygxOwU.js +78 -0
  104. package/dist/Tag-CIA2npnD.cjs +1 -0
  105. package/dist/TextareaItem-Dl-PCLl-.js +168 -0
  106. package/dist/TextareaItem-Du5nl7tv.cjs +1 -0
  107. package/dist/Tip-DHPmevlv.js +165 -0
  108. package/dist/Tip-De_3tKtb.cjs +1 -0
  109. package/dist/Transition-B-baX512.js +14 -0
  110. package/dist/Transition-Bwbqr4Xr.cjs +1 -0
  111. package/dist/WaterMark-CgkuQjv3.js +103 -0
  112. package/dist/WaterMark-M81jg6T5.cjs +1 -0
  113. package/dist/action-bar.cjs +1 -0
  114. package/dist/action-bar.d.ts +1 -0
  115. package/dist/action-bar.js +1 -0
  116. package/dist/action-sheet-BjaReHkr.cjs +1 -0
  117. package/dist/action-sheet-Da8dHevy.js +121 -0
  118. package/dist/action-sheet.cjs +1 -0
  119. package/dist/action-sheet.d.ts +2 -0
  120. package/dist/action-sheet.js +1 -0
  121. package/dist/activity-indicator.cjs +1 -0
  122. package/dist/activity-indicator.d.ts +1 -0
  123. package/dist/activity-indicator.js +4 -0
  124. package/dist/agree.cjs +1 -0
  125. package/dist/agree.d.ts +1 -0
  126. package/dist/agree.js +1 -0
  127. package/dist/amount.cjs +1 -0
  128. package/dist/amount.d.ts +1 -0
  129. package/dist/amount.js +1 -0
  130. package/dist/bill.cjs +1 -0
  131. package/dist/bill.d.ts +1 -0
  132. package/dist/bill.js +1 -0
  133. package/dist/button.cjs +1 -0
  134. package/dist/button.d.ts +1 -0
  135. package/dist/button.js +1 -0
  136. package/dist/captcha.cjs +1 -0
  137. package/dist/captcha.d.ts +1 -0
  138. package/dist/captcha.js +1 -0
  139. package/dist/cashier.cjs +1 -0
  140. package/dist/cashier.d.ts +1 -0
  141. package/dist/cashier.js +1 -0
  142. package/dist/cell-item.cjs +1 -0
  143. package/dist/cell-item.d.ts +1 -0
  144. package/dist/cell-item.js +1 -0
  145. package/dist/chart.cjs +1 -0
  146. package/dist/chart.d.ts +1 -0
  147. package/dist/chart.js +1 -0
  148. package/dist/check-base.cjs +1 -0
  149. package/dist/check-base.d.ts +1 -0
  150. package/dist/check-base.js +1 -0
  151. package/dist/check.cjs +1 -0
  152. package/dist/check.d.ts +1 -0
  153. package/dist/check.js +3 -0
  154. package/dist/codebox.cjs +1 -0
  155. package/dist/codebox.d.ts +1 -0
  156. package/dist/codebox.js +1 -0
  157. package/dist/components/action-bar/ActionBar.vue.d.ts +34 -0
  158. package/dist/components/action-bar/index.d.ts +2 -0
  159. package/dist/components/action-sheet/ActionSheet.vue.d.ts +49 -0
  160. package/dist/components/action-sheet/index.d.ts +25 -0
  161. package/dist/components/activity-indicator/ActivityIndicator.vue.d.ts +31 -0
  162. package/dist/components/activity-indicator/Carousel.vue.d.ts +10 -0
  163. package/dist/components/activity-indicator/CarouselCircle.vue.d.ts +12 -0
  164. package/dist/components/activity-indicator/Roller.vue.d.ts +37 -0
  165. package/dist/components/activity-indicator/RollerSuccess.vue.d.ts +14 -0
  166. package/dist/components/activity-indicator/Spinning.vue.d.ts +10 -0
  167. package/dist/components/activity-indicator/index.d.ts +5 -0
  168. package/dist/components/agree/Agree.vue.d.ts +35 -0
  169. package/dist/components/agree/index.d.ts +1 -0
  170. package/dist/components/amount/Amount.vue.d.ts +25 -0
  171. package/dist/components/amount/index.d.ts +1 -0
  172. package/dist/components/bill/Bill.vue.d.ts +33 -0
  173. package/dist/components/bill/index.d.ts +1 -0
  174. package/dist/components/button/Button.vue.d.ts +38 -0
  175. package/dist/components/button/index.d.ts +1 -0
  176. package/dist/components/captcha/Captcha.vue.d.ts +76 -0
  177. package/dist/components/captcha/index.d.ts +1 -0
  178. package/dist/components/cashier/Cashier.vue.d.ts +101 -0
  179. package/dist/components/cashier/CashierChannel.vue.d.ts +58 -0
  180. package/dist/components/cashier/CashierChannelButton.vue.d.ts +14 -0
  181. package/dist/components/cashier/CashierChannelItem.vue.d.ts +30 -0
  182. package/dist/components/cashier/index.d.ts +4 -0
  183. package/dist/components/cell-item/CellItem.vue.d.ts +38 -0
  184. package/dist/components/cell-item/index.d.ts +1 -0
  185. package/dist/components/chart/Chart.vue.d.ts +30 -0
  186. package/dist/components/chart/index.d.ts +2 -0
  187. package/dist/components/check/Check.vue.d.ts +38 -0
  188. package/dist/components/check/CheckBox.vue.d.ts +31 -0
  189. package/dist/components/check/CheckGroup.vue.d.ts +27 -0
  190. package/dist/components/check/CheckList.vue.d.ts +58 -0
  191. package/dist/components/check/index.d.ts +6 -0
  192. package/dist/components/check/shared.d.ts +52 -0
  193. package/dist/components/check-base/CheckBoxBase.vue.d.ts +25 -0
  194. package/dist/components/check-base/index.d.ts +1 -0
  195. package/dist/components/codebox/Codebox.vue.d.ts +58 -0
  196. package/dist/components/codebox/index.d.ts +1 -0
  197. package/dist/components/date-picker/DatePicker.vue.d.ts +70 -0
  198. package/dist/components/date-picker/index.d.ts +1 -0
  199. package/dist/components/detail-item/DetailItem.vue.d.ts +22 -0
  200. package/dist/components/detail-item/index.d.ts +1 -0
  201. package/dist/components/dialog/Dialog.vue.d.ts +88 -0
  202. package/dist/components/dialog/index.d.ts +40 -0
  203. package/dist/components/drop-menu/DropMenu.vue.d.ts +55 -0
  204. package/dist/components/drop-menu/index.d.ts +1 -0
  205. package/dist/components/field/Field.vue.d.ts +30 -0
  206. package/dist/components/field/index.d.ts +1 -0
  207. package/dist/components/field-item/FieldItem.vue.d.ts +42 -0
  208. package/dist/components/field-item/index.d.ts +1 -0
  209. package/dist/components/icon/Icon.vue.d.ts +20 -0
  210. package/dist/components/icon/default-svg-list.d.ts +2 -0
  211. package/dist/components/icon/index.d.ts +1 -0
  212. package/dist/components/icon/load-sprite.d.ts +6 -0
  213. package/dist/components/image-reader/ImageReader.vue.d.ts +46 -0
  214. package/dist/components/image-reader/index.d.ts +1 -0
  215. package/dist/components/image-viewer/ImageViewer.vue.d.ts +25 -0
  216. package/dist/components/image-viewer/index.d.ts +1 -0
  217. package/dist/components/index.d.ts +3 -0
  218. package/dist/components/input-item/InputItem.vue.d.ts +97 -0
  219. package/dist/components/input-item/cursor.d.ts +7 -0
  220. package/dist/components/input-item/index.d.ts +1 -0
  221. package/dist/components/landscape/Landscape.vue.d.ts +38 -0
  222. package/dist/components/landscape/index.d.ts +1 -0
  223. package/dist/components/license-plate/LicensePlate.vue.d.ts +32 -0
  224. package/dist/components/license-plate/LicensePlateInput.vue.d.ts +14 -0
  225. package/dist/components/license-plate/LicensePlateKeyboard.vue.d.ts +30 -0
  226. package/dist/components/license-plate/index.d.ts +3 -0
  227. package/dist/components/notice-bar/NoticeBar.vue.d.ts +44 -0
  228. package/dist/components/notice-bar/index.d.ts +1 -0
  229. package/dist/components/number-keyboard/KeyboardBoard.vue.d.ts +33 -0
  230. package/dist/components/number-keyboard/KeyboardKey.vue.d.ts +19 -0
  231. package/dist/components/number-keyboard/NumberKeyboard.vue.d.ts +59 -0
  232. package/dist/components/number-keyboard/index.d.ts +3 -0
  233. package/dist/components/picker/Picker.vue.d.ts +64 -0
  234. package/dist/components/picker/PickerColumn.vue.d.ts +64 -0
  235. package/dist/components/picker/index.d.ts +3 -0
  236. package/dist/components/popup/Popup.vue.d.ts +50 -0
  237. package/dist/components/popup/PopupTitleBar.vue.d.ts +45 -0
  238. package/dist/components/popup/index.d.ts +2 -0
  239. package/dist/components/progress/Progress.vue.d.ts +39 -0
  240. package/dist/components/progress/index.d.ts +1 -0
  241. package/dist/components/radio/Radio.vue.d.ts +39 -0
  242. package/dist/components/radio/RadioBox.vue.d.ts +31 -0
  243. package/dist/components/radio/RadioGroup.vue.d.ts +24 -0
  244. package/dist/components/radio/index.d.ts +3 -0
  245. package/dist/components/radio-list/RadioList.vue.d.ts +72 -0
  246. package/dist/components/radio-list/index.d.ts +2 -0
  247. package/dist/components/result-page/ResultPage.vue.d.ts +28 -0
  248. package/dist/components/result-page/index.d.ts +1 -0
  249. package/dist/components/ruler/Ruler.vue.d.ts +34 -0
  250. package/dist/components/ruler/index.d.ts +1 -0
  251. package/dist/components/scroll-view/ScrollView.vue.d.ts +84 -0
  252. package/dist/components/scroll-view/ScrollViewMore.vue.d.ts +12 -0
  253. package/dist/components/scroll-view/ScrollViewRefresh.vue.d.ts +20 -0
  254. package/dist/components/scroll-view/index.d.ts +3 -0
  255. package/dist/components/selector/Selector.vue.d.ts +88 -0
  256. package/dist/components/selector/index.d.ts +2 -0
  257. package/dist/components/skeleton/Skeleton.vue.d.ts +30 -0
  258. package/dist/components/skeleton/index.d.ts +1 -0
  259. package/dist/components/slider/Slider.vue.d.ts +24 -0
  260. package/dist/components/slider/index.d.ts +1 -0
  261. package/dist/components/stepper/Stepper.vue.d.ts +32 -0
  262. package/dist/components/stepper/index.d.ts +1 -0
  263. package/dist/components/steps/Steps.vue.d.ts +56 -0
  264. package/dist/components/steps/index.d.ts +2 -0
  265. package/dist/components/swiper/Swiper.vue.d.ts +57 -0
  266. package/dist/components/swiper/SwiperItem.vue.d.ts +26 -0
  267. package/dist/components/swiper/index.d.ts +2 -0
  268. package/dist/components/switch/Switch.vue.d.ts +16 -0
  269. package/dist/components/switch/index.d.ts +1 -0
  270. package/dist/components/tab-picker/TabPicker.vue.d.ts +78 -0
  271. package/dist/components/tab-picker/index.d.ts +1 -0
  272. package/dist/components/tabs/TabBar.vue.d.ts +50 -0
  273. package/dist/components/tabs/TabPane.vue.d.ts +31 -0
  274. package/dist/components/tabs/Tabs.vue.d.ts +34 -0
  275. package/dist/components/tabs/index.d.ts +3 -0
  276. package/dist/components/tag/Tag.vue.d.ts +39 -0
  277. package/dist/components/tag/index.d.ts +1 -0
  278. package/dist/components/textarea-item/TextareaItem.vue.d.ts +80 -0
  279. package/dist/components/textarea-item/index.d.ts +1 -0
  280. package/dist/components/tip/Tip.vue.d.ts +98 -0
  281. package/dist/components/tip/TipContent.vue.d.ts +33 -0
  282. package/dist/components/tip/index.d.ts +2 -0
  283. package/dist/components/toast/Toast.vue.d.ts +45 -0
  284. package/dist/components/toast/index.d.ts +129 -0
  285. package/dist/components/transition/Transition.vue.d.ts +13 -0
  286. package/dist/components/transition/index.d.ts +1 -0
  287. package/dist/components/water-mark/WaterMark.vue.d.ts +35 -0
  288. package/dist/components/water-mark/index.d.ts +1 -0
  289. package/dist/cursor-BIPoNm8V.js +11 -0
  290. package/dist/cursor-tQE3LcbU.cjs +1 -0
  291. package/dist/date-picker.cjs +1 -0
  292. package/dist/date-picker.d.ts +1 -0
  293. package/dist/date-picker.js +1 -0
  294. package/dist/detail-item.cjs +1 -0
  295. package/dist/detail-item.d.ts +1 -0
  296. package/dist/detail-item.js +1 -0
  297. package/dist/dialog-C38EDWGJ.cjs +1 -0
  298. package/dist/dialog-DdNA6YSe.js +91 -0
  299. package/dist/dialog.cjs +1 -0
  300. package/dist/dialog.d.ts +2 -0
  301. package/dist/dialog.js +3 -0
  302. package/dist/drop-menu.cjs +1 -0
  303. package/dist/drop-menu.d.ts +1 -0
  304. package/dist/drop-menu.js +1 -0
  305. package/dist/field-item.cjs +1 -0
  306. package/dist/field-item.d.ts +1 -0
  307. package/dist/field-item.js +1 -0
  308. package/dist/field.cjs +1 -0
  309. package/dist/field.d.ts +1 -0
  310. package/dist/field.js +1 -0
  311. package/dist/icon.cjs +1 -0
  312. package/dist/icon.d.ts +1 -0
  313. package/dist/icon.js +1 -0
  314. package/dist/image-reader.cjs +1 -0
  315. package/dist/image-reader.d.ts +1 -0
  316. package/dist/image-reader.js +1 -0
  317. package/dist/image-viewer.cjs +1 -0
  318. package/dist/image-viewer.d.ts +1 -0
  319. package/dist/image-viewer.js +1 -0
  320. package/dist/index.cjs +1 -0
  321. package/dist/index.d.ts +64 -0
  322. package/dist/index.js +61 -0
  323. package/dist/input-item.cjs +1 -0
  324. package/dist/input-item.d.ts +1 -0
  325. package/dist/input-item.js +1 -0
  326. package/dist/landscape.cjs +1 -0
  327. package/dist/landscape.d.ts +1 -0
  328. package/dist/landscape.js +1 -0
  329. package/dist/license-plate.cjs +1 -0
  330. package/dist/license-plate.d.ts +1 -0
  331. package/dist/license-plate.js +1 -0
  332. package/dist/notice-bar.cjs +1 -0
  333. package/dist/notice-bar.d.ts +1 -0
  334. package/dist/notice-bar.js +1 -0
  335. package/dist/number-keyboard.cjs +1 -0
  336. package/dist/number-keyboard.d.ts +1 -0
  337. package/dist/number-keyboard.js +1 -0
  338. package/dist/picker.cjs +1 -0
  339. package/dist/picker.d.ts +1 -0
  340. package/dist/picker.js +1 -0
  341. package/dist/popup.cjs +1 -0
  342. package/dist/popup.d.ts +1 -0
  343. package/dist/popup.js +3 -0
  344. package/dist/progress.cjs +1 -0
  345. package/dist/progress.d.ts +1 -0
  346. package/dist/progress.js +1 -0
  347. package/dist/radio-list.cjs +1 -0
  348. package/dist/radio-list.d.ts +1 -0
  349. package/dist/radio-list.js +1 -0
  350. package/dist/radio.cjs +1 -0
  351. package/dist/radio.d.ts +1 -0
  352. package/dist/radio.js +3 -0
  353. package/dist/result-page.cjs +1 -0
  354. package/dist/result-page.d.ts +1 -0
  355. package/dist/result-page.js +1 -0
  356. package/dist/ruler.cjs +1 -0
  357. package/dist/ruler.d.ts +1 -0
  358. package/dist/ruler.js +1 -0
  359. package/dist/scroll-view.cjs +1 -0
  360. package/dist/scroll-view.d.ts +1 -0
  361. package/dist/scroll-view.js +3 -0
  362. package/dist/selector.cjs +1 -0
  363. package/dist/selector.d.ts +1 -0
  364. package/dist/selector.js +1 -0
  365. package/dist/shared-C9XlLe7F.js +36 -0
  366. package/dist/shared-k9cbQbvK.cjs +1 -0
  367. package/dist/skeleton.cjs +1 -0
  368. package/dist/skeleton.d.ts +1 -0
  369. package/dist/skeleton.js +1 -0
  370. package/dist/slider.cjs +1 -0
  371. package/dist/slider.d.ts +1 -0
  372. package/dist/slider.js +1 -0
  373. package/dist/stepper.cjs +1 -0
  374. package/dist/stepper.d.ts +1 -0
  375. package/dist/stepper.js +1 -0
  376. package/dist/steps.cjs +1 -0
  377. package/dist/steps.d.ts +1 -0
  378. package/dist/steps.js +1 -0
  379. package/dist/swiper.cjs +1 -0
  380. package/dist/swiper.d.ts +1 -0
  381. package/dist/swiper.js +1 -0
  382. package/dist/switch.cjs +1 -0
  383. package/dist/switch.d.ts +1 -0
  384. package/dist/switch.js +1 -0
  385. package/dist/tab-picker.cjs +1 -0
  386. package/dist/tab-picker.d.ts +1 -0
  387. package/dist/tab-picker.js +1 -0
  388. package/dist/tabs.cjs +1 -0
  389. package/dist/tabs.d.ts +1 -0
  390. package/dist/tabs.js +1 -0
  391. package/dist/tag.cjs +1 -0
  392. package/dist/tag.d.ts +1 -0
  393. package/dist/tag.js +1 -0
  394. package/dist/textarea-item.cjs +1 -0
  395. package/dist/textarea-item.d.ts +1 -0
  396. package/dist/textarea-item.js +1 -0
  397. package/dist/tip.cjs +1 -0
  398. package/dist/tip.d.ts +1 -0
  399. package/dist/tip.js +1 -0
  400. package/dist/toast-ByIFvpMs.js +146 -0
  401. package/dist/toast-C1K2_cOo.cjs +1 -0
  402. package/dist/toast.cjs +1 -0
  403. package/dist/toast.d.ts +2 -0
  404. package/dist/toast.js +1 -0
  405. package/dist/transition.cjs +1 -0
  406. package/dist/transition.d.ts +1 -0
  407. package/dist/transition.js +1 -0
  408. package/dist/water-mark.cjs +1 -0
  409. package/dist/water-mark.d.ts +1 -0
  410. package/dist/water-mark.js +1 -0
  411. package/package.json +296 -3
@@ -0,0 +1,54 @@
1
+ import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderList as c, renderSlot as l, unref as u } from "vue";
2
+ // src/components/skeleton/Skeleton.vue?vue&type=script&setup=true&lang.ts
3
+ var d = {
4
+ key: 0,
5
+ class: "cu-skeleton"
6
+ }, f = { class: "cu-skeleton-content" }, p = { key: 1 }, m = "40%", h = "100%", g = /* @__PURE__ */ i({
7
+ __name: "Skeleton",
8
+ props: {
9
+ loading: {
10
+ type: Boolean,
11
+ default: !0
12
+ },
13
+ avatar: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ row: { default: 3 },
18
+ title: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ titleWidth: { default: m },
23
+ rowWidth: { default: h },
24
+ avatarSize: { default: "md" }
25
+ },
26
+ setup(i) {
27
+ let m = i;
28
+ function g(e) {
29
+ return typeof e == "number";
30
+ }
31
+ function _(e) {
32
+ let { rowWidth: t } = m;
33
+ return Array.isArray(t) ? t[e] == null ? h : g(t[e]) ? `${t[e]}%` : String(t[e]) : t ? g(t) ? `${t}%` : String(t) : h;
34
+ }
35
+ let v = g(m.titleWidth) ? `${m.titleWidth}%` : String(m.titleWidth);
36
+ return (m, h) => i.loading ? (s(), n("div", d, [i.avatar ? (s(), n("div", {
37
+ key: 0,
38
+ class: a({
39
+ "cu-skeleton-avatar": !0,
40
+ "cu-skeleton-avatar-large": i.avatarSize === "lg",
41
+ "cu-skeleton-avatar-small": i.avatarSize === "sm"
42
+ })
43
+ }, null, 2)) : t("", !0), r("div", f, [i.title ? (s(), n("h4", {
44
+ key: 0,
45
+ class: "cu-skeleton-title",
46
+ style: o({ width: u(v) })
47
+ }, null, 4)) : t("", !0), (s(!0), n(e, null, c(i.row, (e) => (s(), n("div", {
48
+ key: e,
49
+ class: "cu-skeleton-row",
50
+ style: o({ width: e === i.row ? "60%" : _(e - 1) })
51
+ }, null, 4))), 128))])])) : (s(), n("div", p, [l(m.$slots, "default")]));
52
+ }
53
+ });
54
+ export { g as t };
@@ -0,0 +1,100 @@
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, onBeforeUnmount as s, openBlock as c, ref as l, watch as u } from "vue";
2
+ // src/components/slider/Slider.vue?vue&type=script&setup=true&lang.ts
3
+ var d = ["data-hint"], f = ["data-hint"], p = ["data-hint"], m = /* @__PURE__ */ i({
4
+ name: "cu-slider",
5
+ __name: "Slider",
6
+ props: {
7
+ modelValue: { default: 0 },
8
+ min: { default: 0 },
9
+ max: { default: 100 },
10
+ step: { default: 1 },
11
+ range: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ format: {
16
+ type: Function,
17
+ default: void 0
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: !1
22
+ }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(i, { emit: m }) {
26
+ let h = i, g = m, _ = l(), v = l(!1), y = l(!1), b = l([h.min, h.max]), x = 0, S = 0, C = (e) => h.format?.(e) ?? e;
27
+ u(() => h.modelValue, (e) => {
28
+ (Array.isArray(e) && (e[0] !== b.value[0] || e[1] !== b.value[1]) || !Array.isArray(e) && e !== b.value[0]) && D(e);
29
+ }, { immediate: !0 }), u(() => h.disabled, (e) => {
30
+ e || M();
31
+ }), s(() => {
32
+ M();
33
+ });
34
+ let w = t(() => (b.value[0] - h.min) / (h.max - h.min) * 100), T = t(() => (b.value[1] - h.min) / (h.max - h.min) * 100), E = t(() => h.range ? {
35
+ width: (b.value[1] - b.value[0]) / (h.max - h.min) * 100 + "%",
36
+ left: w.value + "%"
37
+ } : { width: (b.value[0] - h.min) / (h.max - h.min) * 100 + "%" });
38
+ function D(e) {
39
+ let t = [void 0, void 0];
40
+ Array.isArray(e) ? (t[0] = e[0], t[1] = e[1]) : t[0] = e, t[0] = typeof t[0] == "number" ? Math.round((t[0] - h.min) / h.step) * h.step + h.min : b.value[0], t[1] = typeof t[1] == "number" ? Math.round((t[1] - h.min) / h.step) * h.step + h.min : b.value[1], t[0] < h.min && (t[0] = h.min), t[1] > h.max && (t[1] = h.max), t[0] > t[1] && (t[0] === b.value[0] ? t[1] = t[0] : t[0] = t[1]), (b.value[0] !== t[0] || b.value[1] !== t[1]) && (b.value = [t[0], t[1]], h.range ? g("update:modelValue", b.value) : g("update:modelValue", b.value[0]));
41
+ }
42
+ function O(e) {
43
+ h.disabled || (e.preventDefault(), e.stopPropagation(), x = ("changedTouches" in e ? e.changedTouches[0] : e).pageX, S = b.value[0], y.value = !1, v.value = !0, window.addEventListener("mousemove", A), window.addEventListener("touchmove", A, { passive: !1 }), window.addEventListener("mouseup", j), window.addEventListener("touchend", j));
44
+ }
45
+ function k(e) {
46
+ h.disabled || (e.preventDefault(), e.stopPropagation(), x = ("changedTouches" in e ? e.changedTouches[0] : e).pageX, S = b.value[1], y.value = !0, v.value = !0, window.addEventListener("mousemove", A), window.addEventListener("touchmove", A, { passive: !1 }), window.addEventListener("mouseup", j), window.addEventListener("touchend", j));
47
+ }
48
+ function A(e) {
49
+ if (h.disabled || (e.preventDefault(), e.stopPropagation(), !v.value)) return;
50
+ let t = "changedTouches" in e ? e.changedTouches[0] : e, n = _.value, r = n?.offsetWidth ?? 0;
51
+ n && r !== 0 && window.requestAnimationFrame(() => {
52
+ let e = (t.pageX - x) / r * (h.max - h.min), n = S + e;
53
+ v.value && (y.value ? D([null, n]) : D([n, null]));
54
+ });
55
+ }
56
+ function j(e) {
57
+ e.preventDefault(), e.stopPropagation(), M();
58
+ }
59
+ function M() {
60
+ v.value = !1, y.value = !1, window.removeEventListener("mousemove", A), window.removeEventListener("touchmove", A), window.removeEventListener("mouseup", j), window.removeEventListener("touchend", j);
61
+ }
62
+ return (t, s) => (c(), n("div", {
63
+ ref_key: "root",
64
+ ref: _,
65
+ class: a(["cu-slider", { "is-disabled": i.disabled }])
66
+ }, [i.range ? (c(), n(e, { key: 0 }, [
67
+ r("div", {
68
+ class: "cu-slider-bar",
69
+ style: o(E.value)
70
+ }, null, 4),
71
+ r("div", {
72
+ class: a(["cu-slider-handle is-lower", { "is-active": v.value && !y.value }]),
73
+ "data-hint": C(b.value[0]),
74
+ style: o({ left: w.value + "%" })
75
+ }, [r("span", {
76
+ onMousedown: O,
77
+ onTouchstart: O
78
+ }, null, 32)], 14, d),
79
+ r("div", {
80
+ class: a(["cu-slider-handle is-higher", { "is-active": v.value && y.value }]),
81
+ "data-hint": C(b.value[1]),
82
+ style: o({ left: T.value + "%" })
83
+ }, [r("span", {
84
+ onMousedown: k,
85
+ onTouchstart: k
86
+ }, null, 32)], 14, f)
87
+ ], 64)) : (c(), n(e, { key: 1 }, [r("div", {
88
+ class: "cu-slider-bar",
89
+ style: o(E.value)
90
+ }, null, 4), r("div", {
91
+ class: a(["cu-slider-handle", { "is-active": v.value }]),
92
+ "data-hint": C(b.value[0]),
93
+ style: o({ left: w.value + "%" })
94
+ }, [r("span", {
95
+ onMousedown: O,
96
+ onTouchstart: O
97
+ }, null, 32)], 14, p)], 64))], 2));
98
+ }
99
+ });
100
+ export { m as t };
@@ -0,0 +1 @@
1
+ let e=require("vue");var t=[`data-hint`],n=[`data-hint`],r=[`data-hint`],i=(0,e.defineComponent)({name:`cu-slider`,__name:`Slider`,props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},range:{type:Boolean,default:!1},format:{type:Function,default:void 0},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(i,{emit:a}){let o=i,s=a,c=(0,e.ref)(),l=(0,e.ref)(!1),u=(0,e.ref)(!1),d=(0,e.ref)([o.min,o.max]),f=0,p=0,m=e=>o.format?.(e)??e;(0,e.watch)(()=>o.modelValue,e=>{(Array.isArray(e)&&(e[0]!==d.value[0]||e[1]!==d.value[1])||!Array.isArray(e)&&e!==d.value[0])&&v(e)},{immediate:!0}),(0,e.watch)(()=>o.disabled,e=>{e||C()}),(0,e.onBeforeUnmount)(()=>{C()});let h=(0,e.computed)(()=>(d.value[0]-o.min)/(o.max-o.min)*100),g=(0,e.computed)(()=>(d.value[1]-o.min)/(o.max-o.min)*100),_=(0,e.computed)(()=>o.range?{width:(d.value[1]-d.value[0])/(o.max-o.min)*100+`%`,left:h.value+`%`}:{width:(d.value[0]-o.min)/(o.max-o.min)*100+`%`});function v(e){let t=[void 0,void 0];Array.isArray(e)?(t[0]=e[0],t[1]=e[1]):t[0]=e,t[0]=typeof t[0]==`number`?Math.round((t[0]-o.min)/o.step)*o.step+o.min:d.value[0],t[1]=typeof t[1]==`number`?Math.round((t[1]-o.min)/o.step)*o.step+o.min:d.value[1],t[0]<o.min&&(t[0]=o.min),t[1]>o.max&&(t[1]=o.max),t[0]>t[1]&&(t[0]===d.value[0]?t[1]=t[0]:t[0]=t[1]),(d.value[0]!==t[0]||d.value[1]!==t[1])&&(d.value=[t[0],t[1]],o.range?s(`update:modelValue`,d.value):s(`update:modelValue`,d.value[0]))}function y(e){o.disabled||(e.preventDefault(),e.stopPropagation(),f=(`changedTouches`in e?e.changedTouches[0]:e).pageX,p=d.value[0],u.value=!1,l.value=!0,window.addEventListener(`mousemove`,x),window.addEventListener(`touchmove`,x,{passive:!1}),window.addEventListener(`mouseup`,S),window.addEventListener(`touchend`,S))}function b(e){o.disabled||(e.preventDefault(),e.stopPropagation(),f=(`changedTouches`in e?e.changedTouches[0]:e).pageX,p=d.value[1],u.value=!0,l.value=!0,window.addEventListener(`mousemove`,x),window.addEventListener(`touchmove`,x,{passive:!1}),window.addEventListener(`mouseup`,S),window.addEventListener(`touchend`,S))}function x(e){if(o.disabled||(e.preventDefault(),e.stopPropagation(),!l.value))return;let t=`changedTouches`in e?e.changedTouches[0]:e,n=c.value,r=n?.offsetWidth??0;n&&r!==0&&window.requestAnimationFrame(()=>{let e=(t.pageX-f)/r*(o.max-o.min),n=p+e;l.value&&(u.value?v([null,n]):v([n,null]))})}function S(e){e.preventDefault(),e.stopPropagation(),C()}function C(){l.value=!1,u.value=!1,window.removeEventListener(`mousemove`,x),window.removeEventListener(`touchmove`,x),window.removeEventListener(`mouseup`,S),window.removeEventListener(`touchend`,S)}return(a,o)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`root`,ref:c,class:(0,e.normalizeClass)([`cu-slider`,{"is-disabled":i.disabled}])},[i.range?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createElementVNode)(`div`,{class:`cu-slider-bar`,style:(0,e.normalizeStyle)(_.value)},null,4),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-slider-handle is-lower`,{"is-active":l.value&&!u.value}]),"data-hint":m(d.value[0]),style:(0,e.normalizeStyle)({left:h.value+`%`})},[(0,e.createElementVNode)(`span`,{onMousedown:y,onTouchstart:y},null,32)],14,t),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-slider-handle is-higher`,{"is-active":l.value&&u.value}]),"data-hint":m(d.value[1]),style:(0,e.normalizeStyle)({left:g.value+`%`})},[(0,e.createElementVNode)(`span`,{onMousedown:b,onTouchstart:b},null,32)],14,n)],64)):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createElementVNode)(`div`,{class:`cu-slider-bar`,style:(0,e.normalizeStyle)(_.value)},null,4),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-slider-handle`,{"is-active":l.value}]),"data-hint":m(d.value[0]),style:(0,e.normalizeStyle)({left:h.value+`%`})},[(0,e.createElementVNode)(`span`,{onMousedown:y,onTouchstart:y},null,32)],14,r)],64))],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
@@ -0,0 +1,137 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, onMounted as a, openBlock as o, ref as s, watch as c } from "vue";
2
+ import { warn as l } from "@centui/core";
3
+ // src/components/stepper/Stepper.vue?vue&type=script&setup=true&lang.ts
4
+ var u = { class: "cu-stepper-number" }, d = [
5
+ "type",
6
+ "size",
7
+ "value",
8
+ "readonly"
9
+ ], f = "减少", p = "增加", m = /* @__PURE__ */ r({
10
+ name: "cu-stepper",
11
+ __name: "Stepper",
12
+ props: {
13
+ defaultValue: { default: 0 },
14
+ modelValue: { default: 0 },
15
+ step: { default: 1 },
16
+ min: { default: -Number.MAX_VALUE },
17
+ max: { default: Number.MAX_VALUE },
18
+ disabled: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ readOnly: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ isInteger: {
27
+ type: Boolean,
28
+ default: !1
29
+ }
30
+ },
31
+ emits: [
32
+ "update:modelValue",
33
+ "change",
34
+ "increase",
35
+ "decrease"
36
+ ],
37
+ setup(r, { emit: m }) {
38
+ let h = r, g = m;
39
+ function _(e) {
40
+ try {
41
+ return e.toString().split(".")[1].length;
42
+ } catch {
43
+ return 0;
44
+ }
45
+ }
46
+ function v(e, t) {
47
+ let n = Number(e), r = Number(t), i = _(e), a = _(t), o = 10 ** Math.max(i, a);
48
+ return +((n * o + r * o) / o);
49
+ }
50
+ function y(e, t) {
51
+ let n = Number(e), r = Number(t), i = _(e), a = _(t), o = 10 ** Math.max(i, a), s = i >= a ? i : a;
52
+ return +((n * o - r * o) / o).toFixed(s);
53
+ }
54
+ let b = s(!1), x = s(!1), S = s(!1), C = s(0);
55
+ C.value = O(h.modelValue || h.defaultValue);
56
+ let w = e(() => {
57
+ if (!h.modelValue) return 2;
58
+ let e = h.modelValue.toString().length;
59
+ return e > 2 ? e : 2;
60
+ });
61
+ c(() => h.defaultValue, (e) => {
62
+ C.value = O(e);
63
+ }), c(() => h.modelValue, (e) => {
64
+ S.value || (C.value = O(e));
65
+ }), c(() => h.min, (e) => {
66
+ let t = Number(e);
67
+ C.value < t && (C.value = t), k();
68
+ }), c(() => h.max, (e) => {
69
+ let t = Number(e);
70
+ C.value > t && (C.value = t), k();
71
+ }), c(C, (e, t) => {
72
+ let n = Math.min(Math.max(e, Number(h.min)), Number(h.max));
73
+ if (n !== e) {
74
+ C.value = n;
75
+ return;
76
+ }
77
+ k(), e !== h.modelValue && (g("update:modelValue", e), g("change", e));
78
+ let r = e - t;
79
+ r > 0 ? g("increase", r) : r < 0 && g("decrease", Math.abs(r));
80
+ }), a(() => {
81
+ A(), k();
82
+ });
83
+ function T() {
84
+ h.disabled || b.value || (C.value = y(C.value, h.step), N());
85
+ }
86
+ function E() {
87
+ h.disabled || x.value || (C.value = v(C.value, h.step), N());
88
+ }
89
+ function D(e) {
90
+ let t = String(e).replace(/[^0-9.-]|^-|^\./g, "");
91
+ return t === "" ? 0 : h.isInteger ? Math.floor(Number(t)) : +t;
92
+ }
93
+ function O(e) {
94
+ return Math.max(Math.min(Number(h.max), D(e)), Number(h.min));
95
+ }
96
+ function k() {
97
+ b.value = C.value <= Number(h.min), x.value = C.value >= Number(h.max);
98
+ }
99
+ function A() {
100
+ return Number(h.min) > Number(h.max) && l("[cu-vue-stepper] minNum is larger than maxNum"), Number(h.max) > Number(h.min);
101
+ }
102
+ function j(e) {
103
+ let t = e.target, { value: n } = t, r = D(n);
104
+ +n !== r && (t.value = String(r)), C.value = r;
105
+ }
106
+ function M() {
107
+ S.value = !0;
108
+ }
109
+ function N() {
110
+ S.value = !1, C.value = O(C.value);
111
+ }
112
+ return (e, a) => (o(), t("div", { class: i(["cu-stepper", { disabled: r.disabled }]) }, [
113
+ n("div", {
114
+ class: i(["cu-stepper-button cu-stepper-button-reduce", { disabled: b.value }]),
115
+ role: "button",
116
+ "aria-label": f,
117
+ onClick: T
118
+ }, null, 2),
119
+ n("div", u, [n("input", {
120
+ type: r.isInteger ? "tel" : "number",
121
+ size: w.value,
122
+ value: C.value,
123
+ readonly: r.readOnly,
124
+ onInput: j,
125
+ onFocus: M,
126
+ onBlur: N
127
+ }, null, 40, d)]),
128
+ n("div", {
129
+ class: i(["cu-stepper-button cu-stepper-button-add", { disabled: x.value }]),
130
+ role: "button",
131
+ "aria-label": p,
132
+ onClick: E
133
+ }, null, 2)
134
+ ], 2));
135
+ }
136
+ });
137
+ export { m as t };
@@ -0,0 +1 @@
1
+ let e=require("vue"),t=require("@centui/core");var n={class:`cu-stepper-number`},r=[`type`,`size`,`value`,`readonly`],i=`减少`,a=`增加`,o=(0,e.defineComponent)({name:`cu-stepper`,__name:`Stepper`,props:{defaultValue:{default:0},modelValue:{default:0},step:{default:1},min:{default:-Number.MAX_VALUE},max:{default:Number.MAX_VALUE},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},isInteger:{type:Boolean,default:!1}},emits:[`update:modelValue`,`change`,`increase`,`decrease`],setup(o,{emit:s}){let c=o,l=s;function u(e){try{return e.toString().split(`.`)[1].length}catch{return 0}}function d(e,t){let n=Number(e),r=Number(t),i=u(e),a=u(t),o=10**Math.max(i,a);return+((n*o+r*o)/o)}function f(e,t){let n=Number(e),r=Number(t),i=u(e),a=u(t),o=10**Math.max(i,a),s=i>=a?i:a;return+((n*o-r*o)/o).toFixed(s)}let p=(0,e.ref)(!1),m=(0,e.ref)(!1),h=(0,e.ref)(!1),g=(0,e.ref)(0);g.value=x(c.modelValue||c.defaultValue);let _=(0,e.computed)(()=>{if(!c.modelValue)return 2;let e=c.modelValue.toString().length;return e>2?e:2});(0,e.watch)(()=>c.defaultValue,e=>{g.value=x(e)}),(0,e.watch)(()=>c.modelValue,e=>{h.value||(g.value=x(e))}),(0,e.watch)(()=>c.min,e=>{let t=Number(e);g.value<t&&(g.value=t),S()}),(0,e.watch)(()=>c.max,e=>{let t=Number(e);g.value>t&&(g.value=t),S()}),(0,e.watch)(g,(e,t)=>{let n=Math.min(Math.max(e,Number(c.min)),Number(c.max));if(n!==e){g.value=n;return}S(),e!==c.modelValue&&(l(`update:modelValue`,e),l(`change`,e));let r=e-t;r>0?l(`increase`,r):r<0&&l(`decrease`,Math.abs(r))}),(0,e.onMounted)(()=>{C(),S()});function v(){c.disabled||p.value||(g.value=f(g.value,c.step),E())}function y(){c.disabled||m.value||(g.value=d(g.value,c.step),E())}function b(e){let t=String(e).replace(/[^0-9.-]|^-|^\./g,``);return t===``?0:c.isInteger?Math.floor(Number(t)):+t}function x(e){return Math.max(Math.min(Number(c.max),b(e)),Number(c.min))}function S(){p.value=g.value<=Number(c.min),m.value=g.value>=Number(c.max)}function C(){return Number(c.min)>Number(c.max)&&(0,t.warn)(`[cu-vue-stepper] minNum is larger than maxNum`),Number(c.max)>Number(c.min)}function w(e){let t=e.target,{value:n}=t,r=b(n);+n!==r&&(t.value=String(r)),g.value=r}function T(){h.value=!0}function E(){h.value=!1,g.value=x(g.value)}return(t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`cu-stepper`,{disabled:o.disabled}])},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-stepper-button cu-stepper-button-reduce`,{disabled:p.value}]),role:`button`,"aria-label":i,onClick:v},null,2),(0,e.createElementVNode)(`div`,n,[(0,e.createElementVNode)(`input`,{type:o.isInteger?`tel`:`number`,size:_.value,value:g.value,readonly:o.readOnly,onInput:w,onFocus:T,onBlur:E},null,40,r)]),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-stepper-button cu-stepper-button-add`,{disabled:m.value}]),role:`button`,"aria-label":a,onClick:y},null,2)],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,157 @@
1
+ import { t as e } from "./Icon-BgCtu0ZV.js";
2
+ import { Fragment as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, nextTick as s, normalizeClass as c, normalizeStyle as l, onBeforeUnmount as u, onMounted as d, onUpdated as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, watch as v } from "vue";
3
+ // src/components/steps/Steps.vue?vue&type=script&setup=true&lang.ts
4
+ var y = {
5
+ key: 0,
6
+ class: "icon-wrapper"
7
+ }, b = {
8
+ key: 1,
9
+ class: "icon-wrapper"
10
+ }, x = {
11
+ key: 1,
12
+ class: "step-node-default"
13
+ }, S = {
14
+ key: 1,
15
+ class: "step-node-default"
16
+ }, C = { class: "text-wrapper" }, w = { class: "name" }, T = {
17
+ key: 0,
18
+ class: "desc"
19
+ }, E = .3, D = /* @__PURE__ */ o({
20
+ name: "cu-steps",
21
+ __name: "Steps",
22
+ props: {
23
+ steps: { default: () => [] },
24
+ current: { default: 0 },
25
+ direction: { default: "horizontal" },
26
+ transition: {
27
+ type: Boolean,
28
+ default: !1
29
+ },
30
+ verticalAdaptive: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ custom: {
35
+ type: Boolean,
36
+ default: !1
37
+ }
38
+ },
39
+ setup(o) {
40
+ let D = o, O = m(), k = m(!1), A = m([]), j = m([]), M = m(0), N = null, P = [], F = () => {
41
+ P.forEach(clearTimeout), P = [];
42
+ }, I = (e) => {
43
+ let t = A.value[e];
44
+ return t ? {
45
+ transform: `translate3d${D.direction === "horizontal" ? `(${(t.len - 1) * 100}%, 0, 0)` : `(0, ${(t.len - 1) * 100}%, 0)`}`,
46
+ transition: `all ${t.time}s linear`
47
+ } : {};
48
+ };
49
+ v(() => D.current, (e, t) => {
50
+ let n = B(e), r = V(n);
51
+ if (D.transition) {
52
+ let e = n >= t;
53
+ N && clearTimeout(N), F(), N = setTimeout(() => {
54
+ N = null, H(r, e, (t) => {
55
+ (e && t > M.value || !e && t < M.value) && (M.value = t);
56
+ });
57
+ }, 100);
58
+ } else A.value = r, M.value = n;
59
+ }), v(() => D.steps.length, () => {
60
+ A.value = V(M.value);
61
+ });
62
+ {
63
+ let e = B(D.current);
64
+ M.value = e, A.value = V(e);
65
+ }
66
+ u(() => {
67
+ N &&= (clearTimeout(N), null), F();
68
+ }), d(() => {
69
+ L(), k.value = !0;
70
+ }), f(() => {
71
+ s(() => {
72
+ L();
73
+ });
74
+ });
75
+ function L() {
76
+ if (D.direction !== "vertical" || D.verticalAdaptive) return;
77
+ let e = O.value;
78
+ if (!e) return;
79
+ let t = e.querySelectorAll(".icon-wrapper"), n = e.querySelectorAll(".text-wrapper"), r = Array.from(n).map((e, r) => {
80
+ let i = e.clientHeight, a = t[r]?.clientHeight ?? 0;
81
+ return r === n.length - 1 ? i -= a : i += 40, i > 0 ? i : 0;
82
+ });
83
+ r.toString() !== j.value.toString() && (j.value = r);
84
+ }
85
+ function R(e) {
86
+ let t = D.direction === "vertical" && !D.verticalAdaptive ? j.value[e] : 0;
87
+ return t ? { height: `${t}px` } : null;
88
+ }
89
+ function z(e) {
90
+ let t = M.value, n = [];
91
+ return e < t && n.push("reached"), e === Math.floor(t) && n.push("current"), n.join(" ");
92
+ }
93
+ function B(e) {
94
+ return e < 0 ? 0 : e > D.steps.length - 1 ? D.steps.length - 1 : e;
95
+ }
96
+ function V(e) {
97
+ return D.steps.slice(0, D.steps.length - 1).map((t, n) => {
98
+ let r = e - n, i = A.value[n], a = i === void 0, o;
99
+ o = r <= 0 ? 0 : r >= 1 ? 1 : r;
100
+ let s = (a ? o : Math.abs(i.len - o)) * E;
101
+ return {
102
+ len: o,
103
+ time: s
104
+ };
105
+ });
106
+ }
107
+ function H(e, t, n) {
108
+ let r = t ? 0 : M.value, i = (a) => {
109
+ a < e.length && a > -1 && e[a] && (t ? r += e[a].len : r -= A.value[a].len - e[a].len, P.push(setTimeout(() => {
110
+ i(t ? a + 1 : a - 1), n(r);
111
+ }, e[a].time * 1e3))), A.value[a] = e[a];
112
+ };
113
+ i(t ? 0 : e.length - 1);
114
+ }
115
+ return (s, u) => (p(), i("div", {
116
+ ref_key: "root",
117
+ ref: O,
118
+ class: c(["cu-steps", {
119
+ "cu-steps-vertical": o.direction === "vertical",
120
+ "cu-steps-horizontal": o.direction === "horizontal",
121
+ "vertical-adaptive": o.direction === "vertical" && o.verticalAdaptive,
122
+ "no-current": M.value % 1 != 0
123
+ }])
124
+ }, [o.custom ? g(s.$slots, "default", { steps: o.steps }, void 0, void 0, 0) : (p(!0), i(t, { key: 1 }, h(o.steps, (d, f) => (p(), i(t, { key: `steps-${f}` }, [a("div", { class: c(["step-wrapper", z(f)]) }, [s.$slots.icon ? (p(), i("div", y, [g(s.$slots, "icon", {
125
+ index: f,
126
+ currentIndex: M.value
127
+ })])) : (p(), i("div", b, [f < M.value ? (p(), i(t, { key: 0 }, [s.$slots.reached ? g(s.$slots, "reached", { index: f }, void 0, void 0, 0) : (p(), i("div", x, [...u[0] ||= [a("div", {
128
+ class: "step-node-default-icon",
129
+ style: {
130
+ width: "6px",
131
+ height: "6px",
132
+ "border-radius": "50%"
133
+ }
134
+ }, null, -1)]]))], 64)) : f === M.value ? (p(), i(t, { key: 1 }, [s.$slots.current ? g(s.$slots, "current", { index: f }, void 0, void 0, 0) : (p(), n(e, {
135
+ key: 1,
136
+ name: "success"
137
+ }))], 64)) : (p(), i(t, { key: 2 }, [s.$slots.unreached ? g(s.$slots, "unreached", { index: f }, void 0, void 0, 0) : (p(), i("div", S, [...u[1] ||= [a("div", {
138
+ class: "step-node-default-icon",
139
+ style: {
140
+ width: "6px",
141
+ height: "6px",
142
+ "border-radius": "50%"
143
+ }
144
+ }, null, -1)]]))], 64))])), a("div", C, [s.$slots.content ? g(s.$slots, "content", {
145
+ index: f,
146
+ step: d
147
+ }, void 0, void 0, 0) : (p(), i(t, { key: 1 }, [a("div", w, _(d.name), 1), d.text ? (p(), i("div", T, _(d.text), 1)) : r("", !0)], 64))])], 2), a("div", {
148
+ class: c(["bar", [o.direction === "horizontal" ? "horizontal-bar" : "vertical-bar"]]),
149
+ style: l(R(f))
150
+ }, [A.value[f] ? (p(), i("i", {
151
+ key: 0,
152
+ class: "bar-inner",
153
+ style: l(I(f))
154
+ }, null, 4)) : r("", !0)], 6)], 64))), 128))], 2));
155
+ }
156
+ });
157
+ export { D as t };
@@ -0,0 +1 @@
1
+ const e=require("./Icon-83WWqE5z.cjs");let t=require("vue");var n={key:0,class:`icon-wrapper`},r={key:1,class:`icon-wrapper`},i={key:1,class:`step-node-default`},a={key:1,class:`step-node-default`},o={class:`text-wrapper`},s={class:`name`},c={key:0,class:`desc`},l=.3,u=(0,t.defineComponent)({name:`cu-steps`,__name:`Steps`,props:{steps:{default:()=>[]},current:{default:0},direction:{default:`horizontal`},transition:{type:Boolean,default:!1},verticalAdaptive:{type:Boolean,default:!1},custom:{type:Boolean,default:!1}},setup(u){let d=u,f=(0,t.ref)(),p=(0,t.ref)(!1),m=(0,t.ref)([]),h=(0,t.ref)([]),g=(0,t.ref)(0),_=null,v=[],y=()=>{v.forEach(clearTimeout),v=[]},b=e=>{let t=m.value[e];return t?{transform:`translate3d${d.direction===`horizontal`?`(${(t.len-1)*100}%, 0, 0)`:`(0, ${(t.len-1)*100}%, 0)`}`,transition:`all ${t.time}s linear`}:{}};(0,t.watch)(()=>d.current,(e,t)=>{let n=w(e),r=T(n);if(d.transition){let e=n>=t;_&&clearTimeout(_),y(),_=setTimeout(()=>{_=null,E(r,e,t=>{(e&&t>g.value||!e&&t<g.value)&&(g.value=t)})},100)}else m.value=r,g.value=n}),(0,t.watch)(()=>d.steps.length,()=>{m.value=T(g.value)});{let e=w(d.current);g.value=e,m.value=T(e)}(0,t.onBeforeUnmount)(()=>{_&&=(clearTimeout(_),null),y()}),(0,t.onMounted)(()=>{x(),p.value=!0}),(0,t.onUpdated)(()=>{(0,t.nextTick)(()=>{x()})});function x(){if(d.direction!==`vertical`||d.verticalAdaptive)return;let e=f.value;if(!e)return;let t=e.querySelectorAll(`.icon-wrapper`),n=e.querySelectorAll(`.text-wrapper`),r=Array.from(n).map((e,r)=>{let i=e.clientHeight,a=t[r]?.clientHeight??0;return r===n.length-1?i-=a:i+=40,i>0?i:0});r.toString()!==h.value.toString()&&(h.value=r)}function S(e){let t=d.direction===`vertical`&&!d.verticalAdaptive?h.value[e]:0;return t?{height:`${t}px`}:null}function C(e){let t=g.value,n=[];return e<t&&n.push(`reached`),e===Math.floor(t)&&n.push(`current`),n.join(` `)}function w(e){return e<0?0:e>d.steps.length-1?d.steps.length-1:e}function T(e){return d.steps.slice(0,d.steps.length-1).map((t,n)=>{let r=e-n,i=m.value[n],a=i===void 0,o;o=r<=0?0:r>=1?1:r;let s=(a?o:Math.abs(i.len-o))*l;return{len:o,time:s}})}function E(e,t,n){let r=t?0:g.value,i=a=>{a<e.length&&a>-1&&e[a]&&(t?r+=e[a].len:r-=m.value[a].len-e[a].len,v.push(setTimeout(()=>{i(t?a+1:a-1),n(r)},e[a].time*1e3))),m.value[a]=e[a]};i(t?0:e.length-1)}return(l,d)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`root`,ref:f,class:(0,t.normalizeClass)([`cu-steps`,{"cu-steps-vertical":u.direction===`vertical`,"cu-steps-horizontal":u.direction===`horizontal`,"vertical-adaptive":u.direction===`vertical`&&u.verticalAdaptive,"no-current":g.value%1!=0}])},[u.custom?(0,t.renderSlot)(l.$slots,`default`,{steps:u.steps},void 0,void 0,0):((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:1},(0,t.renderList)(u.steps,(f,p)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:`steps-${p}`},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`step-wrapper`,C(p)])},[l.$slots.icon?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,n,[(0,t.renderSlot)(l.$slots,`icon`,{index:p,currentIndex:g.value})])):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[p<g.value?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[l.$slots.reached?(0,t.renderSlot)(l.$slots,`reached`,{index:p},void 0,void 0,0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,i,[...d[0]||=[(0,t.createElementVNode)(`div`,{class:`step-node-default-icon`,style:{width:`6px`,height:`6px`,"border-radius":`50%`}},null,-1)]]))],64)):p===g.value?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[l.$slots.current?(0,t.renderSlot)(l.$slots,`current`,{index:p},void 0,void 0,0):((0,t.openBlock)(),(0,t.createBlock)(e.t,{key:1,name:`success`}))],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[l.$slots.unreached?(0,t.renderSlot)(l.$slots,`unreached`,{index:p},void 0,void 0,0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,a,[...d[1]||=[(0,t.createElementVNode)(`div`,{class:`step-node-default-icon`,style:{width:`6px`,height:`6px`,"border-radius":`50%`}},null,-1)]]))],64))])),(0,t.createElementVNode)(`div`,o,[l.$slots.content?(0,t.renderSlot)(l.$slots,`content`,{index:p,step:f},void 0,void 0,0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createElementVNode)(`div`,s,(0,t.toDisplayString)(f.name),1),f.text?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,c,(0,t.toDisplayString)(f.text),1)):(0,t.createCommentVNode)(``,!0)],64))])],2),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`bar`,[u.direction===`horizontal`?`horizontal-bar`:`vertical-bar`]]),style:(0,t.normalizeStyle)(S(p))},[m.value[p]?((0,t.openBlock)(),(0,t.createElementBlock)(`i`,{key:0,class:`bar-inner`,style:(0,t.normalizeStyle)(b(p))},null,4)):(0,t.createCommentVNode)(``,!0)],6)],64))),128))],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
@@ -0,0 +1 @@
1
+ let e=require("vue"),t=require("@centui/core"),n=require("@centui/core/web");var r=.5,i=300,a=(0,e.defineComponent)({name:`cu-swiper`,__name:`Swiper`,props:{autoplay:{default:3e3},transition:{default:`slide`},transitionDuration:{default:250},defaultIndex:{default:0},hasDots:{type:Boolean,default:!0},isPrevent:{type:Boolean,default:!0},isLoop:{type:Boolean,default:!0},dragable:{type:Boolean,default:!0},useNativeDriver:{type:Boolean,default:!0}},emits:[`beforeChange`,`afterChange`],setup(a,{expose:o,emit:s}){let c=typeof process<`u`&&process.env.MAND_ENV===`test`,l=a,u=s,d=(0,e.useSlots)(),f=(0,e.ref)(),ee=(0,e.ref)(),p=(0,e.ref)(),m=(0,e.ref)(!1),h=(0,e.ref)(!1),g=(0,e.ref)(!1),_=(0,e.ref)(0),v=(0,e.ref)(0),y=(0,e.ref)(0),b=(0,e.ref)(0),x=(0,e.ref)(0),S=(0,e.ref)(0),C=(0,e.ref)(0),w=(0,e.ref)(0),T=(0,e.ref)(0),E=(0,e.ref)(!1),D=(0,e.ref)(!0),O=(0,e.ref)(null),te=(0,e.ref)(!1),k={},A=null,j=null,M=null,N=null,P=!1,F=null,I=null,L=[];function ne(e){L.push(e),m.value&&ie()}function re(e){let t=L.indexOf(e);t>=0&&L.splice(t,1),m.value&&ie()}let ie=(0,t.debounce)(()=>{P||(0,e.nextTick)(()=>{P||(Y(),J(),D.value||$(_.value))})},50);(0,e.provide)(`mdSwiper`,{dimension:()=>T.value,isVertical:()=>z.value,register:ne,unregister:re}),(0,e.watch)(()=>l.autoplay,e=>{_.value=e},{immediate:!0});let ae=(0,e.computed)(()=>v.value===w.value-1),oe=(0,e.computed)(()=>v.value===0),se=(0,e.computed)(()=>Te()),R=(0,e.computed)(()=>l.transition.toLowerCase().includes(`slide`)),z=(0,e.computed)(()=>l.transition===`slideY`),ce=(0,e.computed)(()=>{let t=(d.default?.()??[]).filter(e=>e.type!==Symbol.for(`v-cmt`));return!B.value||t.length<2?null:(0,e.cloneVNode)(t[0],{class:`cu-swiper-item-first-copy`,style:H.value,isCopy:!0})}),le=(0,e.computed)(()=>{let t=(d.default?.()??[]).filter(e=>e.type!==Symbol.for(`v-cmt`));return!B.value||t.length<2?null:(0,e.cloneVNode)(t[t.length-1],{class:`cu-swiper-item-last-copy`,style:H.value,isCopy:!0})}),B=(0,e.computed)(()=>R.value&&g.value),V=e=>e.vnode;V.props=[`vnode`];let H=(0,e.computed)(()=>z.value?{height:`${T.value}px`}:{width:`${T.value}px`});(0,e.onMounted)(()=>{W()}),(0,e.onActivated)(()=>{W()}),(0,e.onDeactivated)(()=>{G()}),(0,e.onBeforeUnmount)(()=>{P=!0,M=null,F&&=(clearTimeout(F),null),I&&=(clearTimeout(I),null),G()});function U(){N&&clearTimeout(N);let e=v.value;N=setTimeout(()=>{J(e)},300)}function W(){m.value=!0,(0,e.nextTick)(()=>{J(),$(_.value),window.addEventListener(`resize`,U)})}function G(){m.value=!1,Y(),window.removeEventListener(`resize`,U),N&&clearTimeout(N)}function ue(){T.value=z.value?f.value?.clientHeight??0:f.value?.clientWidth??0}function de(){let e=new n.Scroller((e,t)=>{(0,n.render)(p.value,e,t,1,l.useNativeDriver)},{scrollingY:z.value,scrollingX:!z.value,snapping:!1,bouncing:!1,animationDuration:l.transitionDuration,scrollingComplete:()=>{M&&M()}}),t=ee.value;if(!t)return;let r=z.value?t.clientWidth:t.clientWidth*w.value,i=z.value?t.clientHeight*w.value:t.clientHeight;e.setPosition(t.clientLeft,t.clientTop),e.setDimensions(t.clientWidth,t.clientHeight,r,i),O.value=e}function fe(){L.length>1&&l.isLoop&&(x.value++,S.value++,v.value++,te.value=!0)}function K(e,n,r=!0){if(!e){(0,t.warn)(`[cu-swiper] no element for translate`);return}let i=z.value?0:-n,a=z.value?-n:0;O.value?.scrollTo(i,a,r)}function q(e=!0,t){let n=L;if(!n||!n.length)return;if(t!==void 0){let r=0,i=b.value,a=w.value;t>0?i>0?r=i-1:i===0&&(r=a-1):i<a-1?r=i+1:i===a-1&&(r=0);let o=n[i]?.$el,s=n[r]?.$el;if(!o||!s)return;o.style.opacity=String(1-Math.abs(t)),o.style.transition=e?`opacity 300ms ease`:``,s.style.opacity=String(Math.abs(t));return}let r=n[y.value]?.$el,i=n[b.value]?.$el;r&&i&&(r.style.opacity=`0`,r.style.transition=e?`opacity 500ms ease`:``,i.style.opacity=`1`,e&&(I&&clearTimeout(I),I=setTimeout(()=>{I=null,P||u(`afterChange`,y.value,b.value)},500)))}function pe(e,t){C.value=e,w.value=e+(l.isLoop&&R.value&&e>1?2:0),te.value=!1,E.value=e===1||!l.dragable,v.value=t===void 0?l.defaultIndex>=0&&l.defaultIndex<e?parseInt(String(l.defaultIndex)):0:X(t),x.value=0,S.value=e-1,y.value=v.value===x.value?S.value:v.value===S.value?x.value:v.value+1,b.value=v.value}function J(e){let t=L.length;t&&(ue(),pe(t,e),R.value?(fe(),de(),K(p.value,-T.value*v.value,!1)):q(!1),g.value=!0)}function me(){_.value>0&&C.value>1&&(Y(),j=setInterval(()=>{if(!l.isLoop&&v.value>=w.value-1)return Y();h.value||Se()},_.value))}function Y(){j&&=(clearInterval(j),null)}function he(e,t){let n=z.value,{currentLeft:r,currentTop:i,startLeft:a,startTop:o}=k;if(A===null){if(!n&&i===o||n&&r===a)return!1;if(e*e+t*t>=25){let r=Math.atan2(Math.abs(t),Math.abs(e))*180/Math.PI;return n?90-r>45:r>45}return!1}return A}function X(e){return l.isLoop&&R.value&&C.value>0?e-1<0?C.value-1:e-1>C.value-1?0:e-1:e}function ge(e){return e<0?e=0:C.value>0&&e>C.value-1&&(e=C.value-1),l.isLoop&&R.value?e+1:e}function Z(e,t){if(C.value===0||!t&&C.value<2)return;let n=v.value,r=w.value,i=v.value;e&&(t&&t.index!==void 0?v.value=t.index:e===`prev`?n>0?v.value=n-1:(!R.value&&n===0||l.isLoop&&n===0)&&(v.value=r-1):e===`next`&&(n<r-1?v.value=n+1:!R.value&&n===r-1?v.value=0:l.isLoop&&n===r-1&&(v.value=1)),l.isLoop&&R.value?(y.value=X(i),b.value=X(v.value)):(y.value=b.value,b.value=v.value),u(`beforeChange`,y.value,b.value),R.value?(F&&clearTimeout(F),F=setTimeout(()=>{if(F=null,P)return;let e=oe.value&&l.isLoop,t=ae.value&&l.isLoop;M=()=>{if(t){let e=z.value?0:x.value*T.value,t=z.value?x.value*T.value:0;O.value?.scrollTo(e,t,!1)}if(e){let e=z.value?0:S.value*T.value,t=z.value?S.value*T.value:0;O.value?.scrollTo(e,t,!1)}u(`afterChange`,y.value,b.value),M=null},K(p.value,-T.value*v.value),e?v.value=S.value:t&&(v.value=x.value)},10)):q())}function _e(e){if(E.value)return;Ee();let t=e,n=t.changedTouches?.[0]??t.touches?.[0]??t.targetTouches?.[0]??t;k={},k.startTime=new Date,k.startLeft=n.pageX,k.startTop=n.pageY,k.itemWidth=c?100:f.value?.offsetWidth??0,k.itemHeight=c?100:f.value?.offsetHeight??0}function ve(e){if(E.value)return;let t=e,n=t.changedTouches?.[0]??t.touches?.[0]??t.targetTouches?.[0]??t;k.currentLeft=n.pageX,k.currentTop=n.pageY;let r=Number(k.currentLeft)-Number(k.startLeft),i=Number(k.currentTop)-Number(k.startTop);if(A=he(Math.abs(r),Math.abs(i)),A)return;e.preventDefault();let a=Number(k.itemWidth),o=Number(k.itemHeight),s=Math.min(Math.max(-a+1,r),a-1),c=Math.min(Math.max(-o+1,i),o-1),l=z.value?c-o*v.value:s-a*v.value;R.value?K(p.value,l,!1):q(!1,r/a)}function ye(){if(E.value)return;let e=Number(new Date)-Number(k.startTime),t=Number(k.currentLeft)-Number(k.startLeft),n=Number(k.currentTop)-Number(k.startTop),a=Number(k.itemWidth),o=Number(k.itemHeight),s=v.value,c=w.value,u=e<i,d=null;u&&k.currentLeft===void 0||(z.value?Math.abs(n)>o*r||u?d=n<0?`next`:`prev`:K(p.value,-T.value*s,!0):Math.abs(t)>a*r||u?d=t<0?`next`:`prev`:R.value?K(p.value,-T.value*s,!0):q(!0,0),l.isLoop||(s===0&&d===`prev`||s===c-1&&d===`next`)&&(d=null),Z(d),k={}),$(_.value)}function be(e){M&&M(),l.isPrevent&&e.preventDefault(),h.value=!0,A=null,_e(e)}function xe(e){l.isPrevent&&e.preventDefault(),h.value&&ve(e)}function Q(e){l.isPrevent&&e.preventDefault(),A?($(_.value),h.value=!1,k={}):h.value&&=(ye(),!1)}function Se(){Z(`next`)}function Ce(){Z(`prev`)}function we(e){if(isNaN(e))return;e=parseInt(String(e));let t=ge(e);Z(t>v.value?`next`:`prev`,{index:t}),$(_.value)}function Te(){return X(v.value)}function $(e=3e3){Y(),e<500||(_.value=e||l.autoplay,me(),D.value=!1)}function Ee(){Y(),D.value=!0}return o({next:Se,prev:Ce,goto:we,getIndex:Te,play:$,stop:Ee,index:v,rItemCount:w,oItemCount:C}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`root`,ref:f,class:(0,e.normalizeClass)([`cu-swiper`,{"cu-swiper-vertical":z.value,"cu-swiper-fade":!R.value,disabled:!g.value}]),onMousedown:be,onMousemove:xe,onMouseup:Q,onMouseleave:Q,onTouchstart:be,onTouchmove:xe,onTouchend:Q,onTouchcancel:Q},[(0,e.createElementVNode)(`div`,{ref_key:`swiperBox`,ref:ee,class:`cu-swiper-box`},[(0,e.createElementVNode)(`div`,{ref_key:`swiper`,ref:p,class:`cu-swiper-container`},[B.value&&t.$slots.default?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[le.value?((0,e.openBlock)(),(0,e.createBlock)(V,{key:0,vnode:le.value},null,8,[`vnode`])):(0,e.createCommentVNode)(``,!0)],64)):(0,e.createCommentVNode)(``,!0),(0,e.renderSlot)(t.$slots,`default`),B.value&&t.$slots.default?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[ce.value?((0,e.openBlock)(),(0,e.createBlock)(V,{key:0,vnode:ce.value},null,8,[`vnode`])):(0,e.createCommentVNode)(``,!0)],64)):(0,e.createCommentVNode)(``,!0)],512)],512),C.value>1&&a.hasDots?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`cu-swiper-indicators`,{disabled:!a.hasDots}])},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(C.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t,class:(0,e.normalizeClass)([`cu-swiper-indicator`,{"cu-swiper-indicator-active":t-1===se.value}])},null,2))),128))],2)):(0,e.createCommentVNode)(``,!0)],34))}}),o=(0,e.defineComponent)({name:`cu-swiper-item`,__name:`SwiperItem`,props:{isCopy:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.inject)(`mdSwiper`,null),i=(0,e.computed)(()=>!r||r.isVertical()?`auto`:`${r.dimension()}px`),a=(0,e.computed)(()=>!r||!r.isVertical()?`auto`:`${r.dimension()}px`),o=(0,e.getCurrentInstance)()?.proxy;return(0,e.onMounted)(()=>{n.isCopy||r&&o&&r.register(o)}),(0,e.onBeforeUnmount)(()=>{n.isCopy||r&&o&&r.unregister(o)}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`cu-swiper-item`,style:(0,e.normalizeStyle)({width:i.value,height:a.value})},[(0,e.renderSlot)(t.$slots,`default`)],4))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});