@groupteknology/vuno 2.0.0 → 3.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 (381) hide show
  1. package/README.md +193 -175
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +7 -1
  4. package/dist/runtime/app/assets/css/dialog.css +1 -1
  5. package/dist/runtime/app/assets/css/main.css +1 -1
  6. package/dist/runtime/app/assets/css/theme.css +1 -1
  7. package/dist/runtime/app/assets/css/tokens.css +1 -1
  8. package/dist/runtime/app/components/Alert/Alert.d.vue.ts +2 -2
  9. package/dist/runtime/app/components/Alert/Alert.theme.d.ts +7 -6
  10. package/dist/runtime/app/components/Alert/Alert.theme.js +7 -6
  11. package/dist/runtime/app/components/Alert/Alert.types.d.ts +10 -0
  12. package/dist/runtime/app/components/Alert/Alert.vue +17 -8
  13. package/dist/runtime/app/components/Alert/Alert.vue.d.ts +2 -2
  14. package/dist/runtime/app/components/App/App.d.vue.ts +3 -19
  15. package/dist/runtime/app/components/App/App.types.d.ts +4 -0
  16. package/dist/runtime/app/components/App/App.vue +48 -29
  17. package/dist/runtime/app/components/App/App.vue.d.ts +3 -19
  18. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue +2 -3
  19. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.d.ts +5 -5
  20. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.js +7 -9
  21. package/dist/runtime/app/components/App/internal/Toast/Toast.vue +27 -36
  22. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.d.ts +3 -3
  23. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.js +3 -3
  24. package/dist/runtime/app/components/Avatar/Avatar.d.vue.ts +5 -22
  25. package/dist/runtime/app/components/Avatar/Avatar.types.d.ts +10 -0
  26. package/dist/runtime/app/components/Avatar/Avatar.types.js +0 -0
  27. package/dist/runtime/app/components/Avatar/Avatar.vue.d.ts +5 -22
  28. package/dist/runtime/app/components/Badge/Badge.d.vue.ts +7 -26
  29. package/dist/runtime/app/components/Badge/Badge.types.d.ts +12 -0
  30. package/dist/runtime/app/components/Badge/Badge.types.js +0 -0
  31. package/dist/runtime/app/components/Badge/Badge.vue.d.ts +7 -26
  32. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.d.vue.ts +7 -0
  33. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.theme.d.ts +15 -0
  34. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.theme.js +16 -0
  35. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.types.d.ts +7 -0
  36. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.types.js +0 -0
  37. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.vue +109 -0
  38. package/dist/runtime/app/components/Breadcrumb/Breadcrumb.vue.d.ts +7 -0
  39. package/dist/runtime/app/components/Button/Button.d.vue.ts +11 -31
  40. package/dist/runtime/app/components/Button/Button.theme.d.ts +36 -22
  41. package/dist/runtime/app/components/Button/Button.theme.js +28 -20
  42. package/dist/runtime/app/components/Button/Button.types.d.ts +24 -0
  43. package/dist/runtime/app/components/Button/Button.types.js +0 -0
  44. package/dist/runtime/app/components/Button/Button.vue +84 -33
  45. package/dist/runtime/app/components/Button/Button.vue.d.ts +11 -31
  46. package/dist/runtime/app/components/Card/Card.d.vue.ts +7 -69
  47. package/dist/runtime/app/components/Card/Card.theme.d.ts +56 -13
  48. package/dist/runtime/app/components/Card/Card.theme.js +39 -19
  49. package/dist/runtime/app/components/Card/Card.types.d.ts +12 -0
  50. package/dist/runtime/app/components/Card/Card.types.js +0 -0
  51. package/dist/runtime/app/components/Card/Card.vue +17 -11
  52. package/dist/runtime/app/components/Card/Card.vue.d.ts +7 -69
  53. package/dist/runtime/app/components/Code/Code.d.vue.ts +3 -13
  54. package/dist/runtime/app/components/Code/Code.theme.d.ts +1 -1
  55. package/dist/runtime/app/components/Code/Code.theme.js +1 -1
  56. package/dist/runtime/app/components/Code/Code.types.d.ts +8 -0
  57. package/dist/runtime/app/components/Code/Code.types.js +0 -0
  58. package/dist/runtime/app/components/Code/Code.vue +12 -5
  59. package/dist/runtime/app/components/Code/Code.vue.d.ts +3 -13
  60. package/dist/runtime/app/components/Collapsible/Collapsible.d.vue.ts +31 -0
  61. package/dist/runtime/app/components/Collapsible/Collapsible.theme.d.ts +6 -0
  62. package/dist/runtime/app/components/Collapsible/Collapsible.theme.js +7 -0
  63. package/dist/runtime/app/components/Collapsible/Collapsible.types.d.ts +4 -0
  64. package/dist/runtime/app/components/Collapsible/Collapsible.types.js +0 -0
  65. package/dist/runtime/app/components/Collapsible/Collapsible.vue +72 -0
  66. package/dist/runtime/app/components/Collapsible/Collapsible.vue.d.ts +31 -0
  67. package/dist/runtime/app/components/ColorModeButton/ColorModeButton.d.vue.ts +12 -0
  68. package/dist/runtime/app/components/ColorModeButton/ColorModeButton.types.d.ts +13 -0
  69. package/dist/runtime/app/components/ColorModeButton/ColorModeButton.types.js +0 -0
  70. package/dist/runtime/app/components/ColorModeButton/ColorModeButton.vue +55 -0
  71. package/dist/runtime/app/components/ColorModeButton/ColorModeButton.vue.d.ts +12 -0
  72. package/dist/runtime/app/components/Confirm/Confirm.d.vue.ts +2 -6
  73. package/dist/runtime/app/components/Confirm/Confirm.types.d.ts +6 -0
  74. package/dist/runtime/app/components/Confirm/Confirm.types.js +0 -0
  75. package/dist/runtime/app/components/Confirm/Confirm.vue.d.ts +2 -6
  76. package/dist/runtime/app/components/Container/Container.d.vue.ts +4 -28
  77. package/dist/runtime/app/components/Container/Container.types.d.ts +9 -0
  78. package/dist/runtime/app/components/Container/Container.types.js +0 -0
  79. package/dist/runtime/app/components/Container/Container.vue +1 -1
  80. package/dist/runtime/app/components/Container/Container.vue.d.ts +4 -28
  81. package/dist/runtime/app/components/ControlGroup/ControlGroup.d.vue.ts +5 -14
  82. package/dist/runtime/app/components/ControlGroup/ControlGroup.types.d.ts +9 -0
  83. package/dist/runtime/app/components/ControlGroup/ControlGroup.types.js +0 -0
  84. package/dist/runtime/app/components/ControlGroup/ControlGroup.vue.d.ts +5 -14
  85. package/dist/runtime/app/components/DataTable/DataTable.d.vue.ts +64 -0
  86. package/dist/runtime/app/components/DataTable/DataTable.theme.d.ts +17 -0
  87. package/dist/runtime/app/components/DataTable/DataTable.theme.js +19 -0
  88. package/dist/runtime/app/components/DataTable/DataTable.types.d.ts +13 -0
  89. package/dist/runtime/app/components/DataTable/DataTable.types.js +0 -0
  90. package/dist/runtime/app/components/DataTable/DataTable.vue +356 -0
  91. package/dist/runtime/app/components/DataTable/DataTable.vue.d.ts +64 -0
  92. package/dist/runtime/app/components/{Table/internal/useVunoTable.d.ts → DataTable/internal/useVunoDataTable.d.ts} +6 -29
  93. package/dist/runtime/app/components/{Table/internal/useVunoTable.js → DataTable/internal/useVunoDataTable.js} +2 -29
  94. package/dist/runtime/app/components/FieldArray/FieldArray.d.vue.ts +2 -2
  95. package/dist/runtime/app/components/FieldArray/FieldArray.types.d.ts +2 -0
  96. package/dist/runtime/app/components/FieldArray/FieldArray.types.js +0 -0
  97. package/dist/runtime/app/components/FieldArray/FieldArray.vue +12 -5
  98. package/dist/runtime/app/components/FieldArray/FieldArray.vue.d.ts +2 -2
  99. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.d.vue.ts +2 -2
  100. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.types.d.ts +2 -0
  101. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.types.js +0 -0
  102. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue +1 -1
  103. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue.d.ts +2 -2
  104. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.d.vue.ts +4 -3
  105. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue.d.ts +4 -3
  106. package/dist/runtime/app/components/FieldColor/FieldColor.d.vue.ts +2 -2
  107. package/dist/runtime/app/components/FieldColor/FieldColor.types.d.ts +2 -0
  108. package/dist/runtime/app/components/FieldColor/FieldColor.types.js +0 -0
  109. package/dist/runtime/app/components/FieldColor/FieldColor.vue +3 -3
  110. package/dist/runtime/app/components/FieldColor/FieldColor.vue.d.ts +2 -2
  111. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.d.vue.ts +2 -2
  112. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.types.d.ts +2 -0
  113. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.types.js +0 -0
  114. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue +3 -3
  115. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue.d.ts +2 -2
  116. package/dist/runtime/app/components/FieldFile/FieldFile.d.vue.ts +2 -2
  117. package/dist/runtime/app/components/FieldFile/FieldFile.types.d.ts +2 -0
  118. package/dist/runtime/app/components/FieldFile/FieldFile.types.js +0 -0
  119. package/dist/runtime/app/components/FieldFile/FieldFile.vue +1 -1
  120. package/dist/runtime/app/components/FieldFile/FieldFile.vue.d.ts +2 -2
  121. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.d.vue.ts +4 -3
  122. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.d.ts +1 -0
  123. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.js +1 -0
  124. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue +26 -5
  125. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue.d.ts +4 -3
  126. package/dist/runtime/app/components/FieldInput/FieldInput.d.vue.ts +4 -4
  127. package/dist/runtime/app/components/FieldInput/FieldInput.types.d.ts +2 -0
  128. package/dist/runtime/app/components/FieldInput/FieldInput.types.js +0 -0
  129. package/dist/runtime/app/components/FieldInput/FieldInput.vue +3 -3
  130. package/dist/runtime/app/components/FieldInput/FieldInput.vue.d.ts +4 -4
  131. package/dist/runtime/app/components/FieldNumber/FieldNumber.d.vue.ts +2 -2
  132. package/dist/runtime/app/components/FieldNumber/FieldNumber.types.d.ts +2 -0
  133. package/dist/runtime/app/components/FieldNumber/FieldNumber.types.js +0 -0
  134. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue +3 -3
  135. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue.d.ts +2 -2
  136. package/dist/runtime/app/components/FieldPassword/FieldPassword.d.vue.ts +2 -2
  137. package/dist/runtime/app/components/FieldPassword/FieldPassword.types.d.ts +2 -0
  138. package/dist/runtime/app/components/FieldPassword/FieldPassword.types.js +0 -0
  139. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue +4 -4
  140. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue.d.ts +2 -2
  141. package/dist/runtime/app/components/FieldRadio/FieldRadio.d.vue.ts +3 -2
  142. package/dist/runtime/app/components/FieldRadio/FieldRadio.types.d.ts +2 -0
  143. package/dist/runtime/app/components/FieldRadio/FieldRadio.types.js +0 -0
  144. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue +1 -1
  145. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue.d.ts +3 -2
  146. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.d.vue.ts +4 -4
  147. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue +6 -2
  148. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue.d.ts +4 -4
  149. package/dist/runtime/app/components/FieldSearch/FieldSearch.d.vue.ts +3 -3
  150. package/dist/runtime/app/components/FieldSearch/FieldSearch.types.d.ts +2 -0
  151. package/dist/runtime/app/components/FieldSearch/FieldSearch.types.js +0 -0
  152. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue +4 -4
  153. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue.d.ts +3 -3
  154. package/dist/runtime/app/components/FieldSelect/FieldSelect.d.vue.ts +3 -2
  155. package/dist/runtime/app/components/FieldSelect/FieldSelect.types.d.ts +2 -0
  156. package/dist/runtime/app/components/FieldSelect/FieldSelect.types.js +0 -0
  157. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue +1 -1
  158. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue.d.ts +3 -2
  159. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.d.vue.ts +7 -7
  160. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue +16 -6
  161. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue.d.ts +7 -7
  162. package/dist/runtime/app/components/FieldSlug/FieldSlug.d.vue.ts +2 -2
  163. package/dist/runtime/app/components/FieldSlug/FieldSlug.types.d.ts +2 -0
  164. package/dist/runtime/app/components/FieldSlug/FieldSlug.types.js +0 -0
  165. package/dist/runtime/app/components/FieldSlug/FieldSlug.vue +4 -4
  166. package/dist/runtime/app/components/FieldSlug/FieldSlug.vue.d.ts +2 -2
  167. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.d.vue.ts +2 -2
  168. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.types.d.ts +2 -0
  169. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.types.js +0 -0
  170. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue +1 -1
  171. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue.d.ts +2 -2
  172. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.d.vue.ts +4 -3
  173. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue.d.ts +4 -3
  174. package/dist/runtime/app/components/FieldTags/FieldTags.d.vue.ts +2 -2
  175. package/dist/runtime/app/components/FieldTags/FieldTags.types.d.ts +2 -0
  176. package/dist/runtime/app/components/FieldTags/FieldTags.types.js +0 -0
  177. package/dist/runtime/app/components/FieldTags/FieldTags.vue +1 -1
  178. package/dist/runtime/app/components/FieldTags/FieldTags.vue.d.ts +2 -2
  179. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.d.vue.ts +4 -4
  180. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue +16 -6
  181. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue.d.ts +4 -4
  182. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.d.vue.ts +2 -2
  183. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.types.d.ts +2 -0
  184. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.types.js +0 -0
  185. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue +1 -1
  186. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue.d.ts +2 -2
  187. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.d.vue.ts +4 -3
  188. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue +4 -4
  189. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue.d.ts +4 -3
  190. package/dist/runtime/app/components/Form/Form.d.vue.ts +3 -19
  191. package/dist/runtime/app/components/Form/Form.types.d.ts +8 -0
  192. package/dist/runtime/app/components/Form/Form.types.js +0 -0
  193. package/dist/runtime/app/components/Form/Form.vue +3 -3
  194. package/dist/runtime/app/components/Form/Form.vue.d.ts +3 -19
  195. package/dist/runtime/app/components/FormField/FormField.d.vue.ts +4 -18
  196. package/dist/runtime/app/components/FormField/FormField.types.d.ts +14 -0
  197. package/dist/runtime/app/components/FormField/FormField.types.js +0 -0
  198. package/dist/runtime/app/components/FormField/FormField.vue +26 -10
  199. package/dist/runtime/app/components/FormField/FormField.vue.d.ts +4 -18
  200. package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.d.vue.ts +2 -3
  201. package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.vue.d.ts +2 -3
  202. package/dist/runtime/app/components/FormModal/FormModal.d.vue.ts +6 -25
  203. package/dist/runtime/app/components/FormModal/FormModal.types.d.ts +14 -0
  204. package/dist/runtime/app/components/FormModal/FormModal.types.js +0 -0
  205. package/dist/runtime/app/components/FormModal/FormModal.vue +12 -2
  206. package/dist/runtime/app/components/FormModal/FormModal.vue.d.ts +6 -25
  207. package/dist/runtime/app/components/FormSection/FormSection.d.vue.ts +2 -13
  208. package/dist/runtime/app/components/FormSection/FormSection.types.d.ts +7 -0
  209. package/dist/runtime/app/components/FormSection/FormSection.types.js +0 -0
  210. package/dist/runtime/app/components/FormSection/FormSection.vue +11 -4
  211. package/dist/runtime/app/components/FormSection/FormSection.vue.d.ts +2 -13
  212. package/dist/runtime/app/components/Icon/Icon.d.vue.ts +2 -4
  213. package/dist/runtime/app/components/Icon/Icon.types.d.ts +3 -0
  214. package/dist/runtime/app/components/Icon/Icon.types.js +0 -0
  215. package/dist/runtime/app/components/Icon/Icon.vue.d.ts +2 -4
  216. package/dist/runtime/app/components/Menu/Menu.d.vue.ts +4 -21
  217. package/dist/runtime/app/components/Menu/Menu.types.d.ts +7 -0
  218. package/dist/runtime/app/components/Menu/Menu.types.js +0 -0
  219. package/dist/runtime/app/components/Menu/Menu.vue +18 -110
  220. package/dist/runtime/app/components/Menu/Menu.vue.d.ts +4 -21
  221. package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.d.vue.ts +26 -0
  222. package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.vue +167 -0
  223. package/dist/runtime/app/components/Menu/internal/MenuLevel/MenuLevel.vue.d.ts +26 -0
  224. package/dist/runtime/app/components/Modal/Modal.d.vue.ts +6 -18
  225. package/dist/runtime/app/components/Modal/Modal.theme.d.ts +18 -14
  226. package/dist/runtime/app/components/Modal/Modal.theme.js +17 -21
  227. package/dist/runtime/app/components/Modal/Modal.types.d.ts +12 -0
  228. package/dist/runtime/app/components/Modal/Modal.types.js +0 -0
  229. package/dist/runtime/app/components/Modal/Modal.vue +99 -65
  230. package/dist/runtime/app/components/Modal/Modal.vue.d.ts +6 -18
  231. package/dist/runtime/app/components/Navbar/Navbar.d.vue.ts +3 -28
  232. package/dist/runtime/app/components/Navbar/Navbar.theme.d.ts +2 -3
  233. package/dist/runtime/app/components/Navbar/Navbar.theme.js +2 -3
  234. package/dist/runtime/app/components/Navbar/Navbar.types.d.ts +4 -0
  235. package/dist/runtime/app/components/Navbar/Navbar.types.js +0 -0
  236. package/dist/runtime/app/components/Navbar/Navbar.vue.d.ts +3 -28
  237. package/dist/runtime/app/components/NavigationList/NavigationList.d.vue.ts +4 -33
  238. package/dist/runtime/app/components/NavigationList/NavigationList.keys.d.ts +3 -0
  239. package/dist/runtime/app/components/NavigationList/NavigationList.keys.js +1 -0
  240. package/dist/runtime/app/components/NavigationList/NavigationList.types.d.ts +9 -0
  241. package/dist/runtime/app/components/NavigationList/NavigationList.types.js +0 -0
  242. package/dist/runtime/app/components/NavigationList/NavigationList.vue +65 -19
  243. package/dist/runtime/app/components/NavigationList/NavigationList.vue.d.ts +4 -33
  244. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.d.vue.ts +3 -24
  245. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.keys.d.ts +7 -0
  246. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.keys.js +3 -0
  247. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.types.d.ts +10 -0
  248. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.types.js +0 -0
  249. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue +45 -13
  250. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue.d.ts +3 -24
  251. package/dist/runtime/app/components/NavigationToc/NavigationToc.d.vue.ts +3 -10
  252. package/dist/runtime/app/components/NavigationToc/NavigationToc.types.d.ts +7 -0
  253. package/dist/runtime/app/components/NavigationToc/NavigationToc.types.js +0 -0
  254. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue +8 -1
  255. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue.d.ts +3 -10
  256. package/dist/runtime/app/components/Pagination/Pagination.d.vue.ts +5 -23
  257. package/dist/runtime/app/components/Pagination/Pagination.types.d.ts +11 -0
  258. package/dist/runtime/app/components/Pagination/Pagination.types.js +0 -0
  259. package/dist/runtime/app/components/Pagination/Pagination.vue +6 -2
  260. package/dist/runtime/app/components/Pagination/Pagination.vue.d.ts +5 -23
  261. package/dist/runtime/app/components/Slideover/Slideover.d.vue.ts +4 -13
  262. package/dist/runtime/app/components/Slideover/Slideover.types.d.ts +12 -0
  263. package/dist/runtime/app/components/Slideover/Slideover.types.js +0 -0
  264. package/dist/runtime/app/components/Slideover/Slideover.vue.d.ts +4 -13
  265. package/dist/runtime/app/components/State/State.d.vue.ts +2 -2
  266. package/dist/runtime/app/components/State/State.types.d.ts +15 -0
  267. package/dist/runtime/app/components/State/State.types.js +0 -0
  268. package/dist/runtime/app/components/State/State.vue +13 -3
  269. package/dist/runtime/app/components/State/State.vue.d.ts +2 -2
  270. package/dist/runtime/app/components/Table/Table.d.vue.ts +8 -55
  271. package/dist/runtime/app/components/Table/Table.theme.d.ts +17 -35
  272. package/dist/runtime/app/components/Table/Table.theme.js +15 -48
  273. package/dist/runtime/app/components/Table/Table.types.d.ts +9 -0
  274. package/dist/runtime/app/components/Table/Table.types.js +0 -0
  275. package/dist/runtime/app/components/Table/Table.vue +143 -415
  276. package/dist/runtime/app/components/Table/Table.vue.d.ts +8 -55
  277. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue +13 -3
  278. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue +8 -1
  279. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue +8 -1
  280. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue +8 -1
  281. package/dist/runtime/app/components/Table/internal/CellText/CellText.vue +8 -1
  282. package/dist/runtime/app/components/Table/internal/TableCell/TableCell.d.vue.ts +2 -2
  283. package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue.d.ts +2 -2
  284. package/dist/runtime/app/components/Table/internal/column.d.ts +9 -0
  285. package/dist/runtime/app/components/Table/internal/column.js +15 -0
  286. package/dist/runtime/app/components/Table/internal/useVunoTableSelection.d.ts +1 -1
  287. package/dist/runtime/app/components/Tabs/Tabs.d.vue.ts +5 -24
  288. package/dist/runtime/app/components/Tabs/Tabs.theme.d.ts +15 -6
  289. package/dist/runtime/app/components/Tabs/Tabs.theme.js +15 -6
  290. package/dist/runtime/app/components/Tabs/Tabs.types.d.ts +10 -0
  291. package/dist/runtime/app/components/Tabs/Tabs.types.js +0 -0
  292. package/dist/runtime/app/components/Tabs/Tabs.vue +91 -17
  293. package/dist/runtime/app/components/Tabs/Tabs.vue.d.ts +5 -24
  294. package/dist/runtime/app/components/Text/Text.d.vue.ts +19 -0
  295. package/dist/runtime/app/components/Text/Text.theme.d.ts +55 -0
  296. package/dist/runtime/app/components/Text/Text.theme.js +28 -0
  297. package/dist/runtime/app/components/Text/Text.types.d.ts +9 -0
  298. package/dist/runtime/app/components/Text/Text.types.js +0 -0
  299. package/dist/runtime/app/components/Text/Text.vue +37 -0
  300. package/dist/runtime/app/components/Text/Text.vue.d.ts +19 -0
  301. package/dist/runtime/app/components/Toolbar/Toolbar.d.vue.ts +17 -0
  302. package/dist/runtime/app/components/Toolbar/Toolbar.theme.d.ts +5 -0
  303. package/dist/runtime/app/components/Toolbar/Toolbar.theme.js +6 -0
  304. package/dist/runtime/app/components/Toolbar/Toolbar.types.d.ts +9 -0
  305. package/dist/runtime/app/components/Toolbar/Toolbar.types.js +0 -0
  306. package/dist/runtime/app/components/Toolbar/Toolbar.vue +76 -0
  307. package/dist/runtime/app/components/Toolbar/Toolbar.vue.d.ts +17 -0
  308. package/dist/runtime/app/components/Tooltip/Tooltip.d.vue.ts +5 -26
  309. package/dist/runtime/app/components/Tooltip/Tooltip.types.d.ts +11 -0
  310. package/dist/runtime/app/components/Tooltip/Tooltip.types.js +0 -0
  311. package/dist/runtime/app/components/Tooltip/Tooltip.vue +1 -1
  312. package/dist/runtime/app/components/Tooltip/Tooltip.vue.d.ts +5 -26
  313. package/dist/runtime/app/composables/internal/useVunoContext.d.ts +5 -0
  314. package/dist/runtime/app/composables/internal/useVunoContext.js +8 -0
  315. package/dist/runtime/app/composables/internal/useVunoControlGroup.d.ts +3 -4
  316. package/dist/runtime/app/composables/internal/useVunoDirection.d.ts +5 -0
  317. package/dist/runtime/app/composables/internal/useVunoDirection.js +8 -0
  318. package/dist/runtime/app/composables/internal/useVunoFormContext.d.ts +5 -0
  319. package/dist/runtime/app/composables/internal/useVunoFormContext.js +8 -0
  320. package/dist/runtime/app/composables/internal/useVunoOverlayBehind.d.ts +6 -0
  321. package/dist/runtime/app/composables/internal/useVunoOverlayBehind.js +8 -0
  322. package/dist/runtime/app/composables/useContext.js +2 -3
  323. package/dist/runtime/app/composables/useForm.js +2 -3
  324. package/dist/runtime/app/composables/useTableQuery.d.ts +1 -1
  325. package/dist/runtime/app/composables/useTheme.js +6 -3
  326. package/dist/runtime/app/{components/internal/ControlShell/ControlShell.vue.d.ts → primitives/PrimitiveControl/PrimitiveControl.d.vue.ts} +4 -3
  327. package/dist/runtime/app/{components/internal/ControlShell/ControlShell.theme.d.ts → primitives/PrimitiveControl/PrimitiveControl.theme.d.ts} +1 -1
  328. package/dist/runtime/app/{components/internal/ControlShell/ControlShell.vue → primitives/PrimitiveControl/PrimitiveControl.vue} +1 -1
  329. package/dist/runtime/app/{components/internal/ControlShell/ControlShell.d.vue.ts → primitives/PrimitiveControl/PrimitiveControl.vue.d.ts} +4 -3
  330. package/dist/runtime/app/{components/internal/Input/Input.d.vue.ts → primitives/PrimitiveInput/PrimitiveInput.d.vue.ts} +4 -3
  331. package/dist/runtime/app/{components/internal/Input/Input.vue → primitives/PrimitiveInput/PrimitiveInput.vue} +4 -4
  332. package/dist/runtime/app/{components/internal/Input/Input.vue.d.ts → primitives/PrimitiveInput/PrimitiveInput.vue.d.ts} +4 -3
  333. package/dist/runtime/app/{components/internal/NumberInput/NumberInput.d.vue.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.d.vue.ts} +3 -4
  334. package/dist/runtime/app/{components/internal/NumberInput/NumberInput.theme.d.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.theme.d.ts} +3 -0
  335. package/dist/runtime/app/{components/internal/NumberInput/NumberInput.theme.js → primitives/PrimitiveNumberInput/PrimitiveNumberInput.theme.js} +4 -1
  336. package/dist/runtime/app/{components/internal/NumberInput/NumberInput.vue → primitives/PrimitiveNumberInput/PrimitiveNumberInput.vue} +7 -5
  337. package/dist/runtime/app/{components/internal/NumberInput/NumberInput.vue.d.ts → primitives/PrimitiveNumberInput/PrimitiveNumberInput.vue.d.ts} +3 -4
  338. package/dist/runtime/app/theme/index.d.ts +254 -96
  339. package/dist/runtime/app/theme/index.js +13 -5
  340. package/dist/runtime/app/theme/messages.js +1 -0
  341. package/dist/runtime/app/theme/shared.d.ts +3 -2
  342. package/dist/runtime/app/theme/shared.js +2 -1
  343. package/dist/runtime/app/types/app.d.ts +4 -2
  344. package/dist/runtime/app/types/base.d.ts +5 -23
  345. package/dist/runtime/app/types/field.d.ts +3 -1
  346. package/dist/runtime/app/types/form.d.ts +3 -4
  347. package/dist/runtime/app/types/index.d.ts +55 -7
  348. package/dist/runtime/app/types/menu.d.ts +22 -0
  349. package/dist/runtime/app/types/menu.js +0 -0
  350. package/dist/runtime/app/types/page.d.ts +6 -10
  351. package/dist/runtime/app/types/slots.d.ts +8 -4
  352. package/dist/runtime/app/types/table.d.ts +28 -28
  353. package/dist/runtime/app/types/text.d.ts +6 -0
  354. package/dist/runtime/app/types/text.js +0 -0
  355. package/dist/runtime/app/types/theme.d.ts +15 -6
  356. package/dist/runtime/app/utils/format.js +3 -2
  357. package/dist/runtime/app/utils/path.js +1 -1
  358. package/dist/runtime/app/{internal → utils}/slots.d.ts +2 -2
  359. package/dist/runtime/app/utils/theme.d.ts +8 -41
  360. package/dist/runtime/app/utils/theme.js +31 -29
  361. package/package.json +9 -9
  362. package/dist/runtime/app/components/Page/Page.d.vue.ts +0 -40
  363. package/dist/runtime/app/components/Page/Page.theme.d.ts +0 -32
  364. package/dist/runtime/app/components/Page/Page.theme.js +0 -31
  365. package/dist/runtime/app/components/Page/Page.vue +0 -132
  366. package/dist/runtime/app/components/Page/Page.vue.d.ts +0 -40
  367. package/dist/runtime/app/internal/keys.d.ts +0 -43
  368. package/dist/runtime/app/internal/keys.js +0 -8
  369. package/dist/runtime/app/types/alert.d.ts +0 -13
  370. package/dist/runtime/app/types/state.d.ts +0 -35
  371. /package/dist/runtime/app/{types/alert.js → components/Alert/Alert.types.js} +0 -0
  372. /package/dist/runtime/app/{types/state.js → components/App/App.types.js} +0 -0
  373. /package/dist/runtime/app/components/{Table → DataTable}/internal/query.d.ts +0 -0
  374. /package/dist/runtime/app/components/{Table → DataTable}/internal/query.js +0 -0
  375. /package/dist/runtime/app/components/{internal → FormField/internal}/FieldShell/FieldShell.vue +0 -0
  376. /package/dist/runtime/app/{components/internal/ControlShell/ControlShell.theme.js → primitives/PrimitiveControl/PrimitiveControl.theme.js} +0 -0
  377. /package/dist/runtime/app/{components/internal/Input/Input.theme.d.ts → primitives/PrimitiveInput/PrimitiveInput.theme.d.ts} +0 -0
  378. /package/dist/runtime/app/{components/internal/Input/Input.theme.js → primitives/PrimitiveInput/PrimitiveInput.theme.js} +0 -0
  379. /package/dist/runtime/app/{components/internal/NumberInput → primitives/PrimitiveNumberInput}/number.d.ts +0 -0
  380. /package/dist/runtime/app/{components/internal/NumberInput → primitives/PrimitiveNumberInput}/number.js +0 -0
  381. /package/dist/runtime/app/{internal → utils}/slots.js +0 -0
