@soybeanjs/ui 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +27 -5
  2. package/README.zh-CN.md +27 -5
  3. package/dist/components/accordion/accordion.js +1 -1
  4. package/dist/components/accordion/types.d.ts +3 -3
  5. package/dist/components/affix/affix.js +1 -1
  6. package/dist/components/affix/types.d.ts +2 -2
  7. package/dist/components/alert/alert.js +1 -1
  8. package/dist/components/alert/types.d.ts +4 -4
  9. package/dist/components/anchor/anchor.js +1 -1
  10. package/dist/components/anchor/types.d.ts +3 -3
  11. package/dist/components/autocomplete/autocomplete.js +1 -1
  12. package/dist/components/autocomplete/types.d.ts +3 -3
  13. package/dist/components/avatar/avatar.js +1 -1
  14. package/dist/components/avatar/avatar.vue.d.ts +2 -8
  15. package/dist/components/avatar/types.d.ts +4 -24
  16. package/dist/components/backtop/backtop.js +1 -1
  17. package/dist/components/backtop/backtop.vue.d.ts +2 -2
  18. package/dist/components/backtop/types.d.ts +2 -2
  19. package/dist/components/backtop/variants.js +1 -1
  20. package/dist/components/badge/badge.js +1 -1
  21. package/dist/components/badge/badge.vue.d.ts +2 -6
  22. package/dist/components/badge/types.d.ts +4 -12
  23. package/dist/components/badge/variants.js +1 -1
  24. package/dist/components/bottom-sheet/bottom-sheet.js +1 -1
  25. package/dist/components/bottom-sheet/types.d.ts +3 -3
  26. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  27. package/dist/components/breadcrumb/types.d.ts +3 -3
  28. package/dist/components/button/button-group.js +1 -1
  29. package/dist/components/button/button-icon.js +1 -1
  30. package/dist/components/button/button-link.js +1 -1
  31. package/dist/components/button/button-link.vue.d.ts +1 -1
  32. package/dist/components/button/button-loading.js +1 -1
  33. package/dist/components/button/button.js +1 -1
  34. package/dist/components/button/button.vue.d.ts +2 -2
  35. package/dist/components/button/types.d.ts +5 -5
  36. package/dist/components/calendar/calendar.js +1 -1
  37. package/dist/components/calendar/types.d.ts +3 -3
  38. package/dist/components/card/card.js +1 -1
  39. package/dist/components/card/types.d.ts +1 -1
  40. package/dist/components/carousel/carousel.js +1 -1
  41. package/dist/components/carousel/carousel.vue.d.ts +16 -19
  42. package/dist/components/carousel/index.d.ts +1 -5
  43. package/dist/components/carousel/index.js +1 -1
  44. package/dist/components/carousel/types.d.ts +22 -7
  45. package/dist/components/carousel/variants.js +1 -1
  46. package/dist/components/checkbox/checkbox-card-group.js +1 -1
  47. package/dist/components/checkbox/checkbox-card.js +1 -1
  48. package/dist/components/checkbox/checkbox-group.js +1 -1
  49. package/dist/components/checkbox/checkbox.js +1 -1
  50. package/dist/components/checkbox/types.d.ts +8 -8
  51. package/dist/components/clipboard/clipboard.js +1 -1
  52. package/dist/components/clipboard/clipboard.vue.d.ts +2 -2
  53. package/dist/components/clipboard/types.d.ts +1 -1
  54. package/dist/components/collapsible/types.d.ts +2 -2
  55. package/dist/components/color-area/color-area.js +1 -1
  56. package/dist/components/color-area/types.d.ts +4 -4
  57. package/dist/components/color-field/color-field.js +1 -1
  58. package/dist/components/color-field/types.d.ts +3 -3
  59. package/dist/components/color-picker/color-picker.js +1 -1
  60. package/dist/components/color-picker/types.d.ts +13 -13
  61. package/dist/components/color-slider/color-slider.js +1 -1
  62. package/dist/components/color-slider/types.d.ts +4 -4
  63. package/dist/components/color-swatch/color-swatch.js +1 -1
  64. package/dist/components/color-swatch/types.d.ts +2 -2
  65. package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -1
  66. package/dist/components/color-swatch-picker/types.d.ts +6 -6
  67. package/dist/components/combobox/combobox.js +1 -1
  68. package/dist/components/combobox/types.d.ts +3 -3
  69. package/dist/components/command/command.js +1 -1
  70. package/dist/components/command/types.d.ts +3 -3
  71. package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
  72. package/dist/components/config-provider/types.d.ts +1 -1
  73. package/dist/components/context-menu/context-menu-checkbox.js +1 -1
  74. package/dist/components/context-menu/context-menu-radio.js +1 -1
  75. package/dist/components/context-menu/context-menu-wrapper.js +1 -1
  76. package/dist/components/context-menu/context-menu.js +1 -1
  77. package/dist/components/context-menu/index.d.ts +4 -4
  78. package/dist/components/context-menu/index.js +1 -1
  79. package/dist/components/context-menu/types.d.ts +11 -11
  80. package/dist/components/date-field/date-field.js +1 -1
  81. package/dist/components/date-field/types.d.ts +2 -2
  82. package/dist/components/date-picker/date-picker.js +1 -1
  83. package/dist/components/date-picker/types.d.ts +3 -3
  84. package/dist/components/date-range-field/date-range-field.js +1 -1
  85. package/dist/components/date-range-field/types.d.ts +5 -5
  86. package/dist/components/date-range-picker/date-range-picker.js +1 -1
  87. package/dist/components/date-range-picker/types.d.ts +5 -5
  88. package/dist/components/dialog/dialog.js +1 -1
  89. package/dist/components/dialog/types.d.ts +3 -3
  90. package/dist/components/drawer/drawer.js +1 -1
  91. package/dist/components/drawer/types.d.ts +3 -3
  92. package/dist/components/dropdown-menu/dropdown-menu-checkbox.js +1 -1
  93. package/dist/components/dropdown-menu/dropdown-menu-radio.js +1 -1
  94. package/dist/components/dropdown-menu/dropdown-menu-wrapper.js +1 -1
  95. package/dist/components/dropdown-menu/dropdown-menu.js +1 -1
  96. package/dist/components/dropdown-menu/types.d.ts +11 -11
  97. package/dist/components/editable/editable.js +1 -1
  98. package/dist/components/editable/types.d.ts +9 -9
  99. package/dist/components/empty/empty.js +1 -1
  100. package/dist/components/empty/empty.vue.d.ts +2 -8
  101. package/dist/components/empty/index.d.ts +1 -2
  102. package/dist/components/empty/types.d.ts +11 -40
  103. package/dist/components/empty/variants.js +1 -1
  104. package/dist/components/form/form-field-array.js +1 -0
  105. package/dist/components/form/form-field-base.js +1 -1
  106. package/dist/components/form/form-field-base.vue.d.ts +3 -16
  107. package/dist/components/form/form-field.js +1 -0
  108. package/dist/components/form/form.js +1 -1
  109. package/dist/components/form/form.vue.d.ts +2 -2
  110. package/dist/components/form/index.d.ts +1 -1
  111. package/dist/components/form/types.d.ts +20 -123
  112. package/dist/components/form/use-form.d.ts +3 -41
  113. package/dist/components/form/use-form.js +1 -1
  114. package/dist/components/form/variants.js +1 -1
  115. package/dist/components/hover-card/hover-card.js +1 -1
  116. package/dist/components/hover-card/types.d.ts +7 -7
  117. package/dist/components/icon/types.d.ts +1 -1
  118. package/dist/components/input/index.d.ts +4 -2
  119. package/dist/components/input/index.js +1 -1
  120. package/dist/components/input/input.js +1 -1
  121. package/dist/components/input/input.vue.d.ts +2 -7
  122. package/dist/components/input/types.d.ts +10 -20
  123. package/dist/components/input/variants.js +1 -1
  124. package/dist/components/input-number/input-number.js +1 -1
  125. package/dist/components/input-number/types.d.ts +5 -5
  126. package/dist/components/input-otp/input-otp.js +1 -1
  127. package/dist/components/input-otp/types.d.ts +3 -3
  128. package/dist/components/kbd/kbd.js +1 -1
  129. package/dist/components/kbd/types.d.ts +1 -1
  130. package/dist/components/label/label.js +1 -1
  131. package/dist/components/label/types.d.ts +1 -1
  132. package/dist/components/layout/layout-classic.js +1 -1
  133. package/dist/components/layout/layout.js +1 -1
  134. package/dist/components/layout/types.d.ts +6 -6
  135. package/dist/components/link/link.js +1 -1
  136. package/dist/components/link/types.d.ts +1 -1
  137. package/dist/components/list/list.js +1 -1
  138. package/dist/components/list/types.d.ts +5 -5
  139. package/dist/components/menu/types.d.ts +1 -1
  140. package/dist/components/menubar/menubar.js +1 -1
  141. package/dist/components/menubar/types.d.ts +3 -3
  142. package/dist/components/month-picker/month-picker.js +1 -1
  143. package/dist/components/month-picker/types.d.ts +5 -5
  144. package/dist/components/month-range-picker/month-range-picker.js +1 -1
  145. package/dist/components/month-range-picker/types.d.ts +5 -5
  146. package/dist/components/navigation-menu/navigation-menu.js +1 -1
  147. package/dist/components/navigation-menu/types.d.ts +20 -20
  148. package/dist/components/page-tabs/page-tabs.js +1 -1
  149. package/dist/components/page-tabs/page-tabs.vue.d.ts +1 -1
  150. package/dist/components/page-tabs/types.d.ts +6 -6
  151. package/dist/components/pagination/pagination.js +1 -1
  152. package/dist/components/pagination/types.d.ts +9 -9
  153. package/dist/components/password/password.js +1 -1
  154. package/dist/components/password/types.d.ts +2 -2
  155. package/dist/components/popconfirm/popconfirm-cancel.js +1 -1
  156. package/dist/components/popconfirm/popconfirm-confirm.js +1 -1
  157. package/dist/components/popconfirm/popconfirm.js +1 -1
  158. package/dist/components/popconfirm/types.d.ts +26 -26
  159. package/dist/components/popover/popover.js +1 -1
  160. package/dist/components/popover/types.d.ts +8 -8
  161. package/dist/components/progress/progress-circle.js +1 -1
  162. package/dist/components/progress/progress.js +1 -1
  163. package/dist/components/progress/types.d.ts +5 -5
  164. package/dist/components/radio-group/radio-card-group.js +1 -1
  165. package/dist/components/radio-group/radio-card.js +1 -1
  166. package/dist/components/radio-group/radio-group.js +1 -1
  167. package/dist/components/radio-group/types.d.ts +12 -12
  168. package/dist/components/range-calendar/range-calendar.js +1 -1
  169. package/dist/components/range-calendar/types.d.ts +16 -16
  170. package/dist/components/scroll-area/scroll-area.js +1 -1
  171. package/dist/components/scroll-area/types.d.ts +7 -7
  172. package/dist/components/segment/segment.js +1 -1
  173. package/dist/components/segment/types.d.ts +3 -3
  174. package/dist/components/select/select.js +1 -1
  175. package/dist/components/select/types.d.ts +3 -3
  176. package/dist/components/separator/separator.js +1 -1
  177. package/dist/components/separator/types.d.ts +2 -2
  178. package/dist/components/skeleton/skeleton.js +1 -1
  179. package/dist/components/skeleton/types.d.ts +1 -1
  180. package/dist/components/slider/slider.js +1 -1
  181. package/dist/components/slider/types.d.ts +5 -5
  182. package/dist/components/spinner/spinner.js +1 -1
  183. package/dist/components/spinner/types.d.ts +2 -2
  184. package/dist/components/splitter/splitter-group.js +1 -1
  185. package/dist/components/splitter/splitter-panel.js +1 -1
  186. package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
  187. package/dist/components/splitter/splitter-resize-handle.vue.d.ts +2 -2
  188. package/dist/components/splitter/types.d.ts +6 -6
  189. package/dist/components/stepper/stepper.js +1 -1
  190. package/dist/components/stepper/types.d.ts +10 -10
  191. package/dist/components/switch/switch.js +1 -1
  192. package/dist/components/switch/types.d.ts +4 -4
  193. package/dist/components/table/table.js +1 -1
  194. package/dist/components/table/table.vue.d.ts +2 -2
  195. package/dist/components/table/types.d.ts +8 -8
  196. package/dist/components/tabs/tabs.js +1 -1
  197. package/dist/components/tabs/types.d.ts +3 -3
  198. package/dist/components/tag/tag.js +1 -1
  199. package/dist/components/tag/types.d.ts +1 -1
  200. package/dist/components/tags-input/tags-input.js +1 -1
  201. package/dist/components/tags-input/types.d.ts +2 -2
  202. package/dist/components/textarea/textarea.js +1 -1
  203. package/dist/components/textarea/types.d.ts +3 -3
  204. package/dist/components/time-field/time-field.js +1 -1
  205. package/dist/components/time-field/types.d.ts +5 -5
  206. package/dist/components/time-picker/time-picker.js +1 -1
  207. package/dist/components/time-picker/types.d.ts +5 -5
  208. package/dist/components/time-range-field/time-range-field.js +1 -1
  209. package/dist/components/time-range-field/types.d.ts +5 -5
  210. package/dist/components/time-range-picker/time-range-picker.js +1 -1
  211. package/dist/components/time-range-picker/types.d.ts +5 -5
  212. package/dist/components/toast/types.d.ts +1 -1
  213. package/dist/components/toggle/toggle.js +1 -1
  214. package/dist/components/toggle/types.d.ts +1 -1
  215. package/dist/components/toggle-group/toggle-group.js +1 -1
  216. package/dist/components/toggle-group/types.d.ts +2 -2
  217. package/dist/components/toolbar/toolbar.js +1 -1
  218. package/dist/components/toolbar/types.d.ts +1 -1
  219. package/dist/components/tooltip/tooltip.js +1 -1
  220. package/dist/components/tooltip/types.d.ts +7 -7
  221. package/dist/components/tree/tree.js +1 -1
  222. package/dist/components/tree/types.d.ts +4 -4
  223. package/dist/components/tree-menu/tree-menu-styled-item.js +1 -1
  224. package/dist/components/tree-menu/tree-menu.js +1 -1
  225. package/dist/components/tree-menu/types.d.ts +21 -21
  226. package/dist/components/virtualizer/types.d.ts +3 -3
  227. package/dist/components/year-picker/types.d.ts +5 -5
  228. package/dist/components/year-picker/year-picker.js +1 -1
  229. package/dist/components/year-range-picker/types.d.ts +5 -5
  230. package/dist/components/year-range-picker/year-range-picker.js +1 -1
  231. package/dist/constants/components.d.ts +18 -18
  232. package/dist/constants/components.js +1 -1
  233. package/dist/index.d.ts +107 -111
  234. package/dist/index.js +1 -1
  235. package/dist/styles.css +77 -52
  236. package/package.json +10 -6
  237. package/dist/components/carousel/carousel-content.js +0 -1
  238. package/dist/components/carousel/carousel-content.vue.d.ts +0 -18
  239. package/dist/components/carousel/carousel-item.js +0 -1
  240. package/dist/components/carousel/carousel-item.vue.d.ts +0 -18
  241. package/dist/components/carousel/carousel-next.js +0 -1
  242. package/dist/components/carousel/carousel-next.vue.d.ts +0 -23
  243. package/dist/components/carousel/carousel-previous.js +0 -1
  244. package/dist/components/carousel/carousel-previous.vue.d.ts +0 -23
  245. package/dist/components/empty/variants.d.ts +0 -57
  246. package/dist/components/form/context.js +0 -1
  247. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Alignment.d.ts +0 -4
  248. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Animations.d.ts +0 -11
  249. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Axis.d.ts +0 -16
  250. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Counter.d.ts +0 -9
  251. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragHandler.d.ts +0 -13
  252. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragTracker.d.ts +0 -4
  253. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EmblaCarousel.d.ts +0 -31
  254. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Engine.d.ts +0 -67
  255. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventHandler.d.ts +0 -29
  256. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventStore.d.ts +0 -10
  257. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Limit.d.ts +0 -13
  258. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/NodeRects.d.ts +0 -11
  259. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Options.d.ts +0 -43
  260. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/OptionsHandler.d.ts +0 -11
  261. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/PercentOfView.d.ts +0 -6
  262. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Plugins.d.ts +0 -20
  263. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ResizeHandler.d.ts +0 -11
  264. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBody.d.ts +0 -14
  265. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBounds.d.ts +0 -8
  266. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollContain.d.ts +0 -4
  267. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollLooper.d.ts +0 -6
  268. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollProgress.d.ts +0 -6
  269. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTarget.d.ts +0 -12
  270. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTo.d.ts +0 -7
  271. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideFocus.d.ts +0 -10
  272. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideLooper.d.ts +0 -19
  273. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideRegistry.d.ts +0 -6
  274. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesHandler.d.ts +0 -11
  275. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesInView.d.ts +0 -9
  276. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesToScroll.d.ts +0 -7
  277. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Translate.d.ts +0 -8
  278. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Vector1d.d.ts +0 -9
  279. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/utils.d.ts +0 -4
