@routa/ui-vue 0.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 (504) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +52 -0
  3. package/base.css +1 -0
  4. package/dist/autocomplete/AutoComplete.vue.d.ts +336 -0
  5. package/dist/autocomplete/index.d.ts +298 -0
  6. package/dist/autocomplete/index.js +4 -0
  7. package/dist/autocomplete/index.mjs +321 -0
  8. package/dist/autocomplete/types.d.ts +58 -0
  9. package/dist/avatar/Avatar.vue.d.ts +36 -0
  10. package/dist/avatar/AvatarGroup.vue.d.ts +7 -0
  11. package/dist/avatar/index.d.ts +7 -0
  12. package/dist/avatar/index.js +3 -0
  13. package/dist/avatar/index.mjs +192 -0
  14. package/dist/avatar/types.d.ts +111 -0
  15. package/dist/badge/Badge.vue.d.ts +25 -0
  16. package/dist/badge/index.d.ts +5 -0
  17. package/dist/badge/index.js +2 -0
  18. package/dist/badge/index.mjs +72 -0
  19. package/dist/badge/types.d.ts +86 -0
  20. package/dist/breadcrumb/Breadcrumb.vue.d.ts +38 -0
  21. package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +48 -0
  22. package/dist/breadcrumb/index.d.ts +7 -0
  23. package/dist/breadcrumb/index.js +2 -0
  24. package/dist/breadcrumb/index.mjs +87 -0
  25. package/dist/breadcrumb/types.d.ts +28 -0
  26. package/dist/button/Button.vue.d.ts +27 -0
  27. package/dist/button/index.d.ts +5 -0
  28. package/dist/button/index.js +2 -0
  29. package/dist/button/index.mjs +10 -0
  30. package/dist/button/types.d.ts +14 -0
  31. package/dist/card/Card.vue.d.ts +49 -0
  32. package/dist/card/index.d.ts +72 -0
  33. package/dist/card/index.js +2 -0
  34. package/dist/card/index.mjs +60 -0
  35. package/dist/card/types.d.ts +16 -0
  36. package/dist/carousel/Carousel.vue.d.ts +134 -0
  37. package/dist/carousel/CarouselItem.vue.d.ts +23 -0
  38. package/dist/carousel/index.d.ts +250 -0
  39. package/dist/carousel/index.js +2 -0
  40. package/dist/carousel/index.mjs +354 -0
  41. package/dist/carousel/types.d.ts +97 -0
  42. package/dist/cascader/Cascader.vue.d.ts +109 -0
  43. package/dist/cascader/CascaderPanel.vue.d.ts +55 -0
  44. package/dist/cascader/index.d.ts +110 -0
  45. package/dist/cascader/index.js +5 -0
  46. package/dist/cascader/index.mjs +370 -0
  47. package/dist/cascader/types.d.ts +54 -0
  48. package/dist/checkbox/Checkbox.vue.d.ts +99 -0
  49. package/dist/checkbox/CheckboxGroup.vue.d.ts +59 -0
  50. package/dist/checkbox/constants.d.ts +2 -0
  51. package/dist/checkbox/index.d.ts +9 -0
  52. package/dist/checkbox/index.js +2 -0
  53. package/dist/checkbox/index.mjs +70 -0
  54. package/dist/checkbox/types.d.ts +64 -0
  55. package/dist/chunks/Button.vue_vue_type_script_setup_true_lang-BthtEkGw.mjs +170 -0
  56. package/dist/chunks/Button.vue_vue_type_script_setup_true_lang-Do1NtIFC.js +1 -0
  57. package/dist/chunks/Checkbox.vue_vue_type_script_setup_true_lang-DxecbRJE.js +1 -0
  58. package/dist/chunks/Checkbox.vue_vue_type_script_setup_true_lang-fOXXjwnz.mjs +289 -0
  59. package/dist/chunks/Icon.vue_vue_type_script_setup_true_lang-LQ-KuJ6a.mjs +57 -0
  60. package/dist/chunks/Icon.vue_vue_type_script_setup_true_lang-YDWguTmi.js +1 -0
  61. package/dist/chunks/Input.vue_vue_type_script_setup_true_lang-8x2HE2Cj.js +1 -0
  62. package/dist/chunks/Input.vue_vue_type_script_setup_true_lang-PeDZ7smO.mjs +391 -0
  63. package/dist/chunks/Popover.vue_vue_type_script_setup_true_lang-CVWbekIQ.mjs +176 -0
  64. package/dist/chunks/Popover.vue_vue_type_script_setup_true_lang-TF9OnqB0.js +1 -0
  65. package/dist/chunks/Scrollbar.vue_vue_type_script_setup_true_lang-CtBz7Ha9.js +1 -0
  66. package/dist/chunks/Scrollbar.vue_vue_type_script_setup_true_lang-kKvR0Hz3.mjs +124 -0
  67. package/dist/chunks/TimePanel.vue_vue_type_script_setup_true_lang-BNTM3OeU.js +1 -0
  68. package/dist/chunks/TimePanel.vue_vue_type_script_setup_true_lang-BxuIhLsF.mjs +170 -0
  69. package/dist/chunks/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  70. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  71. package/dist/chunks/auto-update-6n8Xn1EH.js +1 -0
  72. package/dist/chunks/auto-update-Dw-2qIsQ.mjs +59 -0
  73. package/dist/chunks/color-BBpRjg5d.mjs +32 -0
  74. package/dist/chunks/color-m1q_rZ68.js +1 -0
  75. package/dist/chunks/context-BEsW77hb.js +1 -0
  76. package/dist/chunks/context-BlK-PJ3n.mjs +5 -0
  77. package/dist/chunks/controller-37WpkEdZ.js +1 -0
  78. package/dist/chunks/controller-3cWaJJMW.mjs +318 -0
  79. package/dist/chunks/controller-BQhkT8pi.mjs +95 -0
  80. package/dist/chunks/controller-BnNZOOMj.js +1 -0
  81. package/dist/chunks/controller-CV-a983I.js +1 -0
  82. package/dist/chunks/controller-D1BTHmfO.js +1 -0
  83. package/dist/chunks/controller-DZp6lWY1.mjs +96 -0
  84. package/dist/chunks/controller-DdEBnv9V.mjs +82 -0
  85. package/dist/chunks/id-CfLxBW9l.js +1 -0
  86. package/dist/chunks/id-VS2potoV.mjs +7 -0
  87. package/dist/chunks/index-B0yEC3RG.mjs +136 -0
  88. package/dist/chunks/index-B4GP5rXr.mjs +170 -0
  89. package/dist/chunks/index-DWAWrVaT.js +1 -0
  90. package/dist/chunks/index-RYR-1S7A.js +1 -0
  91. package/dist/chunks/install-DJNxamQ0.mjs +10 -0
  92. package/dist/chunks/install-gnn2dOg9.js +1 -0
  93. package/dist/chunks/manager-BUdQK4AD.mjs +156 -0
  94. package/dist/chunks/manager-C-VTKQvg.mjs +85 -0
  95. package/dist/chunks/manager-C0AUxQ1I.js +2 -0
  96. package/dist/chunks/manager-d-AJMlyO.js +1 -0
  97. package/dist/chunks/modal-BiivqQQz.mjs +86 -0
  98. package/dist/chunks/modal-CRbFkVcm.js +1 -0
  99. package/dist/chunks/responsive-BYScjISa.js +1 -0
  100. package/dist/chunks/responsive-jCVnPx1a.mjs +49 -0
  101. package/dist/chunks/style-C-58-Hx4.mjs +7 -0
  102. package/dist/chunks/style-CjCLKeeU.js +1 -0
  103. package/dist/chunks/types-CXAGM03M.mjs +92 -0
  104. package/dist/chunks/types-DS78vyi2.js +1 -0
  105. package/dist/chunks/use-form-item-CloIcyon.js +1 -0
  106. package/dist/chunks/use-form-item-CqDbWCiU.mjs +16 -0
  107. package/dist/chunks/use-id-BycaM3-h.js +1 -0
  108. package/dist/chunks/use-id-D3casveg.mjs +9 -0
  109. package/dist/chunks/use-signals-Bz1smiXh.js +1 -0
  110. package/dist/chunks/use-signals-CE1T2jXK.mjs +50 -0
  111. package/dist/chunks/useCanvasRenderer-BPTNzGy0.mjs +87 -0
  112. package/dist/chunks/useCanvasRenderer-D77k3JCQ.js +1 -0
  113. package/dist/chunks/useResizeObserver-Cki4q_CI.mjs +60 -0
  114. package/dist/chunks/useResizeObserver-DMkB1OF3.js +1 -0
  115. package/dist/chunks/z-index-CNZLw1v7.js +1 -0
  116. package/dist/chunks/z-index-D9ecXoNe.mjs +14 -0
  117. package/dist/collapse/Collapse.vue.d.ts +30 -0
  118. package/dist/collapse/CollapseItem.vue.d.ts +20 -0
  119. package/dist/collapse/index.d.ts +8 -0
  120. package/dist/collapse/index.js +3 -0
  121. package/dist/collapse/index.mjs +144 -0
  122. package/dist/collapse/types.d.ts +54 -0
  123. package/dist/color-picker/AlphaSlider.vue.d.ts +38 -0
  124. package/dist/color-picker/ColorPicker.vue.d.ts +57 -0
  125. package/dist/color-picker/HueSlider.vue.d.ts +28 -0
  126. package/dist/color-picker/SaturationPanel.vue.d.ts +46 -0
  127. package/dist/color-picker/index.d.ts +56 -0
  128. package/dist/color-picker/index.js +6 -0
  129. package/dist/color-picker/index.mjs +481 -0
  130. package/dist/config-provider/ConfigProvider.vue.d.ts +64 -0
  131. package/dist/config-provider/context.d.ts +888 -0
  132. package/dist/config-provider/index.d.ts +97 -0
  133. package/dist/config-provider/index.js +1 -0
  134. package/dist/config-provider/index.mjs +396 -0
  135. package/dist/config-provider/resolver.d.ts +2 -0
  136. package/dist/config-provider/runtime.d.ts +5 -0
  137. package/dist/config-provider/teleport.d.ts +6 -0
  138. package/dist/config-provider/types.d.ts +131 -0
  139. package/dist/context-menu/ContextMenu.vue.d.ts +87 -0
  140. package/dist/context-menu/index.d.ts +5 -0
  141. package/dist/context-menu/index.js +3 -0
  142. package/dist/context-menu/index.mjs +215 -0
  143. package/dist/context-menu/types.d.ts +34 -0
  144. package/dist/date-picker/Calendar.vue.d.ts +22 -0
  145. package/dist/date-picker/DatePicker.vue.d.ts +31 -0
  146. package/dist/date-picker/DateRangePicker.vue.d.ts +26 -0
  147. package/dist/date-picker/DateTimePicker.vue.d.ts +27 -0
  148. package/dist/date-picker/DateTimeRangePicker.vue.d.ts +27 -0
  149. package/dist/date-picker/index.d.ts +13 -0
  150. package/dist/date-picker/index.js +6 -0
  151. package/dist/date-picker/index.mjs +1229 -0
  152. package/dist/date-picker/utils.d.ts +3 -0
  153. package/dist/dialog/Dialog.vue.d.ts +97 -0
  154. package/dist/dialog/index.d.ts +5 -0
  155. package/dist/dialog/index.js +2 -0
  156. package/dist/dialog/index.mjs +161 -0
  157. package/dist/dialog/types.d.ts +38 -0
  158. package/dist/divider/Divider.vue.d.ts +74 -0
  159. package/dist/divider/index.d.ts +5 -0
  160. package/dist/divider/index.js +2 -0
  161. package/dist/divider/index.mjs +96 -0
  162. package/dist/divider/types.d.ts +57 -0
  163. package/dist/drawer/Drawer.vue.d.ts +106 -0
  164. package/dist/drawer/index.d.ts +5 -0
  165. package/dist/drawer/index.js +2 -0
  166. package/dist/drawer/index.mjs +168 -0
  167. package/dist/drawer/types.d.ts +42 -0
  168. package/dist/dropdown/Dropdown.vue.d.ts +109 -0
  169. package/dist/dropdown/DropdownItem.vue.d.ts +60 -0
  170. package/dist/dropdown/index.d.ts +7 -0
  171. package/dist/dropdown/index.js +3 -0
  172. package/dist/dropdown/index.mjs +310 -0
  173. package/dist/dropdown/types.d.ts +87 -0
  174. package/dist/empty/Empty.vue.d.ts +47 -0
  175. package/dist/empty/index.d.ts +70 -0
  176. package/dist/empty/index.js +2 -0
  177. package/dist/empty/index.mjs +50 -0
  178. package/dist/empty/types.d.ts +16 -0
  179. package/dist/feedback-runtime/manager.d.ts +109 -0
  180. package/dist/feedback-runtime/mount.d.ts +5 -0
  181. package/dist/feedback-runtime/types.d.ts +27 -0
  182. package/dist/form/Form.vue.d.ts +37 -0
  183. package/dist/form/FormItem.vue.d.ts +32 -0
  184. package/dist/form/FormSchemaFields.vue.d.ts +7 -0
  185. package/dist/form/context.d.ts +33 -0
  186. package/dist/form/index.d.ts +6 -0
  187. package/dist/form/index.js +2 -0
  188. package/dist/form/index.mjs +389 -0
  189. package/dist/grid/Col.vue.d.ts +101 -0
  190. package/dist/grid/Row.vue.d.ts +56 -0
  191. package/dist/grid/index.d.ts +7 -0
  192. package/dist/grid/index.js +2 -0
  193. package/dist/grid/index.mjs +182 -0
  194. package/dist/grid/responsive.d.ts +9 -0
  195. package/dist/grid/types.d.ts +85 -0
  196. package/dist/hooks/index.d.ts +3 -0
  197. package/dist/hooks/index.js +1 -0
  198. package/dist/hooks/index.mjs +9 -0
  199. package/dist/hooks/use-form-item.d.ts +13 -0
  200. package/dist/hooks/use-id.d.ts +5 -0
  201. package/dist/hooks/useCanvasRenderer.d.ts +10 -0
  202. package/dist/hooks/useImageLoader.d.ts +20 -0
  203. package/dist/hooks/useResizeObserver.d.ts +17 -0
  204. package/dist/icon/Icon.vue.d.ts +20 -0
  205. package/dist/icon/index.d.ts +5 -0
  206. package/dist/icon/index.js +2 -0
  207. package/dist/icon/index.mjs +10 -0
  208. package/dist/icon/types.d.ts +45 -0
  209. package/dist/image/Image.vue.d.ts +38 -0
  210. package/dist/image/index.d.ts +5 -0
  211. package/dist/image/index.js +2 -0
  212. package/dist/image/index.mjs +128 -0
  213. package/dist/image/types.d.ts +10 -0
  214. package/dist/index.d.ts +59 -0
  215. package/dist/index.js +1 -0
  216. package/dist/index.mjs +362 -0
  217. package/dist/input/Input.vue.d.ts +47 -0
  218. package/dist/input/index.d.ts +5 -0
  219. package/dist/input/index.js +2 -0
  220. package/dist/input/index.mjs +10 -0
  221. package/dist/input/types.d.ts +51 -0
  222. package/dist/input-number/InputNumber.vue.d.ts +119 -0
  223. package/dist/input-number/index.d.ts +5 -0
  224. package/dist/input-number/index.js +2 -0
  225. package/dist/input-number/index.mjs +312 -0
  226. package/dist/input-number/types.d.ts +58 -0
  227. package/dist/layout/Content.vue.d.ts +29 -0
  228. package/dist/layout/Footer.vue.d.ts +29 -0
  229. package/dist/layout/Header.vue.d.ts +29 -0
  230. package/dist/layout/Layout.vue.d.ts +32 -0
  231. package/dist/layout/Sider.vue.d.ts +59 -0
  232. package/dist/layout/index.d.ts +13 -0
  233. package/dist/layout/index.js +2 -0
  234. package/dist/layout/index.mjs +154 -0
  235. package/dist/layout/types.d.ts +51 -0
  236. package/dist/layout-system/responsive.d.ts +4 -0
  237. package/dist/layout-system/types.d.ts +3 -0
  238. package/dist/loading/Loading.vue.d.ts +57 -0
  239. package/dist/loading/LoadingMask.vue.d.ts +8 -0
  240. package/dist/loading/directive.d.ts +5 -0
  241. package/dist/loading/index.d.ts +7 -0
  242. package/dist/loading/index.js +2 -0
  243. package/dist/loading/index.mjs +275 -0
  244. package/dist/loading/types.d.ts +23 -0
  245. package/dist/mentions/Mentions.vue.d.ts +337 -0
  246. package/dist/mentions/index.d.ts +296 -0
  247. package/dist/mentions/index.js +5 -0
  248. package/dist/mentions/index.mjs +357 -0
  249. package/dist/mentions/types.d.ts +55 -0
  250. package/dist/menu/Menu.vue.d.ts +120 -0
  251. package/dist/menu/MenuDivider.vue.d.ts +2 -0
  252. package/dist/menu/MenuGroup.vue.d.ts +29 -0
  253. package/dist/menu/MenuItem.vue.d.ts +48 -0
  254. package/dist/menu/MenuNodeRenderer.vue.d.ts +6 -0
  255. package/dist/menu/SubMenu.vue.d.ts +57 -0
  256. package/dist/menu/index.d.ts +13 -0
  257. package/dist/menu/index.js +2 -0
  258. package/dist/menu/index.mjs +772 -0
  259. package/dist/menu/types.d.ts +126 -0
  260. package/dist/message/MessageHost.vue.d.ts +15 -0
  261. package/dist/message/MessageItem.vue.d.ts +15 -0
  262. package/dist/message/index.d.ts +10 -0
  263. package/dist/message/index.js +2 -0
  264. package/dist/message/index.mjs +199 -0
  265. package/dist/message/runtime.d.ts +149 -0
  266. package/dist/message/types.d.ts +12 -0
  267. package/dist/notification/NotificationHost.vue.d.ts +15 -0
  268. package/dist/notification/NotificationItem.vue.d.ts +15 -0
  269. package/dist/notification/index.d.ts +10 -0
  270. package/dist/notification/index.js +2 -0
  271. package/dist/notification/index.mjs +207 -0
  272. package/dist/notification/runtime.d.ts +155 -0
  273. package/dist/notification/types.d.ts +12 -0
  274. package/dist/otp-input/OTPInput.vue.d.ts +84 -0
  275. package/dist/otp-input/index.d.ts +5 -0
  276. package/dist/otp-input/index.js +2 -0
  277. package/dist/otp-input/index.mjs +216 -0
  278. package/dist/otp-input/types.d.ts +41 -0
  279. package/dist/pagination/Pagination.vue.d.ts +101 -0
  280. package/dist/pagination/index.d.ts +102 -0
  281. package/dist/pagination/index.js +2 -0
  282. package/dist/pagination/index.mjs +260 -0
  283. package/dist/pagination/types.d.ts +48 -0
  284. package/dist/popover/Popover.vue.d.ts +136 -0
  285. package/dist/popover/index.d.ts +5 -0
  286. package/dist/popover/index.js +2 -0
  287. package/dist/popover/index.mjs +13 -0
  288. package/dist/popover/types.d.ts +49 -0
  289. package/dist/radio/Radio.vue.d.ts +30 -0
  290. package/dist/radio/RadioGroup.vue.d.ts +26 -0
  291. package/dist/radio/constants.d.ts +3 -0
  292. package/dist/radio/index.d.ts +7 -0
  293. package/dist/radio/index.js +2 -0
  294. package/dist/radio/index.mjs +273 -0
  295. package/dist/radio/types.d.ts +45 -0
  296. package/dist/rate/Rate.vue.d.ts +139 -0
  297. package/dist/rate/index.d.ts +140 -0
  298. package/dist/rate/index.js +3 -0
  299. package/dist/rate/index.mjs +276 -0
  300. package/dist/rate/types.d.ts +66 -0
  301. package/dist/rich-text/RichText.vue.d.ts +25 -0
  302. package/dist/rich-text/index.d.ts +17 -0
  303. package/dist/rich-text/index.js +2 -0
  304. package/dist/rich-text/index.mjs +312 -0
  305. package/dist/scrollbar/Scrollbar.vue.d.ts +37 -0
  306. package/dist/scrollbar/index.d.ts +5 -0
  307. package/dist/scrollbar/index.js +2 -0
  308. package/dist/scrollbar/index.mjs +10 -0
  309. package/dist/scrollbar/types.d.ts +17 -0
  310. package/dist/select/Option.vue.d.ts +45 -0
  311. package/dist/select/Select.vue.d.ts +136 -0
  312. package/dist/select/index.d.ts +9 -0
  313. package/dist/select/index.js +3 -0
  314. package/dist/select/index.mjs +656 -0
  315. package/dist/select/types.d.ts +92 -0
  316. package/dist/slider/Slider.vue.d.ts +123 -0
  317. package/dist/slider/index.d.ts +5 -0
  318. package/dist/slider/index.js +2 -0
  319. package/dist/slider/index.mjs +326 -0
  320. package/dist/slider/types.d.ts +57 -0
  321. package/dist/space/Space.vue.d.ts +75 -0
  322. package/dist/space/index.d.ts +5 -0
  323. package/dist/space/index.js +2 -0
  324. package/dist/space/index.mjs +104 -0
  325. package/dist/space/types.d.ts +34 -0
  326. package/dist/splitter/Splitter.vue.d.ts +52 -0
  327. package/dist/splitter/SplitterPane.vue.d.ts +38 -0
  328. package/dist/splitter/index.d.ts +7 -0
  329. package/dist/splitter/index.js +2 -0
  330. package/dist/splitter/index.mjs +252 -0
  331. package/dist/splitter/types.d.ts +41 -0
  332. package/dist/splitter/utils.d.ts +6 -0
  333. package/dist/style/Button.css +1 -0
  334. package/dist/style/Checkbox.css +1 -0
  335. package/dist/style/Icon.css +1 -0
  336. package/dist/style/Input.css +1 -0
  337. package/dist/style/Popover.css +1 -0
  338. package/dist/style/Scrollbar.css +1 -0
  339. package/dist/style/TimePanel.css +1 -0
  340. package/dist/style/autocomplete.css +1 -0
  341. package/dist/style/avatar.css +1 -0
  342. package/dist/style/badge.css +1 -0
  343. package/dist/style/base.css +1 -0
  344. package/dist/style/breadcrumb.css +1 -0
  345. package/dist/style/card.css +1 -0
  346. package/dist/style/carousel.css +1 -0
  347. package/dist/style/cascader.css +1 -0
  348. package/dist/style/collapse.css +1 -0
  349. package/dist/style/color-picker.css +1 -0
  350. package/dist/style/context-menu.css +1 -0
  351. package/dist/style/date-picker.css +1 -0
  352. package/dist/style/dialog.css +1 -0
  353. package/dist/style/divider.css +1 -0
  354. package/dist/style/drawer.css +1 -0
  355. package/dist/style/empty.css +1 -0
  356. package/dist/style/form.css +1 -0
  357. package/dist/style/grid.css +1 -0
  358. package/dist/style/image.css +1 -0
  359. package/dist/style/index.css +1 -0
  360. package/dist/style/input-number.css +1 -0
  361. package/dist/style/layout.css +1 -0
  362. package/dist/style/loading.css +1 -0
  363. package/dist/style/mentions.css +1 -0
  364. package/dist/style/menu.css +1 -0
  365. package/dist/style/message.css +1 -0
  366. package/dist/style/notification.css +1 -0
  367. package/dist/style/otp-input.css +1 -0
  368. package/dist/style/pagination.css +1 -0
  369. package/dist/style/radio.css +1 -0
  370. package/dist/style/rate.css +1 -0
  371. package/dist/style/rich-text.css +1 -0
  372. package/dist/style/select.css +1 -0
  373. package/dist/style/slider.css +1 -0
  374. package/dist/style/space.css +1 -0
  375. package/dist/style/splitter.css +1 -0
  376. package/dist/style/switch.css +1 -0
  377. package/dist/style/table.css +1 -0
  378. package/dist/style/tabs.css +1 -0
  379. package/dist/style/tag.css +1 -0
  380. package/dist/style/tooltip.css +1 -0
  381. package/dist/style/transfer.css +1 -0
  382. package/dist/style/tree-select.css +1 -0
  383. package/dist/style/tree.css +1 -0
  384. package/dist/style/upload.css +1 -0
  385. package/dist/style/watermark.css +1 -0
  386. package/dist/switch/Switch.vue.d.ts +95 -0
  387. package/dist/switch/index.d.ts +5 -0
  388. package/dist/switch/index.js +2 -0
  389. package/dist/switch/index.mjs +285 -0
  390. package/dist/switch/types.d.ts +81 -0
  391. package/dist/table/Table.vue.d.ts +102 -0
  392. package/dist/table/index.d.ts +5 -0
  393. package/dist/table/index.js +2 -0
  394. package/dist/table/index.mjs +263 -0
  395. package/dist/table/types.d.ts +64 -0
  396. package/dist/tabs/TabPane.vue.d.ts +55 -0
  397. package/dist/tabs/Tabs.vue.d.ts +92 -0
  398. package/dist/tabs/index.d.ts +7 -0
  399. package/dist/tabs/index.js +2 -0
  400. package/dist/tabs/index.mjs +266 -0
  401. package/dist/tabs/types.d.ts +78 -0
  402. package/dist/tag/Tag.vue.d.ts +38 -0
  403. package/dist/tag/index.d.ts +5 -0
  404. package/dist/tag/index.js +2 -0
  405. package/dist/tag/index.mjs +123 -0
  406. package/dist/tag/types.d.ts +83 -0
  407. package/dist/time-picker/TimePanel.vue.d.ts +19 -0
  408. package/dist/time-picker/TimePicker.vue.d.ts +15 -0
  409. package/dist/time-picker/index.d.ts +6 -0
  410. package/dist/time-picker/index.js +4 -0
  411. package/dist/time-picker/index.mjs +91 -0
  412. package/dist/tooltip/Tooltip.vue.d.ts +99 -0
  413. package/dist/tooltip/index.d.ts +5 -0
  414. package/dist/tooltip/index.js +2 -0
  415. package/dist/tooltip/index.mjs +186 -0
  416. package/dist/tooltip/types.d.ts +37 -0
  417. package/dist/transfer/Transfer.vue.d.ts +104 -0
  418. package/dist/transfer/TransferPanel.vue.d.ts +90 -0
  419. package/dist/transfer/index.d.ts +167 -0
  420. package/dist/transfer/index.js +7 -0
  421. package/dist/transfer/index.mjs +343 -0
  422. package/dist/tree/Tree.vue.d.ts +237 -0
  423. package/dist/tree/TreeRow.vue.d.ts +24 -0
  424. package/dist/tree/TreeView.vue.d.ts +24 -0
  425. package/dist/tree/context.d.ts +3 -0
  426. package/dist/tree/index.d.ts +431 -0
  427. package/dist/tree/index.js +2 -0
  428. package/dist/tree/index.mjs +548 -0
  429. package/dist/tree/types.d.ts +127 -0
  430. package/dist/tree/use-tree-foundation.d.ts +37 -0
  431. package/dist/tree-select/TreeNode.vue.d.ts +7 -0
  432. package/dist/tree-select/TreeSelect.vue.d.ts +210 -0
  433. package/dist/tree-select/index.d.ts +7 -0
  434. package/dist/tree-select/index.js +3 -0
  435. package/dist/tree-select/index.mjs +799 -0
  436. package/dist/tree-select/types.d.ts +111 -0
  437. package/dist/upload/Upload.vue.d.ts +50 -0
  438. package/dist/upload/index.d.ts +67 -0
  439. package/dist/upload/index.js +3 -0
  440. package/dist/upload/index.mjs +271 -0
  441. package/dist/utils/install.d.ts +3 -0
  442. package/dist/utils/style.d.ts +1 -0
  443. package/dist/watermark/Watermark.vue.d.ts +98 -0
  444. package/dist/watermark/index.d.ts +5 -0
  445. package/dist/watermark/index.js +2 -0
  446. package/dist/watermark/index.mjs +183 -0
  447. package/dist/watermark/types.d.ts +85 -0
  448. package/package.json +69 -0
  449. package/src/autocomplete/style/index.css +80 -0
  450. package/src/avatar/style/index.css +105 -0
  451. package/src/badge/style/index.css +232 -0
  452. package/src/base.css +4 -0
  453. package/src/breadcrumb/style/index.css +75 -0
  454. package/src/button/style/index.css +242 -0
  455. package/src/card/style/index.css +60 -0
  456. package/src/carousel/style/index.css +195 -0
  457. package/src/cascader/style/index.css +153 -0
  458. package/src/checkbox/style/index.css +165 -0
  459. package/src/collapse/style/index.css +166 -0
  460. package/src/color-picker/style/index.css +132 -0
  461. package/src/context-menu/style/index.css +21 -0
  462. package/src/date-picker/style/index.css +372 -0
  463. package/src/dialog/style/index.css +141 -0
  464. package/src/divider/style/index.css +112 -0
  465. package/src/drawer/style/index.css +211 -0
  466. package/src/dropdown/style/index.css +118 -0
  467. package/src/empty/style/index.css +87 -0
  468. package/src/form/style/index.css +148 -0
  469. package/src/grid/style/index.css +16 -0
  470. package/src/icon/style/index.css +28 -0
  471. package/src/image/style/index.css +114 -0
  472. package/src/input/style/index.css +217 -0
  473. package/src/input-number/style/index.css +166 -0
  474. package/src/layout/style/index.css +37 -0
  475. package/src/loading/style/index.css +58 -0
  476. package/src/mentions/style/index.css +83 -0
  477. package/src/menu/style/index.css +300 -0
  478. package/src/message/style/index.css +109 -0
  479. package/src/notification/style/index.css +116 -0
  480. package/src/otp-input/style/index.css +96 -0
  481. package/src/pagination/style/index.css +96 -0
  482. package/src/popover/style/index.css +47 -0
  483. package/src/radio/style/index.css +185 -0
  484. package/src/rate/style/index.css +89 -0
  485. package/src/rich-text/style/index.css +154 -0
  486. package/src/scrollbar/style/index.css +57 -0
  487. package/src/select/style/index.css +262 -0
  488. package/src/slider/style/index.css +181 -0
  489. package/src/space/style/index.css +31 -0
  490. package/src/splitter/style/index.css +76 -0
  491. package/src/style.css +1 -0
  492. package/src/styles/reset.css +29 -0
  493. package/src/switch/style/index.css +164 -0
  494. package/src/table/style/index.css +108 -0
  495. package/src/tabs/style/index.css +270 -0
  496. package/src/tag/style/index.css +207 -0
  497. package/src/time-picker/style/index.css +135 -0
  498. package/src/tooltip/style/index.css +50 -0
  499. package/src/transfer/style/index.css +181 -0
  500. package/src/tree/style/index.css +246 -0
  501. package/src/tree-select/style/index.css +346 -0
  502. package/src/upload/style/index.css +166 -0
  503. package/src/watermark/style/index.css +15 -0
  504. package/style.css +1 -0