@@ -0,0 +1,64 @@
1
+ import type { VunoTableQuery } from '#vuno/types/table';
2
+ import type { VunoDataTableProps } from './DataTable.types.js';
3
+ declare const __VLS_export: <TRow extends import("#vuno/types/table").VunoTableRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(VunoDataTableProps<TRow> & {
5
+ /**
6
+ * Estado de consulta. El consumidor lo observa y devuelve `data` y `total`.
7
+ *
8
+ * Es obligatorio a propósito: la tabla no trae datos por sí misma, así que
9
+ * un estado interno avanzaría de página sin que nadie pidiera la siguiente
10
+ * —el pie diría «11-20» mientras se siguen viendo las filas 1-10—. Dónde
11
+ * vive ese estado lo decide `useTableQuery`: un `ref` normal o la
12
+ * query string.
13
+ */
14
+ query: VunoTableQuery;
15
+ /** Claves de las filas seleccionadas, no las filas: con paginación en servidor las de otras páginas no están cargadas. */
16
+ selection?: (number | string)[];
17
+ }) & {
18
+ onRowClick?: ((row: TRow) => any) | undefined;
19
+ "onUpdate:selection"?: ((value: (string | number)[]) => any) | undefined;
20
+ "onUpdate:query"?: ((value: VunoTableQuery) => any) | undefined;
21
+ }> & (typeof globalThis extends {
22
+ __VLS_PROPS_FALLBACK: infer P;
23
+ } ? P : {});
24
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
25
+ clearFilters: () => void;
26
+ clearQuery: () => void;
27
+ clearSearch: () => void;
28
+ clearSelection: () => void;
29
+ goToPage: (page: number) => void;
30
+ }>) => void;
31
+ attrs: any;
32
+ slots: {
33
+ [key: `cell-${string}`]: (props: {
34
+ row: TRow;
35
+ value: unknown;
36
+ }) => unknown;
37
+ empty?: () => unknown;
38
+ 'empty-actions'?: () => unknown;
39
+ 'no-matches'?: (props: {
40
+ clear: () => void;
41
+ }) => unknown;
42
+ 'no-matches-actions'?: (props: {
43
+ clear: () => void;
44
+ }) => unknown;
45
+ selection?: (props: {
46
+ count: number;
47
+ keys: (number | string)[];
48
+ clear: () => void;
49
+ }) => unknown;
50
+ toolbar?: (props: {
51
+ query: VunoTableQuery;
52
+ }) => unknown;
53
+ };
54
+ emit: ((evt: "rowClick", row: TRow) => void) & (((event: "update:selection", value: (string | number)[]) => void) & ((event: "update:query", value: VunoTableQuery) => void));
55
+ }>) => import("vue").VNode & {
56
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
57
+ };
58
+ declare const _default: typeof __VLS_export;
59
+ export default _default;
60
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
61
+ [K in keyof T]: T[K];
62
+ } : {
63
+ [K in keyof T as K]: T[K];
64
+ }) & {};
@@ -0,0 +1,17 @@
1
+ export declare const dataTableTheme: Record<"dataTable", {
2
+ readonly slots: {
3
+ readonly chips: "flex flex-wrap items-center gap-2";
4
+ readonly filtersBody: "flex flex-col gap-4";
5
+ readonly filtersFooter: "flex items-center justify-between gap-2";
6
+ readonly footer: "flex flex-wrap items-center justify-between gap-4 px-1";
7
+ readonly meta: "flex items-center gap-2 text-sm text-vuno-muted";
8
+ readonly pageSizeControl: "w-auto";
9
+ readonly pageSizeSelect: "cursor-pointer bg-transparent py-1 pr-1 outline-none";
10
+ readonly root: "flex w-full flex-col gap-4";
11
+ readonly search: "w-full sm:max-w-xs";
12
+ readonly selection: "flex items-center justify-between gap-2 rounded-sm bg-vuno-primary/10 px-3 py-2 text-sm";
13
+ readonly skip: "sr-only rounded-sm bg-vuno-surface text-vuno-body focus:not-sr-only focus:outline-vuno-primary focus:z-10 focus:inline-block focus:px-3 focus:py-1.5 focus:text-sm focus:outline-2 focus:outline-offset-2";
14
+ readonly toolbar: "flex flex-wrap items-center justify-between gap-2";
15
+ readonly toolbarActions: "flex items-center gap-2";
16
+ };
17
+ }>;
@@ -0,0 +1,19 @@
1
+ import { skipLink } from "#vuno/theme/shared";
2
+ import { defineTheme } from "#vuno/utils/theme";
3
+ export const dataTableTheme = defineTheme("dataTable", {
4
+ slots: {
5
+ chips: "flex flex-wrap items-center gap-2",
6
+ filtersBody: "flex flex-col gap-4",
7
+ filtersFooter: "flex items-center justify-between gap-2",
8
+ footer: "flex flex-wrap items-center justify-between gap-4 px-1",
9
+ meta: "flex items-center gap-2 text-sm text-vuno-muted",
10
+ pageSizeControl: "w-auto",
11
+ pageSizeSelect: "cursor-pointer bg-transparent py-1 pr-1 outline-none",
12
+ root: "flex w-full flex-col gap-4",
13
+ search: "w-full sm:max-w-xs",
14
+ selection: "flex items-center justify-between gap-2 rounded-sm bg-vuno-primary/10 px-3 py-2 text-sm",
15
+ skip: skipLink,
16
+ toolbar: "flex flex-wrap items-center justify-between gap-2",
17
+ toolbarActions: "flex items-center gap-2"
18
+ }
19
+ });
@@ -0,0 +1,13 @@
1
+ import type { VunoRadius } from '#vuno/types/base';
2
+ import type { VunoUi } from '#vuno/types/slots';
3
+ import type { VunoDataTableDefinition, VunoTableFailure, VunoTableRow } from '#vuno/types/table';
4
+ export type VunoDataTableProps<TRow extends VunoTableRow> = {
5
+ data: TRow[];
6
+ definition: VunoDataTableDefinition<TRow>;
7
+ failure?: VunoTableFailure;
8
+ loading?: boolean;
9
+ radius?: VunoRadius;
10
+ tableUi?: VunoUi<'table'>;
11
+ total?: number;
12
+ ui?: VunoUi<'dataTable'>;
13
+ };
@@ -0,0 +1,356 @@
1
+ <script setup>
2
+ import { computed, useId, useSlots, useTemplateRef } from "vue";
3
+ import { useIcons, useMessages, useTheme } from "#vuno/composables/useTheme";
4
+ import Badge from "#vuno/components/Badge/Badge.vue";
5
+ import Button from "#vuno/components/Button/Button.vue";
6
+ import FieldSearch from "#vuno/components/FieldSearch/FieldSearch.vue";
7
+ import Form from "#vuno/components/Form/Form.vue";
8
+ import Pagination from "#vuno/components/Pagination/Pagination.vue";
9
+ import Slideover from "#vuno/components/Slideover/Slideover.vue";
10
+ import State from "#vuno/components/State/State.vue";
11
+ import VunoTable from "#vuno/components/Table/Table.vue";
12
+ import Text from "#vuno/components/Text/Text.vue";
13
+ import { useVunoDataTable } from "./internal/useVunoDataTable";
14
+ import PrimitiveControl from "#vuno/primitives/PrimitiveControl/PrimitiveControl.vue";
15
+ defineOptions({ name: "VunoDataTable" });
16
+ const query = defineModel("query", { type: Object, ...{ required: true } });
17
+ const selection = defineModel("selection", { type: Array, ...{ default: () => [] } });
18
+ const props = defineProps({
19
+ data: { type: Array, required: true },
20
+ definition: { type: Object, required: true },
21
+ failure: { type: Object, required: false },
22
+ loading: { type: Boolean, required: false },
23
+ radius: { type: String, required: false },
24
+ tableUi: { type: Object, required: false },
25
+ total: { type: Number, required: false },
26
+ ui: { type: Object, required: false }
27
+ });
28
+ const emit = defineEmits(["rowClick"]);
29
+ defineSlots();
30
+ const slots = useSlots();
31
+ const total = computed(() => props.total ?? 0);
32
+ const hasFailure = computed(() => Boolean(props.failure));
33
+ const icons = useIcons();
34
+ const messages = useMessages();
35
+ const ui = useTheme("dataTable", () => props.ui);
36
+ const table = useVunoDataTable({
37
+ query,
38
+ selection,
39
+ definition: () => props.definition,
40
+ total: () => total.value
41
+ });
42
+ const { activeFilters, applyFilters, clearFilters, clearQuery, clearSelection, filtersDefinition, filtersOpen, filterState, goToPage, isFiltered, pageSizes, paginated, rangeEnd, rangeStart, removeFilter, search, searchable, setPageSize } = table;
43
+ const searchField = useTemplateRef("searchField");
44
+ const rows = computed(() => hasFailure.value ? [] : props.data);
45
+ const footerId = useId();
46
+ const skippable = computed(() => rows.value.length > 3 && total.value > 0 && !hasFailure.value);
47
+ const cellSlots = computed(() => Object.keys(slots).filter((name) => name.startsWith("cell-")));
48
+ const tableSort = computed({
49
+ get: () => query.value.sort,
50
+ set: (sort) => {
51
+ query.value = { ...query.value, page: 1, sort };
52
+ }
53
+ });
54
+ function clearSearch() {
55
+ table.clearSearch();
56
+ searchField.value?.focus();
57
+ }
58
+ function updateSearch(value) {
59
+ if (value === "") {
60
+ clearSearch();
61
+ return;
62
+ }
63
+ search.value = value ?? "";
64
+ }
65
+ defineExpose({
66
+ clearFilters,
67
+ clearQuery,
68
+ clearSearch,
69
+ clearSelection,
70
+ goToPage
71
+ });
72
+ </script>
73
+
74
+ <template>
75
+ <div :class="ui.root">
76
+ <div
77
+ v-if="searchable || (props.definition.filters?.length ?? 0) > 0 || $slots.toolbar"
78
+ :class="ui.toolbar"
79
+ >
80
+ <FieldSearch
81
+ v-if="searchable"
82
+ ref="searchField"
83
+ :modelValue="search"
84
+ :placeholder="props.definition.searchPlaceholder ?? messages.searchPlaceholder"
85
+ :ui="{ root: ui.search }"
86
+ @update:model-value="updateSearch"
87
+ />
88
+
89
+ <div :class="ui.toolbarActions">
90
+ <Button
91
+ v-if="(props.definition.filters?.length ?? 0) > 0"
92
+ color="neutral"
93
+ :icon="icons.filter"
94
+ :label="messages.filters"
95
+ variant="outline"
96
+ @click="filtersOpen = true"
97
+ >
98
+ <!-- `UButton` no admite `badge`: el contador va en el slot. -->
99
+ <template
100
+ v-if="activeFilters.length > 0"
101
+ #trailing
102
+ >
103
+ <Badge
104
+ color="primary"
105
+ :label="String(activeFilters.length)"
106
+ size="sm"
107
+ variant="solid"
108
+ />
109
+ </template>
110
+ </Button>
111
+
112
+ <slot
113
+ name="toolbar"
114
+ :query="query"
115
+ />
116
+ </div>
117
+ </div>
118
+
119
+ <div
120
+ v-if="props.definition.selectable && selection.length > 0"
121
+ :class="ui.selection"
122
+ >
123
+ <slot
124
+ :clear="clearSelection"
125
+ :count="selection.length"
126
+ :keys="selection"
127
+ name="selection"
128
+ >
129
+ <Text
130
+ tag="span"
131
+ tone="inherit"
132
+ variant="inherit"
133
+ >{{ selection.length }} {{ selection.length === 1 ? messages.rowSelected : messages.rowsSelected }}</Text
134
+ >
135
+ <Button
136
+ color="neutral"
137
+ :label="messages.clearSelection"
138
+ size="xs"
139
+ variant="ghost"
140
+ @click="clearSelection"
141
+ />
142
+ </slot>
143
+ </div>
144
+
145
+ <div
146
+ v-if="activeFilters.length > 0"
147
+ :class="ui.chips"
148
+ >
149
+ <Badge
150
+ v-for="filter in activeFilters"
151
+ :key="filter.name"
152
+ color="neutral"
153
+ variant="subtle"
154
+ >
155
+ <Text
156
+ tag="span"
157
+ tone="inherit"
158
+ variant="inherit"
159
+ >{{ filter.label }}: {{ filter.value }}</Text
160
+ >
161
+ <Button
162
+ :aria-label="`${messages.clearFilters}: ${filter.label}`"
163
+ color="neutral"
164
+ :icon="icons.fileRemove"
165
+ size="xs"
166
+ variant="link"
167
+ @click="removeFilter(filter.name)"
168
+ />
169
+ </Badge>
170
+
171
+ <Button
172
+ color="neutral"
173
+ :label="messages.clearFilters"
174
+ size="xs"
175
+ variant="ghost"
176
+ @click="clearFilters"
177
+ />
178
+ </div>
179
+
180
+ <!-- El panel comparte el `<dialog>` nativo de `VModal`: así hereda el
181
+ foco, el portal y la capa superior sin mezclar geometrías. -->
182
+ <Slideover
183
+ v-model:open="filtersOpen"
184
+ position="end"
185
+ :title="messages.filtersTitle"
186
+ >
187
+ <template #body>
188
+ <Form
189
+ v-model:state="filterState"
190
+ :definition="filtersDefinition"
191
+ :ui="{ sections: ui.filtersBody }"
192
+ />
193
+ </template>
194
+
195
+ <template #footer>
196
+ <div :class="ui.filtersFooter">
197
+ <Button
198
+ color="neutral"
199
+ :label="messages.clearFilters"
200
+ variant="ghost"
201
+ @click="clearFilters"
202
+ />
203
+ <Button
204
+ :label="messages.applyFilters"
205
+ @click="applyFilters"
206
+ />
207
+ </div>
208
+ </template>
209
+ </Slideover>
210
+
211
+ <a
212
+ v-if="skippable"
213
+ :class="ui.skip"
214
+ :href="`#${footerId}`"
215
+ >{{ messages.skipTable }}</a
216
+ >
217
+
218
+ <VunoTable
219
+ v-model:selection="selection"
220
+ v-model:sort="tableSort"
221
+ :data="rows"
222
+ :definition="props.definition"
223
+ :radius="props.radius"
224
+ :ui="props.tableUi"
225
+ @row-click="emit('rowClick', $event)"
226
+ >
227
+ <template
228
+ v-for="name in cellSlots"
229
+ :key="name"
230
+ #[name]="slotProps"
231
+ >
232
+ <slot
233
+ :name="name"
234
+ v-bind="slotProps"
235
+ />
236
+ </template>
237
+
238
+ <template #empty>
239
+ <State
240
+ v-if="props.failure"
241
+ :failure="props.failure"
242
+ tone="failure"
243
+ />
244
+
245
+ <div v-else-if="props.loading || total > 0" />
246
+
247
+ <slot
248
+ v-else-if="isFiltered"
249
+ :clear="clearQuery"
250
+ name="no-matches"
251
+ >
252
+ <State
253
+ :hint="messages.noMatchesHint"
254
+ :icon="icons.noMatches"
255
+ :title="messages.noMatches"
256
+ >
257
+ <template #actions>
258
+ <slot
259
+ :clear="clearQuery"
260
+ name="no-matches-actions"
261
+ >
262
+ <Button
263
+ color="neutral"
264
+ :label="messages.clearQuery"
265
+ variant="outline"
266
+ @click="clearQuery"
267
+ />
268
+ </slot>
269
+ </template>
270
+ </State>
271
+ </slot>
272
+
273
+ <slot
274
+ v-else
275
+ name="empty"
276
+ >
277
+ <State
278
+ :hint="props.definition.empty?.hint"
279
+ :icon="props.definition.empty?.icon"
280
+ :title="props.definition.empty?.title"
281
+ >
282
+ <template #actions>
283
+ <slot name="empty-actions" />
284
+ </template>
285
+ </State>
286
+ </slot>
287
+ </template>
288
+ </VunoTable>
289
+
290
+ <div
291
+ v-if="total > 0 && !hasFailure"
292
+ :id="footerId"
293
+ :class="ui.footer"
294
+ tabindex="-1"
295
+ >
296
+ <div :class="ui.meta">
297
+ <Text
298
+ v-if="paginated"
299
+ tag="span"
300
+ tone="inherit"
301
+ variant="inherit"
302
+ >{{ messages.showing }} {{ rangeStart }}–{{ rangeEnd }} {{ messages.of }} {{ total }}</Text
303
+ >
304
+
305
+ <!-- Sin paginar, un rango «1–30 de 30» sugiere que hay más. -->
306
+ <Text
307
+ v-else
308
+ tag="span"
309
+ tone="inherit"
310
+ variant="inherit"
311
+ >{{ total }} {{ messages.results }}</Text
312
+ >
313
+
314
+ <!--
315
+ Un `<select>` nativo y no un combobox: son cinco números sin
316
+ búsqueda ni selección múltiple, y el navegador ya resuelve
317
+ el teclado, el foco y la lista —en el móvil, con su propia
318
+ rueda—. La caja la pone `PrimitiveControl` para que se vea como
319
+ los demás controles.
320
+
321
+ El ancho va por `ui` porque pelea con el `w-full` del tema;
322
+ puesto como `class` sobre el componente convivirían los dos.
323
+ -->
324
+
325
+ <PrimitiveControl
326
+ v-if="paginated"
327
+ size="xs"
328
+ :ui="{ root: ui.pageSizeControl }"
329
+ >
330
+ <select
331
+ :aria-label="messages.pageSize"
332
+ :class="ui.pageSizeSelect"
333
+ :value="query.pageSize"
334
+ @change="(event) => setPageSize(Number(event.target.value))"
335
+ >
336
+ <option
337
+ v-for="size in pageSizes"
338
+ :key="size"
339
+ :value="size"
340
+ >
341
+ {{ size }}
342
+ </option>
343
+ </select>
344
+ </PrimitiveControl>
345
+ </div>
346
+
347
+ <Pagination
348
+ v-if="paginated"
349
+ :page="query.page"
350
+ :pageSize="query.pageSize"
351
+ :total="total"
352
+ @update:page="goToPage"
353
+ />
354
+ </div>
355
+ </div>
356
+ </template>
@@ -0,0 +1,64 @@
1
+ import type { VunoTableQuery } from '#vuno/types/table';
2
+ import type { VunoDataTableProps } from './DataTable.types.js';
3
+ declare const __VLS_export: <TRow extends import("#vuno/types/table").VunoTableRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(VunoDataTableProps<TRow> & {
5
+ /**
6
+ * Estado de consulta. El consumidor lo observa y devuelve `data` y `total`.
7
+ *
8
+ * Es obligatorio a propósito: la tabla no trae datos por sí misma, así que
9
+ * un estado interno avanzaría de página sin que nadie pidiera la siguiente
10
+ * —el pie diría «11-20» mientras se siguen viendo las filas 1-10—. Dónde
11
+ * vive ese estado lo decide `useTableQuery`: un `ref` normal o la
12
+ * query string.
13
+ */
14
+ query: VunoTableQuery;
15
+ /** Claves de las filas seleccionadas, no las filas: con paginación en servidor las de otras páginas no están cargadas. */
16
+ selection?: (number | string)[];
17
+ }) & {
18
+ onRowClick?: ((row: TRow) => any) | undefined;
19
+ "onUpdate:selection"?: ((value: (string | number)[]) => any) | undefined;
20
+ "onUpdate:query"?: ((value: VunoTableQuery) => any) | undefined;
21
+ }> & (typeof globalThis extends {
22
+ __VLS_PROPS_FALLBACK: infer P;
23
+ } ? P : {});
24
+ expose: (exposed: import("vue").ShallowUnwrapRef<{
25
+ clearFilters: () => void;
26
+ clearQuery: () => void;
27
+ clearSearch: () => void;
28
+ clearSelection: () => void;
29
+ goToPage: (page: number) => void;
30
+ }>) => void;
31
+ attrs: any;
32
+ slots: {
33
+ [key: `cell-${string}`]: (props: {
34
+ row: TRow;
35
+ value: unknown;
36
+ }) => unknown;
37
+ empty?: () => unknown;
38
+ 'empty-actions'?: () => unknown;
39
+ 'no-matches'?: (props: {
40
+ clear: () => void;
41
+ }) => unknown;
42
+ 'no-matches-actions'?: (props: {
43
+ clear: () => void;
44
+ }) => unknown;
45
+ selection?: (props: {
46
+ count: number;
47
+ keys: (number | string)[];
48
+ clear: () => void;
49
+ }) => unknown;
50
+ toolbar?: (props: {
51
+ query: VunoTableQuery;
52
+ }) => unknown;
53
+ };
54
+ emit: ((evt: "rowClick", row: TRow) => void) & (((event: "update:selection", value: (string | number)[]) => void) & ((event: "update:query", value: VunoTableQuery) => void));
55
+ }>) => import("vue").VNode & {
56
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
57
+ };
58
+ declare const _default: typeof __VLS_export;
59
+ export default _default;
60
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
61
+ [K in keyof T]: T[K];
62
+ } : {
63
+ [K in keyof T as K]: T[K];
64
+ }) & {};
@@ -1,21 +1,20 @@
1
1
  import { type ComputedRef, type Ref } from 'vue';
