neko-ui 2.8.21 → 2.8.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) hide show
  1. package/es/avatar/README.mdx +10 -0
  2. package/es/avatar/examples/basic.md +14 -0
  3. package/es/avatar/examples/group.md +57 -0
  4. package/es/avatar/examples/size.md +21 -0
  5. package/es/avatar/style.js +2 -2
  6. package/es/avatar/style.js.map +1 -1
  7. package/es/back-top/README.mdx +10 -0
  8. package/es/back-top/examples/basic.md +19 -0
  9. package/es/back-top/examples/mount.md +36 -0
  10. package/es/back-top/examples/target.md +46 -0
  11. package/es/basic-config/README.mdx +11 -0
  12. package/es/button/README.mdx +10 -0
  13. package/es/button/examples/basic.md +21 -0
  14. package/es/button/examples/block.md +33 -0
  15. package/es/button/examples/circle.md +21 -0
  16. package/es/button/examples/danger.md +23 -0
  17. package/es/button/examples/dashed.md +21 -0
  18. package/es/button/examples/disabled.md +35 -0
  19. package/es/button/examples/fill.md +21 -0
  20. package/es/button/examples/flat.md +21 -0
  21. package/es/button/examples/ghost.md +21 -0
  22. package/es/button/examples/icon.md +30 -0
  23. package/es/button/examples/link.md +21 -0
  24. package/es/button/examples/size.md +23 -0
  25. package/es/capture-screen/README.mdx +10 -0
  26. package/es/capture-screen/examples/basic.md +13 -0
  27. package/es/capture-screen/examples/custom-save.md +30 -0
  28. package/es/capture-screen/examples/preview.md +13 -0
  29. package/es/capture-screen/examples/recorder-save.md +13 -0
  30. package/es/carousel/README.mdx +10 -0
  31. package/es/carousel/examples/autoplay.md +21 -0
  32. package/es/carousel/examples/basic.md +23 -0
  33. package/es/carousel/examples/dots.md +23 -0
  34. package/es/carousel/examples/header.md +38 -0
  35. package/es/checkbox/README.mdx +10 -0
  36. package/es/checkbox/examples/basic.md +31 -0
  37. package/es/checkbox/examples/check-all.md +37 -0
  38. package/es/checkbox/examples/disabled-all.md +28 -0
  39. package/es/checkbox/examples/disabled-option.md +35 -0
  40. package/es/checkbox/examples/field-names.md +40 -0
  41. package/es/checkbox/examples/status.md +37 -0
  42. package/es/checkbox/examples/vertical.md +36 -0
  43. package/es/code/README.mdx +10 -0
  44. package/es/code/examples/basic.md +19 -0
  45. package/es/code/examples/diff.md +45 -0
  46. package/es/code/examples/line-number.md +18 -0
  47. package/es/code/examples/live-edit.md +20 -0
  48. package/es/code/examples/toolbar.md +18 -0
  49. package/es/code/index.js +2 -2
  50. package/es/code/index.js.map +1 -1
  51. package/es/color-palette/README.mdx +10 -0
  52. package/es/color-palette/examples/default-value.md +25 -0
  53. package/es/color-palette/examples/hexa.md +13 -0
  54. package/es/color-palette/examples/hsla.md +13 -0
  55. package/es/color-palette/examples/rgba.md +13 -0
  56. package/es/color-picker/README.mdx +10 -0
  57. package/es/color-picker/examples/basic.md +12 -0
  58. package/es/color-picker/examples/default-value.md +20 -0
  59. package/es/color-picker/examples/size.md +17 -0
  60. package/es/cron/README.mdx +10 -0
  61. package/es/cron/examples/basic.md +19 -0
  62. package/es/cron/examples/card.md +12 -0
  63. package/es/cron/examples/show-cron.md +12 -0
  64. package/es/date-picker/README.mdx +10 -0
  65. package/es/date-picker/examples/basic.md +24 -0
  66. package/es/date-picker/examples/date.md +13 -0
  67. package/es/date-picker/examples/disbaled.md +13 -0
  68. package/es/date-picker/examples/header.md +13 -0
  69. package/es/date-picker/examples/month.md +13 -0
  70. package/es/date-picker/examples/time.md +15 -0
  71. package/es/date-picker/examples/today.md +13 -0
  72. package/es/date-picker/examples/year.md +13 -0
  73. package/es/dropdown/README.mdx +10 -0
  74. package/es/dropdown/examples/arrow.md +59 -0
  75. package/es/dropdown/examples/basic.md +17 -0
  76. package/es/dropdown/examples/click.md +45 -0
  77. package/es/dropdown/examples/context-menu.md +66 -0
  78. package/es/dropdown/examples/field-names.md +44 -0
  79. package/es/dropdown/examples/icon.md +30 -0
  80. package/es/dropdown/examples/multiple.md +45 -0
  81. package/es/dropdown/examples/no-data.md +16 -0
  82. package/es/dropdown/examples/placement.md +59 -0
  83. package/es/dropdown/examples/toggle.md +36 -0
  84. package/es/highlight-text/README.mdx +10 -0
  85. package/es/highlight-text/examples/basic.md +19 -0
  86. package/es/highlight-text/examples/mut.md +47 -0
  87. package/es/highlight-text/examples/not-hightlight.md +19 -0
  88. package/es/img/README.mdx +10 -0
  89. package/es/img/examples/basic.md +17 -0
  90. package/es/img/examples/close-mask.md +21 -0
  91. package/es/img/examples/disabled.md +16 -0
  92. package/es/img/examples/error.md +13 -0
  93. package/es/img/examples/esc.md +21 -0
  94. package/es/img/examples/open-change.md +25 -0
  95. package/es/input/README.mdx +10 -0
  96. package/es/input/examples/basic.md +31 -0
  97. package/es/input/examples/prefix&suffix.md +33 -0
  98. package/es/input/examples/size.md +21 -0
  99. package/es/input/examples/status.md +23 -0
  100. package/es/input-number/README.mdx +10 -0
  101. package/es/input-number/examples/basic.md +26 -0
  102. package/es/input-number/examples/formatter.md +36 -0
  103. package/es/input-number/examples/max-min.md +13 -0
  104. package/es/katex/README.mdx +42 -0
  105. package/es/katex/examples/block.md +25 -0
  106. package/es/katex/examples/inline.md +19 -0
  107. package/es/md/README.mdx +10 -0
  108. package/es/md/examples/in-children.md +23 -0
  109. package/es/md/examples/in-text.md +32 -0
  110. package/es/md/examples/math.md +36 -0
  111. package/es/menu/README.mdx +10 -0
  112. package/es/menu/examples/basic.md +17 -0
  113. package/es/menu/examples/field-names.md +42 -0
  114. package/es/menu/examples/icon.md +125 -0
  115. package/es/menu/examples/multiple.md +42 -0
  116. package/es/modal/README.mdx +10 -0
  117. package/es/modal/examples/basic.md +56 -0
  118. package/es/modal/examples/close-icon.md +57 -0
  119. package/es/modal/examples/esc-closable.md +64 -0
  120. package/es/modal/examples/mask-blur.md +56 -0
  121. package/es/modal/examples/mask-closable.md +64 -0
  122. package/es/notification/README.mdx +11 -0
  123. package/es/notification/examples/basic.md +35 -0
  124. package/es/notification/examples/close.md +35 -0
  125. package/es/notification/examples/type.md +84 -0
  126. package/es/notification/examples/update.md +52 -0
  127. package/es/pagination/README.mdx +10 -0
  128. package/es/pagination/examples/basic.md +13 -0
  129. package/es/pagination/examples/onchange.md +29 -0
  130. package/es/pagination/examples/size.md +23 -0
  131. package/es/pagination/examples/total-text.md +42 -0
  132. package/es/popover/README.mdx +10 -0
  133. package/es/popover/examples/basic.md +35 -0
  134. package/es/popover/examples/click.md +15 -0
  135. package/es/popover/examples/context-menu.md +58 -0
  136. package/es/popover/examples/controlled.md +47 -0
  137. package/es/provider/README.mdx +10 -0
  138. package/es/provider/examples/scheme.md +14 -0
  139. package/es/radio/README.mdx +10 -0
  140. package/es/radio/examples/basic.md +19 -0
  141. package/es/radio/examples/disabled-option.md +19 -0
  142. package/es/radio/examples/disabled.md +19 -0
  143. package/es/radio/examples/field-names.md +39 -0
  144. package/es/radio/examples/layout-vertical.md +19 -0
  145. package/es/radio/examples/status.md +31 -0
  146. package/es/segmented/README.mdx +10 -0
  147. package/es/segmented/examples/basic.md +18 -0
  148. package/es/segmented/examples/custom-field-names.md +43 -0
  149. package/es/segmented/examples/disabled-option.md +29 -0
  150. package/es/segmented/examples/disabled.md +18 -0
  151. package/es/segmented/examples/icon.md +28 -0
  152. package/es/segmented/examples/options.md +21 -0
  153. package/es/select/README.mdx +10 -0
  154. package/es/select/examples/basic.md +44 -0
  155. package/es/select/examples/disabled-option.md +21 -0
  156. package/es/select/examples/disabled.md +24 -0
  157. package/es/select/examples/field-names.md +40 -0
  158. package/es/select/examples/item-suffix.md +84 -0
  159. package/es/select/examples/multiple.md +61 -0
  160. package/es/select/examples/no-data.md +12 -0
  161. package/es/select/examples/prefix-icon.md +74 -0
  162. package/es/skeleton/README.mdx +10 -0
  163. package/es/skeleton/examples/animation.md +13 -0
  164. package/es/skeleton/examples/avatar.md +13 -0
  165. package/es/skeleton/examples/basic.md +12 -0
  166. package/es/skeleton/examples/rows.md +13 -0
  167. package/es/skeleton/examples/title.md +12 -0
  168. package/es/spin/README.mdx +10 -0
  169. package/es/spin/examples/basic.md +67 -0
  170. package/es/switch/README.mdx +10 -0
  171. package/es/switch/examples/basic.md +24 -0
  172. package/es/switch/examples/checked-text.md +17 -0
  173. package/es/switch/examples/disabled.md +15 -0
  174. package/es/switch/examples/loading.md +17 -0
  175. package/es/table/README.mdx +10 -0
  176. package/es/table/examples/basic.md +29 -0
  177. package/es/table/examples/key.md +29 -0
  178. package/es/table/examples/order.md +29 -0
  179. package/es/table/examples/pagination.md +67 -0
  180. package/es/table/examples/render.md +92 -0
  181. package/es/table/examples/size.md +52 -0
  182. package/es/table/examples/summary.md +40 -0
  183. package/es/tabs/README.mdx +10 -0
  184. package/es/tabs/examples/add-remove.md +115 -0
  185. package/es/tabs/examples/animated.md +33 -0
  186. package/es/tabs/examples/basic.md +32 -0
  187. package/es/tabs/examples/card.md +33 -0
  188. package/es/tabs/examples/center.md +33 -0
  189. package/es/tabs/examples/disabled-tab.md +34 -0
  190. package/es/tabs/examples/disabled.md +33 -0
  191. package/es/tabs/examples/extra.md +65 -0
  192. package/es/tag/README.mdx +10 -0
  193. package/es/tag/examples/basic.md +28 -0
  194. package/es/tag/examples/bordered.md +19 -0
  195. package/es/tag/examples/color.md +25 -0
  196. package/es/tag/examples/icon.md +21 -0
  197. package/es/tag/examples/type.md +19 -0
  198. package/es/theme/README.mdx +10 -0
  199. package/es/theme/examples/colors.md +123 -0
  200. package/es/theme/examples/theme.md +19 -0
  201. package/es/theme/index.js.map +1 -1
  202. package/es/tree/README.mdx +10 -0
  203. package/es/tree/examples/basic.md +108 -0
  204. package/es/tree/examples/custom-render.md +115 -0
  205. package/es/tree/examples/direction.md +100 -0
  206. package/es/tree/examples/field-names.md +114 -0
  207. package/es/tree/examples/multiple.md +117 -0
  208. package/es/tree/examples/readonly.md +90 -0
  209. package/es/tree/examples/render-tree-string1.md +70 -0
  210. package/es/tree/examples/render-tree-string2.md +52 -0
  211. package/es/tree/examples/schema.md +130 -0
  212. package/es/tree/examples/size.md +125 -0
  213. package/es/tree/examples/toggle.md +71 -0
  214. package/es/typography/README.mdx +10 -0
  215. package/es/typography/examples/basic.md +27 -0
  216. package/es/typography/examples/tag.md +25 -0
  217. package/es/typography/examples/truncated.md +17 -0
  218. package/lib/avatar/README.mdx +10 -0
  219. package/lib/avatar/examples/basic.md +14 -0
  220. package/lib/avatar/examples/group.md +57 -0
  221. package/lib/avatar/examples/size.md +21 -0
  222. package/lib/avatar/style.js +2 -2
  223. package/lib/avatar/style.js.map +1 -1
  224. package/lib/back-top/README.mdx +10 -0
  225. package/lib/back-top/examples/basic.md +19 -0
  226. package/lib/back-top/examples/mount.md +36 -0
  227. package/lib/back-top/examples/target.md +46 -0
  228. package/lib/basic-config/README.mdx +11 -0
  229. package/lib/button/README.mdx +10 -0
  230. package/lib/button/examples/basic.md +21 -0
  231. package/lib/button/examples/block.md +33 -0
  232. package/lib/button/examples/circle.md +21 -0
  233. package/lib/button/examples/danger.md +23 -0
  234. package/lib/button/examples/dashed.md +21 -0
  235. package/lib/button/examples/disabled.md +35 -0
  236. package/lib/button/examples/fill.md +21 -0
  237. package/lib/button/examples/flat.md +21 -0
  238. package/lib/button/examples/ghost.md +21 -0
  239. package/lib/button/examples/icon.md +30 -0
  240. package/lib/button/examples/link.md +21 -0
  241. package/lib/button/examples/size.md +23 -0
  242. package/lib/capture-screen/README.mdx +10 -0
  243. package/lib/capture-screen/examples/basic.md +13 -0
  244. package/lib/capture-screen/examples/custom-save.md +30 -0
  245. package/lib/capture-screen/examples/preview.md +13 -0
  246. package/lib/capture-screen/examples/recorder-save.md +13 -0
  247. package/lib/carousel/README.mdx +10 -0
  248. package/lib/carousel/examples/autoplay.md +21 -0
  249. package/lib/carousel/examples/basic.md +23 -0
  250. package/lib/carousel/examples/dots.md +23 -0
  251. package/lib/carousel/examples/header.md +38 -0
  252. package/lib/checkbox/README.mdx +10 -0
  253. package/lib/checkbox/examples/basic.md +31 -0
  254. package/lib/checkbox/examples/check-all.md +37 -0
  255. package/lib/checkbox/examples/disabled-all.md +28 -0
  256. package/lib/checkbox/examples/disabled-option.md +35 -0
  257. package/lib/checkbox/examples/field-names.md +40 -0
  258. package/lib/checkbox/examples/status.md +37 -0
  259. package/lib/checkbox/examples/vertical.md +36 -0
  260. package/lib/code/README.mdx +10 -0
  261. package/lib/code/examples/basic.md +19 -0
  262. package/lib/code/examples/diff.md +45 -0
  263. package/lib/code/examples/line-number.md +18 -0
  264. package/lib/code/examples/live-edit.md +20 -0
  265. package/lib/code/examples/toolbar.md +18 -0
  266. package/lib/code/index.js +2 -2
  267. package/lib/code/index.js.map +1 -1
  268. package/lib/color-palette/README.mdx +10 -0
  269. package/lib/color-palette/examples/default-value.md +25 -0
  270. package/lib/color-palette/examples/hexa.md +13 -0
  271. package/lib/color-palette/examples/hsla.md +13 -0
  272. package/lib/color-palette/examples/rgba.md +13 -0
  273. package/lib/color-picker/README.mdx +10 -0
  274. package/lib/color-picker/examples/basic.md +12 -0
  275. package/lib/color-picker/examples/default-value.md +20 -0
  276. package/lib/color-picker/examples/size.md +17 -0
  277. package/lib/cron/README.mdx +10 -0
  278. package/lib/cron/examples/basic.md +19 -0
  279. package/lib/cron/examples/card.md +12 -0
  280. package/lib/cron/examples/show-cron.md +12 -0
  281. package/lib/date-picker/README.mdx +10 -0
  282. package/lib/date-picker/examples/basic.md +24 -0
  283. package/lib/date-picker/examples/date.md +13 -0
  284. package/lib/date-picker/examples/disbaled.md +13 -0
  285. package/lib/date-picker/examples/header.md +13 -0
  286. package/lib/date-picker/examples/month.md +13 -0
  287. package/lib/date-picker/examples/time.md +15 -0
  288. package/lib/date-picker/examples/today.md +13 -0
  289. package/lib/date-picker/examples/year.md +13 -0
  290. package/lib/dropdown/README.mdx +10 -0
  291. package/lib/dropdown/examples/arrow.md +59 -0
  292. package/lib/dropdown/examples/basic.md +17 -0
  293. package/lib/dropdown/examples/click.md +45 -0
  294. package/lib/dropdown/examples/context-menu.md +66 -0
  295. package/lib/dropdown/examples/field-names.md +44 -0
  296. package/lib/dropdown/examples/icon.md +30 -0
  297. package/lib/dropdown/examples/multiple.md +45 -0
  298. package/lib/dropdown/examples/no-data.md +16 -0
  299. package/lib/dropdown/examples/placement.md +59 -0
  300. package/lib/dropdown/examples/toggle.md +36 -0
  301. package/lib/highlight-text/README.mdx +10 -0
  302. package/lib/highlight-text/examples/basic.md +19 -0
  303. package/lib/highlight-text/examples/mut.md +47 -0
  304. package/lib/highlight-text/examples/not-hightlight.md +19 -0
  305. package/lib/img/README.mdx +10 -0
  306. package/lib/img/examples/basic.md +17 -0
  307. package/lib/img/examples/close-mask.md +21 -0
  308. package/lib/img/examples/disabled.md +16 -0
  309. package/lib/img/examples/error.md +13 -0
  310. package/lib/img/examples/esc.md +21 -0
  311. package/lib/img/examples/open-change.md +25 -0
  312. package/lib/input/README.mdx +10 -0
  313. package/lib/input/examples/basic.md +31 -0
  314. package/lib/input/examples/prefix&suffix.md +33 -0
  315. package/lib/input/examples/size.md +21 -0
  316. package/lib/input/examples/status.md +23 -0
  317. package/lib/input-number/README.mdx +10 -0
  318. package/lib/input-number/examples/basic.md +26 -0
  319. package/lib/input-number/examples/formatter.md +36 -0
  320. package/lib/input-number/examples/max-min.md +13 -0
  321. package/lib/katex/README.mdx +42 -0
  322. package/lib/katex/examples/block.md +25 -0
  323. package/lib/katex/examples/inline.md +19 -0
  324. package/lib/md/README.mdx +10 -0
  325. package/lib/md/examples/in-children.md +23 -0
  326. package/lib/md/examples/in-text.md +32 -0
  327. package/lib/md/examples/math.md +36 -0
  328. package/lib/menu/README.mdx +10 -0
  329. package/lib/menu/examples/basic.md +17 -0
  330. package/lib/menu/examples/field-names.md +42 -0
  331. package/lib/menu/examples/icon.md +125 -0
  332. package/lib/menu/examples/multiple.md +42 -0
  333. package/lib/modal/README.mdx +10 -0
  334. package/lib/modal/examples/basic.md +56 -0
  335. package/lib/modal/examples/close-icon.md +57 -0
  336. package/lib/modal/examples/esc-closable.md +64 -0
  337. package/lib/modal/examples/mask-blur.md +56 -0
  338. package/lib/modal/examples/mask-closable.md +64 -0
  339. package/lib/notification/README.mdx +11 -0
  340. package/lib/notification/examples/basic.md +35 -0
  341. package/lib/notification/examples/close.md +35 -0
  342. package/lib/notification/examples/type.md +84 -0
  343. package/lib/notification/examples/update.md +52 -0
  344. package/lib/pagination/README.mdx +10 -0
  345. package/lib/pagination/examples/basic.md +13 -0
  346. package/lib/pagination/examples/onchange.md +29 -0
  347. package/lib/pagination/examples/size.md +23 -0
  348. package/lib/pagination/examples/total-text.md +42 -0
  349. package/lib/popover/README.mdx +10 -0
  350. package/lib/popover/examples/basic.md +35 -0
  351. package/lib/popover/examples/click.md +15 -0
  352. package/lib/popover/examples/context-menu.md +58 -0
  353. package/lib/popover/examples/controlled.md +47 -0
  354. package/lib/provider/README.mdx +10 -0
  355. package/lib/provider/examples/scheme.md +14 -0
  356. package/lib/radio/README.mdx +10 -0
  357. package/lib/radio/examples/basic.md +19 -0
  358. package/lib/radio/examples/disabled-option.md +19 -0
  359. package/lib/radio/examples/disabled.md +19 -0
  360. package/lib/radio/examples/field-names.md +39 -0
  361. package/lib/radio/examples/layout-vertical.md +19 -0
  362. package/lib/radio/examples/status.md +31 -0
  363. package/lib/segmented/README.mdx +10 -0
  364. package/lib/segmented/examples/basic.md +18 -0
  365. package/lib/segmented/examples/custom-field-names.md +43 -0
  366. package/lib/segmented/examples/disabled-option.md +29 -0
  367. package/lib/segmented/examples/disabled.md +18 -0
  368. package/lib/segmented/examples/icon.md +28 -0
  369. package/lib/segmented/examples/options.md +21 -0
  370. package/lib/select/README.mdx +10 -0
  371. package/lib/select/examples/basic.md +44 -0
  372. package/lib/select/examples/disabled-option.md +21 -0
  373. package/lib/select/examples/disabled.md +24 -0
  374. package/lib/select/examples/field-names.md +40 -0
  375. package/lib/select/examples/item-suffix.md +84 -0
  376. package/lib/select/examples/multiple.md +61 -0
  377. package/lib/select/examples/no-data.md +12 -0
  378. package/lib/select/examples/prefix-icon.md +74 -0
  379. package/lib/skeleton/README.mdx +10 -0
  380. package/lib/skeleton/examples/animation.md +13 -0
  381. package/lib/skeleton/examples/avatar.md +13 -0
  382. package/lib/skeleton/examples/basic.md +12 -0
  383. package/lib/skeleton/examples/rows.md +13 -0
  384. package/lib/skeleton/examples/title.md +12 -0
  385. package/lib/spin/README.mdx +10 -0
  386. package/lib/spin/examples/basic.md +67 -0
  387. package/lib/switch/README.mdx +10 -0
  388. package/lib/switch/examples/basic.md +24 -0
  389. package/lib/switch/examples/checked-text.md +17 -0
  390. package/lib/switch/examples/disabled.md +15 -0
  391. package/lib/switch/examples/loading.md +17 -0
  392. package/lib/table/README.mdx +10 -0
  393. package/lib/table/examples/basic.md +29 -0
  394. package/lib/table/examples/key.md +29 -0
  395. package/lib/table/examples/order.md +29 -0
  396. package/lib/table/examples/pagination.md +67 -0
  397. package/lib/table/examples/render.md +92 -0
  398. package/lib/table/examples/size.md +52 -0
  399. package/lib/table/examples/summary.md +40 -0
  400. package/lib/tabs/README.mdx +10 -0
  401. package/lib/tabs/examples/add-remove.md +115 -0
  402. package/lib/tabs/examples/animated.md +33 -0
  403. package/lib/tabs/examples/basic.md +32 -0
  404. package/lib/tabs/examples/card.md +33 -0
  405. package/lib/tabs/examples/center.md +33 -0
  406. package/lib/tabs/examples/disabled-tab.md +34 -0
  407. package/lib/tabs/examples/disabled.md +33 -0
  408. package/lib/tabs/examples/extra.md +65 -0
  409. package/lib/tag/README.mdx +10 -0
  410. package/lib/tag/examples/basic.md +28 -0
  411. package/lib/tag/examples/bordered.md +19 -0
  412. package/lib/tag/examples/color.md +25 -0
  413. package/lib/tag/examples/icon.md +21 -0
  414. package/lib/tag/examples/type.md +19 -0
  415. package/lib/theme/README.mdx +10 -0
  416. package/lib/theme/examples/colors.md +123 -0
  417. package/lib/theme/examples/theme.md +19 -0
  418. package/lib/theme/index.js.map +1 -1
  419. package/lib/tree/README.mdx +10 -0
  420. package/lib/tree/examples/basic.md +108 -0
  421. package/lib/tree/examples/custom-render.md +115 -0
  422. package/lib/tree/examples/direction.md +100 -0
  423. package/lib/tree/examples/field-names.md +114 -0
  424. package/lib/tree/examples/multiple.md +117 -0
  425. package/lib/tree/examples/readonly.md +90 -0
  426. package/lib/tree/examples/render-tree-string1.md +70 -0
  427. package/lib/tree/examples/render-tree-string2.md +52 -0
  428. package/lib/tree/examples/schema.md +130 -0
  429. package/lib/tree/examples/size.md +125 -0
  430. package/lib/tree/examples/toggle.md +71 -0
  431. package/lib/typography/README.mdx +10 -0
  432. package/lib/typography/examples/basic.md +27 -0
  433. package/lib/typography/examples/tag.md +25 -0
  434. package/lib/typography/examples/truncated.md +17 -0
  435. package/package.json +13 -13
  436. package/umd/assets/svg/favicon.svg +1 -0
  437. package/umd/index.js +2 -2
  438. package/umd/js/523fd5cd0ae65592.js +1 -0
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: 通用
3
+ title: 头像
4
+ subtitle: n-avatar
5
+ icon: 🎧
6
+ ---
7
+
8
+ # 带轮廓的头像
9
+
10
+ > 带 logo 轮廓的头像
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: 最简单的用法
3
+ description: 通过 `src` 属性设置头像
4
+ order: 1
5
+ col: 50%
6
+ ---
7
+
8
+ ```html
9
+ <n-avatar src="https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png"></n-avatar>
10
+ ```
11
+
12
+ ```jsx
13
+ <n-avatar src="https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png" />
14
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: 头像组
3
+ description: 使用 AvatarGroup 将头像组合展现。
4
+ order: 3
5
+ ---
6
+
7
+ ```html
8
+ <n-avatar-group></n-avatar-group>
9
+ <n-avatar-group max-count="10"></n-avatar-group>
10
+ <script>
11
+ const el = container.querySelectorAll('n-avatar-group');
12
+
13
+ el[0].data = Array(4).fill({
14
+ src: 'https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png',
15
+ });
16
+ el[1].data = Array(20)
17
+ .fill(0)
18
+ .map((_, i) => {
19
+ if (i % 2) {
20
+ return {
21
+ src: 'https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png',
22
+ };
23
+ }
24
+ return {
25
+ username: ['avatar', 'gw', 'bjec', '#zos'][i % 3],
26
+ color: ['#cabdeb', 'green', '#e9887c', '#e989ua'][i % 3],
27
+ };
28
+ });
29
+ </script>
30
+ ```
31
+
32
+ ```jsx
33
+ const data1 = Array(4).fill({
34
+ src: 'https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png',
35
+ });
36
+ const data2 = Array(20)
37
+ .fill(0)
38
+ .map((_, i) => {
39
+ if (i % 2) {
40
+ return {
41
+ src: 'https://gw.alipayobjects.com/zos/alicdn/HJtErOC0O/avatar.png',
42
+ };
43
+ }
44
+ return {
45
+ username: ['avatar', 'gw', 'bjec', '#zos'][i % 3],
46
+ color: ['#cabdeb', 'green', '#e9887c', '#e989ua'][i % 3],
47
+ };
48
+ });
49
+
50
+ render(
51
+ <>
52
+ <n-avatar-group data={data1} />
53
+ <br />
54
+ <n-avatar-group data={data2} max-count={10} />
55
+ </>
56
+ );
57
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 最简单的用法
3
+ description: 头像内置有大、中、小三种尺寸。通过设置 `size` 为 `large`、`small` 分别把按钮设为大、小尺寸。若不设置 `size`,则尺寸为中 'normal'。也可以将 `size` 设置为实际大小 `number`
4
+ order: 2
5
+ ---
6
+
7
+ ```html
8
+ <n-avatar size="100" username="100"></n-avatar>
9
+ <n-avatar size="50" username="50"></n-avatar>
10
+ <n-avatar size="large" username="large"></n-avatar>
11
+ <n-avatar size="normal" username="normal"></n-avatar>
12
+ <n-avatar size="small" username="small"></n-avatar>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-avatar size="100" username="100"></n-avatar>
17
+ <n-avatar size="50" username="50"></n-avatar>
18
+ <n-avatar size="large" username="large"></n-avatar>
19
+ <n-avatar size="normal" username="normal"></n-avatar>
20
+ <n-avatar size="small" username="small"></n-avatar>
21
+ ```
@@ -1,4 +1,4 @@
1
- import{css as e}from"@moneko/css";import i from"./favicon.svg";let t=`data:image/svg+xml;base64,${window.btoa(decodeURIComponent(i.replace("data:image/svg+xml,","")))}`;export const style=e`
1
+ import{css as e}from"@moneko/css";import i from"./favicon.svg";export const style=e`
2
2
  .avatar {
3
3
  position: relative;
4
4
  display: inline-flex;
@@ -33,7 +33,7 @@ import{css as e}from"@moneko/css";import i from"./favicon.svg";let t=`data:image
33
33
  }
34
34
 
35
35
  &::after {
36
- background: url(${t}) no-repeat center/contain;
36
+ background: url(${i}) no-repeat center/contain;
37
37
  }
38
38
 
39
39
  &:hover {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../components/avatar/style.ts"],"sourcesContent":["import { css } from '@moneko/css';\nimport favicon from './favicon.svg';\n\nconst faviconBg = `data:image/svg+xml;base64,${window.btoa(\n decodeURIComponent(favicon.replace('data:image/svg+xml,', '')),\n)}`;\n\nexport const style = css`\n .avatar {\n position: relative;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n inline-size: 32px;\n block-size: 32px;\n transition: transform var(--transition-duration);\n cursor: pointer;\n user-select: none;\n animation: avatar-morph-effect 8s var(--transition-timing-function) infinite;\n background-image: linear-gradient(\n 45deg,\n var(--primary-outline) 0%,\n var(--success-outline) 100%\n );\n\n &::before,\n &::after {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n display: block;\n inline-size: 100%;\n block-size: 100%;\n content: '';\n pointer-events: none;\n }\n\n &::before {\n clip-path: url('#clipPathAvatar');\n }\n\n &::after {\n background: url(${faviconBg}) no-repeat center/contain;\n }\n\n &:hover {\n transform: scale(1.2);\n }\n\n img {\n position: absolute;\n inset-inline-start: 0;\n inline-size: 100%;\n block-size: 100%;\n clip-path: url('#clipPathAvatar');\n }\n }\n\n @keyframes avatar-morph-effect {\n 0% {\n border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;\n }\n\n 50% {\n border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;\n }\n\n 100% {\n border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;\n }\n }\n`;\n"],"names":["css","favicon","faviconBg","window","btoa","decodeURIComponent","replace","style"],"mappings":"AAAA,OAASA,OAAAA,CAAG,KAAQ,aAAc,AAClC,QAAOC,MAAa,eAAgB,CAEpC,IAAMC,EAAY,CAAC,0BAA0B,EAAEC,OAAOC,IAAI,CACxDC,mBAAmBJ,EAAQK,OAAO,CAAC,sBAAuB,MAC1D,CAAC,AAEH,QAAO,MAAMC,MAAQP,CAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmCH,EAAEE,EAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BlC,CAAC,AAAC"}
1
+ {"version":3,"sources":["../../components/avatar/style.ts"],"sourcesContent":["import { css } from '@moneko/css';\nimport favicon from './favicon.svg';\n\nexport const style = css`\n .avatar {\n position: relative;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n inline-size: 32px;\n block-size: 32px;\n transition: transform var(--transition-duration);\n cursor: pointer;\n user-select: none;\n animation: avatar-morph-effect 8s var(--transition-timing-function) infinite;\n background-image: linear-gradient(\n 45deg,\n var(--primary-outline) 0%,\n var(--success-outline) 100%\n );\n\n &::before,\n &::after {\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n display: block;\n inline-size: 100%;\n block-size: 100%;\n content: '';\n pointer-events: none;\n }\n\n &::before {\n clip-path: url('#clipPathAvatar');\n }\n\n &::after {\n background: url(${favicon}) no-repeat center/contain;\n }\n\n &:hover {\n transform: scale(1.2);\n }\n\n img {\n position: absolute;\n inset-inline-start: 0;\n inline-size: 100%;\n block-size: 100%;\n clip-path: url('#clipPathAvatar');\n }\n }\n\n @keyframes avatar-morph-effect {\n 0% {\n border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;\n }\n\n 50% {\n border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;\n }\n\n 100% {\n border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;\n }\n }\n`;\n"],"names":["css","favicon","style"],"mappings":"AAAA,OAASA,OAAAA,CAAG,KAAQ,aAAc,AAClC,QAAOC,MAAa,eAAgB,AAEpC,QAAO,MAAMC,MAAQF,CAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmCH,EAAEC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BhC,CAAC,AAAC"}
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: 通用
3
+ title: 回到顶部
4
+ subtitle: n-back-top
5
+ icon: ⇪
6
+ ---
7
+
8
+ # BackTop 回到顶部
9
+
10
+ > 返回页面顶部的操作按钮。
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: 最简单的用法
3
+ description: 最简单的用法
4
+ order: 1
5
+ ---
6
+
7
+ ```html
8
+ <div style="width:100%;">
9
+ <n-back-top css=":host{float:right;}"></n-back-top>
10
+ 根据 window 滚动浮现在
11
+ </div>
12
+ ```
13
+
14
+ ```jsx
15
+ <div style={{ width: '100%' }}>
16
+ 根据 window 滚动浮现在
17
+ <n-back-top css=":host{float:right;}" />
18
+ </div>
19
+ ```
@@ -0,0 +1,36 @@
1
+ ---
2
+ title: 指定挂载位置
3
+ description: 指定返回顶部的按钮挂载位置, 默认为 n-back-top 所在位置的 shadowRoot 中
4
+ order: 2
5
+ ---
6
+
7
+ ```html
8
+ <p>这里返回顶部的按钮挂载到 body 上, 根据 window 滚动浮现在左下角</p>
9
+ <n-back-top></n-back-top>
10
+ <script>
11
+ var el = container.querySelector('n-back-top');
12
+
13
+ el.mount = document.body;
14
+ el.css = `.back-top {
15
+ position: fixed;
16
+ right: unset;
17
+ left: 300px;
18
+ }`;
19
+ </script>
20
+ ```
21
+
22
+ ```jsx
23
+ <p>
24
+ 这里返回顶部的按钮挂载到 body 上, 根据 window 滚动浮现在左下角
25
+ <n-back-top
26
+ css={`
27
+ .back-top {
28
+ position: fixed;
29
+ right: unset;
30
+ left: 300px;
31
+ }
32
+ `}
33
+ mount={() => document.body}
34
+ />
35
+ </p>
36
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: 指定滚动容器
3
+ description: 通过 `target` 属性设置滚动容器, 通过 `visibility-height` 属性设置容器滚动到 200 时出现返回顶部
4
+ order: 3
5
+ ---
6
+
7
+ ```html
8
+ <div
9
+ id="custom-back-top-target"
10
+ style="height: 200px; width: 100%; overflow: auto; position: relative;"
11
+ >
12
+ <div>
13
+ <p style="height: 100px;">1</p>
14
+ <p style="height: 100px;">2</p>
15
+ <p style="height: 100px;">3</p>
16
+ <p style="height: 100px;">4</p>
17
+ </div>
18
+ <n-back-top visibility-height="200"></n-back-top>
19
+ </div>
20
+ <script>
21
+ const el = container.querySelector('n-back-top');
22
+
23
+ el.target = container.getElementById('custom-back-top-target');
24
+ </script>
25
+ ```
26
+
27
+ ```jsx
28
+ let el: HTMLDivElement;
29
+
30
+ render(
31
+ <div
32
+ ref={(e) => {
33
+ el = e;
34
+ }}
35
+ style={{ height: '200px', width: '100%', overflow: 'auto', position: 'relative' }}
36
+ >
37
+ <div>
38
+ <p style="height: 100px;">1</p>
39
+ <p style="height: 100px;">2</p>
40
+ <p style="height: 100px;">3</p>
41
+ <p style="height: 100px;">4</p>
42
+ </div>
43
+ <n-back-top visibility-height={200} target={() => el} />
44
+ </div>
45
+ );
46
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: 全局
3
+ title: 通用配置项
4
+ subtitle: Basic Config
5
+ icon: ⚙️
6
+ order: 0
7
+ ---
8
+
9
+ # 通用配置项
10
+
11
+ > 组件继承的类型你都可以在这里找到对应的描述
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: 通用
3
+ title: 按钮
4
+ subtitle: n-button
5
+ icon: 💠
6
+ ---
7
+
8
+ # 按钮
9
+
10
+ 按钮用于开始一个即时操作,响应用户点击行为,触发相应的业务逻辑。
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 基本使用
3
+ description: 内置 5 种类型:`default`、`primary`、`success`、`warning`、`error`。
4
+ order: 1
5
+ ---
6
+
7
+ ```html
8
+ <n-button>按钮</n-button>
9
+ <n-button type="primary">按钮</n-button>
10
+ <n-button type="success">按钮</n-button>
11
+ <n-button type="warning">按钮</n-button>
12
+ <n-button type="error">按钮</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button>按钮</n-button>
17
+ <n-button type="primary">按钮</n-button>
18
+ <n-button type="success">按钮</n-button>
19
+ <n-button type="warning">按钮</n-button>
20
+ <n-button type="error">按钮</n-button>
21
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: 块状按钮
3
+ description: 添加 `block` 属性将使按钮适合其父宽度。
4
+ order: 6
5
+ ---
6
+
7
+ ```html
8
+ <n-button block="true">一行</n-button>
9
+ <n-button type="primary" block="true">一行</n-button>
10
+ <n-button type="success" block="true">一行</n-button>
11
+ <n-button type="warning" block="true">一行</n-button>
12
+ <n-button type="error" block="true">一行</n-button>
13
+ <n-button link="true" block="true">一行</n-button>
14
+ ```
15
+
16
+ ```jsx
17
+ <n-button block>一行</n-button>
18
+ <n-button type="primary" block>
19
+ 一行
20
+ </n-button>
21
+ <n-button type="success" block>
22
+ 一行
23
+ </n-button>
24
+ <n-button type="error" block>
25
+ 一行
26
+ </n-button>
27
+ <n-button type="warning" block>
28
+ 一行
29
+ </n-button>
30
+ <n-button link block>
31
+ 一行
32
+ </n-button>
33
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 圆形按钮
3
+ description: 添加 `circle` 属性将按钮设置成圆形,通常在只有图标的按钮上使用
4
+ order: 5
5
+ ---
6
+
7
+ ```html
8
+ <n-button circle="true">🤔</n-button>
9
+ <n-button type="primary" circle="true">🤔</n-button>
10
+ <n-button type="success" circle="true">🤔</n-button>
11
+ <n-button type="warning" circle="true">🤔</n-button>
12
+ <n-button type="error" circle="true">🤔</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button circle>🤔</n-button>
17
+ <n-button type="primary" circle>🤔</n-button>
18
+ <n-button type="success" circle>🤔</n-button>
19
+ <n-button type="warning" circle>🤔</n-button>
20
+ <n-button type="error" circle>🤔</n-button>
21
+ ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: 危险按钮
3
+ description: 添加 `danger` 属性将按钮标记为危险操作
4
+ order: 8
5
+ ---
6
+
7
+ ```html
8
+ <n-button danger="true">default</n-button>
9
+ <n-button fill="true" danger="true"> fill </n-button>
10
+ <n-button dashed="true" danger="true"> dashed </n-button>
11
+ <n-button ghost="true" danger="true"> ghost </n-button>
12
+ <n-button flat="true" danger="true"> flat </n-button>
13
+ <n-button link="true" danger="true"> link </n-button>
14
+ ```
15
+
16
+ ```jsx
17
+ <n-button danger>default</n-button>
18
+ <n-button fill danger>fill</n-button>
19
+ <n-button dashed danger>dashed</n-button>
20
+ <n-button ghost danger>ghost</n-button>
21
+ <n-button flat danger>flat</n-button>
22
+ <n-button link danger>link</n-button>
23
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 虚线按钮
3
+ description: 添加 `dashed` 属性将按钮的边框设置成虚线
4
+ order: 9
5
+ ---
6
+
7
+ ```html
8
+ <n-button dashed="true" ghost="true">虚线</n-button>
9
+ <n-button type="primary" dashed="true" ghost="true">虚线</n-button>
10
+ <n-button type="success" dashed="true" ghost="true">虚线</n-button>
11
+ <n-button type="warning" dashed="true" ghost="true">虚线</n-button>
12
+ <n-button type="error" dashed="true" ghost="true">虚线</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button dashed ghost>虚线</n-button>
17
+ <n-button type="primary" dashed ghost>虚线</n-button>
18
+ <n-button type="success" dashed ghost>虚线</n-button>
19
+ <n-button type="warning" dashed ghost>虚线</n-button>
20
+ <n-button type="error" dashed ghost>虚线</n-button>
21
+ ```
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: 不可用状态
3
+ description: 添加 `disabled` 属性即可让按钮处于不可用状态,同时按钮样式也会改变
4
+ order: 11
5
+ ---
6
+
7
+ ```html
8
+ <n-button disabled="true">normal [disabled]</n-button>
9
+ <n-button type="primary" disabled="true"> primary </n-button>
10
+ <n-button disabled="true" fill="true"> fill </n-button>
11
+ <n-button disabled="true" link="true"> link </n-button>
12
+ <n-button disabled="true" type="primary" flat="true"> flat </n-button>
13
+ <n-button disabled="true" dashed="true"> dashed </n-button>
14
+ <div style="background-color: #827f7f; padding: 8px;">
15
+ <n-button type="primary" disabled="true" ghost="true">
16
+ ghost
17
+ <!-- 注释 -->
18
+ </n-button>
19
+ </div>
20
+ ```
21
+
22
+ ```jsx
23
+ <n-button disabled>normal [disabled]</n-button>
24
+ <n-button type="primary" disabled> primary </n-button>
25
+ <n-button disabled fill> fill </n-button>
26
+ <n-button disabled link> link </n-button>
27
+ <n-button disabled type="primary" flat> flat </n-button>
28
+ <n-button disabled dashed> dashed </n-button>
29
+ <div style={{ 'background-color': '#827f7f', padding: '8px' }}>
30
+ <n-button type="primary" disabled ghost>
31
+ ghost
32
+ {/* 注释 */}
33
+ </n-button>
34
+ </div>
35
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 填充背景
3
+ description: 添加 `fill` 属性使按钮更加注目
4
+ order: 3
5
+ ---
6
+
7
+ ```html
8
+ <n-button fill="true">实底</n-button>
9
+ <n-button type="primary" fill="true">实底</n-button>
10
+ <n-button type="success" fill="true">实底</n-button>
11
+ <n-button type="warning" fill="true">实底</n-button>
12
+ <n-button type="error" fill="true">实底</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button fill>实底</n-button>
17
+ <n-button type="primary" fill> 实底 </n-button>
18
+ <n-button type="success" fill> 实底 </n-button>
19
+ <n-button type="warning" fill> 实底 </n-button>
20
+ <n-button type="error" fill> 实底 </n-button>
21
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 扁平按钮
3
+ description: 添加 `flat` 属性将其设置为扁平按钮。
4
+ order: 4
5
+ ---
6
+
7
+ ```html
8
+ <n-button flat="true">按钮</n-button>
9
+ <n-button type="primary" flat="true"> 按钮 </n-button>
10
+ <n-button type="success" flat="true"> 按钮 </n-button>
11
+ <n-button type="warning" flat="true"> 按钮 </n-button>
12
+ <n-button type="error" flat="true"> 按钮 </n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button flat>按钮</n-button>
17
+ <n-button type="primary" flat> 按钮 </n-button>
18
+ <n-button type="success" flat> 按钮 </n-button>
19
+ <n-button type="warning" flat> 按钮 </n-button>
20
+ <n-button type="error" flat> 按钮 </n-button>
21
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 幽灵按钮
3
+ description: 将按钮的内容反色,背景变为透明,常用在有色背景上。
4
+ order: 10
5
+ ---
6
+
7
+ ```html
8
+ <n-button ghost="true">ghost</n-button>
9
+ <n-button type="primary" ghost="true">ghost</n-button>
10
+ <n-button type="success" ghost="true">ghost</n-button>
11
+ <n-button type="warning" ghost="true">ghost</n-button>
12
+ <n-button type="error" ghost="true">ghost</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button ghost>ghost</n-button>
17
+ <n-button type="primary" ghost> ghost </n-button>
18
+ <n-button type="success" ghost> ghost </n-button>
19
+ <n-button type="warning" ghost> ghost </n-button>
20
+ <n-button type="error" ghost> ghost </n-button>
21
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: 图标
3
+ description: 在文字前面添加图标
4
+ order: 12
5
+ ---
6
+
7
+ ```html
8
+ <n-button icon="😂">按钮</n-button>
9
+ <n-button type="primary" size="small" icon="😂">按钮</n-button>
10
+ <n-button type="success" size="large" icon="😂">按钮</n-button>
11
+ <n-button type="warning">按钮</n-button>
12
+ <script>
13
+ const el = container.querySelectorAll('n-button');
14
+
15
+ el[3].icon = function () {
16
+ const b = document.createElement('b');
17
+
18
+ b.style.color = 'red';
19
+ b.textContent = 'icon';
20
+ return b;
21
+ };
22
+ </script>
23
+ ```
24
+
25
+ ```jsx
26
+ <n-button icon="😂">按钮</n-button>
27
+ <n-button type="primary" size="small" icon="😂">按钮</n-button>
28
+ <n-button type="success" size="large" icon="😂">按钮</n-button>
29
+ <n-button type="warning" icon={() => <b style={{color:'red'}}>icon</b>}>按钮</n-button>
30
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: 链接按钮
3
+ description: 添加 `link` 属性将其设置为链接按钮,并渲染为 a 标签
4
+ order: 7
5
+ ---
6
+
7
+ ```html
8
+ <n-button link="true">链接</n-button>
9
+ <n-button type="primary" link="true">链接</n-button>
10
+ <n-button type="success" link="true">链接</n-button>
11
+ <n-button type="warning" link="true">链接</n-button>
12
+ <n-button type="error" link="true">链接</n-button>
13
+ ```
14
+
15
+ ```jsx
16
+ <n-button link>链接</n-button>
17
+ <n-button type="primary" link>链接</n-button>
18
+ <n-button type="success" link>链接</n-button>
19
+ <n-button type="warning" link>链接</n-button>
20
+ <n-button type="error" link>链接</n-button>
21
+ ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: 不同尺寸
3
+ description: 按钮有大、中、小三种尺寸。通过设置 `size` 为 `large`、`small` 分别把按钮设为大、小尺寸。若不设置 `size`,则尺寸为中。
4
+ order: 2
5
+ ---
6
+
7
+ ```html
8
+ <n-button type="primary" size="small">小按钮</n-button>
9
+ <n-button type="primary">默认按钮</n-button>
10
+ <n-button type="primary" size="large">大按钮</n-button>
11
+ <n-button type="success" size="small" circle="true">🤔</n-button>
12
+ <n-button type="success" circle="true">🤔</n-button>
13
+ <n-button type="success" size="large" circle="true">🤔</n-button>
14
+ ```
15
+
16
+ ```jsx
17
+ <n-button type="primary" size="small"> 小按钮 </n-button>
18
+ <n-button type="primary">默认按钮</n-button>
19
+ <n-button type="primary" size="large"> 大按钮 </n-button>
20
+ <n-button type="success" size="small" circle> 🤔 </n-button>
21
+ <n-button type="success" circle> 🤔 </n-button>
22
+ <n-button type="success" size="large" circle> 🤔 </n-button>
23
+ ```
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: 通用
3
+ title: 捕获屏幕
4
+ subtitle: n-capture-screen
5
+ icon: 🍀
6
+ ---
7
+
8
+ # 捕获、录制屏幕
9
+
10
+ > 捕获、录制屏幕
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: 直接使用
3
+ description: 最简单的使用方式
4
+ order: 1
5
+ ---
6
+
7
+ ```html
8
+ <n-capture-screen></n-capture-screen>
9
+ ```
10
+
11
+ ```jsx
12
+ <n-capture-screen />
13
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: 自定义保存录制视频方法
3
+ description: 如果需要自定义保存视频或者对录制内容进行修改,可以通过 `onSaveRecorder` 回调函数进行操作
4
+ order: 4
5
+ ---
6
+
7
+ ```html
8
+ <n-capture-screen recorder="true" filename="自定义保存录制视频文件名"></n-capture-screen>
9
+ <script>
10
+ const el = container.querySelector('n-capture-screen');
11
+
12
+ el.addEventListener('saverecorder', function (e) {
13
+ const { blob, fileName } = e.detail;
14
+ console.log('停止录制', fileName, 'size:', (blob.size / 1048576).toFixed(2) + 'mb');
15
+ // save event
16
+ });
17
+ </script>
18
+ ```
19
+
20
+ ```jsx
21
+ <n-capture-screen
22
+ recorder
23
+ filename="自定义保存录制视频文件名"
24
+ onSaveRecorder={(e) => {
25
+ const { blob, fileName } = e.detail;
26
+ console.log('停止录制', fileName, 'size:', (blob.size / 1048576).toFixed(2) + 'mb');
27
+ // save event
28
+ }}
29
+ />
30
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: 捕获屏幕时预览
3
+ description: 要想在预览捕获的图像,可以设置 `preview`属性;
4
+ order: 2
5
+ ---
6
+
7
+ ```html
8
+ <n-capture-screen preview="true"></n-capture-screen>
9
+ ```
10
+
11
+ ```jsx
12
+ <n-capture-screen preview />
13
+ ```