package/README.md CHANGED
@@ -35,15 +35,17 @@ SoybeanUI is built on a strict **two-layer separation** model:
35
35
 
36
36
  ### Packages
37
37
 
38
- | Package | Role | Components |
39
- | ----------------------- | --------------------------------- | ----------------------------- |
40
- | **@soybeanjs/headless** | Logic, state, a11y. Zero styles. | 50 primitives, 26 composables |
41
- | **@soybeanjs/ui** | Styled wrappers. UnoCSS + `tv()`. | 48 `S`-prefixed components |
38
+ | Package | Role | Components |
39
+ | ----------------------- | --------------------------------- | --------------------------------- |
40
+ | **@soybeanjs/headless** | Logic, state, a11y. Zero styles. | 95 component dirs, 25 composables |
41
+ | **@soybeanjs/ui** | Styled wrappers. UnoCSS + `tv()`. | 91 `S`-prefixed components |
42
42
 
43
43
  **Data flow is strictly one-way**: `headless` → `src`. The styled layer never imports from headless's internals — it injects style tokens via `provideXUi(computedUi)` which headless components read through `useUiContext()`.
44
44
 
45
45
  Some multi-slot headless components also expose `Compact` aggregators, such as `AccordionCompact` and `TableCompact`. They keep item iteration and default content/icon composition inside headless, while the UI layer stays focused on styling and prop forwarding.
46
46
 
47
+ Current Compact-style coverage also includes flows such as card, date-field, dialog, editable, hover-card, layout, navigation-menu, pagination, popover, and stepper, when those structures are stable enough to live in headless.
48
+
47
49
  ### Style Injection
48
50
 
49
51
  Every multi-slot headless component exposes a `provide{Name}Ui` function. The styled wrapper computes classes using `tailwind-variants` and injects them:
@@ -73,10 +75,12 @@ provideAccordionUi(ui); // headless reads this via useAccordionUi()
73
75
 
