@soybeanjs/headless 0.0.9 → 0.0.10

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 (539) hide show
  1. package/dist/components/accordion/accordion-content.js +1 -1
  2. package/dist/components/accordion/accordion-content.vue.d.ts +2 -2
  3. package/dist/components/accordion/accordion-header.js +1 -1
  4. package/dist/components/accordion/accordion-header.vue.d.ts +2 -2
  5. package/dist/components/accordion/accordion-item.js +1 -1
  6. package/dist/components/accordion/accordion-item.vue.d.ts +5 -5
  7. package/dist/components/accordion/accordion-root.js +1 -1
  8. package/dist/components/accordion/accordion-root.vue.d.ts +3 -3
  9. package/dist/components/accordion/accordion-trigger.js +1 -1
  10. package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -2
  11. package/dist/components/accordion/context.d.ts +5 -4
  12. package/dist/components/accordion/context.js +1 -1
  13. package/dist/components/accordion/index.d.ts +3 -3
  14. package/dist/components/accordion/index.js +1 -1
  15. package/dist/components/accordion/types.d.ts +4 -7
  16. package/dist/components/alert/alert-close.js +1 -1
  17. package/dist/components/alert/alert-close.vue.d.ts +2 -2
  18. package/dist/components/alert/alert-content.js +1 -1
  19. package/dist/components/alert/alert-content.vue.d.ts +2 -2
  20. package/dist/components/alert/alert-description.js +1 -1
  21. package/dist/components/alert/alert-description.vue.d.ts +2 -2
  22. package/dist/components/alert/alert-root.js +1 -1
  23. package/dist/components/alert/alert-root.vue.d.ts +4 -4
  24. package/dist/components/alert/alert-title.js +1 -1
  25. package/dist/components/alert/alert-title.vue.d.ts +2 -2
  26. package/dist/components/alert/context.d.ts +6 -4
  27. package/dist/components/alert/context.js +1 -1
  28. package/dist/components/alert/index.d.ts +3 -3
  29. package/dist/components/alert/index.js +1 -1
  30. package/dist/components/alert/types.d.ts +5 -8
  31. package/dist/components/alert-dialog/alert-dialog-close.vue.d.ts +2 -2
  32. package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +4 -4
  33. package/dist/components/alert-dialog/alert-dialog-root.vue.d.ts +4 -4
  34. package/dist/components/alert-dialog/index.d.ts +3 -3
  35. package/dist/components/alert-dialog/index.js +1 -1
  36. package/dist/components/arrow/arrow.vue.d.ts +2 -2
  37. package/dist/components/aspect-ratio/aspect-ratio.vue.d.ts +3 -3
  38. package/dist/components/avatar/avatar-fallback.js +1 -1
  39. package/dist/components/avatar/avatar-fallback.vue.d.ts +2 -2
  40. package/dist/components/avatar/avatar-image.js +1 -1
  41. package/dist/components/avatar/avatar-image.vue.d.ts +4 -4
  42. package/dist/components/avatar/avatar-root.js +1 -1
  43. package/dist/components/avatar/avatar-root.vue.d.ts +2 -2
  44. package/dist/components/avatar/context.d.ts +6 -4
  45. package/dist/components/avatar/context.js +1 -1
  46. package/dist/components/avatar/index.d.ts +3 -3
  47. package/dist/components/avatar/index.js +1 -1
  48. package/dist/components/avatar/types.d.ts +5 -8
  49. package/dist/components/badge/badge-content.js +1 -1
  50. package/dist/components/badge/badge-content.vue.d.ts +2 -2
  51. package/dist/components/badge/badge-root.js +1 -1
  52. package/dist/components/badge/badge-root.vue.d.ts +4 -4
  53. package/dist/components/badge/context.d.ts +6 -3
  54. package/dist/components/badge/context.js +1 -1
  55. package/dist/components/badge/index.d.ts +3 -3
  56. package/dist/components/badge/index.js +1 -1
  57. package/dist/components/badge/types.d.ts +5 -8
  58. package/dist/components/breadcrumb/breadcrumb-ellipsis.js +1 -1
  59. package/dist/components/breadcrumb/breadcrumb-ellipsis.vue.d.ts +2 -2
  60. package/dist/components/breadcrumb/breadcrumb-item.js +1 -1
  61. package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +2 -2
  62. package/dist/components/breadcrumb/breadcrumb-link.js +1 -1
  63. package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +2 -2
  64. package/dist/components/breadcrumb/breadcrumb-list.js +1 -1
  65. package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +2 -2
  66. package/dist/components/breadcrumb/breadcrumb-page.js +1 -1
  67. package/dist/components/breadcrumb/breadcrumb-page.vue.d.ts +2 -2
  68. package/dist/components/breadcrumb/breadcrumb-root.js +1 -1
  69. package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +2 -2
  70. package/dist/components/breadcrumb/breadcrumb-separator.js +1 -1
  71. package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +2 -2
  72. package/dist/components/breadcrumb/context.d.ts +6 -3
  73. package/dist/components/breadcrumb/context.js +1 -1
  74. package/dist/components/breadcrumb/index.d.ts +3 -3
  75. package/dist/components/breadcrumb/index.js +1 -1
  76. package/dist/components/breadcrumb/types.d.ts +5 -8
  77. package/dist/components/button/button.vue.d.ts +5 -5
  78. package/dist/components/card/card-content.js +1 -1
  79. package/dist/components/card/card-content.vue.d.ts +2 -2
  80. package/dist/components/card/card-description.js +1 -1
  81. package/dist/components/card/card-description.vue.d.ts +2 -2
  82. package/dist/components/card/card-footer.js +1 -1
  83. package/dist/components/card/card-footer.vue.d.ts +2 -2
  84. package/dist/components/card/card-header.js +1 -1
  85. package/dist/components/card/card-header.vue.d.ts +2 -2
  86. package/dist/components/card/card-root.js +1 -1
  87. package/dist/components/card/card-root.vue.d.ts +2 -2
  88. package/dist/components/card/card-title-root.js +1 -1
  89. package/dist/components/card/card-title-root.vue.d.ts +2 -2
  90. package/dist/components/card/card-title.js +1 -1
  91. package/dist/components/card/card-title.vue.d.ts +2 -2
  92. package/dist/components/card/context.d.ts +6 -3
  93. package/dist/components/card/context.js +1 -1
  94. package/dist/components/card/index.d.ts +3 -3
  95. package/dist/components/card/index.js +1 -1
  96. package/dist/components/card/types.d.ts +5 -8
  97. package/dist/components/checkbox/checkbox-control.js +1 -1
  98. package/dist/components/checkbox/checkbox-control.vue.d.ts +2 -2
  99. package/dist/components/checkbox/checkbox-group-root.js +1 -1
  100. package/dist/components/checkbox/checkbox-group-root.vue.d.ts +3 -3
  101. package/dist/components/checkbox/checkbox-indicator.js +1 -1
  102. package/dist/components/checkbox/checkbox-indicator.vue.d.ts +4 -4
  103. package/dist/components/checkbox/checkbox-label.js +1 -1
  104. package/dist/components/checkbox/checkbox-label.vue.d.ts +2 -2
  105. package/dist/components/checkbox/checkbox-root.js +1 -1
  106. package/dist/components/checkbox/checkbox-root.vue.d.ts +4 -4
  107. package/dist/components/checkbox/context.d.ts +5 -4
  108. package/dist/components/checkbox/context.js +1 -1
  109. package/dist/components/checkbox/index.d.ts +3 -3
  110. package/dist/components/checkbox/index.js +1 -1
  111. package/dist/components/checkbox/types.d.ts +4 -7
  112. package/dist/components/collapsible/collapsible-content.js +1 -1
  113. package/dist/components/collapsible/collapsible-content.vue.d.ts +2 -2
  114. package/dist/components/collapsible/collapsible-root.js +1 -1
  115. package/dist/components/collapsible/collapsible-root.vue.d.ts +6 -6
  116. package/dist/components/collapsible/collapsible-trigger.js +1 -1
  117. package/dist/components/collapsible/collapsible-trigger.vue.d.ts +4 -4
  118. package/dist/components/collapsible/context.d.ts +6 -4
  119. package/dist/components/collapsible/context.js +1 -1
  120. package/dist/components/collapsible/index.d.ts +3 -3
  121. package/dist/components/collapsible/index.js +1 -1
  122. package/dist/components/collapsible/types.d.ts +5 -8
  123. package/dist/components/config-provider/config-provider.vue.d.ts +3 -3
  124. package/dist/components/context-menu/context-menu-content.vue.d.ts +6 -6
  125. package/dist/components/context-menu/context-menu-root.vue.d.ts +4 -4
  126. package/dist/components/context-menu/context-menu-trigger.vue.d.ts +4 -4
  127. package/dist/components/context-menu/index.d.ts +2 -2
  128. package/dist/components/dialog/context.d.ts +5 -4
  129. package/dist/components/dialog/context.js +1 -1
  130. package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
  131. package/dist/components/dialog/dialog-content-impl.js +1 -1
  132. package/dist/components/dialog/dialog-content.vue.d.ts +4 -4
  133. package/dist/components/dialog/dialog-description.js +1 -1
  134. package/dist/components/dialog/dialog-description.vue.d.ts +2 -2
  135. package/dist/components/dialog/dialog-footer.js +1 -1
  136. package/dist/components/dialog/dialog-footer.vue.d.ts +2 -2
  137. package/dist/components/dialog/dialog-header.js +1 -1
  138. package/dist/components/dialog/dialog-header.vue.d.ts +2 -2
  139. package/dist/components/dialog/dialog-overlay.js +1 -1
  140. package/dist/components/dialog/dialog-overlay.vue.d.ts +2 -2
  141. package/dist/components/dialog/dialog-root.vue.d.ts +4 -4
  142. package/dist/components/dialog/dialog-title.js +1 -1
  143. package/dist/components/dialog/dialog-title.vue.d.ts +2 -2
  144. package/dist/components/dialog/dialog-trigger.vue.d.ts +2 -2
  145. package/dist/components/dialog/index.d.ts +3 -3
  146. package/dist/components/dialog/index.js +1 -1
  147. package/dist/components/dialog/types.d.ts +5 -8
  148. package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +6 -6
  149. package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +5 -5
  150. package/dist/components/dropdown-menu/dropdown-menu-trigger.vue.d.ts +4 -4
  151. package/dist/components/dropdown-menu/index.d.ts +2 -2
  152. package/dist/components/form/context.d.ts +6 -3
  153. package/dist/components/form/context.js +1 -1
  154. package/dist/components/form/core/shared.js +1 -0
  155. package/dist/components/form/core/standard.js +1 -0
  156. package/dist/components/form/core/types.d.ts +117 -0
  157. package/dist/components/form/core/use-field-array.js +1 -0
  158. package/dist/components/form/core/use-form-state.js +1 -0
  159. package/dist/components/form/core/use-form.d.ts +7 -0
  160. package/dist/components/form/core/use-form.js +1 -0
  161. package/dist/components/form/form-description.js +1 -1
  162. package/dist/components/form/form-description.vue.d.ts +2 -2
  163. package/dist/components/form/form-error.js +1 -1
  164. package/dist/components/form/form-error.vue.d.ts +2 -2
  165. package/dist/components/form/form-field.js +1 -1
  166. package/dist/components/form/form-field.vue.d.ts +2 -13
  167. package/dist/components/form/form-label.js +1 -1
  168. package/dist/components/form/form-label.vue.d.ts +2 -2
  169. package/dist/components/form/index.d.ts +7 -5
  170. package/dist/components/form/index.js +1 -1
  171. package/dist/components/form/types.d.ts +6 -11
  172. package/dist/components/input/context.d.ts +6 -3
  173. package/dist/components/input/context.js +1 -1
  174. package/dist/components/input/index.d.ts +3 -3
  175. package/dist/components/input/index.js +1 -1
  176. package/dist/components/input/input-control.js +1 -1
  177. package/dist/components/input/input-control.vue.d.ts +2 -2
  178. package/dist/components/input/input-root.js +1 -1
  179. package/dist/components/input/input-root.vue.d.ts +4 -4
  180. package/dist/components/input/types.d.ts +5 -8
  181. package/dist/components/kbd/kbd.vue.d.ts +2 -2
  182. package/dist/components/label/label.vue.d.ts +2 -2
  183. package/dist/components/layout/context.d.ts +6 -4
  184. package/dist/components/layout/context.js +1 -1
  185. package/dist/components/layout/index.d.ts +3 -3
  186. package/dist/components/layout/index.js +1 -1
  187. package/dist/components/layout/layout-footer.js +1 -1
  188. package/dist/components/layout/layout-footer.vue.d.ts +2 -2
  189. package/dist/components/layout/layout-header.js +1 -1
  190. package/dist/components/layout/layout-main.js +1 -1
  191. package/dist/components/layout/layout-mobile.js +1 -1
  192. package/dist/components/layout/layout-mobile.vue.d.ts +2 -2
  193. package/dist/components/layout/layout-rail.js +1 -1
  194. package/dist/components/layout/layout-root.js +1 -1
  195. package/dist/components/layout/layout-root.vue.d.ts +5 -5
  196. package/dist/components/layout/layout-sidebar.js +1 -1
  197. package/dist/components/layout/layout-sidebar.vue.d.ts +2 -2
  198. package/dist/components/layout/layout-tab.js +1 -1
  199. package/dist/components/layout/layout-tab.vue.d.ts +2 -2
  200. package/dist/components/layout/layout-trigger.js +1 -1
  201. package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
  202. package/dist/components/layout/types.d.ts +13 -14
  203. package/dist/components/link/link.vue.d.ts +4 -4
  204. package/dist/components/list/context.d.ts +6 -3
  205. package/dist/components/list/context.js +1 -1
  206. package/dist/components/list/index.d.ts +3 -3
  207. package/dist/components/list/index.js +1 -1
  208. package/dist/components/list/list-content.js +1 -1
  209. package/dist/components/list/list-content.vue.d.ts +2 -2
  210. package/dist/components/list/list-description.js +1 -1
  211. package/dist/components/list/list-description.vue.d.ts +2 -2
  212. package/dist/components/list/list-item.js +1 -1
  213. package/dist/components/list/list-item.vue.d.ts +2 -2
  214. package/dist/components/list/list-root.js +1 -1
  215. package/dist/components/list/list-root.vue.d.ts +2 -2
  216. package/dist/components/list/list-title.js +1 -1
  217. package/dist/components/list/list-title.vue.d.ts +2 -2
  218. package/dist/components/list/types.d.ts +5 -8
  219. package/dist/components/listbox/context.d.ts +5 -4
  220. package/dist/components/listbox/context.js +1 -1
  221. package/dist/components/listbox/index.d.ts +3 -3
  222. package/dist/components/listbox/index.js +1 -1
  223. package/dist/components/listbox/listbox-content.js +1 -1
  224. package/dist/components/listbox/listbox-content.vue.d.ts +2 -2
  225. package/dist/components/listbox/listbox-filter.vue.d.ts +4 -4
  226. package/dist/components/listbox/listbox-group-label.js +1 -1
  227. package/dist/components/listbox/listbox-group-label.vue.d.ts +2 -2
  228. package/dist/components/listbox/listbox-group.js +1 -1
  229. package/dist/components/listbox/listbox-group.vue.d.ts +2 -2
  230. package/dist/components/listbox/listbox-item-indicator.js +1 -1
  231. package/dist/components/listbox/listbox-item-indicator.vue.d.ts +4 -4
  232. package/dist/components/listbox/listbox-item.js +1 -1
  233. package/dist/components/listbox/listbox-item.vue.d.ts +5 -5
  234. package/dist/components/listbox/listbox-root.js +1 -1
  235. package/dist/components/listbox/listbox-root.vue.d.ts +7 -7
  236. package/dist/components/listbox/listbox-virtualizer.js +1 -1
  237. package/dist/components/listbox/listbox-virtualizer.vue.d.ts +2 -2
  238. package/dist/components/listbox/types.d.ts +4 -7
  239. package/dist/components/menu/context.d.ts +5 -4
  240. package/dist/components/menu/context.js +1 -1
  241. package/dist/components/menu/index.d.ts +3 -3
  242. package/dist/components/menu/index.js +1 -1
  243. package/dist/components/menu/menu-checkbox-group.js +1 -1
  244. package/dist/components/menu/menu-checkbox-group.vue.d.ts +3 -3
  245. package/dist/components/menu/menu-checkbox-item.js +1 -1
  246. package/dist/components/menu/menu-checkbox-item.vue.d.ts +4 -4
  247. package/dist/components/menu/menu-content-impl.js +1 -1
  248. package/dist/components/menu/menu-content.vue.d.ts +6 -6
  249. package/dist/components/menu/menu-group-label.js +1 -1
  250. package/dist/components/menu/menu-group-label.vue.d.ts +2 -2
  251. package/dist/components/menu/menu-group.js +1 -1
  252. package/dist/components/menu/menu-group.vue.d.ts +2 -2
  253. package/dist/components/menu/menu-item-indicator.js +1 -1
  254. package/dist/components/menu/menu-item-indicator.vue.d.ts +4 -4
  255. package/dist/components/menu/menu-item.js +1 -1
  256. package/dist/components/menu/menu-item.vue.d.ts +4 -4
  257. package/dist/components/menu/menu-radio-group.js +1 -1
  258. package/dist/components/menu/menu-radio-group.vue.d.ts +3 -3
  259. package/dist/components/menu/menu-radio-item.js +1 -1
  260. package/dist/components/menu/menu-radio-item.vue.d.ts +4 -4
  261. package/dist/components/menu/menu-root.vue.d.ts +4 -4
  262. package/dist/components/menu/menu-sub-content.vue.d.ts +6 -6
  263. package/dist/components/menu/menu-sub-trigger.js +1 -1
  264. package/dist/components/menu/menu-sub-trigger.vue.d.ts +2 -2
  265. package/dist/components/menu/menu-sub.vue.d.ts +4 -4
  266. package/dist/components/menu/types.d.ts +4 -7
  267. package/dist/components/navigation-menu/context.d.ts +5 -4
  268. package/dist/components/navigation-menu/context.js +1 -1
  269. package/dist/components/navigation-menu/index.d.ts +3 -3
  270. package/dist/components/navigation-menu/index.js +1 -1
  271. package/dist/components/navigation-menu/navigation-menu-content-impl.js +1 -1
  272. package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +4 -4
  273. package/dist/components/navigation-menu/navigation-menu-indicator.js +1 -1
  274. package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.ts +2 -2
  275. package/dist/components/navigation-menu/navigation-menu-item.js +1 -1
  276. package/dist/components/navigation-menu/navigation-menu-item.vue.d.ts +2 -2
  277. package/dist/components/navigation-menu/navigation-menu-link.js +1 -1
  278. package/dist/components/navigation-menu/navigation-menu-link.vue.d.ts +4 -4
  279. package/dist/components/navigation-menu/navigation-menu-list.js +1 -1
  280. package/dist/components/navigation-menu/navigation-menu-list.vue.d.ts +2 -2
  281. package/dist/components/navigation-menu/navigation-menu-root.js +1 -1
  282. package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +5 -5
  283. package/dist/components/navigation-menu/navigation-menu-sub-list.js +1 -1
  284. package/dist/components/navigation-menu/navigation-menu-sub-list.vue.d.ts +2 -2
  285. package/dist/components/navigation-menu/navigation-menu-trigger.js +1 -1
  286. package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +4 -4
  287. package/dist/components/navigation-menu/navigation-menu-viewport.js +1 -1
  288. package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.ts +3 -3
  289. package/dist/components/navigation-menu/types.d.ts +5 -8
  290. package/dist/components/number-input/context.d.ts +5 -4
  291. package/dist/components/number-input/context.js +1 -1
  292. package/dist/components/number-input/index.d.ts +3 -3
  293. package/dist/components/number-input/index.js +1 -1
  294. package/dist/components/number-input/number-input-control.js +1 -1
  295. package/dist/components/number-input/number-input-control.vue.d.ts +2 -2
  296. package/dist/components/number-input/number-input-decrement.js +1 -1
  297. package/dist/components/number-input/number-input-decrement.vue.d.ts +4 -4
  298. package/dist/components/number-input/number-input-increment.js +1 -1
  299. package/dist/components/number-input/number-input-increment.vue.d.ts +4 -4
  300. package/dist/components/number-input/number-input-root.js +1 -1
  301. package/dist/components/number-input/number-input-root.vue.d.ts +4 -4
  302. package/dist/components/number-input/types.d.ts +5 -8
  303. package/dist/components/pagination/context.d.ts +6 -4
  304. package/dist/components/pagination/context.js +1 -1
  305. package/dist/components/pagination/index.d.ts +3 -3
  306. package/dist/components/pagination/index.js +1 -1
  307. package/dist/components/pagination/pagination-ellipsis.js +1 -1
  308. package/dist/components/pagination/pagination-ellipsis.vue.d.ts +2 -2
  309. package/dist/components/pagination/pagination-first.js +1 -1
  310. package/dist/components/pagination/pagination-first.vue.d.ts +2 -2
  311. package/dist/components/pagination/pagination-last.js +1 -1
  312. package/dist/components/pagination/pagination-last.vue.d.ts +2 -2
  313. package/dist/components/pagination/pagination-list-item.js +1 -1
  314. package/dist/components/pagination/pagination-list-item.vue.d.ts +2 -2
  315. package/dist/components/pagination/pagination-list.js +1 -1
  316. package/dist/components/pagination/pagination-list.vue.d.ts +2 -2
  317. package/dist/components/pagination/pagination-next.js +1 -1
  318. package/dist/components/pagination/pagination-next.vue.d.ts +2 -2
  319. package/dist/components/pagination/pagination-prev.js +1 -1
  320. package/dist/components/pagination/pagination-prev.vue.d.ts +2 -2
  321. package/dist/components/pagination/pagination-root.js +1 -1
  322. package/dist/components/pagination/pagination-root.vue.d.ts +4 -4
  323. package/dist/components/pagination/types.d.ts +5 -8
  324. package/dist/components/popover/index.d.ts +3 -3
  325. package/dist/components/popover/index.js +1 -1
  326. package/dist/components/popover/popover-anchor.vue.d.ts +2 -2
  327. package/dist/components/popover/popover-close.vue.d.ts +4 -4
  328. package/dist/components/popover/popover-popup.vue.d.ts +2 -2
  329. package/dist/components/popover/popover-positioner.vue.d.ts +4 -4
  330. package/dist/components/popover/popover-root.vue.d.ts +4 -4
  331. package/dist/components/popover/popover-trigger.vue.d.ts +4 -4
  332. package/dist/components/popper/context.d.ts +5 -4
  333. package/dist/components/popper/context.js +1 -1
  334. package/dist/components/popper/index.d.ts +3 -3
  335. package/dist/components/popper/index.js +1 -1
  336. package/dist/components/popper/popper-anchor.vue.d.ts +2 -2
  337. package/dist/components/popper/popper-arrow.js +1 -1
  338. package/dist/components/popper/popper-arrow.vue.d.ts +2 -2
  339. package/dist/components/popper/popper-popup.js +1 -1
  340. package/dist/components/popper/popper-popup.vue.d.ts +2 -2
  341. package/dist/components/popper/popper-positioner.js +1 -1
  342. package/dist/components/popper/popper-positioner.vue.d.ts +52 -52
  343. package/dist/components/popper/popper-root.vue.d.ts +2 -2
  344. package/dist/components/popper/types.d.ts +4 -7
  345. package/dist/components/primitive/primitive.d.ts +2 -2
  346. package/dist/components/radio-group/context.d.ts +5 -4
  347. package/dist/components/radio-group/context.js +1 -1
  348. package/dist/components/radio-group/index.d.ts +3 -3
  349. package/dist/components/radio-group/index.js +1 -1
  350. package/dist/components/radio-group/radio-group-control.js +1 -1
  351. package/dist/components/radio-group/radio-group-control.vue.d.ts +2 -2
  352. package/dist/components/radio-group/radio-group-indicator.js +1 -1
  353. package/dist/components/radio-group/radio-group-indicator.vue.d.ts +4 -4
  354. package/dist/components/radio-group/radio-group-item.js +1 -1
  355. package/dist/components/radio-group/radio-group-item.vue.d.ts +4 -4
  356. package/dist/components/radio-group/radio-group-label.js +1 -1
  357. package/dist/components/radio-group/radio-group-label.vue.d.ts +2 -2
  358. package/dist/components/radio-group/radio-group-root.js +1 -1
  359. package/dist/components/radio-group/radio-group-root.vue.d.ts +3 -3
  360. package/dist/components/radio-group/types.d.ts +4 -7
  361. package/dist/components/roving-focus/roving-focus-group.vue.d.ts +5 -5
  362. package/dist/components/roving-focus/roving-focus-item.vue.d.ts +3 -3
  363. package/dist/components/select/context.d.ts +5 -4
  364. package/dist/components/select/context.js +1 -1
  365. package/dist/components/select/index.d.ts +3 -3
  366. package/dist/components/select/index.js +1 -1
  367. package/dist/components/select/select-arrow.js +1 -1
  368. package/dist/components/select/select-arrow.vue.d.ts +2 -2
  369. package/dist/components/select/select-content-impl.js +1 -1
  370. package/dist/components/select/select-content.vue.d.ts +4 -4
  371. package/dist/components/select/select-group-label.js +1 -1
  372. package/dist/components/select/select-group-label.vue.d.ts +2 -2
  373. package/dist/components/select/select-group.js +1 -1
  374. package/dist/components/select/select-group.vue.d.ts +2 -2
  375. package/dist/components/select/select-item-indicator.js +1 -1
  376. package/dist/components/select/select-item-indicator.vue.d.ts +4 -4
  377. package/dist/components/select/select-item-text.js +1 -1
  378. package/dist/components/select/select-item-text.vue.d.ts +2 -2
  379. package/dist/components/select/select-item.js +1 -1
  380. package/dist/components/select/select-item.vue.d.ts +4 -4
  381. package/dist/components/select/select-root.vue.d.ts +3 -3
  382. package/dist/components/select/select-scroll-down-button.js +1 -1
  383. package/dist/components/select/select-scroll-down-button.vue.d.ts +2 -2
  384. package/dist/components/select/select-scroll-up-button.js +1 -1
  385. package/dist/components/select/select-scroll-up-button.vue.d.ts +2 -2
  386. package/dist/components/select/select-separator.js +1 -1
  387. package/dist/components/select/select-separator.vue.d.ts +2 -2
  388. package/dist/components/select/select-trigger-icon.js +1 -1
  389. package/dist/components/select/select-trigger-icon.vue.d.ts +2 -2
  390. package/dist/components/select/select-trigger.js +1 -1
  391. package/dist/components/select/select-trigger.vue.d.ts +4 -4
  392. package/dist/components/select/select-value.js +1 -1
  393. package/dist/components/select/select-value.vue.d.ts +3 -3
  394. package/dist/components/select/select-viewport.js +2 -2
  395. package/dist/components/select/select-viewport.vue.d.ts +2 -2
  396. package/dist/components/select/types.d.ts +4 -7
  397. package/dist/components/separator/context.d.ts +6 -3
  398. package/dist/components/separator/context.js +1 -1
  399. package/dist/components/separator/index.d.ts +3 -3
  400. package/dist/components/separator/index.js +1 -1
  401. package/dist/components/separator/separator-label.js +1 -1
  402. package/dist/components/separator/separator-label.vue.d.ts +2 -2
  403. package/dist/components/separator/separator-root.js +1 -1
  404. package/dist/components/separator/separator-root.vue.d.ts +3 -3
  405. package/dist/components/separator/types.d.ts +5 -8
  406. package/dist/components/slot/slot.d.ts +2 -2
  407. package/dist/components/switch/context.d.ts +6 -4
  408. package/dist/components/switch/context.js +1 -1
  409. package/dist/components/switch/index.d.ts +3 -3
  410. package/dist/components/switch/index.js +1 -1
  411. package/dist/components/switch/switch-control.js +1 -1
  412. package/dist/components/switch/switch-control.vue.d.ts +2 -2
  413. package/dist/components/switch/switch-root.js +1 -1
  414. package/dist/components/switch/switch-root.vue.d.ts +3 -3
  415. package/dist/components/switch/switch-thumb.js +1 -1
  416. package/dist/components/switch/switch-thumb.vue.d.ts +4 -4
  417. package/dist/components/switch/types.d.ts +5 -8
  418. package/dist/components/tabs/context.d.ts +5 -3
  419. package/dist/components/tabs/context.js +1 -1
  420. package/dist/components/tabs/index.d.ts +3 -3
  421. package/dist/components/tabs/index.js +1 -1
  422. package/dist/components/tabs/tabs-content.js +1 -1
  423. package/dist/components/tabs/tabs-content.vue.d.ts +2 -2
  424. package/dist/components/tabs/tabs-indicator.js +1 -1
  425. package/dist/components/tabs/tabs-indicator.vue.d.ts +2 -2
  426. package/dist/components/tabs/tabs-list.js +1 -1
  427. package/dist/components/tabs/tabs-list.vue.d.ts +2 -2
  428. package/dist/components/tabs/tabs-root.js +1 -1
  429. package/dist/components/tabs/tabs-root.vue.d.ts +5 -5
  430. package/dist/components/tabs/tabs-trigger.js +1 -1
  431. package/dist/components/tabs/tabs-trigger.vue.d.ts +4 -4
  432. package/dist/components/tabs/types.d.ts +5 -8
  433. package/dist/components/tag/tag.vue.d.ts +4 -4
  434. package/dist/components/textarea/context.d.ts +6 -3
  435. package/dist/components/textarea/context.js +1 -1
  436. package/dist/components/textarea/index.d.ts +3 -3
  437. package/dist/components/textarea/index.js +1 -1
  438. package/dist/components/textarea/textarea-control.js +1 -1
  439. package/dist/components/textarea/textarea-control.vue.d.ts +2 -2
  440. package/dist/components/textarea/textarea-counter.js +1 -1
  441. package/dist/components/textarea/textarea-counter.vue.d.ts +2 -2
  442. package/dist/components/textarea/textarea-root.js +1 -1
  443. package/dist/components/textarea/textarea-root.vue.d.ts +4 -4
  444. package/dist/components/textarea/types.d.ts +4 -7
  445. package/dist/components/toast/context.d.ts +5 -5
  446. package/dist/components/toast/context.js +1 -1
  447. package/dist/components/toast/index.d.ts +3 -3
  448. package/dist/components/toast/index.js +1 -1
  449. package/dist/components/toast/toast-action.js +1 -1
  450. package/dist/components/toast/toast-action.vue.d.ts +4 -4
  451. package/dist/components/toast/toast-close.js +1 -1
  452. package/dist/components/toast/toast-close.vue.d.ts +4 -4
  453. package/dist/components/toast/toast-description.js +1 -1
  454. package/dist/components/toast/toast-description.vue.d.ts +2 -2
  455. package/dist/components/toast/toast-provider.vue.d.ts +3 -3
  456. package/dist/components/toast/toast-root.js +1 -1
  457. package/dist/components/toast/toast-root.vue.d.ts +5 -5
  458. package/dist/components/toast/toast-title.js +1 -1
  459. package/dist/components/toast/toast-title.vue.d.ts +2 -2
  460. package/dist/components/toast/toast-viewport.js +1 -1
  461. package/dist/components/toast/toast-viewport.vue.d.ts +4 -4
  462. package/dist/components/toast/types.d.ts +5 -8
  463. package/dist/components/tooltip/index.d.ts +3 -3
  464. package/dist/components/tooltip/index.js +1 -1
  465. package/dist/components/tooltip/tooltip-popup.vue.d.ts +2 -2
  466. package/dist/components/tooltip/tooltip-positioner.vue.d.ts +4 -4
  467. package/dist/components/tooltip/tooltip-root.vue.d.ts +4 -4
  468. package/dist/components/tooltip/tooltip-trigger.vue.d.ts +4 -4
  469. package/dist/components/tree/tree-item.vue.d.ts +5 -5
  470. package/dist/components/tree/tree-root.vue.d.ts +3 -3
  471. package/dist/components/tree/tree-virtualizer-item.vue.d.ts +4 -4
  472. package/dist/components/tree/tree-virtualizer-root.vue.d.ts +3 -3
  473. package/dist/components/tree-menu/context.d.ts +6 -4
  474. package/dist/components/tree-menu/context.js +1 -1
  475. package/dist/components/tree-menu/index.d.ts +3 -3
  476. package/dist/components/tree-menu/index.js +1 -1
  477. package/dist/components/tree-menu/tree-menu-button.js +1 -1
  478. package/dist/components/tree-menu/tree-menu-button.vue.d.ts +4 -4
  479. package/dist/components/tree-menu/tree-menu-collapsible.js +1 -1
  480. package/dist/components/tree-menu/tree-menu-collapsible.vue.d.ts +2 -2
  481. package/dist/components/tree-menu/tree-menu-group-label.js +1 -1
  482. package/dist/components/tree-menu/tree-menu-group-label.vue.d.ts +2 -2
  483. package/dist/components/tree-menu/tree-menu-group-root.js +1 -1
  484. package/dist/components/tree-menu/tree-menu-group-root.vue.d.ts +2 -2
  485. package/dist/components/tree-menu/tree-menu-group.js +1 -1
  486. package/dist/components/tree-menu/tree-menu-group.vue.d.ts +4 -4
  487. package/dist/components/tree-menu/tree-menu-item.js +1 -1
  488. package/dist/components/tree-menu/tree-menu-item.vue.d.ts +4 -4
  489. package/dist/components/tree-menu/tree-menu-root.js +1 -1
  490. package/dist/components/tree-menu/tree-menu-root.vue.d.ts +4 -4
  491. package/dist/components/tree-menu/tree-menu-sub.js +1 -1
  492. package/dist/components/tree-menu/tree-menu-sub.vue.d.ts +4 -4
  493. package/dist/components/tree-menu/types.d.ts +4 -5
  494. package/dist/components/virtualizer/virtualizer-content.vue.d.ts +2 -2
  495. package/dist/components/virtualizer/virtualizer-item.vue.d.ts +2 -2
  496. package/dist/components/virtualizer/virtualizer-root.vue.d.ts +3 -3
  497. package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +3 -3
  498. package/dist/components/visually-hidden/visually-hidden.vue.d.ts +4 -4
  499. package/dist/composables/index.d.ts +2 -1
  500. package/dist/composables/index.js +1 -1
  501. package/dist/composables/use-collection.d.ts +6 -6
  502. package/dist/composables/use-direction.d.ts +2 -2
  503. package/dist/composables/use-dismissable-layer.d.ts +2 -2
  504. package/dist/composables/use-exposed-element.d.ts +2 -2
  505. package/dist/composables/use-forward-element.d.ts +2 -2
  506. package/dist/composables/use-image-loading-status.d.ts +2 -2
  507. package/dist/composables/use-is-using-keyboard.d.ts +2 -2
  508. package/dist/composables/use-kbd.d.ts +2 -2
  509. package/dist/composables/use-locale.d.ts +2 -2
  510. package/dist/composables/use-nonce.d.ts +2 -2
  511. package/dist/composables/use-presence.d.ts +2 -2
  512. package/dist/composables/use-props.d.ts +3 -3
  513. package/dist/composables/use-selection.d.ts +4 -4
  514. package/dist/composables/use-selection.js +1 -1
  515. package/dist/composables/use-ui-context.d.ts +8 -0
  516. package/dist/composables/use-ui-context.js +1 -0
  517. package/dist/index.d.ts +183 -181
  518. package/dist/index.js +1 -1
  519. package/dist/namespaced/index.d.ts +220 -222
  520. package/dist/namespaced/index.js +1 -1
  521. package/dist/types/common.d.ts +3 -1
  522. package/dist/types/index.d.ts +1 -1
  523. package/package.json +4 -17
  524. package/dist/components/form/form-field-array.js +0 -1
  525. package/dist/components/form/form-field-array.vue.d.ts +0 -36
  526. package/dist/forms/core/context.d.ts +0 -21
  527. package/dist/forms/core/context.js +0 -1
  528. package/dist/forms/core/hooks.d.ts +0 -6
  529. package/dist/forms/core/hooks.js +0 -1
  530. package/dist/forms/core/index.d.ts +0 -3
  531. package/dist/forms/core/shared.js +0 -1
  532. package/dist/forms/core/types.d.ts +0 -88
  533. package/dist/forms/index.d.ts +0 -8
  534. package/dist/forms/index.js +0 -1
  535. package/dist/forms/resolvers/index.d.ts +0 -2
  536. package/dist/forms/resolvers/valibot/index.d.ts +0 -8
  537. package/dist/forms/resolvers/valibot/index.js +0 -1
  538. package/dist/forms/resolvers/zod/index.d.ts +0 -8
  539. package/dist/forms/resolvers/zod/index.js +0 -1
