@vaebe/ccui 2.0.1-beta.1 → 2.0.1-beta.3

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 (438) hide show
  1. package/README.md +1 -1
  2. package/affix/index.d.ts +10 -0
  3. package/affix/src/affix-types.d.ts +20 -0
  4. package/affix/src/affix.d.ts +20 -0
  5. package/alert/index.d.ts +10 -0
  6. package/alert/src/alert-types.d.ts +48 -0
  7. package/alert/src/alert.d.ts +36 -0
  8. package/anchor/index.d.ts +10 -0
  9. package/anchor/src/anchor-types.d.ts +37 -0
  10. package/anchor/src/anchor.d.ts +31 -0
  11. package/auto-complete/index.d.ts +10 -0
  12. package/auto-complete/index.es.js +1986 -0
  13. package/auto-complete/index.umd.js +1 -0
  14. package/auto-complete/src/auto-complete-types.d.ts +134 -0
  15. package/auto-complete/src/auto-complete.d.ts +94 -0
  16. package/auto-complete/style.css +2 -0
  17. package/avatar/index.d.ts +10 -0
  18. package/avatar/src/avatar-types.d.ts +53 -0
  19. package/avatar/src/avatar.d.ts +36 -0
  20. package/avatar/src/components/icon-body.d.ts +4 -0
  21. package/avatar/src/components/icon-img-error.d.ts +4 -0
  22. package/avatar/src/components/icon-nobody.d.ts +4 -0
  23. package/avatar/src/composables/use-get-background-color.d.ts +1 -0
  24. package/avatar/src/composables/use-get-display-name.d.ts +1 -0
  25. package/avatar-group/index.d.ts +12 -0
  26. package/avatar-group/index.es.js +119 -0
  27. package/avatar-group/index.umd.js +1 -0
  28. package/avatar-group/src/avatar-group-types.d.ts +56 -0
  29. package/avatar-group/src/avatar-group.d.ts +27 -0
  30. package/avatar-group/style.css +2 -0
  31. package/badge/index.d.ts +10 -0
  32. package/badge/src/badge-types.d.ts +52 -0
  33. package/badge/src/badge.d.ts +36 -0
  34. package/badge-ribbon/index.d.ts +12 -0
  35. package/badge-ribbon/index.es.js +84 -0
  36. package/badge-ribbon/index.umd.js +1 -0
  37. package/badge-ribbon/src/badge-ribbon-types.d.ts +30 -0
  38. package/badge-ribbon/src/badge-ribbon.d.ts +17 -0
  39. package/badge-ribbon/style.css +2 -0
  40. package/breadcrumb/index.d.ts +10 -0
  41. package/breadcrumb/src/breadcrumb-types.d.ts +29 -0
  42. package/breadcrumb/src/breadcrumb.d.ts +21 -0
  43. package/button/index.d.ts +12 -0
  44. package/button/src/button-group.d.ts +12 -0
  45. package/button/src/button-types.d.ts +168 -0
  46. package/button/src/button.d.ts +75 -0
  47. package/button-3d/index.d.ts +10 -0
  48. package/button-3d/src/button-3d-types.d.ts +27 -0
  49. package/button-3d/src/button-3d.d.ts +23 -0
  50. package/calendar/index.d.ts +10 -0
  51. package/calendar/src/calendar-types.d.ts +56 -0
  52. package/calendar/src/calendar.d.ts +27 -0
  53. package/card/index.d.ts +10 -0
  54. package/card/src/card-types.d.ts +34 -0
  55. package/card/src/card.d.ts +21 -0
  56. package/card-meta/index.d.ts +11 -0
  57. package/card-meta/index.es.js +53 -0
  58. package/card-meta/index.umd.js +1 -0
  59. package/card-meta/src/card-meta-types.d.ts +19 -0
  60. package/card-meta/src/card-meta.d.ts +14 -0
  61. package/card-meta/style.css +2 -0
  62. package/carousel/index.d.ts +10 -0
  63. package/carousel/index.es.js +306 -0
  64. package/carousel/index.umd.js +1 -0
  65. package/carousel/src/carousel-types.d.ts +72 -0
  66. package/carousel/src/carousel.d.ts +58 -0
  67. package/carousel/style.css +2 -0
  68. package/cascader/index.d.ts +12 -0
  69. package/cascader/index.es.js +2267 -0
  70. package/cascader/index.umd.js +1 -0
  71. package/cascader/src/cascader-types.d.ts +214 -0
  72. package/cascader/src/cascader.d.ts +133 -0
  73. package/cascader/style.css +2 -0
  74. package/check-box/index.d.ts +10 -0
  75. package/check-box/src/check-box-group.d.ts +31 -0
  76. package/check-box/src/check-box-types.d.ts +74 -0
  77. package/check-box/src/check-box.d.ts +28 -0
  78. package/check-box/src/components/icon-active.d.ts +2 -0
  79. package/check-box/src/components/icon-default.d.ts +2 -0
  80. package/checkable-tag/index.d.ts +13 -0
  81. package/checkable-tag/index.es.js +141 -0
  82. package/checkable-tag/index.umd.js +1 -0
  83. package/checkable-tag/src/checkable-tag-group.d.ts +26 -0
  84. package/checkable-tag/src/checkable-tag-types.d.ts +83 -0
  85. package/checkable-tag/src/checkable-tag.d.ts +20 -0
  86. package/checkable-tag/style.css +2 -0
  87. package/collapse/index.d.ts +11 -0
  88. package/collapse/src/collapse-item.d.ts +16 -0
  89. package/collapse/src/collapse-types.d.ts +52 -0
  90. package/collapse/src/collapse.d.ts +24 -0
  91. package/color-picker/index.d.ts +10 -0
  92. package/color-picker/index.es.js +1881 -0
  93. package/color-picker/index.umd.js +1 -0
  94. package/color-picker/src/color-picker-types.d.ts +121 -0
  95. package/color-picker/src/color-picker.d.ts +75 -0
  96. package/color-picker/style.css +2 -0
  97. package/config-provider/index.d.ts +10 -0
  98. package/config-provider/src/config-provider-types.d.ts +131 -0
  99. package/config-provider/src/config-provider.d.ts +24 -0
  100. package/date-picker/index.d.ts +10 -0
  101. package/date-picker/src/date-picker-types.d.ts +179 -0
  102. package/date-picker/src/date-picker.d.ts +113 -0
  103. package/descriptions/index.d.ts +11 -0
  104. package/descriptions/src/descriptions-item.d.ts +19 -0
  105. package/descriptions/src/descriptions-types.d.ts +64 -0
  106. package/descriptions/src/descriptions.d.ts +31 -0
  107. package/divider/index.d.ts +10 -0
  108. package/divider/src/divider-types.d.ts +31 -0
  109. package/divider/src/divider.d.ts +24 -0
  110. package/drawer/index.d.ts +10 -0
  111. package/drawer/src/drawer-types.d.ts +155 -0
  112. package/drawer/src/drawer.d.ts +79 -0
  113. package/dropdown/index.d.ts +10 -0
  114. package/dropdown/index.es.js +2 -2
  115. package/dropdown/index.umd.js +1 -1
  116. package/dropdown/src/dropdown-types.d.ts +41 -0
  117. package/dropdown/src/dropdown.d.ts +32 -0
  118. package/empty/index.d.ts +10 -0
  119. package/empty/src/empty-types.d.ts +16 -0
  120. package/empty/src/empty.d.ts +15 -0
  121. package/flex/index.d.ts +10 -0
  122. package/flex/src/flex-types.d.ts +36 -0
  123. package/flex/src/flex.d.ts +29 -0
  124. package/float-button/index.d.ts +11 -0
  125. package/float-button/src/back-top.d.ts +26 -0
  126. package/float-button/src/float-button-types.d.ts +65 -0
  127. package/float-button/src/float-button.d.ts +32 -0
  128. package/form/index.d.ts +14 -0
  129. package/form/src/form-item.d.ts +72 -0
  130. package/form/src/form-list.d.ts +12 -0
  131. package/form/src/form-provider.d.ts +7 -0
  132. package/form/src/form-types.d.ts +360 -0
  133. package/form/src/form.d.ts +64 -0
  134. package/form/src/utils.d.ts +10 -0
  135. package/grid/index.d.ts +10 -0
  136. package/grid/src/grid-types.d.ts +90 -0
  137. package/grid/src/grid.d.ts +58 -0
  138. package/icon/index.d.ts +12 -0
  139. package/icon/src/icon-registry.d.ts +5 -0
  140. package/icon/src/icon-types.d.ts +95 -0
  141. package/icon/src/icon.d.ts +63 -0
  142. package/image/index.d.ts +10 -0
  143. package/image/src/image-types.d.ts +56 -0
  144. package/image/src/image.d.ts +42 -0
  145. package/image-preview-group/index.d.ts +11 -0
  146. package/image-preview-group/index.es.js +162 -0
  147. package/image-preview-group/index.umd.js +1 -0
  148. package/image-preview-group/src/image-preview-group-types.d.ts +51 -0
  149. package/image-preview-group/src/image-preview-group.d.ts +25 -0
  150. package/image-preview-group/style.css +2 -0
  151. package/index.d.ts +93 -7
  152. package/input/index.d.ts +10 -0
  153. package/input/src/input-types.d.ts +164 -0
  154. package/input/src/input.d.ts +74 -0
  155. package/input-number/index.d.ts +10 -0
  156. package/input-number/src/input-number-types.d.ts +165 -0
  157. package/input-number/src/input-number.d.ts +66 -0
  158. package/input-otp/index.d.ts +11 -0
  159. package/input-otp/index.es.js +186 -0
  160. package/input-otp/index.umd.js +1 -0
  161. package/input-otp/src/input-otp-types.d.ts +68 -0
  162. package/input-otp/src/input-otp.d.ts +40 -0
  163. package/input-otp/style.css +2 -0
  164. package/input-search/index.d.ts +11 -0
  165. package/input-search/index.es.js +1228 -0
  166. package/input-search/index.umd.js +1 -0
  167. package/input-search/src/input-search-types.d.ts +106 -0
  168. package/input-search/src/input-search.d.ts +84 -0
  169. package/input-search/style.css +2 -0
  170. package/layout/index.d.ts +10 -0
  171. package/layout/src/layout-types.d.ts +70 -0
  172. package/layout/src/layout.d.ts +56 -0
  173. package/masonry/index.d.ts +10 -0
  174. package/masonry/src/masonry-types.d.ts +19 -0
  175. package/masonry/src/masonry.d.ts +16 -0
  176. package/mentions/index.d.ts +10 -0
  177. package/mentions/index.es.js +711 -0
  178. package/mentions/index.umd.js +1 -0
  179. package/mentions/src/mentions-types.d.ts +124 -0
  180. package/mentions/src/mentions.d.ts +79 -0
  181. package/mentions/style.css +2 -0
  182. package/menu/index.d.ts +10 -0
  183. package/menu/src/menu-types.d.ts +109 -0
  184. package/menu/src/menu.d.ts +63 -0
  185. package/message/index.d.ts +22 -0
  186. package/message/src/message-item.d.ts +46 -0
  187. package/message/src/message-types.d.ts +86 -0
  188. package/message/src/message.d.ts +21 -0
  189. package/message/src/use-message.d.ts +35 -0
  190. package/modal/index.d.ts +24 -0
  191. package/modal/src/confirm-types.d.ts +30 -0
  192. package/modal/src/confirm.d.ts +17 -0
  193. package/modal/src/modal-types.d.ts +175 -0
  194. package/modal/src/modal.d.ts +99 -0
  195. package/modal/src/use-modal.d.ts +34 -0
  196. package/notification/index.d.ts +21 -0
  197. package/notification/src/notification-item.d.ts +49 -0
  198. package/notification/src/notification-types.d.ts +91 -0
  199. package/notification/src/notification.d.ts +20 -0
  200. package/notification/src/use-notification.d.ts +34 -0
  201. package/package.json +611 -12
  202. package/pagination/index.d.ts +10 -0
  203. package/pagination/index.es.js +4 -2
  204. package/pagination/index.umd.js +1 -1
  205. package/pagination/src/pagination-types.d.ts +49 -0
  206. package/pagination/src/pagination.d.ts +43 -0
  207. package/popconfirm/index.d.ts +10 -0
  208. package/popconfirm/src/popconfirm-types.d.ts +82 -0
  209. package/popconfirm/src/popconfirm.d.ts +55 -0
  210. package/popover/index.d.ts +10 -0
  211. package/popover/src/popover-types.d.ts +235 -0
  212. package/popover/src/popover.d.ts +130 -0
  213. package/progress/index.d.ts +10 -0
  214. package/progress/src/progress-types.d.ts +48 -0
  215. package/progress/src/progress.d.ts +37 -0
  216. package/radio/index.d.ts +11 -0
  217. package/radio/src/components/icon-active.d.ts +2 -0
  218. package/radio/src/components/icon-circle.d.ts +2 -0
  219. package/radio/src/radio-group.d.ts +21 -0
  220. package/radio/src/radio-types.d.ts +55 -0
  221. package/radio/src/radio.d.ts +24 -0
  222. package/range-picker/index.d.ts +10 -0
  223. package/range-picker/index.es.js +2415 -0
  224. package/range-picker/index.umd.js +1 -0
  225. package/range-picker/src/range-picker-types.d.ts +169 -0
  226. package/range-picker/src/range-picker.d.ts +112 -0
  227. package/range-picker/style.css +2 -0
  228. package/rate/index.d.ts +10 -0
  229. package/rate/src/components/icon-default.d.ts +2 -0
  230. package/rate/src/rate-types.d.ts +34 -0
  231. package/rate/src/rate.d.ts +30 -0
  232. package/result/index.d.ts +10 -0
  233. package/result/src/result-types.d.ts +21 -0
  234. package/result/src/result.d.ts +18 -0
  235. package/segmented/index.d.ts +10 -0
  236. package/segmented/src/segmented-types.d.ts +32 -0
  237. package/segmented/src/segmented.d.ts +25 -0
  238. package/select/index.d.ts +10 -0
  239. package/select/src/composables/use-select.d.ts +29 -0
  240. package/select/src/select-types.d.ts +215 -0
  241. package/select/src/select.d.ts +149 -0
  242. package/skeleton/index.d.ts +10 -0
  243. package/skeleton/src/skeleton-types.d.ts +39 -0
  244. package/skeleton/src/skeleton.d.ts +27 -0
  245. package/skeleton-node/index.d.ts +11 -0
  246. package/skeleton-node/index.es.js +71 -0
  247. package/skeleton-node/index.umd.js +1 -0
  248. package/skeleton-node/src/skeleton-node-types.d.ts +23 -0
  249. package/skeleton-node/src/skeleton-node.d.ts +17 -0
  250. package/skeleton-node/style.css +2 -0
  251. package/slider/index.d.ts +10 -0
  252. package/slider/index.es.js +3 -3
  253. package/slider/index.umd.js +1 -1
  254. package/slider/src/composables/use-slider-tooltip.d.ts +18 -0
  255. package/slider/src/composables/use-slider.d.ts +68 -0
  256. package/slider/src/slider-types.d.ts +112 -0
  257. package/slider/src/slider.d.ts +149 -0
  258. package/space/index.d.ts +10 -0
  259. package/space/src/space-types.d.ts +28 -0
  260. package/space/src/space.d.ts +21 -0
  261. package/space-compact/index.d.ts +11 -0
  262. package/space-compact/index.es.js +59 -0
  263. package/space-compact/index.umd.js +1 -0
  264. package/space-compact/src/space-compact-types.d.ts +27 -0
  265. package/space-compact/src/space-compact.d.ts +15 -0
  266. package/space-compact/style.css +2 -0
  267. package/spin/index.d.ts +10 -0
  268. package/spin/src/spin-types.d.ts +29 -0
  269. package/spin/src/spin.d.ts +24 -0
  270. package/splitter/index.d.ts +10 -0
  271. package/splitter/src/splitter-types.d.ts +70 -0
  272. package/splitter/src/splitter.d.ts +62 -0
  273. package/status/index.d.ts +10 -0
  274. package/status/src/status-types.d.ts +10 -0
  275. package/status/src/status.d.ts +9 -0
  276. package/steps/index.d.ts +10 -0
  277. package/steps/src/steps-types.d.ts +48 -0
  278. package/steps/src/steps.d.ts +34 -0
  279. package/style.css +2 -0
  280. package/switch/index.d.ts +10 -0
  281. package/switch/src/switch-types.d.ts +45 -0
  282. package/switch/src/switch.d.ts +37 -0
  283. package/table/index.d.ts +11 -0
  284. package/table/src/table-types.d.ts +172 -0
  285. package/table/src/table.d.ts +67 -0
  286. package/table-column/index.d.ts +11 -0
  287. package/table-column/index.es.js +155 -0
  288. package/table-column/index.umd.js +1 -0
  289. package/table-column/src/table-column-types.d.ts +75 -0
  290. package/table-column/src/table-column.d.ts +63 -0
  291. package/table-column-group/index.d.ts +11 -0
  292. package/table-column-group/index.es.js +80 -0
  293. package/table-column-group/index.umd.js +1 -0
  294. package/table-column-group/src/table-column-group-types.d.ts +36 -0
  295. package/table-column-group/src/table-column-group.d.ts +20 -0
  296. package/table-summary/index.d.ts +11 -0
  297. package/table-summary/index.es.js +30 -0
  298. package/table-summary/index.umd.js +1 -0
  299. package/table-summary/src/table-summary-types.d.ts +29 -0
  300. package/table-summary/src/table-summary.d.ts +8 -0
  301. package/tabs/index.d.ts +11 -0
  302. package/tabs/src/components/tab/tab-types.d.ts +18 -0
  303. package/tabs/src/components/tab/tab.d.ts +15 -0
  304. package/tabs/src/components/tabs-nav/index.d.ts +26 -0
  305. package/tabs/src/tabs-types.d.ts +49 -0
  306. package/tabs/src/tabs.d.ts +27 -0
  307. package/tag/index.d.ts +10 -0
  308. package/tag/src/tag-types.d.ts +41 -0
  309. package/tag/src/tag.d.ts +24 -0
  310. package/textarea/index.d.ts +11 -0
  311. package/textarea/index.es.js +1241 -0
  312. package/textarea/index.umd.js +1 -0
  313. package/textarea/src/textarea-types.d.ts +150 -0
  314. package/textarea/src/textarea.d.ts +63 -0
  315. package/textarea/style.css +2 -0
  316. package/time-picker/index.d.ts +10 -0
  317. package/time-picker/index.es.js +2325 -0
  318. package/time-picker/index.umd.js +1 -0
  319. package/time-picker/src/time-picker-types.d.ts +168 -0
  320. package/time-picker/src/time-picker.d.ts +127 -0
  321. package/time-picker/style.css +2 -0
  322. package/time-range-picker/index.d.ts +10 -0
  323. package/time-range-picker/index.es.js +2568 -0
  324. package/time-range-picker/index.umd.js +1 -0
  325. package/time-range-picker/src/time-range-picker-types.d.ts +147 -0
  326. package/time-range-picker/src/time-range-picker.d.ts +124 -0
  327. package/time-range-picker/style.css +2 -0
  328. package/timeline/index.d.ts +11 -0
  329. package/timeline/src/timeline-item.d.ts +31 -0
  330. package/timeline/src/timeline-types.d.ts +72 -0
  331. package/timeline/src/timeline.d.ts +3 -0
  332. package/tooltip/index.d.ts +10 -0
  333. package/tooltip/src/tooltip-types.d.ts +201 -0
  334. package/tooltip/src/tooltip.d.ts +87 -0
  335. package/transfer/index.d.ts +10 -0
  336. package/transfer/index.es.js +1407 -0
  337. package/transfer/index.umd.js +1 -0
  338. package/transfer/src/transfer-types.d.ts +76 -0
  339. package/transfer/src/transfer.d.ts +59 -0
  340. package/transfer/style.css +2 -0
  341. package/tree/index.d.ts +10 -0
  342. package/tree/src/composables/use-tree-check.d.ts +9 -0
  343. package/tree/src/composables/use-tree-flatten.d.ts +11 -0
  344. package/tree/src/composables/use-tree-state.d.ts +17 -0
  345. package/tree/src/tree-types.d.ts +202 -0
  346. package/tree/src/tree.d.ts +122 -0
  347. package/tree-select/index.d.ts +12 -0
  348. package/tree-select/index.es.js +3009 -0
  349. package/tree-select/index.umd.js +1 -0
  350. package/tree-select/src/tree-select-types.d.ts +188 -0
  351. package/tree-select/src/tree-select.d.ts +128 -0
  352. package/tree-select/style.css +2 -0
  353. package/typography/index.d.ts +10 -0
  354. package/typography/src/typography-types.d.ts +316 -0
  355. package/typography/src/typography.d.ts +33 -0
  356. package/upload/index.d.ts +10 -0
  357. package/upload/index.es.js +1450 -0
  358. package/upload/index.umd.js +1 -0
  359. package/upload/src/upload-types.d.ts +99 -0
  360. package/upload/src/upload.d.ts +66 -0
  361. package/upload/style.css +2 -0
  362. package/upload-dragger/index.d.ts +10 -0
  363. package/upload-dragger/index.es.js +1472 -0
  364. package/upload-dragger/index.umd.js +1 -0
  365. package/upload-dragger/src/upload-dragger.d.ts +167 -0
  366. package/upload-dragger/style.css +2 -0
  367. package/util/index.d.ts +12 -0
  368. package/util/src/dom.d.ts +8 -0
  369. package/util/src/func.d.ts +7 -0
  370. package/util/src/type.d.ts +3 -0
  371. package/vue-ccui.es.js +11 -9
  372. package/vue-ccui.umd.js +1 -1
  373. package/watermark/index.d.ts +10 -0
  374. package/watermark/src/watermark-types.d.ts +47 -0
  375. package/watermark/src/watermark.d.ts +34 -0
  376. package/ccui-cli.css +0 -2
  377. package/nuxt/components/category.js +0 -2
  378. package/nuxt/components/install.js +0 -2
  379. package/nuxt/components/status.js +0 -2
  380. package/nuxt/components/title.js +0 -2
  381. package/nuxt/index.js +0 -13
  382. /package/affix/{ccui-cli.css → style.css} +0 -0
  383. /package/alert/{ccui-cli.css → style.css} +0 -0
  384. /package/anchor/{ccui-cli.css → style.css} +0 -0
  385. /package/avatar/{ccui-cli.css → style.css} +0 -0
  386. /package/badge/{ccui-cli.css → style.css} +0 -0
  387. /package/breadcrumb/{ccui-cli.css → style.css} +0 -0
  388. /package/button/{ccui-cli.css → style.css} +0 -0
  389. /package/button-3d/{ccui-cli.css → style.css} +0 -0
  390. /package/calendar/{ccui-cli.css → style.css} +0 -0
  391. /package/card/{ccui-cli.css → style.css} +0 -0
  392. /package/check-box/{ccui-cli.css → style.css} +0 -0
  393. /package/collapse/{ccui-cli.css → style.css} +0 -0
  394. /package/date-picker/{ccui-cli.css → style.css} +0 -0
  395. /package/descriptions/{ccui-cli.css → style.css} +0 -0
  396. /package/divider/{ccui-cli.css → style.css} +0 -0
  397. /package/drawer/{ccui-cli.css → style.css} +0 -0
  398. /package/dropdown/{ccui-cli.css → style.css} +0 -0
  399. /package/empty/{ccui-cli.css → style.css} +0 -0
  400. /package/flex/{ccui-cli.css → style.css} +0 -0
  401. /package/float-button/{ccui-cli.css → style.css} +0 -0
  402. /package/form/{ccui-cli.css → style.css} +0 -0
  403. /package/grid/{ccui-cli.css → style.css} +0 -0
  404. /package/icon/{ccui-cli.css → style.css} +0 -0
  405. /package/image/{ccui-cli.css → style.css} +0 -0
  406. /package/input/{ccui-cli.css → style.css} +0 -0
  407. /package/input-number/{ccui-cli.css → style.css} +0 -0
  408. /package/layout/{ccui-cli.css → style.css} +0 -0
  409. /package/masonry/{ccui-cli.css → style.css} +0 -0
  410. /package/menu/{ccui-cli.css → style.css} +0 -0
  411. /package/message/{ccui-cli.css → style.css} +0 -0
  412. /package/modal/{ccui-cli.css → style.css} +0 -0
  413. /package/notification/{ccui-cli.css → style.css} +0 -0
  414. /package/pagination/{ccui-cli.css → style.css} +0 -0
  415. /package/popconfirm/{ccui-cli.css → style.css} +0 -0
  416. /package/popover/{ccui-cli.css → style.css} +0 -0
  417. /package/progress/{ccui-cli.css → style.css} +0 -0
  418. /package/radio/{ccui-cli.css → style.css} +0 -0
  419. /package/rate/{ccui-cli.css → style.css} +0 -0
  420. /package/result/{ccui-cli.css → style.css} +0 -0
  421. /package/segmented/{ccui-cli.css → style.css} +0 -0
  422. /package/select/{ccui-cli.css → style.css} +0 -0
  423. /package/skeleton/{ccui-cli.css → style.css} +0 -0
  424. /package/slider/{ccui-cli.css → style.css} +0 -0
  425. /package/space/{ccui-cli.css → style.css} +0 -0
  426. /package/spin/{ccui-cli.css → style.css} +0 -0
  427. /package/splitter/{ccui-cli.css → style.css} +0 -0
  428. /package/status/{ccui-cli.css → style.css} +0 -0
  429. /package/steps/{ccui-cli.css → style.css} +0 -0
  430. /package/switch/{ccui-cli.css → style.css} +0 -0
  431. /package/table/{ccui-cli.css → style.css} +0 -0
  432. /package/tabs/{ccui-cli.css → style.css} +0 -0
  433. /package/tag/{ccui-cli.css → style.css} +0 -0
  434. /package/timeline/{ccui-cli.css → style.css} +0 -0
  435. /package/tooltip/{ccui-cli.css → style.css} +0 -0
  436. /package/tree/{ccui-cli.css → style.css} +0 -0
  437. /package/typography/{ccui-cli.css → style.css} +0 -0
  438. /package/watermark/{ccui-cli.css → style.css} +0 -0
