@groupteknology/vuno 1.0.1 → 2.0.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 (481) hide show
  1. package/README.md +53 -27
  2. package/dist/module.d.mts +2 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +33 -12
  5. package/dist/runtime/app/assets/css/dialog.css +1 -1
  6. package/dist/runtime/app/assets/css/stylesheet.css +1 -0
  7. package/dist/runtime/app/assets/css/theme.css +1 -1
  8. package/dist/runtime/app/assets/css/tokens.css +1 -1
  9. package/dist/runtime/app/components/Alert/Alert.d.vue.ts +20 -0
  10. package/dist/runtime/app/components/Alert/Alert.theme.d.ts +13 -0
  11. package/dist/runtime/app/components/Alert/Alert.theme.js +13 -0
  12. package/dist/runtime/app/components/Alert/Alert.vue +59 -0
  13. package/dist/runtime/app/components/Alert/Alert.vue.d.ts +20 -0
  14. package/dist/runtime/app/components/{overlays → App}/App.d.vue.ts +4 -5
  15. package/dist/runtime/app/components/{overlays → App}/App.vue +8 -12
  16. package/dist/runtime/app/components/{overlays → App}/App.vue.d.ts +4 -5
  17. package/dist/runtime/app/components/App/internal/Overlay/Overlay.d.vue.ts +7 -0
  18. package/dist/runtime/app/components/{overlays → App/internal/Overlay}/Overlay.vue +5 -6
  19. package/dist/runtime/app/components/App/internal/Overlay/Overlay.vue.d.ts +7 -0
  20. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.d.vue.ts +8 -0
  21. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue +19 -0
  22. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue.d.ts +8 -0
  23. package/dist/runtime/app/components/{overlays → App/internal/Toast}/Toast.d.vue.ts +3 -3
  24. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.d.ts +13 -0
  25. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.js +18 -0
  26. package/dist/runtime/app/components/{overlays → App/internal/Toast}/Toast.vue +3 -2
  27. package/dist/runtime/app/components/{overlays → App/internal/Toast}/Toast.vue.d.ts +3 -3
  28. package/dist/runtime/app/components/{overlays → App/internal/Toaster}/Toaster.d.vue.ts +3 -3
  29. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.d.ts +15 -0
  30. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.js +16 -0
  31. package/dist/runtime/app/components/{overlays → App/internal/Toaster}/Toaster.vue +3 -2
  32. package/dist/runtime/app/components/{overlays → App/internal/Toaster}/Toaster.vue.d.ts +3 -3
  33. package/dist/runtime/app/components/{actions → Avatar}/Avatar.d.vue.ts +9 -5
  34. package/dist/runtime/app/components/Avatar/Avatar.theme.d.ts +30 -0
  35. package/dist/runtime/app/components/Avatar/Avatar.theme.js +22 -0
  36. package/dist/runtime/app/components/{actions → Avatar}/Avatar.vue +7 -5
  37. package/dist/runtime/app/components/{actions → Avatar}/Avatar.vue.d.ts +9 -5
  38. package/dist/runtime/app/components/{actions → Badge}/Badge.d.vue.ts +9 -5
  39. package/dist/runtime/app/components/Badge/Badge.theme.d.ts +40 -0
  40. package/dist/runtime/app/components/Badge/Badge.theme.js +22 -0
  41. package/dist/runtime/app/components/{actions → Badge}/Badge.vue +3 -0
  42. package/dist/runtime/app/components/{actions → Badge}/Badge.vue.d.ts +9 -5
  43. package/dist/runtime/app/components/{actions → Button}/Button.d.vue.ts +10 -6
  44. package/dist/runtime/app/components/Button/Button.theme.d.ts +88 -0
  45. package/dist/runtime/app/components/Button/Button.theme.js +59 -0
  46. package/dist/runtime/app/components/{actions → Button}/Button.vue +10 -3
  47. package/dist/runtime/app/components/{actions → Button}/Button.vue.d.ts +10 -6
  48. package/dist/runtime/app/components/{structure → Card}/Card.d.vue.ts +9 -5
  49. package/dist/runtime/app/components/Card/Card.theme.d.ts +57 -0
  50. package/dist/runtime/app/components/Card/Card.theme.js +62 -0
  51. package/dist/runtime/app/components/{structure → Card}/Card.vue +3 -1
  52. package/dist/runtime/app/components/{structure → Card}/Card.vue.d.ts +9 -5
  53. package/dist/runtime/app/components/Code/Code.d.vue.ts +19 -0
  54. package/dist/runtime/app/components/Code/Code.theme.d.ts +11 -0
  55. package/dist/runtime/app/components/Code/Code.theme.js +12 -0
  56. package/dist/runtime/app/components/Code/Code.vue +109 -0
  57. package/dist/runtime/app/components/Code/Code.vue.d.ts +19 -0
  58. package/dist/runtime/app/components/{overlays → Confirm}/Confirm.d.vue.ts +2 -2
  59. package/dist/runtime/app/components/Confirm/Confirm.theme.d.ts +12 -0
  60. package/dist/runtime/app/components/Confirm/Confirm.theme.js +13 -0
  61. package/dist/runtime/app/components/{overlays → Confirm}/Confirm.vue +10 -5
  62. package/dist/runtime/app/components/{overlays → Confirm}/Confirm.vue.d.ts +2 -2
  63. package/dist/runtime/app/components/{structure → Container}/Container.d.vue.ts +5 -5
  64. package/dist/runtime/app/components/Container/Container.theme.d.ts +53 -0
  65. package/dist/runtime/app/components/Container/Container.theme.js +31 -0
  66. package/dist/runtime/app/components/{structure → Container}/Container.vue +2 -1
  67. package/dist/runtime/app/components/{structure → Container}/Container.vue.d.ts +5 -5
  68. package/dist/runtime/app/components/ControlGroup/ControlGroup.d.vue.ts +26 -0
  69. package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.d.ts +16 -0
  70. package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.js +13 -0
  71. package/dist/runtime/app/components/ControlGroup/ControlGroup.vue +26 -0
  72. package/dist/runtime/app/components/ControlGroup/ControlGroup.vue.d.ts +26 -0
  73. package/dist/runtime/app/components/FieldArray/FieldArray.d.vue.ts +13 -0
  74. package/dist/runtime/app/components/FieldArray/FieldArray.theme.d.ts +12 -0
  75. package/dist/runtime/app/components/FieldArray/FieldArray.theme.js +13 -0
  76. package/dist/runtime/app/components/FieldArray/FieldArray.vue +173 -0
  77. package/dist/runtime/app/components/FieldArray/FieldArray.vue.d.ts +13 -0
  78. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.d.vue.ts +13 -0
  79. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.d.ts +5 -0
  80. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.js +2 -0
  81. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue +39 -0
  82. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue.d.ts +13 -0
  83. package/dist/runtime/app/components/{forms → FieldCheckbox/internal/Checkbox}/Checkbox.d.vue.ts +9 -4
  84. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.d.ts +30 -0
  85. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.js +10 -0
  86. package/dist/runtime/app/components/{forms → FieldCheckbox/internal/Checkbox}/Checkbox.vue +7 -4
  87. package/dist/runtime/app/components/{forms → FieldCheckbox/internal/Checkbox}/Checkbox.vue.d.ts +9 -4
  88. package/dist/runtime/app/components/FieldColor/FieldColor.d.vue.ts +13 -0
  89. package/dist/runtime/app/components/FieldColor/FieldColor.theme.d.ts +27 -0
  90. package/dist/runtime/app/components/FieldColor/FieldColor.theme.js +18 -0
  91. package/dist/runtime/app/components/{forms/fields → FieldColor}/FieldColor.vue +39 -32
  92. package/dist/runtime/app/components/FieldColor/FieldColor.vue.d.ts +13 -0
  93. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.d.vue.ts +13 -0
  94. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.d.ts +5 -0
  95. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.js +2 -0
  96. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue +51 -0
  97. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue.d.ts +13 -0
  98. package/dist/runtime/app/components/{forms/fields → FieldFile}/FieldFile.d.vue.ts +10 -2
  99. package/dist/runtime/app/components/FieldFile/FieldFile.theme.d.ts +5 -0
  100. package/dist/runtime/app/components/FieldFile/FieldFile.theme.js +2 -0
  101. package/dist/runtime/app/components/FieldFile/FieldFile.vue +99 -0
  102. package/dist/runtime/app/components/{forms/fields → FieldFile}/FieldFile.vue.d.ts +10 -2
  103. package/dist/runtime/app/components/{forms → FieldFile/internal/FileUpload}/FileUpload.d.vue.ts +25 -20
  104. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.d.ts +88 -0
  105. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.js +55 -0
  106. package/dist/runtime/app/components/{forms → FieldFile/internal/FileUpload}/FileUpload.vue +21 -20
  107. package/dist/runtime/app/components/{forms → FieldFile/internal/FileUpload}/FileUpload.vue.d.ts +25 -20
  108. package/dist/runtime/app/components/FieldInput/FieldInput.d.vue.ts +24 -0
  109. package/dist/runtime/app/components/FieldInput/FieldInput.theme.d.ts +5 -0
  110. package/dist/runtime/app/components/FieldInput/FieldInput.theme.js +2 -0
  111. package/dist/runtime/app/components/FieldInput/FieldInput.vue +61 -0
  112. package/dist/runtime/app/components/FieldInput/FieldInput.vue.d.ts +24 -0
  113. package/dist/runtime/app/components/FieldNumber/FieldNumber.d.vue.ts +13 -0
  114. package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.d.ts +5 -0
  115. package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.js +2 -0
  116. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue +47 -0
  117. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue.d.ts +13 -0
  118. package/dist/runtime/app/components/FieldPassword/FieldPassword.d.vue.ts +13 -0
  119. package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.d.ts +5 -0
  120. package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.js +2 -0
  121. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue +62 -0
  122. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue.d.ts +13 -0
  123. package/dist/runtime/app/components/FieldRadio/FieldRadio.d.vue.ts +13 -0
  124. package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.d.ts +5 -0
  125. package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.js +2 -0
  126. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue +41 -0
  127. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue.d.ts +13 -0
  128. package/dist/runtime/app/components/{forms → FieldRadio/internal/RadioGroup}/RadioGroup.d.vue.ts +10 -8
  129. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.d.ts +54 -0
  130. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.js +31 -0
  131. package/dist/runtime/app/components/{forms → FieldRadio/internal/RadioGroup}/RadioGroup.vue +7 -4
  132. package/dist/runtime/app/components/{forms → FieldRadio/internal/RadioGroup}/RadioGroup.vue.d.ts +10 -8
  133. package/dist/runtime/app/components/FieldSearch/FieldSearch.d.vue.ts +17 -0
  134. package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.d.ts +6 -0
  135. package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.js +7 -0
  136. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue +74 -0
  137. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue.d.ts +17 -0
  138. package/dist/runtime/app/components/FieldSelect/FieldSelect.d.vue.ts +13 -0
  139. package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.d.ts +5 -0
  140. package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.js +2 -0
  141. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue +45 -0
  142. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue.d.ts +13 -0
  143. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.d.vue.ts +97 -0
  144. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.d.ts +36 -0
  145. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.js +49 -0
  146. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue +196 -0
  147. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue.d.ts +97 -0
  148. package/dist/runtime/app/{utils → components/FieldSelect/internal/Select}/option.d.ts +3 -4
  149. package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.d.ts +30 -0
  150. package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.js +142 -0
  151. package/dist/runtime/app/components/FieldSlug/FieldSlug.d.vue.ts +13 -0
  152. package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.d.ts +5 -0
  153. package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.js +2 -0
  154. package/dist/runtime/app/components/{forms/fields → FieldSlug}/FieldSlug.vue +58 -47
  155. package/dist/runtime/app/components/FieldSlug/FieldSlug.vue.d.ts +13 -0
  156. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.d.vue.ts +13 -0
  157. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.d.ts +5 -0
  158. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.js +2 -0
  159. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue +37 -0
  160. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue.d.ts +13 -0
  161. package/dist/runtime/app/components/{forms → FieldSwitch/internal/Switch}/Switch.d.vue.ts +9 -4
  162. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.d.ts +39 -0
  163. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.js +20 -0
  164. package/dist/runtime/app/components/{forms → FieldSwitch/internal/Switch}/Switch.vue +4 -2
  165. package/dist/runtime/app/components/{forms → FieldSwitch/internal/Switch}/Switch.vue.d.ts +9 -4
  166. package/dist/runtime/app/components/FieldTags/FieldTags.d.vue.ts +13 -0
  167. package/dist/runtime/app/components/FieldTags/FieldTags.theme.d.ts +5 -0
  168. package/dist/runtime/app/components/FieldTags/FieldTags.theme.js +2 -0
  169. package/dist/runtime/app/components/FieldTags/FieldTags.vue +41 -0
  170. package/dist/runtime/app/components/FieldTags/FieldTags.vue.d.ts +13 -0
  171. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.d.vue.ts +26 -0
  172. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.d.ts +34 -0
  173. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.js +20 -0
  174. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue +97 -0
  175. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue.d.ts +26 -0
  176. package/dist/runtime/app/components/{forms/fields → FieldTextarea}/FieldTextarea.d.vue.ts +10 -2
  177. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.d.ts +5 -0
  178. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.js +2 -0
  179. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue +45 -0
  180. package/dist/runtime/app/components/{forms/fields → FieldTextarea}/FieldTextarea.vue.d.ts +10 -2
  181. package/dist/runtime/app/components/{forms → FieldTextarea/internal/Textarea}/Textarea.d.vue.ts +9 -4
  182. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.d.ts +36 -0
  183. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.js +37 -0
  184. package/dist/runtime/app/components/{forms → FieldTextarea/internal/Textarea}/Textarea.vue +6 -4
  185. package/dist/runtime/app/components/{forms → FieldTextarea/internal/Textarea}/Textarea.vue.d.ts +9 -4
  186. package/dist/runtime/app/components/{forms → Form}/Form.d.vue.ts +3 -4
  187. package/dist/runtime/app/components/Form/Form.theme.d.ts +9 -0
  188. package/dist/runtime/app/components/Form/Form.theme.js +10 -0
  189. package/dist/runtime/app/components/{forms → Form}/Form.vue +7 -6
  190. package/dist/runtime/app/components/{forms → Form}/Form.vue.d.ts +3 -4
  191. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.d.vue.ts +7 -0
  192. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue +67 -0
  193. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue.d.ts +7 -0
  194. package/dist/runtime/app/components/Form/internal/standard-schema.d.ts +29 -0
  195. package/dist/runtime/app/{internal → components/Form/internal}/useVunoFormState.d.ts +5 -3
  196. package/dist/runtime/app/{internal → components/Form/internal}/useVunoFormState.js +4 -3
  197. package/dist/runtime/app/components/{forms → FormField}/FormField.d.vue.ts +7 -4
  198. package/dist/runtime/app/components/FormField/FormField.theme.d.ts +62 -0
  199. package/dist/runtime/app/components/FormField/FormField.theme.js +28 -0
  200. package/dist/runtime/app/components/{forms → FormField}/FormField.vue +61 -42
  201. package/dist/runtime/app/components/{forms → FormField}/FormField.vue.d.ts +7 -4
  202. package/dist/runtime/app/components/{forms → FormModal}/FormModal.d.vue.ts +9 -7
  203. package/dist/runtime/app/components/FormModal/FormModal.theme.d.ts +8 -0
  204. package/dist/runtime/app/components/FormModal/FormModal.theme.js +9 -0
  205. package/dist/runtime/app/components/{forms → FormModal}/FormModal.vue +15 -12
  206. package/dist/runtime/app/components/{forms → FormModal}/FormModal.vue.d.ts +9 -7
  207. package/dist/runtime/app/components/FormSection/FormSection.d.vue.ts +15 -0
  208. package/dist/runtime/app/components/FormSection/FormSection.theme.d.ts +12 -0
  209. package/dist/runtime/app/components/FormSection/FormSection.theme.js +14 -0
  210. package/dist/runtime/app/components/{forms → FormSection}/FormSection.vue +5 -3
  211. package/dist/runtime/app/components/FormSection/FormSection.vue.d.ts +15 -0
  212. package/dist/runtime/app/components/Icon/Icon.d.vue.ts +6 -0
  213. package/dist/runtime/app/components/Icon/Icon.vue +32 -0
  214. package/dist/runtime/app/components/Icon/Icon.vue.d.ts +6 -0
  215. package/dist/runtime/app/components/{actions → Menu}/Menu.d.vue.ts +6 -4
  216. package/dist/runtime/app/components/Menu/Menu.theme.d.ts +17 -0
  217. package/dist/runtime/app/components/Menu/Menu.theme.js +20 -0
  218. package/dist/runtime/app/components/{actions → Menu}/Menu.vue +20 -27
  219. package/dist/runtime/app/components/{actions → Menu}/Menu.vue.d.ts +6 -4
  220. package/dist/runtime/app/components/Modal/Modal.d.vue.ts +43 -0
  221. package/dist/runtime/app/components/Modal/Modal.theme.d.ts +59 -0
  222. package/dist/runtime/app/components/Modal/Modal.theme.js +47 -0
  223. package/dist/runtime/app/components/{overlays → Modal}/Modal.vue +89 -32
  224. package/dist/runtime/app/components/Modal/Modal.vue.d.ts +43 -0
  225. package/dist/runtime/app/components/{structure → Navbar}/Navbar.d.vue.ts +14 -18
  226. package/dist/runtime/app/components/Navbar/Navbar.theme.d.ts +31 -0
  227. package/dist/runtime/app/components/Navbar/Navbar.theme.js +32 -0
  228. package/dist/runtime/app/components/{structure → Navbar}/Navbar.vue +1 -0
  229. package/dist/runtime/app/components/{structure → Navbar}/Navbar.vue.d.ts +14 -18
  230. package/dist/runtime/app/components/NavigationList/NavigationList.d.vue.ts +38 -0
  231. package/dist/runtime/app/components/NavigationList/NavigationList.theme.d.ts +32 -0
  232. package/dist/runtime/app/components/NavigationList/NavigationList.theme.js +35 -0
  233. package/dist/runtime/app/components/{structure/Navigation.vue → NavigationList/NavigationList.vue} +74 -34
  234. package/dist/runtime/app/components/NavigationList/NavigationList.vue.d.ts +38 -0
  235. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.d.vue.ts +31 -0
  236. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.d.ts +26 -0
  237. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.js +27 -0
  238. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue +236 -0
  239. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue.d.ts +31 -0
  240. package/dist/runtime/app/components/NavigationToc/NavigationToc.d.vue.ts +14 -0
  241. package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.d.ts +9 -0
  242. package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.js +10 -0
  243. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue +81 -0
  244. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue.d.ts +14 -0
  245. package/dist/runtime/app/components/{structure → Page}/Page.d.vue.ts +6 -5
  246. package/dist/runtime/app/components/Page/Page.theme.d.ts +32 -0
  247. package/dist/runtime/app/components/Page/Page.theme.js +31 -0
  248. package/dist/runtime/app/components/{structure → Page}/Page.vue +11 -3
  249. package/dist/runtime/app/components/{structure → Page}/Page.vue.d.ts +6 -5
  250. package/dist/runtime/app/components/{structure → Pagination}/Pagination.d.vue.ts +8 -7
  251. package/dist/runtime/app/components/Pagination/Pagination.theme.d.ts +13 -0
  252. package/dist/runtime/app/components/Pagination/Pagination.theme.js +14 -0
  253. package/dist/runtime/app/components/{structure → Pagination}/Pagination.vue +4 -2
  254. package/dist/runtime/app/components/{structure → Pagination}/Pagination.vue.d.ts +8 -7
  255. package/dist/runtime/app/components/{overlays/Modal.d.vue.ts → Slideover/Slideover.d.vue.ts} +10 -18
  256. package/dist/runtime/app/components/Slideover/Slideover.theme.d.ts +35 -0
  257. package/dist/runtime/app/components/Slideover/Slideover.theme.js +24 -0
  258. package/dist/runtime/app/components/Slideover/Slideover.vue +58 -0
  259. package/dist/runtime/app/components/{overlays/Modal.vue.d.ts → Slideover/Slideover.vue.d.ts} +10 -18
  260. package/dist/runtime/app/components/State/State.theme.d.ts +19 -0
  261. package/dist/runtime/app/components/State/State.theme.js +26 -0
  262. package/dist/runtime/app/components/{structure → State}/State.vue +8 -3
  263. package/dist/runtime/app/components/{structure → Table}/Table.d.vue.ts +5 -2
  264. package/dist/runtime/app/components/Table/Table.theme.d.ts +50 -0
  265. package/dist/runtime/app/components/Table/Table.theme.js +64 -0
  266. package/dist/runtime/app/components/{structure → Table}/Table.vue +62 -72
  267. package/dist/runtime/app/components/{structure → Table}/Table.vue.d.ts +5 -2
  268. package/dist/runtime/app/components/{structure/cells → Table/internal/CellBadge}/CellBadge.vue +2 -1
  269. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.d.ts +21 -0
  270. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.js +11 -0
  271. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue +32 -0
  272. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.d.ts +5 -0
  273. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.js +4 -0
  274. package/dist/runtime/app/components/{structure/cells → Table/internal/CellCurrency}/CellCurrency.vue +1 -0
  275. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.d.ts +5 -0
  276. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.js +4 -0
  277. package/dist/runtime/app/components/{structure/cells → Table/internal/CellDate}/CellDate.vue +1 -0
  278. package/dist/runtime/app/components/{structure/cells → Table/internal/CellImage}/CellImage.vue +2 -1
  279. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.d.ts +5 -0
  280. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.js +4 -0
  281. package/dist/runtime/app/components/{structure/cells → Table/internal/CellNumber}/CellNumber.vue +1 -0
  282. package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.d.ts +13 -0
  283. package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.js +11 -0
  284. package/dist/runtime/app/components/{structure/cells → Table/internal/CellText}/CellText.vue +1 -0
  285. package/dist/runtime/app/components/{structure → Table/internal/TableCell}/TableCell.vue +9 -8
  286. package/dist/runtime/app/{utils → components/Table/internal}/column.js +1 -1
  287. package/dist/runtime/app/{internal → components/Table/internal}/useVunoTable.d.ts +23 -22
  288. package/dist/runtime/app/{internal → components/Table/internal}/useVunoTable.js +1 -1
  289. package/dist/runtime/app/components/Table/internal/useVunoTableSelection.d.ts +21 -0
  290. package/dist/runtime/app/components/Table/internal/useVunoTableSelection.js +29 -0
  291. package/dist/runtime/app/components/{structure → Tabs}/Tabs.d.vue.ts +8 -7
  292. package/dist/runtime/app/components/Tabs/Tabs.theme.d.ts +32 -0
  293. package/dist/runtime/app/components/Tabs/Tabs.theme.js +23 -0
  294. package/dist/runtime/app/components/{structure → Tabs}/Tabs.vue +13 -8
  295. package/dist/runtime/app/components/{structure → Tabs}/Tabs.vue.d.ts +8 -7
  296. package/dist/runtime/app/components/{actions → Tooltip}/Tooltip.d.vue.ts +6 -6
  297. package/dist/runtime/app/components/Tooltip/Tooltip.theme.d.ts +12 -0
  298. package/dist/runtime/app/components/Tooltip/Tooltip.theme.js +13 -0
  299. package/dist/runtime/app/components/{actions → Tooltip}/Tooltip.vue +10 -23
  300. package/dist/runtime/app/components/{actions → Tooltip}/Tooltip.vue.d.ts +6 -6
  301. package/dist/runtime/app/components/{forms → internal/ControlShell}/ControlShell.d.vue.ts +9 -5
  302. package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.d.ts +50 -0
  303. package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.js +38 -0
  304. package/dist/runtime/app/components/internal/ControlShell/ControlShell.vue +33 -0
  305. package/dist/runtime/app/components/{forms → internal/ControlShell}/ControlShell.vue.d.ts +9 -5
  306. package/dist/runtime/app/components/internal/FieldShell/FieldShell.d.vue.ts +23 -0
  307. package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue +63 -0
  308. package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue.d.ts +23 -0
  309. package/dist/runtime/app/components/{forms → internal/Input}/Input.d.vue.ts +15 -10
  310. package/dist/runtime/app/components/internal/Input/Input.theme.d.ts +30 -0
  311. package/dist/runtime/app/components/internal/Input/Input.theme.js +21 -0
  312. package/dist/runtime/app/components/{forms → internal/Input}/Input.vue +8 -6
  313. package/dist/runtime/app/components/{forms → internal/Input}/Input.vue.d.ts +15 -10
  314. package/dist/runtime/app/components/{forms → internal/NumberInput}/NumberInput.d.vue.ts +14 -8
  315. package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.d.ts +31 -0
  316. package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.js +26 -0
  317. package/dist/runtime/app/components/internal/NumberInput/NumberInput.vue +221 -0
  318. package/dist/runtime/app/components/{forms → internal/NumberInput}/NumberInput.vue.d.ts +14 -8
  319. package/dist/runtime/app/{utils → components/internal/NumberInput}/number.d.ts +7 -0
  320. package/dist/runtime/app/components/internal/NumberInput/number.js +64 -0
  321. package/dist/runtime/app/composables/defineShortcuts.d.ts +19 -0
  322. package/dist/runtime/app/composables/defineShortcuts.js +68 -0
  323. package/dist/runtime/app/{internal → composables/internal}/useVunoAnchor.d.ts +6 -4
  324. package/dist/runtime/app/{internal → composables/internal}/useVunoAnchor.js +3 -2
  325. package/dist/runtime/app/composables/internal/useVunoControlGroup.d.ts +17 -0
  326. package/dist/runtime/app/composables/internal/useVunoControlGroup.js +18 -0
  327. package/dist/runtime/app/{internal → composables/internal}/useVunoPortal.d.ts +3 -8
  328. package/dist/runtime/app/composables/internal/useVunoPortal.js +12 -0
  329. package/dist/runtime/app/composables/useCrud.js +5 -4
  330. package/dist/runtime/app/composables/useField.d.ts +3 -3
  331. package/dist/runtime/app/composables/useField.js +16 -8
  332. package/dist/runtime/app/composables/useForm.d.ts +3 -0
  333. package/dist/runtime/app/composables/useForm.js +2 -2
  334. package/dist/runtime/app/composables/useModal.js +1 -3
  335. package/dist/runtime/app/composables/useTableQuery.js +29 -13
  336. package/dist/runtime/app/composables/useTheme.d.ts +3 -2
  337. package/dist/runtime/app/composables/useTheme.js +4 -2
  338. package/dist/runtime/app/internal/keys.d.ts +11 -5
  339. package/dist/runtime/app/internal/keys.js +5 -2
  340. package/dist/runtime/app/internal/slots.d.ts +3 -0
  341. package/dist/runtime/app/internal/slots.js +13 -1
  342. package/dist/runtime/app/plugins/vue-query.d.ts +8 -0
  343. package/dist/runtime/app/plugins/vue-query.js +13 -0
  344. package/dist/runtime/app/theme/icons.js +4 -1
  345. package/dist/runtime/app/theme/index.d.ts +1158 -4
  346. package/dist/runtime/app/theme/index.js +116 -10
  347. package/dist/runtime/app/theme/messages.js +10 -3
  348. package/dist/runtime/app/theme/shared.d.ts +19 -3
  349. package/dist/runtime/app/theme/shared.js +15 -1
  350. package/dist/runtime/app/types/alert.d.ts +13 -0
  351. package/dist/runtime/app/types/base.d.ts +19 -1
  352. package/dist/runtime/app/types/field-type.d.ts +4 -0
  353. package/dist/runtime/app/types/field-type.js +0 -0
  354. package/dist/runtime/app/types/field.d.ts +132 -26
  355. package/dist/runtime/app/types/form.d.ts +27 -1
  356. package/dist/runtime/app/types/index.d.ts +15 -12
  357. package/dist/runtime/app/types/page.d.ts +9 -1
  358. package/dist/runtime/app/types/shortcuts.d.ts +44 -0
  359. package/dist/runtime/app/types/shortcuts.js +0 -0
  360. package/dist/runtime/app/types/slots.d.ts +30 -0
  361. package/dist/runtime/app/types/slots.js +0 -0
  362. package/dist/runtime/app/types/state.d.ts +3 -3
  363. package/dist/runtime/app/types/table.d.ts +3 -2
  364. package/dist/runtime/app/types/theme.d.ts +51 -13
  365. package/dist/runtime/app/utils/format.js +2 -2
  366. package/dist/runtime/app/utils/path.js +4 -2
  367. package/dist/runtime/app/utils/theme.d.ts +19 -1
  368. package/dist/runtime/app/utils/theme.js +21 -3
  369. package/package.json +18 -3
  370. package/dist/runtime/app/components/actions/Icon.d.vue.ts +0 -6
  371. package/dist/runtime/app/components/actions/Icon.vue +0 -32
  372. package/dist/runtime/app/components/actions/Icon.vue.d.ts +0 -6
  373. package/dist/runtime/app/components/forms/ControlShell.vue +0 -19
  374. package/dist/runtime/app/components/forms/FormFieldRenderer.d.vue.ts +0 -7
  375. package/dist/runtime/app/components/forms/FormFieldRenderer.vue +0 -88
  376. package/dist/runtime/app/components/forms/FormFieldRenderer.vue.d.ts +0 -7
  377. package/dist/runtime/app/components/forms/FormSection.d.vue.ts +0 -12
  378. package/dist/runtime/app/components/forms/FormSection.vue.d.ts +0 -12
  379. package/dist/runtime/app/components/forms/NumberInput.vue +0 -160
  380. package/dist/runtime/app/components/forms/Select.d.vue.ts +0 -61
  381. package/dist/runtime/app/components/forms/Select.vue +0 -336
  382. package/dist/runtime/app/components/forms/Select.vue.d.ts +0 -61
  383. package/dist/runtime/app/components/forms/fields/FieldArray.d.vue.ts +0 -5
  384. package/dist/runtime/app/components/forms/fields/FieldArray.vue +0 -129
  385. package/dist/runtime/app/components/forms/fields/FieldArray.vue.d.ts +0 -5
  386. package/dist/runtime/app/components/forms/fields/FieldCheckbox.d.vue.ts +0 -5
  387. package/dist/runtime/app/components/forms/fields/FieldCheckbox.vue +0 -31
  388. package/dist/runtime/app/components/forms/fields/FieldCheckbox.vue.d.ts +0 -5
  389. package/dist/runtime/app/components/forms/fields/FieldColor.d.vue.ts +0 -5
  390. package/dist/runtime/app/components/forms/fields/FieldColor.vue.d.ts +0 -5
  391. package/dist/runtime/app/components/forms/fields/FieldEmail.d.vue.ts +0 -5
  392. package/dist/runtime/app/components/forms/fields/FieldEmail.vue +0 -38
  393. package/dist/runtime/app/components/forms/fields/FieldEmail.vue.d.ts +0 -5
  394. package/dist/runtime/app/components/forms/fields/FieldFile.vue +0 -91
  395. package/dist/runtime/app/components/forms/fields/FieldNumber.d.vue.ts +0 -5
  396. package/dist/runtime/app/components/forms/fields/FieldNumber.vue +0 -39
  397. package/dist/runtime/app/components/forms/fields/FieldNumber.vue.d.ts +0 -5
  398. package/dist/runtime/app/components/forms/fields/FieldPassword.d.vue.ts +0 -5
  399. package/dist/runtime/app/components/forms/fields/FieldPassword.vue +0 -36
  400. package/dist/runtime/app/components/forms/fields/FieldPassword.vue.d.ts +0 -5
  401. package/dist/runtime/app/components/forms/fields/FieldRadio.d.vue.ts +0 -5
  402. package/dist/runtime/app/components/forms/fields/FieldRadio.vue +0 -33
  403. package/dist/runtime/app/components/forms/fields/FieldRadio.vue.d.ts +0 -5
  404. package/dist/runtime/app/components/forms/fields/FieldSelect.d.vue.ts +0 -5
  405. package/dist/runtime/app/components/forms/fields/FieldSelect.vue +0 -37
  406. package/dist/runtime/app/components/forms/fields/FieldSelect.vue.d.ts +0 -5
  407. package/dist/runtime/app/components/forms/fields/FieldSlug.d.vue.ts +0 -5
  408. package/dist/runtime/app/components/forms/fields/FieldSlug.vue.d.ts +0 -5
  409. package/dist/runtime/app/components/forms/fields/FieldSwitch.d.vue.ts +0 -5
  410. package/dist/runtime/app/components/forms/fields/FieldSwitch.vue +0 -29
  411. package/dist/runtime/app/components/forms/fields/FieldSwitch.vue.d.ts +0 -5
  412. package/dist/runtime/app/components/forms/fields/FieldText.d.vue.ts +0 -5
  413. package/dist/runtime/app/components/forms/fields/FieldText.vue +0 -39
  414. package/dist/runtime/app/components/forms/fields/FieldText.vue.d.ts +0 -5
  415. package/dist/runtime/app/components/forms/fields/FieldTextarea.vue +0 -37
  416. package/dist/runtime/app/components/layouts/dashboard/DashboardAside.d.vue.ts +0 -56
  417. package/dist/runtime/app/components/layouts/dashboard/DashboardAside.vue +0 -96
  418. package/dist/runtime/app/components/layouts/dashboard/DashboardAside.vue.d.ts +0 -56
  419. package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.d.vue.ts +0 -57
  420. package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.vue +0 -164
  421. package/dist/runtime/app/components/layouts/dashboard/DashboardLayout.vue.d.ts +0 -57
  422. package/dist/runtime/app/components/layouts/dashboard/DashboardPage.d.vue.ts +0 -49
  423. package/dist/runtime/app/components/layouts/dashboard/DashboardPage.vue +0 -45
  424. package/dist/runtime/app/components/layouts/dashboard/DashboardPage.vue.d.ts +0 -49
  425. package/dist/runtime/app/components/layouts/public/PublicLayout.d.vue.ts +0 -50
  426. package/dist/runtime/app/components/layouts/public/PublicLayout.vue +0 -56
  427. package/dist/runtime/app/components/layouts/public/PublicLayout.vue.d.ts +0 -50
  428. package/dist/runtime/app/components/overlays/Context.d.vue.ts +0 -3
  429. package/dist/runtime/app/components/overlays/Context.vue +0 -7
  430. package/dist/runtime/app/components/overlays/Context.vue.d.ts +0 -3
  431. package/dist/runtime/app/components/overlays/Overlay.d.vue.ts +0 -7
  432. package/dist/runtime/app/components/overlays/Overlay.vue.d.ts +0 -7
  433. package/dist/runtime/app/components/structure/Navigation.d.vue.ts +0 -14
  434. package/dist/runtime/app/components/structure/Navigation.vue.d.ts +0 -14
  435. package/dist/runtime/app/components/structure/cells/CellBoolean.vue +0 -26
  436. package/dist/runtime/app/composables/useDashboard.d.ts +0 -14
  437. package/dist/runtime/app/composables/useDashboard.js +0 -9
  438. package/dist/runtime/app/internal/useVunoDashboard.d.ts +0 -15
  439. package/dist/runtime/app/internal/useVunoDashboard.js +0 -5
  440. package/dist/runtime/app/internal/useVunoPortal.js +0 -8
  441. package/dist/runtime/app/theme/actions.d.ts +0 -2
  442. package/dist/runtime/app/theme/actions.js +0 -123
  443. package/dist/runtime/app/theme/forms.d.ts +0 -2
  444. package/dist/runtime/app/theme/forms.js +0 -442
  445. package/dist/runtime/app/theme/layouts.d.ts +0 -2
  446. package/dist/runtime/app/theme/layouts.js +0 -76
  447. package/dist/runtime/app/theme/overlays.d.ts +0 -2
  448. package/dist/runtime/app/theme/overlays.js +0 -90
  449. package/dist/runtime/app/theme/structure.d.ts +0 -2
  450. package/dist/runtime/app/theme/structure.js +0 -351
  451. package/dist/runtime/app/types/dashboard.d.ts +0 -7
  452. package/dist/runtime/app/utils/number.js +0 -30
  453. package/dist/runtime/app/utils/standard-schema.d.ts +0 -62
  454. /package/dist/runtime/app/{utils → components/FieldSelect/internal/Select}/option.js +0 -0
  455. /package/dist/runtime/app/{utils → components/Form/internal}/grid.d.ts +0 -0
  456. /package/dist/runtime/app/{utils → components/Form/internal}/grid.js +0 -0
  457. /package/dist/runtime/app/{utils → components/Form/internal}/standard-schema.js +0 -0
  458. /package/dist/runtime/app/components/{structure → State}/State.d.vue.ts +0 -0
  459. /package/dist/runtime/app/components/{structure → State}/State.vue.d.ts +0 -0
  460. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellBadge}/CellBadge.d.vue.ts +0 -0
  461. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellBadge}/CellBadge.vue.d.ts +0 -0
  462. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellBoolean}/CellBoolean.d.vue.ts +0 -0
  463. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellBoolean}/CellBoolean.vue.d.ts +0 -0
  464. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellCurrency}/CellCurrency.d.vue.ts +0 -0
  465. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellCurrency}/CellCurrency.vue.d.ts +0 -0
  466. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellDate}/CellDate.d.vue.ts +0 -0
  467. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellDate}/CellDate.vue.d.ts +0 -0
  468. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellImage}/CellImage.d.vue.ts +0 -0
  469. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellImage}/CellImage.vue.d.ts +0 -0
  470. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellNumber}/CellNumber.d.vue.ts +0 -0
  471. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellNumber}/CellNumber.vue.d.ts +0 -0
  472. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellText}/CellText.d.vue.ts +0 -0
  473. /package/dist/runtime/app/components/{structure/cells → Table/internal/CellText}/CellText.vue.d.ts +0 -0
  474. /package/dist/runtime/app/components/{structure → Table/internal/TableCell}/TableCell.d.vue.ts +0 -0
  475. /package/dist/runtime/app/components/{structure → Table/internal/TableCell}/TableCell.vue.d.ts +0 -0
  476. /package/dist/runtime/app/{utils → components/Table/internal}/column.d.ts +0 -0
  477. /package/dist/runtime/app/{utils → components/Table/internal}/query.d.ts +0 -0
  478. /package/dist/runtime/app/{utils → components/Table/internal}/query.js +0 -0
  479. /package/dist/runtime/app/{utils → components/Table/internal}/selection.d.ts +0 -0
  480. /package/dist/runtime/app/{utils → components/Table/internal}/selection.js +0 -0
  481. /package/dist/runtime/app/types/{dashboard.js → alert.js} +0 -0