@@ -0,0 +1,117 @@
1
+ import { ArrayElement, MaybePromise } from "../../../types/common.js";
2
+ import { Path, PathValue } from "../../../types/path.js";
3
+ import "../../../types/index.js";
4
+ import { ComputedRef, Ref, ShallowRef, WritableComputedRef } from "vue";
5
+ import { StandardSchemaV1 } from "@standard-schema/spec";
6
+
7
+ //#region src/components/form/core/types.d.ts
8
+ type InferStandardSchemaInput<S extends StandardSchemaV1<FormValues, FormValues>> = NonNullable<S['~standard']['types']>['input'];
9
+ type FormValidateMode = 'blur' | 'input' | 'change' | 'submit';
10
+ type FormValues = Record<string, any>;
11
+ type FormErrors<Values extends FormValues> = { [K in keyof Path<Values>]?: string };
12
+ type FormTouched<Values extends FormValues> = { [K in keyof Path<Values>]?: boolean };
13
+ type FormFieldMeta = {
14
+ dirty: boolean;
15
+ error: string | undefined;
16
+ touched: boolean | undefined;
17
+ };
18
+ interface FormSubmitHelper<Values extends FormValues> {
19
+ setSubmitting: (isSubmitting: boolean) => void;
20
+ readonly initialValues: Values;
21
+ }
22
+ interface FormResetState<Values extends FormValues = FormValues> {
23
+ values: Values;
24
+ touched: FormTouched<Values>;
25
+ errors: FormErrors<Values>;
26
+ submitCount: number;
27
+ }
28
+ interface FormState<Values extends FormValues> {
29
+ values: Values;
30
+ touched: Ref<FormTouched<Values>>;
31
+ errors: Ref<FormErrors<Values>>;
32
+ submitCount: ShallowRef<number>;
33
+ isSubmitting: ShallowRef<boolean>;
34
+ isValidating: ShallowRef<boolean>;
35
+ }
36
+ interface UseFormOptions<S extends StandardSchemaV1<FormValues, FormValues>> {
37
+ schema: S;
38
+ initialValues?: InferStandardSchemaInput<S>;
39
+ initialErrors?: FormErrors<InferStandardSchemaInput<S>>;
40
+ initialTouched?: FormTouched<InferStandardSchemaInput<S>>;
41
+ validateMode?: FormValidateMode;
42
+ reValidateMode?: FormValidateMode;
43
+ validateOnMounted?: boolean;
44
+ onSubmit?: (values: InferStandardSchemaInput<S>, helper: FormSubmitHelper<InferStandardSchemaInput<S>>) => Promise<any>;
45
+ onInvalid?: (errors: FormErrors<InferStandardSchemaInput<S>>) => void;
46
+ }
47
+ type FormFieldValidator<Value> = (value: Value) => MaybePromise<string | undefined>;
48
+ interface FormRegisterOptions<Value> {
49
+ validate?: FormFieldValidator<Value>;
50
+ reset?: () => void;
51
+ }
52
+ interface FormEventHandler<S = string> {
53
+ onBlur: (event: Event | S, name?: S) => void;
54
+ onChange: () => void;
55
+ onInput: () => void;
56
+ }
57
+ interface FormSubmitHelper<Values extends FormValues> {
58
+ setSubmitting: (isSubmitting: boolean) => void;
59
+ readonly initialValues: Values;
60
+ }
61
+ interface FormFieldState<Values extends FormValues, Name extends Path<Values>> extends FormEventHandler<Name> {
62
+ name: Name;
63
+ value: PathValue<Values, Name>;
64
+ meta: FormFieldMeta;
65
+ }
66
+ interface FormFieldArrayState<Values extends FormValues, Name extends Path<Values>> extends FormEventHandler<Name> {
67
+ name: Name;
68
+ value: ArrayElement<NonNullable<PathValue<Values, Name>>>;
69
+ meta: FormFieldMeta;
70
+ }
71
+ interface UseFormStateReturn<Values extends FormValues> {
72
+ formState: FormState<Values>;
73
+ dirty: ComputedRef<boolean>;
74
+ submitHelper: FormSubmitHelper<Values>;
75
+ setSubmitting: (isSubmitting: boolean) => void;
76
+ registerField<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
77
+ registerFieldArray<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
78
+ validateField<Name extends Path<Values>>(name: Name): Promise<string | undefined | void>;
79
+ getFieldValue<Name extends Path<Values>>(name: Name): WritableComputedRef<PathValue<Values, Name>>;
80
+ getFieldMeta<Name extends Path<Values>>(name: Name): Ref<FormFieldMeta>;
81
+ getFieldError<Name extends Path<Values>>(name: Name): string | undefined;
82
+ getFieldTouched<Name extends Path<Values>>(name: Name): boolean | undefined;
83
+ getFieldDirty<Name extends Path<Values>>(name: Name): boolean;
84
+ getFieldState<Name extends Path<Values>>(name: Name): Ref<FormFieldState<Values, Name>>;
85
+ setValues(values: Values, shouldValidate?: boolean): Promise<FormErrors<Values>> | Promise<void>;
86
+ setErrors(errors: FormErrors<Values>): void;
87
+ setFieldValue<Name extends Path<Values>>(name: Name, value: PathValue<Values, Name>, shouldValidate?: boolean): Promise<FormErrors<Values>> | Promise<void>;
88
+ setFieldTouched<Name extends Path<Values>>(name: Name, touched: boolean): void;
89
+ setFieldError<Name extends Path<Values>>(name: Name, error: string | undefined): void;
90
+ setFieldArrayValue<Name extends Path<Values>, Method extends (...args: any) => any>(name: Name, value: PathValue<Values, Name>, method: Method, args?: Partial<{
91
+ argA: Parameters<Method>[1];
92
+ argB: Parameters<Method>[2];
93
+ }>, shouldSetValue?: boolean): Promise<void> | Promise<FormErrors<Values>>;
94
+ validateForm(values?: Values): Promise<FormErrors<Values>>;
95
+ resetForm(nextState?: FormResetState<Values>): void;
96
+ }
97
+ interface FormContext<Values extends FormValues> extends Omit<UseFormStateReturn<Values>, 'formState' | 'submitHelper'>, FormState<Values> {
98
+ handleSubmit(event?: Event): void;
99
+ handleReset(event?: Event): void;
100
+ useFieldArray<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldArrayStates<Values, Name>>;
101
+ useField<Name extends Path<Values>>(name: Name, opts?: FormRegisterOptions<PathValue<Values, Name>>): Ref<FormFieldState<Values, Name>>;
102
+ }
103
+ interface FormFieldArrayStates<Values extends FormValues, Name extends Path<Values>> {
104
+ name: Name;
105
+ fields: readonly FormFieldArrayState<Values, Name>[];
106
+ meta: FormFieldMeta;
107
+ append: (value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
108
+ prepend: (value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
109
+ remove: (index?: number) => void;
110
+ swap: (indexA: number, indexB: number) => void;
111
+ move: (from: number, to: number) => void;
112
+ insert: (index: number, value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
113
+ update: (index: number, value: ArrayElement<NonNullable<PathValue<Values, Name>>>) => void;
114
+ replace: ($values: ArrayElement<NonNullable<PathValue<Values, Name>>>[]) => void;
115
+ }
116
+ //#endregion
117
+ export { FormContext, FormFieldArrayStates, FormFieldState, FormRegisterOptions, FormResetState, FormValues, InferStandardSchemaInput, UseFormOptions };
@@ -0,0 +1 @@
1
+ import{appendAt as e,insertAt as t,moveAt as n,prependAt as r,removeAt as i,swapAt as a,updateAt as o}from"../../../shared/object.js";import{computed as s,toRef as c}from"vue";function l(l,u,d){let{getFieldState:f,getFieldValue:p,setFieldArrayValue:m,registerFieldArray:h}=u;h(l,{validate:d});let g=s(()=>p(l).value||[]),_=s(()=>g.value.map(v));function v(e){return{...f(l).value,name:l,value:e}}function y(t){m(l,e(g.value,t),e,{argA:void 0})}function b(e){m(l,r(g.value,e),r,{argA:void 0})}function x(e){m(l,i(g.value,e),i,{argA:e})}function S(e,t){if(!(e in g.value)||!(t in g.value))return;let n=[...g.value];a(n,e,t),m(l,n,a,{argA:e,argB:t},!1)}function C(e,t){if(!(e in g.value))return;let r=[...g.value];n(r,e,t),m(l,r,n,{argA:e,argB:t},!1)}function w(e,n){m(l,t(g.value,e,n),t,{argA:e,argB:void 0})}function T(e,t){e in g.value&&m(l,o(g.value,e,t),o,{argA:e,argB:void 0})}function E(e){m(l,[...e],e=>e,{})}let D=f(l);return c({name:l,fields:_,meta:s(()=>D.value.meta),append:y,prepend:b,remove:x,swap:S,move:C,insert:w,update:T,replace:E})}export{l as useRegisterFieldArray};
@@ -0,0 +1 @@
1
+ import{isFunction as e,isNullish as t,isString as n,keysOf as r}from"../../../shared/guard.js";import{getValue as i,setValue as a}from"../../../shared/value.js";import{updateFormState as o}from"./shared.js";import{validateStandardSchema as s}from"./standard.js";import{computed as c,onMounted as l,reactive as u,ref as d,shallowRef as f,toRef as p}from"vue";import{isEqual as m}from"ohash";import{klona as h}from"klona/full";import{defu as g}from"defu";function _(_){let{validateOnMounted:v=!1,validateMode:y=`submit`,reValidateMode:b=`change`}=_,x=h(_.initialValues||{}),S=h(_.initialErrors||{}),C=h(_.initialTouched||{}),w={values:u(h(x)),touched:d(h(C)),errors:d(h(S)),submitCount:f(0),isSubmitting:f(!1),isValidating:f(!1)},T=c(()=>!m(w.values,x)),E={},D={},O=c(()=>w.submitCount.value===0?y:b);function k(e,t,n){let r=e;r in w.values||a(w.values,r,n?[]:void 0);let{validate:i}=t||{};return i&&(E[r]={validate:i}),K(e)}function A(e,t){let n=k(e,t,!0),r=e,{reset:i}=t||{};return i&&(D[r]={reset:i}),n}function j(e,n=!0){return o(w,{type:`SetValues`,payload:e}),(t(n)?O.value===`change`:n)?Z(w.values):Promise.resolve()}function M(e){o(w,{type:`SetErrors`,payload:e})}function N(e,t,n=!0){return o(w,{type:`SetFieldValue`,payload:{name:e,value:t}}),n?Z(w.values):Promise.resolve()}function P(e,t){o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}function F(e,t){o(w,{type:`SetFieldError`,payload:{name:e,error:t}})}function I(e,t,n,a,s=!0){if(n&&a){if(r(w.errors.value).length&&Array.isArray(i(w.errors.value,e))){let t=n(i(w.errors.value,e),a.argA,a.argB);s&&F(e,t)}if(r(w.touched.value).length&&Array.isArray(i(w.touched.value,e))){let t=n(i(w.touched.value,e),a.argA,a.argB);s&&o(w,{type:`SetTouched`,payload:{name:e,touched:t}})}}return N(e,t)}function L(e){return c({get(){return i(w.values,e)},set(t){N(e,t)}})}function R(e){return p({dirty:c(()=>V(e)),error:c(()=>z(e)),touched:c(()=>B(e))})}function z(e){return i(w.errors.value,e)}function B(e){return i(w.touched.value,e,!1)}function V(e){return!m(i(x,e),i(w.values,e))}async function H(t){if(E[t]&&e(E[t].validate)){o(w,{type:`SetIsValidating`,payload:!0});let e=await X(t,i(w.values,t));return F(t,e),o(w,{type:`SetIsValidating`,payload:!1}),e}return Promise.resolve()}let U=(e,t)=>{if((e=>n(e))(e)){P(e,!0);return}let{name:r,id:i}=e.target,a=t??(r||i);a&&P(a,!0)},W=()=>{O.value===`change`&&Z(w.values)},G=()=>{O.value===`input`&&Z(w.values)};function K(e){let t=R(e);return p({name:e,value:L(e),meta:t,onBlur:U,onChange:W,onInput:G})}function q(e){o(w,{type:`SetIsSubmitting`,payload:e})}let J={setSubmitting:q,get initialValues(){return h(x||{})}};async function Y(t){let n=r(E).filter(t=>e(E?.[t]?.validate)),o=n.map(e=>X(e,i(t,e)));return Promise.all(o).then(e=>e.reduce((e,t,r)=>(t&&a(e,n[r],t),e),{}))}function X(e,t){return Promise.resolve(E[e]?.validate?.(t))}async function Z(e=w.values){return o(w,{type:`SetIsValidating`,payload:!0}),Promise.all([Y(e),s(e,_.schema)]).then(([e,t])=>{let n=g(e,t);return M(n),n}).finally(()=>{o(w,{type:`SetIsValidating`,payload:!1})})}function Q(e){let t=h(e?.values||x),n=h(e?.errors||S),r=h(e?.touched||C);x=h(t),S=h(n),C=h(r),o(w,{type:`ResetForm`,payload:{values:t,touched:r,errors:n,submitCount:typeof e?.submitCount==`number`?e.submitCount:0}}),Object.values(D).forEach(e=>{e?.reset?.()})}return l(()=>{v&&Z(x)}),{formState:w,dirty:T,submitHelper:J,setSubmitting:q,registerField:k,registerFieldArray:A,validateField:H,getFieldValue:L,getFieldMeta:R,getFieldError:z,getFieldTouched:B,getFieldDirty:V,getFieldState:K,setValues:j,setErrors:M,setFieldValue:N,setFieldTouched:P,setFieldError:F,setFieldArrayValue:I,validateForm:Z,resetForm:Q}}export{_ as useFormState};
@@ -0,0 +1,7 @@
1
+ import { FormContext, FormValues, InferStandardSchemaInput, UseFormOptions } from "./types.js";
2
+ import { StandardSchemaV1 } from "@standard-schema/spec";
3
+
4
+ //#region src/components/form/core/use-form.d.ts
5
+ declare function useForm<S extends StandardSchemaV1<FormValues, FormValues>>(options: UseFormOptions<S>): Readonly<FormContext<InferStandardSchemaInput<S>>>;
6
+ //#endregion
7
+ export { useForm };
@@ -0,0 +1 @@
1
+ import{isNullish as e,keysOf as t}from"../../../shared/guard.js";import{updateFormState as n}from"./shared.js";import{useFormState as r}from"./use-form-state.js";import{useRegisterFieldArray as i}from"./use-field-array.js";import{klona as a}from"klona/full";function o(o){let{onSubmit:s=()=>Promise.resolve(),onInvalid:c}=o,{formState:l,submitHelper:u,...d}=r(o),{resetForm:f,validateForm:p,registerField:m}=d;function h(e,t){let{getFieldState:n,getFieldValue:r,setFieldValue:a,setFieldArrayValue:o,registerFieldArray:s}=d;return i(e,{getFieldState:n,getFieldValue:r,setFieldValue:a,setFieldArrayValue:o,registerFieldArray:s},t?.validate)}function g(r){r?.preventDefault(),n(l,{type:`SubmitAttempt`}),p().then(r=>{if(t(r).length===0){let t=s(a(l.values),u);if(e(t))return;t.then(e=>(n(l,{type:`SubmitSuccess`}),e)).catch(()=>{n(l,{type:`SubmitFailure`})})}else n(l,{type:`SubmitFailure`}),c?.(r)})}function _(e){e?.preventDefault(),f()}return{...l,handleSubmit:g,handleReset:_,useField:m,useFieldArray:h,...d}}export{o as useForm};
@@ -1 +1 @@
1
- import{useFormFieldContext as e,useFormThemeContext as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c}from"vue";const l=[`id`];var u=i({name:`FormDescription`,__name:`form-description`,setup(i){let{formDescriptionId:u}=e(`FormDescription`),d=t(),f=n(()=>d?.ui?.value?.description);return(e,t)=>(o(),r(`p`,{id:c(u),class:a(f.value)},[s(e.$slots,`default`)],10,l))}});export{u as default};
1
+ import{useFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o,unref as s}from"vue";const c=[`id`];var l=r({name:`FormDescription`,__name:`form-description`,setup(r){let{formDescriptionId:l}=e(`FormDescription`),u=t(`description`);return(e,t)=>(a(),n(`p`,{id:s(l),class:i(s(u))},[o(e.$slots,`default`)],10,c))}});export{l as default};
@@ -1,12 +1,12 @@
1
1
  import { FormDescriptionProps } from "./types.js";
2
- import * as vue797 from "vue";
2
+ import * as vue777 from "vue";
3
3
 
4
4
  //#region src/components/form/form-description.vue.d.ts
5
5
  declare var __VLS_1: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
- declare const __VLS_base: vue797.DefineComponent<FormDescriptionProps, {}, {}, {}, {}, vue797.ComponentOptionsMixin, vue797.ComponentOptionsMixin, {}, string, vue797.PublicProps, Readonly<FormDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, vue797.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue777.DefineComponent<FormDescriptionProps, {}, {}, {}, {}, vue777.ComponentOptionsMixin, vue777.ComponentOptionsMixin, {}, string, vue777.PublicProps, Readonly<FormDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, vue777.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useFormFieldContext as e,useFormThemeContext as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c}from"vue";const l=[`id`];var u=i({name:`FormError`,__name:`form-error`,setup(i){let{formErrorId:u}=e(`FormError`),d=t(),f=n(()=>d?.ui?.value?.error);return(e,t)=>(o(),r(`p`,{id:c(u),class:a(f.value)},[s(e.$slots,`default`)],10,l))}});export{u as default};
1
+ import{useFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o,unref as s}from"vue";const c=[`id`];var l=r({name:`FormError`,__name:`form-error`,setup(r){let{formErrorId:l}=e(`FormError`),u=t(`error`);return(e,t)=>(a(),n(`p`,{id:s(l),class:i(s(u))},[o(e.$slots,`default`)],10,c))}});export{l as default};
@@ -1,12 +1,12 @@
1
1
  import { FormErrorProps } from "./types.js";
2
- import * as vue812 from "vue";
2
+ import * as vue772 from "vue";
3
3
 
4
4
  //#region src/components/form/form-error.vue.d.ts
5
5
  declare var __VLS_1: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
- declare const __VLS_base: vue812.DefineComponent<FormErrorProps, {}, {}, {}, {}, vue812.ComponentOptionsMixin, vue812.ComponentOptionsMixin, {}, string, vue812.PublicProps, Readonly<FormErrorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue812.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue772.DefineComponent<FormErrorProps, {}, {}, {}, {}, vue772.ComponentOptionsMixin, vue772.ComponentOptionsMixin, {}, string, vue772.PublicProps, Readonly<FormErrorProps> & Readonly<{}>, {}, {}, {}, {}, string, vue772.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useField as e}from"../../forms/core/context.js";import{provideFormFieldContext as t,useFormThemeContext as n}from"./context.js";import{computed as r,createElementBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c,unref as l}from"vue";var u=a({name:`FormField`,__name:`form-field`,props:{name:{}},setup(a){let u=a,d=n(),f=r(()=>d?.ui?.value?.field),{value:p,attrs:m,dirty:h,error:g,touched:_}=e(()=>u.name),{formFieldId:v,formDescriptionId:y,formErrorId:b}=t(),x=r(()=>g.value?`${y} ${b}`:y),S=r(()=>!!g.value);function C(e){p.value=e}return(e,t)=>(s(),i(`div`,{class:o(f.value)},[c(e.$slots,`default`,{modelValue:l(p),attrs:l(m),dirty:l(h),error:l(g),touched:l(_),formFieldId:l(v),formDescriptionId:l(y),formErrorId:l(b),ariaDescribedBy:x.value,ariaInvalid:S.value,updateModelValue:C})],2))}});export{u as default};
1
+ import{provideFormFieldContext as e,useFormFieldUi as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c}from"vue";const l=[`id`];var u=i({name:`FormField`,__name:`form-field`,props:{error:{},isFieldArray:{type:Boolean}},setup(i){let u=i,d=n(()=>u.isFieldArray?t(`field`).value:t(`fieldArray`).value),{formFieldId:f,ariaDescribedBy:p,ariaInvalid:m}=e({error:n(()=>u.error)});return(e,t)=>(o(),r(`div`,{id:i.isFieldArray?c(f):void 0,class:a(d.value)},[s(e.$slots,`default`,{formFieldId:c(f),ariaDescribedBy:c(p),ariaInvalid:c(m)})],10,l))}});export{u as default};
@@ -1,27 +1,16 @@
1
- import { FormErrors, FormFieldAttrs } from "../../forms/core/types.js";
2
- import "../../forms/index.js";
3
1
  import { FormFieldProps } from "./types.js";
4
- import * as vue792 from "vue";
2
+ import * as vue767 from "vue";
5
3
 
6
4
  //#region src/components/form/form-field.vue.d.ts
7
- declare function updateModelValue(val: any): void;
8
5
  declare var __VLS_1: {
9
- modelValue: any;
10
- attrs: FormFieldAttrs;
11
- dirty: boolean;
12
- error: string | string[] | FormErrors<any> | undefined;
13
- touched: boolean | undefined;
14
6
  formFieldId: string;
15
- formDescriptionId: string;
16
- formErrorId: string;
17
7
  ariaDescribedBy: string;
18
8
  ariaInvalid: boolean;
19
- updateModelValue: typeof updateModelValue;
20
9
  };
21
10
  type __VLS_Slots = {} & {
22
11
  default?: (props: typeof __VLS_1) => any;
23
12
  };
24
- declare const __VLS_base: vue792.DefineComponent<FormFieldProps, {}, {}, {}, {}, vue792.ComponentOptionsMixin, vue792.ComponentOptionsMixin, {}, string, vue792.PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, vue792.ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_base: vue767.DefineComponent<FormFieldProps, {}, {}, {}, {}, vue767.ComponentOptionsMixin, vue767.ComponentOptionsMixin, {}, string, vue767.PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, vue767.ComponentProvideOptions, false, {}, any>;
25
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
15
  declare const _default: typeof __VLS_export;
27
16
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import e from"../label/label.js";import{useFormFieldContext as t,useFormThemeContext as n}from"./context.js";import{computed as r,createBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";var d=a({name:`FormLabel`,__name:`form-label`,props:{for:{}},setup(a){let{formFieldId:d}=t(`FormLabel`),f=n(),p=r(()=>f?.ui?.value?.label);return(t,n)=>(s(),i(l(e),{for:l(d),class:o(p.value)},{default:u(()=>[c(t.$slots,`default`)]),_:3},8,[`for`,`class`]))}});export{d as default};
1
+ import e from"../label/label.js";import{useFormFieldContext as t,useFormFieldUi as n}from"./context.js";import{createBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";var u=i({name:`FormLabel`,__name:`form-label`,props:{for:{}},setup(i){let{formFieldId:u}=t(`FormLabel`),d=n(`label`);return(t,n)=>(o(),r(c(e),{for:c(u),class:a(c(d))},{default:l(()=>[s(t.$slots,`default`)]),_:3},8,[`for`,`class`]))}});export{u as default};
@@ -1,12 +1,12 @@
1
1
  import { FormLabelProps } from "./types.js";
2
- import * as vue807 from "vue";
2
+ import * as vue762 from "vue";
3
3
 
4
4
  //#region src/components/form/form-label.vue.d.ts
5
5
  declare var __VLS_8: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_8) => any;
8
8
  };
9
- declare const __VLS_base: vue807.DefineComponent<FormLabelProps, {}, {}, {}, {}, vue807.ComponentOptionsMixin, vue807.ComponentOptionsMixin, {}, string, vue807.PublicProps, Readonly<FormLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue807.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue762.DefineComponent<FormLabelProps, {}, {}, {}, {}, vue762.ComponentOptionsMixin, vue762.ComponentOptionsMixin, {}, string, vue762.PublicProps, Readonly<FormLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue762.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,8 +1,10 @@
1
- import { FormDescriptionProps, FormErrorProps, FormFieldArrayProps, FormFieldProps, FormFieldThemeSlot, FormFieldUi, FormLabelProps } from "./types.js";
1
+ import { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps } from "./types.js";
2
2
  import { _default as _default$2 } from "./form-field.vue.js";
3
- import { _default as _default$3 } from "./form-field-array.vue.js";
4
- import { _default as _default$4 } from "./form-label.vue.js";
3
+ import { _default as _default$3 } from "./form-label.vue.js";
5
4
  import { _default } from "./form-description.vue.js";
6
5
  import { _default as _default$1 } from "./form-error.vue.js";
7
- import { provideFormThemeContext } from "./context.js";
8
- export { _default as FormDescription, type FormDescriptionProps, _default$1 as FormError, type FormErrorProps, _default$2 as FormField, _default$3 as FormFieldArray, type FormFieldArrayProps, type FormFieldProps, type FormFieldThemeSlot, type FormFieldUi, _default$4 as FormLabel, type FormLabelProps, provideFormThemeContext };
6
+ import { provideFormFieldUi } from "./context.js";
7
+ import { FormFieldArrayStates, FormFieldState, FormRegisterOptions, FormResetState, FormValues, InferStandardSchemaInput, UseFormOptions } from "./core/types.js";
8
+ import { useForm } from "./core/use-form.js";
9
+ import { StandardSchemaV1 } from "@standard-schema/spec";
10
+ export { _default as FormDescription, type FormDescriptionProps, _default$1 as FormError, type FormErrorProps, _default$2 as FormField, type FormFieldArrayStates, type FormFieldProps, type FormFieldState, type FormFieldUi, type FormFieldUiSlot, _default$3 as FormLabel, type FormLabelProps, type FormRegisterOptions, type FormResetState, type FormValues, type InferStandardSchemaInput, type StandardSchemaV1, type UseFormOptions, provideFormFieldUi, useForm };
@@ -1 +1 @@
1
- import{provideFormThemeContext as e}from"./context.js";import t from"./form-field.js";import n from"./form-field-array.js";import r from"./form-label.js";import i from"./form-description.js";import a from"./form-error.js";export{i as FormDescription,a as FormError,t as FormField,n as FormFieldArray,r as FormLabel,e as provideFormThemeContext};
1
+ import{provideFormFieldUi as e}from"./context.js";import t from"./form-field.js";import n from"./form-label.js";import r from"./form-description.js";import i from"./form-error.js";import{useForm as a}from"./core/use-form.js";export{r as FormDescription,i as FormError,t as FormField,n as FormLabel,e as provideFormFieldUi,a as useForm};
@@ -1,22 +1,17 @@
1
- import { ClassValue } from "../../types/common.js";
1
+ import { UiClass } from "../../types/common.js";
2
2
  import "../../types/index.js";
3
3
  import { LabelProps } from "../label/types.js";
4
4
  import { ComputedRef, HTMLAttributes } from "vue";
5
5
 
6
6
  //#region src/components/form/types.d.ts
7
7
  interface FormFieldProps extends /** @vue-ignore */HTMLAttributes {
8
- name: string;
9
- }
10
- interface FormFieldArrayProps extends /** @vue-ignore */HTMLAttributes {
11
- name: string;
8
+ error?: string;
9
+ isFieldArray?: boolean;
12
10
  }
13
11
  interface FormLabelProps extends LabelProps {}
14
12
  interface FormDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
15
13
  interface FormErrorProps extends /** @vue-ignore */HTMLAttributes {}
16
- type FormFieldThemeSlot = 'field' | 'fieldArray' | 'label' | 'description' | 'error';
17
- type FormFieldUi = Record<FormFieldThemeSlot, ClassValue>;
18
- interface FormThemeParams {
19
- ui?: ComputedRef<FormFieldUi>;
20
- }
14
+ type FormFieldUiSlot = 'field' | 'fieldArray' | 'label' | 'description' | 'error';
15
+ type FormFieldUi = UiClass<FormFieldUiSlot>;
21
16
  //#endregion
22
- export { FormDescriptionProps, FormErrorProps, FormFieldArrayProps, FormFieldProps, FormFieldThemeSlot, FormFieldUi, FormLabelProps, FormThemeParams };
17
+ export { FormDescriptionProps, FormErrorProps, FormFieldProps, FormFieldUi, FormFieldUiSlot, FormLabelProps };
@@ -1,6 +1,9 @@
1
- import { InputThemeContextParams } from "./types.js";
1
+ import { ClassValue, UiClass } from "../../types/common.js";
2
+ import { InputUiSlot } from "./types.js";
3
+ import "../../index.js";
4
+ import * as vue124 from "vue";
2
5
 
3
6
  //#region src/components/input/context.d.ts
4
- declare const provideInputThemeContext: (params: InputThemeContextParams) => InputThemeContextParams, useInputThemeContext: <N extends string | null | undefined = undefined>(consumerName?: N | undefined, defaultValue?: InputThemeContextParams | undefined) => N extends null | undefined ? InputThemeContextParams | null : InputThemeContextParams;
7
+ declare const provideInputUi: (ui: vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>) => vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>, useInputUi: <S extends InputUiSlot | undefined = undefined>(slot?: S | undefined) => S extends InputUiSlot ? vue124.ComputedRef<ClassValue> : vue124.ComputedRef<Partial<UiClass<InputUiSlot>>>;
5
8
  //#endregion
6
- export { provideInputThemeContext };
9
+ export { provideInputUi };
@@ -1 +1 @@
1
- import{useContext as e}from"../../composables/use-context.js";const[t,n]=e(`InputRoot`,e=>e),[r,i]=e(`InputTheme`,e=>e);export{t as provideInputRootContext,r as provideInputThemeContext,n as useInputRootContext,i as useInputThemeContext};
1
+ import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";const[n,r]=e(`InputRoot`,e=>e),[i,a]=t(`InputUi`);export{n as provideInputRootContext,i as provideInputUi,r as useInputRootContext,a as useInputUi};
@@ -1,5 +1,5 @@
1
- import { InputControlProps, InputRootEmits, InputRootProps, InputThemeSlot, InputUi } from "./types.js";
1
+ import { InputControlProps, InputRootEmits, InputRootProps, InputUi, InputUiSlot } from "./types.js";
2
2
  import { _default as _default$1 } from "./input-root.vue.js";
3
3
  import { _default } from "./input-control.vue.js";
4
- import { provideInputThemeContext } from "./context.js";
5
- export { _default as InputControl, type InputControlProps, _default$1 as InputRoot, type InputRootEmits, type InputRootProps, type InputThemeSlot, type InputUi, provideInputThemeContext };
4
+ import { provideInputUi } from "./context.js";
5
+ export { _default as InputControl, type InputControlProps, _default$1 as InputRoot, type InputRootEmits, type InputRootProps, type InputUi, type InputUiSlot, provideInputUi };
@@ -1 +1 @@
1
- import{provideInputThemeContext as e}from"./context.js";import t from"./input-root.js";import n from"./input-control.js";export{n as InputControl,t as InputRoot,e as provideInputThemeContext};
1
+ import{provideInputUi as e}from"./context.js";import t from"./input-root.js";import n from"./input-control.js";export{n as InputControl,t as InputRoot,e as provideInputUi};
@@ -1 +1 @@
1
- import{useInputRootContext as e,useInputThemeContext as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,unref as s}from"vue";const c=[`id`,`aria-disabled`,`aria-valuenow`,`autofocus`,`data-disabled`,`data-readonly`,`disabled`,`maxlength`,`minlength`,`pattern`,`placeholder`,`readonly`,`value`];var l=i({name:`InputControl`,__name:`input-control`,setup(i){let{modelValue:l,id:u,autofocus:d,placeholder:f,disabled:p,readonly:m,maxlength:h,minlength:g,pattern:_}=e(`InputControl`),v=t(),y=n(()=>v?.ui?.value?.control),b=e=>{l.value=e.target.value};return(e,t)=>(o(),r(`input`,{id:s(u),class:a(y.value),"aria-disabled":s(p)??void 0,"aria-roledescription":`Input`,"aria-valuenow":s(l)??void 0,autocorrect:`off`,autofocus:s(d),"data-disabled":s(p)?``:void 0,"data-readonly":s(m)?``:void 0,disabled:s(p),maxlength:s(h),minlength:s(g),pattern:s(_),placeholder:s(f),readonly:s(m),spellcheck:`false`,tabindex:`0`,value:s(l),onInput:b},null,42,c))}});export{l as default};
1
+ import{useInputRootContext as e,useInputUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,unref as o}from"vue";const s=[`id`,`aria-disabled`,`aria-valuenow`,`autofocus`,`data-disabled`,`data-readonly`,`disabled`,`maxlength`,`minlength`,`pattern`,`placeholder`,`readonly`,`name`,`required`,`value`];var c=r({name:`InputControl`,__name:`input-control`,setup(r){let{modelValue:c,id:l,autofocus:u,placeholder:d,disabled:f,readonly:p,maxlength:m,minlength:h,pattern:g,name:_,required:v}=e(`InputControl`),y=t(`control`),b=e=>{c.value=e.target.value};return(e,t)=>(a(),n(`input`,{id:o(l),class:i(o(y)),"aria-disabled":o(f)??void 0,"aria-roledescription":`Input`,"aria-valuenow":o(c)??void 0,autocorrect:`off`,autofocus:o(u),"data-disabled":o(f)?``:void 0,"data-readonly":o(p)?``:void 0,disabled:o(f),maxlength:o(m),minlength:o(h),pattern:o(g),placeholder:o(d),readonly:o(p),name:o(_),required:o(v),spellcheck:`false`,tabindex:`0`,value:o(c),onInput:b},null,42,s))}});export{c as default};
@@ -1,8 +1,8 @@
1
1
  import { InputControlProps } from "./types.js";
2
- import * as vue758 from "vue";
2
+ import * as vue119 from "vue";
3
3
 
4
4
  //#region src/components/input/input-control.vue.d.ts
5
- declare const __VLS_export: vue758.DefineComponent<InputControlProps, {}, {}, {}, {}, vue758.ComponentOptionsMixin, vue758.ComponentOptionsMixin, {}, string, vue758.PublicProps, Readonly<InputControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue758.ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: vue119.DefineComponent<InputControlProps, {}, {}, {}, {}, vue119.ComponentOptionsMixin, vue119.ComponentOptionsMixin, {}, string, vue119.PublicProps, Readonly<InputControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue119.ComponentProvideOptions, false, {}, any>;
6
6
  declare const _default: typeof __VLS_export;
7
7
  //#endregion
8
8
  export { _default };
@@ -1 +1 @@
1
- import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import i from"../visually-hidden/visually-hidden-input.js";import{provideInputRootContext as a,useInputThemeContext as o}from"./context.js";import{computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,defineComponent as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h}from"vue";const g=[`data-disabled`,`data-readonly`];var _=d({name:`InputRoot`,__name:`input-root`,props:{defaultValue:{},modelValue:{default:void 0},id:{},autofocus:{type:Boolean},disabled:{type:Boolean},maxlength:{},minlength:{},pattern:{},placeholder:{},readonly:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(d,{emit:_}){let v=d,y=_,[b,x]=r(),S=o(),C=s(()=>S?.ui?.value?.root),w=n(()=>v.modelValue,e=>{y(`update:modelValue`,e)},v.defaultValue),T=s(()=>e(b.value)),E=()=>{w.value=``};return a({...t(v,[`id`,`autofocus`,`placeholder`,`disabled`,`readonly`,`maxlength`,`minlength`,`pattern`]),modelValue:w}),(e,t)=>(p(),u(`div`,{ref:h(x),class:f(C.value),role:`group`,"data-disabled":d.disabled?``:void 0,"data-readonly":d.readonly?``:void 0},[m(e.$slots,`default`,{modelValue:h(w),clear:E}),T.value&&d.name?(p(),c(i,{key:0,type:`text`,value:h(w),name:d.name,disabled:d.disabled,readonly:d.readonly,required:d.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):l(`v-if`,!0)],10,g))}});export{_ as default};
1
+ import{isFormControl as e,transformPropsToContext as t}from"../../shared/vue.js";import{useControllableState as n}from"../../composables/use-controllable-state.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import i from"../visually-hidden/visually-hidden-input.js";import{provideInputRootContext as a,useInputUi as o}from"./context.js";import{computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,defineComponent as d,normalizeClass as f,openBlock as p,renderSlot as m,unref as h}from"vue";const g=[`data-disabled`,`data-readonly`];var _=d({name:`InputRoot`,__name:`input-root`,props:{defaultValue:{},modelValue:{default:void 0},id:{},autofocus:{type:Boolean},disabled:{type:Boolean},maxlength:{},minlength:{},pattern:{},placeholder:{},readonly:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(d,{emit:_}){let v=d,y=_,[b,x]=r(),S=o(`root`),C=n(()=>v.modelValue,e=>{y(`update:modelValue`,e)},v.defaultValue),w=s(()=>e(b.value)),T=()=>{C.value=``};return a({...t(v,[`id`,`autofocus`,`placeholder`,`disabled`,`readonly`,`maxlength`,`minlength`,`pattern`,`name`,`required`]),modelValue:C}),(e,t)=>(p(),u(`div`,{ref:h(x),class:f(h(S)),role:`group`,"data-disabled":d.disabled?``:void 0,"data-readonly":d.readonly?``:void 0},[m(e.$slots,`default`,{modelValue:h(C),clear:T}),w.value&&d.name?(p(),c(i,{key:0,type:`text`,value:h(C),name:d.name,disabled:d.disabled,readonly:d.readonly,required:d.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):l(`v-if`,!0)],10,g))}});export{_ as default};
@@ -1,5 +1,5 @@
1
1
  import { InputRootProps } from "./types.js";
2
- import * as vue753 from "vue";
2
+ import * as vue114 from "vue";
3
3
 
4
4
  //#region src/components/input/input-root.vue.d.ts
5
5
  declare var __VLS_1: {
@@ -9,13 +9,13 @@ declare var __VLS_1: {
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
- declare const __VLS_base: vue753.DefineComponent<InputRootProps, {}, {}, {}, {}, vue753.ComponentOptionsMixin, vue753.ComponentOptionsMixin, {
12
+ declare const __VLS_base: vue114.DefineComponent<InputRootProps, {}, {}, {}, {}, vue114.ComponentOptionsMixin, vue114.ComponentOptionsMixin, {
13
13
  "update:modelValue": (value: string) => any;
14
- }, string, vue753.PublicProps, Readonly<InputRootProps> & Readonly<{
14
+ }, string, vue114.PublicProps, Readonly<InputRootProps> & Readonly<{
15
15
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
16
16
  }>, {
17
17
  modelValue: string;
18
- }, {}, {}, {}, string, vue753.ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, vue114.ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
21
21
  type __VLS_WithSlots<T, S> = T & {
@@ -1,7 +1,7 @@
1
- import { ClassValue } from "../../types/common.js";
1
+ import { UiClass } from "../../types/common.js";
2
2
  import { FormFieldCommonProps } from "../../types/component.js";
3
3
  import "../../types/index.js";
4
- import { ComputedRef, HTMLAttributes, InputHTMLAttributes, ShallowRef } from "vue";
4
+ import { HTMLAttributes, InputHTMLAttributes, ShallowRef } from "vue";
5
5
 
6
6
  //#region src/components/input/types.d.ts
7
7
  interface InputBaseProps {
@@ -32,10 +32,7 @@ type InputRootEmits = {
32
32
  'update:modelValue': [value: string];
33
33
  };
34
34
  interface InputControlProps extends /** @vue-ignore */InputHTMLAttributes {}
35
- type InputThemeSlot = 'root' | 'control';
36
- type InputUi = Record<InputThemeSlot, ClassValue>;
37
- interface InputThemeContextParams {
38
- ui: ComputedRef<InputUi>;
39
- }
35
+ type InputUiSlot = 'root' | 'control';
36
+ type InputUi = UiClass<InputUiSlot>;
40
37
  //#endregion
41
- export { InputBaseProps, InputControlProps, InputRootEmits, InputRootProps, InputThemeContextParams, InputThemeSlot, InputUi };
38
+ export { InputBaseProps, InputControlProps, InputRootEmits, InputRootProps, InputUi, InputUiSlot };
@@ -1,12 +1,12 @@
1
1
  import { KbdProps } from "./types.js";
2
- import * as vue817 from "vue";
2
+ import * as vue38 from "vue";
3
3
 
4
4
  //#region src/components/kbd/kbd.vue.d.ts
5
5
  declare var __VLS_1: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
- declare const __VLS_base: vue817.DefineComponent<KbdProps, {}, {}, {}, {}, vue817.ComponentOptionsMixin, vue817.ComponentOptionsMixin, {}, string, vue817.PublicProps, Readonly<KbdProps> & Readonly<{}>, {}, {}, {}, {}, string, vue817.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue38.DefineComponent<KbdProps, {}, {}, {}, {}, vue38.ComponentOptionsMixin, vue38.ComponentOptionsMixin, {}, string, vue38.PublicProps, Readonly<KbdProps> & Readonly<{}>, {}, {}, {}, {}, string, vue38.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,12 +1,12 @@
1
1
  import { LabelProps } from "./types.js";
2
- import * as vue23 from "vue";
2
+ import * as vue28 from "vue";
3
3
 
4
4
  //#region src/components/label/label.vue.d.ts
5
5
  declare var __VLS_1: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
- declare const __VLS_base: vue23.DefineComponent<LabelProps, {}, {}, {}, {}, vue23.ComponentOptionsMixin, vue23.ComponentOptionsMixin, {}, string, vue23.PublicProps, Readonly<LabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue23.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue28.DefineComponent<LabelProps, {}, {}, {}, {}, vue28.ComponentOptionsMixin, vue28.ComponentOptionsMixin, {}, string, vue28.PublicProps, Readonly<LabelProps> & Readonly<{}>, {}, {}, {}, {}, string, vue28.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,8 +1,10 @@
1
- import { LayoutThemeContextParams } from "./types.js";
2
- import "vue";
1
+ import { ClassValue, UiClass } from "../../types/common.js";
2
+ import { LayoutUiSlot } from "./types.js";
3
+ import "../../index.js";
4
+ import * as vue1257 from "vue";
3
5
 
4
6
  //#region src/components/layout/context.d.ts
5
7
 
6
- declare const provideLayoutThemeContext: (params: LayoutThemeContextParams) => LayoutThemeContextParams, useLayoutThemeContext: <N extends string | null | undefined = undefined>(consumerName?: N | undefined, defaultValue?: LayoutThemeContextParams | undefined) => N extends null | undefined ? LayoutThemeContextParams | null : LayoutThemeContextParams;
8
+ declare const provideLayoutUi: (ui: vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>) => vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>, useLayoutUi: <S extends LayoutUiSlot | undefined = undefined>(slot?: S | undefined) => S extends LayoutUiSlot ? vue1257.ComputedRef<ClassValue> : vue1257.ComputedRef<Partial<UiClass<LayoutUiSlot>>>;
7
9
  //#endregion
8
- export { provideLayoutThemeContext };
10
+ export { provideLayoutUi };
@@ -1 +1 @@
1
- import{useContext as e}from"../../composables/use-context.js";const[t,n]=e(`LayoutRoot`,e=>{let{open:t,isMobile:n,mobileOpen:r}=e,i=e=>{t.value=e},a=e=>{r.value=e},o=()=>{n.value?r.value=!r.value:t.value=!t.value};return{...e,onOpenChange:i,onMobileOpenChange:a,toggleSidebar:o}}),[r,i]=e(`LayoutTheme`,e=>e);export{t as provideLayoutRootContext,r as provideLayoutThemeContext,n as useLayoutRootContext,i as useLayoutThemeContext};
1
+ import{useContext as e}from"../../composables/use-context.js";import{useUiContext as t}from"../../composables/use-ui-context.js";const[n,r]=e(`LayoutRoot`,e=>{let{open:t,isMobile:n,mobileOpen:r}=e,i=e=>{t.value=e},a=e=>{r.value=e},o=()=>{n.value?r.value=!r.value:t.value=!t.value};return{...e,onOpenChange:i,onMobileOpenChange:a,toggleSidebar:o}}),[i,a]=t(`LayoutUi`);export{n as provideLayoutRootContext,i as provideLayoutUi,r as useLayoutRootContext,a as useLayoutUi};
@@ -1,4 +1,4 @@
1
- import { LayoutCollapsible, LayoutFooterProps, LayoutHeaderProps, LayoutMainProps, LayoutMobileProps, LayoutRailProps, LayoutRootEmits, LayoutRootProps, LayoutSide, LayoutSidebarProps, LayoutSidebarState, LayoutTabProps, LayoutThemeSlot, LayoutTriggerProps, LayoutUi, LayoutVariant } from "./types.js";
1
+ import { LayoutCollapsible, LayoutFooterProps, LayoutHeaderProps, LayoutMainProps, LayoutMobileProps, LayoutRailProps, LayoutRootEmits, LayoutRootProps, LayoutSide, LayoutSidebarProps, LayoutSidebarState, LayoutTabProps, LayoutTriggerProps, LayoutUi, LayoutUiSlot, LayoutVariant } from "./types.js";
2
2
  import { _default as _default$5 } from "./layout-root.vue.js";
3
3
  import { _default as _default$6 } from "./layout-sidebar.vue.js";
4
4
  import { _default as _default$1 } from "./layout-header.vue.js";
@@ -8,5 +8,5 @@ import { _default } from "./layout-footer.vue.js";
8
8
  import { _default as _default$4 } from "./layout-rail.vue.js";
9
9
  import { _default as _default$8 } from "./layout-trigger.vue.js";
10
10
  import { _default as _default$3 } from "./layout-mobile.vue.js";
11
- import { provideLayoutThemeContext } from "./context.js";
12
- export { type LayoutCollapsible, _default as LayoutFooter, type LayoutFooterProps, _default$1 as LayoutHeader, type LayoutHeaderProps, _default$2 as LayoutMain, type LayoutMainProps, _default$3 as LayoutMobile, type LayoutMobileProps, _default$4 as LayoutRail, type LayoutRailProps, _default$5 as LayoutRoot, type LayoutRootEmits, type LayoutRootProps, type LayoutSide, _default$6 as LayoutSidebar, type LayoutSidebarProps, type LayoutSidebarState, _default$7 as LayoutTab, type LayoutTabProps, type LayoutThemeSlot, _default$8 as LayoutTrigger, type LayoutTriggerProps, type LayoutUi, type LayoutVariant, provideLayoutThemeContext };
11
+ import { provideLayoutUi } from "./context.js";
12
+ export { type LayoutCollapsible, _default as LayoutFooter, type LayoutFooterProps, _default$1 as LayoutHeader, type LayoutHeaderProps, _default$2 as LayoutMain, type LayoutMainProps, _default$3 as LayoutMobile, type LayoutMobileProps, _default$4 as LayoutRail, type LayoutRailProps, _default$5 as LayoutRoot, type LayoutRootEmits, type LayoutRootProps, type LayoutSide, _default$6 as LayoutSidebar, type LayoutSidebarProps, type LayoutSidebarState, _default$7 as LayoutTab, type LayoutTabProps, _default$8 as LayoutTrigger, type LayoutTriggerProps, type LayoutUi, type LayoutUiSlot, type LayoutVariant, provideLayoutUi };
@@ -1 +1 @@
1
- import{provideLayoutThemeContext as e}from"./context.js";import t from"./layout-root.js";import n from"./layout-mobile.js";import r from"./layout-sidebar.js";import i from"./layout-header.js";import a from"./layout-main.js";import o from"./layout-tab.js";import s from"./layout-footer.js";import c from"./layout-rail.js";import l from"./layout-trigger.js";export{s as LayoutFooter,i as LayoutHeader,a as LayoutMain,n as LayoutMobile,c as LayoutRail,t as LayoutRoot,r as LayoutSidebar,o as LayoutTab,l as LayoutTrigger,e as provideLayoutThemeContext};
1
+ import{provideLayoutUi as e}from"./context.js";import t from"./layout-root.js";import n from"./layout-mobile.js";import r from"./layout-sidebar.js";import i from"./layout-header.js";import a from"./layout-main.js";import o from"./layout-tab.js";import s from"./layout-footer.js";import c from"./layout-rail.js";import l from"./layout-trigger.js";export{s as LayoutFooter,i as LayoutHeader,a as LayoutMain,n as LayoutMobile,c as LayoutRail,t as LayoutRoot,r as LayoutSidebar,o as LayoutTab,l as LayoutTrigger,e as provideLayoutUi};
@@ -1 +1 @@
1
- import{useLayoutThemeContext as e}from"./context.js";import{computed as t,createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o}from"vue";var s=r({name:`LayoutFooter`,__name:`layout-footer`,setup(r){let s=e(),c=t(()=>s?.ui?.value?.footer);return(e,t)=>(a(),n(`div`,{class:i(c.value)},[o(e.$slots,`default`)],2))}});export{s as default};
1
+ import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutFooter`,__name:`layout-footer`,setup(n){let s=e(`footer`);return(e,n)=>(i(),t(`div`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
@@ -1,12 +1,12 @@
1
1
  import { LayoutFooterProps } from "./types.js";
2
- import * as vue1232 from "vue";
2
+ import * as vue1237 from "vue";
3
3
 
4
4
  //#region src/components/layout/layout-footer.vue.d.ts
5
5
  declare var __VLS_1: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_1) => any;
8
8
  };
9
- declare const __VLS_base: vue1232.DefineComponent<LayoutFooterProps, {}, {}, {}, {}, vue1232.ComponentOptionsMixin, vue1232.ComponentOptionsMixin, {}, string, vue1232.PublicProps, Readonly<LayoutFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1232.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue1237.DefineComponent<LayoutFooterProps, {}, {}, {}, {}, vue1237.ComponentOptionsMixin, vue1237.ComponentOptionsMixin, {}, string, vue1237.PublicProps, Readonly<LayoutFooterProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1237.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useLayoutThemeContext as e}from"./context.js";import{computed as t,createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o}from"vue";var s=r({name:`LayoutHeader`,__name:`layout-header`,setup(r){let s=e(),c=t(()=>s?.ui?.value?.header);return(e,t)=>(a(),n(`header`,{class:i(c.value)},[o(e.$slots,`default`)],2))}});export{s as default};
1
+ import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutHeader`,__name:`layout-header`,setup(n){let s=e(`header`);return(e,n)=>(i(),t(`header`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
@@ -1 +1 @@
1
- import{useLayoutThemeContext as e}from"./context.js";import{computed as t,createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o}from"vue";var s=r({name:`LayoutMain`,__name:`layout-main`,setup(r){let s=e(),c=t(()=>s?.ui?.value?.main);return(e,t)=>(a(),n(`main`,{class:i(c.value)},[o(e.$slots,`default`)],2))}});export{s as default};
1
+ import{useLayoutUi as e}from"./context.js";import{createElementBlock as t,defineComponent as n,normalizeClass as r,openBlock as i,renderSlot as a,unref as o}from"vue";var s=n({name:`LayoutMain`,__name:`layout-main`,setup(n){let s=e(`main`);return(e,n)=>(i(),t(`main`,{class:r(o(s))},[a(e.$slots,`default`)],2))}});export{s as default};
@@ -1 +1 @@
1
- import e from"../portal/portal.js";import t from"../dialog/dialog-root.js";import n from"../dialog/dialog-overlay.js";import r from"../dialog/dialog-content.js";import{useLayoutRootContext as i,useLayoutThemeContext as a}from"./context.js";import{computed as o,createBlock as s,createElementVNode as c,createVNode as l,defineComponent as u,mergeProps as d,normalizeClass as f,normalizeStyle as p,openBlock as m,renderSlot as h,unref as g,useAttrs as _,withCtx as v}from"vue";var y=u({name:`LayoutMobile`,inheritAttrs:!1,__name:`layout-mobile`,setup(u){let y=_(),{mobileOpen:b,mobileStyle:x,onMobileOpenChange:S}=i(`LayoutMobile`),C=a(),w=o(()=>C?.ui?.value??{});return(i,a)=>(m(),s(g(t),{open:g(b),"onUpdate:open":g(S)},{default:v(()=>[l(g(e),null,{default:v(()=>[l(g(n),{class:f(w.value.mobileOverlay)},null,8,[`class`]),l(g(r),{class:f(w.value.mobileDrawer),style:p(g(x))},{default:v(()=>[c(`div`,d(g(y),{class:w.value.mobile,"data-sidebar":`sidebar`,"data-mobile":``}),[h(i.$slots,`default`)],16)]),_:3},8,[`class`,`style`])]),_:3})]),_:3},8,[`open`,`onUpdate:open`]))}});export{y as default};
1
+ import e from"../portal/portal.js";import t from"../dialog/dialog-root.js";import n from"../dialog/dialog-overlay.js";import r from"../dialog/dialog-content.js";import{useLayoutRootContext as i,useLayoutUi as a}from"./context.js";import{layoutCssVars as o}from"./shared.js";import{computed as s,createBlock as c,createElementVNode as l,createVNode as u,defineComponent as d,mergeProps as f,normalizeClass as p,normalizeStyle as m,openBlock as h,renderSlot as g,unref as _,useAttrs as v,withCtx as y}from"vue";var b=d({name:`LayoutMobile`,inheritAttrs:!1,__name:`layout-mobile`,setup(d){let b=v(),{mobileOpen:x,mobileSidebarWidth:S,onMobileOpenChange:C}=i(`LayoutMobile`),w=a(),T=s(()=>({[o.sidebarWidth]:`${S.value}rem`}));return(i,a)=>(h(),c(_(t),{open:_(x),"onUpdate:open":_(C)},{default:y(()=>[u(_(e),null,{default:y(()=>[u(_(n),{class:p(_(w).mobileOverlay)},null,8,[`class`]),u(_(r),{class:p(_(w).mobileDrawer),style:m(T.value)},{default:y(()=>[l(`div`,f(_(b),{class:_(w).mobile,"data-sidebar":`sidebar`,"data-mobile":``}),[g(i.$slots,`default`)],16)]),_:3},8,[`class`,`style`])]),_:3})]),_:3},8,[`open`,`onUpdate:open`]))}});export{b as default};
@@ -1,12 +1,12 @@
1
1
  import { LayoutMobileProps } from "./types.js";
2
- import * as vue1217 from "vue";
2
+ import * as vue1252 from "vue";
3
3
 
4
4
  //#region src/components/layout/layout-mobile.vue.d.ts
5
5
  declare var __VLS_27: {};
6
6
  type __VLS_Slots = {} & {
7
7
  default?: (props: typeof __VLS_27) => any;
8
8
  };
9
- declare const __VLS_base: vue1217.DefineComponent<LayoutMobileProps, {}, {}, {}, {}, vue1217.ComponentOptionsMixin, vue1217.ComponentOptionsMixin, {}, string, vue1217.PublicProps, Readonly<LayoutMobileProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1217.ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: vue1252.DefineComponent<LayoutMobileProps, {}, {}, {}, {}, vue1252.ComponentOptionsMixin, vue1252.ComponentOptionsMixin, {}, string, vue1252.PublicProps, Readonly<LayoutMobileProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1252.ComponentProvideOptions, false, {}, any>;
10
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
11
  declare const _default: typeof __VLS_export;
12
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useLayoutRootContext as e,useLayoutThemeContext as t}from"./context.js";import{computed as n,createElementBlock as r,defineComponent as i,normalizeClass as a,openBlock as o,renderSlot as s,unref as c}from"vue";var l=i({name:`LayoutRail`,__name:`layout-rail`,setup(i){let{toggleSidebar:l}=e(`LayoutRail`),u=t(),d=n(()=>u?.ui?.value?.rail);return(e,t)=>(o(),r(`button`,{class:a(d.value),"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabindex:-1,title:`Toggle Sidebar`,onClick:t[0]||=(...e)=>c(l)&&c(l)(...e)},[s(e.$slots,`default`)],2))}});export{l as default};
1
+ import{useLayoutRootContext as e,useLayoutUi as t}from"./context.js";import{createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o,unref as s}from"vue";var c=r({name:`LayoutRail`,__name:`layout-rail`,setup(r){let{toggleSidebar:c}=e(`LayoutRail`),l=t(`rail`);return(e,t)=>(a(),n(`button`,{class:i(s(l)),"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabindex:-1,title:`Toggle Sidebar`,onClick:t[0]||=(...e)=>s(c)&&s(c)(...e)},[o(e.$slots,`default`)],2))}});export{c as default};