straw-ui-vue 0.1.12 → 0.1.14

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 (280) hide show
  1. package/README.md +184 -21
  2. package/dist/{types/src/components → components}/st-button/index.d.ts +10 -10
  3. package/dist/components/st-button/st-button.d.ts +20 -0
  4. package/dist/{types/src/components → components}/st-button/types.d.ts +7 -7
  5. package/dist/components/st-cascade/index.d.ts +236 -0
  6. package/dist/components/st-cascade/st-cascade-panel.d.ts +29 -0
  7. package/dist/components/st-cascade/st-cascade.d.ts +60 -0
  8. package/dist/{types/src/components → components}/st-cascade/types.d.ts +10 -10
  9. package/dist/{types/src/components → components}/st-checkbox/index.d.ts +33 -33
  10. package/dist/components/st-checkbox/st-checkbox-group.d.ts +28 -0
  11. package/dist/components/st-checkbox/st-checkbox.d.ts +26 -0
  12. package/dist/{types/src/components → components}/st-checkbox/types.d.ts +11 -11
  13. package/dist/components/st-color-picker/index.d.ts +130 -0
  14. package/dist/{types/src/components → components}/st-color-picker/st-color-picker-panel.d.ts +8 -7
  15. package/dist/components/st-color-picker/st-color-picker.d.ts +35 -0
  16. package/dist/{types/src/components → components}/st-color-picker/types.d.ts +20 -20
  17. package/dist/components/st-color-picker/utils.d.ts +49 -0
  18. package/dist/components/st-date-picker/index.d.ts +131 -0
  19. package/dist/components/st-date-picker/st-date-picker-panel.d.ts +19 -0
  20. package/dist/components/st-date-picker/st-date-picker.d.ts +45 -0
  21. package/dist/{types/src/components → components}/st-date-picker/types.d.ts +13 -13
  22. package/dist/components/st-datetime-picker/index.d.ts +136 -0
  23. package/dist/components/st-datetime-picker/st-datetime-picker-panel.d.ts +20 -0
  24. package/dist/components/st-datetime-picker/st-datetime-picker.d.ts +46 -0
  25. package/dist/{types/src/components → components}/st-datetime-picker/types.d.ts +14 -14
  26. package/dist/{types/src/components → components}/st-dialog/index.d.ts +81 -90
  27. package/dist/components/st-dialog/st-dialog-body.d.ts +17 -0
  28. package/dist/components/st-dialog/st-dialog-close.d.ts +6 -0
  29. package/dist/components/st-dialog/st-dialog-container.d.ts +35 -0
  30. package/dist/components/st-dialog/st-dialog-content.d.ts +20 -0
  31. package/dist/components/st-dialog/st-dialog-footer.d.ts +17 -0
  32. package/dist/components/st-dialog/st-dialog-fullscreen.d.ts +6 -0
  33. package/dist/components/st-dialog/st-dialog-header.d.ts +17 -0
  34. package/dist/components/st-dialog/st-dialog-overlay.d.ts +7 -0
  35. package/dist/components/st-dialog/st-dialog-title.d.ts +18 -0
  36. package/dist/{types/src/components → components}/st-dialog/st-dialog.d.ts +16 -16
  37. package/dist/{types/src/components → components}/st-dialog/types.d.ts +13 -13
  38. package/dist/components/st-divider/index.d.ts +29 -0
  39. package/dist/components/st-divider/st-divider.d.ts +15 -0
  40. package/dist/{types/src/components → components}/st-divider/types.d.ts +8 -8
  41. package/dist/{types/src/components → components}/st-drawer/index.d.ts +14 -12
  42. package/dist/components/st-drawer/st-drawer-group.d.ts +13 -0
  43. package/dist/{types/src/components → components}/st-drawer/st-drawer.d.ts +16 -17
  44. package/dist/{types/src/components → components}/st-drawer/types.d.ts +14 -14
  45. package/dist/{types/src/components → components}/st-empty/index.d.ts +4 -4
  46. package/dist/components/st-empty/st-empty.d.ts +13 -0
  47. package/dist/{types/src/components → components}/st-empty/types.d.ts +2 -2
  48. package/dist/components/st-form-control/index.d.ts +17 -0
  49. package/dist/components/st-form-control/st-form-control.d.ts +11 -0
  50. package/dist/{types/src/components → components}/st-form-control/types.d.ts +2 -2
  51. package/dist/components/st-form-description/index.d.ts +19 -0
  52. package/dist/components/st-form-description/st-form-description.d.ts +14 -0
  53. package/dist/{types/src/components → components}/st-form-description/types.d.ts +2 -2
  54. package/dist/{types/src/components → components}/st-form-field/index.d.ts +9 -9
  55. package/dist/components/st-form-field/st-form-field.d.ts +35 -0
  56. package/dist/{types/src/components → components}/st-form-field/types.d.ts +6 -6
  57. package/dist/components/st-form-item/index.d.ts +19 -0
  58. package/dist/components/st-form-item/st-form-item.d.ts +14 -0
  59. package/dist/{types/src/components → components}/st-form-item/types.d.ts +2 -2
  60. package/dist/{types/src/components → components}/st-form-label/index.d.ts +4 -4
  61. package/dist/components/st-form-label/st-form-label.d.ts +16 -0
  62. package/dist/{types/src/components → components}/st-form-label/types.d.ts +3 -3
  63. package/dist/components/st-form-message/index.d.ts +19 -0
  64. package/dist/components/st-form-message/st-form-message.d.ts +14 -0
  65. package/dist/{types/src/components → components}/st-form-message/types.d.ts +2 -2
  66. package/dist/{types/src/components → components}/st-image/index.d.ts +13 -12
  67. package/dist/{types/src/components → components}/st-image/st-image-preview.d.ts +4 -3
  68. package/dist/{types/src/components → components}/st-image/st-image.d.ts +12 -15
  69. package/dist/{types/src/components → components}/st-image/types.d.ts +7 -7
  70. package/dist/{types/src/components → components}/st-input/index.d.ts +243 -764
  71. package/dist/components/st-input/st-input-group-addon.d.ts +17 -0
  72. package/dist/components/st-input/st-input-group-button.d.ts +15 -0
  73. package/dist/{types/src/components → components}/st-input/st-input-group-input.d.ts +9 -14
  74. package/dist/components/st-input/st-input-group-text.d.ts +17 -0
  75. package/dist/{types/src/components → components}/st-input/st-input-group-textarea.d.ts +8 -13
  76. package/dist/components/st-input/st-input-group.d.ts +13 -0
  77. package/dist/components/st-input/st-input-number.d.ts +29 -0
  78. package/dist/components/st-input/st-input.d.ts +133 -0
  79. package/dist/components/st-input/st-textarea.d.ts +132 -0
  80. package/dist/{types/src/components → components}/st-input/types.d.ts +33 -33
  81. package/dist/components/st-label/index.d.ts +19 -0
  82. package/dist/components/st-label/st-label.d.ts +14 -0
  83. package/dist/{types/src/components → components}/st-label/types.d.ts +2 -2
  84. package/dist/components/st-menu/index.d.ts +437 -0
  85. package/dist/components/st-menu/st-menu-container.d.ts +27 -0
  86. package/dist/components/st-menu/st-menu-content.d.ts +19 -0
  87. package/dist/components/st-menu/st-menu-divider.d.ts +7 -0
  88. package/dist/components/st-menu/st-menu-group.d.ts +21 -0
  89. package/dist/{types/src/components → components}/st-menu/st-menu-item.d.ts +10 -13
  90. package/dist/components/st-menu/st-menu-node.d.ts +10 -0
  91. package/dist/components/st-menu/st-menu-trigger.d.ts +19 -0
  92. package/dist/components/st-menu/st-menu.d.ts +21 -0
  93. package/dist/{types/src/components → components}/st-menu/types.d.ts +31 -31
  94. package/dist/{types/src/components → components}/st-pagination/index.d.ts +17 -33
  95. package/dist/components/st-pagination/st-pagination.d.ts +44 -0
  96. package/dist/{types/src/components → components}/st-pagination/types.d.ts +6 -6
  97. package/dist/{types/src/components → components}/st-popover/index.d.ts +69 -184
  98. package/dist/components/st-popover/st-popover-arrow.d.ts +12 -0
  99. package/dist/{types/src/components → components}/st-popover/st-popover-container.d.ts +14 -18
  100. package/dist/components/st-popover/st-popover-content.d.ts +33 -0
  101. package/dist/components/st-popover/st-popover-trigger.d.ts +29 -0
  102. package/dist/components/st-popover/st-popover.d.ts +42 -0
  103. package/dist/{types/src/components → components}/st-popover/types.d.ts +13 -13
  104. package/dist/{types/src/components → components}/st-progress/index.d.ts +10 -9
  105. package/dist/components/st-progress/st-progress.d.ts +21 -0
  106. package/dist/{types/src/components → components}/st-progress/types.d.ts +6 -6
  107. package/dist/{types/src/components → components}/st-radio/index.d.ts +33 -33
  108. package/dist/components/st-radio/st-radio-group.d.ts +29 -0
  109. package/dist/components/st-radio/st-radio.d.ts +27 -0
  110. package/dist/{types/src/components → components}/st-radio/types.d.ts +11 -11
  111. package/dist/components/st-scrollbar/index.d.ts +41 -0
  112. package/dist/components/st-scrollbar/st-scrollbar.d.ts +22 -0
  113. package/dist/{types/src/components → components}/st-scrollbar/types.d.ts +6 -6
  114. package/dist/{types/src/components → components}/st-segmented/index.d.ts +6 -8
  115. package/dist/{types/src/components → components}/st-segmented/st-segmented.d.ts +9 -9
  116. package/dist/{types/src/components → components}/st-segmented/types.d.ts +5 -5
  117. package/dist/components/st-select/index.d.ts +1161 -0
  118. package/dist/{types/src/components → components}/st-select/st-select-container.d.ts +9 -13
  119. package/dist/components/st-select/st-select-content.d.ts +22 -0
  120. package/dist/components/st-select/st-select-empty.d.ts +22 -0
  121. package/dist/components/st-select/st-select-group.d.ts +24 -0
  122. package/dist/{types/src/components → components}/st-select/st-select-item.d.ts +4 -3
  123. package/dist/components/st-select/st-select-trigger.d.ts +139 -0
  124. package/dist/components/st-select/st-select.d.ts +59 -0
  125. package/dist/{types/src/components → components}/st-select/types.d.ts +13 -13
  126. package/dist/components/st-sidebar/index.d.ts +17 -0
  127. package/dist/components/st-sidebar/st-sidebar.d.ts +11 -0
  128. package/dist/{types/src/components → components}/st-sidebar-item/index.d.ts +2 -6
  129. package/dist/components/st-sidebar-item/st-sidebar-item.d.ts +11 -0
  130. package/dist/{types/src/components → components}/st-skeleton/index.d.ts +22 -21
  131. package/dist/components/st-skeleton/st-skeleton-item.d.ts +17 -0
  132. package/dist/components/st-skeleton/st-skeleton.d.ts +20 -0
  133. package/dist/{types/src/components → components}/st-skeleton/types.d.ts +6 -6
  134. package/dist/{types/src/components → components}/st-slider/index.d.ts +22 -23
  135. package/dist/components/st-slider/st-slider.d.ts +52 -0
  136. package/dist/{types/src/components → components}/st-slider/types.d.ts +6 -6
  137. package/dist/components/st-splitter/index.d.ts +25 -0
  138. package/dist/components/st-splitter/st-splitter.d.ts +16 -0
  139. package/dist/{types/src/components → components}/st-splitter/types.d.ts +16 -16
  140. package/dist/{types/src/components → components}/st-splitter/useSplitter.d.ts +3 -3
  141. package/dist/{types/src/components → components}/st-splitter-panel/index.d.ts +8 -10
  142. package/dist/components/st-splitter-panel/st-splitter-panel.d.ts +33 -0
  143. package/dist/{types/src/components → components}/st-splitter-panel/types.d.ts +7 -7
  144. package/dist/{types/src/components → components}/st-switch/index.d.ts +7 -7
  145. package/dist/components/st-switch/st-switch.d.ts +27 -0
  146. package/dist/{types/src/components → components}/st-switch/types.d.ts +3 -3
  147. package/dist/{types/src/components → components}/st-tabs/index.d.ts +25 -39
  148. package/dist/components/st-tabs/st-tabs-pane.d.ts +17 -0
  149. package/dist/components/st-tabs/st-tabs.d.ts +35 -0
  150. package/dist/{types/src/components → components}/st-tabs/types.d.ts +17 -17
  151. package/dist/{types/src/components → components}/st-tag/index.d.ts +12 -11
  152. package/dist/components/st-tag/st-tag.d.ts +28 -0
  153. package/dist/{types/src/components → components}/st-tag/types.d.ts +7 -7
  154. package/dist/components/st-time-picker/index.d.ts +142 -0
  155. package/dist/components/st-time-picker/st-time-picker-panel.d.ts +23 -0
  156. package/dist/components/st-time-picker/st-time-picker.d.ts +38 -0
  157. package/dist/{types/src/components → components}/st-time-picker/types.d.ts +20 -20
  158. package/dist/{types/src/components → components}/st-toggle/index.d.ts +9 -8
  159. package/dist/components/st-toggle/st-toggle.d.ts +36 -0
  160. package/dist/{types/src/components → components}/st-toggle/types.d.ts +5 -5
  161. package/dist/{types/src/components → components}/st-tooltip/index.d.ts +35 -155
  162. package/dist/{types/src/components → components}/st-tooltip/st-tooltip-container.d.ts +10 -14
  163. package/dist/{types/src/components → components}/st-tooltip/st-tooltip-content.d.ts +8 -16
  164. package/dist/components/st-tooltip/st-tooltip-trigger.d.ts +23 -0
  165. package/dist/components/st-tooltip/st-tooltip.d.ts +33 -0
  166. package/dist/{types/src/components → components}/st-tooltip/types.d.ts +15 -15
  167. package/dist/{types/src/components → components}/st-tree/index.d.ts +12 -12
  168. package/dist/components/st-tree/st-tree-node.d.ts +4 -0
  169. package/dist/{types/src/components → components}/st-tree/st-tree.d.ts +13 -5
  170. package/dist/{types/src/components → components}/st-tree/types.d.ts +6 -6
  171. package/dist/{types/src/generated-safelist.d.ts → generated-safelist.d.ts} +1 -1
  172. package/dist/{types/src/index.d.ts → index.d.ts} +2 -2
  173. package/dist/straw-ui.js +340 -291
  174. package/dist/{types/src/unocss-preset.d.ts → unocss-preset.d.ts} +1 -1
  175. package/package.json +7 -9
  176. package/dist/straw-ui.css +0 -2
  177. package/dist/types/src/components/st-button/st-button.d.ts +0 -25
  178. package/dist/types/src/components/st-cascade/index.d.ts +0 -898
  179. package/dist/types/src/components/st-cascade/st-cascade-panel.d.ts +0 -33
  180. package/dist/types/src/components/st-cascade/st-cascade.d.ts +0 -1362
  181. package/dist/types/src/components/st-checkbox/st-checkbox-group.d.ts +0 -32
  182. package/dist/types/src/components/st-checkbox/st-checkbox.d.ts +0 -30
  183. package/dist/types/src/components/st-color-picker/index.d.ts +0 -753
  184. package/dist/types/src/components/st-color-picker/st-color-picker.d.ts +0 -646
  185. package/dist/types/src/components/st-color-picker/utils.d.ts +0 -49
  186. package/dist/types/src/components/st-date-picker/index.d.ts +0 -713
  187. package/dist/types/src/components/st-date-picker/st-date-picker-panel.d.ts +0 -18
  188. package/dist/types/src/components/st-date-picker/st-date-picker.d.ts +0 -1192
  189. package/dist/types/src/components/st-datetime-picker/index.d.ts +0 -3475
  190. package/dist/types/src/components/st-datetime-picker/st-datetime-picker-panel.d.ts +0 -928
  191. package/dist/types/src/components/st-datetime-picker/st-datetime-picker.d.ts +0 -3079
  192. package/dist/types/src/components/st-dialog/st-dialog-body.d.ts +0 -21
  193. package/dist/types/src/components/st-dialog/st-dialog-close.d.ts +0 -5
  194. package/dist/types/src/components/st-dialog/st-dialog-container.d.ts +0 -42
  195. package/dist/types/src/components/st-dialog/st-dialog-content.d.ts +0 -28
  196. package/dist/types/src/components/st-dialog/st-dialog-footer.d.ts +0 -21
  197. package/dist/types/src/components/st-dialog/st-dialog-fullscreen.d.ts +0 -5
  198. package/dist/types/src/components/st-dialog/st-dialog-header.d.ts +0 -25
  199. package/dist/types/src/components/st-dialog/st-dialog-overlay.d.ts +0 -6
  200. package/dist/types/src/components/st-dialog/st-dialog-title.d.ts +0 -22
  201. package/dist/types/src/components/st-divider/index.d.ts +0 -29
  202. package/dist/types/src/components/st-divider/st-divider.d.ts +0 -20
  203. package/dist/types/src/components/st-empty/st-empty.d.ts +0 -18
  204. package/dist/types/src/components/st-form-control/index.d.ts +0 -17
  205. package/dist/types/src/components/st-form-control/st-form-control.d.ts +0 -16
  206. package/dist/types/src/components/st-form-description/index.d.ts +0 -19
  207. package/dist/types/src/components/st-form-description/st-form-description.d.ts +0 -18
  208. package/dist/types/src/components/st-form-field/st-form-field.d.ts +0 -38
  209. package/dist/types/src/components/st-form-item/index.d.ts +0 -19
  210. package/dist/types/src/components/st-form-item/st-form-item.d.ts +0 -18
  211. package/dist/types/src/components/st-form-label/st-form-label.d.ts +0 -20
  212. package/dist/types/src/components/st-form-message/index.d.ts +0 -19
  213. package/dist/types/src/components/st-form-message/st-form-message.d.ts +0 -18
  214. package/dist/types/src/components/st-input/st-input-group-addon.d.ts +0 -22
  215. package/dist/types/src/components/st-input/st-input-group-button.d.ts +0 -19
  216. package/dist/types/src/components/st-input/st-input-group-text.d.ts +0 -21
  217. package/dist/types/src/components/st-input/st-input-group.d.ts +0 -18
  218. package/dist/types/src/components/st-input/st-input-number.d.ts +0 -86
  219. package/dist/types/src/components/st-input/st-input.d.ts +0 -267
  220. package/dist/types/src/components/st-input/st-textarea.d.ts +0 -266
  221. package/dist/types/src/components/st-label/index.d.ts +0 -19
  222. package/dist/types/src/components/st-label/st-label.d.ts +0 -18
  223. package/dist/types/src/components/st-menu/index.d.ts +0 -699
  224. package/dist/types/src/components/st-menu/st-menu-container.d.ts +0 -34
  225. package/dist/types/src/components/st-menu/st-menu-content.d.ts +0 -23
  226. package/dist/types/src/components/st-menu/st-menu-divider.d.ts +0 -6
  227. package/dist/types/src/components/st-menu/st-menu-group.d.ts +0 -25
  228. package/dist/types/src/components/st-menu/st-menu-node.d.ts +0 -9
  229. package/dist/types/src/components/st-menu/st-menu-trigger.d.ts +0 -23
  230. package/dist/types/src/components/st-menu/st-menu.d.ts +0 -503
  231. package/dist/types/src/components/st-pagination/st-pagination.d.ts +0 -51
  232. package/dist/types/src/components/st-popover/st-popover-arrow.d.ts +0 -11
  233. package/dist/types/src/components/st-popover/st-popover-content.d.ts +0 -40
  234. package/dist/types/src/components/st-popover/st-popover-trigger.d.ts +0 -36
  235. package/dist/types/src/components/st-popover/st-popover.d.ts +0 -250
  236. package/dist/types/src/components/st-progress/st-progress.d.ts +0 -24
  237. package/dist/types/src/components/st-radio/st-radio-group.d.ts +0 -33
  238. package/dist/types/src/components/st-radio/st-radio.d.ts +0 -31
  239. package/dist/types/src/components/st-scrollbar/index.d.ts +0 -64
  240. package/dist/types/src/components/st-scrollbar/st-scrollbar.d.ts +0 -37
  241. package/dist/types/src/components/st-select/index.d.ts +0 -1938
  242. package/dist/types/src/components/st-select/st-select-content.d.ts +0 -26
  243. package/dist/types/src/components/st-select/st-select-empty.d.ts +0 -26
  244. package/dist/types/src/components/st-select/st-select-group.d.ts +0 -28
  245. package/dist/types/src/components/st-select/st-select-trigger.d.ts +0 -239
  246. package/dist/types/src/components/st-select/st-select.d.ts +0 -1405
  247. package/dist/types/src/components/st-sidebar/index.d.ts +0 -29
  248. package/dist/types/src/components/st-sidebar/st-sidebar.d.ts +0 -25
  249. package/dist/types/src/components/st-sidebar-item/st-sidebar-item.d.ts +0 -24
  250. package/dist/types/src/components/st-skeleton/st-skeleton-item.d.ts +0 -21
  251. package/dist/types/src/components/st-skeleton/st-skeleton.d.ts +0 -23
  252. package/dist/types/src/components/st-slider/st-slider.d.ts +0 -60
  253. package/dist/types/src/components/st-splitter/index.d.ts +0 -27
  254. package/dist/types/src/components/st-splitter/st-splitter.d.ts +0 -24
  255. package/dist/types/src/components/st-splitter-panel/st-splitter-panel.d.ts +0 -37
  256. package/dist/types/src/components/st-switch/st-switch.d.ts +0 -31
  257. package/dist/types/src/components/st-tabs/st-tabs-pane.d.ts +0 -22
  258. package/dist/types/src/components/st-tabs/st-tabs.d.ts +0 -48
  259. package/dist/types/src/components/st-tag/st-tag.d.ts +0 -31
  260. package/dist/types/src/components/st-time-picker/index.d.ts +0 -1546
  261. package/dist/types/src/components/st-time-picker/st-time-picker-panel.d.ts +0 -280
  262. package/dist/types/src/components/st-time-picker/st-time-picker.d.ts +0 -914
  263. package/dist/types/src/components/st-toggle/st-toggle.d.ts +0 -39
  264. package/dist/types/src/components/st-tooltip/st-tooltip-trigger.d.ts +0 -31
  265. package/dist/types/src/components/st-tooltip/st-tooltip.d.ts +0 -242
  266. package/dist/types/src/components/st-tree/st-tree-node.d.ts +0 -3
  267. /package/dist/{types/src/components → components}/st-sidebar/types.d.ts +0 -0
  268. /package/dist/{types/src/components → components}/st-sidebar-item/types.d.ts +0 -0
  269. /package/dist/{types/src/components → components}/types.d.ts +0 -0
  270. /package/dist/{types/src/global.d.ts → global.d.ts} +0 -0
  271. /package/dist/{types/src/utils → utils}/cn.d.ts +0 -0
  272. /package/dist/{types/src/utils → utils}/cva/index.d.ts +0 -0
  273. /package/dist/{types/src/utils → utils}/cva/types.d.ts +0 -0
  274. /package/dist/{types/src/utils → utils}/directive/index.d.ts +0 -0
  275. /package/dist/{types/src/utils → utils}/directive/types.d.ts +0 -0
  276. /package/dist/{types/src/utils → utils}/directive/v-intersection.d.ts +0 -0
  277. /package/dist/{types/src/utils → utils}/directive/v-resize.d.ts +0 -0
  278. /package/dist/{types/src/utils → utils}/mergeStyles.d.ts +0 -0
  279. /package/dist/{types/src/utils → utils}/utils/id.d.ts +0 -0
  280. /package/dist/{types/src/utils → utils}/with-install.d.ts +0 -0