@@ -0,0 +1,44 @@
1
+ /** Lo que corre cuando el atajo entra. Recibe el evento por si hace falta pararlo o leerlo. */
2
+ export type VunoShortcutHandler = (event: KeyboardEvent) => void;
3
+ /**
4
+ * Un atajo: la función a secas, o la función con condiciones.
5
+ *
6
+ * `usingInput` decide qué pasa cuando el foco está dentro de un campo, y es la
7
+ * parte que no se puede omitir: sin ella, escribir «g» en un buscador dispararía
8
+ * el atajo «ir a…» y el usuario vería la página cambiar mientras teclea.
9
+ *
10
+ * - `false` —lo de serie— solo fuera de un campo.
11
+ * - `true` también dentro, que es lo que quiere `escape` para cerrar.
12
+ * - una cadena, solo dentro del campo que se llame así, que es lo que quiere
13
+ * `enter` para buscar sin robarle el Enter al resto de formularios.
14
+ */
15
+ export type VunoShortcut = VunoShortcutHandler | {
16
+ handler: VunoShortcutHandler;
17
+ usingInput?: boolean | string;
18
+ };
19
+ /**
20
+ * El mapa de atajos. La clave es la combinación y el valor lo que hace.
21
+ *
22
+ * Un valor falso —`false`, `null`, `undefined`— **salta ese atajo sin sacarlo
23
+ * del mapa**, que es como se enciende y se apaga uno según el estado sin
24
+ * reconstruir el objeto entero.
25
+ */
26
+ export type VunoShortcuts = Record<string, false | null | undefined | VunoShortcut>;
27
+ export type VunoShortcutsOptions = {
28
+ /**
29
+ * Cuánto se espera entre teclas para que sigan contando como una secuencia.
30
+ *
31
+ * Pasado ese tiempo la secuencia se olvida, que es lo que evita que teclear
32
+ * «g» ahora y «d» dentro de un minuto acabe navegando a otra parte.
33
+ */
34
+ chainDelay?: number;
35
+ /**
36
+ * Comparar por la **posición física** de la tecla en vez de por el carácter.
37
+ *
38
+ * Con esto puesto, un teclado árabe o hebreo dispara los mismos atajos que
39
+ * uno latino, porque se mira dónde está la tecla y no qué letra escribe. El
40
+ * precio es el contrario: un teclado AZERTY tendrá la `a` donde el QWERTY
41
+ * tiene la `q`.
42
+ */
43
+ layoutIndependent?: boolean;
44
+ };
File without changes
@@ -0,0 +1,30 @@
1
+ import type { defaultTheme } from '#vuno/theme/index';
2
+ import type { VunoSlots } from './base.js';
3
+ import type { VunoThemeKey } from './theme.js';
4
+ type DefaultTheme = typeof defaultTheme;
5
+ /** Nombres de slot declarados por la base, las variantes o sus combinaciones. */
6
+ type VunoSlotOfOne<TKey extends VunoThemeKey> = (DefaultTheme[TKey] extends {
7
+ compoundVariants: readonly {
8
+ class: infer TClass;
9
+ }[];
10
+ } ? Extract<keyof TClass, string> : never) | (DefaultTheme[TKey] extends {
11
+ slots: infer TSlots;
12
+ } ? Extract<keyof TSlots, string> : never) | (DefaultTheme[TKey] extends {
13
+ variants: infer TVariants;
14
+ } ? {
15
+ [TDimension in keyof TVariants]: {
16
+ [TValue in keyof TVariants[TDimension]]: Extract<keyof TVariants[TDimension][TValue], string>;
17
+ }[keyof TVariants[TDimension]];
18
+ }[keyof TVariants] : never);
19
+ export type VunoSlotOf<TKey extends VunoThemeKey> = TKey extends VunoThemeKey ? VunoSlotOfOne<TKey> : never;
20
+ /** Override `ui` de una clave concreta, con autocompletado y rechazo de errores tipográficos. */
21
+ export type VunoUi<TKey extends VunoThemeKey> = VunoSlots<[VunoSlotOf<TKey>] extends [never] ? string : VunoSlotOf<TKey>>;
22
+ /** Las dimensiones de variante que una clave admite. */
23
+ export type VunoVariantOf<TKey extends VunoThemeKey> = DefaultTheme[TKey] extends {
24
+ variants: infer TVariants;
25
+ } ? Extract<keyof TVariants, string> : string;
26
+ /** Las variantes activas de una clave, con el valor elegido. */
27
+ export type VunoVariantsOf<TKey extends VunoThemeKey> = Partial<Record<VunoVariantOf<TKey>, string | undefined>>;
28
+ /** Slots resueltos por `useTheme`: todas sus clases ya son una cadena. */
29
+ export type VunoResolvedSlots<TKey extends VunoThemeKey> = Record<[VunoSlotOf<TKey>] extends [never] ? string : VunoSlotOf<TKey>, string>;
30
+ export {};
File without changes
@@ -1,4 +1,4 @@
1
- import type { VunoSlots } from './base.js';
1
+ import type { VunoUi } from './slots.js';
2
2
  import type { VunoTableFailure } from './table.js';