@@ -0,0 +1,207 @@
1
+ import '../style/notification.css';
2
+ import { defineComponent as g, computed as h, openBlock as i, createElementBlock as l, normalizeStyle as D, normalizeClass as I, createElementVNode as N, toDisplayString as M, createCommentVNode as b, createVNode as w, unref as p, toRefs as R, Fragment as k, renderList as A, withDirectives as S, TransitionGroup as j, withCtx as E, createBlock as L, vShow as z, isVNode as C, getCurrentInstance as q } from "vue";
3
+ import { resolveRoutaConfigFromAppContext as O, resolveRoutaConfigFromInstance as F } from "../config-provider/index.mjs";
4
+ import "../chunks/manager-BUdQK4AD.mjs";
5
+ import { f as B, c as H } from "../chunks/manager-C-VTKQvg.mjs";
6
+ const U = {
7
+ placement: "top-right",
8
+ duration: 4500,
9
+ closable: !0
10
+ }, G = (t) => typeof t == "object" && t !== null && "content" in t, d = (t, e, o) => {
11
+ var r;
12
+ const c = e.isOptions ?? G, f = o ?? (c(t) ? t.type : void 0) ?? "info", n = {
13
+ ...U,
14
+ ...e.defaults,
15
+ ...(r = e.typeDefaults) == null ? void 0 : r[f]
16
+ };
17
+ return c(t) ? {
18
+ title: t.title ?? "",
19
+ content: t.content,
20
+ type: f,
21
+ duration: t.duration ?? n.duration,
22
+ placement: t.placement ?? n.placement,
23
+ closable: t.closable ?? n.closable
24
+ } : {
25
+ ...n,
26
+ title: "",
27
+ type: f,
28
+ content: t
29
+ };
30
+ };
31
+ function J(t) {
32
+ return {
33
+ open: (e) => t.open(d(e, t)),
34
+ info: (e) => t.open(d(e, t, "info")),
35
+ success: (e) => t.open(d(e, t, "success")),
36
+ warning: (e) => t.open(d(e, t, "warning")),
37
+ error: (e) => t.open(d(e, t, "error")),
38
+ closeAll: () => {
39
+ var e;
40
+ (e = t.closeAll) == null || e.call(t);
41
+ }
42
+ };
43
+ }
44
+ const K = ["data-theme", "role"], P = { class: "l-notification__body" }, Q = {
45
+ key: 0,
46
+ class: "l-notification__title"
47
+ }, W = { class: "l-notification__content" }, X = /* @__PURE__ */ g({
48
+ name: "NotificationItem",
49
+ __name: "NotificationItem",
50
+ props: {
51
+ record: {
52
+ type: Object,
53
+ required: !0
54
+ }
55
+ },
56
+ setup(t) {
57
+ const e = t, o = g({
58
+ name: "NotificationContentRenderer",
59
+ props: {
60
+ content: {
61
+ type: [String, Function, Object],
62
+ required: !0
63
+ }
64
+ },
65
+ setup(u) {
66
+ return () => typeof u.content == "function" ? u.content() : u.content;
67
+ }
68
+ }), c = h(() => [
69
+ "l-notification__item",
70
+ `is-${e.record.options.type}`
71
+ ]), f = h(() => ({
72
+ zIndex: e.record.zIndex,
73
+ ...e.record.visual.cssVars
74
+ })), n = () => {
75
+ e.record.pause();
76
+ }, r = () => {
77
+ e.record.resume();
78
+ }, T = () => {
79
+ e.record.close();
80
+ };
81
+ return (u, tt) => (i(), l("div", {
82
+ class: I(c.value),
83
+ "data-theme": t.record.visual.theme,
84
+ style: D(f.value),
85
+ role: t.record.options.type === "error" || t.record.options.type === "warning" ? "alert" : "status",
86
+ onMouseenter: n,
87
+ onMouseleave: r
88
+ }, [
89
+ N("div", P, [
90
+ t.record.options.title ? (i(), l("div", Q, M(t.record.options.title), 1)) : b("", !0),
91
+ N("div", W, [
92
+ w(p(o), {
93
+ content: t.record.options.content
94
+ }, null, 8, ["content"])
95
+ ])
96
+ ]),
97
+ t.record.options.closable ? (i(), l("button", {
98
+ key: 0,
99
+ type: "button",
100
+ class: "l-notification__close",
101
+ "aria-label": "Close notification",
102
+ onClick: T
103
+ }, " × ")) : b("", !0)
104
+ ], 46, K));
105
+ }
106
+ }), Y = { class: "l-notification-root" }, Z = /* @__PURE__ */ g({
107
+ name: "NotificationHost",
108
+ __name: "NotificationHost",
109
+ props: {
110
+ state: {
111
+ type: Object,
112
+ required: !0
113
+ }
114
+ },
115
+ setup(t) {
116
+ const e = t, { state: o } = R(e);
117
+ return (c, f) => (i(), l("div", Y, [
118
+ (i(!0), l(k, null, A(p(B), (n) => S((i(), l("div", {
119
+ key: n,
120
+ class: I(["l-notification-host", `l-notification-host--${n}`])
121
+ }, [
122
+ w(j, {
123
+ name: "l-notification-stack",
124
+ tag: "div",
125
+ class: "l-notification-host__list"
126
+ }, {
127
+ default: E(() => [
128
+ (i(!0), l(k, null, A(p(o).groups[n], (r) => (i(), L(X, {
129
+ key: r.id,
130
+ record: r
131
+ }, null, 8, ["record"]))), 128))
132
+ ]),
133
+ _: 2
134
+ }, 1024)
135
+ ], 2)), [
136
+ [z, p(o).groups[n].length > 0]
137
+ ])), 128))
138
+ ]));
139
+ }
140
+ }), V = H(
141
+ Z,
142
+ "l-notification-runtime"
143
+ ), $ = (t) => typeof t == "object" && t !== null && !C(t), v = (t) => ({
144
+ theme: t.theme,
145
+ cssVars: {
146
+ ...t.cssVars
147
+ }
148
+ }), a = (t, e) => {
149
+ const o = $(t) ? t : void 0;
150
+ return e != null && e.config ? e.config : O((o == null ? void 0 : o.appContext) ?? (e == null ? void 0 : e.appContext));
151
+ }, s = (t) => J({
152
+ defaults: t.feedback.notification,
153
+ typeDefaults: t.feedback.notification.types,
154
+ isOptions: $,
155
+ open: (e) => V.open(e, v(t)),
156
+ closeAll: _
157
+ }), x = (t, e) => {
158
+ const o = a(t, e);
159
+ return s(o).open(t);
160
+ }, m = (t, e, o) => {
161
+ const c = a(e, o);
162
+ return s(c)[t](e);
163
+ }, y = (t) => ({
164
+ open: (e) => s(a(e, t == null ? void 0 : t())).open(e),
165
+ info: (e) => s(a(e, t == null ? void 0 : t())).info(e),
166
+ success: (e) => s(a(e, t == null ? void 0 : t())).success(e),
167
+ warning: (e) => s(a(e, t == null ? void 0 : t())).warning(e),
168
+ error: (e) => s(a(e, t == null ? void 0 : t())).error(e),
169
+ closeAll: _
170
+ }), _ = () => {
171
+ V.closeAll();
172
+ }, ct = {
173
+ open: x,
174
+ info: (t) => m("info", t),
175
+ success: (t) => m("success", t),
176
+ warning: (t) => m("warning", t),
177
+ error: (t) => m("error", t),
178
+ closeAll: _,
179
+ install(t) {
180
+ t.config.globalProperties.$notification = y(() => ({
181
+ appContext: t._context,
182
+ config: O(t._context)
183
+ })), t.mixin({
184
+ beforeCreate() {
185
+ const e = this.$;
186
+ if (!e)
187
+ return;
188
+ const o = e;
189
+ o.ctx.$notification = y(() => ({
190
+ appContext: e.appContext,
191
+ config: F(e)
192
+ }));
193
+ }
194
+ });
195
+ }
196
+ }, rt = () => {
197
+ const t = q();
198
+ return y(() => ({
199
+ appContext: (t == null ? void 0 : t.appContext) ?? null,
200
+ config: F(t)
201
+ }));
202
+ };
203
+ export {
204
+ ct as LNotification,
205
+ ct as default,
206
+ rt as useNotification
207
+ };
@@ -0,0 +1,155 @@
1
+ import { AppContext, DeepReadonly } from 'vue';
2
+ import { FeedbackInstance } from '../feedback-runtime/types';
3
+ import { ResolvedRoutaConfig } from '../config-provider';
4
+ import { NotificationController, NotificationInput, NotificationType } from './types';
5
+ interface NotificationRuntimeContext {
6
+ appContext?: AppContext | null;
7
+ config?: DeepReadonly<ResolvedRoutaConfig>;
8
+ }
9
+ export declare const openNotification: (input: NotificationInput, context?: NotificationRuntimeContext) => FeedbackInstance;
10
+ export declare const openTypedNotification: (type: NotificationType, input: NotificationInput, context?: NotificationRuntimeContext) => FeedbackInstance;
11
+ export declare const createNotificationController: (resolveContext?: () => NotificationRuntimeContext) => NotificationController;
12
+ export declare const closeAllNotifications: () => void;
13
+ export declare const notificationState: {
14
+ groups: {
15
+ "top-left": {
16
+ id: string;
17
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
18
+ zIndex: number;
19
+ options: {
20
+ title: string;
21
+ content: import('../feedback-runtime/types').FeedbackRenderable;
22
+ type: NotificationType;
23
+ duration: number;
24
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
25
+ closable: boolean;
26
+ };
27
+ visual: {
28
+ theme: string;
29
+ cssVars: Record<string, string>;
30
+ };
31
+ remaining: number;
32
+ startedAt: number;
33
+ timer: number | null;
34
+ close: () => void;
35
+ pause: () => void;
36
+ resume: () => void;
37
+ }[];
38
+ "top-center": {
39
+ id: string;
40
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
41
+ zIndex: number;
42
+ options: {
43
+ title: string;
44
+ content: import('../feedback-runtime/types').FeedbackRenderable;
45
+ type: NotificationType;
46
+ duration: number;
47
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
48
+ closable: boolean;
49
+ };
50
+ visual: {
51
+ theme: string;
52
+ cssVars: Record<string, string>;
53
+ };
54
+ remaining: number;
55
+ startedAt: number;
56
+ timer: number | null;
57
+ close: () => void;
58
+ pause: () => void;
59
+ resume: () => void;
60
+ }[];
61
+ "top-right": {
62
+ id: string;
63
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
64
+ zIndex: number;
65
+ options: {
66
+ title: string;
67
+ content: import('../feedback-runtime/types').FeedbackRenderable;
68
+ type: NotificationType;
69
+ duration: number;
70
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
71
+ closable: boolean;
72
+ };
73
+ visual: {
74
+ theme: string;
75
+ cssVars: Record<string, string>;
76
+ };
77
+ remaining: number;
78
+ startedAt: number;
79
+ timer: number | null;
80
+ close: () => void;
81
+ pause: () => void;
82
+ resume: () => void;
83
+ }[];
84
+ "bottom-left": {
85
+ id: string;
86
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
87
+ zIndex: number;
88
+ options: {
89
+ title: string;
90
+ content: import('../feedback-runtime/types').FeedbackRenderable;
91
+ type: NotificationType;
92
+ duration: number;
93
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
94
+ closable: boolean;
95
+ };
96
+ visual: {
97
+ theme: string;
98
+ cssVars: Record<string, string>;
99
+ };
100
+ remaining: number;
101
+ startedAt: number;
102
+ timer: number | null;
103
+ close: () => void;
104
+ pause: () => void;
105
+ resume: () => void;
106
+ }[];
107
+ "bottom-center": {
108
+ id: string;
109
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
110
+ zIndex: number;
111
+ options: {
112
+ title: string;
113
+ content: import('../feedback-runtime/types').FeedbackRenderable;
114
+ type: NotificationType;
115
+ duration: number;
116
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
117
+ closable: boolean;
118
+ };
119
+ visual: {
120
+ theme: string;
121
+ cssVars: Record<string, string>;
122
+ };
123
+ remaining: number;
124
+ startedAt: number;
125
+ timer: number | null;
126
+ close: () => void;
127
+ pause: () => void;
128
+ resume: () => void;
129
+ }[];
130
+ "bottom-right": {
131
+ id: string;
132
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
133
+ zIndex: number;
134
+ options: {
135
+ title: string;
136
+ content: import('../feedback-runtime/types').FeedbackRenderable;
137
+ type: NotificationType;
138
+ duration: number;
139
+ placement: import('../../../headless/src/index.ts').FeedbackPlacement;
140
+ closable: boolean;
141
+ };
142
+ visual: {
143
+ theme: string;
144
+ cssVars: Record<string, string>;
145
+ };
146
+ remaining: number;
147
+ startedAt: number;
148
+ timer: number | null;
149
+ close: () => void;
150
+ pause: () => void;
151
+ resume: () => void;
152
+ }[];
153
+ };
154
+ };
155
+ export {};
@@ -0,0 +1,12 @@
1
+ import { AppContext, Plugin } from 'vue';
2
+ import { NotificationController as HeadlessNotificationController, NotificationOptions as HeadlessNotificationOptions, ResolvedNotificationOptions as HeadlessResolvedNotificationOptions } from '../../../headless/src/index.ts';
3
+ import { FeedbackRenderable } from '../feedback-runtime/types';
4
+ export type { NotificationType } from '../../../headless/src/index.ts';
5
+ export interface NotificationOptions extends HeadlessNotificationOptions<FeedbackRenderable> {
6
+ appContext?: AppContext | null;
7
+ }
8
+ export type ResolvedNotificationOptions = HeadlessResolvedNotificationOptions<FeedbackRenderable>;
9
+ export type NotificationInput = FeedbackRenderable | NotificationOptions;
10
+ export interface NotificationController extends HeadlessNotificationController<FeedbackRenderable> {
11
+ }
12
+ export type NotificationApi = Plugin & NotificationController;
@@ -0,0 +1,84 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ readonly modelValue: {
3
+ readonly type: StringConstructor;
4
+ readonly default: "";
5
+ };
6
+ readonly length: {
7
+ readonly type: NumberConstructor;
8
+ readonly default: 6;
9
+ };
10
+ readonly disabled: {
11
+ readonly type: BooleanConstructor;
12
+ readonly default: false;
13
+ };
14
+ readonly password: {
15
+ readonly type: BooleanConstructor;
16
+ readonly default: false;
17
+ };
18
+ readonly size: {
19
+ readonly type: import('vue').PropType<"sm" | "md" | "lg">;
20
+ };
21
+ readonly placeholder: {
22
+ readonly type: StringConstructor;
23
+ readonly default: "";
24
+ };
25
+ readonly type: {
26
+ readonly type: import('vue').PropType<"text" | "number" | "password">;
27
+ readonly default: "text";
28
+ };
29
+ readonly autofocus: {
30
+ readonly type: BooleanConstructor;
31
+ readonly default: false;
32
+ };
33
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
+ change: (_val: string) => void;
35
+ "update:modelValue": (_val: string) => void;
36
+ complete: (_val: string) => void;
37
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
38
+ readonly modelValue: {
39
+ readonly type: StringConstructor;
40
+ readonly default: "";
41
+ };
42
+ readonly length: {
43
+ readonly type: NumberConstructor;
44
+ readonly default: 6;
45
+ };
46
+ readonly disabled: {
47
+ readonly type: BooleanConstructor;
48
+ readonly default: false;
49
+ };
50
+ readonly password: {
51
+ readonly type: BooleanConstructor;
52
+ readonly default: false;
53
+ };
54
+ readonly size: {
55
+ readonly type: import('vue').PropType<"sm" | "md" | "lg">;
56
+ };
57
+ readonly placeholder: {
58
+ readonly type: StringConstructor;
59
+ readonly default: "";
60
+ };
61
+ readonly type: {
62
+ readonly type: import('vue').PropType<"text" | "number" | "password">;
63
+ readonly default: "text";
64
+ };
65
+ readonly autofocus: {
66
+ readonly type: BooleanConstructor;
67
+ readonly default: false;
68
+ };
69
+ }>> & Readonly<{
70
+ onChange?: ((_val: string) => any) | undefined;
71
+ "onUpdate:modelValue"?: ((_val: string) => any) | undefined;
72
+ onComplete?: ((_val: string) => any) | undefined;
73
+ }>, {
74
+ readonly password: boolean;
75
+ readonly length: number;
76
+ readonly disabled: boolean;
77
+ readonly type: "number" | "text" | "password";
78
+ readonly modelValue: string;
79
+ readonly placeholder: string;
80
+ readonly autofocus: boolean;
81
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
82
+ cellRefs: HTMLInputElement;
83
+ }, HTMLDivElement>;
84
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as OTPInput } from './OTPInput.vue';
3
+ export declare const LOTPInput: typeof OTPInput & Plugin;
4
+ export * from './types';
5
+ export default LOTPInput;
@@ -0,0 +1,2 @@
1
+ require('../style/otp-input.css');
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("vue");require("../chunks/manager-C0AUxQ1I.js");const _=require("../chunks/index-DWAWrVaT.js"),S=require("../chunks/use-signals-Bz1smiXh.js"),T=require("../chunks/use-form-item-CloIcyon.js"),q=require("../chunks/use-id-BycaM3-h.js");function D(e={}){const v=e.length??6,o=()=>typeof e.value=="function"?e.value():e.value??"",y=()=>typeof e.disabled=="function"?e.disabled():e.disabled??!1,i=l=>{const n=l.slice(0,v).split("");for(;n.length<v;)n.push("");return n},k=(l,n)=>l.length===n.length&&l.every((s,d)=>s===n[d]),c=_.signal(i(o())),g=_.signal(-1),p=_.signal(y());typeof e.value=="function"&&_.effect(()=>{const l=i(o()),n=_.untracked(()=>c.value);k(l,n)||(c.value=l)}),typeof e.disabled=="function"&&_.effect(()=>{p.value=y()});const w=l=>{const n=i(l);k(n,c.value)||(c.value=n)};return{state:{get value(){return c.value.join("")},set value(l){w(l)},get values(){return c.value},set values(l){c.value=l},get focusedIndex(){return g.value},set focusedIndex(l){g.value=l},get disabled(){return p.value},set disabled(l){p.value=l},get length(){return v}},actions:{updateValue:(l,n)=>{var h,m,V;if(p.value)return;const s=[...c.value];s[l]=n.slice(-1),c.value=s;const d=s.join("");(h=e.onInput)==null||h.call(e,d),d.length===v&&!s.includes("")&&((m=e.onComplete)==null||m.call(e,d),(V=e.onChange)==null||V.call(e,d))},handlePaste:l=>{var h,m;if(p.value)return;const n=l.trim().split("").slice(0,v),s=[...c.value];n.forEach((V,t)=>{s[t]=V}),c.value=s;const d=s.join("");(h=e.onInput)==null||h.call(e,d),(m=e.onChange)==null||m.call(e,d)},clear:()=>{var l,n;c.value=new Array(v).fill(""),(l=e.onInput)==null||l.call(e,""),(n=e.onChange)==null||n.call(e,"")},setFocusedIndex:l=>{g.value=l}}}}const E={modelValue:{type:String,default:""},length:{type:Number,default:6},disabled:{type:Boolean,default:!1},password:{type:Boolean,default:!1},size:{type:String},placeholder:{type:String,default:""},type:{type:String,default:"text"},autofocus:{type:Boolean,default:!1}},F={"update:modelValue":e=>!0,change:e=>!0,complete:e=>!0},O=["aria-label"],z=["id","type","value","disabled","placeholder","aria-label","onInput","onKeydown","onFocus"],$=u.defineComponent({name:"OTPInput",__name:"OTPInput",props:E,emits:F,setup(e,{emit:v}){const o=e,y=v,{formItem:i,size:k,disabled:c,inputId:g}=T.useFormItem(o),p=q.useId("l-otp"),w=u.computed(()=>(g==null?void 0:g.value)||p),C=u.ref([]),f=D({length:o.length,value:o.modelValue,disabled:c.value,onInput:t=>{y("update:modelValue",t)},onChange:t=>{y("change",t),i==null||i.validate("change").catch(()=>{})},onComplete:t=>{y("complete",t)}}),{values:B,focusedIndex:l,disabled:n}=S.useController(f,{value:()=>o.modelValue,disabled:()=>c.value}),s=t=>{var a,b;t>=0&&t<o.length&&((a=C.value[t])==null||a.focus(),(b=C.value[t])==null||b.select())};u.onMounted(()=>{o.autofocus&&s(0)});const d=(t,a)=>{const r=t.target.value.slice(-1);r?(f.actions.updateValue(a,r),a<o.length-1&&u.nextTick(()=>s(a+1))):f.actions.updateValue(a,"")},h=(t,a)=>{t.key==="Backspace"?!B.value[a]&&a>0?(f.actions.updateValue(a-1,""),s(a-1)):f.actions.updateValue(a,""):t.key==="ArrowLeft"&&a>0?s(a-1):t.key==="ArrowRight"&&a<o.length-1&&s(a+1)},m=t=>{var r;t.preventDefault();const a=((r=t.clipboardData)==null?void 0:r.getData("text"))??"";f.actions.handlePaste(a);const b=Math.min(a.length,o.length-1);s(b)},V=u.computed(()=>["l-otp-input",`l-otp-input--${k.value}`,{"is-disabled":n.value}]);return(t,a)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(V.value),onPaste:m,role:"group","aria-label":`请输入 ${t.length} 位验证码`},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(u.unref(B),(b,r)=>(u.openBlock(),u.createElementBlock("div",{key:r,class:u.normalizeClass(["l-otp-input__cell",{"is-focused":u.unref(l)===r}])},[u.createElementVNode("input",{id:r===0?w.value:`${w.value}-${r}`,ref_for:!0,ref_key:"cellRefs",ref:C,class:"l-otp-input__input",type:t.password?"password":o.type==="number"?"tel":"text",value:b,disabled:u.unref(n),placeholder:t.placeholder,maxlength:"1",autocomplete:"one-time-code","aria-label":`第 ${r+1} 位验证码`,onInput:I=>d(I,r),onKeydown:I=>h(I,r),onFocus:I=>u.unref(f).actions.setFocusedIndex(r),onBlur:a[0]||(a[0]=()=>{var I;u.unref(f).actions.setFocusedIndex(-1),(I=u.unref(i))==null||I.validate("blur").catch(()=>{})})},null,40,z)],2))),128))],42,O))}}),P=$;P.install=e=>{e.component("LOTPInput",P)};exports.LOTPInput=P;exports.default=P;exports.otpInputEmits=F;exports.otpInputProps=E;
@@ -0,0 +1,216 @@
1
+ import '../style/otp-input.css';
2
+ import { defineComponent as E, computed as F, ref as O, onMounted as S, openBlock as P, createElementBlock as B, normalizeClass as T, Fragment as L, renderList as j, unref as V, createElementVNode as A, nextTick as K } from "vue";
3
+ import "../chunks/manager-BUdQK4AD.mjs";
4
+ import { s as D, e as $, u as R } from "../chunks/index-B0yEC3RG.mjs";
5
+ import { u as M } from "../chunks/use-signals-CE1T2jXK.mjs";
6
+ import { u as N } from "../chunks/use-form-item-CqDbWCiU.mjs";
7
+ import { u as q } from "../chunks/use-id-D3casveg.mjs";
8
+ function G(e = {}) {
9
+ const f = e.length ?? 6, r = () => typeof e.value == "function" ? e.value() : e.value ?? "", y = () => typeof e.disabled == "function" ? e.disabled() : e.disabled ?? !1, v = (l) => {
10
+ const u = l.slice(0, f).split("");
11
+ for (; u.length < f; ) u.push("");
12
+ return u;
13
+ }, _ = (l, u) => l.length === u.length && l.every((n, o) => n === u[o]), s = D(v(r())), g = D(-1), p = D(y());
14
+ typeof e.value == "function" && $(() => {
15
+ const l = v(r()), u = R(() => s.value);
16
+ _(l, u) || (s.value = l);
17
+ }), typeof e.disabled == "function" && $(() => {
18
+ p.value = y();
19
+ });
20
+ const w = (l) => {
21
+ const u = v(l);
22
+ _(u, s.value) || (s.value = u);
23
+ };
24
+ return {
25
+ state: {
26
+ get value() {
27
+ return s.value.join("");
28
+ },
29
+ set value(l) {
30
+ w(l);
31
+ },
32
+ get values() {
33
+ return s.value;
34
+ },
35
+ set values(l) {
36
+ s.value = l;
37
+ },
38
+ get focusedIndex() {
39
+ return g.value;
40
+ },
41
+ set focusedIndex(l) {
42
+ g.value = l;
43
+ },
44
+ get disabled() {
45
+ return p.value;
46
+ },
47
+ set disabled(l) {
48
+ p.value = l;
49
+ },
50
+ get length() {
51
+ return f;
52
+ }
53
+ },
54
+ actions: {
55
+ updateValue: (l, u) => {
56
+ var i, m, I;
57
+ if (p.value) return;
58
+ const n = [...s.value];
59
+ n[l] = u.slice(-1), s.value = n;
60
+ const o = n.join("");
61
+ (i = e.onInput) == null || i.call(e, o), o.length === f && !n.includes("") && ((m = e.onComplete) == null || m.call(e, o), (I = e.onChange) == null || I.call(e, o));
62
+ },
63
+ handlePaste: (l) => {
64
+ var i, m;
65
+ if (p.value) return;
66
+ const u = l.trim().split("").slice(0, f), n = [...s.value];
67
+ u.forEach((I, a) => {
68
+ n[a] = I;
69
+ }), s.value = n;
70
+ const o = n.join("");
71
+ (i = e.onInput) == null || i.call(e, o), (m = e.onChange) == null || m.call(e, o);
72
+ },
73
+ clear: () => {
74
+ var l, u;
75
+ s.value = new Array(f).fill(""), (l = e.onInput) == null || l.call(e, ""), (u = e.onChange) == null || u.call(e, "");
76
+ },
77
+ setFocusedIndex: (l) => {
78
+ g.value = l;
79
+ }
80
+ }
81
+ };
82
+ }
83
+ const H = {
84
+ modelValue: {
85
+ type: String,
86
+ default: ""
87
+ },
88
+ length: {
89
+ type: Number,
90
+ default: 6
91
+ },
92
+ disabled: {
93
+ type: Boolean,
94
+ default: !1
95
+ },
96
+ password: {
97
+ type: Boolean,
98
+ default: !1
99
+ },
100
+ size: {
101
+ type: String
102
+ },
103
+ placeholder: {
104
+ type: String,
105
+ default: ""
106
+ },
107
+ type: {
108
+ type: String,
109
+ default: "text"
110
+ },
111
+ autofocus: {
112
+ type: Boolean,
113
+ default: !1
114
+ }
115
+ }, J = {
116
+ "update:modelValue": (e) => !0,
117
+ change: (e) => !0,
118
+ complete: (e) => !0
119
+ }, Q = ["aria-label"], U = ["id", "type", "value", "disabled", "placeholder", "aria-label", "onInput", "onKeydown", "onFocus"], W = /* @__PURE__ */ E({
120
+ name: "OTPInput",
121
+ __name: "OTPInput",
122
+ props: H,
123
+ emits: J,
124
+ setup(e, { emit: f }) {
125
+ const r = e, y = f, { formItem: v, size: _, disabled: s, inputId: g } = N(r), p = q("l-otp"), w = F(() => (g == null ? void 0 : g.value) || p), C = O([]), d = G({
126
+ length: r.length,
127
+ value: r.modelValue,
128
+ disabled: s.value,
129
+ onInput: (a) => {
130
+ y("update:modelValue", a);
131
+ },
132
+ onChange: (a) => {
133
+ y("change", a), v == null || v.validate("change").catch(() => {
134
+ });
135
+ },
136
+ onComplete: (a) => {
137
+ y("complete", a);
138
+ }
139
+ }), {
140
+ values: k,
141
+ focusedIndex: l,
142
+ disabled: u
143
+ } = M(d, {
144
+ value: () => r.modelValue,
145
+ disabled: () => s.value
146
+ }), n = (a) => {
147
+ var t, h;
148
+ a >= 0 && a < r.length && ((t = C.value[a]) == null || t.focus(), (h = C.value[a]) == null || h.select());
149
+ };
150
+ S(() => {
151
+ r.autofocus && n(0);
152
+ });
153
+ const o = (a, t) => {
154
+ const c = a.target.value.slice(-1);
155
+ c ? (d.actions.updateValue(t, c), t < r.length - 1 && K(() => n(t + 1))) : d.actions.updateValue(t, "");
156
+ }, i = (a, t) => {
157
+ a.key === "Backspace" ? !k.value[t] && t > 0 ? (d.actions.updateValue(t - 1, ""), n(t - 1)) : d.actions.updateValue(t, "") : a.key === "ArrowLeft" && t > 0 ? n(t - 1) : a.key === "ArrowRight" && t < r.length - 1 && n(t + 1);
158
+ }, m = (a) => {
159
+ var c;
160
+ a.preventDefault();
161
+ const t = ((c = a.clipboardData) == null ? void 0 : c.getData("text")) ?? "";
162
+ d.actions.handlePaste(t);
163
+ const h = Math.min(t.length, r.length - 1);
164
+ n(h);
165
+ }, I = F(() => [
166
+ "l-otp-input",
167
+ `l-otp-input--${_.value}`,
168
+ {
169
+ "is-disabled": u.value
170
+ }
171
+ ]);
172
+ return (a, t) => (P(), B("div", {
173
+ class: T(I.value),
174
+ onPaste: m,
175
+ role: "group",
176
+ "aria-label": `请输入 ${a.length} 位验证码`
177
+ }, [
178
+ (P(!0), B(L, null, j(V(k), (h, c) => (P(), B("div", {
179
+ key: c,
180
+ class: T(["l-otp-input__cell", { "is-focused": V(l) === c }])
181
+ }, [
182
+ A("input", {
183
+ id: c === 0 ? w.value : `${w.value}-${c}`,
184
+ ref_for: !0,
185
+ ref_key: "cellRefs",
186
+ ref: C,
187
+ class: "l-otp-input__input",
188
+ type: a.password ? "password" : r.type === "number" ? "tel" : "text",
189
+ value: h,
190
+ disabled: V(u),
191
+ placeholder: a.placeholder,
192
+ maxlength: "1",
193
+ autocomplete: "one-time-code",
194
+ "aria-label": `第 ${c + 1} 位验证码`,
195
+ onInput: (b) => o(b, c),
196
+ onKeydown: (b) => i(b, c),
197
+ onFocus: (b) => V(d).actions.setFocusedIndex(c),
198
+ onBlur: t[0] || (t[0] = () => {
199
+ var b;
200
+ V(d).actions.setFocusedIndex(-1), (b = V(v)) == null || b.validate("blur").catch(() => {
201
+ });
202
+ })
203
+ }, null, 40, U)
204
+ ], 2))), 128))
205
+ ], 42, Q));
206
+ }
207
+ }), z = W;
208
+ z.install = (e) => {
209
+ e.component("LOTPInput", z);
210
+ };
211
+ export {
212
+ z as LOTPInput,
213
+ z as default,
214
+ J as otpInputEmits,
215
+ H as otpInputProps
216
+ };