2
2
  import type { VunoFormDefinition } from '#vuno/types/form';
3
- import type { VunoTableColumn, VunoTableDefinition, VunoTableFilters, VunoTableQuery, VunoTableRow, VunoTableSortDirection } from '#vuno/types/table';
3
+ import type { VunoDataTableDefinition, VunoTableFilters, VunoTableQuery } from '#vuno/types/table';
4
4
  /** Un filtro activo, listo para pintarse como chip. */
5
5
  type VunoTableActiveFilter = {
6
6
  name: string;
7
7
  label: string;
8
8
  value: string;
9
9
  };
10
- type VunoTableOptions<TRow extends VunoTableRow> = {
10
+ type VunoTableOptions<TRow extends object> = {
11
11
  query: Ref<VunoTableQuery>;
12
12
  selection: Ref<(number | string)[]>;
13
- definition: () => VunoTableDefinition<TRow>;
13
+ definition: () => VunoDataTableDefinition<TRow>;
14
14
  total: () => number;
15
15
  };
16
- type VunoTableContext<TRow extends VunoTableRow> = {
16
+ type VunoTableContext = {
17
17
  activeFilters: ComputedRef<VunoTableActiveFilter[]>;
18
- columns: ComputedRef<VunoTableRenderColumn<TRow>[]>;
19
18
  filtersDefinition: ComputedRef<VunoFormDefinition>;
20
19
  filtersOpen: Ref<boolean>;
21
20
  /** Copia editable del panel: no llega a la consulta hasta aplicar. */
@@ -51,36 +50,14 @@ type VunoTableContext<TRow extends VunoTableRow> = {
51
50
  clearQuery: () => void;
52
51
  clearSearch: () => void;
53
52
  clearSelection: () => void;
54
- getRowId: (row: TRow) => string;
55
53
  goToPage: (page: number) => void;
56
54
  removeFilter: (name: string) => void;
57
55
  setPageSize: (size: number) => void;
58
- sortDirectionFor: (key: string) => null | VunoTableSortDirection;
59
- toggleSort: (key: string) => void;
60
- };
61
- /**
62
- * Una columna lista para pintar: la definición y lo que la disposición necesita
63
- * resuelto una vez.
64
- *
65
- * La columna va **dentro** y no esparcida: `VunoTableColumn` es una unión
66
- * discriminada por `type` y esparcirla la aplana, que es justo lo que impide a
67
- * la celda saber qué está pintando.
68
- */
69
- export type VunoTableRenderColumn<TRow extends VunoTableRow> = {
70
- /** Alineación y clases propias de la columna, para la celda. */
71
- cellClass: string;
72
- column: VunoTableColumn<TRow>;
73
- /** Alineación y ancho, para la cabecera. */
74
- headerClass: string;
75
- key: string;
76
- /** El rótulo ya resuelto; la columna de acciones no lleva salvo que se pida. */
77
- label: string;
78
- sortable: boolean;
79
56
  };
80
57
  /**
81
58
  * Toda la lógica de una tabla, sin nada de disposición.
82
59
  *
83
- * Vive aparte del componente para que `VTable` sea **una** disposición posible
60
+ * Vive aparte del componente para que `VDataTable` mantenga separada su lógica
84
61
  * y no la única: quien necesite los filtros en línea en vez de detrás de un
85
62
  * botón puede escribir su propia plantilla sobre esto, en lugar de esperar a
86
63
  * que el componente crezca un prop más por cada proyecto que no encaja.
@@ -89,5 +66,5 @@ export type VunoTableRenderColumn<TRow extends VunoTableRow> = {
89
66
  * `composables/`—: publicarlo congela esta forma, y antes conviene que la haya
90
67
  * usado algo real.
91
68
  */
92
- export declare function useVunoTable<TRow extends VunoTableRow>(options: VunoTableOptions<TRow>): VunoTableContext<TRow>;
69
+ export declare function useVunoDataTable<TRow extends object>(options: VunoTableOptions<TRow>): VunoTableContext;
93
70
  export {};