3
3
  /** El estado vacío: lo que hay que decir cuando todavía no hay nada. */
4
4
  export type VunoStateEmptyProps = {
@@ -10,14 +10,14 @@ export type VunoStateEmptyProps = {
10
10
  title?: string;
11
11
  /** `'empty'` o nada: es el que sale por defecto. */
12
12
  tone?: 'empty';
13
- ui?: VunoSlots;
13
+ ui?: VunoUi<'state'>;
14
14
  };
15
15
  /** El estado de fallo, que no existe sin el objeto que trae el reintento. */
16
16
  export type VunoStateFailureProps = {
17
17
  /** El fallo con su reintento dentro: no hay forma de pintarlo sin salida. */
18
18
  failure: VunoTableFailure;
19
19
  tone: 'failure';
20
- ui?: VunoSlots;
20
+ ui?: VunoUi<'state'>;
21
21
  };
22
22
  /**
23
23
  * Lo que se pinta donde debería haber contenido y no lo hay.
@@ -1,5 +1,6 @@
1
+ import type { VunoColor, VunoSize } from './base.js';
1
2
  import type { VunoField } from './field.js';
2
- import type { VunoColor, VunoSize, VunoSlots } from './base.js';
3
+ import type { VunoUi } from './slots.js';
3
4
  type WithType<TColumn, TType extends string> = TColumn & {
4
5
  type: TType;
5
6
  };
@@ -79,7 +80,7 @@ export type VunoTableColumnBase<TRow extends VunoTableRow = VunoTableRow> = {
79
80
  key: string;
80
81
  label?: string;
81
82
  sortable?: boolean;
82
- ui?: VunoSlots;
83
+ ui?: VunoUi<'avatar' | 'badge' | 'cellBoolean' | 'cellCurrency' | 'cellDate' | 'cellNumber' | 'cellText' | 'menu'>;
83
84
  width?: string;
84
85
  /**
85
86
  * Calcula el valor a partir de la fila entera, en lugar de leerlo de `key`.
@@ -1,5 +1,5 @@
1
- import type { VunoFieldType } from './field.js';
2
1
  import type { VunoSlots } from './base.js';
2
+ import type { VunoFieldInputType, VunoFieldType } from './field-type.js';
3
3
  /**
4
4
  * Claves tematizables, y **cada una se llama como su componente sin la `V`**:
5
5
  * `VCard` se personaliza con `card`, `VNumberInput` con `numberInput`.
@@ -28,14 +28,38 @@ import type { VunoSlots } from './base.js';
28
28
  * a mirar; queda dicho aquí para que quien añada una excepción sepa que no hay
29
29
  * red debajo.
30
30
  */
31
- export type VunoThemeKey = 'avatar' | 'badge' | 'button' | 'card' | 'cellBoolean' | 'cellCurrency' | 'cellDate' | 'cellNumber' | 'cellText' | 'checkbox' | 'confirm' | 'container' | 'control' | 'dashboardPage' | 'fileUpload' | 'form' | 'formField' | 'formModal' | 'formSection' | 'input' | 'layoutDashboard' | 'menu' | 'modal' | 'navbar' | 'navigation' | 'numberInput' | 'page' | 'pagination' | 'publicLayout' | 'radioGroup' | 'select' | 'state' | 'switch' | 'table' | 'tabs' | 'textarea' | 'toast' | 'toaster' | 'tooltip' | `field${Capitalize<VunoFieldType>}`;
31
+ export type VunoThemeKey = 'alert' | 'avatar' | 'badge' | 'button' | 'card' | 'cellBoolean' | 'cellCurrency' | 'cellDate' | 'cellNumber' | 'cellText' | 'checkbox' | 'code' | 'confirm' | 'container' | 'control' | 'controlGroup' | 'fieldInput' | 'fileUpload' | 'form' | 'formField' | 'formModal' | 'formSection' | 'input' | 'menu' | 'modal' | 'navbar' | 'navigationList' | 'navigationMenu' | 'navigationToc' | 'numberInput' | 'page' | 'pagination' | 'radioGroup' | 'select' | 'slideover' | 'state' | 'switch' | 'table' | 'tabs' | 'tagsInput' | 'textarea' | 'toast' | 'toaster' | 'tooltip' | `field${Capitalize<Exclude<VunoFieldType, VunoFieldInputType>>}`;
32
32
  /**
33
33
  * Slots que se aplican cuando una dimensión toma cierto valor: `color: 'error'`
34
34
  * o `variant: 'solid'`. Se funden sobre los slots base en el orden en que el
35
35
  * componente los pide.
36
36
  */
37
37
  export type VunoThemeVariants = Record<string, Record<string, VunoSlots>>;
38
+ /**
39
+ * Clases que solo se aplican cuando **coinciden varias variantes a la vez**.
40
+ *
41
+ * Las claves que no son `class` son las condiciones, y se cumplen todas o no se
42
+ * aplica ninguna: `{ color: 'neutral', variant: 'link', class: { base: '…' } }`
43
+ * solo entra cuando el botón es las dos cosas.
44
+ *
45
+ * Existe para lo que la variable de acento no alcanza. El mecanismo de serie
46
+ * —el color asigna `--vuno-accent` y la variante la consume— cubre el caso
47
+ * corriente sin escribir combinaciones, y por eso sigue siendo el primero al
48
+ * que acudir. Lo que no cubre es cuando una pareja concreta necesita algo que
49
+ * no es un color: un borde que solo esa combinación quiere, un relleno
50
+ * distinto. Antes de esto, la única salida era declarar la pareja como una
51
+ * variante más y perder la ortogonalidad.
52
+ */
53
+ export type VunoThemeCompoundVariant = {
54
+ class: VunoSlots;
55
+ } & Record<string, string | undefined | VunoSlots>;
38
56
  export type VunoThemeEntry = {
57
+ /**
58
+ * Las combinaciones, que se aplican **después** de las variantes sueltas de
59
+ * su mismo nivel. Ese orden es el que las hace útiles: lo específico llega
60
+ * al final y gana el conflicto que tailwind-merge deshace.
61
+ */
62
+ compoundVariants?: VunoThemeCompoundVariant[];
39
63
  slots?: VunoSlots;
40
64
  /**
41
65
  * Evita declarar cada combinación: un botón con siete colores y cuatro
@@ -44,6 +68,10 @@ export type VunoThemeEntry = {
44
68
  * —`--vuno-accent`, `--vuno-accent-contrast`— y la variante las consume
45
69
  * con `bg-(--vuno-accent)`, así que son siete más cuatro y no hay
46
70
  * combinaciones compuestas que mantener.
71
+ *
72
+ * Para lo que esa vía no alcanza está `compoundVariants`, que es la
73
+ * excepción y no el camino: cada entrada suya **sí** es una combinación que
74
+ * alguien mantiene.
47
75
  */
48
76
  variants?: VunoThemeVariants;
49
77
  };
@@ -53,16 +81,16 @@ export type VunoThemeConfig = {
53
81
  export type VunoIcons = {
54
82
  actions: string;
55
83
  addItem: string;
56
- /** Celda booleana sin etiquetas: el «sí». */
57
- /** El botón que abre el cajón y el que pliega el raíl: el mismo icono, dos acciones. */
58
- asideToggle: string;
59
84
  /** Celda booleana sin etiquetas: el «no». */
60
85
  booleanFalse: string;
86
+ /** Celda booleana sin etiquetas: el «sí». */
61
87
  booleanTrue: string;
62
88
  /** Separador entre segmentos de la ruta de navegación. */
63
89
  breadcrumbSeparator: string;
64
90
  clearSearch: string;
65
91
  close: string;
92
+ codeCopied: string;
93
+ codeCopy: string;
66
94
  confirm: string;
67
95
  empty: string;
68
96
  failure: string;
@@ -86,6 +114,8 @@ export type VunoIcons = {
86
114
  paginationLast: string;
87
115
  paginationNext: string;
88
116
  paginationPrevious: string;
117
+ passwordHide: string;
118
+ passwordShow: string;
89
119
  removeItem: string;
90
120
  retry: string;
91
121
  search: string;
@@ -102,9 +132,9 @@ export type VunoIcons = {
102
132
  export type VunoMessages = {
103
133
  addItem: string;
104
134
  applyFilters: string;
105
- /** Enlace que salta la barra y el menú de un layout y deja el foco en el contenido. */
106
- asideCollapse: string;
107
- asideToggle: string;
135
+ /** Valores accesibles de una celda booleana que se representa visualmente con un icono. */
136
+ booleanFalse: string;
137
+ booleanTrue: string;
108
138
  /** Nombre accesible de la ruta de navegación. */
109
139
  breadcrumb: string;
110
140
  cancel: string;
@@ -114,6 +144,11 @@ export type VunoMessages = {
114
144
  clearSearch: string;
115
145
  clearSelection: string;
116
146
  close: string;
147
+ codeCopied: string;
148
+ codeCopiedAnnouncement: string;
149
+ codeCopy: string;
150
+ codeCopyFailed: string;
151
+ codeRegion: string;
117
152
  /** Distingue el selector del sistema del hexadecimal de al lado, que sin esto se anuncian igual. */
118
153
  colorPicker: string;
119
154
  confirm: string;
@@ -122,6 +157,8 @@ export type VunoMessages = {
122
157
  created: string;
123
158
  deleted: string;
124
159
  deleteFailed: string;
160
+ /** Título y nombre accesible del índice de una página de documentación. */
161
+ documentToc: string;
125
162
  emptyArray: string;
126
163
  /** Segunda línea del estado vacío. Vacía por defecto: vuno no sabe qué falta en una lista ajena. */
127
164
  emptyHint: string;
@@ -137,9 +174,9 @@ export type VunoMessages = {
137
174
  * Nombre accesible de la barra de navegación.
138
175
  *
139
176
  * Lo lleva porque `VNavbar` es un `<nav>` y en la misma pantalla suele haber
140
- * otro —la columna de un dashboard—: dos regiones de navegación sin nombre
141
- * se anuncian igual y no se distinguen. Es el mismo defecto que ya se
142
- * arregló en el paginador y en la barra del layout de aplicación.
177
+ * otro —la navegación lateral de la aplicación—: dos regiones de navegación
178
+ * sin nombre se anuncian igual y no se distinguen. Es el mismo defecto que
179
+ * ya se arregló en el paginador.
143
180
  */
144
181
  navbarLabel: string;
145
182
  /** Lista vacía porque la búsqueda o los filtros no casan con nada. */
@@ -159,6 +196,8 @@ export type VunoMessages = {
159
196
  paginationLast: string;
160
197
  paginationNext: string;
161
198
  paginationPrevious: string;
199
+ passwordHide: string;
200
+ passwordShow: string;
162
201
  removeItem: string;
163
202
  /** Pie de una tabla que no pagina: «30 resultados». */
164
203
  results: string;
@@ -187,12 +226,11 @@ export type VunoMessages = {
187
226
  * es cuál sin ver la pantalla.
188
227
  */
189
228
  selectRow: string;
190
- /** Nombre accesible del disparador del `select`. Sin él, reka pone «Show popup». */
229
+ /** Nombre accesible del disparador del `select`. */
191
230
  selectToggle: string;
192
231
  showing: string;
193
232
  /** Enlace que salta las filas y deja el foco en el pie de la tabla. */
194
233
  skipTable: string;
195
- skipToContent: string;
196
234
  slugEdit: string;
197
235
  slugReset: string;
198
236
  updated: string;
@@ -30,7 +30,7 @@ export function formatDate(value, locale, options) {
30
30
  }
31
31
  export function toHexColor(value) {
32
32
  if (!value) return void 0;
33
- const corto = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(value);
34
- if (corto) return `#${corto[1]}${corto[1]}${corto[2]}${corto[2]}${corto[3]}${corto[3]}`.toLowerCase();
33
+ const shorthand = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(value);
34
+ if (shorthand) return `#${shorthand[1]}${shorthand[1]}${shorthand[2]}${shorthand[2]}${shorthand[3]}${shorthand[3]}`.toLowerCase();
35
35
  return /^#[0-9a-f]{6}$/i.test(value) ? value.toLowerCase() : void 0;
36
36
  }
@@ -1,20 +1,22 @@
1
+ const unsafePathKeys = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
1
2
  export function parsePath(path) {
2
3
  return path.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
3
4
  }
4
5
  export function getPath(object, path) {
5
6
  const keys = parsePath(path);
7
+ if (keys.some((key) => unsafePathKeys.has(key))) return void 0;
6
8
  let current = object;
7
9
  for (const key of keys) {
8
10
  if (current === null || current === void 0 || typeof current !== "object") {
9
11
  return void 0;
10
12
  }
11
- current = current[key];
13
+ current = Object.hasOwn(current, key) ? current[key] : void 0;
12
14
  }
13
15
  return current;
14
16
  }
15
17
  export function setPath(object, path, value) {
16
18
  const keys = parsePath(path);
17
- if (keys.length === 0) {
19
+ if (keys.length === 0 || keys.some((key) => unsafePathKeys.has(key))) {
18
20
  return;
19
21
  }
20
22
  let current = object;
@@ -1,5 +1,6 @@
1
+ import { type ClassValue } from 'clsx';
1
2
  import type { VunoSlots } from '#vuno/types/base';
2
- import type { VunoThemeVariants } from '#vuno/types/theme';
3
+ import type { VunoThemeCompoundVariant, VunoThemeEntry, VunoThemeKey, VunoThemeVariants } from '#vuno/types/theme';
3
4
  /**
4
5
  * Los slots de las variantes activas.
5
6
  *
@@ -11,6 +12,18 @@ import type { VunoThemeVariants } from '#vuno/types/theme';
11
12
  * consuma, en lugar de confiar en quién funde después.
12
13
  */
13
14
  export declare function selectVariants(variants: undefined | VunoThemeVariants, active: Record<string, string | undefined> | undefined): (undefined | VunoSlots)[];
15
+ /**
16
+ * Las combinaciones que se cumplen enteras.
17
+ *
18
+ * Todas sus condiciones o ninguna: una entrada con `color` y `variant` solo
19
+ * entra si las dos coinciden con lo activo. Una condición cuya dimensión no
20
+ * esté activa **no** cuenta como cumplida, que es lo que evita que una
21
+ * combinación se cuele en un componente que ni declara esa variante.
22
+ *
23
+ * Se aplican después de `selectVariants` del mismo nivel, y ese orden es lo que
24
+ * las hace útiles: lo específico llega al final y gana el conflicto.
25
+ */
26
+ export declare function selectCompoundVariants(compounds: undefined | VunoThemeCompoundVariant[], active: Record<string, string | undefined> | undefined): (undefined | VunoSlots)[];
14
27
  /** Une un slot escrito como array en una sola cadena, descartando lo vacío. */
15
28
  export declare function toClassString(value: string | string[] | undefined): string;
16
29
  /**
@@ -24,3 +37,8 @@ export declare function toClassString(value: string | string[] | undefined): str
24
37
  * más tarde en la hoja, no el más específico.
25
38
  */
26
39
  export declare function mergeSlots(...sources: (undefined | VunoSlots)[]): Record<string, string | undefined>;
40
+ /** Compone clases condicionales y resuelve conflictos de Tailwind de izquierda a derecha. */
41
+ export declare function cn(...inputs: ClassValue[]): string;
42
+ export declare function twObj<T extends Record<string, string>>(obj: T): T;
43
+ /** Define una sola entrada de tema y conserva sus slots y variantes literales. */
44
+ export declare function defineTheme<const TKey extends VunoThemeKey, const TEntry extends VunoThemeEntry>(key: TKey, entry: TEntry): Record<TKey, TEntry>;
@@ -1,5 +1,5 @@
1
- import { extendTailwindMerge } from "tailwind-merge";
2
- const merge = extendTailwindMerge({ extend: { theme: { radius: ["vuno", "vuno-control"] } } });
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
3
  export function selectVariants(variants, active) {
4
4
  if (!variants || !active) return [];
5
5
  return Object.entries(variants).map(([dimension, values]) => {
@@ -7,6 +7,15 @@ export function selectVariants(variants, active) {
7
7
  return chosen === void 0 ? void 0 : values[chosen];
8
8
  });
9
9
  }
10
+ export function selectCompoundVariants(compounds, active) {
11
+ if (!compounds || !active) return [];
12
+ return compounds.filter(
13
+ (compound) => Object.entries(compound).every(([dimension, expected]) => {
14
+ if (dimension === "class") return true;
15
+ return active[dimension] === expected;
16
+ })
17
+ ).map((compound) => compound.class);
18
+ }
10
19
  export function toClassString(value) {
11
20
  if (!value) return "";
12
21
  return Array.isArray(value) ? value.filter(Boolean).join(" ") : value;
@@ -18,8 +27,17 @@ export function mergeSlots(...sources) {
18
27
  for (const [slot, value] of Object.entries(source)) {
19
28
  const className = toClassString(value);
20
29
  if (!className) continue;
21
- merged[slot] = merged[slot] ? merge(merged[slot], className) : className;
30
+ merged[slot] = merged[slot] ? twMerge(merged[slot], className) : className;
22
31
  }
23
32
  }
24
33
  return merged;
25
34
  }
35
+ export function cn(...inputs) {
36
+ return twMerge(clsx(inputs));
37
+ }
38
+ export function twObj(obj) {
39
+ return obj;
40
+ }
41
+ export function defineTheme(key, entry) {
42
+ return { [key]: entry };
43
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupteknology/vuno",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "Formularios, tablas y diálogos declarativos para Nuxt 4, con componentes propios y tokens sobreescribibles.",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -29,6 +29,14 @@
29
29
  "types": "./dist/types.d.mts",
30
30
  "import": "./dist/module.mjs"
31
31
  },
32
+ "./composables/defineShortcuts": {
33
+ "types": "./dist/runtime/app/composables/defineShortcuts.d.ts",
34
+ "import": "./dist/runtime/app/composables/defineShortcuts.js"
35
+ },
36
+ "./composables/use*": {
37
+ "types": "./dist/runtime/app/composables/use*.d.ts",
38
+ "import": "./dist/runtime/app/composables/use*.js"
39
+ },
32
40
  "./package.json": "./package.json"
33
41
  },
34
42
  "main": "./dist/module.mjs",
@@ -36,6 +44,12 @@
36
44
  "*": {
37
45
  ".": [
38
46
  "./dist/types.d.mts"
47
+ ],
48
+ "composables/defineShortcuts": [
49
+ "./dist/runtime/app/composables/defineShortcuts.d.ts"
50
+ ],
51
+ "composables/use*": [
52
+ "./dist/runtime/app/composables/use*.d.ts"
39
53
  ]
40
54
  }
41
55
  },
@@ -44,11 +58,12 @@
44
58
  ],
45
59
  "dependencies": {
46
60
  "@floating-ui/dom": "^1.8.0",
47
- "@vueuse/core": "^15.0.0",
48
61
  "@iconify-json/lucide": "^1.2.134",
49
62
  "@nuxt/icon": "^2.5.1",
50
63
  "@nuxt/kit": "^4.5.2",
51
64
  "@tailwindcss/vite": "^4.3.3",
65
+ "@tanstack/vue-query": "^5.102.8",
66
+ "clsx": "^2.1.1",
52
67
  "gsap": "^3.15.0",
53
68
  "tailwind-merge": "^3.7.0",
54
69
  "tailwindcss": "^4.3.3"
@@ -56,7 +71,7 @@
56
71
  "devDependencies": {
57
72
  "@nuxt/module-builder": "^1.0.3",
58
73
  "@nuxt/schema": "^4.5.2",
59
- "@tanstack/vue-query": "^5.0.0",
74
+ "@nuxt/test-utils": "^4.3.2",
60
75
  "@types/node": "^26.6.2",
61
76
  "@vitejs/plugin-vue": "^6.0.9",
62
77
  "@vitest/coverage-v8": "^5.0.1",
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- name: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,32 +0,0 @@
1
- <script setup>
2
- import { computed, resolveComponent } from "vue";
3
- defineOptions({
4
- /**
5
- * El nombre importa. Sin él, el componente se llama `Icon` por su
6
- * fichero, y entonces el `<Icon>` de su propia plantilla **se resuelve a
7
- * sí mismo**: fuera de Nuxt se monta en bucle hasta agotar la pila, y el
8
- * error que sale —«Maximum call stack size exceeded»— no menciona el
9
- * icono por ninguna parte.
10
- */
11
- name: "VunoIcon"
12
- });
13
- const props = defineProps({
14
- name: { type: String, required: true }
15
- });
16
- const iconComponent = resolveComponent("Icon");
17
- const is = computed(() => typeof iconComponent === "string" ? "span" : iconComponent);
18
- </script>
19
-
20
- <template>
21
- <!--
22
- Decorativo por defecto: en todos los usos del módulo el icono acompaña a
23
- un texto o a un `aria-label` del elemento que lo contiene, así que
24
- anunciarlo repetiría lo que ya se lee. Quien necesite lo contrario lo
25
- sobreescribe, porque los atributos de quien lo usa ganan al llegar aquí.
26
- -->
27
- <component
28
- :is="is"
29
- aria-hidden="true"
30
- :name="props.name"
31
- />
32
- </template>
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- name: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,19 +0,0 @@
1
- <script setup>
2
- import { useTheme } from "#vuno/composables/useTheme";
3
- const props = defineProps({
4
- size: { type: String, required: false, default: "md" },
5
- ui: { type: Object, required: false, default: void 0 }
6
- });
7
- defineSlots();
8
- const ui = useTheme("control", () => props.ui, () => ({ size: props.size }));
9
- </script>
10
-
11
- <template>
12
- <div :class="ui.root">
13
- <slot name="leading" />
14
-
15
- <slot />
16
-
17
- <slot name="trailing" />
18
- </div>
19
- </template>
@@ -1,7 +0,0 @@
1
- import type { VunoField } from '#vuno/types/field';
2
- type __VLS_Props = {
3
- field: VunoField;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
- declare const _default: typeof __VLS_export;
7
- export default _default;
@@ -1,88 +0,0 @@
1
- <script setup>
2
- import { computed } from "vue";
3
- import { useForm } from "#vuno/composables/useForm";
4
- import FormField from "#vuno/components/forms/FormField.vue";
5
- import FieldArray from "#vuno/components/forms/fields/FieldArray.vue";
6
- import FieldCheckbox from "#vuno/components/forms/fields/FieldCheckbox.vue";
7
- import FieldColor from "#vuno/components/forms/fields/FieldColor.vue";
8
- import FieldEmail from "#vuno/components/forms/fields/FieldEmail.vue";
9
- import FieldFile from "#vuno/components/forms/fields/FieldFile.vue";
10
- import FieldNumber from "#vuno/components/forms/fields/FieldNumber.vue";
11
- import FieldPassword from "#vuno/components/forms/fields/FieldPassword.vue";
12
- import FieldRadio from "#vuno/components/forms/fields/FieldRadio.vue";
13
- import FieldSelect from "#vuno/components/forms/fields/FieldSelect.vue";
14
- import FieldSlug from "#vuno/components/forms/fields/FieldSlug.vue";
15
- import FieldSwitch from "#vuno/components/forms/fields/FieldSwitch.vue";
16
- import FieldText from "#vuno/components/forms/fields/FieldText.vue";
17
- import FieldTextarea from "#vuno/components/forms/fields/FieldTextarea.vue";
18
- const props = defineProps({
19
- field: { type: Object, required: true }
20
- });
21
- const components = {
22
- array: FieldArray,
23
- checkbox: FieldCheckbox,
24
- color: FieldColor,
25
- email: FieldEmail,
26
- file: FieldFile,
27
- number: FieldNumber,
28
- password: FieldPassword,
29
- radio: FieldRadio,
30
- select: FieldSelect,
31
- slug: FieldSlug,
32
- switch: FieldSwitch,
33
- text: FieldText,
34
- textarea: FieldTextarea
35
- };
36
- const form = useForm();
37
- const component = computed(() => components[props.field.type]);
38
- const size = computed(() => props.field.size ?? form.size.value);
39
- const fieldProps = computed(() => {
40
- const { class: _class, columns: _columns, type: _type, ...rest } = props.field;
41
- return { ...rest, size: size.value };
42
- });
43
- function onBlur(event) {
44
- if (event.target?.getAttribute("aria-expanded") === "true") return;
45
- form.setTouched(props.field.name);
46
- }
47
- </script>
48
-
49
- <template>
50
- <!--
51
- El envoltorio es propio, y la razón por la que se escribió no era el
52
- aspecto. El `UFormField` de Nuxt UI, que es lo que había antes, entregaba
53
- el `id`, el `aria-describedby` y el `aria-invalid` **por inyección**, y
54
- solo los recogían sus propios componentes: el primer campo de la casa que
55
- entrara se quedaba sin etiqueta asociada, viéndose exactamente igual.
56
- Este los entrega por el slot, que lo recoge cualquiera — y esa sigue
57
- siendo la razón de que siga así ahora que Nuxt UI ya no está.
58
- -->
59
- <FormField
60
- :class="props.field.class"
61
- :description="props.field.description"
62
- :error="form.errorFor(props.field.name)"
63
- :help="props.field.help"
64
- :hint="props.field.hint"
65
- :label="props.field.label"
66
- :name="props.field.name"
67
- :required="props.field.required"
68
- :size="size"
69
- >
70
- <template #default="control">
71
- <!--
72
- El motor decide cuándo avisar, y para eso necesita saber que se
73
- ha salido del campo. Se escucha en la fase de captura porque el
74
- evento nace en el `<input>` de dentro y `blur` no burbujea.
75
-
76
- `control` va **antes** que los props del campo: lo que aporta
77
- el envoltorio —el `id` y los `aria-*`— no lo declara ningún
78
- campo, y las dos claves que sí coinciden, `name` y `required`,
79
- son de la definición, que es donde se escriben.
80
- -->
81
- <component
82
- :is="component"
83
- v-bind="{ ...control, ...fieldProps }"
84
- @blur.capture="onBlur"
85
- />
86
- </template>
87
- </FormField>
88
- </template>
@@ -1,7 +0,0 @@
1
- import type { VunoField } from '#vuno/types/field';
2
- type __VLS_Props = {
3
- field: VunoField;
4
- };
5
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
- declare const _default: typeof __VLS_export;
7
- export default _default;
@@ -1,12 +0,0 @@
1
- import type { VunoFormSection } from '#vuno/types/form';
2
- type __VLS_Props = {
3
- /**
4
- * Sin marco ni título: es lo que se usa dentro de una pestaña, donde
5
- * el rótulo ya lo pone la propia pestaña.
6
- */
7
- plain?: boolean;
8
- section: VunoFormSection;
9
- };
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
@@ -1,12 +0,0 @@
1
- import type { VunoFormSection } from '#vuno/types/form';
2
- type __VLS_Props = {
3
- /**
4
- * Sin marco ni título: es lo que se usa dentro de una pestaña, donde
5
- * el rótulo ya lo pone la propia pestaña.
6
- */
7
- plain?: boolean;
8
- section: VunoFormSection;
9
- };
10
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;