@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
@@ -4,47 +4,47 @@ import { AcceptableBooleanValue, DefinedValue } from "@soybeanjs/headless/types"
4
4
 
5
5
  //#region src/components/dropdown-menu/types.d.ts
6
6
  /**
7
- * Props for the dropdown menu wrapper component.
7
+ * Properties for the DropdownMenuWrapper component.
8
8
  */
9
9
  interface DropdownMenuWrapperProps extends MenuUiBaseProps, DropdownMenuWrapperCompactProps {}
10
10
  /**
11
- * Emits for the dropdown menu wrapper component.
11
+ * Events for the DropdownMenuWrapper component.
12
12
  */
13
13
  type DropdownMenuWrapperEmits = DropdownMenuWrapperCompactEmits;
14
14
  /**
15
- * Props for the dropdown menu component.
15
+ * Properties for the DropdownMenu component.
16
16
  */
17
17
  type DropdownMenuProps<T extends DefinedValue = DefinedValue> = Omit<MenuUiBaseProps, 'indicatorPosition'> & DropdownMenuCompactProps<T>;
18
18
  /**
19
- * Emits for the dropdown menu component.
19
+ * Events for the DropdownMenu component.
20
20
  */
21
21
  type DropdownMenuEmits<T extends DefinedValue = DefinedValue> = DropdownMenuCompactEmits<T>;
22
22
  /**
23
- * Slots for the dropdown menu component.
23
+ * Slots for the DropdownMenu component.
24
24
  */
25
25
  type DropdownMenuSlots<T extends DefinedValue = DefinedValue> = DropdownMenuCompactSlots<T>;
26
26
  /**
27
- * Props for the dropdown menu checkbox component.
27
+ * Properties for the DropdownMenuCheckbox component.
28
28
  */
29
29
  type DropdownMenuCheckboxProps<T extends DefinedValue = DefinedValue> = MenuUiBaseProps & DropdownMenuCheckboxCompactProps<T>;
30
30
  /**
31
- * Emits for the dropdown menu checkbox component.
31
+ * Events for the DropdownMenuCheckbox component.
32
32
  */
33
33
  type DropdownMenuCheckboxEmits<T extends DefinedValue = DefinedValue> = DropdownMenuCheckboxCompactEmits<T>;
34
34
  /**
35
- * Slots for the dropdown menu checkbox component.
35
+ * Slots for the DropdownMenuCheckbox component.
36
36
  */
37
37
  type DropdownMenuCheckboxSlots<T extends DefinedValue = DefinedValue> = DropdownMenuCheckboxCompactSlots<T>;
38
38
  /**
39
- * Props for the dropdown menu radio component.
39
+ * Properties for the DropdownMenuRadio component.
40
40
  */
41
41
  type DropdownMenuRadioProps<T extends AcceptableBooleanValue = AcceptableBooleanValue> = MenuUiBaseProps & DropdownMenuRadioCompactProps<T>;
42
42
  /**
43
- * Emits for the dropdown menu radio component.
43
+ * Events for the DropdownMenuRadio component.
44
44
  */
45
45
  type DropdownMenuRadioEmits<T extends AcceptableBooleanValue = AcceptableBooleanValue> = DropdownMenuRadioCompactEmits<T>;
46
46
  /**
47
- * Slots for the dropdown menu radio component.
47
+ * Slots for the DropdownMenuRadio component.
48
48
  */
49
49
  type DropdownMenuRadioSlots<T extends AcceptableBooleanValue = AcceptableBooleanValue> = DropdownMenuRadioCompactSlots<T>;