@@ -0,0 +1,10 @@
1
+ import type { App } from 'vue';
2
+ import Input from './src/input';
3
+ export { Input };
4
+ declare const _default: {
5
+ title: string;
6
+ category: string;
7
+ status: string;
8
+ install(app: App): void;
9
+ };
10
+ export default _default;
@@ -0,0 +1,164 @@
1
+ import type { ExtractPropTypes, PropType, VNode } from 'vue';
2
+ import type { CcSemanticClasses, CcSemanticStyles } from '../../shared/hooks/use-semantic';
3
+ export type InputType = 'text' | 'password';
4
+ export type InputSize = 'large' | 'default' | 'small';
5
+ /**
6
+ * 校验状态。Form 联动会自动透传。
7
+ */
8
+ export type InputStatus = '' | 'error' | 'warning';
9
+ /**
10
+ * 录入组件统一 variant 形态:
11
+ *
12
+ * - `outlined`(默认):1px solid 边框,与既有视觉一致
13
+ * - `filled`:无边框 + 浅灰背景填充,hover 加深
14
+ * - `borderless`:完全无边框无背景
15
+ * - `underlined`:仅底部 1px 边框,类似 Material 风
16
+ */
17
+ export type InputVariant = 'outlined' | 'filled' | 'borderless' | 'underlined';
18
+ /**
19
+ * `allowClear` 复合配置:
20
+ *
21
+ * - `boolean`:开启/关闭清除按钮
22
+ * - `{ clearIcon }`:自定义清除图标(接 Iconify name / VNode)
23
+ */
24
+ export interface InputAllowClearObject {
25
+ clearIcon?: VNode | string;
26
+ }
27
+ export type InputAllowClear = boolean | InputAllowClearObject;
28
+ /**
29
+ * `showCount` 复合配置:
30
+ *
31
+ * - `boolean`:开启右侧字符计数
32
+ * - `{ formatter }`:自定义计数格式(接 `({ value, count, maxLength }) => string`)
33
+ */
34
+ export interface InputShowCountObject {
35
+ formatter?: (info: {
36
+ value: string;
37
+ count: number;
38
+ maxLength?: number;
39
+ }) => string;
40
+ }
41
+ export type InputShowCount = boolean | InputShowCountObject;
42
+ export declare const inputProps: {
43
+ readonly type: {
44
+ readonly type: PropType<InputType>;
45
+ readonly default: "text";
46
+ };
47
+ readonly size: {
48
+ readonly type: PropType<InputSize>;
49
+ readonly default: "default";
50
+ };
51
+ readonly placeholder: {
52
+ readonly type: StringConstructor;
53
+ readonly default: "";
54
+ };
55
+ readonly disabled: {
56
+ readonly type: BooleanConstructor;
57
+ readonly default: false;
58
+ };
59
+ readonly readonly: {
60
+ readonly type: BooleanConstructor;
61
+ readonly default: false;
62
+ };
63
+ /**
64
+ * @deprecated 请改用 `allowClear`。下一大版本移除。
65
+ */
66
+ readonly clearable: {
67
+ readonly type: BooleanConstructor;
68
+ readonly default: false;
69
+ };
70
+ /**
71
+ * 是否显示清除按钮,支持 `{ clearIcon }` 自定义图标。
72
+ * 显式 `allowClear` 优先于 `clearable`。
73
+ */
74
+ readonly allowClear: {
75
+ readonly type: PropType<InputAllowClear>;
76
+ readonly default: undefined;
77
+ };
78
+ readonly showPassword: {
79
+ readonly type: BooleanConstructor;
80
+ readonly default: false;
81
+ };
82
+ /**
83
+ * @deprecated 请改用 `addon-before` slot 或 `addonBefore` prop。
84
+ */
85
+ readonly prepend: {
86
+ readonly type: StringConstructor;
87
+ readonly default: "";
88
+ };
89
+ /**
90
+ * @deprecated 请改用 `addon-after` slot 或 `addonAfter` prop。
91
+ */
92
+ readonly append: {
93
+ readonly type: StringConstructor;
94
+ readonly default: "";
95
+ };
96
+ /**
97
+ * 左侧 addon 内容(字符串或 slot 同名 `addon-before`)。
98
+ */
99
+ readonly addonBefore: {
100
+ readonly type: StringConstructor;
101
+ readonly default: "";
102
+ };
103
+ /**
104
+ * 右侧 addon 内容(字符串或 slot 同名 `addon-after`)。
105
+ */
106
+ readonly addonAfter: {
107
+ readonly type: StringConstructor;
108
+ readonly default: "";
109
+ };
110
+ /**
111
+ * 最大长度(同时透传给原生 `maxlength`)。
112
+ */
113
+ readonly maxLength: {
114
+ readonly type: NumberConstructor;
115
+ readonly default: undefined;
116
+ };
117
+ /**
118
+ * 显示字符计数。`true` 用内置格式 `count[/maxLength]`;对象 `{ formatter }` 自定义。
119
+ */
120
+ readonly showCount: {
121
+ readonly type: PropType<InputShowCount>;
122
+ readonly default: false;
123
+ };
124
+ /**
125
+ * 校验状态。`'error' | 'warning'`,Form 联动会自动透传。
126
+ */
127
+ readonly status: {
128
+ readonly type: PropType<InputStatus>;
129
+ readonly default: "";
130
+ };
131
+ /**
132
+ * 录入组件统一 variant 形态。
133
+ */
134
+ readonly variant: {
135
+ readonly type: PropType<InputVariant>;
136
+ readonly default: "outlined";
137
+ };
138
+ /**
139
+ * 非受控模式初始值。设置后首次挂载从 `defaultValue` 取值,之后忽略;与 `v-model` 并存。
140
+ */
141
+ readonly defaultValue: {
142
+ readonly type: StringConstructor;
143
+ readonly default: undefined;
144
+ };
145
+ readonly modelValue: {
146
+ readonly type: StringConstructor;
147
+ readonly default: "";
148
+ };
149
+ /**
150
+ * 语义化 DOM className 注入。可用 key:`root` / `wrapper` / `input`。
151
+ */
152
+ readonly classNames: {
153
+ readonly type: PropType<CcSemanticClasses>;
154
+ readonly default: undefined;
155
+ };
156
+ /**
157
+ * 语义化 DOM style 注入。可用 key 与 classNames 一致。
158
+ */
159
+ readonly styles: {
160
+ readonly type: PropType<CcSemanticStyles>;
161
+ readonly default: undefined;
162
+ };
163
+ };
164
+ export type InputProps = ExtractPropTypes<typeof inputProps>;
@@ -0,0 +1,74 @@
1
+
2
+ declare const _default: import("vue").DefineComponent<{
3
+ readonly type: import("./input-types").InputType;
4
+ readonly size: import("./input-types").InputSize;
5
+ readonly disabled: boolean;
6
+ readonly modelValue: string;
7
+ readonly placeholder: string;
8
+ readonly status: import("./input-types").InputStatus;
9
+ readonly variant: import("./input-types").InputVariant;
10
+ readonly clearable: boolean;
11
+ readonly readonly: boolean;
12
+ readonly showPassword: boolean;
13
+ readonly prepend: string;
14
+ readonly append: string;
15
+ readonly addonBefore: string;
16
+ readonly addonAfter: string;
17
+ readonly showCount: import("./input-types").InputShowCount;
18
+ readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
19
+ readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
20
+ readonly defaultValue?: string | undefined;
21
+ readonly allowClear?: import("./input-types").InputAllowClear | undefined;
22
+ readonly maxLength?: number | undefined;
23
+ }, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "change" | "clear" | "blur" | "focus" | "update:modelValue" | "press-enter")[], "input" | "change" | "clear" | "blur" | "focus" | "update:modelValue" | "press-enter", import("vue").PublicProps, Readonly<{
24
+ readonly type: import("./input-types").InputType;
25
+ readonly size: import("./input-types").InputSize;
26
+ readonly disabled: boolean;
27
+ readonly modelValue: string;
28
+ readonly placeholder: string;
29
+ readonly status: import("./input-types").InputStatus;
30
+ readonly variant: import("./input-types").InputVariant;
31
+ readonly clearable: boolean;
32
+ readonly readonly: boolean;
33
+ readonly showPassword: boolean;
34
+ readonly prepend: string;
35
+ readonly append: string;
36
+ readonly addonBefore: string;
37
+ readonly addonAfter: string;
38
+ readonly showCount: import("./input-types").InputShowCount;
39
+ readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
40
+ readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
41
+ readonly defaultValue?: string | undefined;
42
+ readonly allowClear?: import("./input-types").InputAllowClear | undefined;
43
+ readonly maxLength?: number | undefined;
44
+ }> & Readonly<{
45
+ onChange?: ((...args: any[]) => any) | undefined;
46
+ onInput?: ((...args: any[]) => any) | undefined;
47
+ onBlur?: ((...args: any[]) => any) | undefined;
48
+ onFocus?: ((...args: any[]) => any) | undefined;
49
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
50
+ onClear?: ((...args: any[]) => any) | undefined;
51
+ "onPress-enter"?: ((...args: any[]) => any) | undefined;
52
+ }>, {
53
+ readonly type: import("./input-types").InputType;
54
+ readonly size: import("./input-types").InputSize;
55
+ readonly disabled: boolean;
56
+ readonly classNames: import("../../shared/hooks/use-semantic").CcSemanticClasses;
57
+ readonly styles: import("../../shared/hooks/use-semantic").CcSemanticStyles;
58
+ readonly modelValue: string;
59
+ readonly defaultValue: string;
60
+ readonly placeholder: string;
61
+ readonly allowClear: import("./input-types").InputAllowClear;
62
+ readonly status: import("./input-types").InputStatus;
63
+ readonly variant: import("./input-types").InputVariant;
64
+ readonly clearable: boolean;
65
+ readonly readonly: boolean;
66
+ readonly showPassword: boolean;
67
+ readonly prepend: string;
68
+ readonly append: string;
69
+ readonly addonBefore: string;
70
+ readonly addonAfter: string;
71
+ readonly maxLength: number;
72
+ readonly showCount: import("./input-types").InputShowCount;
73
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
74
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { App } from 'vue';
2
+ import InputNumber from './src/input-number';
3
+ export { InputNumber };
4
+ declare const _default: {
5
+ title: string;
6
+ category: string;
7
+ status: string;
8
+ install(app: App): void;
9
+ };
10
+ export default _default;
@@ -0,0 +1,165 @@
1
+ import type { ExtractPropTypes, PropType } from 'vue';
2
+ import type { CcSemanticClasses, CcSemanticStyles } from '../../shared/hooks/use-semantic';
3
+ /**
4
+ * 数字输入框的值类型
5
+ * - number: 有效的数字值
6
+ * - undefined: 空值(当 allowEmpty 为 true 时)
7
+ */
8
+ export type InputNumberValue = number | undefined;
9
+ /**
10
+ * 输入框尺寸类型。
11
+ *
12
+ * - 推荐:`'large' | 'default' | 'small'`(与库内其他录入组件统一)
13
+ * - 兼容:`'lg' | 'md' | 'sm'`(旧值,运行时自动映射到推荐值;下一大版本移除)
14
+ */
15
+ export type ISize = 'large' | 'default' | 'small' | 'lg' | 'md' | 'sm';
16
+ /**
17
+ * 控制按钮位置类型
18
+ */
19
+ export type ControlsPosition = 'right' | 'both';
20
+ /**
21
+ * 录入组件统一 variant 形态。
22
+ *
23
+ * - `outlined`(默认):1px solid 边框
24
+ * - `filled`:无边框 + 浅灰背景填充
25
+ * - `borderless`:完全无边框无背景
26
+ * - `underlined`:仅底部 1px 边框
27
+ */
28
+ export type InputNumberVariant = 'outlined' | 'filled' | 'borderless' | 'underlined';
29
+ /**
30
+ * 校验状态。Form 联动会自动透传。
31
+ */
32
+ export type InputNumberStatus = '' | 'error' | 'warning';
33
+ /**
34
+ * 格式化选项接口
35
+ */
36
+ export interface FormatOptions {
37
+ /** 数字精度,小数点后保留位数 */
38
+ precision?: number;
39
+ /** 是否允许空值 */
40
+ allowEmpty: boolean;
41
+ /** 最小值 */
42
+ min: number;
43
+ /** 最大值 */
44
+ max: number;
45
+ }
46
+ export declare const inputNumberProps: {
47
+ readonly modelValue: {
48
+ readonly type: PropType<number | undefined>;
49
+ readonly default: undefined;
50
+ };
51
+ readonly step: {
52
+ readonly type: NumberConstructor;
53
+ readonly default: 1;
54
+ };
55
+ readonly placeholder: {
56
+ readonly type: StringConstructor;
57
+ readonly default: "";
58
+ };
59
+ readonly max: {
60
+ readonly type: NumberConstructor;
61
+ readonly default: number;
62
+ };
63
+ readonly min: {
64
+ readonly type: NumberConstructor;
65
+ readonly default: number;
66
+ };
67
+ readonly disabled: {
68
+ readonly type: BooleanConstructor;
69
+ readonly default: false;
70
+ };
71
+ readonly readonly: {
72
+ readonly type: BooleanConstructor;
73
+ readonly default: false;
74
+ };
75
+ readonly precision: {
76
+ readonly type: PropType<number | undefined>;
77
+ readonly default: undefined;
78
+ };
79
+ readonly size: {
80
+ readonly type: PropType<ISize>;
81
+ readonly default: "default";
82
+ };
83
+ readonly reg: {
84
+ readonly type: PropType<RegExp | string | undefined>;
85
+ readonly default: undefined;
86
+ };
87
+ readonly allowEmpty: {
88
+ readonly type: BooleanConstructor;
89
+ readonly default: false;
90
+ };
91
+ readonly showGlowStyle: {
92
+ readonly type: BooleanConstructor;
93
+ readonly default: true;
94
+ };
95
+ readonly controls: {
96
+ readonly type: BooleanConstructor;
97
+ readonly default: true;
98
+ };
99
+ readonly controlsPosition: {
100
+ readonly type: PropType<ControlsPosition>;
101
+ readonly default: "both";
102
+ };
103
+ /**
104
+ * 录入组件统一 variant 形态。
105
+ * `'outlined' | 'filled' | 'borderless' | 'underlined'`,默认 `'outlined'`。
106
+ */
107
+ readonly variant: {
108
+ readonly type: PropType<InputNumberVariant>;
109
+ readonly default: "outlined";
110
+ };
111
+ /**
112
+ * 校验状态。`'error' | 'warning'`,Form 联动会自动透传。
113
+ */
114
+ readonly status: {
115
+ readonly type: PropType<InputNumberStatus>;
116
+ readonly default: "";
117
+ };
118
+ /**
119
+ * 语义化 DOM className 注入。可用 key:`root` / `input` / `controls`。
120
+ */
121
+ readonly classNames: {
122
+ readonly type: PropType<CcSemanticClasses>;
123
+ readonly default: undefined;
124
+ };
125
+ /**
126
+ * 语义化 DOM style 注入。可用 key 与 classNames 一致。
127
+ */
128
+ readonly styles: {
129
+ readonly type: PropType<CcSemanticStyles>;
130
+ readonly default: undefined;
131
+ };
132
+ };
133
+ export type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>;
134
+ /**
135
+ * 数字输入框事件类型定义
136
+ */
137
+ export interface InputNumberEmits {
138
+ /** 值更新事件 */
139
+ 'update:modelValue': [value: InputNumberValue];
140
+ /** 值变化事件 */
141
+ change: [currentVal: InputNumberValue, oldVal: InputNumberValue];
142
+ /** 失去焦点事件 */
143
+ blur: [event: FocusEvent];
144
+ /** 获得焦点事件 */
145
+ focus: [event: FocusEvent];
146
+ /** 输入事件 */
147
+ input: [currentValue: InputNumberValue];
148
+ }
149
+ /**
150
+ * 数字输入框实例类型
151
+ */
152
+ export interface InputNumberInstance {
153
+ /** 获取当前值 */
154
+ getValue: () => InputNumberValue;
155
+ /** 设置值 */
156
+ setValue: (value: InputNumberValue) => void;
157
+ /** 聚焦 */
158
+ focus: () => void;
159
+ /** 失焦 */
160
+ blur: () => void;
161
+ /** 增加值 */
162
+ increase: () => void;
163
+ /** 减少值 */
164
+ decrease: () => void;
165
+ }
@@ -0,0 +1,66 @@
1
+
2
+ declare const _default: import("vue").DefineComponent<{
3
+ readonly size: import("./input-number-types").ISize;
4
+ readonly disabled: boolean;
5
+ readonly placeholder: string;
6
+ readonly status: import("./input-number-types").InputNumberStatus;
7
+ readonly variant: import("./input-number-types").InputNumberVariant;
8
+ readonly min: number;
9
+ readonly max: number;
10
+ readonly readonly: boolean;
11
+ readonly step: number;
12
+ readonly allowEmpty: boolean;
13
+ readonly showGlowStyle: boolean;
14
+ readonly controls: boolean;
15
+ readonly controlsPosition: import("./input-number-types").ControlsPosition;
16
+ readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
17
+ readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
18
+ readonly modelValue?: number | undefined;
19
+ readonly precision?: number | undefined;
20
+ readonly reg?: string | RegExp | undefined;
21
+ }, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "change" | "blur" | "focus" | "update:modelValue")[], "input" | "change" | "blur" | "focus" | "update:modelValue", import("vue").PublicProps, Readonly<{
22
+ readonly size: import("./input-number-types").ISize;
23
+ readonly disabled: boolean;
24
+ readonly placeholder: string;
25
+ readonly status: import("./input-number-types").InputNumberStatus;
26
+ readonly variant: import("./input-number-types").InputNumberVariant;
27
+ readonly min: number;
28
+ readonly max: number;
29
+ readonly readonly: boolean;
30
+ readonly step: number;
31
+ readonly allowEmpty: boolean;
32
+ readonly showGlowStyle: boolean;
33
+ readonly controls: boolean;
34
+ readonly controlsPosition: import("./input-number-types").ControlsPosition;
35
+ readonly classNames?: import("../../shared/hooks/use-semantic").CcSemanticClasses | undefined;
36
+ readonly styles?: import("../../shared/hooks/use-semantic").CcSemanticStyles | undefined;
37
+ readonly modelValue?: number | undefined;
38
+ readonly precision?: number | undefined;
39
+ readonly reg?: string | RegExp | undefined;
40
+ }> & Readonly<{
41
+ onChange?: ((...args: any[]) => any) | undefined;
42
+ onInput?: ((...args: any[]) => any) | undefined;
43
+ onBlur?: ((...args: any[]) => any) | undefined;
44
+ onFocus?: ((...args: any[]) => any) | undefined;
45
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
46
+ }>, {
47
+ readonly size: import("./input-number-types").ISize;
48
+ readonly disabled: boolean;
49
+ readonly classNames: import("../../shared/hooks/use-semantic").CcSemanticClasses;
50
+ readonly styles: import("../../shared/hooks/use-semantic").CcSemanticStyles;
51
+ readonly modelValue: number | undefined;
52
+ readonly placeholder: string;
53
+ readonly status: import("./input-number-types").InputNumberStatus;
54
+ readonly variant: import("./input-number-types").InputNumberVariant;
55
+ readonly min: number;
56
+ readonly max: number;
57
+ readonly readonly: boolean;
58
+ readonly step: number;
59
+ readonly precision: number | undefined;
60
+ readonly reg: string | RegExp | undefined;
61
+ readonly allowEmpty: boolean;
62
+ readonly showGlowStyle: boolean;
63
+ readonly controls: boolean;
64
+ readonly controlsPosition: import("./input-number-types").ControlsPosition;
65
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
66
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import type { App } from 'vue';
2
+ import InputOtp from './src/input-otp';
3
+ export { InputOtp };
4
+ export type { InputOtpFormatter, InputOtpProps, InputOtpSize, InputOtpStatus } from './src/input-otp-types';
5
+ declare const _default: {
6
+ title: string;
7
+ category: string;
8
+ status: string;
9
+ install(app: App): void;
10
+ };
11
+ export default _default;
@@ -0,0 +1,186 @@
1
+ import { computed as e, defineComponent as t, h as n, nextTick as r, onMounted as i, ref as a, watch as o } from "vue";
2
+ //#region ../ccui/ui/shared/hooks/use-namespace.ts
3
+ function s(e, t, n) {
4
+ let r = e;
5
+ return t && (r += `__${t}`), n && (r += `--${n}`), r;
6
+ }
7
+ function c(e, t = !1) {
8
+ let n = t ? `.ccui-${e}` : `ccui-${e}`;
9
+ return {
10
+ b: () => s(n),
11
+ e: (e) => e ? s(n, e) : "",
12
+ m: (e) => e ? s(n, "", e) : "",
13
+ em: (e, t) => e && t ? s(n, e, t) : "",
14
+ is: (e) => `is-${e}`
15
+ };
16
+ }
17
+ //#endregion
18
+ //#region ../ccui/ui/input-otp/src/input-otp-types.ts
19
+ var l = {
20
+ modelValue: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ defaultValue: {
25
+ type: String,
26
+ default: void 0
27
+ },
28
+ length: {
29
+ type: Number,
30
+ default: 6
31
+ },
32
+ autoFocus: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ disabled: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ mask: {
41
+ type: [Boolean, String],
42
+ default: !1
43
+ },
44
+ formatter: {
45
+ type: Function,
46
+ default: void 0
47
+ },
48
+ size: {
49
+ type: String,
50
+ default: "default"
51
+ },
52
+ status: {
53
+ type: String,
54
+ default: ""
55
+ }
56
+ };
57
+ //#endregion
58
+ //#region ../ccui/ui/input-otp/src/input-otp.tsx
59
+ function u(e) {
60
+ return e ? Array.from(e)[0] ?? "" : "";
61
+ }
62
+ function d(e) {
63
+ return e === !0 ? "•" : typeof e == "string" && e.length > 0 ? u(e) : null;
64
+ }
65
+ var f = /* @__PURE__ */ t({
66
+ name: "CInputOtp",
67
+ props: l,
68
+ emits: [
69
+ "update:modelValue",
70
+ "change",
71
+ "focus",
72
+ "blur"
73
+ ],
74
+ setup(t, { emit: s }) {
75
+ let l = c("input-otp"), f = a([]), p = (e) => {
76
+ let n = Array.from({ length: t.length }, () => ""), r = Array.from(e ?? "");
77
+ for (let e = 0; e < t.length; e++) n[e] = r[e] ?? "";
78
+ return n;
79
+ }, m = (e) => e.join(""), h = a(p(t.modelValue === "" ? t.defaultValue ?? "" : t.modelValue)), g = (e) => (t) => {
80
+ f.value[e] = t ?? null;
81
+ }, _ = (e) => {
82
+ let t = f.value[e];
83
+ t && (t.focus(), t.select?.());
84
+ }, v = (e) => {
85
+ let n = u(e);
86
+ return n ? t.formatter ? u(t.formatter(n)) : n : "";
87
+ }, y = (e) => {
88
+ let t = m(h.value);
89
+ s("update:modelValue", t), s("change", t, { index: e });
90
+ }, b = (e, n) => {
91
+ let i = n.target, a = i.value, o = Array.from(a);
92
+ if (o.length === 0) {
93
+ h.value[e] = "", y(e);
94
+ return;
95
+ }
96
+ let s = e;
97
+ for (let e of o) {
98
+ if (s >= t.length) break;
99
+ let n = v(e);
100
+ n && (h.value[s] = n, s++);
101
+ }
102
+ i.value = h.value[e] ?? "", y(e);
103
+ let c = Math.min(s, t.length - 1);
104
+ c !== e && r(() => _(c));
105
+ }, x = (e, n) => {
106
+ if (n.key === "Backspace") {
107
+ h.value[e] ? (h.value[e] = "", y(e)) : e > 0 && (n.preventDefault(), h.value[e - 1] = "", y(e - 1), r(() => _(e - 1)));
108
+ return;
109
+ }
110
+ if (n.key === "ArrowLeft" && e > 0) {
111
+ n.preventDefault(), _(e - 1);
112
+ return;
113
+ }
114
+ n.key === "ArrowRight" && e < t.length - 1 && (n.preventDefault(), _(e + 1));
115
+ }, S = (e, n) => {
116
+ let i = n.clipboardData?.getData("text") ?? "";
117
+ if (!i) return;
118
+ n.preventDefault();
119
+ let a = Array.from(i), o = e;
120
+ for (let e of a) {
121
+ if (o >= t.length) break;
122
+ let n = v(e);
123
+ n && (h.value[o] = n, o++);
124
+ }
125
+ y(e);
126
+ let s = Math.min(o, t.length - 1);
127
+ r(() => _(s));
128
+ }, C = (e) => s("focus", e), w = (e) => s("blur", e);
129
+ o(() => t.modelValue, (e) => {
130
+ e !== m(h.value) && (h.value = p(e));
131
+ }), o(() => t.length, () => {
132
+ h.value = p(m(h.value));
133
+ }), i(() => {
134
+ t.autoFocus && _(0);
135
+ });
136
+ let T = e(() => d(t.mask)), E = e(() => ({
137
+ [l.b()]: !0,
138
+ [l.m(t.size)]: !!t.size,
139
+ [l.m("disabled")]: t.disabled,
140
+ [l.m(`status-${t.status}`)]: !!t.status
141
+ }));
142
+ return () => n("div", {
143
+ class: E.value,
144
+ role: "group",
145
+ "aria-label": "OTP input",
146
+ "aria-disabled": t.disabled ? !0 : void 0,
147
+ "aria-invalid": t.status === "error" ? !0 : void 0
148
+ }, h.value.map((e, r) => {
149
+ let i = e && T.value ? T.value : e;
150
+ return n("input", {
151
+ key: r,
152
+ ref: g(r),
153
+ class: l.e("cell"),
154
+ type: "text",
155
+ inputmode: "numeric",
156
+ maxlength: 1,
157
+ autocomplete: r === 0 ? "one-time-code" : "off",
158
+ value: i,
159
+ disabled: t.disabled,
160
+ "aria-label": `OTP cell ${r + 1}`,
161
+ "aria-disabled": t.disabled ? !0 : void 0,
162
+ "aria-invalid": t.status === "error" ? !0 : void 0,
163
+ onInput: (e) => b(r, e),
164
+ onKeydown: (e) => x(r, e),
165
+ onPaste: (e) => S(r, e),
166
+ onFocus: C,
167
+ onBlur: w
168
+ });
169
+ }));
170
+ }
171
+ });
172
+ //#endregion
173
+ //#region ../ccui/ui/input-otp/index.ts
174
+ f.install = function(e) {
175
+ e.component(f.name, f);
176
+ };
177
+ var p = {
178
+ title: "InputOtp 一次性密码",
179
+ category: "数据录入",
180
+ status: "85%",
181
+ install(e) {
182
+ e.component(f.name, f);
183
+ }
184
+ };
185
+ //#endregion
186
+ export { f as InputOtp, p as default };