@ug666/ui-vue 0.3.0-beta.1 → 0.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (529) hide show
  1. package/LICENSE +21 -0
  2. package/dist/RELEASE_PROVENANCE.json +8 -0
  3. package/dist/THIRD_PARTY_NOTICES.txt +98 -0
  4. package/dist/ai/SKILL.md +225 -0
  5. package/dist/ai/manifest.json +791 -0
  6. package/dist/ai/references/components/accordion.md +41 -0
  7. package/dist/ai/references/components/admin-shell.md +27 -0
  8. package/dist/ai/references/components/alert.md +40 -0
  9. package/dist/ai/references/components/app-tabs.md +27 -0
  10. package/dist/ai/references/components/autocomplete.md +41 -0
  11. package/dist/ai/references/components/avatar-group.md +39 -0
  12. package/dist/ai/references/components/avatar.md +39 -0
  13. package/dist/ai/references/components/backtop.md +40 -0
  14. package/dist/ai/references/components/badge.md +43 -0
  15. package/dist/ai/references/components/bar-chart.md +41 -0
  16. package/dist/ai/references/components/breadcrumb.md +41 -0
  17. package/dist/ai/references/components/button.md +39 -0
  18. package/dist/ai/references/components/calendar.md +42 -0
  19. package/dist/ai/references/components/card.md +39 -0
  20. package/dist/ai/references/components/carousel.md +41 -0
  21. package/dist/ai/references/components/cascader.md +43 -0
  22. package/dist/ai/references/components/checkbox.md +40 -0
  23. package/dist/ai/references/components/collapse.md +41 -0
  24. package/dist/ai/references/components/color-picker.md +42 -0
  25. package/dist/ai/references/components/config-provider.md +39 -0
  26. package/dist/ai/references/components/confirm-dialog.md +27 -0
  27. package/dist/ai/references/components/container.md +39 -0
  28. package/dist/ai/references/components/context-menu.md +40 -0
  29. package/dist/ai/references/components/copy-field.md +27 -0
  30. package/dist/ai/references/components/data-panel.md +43 -0
  31. package/dist/ai/references/components/data-table-identity.md +27 -0
  32. package/dist/ai/references/components/data-table-toolbar.md +27 -0
  33. package/dist/ai/references/components/data-table.md +32 -0
  34. package/dist/ai/references/components/date-picker.md +42 -0
  35. package/dist/ai/references/components/date-range-picker.md +43 -0
  36. package/dist/ai/references/components/date-time-picker.md +40 -0
  37. package/dist/ai/references/components/descriptions.md +40 -0
  38. package/dist/ai/references/components/dialog.md +40 -0
  39. package/dist/ai/references/components/dock.md +41 -0
  40. package/dist/ai/references/components/donut-chart.md +41 -0
  41. package/dist/ai/references/components/drawer.md +41 -0
  42. package/dist/ai/references/components/dropdown.md +42 -0
  43. package/dist/ai/references/components/empty-state.md +40 -0
  44. package/dist/ai/references/components/fab.md +41 -0
  45. package/dist/ai/references/components/feature-grid.md +27 -0
  46. package/dist/ai/references/components/fieldset.md +41 -0
  47. package/dist/ai/references/components/file-input.md +41 -0
  48. package/dist/ai/references/components/form.md +42 -0
  49. package/dist/ai/references/components/gauge-chart.md +41 -0
  50. package/dist/ai/references/components/heatmap-chart.md +41 -0
  51. package/dist/ai/references/components/icon.md +39 -0
  52. package/dist/ai/references/components/image.md +41 -0
  53. package/dist/ai/references/components/index.md +167 -0
  54. package/dist/ai/references/components/indicator.md +41 -0
  55. package/dist/ai/references/components/infinite-scroll.md +42 -0
  56. package/dist/ai/references/components/input.md +42 -0
  57. package/dist/ai/references/components/join.md +40 -0
  58. package/dist/ai/references/components/kbd.md +40 -0
  59. package/dist/ai/references/components/label.md +39 -0
  60. package/dist/ai/references/components/landing-hero.md +27 -0
  61. package/dist/ai/references/components/layout.md +39 -0
  62. package/dist/ai/references/components/link.md +41 -0
  63. package/dist/ai/references/components/list.md +41 -0
  64. package/dist/ai/references/components/loading.md +40 -0
  65. package/dist/ai/references/components/modal.md +42 -0
  66. package/dist/ai/references/components/navbar.md +41 -0
  67. package/dist/ai/references/components/navigation-menu.md +41 -0
  68. package/dist/ai/references/components/notification.md +41 -0
  69. package/dist/ai/references/components/number-input.md +40 -0
  70. package/dist/ai/references/components/otp-input.md +40 -0
  71. package/dist/ai/references/components/page-header.md +27 -0
  72. package/dist/ai/references/components/pagination.md +42 -0
  73. package/dist/ai/references/components/popconfirm.md +42 -0
  74. package/dist/ai/references/components/popover.md +41 -0
  75. package/dist/ai/references/components/progress.md +41 -0
  76. package/dist/ai/references/components/quick-access.md +30 -0
  77. package/dist/ai/references/components/radar-chart.md +41 -0
  78. package/dist/ai/references/components/radial-progress.md +41 -0
  79. package/dist/ai/references/components/radio.md +40 -0
  80. package/dist/ai/references/components/ranking-list.md +41 -0
  81. package/dist/ai/references/components/rating.md +42 -0
  82. package/dist/ai/references/components/result.md +40 -0
  83. package/dist/ai/references/components/scrollbar.md +39 -0
  84. package/dist/ai/references/components/select.md +41 -0
  85. package/dist/ai/references/components/selection-list.md +29 -0
  86. package/dist/ai/references/components/separator.md +39 -0
  87. package/dist/ai/references/components/sheet.md +40 -0
  88. package/dist/ai/references/components/sidebar.md +46 -0
  89. package/dist/ai/references/components/skeleton.md +40 -0
  90. package/dist/ai/references/components/slider.md +40 -0
  91. package/dist/ai/references/components/space.md +39 -0
  92. package/dist/ai/references/components/spinner.md +41 -0
  93. package/dist/ai/references/components/splitter.md +39 -0
  94. package/dist/ai/references/components/stack.md +41 -0
  95. package/dist/ai/references/components/stacked-bar-chart.md +41 -0
  96. package/dist/ai/references/components/statistic-card.md +41 -0
  97. package/dist/ai/references/components/statistic.md +41 -0
  98. package/dist/ai/references/components/steps.md +40 -0
  99. package/dist/ai/references/components/switch.md +40 -0
  100. package/dist/ai/references/components/table.md +41 -0
  101. package/dist/ai/references/components/tabs.md +41 -0
  102. package/dist/ai/references/components/tag.md +39 -0
  103. package/dist/ai/references/components/text.md +39 -0
  104. package/dist/ai/references/components/textarea.md +40 -0
  105. package/dist/ai/references/components/theme-configurator-dialog.md +27 -0
  106. package/dist/ai/references/components/theme-configurator.md +27 -0
  107. package/dist/ai/references/components/theme-controller.md +41 -0
  108. package/dist/ai/references/components/time-picker.md +42 -0
  109. package/dist/ai/references/components/time-range-picker.md +41 -0
  110. package/dist/ai/references/components/time-select.md +40 -0
  111. package/dist/ai/references/components/timeline.md +41 -0
  112. package/dist/ai/references/components/toast.md +39 -0
  113. package/dist/ai/references/components/tooltip.md +39 -0
  114. package/dist/ai/references/components/transfer.md +41 -0
  115. package/dist/ai/references/components/tree-select.md +45 -0
  116. package/dist/ai/references/components/tree-table.md +27 -0
  117. package/dist/ai/references/components/tree.md +43 -0
  118. package/dist/ai/references/components/trend-chart.md +41 -0
  119. package/dist/ai/references/components/upload.md +43 -0
  120. package/dist/ai/references/components.md +93 -0
  121. package/dist/ai/references/examples/data-table.md +56 -0
  122. package/dist/ai/references/release.md +154 -0
  123. package/dist/ai/ui-vue.zip +0 -0
  124. package/dist/aliases.d.ts +63 -14
  125. package/dist/aliases.d.ts.map +1 -1
  126. package/dist/blocks/feature-grid.vue.d.ts +12 -0
  127. package/dist/blocks/feature-grid.vue.d.ts.map +1 -1
  128. package/dist/blocks/index.cjs +1 -1
  129. package/dist/blocks/index.cjs.map +1 -1
  130. package/dist/blocks/index.js +1 -226
  131. package/dist/blocks/index.js.map +1 -1
  132. package/dist/blocks/landing-hero.vue.d.ts +12 -3
  133. package/dist/blocks/landing-hero.vue.d.ts.map +1 -1
  134. package/dist/button-CnI0brH7.js +2 -0
  135. package/dist/button-CnI0brH7.js.map +1 -0
  136. package/dist/button-Czk6W5mp.cjs +2 -0
  137. package/dist/button-Czk6W5mp.cjs.map +1 -0
  138. package/dist/components/accordion.vue.d.ts +7 -1
  139. package/dist/components/accordion.vue.d.ts.map +1 -1
  140. package/dist/components/alert.vue.d.ts +5 -0
  141. package/dist/components/alert.vue.d.ts.map +1 -1
  142. package/dist/components/autocomplete.vue.d.ts +53 -0
  143. package/dist/components/autocomplete.vue.d.ts.map +1 -0
  144. package/dist/components/avatar-group.vue.d.ts.map +1 -1
  145. package/dist/components/avatar.vue.d.ts.map +1 -1
  146. package/dist/components/backtop.vue.d.ts +24 -0
  147. package/dist/components/backtop.vue.d.ts.map +1 -0
  148. package/dist/components/badge.vue.d.ts +19 -0
  149. package/dist/components/badge.vue.d.ts.map +1 -1
  150. package/dist/components/bar-chart.vue.d.ts +36 -0
  151. package/dist/components/bar-chart.vue.d.ts.map +1 -0
  152. package/dist/components/breadcrumb.vue.d.ts +4 -0
  153. package/dist/components/breadcrumb.vue.d.ts.map +1 -1
  154. package/dist/components/button-group.vue.d.ts.map +1 -1
  155. package/dist/components/button.vue.d.ts.map +1 -1
  156. package/dist/components/calendar.vue.d.ts +78 -0
  157. package/dist/components/calendar.vue.d.ts.map +1 -0
  158. package/dist/components/card.vue.d.ts +17 -5
  159. package/dist/components/card.vue.d.ts.map +1 -1
  160. package/dist/components/carousel.vue.d.ts +77 -0
  161. package/dist/components/carousel.vue.d.ts.map +1 -0
  162. package/dist/components/cascader.vue.d.ts +57 -0
  163. package/dist/components/cascader.vue.d.ts.map +1 -0
  164. package/dist/components/checkbox-group.vue.d.ts +2 -2
  165. package/dist/components/checkbox-group.vue.d.ts.map +1 -1
  166. package/dist/components/checkbox.vue.d.ts.map +1 -1
  167. package/dist/components/collapsible.vue.d.ts +73 -0
  168. package/dist/components/collapsible.vue.d.ts.map +1 -0
  169. package/dist/components/color-picker.vue.d.ts +35 -0
  170. package/dist/components/color-picker.vue.d.ts.map +1 -0
  171. package/dist/components/config-provider.vue.d.ts +2 -0
  172. package/dist/components/config-provider.vue.d.ts.map +1 -1
  173. package/dist/components/container.vue.d.ts.map +1 -1
  174. package/dist/components/context/accordion-context.d.ts +2 -0
  175. package/dist/components/context/accordion-context.d.ts.map +1 -1
  176. package/dist/components/context/button-group.d.ts +1 -1
  177. package/dist/components/context/button-group.d.ts.map +1 -1
  178. package/dist/components/context/drawer-context.d.ts +22 -0
  179. package/dist/components/context/drawer-context.d.ts.map +1 -1
  180. package/dist/components/context/form-context.d.ts.map +1 -1
  181. package/dist/components/context/navigation-menu-context.d.ts +11 -0
  182. package/dist/components/context/navigation-menu-context.d.ts.map +1 -1
  183. package/dist/components/context/tabs-context.d.ts +16 -0
  184. package/dist/components/context/tabs-context.d.ts.map +1 -1
  185. package/dist/components/context/tooltip-context.d.ts +2 -0
  186. package/dist/components/context/tooltip-context.d.ts.map +1 -1
  187. package/dist/components/context-menu.vue.d.ts.map +1 -1
  188. package/dist/components/data-panel.vue.d.ts +58 -0
  189. package/dist/components/data-panel.vue.d.ts.map +1 -0
  190. package/dist/components/date-picker.vue.d.ts +65 -0
  191. package/dist/components/date-picker.vue.d.ts.map +1 -0
  192. package/dist/components/date-range-picker.vue.d.ts +62 -0
  193. package/dist/components/date-range-picker.vue.d.ts.map +1 -0
  194. package/dist/components/date-time-picker.vue.d.ts +71 -0
  195. package/dist/components/date-time-picker.vue.d.ts.map +1 -0
  196. package/dist/components/descriptions.vue.d.ts.map +1 -1
  197. package/dist/components/dialog.vue.d.ts +14 -0
  198. package/dist/components/dialog.vue.d.ts.map +1 -1
  199. package/dist/components/dock.vue.d.ts +76 -0
  200. package/dist/components/dock.vue.d.ts.map +1 -0
  201. package/dist/components/donut-chart.vue.d.ts +34 -0
  202. package/dist/components/donut-chart.vue.d.ts.map +1 -0
  203. package/dist/components/drawer.vue.d.ts +62 -8
  204. package/dist/components/drawer.vue.d.ts.map +1 -1
  205. package/dist/components/dropdown.vue.d.ts +44 -2
  206. package/dist/components/dropdown.vue.d.ts.map +1 -1
  207. package/dist/components/empty-state.vue.d.ts +17 -16
  208. package/dist/components/empty-state.vue.d.ts.map +1 -1
  209. package/dist/components/fab.vue.d.ts +79 -0
  210. package/dist/components/fab.vue.d.ts.map +1 -0
  211. package/dist/components/fieldset.vue.d.ts +45 -0
  212. package/dist/components/fieldset.vue.d.ts.map +1 -0
  213. package/dist/components/file-input.vue.d.ts +45 -0
  214. package/dist/components/file-input.vue.d.ts.map +1 -0
  215. package/dist/components/form.vue.d.ts +7 -7
  216. package/dist/components/form.vue.d.ts.map +1 -1
  217. package/dist/components/gauge-chart.vue.d.ts +34 -0
  218. package/dist/components/gauge-chart.vue.d.ts.map +1 -0
  219. package/dist/components/heatmap-chart.vue.d.ts +42 -0
  220. package/dist/components/heatmap-chart.vue.d.ts.map +1 -0
  221. package/dist/components/icon.vue.d.ts +1 -1
  222. package/dist/components/icon.vue.d.ts.map +1 -1
  223. package/dist/components/image-viewer.vue.d.ts +28 -0
  224. package/dist/components/image-viewer.vue.d.ts.map +1 -0
  225. package/dist/components/image.vue.d.ts +37 -0
  226. package/dist/components/image.vue.d.ts.map +1 -0
  227. package/dist/components/index.cjs +1 -1
  228. package/dist/components/index.d.ts +61 -10
  229. package/dist/components/index.d.ts.map +1 -1
  230. package/dist/components/index.js +1 -5
  231. package/dist/components/indicator.vue.d.ts +43 -0
  232. package/dist/components/indicator.vue.d.ts.map +1 -0
  233. package/dist/components/infinite-scroll.vue.d.ts +42 -0
  234. package/dist/components/infinite-scroll.vue.d.ts.map +1 -0
  235. package/dist/components/input.vue.d.ts +4 -0
  236. package/dist/components/input.vue.d.ts.map +1 -1
  237. package/dist/components/join.vue.d.ts +35 -0
  238. package/dist/components/join.vue.d.ts.map +1 -0
  239. package/dist/components/kbd.vue.d.ts +21 -0
  240. package/dist/components/kbd.vue.d.ts.map +1 -0
  241. package/dist/components/label.vue.d.ts.map +1 -1
  242. package/dist/components/layout.d.ts +1 -1
  243. package/dist/components/link.vue.d.ts +1 -1
  244. package/dist/components/link.vue.d.ts.map +1 -1
  245. package/dist/components/list.vue.d.ts +74 -0
  246. package/dist/components/list.vue.d.ts.map +1 -0
  247. package/dist/components/loading.vue.d.ts +25 -0
  248. package/dist/components/loading.vue.d.ts.map +1 -0
  249. package/dist/components/modal.vue.d.ts +40 -23
  250. package/dist/components/modal.vue.d.ts.map +1 -1
  251. package/dist/components/navbar.vue.d.ts +132 -0
  252. package/dist/components/navbar.vue.d.ts.map +1 -0
  253. package/dist/components/navigation-menu.vue.d.ts +51 -3
  254. package/dist/components/navigation-menu.vue.d.ts.map +1 -1
  255. package/dist/components/notification.vue.d.ts +29 -0
  256. package/dist/components/notification.vue.d.ts.map +1 -0
  257. package/dist/components/number-input.vue.d.ts.map +1 -1
  258. package/dist/components/otp-input.vue.d.ts +9 -0
  259. package/dist/components/otp-input.vue.d.ts.map +1 -1
  260. package/dist/components/pagination.vue.d.ts +22 -2
  261. package/dist/components/pagination.vue.d.ts.map +1 -1
  262. package/dist/components/popconfirm.vue.d.ts +49 -0
  263. package/dist/components/popconfirm.vue.d.ts.map +1 -0
  264. package/dist/components/popover.vue.d.ts +2 -2
  265. package/dist/components/popover.vue.d.ts.map +1 -1
  266. package/dist/components/progress.vue.d.ts +29 -6
  267. package/dist/components/progress.vue.d.ts.map +1 -1
  268. package/dist/components/radar-chart.vue.d.ts +37 -0
  269. package/dist/components/radar-chart.vue.d.ts.map +1 -0
  270. package/dist/components/radial-progress.vue.d.ts +22 -0
  271. package/dist/components/radial-progress.vue.d.ts.map +1 -0
  272. package/dist/components/radio-group.vue.d.ts +6 -0
  273. package/dist/components/radio-group.vue.d.ts.map +1 -1
  274. package/dist/components/radio.vue.d.ts +4 -0
  275. package/dist/components/radio.vue.d.ts.map +1 -1
  276. package/dist/components/ranking-list.vue.d.ts +33 -0
  277. package/dist/components/ranking-list.vue.d.ts.map +1 -0
  278. package/dist/components/rating.vue.d.ts +36 -0
  279. package/dist/components/rating.vue.d.ts.map +1 -0
  280. package/dist/components/result.vue.d.ts +28 -0
  281. package/dist/components/result.vue.d.ts.map +1 -0
  282. package/dist/components/scrollbar.vue.d.ts +5 -5
  283. package/dist/components/scrollbar.vue.d.ts.map +1 -1
  284. package/dist/components/select.vue.d.ts +4 -4
  285. package/dist/components/select.vue.d.ts.map +1 -1
  286. package/dist/components/separator.vue.d.ts +1 -1
  287. package/dist/components/separator.vue.d.ts.map +1 -1
  288. package/dist/components/sheet.vue.d.ts +24 -24
  289. package/dist/components/sheet.vue.d.ts.map +1 -1
  290. package/dist/components/sidebar.vue.d.ts +49 -10
  291. package/dist/components/sidebar.vue.d.ts.map +1 -1
  292. package/dist/components/skeleton.vue.d.ts.map +1 -1
  293. package/dist/components/slider.vue.d.ts +1 -1
  294. package/dist/components/slider.vue.d.ts.map +1 -1
  295. package/dist/components/space.vue.d.ts.map +1 -1
  296. package/dist/components/spinner.vue.d.ts +4 -0
  297. package/dist/components/spinner.vue.d.ts.map +1 -1
  298. package/dist/components/splitter.vue.d.ts +12 -2
  299. package/dist/components/splitter.vue.d.ts.map +1 -1
  300. package/dist/components/stack.vue.d.ts +28 -0
  301. package/dist/components/stack.vue.d.ts.map +1 -0
  302. package/dist/components/stacked-bar-chart.vue.d.ts +36 -0
  303. package/dist/components/stacked-bar-chart.vue.d.ts.map +1 -0
  304. package/dist/components/statistic-card.vue.d.ts +54 -0
  305. package/dist/components/statistic-card.vue.d.ts.map +1 -0
  306. package/dist/components/statistic.vue.d.ts +21 -15
  307. package/dist/components/statistic.vue.d.ts.map +1 -1
  308. package/dist/components/steps.vue.d.ts +5 -0
  309. package/dist/components/steps.vue.d.ts.map +1 -1
  310. package/dist/components/switch.vue.d.ts +1 -1
  311. package/dist/components/switch.vue.d.ts.map +1 -1
  312. package/dist/components/table.vue.d.ts +24 -7
  313. package/dist/components/table.vue.d.ts.map +1 -1
  314. package/dist/components/tabs.vue.d.ts +61 -1
  315. package/dist/components/tabs.vue.d.ts.map +1 -1
  316. package/dist/components/tag.vue.d.ts +6 -3
  317. package/dist/components/tag.vue.d.ts.map +1 -1
  318. package/dist/components/text.vue.d.ts +2 -2
  319. package/dist/components/text.vue.d.ts.map +1 -1
  320. package/dist/components/textarea.vue.d.ts.map +1 -1
  321. package/dist/components/theme-controller.vue.d.ts +43 -0
  322. package/dist/components/theme-controller.vue.d.ts.map +1 -0
  323. package/dist/components/time-picker.vue.d.ts +53 -0
  324. package/dist/components/time-picker.vue.d.ts.map +1 -0
  325. package/dist/components/time-range-picker.vue.d.ts +50 -0
  326. package/dist/components/time-range-picker.vue.d.ts.map +1 -0
  327. package/dist/components/time-select.vue.d.ts +47 -0
  328. package/dist/components/time-select.vue.d.ts.map +1 -0
  329. package/dist/components/timeline.vue.d.ts +81 -0
  330. package/dist/components/timeline.vue.d.ts.map +1 -0
  331. package/dist/components/toast-state.d.ts +76 -9
  332. package/dist/components/toast-state.d.ts.map +1 -1
  333. package/dist/components/toast.vue.d.ts +12 -1
  334. package/dist/components/toast.vue.d.ts.map +1 -1
  335. package/dist/components/tooltip.vue.d.ts +5 -0
  336. package/dist/components/tooltip.vue.d.ts.map +1 -1
  337. package/dist/components/transfer.vue.d.ts +48 -0
  338. package/dist/components/transfer.vue.d.ts.map +1 -0
  339. package/dist/components/tree-select.vue.d.ts +66 -0
  340. package/dist/components/tree-select.vue.d.ts.map +1 -0
  341. package/dist/components/tree.vue.d.ts +88 -0
  342. package/dist/components/tree.vue.d.ts.map +1 -0
  343. package/dist/components/trend-chart.vue.d.ts +47 -0
  344. package/dist/components/trend-chart.vue.d.ts.map +1 -0
  345. package/dist/components/types/forms.d.ts +1 -1
  346. package/dist/components/types/forms.d.ts.map +1 -1
  347. package/dist/components/upload.vue.d.ts +48 -0
  348. package/dist/components/upload.vue.d.ts.map +1 -0
  349. package/dist/composables/index.cjs +1 -1
  350. package/dist/composables/index.js +1 -3
  351. package/dist/composables/use-copy-to-clipboard.d.ts.map +1 -1
  352. package/dist/composables/use-event-listener.d.ts.map +1 -1
  353. package/dist/composables/use-form.d.ts +17 -16
  354. package/dist/composables/use-form.d.ts.map +1 -1
  355. package/dist/composables/use-media-query.d.ts.map +1 -1
  356. package/dist/composables/use-pagination.d.ts.map +1 -1
  357. package/dist/composables/use-toast.d.ts +2 -2
  358. package/dist/composables/use-toast.d.ts.map +1 -1
  359. package/dist/composables-BKdJUtth.cjs +2 -0
  360. package/dist/composables-BKdJUtth.cjs.map +1 -0
  361. package/dist/composables-CeSrWzj1.js +2 -0
  362. package/dist/composables-CeSrWzj1.js.map +1 -0
  363. package/dist/global.cjs +1 -1
  364. package/dist/global.d.ts +78 -0
  365. package/dist/global.d.ts.map +1 -1
  366. package/dist/icon-Che64mHe.cjs +2 -0
  367. package/dist/icon-Che64mHe.cjs.map +1 -0
  368. package/dist/icon-F_GVho3U.js +2 -0
  369. package/dist/icon-F_GVho3U.js.map +1 -0
  370. package/dist/index.cjs +1 -1
  371. package/dist/index.cjs.map +1 -1
  372. package/dist/index.d.ts +69 -17
  373. package/dist/index.d.ts.map +1 -1
  374. package/dist/index.js +1 -136
  375. package/dist/index.js.map +1 -1
  376. package/dist/input-Bdyp6ABh.cjs +2 -0
  377. package/dist/input-Bdyp6ABh.cjs.map +1 -0
  378. package/dist/input-DERQW5r8.js +2 -0
  379. package/dist/input-DERQW5r8.js.map +1 -0
  380. package/dist/internal/data-table-header.vue.d.ts +35 -0
  381. package/dist/internal/data-table-header.vue.d.ts.map +1 -0
  382. package/dist/internal/date-time/date-mode-panel.vue.d.ts +15 -0
  383. package/dist/internal/date-time/date-mode-panel.vue.d.ts.map +1 -0
  384. package/dist/internal/date-time/date-time-control.vue.d.ts +76 -0
  385. package/dist/internal/date-time/date-time-control.vue.d.ts.map +1 -0
  386. package/dist/internal/date-time/date-time-picker-panel.vue.d.ts +16 -0
  387. package/dist/internal/date-time/date-time-picker-panel.vue.d.ts.map +1 -0
  388. package/dist/internal/date-time/date-time-range-control.vue.d.ts +70 -0
  389. package/dist/internal/date-time/date-time-range-control.vue.d.ts.map +1 -0
  390. package/dist/internal/date-time/date-time-range-panel.vue.d.ts +13 -0
  391. package/dist/internal/date-time/date-time-range-panel.vue.d.ts.map +1 -0
  392. package/dist/internal/date-time/time-panel.vue.d.ts +15 -0
  393. package/dist/internal/date-time/time-panel.vue.d.ts.map +1 -0
  394. package/dist/internal/date-time/time-picker-panel.vue.d.ts +14 -0
  395. package/dist/internal/date-time/time-picker-panel.vue.d.ts.map +1 -0
  396. package/dist/internal/navigation/admin-horizontal-navigation.vue.d.ts +10 -0
  397. package/dist/internal/navigation/admin-horizontal-navigation.vue.d.ts.map +1 -0
  398. package/dist/internal/navigation/sidebar-navigation.d.ts +31 -0
  399. package/dist/internal/navigation/sidebar-navigation.d.ts.map +1 -0
  400. package/dist/internal/notification-item.vue.d.ts +14 -0
  401. package/dist/internal/notification-item.vue.d.ts.map +1 -0
  402. package/dist/internal/overlay/use-overlay-focus.d.ts +3 -0
  403. package/dist/internal/overlay/use-overlay-focus.d.ts.map +1 -0
  404. package/dist/internal/overlay/use-overlay-lifecycle.d.ts +3 -0
  405. package/dist/internal/overlay/use-overlay-lifecycle.d.ts.map +1 -0
  406. package/dist/internal/overlay/use-presence.d.ts +8 -0
  407. package/dist/internal/overlay/use-presence.d.ts.map +1 -0
  408. package/dist/internal/selection/option-window.vue.d.ts +28 -0
  409. package/dist/internal/selection/option-window.vue.d.ts.map +1 -0
  410. package/dist/internal/selection/use-cascader-lazy.d.ts +20 -0
  411. package/dist/internal/selection/use-cascader-lazy.d.ts.map +1 -0
  412. package/dist/internal/selection/use-transfer-remote.d.ts +32 -0
  413. package/dist/internal/selection/use-transfer-remote.d.ts.map +1 -0
  414. package/dist/internal/selection/use-tree-data.d.ts +8 -0
  415. package/dist/internal/selection/use-tree-data.d.ts.map +1 -0
  416. package/dist/patterns/admin-shell.vue.d.ts +110 -9
  417. package/dist/patterns/admin-shell.vue.d.ts.map +1 -1
  418. package/dist/patterns/app-tabs.vue.d.ts +51 -0
  419. package/dist/patterns/app-tabs.vue.d.ts.map +1 -0
  420. package/dist/patterns/confirm-dialog.vue.d.ts +5 -5
  421. package/dist/patterns/confirm-dialog.vue.d.ts.map +1 -1
  422. package/dist/patterns/copy-field.vue.d.ts +9 -0
  423. package/dist/patterns/copy-field.vue.d.ts.map +1 -1
  424. package/dist/patterns/data-table-identity.vue.d.ts +26 -0
  425. package/dist/patterns/data-table-identity.vue.d.ts.map +1 -0
  426. package/dist/patterns/data-table-toolbar.vue.d.ts +32 -0
  427. package/dist/patterns/data-table-toolbar.vue.d.ts.map +1 -0
  428. package/dist/patterns/data-table.vue.d.ts +105 -0
  429. package/dist/patterns/data-table.vue.d.ts.map +1 -0
  430. package/dist/patterns/index.cjs +1 -1
  431. package/dist/patterns/index.cjs.map +1 -1
  432. package/dist/patterns/index.d.ts +25 -0
  433. package/dist/patterns/index.d.ts.map +1 -1
  434. package/dist/patterns/index.js +1 -393
  435. package/dist/patterns/index.js.map +1 -1
  436. package/dist/patterns/page-header.vue.d.ts +6 -0
  437. package/dist/patterns/page-header.vue.d.ts.map +1 -1
  438. package/dist/patterns/quick-access.vue.d.ts +43 -0
  439. package/dist/patterns/quick-access.vue.d.ts.map +1 -0
  440. package/dist/patterns/selection-list.vue.d.ts +51 -0
  441. package/dist/patterns/selection-list.vue.d.ts.map +1 -0
  442. package/dist/patterns/theme-configurator-choice-group.vue.d.ts +22 -0
  443. package/dist/patterns/theme-configurator-choice-group.vue.d.ts.map +1 -0
  444. package/dist/patterns/theme-configurator-dialog.vue.d.ts +58 -0
  445. package/dist/patterns/theme-configurator-dialog.vue.d.ts.map +1 -0
  446. package/dist/patterns/theme-configurator.vue.d.ts +44 -0
  447. package/dist/patterns/theme-configurator.vue.d.ts.map +1 -0
  448. package/dist/patterns/tree-table.vue.d.ts +100 -0
  449. package/dist/patterns/tree-table.vue.d.ts.map +1 -0
  450. package/dist/plugin.d.ts.map +1 -1
  451. package/dist/primitives/index.cjs +1 -1
  452. package/dist/primitives/index.d.ts +7 -3
  453. package/dist/primitives/index.d.ts.map +1 -1
  454. package/dist/primitives/index.js +1 -3
  455. package/dist/resolver.cjs +1 -1
  456. package/dist/resolver.cjs.map +1 -1
  457. package/dist/resolver.d.ts.map +1 -1
  458. package/dist/resolver.js +1 -33
  459. package/dist/resolver.js.map +1 -1
  460. package/dist/sidebar-O1_kmFSE.js +2 -0
  461. package/dist/sidebar-O1_kmFSE.js.map +1 -0
  462. package/dist/sidebar-VFEdi6LG.cjs +2 -0
  463. package/dist/sidebar-VFEdi6LG.cjs.map +1 -0
  464. package/dist/styles.css +1 -4342
  465. package/dist/theme.cjs +1 -1
  466. package/dist/theme.cjs.map +1 -1
  467. package/dist/theme.d.ts +7 -0
  468. package/dist/theme.d.ts.map +1 -1
  469. package/dist/theme.js +1 -127
  470. package/dist/theme.js.map +1 -1
  471. package/dist/themes/default.css +1 -80
  472. package/dist/themes/mecha.css +1 -195
  473. package/dist/themes/minimal.css +1 -160
  474. package/dist/toast-state-Ba1YMGgq.js +2 -0
  475. package/dist/toast-state-Ba1YMGgq.js.map +1 -0
  476. package/dist/toast-state-DoeeKJ8T.cjs +2 -0
  477. package/dist/toast-state-DoeeKJ8T.cjs.map +1 -0
  478. package/dist/tokens.css +1 -1240
  479. package/dist/tree-select-DQnl6LzW.cjs +2 -0
  480. package/dist/tree-select-DQnl6LzW.cjs.map +1 -0
  481. package/dist/tree-select-DsR5dxIn.js +2 -0
  482. package/dist/tree-select-DsR5dxIn.js.map +1 -0
  483. package/dist/use-media-query-CkB_D997.cjs +2 -0
  484. package/dist/use-media-query-CkB_D997.cjs.map +1 -0
  485. package/dist/use-media-query-RMDst192.js +2 -0
  486. package/dist/use-media-query-RMDst192.js.map +1 -0
  487. package/package.json +17 -19
  488. package/dist/button-CVw3ryBz.cjs +0 -2
  489. package/dist/button-CVw3ryBz.cjs.map +0 -1
  490. package/dist/button-D_ikOxrp.js +0 -292
  491. package/dist/button-D_ikOxrp.js.map +0 -1
  492. package/dist/cn-CFAiuoYh.cjs +0 -2
  493. package/dist/cn-CFAiuoYh.cjs.map +0 -1
  494. package/dist/cn-Cl2u7rTh.js +0 -10
  495. package/dist/cn-Cl2u7rTh.js.map +0 -1
  496. package/dist/composables-C-Go-D3m.js +0 -386
  497. package/dist/composables-C-Go-D3m.js.map +0 -1
  498. package/dist/composables-CiWPyBEE.cjs +0 -2
  499. package/dist/composables-CiWPyBEE.cjs.map +0 -1
  500. package/dist/icon-NbssmDYT.js +0 -1561
  501. package/dist/icon-NbssmDYT.js.map +0 -1
  502. package/dist/icon-jF_XZntG.cjs +0 -2
  503. package/dist/icon-jF_XZntG.cjs.map +0 -1
  504. package/dist/internal/use-overlay-focus.d.ts +0 -3
  505. package/dist/internal/use-overlay-focus.d.ts.map +0 -1
  506. package/dist/internal/use-overlay-lifecycle.d.ts +0 -3
  507. package/dist/internal/use-overlay-lifecycle.d.ts.map +0 -1
  508. package/dist/labs/file-preview.vue.d.ts +0 -42
  509. package/dist/labs/file-preview.vue.d.ts.map +0 -1
  510. package/dist/labs/index.cjs +0 -2
  511. package/dist/labs/index.cjs.map +0 -1
  512. package/dist/labs/index.d.ts +0 -15
  513. package/dist/labs/index.d.ts.map +0 -1
  514. package/dist/labs/index.js +0 -213
  515. package/dist/labs/index.js.map +0 -1
  516. package/dist/labs/model-card.vue.d.ts +0 -46
  517. package/dist/labs/model-card.vue.d.ts.map +0 -1
  518. package/dist/sidebar-DI7FOJiw.cjs +0 -2
  519. package/dist/sidebar-DI7FOJiw.cjs.map +0 -1
  520. package/dist/sidebar-wW1OGS5T.js +0 -442
  521. package/dist/sidebar-wW1OGS5T.js.map +0 -1
  522. package/dist/statistic-1kiSjvCX.cjs +0 -2
  523. package/dist/statistic-1kiSjvCX.cjs.map +0 -1
  524. package/dist/statistic-DBlNBT-A.js +0 -4748
  525. package/dist/statistic-DBlNBT-A.js.map +0 -1
  526. package/dist/toast-state-DZPoRLPw.cjs +0 -2
  527. package/dist/toast-state-DZPoRLPw.cjs.map +0 -1
  528. package/dist/toast-state-DyrVOjSJ.js +0 -50
  529. package/dist/toast-state-DyrVOjSJ.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ let e=require("vue");function useMediaQuery(n){const t=(0,e.ref)(!1);let a=null;function updateMatches(e){t.value=e}function handleChange(e){updateMatches(e.matches)}return(0,e.onMounted)(()=>{"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(a=window.matchMedia(n),updateMatches(a.matches),a.addEventListener("change",handleChange))}),(0,e.onUnmounted)(()=>{null!==a&&a.removeEventListener("change",handleChange)}),t}Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:function(){return useMediaQuery}});
2
+ //# sourceMappingURL=use-media-query-CkB_D997.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-media-query-CkB_D997.cjs","names":["ref","vue","require","useMediaQuery","query","matches","ref","mediaQueryList","updateMatches","nextMatches","value","handleChange","event","onMounted","window","matchMedia","addEventListener","onUnmounted","removeEventListener","Object","defineProperty","exports","enumerable","get"],"sources":["../src/composables/use-media-query.ts"],"sourcesContent":["/**\n * @description: 监听 CSS 媒体查询的 Vue composable\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\n\nimport { onMounted, onUnmounted, ref, type Ref } from 'vue'\n\n/**\n * 监听 CSS 媒体查询的匹配状态。\n *\n * @param query CSS 媒体查询字符串\n * @returns 当前是否匹配该查询的 ref,SSR 环境默认返回 false\n *\n * @example\n * ```ts\n * const isMobile = useMediaQuery('(max-width: 768px)')\n * ```\n */\nexport function useMediaQuery(query: string): Ref<boolean> {\n const matches = ref(false)\n let mediaQueryList: MediaQueryList | null = null\n\n function updateMatches(nextMatches: boolean): void {\n matches.value = nextMatches\n }\n\n function handleChange(event: MediaQueryListEvent): void {\n updateMatches(event.matches)\n }\n\n onMounted(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return\n mediaQueryList = window.matchMedia(query)\n updateMatches(mediaQueryList.matches)\n mediaQueryList.addEventListener('change', handleChange)\n })\n\n onUnmounted(() => {\n if (mediaQueryList !== null) {\n mediaQueryList.removeEventListener('change', handleChange)\n }\n })\n\n return matches\n}\n"],"mappings":"A,qBAmBA,SAAgBG,cAAcC,GAC5B,MAAMC,GAAA,EAAUL,EAAAA,MAAI,GACpB,IAAIO,EAAwC,KAE5C,SAASC,cAAcC,GACrBJ,EAAQK,MAAQD,CAClB,CAEA,SAASE,aAAaC,GACpBJ,cAAcI,EAAMP,QACtB,CAeA,OAbA,EAAAJ,EAAAY,WAAA,KACwB,oBAAXC,QAAuD,mBAAtBA,OAAOC,aACnDR,EAAiBO,OAAOC,WAAWX,GACnCI,cAAcD,EAAeF,SAC7BE,EAAeS,iBAAiB,SAAUL,kBAG5C,EAAAV,EAAAgB,aAAA,KACyB,OAAnBV,GACFA,EAAeW,oBAAoB,SAAUP,gBAI1CN,CACT,C"}
@@ -0,0 +1,2 @@
1
+ import{onMounted as e,onUnmounted as n,ref as t}from"vue";function useMediaQuery(a){const d=t(!1);let u=null;function updateMatches(e){d.value=e}function handleChange(e){updateMatches(e.matches)}return e(()=>{"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(u=window.matchMedia(a),updateMatches(u.matches),u.addEventListener("change",handleChange))}),n(()=>{null!==u&&u.removeEventListener("change",handleChange)}),d}export{useMediaQuery as t};
2
+ //# sourceMappingURL=use-media-query-RMDst192.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-media-query-RMDst192.js","names":["onMounted","onUnmounted","ref","useMediaQuery","query","matches","mediaQueryList","updateMatches","nextMatches","value","handleChange","event","window","matchMedia","addEventListener","removeEventListener"],"sources":["../src/composables/use-media-query.ts"],"sourcesContent":["/**\n * @description: 监听 CSS 媒体查询的 Vue composable\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\n\nimport { onMounted, onUnmounted, ref, type Ref } from 'vue'\n\n/**\n * 监听 CSS 媒体查询的匹配状态。\n *\n * @param query CSS 媒体查询字符串\n * @returns 当前是否匹配该查询的 ref,SSR 环境默认返回 false\n *\n * @example\n * ```ts\n * const isMobile = useMediaQuery('(max-width: 768px)')\n * ```\n */\nexport function useMediaQuery(query: string): Ref<boolean> {\n const matches = ref(false)\n let mediaQueryList: MediaQueryList | null = null\n\n function updateMatches(nextMatches: boolean): void {\n matches.value = nextMatches\n }\n\n function handleChange(event: MediaQueryListEvent): void {\n updateMatches(event.matches)\n }\n\n onMounted(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return\n mediaQueryList = window.matchMedia(query)\n updateMatches(mediaQueryList.matches)\n mediaQueryList.addEventListener('change', handleChange)\n })\n\n onUnmounted(() => {\n if (mediaQueryList !== null) {\n mediaQueryList.removeEventListener('change', handleChange)\n }\n })\n\n return matches\n}\n"],"mappings":"oB,sCAmBA,SAAgBG,cAAcC,GAC5B,MAAMC,EAAUH,GAAI,GACpB,IAAII,EAAwC,KAE5C,SAASC,cAAcC,GACrBH,EAAQI,MAAQD,CAClB,CAEA,SAASE,aAAaC,GACpBJ,cAAcI,EAAMN,QACtB,CAeA,OAbAL,EAAA,KACwB,oBAAXY,QAAuD,mBAAtBA,OAAOC,aACnDP,EAAiBM,OAAOC,WAAWT,GACnCG,cAAcD,EAAeD,SAC7BC,EAAeQ,iBAAiB,SAAUJ,iBAG5CT,EAAA,KACyB,OAAnBK,GACFA,EAAeS,oBAAoB,SAAUL,gBAI1CL,CACT,Q"}
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@ug666/ui-vue",
3
- "version": "0.3.0-beta.1",
3
+ "repository": { "type": "git", "url": "https://github.com/uguang2003/ug-ui.git", "directory": "packages/ui-vue" },
4
+ "version": "0.3.0-beta.3",
4
5
  "description": "UG Vue 3 UI 组件库 + Patterns + Blocks + Composables",
6
+ "homepage": "https://ui.ug666.top/llms.txt",
5
7
  "license": "MIT",
6
8
  "type": "module",
7
9
  "main": "./dist/index.cjs",
@@ -43,11 +45,6 @@
43
45
  "import": "./dist/blocks/index.js",
44
46
  "require": "./dist/blocks/index.cjs"
45
47
  },
46
- "./labs": {
47
- "types": "./dist/labs/index.d.ts",
48
- "import": "./dist/labs/index.js",
49
- "require": "./dist/labs/index.cjs"
50
- },
51
48
  "./composables": {
52
49
  "types": "./dist/composables/index.d.ts",
53
50
  "import": "./dist/composables/index.js",
@@ -75,29 +72,30 @@
75
72
  "./tokens.css": "./dist/tokens.css"
76
73
  },
77
74
  "scripts": {
78
- "build": "bunx vite build",
79
- "typecheck": "node -e \"require('vue-tsc').run(require.resolve('typescript5/lib/tsc.js'))\" -- --noEmit",
75
+ "build": "bunx vite build && bun run ../../scripts/build/build-skills.ts --npm vue",
76
+ "typecheck": "node -e \"require('vue-tsc').run(require.resolve('typescript6/lib/tsc.js'))\" -- --noEmit",
80
77
  "prepublishOnly": "bun run build"
81
78
  },
82
79
  "dependencies": {
83
- "@ug666/ui-core": "0.3.0-beta.1",
84
- "@ug666/ui-web": "0.3.0-beta.1",
80
+ "@ug666/ui-core": "0.3.0-beta.3",
81
+ "@ug666/ui-web": "0.3.0-beta.3",
85
82
  "clsx": "^2.1.1",
86
- "@lucide/vue": "^1.27.0",
87
- "tailwind-merge": "^3.6.0"
83
+ "@lucide/vue": "^1.61.0",
84
+ "tailwind-merge": "^3.7.0"
88
85
  },
89
86
  "peerDependencies": {
90
87
  "vue": "^3.4.0"
91
88
  },
92
89
  "devDependencies": {
93
- "@typescript/typescript6": "^6.0.2",
94
- "@vitejs/plugin-vue": "^6.0.8",
90
+ "@typescript/typescript6": "6.0.2",
91
+ "@vitejs/plugin-vue": "^6.0.10",
95
92
  "tailwindcss": "^4.3.3",
96
93
  "typescript": "^7.0.2",
97
- "typescript5": "npm:typescript@5.9.3",
98
- "vite": "^8.1.5",
99
- "vite-plugin-dts": "^5.0.3",
100
- "vue": "^3.5.40",
101
- "vue-tsc": "^3.3.7"
94
+ "vite": "^8.3.5",
95
+ "vite-plugin-dts": "^5.1.2",
96
+ "vue": "^3.5.44",
97
+ "vue-tsc": "^3.3.13",
98
+ "typescript6": "npm:typescript@6.0.2",
99
+ "terser": "^5.51.2"
102
100
  }
103
101
  }
@@ -1,2 +0,0 @@
1
- const e=require("./cn-CFAiuoYh.cjs");let t=require("vue"),n=require("@lucide/vue");var r={small:`sm`,medium:`default`,large:`lg`},i={sm:`small`,default:`medium`,lg:`large`};function a(e,t){return e??r[t]}function o(e,t){return e??t}function s(e){return i[e]}var c={namespace:`ug`,size:`medium`,disabled:!1,button:{},link:{}},l=Symbol(`ug-ui-config`);function u(e,t){let n={...e};return t&&Object.entries(t).forEach(([e,t])=>{t!==void 0&&Object.assign(n,{[e]:t})}),n}var d=(0,t.defineComponent)({name:`UConfigProvider`,inheritAttrs:!1,props:{namespace:{type:String,default:void 0},size:{type:String,default:void 0},disabled:{type:Boolean,default:void 0},button:{type:Object,default:void 0},link:{type:Object,default:void 0}},setup(e,{attrs:n,slots:r}){let i=(0,t.inject)(l,(0,t.computed)(()=>c)),a=(0,t.computed)(()=>({namespace:e.namespace??i.value.namespace,size:e.size??i.value.size,disabled:e.disabled??i.value.disabled,button:u(i.value.button,e.button),link:u(i.value.link,e.link)}));return(0,t.provide)(l,a),()=>(0,t.h)(`div`,{...n,class:[`[display:contents]`,n.class],"data-size":a.value.size,"data-state":a.value.disabled?`disabled`:`default`,"data-ug":`config-provider`,"data-ug-namespace":a.value.namespace,"data-ug-slot":`root`,"data-variant":`default`},r.default?.())}});function f(){return(0,t.inject)(l,(0,t.computed)(()=>c))}var p=Symbol(`UGButtonGroup`),m=[`type`,`disabled`,`aria-busy`,`data-state`,`data-variant`,`data-tone`,`data-size`,`data-shape`,`data-block`,`data-ug-namespace`],h={key:0,"data-ug-slot":`loader`,class:`inline-flex shrink-0 items-center justify-center`,"aria-hidden":`true`},g={"data-ug-slot":`label`,class:`inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]`},_={key:1,"data-ug-slot":`loader`,class:`inline-flex shrink-0 items-center justify-center`,"aria-hidden":`true`},v=(0,t.defineComponent)({__name:`button`,props:{variant:String,tone:String,size:String,shape:String,block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:String,loadingPlacement:{type:String,default:`start`},disabled:{type:Boolean,default:void 0},nativeType:{type:String,default:`button`},class:String,style:[String,Object,Array]},emits:[`click`],setup(r,{expose:i,emit:a}){let s=r,c=a,l={solid:``,soft:``,primary:`bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary`,success:`bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success`,warning:`bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning`,danger:`bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger`,destructive:`bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger`,info:`bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info`,default:`border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40`,secondary:`border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40`,outline:`bg-transparent`,dashed:`border-dashed bg-transparent`,ghost:``,text:``,link:``},u={default:`h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0`,sm:`h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0`,lg:`h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0`,icon:`h-[var(--control-height-md)] w-[var(--control-height-md)] p-0`},d={default:`rounded-[var(--radius-control)]`,circle:`!rounded-full !p-0 aspect-square`,round:`!rounded-full`},v={neutral:{solid:`border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40`,soft:`bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40`,outline:`border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40`,dashed:`border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40`,ghost:`text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40`,link:`text-text-primary focus-visible:ring-primary/40`},primary:{solid:`bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary`,soft:`bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40`,outline:`border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40`,dashed:`border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40`,ghost:`text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40`,link:`text-text-primary focus-visible:ring-primary/40`},success:{solid:`bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success`,soft:`bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40`,outline:`border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40`,dashed:`border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40`,ghost:`text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40`,link:`text-text-primary focus-visible:ring-success/40`},warning:{solid:`bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning`,soft:`bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40`,outline:`border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40`,dashed:`border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40`,ghost:`text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40`,link:`text-text-primary focus-visible:ring-warning/40`},danger:{solid:`bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger`,soft:`bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40`,outline:`border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40`,dashed:`border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40`,ghost:`text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40`,link:`text-text-primary focus-visible:ring-danger/40`},info:{solid:`bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info`,soft:`bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40`,outline:`border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40`,dashed:`border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40`,ghost:`text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40`,text:`text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40`,link:`text-text-primary focus-visible:ring-info/40`}},y={text:`px-[var(--control-padding-x-sm)]`,link:`h-auto p-0 underline-offset-4 hover:underline`},b={small:`sm`,medium:`default`,large:`lg`},x={primary:`primary`,success:`success`,warning:`warning`,danger:`danger`,destructive:`danger`,info:`info`},S=(0,t.inject)(p,void 0),C=f(),w=(0,t.ref)(null),T=(0,t.computed)(()=>s.variant??S?.variant.value??C.value.button.variant??`default`),E=(0,t.computed)(()=>s.tone??S?.tone.value??C.value.button.tone??x[T.value]??(T.value===`solid`||T.value===`soft`?`primary`:`neutral`)),D=(0,t.computed)(()=>s.size??S?.size.value??b[C.value.size]),O=(0,t.computed)(()=>s.shape??S?.shape.value??C.value.button.shape??`default`),k=(0,t.computed)(()=>{let e=T.value;if([`solid`,`soft`,`outline`,`dashed`,`ghost`,`text`,`link`].includes(e))return v[E.value][e]}),A=(0,t.computed)(()=>e.t(`inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none`,l[T.value],v[E.value]&&k.value,u[D.value],d[O.value],s.block&&`w-full flex`,y[T.value],s.class)),j=(0,t.computed)(()=>[{fontWeight:`var(--button-font-weight)`},s.style]),M=(0,t.computed)(()=>o(s.disabled,S?.disabled.value??C.value.disabled)||s.loading),N=(0,t.computed)(()=>{let e=[];return s.loading&&e.push(`loading`),M.value&&e.push(`disabled`),e.length>0?e.join(` `):void 0});function P(e){M.value||c(`click`,e)}return i({ref:w}),(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{ref_key:`buttonRef`,ref:w,class:(0,t.normalizeClass)(A.value),style:(0,t.normalizeStyle)(j.value),type:r.nativeType,disabled:M.value,"aria-busy":r.loading||void 0,"data-ug":`button`,"data-state":N.value,"data-variant":T.value,"data-tone":E.value,"data-size":D.value,"data-shape":O.value,"data-block":r.block?`true`:void 0,"data-ug-namespace":(0,t.unref)(C).namespace,onClick:P},[r.loading&&r.loadingPlacement===`start`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,h,[(0,t.renderSlot)(e.$slots,`loading`,{},()=>[(0,t.createVNode)((0,t.unref)(n.Loader2),{class:`animate-spin motion-reduce:animate-none`,size:D.value===`sm`?14:16},null,8,[`size`])])])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,g,[r.loading&&r.loadingText!==void 0?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(r.loadingText),1)],64)):(0,t.renderSlot)(e.$slots,`default`,{},void 0,void 0,1)]),r.loading&&r.loadingPlacement===`end`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,_,[(0,t.renderSlot)(e.$slots,`loading`,{},()=>[(0,t.createVNode)((0,t.unref)(n.Loader2),{class:`animate-spin motion-reduce:animate-none`,size:D.value===`sm`?14:16},null,8,[`size`])])])):(0,t.createCommentVNode)(``,!0)],14,m))}});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return v}});
2
- //# sourceMappingURL=button-CVw3ryBz.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-CVw3ryBz.cjs","names":[],"sources":["../src/components/config-provider.vue","../src/components/context/button-group.ts","../src/components/button.vue","../src/components/button.vue"],"sourcesContent":["<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from 'vue'\n\nexport type ComponentSize = 'small' | 'medium' | 'large'\nexport type ControlSize = 'sm' | 'default' | 'lg'\n\nconst CONFIG_SIZE_TO_CONTROL_SIZE: Record<ComponentSize, ControlSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst CONTROL_SIZE_TO_CONFIG_SIZE: Record<ControlSize, ComponentSize> = {\n sm: 'small',\n default: 'medium',\n lg: 'large',\n}\n\nexport function resolveControlSize(\n size: ControlSize | undefined,\n configSize: ComponentSize,\n): ControlSize {\n return size ?? CONFIG_SIZE_TO_CONTROL_SIZE[configSize]\n}\n\nexport function resolveDisabled(\n disabled: boolean | undefined,\n configDisabled: boolean,\n): boolean {\n return disabled ?? configDisabled\n}\n\nexport function controlSizeToComponentSize(size: ControlSize): ComponentSize {\n return CONTROL_SIZE_TO_CONFIG_SIZE[size]\n}\n\nexport interface UIConfig {\n namespace: string\n size: ComponentSize\n disabled: boolean\n button: ButtonDefaults\n link: LinkDefaults\n}\n\nexport interface ButtonDefaults {\n variant?:\n | 'solid'\n | 'soft'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'default'\n | 'secondary'\n | 'outline'\n | 'dashed'\n | 'ghost'\n | 'text'\n | 'link'\n | 'destructive'\n tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n shape?: 'default' | 'circle' | 'round'\n}\n\nexport interface LinkDefaults {\n underline?: 'always' | 'hover' | 'never'\n tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'inherit'\n}\n\nconst defaultConfig: UIConfig = {\n namespace: 'ug',\n size: 'medium',\n disabled: false,\n button: {},\n link: {},\n}\nconst CONFIG_KEY: InjectionKey<ComputedRef<UIConfig>> = Symbol('ug-ui-config')\n\nfunction mergeDefined<T extends object>(parent: T, current?: Partial<T>): T {\n const merged = { ...parent }\n if (!current) return merged\n\n Object.entries(current).forEach(([key, value]) => {\n if (value !== undefined) Object.assign(merged, { [key]: value })\n })\n return merged\n}\n\nconst UConfigProvider = defineComponent({\n name: 'UConfigProvider',\n inheritAttrs: false,\n props: {\n namespace: { type: String, default: undefined },\n size: { type: String as PropType<ComponentSize>, default: undefined },\n disabled: { type: Boolean, default: undefined },\n button: { type: Object as PropType<Partial<ButtonDefaults>>, default: undefined },\n link: { type: Object as PropType<Partial<LinkDefaults>>, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const parent = inject(CONFIG_KEY, computed(() => defaultConfig))\n const config = computed<UIConfig>(() => ({\n namespace: props.namespace ?? parent.value.namespace,\n size: props.size ?? parent.value.size,\n disabled: props.disabled ?? parent.value.disabled,\n button: mergeDefined(parent.value.button, props.button),\n link: mergeDefined(parent.value.link, props.link),\n }))\n provide(CONFIG_KEY, config)\n return () => h(\n 'div',\n {\n ...attrs,\n class: ['[display:contents]', attrs.class],\n 'data-size': config.value.size,\n 'data-state': config.value.disabled ? 'disabled' : 'default',\n 'data-ug': 'config-provider',\n 'data-ug-namespace': config.value.namespace,\n 'data-ug-slot': 'root',\n 'data-variant': 'default',\n },\n slots.default?.(),\n )\n },\n})\n\nexport function useUIConfig(): ComputedRef<UIConfig> {\n return inject(CONFIG_KEY, computed(() => defaultConfig))\n}\n\nexport default UConfigProvider\n</script>\n","/**\n * @description: Vue Button 与 ButtonGroup 共享类型和依赖注入合同\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-25\n */\nimport type { InjectionKey, Ref, StyleValue } from 'vue'\n\nexport type ButtonVariant =\n | 'solid'\n | 'soft'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'default'\n | 'secondary'\n | 'outline'\n | 'dashed'\n | 'ghost'\n | 'text'\n | 'link'\n | 'destructive'\n\nexport type ButtonTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\nexport type ButtonSize = 'default' | 'sm' | 'lg' | 'icon'\nexport type ButtonShape = 'default' | 'circle' | 'round'\nexport type ButtonNativeType = 'button' | 'submit' | 'reset'\nexport type ButtonLoadingPlacement = 'start' | 'end'\n\nexport interface ButtonProps {\n variant?: ButtonVariant\n tone?: ButtonTone\n size?: ButtonSize\n shape?: ButtonShape\n block?: boolean\n loading?: boolean\n loadingText?: string\n loadingPlacement?: ButtonLoadingPlacement\n disabled?: boolean\n nativeType?: ButtonNativeType\n class?: string\n style?: StyleValue\n}\n\nexport interface ButtonGroupProps {\n variant?: ButtonVariant\n tone?: ButtonTone\n size?: ButtonSize\n shape?: ButtonShape\n disabled?: boolean\n orientation?: 'horizontal' | 'vertical'\n attached?: boolean\n class?: string\n}\n\nexport interface ButtonGroupContextValue {\n variant: Ref<ButtonVariant | undefined>\n tone: Ref<ButtonTone | undefined>\n size: Ref<ButtonSize | undefined>\n shape: Ref<ButtonShape | undefined>\n disabled: Ref<boolean>\n}\n\nexport const BUTTON_GROUP_KEY: InjectionKey<ButtonGroupContextValue> = Symbol('UGButtonGroup')\n","/**\n * @description: UButton 按钮组件,统一处理外观、语义色、尺寸、状态与组合\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-22\n */\n<script lang=\"ts\">\nexport type {\n ButtonLoadingPlacement,\n ButtonNativeType,\n ButtonProps,\n ButtonShape,\n ButtonSize,\n ButtonTone,\n ButtonVariant,\n} from './context/button-group'\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref, type PropType, type StyleValue } from 'vue'\nimport { Loader2 } from '@lucide/vue'\nimport { cn } from '../internal/cn'\nimport {\n resolveDisabled,\n useUIConfig,\n type ComponentSize,\n} from './config-provider.vue'\nimport {\n BUTTON_GROUP_KEY,\n type ButtonLoadingPlacement,\n type ButtonNativeType,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type ButtonVariant,\n} from './context/button-group'\n\nconst props = defineProps({\n variant: String as PropType<ButtonVariant>,\n tone: String as PropType<ButtonTone>,\n size: String as PropType<ButtonSize>,\n shape: String as PropType<ButtonShape>,\n block: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n loadingText: String,\n loadingPlacement: {\n type: String as PropType<ButtonLoadingPlacement>,\n default: 'start',\n },\n disabled: { type: Boolean, default: undefined },\n nativeType: {\n type: String as PropType<ButtonNativeType>,\n default: 'button',\n },\n class: String,\n style: [String, Object, Array] as PropType<StyleValue>,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n solid: '',\n soft: '',\n primary: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n success: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n warning: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n danger: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n destructive: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n info: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n default: 'border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n secondary: 'border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'bg-transparent',\n dashed: 'border-dashed bg-transparent',\n ghost: '',\n text: '',\n link: '',\n}\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n default: 'h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0',\n sm: 'h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0',\n lg: 'h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0',\n icon: 'h-[var(--control-height-md)] w-[var(--control-height-md)] p-0',\n}\n\nconst SHAPE_CLASSES: Record<ButtonShape, string> = {\n default: 'rounded-[var(--radius-control)]',\n circle: '!rounded-full !p-0 aspect-square',\n round: '!rounded-full',\n}\n\nconst BASE_CLASS = 'inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none'\n\ntype ToneVariant = 'solid' | 'soft' | 'outline' | 'dashed' | 'ghost' | 'text' | 'link'\n\nconst TONE_VARIANT_CLASSES: Record<ButtonTone, Record<ToneVariant, string>> = {\n neutral: {\n solid: 'border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n soft: 'bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n dashed: 'border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n primary: {\n solid: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n soft: 'bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40',\n outline: 'border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n dashed: 'border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n success: {\n solid: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n soft: 'bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40',\n outline: 'border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n dashed: 'border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n ghost: 'text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40',\n link: 'text-text-primary focus-visible:ring-success/40',\n },\n warning: {\n solid: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n soft: 'bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40',\n outline: 'border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n dashed: 'border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n ghost: 'text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40',\n link: 'text-text-primary focus-visible:ring-warning/40',\n },\n danger: {\n solid: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n soft: 'bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40',\n outline: 'border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n dashed: 'border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n ghost: 'text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40',\n link: 'text-text-primary focus-visible:ring-danger/40',\n },\n info: {\n solid: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n soft: 'bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40',\n outline: 'border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n dashed: 'border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n ghost: 'text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40',\n link: 'text-text-primary focus-visible:ring-info/40',\n },\n}\n\nconst VARIANT_LAYOUT_CLASSES: Partial<Record<ButtonVariant, string>> = {\n text: 'px-[var(--control-padding-x-sm)]',\n link: 'h-auto p-0 underline-offset-4 hover:underline',\n}\n\nconst CONFIG_SIZE_TO_BUTTON_SIZE: Record<ComponentSize, ButtonSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst LEGACY_VARIANT_TONES: Partial<Record<ButtonVariant, ButtonTone>> = {\n primary: 'primary',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n destructive: 'danger',\n info: 'info',\n}\n\nconst group = inject(BUTTON_GROUP_KEY, undefined)\nconst config = useUIConfig()\nconst buttonRef = ref<HTMLButtonElement | null>(null)\nconst resolvedVariant = computed<ButtonVariant>(() =>\n props.variant ?? group?.variant.value ?? config.value.button.variant ?? 'default',\n)\nconst resolvedTone = computed<ButtonTone>(() =>\n props.tone\n ?? group?.tone.value\n ?? config.value.button.tone\n ?? LEGACY_VARIANT_TONES[resolvedVariant.value]\n ?? (resolvedVariant.value === 'solid' || resolvedVariant.value === 'soft' ? 'primary' : 'neutral'),\n)\nconst resolvedSize = computed<ButtonSize>(() =>\n props.size ?? group?.size.value ?? CONFIG_SIZE_TO_BUTTON_SIZE[config.value.size],\n)\nconst resolvedShape = computed<ButtonShape>(() =>\n props.shape ?? group?.shape.value ?? config.value.button.shape ?? 'default',\n)\nconst toneClasses = computed(() => {\n const variant = resolvedVariant.value\n if (!['solid', 'soft', 'outline', 'dashed', 'ghost', 'text', 'link'].includes(variant)) return undefined\n return TONE_VARIANT_CLASSES[resolvedTone.value][variant as ToneVariant]\n})\n\nconst classes = computed(() =>\n cn(\n BASE_CLASS,\n VARIANT_CLASSES[resolvedVariant.value],\n TONE_VARIANT_CLASSES[resolvedTone.value] && toneClasses.value,\n SIZE_CLASSES[resolvedSize.value],\n SHAPE_CLASSES[resolvedShape.value],\n props.block && 'w-full flex',\n VARIANT_LAYOUT_CLASSES[resolvedVariant.value],\n props.class,\n ),\n)\nconst buttonStyle = computed<StyleValue>(() => [\n { fontWeight: 'var(--button-font-weight)' },\n props.style,\n])\n\nconst isDisabled = computed(\n () =>\n resolveDisabled(\n props.disabled,\n group?.disabled.value ?? config.value.disabled,\n ) || props.loading,\n)\nconst state = computed(() => {\n const states: string[] = []\n if (props.loading) states.push('loading')\n if (isDisabled.value) states.push('disabled')\n return states.length > 0 ? states.join(' ') : undefined\n})\n\nfunction handleClick(event: MouseEvent) {\n if (!isDisabled.value) {\n emit('click', event)\n }\n}\n\ndefineExpose({\n ref: buttonRef,\n})\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :class=\"classes\"\n :style=\"buttonStyle\"\n :type=\"nativeType\"\n :disabled=\"isDisabled\"\n :aria-busy=\"loading || undefined\"\n data-ug=\"button\"\n :data-state=\"state\"\n :data-variant=\"resolvedVariant\"\n :data-tone=\"resolvedTone\"\n :data-size=\"resolvedSize\"\n :data-shape=\"resolvedShape\"\n :data-block=\"block ? 'true' : undefined\"\n :data-ug-namespace=\"config.namespace\"\n @click=\"handleClick\"\n >\n <span\n v-if=\"loading && loadingPlacement === 'start'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n <span data-ug-slot=\"label\" class=\"inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]\">\n <template v-if=\"loading && loadingText !== undefined\">{{ loadingText }}</template>\n <slot v-else />\n </span>\n <span\n v-if=\"loading && loadingPlacement === 'end'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n </button>\n</template>\n","/**\n * @description: UButton 按钮组件,统一处理外观、语义色、尺寸、状态与组合\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-22\n */\n<script lang=\"ts\">\nexport type {\n ButtonLoadingPlacement,\n ButtonNativeType,\n ButtonProps,\n ButtonShape,\n ButtonSize,\n ButtonTone,\n ButtonVariant,\n} from './context/button-group'\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref, type PropType, type StyleValue } from 'vue'\nimport { Loader2 } from '@lucide/vue'\nimport { cn } from '../internal/cn'\nimport {\n resolveDisabled,\n useUIConfig,\n type ComponentSize,\n} from './config-provider.vue'\nimport {\n BUTTON_GROUP_KEY,\n type ButtonLoadingPlacement,\n type ButtonNativeType,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type ButtonVariant,\n} from './context/button-group'\n\nconst props = defineProps({\n variant: String as PropType<ButtonVariant>,\n tone: String as PropType<ButtonTone>,\n size: String as PropType<ButtonSize>,\n shape: String as PropType<ButtonShape>,\n block: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n loadingText: String,\n loadingPlacement: {\n type: String as PropType<ButtonLoadingPlacement>,\n default: 'start',\n },\n disabled: { type: Boolean, default: undefined },\n nativeType: {\n type: String as PropType<ButtonNativeType>,\n default: 'button',\n },\n class: String,\n style: [String, Object, Array] as PropType<StyleValue>,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n solid: '',\n soft: '',\n primary: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n success: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n warning: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n danger: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n destructive: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n info: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n default: 'border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n secondary: 'border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'bg-transparent',\n dashed: 'border-dashed bg-transparent',\n ghost: '',\n text: '',\n link: '',\n}\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n default: 'h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0',\n sm: 'h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0',\n lg: 'h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0',\n icon: 'h-[var(--control-height-md)] w-[var(--control-height-md)] p-0',\n}\n\nconst SHAPE_CLASSES: Record<ButtonShape, string> = {\n default: 'rounded-[var(--radius-control)]',\n circle: '!rounded-full !p-0 aspect-square',\n round: '!rounded-full',\n}\n\nconst BASE_CLASS = 'inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none'\n\ntype ToneVariant = 'solid' | 'soft' | 'outline' | 'dashed' | 'ghost' | 'text' | 'link'\n\nconst TONE_VARIANT_CLASSES: Record<ButtonTone, Record<ToneVariant, string>> = {\n neutral: {\n solid: 'border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n soft: 'bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n dashed: 'border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n primary: {\n solid: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n soft: 'bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40',\n outline: 'border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n dashed: 'border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n success: {\n solid: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n soft: 'bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40',\n outline: 'border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n dashed: 'border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n ghost: 'text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40',\n link: 'text-text-primary focus-visible:ring-success/40',\n },\n warning: {\n solid: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n soft: 'bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40',\n outline: 'border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n dashed: 'border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n ghost: 'text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40',\n link: 'text-text-primary focus-visible:ring-warning/40',\n },\n danger: {\n solid: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n soft: 'bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40',\n outline: 'border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n dashed: 'border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n ghost: 'text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40',\n link: 'text-text-primary focus-visible:ring-danger/40',\n },\n info: {\n solid: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n soft: 'bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40',\n outline: 'border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n dashed: 'border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n ghost: 'text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40',\n link: 'text-text-primary focus-visible:ring-info/40',\n },\n}\n\nconst VARIANT_LAYOUT_CLASSES: Partial<Record<ButtonVariant, string>> = {\n text: 'px-[var(--control-padding-x-sm)]',\n link: 'h-auto p-0 underline-offset-4 hover:underline',\n}\n\nconst CONFIG_SIZE_TO_BUTTON_SIZE: Record<ComponentSize, ButtonSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst LEGACY_VARIANT_TONES: Partial<Record<ButtonVariant, ButtonTone>> = {\n primary: 'primary',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n destructive: 'danger',\n info: 'info',\n}\n\nconst group = inject(BUTTON_GROUP_KEY, undefined)\nconst config = useUIConfig()\nconst buttonRef = ref<HTMLButtonElement | null>(null)\nconst resolvedVariant = computed<ButtonVariant>(() =>\n props.variant ?? group?.variant.value ?? config.value.button.variant ?? 'default',\n)\nconst resolvedTone = computed<ButtonTone>(() =>\n props.tone\n ?? group?.tone.value\n ?? config.value.button.tone\n ?? LEGACY_VARIANT_TONES[resolvedVariant.value]\n ?? (resolvedVariant.value === 'solid' || resolvedVariant.value === 'soft' ? 'primary' : 'neutral'),\n)\nconst resolvedSize = computed<ButtonSize>(() =>\n props.size ?? group?.size.value ?? CONFIG_SIZE_TO_BUTTON_SIZE[config.value.size],\n)\nconst resolvedShape = computed<ButtonShape>(() =>\n props.shape ?? group?.shape.value ?? config.value.button.shape ?? 'default',\n)\nconst toneClasses = computed(() => {\n const variant = resolvedVariant.value\n if (!['solid', 'soft', 'outline', 'dashed', 'ghost', 'text', 'link'].includes(variant)) return undefined\n return TONE_VARIANT_CLASSES[resolvedTone.value][variant as ToneVariant]\n})\n\nconst classes = computed(() =>\n cn(\n BASE_CLASS,\n VARIANT_CLASSES[resolvedVariant.value],\n TONE_VARIANT_CLASSES[resolvedTone.value] && toneClasses.value,\n SIZE_CLASSES[resolvedSize.value],\n SHAPE_CLASSES[resolvedShape.value],\n props.block && 'w-full flex',\n VARIANT_LAYOUT_CLASSES[resolvedVariant.value],\n props.class,\n ),\n)\nconst buttonStyle = computed<StyleValue>(() => [\n { fontWeight: 'var(--button-font-weight)' },\n props.style,\n])\n\nconst isDisabled = computed(\n () =>\n resolveDisabled(\n props.disabled,\n group?.disabled.value ?? config.value.disabled,\n ) || props.loading,\n)\nconst state = computed(() => {\n const states: string[] = []\n if (props.loading) states.push('loading')\n if (isDisabled.value) states.push('disabled')\n return states.length > 0 ? states.join(' ') : undefined\n})\n\nfunction handleClick(event: MouseEvent) {\n if (!isDisabled.value) {\n emit('click', event)\n }\n}\n\ndefineExpose({\n ref: buttonRef,\n})\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :class=\"classes\"\n :style=\"buttonStyle\"\n :type=\"nativeType\"\n :disabled=\"isDisabled\"\n :aria-busy=\"loading || undefined\"\n data-ug=\"button\"\n :data-state=\"state\"\n :data-variant=\"resolvedVariant\"\n :data-tone=\"resolvedTone\"\n :data-size=\"resolvedSize\"\n :data-shape=\"resolvedShape\"\n :data-block=\"block ? 'true' : undefined\"\n :data-ug-namespace=\"config.namespace\"\n @click=\"handleClick\"\n >\n <span\n v-if=\"loading && loadingPlacement === 'start'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n <span data-ug-slot=\"label\" class=\"inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]\">\n <template v-if=\"loading && loadingText !== undefined\">{{ loadingText }}</template>\n <slot v-else />\n </span>\n <span\n v-if=\"loading && loadingPlacement === 'end'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n </button>\n</template>\n"],"mappings":"mFAeA,IAAM,EAAkE,CACtE,MAAO,KACP,OAAQ,UACR,MAAO,IACT,EAEM,EAAkE,CACtE,GAAI,QACJ,QAAS,SACT,GAAI,OACN,EAEA,SAAgB,EACd,EACA,EACa,CACb,OAAO,GAAQ,EAA4B,EAC7C,CAEA,SAAgB,EACd,EACA,EACS,CACT,OAAO,GAAY,CACrB,CAEA,SAAgB,EAA2B,EAAkC,CAC3E,OAAO,EAA4B,EACrC,CAoCA,IAAM,EAA0B,CAC9B,UAAW,KACX,KAAM,SACN,SAAU,GACV,OAAQ,CAAC,EACT,KAAM,CAAC,CACT,EACM,EAAkD,OAAO,cAAc,EAE7E,SAAS,EAA+B,EAAW,EAAyB,CAC1E,IAAM,EAAS,CAAE,GAAG,CAAO,EAM3B,OALK,GAEL,OAAO,QAAQ,CAAO,CAAC,CAAC,SAAS,CAAC,EAAK,KAAW,CAC5C,IAAU,IAAA,IAAW,OAAO,OAAO,EAAQ,EAAG,GAAM,CAAM,CAAC,CACjE,CAAC,EAJoB,CAMvB,CAEA,IAAM,GAAA,EAAA,EAAA,gBAAA,CAAkC,CACtC,KAAM,kBACN,aAAc,GACd,MAAO,CACL,UAAW,CAAE,KAA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EAAA,MAAA,CAD8F,EAAA,OAAA,EAAA,CAA1F,MAAM,0CAA2C,KAAM,EAAA,QAAY,KAAA,GAAA"}
@@ -1,292 +0,0 @@
1
- import { t as e } from "./cn-Cl2u7rTh.js";
2
- import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, h as l, inject as u, normalizeClass as d, normalizeStyle as f, openBlock as p, provide as m, ref as h, renderSlot as g, toDisplayString as _, unref as v } from "vue";
3
- import { Loader2 as y } from "@lucide/vue";
4
- //#region src/components/config-provider.vue?vue&type=script&lang.ts
5
- var b = {
6
- small: "sm",
7
- medium: "default",
8
- large: "lg"
9
- }, x = {
10
- sm: "small",
11
- default: "medium",
12
- lg: "large"
13
- };
14
- function S(e, t) {
15
- return e ?? b[t];
16
- }
17
- function C(e, t) {
18
- return e ?? t;
19
- }
20
- function w(e) {
21
- return x[e];
22
- }
23
- var T = {
24
- namespace: "ug",
25
- size: "medium",
26
- disabled: !1,
27
- button: {},
28
- link: {}
29
- }, E = Symbol("ug-ui-config");
30
- function D(e, t) {
31
- let n = { ...e };
32
- return t && Object.entries(t).forEach(([e, t]) => {
33
- t !== void 0 && Object.assign(n, { [e]: t });
34
- }), n;
35
- }
36
- var O = c({
37
- name: "UConfigProvider",
38
- inheritAttrs: !1,
39
- props: {
40
- namespace: {
41
- type: String,
42
- default: void 0
43
- },
44
- size: {
45
- type: String,
46
- default: void 0
47
- },
48
- disabled: {
49
- type: Boolean,
50
- default: void 0
51
- },
52
- button: {
53
- type: Object,
54
- default: void 0
55
- },
56
- link: {
57
- type: Object,
58
- default: void 0
59
- }
60
- },
61
- setup(e, { attrs: t, slots: r }) {
62
- let i = u(E, n(() => T)), a = n(() => ({
63
- namespace: e.namespace ?? i.value.namespace,
64
- size: e.size ?? i.value.size,
65
- disabled: e.disabled ?? i.value.disabled,
66
- button: D(i.value.button, e.button),
67
- link: D(i.value.link, e.link)
68
- }));
69
- return m(E, a), () => l("div", {
70
- ...t,
71
- class: ["[display:contents]", t.class],
72
- "data-size": a.value.size,
73
- "data-state": a.value.disabled ? "disabled" : "default",
74
- "data-ug": "config-provider",
75
- "data-ug-namespace": a.value.namespace,
76
- "data-ug-slot": "root",
77
- "data-variant": "default"
78
- }, r.default?.());
79
- }
80
- });
81
- function k() {
82
- return u(E, n(() => T));
83
- }
84
- //#endregion
85
- //#region src/components/context/button-group.ts
86
- var A = Symbol("UGButtonGroup"), j = [
87
- "type",
88
- "disabled",
89
- "aria-busy",
90
- "data-state",
91
- "data-variant",
92
- "data-tone",
93
- "data-size",
94
- "data-shape",
95
- "data-block",
96
- "data-ug-namespace"
97
- ], M = {
98
- key: 0,
99
- "data-ug-slot": "loader",
100
- class: "inline-flex shrink-0 items-center justify-center",
101
- "aria-hidden": "true"
102
- }, N = {
103
- "data-ug-slot": "label",
104
- class: "inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]"
105
- }, P = {
106
- key: 1,
107
- "data-ug-slot": "loader",
108
- class: "inline-flex shrink-0 items-center justify-center",
109
- "aria-hidden": "true"
110
- }, F = /* @__PURE__ */ c({
111
- __name: "button",
112
- props: {
113
- variant: String,
114
- tone: String,
115
- size: String,
116
- shape: String,
117
- block: {
118
- type: Boolean,
119
- default: !1
120
- },
121
- loading: {
122
- type: Boolean,
123
- default: !1
124
- },
125
- loadingText: String,
126
- loadingPlacement: {
127
- type: String,
128
- default: "start"
129
- },
130
- disabled: {
131
- type: Boolean,
132
- default: void 0
133
- },
134
- nativeType: {
135
- type: String,
136
- default: "button"
137
- },
138
- class: String,
139
- style: [
140
- String,
141
- Object,
142
- Array
143
- ]
144
- },
145
- emits: ["click"],
146
- setup(c, { expose: l, emit: m }) {
147
- let b = c, x = m, S = {
148
- solid: "",
149
- soft: "",
150
- primary: "bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary",
151
- success: "bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success",
152
- warning: "bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning",
153
- danger: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
154
- destructive: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
155
- info: "bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info",
156
- default: "border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
157
- secondary: "border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40",
158
- outline: "bg-transparent",
159
- dashed: "border-dashed bg-transparent",
160
- ghost: "",
161
- text: "",
162
- link: ""
163
- }, w = {
164
- default: "h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0",
165
- sm: "h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0",
166
- lg: "h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0",
167
- icon: "h-[var(--control-height-md)] w-[var(--control-height-md)] p-0"
168
- }, T = {
169
- default: "rounded-[var(--radius-control)]",
170
- circle: "!rounded-full !p-0 aspect-square",
171
- round: "!rounded-full"
172
- }, E = {
173
- neutral: {
174
- solid: "border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40",
175
- soft: "bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40",
176
- outline: "border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
177
- dashed: "border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
178
- ghost: "text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40",
179
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40",
180
- link: "text-text-primary focus-visible:ring-primary/40"
181
- },
182
- primary: {
183
- solid: "bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary",
184
- soft: "bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40",
185
- outline: "border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
186
- dashed: "border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
187
- ghost: "text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
188
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40",
189
- link: "text-text-primary focus-visible:ring-primary/40"
190
- },
191
- success: {
192
- solid: "bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success",
193
- soft: "bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40",
194
- outline: "border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
195
- dashed: "border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
196
- ghost: "text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
197
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40",
198
- link: "text-text-primary focus-visible:ring-success/40"
199
- },
200
- warning: {
201
- solid: "bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning",
202
- soft: "bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40",
203
- outline: "border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
204
- dashed: "border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
205
- ghost: "text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
206
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40",
207
- link: "text-text-primary focus-visible:ring-warning/40"
208
- },
209
- danger: {
210
- solid: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
211
- soft: "bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40",
212
- outline: "border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
213
- dashed: "border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
214
- ghost: "text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
215
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40",
216
- link: "text-text-primary focus-visible:ring-danger/40"
217
- },
218
- info: {
219
- solid: "bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info",
220
- soft: "bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40",
221
- outline: "border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
222
- dashed: "border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
223
- ghost: "text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
224
- text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40",
225
- link: "text-text-primary focus-visible:ring-info/40"
226
- }
227
- }, D = {
228
- text: "px-[var(--control-padding-x-sm)]",
229
- link: "h-auto p-0 underline-offset-4 hover:underline"
230
- }, O = {
231
- small: "sm",
232
- medium: "default",
233
- large: "lg"
234
- }, F = {
235
- primary: "primary",
236
- success: "success",
237
- warning: "warning",
238
- danger: "danger",
239
- destructive: "danger",
240
- info: "info"
241
- }, I = u(A, void 0), L = k(), R = h(null), z = n(() => b.variant ?? I?.variant.value ?? L.value.button.variant ?? "default"), B = n(() => b.tone ?? I?.tone.value ?? L.value.button.tone ?? F[z.value] ?? (z.value === "solid" || z.value === "soft" ? "primary" : "neutral")), V = n(() => b.size ?? I?.size.value ?? O[L.value.size]), H = n(() => b.shape ?? I?.shape.value ?? L.value.button.shape ?? "default"), U = n(() => {
242
- let e = z.value;
243
- if ([
244
- "solid",
245
- "soft",
246
- "outline",
247
- "dashed",
248
- "ghost",
249
- "text",
250
- "link"
251
- ].includes(e)) return E[B.value][e];
252
- }), W = n(() => e("inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none", S[z.value], E[B.value] && U.value, w[V.value], T[H.value], b.block && "w-full flex", D[z.value], b.class)), G = n(() => [{ fontWeight: "var(--button-font-weight)" }, b.style]), K = n(() => C(b.disabled, I?.disabled.value ?? L.value.disabled) || b.loading), q = n(() => {
253
- let e = [];
254
- return b.loading && e.push("loading"), K.value && e.push("disabled"), e.length > 0 ? e.join(" ") : void 0;
255
- });
256
- function J(e) {
257
- K.value || x("click", e);
258
- }
259
- return l({ ref: R }), (e, n) => (p(), i("button", {
260
- ref_key: "buttonRef",
261
- ref: R,
262
- class: d(W.value),
263
- style: f(G.value),
264
- type: c.nativeType,
265
- disabled: K.value,
266
- "aria-busy": c.loading || void 0,
267
- "data-ug": "button",
268
- "data-state": q.value,
269
- "data-variant": z.value,
270
- "data-tone": B.value,
271
- "data-size": V.value,
272
- "data-shape": H.value,
273
- "data-block": c.block ? "true" : void 0,
274
- "data-ug-namespace": v(L).namespace,
275
- onClick: J
276
- }, [
277
- c.loading && c.loadingPlacement === "start" ? (p(), i("span", M, [g(e.$slots, "loading", {}, () => [s(v(y), {
278
- class: "animate-spin motion-reduce:animate-none",
279
- size: V.value === "sm" ? 14 : 16
280
- }, null, 8, ["size"])])])) : r("", !0),
281
- a("span", N, [c.loading && c.loadingText !== void 0 ? (p(), i(t, { key: 0 }, [o(_(c.loadingText), 1)], 64)) : g(e.$slots, "default", {}, void 0, void 0, 1)]),
282
- c.loading && c.loadingPlacement === "end" ? (p(), i("span", P, [g(e.$slots, "loading", {}, () => [s(v(y), {
283
- class: "animate-spin motion-reduce:animate-none",
284
- size: V.value === "sm" ? 14 : 16
285
- }, null, 8, ["size"])])])) : r("", !0)
286
- ], 14, j));
287
- }
288
- });
289
- //#endregion
290
- export { S as a, w as i, A as n, C as o, O as r, k as s, F as t };
291
-
292
- //# sourceMappingURL=button-D_ikOxrp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-D_ikOxrp.js","names":[],"sources":["../src/components/config-provider.vue","../src/components/context/button-group.ts","../src/components/button.vue","../src/components/button.vue"],"sourcesContent":["<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from 'vue'\n\nexport type ComponentSize = 'small' | 'medium' | 'large'\nexport type ControlSize = 'sm' | 'default' | 'lg'\n\nconst CONFIG_SIZE_TO_CONTROL_SIZE: Record<ComponentSize, ControlSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst CONTROL_SIZE_TO_CONFIG_SIZE: Record<ControlSize, ComponentSize> = {\n sm: 'small',\n default: 'medium',\n lg: 'large',\n}\n\nexport function resolveControlSize(\n size: ControlSize | undefined,\n configSize: ComponentSize,\n): ControlSize {\n return size ?? CONFIG_SIZE_TO_CONTROL_SIZE[configSize]\n}\n\nexport function resolveDisabled(\n disabled: boolean | undefined,\n configDisabled: boolean,\n): boolean {\n return disabled ?? configDisabled\n}\n\nexport function controlSizeToComponentSize(size: ControlSize): ComponentSize {\n return CONTROL_SIZE_TO_CONFIG_SIZE[size]\n}\n\nexport interface UIConfig {\n namespace: string\n size: ComponentSize\n disabled: boolean\n button: ButtonDefaults\n link: LinkDefaults\n}\n\nexport interface ButtonDefaults {\n variant?:\n | 'solid'\n | 'soft'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'default'\n | 'secondary'\n | 'outline'\n | 'dashed'\n | 'ghost'\n | 'text'\n | 'link'\n | 'destructive'\n tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\n shape?: 'default' | 'circle' | 'round'\n}\n\nexport interface LinkDefaults {\n underline?: 'always' | 'hover' | 'never'\n tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'inherit'\n}\n\nconst defaultConfig: UIConfig = {\n namespace: 'ug',\n size: 'medium',\n disabled: false,\n button: {},\n link: {},\n}\nconst CONFIG_KEY: InjectionKey<ComputedRef<UIConfig>> = Symbol('ug-ui-config')\n\nfunction mergeDefined<T extends object>(parent: T, current?: Partial<T>): T {\n const merged = { ...parent }\n if (!current) return merged\n\n Object.entries(current).forEach(([key, value]) => {\n if (value !== undefined) Object.assign(merged, { [key]: value })\n })\n return merged\n}\n\nconst UConfigProvider = defineComponent({\n name: 'UConfigProvider',\n inheritAttrs: false,\n props: {\n namespace: { type: String, default: undefined },\n size: { type: String as PropType<ComponentSize>, default: undefined },\n disabled: { type: Boolean, default: undefined },\n button: { type: Object as PropType<Partial<ButtonDefaults>>, default: undefined },\n link: { type: Object as PropType<Partial<LinkDefaults>>, default: undefined },\n },\n setup(props, { attrs, slots }) {\n const parent = inject(CONFIG_KEY, computed(() => defaultConfig))\n const config = computed<UIConfig>(() => ({\n namespace: props.namespace ?? parent.value.namespace,\n size: props.size ?? parent.value.size,\n disabled: props.disabled ?? parent.value.disabled,\n button: mergeDefined(parent.value.button, props.button),\n link: mergeDefined(parent.value.link, props.link),\n }))\n provide(CONFIG_KEY, config)\n return () => h(\n 'div',\n {\n ...attrs,\n class: ['[display:contents]', attrs.class],\n 'data-size': config.value.size,\n 'data-state': config.value.disabled ? 'disabled' : 'default',\n 'data-ug': 'config-provider',\n 'data-ug-namespace': config.value.namespace,\n 'data-ug-slot': 'root',\n 'data-variant': 'default',\n },\n slots.default?.(),\n )\n },\n})\n\nexport function useUIConfig(): ComputedRef<UIConfig> {\n return inject(CONFIG_KEY, computed(() => defaultConfig))\n}\n\nexport default UConfigProvider\n</script>\n","/**\n * @description: Vue Button 与 ButtonGroup 共享类型和依赖注入合同\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-25\n */\nimport type { InjectionKey, Ref, StyleValue } from 'vue'\n\nexport type ButtonVariant =\n | 'solid'\n | 'soft'\n | 'primary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'info'\n | 'default'\n | 'secondary'\n | 'outline'\n | 'dashed'\n | 'ghost'\n | 'text'\n | 'link'\n | 'destructive'\n\nexport type ButtonTone = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info'\nexport type ButtonSize = 'default' | 'sm' | 'lg' | 'icon'\nexport type ButtonShape = 'default' | 'circle' | 'round'\nexport type ButtonNativeType = 'button' | 'submit' | 'reset'\nexport type ButtonLoadingPlacement = 'start' | 'end'\n\nexport interface ButtonProps {\n variant?: ButtonVariant\n tone?: ButtonTone\n size?: ButtonSize\n shape?: ButtonShape\n block?: boolean\n loading?: boolean\n loadingText?: string\n loadingPlacement?: ButtonLoadingPlacement\n disabled?: boolean\n nativeType?: ButtonNativeType\n class?: string\n style?: StyleValue\n}\n\nexport interface ButtonGroupProps {\n variant?: ButtonVariant\n tone?: ButtonTone\n size?: ButtonSize\n shape?: ButtonShape\n disabled?: boolean\n orientation?: 'horizontal' | 'vertical'\n attached?: boolean\n class?: string\n}\n\nexport interface ButtonGroupContextValue {\n variant: Ref<ButtonVariant | undefined>\n tone: Ref<ButtonTone | undefined>\n size: Ref<ButtonSize | undefined>\n shape: Ref<ButtonShape | undefined>\n disabled: Ref<boolean>\n}\n\nexport const BUTTON_GROUP_KEY: InjectionKey<ButtonGroupContextValue> = Symbol('UGButtonGroup')\n","/**\n * @description: UButton 按钮组件,统一处理外观、语义色、尺寸、状态与组合\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-22\n */\n<script lang=\"ts\">\nexport type {\n ButtonLoadingPlacement,\n ButtonNativeType,\n ButtonProps,\n ButtonShape,\n ButtonSize,\n ButtonTone,\n ButtonVariant,\n} from './context/button-group'\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref, type PropType, type StyleValue } from 'vue'\nimport { Loader2 } from '@lucide/vue'\nimport { cn } from '../internal/cn'\nimport {\n resolveDisabled,\n useUIConfig,\n type ComponentSize,\n} from './config-provider.vue'\nimport {\n BUTTON_GROUP_KEY,\n type ButtonLoadingPlacement,\n type ButtonNativeType,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type ButtonVariant,\n} from './context/button-group'\n\nconst props = defineProps({\n variant: String as PropType<ButtonVariant>,\n tone: String as PropType<ButtonTone>,\n size: String as PropType<ButtonSize>,\n shape: String as PropType<ButtonShape>,\n block: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n loadingText: String,\n loadingPlacement: {\n type: String as PropType<ButtonLoadingPlacement>,\n default: 'start',\n },\n disabled: { type: Boolean, default: undefined },\n nativeType: {\n type: String as PropType<ButtonNativeType>,\n default: 'button',\n },\n class: String,\n style: [String, Object, Array] as PropType<StyleValue>,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n solid: '',\n soft: '',\n primary: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n success: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n warning: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n danger: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n destructive: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n info: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n default: 'border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n secondary: 'border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'bg-transparent',\n dashed: 'border-dashed bg-transparent',\n ghost: '',\n text: '',\n link: '',\n}\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n default: 'h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0',\n sm: 'h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0',\n lg: 'h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0',\n icon: 'h-[var(--control-height-md)] w-[var(--control-height-md)] p-0',\n}\n\nconst SHAPE_CLASSES: Record<ButtonShape, string> = {\n default: 'rounded-[var(--radius-control)]',\n circle: '!rounded-full !p-0 aspect-square',\n round: '!rounded-full',\n}\n\nconst BASE_CLASS = 'inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none'\n\ntype ToneVariant = 'solid' | 'soft' | 'outline' | 'dashed' | 'ghost' | 'text' | 'link'\n\nconst TONE_VARIANT_CLASSES: Record<ButtonTone, Record<ToneVariant, string>> = {\n neutral: {\n solid: 'border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n soft: 'bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n dashed: 'border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n primary: {\n solid: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n soft: 'bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40',\n outline: 'border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n dashed: 'border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n success: {\n solid: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n soft: 'bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40',\n outline: 'border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n dashed: 'border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n ghost: 'text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40',\n link: 'text-text-primary focus-visible:ring-success/40',\n },\n warning: {\n solid: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n soft: 'bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40',\n outline: 'border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n dashed: 'border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n ghost: 'text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40',\n link: 'text-text-primary focus-visible:ring-warning/40',\n },\n danger: {\n solid: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n soft: 'bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40',\n outline: 'border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n dashed: 'border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n ghost: 'text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40',\n link: 'text-text-primary focus-visible:ring-danger/40',\n },\n info: {\n solid: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n soft: 'bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40',\n outline: 'border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n dashed: 'border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n ghost: 'text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40',\n link: 'text-text-primary focus-visible:ring-info/40',\n },\n}\n\nconst VARIANT_LAYOUT_CLASSES: Partial<Record<ButtonVariant, string>> = {\n text: 'px-[var(--control-padding-x-sm)]',\n link: 'h-auto p-0 underline-offset-4 hover:underline',\n}\n\nconst CONFIG_SIZE_TO_BUTTON_SIZE: Record<ComponentSize, ButtonSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst LEGACY_VARIANT_TONES: Partial<Record<ButtonVariant, ButtonTone>> = {\n primary: 'primary',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n destructive: 'danger',\n info: 'info',\n}\n\nconst group = inject(BUTTON_GROUP_KEY, undefined)\nconst config = useUIConfig()\nconst buttonRef = ref<HTMLButtonElement | null>(null)\nconst resolvedVariant = computed<ButtonVariant>(() =>\n props.variant ?? group?.variant.value ?? config.value.button.variant ?? 'default',\n)\nconst resolvedTone = computed<ButtonTone>(() =>\n props.tone\n ?? group?.tone.value\n ?? config.value.button.tone\n ?? LEGACY_VARIANT_TONES[resolvedVariant.value]\n ?? (resolvedVariant.value === 'solid' || resolvedVariant.value === 'soft' ? 'primary' : 'neutral'),\n)\nconst resolvedSize = computed<ButtonSize>(() =>\n props.size ?? group?.size.value ?? CONFIG_SIZE_TO_BUTTON_SIZE[config.value.size],\n)\nconst resolvedShape = computed<ButtonShape>(() =>\n props.shape ?? group?.shape.value ?? config.value.button.shape ?? 'default',\n)\nconst toneClasses = computed(() => {\n const variant = resolvedVariant.value\n if (!['solid', 'soft', 'outline', 'dashed', 'ghost', 'text', 'link'].includes(variant)) return undefined\n return TONE_VARIANT_CLASSES[resolvedTone.value][variant as ToneVariant]\n})\n\nconst classes = computed(() =>\n cn(\n BASE_CLASS,\n VARIANT_CLASSES[resolvedVariant.value],\n TONE_VARIANT_CLASSES[resolvedTone.value] && toneClasses.value,\n SIZE_CLASSES[resolvedSize.value],\n SHAPE_CLASSES[resolvedShape.value],\n props.block && 'w-full flex',\n VARIANT_LAYOUT_CLASSES[resolvedVariant.value],\n props.class,\n ),\n)\nconst buttonStyle = computed<StyleValue>(() => [\n { fontWeight: 'var(--button-font-weight)' },\n props.style,\n])\n\nconst isDisabled = computed(\n () =>\n resolveDisabled(\n props.disabled,\n group?.disabled.value ?? config.value.disabled,\n ) || props.loading,\n)\nconst state = computed(() => {\n const states: string[] = []\n if (props.loading) states.push('loading')\n if (isDisabled.value) states.push('disabled')\n return states.length > 0 ? states.join(' ') : undefined\n})\n\nfunction handleClick(event: MouseEvent) {\n if (!isDisabled.value) {\n emit('click', event)\n }\n}\n\ndefineExpose({\n ref: buttonRef,\n})\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :class=\"classes\"\n :style=\"buttonStyle\"\n :type=\"nativeType\"\n :disabled=\"isDisabled\"\n :aria-busy=\"loading || undefined\"\n data-ug=\"button\"\n :data-state=\"state\"\n :data-variant=\"resolvedVariant\"\n :data-tone=\"resolvedTone\"\n :data-size=\"resolvedSize\"\n :data-shape=\"resolvedShape\"\n :data-block=\"block ? 'true' : undefined\"\n :data-ug-namespace=\"config.namespace\"\n @click=\"handleClick\"\n >\n <span\n v-if=\"loading && loadingPlacement === 'start'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n <span data-ug-slot=\"label\" class=\"inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]\">\n <template v-if=\"loading && loadingText !== undefined\">{{ loadingText }}</template>\n <slot v-else />\n </span>\n <span\n v-if=\"loading && loadingPlacement === 'end'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n </button>\n</template>\n","/**\n * @description: UButton 按钮组件,统一处理外观、语义色、尺寸、状态与组合\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-22\n */\n<script lang=\"ts\">\nexport type {\n ButtonLoadingPlacement,\n ButtonNativeType,\n ButtonProps,\n ButtonShape,\n ButtonSize,\n ButtonTone,\n ButtonVariant,\n} from './context/button-group'\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, inject, ref, type PropType, type StyleValue } from 'vue'\nimport { Loader2 } from '@lucide/vue'\nimport { cn } from '../internal/cn'\nimport {\n resolveDisabled,\n useUIConfig,\n type ComponentSize,\n} from './config-provider.vue'\nimport {\n BUTTON_GROUP_KEY,\n type ButtonLoadingPlacement,\n type ButtonNativeType,\n type ButtonShape,\n type ButtonSize,\n type ButtonTone,\n type ButtonVariant,\n} from './context/button-group'\n\nconst props = defineProps({\n variant: String as PropType<ButtonVariant>,\n tone: String as PropType<ButtonTone>,\n size: String as PropType<ButtonSize>,\n shape: String as PropType<ButtonShape>,\n block: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n loadingText: String,\n loadingPlacement: {\n type: String as PropType<ButtonLoadingPlacement>,\n default: 'start',\n },\n disabled: { type: Boolean, default: undefined },\n nativeType: {\n type: String as PropType<ButtonNativeType>,\n default: 'button',\n },\n class: String,\n style: [String, Object, Array] as PropType<StyleValue>,\n})\n\nconst emit = defineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst VARIANT_CLASSES: Record<ButtonVariant, string> = {\n solid: '',\n soft: '',\n primary: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n success: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n warning: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n danger: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n destructive: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n info: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n default: 'border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n secondary: 'border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'bg-transparent',\n dashed: 'border-dashed bg-transparent',\n ghost: '',\n text: '',\n link: '',\n}\n\nconst SIZE_CLASSES: Record<ButtonSize, string> = {\n default: 'h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0',\n sm: 'h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0',\n lg: 'h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0',\n icon: 'h-[var(--control-height-md)] w-[var(--control-height-md)] p-0',\n}\n\nconst SHAPE_CLASSES: Record<ButtonShape, string> = {\n default: 'rounded-[var(--radius-control)]',\n circle: '!rounded-full !p-0 aspect-square',\n round: '!rounded-full',\n}\n\nconst BASE_CLASS = 'inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none'\n\ntype ToneVariant = 'solid' | 'soft' | 'outline' | 'dashed' | 'ghost' | 'text' | 'link'\n\nconst TONE_VARIANT_CLASSES: Record<ButtonTone, Record<ToneVariant, string>> = {\n neutral: {\n solid: 'border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n soft: 'bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40',\n outline: 'border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n dashed: 'border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n primary: {\n solid: 'bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary',\n soft: 'bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40',\n outline: 'border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n dashed: 'border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n ghost: 'text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40',\n link: 'text-text-primary focus-visible:ring-primary/40',\n },\n success: {\n solid: 'bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success',\n soft: 'bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40',\n outline: 'border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n dashed: 'border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n ghost: 'text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40',\n link: 'text-text-primary focus-visible:ring-success/40',\n },\n warning: {\n solid: 'bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning',\n soft: 'bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40',\n outline: 'border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n dashed: 'border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n ghost: 'text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40',\n link: 'text-text-primary focus-visible:ring-warning/40',\n },\n danger: {\n solid: 'bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger',\n soft: 'bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40',\n outline: 'border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n dashed: 'border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n ghost: 'text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40',\n link: 'text-text-primary focus-visible:ring-danger/40',\n },\n info: {\n solid: 'bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info',\n soft: 'bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40',\n outline: 'border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n dashed: 'border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n ghost: 'text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40',\n text: 'text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40',\n link: 'text-text-primary focus-visible:ring-info/40',\n },\n}\n\nconst VARIANT_LAYOUT_CLASSES: Partial<Record<ButtonVariant, string>> = {\n text: 'px-[var(--control-padding-x-sm)]',\n link: 'h-auto p-0 underline-offset-4 hover:underline',\n}\n\nconst CONFIG_SIZE_TO_BUTTON_SIZE: Record<ComponentSize, ButtonSize> = {\n small: 'sm',\n medium: 'default',\n large: 'lg',\n}\n\nconst LEGACY_VARIANT_TONES: Partial<Record<ButtonVariant, ButtonTone>> = {\n primary: 'primary',\n success: 'success',\n warning: 'warning',\n danger: 'danger',\n destructive: 'danger',\n info: 'info',\n}\n\nconst group = inject(BUTTON_GROUP_KEY, undefined)\nconst config = useUIConfig()\nconst buttonRef = ref<HTMLButtonElement | null>(null)\nconst resolvedVariant = computed<ButtonVariant>(() =>\n props.variant ?? group?.variant.value ?? config.value.button.variant ?? 'default',\n)\nconst resolvedTone = computed<ButtonTone>(() =>\n props.tone\n ?? group?.tone.value\n ?? config.value.button.tone\n ?? LEGACY_VARIANT_TONES[resolvedVariant.value]\n ?? (resolvedVariant.value === 'solid' || resolvedVariant.value === 'soft' ? 'primary' : 'neutral'),\n)\nconst resolvedSize = computed<ButtonSize>(() =>\n props.size ?? group?.size.value ?? CONFIG_SIZE_TO_BUTTON_SIZE[config.value.size],\n)\nconst resolvedShape = computed<ButtonShape>(() =>\n props.shape ?? group?.shape.value ?? config.value.button.shape ?? 'default',\n)\nconst toneClasses = computed(() => {\n const variant = resolvedVariant.value\n if (!['solid', 'soft', 'outline', 'dashed', 'ghost', 'text', 'link'].includes(variant)) return undefined\n return TONE_VARIANT_CLASSES[resolvedTone.value][variant as ToneVariant]\n})\n\nconst classes = computed(() =>\n cn(\n BASE_CLASS,\n VARIANT_CLASSES[resolvedVariant.value],\n TONE_VARIANT_CLASSES[resolvedTone.value] && toneClasses.value,\n SIZE_CLASSES[resolvedSize.value],\n SHAPE_CLASSES[resolvedShape.value],\n props.block && 'w-full flex',\n VARIANT_LAYOUT_CLASSES[resolvedVariant.value],\n props.class,\n ),\n)\nconst buttonStyle = computed<StyleValue>(() => [\n { fontWeight: 'var(--button-font-weight)' },\n props.style,\n])\n\nconst isDisabled = computed(\n () =>\n resolveDisabled(\n props.disabled,\n group?.disabled.value ?? config.value.disabled,\n ) || props.loading,\n)\nconst state = computed(() => {\n const states: string[] = []\n if (props.loading) states.push('loading')\n if (isDisabled.value) states.push('disabled')\n return states.length > 0 ? states.join(' ') : undefined\n})\n\nfunction handleClick(event: MouseEvent) {\n if (!isDisabled.value) {\n emit('click', event)\n }\n}\n\ndefineExpose({\n ref: buttonRef,\n})\n</script>\n\n<template>\n <button\n ref=\"buttonRef\"\n :class=\"classes\"\n :style=\"buttonStyle\"\n :type=\"nativeType\"\n :disabled=\"isDisabled\"\n :aria-busy=\"loading || undefined\"\n data-ug=\"button\"\n :data-state=\"state\"\n :data-variant=\"resolvedVariant\"\n :data-tone=\"resolvedTone\"\n :data-size=\"resolvedSize\"\n :data-shape=\"resolvedShape\"\n :data-block=\"block ? 'true' : undefined\"\n :data-ug-namespace=\"config.namespace\"\n @click=\"handleClick\"\n >\n <span\n v-if=\"loading && loadingPlacement === 'start'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n <span data-ug-slot=\"label\" class=\"inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]\">\n <template v-if=\"loading && loadingText !== undefined\">{{ loadingText }}</template>\n <slot v-else />\n </span>\n <span\n v-if=\"loading && loadingPlacement === 'end'\"\n data-ug-slot=\"loader\"\n class=\"inline-flex shrink-0 items-center justify-center\"\n aria-hidden=\"true\"\n >\n <slot name=\"loading\">\n <Loader2 class=\"animate-spin motion-reduce:animate-none\" :size=\"resolvedSize === 'sm' ? 14 : 16\" />\n </slot>\n </span>\n </button>\n</template>\n"],"mappings":";;;;AAeA,IAAM,IAAkE;CACtE,OAAO;CACP,QAAQ;CACR,OAAO;AACT,GAEM,IAAkE;CACtE,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,SAAgB,EACd,GACA,GACa;CACb,OAAO,KAAQ,EAA4B;AAC7C;AAEA,SAAgB,EACd,GACA,GACS;CACT,OAAO,KAAY;AACrB;AAEA,SAAgB,EAA2B,GAAkC;CAC3E,OAAO,EAA4B;AACrC;AAoCA,IAAM,IAA0B;CAC9B,WAAW;CACX,MAAM;CACN,UAAU;CACV,QAAQ,CAAC;CACT,MAAM,CAAC;AACT,GACM,IAAkD,OAAO,cAAc;AAE7E,SAAS,EAA+B,GAAW,GAAyB;CAC1E,IAAM,IAAS,EAAE,GAAG,EAAO;CAM3B,OALK,KAEL,OAAO,QAAQ,CAAO,CAAC,CAAC,SAAS,CAAC,GAAK,OAAW;EAChD,AAAI,MAAU,KAAA,KAAW,OAAO,OAAO,GAAQ,GAAG,IAAM,EAAM,CAAC;CACjE,CAAC,GAJoB;AAMvB;AAEA,IAAM,IAAkB,EAAgB;CACtC,MAAM;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