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,136 @@
1
+ import { computed as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, onMounted as o, openBlock as s, ref as c, watch as l } from "vue";
2
+ import { throttle as u } from "@centui/core";
3
+ import { Scroller as d } from "@centui/core/web";
4
+ // src/components/ruler/Ruler.vue?vue&type=script&setup=true&lang.ts
5
+ var f = 60, p = 2, m = 30, h = /* @__PURE__ */ r({
6
+ name: "cu-ruler",
7
+ __name: "Ruler",
8
+ props: {
9
+ modelValue: { default: 0 },
10
+ value: { default: 0 },
11
+ scope: { default: () => [0, 100] },
12
+ step: { default: 10 },
13
+ unit: { default: 1 },
14
+ min: { default: 0 },
15
+ max: { default: 100 },
16
+ stepTextPosition: { default: "top" },
17
+ stepTextRender: {
18
+ type: Function,
19
+ default: () => void 0
20
+ }
21
+ },
22
+ emits: [
23
+ "update:modelValue",
24
+ "input",
25
+ "change"
26
+ ],
27
+ setup(r, { emit: h }) {
28
+ let g = r, _ = e(() => g.modelValue || g.value), v = h, y = c(), b = null, x = null, S = c(!1), C = c(!1), w = c(!1), T = c(0), E = 0, D = e(() => Math.ceil((g.scope[1] - g.scope[0]) / g.unit)), O = e(() => (y.value?.clientWidth ?? 0) * p), k = e(() => {
29
+ let [e, t] = g.scope;
30
+ return g.min > t ? e : g.min > e ? g.min : e;
31
+ }), A = e(() => {
32
+ let [e, t] = g.scope;
33
+ return e > g.max || g.max > t ? t : g.max;
34
+ }), j = e(() => Math.ceil((k.value - g.scope[0]) / g.unit) * m), M = e(() => Math.ceil((g.scope[1] - A.value) / g.unit) * m), N = e(() => g.stepTextPosition === "bottom");
35
+ l(() => _.value, () => {
36
+ if (w.value) return;
37
+ E = 0, w.value = !0;
38
+ let e = I();
39
+ L(e), x?.scrollTo(e, 0, !0);
40
+ }), o(() => {
41
+ b = y.value?.getContext("2d") ?? null, P(), T.value = O.value, F();
42
+ });
43
+ function P() {
44
+ let e = y.value;
45
+ e && b && (e.width = O.value, e.height = 120, b.scale(1 / p, 1));
46
+ }
47
+ function F() {
48
+ let e = u((e) => L(e), 10), t = new d((t) => {
49
+ S.value ? e(t) : L(t);
50
+ }, {
51
+ scrollingX: !0,
52
+ scrollingY: !1,
53
+ snapping: !0,
54
+ snappingVelocity: 1,
55
+ animationDuration: 200,
56
+ inRequestAnimationFrame: !0,
57
+ scrollingComplete: () => {
58
+ w.value = !1;
59
+ }
60
+ }), n = D.value * m + O.value - j.value - M.value, r = I();
61
+ L(r), t.setDimensions(O.value, f, n, f), t.setSnapSize(m, 0), t.scrollTo(r, 0, !1), x = t, S.value = !0;
62
+ }
63
+ function I() {
64
+ let [e] = g.scope;
65
+ return T.value = O.value - Math.ceil((k.value - e) / g.unit) * m, _.value <= k.value ? 0 : _.value >= A.value ? D.value * m : Math.ceil((_.value - k.value) / g.unit) * m;
66
+ }
67
+ function L(e) {
68
+ b && (e = +e.toFixed(2), E = e, T.value += E - e, b.clearRect(0, 0, O.value * 4, 240), R());
69
+ }
70
+ function R() {
71
+ if (!b) return;
72
+ let e = b, [t] = g.scope, n = 120 - (N.value ? 62 : 0), r = Math.round(g.step / g.unit);
73
+ e.lineWidth = 2, e.font = "44px DIDIFD-Medium, \"Helvetica Neue\",Helvetica,\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",\"微软雅黑\",Arial,sans-serif";
74
+ for (let i = 0; i <= D.value; i++) {
75
+ let a = T.value + i * m;
76
+ if (!(a < 0 || a > O.value * 2)) {
77
+ if (a < T.value + j.value || a > T.value + 1 + D.value * m - M.value ? (e.fillStyle = "#E2E4EA", e.strokeStyle = "#E2E4EA") : (e.fillStyle = "#C5CAD5", e.strokeStyle = "#858B9C"), e.beginPath(), e.moveTo(a, n), i % r === 0) {
78
+ let r = z(t + g.unit * i), o = String(r).length * 22 / 2;
79
+ e.fillText(String(r), a - o, 44 + (N.value ? 70 : 0)), e.lineTo(a, n - 40);
80
+ } else e.lineTo(a, n - 20);
81
+ e.stroke();
82
+ }
83
+ }
84
+ e.strokeStyle = "#E2E4EA", e.beginPath(), e.moveTo(T.value, n), e.lineTo(T.value + D.value * m, n), e.stroke(), W();
85
+ }
86
+ function z(e) {
87
+ return g.stepTextRender?.(e) ?? e;
88
+ }
89
+ let B = !1, V = null;
90
+ function H(e) {
91
+ if (C.value || B) return;
92
+ e.preventDefault(), e.stopPropagation(), x?.doTouchStart(Array.from(e.touches), e.timeStamp), C.value = !0, B = !0, w.value = !0;
93
+ let t = (e) => {
94
+ e.preventDefault(), e.stopPropagation(), C.value && x?.doTouchMove(Array.from(e.touches), e.timeStamp, e.scale);
95
+ }, n = (e) => {
96
+ e.preventDefault(), e.stopPropagation(), C.value = !1, B = !1, x?.doTouchEnd(e.timeStamp), window.removeEventListener("touchmove", t), window.removeEventListener("touchend", n), V = null;
97
+ };
98
+ window.addEventListener("touchmove", t, { passive: !1 }), window.addEventListener("touchend", n), V = () => {
99
+ window.removeEventListener("touchmove", t), window.removeEventListener("touchend", n);
100
+ };
101
+ }
102
+ let U = (e) => {
103
+ e.preventDefault();
104
+ };
105
+ a(() => {
106
+ V?.(), V = null, C.value = !1, B = !1, w.value && x?.doTouchEnd(Date.now()), x = null;
107
+ });
108
+ function W() {
109
+ if (!S.value) return;
110
+ let [e] = g.scope;
111
+ if (T.value > O.value) {
112
+ G(k.value);
113
+ return;
114
+ }
115
+ let t = T.value >= 0 ? Math.abs(T.value - O.value) : Math.abs(T.value) + O.value, n = e + Math.round(t / m) * g.unit;
116
+ n > A.value && (n = A.value), n < k.value && (n = k.value), G(n);
117
+ }
118
+ function G(e) {
119
+ v("update:modelValue", e), v("input", e), v("change", e);
120
+ }
121
+ return (e, r) => (s(), t("div", {
122
+ class: "cu-ruler",
123
+ onTouchstart: H,
124
+ onTouchend: U
125
+ }, [
126
+ n("canvas", {
127
+ ref_key: "canvas",
128
+ ref: y,
129
+ class: "cu-ruler-canvas"
130
+ }, null, 512),
131
+ n("div", { class: i(["cu-ruler-cursor", [N.value && "cu-ruler-cursor-bottom"]]) }, null, 2),
132
+ r[0] ||= n("div", { class: "cu-ruler-arrow" }, null, -1)
133
+ ], 32));
134
+ }
135
+ });
136
+ export { h as t };
@@ -0,0 +1 @@
1
+ let e=require("vue"),t=require("@centui/core"),n=require("@centui/core/web");var r=60,i=2,a=30,o=(0,e.defineComponent)({name:`cu-ruler`,__name:`Ruler`,props:{modelValue:{default:0},value:{default:0},scope:{default:()=>[0,100]},step:{default:10},unit:{default:1},min:{default:0},max:{default:100},stepTextPosition:{default:`top`},stepTextRender:{type:Function,default:()=>void 0}},emits:[`update:modelValue`,`input`,`change`],setup(o,{emit:s}){let c=o,l=(0,e.computed)(()=>c.modelValue||c.value),u=s,d=(0,e.ref)(),f=null,p=null,m=(0,e.ref)(!1),h=(0,e.ref)(!1),g=(0,e.ref)(!1),_=(0,e.ref)(0),v=0,y=(0,e.computed)(()=>Math.ceil((c.scope[1]-c.scope[0])/c.unit)),b=(0,e.computed)(()=>(d.value?.clientWidth??0)*i),x=(0,e.computed)(()=>{let[e,t]=c.scope;return c.min>t?e:c.min>e?c.min:e}),S=(0,e.computed)(()=>{let[e,t]=c.scope;return e>c.max||c.max>t?t:c.max}),C=(0,e.computed)(()=>Math.ceil((x.value-c.scope[0])/c.unit)*a),w=(0,e.computed)(()=>Math.ceil((c.scope[1]-S.value)/c.unit)*a),T=(0,e.computed)(()=>c.stepTextPosition===`bottom`);(0,e.watch)(()=>l.value,()=>{if(g.value)return;v=0,g.value=!0;let e=O();k(e),p?.scrollTo(e,0,!0)}),(0,e.onMounted)(()=>{f=d.value?.getContext(`2d`)??null,E(),_.value=b.value,D()});function E(){let e=d.value;e&&f&&(e.width=b.value,e.height=120,f.scale(1/i,1))}function D(){let e=(0,t.throttle)(e=>k(e),10),i=new n.Scroller(t=>{m.value?e(t):k(t)},{scrollingX:!0,scrollingY:!1,snapping:!0,snappingVelocity:1,animationDuration:200,inRequestAnimationFrame:!0,scrollingComplete:()=>{g.value=!1}}),o=y.value*a+b.value-C.value-w.value,s=O();k(s),i.setDimensions(b.value,r,o,r),i.setSnapSize(a,0),i.scrollTo(s,0,!1),p=i,m.value=!0}function O(){let[e]=c.scope;return _.value=b.value-Math.ceil((x.value-e)/c.unit)*a,l.value<=x.value?0:l.value>=S.value?y.value*a:Math.ceil((l.value-x.value)/c.unit)*a}function k(e){f&&(e=+e.toFixed(2),v=e,_.value+=v-e,f.clearRect(0,0,b.value*4,240),A())}function A(){if(!f)return;let e=f,[t]=c.scope,n=120-(T.value?62:0),r=Math.round(c.step/c.unit);e.lineWidth=2,e.font=`44px DIDIFD-Medium, "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif`;for(let i=0;i<=y.value;i++){let o=_.value+i*a;if(!(o<0||o>b.value*2)){if(o<_.value+C.value||o>_.value+1+y.value*a-w.value?(e.fillStyle=`#E2E4EA`,e.strokeStyle=`#E2E4EA`):(e.fillStyle=`#C5CAD5`,e.strokeStyle=`#858B9C`),e.beginPath(),e.moveTo(o,n),i%r===0){let r=j(t+c.unit*i),a=String(r).length*22/2;e.fillText(String(r),o-a,44+(T.value?70:0)),e.lineTo(o,n-40)}else e.lineTo(o,n-20);e.stroke()}}e.strokeStyle=`#E2E4EA`,e.beginPath(),e.moveTo(_.value,n),e.lineTo(_.value+y.value*a,n),e.stroke(),I()}function j(e){return c.stepTextRender?.(e)??e}let M=!1,N=null;function P(e){if(h.value||M)return;e.preventDefault(),e.stopPropagation(),p?.doTouchStart(Array.from(e.touches),e.timeStamp),h.value=!0,M=!0,g.value=!0;let t=e=>{e.preventDefault(),e.stopPropagation(),h.value&&p?.doTouchMove(Array.from(e.touches),e.timeStamp,e.scale)},n=e=>{e.preventDefault(),e.stopPropagation(),h.value=!1,M=!1,p?.doTouchEnd(e.timeStamp),window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,n),N=null};window.addEventListener(`touchmove`,t,{passive:!1}),window.addEventListener(`touchend`,n),N=()=>{window.removeEventListener(`touchmove`,t),window.removeEventListener(`touchend`,n)}}let F=e=>{e.preventDefault()};(0,e.onBeforeUnmount)(()=>{N?.(),N=null,h.value=!1,M=!1,g.value&&p?.doTouchEnd(Date.now()),p=null});function I(){if(!m.value)return;let[e]=c.scope;if(_.value>b.value){L(x.value);return}let t=_.value>=0?Math.abs(_.value-b.value):Math.abs(_.value)+b.value,n=e+Math.round(t/a)*c.unit;n>S.value&&(n=S.value),n<x.value&&(n=x.value),L(n)}function L(e){u(`update:modelValue`,e),u(`input`,e),u(`change`,e)}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`cu-ruler`,onTouchstart:P,onTouchend:F},[(0,e.createElementVNode)(`canvas`,{ref_key:`canvas`,ref:d,class:`cu-ruler-canvas`},null,512),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`cu-ruler-cursor`,[T.value&&`cu-ruler-cursor-bottom`]])},null,2),n[0]||=(0,e.createElementVNode)(`div`,{class:`cu-ruler-arrow`},null,-1)],32))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,228 @@
1
+ import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, onBeforeUnmount as o, onMounted as s, openBlock as c, ref as l, renderSlot as u, useSlots as ee, watch as d } from "vue";
2
+ import { debounce as f } from "@centui/core";
3
+ import { Scroller as te, render as p } from "@centui/core/web";
4
+ // src/components/scroll-view/ScrollView.vue?vue&type=script&setup=true&lang.ts
5
+ var ne = {
6
+ key: 0,
7
+ class: "scroll-view-header"
8
+ }, m = {
9
+ key: 1,
10
+ class: "scroll-view-footer"
11
+ }, h = /* @__PURE__ */ i({
12
+ name: "cu-scroll-view",
13
+ __name: "ScrollView",
14
+ props: {
15
+ scrollingX: {
16
+ type: Boolean,
17
+ default: !0
18
+ },
19
+ scrollingY: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ bouncing: {
24
+ type: Boolean,
25
+ default: !0
26
+ },
27
+ autoReflow: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ manualInit: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ endReachedThreshold: { default: 0 },
36
+ immediateCheckEndReaching: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ touchAngle: { default: 45 },
41
+ isPrevent: {
42
+ type: Boolean,
43
+ default: !0
44
+ }
45
+ },
46
+ emits: [
47
+ "refreshActive",
48
+ "refreshing",
49
+ "endReached",
50
+ "end-reached",
51
+ "scroll"
52
+ ],
53
+ setup(i, { expose: h, emit: g }) {
54
+ let _ = i, v = g, y = ee(), b = l(), x = l(null), S = l(!1), C = l(!1), w = l(!1), T = l(!1), E = l(!1), D = l(!1), O = l(null), k = l(null), A = null, j = null, M = 0, N = 0, P = 0, F = 0, I = 0, L = 0, R = 0, z = 0, B = 0, V = null, H = null, U = e(() => !!y.refresh), W = e(() => !!y.more);
55
+ d(() => _.autoReflow, (e) => {
56
+ e ? K() : q();
57
+ }), s(() => {
58
+ _.manualInit || G();
59
+ }), o(() => {
60
+ q();
61
+ });
62
+ function G() {
63
+ if (S.value) return;
64
+ A = b.value ?? null;
65
+ let e = A?.querySelector(".scroll-view-refresh") ?? null, t = A?.querySelector(".scroll-view-more") ?? null;
66
+ j = A?.querySelector(".scroll-view-container") ?? null;
67
+ let n = e ? e.clientHeight : 0;
68
+ if (M = t ? t.clientHeight : 0, !A || !j) return;
69
+ let r = A.getBoundingClientRect(), i = new te((e, t) => {
70
+ p(j, e, t), S.value && oe(e, t);
71
+ }, {
72
+ scrollingX: _.scrollingX,
73
+ scrollingY: _.scrollingY,
74
+ bouncing: _.bouncing,
75
+ zooming: !1,
76
+ animationDuration: 200,
77
+ speedMultiplier: 1.2,
78
+ inRequestAnimationFrame: !0
79
+ });
80
+ i.setPosition(r.left + A.clientLeft, r.top + A.clientTop), U.value && i.activatePullToRefresh(n, () => {
81
+ T.value = !0, w.value = !1, v("refreshActive");
82
+ }, () => {
83
+ T.value = !1, w.value = !1;
84
+ }, () => {
85
+ T.value = !1, w.value = !0, v("refreshing");
86
+ }), x.value = i, $(!0), _.autoReflow && K(), H = f(() => {
87
+ D.value = !0, v("endReached"), v("end-reached");
88
+ }, 50), setTimeout(() => {
89
+ S.value = !0;
90
+ }, 50), _.immediateCheckEndReaching && J();
91
+ }
92
+ function K() {
93
+ q(), V = setInterval(() => {
94
+ $();
95
+ }, 100);
96
+ }
97
+ function q() {
98
+ V &&= (clearInterval(V), null);
99
+ }
100
+ function J() {
101
+ let e = x.value;
102
+ if (!e) return;
103
+ let t = e._clientHeight, n = e._contentHeight, r = e._scrollTop, i = _.endReachedThreshold, a = n - t - (r + M + i);
104
+ r >= 0 && !D.value && a <= 0 && H && (E.value = !0, H());
105
+ }
106
+ function Y() {
107
+ let e = F - N, t = I - P, n = Math.atan2(Math.abs(t), Math.abs(e)) * 180 / Math.PI;
108
+ return _.scrollingX ? 90 - n : n;
109
+ }
110
+ function X(e) {
111
+ let t = x.value;
112
+ t && (N = e.targetTouches[0].pageX, P = e.targetTouches[0].pageY, t.doTouchStart(Array.from(e.touches), e.timeStamp));
113
+ }
114
+ function re(e) {
115
+ let t = x.value;
116
+ if (!t) return;
117
+ let n = !1;
118
+ if (_.isPrevent && (e.preventDefault(), n = !0), F = e.targetTouches[0].pageX, I = e.targetTouches[0].pageY, (!_.scrollingX || !_.scrollingY) && Y() < _.touchAngle) return;
119
+ !n && e.cancelable && e.preventDefault(), t.doTouchMove(Array.from(e.touches), e.timeStamp, e.scale);
120
+ let r = document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, i = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop, a = F - r, o = I - i;
121
+ (a > document.documentElement.clientWidth - 15 || o > document.documentElement.clientHeight - 15 || a < 15 || o < 15) && t.doTouchEnd(e.timeStamp);
122
+ }
123
+ function Z(e) {
124
+ let t = x.value;
125
+ t && t.doTouchEnd(e.timeStamp);
126
+ }
127
+ function ie(e) {
128
+ let t = x.value;
129
+ t && (N = e.pageX, P = e.pageY, t.doTouchStart([{
130
+ pageX: e.pageX,
131
+ pageY: e.pageY
132
+ }], e.timeStamp), C.value = !0);
133
+ }
134
+ function ae(e) {
135
+ let t = x.value;
136
+ t && C.value && (F = e.pageX, I = e.pageY, (!_.scrollingX || !_.scrollingY) && Y() < _.touchAngle || (t.doTouchMove([{
137
+ pageX: e.pageX,
138
+ pageY: e.pageY
139
+ }], e.timeStamp), C.value = !0));
140
+ }
141
+ function Q(e) {
142
+ let t = x.value;
143
+ t && C.value && (t.doTouchEnd(e.timeStamp), C.value = !1);
144
+ }
145
+ function oe(e, t) {
146
+ e = +e.toFixed(2), t = +t.toFixed(2), (O.value !== e || k.value !== t) && (O.value = e, k.value = t, J(), v("scroll", {
147
+ scrollLeft: e,
148
+ scrollTop: t
149
+ }));
150
+ }
151
+ function se() {
152
+ setTimeout(() => {
153
+ G();
154
+ }, 0);
155
+ }
156
+ function ce(e, t, n = !1) {
157
+ x.value?.scrollTo(e, t, n);
158
+ }
159
+ function le() {
160
+ return x.value?.getValues() ?? {
161
+ left: 0,
162
+ top: 0
163
+ };
164
+ }
165
+ function $(e = !1) {
166
+ let t = x.value;
167
+ t && A && j && setTimeout(() => {
168
+ let n = A.clientWidth, r = A.clientHeight, i = j.offsetWidth, a = j.offsetHeight;
169
+ (e || L !== n || R !== r || z !== i || B !== a) && (t.setDimensions(A.clientWidth, A.clientHeight, j.offsetWidth, j.offsetHeight), L = n, R = r, z = i, B = a);
170
+ }, 0);
171
+ }
172
+ function ue() {
173
+ x.value?.triggerPullToRefresh();
174
+ }
175
+ function de() {
176
+ x.value?.finishPullToRefresh(), $();
177
+ }
178
+ function fe() {
179
+ E.value = !1, D.value = !1, $();
180
+ }
181
+ return h({
182
+ init: se,
183
+ scrollTo: ce,
184
+ getOffsets: le,
185
+ reflowScroller: $,
186
+ triggerRefresh: ue,
187
+ finishRefresh: de,
188
+ finishLoadMore: fe
189
+ }), (e, o) => (c(), n("div", {
190
+ ref_key: "root",
191
+ ref: b,
192
+ class: "cu-scroll-view",
193
+ onTouchstart: X,
194
+ onTouchmove: re,
195
+ onTouchend: Z,
196
+ onTouchcancel: Z,
197
+ onMousedown: ie,
198
+ onMousemove: ae,
199
+ onMouseup: Q,
200
+ onMouseleave: Q
201
+ }, [
202
+ e.$slots.header ? (c(), n("div", ne, [u(e.$slots, "header")])) : t("", !0),
203
+ r("div", {
204
+ class: a(["scroll-view-container", { horizon: i.scrollingX && !i.scrollingY }]),
205
+ "scroll-wrapper": ""
206
+ }, [
207
+ U.value ? (c(), n("div", {
208
+ key: 0,
209
+ class: a(["scroll-view-refresh", {
210
+ refreshing: w.value,
211
+ "refresh-active": T.value
212
+ }])
213
+ }, [u(e.$slots, "refresh", {
214
+ scrollTop: k.value ?? 0,
215
+ isRefreshing: w.value,
216
+ isRefreshActive: T.value
217
+ })], 2)) : t("", !0),
218
+ u(e.$slots, "default"),
219
+ W.value ? (c(), n("div", {
220
+ key: 1,
221
+ class: a(["scroll-view-more", { active: E.value || D.value }])
222
+ }, [u(e.$slots, "more", { isEndReaching: E.value || D.value })], 2)) : t("", !0)
223
+ ], 2),
224
+ e.$slots.footer ? (c(), n("div", m, [u(e.$slots, "footer")])) : t("", !0)
225
+ ], 544));
226
+ }
227
+ });
228
+ export { h as t };
@@ -0,0 +1 @@
1
+ let e=require("vue"),t=require("@centui/core"),n=require("@centui/core/web");var r={key:0,class:`scroll-view-header`},i={key:1,class:`scroll-view-footer`},a=(0,e.defineComponent)({name:`cu-scroll-view`,__name:`ScrollView`,props:{scrollingX:{type:Boolean,default:!0},scrollingY:{type:Boolean,default:!0},bouncing:{type:Boolean,default:!0},autoReflow:{type:Boolean,default:!1},manualInit:{type:Boolean,default:!1},endReachedThreshold:{default:0},immediateCheckEndReaching:{type:Boolean,default:!1},touchAngle:{default:45},isPrevent:{type:Boolean,default:!0}},emits:[`refreshActive`,`refreshing`,`endReached`,`end-reached`,`scroll`],setup(a,{expose:o,emit:s}){let c=a,l=s,u=(0,e.useSlots)(),d=(0,e.ref)(),f=(0,e.ref)(null),p=(0,e.ref)(!1),m=(0,e.ref)(!1),h=(0,e.ref)(!1),g=(0,e.ref)(!1),_=(0,e.ref)(!1),v=(0,e.ref)(!1),y=(0,e.ref)(null),b=(0,e.ref)(null),x=null,S=null,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=null,N=null,P=(0,e.computed)(()=>!!u.refresh),F=(0,e.computed)(()=>!!u.more);(0,e.watch)(()=>c.autoReflow,e=>{e?L():R()}),(0,e.onMounted)(()=>{c.manualInit||I()}),(0,e.onBeforeUnmount)(()=>{R()});function I(){if(p.value)return;x=d.value??null;let e=x?.querySelector(`.scroll-view-refresh`)??null,r=x?.querySelector(`.scroll-view-more`)??null;S=x?.querySelector(`.scroll-view-container`)??null;let i=e?e.clientHeight:0;if(C=r?r.clientHeight:0,!x||!S)return;let a=x.getBoundingClientRect(),o=new n.Scroller((e,t)=>{(0,n.render)(S,e,t),p.value&&q(e,t)},{scrollingX:c.scrollingX,scrollingY:c.scrollingY,bouncing:c.bouncing,zooming:!1,animationDuration:200,speedMultiplier:1.2,inRequestAnimationFrame:!0});o.setPosition(a.left+x.clientLeft,a.top+x.clientTop),P.value&&o.activatePullToRefresh(i,()=>{g.value=!0,h.value=!1,l(`refreshActive`)},()=>{g.value=!1,h.value=!1},()=>{g.value=!1,h.value=!0,l(`refreshing`)}),f.value=o,Z(!0),c.autoReflow&&L(),N=(0,t.debounce)(()=>{v.value=!0,l(`endReached`),l(`end-reached`)},50),setTimeout(()=>{p.value=!0},50),c.immediateCheckEndReaching&&z()}function L(){R(),M=setInterval(()=>{Z()},100)}function R(){M&&=(clearInterval(M),null)}function z(){let e=f.value;if(!e)return;let t=e._clientHeight,n=e._contentHeight,r=e._scrollTop,i=c.endReachedThreshold,a=n-t-(r+C+i);r>=0&&!v.value&&a<=0&&N&&(_.value=!0,N())}function B(){let e=E-w,t=D-T,n=Math.atan2(Math.abs(t),Math.abs(e))*180/Math.PI;return c.scrollingX?90-n:n}function V(e){let t=f.value;t&&(w=e.targetTouches[0].pageX,T=e.targetTouches[0].pageY,t.doTouchStart(Array.from(e.touches),e.timeStamp))}function H(e){let t=f.value;if(!t)return;let n=!1;if(c.isPrevent&&(e.preventDefault(),n=!0),E=e.targetTouches[0].pageX,D=e.targetTouches[0].pageY,(!c.scrollingX||!c.scrollingY)&&B()<c.touchAngle)return;!n&&e.cancelable&&e.preventDefault(),t.doTouchMove(Array.from(e.touches),e.timeStamp,e.scale);let r=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,i=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,a=E-r,o=D-i;(a>document.documentElement.clientWidth-15||o>document.documentElement.clientHeight-15||a<15||o<15)&&t.doTouchEnd(e.timeStamp)}function U(e){let t=f.value;t&&t.doTouchEnd(e.timeStamp)}function W(e){let t=f.value;t&&(w=e.pageX,T=e.pageY,t.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),m.value=!0)}function G(e){let t=f.value;t&&m.value&&(E=e.pageX,D=e.pageY,(!c.scrollingX||!c.scrollingY)&&B()<c.touchAngle||(t.doTouchMove([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),m.value=!0))}function K(e){let t=f.value;t&&m.value&&(t.doTouchEnd(e.timeStamp),m.value=!1)}function q(e,t){e=+e.toFixed(2),t=+t.toFixed(2),(y.value!==e||b.value!==t)&&(y.value=e,b.value=t,z(),l(`scroll`,{scrollLeft:e,scrollTop:t}))}function J(){setTimeout(()=>{I()},0)}function Y(e,t,n=!1){f.value?.scrollTo(e,t,n)}function X(){return f.value?.getValues()??{left:0,top:0}}function Z(e=!1){let t=f.value;t&&x&&S&&setTimeout(()=>{let n=x.clientWidth,r=x.clientHeight,i=S.offsetWidth,a=S.offsetHeight;(e||O!==n||k!==r||A!==i||j!==a)&&(t.setDimensions(x.clientWidth,x.clientHeight,S.offsetWidth,S.offsetHeight),O=n,k=r,A=i,j=a)},0)}function Q(){f.value?.triggerPullToRefresh()}function $(){f.value?.finishPullToRefresh(),Z()}function ee(){_.value=!1,v.value=!1,Z()}return o({init:J,scrollTo:Y,getOffsets:X,reflowScroller:Z,triggerRefresh:Q,finishRefresh:$,finishLoadMore:ee}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`root`,ref:d,class:`cu-scroll-view`,onTouchstart:V,onTouchmove:H,onTouchend:U,onTouchcancel:U,onMousedown:W,onMousemove:G,onMouseup:K,onMouseleave:K},[t.$slots.header?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,r,[(0,e.renderSlot)(t.$slots,`header`)])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`scroll-view-container`,{horizon:a.scrollingX&&!a.scrollingY}]),"scroll-wrapper":``},[P.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`scroll-view-refresh`,{refreshing:h.value,"refresh-active":g.value}])},[(0,e.renderSlot)(t.$slots,`refresh`,{scrollTop:b.value??0,isRefreshing:h.value,isRefreshActive:g.value})],2)):(0,e.createCommentVNode)(``,!0),(0,e.renderSlot)(t.$slots,`default`),F.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:1,class:(0,e.normalizeClass)([`scroll-view-more`,{active:_.value||v.value}])},[(0,e.renderSlot)(t.$slots,`more`,{isEndReaching:_.value||v.value})],2)):(0,e.createCommentVNode)(``,!0)],2),t.$slots.footer?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,i,[(0,e.renderSlot)(t.$slots,`footer`)])):(0,e.createCommentVNode)(``,!0)],544))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
@@ -0,0 +1 @@
1
+ const e=require("./Roller-DALhjhfg.cjs");let t=require("vue"),n=require("@centui/core");var r={class:`refresh-tip`},i=(0,t.defineComponent)({name:`cu-scroll-view-refresh`,__name:`ScrollViewRefresh`,props:{scrollTop:{default:0},isRefreshing:{type:Boolean,default:!1},isRefreshActive:{type:Boolean,default:!1},refreshText:{default:void 0},refreshActiveText:{default:void 0},refreshingText:{default:void 0},rollerColor:{default:`#2F86F6`}},setup(i){let a=i,o=(0,t.ref)(),s=(0,t.computed)(()=>{if(!o.value||o.value.clientHeight<=0||!a.scrollTop)return+a.scrollTop;let e=o.value.clientHeight;return Math.abs(a.scrollTop)<e/2?0:(Math.abs(a.scrollTop)-e/2)/(e/2)}),c=(0,t.computed)(()=>a.isRefreshing?a.refreshingText??(0,n.t)(`md.scroll_view.refresh.refreshing`):a.isRefreshActive?a.refreshActiveText??(0,n.t)(`md.scroll_view.refresh.freedRefresh`):a.refreshText??(0,n.t)(`md.scroll_view.refresh.pullDownRefresh`));return(n,a)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`el`,ref:o,class:`cu-scroll-view-refresh`},[(0,t.createVNode)(e.t,{process:i.isRefreshing?void 0:s.value,width:10,color:i.rollerColor},null,8,[`process`,`color`]),(0,t.createElementVNode)(`p`,r,(0,t.toDisplayString)(c.value),1)],512))}}),a={class:`cu-scroll-view-more`},o=(0,t.defineComponent)({name:`cu-scroll-view-more`,__name:`ScrollViewMore`,props:{loadingText:{default:()=>String((0,n.t)(`md.scroll_view.more.loading`))},finishedText:{default:()=>String((0,n.t)(`md.scroll_view.more.allLoaded`))},isFinished:{type:Boolean,default:!1}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,a,[e.isFinished?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(e.finishedText),1)],64)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.loadingText),1)],64))]))}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -0,0 +1,54 @@
1
+ import { t as e } from "./Roller-BznN57fL.js";
2
+ import { Fragment as t, computed as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, openBlock as c, ref as l, toDisplayString as u } from "vue";
3
+ import { t as d } from "@centui/core";
4
+ // src/components/scroll-view/ScrollViewRefresh.vue?vue&type=script&setup=true&lang.ts
5
+ var f = { class: "refresh-tip" }, p = /* @__PURE__ */ s({
6
+ name: "cu-scroll-view-refresh",
7
+ __name: "ScrollViewRefresh",
8
+ props: {
9
+ scrollTop: { default: 0 },
10
+ isRefreshing: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ isRefreshActive: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ refreshText: { default: void 0 },
19
+ refreshActiveText: { default: void 0 },
20
+ refreshingText: { default: void 0 },
21
+ rollerColor: { default: "#2F86F6" }
22
+ },
23
+ setup(t) {
24
+ let a = t, s = l(), p = n(() => {
25
+ if (!s.value || s.value.clientHeight <= 0 || !a.scrollTop) return +a.scrollTop;
26
+ let e = s.value.clientHeight;
27
+ return Math.abs(a.scrollTop) < e / 2 ? 0 : (Math.abs(a.scrollTop) - e / 2) / (e / 2);
28
+ }), m = n(() => a.isRefreshing ? a.refreshingText ?? d("md.scroll_view.refresh.refreshing") : a.isRefreshActive ? a.refreshActiveText ?? d("md.scroll_view.refresh.freedRefresh") : a.refreshText ?? d("md.scroll_view.refresh.pullDownRefresh"));
29
+ return (n, a) => (c(), r("div", {
30
+ ref_key: "el",
31
+ ref: s,
32
+ class: "cu-scroll-view-refresh"
33
+ }, [o(e, {
34
+ process: t.isRefreshing ? void 0 : p.value,
35
+ width: 10,
36
+ color: t.rollerColor
37
+ }, null, 8, ["process", "color"]), i("p", f, u(m.value), 1)], 512));
38
+ }
39
+ }), m = { class: "cu-scroll-view-more" }, h = /* @__PURE__ */ s({
40
+ name: "cu-scroll-view-more",
41
+ __name: "ScrollViewMore",
42
+ props: {
43
+ loadingText: { default: () => String(d("md.scroll_view.more.loading")) },
44
+ finishedText: { default: () => String(d("md.scroll_view.more.allLoaded")) },
45
+ isFinished: {
46
+ type: Boolean,
47
+ default: !1
48
+ }
49
+ },
50
+ setup(e) {
51
+ return (n, i) => (c(), r("div", m, [e.isFinished ? (c(), r(t, { key: 1 }, [a(u(e.finishedText), 1)], 64)) : (c(), r(t, { key: 0 }, [a(u(e.loadingText), 1)], 64))]));
52
+ }
53
+ });
54
+ export { p as n, h as t };
@@ -0,0 +1,209 @@
1
+ import { t as e } from "./Popup-qLk-BsRS.js";
2
+ import { t } from "./PopupTitleBar-9P4RUMC1.js";
3
+ import { t as n } from "./ScrollView-BNY62f7B.js";
4
+ import { t as r } from "./RadioList-DNGsEzgf.js";
5
+ import { t as i } from "./CheckList-ViiCo4yi.js";
6
+ import { computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, openBlock as m, ref as h, renderSlot as g, useSlots as _, vShow as v, watch as y, withCtx as b, withDirectives as x } from "vue";
7
+ import { t as S } from "@centui/core";
8
+ // src/components/selector/Selector.vue?vue&type=script&setup=true&lang.ts
9
+ var C = { class: "cu-selector-container" }, w = /* @__PURE__ */ d({
10
+ name: "cu-selector",
11
+ __name: "Selector",
12
+ props: {
13
+ modelValue: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ data: { default: () => [] },
18
+ defaultValue: {
19
+ type: [
20
+ String,
21
+ Number,
22
+ Boolean,
23
+ Array
24
+ ],
25
+ default: ""
26
+ },
27
+ isCheck: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ maxHeight: { default: "auto" },
32
+ minHeight: { default: "auto" },
33
+ title: { default: "" },
34
+ describe: { default: "" },
35
+ okText: { default: "" },
36
+ cancelText: { default: void 0 },
37
+ maskClosable: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ hideTitleBar: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ multi: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ icon: { default: "checked" },
50
+ iconInverse: { default: "check" },
51
+ iconDisabled: { default: "check-disabled" },
52
+ iconSvg: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ iconSize: { default: "md" },
57
+ iconPosition: { default: "right" },
58
+ largeRadius: {
59
+ type: Boolean,
60
+ default: !1
61
+ }
62
+ },
63
+ emits: [
64
+ "update:modelValue",
65
+ "choose",
66
+ "confirm",
67
+ "cancel",
68
+ "show",
69
+ "hide"
70
+ ],
71
+ setup(d, { emit: w }) {
72
+ let T = d, E = w, D = _(), O = h(null), k = h(T.modelValue), A = h(Date.now()), j = h(Date.now() + 1), M = h(-1), N = h(-1), P = h([]), F = a(() => T.okText !== ""), I = a(() => {
73
+ let e = D.default;
74
+ return !!e && e({
75
+ option: {},
76
+ index: -1,
77
+ selected: !1
78
+ }).some((e) => e.type !== Comment);
79
+ }), L = a(() => T.cancelText ?? (T.okText ? String(S("md.selector.cancel")) : ""));
80
+ y(() => T.modelValue, (e) => {
81
+ k.value = e;
82
+ }), y(k, (e) => {
83
+ E("update:modelValue", e);
84
+ }), y(() => T.defaultValue, (e) => {
85
+ T.multi && e !== "" && (P.value = Array.isArray(e) ? e : [e]);
86
+ }, { immediate: !0 });
87
+ function R() {
88
+ T.multi ? (E("confirm", P.value.slice()), k.value = !1) : N.value > -1 && (M.value = N.value, k.value = !1, E("confirm", T.data[M.value]));
89
+ }
90
+ function z() {
91
+ k.value = !1, N.value = M.value, N.value === -1 ? (A.value = Date.now(), j.value = Date.now() + 1) : O.value?.selectByIndex(N.value), E("cancel");
92
+ }
93
+ function B(e, t) {
94
+ N.value = t, F.value || (M.value = t, k.value = !1), E("choose", e);
95
+ }
96
+ return (a, h) => (m(), s("div", { class: f(["cu-selector", {
97
+ "is-normal": !d.isCheck,
98
+ "is-check": d.isCheck
99
+ }]) }, [u(e, {
100
+ class: "inner-popup",
101
+ modelValue: k.value,
102
+ "onUpdate:modelValue": h[1] ||= (e) => k.value = e,
103
+ position: "bottom",
104
+ "mask-closable": d.maskClosable,
105
+ onShow: h[2] ||= (e) => a.$emit("show"),
106
+ onHide: h[3] ||= (e) => a.$emit("hide"),
107
+ onMaskClick: z
108
+ }, {
109
+ default: b(() => [x(u(t, {
110
+ title: d.title,
111
+ describe: d.describe,
112
+ "ok-text": d.okText,
113
+ "cancel-text": L.value,
114
+ "large-radius": d.largeRadius,
115
+ "only-close": !d.isCheck && !F.value && !d.cancelText,
116
+ onConfirm: R,
117
+ onCancel: z
118
+ }, null, 8, [
119
+ "title",
120
+ "describe",
121
+ "ok-text",
122
+ "cancel-text",
123
+ "large-radius",
124
+ "only-close"
125
+ ]), [[v, !d.hideTitleBar || F.value]]), c("div", C, [u(n, {
126
+ ref: "scroll",
127
+ "scrolling-x": !1,
128
+ style: p({
129
+ maxHeight: `${d.maxHeight}`,
130
+ minHeight: `${d.minHeight}`
131
+ })
132
+ }, {
133
+ default: b(() => [
134
+ g(a.$slots, "header"),
135
+ d.multi ? (m(), o(i, {
136
+ class: "cu-selector-list",
137
+ ref: "check",
138
+ key: j.value,
139
+ modelValue: P.value,
140
+ "onUpdate:modelValue": h[0] ||= (e) => P.value = e,
141
+ options: d.data,
142
+ "is-slot-scope": I.value,
143
+ icon: d.icon,
144
+ "icon-disabled": d.iconDisabled,
145
+ "icon-inverse": d.iconInverse,
146
+ "icon-position": d.iconPosition,
147
+ "icon-size": d.iconSize,
148
+ "icon-svg": d.iconSvg
149
+ }, l({ _: 2 }, [I.value ? {
150
+ name: "default",
151
+ fn: b(({ option: e, index: t, selected: n }) => [g(a.$slots, "default", {
152
+ option: e,
153
+ index: t,
154
+ selected: n
155
+ })]),
156
+ key: "0"
157
+ } : void 0]), 1032, [
158
+ "modelValue",
159
+ "options",
160
+ "is-slot-scope",
161
+ "icon",
162
+ "icon-disabled",
163
+ "icon-inverse",
164
+ "icon-position",
165
+ "icon-size",
166
+ "icon-svg"
167
+ ])) : (m(), o(r, {
168
+ class: "cu-selector-list",
169
+ ref_key: "radio",
170
+ ref: O,
171
+ key: A.value,
172
+ "model-value": d.defaultValue,
173
+ options: d.data,
174
+ "is-slot-scope": I.value,
175
+ icon: d.icon,
176
+ "icon-disabled": d.iconDisabled,
177
+ "icon-inverse": d.iconInverse,
178
+ "icon-position": d.iconPosition,
179
+ "icon-size": d.iconSize,
180
+ "icon-svg": d.iconSvg,
181
+ onChange: B
182
+ }, l({ _: 2 }, [I.value ? {
183
+ name: "default",
184
+ fn: b(({ option: e, index: t, selected: n }) => [g(a.$slots, "default", {
185
+ option: e,
186
+ index: t,
187
+ selected: n
188
+ })]),
189
+ key: "0"
190
+ } : void 0]), 1032, [
191
+ "model-value",
192
+ "options",
193
+ "is-slot-scope",
194
+ "icon",
195
+ "icon-disabled",
196
+ "icon-inverse",
197
+ "icon-position",
198
+ "icon-size",
199
+ "icon-svg"
200
+ ])),
201
+ g(a.$slots, "footer")
202
+ ]),
203
+ _: 3
204
+ }, 8, ["style"])])]),
205
+ _: 3
206
+ }, 8, ["modelValue", "mask-closable"])], 2));
207
+ }
208
+ });
209
+ export { w as t };
@@ -0,0 +1 @@
1
+ const e=require("./Popup-Ca1jPi0t.cjs"),t=require("./PopupTitleBar-Bfl49eYJ.cjs"),n=require("./ScrollView-BnadVBJC.cjs"),r=require("./RadioList-D-9PITpr.cjs"),i=require("./CheckList-BsKo_Fl3.cjs");let a=require("vue"),o=require("@centui/core");var s={class:`cu-selector-container`},c=(0,a.defineComponent)({name:`cu-selector`,__name:`Selector`,props:{modelValue:{type:Boolean,default:!1},data:{default:()=>[]},defaultValue:{type:[String,Number,Boolean,Array],default:``},isCheck:{type:Boolean,default:!1},maxHeight:{default:`auto`},minHeight:{default:`auto`},title:{default:``},describe:{default:``},okText:{default:``},cancelText:{default:void 0},maskClosable:{type:Boolean,default:!0},hideTitleBar:{type:Boolean,default:!1},multi:{type:Boolean,default:!1},icon:{default:`checked`},iconInverse:{default:`check`},iconDisabled:{default:`check-disabled`},iconSvg:{type:Boolean,default:!1},iconSize:{default:`md`},iconPosition:{default:`right`},largeRadius:{type:Boolean,default:!1}},emits:[`update:modelValue`,`choose`,`confirm`,`cancel`,`show`,`hide`],setup(c,{emit:l}){let u=c,d=l,f=(0,a.useSlots)(),p=(0,a.ref)(null),m=(0,a.ref)(u.modelValue),h=(0,a.ref)(Date.now()),g=(0,a.ref)(Date.now()+1),_=(0,a.ref)(-1),v=(0,a.ref)(-1),y=(0,a.ref)([]),b=(0,a.computed)(()=>u.okText!==``),x=(0,a.computed)(()=>{let e=f.default;return!!e&&e({option:{},index:-1,selected:!1}).some(e=>e.type!==Comment)}),S=(0,a.computed)(()=>u.cancelText??(u.okText?String((0,o.t)(`md.selector.cancel`)):``));(0,a.watch)(()=>u.modelValue,e=>{m.value=e}),(0,a.watch)(m,e=>{d(`update:modelValue`,e)}),(0,a.watch)(()=>u.defaultValue,e=>{u.multi&&e!==``&&(y.value=Array.isArray(e)?e:[e])},{immediate:!0});function C(){u.multi?(d(`confirm`,y.value.slice()),m.value=!1):v.value>-1&&(_.value=v.value,m.value=!1,d(`confirm`,u.data[_.value]))}function w(){m.value=!1,v.value=_.value,v.value===-1?(h.value=Date.now(),g.value=Date.now()+1):p.value?.selectByIndex(v.value),d(`cancel`)}function T(e,t){v.value=t,b.value||(_.value=t,m.value=!1),d(`choose`,e)}return(o,l)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{class:(0,a.normalizeClass)([`cu-selector`,{"is-normal":!c.isCheck,"is-check":c.isCheck}])},[(0,a.createVNode)(e.t,{class:`inner-popup`,modelValue:m.value,"onUpdate:modelValue":l[1]||=e=>m.value=e,position:`bottom`,"mask-closable":c.maskClosable,onShow:l[2]||=e=>o.$emit(`show`),onHide:l[3]||=e=>o.$emit(`hide`),onMaskClick:w},{default:(0,a.withCtx)(()=>[(0,a.withDirectives)((0,a.createVNode)(t.t,{title:c.title,describe:c.describe,"ok-text":c.okText,"cancel-text":S.value,"large-radius":c.largeRadius,"only-close":!c.isCheck&&!b.value&&!c.cancelText,onConfirm:C,onCancel:w},null,8,[`title`,`describe`,`ok-text`,`cancel-text`,`large-radius`,`only-close`]),[[a.vShow,!c.hideTitleBar||b.value]]),(0,a.createElementVNode)(`div`,s,[(0,a.createVNode)(n.t,{ref:`scroll`,"scrolling-x":!1,style:(0,a.normalizeStyle)({maxHeight:`${c.maxHeight}`,minHeight:`${c.minHeight}`})},{default:(0,a.withCtx)(()=>[(0,a.renderSlot)(o.$slots,`header`),c.multi?((0,a.openBlock)(),(0,a.createBlock)(i.t,{class:`cu-selector-list`,ref:`check`,key:g.value,modelValue:y.value,"onUpdate:modelValue":l[0]||=e=>y.value=e,options:c.data,"is-slot-scope":x.value,icon:c.icon,"icon-disabled":c.iconDisabled,"icon-inverse":c.iconInverse,"icon-position":c.iconPosition,"icon-size":c.iconSize,"icon-svg":c.iconSvg},(0,a.createSlots)({_:2},[x.value?{name:`default`,fn:(0,a.withCtx)(({option:e,index:t,selected:n})=>[(0,a.renderSlot)(o.$slots,`default`,{option:e,index:t,selected:n})]),key:`0`}:void 0]),1032,[`modelValue`,`options`,`is-slot-scope`,`icon`,`icon-disabled`,`icon-inverse`,`icon-position`,`icon-size`,`icon-svg`])):((0,a.openBlock)(),(0,a.createBlock)(r.t,{class:`cu-selector-list`,ref_key:`radio`,ref:p,key:h.value,"model-value":c.defaultValue,options:c.data,"is-slot-scope":x.value,icon:c.icon,"icon-disabled":c.iconDisabled,"icon-inverse":c.iconInverse,"icon-position":c.iconPosition,"icon-size":c.iconSize,"icon-svg":c.iconSvg,onChange:T},(0,a.createSlots)({_:2},[x.value?{name:`default`,fn:(0,a.withCtx)(({option:e,index:t,selected:n})=>[(0,a.renderSlot)(o.$slots,`default`,{option:e,index:t,selected:n})]),key:`0`}:void 0]),1032,[`model-value`,`options`,`is-slot-scope`,`icon`,`icon-disabled`,`icon-inverse`,`icon-position`,`icon-size`,`icon-svg`])),(0,a.renderSlot)(o.$slots,`footer`)]),_:3},8,[`style`])])]),_:3},8,[`modelValue`,`mask-closable`])],2))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -0,0 +1 @@
1
+ let e=require("vue");var t={key:0,class:`cu-skeleton`},n={class:`cu-skeleton-content`},r={key:1},i=`40%`,a=`100%`,o=(0,e.defineComponent)({__name:`Skeleton`,props:{loading:{type:Boolean,default:!0},avatar:{type:Boolean,default:!1},row:{default:3},title:{type:Boolean,default:!1},titleWidth:{default:i},rowWidth:{default:a},avatarSize:{default:`md`}},setup(i){let o=i;function s(e){return typeof e==`number`}function c(e){let{rowWidth:t}=o;return Array.isArray(t)?t[e]==null?a:s(t[e])?`${t[e]}%`:String(t[e]):t?s(t)?`${t}%`:String(t):a}let l=s(o.titleWidth)?`${o.titleWidth}%`:String(o.titleWidth);return(a,o)=>i.loading?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,t,[i.avatar?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)({"cu-skeleton-avatar":!0,"cu-skeleton-avatar-large":i.avatarSize===`lg`,"cu-skeleton-avatar-small":i.avatarSize===`sm`})},null,2)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,n,[i.title?((0,e.openBlock)(),(0,e.createElementBlock)(`h4`,{key:0,class:`cu-skeleton-title`,style:(0,e.normalizeStyle)({width:(0,e.unref)(l)})},null,4)):(0,e.createCommentVNode)(``,!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.row,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t,class:`cu-skeleton-row`,style:(0,e.normalizeStyle)({width:t===i.row?`60%`:c(t-1)})},null,4))),128))])])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,r,[(0,e.renderSlot)(a.$slots,`default`)]))}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});