50
50
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{editableVariants as n}from"./variants.js";import{computed as r,createBlock as i,createElementVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeClass as u,normalizeProps as d,openBlock as f,renderSlot as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{EditableArea as y,EditableCancelTrigger as b,EditableEditTrigger as x,EditableInput as S,EditablePreview as C,EditableRoot as w,EditableSubmitTrigger as T,provideEditableUi as E}from"@soybeanjs/headless/editable";const D=s({name:`SEditable`,__name:`editable`,props:{class:{},size:{},ui:{},areaProps:{},previewProps:{},inputProps:{},editTriggerProps:{},submitTriggerProps:{},cancelTriggerProps:{},defaultValue:{},modelValue:{},placeholder:{},dir:{},disabled:{type:Boolean},readonly:{type:Boolean},activationMode:{},selectOnFocus:{type:Boolean},submitMode:{},startWithEditMode:{type:Boolean},maxLength:{},autoResize:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`submit`,`update:state`],setup(s,{emit:D}){let O=s,k=D,A=v(O,[`class`,`size`,`ui`,`areaProps`,`previewProps`,`inputProps`,`editTriggerProps`,`submitTriggerProps`,`cancelTriggerProps`]),j=_(k),M=r(()=>e(n({size:O.size}),O.ui,{root:O.class}));return E(M),(e,n)=>(f(),i(h(w),l(h(A),m(h(j))),{default:g(n=>[p(e.$slots,`default`,d(c(n)),()=>[o(h(y),d(c(s.areaProps)),{default:g(()=>[p(e.$slots,`preview`,d(c(n)),()=>[o(h(C),d(c(s.previewProps)),null,16)]),p(e.$slots,`input`,d(c(n)),()=>[o(h(S),d(c(s.inputProps)),null,16)]),a(`div`,{class:u(M.value.controls)},[p(e.$slots,`edit-trigger`,d(c(n)),()=>[o(h(x),d(c(s.editTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:pencil-line`,"aria-hidden":!0})]),_:1},16)]),p(e.$slots,`submit-trigger`,d(c(n)),()=>[o(h(T),d(c(s.submitTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:check`,"aria-hidden":!0})]),_:1},16)]),p(e.$slots,`cancel-trigger`,d(c(n)),()=>[o(h(b),d(c(s.cancelTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:x`,"aria-hidden":!0})]),_:1},16)])],2)]),_:2},1040)])]),_:3},16))}});export{D as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{editableVariants as n}from"./variants.js";import{computed as r,createBlock as i,createElementVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeClass as u,normalizeProps as d,openBlock as f,renderSlot as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{EditableArea as y,EditableCancelTrigger as b,EditableEditTrigger as x,EditableInput as S,EditablePreview as C,EditableRoot as w,EditableSubmitTrigger as T,provideEditableUi as E}from"@soybeanjs/headless/editable";const D=s({name:`SEditable`,__name:`editable`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},areaProps:{},previewProps:{},inputProps:{},editTriggerProps:{},submitTriggerProps:{},cancelTriggerProps:{},defaultValue:{},modelValue:{},placeholder:{},dir:{},disabled:{type:Boolean},readonly:{type:Boolean},activationMode:{},selectOnFocus:{type:Boolean},submitMode:{},startWithEditMode:{type:Boolean},maxLength:{},autoResize:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`submit`,`update:state`],setup(s,{emit:D}){let O=s,k=D,A=v(O,[`class`,`size`,`ui`,`areaProps`,`previewProps`,`inputProps`,`editTriggerProps`,`submitTriggerProps`,`cancelTriggerProps`]),j=_(k),M=r(()=>e(n({size:O.size}),O.ui,{root:O.class}));return E(M),(e,n)=>(f(),i(h(w),l(h(A),m(h(j))),{default:g(n=>[p(e.$slots,`default`,d(c(n)),()=>[o(h(y),d(c(s.areaProps)),{default:g(()=>[p(e.$slots,`preview`,d(c(n)),()=>[o(h(C),d(c(s.previewProps)),null,16)]),p(e.$slots,`input`,d(c(n)),()=>[o(h(S),d(c(s.inputProps)),null,16)]),a(`div`,{class:u(M.value.controls)},[p(e.$slots,`edit-trigger`,d(c(n)),()=>[o(h(x),d(c(s.editTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:pencil-line`,"aria-hidden":!0})]),_:1},16)]),p(e.$slots,`submit-trigger`,d(c(n)),()=>[o(h(T),d(c(s.submitTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:check`,"aria-hidden":!0})]),_:1},16)]),p(e.$slots,`cancel-trigger`,d(c(n)),()=>[o(h(b),d(c(s.cancelTriggerProps)),{default:g(()=>[o(t,{icon:`lucide:x`,"aria-hidden":!0})]),_:1},16)])],2)]),_:2},1040)])]),_:3},16))}});export{D as default};
@@ -8,11 +8,11 @@ import { ClassValue, UiClass } from "@soybeanjs/headless/types";
8
8
  */
9
9
  type EditableExtraUiSlot = 'controls';
10
10
  /**
11
- * Extended UI class overrides for the editable component.
11
+ * Extended UI class overrides for the Editable component.
12
12
  */
13
13
  type EditableExtendedUi = UiClass<EditableUiSlot | EditableExtraUiSlot>;
14
14
  /**
15
- * Props for the editable component.
15
+ * Properties for the Editable component.
16
16
  */
17
17
  interface EditableProps extends EditableRootProps {
18
18
  /**
@@ -28,32 +28,32 @@ interface EditableProps extends EditableRootProps {
28
28
  */
29
29
  ui?: Partial<EditableExtendedUi>;
30
30
  /**
31
- * Props forwarded to the area element.
31
+ * Properties forwarded to the area element.
32
32
  */
33
33
  areaProps?: EditableAreaProps;
34
34
  /**
35
- * Props forwarded to the preview element.
35
+ * Properties forwarded to the preview element.
36
36
  */
37
37
  previewProps?: EditablePreviewProps;
38
38
  /**
39
- * Props forwarded to the input element.
39
+ * Properties forwarded to the input element.
40
40
  */
41
41
  inputProps?: EditableInputProps;
42
42
  /**
43
- * Props forwarded to the edit trigger element.
43
+ * Properties forwarded to the edit trigger element.
44
44
  */
45
45
  editTriggerProps?: EditableEditTriggerProps;
46
46
  /**
47
- * Props forwarded to the submit trigger element.
47
+ * Properties forwarded to the submit trigger element.
48
48
  */
49
49
  submitTriggerProps?: EditableSubmitTriggerProps;
50
50
  /**
51
- * Props forwarded to the cancel trigger element.
51
+ * Properties forwarded to the cancel trigger element.
52
52
  */
53
53
  cancelTriggerProps?: EditableCancelTriggerProps;
54
54
  }
55
55
  /**
56
- * Emits for the editable component.
56
+ * Events for the Editable component.
57
57
  */
58
58
  type EditableEmits = EditableRootEmits;
59
59
  //#endregion
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{emptyVariants as n}from"./variants.js";import{computed as r,createBlock as i,createCommentVNode as a,createTextVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderSlot as p,toDisplayString as m,unref as h,useSlots as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{EmptyContent as y,EmptyDescription as b,EmptyHeader as x,EmptyMedia as S,EmptyRoot as C,EmptyTitle as w,provideEmptyUi as T}from"@soybeanjs/headless/empty";const E=c({name:`SEmpty`,__name:`empty`,props:{class:{},ui:{},title:{},description:{},icon:{},mediaVariant:{},headerProps:{},mediaProps:{},contentProps:{},titleProps:{},descriptionProps:{}},setup(c){let E=c,D=v(E,[`class`,`ui`,`title`,`description`,`icon`,`mediaVariant`,`headerProps`,`mediaProps`,`contentProps`,`titleProps`,`descriptionProps`]),O=g(),k=r(()=>!!(O.title||O.description||E.title||E.description)),A=r(()=>!!(O.media||E.icon));return T(r(()=>e(n({mediaVariant:E.mediaVariant}),E.ui,{root:E.class}))),(e,n)=>(f(),i(h(C),d(l(h(D))),{default:_(()=>[A.value?(f(),i(h(S),d(u({key:0},c.mediaProps)),{default:_(()=>[p(e.$slots,`media`,{},()=>[s(t,{icon:c.icon},null,8,[`icon`])])]),_:3},16)):a(`v-if`,!0),s(h(y),d(l(c.contentProps)),{default:_(()=>[k.value?(f(),i(h(x),d(u({key:0},c.headerProps)),{default:_(()=>[O.title||c.title?(f(),i(h(w),d(u({key:0},c.titleProps)),{default:_(()=>[p(e.$slots,`title`,{},()=>[o(m(c.title),1)])]),_:3},16)):a(`v-if`,!0),O.description||c.description?(f(),i(h(b),d(u({key:1},c.descriptionProps)),{default:_(()=>[p(e.$slots,`description`,{},()=>[o(m(c.description),1)])]),_:3},16)):a(`v-if`,!0)]),_:3},16)):a(`v-if`,!0),p(e.$slots,`default`)]),_:3},16)]),_:3},16))}});export{E as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{emptyVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderList as l,renderSlot as u,unref as d,useSlots as f,withCtx as p}from"vue";import{useOmitProps as m}from"@soybeanjs/headless/composables";import{keysOf as h}from"@soybeanjs/utils";import{EmptyCompact as g,provideEmptyUi as _}from"@soybeanjs/headless/empty";const v=a({name:`SEmpty`,__name:`empty`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},size:{},title:{},description:{},icon:{},headerProps:{},mediaProps:{},contentProps:{},titleProps:{},descriptionProps:{}},setup(a){let v=a,y=m(v,[`class`,`ui`,`size`]),b=f(),x=n(()=>h(b));return _(n(()=>e(t({size:v.size}),v.ui,{root:v.class}))),(e,t)=>(c(),r(d(g),s(o(d(y))),i({_:2},[l(x.value,t=>({name:t,fn:p(()=>[u(e.$slots,t)])}))]),1040))}});export{v as default};
@@ -1,14 +1,8 @@
1
- import { EmptyProps } from "./types.js";
1
+ import { EmptyProps, EmptySlots } from "./types.js";
2
2
  import * as _$vue from "vue";
3
3
 
4
4
  //#region src/components/empty/empty.vue.d.ts
5
- type Slots = {
6
- default?: () => any;
7
- media?: () => any;
8
- title?: () => any;
9
- description?: () => any;
10
- };
11
- type __VLS_Slots = Slots;
5
+ type __VLS_Slots = EmptySlots;
12
6
  declare const __VLS_base: _$vue.DefineComponent<EmptyProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<EmptyProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
13
7
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
8
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,3 @@
1
- import { EmptyMediaVariant } from "./variants.js";
2
- import { EmptyProps } from "./types.js";
1
+ import { EmptyProps, EmptySlots } from "./types.js";
3
2
  import { _default } from "./empty.vue.js";
4
3
  export * from "@soybeanjs/headless/empty";
@@ -1,13 +1,12 @@
1
- import { IconValue } from "../icon/types.js";
2
- import { EmptyMediaVariant } from "./variants.js";
3
- import { EmptyContentProps, EmptyDescriptionProps, EmptyHeaderProps, EmptyMediaProps, EmptyRootProps, EmptyTitleProps, EmptyUi } from "@soybeanjs/headless/empty";
1
+ import { ThemeSize } from "../../theme/types.js";
2
+ import { EmptyCompactProps, EmptyCompactSlots, EmptyUi } from "@soybeanjs/headless/empty";
4
3
  import { ClassValue } from "@soybeanjs/headless/types";
5
4
 
6
5
  //#region src/components/empty/types.d.ts
7
6
  /**
8
- * Props for the empty component.
7
+ * Properties for the Empty component.
9
8
  */
10
- interface EmptyProps extends EmptyRootProps {
9
+ interface EmptyProps extends EmptyCompactProps {
11
10
  /**
12
11
  * Additional class names applied to the root element.
13
12
  */
@@ -17,41 +16,13 @@ interface EmptyProps extends EmptyRootProps {
17
16
  */
18
17
  ui?: Partial<EmptyUi>;
19
18
  /**
20
- * Title text rendered by the component.
19
+ * Size variant of the component.
21
20
  */
22
- title?: string;
23
- /**
24
- * Description text rendered by the component.
25
- */
26
- description?: string;
27
- /**
28
- * Icon rendered by the component.
29
- */
30
- icon?: IconValue;
31
- /**
32
- * Media variant.
33
- */
34
- mediaVariant?: EmptyMediaVariant;
35
- /**
36
- * Props forwarded to the header element.
37
- */
38
- headerProps?: EmptyHeaderProps;
39
- /**
40
- * Props forwarded to the media element.
41
- */
42
- mediaProps?: EmptyMediaProps;
43
- /**
44
- * Props forwarded to the content element.
45
- */
46
- contentProps?: EmptyContentProps;
47
- /**
48
- * Props forwarded to the title element.
49
- */
50
- titleProps?: EmptyTitleProps;
51
- /**
52
- * Props forwarded to the description element.
53
- */
54
- descriptionProps?: EmptyDescriptionProps;
21
+ size?: ThemeSize;
55
22
  }
23
+ /**
24
+ * Slots for the Empty component.
25
+ */
26
+ type EmptySlots = EmptyCompactSlots;
56
27
  //#endregion
57
- export { EmptyProps };
28
+ export { EmptyProps, EmptySlots };
@@ -1 +1 @@
1
- import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border border-dashed text-center p-12 lt-md:p-6`,header:`flex max-w-sm flex-col items-center gap-2 text-center`,media:`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,content:`flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm`,title:`m-0 text-lg font-medium tracking-tight`,description:`m-0 text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`},variants:{mediaVariant:{default:{media:`bg-transparent`},icon:{media:`size-10 rounded-lg bg-muted text-foreground [&_svg:not([class*=size-])]:size-6`}}},defaultVariants:{mediaVariant:`default`}});export{t as emptyVariants};
1
+ import{tv as e}from"tailwind-variants";const t=e({slots:{root:`flex flex-col items-center justify-center min-w-0 grow rounded-md border border-dashed text-center`,header:`flex flex-col items-center max-w-sm text-center`,media:`flex shrink-0 items-center justify-center rounded-md bg-muted text-foreground`,title:`font-medium tracking-tight`,description:`leading-relaxed text-muted-foreground`,content:`flex w-full min-w-0 max-w-sm flex-col items-center`},variants:{size:{xs:{root:`text-2xs gap-3`,title:`text-xs`,header:`gap-1.5`,media:`mb-1.5`},sm:{root:`text-xs gap-3.5`,title:`text-sm`,header:`gap-1.75`,media:`mb-1.75`},md:{root:`text-sm gap-4`,title:`text-base`,header:`gap-2`,media:`mb-2 size-10`},lg:{root:`text-base gap-4.5`,title:`text-lg`,header:`gap-2.5`,media:`mb-2.5`},xl:{root:`text-lg gap-5`,title:`text-xl`,header:`gap-3`,media:`mb-3`},"2xl":{root:`text-xl gap-6`,title:`text-2xl`,header:`gap-3.5`,media:`mb-3.5`}}},defaultVariants:{size:`md`}});export{t as emptyVariants};
@@ -0,0 +1 @@
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderList as l,renderSlot as u,unref as d,useSlots as f,withCtx as p}from"vue";import{useOmitProps as m}from"@soybeanjs/headless/composables";import{keysOf as h}from"@soybeanjs/utils";import{FormFieldArrayCompact as g,provideFormFieldUi as _}from"@soybeanjs/headless/form";const v=a({name:`SFormFieldArray`,__name:`form-field-array`,props:{name:{},orientation:{},label:{},description:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{},validate:{type:Function},reset:{type:Function},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},setup(a){let v=a,y=f(),b=m(v,[`class`,`ui`,`size`]),x=n(()=>h(y));return _(n(()=>e(t({size:v.size}),v.ui,{field:v.class}))),(e,t)=>(c(),r(d(g),s(o(d(b))),i({_:2},[l(x.value,t=>({name:t,fn:p(n=>[u(e.$slots,t,s(o(n)))])}))]),1040))}});export{v as default};
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{useFormContext as n}from"./context.js";import{computed as r,createBlock as i,createCommentVNode as a,createTextVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toDisplayString as p,unref as m,useSlots as h,withCtx as g,withDirectives as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{FormControl as y,FormDescription as b,FormError as x,FormField as S,FormLabel as C,provideFormFieldUi as w}from"@soybeanjs/headless/form";import{vAutoAnimate as T}from"@formkit/auto-animate";const E=s({name:`SFormFieldBase`,__name:`form-field-base`,props:{class:{},size:{},ui:{},inline:{type:Boolean,default:void 0},label:{},description:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{},error:{},isFieldArray:{type:Boolean}},setup(s){let E=s,D=h(),O=v(E,[`class`,`size`,`ui`,`inline`,`label`,`description`,`labelProps`,`descriptionProps`,`errorProps`]),k=n(`FormField`),A=r(()=>E.size??k.size.value),j=r(()=>e(t({size:A.value,inline:E.inline??k.inline.value}),k.ui.value,E.ui,{field:E.isFieldArray?void 0:E.class,fieldArray:E.isFieldArray?E.class:void 0})),M=r(()=>({...k.labelProps.value,...E.labelProps})),N=r(()=>({...k.controlProps.value,...E.controlProps})),P=r(()=>({...k.descriptionProps.value,...E.descriptionProps})),F=r(()=>({...k.errorProps.value,...E.errorProps}));return w(j),(e,t)=>(d(),i(m(S),u(c(m(O))),{default:g(t=>[m(D).label||s.label?(d(),i(m(C),u(l({key:0},M.value)),{default:g(()=>[f(e.$slots,`label`,{},()=>[o(p(s.label),1)])]),_:3},16)):a(`v-if`,!0),_((d(),i(m(y),u(c(N.value)),{default:g(()=>[f(e.$slots,`default`,u(c(t))),s.error?(d(),i(m(x),u(l({key:0},F.value)),{default:g(()=>[o(p(s.error),1)]),_:1},16)):a(`v-if`,!0)]),_:2},1040)),[[m(T)]]),m(D).description||s.description?(d(),i(m(b),u(l({key:1},P.value)),{default:g(()=>[f(e.$slots,`description`,{},()=>[o(p(s.description),1)])]),_:3},16)):a(`v-if`,!0)]),_:3},16))}});export{E as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderList as l,renderSlot as u,unref as d,useSlots as f,withCtx as p}from"vue";import{useOmitProps as m}from"@soybeanjs/headless/composables";import{keysOf as h}from"@soybeanjs/utils";import{FormFieldBaseCompact as g,provideFormFieldUi as _}from"@soybeanjs/headless/form";const v=a({name:`SFormFieldBase`,__name:`form-field-base`,props:{error:{},isFieldArray:{type:Boolean},orientation:{},label:{},description:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},setup(a){let v=a,y=f(),b=m(v,[`class`,`ui`,`size`]),x=n(()=>h(y));return _(n(()=>e(t({size:v.size}),v.ui,{field:v.class}))),(e,t)=>(c(),r(d(g),s(o(d(b))),i({_:2},[l(x.value,t=>({name:t,fn:p(()=>[u(e.$slots,t)])}))]),1040))}});export{v as default};
@@ -1,22 +1,9 @@
1
- import { FormFieldBaseProps } from "./types.js";
1
+ import { FormFieldBaseProps, FormFieldBaseSlots } from "./types.js";
2
2
  import * as _$vue from "vue";
3
3
 
4
4
  //#region src/components/form/form-field-base.vue.d.ts
5
- declare var __VLS_14: {}, __VLS_22: {
6
- formFieldId: string;
7
- ariaDescribedBy: string;
8
- ariaInvalid: boolean;
9
- }, __VLS_36: {};
10
- type __VLS_Slots = {} & {
11
- label?: (props: typeof __VLS_14) => any;
12
- } & {
13
- default?: (props: typeof __VLS_22) => any;
14
- } & {
15
- description?: (props: typeof __VLS_36) => any;
16
- };
17
- declare const __VLS_base: _$vue.DefineComponent<FormFieldBaseProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<FormFieldBaseProps> & Readonly<{}>, {
18
- inline: boolean;
19
- }, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
5
+ type __VLS_Slots = FormFieldBaseSlots;
6
+ declare const __VLS_base: _$vue.DefineComponent<FormFieldBaseProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<FormFieldBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
20
7
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
8
  declare const _default: typeof __VLS_export;
22
9
  type __VLS_WithSlots<T, S> = T & {
@@ -0,0 +1 @@
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderList as l,renderSlot as u,unref as d,useSlots as f,withCtx as p}from"vue";import{useOmitProps as m}from"@soybeanjs/headless/composables";import{keysOf as h}from"@soybeanjs/utils";import{FormFieldCompact as g,provideFormFieldUi as _}from"@soybeanjs/headless/form";const v=a({name:`SFormField`,__name:`form-field`,props:{name:{},orientation:{},label:{},description:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{},validate:{type:Function},reset:{type:Function},class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{}},setup(a){let v=a,y=f(),b=m(v,[`class`,`ui`,`size`]),x=n(()=>h(y));return _(n(()=>e(t({size:v.size}),v.ui,{field:v.class}))),(e,t)=>(c(),r(d(g),s(o(d(b))),i({_:2},[l(x.value,t=>({name:t,fn:p(n=>[u(e.$slots,t,s(o(n)))])}))]),1040))}});export{v as default};
@@ -1 +1 @@
1
- import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{provideFormContext as n}from"./context.js";import{computed as r,createElementBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c}from"vue";import{transformPropsToContext as l}from"@soybeanjs/headless/shared";const u=[`data-inline`],d=a({name:`SForm`,__name:`form`,props:{class:{},size:{},ui:{},inline:{type:Boolean},fieldProps:{},fieldArrayProps:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{}},setup(a){let d=a,f=r(()=>{let{form:n}=t({size:d.size});return e(n(),d.class)});return n(l(d)),(e,t)=>(s(),i(`form`,{"data-inline":a.inline?``:void 0,class:o(f.value)},[c(e.$slots,`default`)],10,u))}});export{d as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{formVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,guardReactiveProps as a,normalizeProps as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";import{FormCompact as f,provideFormUi as p}from"@soybeanjs/headless/form";const m=i({name:`SForm`,__name:`form`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},fieldProps:{},fieldArrayProps:{},orientation:{},labelProps:{},controlProps:{},descriptionProps:{},errorProps:{}},setup(i){let m=i,h=d(m,[`ui`,`class`,`size`]);return p(n(()=>e(t({size:m.size}),m.ui,{form:m.class}))),(e,t)=>(s(),r(l(f),o(a(l(h))),{default:u(()=>[c(e.$slots,`default`)]),_:3},16))}});export{m as default};
@@ -2,9 +2,9 @@ import { FormProps } from "./types.js";
2
2
  import * as _$vue from "vue";
3
3
 
4
4
  //#region src/components/form/form.vue.d.ts
5
- declare var __VLS_1: {};
5
+ declare var __VLS_8: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_1) => any;
7
+ default?: (props: typeof __VLS_8) => any;
8
8
  };
9
9
  declare const __VLS_base: _$vue.DefineComponent<FormProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<FormProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import { FormFieldBaseProps, FormProps } from "./types.js";
1
+ import { FormProps } from "./types.js";
2
2
  import { _default } from "./form.vue.js";
3
3
  import { _default as _default$1 } from "./form-field-base.vue.js";
4
4
  import { useForm } from "./use-form.js";
@@ -1,15 +1,11 @@
1
1
  import { ThemeSize } from "../../theme/types.js";
2
- import { ComponentOptionsMixin, CreateComponentPublicInstanceWithMixins, EmitsOptions, FormHTMLAttributes, PublicProps, SlotsType } from "vue";
3
- import { FormControlProps, FormDescriptionProps, FormErrorProps, FormFieldArrayStates, FormFieldProps, FormFieldState, FormFieldUi, FormLabelProps, FormRegisterOptions, FormValues } from "@soybeanjs/headless/form";
4
- import { ClassValue, Path, PathValue, PropsToContext } from "@soybeanjs/headless/types";
2
+ import { FormCompactProps, FormFieldArrayComponent, FormFieldBaseCompactProps, FormFieldBaseCompactSlots, FormFieldComponent, FormFieldUi, FormUi, FormValues, UseHeadlessFormOptions as UseFormOptions, UseHeadlessFormReturn } from "@soybeanjs/headless/form";
3
+ import { ClassValue } from "@soybeanjs/headless/types";
5
4
 
6
5
  //#region src/components/form/types.d.ts
7
- /**
8
- * Props for the form field base component.
9
- */
10
- interface FormFieldBaseProps extends Omit<FormFieldProps, 'class'> {
6
+ interface FormProps extends FormCompactProps {
11
7
  /**
12
- * Additional class names applied to the root element.
8
+ * Additional class names applied to the form element.
13
9
  */
14
10
  class?: ClassValue;
15
11
  /**
@@ -19,95 +15,12 @@ interface FormFieldBaseProps extends Omit<FormFieldProps, 'class'> {
19
15
  /**
20
16
  * Per-slot class overrides for the component.
21
17
  */
22
- ui?: Partial<FormFieldUi>;
23
- /**
24
- * Whether the label is inline with the control.
25
- */
26
- inline?: boolean;
27
- /**
28
- * Label text rendered by the component.
29
- */
30
- label?: string;
31
- /**
32
- * Description text rendered by the component.
33
- */
34
- description?: string;
35
- /**
36
- * Props forwarded to the label element.
37
- */
38
- labelProps?: FormLabelProps;
39
- /**
40
- * Props forwarded to the control element.
41
- */
42
- controlProps?: FormControlProps;
43
- /**
44
- * Props forwarded to the description element.
45
- */
46
- descriptionProps?: FormDescriptionProps;
47
- /**
48
- * Props forwarded to the error element.
49
- */
50
- errorProps?: FormErrorProps;
51
- }
52
- /**
53
- * Props for the form field component.
54
- */
55
- interface FormFieldProps$1<Values extends FormValues, Name extends Path<Values>> extends Omit<FormFieldBaseProps, 'error' | 'fieldArray'>, FormRegisterOptions<PathValue<Values, Name>> {
56
- /**
57
- * Name.
58
- */
59
- name: Name;
18
+ ui?: Partial<FormUi>;
60
19
  }
61
20
  /**
62
- * Slots for the form field component.
63
- */
64
- type FormFieldSlots<Values extends FormValues, Name extends Path<Values>> = SlotsType<{
65
- /**
66
- * Custom content for the default slot.
67
- */
68
- default: (props: FormFieldState<Values, Name>) => any;
69
- /**
70
- * Custom content for the label slot.
71
- */
72
- label: (props: FormFieldState<Values, Name>) => any;
73
- /**
74
- * Custom content for the description slot.
75
- */
76
- description: (props: FormFieldState<Values, Name>) => any;
77
- }>;
78
- /**
79
- * Type information for the form field component component.
80
- */
81
- type FormFieldComponent<Values extends FormValues> = new <Name extends Path<Values>>(props: FormFieldProps$1<Values, Name> & PublicProps) => CreateComponentPublicInstanceWithMixins<FormFieldProps$1<Values, Name>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, PublicProps, {}, false, {}, FormFieldSlots<Values, Name>>;
82
- /**
83
- * Props for the form field array component.
84
- */
85
- type FormFieldArrayProps<Values extends FormValues, Name extends Path<Values>> = FormFieldProps$1<Values, Name>;
86
- /**
87
- * Slots for the form field array component.
88
- */
89
- type FormFieldArraySlots<Values extends FormValues, Name extends Path<Values>> = SlotsType<{
90
- /**
91
- * Custom content for the default slot.
92
- */
93
- default: (props: FormFieldArrayStates<Values, Name>) => any;
94
- /**
95
- * Custom content for the label slot.
96
- */
97
- label: (props: FormFieldArrayStates<Values, Name>) => any;
98
- /**
99
- * Custom content for the description slot.
100
- */
101
- description: (props: FormFieldArrayStates<Values, Name>) => any;
102
- }>;
103
- /**
104
- * Type information for the form field array component component.
105
- */
106
- type FormFieldArrayComponent<Values extends FormValues> = new <Name extends Path<Values>>(props: FormFieldArrayProps<Values, Name> & PublicProps) => CreateComponentPublicInstanceWithMixins<FormFieldArrayProps<Values, Name>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, PublicProps, {}, false, {}, FormFieldArraySlots<Values, Name>>;
107
- /**
108
- * Props for the form component.
21
+ * Additional properties for form field components, including styling and UI customization options.
109
22
  */
110
- interface FormProps extends /** @vue-ignore */FormHTMLAttributes {
23
+ interface FormFieldExtraProps {
111
24
  /**
112
25
  * Additional class names applied to the root element.
113
26
  */
@@ -120,34 +33,18 @@ interface FormProps extends /** @vue-ignore */FormHTMLAttributes {
120
33
  * Per-slot class overrides for the component.
121
34
  */
122
35
  ui?: Partial<FormFieldUi>;
123
- /**
124
- * Whether the label is inline with the control.
125
- */
126
- inline?: boolean;
127
- /**
128
- * Props forwarded to the field element.
129
- */
130
- fieldProps?: FormFieldBaseProps;
131
- /**
132
- * Props forwarded to the field array element.
133
- */
134
- fieldArrayProps?: FormFieldBaseProps;
135
- /**
136
- * Props forwarded to the label element.
137
- */
138
- labelProps?: FormLabelProps;
139
- /**
140
- * Props forwarded to the control element.
141
- */
142
- controlProps?: FormControlProps;
143
- /**
144
- * Props forwarded to the description element.
145
- */
146
- descriptionProps?: FormDescriptionProps;
147
- /**
148
- * Props forwarded to the error element.
149
- */
150
- errorProps?: FormErrorProps;
36
+ }
37
+ /**
38
+ * Properties for the FormFieldBase component.
39
+ */
40
+ interface FormFieldBaseProps extends FormFieldBaseCompactProps, FormFieldExtraProps {}
41
+ /**
42
+ * Slots for the FormFieldBase component.
43
+ */
44
+ type FormFieldBaseSlots = FormFieldBaseCompactSlots;
45
+ interface UseFormReturn<Values extends FormValues> extends UseHeadlessFormReturn<Values> {
46
+ SFormField: FormFieldComponent<Values, FormFieldExtraProps>;
47
+ SFormFieldArray: FormFieldArrayComponent<Values, FormFieldExtraProps>;
151
48
  }
152
49
  //#endregion
153
- export { FormFieldArrayComponent, FormFieldBaseProps, FormFieldComponent, FormProps };
50
+ export { FormFieldBaseProps, FormFieldBaseSlots, FormProps, type UseFormOptions, UseFormReturn };
@@ -1,45 +1,7 @@
1
- import { FormFieldArrayComponent, FormFieldComponent } from "./types.js";
2
- import * as _$vue from "vue";
3
- import { FormValues, InferStandardSchemaInput, StandardSchemaV1, UseFormOptions } from "@soybeanjs/headless/form";
4
- import { Path } from "@soybeanjs/headless/types";
5
- import * as _$_soybeanjs_headless0 from "@soybeanjs/headless";
1
+ import { UseFormOptions, UseFormReturn } from "./types.js";
2
+ import { FormValues, InferStandardSchemaInput, StandardSchemaV1 } from "@soybeanjs/headless/form";
6
3
 
7
4
  //#region src/components/form/use-form.d.ts
8
- declare function useForm$1<S extends StandardSchemaV1<FormValues, FormValues>>(options: UseFormOptions<S>): {
9
- SFormField: FormFieldComponent<InferStandardSchemaInput<S>>;
10
- SFormFieldArray: FormFieldArrayComponent<InferStandardSchemaInput<S>>;
11
- handleSubmit: (event?: Event) => void;
12
- handleReset: (event?: Event) => void;
13
- useFieldArray: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, opts?: _$_soybeanjs_headless0.FormRegisterOptions<_$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>> | undefined) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldArrayStates<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.FormFieldArrayStates<InferStandardSchemaInput<S>, Name>>;
14
- useField: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, opts?: _$_soybeanjs_headless0.FormRegisterOptions<_$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>> | undefined) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>>;
15
- dirty: _$vue.ComputedRef<boolean>;
16
- setSubmitting: (isSubmitting: boolean) => void;
17
- registerField: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, opts?: _$_soybeanjs_headless0.FormRegisterOptions<_$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>> | undefined) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>>;
18
- registerFieldArray: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, opts?: _$_soybeanjs_headless0.FormRegisterOptions<_$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>> | undefined) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>>;
19
- validateField: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => Promise<string | undefined | void>;
20
- getFieldValue: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => _$vue.WritableComputedRef<_$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>>;
21
- getFieldMeta: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldMeta>;
22
- getFieldError: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => string | undefined;
23
- getFieldTouched: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => boolean | undefined;
24
- getFieldDirty: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => boolean;
25
- getFieldState: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name) => _$vue.Ref<_$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>, _$_soybeanjs_headless0.FormFieldState<InferStandardSchemaInput<S>, Name>>;
26
- setValues: (values: InferStandardSchemaInput<S>, shouldValidate?: boolean) => Promise<void> | Promise<_$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>>;
27
- setErrors: (errors: _$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>) => void;
28
- setFieldValue: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, value: _$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>, shouldValidate?: boolean) => Promise<void> | Promise<_$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>>;
29
- setFieldTouched: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, touched: boolean) => void;
30
- setFieldError: <Name extends Path<InferStandardSchemaInput<S>>>(name: Name, error: string | undefined) => void;
31
- setFieldArrayValue: <Name extends Path<InferStandardSchemaInput<S>>, Method extends (...args: any) => any>(name: Name, value: _$_soybeanjs_headless0.PathValue<InferStandardSchemaInput<S>, Name>, method: Method, args?: Partial<{
32
- argA: Parameters<Method>[1];
33
- argB: Parameters<Method>[2];
34
- }> | undefined, shouldSetValue?: boolean) => Promise<void> | Promise<_$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>>;
35
- validateForm: (values?: InferStandardSchemaInput<S> | undefined) => Promise<_$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>>;
36
- resetForm: (nextState?: _$_soybeanjs_headless0.FormResetState<InferStandardSchemaInput<S>> | undefined) => void;
37
- values: InferStandardSchemaInput<S>;
38
- touched: _$vue.Ref<_$_soybeanjs_headless0.FormTouched<InferStandardSchemaInput<S>>, _$_soybeanjs_headless0.FormTouched<InferStandardSchemaInput<S>>>;
39
- errors: _$vue.Ref<_$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>, _$_soybeanjs_headless0.FormErrors<InferStandardSchemaInput<S>>>;
40
- submitCount: _$vue.ShallowRef<number>;
41
- isSubmitting: _$vue.ShallowRef<boolean>;
42
- isValidating: _$vue.ShallowRef<boolean>;
43
- };
5
+ declare function useForm$1<S extends StandardSchemaV1<FormValues, FormValues>>(options: UseFormOptions<S>): UseFormReturn<InferStandardSchemaInput<S>>;
44
6
  //#endregion
45
7
  export { useForm$1 as useForm };
@@ -1 +1 @@
1
- import e from"./form-field-base.js";import{defineComponent as t,h as n}from"vue";import{useForm as r}from"@soybeanjs/headless/form";import{Slot as i}from"@soybeanjs/headless/slot";function a(a){let o=r(a),s=t((t,{slots:r})=>{let a=o.useField(t.name,{validate:t.validate,reset:t.reset});return()=>n(e,{error:a.value.meta.error,...t},{label:()=>r.label?.(a.value),description:r.description?()=>r.description(a.value):void 0,default:e=>n(i,{size:t.size,id:e.formFieldId,ariaDescribedBy:e.ariaDescribedBy,ariaInvalid:e.ariaInvalid,name:t.name,modelValue:a.value.value,"onUpdate:modelValue":e=>o.setFieldValue(t.name,e),onBlur:e=>a.value.onBlur(e,t.name),onChange:()=>a.value.onChange(),onInput:()=>a.value.onInput()},{default:()=>r.default?.(a.value)})})},{name:`SFormField`,props:[`name`]}),c=t((t,{slots:r})=>{let i=o.useFieldArray(t.name,{validate:t.validate,reset:t.reset});return()=>n(e,{error:i.value.meta.error,...t,isFieldArray:!0},{label:()=>r.label?.(i.value),description:r.description?()=>r.description(i.value):void 0,default:()=>r.default?.(i.value)})},{name:`SFormFieldArray`,props:[`name`]});return{...o,SFormField:s,SFormFieldArray:c}}export{a as useForm};
1
+ import e from"./form-field.js";import t from"./form-field-array.js";import{useForm as n}from"@soybeanjs/headless/form";function r(r){let[i,a,o]=n(r,e,t);return{...i,SFormField:a,SFormFieldArray:o}}export{r as useForm};
@@ -1 +1 @@
1
- import{tv as e}from"tailwind-variants";const t=e({slots:{form:`grid`,field:`flex`,fieldArray:`flex`,label:`flex items-center whitespace-nowrap`,control:``,description:`text-muted-foreground m-0`,error:`font-medium text-destructive m-0`},variants:{size:{xs:{field:`text-2xs gap-x-2.25 gap-y-1.5`,fieldArray:`text-2xs gap-x-2.25 gap-y-1.5`,label:`gap-1.5`},sm:{field:`text-xs gap-x-2.5 gap-y-1.75`,fieldArray:`text-xs gap-x-2.5 gap-y-1.75`,label:`gap-1.75`},md:{field:`text-sm gap-x-3 gap-y-2`,fieldArray:`text-sm gap-x-3 gap-y-2`,label:`gap-2`},lg:{field:`text-base gap-x-3.75 gap-y-2.5`,fieldArray:`text-base gap-x-3.75 gap-y-2.5`,label:`gap-2.5`},xl:{field:`text-lg gap-x-4.5 gap-y-3`,fieldArray:`text-lg gap-x-4.5 gap-y-3`,label:`gap-3`},"2xl":{field:`text-xl gap-x-5.25 gap-y-3.5`,fieldArray:`text-xl gap-x-5.25 gap-y-3.5`,label:`gap-3.5`}},inline:{true:{field:`justify-between items-center`,fieldArray:`justify-between`,label:`shrink-0 justify-end`,control:`grow-1 shrink-1 min-w-0`,description:`w-full`,error:`absolute left-0 top-full w-full`},false:{field:`flex-col`,fieldArray:`flex-col`}}},defaultVariants:{size:`md`,inline:!1}});export{t as formVariants};
1
+ import{tv as e}from"tailwind-variants";const t=e({slots:{form:`grid`,field:[`group flex data-[orientation=vertical]:flex-col`,`data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-wrap data-[orientation=horizontal]:justify-between data-[orientation=horizontal]:items-center`],fieldArray:[`group flex data-[orientation=vertical]:flex-col`,`data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:flex-wrap data-[orientation=horizontal]:justify-between`],label:[`flex items-center whitespace-nowrap`,`group-data-[orientation=horizontal]:justify-end group-data-[orientation=horizontal]:shrink-0`],control:`group-data-[orientation=horizontal]:flex-1 group-data-[orientation=horizontal]:min-w-0`,description:`text-muted-foreground m-0 group-data-[orientation=horizontal]:w-full`,error:[`font-medium text-destructive m-0`,`group-data-[orientation=horizontal]:absolute group-data-[orientation=horizontal]:start-0 group-data-[orientation=horizontal]:top-full group-data-[orientation=horizontal]:w-full`]},variants:{size:{xs:{field:`text-2xs gap-x-2.25 gap-y-1.5`,fieldArray:`text-2xs gap-x-2.25 gap-y-1.5`,label:`gap-1.5`,description:`group-data-[error]:pt-1.75`},sm:{field:`text-xs gap-x-2.5 gap-y-1.75`,fieldArray:`text-xs gap-x-2.5 gap-y-1.75`,label:`gap-1.75`,description:`group-data-[error]:pt-2`},md:{field:`text-sm gap-x-3 gap-y-2`,fieldArray:`text-sm gap-x-3 gap-y-2`,label:`gap-2`,description:`group-data-[error]:pt-2.5`},lg:{field:`text-base gap-x-3.75 gap-y-2.5`,fieldArray:`text-base gap-x-3.75 gap-y-2.5`,label:`gap-2.5`,description:`group-data-[error]:pt-3`},xl:{field:`text-lg gap-x-4.5 gap-y-3`,fieldArray:`text-lg gap-x-4.5 gap-y-3`,label:`gap-3`,description:`group-data-[error]:pt-3.5`},"2xl":{field:`text-xl gap-x-5.25 gap-y-3.5`,fieldArray:`text-xl gap-x-5.25 gap-y-3.5`,label:`gap-3.5`,description:`group-data-[error]:pt-4.5`}}},defaultVariants:{size:`md`}});export{t as formVariants};
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{hoverCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderSlot as d,toHandlers as f,unref as p,withCtx as m}from"vue";import{useForwardListeners as h,useOmitProps as g}from"@soybeanjs/headless/composables";import{HoverCardArrow as _,HoverCardPopup as v,HoverCardPortal as y,HoverCardPositioner as b,HoverCardRoot as x,HoverCardTrigger as S,provideHoverCardUi as C}from"@soybeanjs/headless/hover-card";const w=o({name:`SHoverCard`,__name:`hover-card`,props:{class:{},size:{},ui:{},placement:{},showArrow:{type:Boolean,default:!0},positionerProps:{},popupProps:{},triggerProps:{},portalProps:{},arrowProps:{},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},openDelay:{},closeDelay:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`],setup(o,{emit:w}){let T=o,E=w,D=g(T,[`class`,`size`,`ui`,`placement`,`showArrow`,`positionerProps`,`popupProps`,`triggerProps`,`portalProps`,`arrowProps`]),O=h(E),k=n(()=>e(t({size:T.size}),T.ui,{popup:T.class})),A=n(()=>({...T.positionerProps,placement:T.placement??T.positionerProps?.placement}));return C(k),(e,t)=>(u(),r(p(x),c(p(D),{"onUpdate:open":t[0]||=e=>E(`update:open`,e)}),{default:m(()=>[a(p(S),c(o.triggerProps,{"as-child":``}),{default:m(()=>[d(e.$slots,`trigger`)]),_:3},16),a(p(y),l(s(o.portalProps)),{default:m(()=>[a(p(b),c(A.value,f(p(O))),{default:m(()=>[a(p(v),l(s(o.popupProps)),{default:m(()=>[d(e.$slots,`default`),o.showArrow?(u(),r(p(_),l(c({key:0},o.arrowProps)),null,16)):i(`v-if`,!0)]),_:3},16)]),_:3},16)]),_:3},16)]),_:3},16))}});export{w as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{hoverCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,createCommentVNode as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderSlot as d,toHandlers as f,unref as p,withCtx as m}from"vue";import{useForwardListeners as h,useOmitProps as g}from"@soybeanjs/headless/composables";import{HoverCardArrow as _,HoverCardPopup as v,HoverCardPortal as y,HoverCardPositioner as b,HoverCardRoot as x,HoverCardTrigger as S,provideHoverCardUi as C}from"@soybeanjs/headless/hover-card";const w=o({name:`SHoverCard`,__name:`hover-card`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},placement:{},showArrow:{type:Boolean,default:!0},positionerProps:{},popupProps:{},triggerProps:{},portalProps:{},arrowProps:{},defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},openDelay:{},closeDelay:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`],setup(o,{emit:w}){let T=o,E=w,D=g(T,[`class`,`size`,`ui`,`placement`,`showArrow`,`positionerProps`,`popupProps`,`triggerProps`,`portalProps`,`arrowProps`]),O=h(E),k=n(()=>e(t({size:T.size}),T.ui,{popup:T.class})),A=n(()=>({...T.positionerProps,placement:T.placement??T.positionerProps?.placement}));return C(k),(e,t)=>(u(),r(p(x),c(p(D),{"onUpdate:open":t[0]||=e=>E(`update:open`,e)}),{default:m(()=>[a(p(S),c(o.triggerProps,{"as-child":``}),{default:m(()=>[d(e.$slots,`trigger`)]),_:3},16),a(p(y),l(s(o.portalProps)),{default:m(()=>[a(p(b),c(A.value,f(p(O))),{default:m(()=>[a(p(v),l(s(o.popupProps)),{default:m(()=>[d(e.$slots,`default`),o.showArrow?(u(),r(p(_),l(c({key:0},o.arrowProps)),null,16)):i(`v-if`,!0)]),_:3},16)]),_:3},16)]),_:3},16)]),_:3},16))}});export{w as default};
@@ -4,7 +4,7 @@ import { ClassValue, Placement } from "@soybeanjs/headless/types";
4
4
 
5
5
  //#region src/components/hover-card/types.d.ts
6
6
  /**
7
- * Props for the hover card component.
7
+ * Properties for the HoverCard component.
8
8
  */
9
9
  interface HoverCardProps extends HoverCardRootProps {
10
10
  /**
@@ -28,28 +28,28 @@ interface HoverCardProps extends HoverCardRootProps {
28
28
  */
29
29
  showArrow?: boolean;
30
30
  /**
31
- * Props forwarded to the positioner element.
31
+ * Properties forwarded to the positioner element.
32
32
  */
33
33
  positionerProps?: HoverCardPositionerProps;
34
34
  /**
35
- * Props forwarded to the popup element.
35
+ * Properties forwarded to the popup element.
36
36
  */
37
37
  popupProps?: HoverCardPopupProps;
38
38
  /**
39
- * Props forwarded to the trigger element.
39
+ * Properties forwarded to the trigger element.
40
40
  */
41
41
  triggerProps?: HoverCardTriggerProps;
42
42
  /**
43
- * Props forwarded to the portal element.
43
+ * Properties forwarded to the portal element.
44
44
  */
45
45
  portalProps?: HoverCardPortalProps;
46
46
  /**
47
- * Props forwarded to the arrow element.
47
+ * Properties forwarded to the arrow element.
48
48
  */
49
49
  arrowProps?: HoverCardArrowProps;
50
50
  }
51
51
  /**
52
- * Emits for the hover card component.
52
+ * Events for the HoverCard component.
53
53
  */
54
54
  type HoverCardEmits = HoverCardRootEmits & HoverCardPositionerEmits;
55
55
  //#endregion
@@ -3,7 +3,7 @@ import { IconValue } from "@soybeanjs/headless/_icon";
3
3
 
4
4
  //#region src/components/icon/types.d.ts
5
5
  /**
6
- * Props for the icon component.
6
+ * Properties for the Icon component.
7
7
  */
8
8
  interface IconProps$1 extends Omit<IconProps, 'icon'> {
9
9
  /**