74
76
  ```ts
75
77
  import { AccordionRoot } from '@soybeanjs/headless'; // all components
76
- import { useControllableState } from '@soybeanjs/headless/composables'; // 26 composables
78
+ import { useControllableState } from '@soybeanjs/headless/composables'; // 25 composables
77
79
  import { transformPropsToContext } from '@soybeanjs/headless/shared'; // pure TS utils
80
+ import { createMonth } from '@soybeanjs/headless/date'; // shared date helpers
78
81
  import * as Headless from '@soybeanjs/headless/namespaced'; // namespace object
79
82
  import type { AccordionUiSlot } from '@soybeanjs/headless/accordion'; // per-component
83
+ import type { UiClass } from '@soybeanjs/headless/types'; // shared type surface
80
84
  ```
81
85
 
82
86
  **@soybeanjs/ui** exports:
@@ -87,6 +91,24 @@ import '@soybeanjs/ui/styles.css'; // pre-built UnoCSS stylesheet
87
91
  // Also: @soybeanjs/ui/nuxt · @soybeanjs/ui/resolver
88
92
  ```
89
93
 
94
+ ## 🛠 Development Workflow
95
+
96
+ If you contribute new public components, exports, or API descriptions, keep generated surfaces in sync through the official scripts instead of editing generated files by hand.
97
+
98
+ ```bash
99
+ pnpm gen:headless # sync headless component names and namespaced exports
100
+ pnpm gen:ui # sync ui component names
101
+ pnpm gen:api # regenerate docs api json and locale baseline data
102
+ pnpm gen:api:i18n # refresh api locale template data only
103
+ pnpm gen:changelog # regenerate docs changelog json and locale baseline data
104
+ pnpm translate:api:i18n -- --locale zh-CN
105
+ pnpm translate:changelog:i18n -- --locale zh-CN
106
+ ```
107
+
108
+ The docs site now renders component docs through `UsageCode`, `PlaygroundGallery`, and `ComponentApi`. Component detail pages and `/releases` also read generated changelog data from `docs/src/generated/changelog/` and `docs/src/generated/changelog-locales/`.
109
+
110
+ Public API or demo delivery changes should keep docs, playground examples, and generated API data aligned. Changelog mapping, release presentation, and changelog locale template changes should keep generated changelog data aligned as well.
111
+
90
112
  ## 📦 Installation
91
113
 
92
114
  ### Using the Styled UI Library (Recommended)
package/README.zh-CN.md CHANGED
@@ -35,15 +35,17 @@ SoybeanUI 采用严格的**双层分离**设计:
35
35
 
36
36
  ### 包结构
37
37
 
38
- | 包 | 职责 | 组件数量 |
39
- | ----------------------- | --------------------------- | ----------------------------- |
40
- | **@soybeanjs/headless** | 逻辑、状态、a11y,零样式 | 50 个原语件,26 个 composable |
41
- | **@soybeanjs/ui** | 样式包装层。UnoCSS + `tv()` | 48 个带 `S` 前缀的组件 |
38
+ | 包 | 职责 | 组件数量 |
39
+ | ----------------------- | --------------------------- | ------------------------------- |
40
+ | **@soybeanjs/headless** | 逻辑、状态、a11y,零样式 | 95 个组件目录,25 个 composable |
41
+ | **@soybeanjs/ui** | 样式包装层。UnoCSS + `tv()` | 91 个带 `S` 前缀的组件 |
42
42
 
43
43
  **数据流严格单向**:`headless` → `src`。样式层不会导入 headless 的内部实现,而是通过 `provideXUi(computedUi)` 注入样式 token,headless 组件再通过 `useUiContext()` 读取。
44
44
 
45
45
  部分多插槽 headless 组件还会暴露 `Compact` 聚合层,例如 `AccordionCompact` 和 `TableCompact`。它们把条目遍历以及默认内容 / 图标组合放在 headless 层完成,而 UI 层只负责样式和 props 转发。
46
46
 
47
+ 目前采用这类 Compact 约定式组合的能力还覆盖了 card、date-field、dialog、editable、hover-card、layout、navigation-menu、pagination、popover、stepper 等稳定结构场景。
48
+
47
49
  ### 样式注入机制
48
50
 
49
51
  每个多橪位的 headless 组件都有对应的 `provide{Name}Ui` 函数。样式层通过 `tailwind-variants` 计算类名后注入:
@@ -73,10 +75,12 @@ provideAccordionUi(ui); // headless 通过 useAccordionUi() 读取
73
75
 
74
76
  ```ts
75
77
  import { AccordionRoot } from '@soybeanjs/headless'; // 所有组件
76
- import { useControllableState } from '@soybeanjs/headless/composables'; // 26 个 composable
78
+ import { useControllableState } from '@soybeanjs/headless/composables'; // 25 个 composable
77
79
  import { transformPropsToContext } from '@soybeanjs/headless/shared'; // 纯 TS 工具
80
+ import { createMonth } from '@soybeanjs/headless/date'; // 日期工具
78
81
  import * as Headless from '@soybeanjs/headless/namespaced'; // 命名空间导入
79
82
  import type { AccordionUiSlot } from '@soybeanjs/headless/accordion'; // 单组件类型
83
+ import type { UiClass } from '@soybeanjs/headless/types'; // 共享类型导出
80
84
  ```
81
85
 
82
86
  **@soybeanjs/ui** 导出:
@@ -87,6 +91,24 @@ import '@soybeanjs/ui/styles.css'; // 预构建的 UnoCSS 样式表
87
91
  // 同时提供:@soybeanjs/ui/nuxt · @soybeanjs/ui/resolver
88
92
  ```
89
93
 
94
+ ## 🛠 开发工作流
95
+
96
+ 如果您在仓库内新增公共组件、调整导出入口或修改 API 描述,请通过官方脚本同步生成产物,而不是手动编辑生成文件。
97
+
98
+ ```bash
99
+ pnpm gen:headless # 同步 headless 组件名称与命名空间导出
100
+ pnpm gen:ui # 同步 ui 组件名称
101
+ pnpm gen:api # 重新生成 docs api json 与 locale 英文基线数据
102
+ pnpm gen:api:i18n # 仅刷新 api locale 模板数据
103
+ pnpm gen:changelog # 重新生成 docs changelog json 与 locale 英文基线数据
104
+ pnpm translate:api:i18n -- --locale zh-CN
105
+ pnpm translate:changelog:i18n -- --locale zh-CN
106
+ ```
107
+
108
+ 当前文档站默认通过 `UsageCode`、`PlaygroundGallery` 与 `ComponentApi` 渲染组件文档;组件详情页与 `/releases` 还会消费 `docs/src/generated/changelog/` 和 `docs/src/generated/changelog-locales/` 下的版本日志生成数据。
109
+
110
+ 因此,一旦公共 API 或示例交付面变化,也要同步维护 docs、playground 示例和 API 生成数据;如果调整了 changelog 映射、发布页展示或 changelog locale 模板,也要同步更新 changelog 生成数据。
111
+
90
112
  ## 📦 安装
91
113
 
92
114
  ### 使用带样式的 UI 库 (推荐)
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{accordionVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderList as u,renderSlot as d,toHandlers as f,unref as p,useSlots as m,withCtx as h}from"vue";import{AccordionCompact as g,provideAccordionUi as _}from"@soybeanjs/headless/accordion";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{keysOf as b}from"@soybeanjs/utils";const x=a({name:`SAccordion`,__name:`accordion`,props:{class:{},size:{},ui:{},items:{},itemProps:{},headerProps:{},triggerProps:{},contentProps:{},descriptionProps:{},collapsible:{type:Boolean},dir:{},disabled:{type:Boolean},orientation:{},unmountOnHide:{type:Boolean},modelValue:{},defaultValue:{},multiple:{},clearable:{type:Boolean},selectionBehavior:{}},emits:[`update:modelValue`],setup(a,{emit:x}){let S=a,C=x,w=m(),T=y(S,[`class`,`size`,`ui`]),E=v(C),D=n(()=>b(w).filter(e=>e!==`item`));return _(n(()=>e(t({size:S.size}),S.ui,{root:S.class}))),(e,t)=>(l(),r(p(g),s(p(T),f(p(E))),i({item:h(t=>[d(e.$slots,`item`,c(o(t)))]),_:2},[u(D.value,t=>({name:t,fn:h(n=>[d(e.$slots,t,c(o(n)))])}))]),1040))}});export{x as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{accordionVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderList as u,renderSlot as d,toHandlers as f,unref as p,useSlots as m,withCtx as h}from"vue";import{AccordionCompact as g,provideAccordionUi as _}from"@soybeanjs/headless/accordion";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{keysOf as b}from"@soybeanjs/utils";const x=a({name:`SAccordion`,__name:`accordion`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},items:{},itemProps:{},headerProps:{},triggerProps:{},contentProps:{},descriptionProps:{},collapsible:{type:Boolean},dir:{},disabled:{type:Boolean},orientation:{},unmountOnHide:{type:Boolean},modelValue:{},defaultValue:{},multiple:{},clearable:{type:Boolean},selectionBehavior:{}},emits:[`update:modelValue`],setup(a,{emit:x}){let S=a,C=x,w=m(),T=y(S,[`class`,`size`,`ui`]),E=v(C),D=n(()=>b(w).filter(e=>e!==`item`));return _(n(()=>e(t({size:S.size}),S.ui,{root:S.class}))),(e,t)=>(l(),r(p(g),s(p(T),f(p(E))),i({item:h(t=>[d(e.$slots,`item`,c(o(t)))]),_:2},[u(D.value,t=>({name:t,fn:h(n=>[d(e.$slots,t,c(o(n)))])}))]),1040))}});export{x as default};
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/accordion/types.d.ts
6
6
  /**
7
- * Props for the accordion component.
7
+ * Properties for the Accordion component.
8
8
  */