package/README.md CHANGED
@@ -1,42 +1,205 @@
1
- # straw-ui-vue
1
+ # Straw UI
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite.
3
+ 一个基于 Vue 3 + TypeScript + UnoCSS 的现代组件库。
4
4
 
5
- ## Recommended IDE Setup
5
+ ## 特性
6
6
 
7
- [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
7
+ - 🚀 **Vue 3 + TypeScript** - 完整的类型支持
8
+ - 🎨 **UnoCSS** - 原子化 CSS,按需生成
9
+ - 📦 **零运行时依赖** - 仅对等依赖 Vue 3
10
+ - 🔧 **按需导入** - 支持 tree-shaking
11
+ - 🌙 **暗色主题** - 内置暗色模式支持
8
12
 
9
- ## Recommended Browser Setup
13
+ ## 安装
10
14
 
11
- - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
- - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
- - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
- - Firefox:
15
- - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
- - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
15
+ ```bash
16
+ npm install straw-ui-vue
17
+ ```
18
+
19
+ ## 快速开始
20
+
21
+ ### 完整引入
22
+
23
+ ```ts
24
+ import { createApp } from 'vue';
25
+ import StrawUI from 'straw-ui-vue';
26
+ import 'straw-ui-vue/style.css';
27
+
28
+ const app = createApp(App);
29
+ app.use(StrawUI);
30
+ ```
31
+
32
+ ### 按需导入
33
+
34
+ ```vue
35
+ <script setup lang="ts">
36
+ import { StButton, StInput } from 'straw-ui-vue';
37
+ import 'straw-ui-vue/style.css';
38
+ </script>
39
+
40
+ <template>
41
+ <StButton>Click me</StButton>
42
+ <StInput v-model="value" placeholder="Type something" />
43
+ </template>
44
+ ```
45
+
46
+ ## UnoCSS 集成
47
+
48
+ Straw UI 基于 UnoCSS 构建,提供三种集成方案:
49
+
50
+ ### 方案一:使用预设(推荐)
51
+
52
+ ```ts
53
+ // uno.config.ts
54
+ import { defineConfig, presetWind4, presetIcons } from 'unocss';
55
+ import { presetStrawUI } from 'straw-ui-vue/unocss';
56
+
57
+ export default defineConfig({
58
+ presets: [
59
+ presetWind4(),
60
+ presetIcons(),
61
+ presetStrawUI(), // Straw UI 预设
62
+ ],
63
+ });
64
+ ```
65
+
66
+ ### 方案二:使用 safelist
67
+
68
+ ```ts
69
+ // uno.config.ts
70
+ import { defineConfig } from 'unocss';
71
+ import { getStrawUISafelist } from 'straw-ui-vue/unocss';
72
+
73
+ export default defineConfig({
74
+ safelist: [...getStrawUISafelist()],
75
+ });
76
+ ```
77
+
78
+ ### 方案三:仅引入样式
79
+
80
+ 不使用 UnoCSS 时,直接引入预编译的样式:
81
+
82
+ ```ts
83
+ import 'straw-ui-vue/style.css';
84
+ ```
85
+
86
+ 详细配置请参阅 [UnoCSS 集成文档](./docs/unocss.md)。
87
+
88
+ ## TypeScript 支持
89
+
90
+ Straw UI 提供完整的 TypeScript 类型支持。
17
91
 
18
- ## Type Support for `.vue` Imports in TS
92
+ ### 全局组件类型
19
93
 
20
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
94
+ ```json
95
+ // tsconfig.json
96
+ {
97
+ "compilerOptions": {
98
+ "types": ["straw-ui-vue/global-components"]
99
+ }
100
+ }
101
+ ```
102
+
103
+ 详细配置请参阅 [TypeScript 配置指南](./docs/typescript.md)。
104
+
105
+ ## 组件列表
106
+
107
+ | 组件 | 说明 |
108
+ |------|------|
109
+ | `StButton` | 按钮组件 |
110
+ | `StInput` | 输入框组件 |
111
+ | `StCheckbox` | 复选框组件 |
112
+ | `StCheckboxGroup` | 复选框组组件 |
113
+ | `StRadio` | 单选框组件 |
114
+ | `StRadioGroup` | 单选框组组件 |
115
+ | `StSelect` | 选择器组件 |
116
+ | `StDialog` | 对话框组件 |
117
+ | `StPopover` | 弹出框组件 |
118
+ | `StTooltip` | 提示框组件 |
119
+ | `StMenu` | 菜单组件 |
120
+ | `StSidebar` | 侧边栏组件 |
121
+ | `StSidebarItem` | 侧边栏项组件 |
122
+ | `StSplitter` | 分割器组件 |
123
+ | `StSplitterPanel` | 分割面板组件 |
124
+ | `StTree` | 树形组件 |
125
+ | `StToggle` | 开关组件 |
126
+
127
+ ## 自定义指令
128
+
129
+ | 指令 | 说明 |
130
+ |------|------|
131
+ | `v-intersection` | 元素可视区域监听 |
132
+ | `v-interval` | 定时器指令 |
133
+ | `v-move` | 元素拖拽移动 |
134
+ | `v-resize` | 元素尺寸变化监听 |
135
+
136
+ ## 主题定制
21
137
 
22
- ## Customize configuration
138
+ Straw UI 使用 CSS 变量定义主题,你可以通过覆盖变量来自定义主题:
23
139
 
24
- See [Vite Configuration Reference](https://vite.dev/config/).
140
+ ```css
141
+ :root {
142
+ --primary: #3b82f6;
143
+ --primary-foreground: #ffffff;
144
+ --radius: 0.5rem;
145
+ /* 更多变量... */
146
+ }
25
147
 
26
- ## Project Setup
148
+ [data-theme='dark'] {
149
+ --primary: #3b82f6;
150
+ /* 暗色主题变量... */
151
+ }
152
+ ```
153
+
154
+ 完整变量列表请参阅 [UnoCSS 集成文档](./docs/unocss.md#主题变量)。
155
+
156
+ ## 开发
157
+
158
+ ### 环境要求
159
+
160
+ - Node.js: `^20.19.0 || >=22.12.0`
161
+
162
+ ### 安装依赖
27
163
 
28
164
  ```sh
29
- bun install
165
+ npm install
30
166
  ```
31
167
 
32
- ### Compile and Hot-Reload for Development
168
+ ### 开发模式
33
169
 
34
170
  ```sh
35
- bun dev
171
+ npm run dev
36
172
  ```
37
173
 
38
- ### Type-Check, Compile and Minify for Production
174
+ ### 构建库
39
175
 
40
176
  ```sh
41
- bun run build
177
+ npm run build:lib
42
178
  ```
179
+
180
+ ### 类型检查
181
+
182
+ ```sh
183
+ npm run type-check
184
+ ```
185
+
186
+ ### 文档开发
187
+
188
+ ```sh
189
+ npm run docs:dev
190
+ ```
191
+
192
+ ## 文档
193
+
194
+ - [UnoCSS 集成](./docs/unocss.md)
195
+ - [TypeScript 配置](./docs/typescript.md)
196
+
197
+ ## 推荐 IDE 设置
198
+
199
+ - [VS Code](https://code.visualstudio.com/)
200
+ - [Vue - Official (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.volar)(禁用 Vetur)
201
+ - [UnoCSS](https://marketplace.visualstudio.com/items?itemName=antfu.unocss)
202
+
203
+ ## License
204
+
205
+ MIT
@@ -1,11 +1,11 @@
1
1
  export declare const StButton: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').ButtonProps> & Readonly<{
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
3
3
  onClick?: (event: MouseEvent) => any;
4
4
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
5
  click: (event: MouseEvent) => any;
6
6
  }, import('vue').PublicProps, {
7
- type: import('./types.d.ts').ButtonType;
8
- variant: import('./types.d.ts').ButtonVariant;
7
+ type: import('./types.d.ts').StButtonType;
8
+ variant: import('./types.d.ts').StButtonVariant;
9
9
  disabled: boolean;
10
10
  loading: boolean;
11
11
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -15,28 +15,28 @@ export declare const StButton: {
15
15
  C: {};
16
16
  M: {};
17
17
  Defaults: {};
18
- }, Readonly<import('./types.d.ts').ButtonProps> & Readonly<{
18
+ }, Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
19
19
  onClick?: (event: MouseEvent) => any;
20
20
  }>, {}, {}, {}, {}, {
21
- type: import('./types.d.ts').ButtonType;
22
- variant: import('./types.d.ts').ButtonVariant;
21
+ type: import('./types.d.ts').StButtonType;
22
+ variant: import('./types.d.ts').StButtonVariant;
23
23
  disabled: boolean;
24
24
  loading: boolean;
25
25
  }>;
26
26
  __isFragment?: never;
27
27
  __isTeleport?: never;
28
28
  __isSuspense?: never;
29
- } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').ButtonProps> & Readonly<{
29
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StButtonProps> & Readonly<{
30
30
  onClick?: (event: MouseEvent) => any;
31
31
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
32
  click: (event: MouseEvent) => any;
33
33
  }, string, {
34
- type: import('./types.d.ts').ButtonType;
35
- variant: import('./types.d.ts').ButtonVariant;
34
+ type: import('./types.d.ts').StButtonType;
35
+ variant: import('./types.d.ts').StButtonVariant;
36
36
  disabled: boolean;
37
37
  loading: boolean;
38
38
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
39
- $slots: Readonly<import('./types.d.ts').ButtonSlots> & import('./types.d.ts').ButtonSlots;
39
+ $slots: import('./types.d.ts').StButtonSlots;
40
40
  });
41
41
  export default StButton;
42
42
  export type * from './types.d.ts';
@@ -0,0 +1,20 @@
1
+ import { StButtonProps, StButtonSlots, StButtonType, StButtonVariant } from './types.d.ts';
2
+ type __VLS_Slots = StButtonSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<StButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ click: (event: MouseEvent) => any;
5
+ }, string, import('vue').PublicProps, Readonly<StButtonProps> & Readonly<{
6
+ onClick?: (event: MouseEvent) => any;
7
+ }>, {
8
+ type: StButtonType;
9
+ variant: StButtonVariant;
10
+ disabled: boolean;
11
+ loading: boolean;
12
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -1,21 +1,21 @@
1
1
  /**
2
2
  * 按钮变体类型
3
3
  * */
4
- export type ButtonVariant = 'primary' | 'default' | 'ghost';
4
+ export type StButtonVariant = 'primary' | 'default' | 'ghost';
5
5
 
6
6
  /**
7
7
  * 按钮类型
8
8
  * */
9
- export type ButtonType = 'default' | 'icon';
9
+ export type StButtonType = 'default' | 'icon';
10
10
 
11
11
  /**
12
12
  * 按钮组件属性
13
13
  * */
14
- export interface ButtonProps {
14
+ export interface StButtonProps {
15
15
  /** 按钮变体类型 */
16
- variant?: ButtonVariant;
16
+ variant?: StButtonVariant;
17
17
  /** 按钮类型 */
18
- type?: ButtonType;
18
+ type?: StButtonType;
19
19
  /** 是否禁用 */
20
20
  disabled?: boolean;
21
21
  /** 是否显示加载状态 */
@@ -41,7 +41,7 @@ export interface ButtonProps {
41
41
  /**
42
42
  * 按钮组件插槽类型
43
43
  * */
44
- export interface ButtonSlots {
44
+ export interface StButtonSlots {
45
45
  /** 默认插槽 */
46
46
  default?: () => unknown;
47
47
  /** 前缀图标插槽 */
@@ -53,7 +53,7 @@ export interface ButtonSlots {
53
53
  /**
54
54
  * 按钮组件事件类型
55
55
  * */
56
- export interface ButtonEmits {
56
+ export interface StButtonEmits {
57
57
  /** 点击事件 */
58
58
  click: [event: MouseEvent];
59
59
  }
@@ -0,0 +1,236 @@
1
+ export declare const StCascade: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadeProps & {
3
+ modelValue?: (string | number)[];
4
+ multipleValue?: (string | number)[][];
5
+ }> & Readonly<{
6
+ onClear?: () => any;
7
+ onChange?: (value: (string | number)[] | (string | number)[][]) => any;
8
+ onVisibleChange?: (visible: boolean) => any;
9
+ "onUpdate:modelValue"?: (...args: unknown[]) => any;
10
+ onRemoveTag?: (value: (string | number)[]) => any;
11
+ "onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
12
+ }>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
13
+ clear: () => any;
14
+ change: (value: (string | number)[] | (string | number)[][]) => any;
15
+ visibleChange: (visible: boolean) => any;
16
+ "update:modelValue": (...args: unknown[]) => any;
17
+ removeTag: (value: (string | number)[]) => any;
18
+ "update:multipleValue": (value: (string | number)[][]) => any;
19
+ }, import('vue').PublicProps, {
20
+ disabled: boolean;
21
+ triggerClass: ClassValue;
22
+ triggerStyle: StyleValue;
23
+ placeholder: string;
24
+ clearable: boolean;
25
+ labelKey: string;
26
+ valueKey: string;
27
+ childrenKey: string;
28
+ separator: string;
29
+ multiple: boolean;
30
+ options: import('./types.d.ts').StCascadeOption[];
31
+ panelClass: ClassValue;
32
+ panelStyle: StyleValue;
33
+ menuItemClass: ClassValue;
34
+ menuItemStyle: StyleValue;
35
+ popoverClass: ClassValue;
36
+ popoverStyle: StyleValue;
37
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
38
+ P: {};
39
+ B: {};
40
+ D: {};
41
+ C: {};
42
+ M: {};
43
+ Defaults: {};
44
+ }, Readonly<import('./types.d.ts').StCascadeProps & {
45
+ modelValue?: (string | number)[];
46
+ multipleValue?: (string | number)[][];
47
+ }> & Readonly<{
48
+ onClear?: () => any;
49
+ onChange?: (value: (string | number)[] | (string | number)[][]) => any;
50
+ onVisibleChange?: (visible: boolean) => any;
51
+ "onUpdate:modelValue"?: (...args: unknown[]) => any;
52
+ onRemoveTag?: (value: (string | number)[]) => any;
53
+ "onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
54
+ }>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, {
55
+ disabled: boolean;
56
+ triggerClass: ClassValue;
57
+ triggerStyle: StyleValue;
58
+ placeholder: string;
59
+ clearable: boolean;
60
+ labelKey: string;
61
+ valueKey: string;
62
+ childrenKey: string;
63
+ separator: string;
64
+ multiple: boolean;
65
+ options: import('./types.d.ts').StCascadeOption[];
66
+ panelClass: ClassValue;
67
+ panelStyle: StyleValue;
68
+ menuItemClass: ClassValue;
69
+ menuItemStyle: StyleValue;
70
+ popoverClass: ClassValue;
71
+ popoverStyle: StyleValue;
72
+ }>;
73
+ __isFragment?: never;
74
+ __isTeleport?: never;
75
+ __isSuspense?: never;
76
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadeProps & {
77
+ modelValue?: (string | number)[];
78
+ multipleValue?: (string | number)[][];
79
+ }> & Readonly<{
80
+ onClear?: () => any;
81
+ onChange?: (value: (string | number)[] | (string | number)[][]) => any;
82
+ onVisibleChange?: (visible: boolean) => any;
83
+ "onUpdate:modelValue"?: (...args: unknown[]) => any;
84
+ onRemoveTag?: (value: (string | number)[]) => any;
85
+ "onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
86
+ }>, import('./types.d.ts').StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
87
+ clear: () => any;
88
+ change: (value: (string | number)[] | (string | number)[][]) => any;
89
+ visibleChange: (visible: boolean) => any;
90
+ "update:modelValue": (...args: unknown[]) => any;
91
+ removeTag: (value: (string | number)[]) => any;
92
+ "update:multipleValue": (value: (string | number)[][]) => any;
93
+ }, string, {
94
+ disabled: boolean;
95
+ triggerClass: ClassValue;
96
+ triggerStyle: StyleValue;
97
+ placeholder: string;
98
+ clearable: boolean;
99
+ labelKey: string;
100
+ valueKey: string;
101
+ childrenKey: string;
102
+ separator: string;
103
+ multiple: boolean;
104
+ options: import('./types.d.ts').StCascadeOption[];
105
+ panelClass: ClassValue;
106
+ panelStyle: StyleValue;
107
+ menuItemClass: ClassValue;
108
+ menuItemStyle: StyleValue;
109
+ popoverClass: ClassValue;
110
+ popoverStyle: StyleValue;
111
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
112
+ $slots: {
113
+ prefix?: (props: {}) => any;
114
+ } & {
115
+ empty?: (props: {}) => any;
116
+ };
117
+ }) & {
118
+ StCascadePanel: {
119
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
120
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
121
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
122
+ onExpand?: (level: number, value: string | number) => any;
123
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
124
+ select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
125
+ "update:modelValue": (value: (string | number)[]) => any;
126
+ expand: (level: number, value: string | number) => any;
127
+ }, import('vue').PublicProps, {
128
+ disabled: boolean;
129
+ modelValue: (string | number)[];
130
+ labelKey: string;
131
+ valueKey: string;
132
+ childrenKey: string;
133
+ options: import('./types.d.ts').StCascadeOption[];
134
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
135
+ P: {};
136
+ B: {};
137
+ D: {};
138
+ C: {};
139
+ M: {};
140
+ Defaults: {};
141
+ }, Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
142
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
143
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
144
+ onExpand?: (level: number, value: string | number) => any;
145
+ }>, {}, {}, {}, {}, {
146
+ disabled: boolean;
147
+ modelValue: (string | number)[];
148
+ labelKey: string;
149
+ valueKey: string;
150
+ childrenKey: string;
151
+ options: import('./types.d.ts').StCascadeOption[];
152
+ }>;
153
+ __isFragment?: never;
154
+ __isTeleport?: never;
155
+ __isSuspense?: never;
156
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
157
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
158
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
159
+ onExpand?: (level: number, value: string | number) => any;
160
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
161
+ select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
162
+ "update:modelValue": (value: (string | number)[]) => any;
163
+ expand: (level: number, value: string | number) => any;
164
+ }, string, {
165
+ disabled: boolean;
166
+ modelValue: (string | number)[];
167
+ labelKey: string;
168
+ valueKey: string;
169
+ childrenKey: string;
170
+ options: import('./types.d.ts').StCascadeOption[];
171
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
172
+ $slots: {
173
+ empty?: (props: {}) => any;
174
+ };
175
+ });
176
+ };
177
+ export declare const StCascadePanel: {
178
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
179
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
180
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
181
+ onExpand?: (level: number, value: string | number) => any;
182
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
183
+ select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
184
+ "update:modelValue": (value: (string | number)[]) => any;
185
+ expand: (level: number, value: string | number) => any;
186
+ }, import('vue').PublicProps, {
187
+ disabled: boolean;
188
+ modelValue: (string | number)[];
189
+ labelKey: string;
190
+ valueKey: string;
191
+ childrenKey: string;
192
+ options: import('./types.d.ts').StCascadeOption[];
193
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
194
+ P: {};
195
+ B: {};
196
+ D: {};
197
+ C: {};
198
+ M: {};
199
+ Defaults: {};
200
+ }, Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
201
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
202
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
203
+ onExpand?: (level: number, value: string | number) => any;
204
+ }>, {}, {}, {}, {}, {
205
+ disabled: boolean;
206
+ modelValue: (string | number)[];
207
+ labelKey: string;
208
+ valueKey: string;
209
+ childrenKey: string;
210
+ options: import('./types.d.ts').StCascadeOption[];
211
+ }>;
212
+ __isFragment?: never;
213
+ __isTeleport?: never;
214
+ __isSuspense?: never;
215
+ } & import('vue').ComponentOptionsBase<Readonly<import('./types.d.ts').StCascadePanelProps> & Readonly<{
216
+ onSelect?: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
217
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
218
+ onExpand?: (level: number, value: string | number) => any;
219
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
220
+ select: (value: (string | number)[], option: import('./types.d.ts').StCascadeOption) => any;
221
+ "update:modelValue": (value: (string | number)[]) => any;
222
+ expand: (level: number, value: string | number) => any;
223
+ }, string, {
224
+ disabled: boolean;
225
+ modelValue: (string | number)[];
226
+ labelKey: string;
227
+ valueKey: string;
228
+ childrenKey: string;
229
+ options: import('./types.d.ts').StCascadeOption[];
230
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
231
+ $slots: {
232
+ empty?: (props: {}) => any;
233
+ };
234
+ });
235
+ export default StCascade;
236
+ export type * from './types.d.ts';
@@ -0,0 +1,29 @@
1
+ import { StCascadeOption, StCascadePanelProps } from './types.d.ts';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ empty?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<StCascadePanelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ select: (value: (string | number)[], option: StCascadeOption) => any;
8
+ "update:modelValue": (value: (string | number)[]) => any;
9
+ expand: (level: number, value: string | number) => any;
10
+ }, string, import('vue').PublicProps, Readonly<StCascadePanelProps> & Readonly<{
11
+ onSelect?: (value: (string | number)[], option: StCascadeOption) => any;
12
+ "onUpdate:modelValue"?: (value: (string | number)[]) => any;
13
+ onExpand?: (level: number, value: string | number) => any;
14
+ }>, {
15
+ disabled: boolean;
16
+ modelValue: (string | number)[];
17
+ labelKey: string;
18
+ valueKey: string;
19
+ childrenKey: string;
20
+ options: StCascadeOption[];
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,60 @@
1
+ import { StCascadeOption, StCascadeExpose, StCascadeProps } from './types.d.ts';
2
+ type __VLS_Props = StCascadeProps;
3
+ type __VLS_ModelProps = {
4
+ /**
5
+ * 单选模式下的选中路径
6
+ * */
7
+ modelValue?: (string | number)[];
8
+ /**
9
+ * 多选模式下的选中路径列表
10
+ * */
11
+ 'multipleValue'?: (string | number)[][];
12
+ };
13
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
14
+ declare var __VLS_25: {}, __VLS_41: {};
15
+ type __VLS_Slots = {} & {
16
+ prefix?: (props: typeof __VLS_25) => any;
17
+ } & {
18
+ empty?: (props: typeof __VLS_41) => any;
19
+ };
20
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, StCascadeExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ clear: () => any;
22
+ change: (value: (string | number)[] | (string | number)[][]) => any;
23
+ visibleChange: (visible: boolean) => any;
24
+ "update:modelValue": (...args: unknown[]) => any;
25
+ removeTag: (value: (string | number)[]) => any;
26
+ "update:multipleValue": (value: (string | number)[][]) => any;
27
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
28
+ onClear?: () => any;
29
+ onChange?: (value: (string | number)[] | (string | number)[][]) => any;
30
+ onVisibleChange?: (visible: boolean) => any;
31
+ "onUpdate:modelValue"?: (...args: unknown[]) => any;
32
+ onRemoveTag?: (value: (string | number)[]) => any;
33
+ "onUpdate:multipleValue"?: (value: (string | number)[][]) => any;
34
+ }>, {
35
+ disabled: boolean;
36
+ triggerClass: ClassValue;
37
+ triggerStyle: StyleValue;
38
+ placeholder: string;
39
+ clearable: boolean;
40
+ labelKey: string;
41
+ valueKey: string;
42
+ childrenKey: string;
43
+ separator: string;
44
+ multiple: boolean;
45
+ options: StCascadeOption[];
46
+ panelClass: ClassValue;
47
+ panelStyle: StyleValue;
48
+ menuItemClass: ClassValue;
49
+ menuItemStyle: StyleValue;
50
+ popoverClass: ClassValue;
51
+ popoverStyle: StyleValue;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
53
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
54
+ declare const _default: typeof __VLS_export;
55
+ export default _default;
56
+ type __VLS_WithSlots<T, S> = T & {
57
+ new (): {
58
+ $slots: S;
59
+ };
60
+ };