9
9
  interface AccordionProps<T extends AccordionOptionData = AccordionOptionData, M extends boolean = false> extends AccordionCompactProps<T, M> {
10
10
  /**
@@ -21,11 +21,11 @@ interface AccordionProps<T extends AccordionOptionData = AccordionOptionData, M
21
21
  ui?: Partial<AccordionUi>;
22
22
  }
23
23
  /**
24
- * Emits for the accordion component.
24
+ * Events for the Accordion component.
25
25
  */
26
26
  type AccordionEmits<M extends boolean = false> = AccordionCompactEmits<M>;
27
27
  /**
28
- * Slots for the accordion component.
28
+ * Slots for the Accordion component.
29
29
  */
30
30
  type AccordionSlots<T extends AccordionOptionData = AccordionOptionData, M extends boolean = false> = AccordionCompactSlots<T, M>;
31
31
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{affixVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{AffixCompact as h,provideAffixUi as g}from"@soybeanjs/headless/affix";const _=i({name:`SAffix`,__name:`affix`,props:{class:{},ui:{},placeholderProps:{},contentProps:{},offsetTop:{},offsetBottom:{},target:{type:[String,Function,null]}},emits:[`change`],setup(i,{emit:_}){let v=i,y=_,b=m(v,[`class`,`ui`]),x=p(y);return g(n(()=>e(t(),v.ui,{content:v.class}))),(e,t)=>(c(),r(d(h),o(d(b),u(d(x))),{default:f(t=>[l(e.$slots,`default`,s(a(t)))]),_:3},16))}});export{_ as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{affixVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{AffixCompact as h,provideAffixUi as g}from"@soybeanjs/headless/affix";const _=i({name:`SAffix`,__name:`affix`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},placeholderProps:{},contentProps:{},offsetTop:{},offsetBottom:{},target:{type:[String,Function,null]}},emits:[`change`],setup(i,{emit:_}){let v=i,y=_,b=m(v,[`class`,`ui`]),x=p(y);return g(n(()=>e(t(),v.ui,{content:v.class}))),(e,t)=>(c(),r(d(h),o(d(b),u(d(x))),{default:f(t=>[l(e.$slots,`default`,s(a(t)))]),_:3},16))}});export{_ as default};
@@ -3,7 +3,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
3
3
 
4
4
  //#region src/components/affix/types.d.ts
5
5
  /**
6
- * Props for the affix component.
6
+ * Properties for the Affix component.
7
7
  */
8
8
  interface AffixProps extends AffixCompactProps {
9
9
  /**
@@ -16,7 +16,7 @@ interface AffixProps extends AffixCompactProps {
16
16
  ui?: Partial<AffixUi>;
17
17
  }
18
18
  /**
19
- * Emits for the affix component.
19
+ * Events for the Affix component.
20
20
  */
21
21
  type AffixEmits = AffixCompactEmits;
22
22
  //#endregion
@@ -1 +1 @@
1
- import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{alertVariants as r}from"./variants.js";import{buttonVariants as i}from"../button/variants.js";import{computed as a,createBlock as o,createSlots as s,defineComponent as c,mergeProps as l,openBlock as u,renderList as d,renderSlot as f,unref as p,useSlots as m,withCtx as h}from"vue";import{useOmitProps as g}from"@soybeanjs/headless/composables";import{keysOf as _}from"@soybeanjs/utils";import{AlertCompact as v,provideAlertUi as y}from"@soybeanjs/headless/alert";const b=c({name:`SAlert`,__name:`alert`,props:{class:{},size:{},color:{},variant:{},ui:{},title:{},description:{},icon:{},closable:{type:Boolean},contentProps:{},titleProps:{},descriptionProps:{},closeProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(c,{emit:b}){let x=c,S=b,C=m(),w=g(x,[`class`,`size`,`color`,`variant`,`ui`]),T=a(()=>_(C));return y(a(()=>t(e(r({size:x.size,color:x.color,variant:x.variant}),{close:i({variant:`ghost`,color:`accent`,size:n[x.size??`md`],shape:`square`,fitContent:!0})}),x.ui,{root:x.class}))),(e,t)=>(u(),o(p(v),l(p(w),{"onUpdate:open":t[0]||=e=>S(`update:open`,e)}),s({_:2},[d(T.value,t=>({name:t,fn:h(()=>[f(e.$slots,t)])}))]),1040))}});export{b as default};
1
+ import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{alertVariants as r}from"./variants.js";import{buttonVariants as i}from"../button/variants.js";import{computed as a,createBlock as o,createSlots as s,defineComponent as c,mergeProps as l,openBlock as u,renderList as d,renderSlot as f,unref as p,useSlots as m,withCtx as h}from"vue";import{useOmitProps as g}from"@soybeanjs/headless/composables";import{keysOf as _}from"@soybeanjs/utils";import{AlertCompact as v,provideAlertUi as y}from"@soybeanjs/headless/alert";const b=c({name:`SAlert`,__name:`alert`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},color:{},variant:{},ui:{},title:{},description:{},icon:{},closable:{type:Boolean},contentProps:{},titleProps:{},descriptionProps:{},closeProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(c,{emit:b}){let x=c,S=b,C=m(),w=g(x,[`class`,`size`,`color`,`variant`,`ui`]),T=a(()=>_(C));return y(a(()=>t(e(r({size:x.size,color:x.color,variant:x.variant}),{close:i({variant:`ghost`,color:`accent`,size:n[x.size??`md`],shape:`square`,fitContent:!0})}),x.ui,{root:x.class}))),(e,t)=>(u(),o(p(v),l(p(w),{"onUpdate:open":t[0]||=e=>S(`update:open`,e)}),s({_:2},[d(T.value,t=>({name:t,fn:h(()=>[f(e.$slots,t)])}))]),1040))}});export{b as default};
@@ -5,11 +5,11 @@ import { ClassValue } from "@soybeanjs/headless/types";
5
5
 
6
6
  //#region src/components/alert/types.d.ts
7
7
  /**
8
- * Extended UI class overrides for the alert component.
8
+ * Extended UI class overrides for the Alert component.
9
9
  */
10
10
  type AlertExtendedUi = AlertUi;
11
11
  /**
12
- * Props for the alert component.
12
+ * Properties for the Alert component.
13
13
  */
14
14
  interface AlertProps extends AlertCompactProps {
15
15
  /**
@@ -34,11 +34,11 @@ interface AlertProps extends AlertCompactProps {
34
34
  ui?: Partial<AlertExtendedUi>;
35
35
  }
36
36
  /**
37
- * Emits for the alert component.
37
+ * Events for the Alert component.
38
38
  */
39
39
  type AlertEmits = AlertCompactEmits;
40
40
  /**
41
- * Slots for the alert component.
41
+ * Slots for the Alert component.
42
42
  */
43
43
  type AlertSlots = AlertCompactSlots;
44
44
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{anchorVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,toHandlers as s,unref as c}from"vue";import{useForwardListeners as l,useOmitProps as u}from"@soybeanjs/headless/composables";import{AnchorCompact as d,provideAnchorUi as f}from"@soybeanjs/headless/anchor";const p=i({name:`SAnchor`,__name:`anchor`,props:{color:{},size:{},ui:{},class:{},sticky:{type:Boolean,default:!0},items:{},linkProps:{},indicatorProps:{},titleProps:{},subProps:{},bounds:{},dir:{},getContainer:{},getCurrentAnchor:{},modelValue:{},offsetTop:{default:0},orientation:{},replace:{type:Boolean},targetOffset:{},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`activeChange`,`itemSelect`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`color`,`size`,`ui`,`class`,`sticky`]),_=l(h),v=n(()=>({"--soybean-anchor-offset-top":`${m.offsetTop}px`}));return f(n(()=>e(t({color:m.color,orientation:m.orientation,size:m.size,sticky:m.sticky}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{items:i.items,style:v.value},s(c(_))),null,16,[`items`,`style`]))}});export{p as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{anchorVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,toHandlers as s,unref as c}from"vue";import{useForwardListeners as l,useOmitProps as u}from"@soybeanjs/headless/composables";import{AnchorCompact as d,provideAnchorUi as f}from"@soybeanjs/headless/anchor";const p=i({name:`SAnchor`,__name:`anchor`,props:{color:{},size:{},ui:{},class:{type:[Boolean,null,String,Object,Array]},sticky:{type:Boolean,default:!0},items:{},linkProps:{},indicatorProps:{},titleProps:{},subProps:{},bounds:{},dir:{},getContainer:{},getCurrentAnchor:{},modelValue:{},offsetTop:{default:0},orientation:{},replace:{type:Boolean},targetOffset:{},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`activeChange`,`itemSelect`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`color`,`size`,`ui`,`class`,`sticky`]),_=l(h),v=n(()=>({"--soybean-anchor-offset-top":`${m.offsetTop}px`}));return f(n(()=>e(t({color:m.color,orientation:m.orientation,size:m.size,sticky:m.sticky}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{items:i.items,style:v.value},s(c(_))),null,16,[`items`,`style`]))}});export{p as default};
@@ -8,11 +8,11 @@ import { ClassValue, UiClass } from "@soybeanjs/headless/types";
8
8
  */
9
9
  type AnchorExtraUiSlot = Exclude<AnchorUiSlot, 'root' | 'link'>;
10
10
  /**
11
- * Extended UI class overrides for the anchor component.
11
+ * Extended UI class overrides for the Anchor component.
12
12
  */
13
13
  type AnchorExtendedUi = UiClass<AnchorUiSlot>;
14
14
  /**
15
- * Props for the anchor component.
15
+ * Properties for the Anchor component.
16
16
  */
17
17
  interface AnchorProps extends AnchorCompactProps {
18
18
  /**
@@ -37,7 +37,7 @@ interface AnchorProps extends AnchorCompactProps {
37
37
  sticky?: boolean;
38
38
  }
39
39
  /**
40
- * Emits for the anchor component.
40
+ * Events for the Anchor component.
41
41
  */
42
42
  type AnchorEmits = AnchorCompactEmits;
43
43
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{autocompleteVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createSlots as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{keysOf as y}from"@soybeanjs/utils";import{AutocompleteCompact as b,provideAutocompleteUi as x}from"@soybeanjs/headless/autocomplete";const S=o({name:`SAutocomplete`,__name:`autocomplete`,props:{class:{},size:{},ui:{},modelValue:{default:void 0},defaultValue:{},items:{},placeholder:{},clearable:{type:Boolean,default:!1},clearLabel:{default:`Clear input`},emptyLabel:{default:`No results found.`},fuseOptions:{},anchorProps:{},inputProps:{},triggerProps:{},portalProps:{},contentProps:{},viewportProps:{},groupProps:{},groupLabelProps:{},itemProps:{},itemIndicatorProps:{},separatorProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},dir:{},disabled:{type:Boolean},highlightOnHover:{type:Boolean},openOnFocus:{type:Boolean},openOnClick:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`,`highlight`,`select`],setup(o,{emit:S}){let C=o,w=S,T=h(),E=v(C,[`class`,`size`,`ui`]),D=_(w),O=n(()=>y(T));return x(n(()=>e(t({size:C.size}),C.ui,{root:C.class}))),(e,t)=>(u(),r(m(b),c(m(E),{items:o.items},p(m(D))),a({_:2},[d(O.value,t=>({name:t,fn:g(n=>[i(` @vue-ignore ignore vue slot props type `),f(e.$slots,t,l(s(n)))])}))]),1040,[`items`]))}});export{S as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{autocompleteVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createSlots as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{keysOf as y}from"@soybeanjs/utils";import{AutocompleteCompact as b,provideAutocompleteUi as x}from"@soybeanjs/headless/autocomplete";const S=o({name:`SAutocomplete`,__name:`autocomplete`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},modelValue:{default:void 0},defaultValue:{},items:{},placeholder:{},clearable:{type:Boolean,default:!1},clearLabel:{default:`Clear input`},emptyLabel:{default:`No results found.`},fuseOptions:{},anchorProps:{},inputProps:{},triggerProps:{},portalProps:{},contentProps:{},viewportProps:{},groupProps:{},groupLabelProps:{},itemProps:{},itemIndicatorProps:{},separatorProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},dir:{},disabled:{type:Boolean},highlightOnHover:{type:Boolean},openOnFocus:{type:Boolean},openOnClick:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:open`,`highlight`,`select`],setup(o,{emit:S}){let C=o,w=S,T=h(),E=v(C,[`class`,`size`,`ui`]),D=_(w),O=n(()=>y(T));return x(n(()=>e(t({size:C.size}),C.ui,{root:C.class}))),(e,t)=>(u(),r(m(b),c(m(E),{items:o.items},p(m(D))),a({_:2},[d(O.value,t=>({name:t,fn:g(n=>[i(` @vue-ignore ignore vue slot props type `),f(e.$slots,t,l(s(n)))])}))]),1040,[`items`]))}});export{S as default};
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/autocomplete/types.d.ts
6
6
  /**
7
- * Props for the autocomplete component.
7
+ * Properties for the Autocomplete component.
8
8
  */
9
9
  interface AutocompleteProps<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> extends AutocompleteCompactProps<T> {
10
10
  /** Root class. */
@@ -19,11 +19,11 @@ interface AutocompleteProps<T extends AutocompleteSingleOptionData = Autocomplet
19
19
  ui?: Partial<AutocompleteUi>;
20
20
  }
21
21
  /**
22
- * Emits for the autocomplete component.
22
+ * Events for the Autocomplete component.
23
23
  */
24
24
  type AutocompleteEmits<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> = AutocompleteCompactEmits<T>;
25
25
  /**
26
- * Slots for the autocomplete component.
26
+ * Slots for the Autocomplete component.
27
27
  */
28
28
  type AutocompleteSlots<T extends AutocompleteSingleOptionData = AutocompleteSingleOptionData> = AutocompleteCompactSlots<T>;
29
29
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{avatarVariants as t}from"./variants.js";import{computed as n,createBlock as r,createTextVNode as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderSlot as d,toDisplayString as f,unref as p,withCtx as m}from"vue";import{useOmitProps as h}from"@soybeanjs/headless/composables";import{AvatarFallback as g,AvatarImage as _,AvatarRoot as v,provideAvatarUi as y}from"@soybeanjs/headless/avatar";const b=o({name:`SAvatar`,__name:`avatar`,props:{class:{},size:{},ui:{},src:{},delayMs:{},fallbackLabel:{},imageProps:{},fallbackProps:{}},emits:[`loadingStatusChange`],setup(o,{emit:b}){let x=o,S=b,C=h(x,[`class`,`size`,`ui`,`fallbackLabel`,`imageProps`,`fallbackProps`]);y(n(()=>e(t({size:x.size}),x.ui,{root:x.class})));let w=n(()=>({...x.imageProps,src:x.src})),T=n(()=>({...x.fallbackProps,delayMs:x.delayMs}));return(e,t)=>(u(),r(p(v),l(s(p(C))),{default:m(()=>[d(e.$slots,`default`,{},()=>[d(e.$slots,`image`,{},()=>[a(p(_),c(w.value,{onLoadingStatusChange:t[0]||=e=>S(`loadingStatusChange`,e)}),null,16)]),a(p(g),l(s(T.value)),{default:m(()=>[d(e.$slots,`fallback`,{},()=>[i(f(o.fallbackLabel),1)])]),_:3},16)])]),_:3},16))}});export{b as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{avatarVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,mergeProps as o,openBlock as s,renderList as c,renderSlot as l,unref as u,useSlots as d,withCtx as f}from"vue";import{useOmitProps as p}from"@soybeanjs/headless/composables";import{keysOf as m}from"@soybeanjs/utils";import{AvatarCompact as h,provideAvatarUi as g}from"@soybeanjs/headless/avatar";const _=a({name:`SAvatar`,__name:`avatar`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},src:{},delayMs:{},fallbackLabel:{},imageProps:{},fallbackProps:{}},emits:[`loadingStatusChange`],setup(a,{emit:_}){let v=a,y=_,b=d(),x=p(v,[`class`,`size`,`ui`]),S=n(()=>m(b));return g(n(()=>e(t({size:v.size}),v.ui,{root:v.class}))),(e,t)=>(s(),r(u(h),o(u(x),{onLoadingStatusChange:t[0]||=e=>y(`loadingStatusChange`,e)}),i({_:2},[c(S.value,t=>({name:t,fn:f(()=>[l(e.$slots,t)])}))]),1040))}});export{_ as default};
@@ -3,14 +3,8 @@ import * as _$vue from "vue";
3
3
  import * as _$_soybeanjs_headless0 from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/avatar/avatar.vue.d.ts
6
- declare var __VLS_8: {}, __VLS_10: {}, __VLS_25: {};
7
- type __VLS_Slots = {} & {
8
- default?: (props: typeof __VLS_8) => any;
9
- } & {
10
- image?: (props: typeof __VLS_10) => any;
11
- } & {
12
- fallback?: (props: typeof __VLS_25) => any;
13
- };
6
+ declare var __VLS_12: string | number, __VLS_13: {};
7
+ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any };
14
8
  declare const __VLS_base: _$vue.DefineComponent<AvatarProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
15
9
  loadingStatusChange: (status: _$_soybeanjs_headless0.ImageLoadingStatus) => any;
16
10
  }, string, _$vue.PublicProps, Readonly<AvatarProps> & Readonly<{
@@ -1,12 +1,12 @@
1
1
  import { ThemeSize } from "../../theme/types.js";
2
- import { AvatarFallbackProps, AvatarImageEmits, AvatarImageProps, AvatarRootProps, AvatarUi } from "@soybeanjs/headless/avatar";
2
+ import { AvatarCompactProps, AvatarImageEmits, AvatarUi } from "@soybeanjs/headless/avatar";
3
3
  import { ClassValue } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/avatar/types.d.ts
6
6
  /**
7
- * Props for the avatar component.
7
+ * Properties for the Avatar component.
8
8
  */
9
- interface AvatarProps extends AvatarRootProps {
9
+ interface AvatarProps extends AvatarCompactProps {
10
10
  /**
11
11
  * root class
12
12
  */
@@ -19,29 +19,9 @@ interface AvatarProps extends AvatarRootProps {
19
19
  * Per-slot class overrides for the component.
20
20
  */
21
21
  ui?: Partial<AvatarUi>;
22
- /** The image source URL */
23
- src: string;
24
- /**
25
- * Useful for delaying rendering so it only appears for those with slower connections.
26
- *
27
- * @defaultValue undefined
28
- */
29
- delayMs?: number;
30
- /**
31
- * Fallback label.
32
- */
33
- fallbackLabel?: string;
34
- /**
35
- * Props forwarded to the image element.
36
- */
37
- imageProps?: Omit<AvatarImageProps, 'src'>;
38
- /**
39
- * Props forwarded to the fallback element.
40
- */
41
- fallbackProps?: Omit<AvatarFallbackProps, 'delayMs'>;
42
22
  }
43
23
  /**
44
- * Emits for the avatar component.
24
+ * Events for the Avatar component.
45
25
  */
46
26
  type AvatarEmits = AvatarImageEmits;
47
27
  //#endregion
@@ -1 +1 @@
1
- import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"../button/variants.js";import n from"../icon/icon.js";import{backtopVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps as c,openBlock as l,renderSlot as u,toHandlers as d,unref as f,withCtx as p}from"vue";import{useForwardListeners as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{Backtop as g}from"@soybeanjs/headless/backtop";const _=s({name:`SBacktop`,__name:`backtop`,props:{class:{},color:{default:`primary`},size:{default:`lg`},variant:{default:`solid`},shape:{default:`circle`},shadow:{default:`lg`},fitContent:{type:Boolean,default:!0},icon:{default:`lucide:arrow-up`},iconClass:{},iconProps:{},visibilityHeight:{},target:{},duration:{}},emits:[`change`,`click`],setup(s,{emit:_}){let v=s,y=_,b=h(v,[`class`,`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`icon`,`iconClass`,`iconProps`]),x=m(y),S=i(()=>e(r(),t({color:v.color,size:v.size,variant:v.variant,shape:v.shape,shadow:v.shadow,fitContent:v.fitContent}),v.class));return(e,t)=>(l(),a(f(g),c(f(b),{class:S.value},d(f(x))),{default:p(()=>[u(e.$slots,`default`,{},()=>[o(n,c(s.iconProps,{icon:s.icon,class:s.iconClass}),null,16,[`icon`,`class`])])]),_:3},16,[`class`]))}});export{_ as default};
1
+ import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"../button/variants.js";import n from"../icon/icon.js";import{backtopVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps as c,openBlock as l,renderSlot as u,toHandlers as d,unref as f,withCtx as p}from"vue";import{useForwardListeners as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{Backtop as g}from"@soybeanjs/headless/backtop";const _=s({name:`SBacktop`,__name:`backtop`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{default:`primary`},size:{default:`lg`},variant:{default:`solid`},shape:{default:`circle`},shadow:{default:`lg`},fitContent:{type:Boolean,default:!0},icon:{default:`lucide:arrow-up`},iconClass:{type:[Boolean,null,String,Object,Array]},iconProps:{},visibilityHeight:{},target:{},duration:{}},emits:[`change`,`click`],setup(s,{emit:_}){let v=s,y=_,b=h(v,[`class`,`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`icon`,`iconClass`,`iconProps`]),x=m(y),S=i(()=>{let n=r({size:v.size});return e(t({color:v.color,size:v.size,variant:v.variant,shape:v.shape,shadow:v.shadow,fitContent:v.fitContent}),n,v.class)});return(e,t)=>(l(),a(f(g),c(f(b),{class:S.value},d(f(x))),{default:p(()=>[u(e.$slots,`default`,{},()=>[o(n,c(s.iconProps,{icon:s.icon,class:s.iconClass}),null,16,[`icon`,`class`])])]),_:3},16,[`class`]))}});export{_ as default};
@@ -9,10 +9,10 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_8) => any;
10
10
  };
11
11
  declare const __VLS_base: _$vue.DefineComponent<BacktopProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
12
- click: (event: MouseEvent) => any;
12
+ click: (event: PointerEvent) => any;
13
13
  change: (visible: boolean) => any;
14
14
  }, string, _$vue.PublicProps, Readonly<BacktopProps> & Readonly<{
15
- onClick?: ((event: MouseEvent) => any) | undefined;
15
+ onClick?: ((event: PointerEvent) => any) | undefined;
16
16
  onChange?: ((visible: boolean) => any) | undefined;
17
17
  }>, {
18
18
  icon: string;
@@ -6,7 +6,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
6
6
 
7
7
  //#region src/components/backtop/types.d.ts
8
8
  /**
9
- * Props for the backtop component.
9
+ * Properties for the Backtop component.
10
10
  */
11
11
  interface BacktopProps$1 extends BacktopProps {
12
12
  /**
@@ -53,7 +53,7 @@ interface BacktopProps$1 extends BacktopProps {
53
53
  iconProps?: Partial<IconProps>;
54
54
  }
55
55
  /**
56
- * Emits for the backtop component.
56
+ * Events for the Backtop component.
57
57
  */
58
58
  type BacktopEmits$1 = BacktopEmits;
59
59
  //#endregion
@@ -1 +1 @@
1
- import{tv as e}from"tailwind-variants";const t=e({base:`fixed bottom-6 end-6 z-50`});export{t as backtopVariants};
1
+ import{tv as e}from"tailwind-variants";const t=e({base:`fixed z-50`,variants:{size:{xs:`bottom-4 end-4`,sm:`bottom-5 end-5`,md:`bottom-6 end-6`,lg:`bottom-7 end-7`,xl:`bottom-8 end-8`,"2xl":`bottom-10 end-10`}},defaultVariants:{size:`md`}});export{t as backtopVariants};
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{badgeVariants as t}from"./variants.js";import{computed as n,createBlock as r,createTextVNode as i,createVNode as a,defineComponent as o,guardReactiveProps as s,normalizeProps as c,openBlock as l,renderSlot as u,toDisplayString as d,unref as f,withCtx as p}from"vue";import{BadgeContent as m,BadgeRoot as h,provideBadgeUi as g}from"@soybeanjs/headless/badge";const _=o({name:`SBadge`,__name:`badge`,props:{class:{},color:{},size:{},ui:{},position:{},content:{},contentProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(o,{emit:_}){let v=o,y=_;return g(n(()=>e(t({color:v.color,size:v.size,position:v.position}),v.ui,{root:v.class}))),(e,t)=>(l(),r(f(h),{open:o.open,"onUpdate:open":t[0]||=e=>y(`update:open`,e)},{default:p(()=>[u(e.$slots,`default`),a(f(m),c(s(o.contentProps)),{default:p(()=>[u(e.$slots,`content`,{},()=>[i(d(o.content),1)])]),_:3},16)]),_:3},8,[`open`]))}});export{_ as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{badgeVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,mergeProps as o,openBlock as s,renderList as c,renderSlot as l,unref as u,useSlots as d,withCtx as f}from"vue";import{useOmitProps as p}from"@soybeanjs/headless/composables";import{keysOf as m}from"@soybeanjs/utils";import{BadgeCompact as h,provideBadgeUi as g}from"@soybeanjs/headless/badge";const _=a({name:`SBadge`,__name:`badge`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},ui:{},position:{},content:{},contentProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(a,{emit:_}){let v=a,y=_,b=d(),x=p(v,[`class`,`color`,`size`,`ui`,`position`]),S=n(()=>m(b));return g(n(()=>e(t({color:v.color,size:v.size,position:v.position}),v.ui,{root:v.class}))),(e,t)=>(s(),r(u(h),o(u(x),{"onUpdate:open":t[0]||=e=>y(`update:open`,e)}),i({_:2},[c(S.value,t=>({name:t,fn:f(()=>[l(e.$slots,t)])}))]),1040))}});export{_ as default};
@@ -2,12 +2,8 @@ import { BadgeProps } from "./types.js";
2
2
  import * as _$vue from "vue";
3
3
 
4
4
  //#region src/components/badge/badge.vue.d.ts
5
- declare var __VLS_10: {}, __VLS_18: {};
6
- type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_10) => any;
8
- } & {
9
- content?: (props: typeof __VLS_18) => any;
10
- };
5
+ declare var __VLS_12: string | number, __VLS_13: {};
6
+ type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any };
11
7
  declare const __VLS_base: _$vue.DefineComponent<BadgeProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
12
8
  "update:open": (open: boolean) => any;
13
9
  }, string, _$vue.PublicProps, Readonly<BadgeProps> & Readonly<{
@@ -1,13 +1,13 @@
1
1
  import { ThemeColor, ThemeSize } from "../../theme/types.js";
2
2
  import { BadgePosition } from "./variants.js";
3
- import { BadgeContentProps, BadgeRootEmits, BadgeRootProps, BadgeUi } from "@soybeanjs/headless/badge";
3
+ import { BadgeCompactProps, BadgeRootEmits, BadgeUi } from "@soybeanjs/headless/badge";
4
4
  import { ClassValue } from "@soybeanjs/headless/types";
5
5
 
6
6
  //#region src/components/badge/types.d.ts
7
7
  /**
8
- * Props for the badge component.
8
+ * Properties for the Badge component.
9
9
  */
10
- interface BadgeProps extends BadgeRootProps {
10
+ interface BadgeProps extends BadgeCompactProps {
11
11
  /**
12
12
  * root class
13
13
  */
@@ -28,17 +28,9 @@ interface BadgeProps extends BadgeRootProps {
28
28
  * Position.
29
29
  */
30
30
  position?: BadgePosition;
31
- /**
32
- * Content.
33
- */
34
- content?: string;
35
- /**
36
- * Props forwarded to the content element.
37
- */
38
- contentProps?: BadgeContentProps;
39
31
  }
40
32
  /**
41
- * Emits for the badge component.
33
+ * Events for the Badge component.
42
34
  */
43
35
  type BadgeEmits = BadgeRootEmits;
44
36
  //#endregion
@@ -1 +1 @@
1
- import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative inline-block`,content:`absolute flex justify-center items-center whitespace-nowrap rounded-full transform`},variants:{color:{primary:{content:`bg-primary text-primary-foreground`},destructive:{content:`bg-destructive text-destructive-foreground`},success:{content:`bg-success text-success-foreground`},warning:{content:`bg-warning text-warning-foreground`},info:{content:`bg-info text-info-foreground`},carbon:{content:`bg-carbon text-carbon-foreground`},secondary:{content:`bg-secondary text-secondary-foreground`},accent:{content:`bg-accent text-accent-foreground`}},size:{xs:{content:`min-h-2 px-1 text-4xs leading-relaxed`},sm:{content:`min-h-2.5 px-1.25 text-3xs leading-relaxed`},md:{content:`min-h-3 px-1.5 text-2xs leading-relaxed`},lg:{content:`min-h-3.5 px-1.75 text-xs leading-relaxed`},xl:{content:`min-h-4 px-2 text-sm leading-relaxed`},"2xl":{content:`min-h-5 px-2.5 text-base leading-relaxed`}},position:{"top-right":{content:`right-0 top-0 translate-x-1/2 -translate-y-1/2`},"bottom-right":{content:`right-0 bottom-0 translate-x-1/2 translate-y-1/2`},"top-left":{content:`left-0 top-0 -translate-x-1/2 -translate-y-1/2`},"bottom-left":{content:`left-0 bottom-0 -translate-x-1/2 translate-y-1/2`}}},defaultVariants:{color:`primary`,size:`md`,position:`top-right`}});export{t as badgeVariants};
1
+ import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative inline-block`,content:`absolute flex justify-center items-center leading-relaxed whitespace-nowrap rounded-full transform`},variants:{color:{primary:{content:`bg-primary text-primary-foreground`},destructive:{content:`bg-destructive text-destructive-foreground`},success:{content:`bg-success text-success-foreground`},warning:{content:`bg-warning text-warning-foreground`},info:{content:`bg-info text-info-foreground`},carbon:{content:`bg-carbon text-carbon-foreground`},secondary:{content:`bg-secondary text-secondary-foreground`},accent:{content:`bg-accent text-accent-foreground`}},size:{xs:{content:`min-h-2 px-1 text-4xs`},sm:{content:`min-h-2.5 px-1.25 text-3xs`},md:{content:`min-h-3 px-1.5 text-2xs`},lg:{content:`min-h-3.5 px-1.75 text-xs`},xl:{content:`min-h-4 px-2 text-sm`},"2xl":{content:`min-h-5 px-2.5 text-base`}},position:{"top-right":{content:`end-0 top-0 translate-x-1/2 -translate-y-1/2 rtl:-translate-x-1/2`},"bottom-right":{content:`end-0 bottom-0 translate-x-1/2 translate-y-1/2 rtl:-translate-x-1/2`},"top-left":{content:`start-0 top-0 -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2`},"bottom-left":{content:`start-0 bottom-0 -translate-x-1/2 translate-y-1/2 rtl:translate-x-1/2`}}},defaultVariants:{color:`primary`,size:`md`,position:`top-right`}});export{t as badgeVariants};
@@ -1 +1 @@
1
- import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"../drawer/variants.js";import{bottomSheetVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,defineComponent as u,guardReactiveProps as d,mergeProps as f,normalizeProps as p,openBlock as m,renderList as h,renderSlot as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{keysOf as C}from"@soybeanjs/utils";import{BottomSheetCompact as w,provideBottomSheetUi as T}from"@soybeanjs/headless/bottom-sheet";const E=u({name:`SBottomSheet`,__name:`bottom-sheet`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{},class:{},size:{},ui:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(u,{emit:E}){let D=u,O=E,k=y(),A=S(D,[`class`,`size`,`ui`]),j=x(O),M=s(()=>C(k));return T(s(()=>{let s=i({size:D.size,pure:D.pure}),c=a({size:D.size,side:`bottom`}),l=o({size:D.size});return t(e(Object.assign({},l,s,c),{cancel:r({variant:`pure`,size:n[D.size??`md`]}),confirm:r({variant:`solid`,size:n[D.size??`md`]}),close:r({variant:`ghost`,color:`accent`,size:n[D.size??`md`],shape:`square`,fitContent:!0})}),D.ui,{popup:D.class})})),(e,t)=>(m(),c(v(w),f(v(A),_(v(j))),l({_:2},[h(M.value,t=>({name:t,fn:b(n=>[g(e.$slots,t,p(d(n)))])}))]),1040))}});export{E as default};
1
+ import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{buttonVariants as r}from"../button/variants.js";import{dialogVariants as i}from"../dialog/variants.js";import{drawerVariants as a}from"../drawer/variants.js";import{bottomSheetVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,defineComponent as u,guardReactiveProps as d,mergeProps as f,normalizeProps as p,openBlock as m,renderList as h,renderSlot as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{keysOf as C}from"@soybeanjs/utils";import{BottomSheetCompact as w,provideBottomSheetUi as T}from"@soybeanjs/headless/bottom-sheet";const E=u({name:`SBottomSheet`,__name:`bottom-sheet`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean]},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},isAlert:{type:Boolean},alertType:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(u,{emit:E}){let D=u,O=E,k=y(),A=S(D,[`class`,`size`,`ui`]),j=x(O),M=s(()=>C(k));return T(s(()=>{let s=i({size:D.size,pure:D.pure}),c=a({size:D.size,side:`bottom`}),l=o({size:D.size});return t(e(Object.assign({},l,s,c),{cancel:r({variant:`pure`,size:n[D.size??`md`]}),confirm:r({variant:`solid`,size:n[D.size??`md`]}),close:r({variant:`ghost`,color:`accent`,size:n[D.size??`md`],shape:`square`,fitContent:!0})}),D.ui,{popup:D.class})})),(e,t)=>(m(),c(v(w),f(v(A),_(v(j))),l({_:2},[h(M.value,t=>({name:t,fn:b(n=>[g(e.$slots,t,p(d(n)))])}))]),1040))}});export{E as default};
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/bottom-sheet/types.d.ts
6
6
  /**
7
- * Props for the bottom sheet component.
7
+ * Properties for the BottomSheet component.
8
8
  */
9
9
  type BottomSheetProps = BottomSheetCompactProps & {
10
10
  /**
@@ -21,11 +21,11 @@ type BottomSheetProps = BottomSheetCompactProps & {
21
21
  ui?: Partial<BottomSheetUi>;
22
22
  };
23
23
  /**
24
- * Emits for the bottom sheet component.
24
+ * Events for the BottomSheet component.
25
25
  */
26
26
  type BottomSheetEmits = BottomSheetCompactEmits;
27
27
  /**
28
- * Slots for the bottom sheet component.
28
+ * Slots for the BottomSheet component.
29
29
  */
30
30
  type BottomSheetSlots = BottomSheetCompactSlots;
31
31
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{breadcrumbVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createSlots as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{keysOf as y}from"@soybeanjs/utils";import{BreadcrumbCompact as b,provideBreadcrumbUi as x}from"@soybeanjs/headless/breadcrumb";const S=o({name:`SBreadcrumb`,__name:`breadcrumb`,props:{class:{},size:{},ui:{},items:{},ellipsis:{type:[Boolean,Array,null]},listProps:{},itemProps:{},linkProps:{},pageProps:{},separatorProps:{},ellipsisProps:{}},emits:[`click`],setup(o,{emit:S}){let C=o,w=S,T=h(),E=v(C,[`class`,`size`,`ui`]),D=_(w),O=n(()=>y(T));return x(n(()=>e(t({size:C.size}),C.ui,{root:C.class}))),(e,t)=>(u(),r(m(b),c(m(E),p(m(D))),a({_:2},[d(O.value,t=>({name:t,fn:g(n=>[i(` @vue-ignore ignore vue slot props type `),f(e.$slots,t,l(s(n)))])}))]),1040))}});export{S as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{breadcrumbVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createSlots as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{keysOf as y}from"@soybeanjs/utils";import{BreadcrumbCompact as b,provideBreadcrumbUi as x}from"@soybeanjs/headless/breadcrumb";const S=o({name:`SBreadcrumb`,__name:`breadcrumb`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},items:{},ellipsis:{type:[Boolean,Array,null]},listProps:{},itemProps:{},linkProps:{},pageProps:{},separatorProps:{},ellipsisProps:{}},emits:[`click`],setup(o,{emit:S}){let C=o,w=S,T=h(),E=v(C,[`class`,`size`,`ui`]),D=_(w),O=n(()=>y(T));return x(n(()=>e(t({size:C.size}),C.ui,{root:C.class}))),(e,t)=>(u(),r(m(b),c(m(E),p(m(D))),a({_:2},[d(O.value,t=>({name:t,fn:g(n=>[i(` @vue-ignore ignore vue slot props type `),f(e.$slots,t,l(s(n)))])}))]),1040))}});export{S as default};
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/breadcrumb/types.d.ts
6
6
  /**
7
- * Props for the breadcrumb component.
7
+ * Properties for the Breadcrumb component.
8
8
  */
9
9
  interface BreadcrumbProps<T extends BreadcrumbOptionData = BreadcrumbOptionData> extends BreadcrumbCompactProps<T> {
10
10
  /**
@@ -21,11 +21,11 @@ interface BreadcrumbProps<T extends BreadcrumbOptionData = BreadcrumbOptionData>
21
21
  ui?: Partial<BreadcrumbUi>;
22
22
  }
23
23
  /**
24
- * Emits for the breadcrumb component.
24
+ * Events for the Breadcrumb component.
25
25
  */
26
26
  type BreadcrumbEmits<T extends BreadcrumbOptionData = BreadcrumbOptionData> = BreadcrumbCompactEmits<T>;
27
27
  /**
28
- * Slots for the breadcrumb component.
28
+ * Slots for the Breadcrumb component.
29
29
  */
30
30
  type BreadcrumbSlots<T extends BreadcrumbOptionData = BreadcrumbOptionData> = BreadcrumbCompactSlots<T>;
31
31
  //#endregion
@@ -1 +1 @@
1
- import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonGroupVariants as t}from"./variants.js";import{useConfigProvider as n}from"../config-provider/context.js";import"../config-provider/index.js";import{provideButtonGroupContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,mergeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{Primitive as p}from"@soybeanjs/headless/primitive";import{transformPropsToContext as m}from"@soybeanjs/headless/shared";const h=o({name:`SButtonGroup`,__name:`button-group`,props:{orientation:{default:`horizontal`},dir:{default:`ltr`},class:{},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(o){let h=o,g=f(h,[`class`,`orientation`,`color`,`size`,`variant`,`shape`,`shadow`,`disabled`]),_=n(`ButtonGroup`),v=i(()=>e(t({orientation:h.orientation}),h.class)),y=i(()=>h.dir??_.dir.value);return r(m(h,[`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`disabled`])),(e,t)=>(c(),a(u(p),s(u(g),{class:v.value,dir:y.value}),{default:d(()=>[l(e.$slots,`default`)]),_:3},16,[`class`,`dir`]))}});export{h as default};
1
+ import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonGroupVariants as t}from"./variants.js";import{useConfigProvider as n}from"../config-provider/context.js";import"../config-provider/index.js";import{provideButtonGroupContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,mergeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{Primitive as p}from"@soybeanjs/headless/primitive";import{transformPropsToContext as m}from"@soybeanjs/headless/shared";const h=o({name:`SButtonGroup`,__name:`button-group`,props:{orientation:{default:`horizontal`},dir:{default:`ltr`},class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(o){let h=o,g=f(h,[`class`,`orientation`,`color`,`size`,`variant`,`shape`,`shadow`,`disabled`]),_=n(`ButtonGroup`),v=i(()=>e(t({orientation:h.orientation}),h.class)),y=i(()=>h.dir??_.dir.value);return r(m(h,[`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`disabled`])),(e,t)=>(c(),a(u(p),s(u(g),{class:v.value,dir:y.value}),{default:d(()=>[l(e.$slots,`default`)]),_:3},16,[`class`,`dir`]))}});export{h as default};
@@ -1 +1 @@
1
- import e from"../icon/icon.js";import t from"./button.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";const f=i({name:`SButtonIcon`,__name:`button-icon`,props:{icon:{},iconClass:{},iconProps:{},class:{},color:{default:`accent`},size:{},variant:{default:`ghost`},shape:{default:`square`},shadow:{},fitContent:{type:Boolean,default:!0},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(i){let f=d(i,[`icon`,`iconClass`,`iconProps`]);return(d,p)=>(c(),n(t,s(a(l(f))),{default:u(()=>[r(e,o(i.iconProps,{icon:i.icon,class:i.iconClass}),null,16,[`icon`,`class`])]),_:1},16))}});export{f as default};
1
+ import e from"../icon/icon.js";import t from"./button.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";const f=i({name:`SButtonIcon`,__name:`button-icon`,props:{icon:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconProps:{},class:{type:[Boolean,null,String,Object,Array]},color:{default:`accent`},size:{},variant:{default:`ghost`},shape:{default:`square`},shadow:{},fitContent:{type:Boolean,default:!0},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(i){let f=d(i,[`icon`,`iconClass`,`iconProps`]);return(d,p)=>(c(),n(t,s(a(l(f))),{default:u(()=>[r(e,o(i.iconProps,{icon:i.icon,class:i.iconClass}),null,16,[`icon`,`class`])]),_:1},16))}});export{f as default};
@@ -1 +1 @@
1
- import e from"./button.js";import t from"../link/link.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f,usePickProps as p}from"@soybeanjs/headless/composables";const m=i({name:`SButtonLink`,__name:`button-link`,props:{class:{},color:{},size:{},variant:{default:`link`},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean,default:void 0},asChild:{type:Boolean},as:{},to:{},replace:{type:Boolean,default:void 0},href:{},activeClass:{},exactActiveClass:{},inactiveClass:{},prefetchedClass:{},external:{type:Boolean,default:void 0},ariaCurrentValue:{},viewTransition:{type:Boolean,default:void 0},target:{},rel:{},noRel:{type:Boolean,default:void 0},prefetch:{type:Boolean,default:void 0},prefetchOn:{},noPrefetch:{type:Boolean,default:void 0},trailingSlash:{}},setup(i){let m=i,h=[`class`,`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`],g=p(m,[...h]),_=f(m,[...h]);return(i,f)=>(c(),n(e,o(u(g),{"as-child":``}),{default:d(()=>[r(t,s(a(u(_))),{default:d(e=>[l(i.$slots,`default`,s(a(e)))]),_:3},16)]),_:3},16))}});export{m as default};
1
+ import e from"./button.js";import t from"../link/link.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f,usePickProps as p}from"@soybeanjs/headless/composables";const m=i({name:`SButtonLink`,__name:`button-link`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{default:`link`},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean,default:void 0},asChild:{type:Boolean},as:{},to:{},replace:{type:Boolean,default:void 0},href:{},activeClass:{},exactActiveClass:{},inactiveClass:{},prefetchedClass:{},external:{type:Boolean,default:void 0},ariaCurrentValue:{},viewTransition:{type:Boolean,default:void 0},target:{},rel:{},noRel:{type:Boolean,default:void 0},prefetch:{type:Boolean,default:void 0},prefetchOn:{},noPrefetch:{type:Boolean,default:void 0},trailingSlash:{}},setup(i){let m=i,h=[`class`,`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`],g=p(m,[...h]),_=f(m,[...h]);return(i,f)=>(c(),n(e,o(u(g),{"as-child":``}),{default:d(()=>[r(t,s(a(u(_))),{default:d(e=>[l(i.$slots,`default`,s(a(e)))]),_:3},16)]),_:3},16))}});export{m as default};
@@ -12,8 +12,8 @@ type __VLS_Slots = {} & {
12
12
  default?: (props: typeof __VLS_14) => any;
13
13
  };
14
14
  declare const __VLS_base: _$vue.DefineComponent<ButtonLinkProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ButtonLinkProps> & Readonly<{}>, {
15
- disabled: boolean;
16
15
  variant: ButtonVariant;
16
+ disabled: boolean;
17
17
  replace: boolean;
18
18
  external: boolean;
19
19
  viewTransition: boolean;
@@ -1 +1 @@
1
- import e from"../icon/icon.js";import t from"./button.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createElementVNode as o,createVNode as s,defineComponent as c,mergeProps as l,openBlock as u,ref as d,renderSlot as f,toDisplayString as p,unref as m,useAttrs as h,watchEffect as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";const y={key:0,style:{display:`contents`}},b={style:{position:`absolute`,inset:`0`,"justify-content":`center`,"align-items":`center`,display:`flex`,gap:`0.25rem`,"z-index":`1`}},x={key:0},S={style:{visibility:`hidden`,display:`contents`}},C=c({name:`SButtonLoading`,inheritAttrs:!1,__name:`button-loading`,props:{loading:{type:Boolean},loadingText:{},loadingDuration:{},autoLoading:{type:Boolean},loadingIcon:{default:`svg-spinners:270-ring`},loadingIconProps:{},loadingPosition:{default:`start`},class:{},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(c){let C=c,w=h(),T=d(!1),E=n(()=>C.disabled||T.value),D=async e=>{C.autoLoading&&(T.value=!0);try{(Array.isArray(w.onClick)?w.onClick:[w.onClick]).forEach(t=>t?.(e))}finally{C.autoLoading&&(C.loadingDuration&&await new Promise(e=>{setTimeout(e,C.loadingDuration)}),T.value=!1)}},O=v(C,[`loading`,`loadingText`,`loadingDuration`,`autoLoading`,`loadingIcon`,`loadingIconProps`,`loadingPosition`],w,{onClick:D});return g(()=>{T.value=C.loading}),(n,d)=>(u(),r(t,l(m(O),{disabled:E.value,style:{position:`relative`},onClick:D}),{leading:_(()=>[T.value&&c.loadingPosition===`start`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`leading`,{key:1})]),trailing:_(()=>[T.value&&c.loadingPosition===`end`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`trailing`,{key:1})]),default:_(()=>[T.value&&c.loadingPosition===`center`?(u(),a(`span`,y,[o(`span`,b,[s(e,l({icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`]),c.loadingText?(u(),a(`span`,x,p(c.loadingText),1)):i(`v-if`,!0)]),o(`span`,S,[f(n.$slots,`default`,{loading:T.value})])])):f(n.$slots,`default`,{key:1,loading:T.value})]),_:3},16,[`disabled`]))}});export{C as default};
1
+ import e from"../icon/icon.js";import t from"./button.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createElementVNode as o,createVNode as s,defineComponent as c,mergeProps as l,openBlock as u,ref as d,renderSlot as f,toDisplayString as p,unref as m,useAttrs as h,watchEffect as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";const y={key:0,style:{display:`contents`}},b={style:{position:`absolute`,inset:`0`,"justify-content":`center`,"align-items":`center`,display:`flex`,gap:`0.25rem`,"z-index":`1`}},x={key:0},S={style:{visibility:`hidden`,display:`contents`}},C=c({name:`SButtonLoading`,inheritAttrs:!1,__name:`button-loading`,props:{loading:{type:Boolean},loadingText:{},loadingDuration:{},autoLoading:{type:Boolean},loadingIcon:{default:`svg-spinners:270-ring`},loadingIconProps:{},loadingPosition:{default:`start`},class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(c){let C=c,w=h(),T=d(!1),E=n(()=>C.disabled||T.value),D=async e=>{C.autoLoading&&(T.value=!0);try{(Array.isArray(w.onClick)?w.onClick:[w.onClick]).forEach(t=>t?.(e))}finally{C.autoLoading&&(C.loadingDuration&&await new Promise(e=>{setTimeout(e,C.loadingDuration)}),T.value=!1)}},O=v(C,[`loading`,`loadingText`,`loadingDuration`,`autoLoading`,`loadingIcon`,`loadingIconProps`,`loadingPosition`],w,{onClick:D});return g(()=>{T.value=C.loading}),(n,d)=>(u(),r(t,l(m(O),{disabled:E.value,style:{position:`relative`},onClick:D}),{leading:_(()=>[T.value&&c.loadingPosition===`start`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`leading`,{key:1})]),trailing:_(()=>[T.value&&c.loadingPosition===`end`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`trailing`,{key:1})]),default:_(()=>[T.value&&c.loadingPosition===`center`?(u(),a(`span`,y,[o(`span`,b,[s(e,l({icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`]),c.loadingText?(u(),a(`span`,x,p(c.loadingText),1)):i(`v-if`,!0)]),o(`span`,S,[f(n.$slots,`default`,{loading:T.value})])])):f(n.$slots,`default`,{key:1,loading:T.value})]),_:3},16,[`disabled`]))}});export{C as default};