@groupteknology/vuno 1.0.0 → 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 (437) hide show
  1. package/README.md +53 -27
  2. package/dist/module.d.mts +14 -2
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +80 -13
  5. package/dist/runtime/app/assets/css/dialog.css +1 -0
  6. package/dist/runtime/app/assets/css/main.css +1 -0
  7. package/dist/runtime/app/assets/css/stylesheet.css +1 -0
  8. package/dist/runtime/app/assets/css/theme.css +1 -0
  9. package/dist/runtime/app/assets/css/tokens.css +1 -0
  10. package/dist/runtime/app/components/Alert/Alert.d.vue.ts +20 -0
  11. package/dist/runtime/app/components/Alert/Alert.theme.d.ts +13 -0
  12. package/dist/runtime/app/components/Alert/Alert.theme.js +13 -0
  13. package/dist/runtime/app/components/Alert/Alert.vue +59 -0
  14. package/dist/runtime/app/components/Alert/Alert.vue.d.ts +20 -0
  15. package/dist/runtime/app/components/App/App.d.vue.ts +52 -0
  16. package/dist/runtime/app/components/App/App.vue +150 -0
  17. package/dist/runtime/app/components/App/App.vue.d.ts +52 -0
  18. package/dist/runtime/app/components/App/internal/Overlay/Overlay.d.vue.ts +7 -0
  19. package/dist/runtime/app/components/App/internal/Overlay/Overlay.vue +39 -0
  20. package/dist/runtime/app/components/App/internal/Overlay/Overlay.vue.d.ts +7 -0
  21. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.d.vue.ts +8 -0
  22. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue +19 -0
  23. package/dist/runtime/app/components/App/internal/OverlayItem/OverlayItem.vue.d.ts +8 -0
  24. package/dist/runtime/app/components/App/internal/Toast/Toast.d.vue.ts +11 -0
  25. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.d.ts +13 -0
  26. package/dist/runtime/app/components/App/internal/Toast/Toast.theme.js +18 -0
  27. package/dist/runtime/app/components/App/internal/Toast/Toast.vue +64 -0
  28. package/dist/runtime/app/components/App/internal/Toast/Toast.vue.d.ts +11 -0
  29. package/dist/runtime/app/components/App/internal/Toaster/Toaster.d.vue.ts +11 -0
  30. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.d.ts +15 -0
  31. package/dist/runtime/app/components/App/internal/Toaster/Toaster.theme.js +16 -0
  32. package/dist/runtime/app/components/App/internal/Toaster/Toaster.vue +100 -0
  33. package/dist/runtime/app/components/App/internal/Toaster/Toaster.vue.d.ts +11 -0
  34. package/dist/runtime/app/components/Avatar/Avatar.d.vue.ts +27 -0
  35. package/dist/runtime/app/components/Avatar/Avatar.theme.d.ts +30 -0
  36. package/dist/runtime/app/components/Avatar/Avatar.theme.js +22 -0
  37. package/dist/runtime/app/components/Avatar/Avatar.vue +51 -0
  38. package/dist/runtime/app/components/Avatar/Avatar.vue.d.ts +27 -0
  39. package/dist/runtime/app/components/Badge/Badge.d.vue.ts +40 -0
  40. package/dist/runtime/app/components/Badge/Badge.theme.d.ts +40 -0
  41. package/dist/runtime/app/components/Badge/Badge.theme.js +22 -0
  42. package/dist/runtime/app/components/Badge/Badge.vue +28 -0
  43. package/dist/runtime/app/components/Badge/Badge.vue.d.ts +40 -0
  44. package/dist/runtime/app/components/Button/Button.d.vue.ts +49 -0
  45. package/dist/runtime/app/components/Button/Button.theme.d.ts +88 -0
  46. package/dist/runtime/app/components/Button/Button.theme.js +59 -0
  47. package/dist/runtime/app/components/Button/Button.vue +78 -0
  48. package/dist/runtime/app/components/Button/Button.vue.d.ts +49 -0
  49. package/dist/runtime/app/components/Card/Card.d.vue.ts +94 -0
  50. package/dist/runtime/app/components/Card/Card.theme.d.ts +57 -0
  51. package/dist/runtime/app/components/Card/Card.theme.js +62 -0
  52. package/dist/runtime/app/components/Card/Card.vue +45 -0
  53. package/dist/runtime/app/components/Card/Card.vue.d.ts +94 -0
  54. package/dist/runtime/app/components/Code/Code.d.vue.ts +19 -0
  55. package/dist/runtime/app/components/Code/Code.theme.d.ts +11 -0
  56. package/dist/runtime/app/components/Code/Code.theme.js +12 -0
  57. package/dist/runtime/app/components/Code/Code.vue +109 -0
  58. package/dist/runtime/app/components/Code/Code.vue.d.ts +19 -0
  59. package/dist/runtime/app/components/Confirm/Confirm.d.vue.ts +35 -0
  60. package/dist/runtime/app/components/Confirm/Confirm.theme.d.ts +12 -0
  61. package/dist/runtime/app/components/Confirm/Confirm.theme.js +13 -0
  62. package/dist/runtime/app/components/Confirm/Confirm.vue +83 -0
  63. package/dist/runtime/app/components/Confirm/Confirm.vue.d.ts +35 -0
  64. package/dist/runtime/app/components/Container/Container.d.vue.ts +42 -0
  65. package/dist/runtime/app/components/Container/Container.theme.d.ts +53 -0
  66. package/dist/runtime/app/components/Container/Container.theme.js +31 -0
  67. package/dist/runtime/app/components/Container/Container.vue +20 -0
  68. package/dist/runtime/app/components/Container/Container.vue.d.ts +42 -0
  69. package/dist/runtime/app/components/ControlGroup/ControlGroup.d.vue.ts +26 -0
  70. package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.d.ts +16 -0
  71. package/dist/runtime/app/components/ControlGroup/ControlGroup.theme.js +13 -0
  72. package/dist/runtime/app/components/ControlGroup/ControlGroup.vue +26 -0
  73. package/dist/runtime/app/components/ControlGroup/ControlGroup.vue.d.ts +26 -0
  74. package/dist/runtime/app/components/FieldArray/FieldArray.d.vue.ts +13 -0
  75. package/dist/runtime/app/components/FieldArray/FieldArray.theme.d.ts +12 -0
  76. package/dist/runtime/app/components/FieldArray/FieldArray.theme.js +13 -0
  77. package/dist/runtime/app/components/FieldArray/FieldArray.vue +173 -0
  78. package/dist/runtime/app/components/FieldArray/FieldArray.vue.d.ts +13 -0
  79. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.d.vue.ts +13 -0
  80. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.d.ts +5 -0
  81. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.theme.js +2 -0
  82. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue +39 -0
  83. package/dist/runtime/app/components/FieldCheckbox/FieldCheckbox.vue.d.ts +13 -0
  84. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.d.vue.ts +40 -0
  85. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.d.ts +30 -0
  86. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.theme.js +10 -0
  87. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue +40 -0
  88. package/dist/runtime/app/components/FieldCheckbox/internal/Checkbox/Checkbox.vue.d.ts +40 -0
  89. package/dist/runtime/app/components/FieldColor/FieldColor.d.vue.ts +13 -0
  90. package/dist/runtime/app/components/FieldColor/FieldColor.theme.d.ts +27 -0
  91. package/dist/runtime/app/components/FieldColor/FieldColor.theme.js +18 -0
  92. package/dist/runtime/app/components/FieldColor/FieldColor.vue +88 -0
  93. package/dist/runtime/app/components/FieldColor/FieldColor.vue.d.ts +13 -0
  94. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.d.vue.ts +13 -0
  95. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.d.ts +5 -0
  96. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.theme.js +2 -0
  97. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue +51 -0
  98. package/dist/runtime/app/components/FieldCurrency/FieldCurrency.vue.d.ts +13 -0
  99. package/dist/runtime/app/components/FieldFile/FieldFile.d.vue.ts +26 -0
  100. package/dist/runtime/app/components/FieldFile/FieldFile.theme.d.ts +5 -0
  101. package/dist/runtime/app/components/FieldFile/FieldFile.theme.js +2 -0
  102. package/dist/runtime/app/components/FieldFile/FieldFile.vue +99 -0
  103. package/dist/runtime/app/components/FieldFile/FieldFile.vue.d.ts +26 -0
  104. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.d.vue.ts +66 -0
  105. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.d.ts +88 -0
  106. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.theme.js +55 -0
  107. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue +187 -0
  108. package/dist/runtime/app/components/FieldFile/internal/FileUpload/FileUpload.vue.d.ts +66 -0
  109. package/dist/runtime/app/components/FieldInput/FieldInput.d.vue.ts +24 -0
  110. package/dist/runtime/app/components/FieldInput/FieldInput.theme.d.ts +5 -0
  111. package/dist/runtime/app/components/FieldInput/FieldInput.theme.js +2 -0
  112. package/dist/runtime/app/components/FieldInput/FieldInput.vue +61 -0
  113. package/dist/runtime/app/components/FieldInput/FieldInput.vue.d.ts +24 -0
  114. package/dist/runtime/app/components/FieldNumber/FieldNumber.d.vue.ts +13 -0
  115. package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.d.ts +5 -0
  116. package/dist/runtime/app/components/FieldNumber/FieldNumber.theme.js +2 -0
  117. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue +47 -0
  118. package/dist/runtime/app/components/FieldNumber/FieldNumber.vue.d.ts +13 -0
  119. package/dist/runtime/app/components/FieldPassword/FieldPassword.d.vue.ts +13 -0
  120. package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.d.ts +5 -0
  121. package/dist/runtime/app/components/FieldPassword/FieldPassword.theme.js +2 -0
  122. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue +62 -0
  123. package/dist/runtime/app/components/FieldPassword/FieldPassword.vue.d.ts +13 -0
  124. package/dist/runtime/app/components/FieldRadio/FieldRadio.d.vue.ts +13 -0
  125. package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.d.ts +5 -0
  126. package/dist/runtime/app/components/FieldRadio/FieldRadio.theme.js +2 -0
  127. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue +41 -0
  128. package/dist/runtime/app/components/FieldRadio/FieldRadio.vue.d.ts +13 -0
  129. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.d.vue.ts +32 -0
  130. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.d.ts +54 -0
  131. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.theme.js +31 -0
  132. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue +80 -0
  133. package/dist/runtime/app/components/FieldRadio/internal/RadioGroup/RadioGroup.vue.d.ts +32 -0
  134. package/dist/runtime/app/components/FieldSearch/FieldSearch.d.vue.ts +17 -0
  135. package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.d.ts +6 -0
  136. package/dist/runtime/app/components/FieldSearch/FieldSearch.theme.js +7 -0
  137. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue +74 -0
  138. package/dist/runtime/app/components/FieldSearch/FieldSearch.vue.d.ts +17 -0
  139. package/dist/runtime/app/components/FieldSelect/FieldSelect.d.vue.ts +13 -0
  140. package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.d.ts +5 -0
  141. package/dist/runtime/app/components/FieldSelect/FieldSelect.theme.js +2 -0
  142. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue +45 -0
  143. package/dist/runtime/app/components/FieldSelect/FieldSelect.vue.d.ts +13 -0
  144. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.d.vue.ts +97 -0
  145. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.d.ts +36 -0
  146. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.theme.js +49 -0
  147. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue +196 -0
  148. package/dist/runtime/app/components/FieldSelect/internal/Select/Select.vue.d.ts +97 -0
  149. package/dist/runtime/app/components/FieldSelect/internal/Select/option.d.ts +25 -0
  150. package/dist/runtime/app/components/FieldSelect/internal/Select/option.js +6 -0
  151. package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.d.ts +30 -0
  152. package/dist/runtime/app/components/FieldSelect/internal/Select/useVunoSelectState.js +142 -0
  153. package/dist/runtime/app/components/FieldSlug/FieldSlug.d.vue.ts +13 -0
  154. package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.d.ts +5 -0
  155. package/dist/runtime/app/components/FieldSlug/FieldSlug.theme.js +2 -0
  156. package/dist/runtime/app/components/FieldSlug/FieldSlug.vue +113 -0
  157. package/dist/runtime/app/components/FieldSlug/FieldSlug.vue.d.ts +13 -0
  158. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.d.vue.ts +13 -0
  159. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.d.ts +5 -0
  160. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.theme.js +2 -0
  161. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue +37 -0
  162. package/dist/runtime/app/components/FieldSwitch/FieldSwitch.vue.d.ts +13 -0
  163. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.d.vue.ts +26 -0
  164. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.d.ts +39 -0
  165. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.theme.js +20 -0
  166. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue +46 -0
  167. package/dist/runtime/app/components/FieldSwitch/internal/Switch/Switch.vue.d.ts +26 -0
  168. package/dist/runtime/app/components/FieldTags/FieldTags.d.vue.ts +13 -0
  169. package/dist/runtime/app/components/FieldTags/FieldTags.theme.d.ts +5 -0
  170. package/dist/runtime/app/components/FieldTags/FieldTags.theme.js +2 -0
  171. package/dist/runtime/app/components/FieldTags/FieldTags.vue +41 -0
  172. package/dist/runtime/app/components/FieldTags/FieldTags.vue.d.ts +13 -0
  173. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.d.vue.ts +26 -0
  174. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.d.ts +34 -0
  175. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.theme.js +20 -0
  176. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue +97 -0
  177. package/dist/runtime/app/components/FieldTags/internal/TagsInput/TagsInput.vue.d.ts +26 -0
  178. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.d.vue.ts +26 -0
  179. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.d.ts +5 -0
  180. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.theme.js +2 -0
  181. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue +45 -0
  182. package/dist/runtime/app/components/FieldTextarea/FieldTextarea.vue.d.ts +26 -0
  183. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.d.vue.ts +34 -0
  184. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.d.ts +36 -0
  185. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.theme.js +37 -0
  186. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue +43 -0
  187. package/dist/runtime/app/components/FieldTextarea/internal/Textarea/Textarea.vue.d.ts +34 -0
  188. package/dist/runtime/app/components/Form/Form.d.vue.ts +52 -0
  189. package/dist/runtime/app/components/Form/Form.theme.d.ts +9 -0
  190. package/dist/runtime/app/components/Form/Form.theme.js +10 -0
  191. package/dist/runtime/app/components/Form/Form.vue +129 -0
  192. package/dist/runtime/app/components/Form/Form.vue.d.ts +52 -0
  193. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.d.vue.ts +7 -0
  194. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue +67 -0
  195. package/dist/runtime/app/components/Form/internal/FormFieldRenderer/FormFieldRenderer.vue.d.ts +7 -0
  196. package/dist/runtime/app/components/Form/internal/grid.d.ts +9 -0
  197. package/dist/runtime/app/components/Form/internal/grid.js +91 -0
  198. package/dist/runtime/app/components/Form/internal/standard-schema.d.ts +29 -0
  199. package/dist/runtime/app/components/Form/internal/standard-schema.js +15 -0
  200. package/dist/runtime/app/components/Form/internal/useVunoFormState.d.ts +43 -0
  201. package/dist/runtime/app/components/Form/internal/useVunoFormState.js +81 -0
  202. package/dist/runtime/app/components/FormField/FormField.d.vue.ts +35 -0
  203. package/dist/runtime/app/components/FormField/FormField.theme.d.ts +62 -0
  204. package/dist/runtime/app/components/FormField/FormField.theme.js +28 -0
  205. package/dist/runtime/app/components/FormField/FormField.vue +124 -0
  206. package/dist/runtime/app/components/FormField/FormField.vue.d.ts +35 -0
  207. package/dist/runtime/app/components/FormModal/FormModal.d.vue.ts +63 -0
  208. package/dist/runtime/app/components/FormModal/FormModal.theme.d.ts +8 -0
  209. package/dist/runtime/app/components/FormModal/FormModal.theme.js +9 -0
  210. package/dist/runtime/app/components/FormModal/FormModal.vue +95 -0
  211. package/dist/runtime/app/components/FormModal/FormModal.vue.d.ts +63 -0
  212. package/dist/runtime/app/components/FormSection/FormSection.d.vue.ts +15 -0
  213. package/dist/runtime/app/components/FormSection/FormSection.theme.d.ts +12 -0
  214. package/dist/runtime/app/components/FormSection/FormSection.theme.js +14 -0
  215. package/dist/runtime/app/components/FormSection/FormSection.vue +45 -0
  216. package/dist/runtime/app/components/FormSection/FormSection.vue.d.ts +15 -0
  217. package/dist/runtime/app/components/Icon/Icon.d.vue.ts +6 -0
  218. package/dist/runtime/app/components/Icon/Icon.vue +32 -0
  219. package/dist/runtime/app/components/Icon/Icon.vue.d.ts +6 -0
  220. package/dist/runtime/app/components/Menu/Menu.d.vue.ts +36 -0
  221. package/dist/runtime/app/components/Menu/Menu.theme.d.ts +17 -0
  222. package/dist/runtime/app/components/Menu/Menu.theme.js +20 -0
  223. package/dist/runtime/app/components/Menu/Menu.vue +182 -0
  224. package/dist/runtime/app/components/Menu/Menu.vue.d.ts +36 -0
  225. package/dist/runtime/app/components/Modal/Modal.d.vue.ts +43 -0
  226. package/dist/runtime/app/components/Modal/Modal.theme.d.ts +59 -0
  227. package/dist/runtime/app/components/Modal/Modal.theme.js +47 -0
  228. package/dist/runtime/app/components/Modal/Modal.vue +215 -0
  229. package/dist/runtime/app/components/Modal/Modal.vue.d.ts +43 -0
  230. package/dist/runtime/app/components/Navbar/Navbar.d.vue.ts +45 -0
  231. package/dist/runtime/app/components/Navbar/Navbar.theme.d.ts +31 -0
  232. package/dist/runtime/app/components/Navbar/Navbar.theme.js +32 -0
  233. package/dist/runtime/app/components/Navbar/Navbar.vue +47 -0
  234. package/dist/runtime/app/components/Navbar/Navbar.vue.d.ts +45 -0
  235. package/dist/runtime/app/components/NavigationList/NavigationList.d.vue.ts +38 -0
  236. package/dist/runtime/app/components/NavigationList/NavigationList.theme.d.ts +32 -0
  237. package/dist/runtime/app/components/NavigationList/NavigationList.theme.js +35 -0
  238. package/dist/runtime/app/components/NavigationList/NavigationList.vue +187 -0
  239. package/dist/runtime/app/components/NavigationList/NavigationList.vue.d.ts +38 -0
  240. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.d.vue.ts +31 -0
  241. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.d.ts +26 -0
  242. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.theme.js +27 -0
  243. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue +236 -0
  244. package/dist/runtime/app/components/NavigationMenu/NavigationMenu.vue.d.ts +31 -0
  245. package/dist/runtime/app/components/NavigationToc/NavigationToc.d.vue.ts +14 -0
  246. package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.d.ts +9 -0
  247. package/dist/runtime/app/components/NavigationToc/NavigationToc.theme.js +10 -0
  248. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue +81 -0
  249. package/dist/runtime/app/components/NavigationToc/NavigationToc.vue.d.ts +14 -0
  250. package/dist/runtime/app/components/Page/Page.d.vue.ts +40 -0
  251. package/dist/runtime/app/components/Page/Page.theme.d.ts +32 -0
  252. package/dist/runtime/app/components/Page/Page.theme.js +31 -0
  253. package/dist/runtime/app/components/Page/Page.vue +132 -0
  254. package/dist/runtime/app/components/Page/Page.vue.d.ts +40 -0
  255. package/dist/runtime/app/components/Pagination/Pagination.d.vue.ts +33 -0
  256. package/dist/runtime/app/components/Pagination/Pagination.theme.d.ts +13 -0
  257. package/dist/runtime/app/components/Pagination/Pagination.theme.js +14 -0
  258. package/dist/runtime/app/components/Pagination/Pagination.vue +129 -0
  259. package/dist/runtime/app/components/Pagination/Pagination.vue.d.ts +33 -0
  260. package/dist/runtime/app/components/Slideover/Slideover.d.vue.ts +43 -0
  261. package/dist/runtime/app/components/Slideover/Slideover.theme.d.ts +35 -0
  262. package/dist/runtime/app/components/Slideover/Slideover.theme.js +24 -0
  263. package/dist/runtime/app/components/Slideover/Slideover.vue +58 -0
  264. package/dist/runtime/app/components/Slideover/Slideover.vue.d.ts +43 -0
  265. package/dist/runtime/app/components/State/State.d.vue.ts +14 -0
  266. package/dist/runtime/app/components/State/State.theme.d.ts +19 -0
  267. package/dist/runtime/app/components/State/State.theme.js +26 -0
  268. package/dist/runtime/app/components/State/State.vue +66 -0
  269. package/dist/runtime/app/components/State/State.vue.d.ts +14 -0
  270. package/dist/runtime/app/components/Table/Table.d.vue.ts +80 -0
  271. package/dist/runtime/app/components/Table/Table.theme.d.ts +50 -0
  272. package/dist/runtime/app/components/Table/Table.theme.js +64 -0
  273. package/dist/runtime/app/components/Table/Table.vue +483 -0
  274. package/dist/runtime/app/components/Table/Table.vue.d.ts +80 -0
  275. package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.d.vue.ts +5 -0
  276. package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.vue +26 -0
  277. package/dist/runtime/app/components/Table/internal/CellBadge/CellBadge.vue.d.ts +5 -0
  278. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.d.vue.ts +5 -0
  279. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.d.ts +21 -0
  280. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.theme.js +11 -0
  281. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue +32 -0
  282. package/dist/runtime/app/components/Table/internal/CellBoolean/CellBoolean.vue.d.ts +5 -0
  283. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.d.vue.ts +5 -0
  284. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.d.ts +5 -0
  285. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.theme.js +4 -0
  286. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue +16 -0
  287. package/dist/runtime/app/components/Table/internal/CellCurrency/CellCurrency.vue.d.ts +5 -0
  288. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.d.vue.ts +5 -0
  289. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.d.ts +5 -0
  290. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.theme.js +4 -0
  291. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue +21 -0
  292. package/dist/runtime/app/components/Table/internal/CellDate/CellDate.vue.d.ts +5 -0
  293. package/dist/runtime/app/components/Table/internal/CellImage/CellImage.d.vue.ts +5 -0
  294. package/dist/runtime/app/components/Table/internal/CellImage/CellImage.vue +24 -0
  295. package/dist/runtime/app/components/Table/internal/CellImage/CellImage.vue.d.ts +5 -0
  296. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.d.vue.ts +5 -0
  297. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.d.ts +5 -0
  298. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.theme.js +4 -0
  299. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue +17 -0
  300. package/dist/runtime/app/components/Table/internal/CellNumber/CellNumber.vue.d.ts +5 -0
  301. package/dist/runtime/app/components/Table/internal/CellText/CellText.d.vue.ts +5 -0
  302. package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.d.ts +13 -0
  303. package/dist/runtime/app/components/Table/internal/CellText/CellText.theme.js +11 -0
  304. package/dist/runtime/app/components/Table/internal/CellText/CellText.vue +16 -0
  305. package/dist/runtime/app/components/Table/internal/CellText/CellText.vue.d.ts +5 -0
  306. package/dist/runtime/app/components/Table/internal/TableCell/TableCell.d.vue.ts +22 -0
  307. package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue +48 -0
  308. package/dist/runtime/app/components/Table/internal/TableCell/TableCell.vue.d.ts +22 -0
  309. package/dist/runtime/app/components/Table/internal/column.d.ts +9 -0
  310. package/dist/runtime/app/components/Table/internal/column.js +5 -0
  311. package/dist/runtime/app/components/Table/internal/query.d.ts +18 -0
  312. package/dist/runtime/app/components/Table/internal/query.js +8 -0
  313. package/dist/runtime/app/components/Table/internal/selection.d.ts +29 -0
  314. package/dist/runtime/app/components/Table/internal/selection.js +10 -0
  315. package/dist/runtime/app/components/Table/internal/useVunoTable.d.ts +93 -0
  316. package/dist/runtime/app/components/Table/internal/useVunoTable.js +153 -0
  317. package/dist/runtime/app/components/Table/internal/useVunoTableSelection.d.ts +21 -0
  318. package/dist/runtime/app/components/Table/internal/useVunoTableSelection.js +29 -0
  319. package/dist/runtime/app/components/Tabs/Tabs.d.vue.ts +49 -0
  320. package/dist/runtime/app/components/Tabs/Tabs.theme.d.ts +32 -0
  321. package/dist/runtime/app/components/Tabs/Tabs.theme.js +23 -0
  322. package/dist/runtime/app/components/Tabs/Tabs.vue +119 -0
  323. package/dist/runtime/app/components/Tabs/Tabs.vue.d.ts +49 -0
  324. package/dist/runtime/app/components/Tooltip/Tooltip.d.vue.ts +40 -0
  325. package/dist/runtime/app/components/Tooltip/Tooltip.theme.d.ts +12 -0
  326. package/dist/runtime/app/components/Tooltip/Tooltip.theme.js +13 -0
  327. package/dist/runtime/app/components/Tooltip/Tooltip.vue +139 -0
  328. package/dist/runtime/app/components/Tooltip/Tooltip.vue.d.ts +40 -0
  329. package/dist/runtime/app/components/internal/ControlShell/ControlShell.d.vue.ts +41 -0
  330. package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.d.ts +50 -0
  331. package/dist/runtime/app/components/internal/ControlShell/ControlShell.theme.js +38 -0
  332. package/dist/runtime/app/components/internal/ControlShell/ControlShell.vue +33 -0
  333. package/dist/runtime/app/components/internal/ControlShell/ControlShell.vue.d.ts +41 -0
  334. package/dist/runtime/app/components/internal/FieldShell/FieldShell.d.vue.ts +23 -0
  335. package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue +63 -0
  336. package/dist/runtime/app/components/internal/FieldShell/FieldShell.vue.d.ts +23 -0
  337. package/dist/runtime/app/components/internal/Input/Input.d.vue.ts +52 -0
  338. package/dist/runtime/app/components/internal/Input/Input.theme.d.ts +30 -0
  339. package/dist/runtime/app/components/internal/Input/Input.theme.js +21 -0
  340. package/dist/runtime/app/components/internal/Input/Input.vue +66 -0
  341. package/dist/runtime/app/components/internal/Input/Input.vue.d.ts +52 -0
  342. package/dist/runtime/app/components/internal/NumberInput/NumberInput.d.vue.ts +36 -0
  343. package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.d.ts +31 -0
  344. package/dist/runtime/app/components/internal/NumberInput/NumberInput.theme.js +26 -0
  345. package/dist/runtime/app/components/internal/NumberInput/NumberInput.vue +221 -0
  346. package/dist/runtime/app/components/internal/NumberInput/NumberInput.vue.d.ts +36 -0
  347. package/dist/runtime/app/components/internal/NumberInput/number.d.ts +42 -0
  348. package/dist/runtime/app/components/internal/NumberInput/number.js +64 -0
  349. package/dist/runtime/app/composables/defineShortcuts.d.ts +19 -0
  350. package/dist/runtime/app/composables/defineShortcuts.js +68 -0
  351. package/dist/runtime/app/composables/internal/useVunoAnchor.d.ts +45 -0
  352. package/dist/runtime/app/composables/internal/useVunoAnchor.js +35 -0
  353. package/dist/runtime/app/composables/internal/useVunoControlGroup.d.ts +17 -0
  354. package/dist/runtime/app/composables/internal/useVunoControlGroup.js +18 -0
  355. package/dist/runtime/app/composables/internal/useVunoPortal.d.ts +18 -0
  356. package/dist/runtime/app/composables/internal/useVunoPortal.js +12 -0
  357. package/dist/runtime/app/composables/useConfirm.d.ts +15 -0
  358. package/dist/runtime/app/composables/useConfirm.js +5 -0
  359. package/dist/runtime/app/composables/useContext.d.ts +11 -0
  360. package/dist/runtime/app/composables/useContext.js +9 -0
  361. package/dist/runtime/app/composables/useCrud.d.ts +23 -0
  362. package/dist/runtime/app/composables/useCrud.js +153 -0
  363. package/dist/runtime/app/composables/useField.d.ts +10 -0
  364. package/dist/runtime/app/composables/useField.js +42 -0
  365. package/dist/runtime/app/composables/useForm.d.ts +5 -0
  366. package/dist/runtime/app/composables/useForm.js +9 -0
  367. package/dist/runtime/app/composables/useModal.d.ts +21 -0
  368. package/dist/runtime/app/composables/useModal.js +24 -0
  369. package/dist/runtime/app/composables/useOverlay.d.ts +22 -0
  370. package/dist/runtime/app/composables/useOverlay.js +10 -0
  371. package/dist/runtime/app/composables/useTableQuery.d.ts +10 -0
  372. package/dist/runtime/app/composables/useTableQuery.js +126 -0
  373. package/dist/runtime/app/composables/useTheme.d.ts +31 -0
  374. package/dist/runtime/app/composables/useTheme.js +29 -0
  375. package/dist/runtime/app/composables/useToast.d.ts +28 -0
  376. package/dist/runtime/app/composables/useToast.js +13 -0
  377. package/dist/runtime/app/internal/keys.d.ts +43 -0
  378. package/dist/runtime/app/internal/keys.js +8 -0
  379. package/dist/runtime/app/internal/slots.d.ts +22 -0
  380. package/dist/runtime/app/internal/slots.js +24 -0
  381. package/dist/runtime/app/plugins/vue-query.d.ts +8 -0
  382. package/dist/runtime/app/plugins/vue-query.js +13 -0
  383. package/dist/runtime/app/theme/icons.d.ts +2 -0
  384. package/dist/runtime/app/theme/icons.js +43 -0
  385. package/dist/runtime/app/theme/index.d.ts +1168 -0
  386. package/dist/runtime/app/theme/index.js +120 -0
  387. package/dist/runtime/app/theme/messages.d.ts +2 -0
  388. package/dist/runtime/app/theme/messages.js +70 -0
  389. package/dist/runtime/app/theme/shared.d.ts +42 -0
  390. package/dist/runtime/app/theme/shared.js +24 -0
  391. package/dist/runtime/app/types/alert.d.ts +13 -0
  392. package/dist/runtime/app/types/alert.js +0 -0
  393. package/dist/runtime/app/types/app-config.d.ts +8 -0
  394. package/dist/runtime/app/types/app-config.js +1 -0
  395. package/dist/runtime/app/types/app.d.ts +83 -0
  396. package/dist/runtime/app/types/app.js +0 -0
  397. package/dist/runtime/app/types/base.d.ts +78 -0
  398. package/dist/runtime/app/types/base.js +0 -0
  399. package/dist/runtime/app/types/confirm.d.ts +19 -0
  400. package/dist/runtime/app/types/confirm.js +0 -0
  401. package/dist/runtime/app/types/crud.d.ts +108 -0
  402. package/dist/runtime/app/types/crud.js +0 -0
  403. package/dist/runtime/app/types/field-type.d.ts +4 -0
  404. package/dist/runtime/app/types/field-type.js +0 -0
  405. package/dist/runtime/app/types/field.d.ts +233 -0
  406. package/dist/runtime/app/types/field.js +0 -0
  407. package/dist/runtime/app/types/form.d.ts +67 -0
  408. package/dist/runtime/app/types/form.js +0 -0
  409. package/dist/runtime/app/types/index.d.ts +16 -0
  410. package/dist/runtime/app/types/index.js +1 -0
  411. package/dist/runtime/app/types/page.d.ts +61 -0
  412. package/dist/runtime/app/types/page.js +0 -0
  413. package/dist/runtime/app/types/responsive.d.ts +8 -0
  414. package/dist/runtime/app/types/responsive.js +0 -0
  415. package/dist/runtime/app/types/shortcuts.d.ts +44 -0
  416. package/dist/runtime/app/types/shortcuts.js +0 -0
  417. package/dist/runtime/app/types/slots.d.ts +30 -0
  418. package/dist/runtime/app/types/slots.js +0 -0
  419. package/dist/runtime/app/types/state.d.ts +35 -0
  420. package/dist/runtime/app/types/state.js +0 -0
  421. package/dist/runtime/app/types/table.d.ts +287 -0
  422. package/dist/runtime/app/types/table.js +0 -0
  423. package/dist/runtime/app/types/theme.d.ts +251 -0
  424. package/dist/runtime/app/types/theme.js +0 -0
  425. package/dist/runtime/app/utils/format.d.ts +18 -0
  426. package/dist/runtime/app/utils/format.js +36 -0
  427. package/dist/runtime/app/utils/pagination.d.ts +41 -0
  428. package/dist/runtime/app/utils/pagination.js +32 -0
  429. package/dist/runtime/app/utils/path.d.ts +16 -0
  430. package/dist/runtime/app/utils/path.js +76 -0
  431. package/dist/runtime/app/utils/query-key.d.ts +20 -0
  432. package/dist/runtime/app/utils/query-key.js +7 -0
  433. package/dist/runtime/app/utils/theme.d.ts +44 -0
  434. package/dist/runtime/app/utils/theme.js +43 -0
  435. package/dist/types.d.mts +3 -11
  436. package/package.json +18 -3
  437. package/dist/module.d.cts +0 -2
@@ -0,0 +1,52 @@
1
+ import type { VunoRadius, VunoSize } from '#vuno/types/base';
2
+ import type { VunoUi } from '#vuno/types/slots';
3
+ type __VLS_Props = Props;
4
+ type __VLS_Slots = {
5
+ /** Lo que va al final del campo: un botón de acción, una unidad. */
6
+ trailing?: () => unknown;
7
+ };
8
+ type Props = {
9
+ /** Nombre Iconify; se pinta dentro del campo, antes del texto. */
10
+ icon?: string;
11
+ /** La curvatura de la caja. Sin valor, la que traiga el tema. */
12
+ radius?: VunoRadius;
13
+ size?: VunoSize;
14
+ /**
15
+ * Los tipos de texto, no los demás: `checkbox`, `radio` y `file`
16
+ * tienen su propio control porque no se pintan como una caja de
17
+ * texto ni llevan valor de cadena.
18
+ */
19
+ type?: 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url';
20
+ ui?: VunoUi<'control' | 'input'>;
21
+ };
22
+ type __VLS_ModelProps = {
23
+ /**
24
+ * `number` devuelve número y el resto cadena, que es lo que espera el
25
+ * estado del formulario: un campo numérico que guardara `'12'` pasaría la
26
+ * validación de tipo por los pelos y fallaría al comparar o al sumar.
27
+ * Vacío es `undefined` y no `0` ni `''`: no es un valor, es que no hay.
28
+ */
29
+ modelValue?: number | string | undefined;
30
+ };
31
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
32
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
33
+ inputRef: Readonly<import("vue").ShallowRef<HTMLInputElement | null>>;
34
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ "update:modelValue": (value: string | number | undefined) => any;
36
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
38
+ }>, {
39
+ icon: string;
40
+ radius: VunoRadius;
41
+ size: VunoSize;
42
+ type: "date" | "email" | "number" | "password" | "search" | "tel" | "text" | "url";
43
+ ui: VunoUi<"control" | "input">;
44
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
45
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,36 @@
1
+ import type { VunoSize } from '#vuno/types/base';
2
+ import type { VunoControlOrientation } from '#vuno/types/field';
3
+ import type { VunoUi } from '#vuno/types/slots';
4
+ type __VLS_Props = Props;
5
+ type Props = {
6
+ currency?: string;
7
+ decimals?: number;
8
+ disabled?: boolean;
9
+ max?: number;
10
+ min?: number;
11
+ /** En vertical los botones se apilan; en horizontal, quedan lado a lado. */
12
+ orientation?: VunoControlOrientation;
13
+ size?: VunoSize;
14
+ step?: number;
15
+ ui?: VunoUi<'control' | 'input' | 'numberInput'>;
16
+ };
17
+ type __VLS_ModelProps = {
18
+ modelValue?: number | undefined;
19
+ };
20
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:modelValue": (value: number | undefined) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
25
+ }>, {
26
+ currency: string;
27
+ size: VunoSize;
28
+ orientation: VunoControlOrientation;
29
+ ui: VunoUi<"control" | "input" | "numberInput">;
30
+ decimals: number;
31
+ max: number;
32
+ min: number;
33
+ step: number;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
@@ -0,0 +1,31 @@
1
+ export declare const numberInputTheme: Record<"numberInput", {
2
+ /**
3
+ * El campo numérico. La caja la pone `baseControl`; aquí solo el control de
4
+ * dentro y cómo se colocan sus dos botones.
5
+ *
6
+ * Los dos botones permanecen juntos al final. En vertical se apilan; en
7
+ * horizontal quedan lado a lado con el tamaño normal del control. La caja
8
+ * compartida elimina el relleno final en ambos casos.
9
+ */
10
+ readonly slots: {
11
+ readonly base: "w-full min-w-0 bg-transparent text-right tabular-nums outline-none placeholder:text-vuno-subtle disabled:cursor-not-allowed";
12
+ };
13
+ readonly variants: {
14
+ readonly orientation: {
15
+ readonly horizontal: {
16
+ readonly actions: "flex items-center";
17
+ };
18
+ /**
19
+ * Apilados tienen que caber dos dentro de la altura de la caja,
20
+ * así que el botón pierde su altura propia. Con la del tamaño
21
+ * `xs` —24 px cada uno— el campo crecía a 49 px de alto en vez
22
+ * de los 32 que mide un control normal.
23
+ */
24
+ readonly vertical: {
25
+ readonly actions: "flex flex-col-reverse";
26
+ readonly stepper: "h-3.5 w-7 p-0";
27
+ readonly stepperIcon: "size-3";
28
+ };
29
+ };
30
+ };
31
+ }>;
@@ -0,0 +1,26 @@
1
+ import { defineTheme } from "#vuno/utils/theme";
2
+ export const numberInputTheme = defineTheme("numberInput", {
3
+ /**
4
+ * El campo numérico. La caja la pone `baseControl`; aquí solo el control de
5
+ * dentro y cómo se colocan sus dos botones.
6
+ *
7
+ * Los dos botones permanecen juntos al final. En vertical se apilan; en
8
+ * horizontal quedan lado a lado con el tamaño normal del control. La caja
9
+ * compartida elimina el relleno final en ambos casos.
10
+ */
11
+ slots: {
12
+ base: "w-full min-w-0 bg-transparent text-right tabular-nums outline-none placeholder:text-vuno-subtle disabled:cursor-not-allowed"
13
+ },
14
+ variants: {
15
+ orientation: {
16
+ horizontal: { actions: "flex items-center" },
17
+ /**
18
+ * Apilados tienen que caber dos dentro de la altura de la caja,
19
+ * así que el botón pierde su altura propia. Con la del tamaño
20
+ * `xs` —24 px cada uno— el campo crecía a 49 px de alto en vez
21
+ * de los 32 que mide un control normal.
22
+ */
23
+ vertical: { actions: "flex flex-col-reverse", stepper: "h-3.5 w-7 p-0", stepperIcon: "size-3" }
24
+ }
25
+ }
26
+ });
@@ -0,0 +1,221 @@
1
+ <script setup>
2
+ import { computed, nextTick, ref } from "vue";
3
+ import { useIcons, useLocale, useMessages, useTheme } from "#vuno/composables/useTheme";
4
+ import Button from "#vuno/components/Button/Button.vue";
5
+ import ControlShell from "#vuno/components/internal/ControlShell/ControlShell.vue";
6
+ import { addStep, clampNumber, isPotentialNumber, parseNumber, snapToStep } from "#vuno/components/internal/NumberInput/number";
7
+ defineOptions({ name: "VunoNumberInput", inheritAttrs: false });
8
+ const model = defineModel({ type: null, ...{ default: void 0 } });
9
+ const props = defineProps({
10
+ currency: { type: String, required: false, default: void 0 },
11
+ decimals: { type: Number, required: false, default: void 0 },
12
+ disabled: { type: Boolean, required: false },
13
+ max: { type: Number, required: false, default: void 0 },
14
+ min: { type: Number, required: false, default: void 0 },
15
+ orientation: { type: String, required: false, default: "horizontal" },
16
+ size: { type: String, required: false, default: "md" },
17
+ step: { type: Number, required: false, default: void 0 },
18
+ ui: { type: Object, required: false, default: void 0 }
19
+ });
20
+ const icons = useIcons();
21
+ const locale = useLocale();
22
+ const messages = useMessages();
23
+ const ui = useTheme(
24
+ "numberInput",
25
+ () => props.ui,
26
+ () => ({ orientation: props.orientation, size: props.size })
27
+ );
28
+ const pointerFocus = ref(false);
29
+ const typing = ref();
30
+ const isVertical = computed(() => props.orientation === "vertical");
31
+ const buttonSize = computed(() => isVertical.value ? "xs" : props.size);
32
+ const stepperUi = computed(() => ({ base: ui.value.stepper, icon: ui.value.stepperIcon }));
33
+ const decimals = computed(() => {
34
+ if (props.decimals === void 0 || !Number.isFinite(props.decimals)) return void 0;
35
+ return Math.min(20, Math.max(0, Math.trunc(props.decimals)));
36
+ });
37
+ const digits = computed(() => decimals.value === void 0 ? {} : { maximumFractionDigits: decimals.value, minimumFractionDigits: decimals.value });
38
+ const formatter = computed(() => {
39
+ return new Intl.NumberFormat(locale.value, props.currency ? { ...digits.value, currency: props.currency, style: "currency" } : digits.value);
40
+ });
41
+ const editingFormatter = computed(() => {
42
+ const resolved = formatter.value.resolvedOptions();
43
+ return new Intl.NumberFormat(locale.value, {
44
+ maximumFractionDigits: resolved.maximumFractionDigits,
45
+ minimumFractionDigits: 0,
46
+ useGrouping: false
47
+ });
48
+ });
49
+ const step = computed(() => props.step ?? (props.currency ? 10 ** -(formatter.value.resolvedOptions().maximumFractionDigits ?? 0) : 1));
50
+ const display = computed(() => {
51
+ if (typing.value !== void 0) return typing.value;
52
+ return model.value === void 0 ? "" : formatter.value.format(model.value);
53
+ });
54
+ const atMin = computed(() => props.min !== void 0 && model.value !== void 0 && model.value <= props.min);
55
+ const atMax = computed(() => props.max !== void 0 && model.value !== void 0 && model.value >= props.max);
56
+ function formatEditing(value) {
57
+ return editingFormatter.value.formatToParts(value).filter((part) => part.type !== "group" && part.type !== "literal").map((part) => part.value).join("");
58
+ }
59
+ function commit(value) {
60
+ if (value === void 0) {
61
+ model.value = void 0;
62
+ return void 0;
63
+ }
64
+ const committed = clampNumber(snapToStep(value, step.value, props.min), props.min, props.max);
65
+ model.value = committed;
66
+ return committed;
67
+ }
68
+ function nudge(direction, multiplier = 1) {
69
+ if (props.disabled) return void 0;
70
+ const draft = typing.value === void 0 ? void 0 : parseNumber(typing.value, locale.value);
71
+ const from = draft ?? model.value ?? props.min ?? 0;
72
+ return commit(draft === void 0 && model.value === void 0 ? from : addStep(from, direction * step.value * multiplier));
73
+ }
74
+ function onKeydown(event) {
75
+ if (props.disabled) return;
76
+ const actions = {
77
+ End: props.max === void 0 ? void 0 : () => commit(props.max),
78
+ Home: props.min === void 0 ? void 0 : () => commit(props.min),
79
+ ArrowDown: () => nudge(-1),
80
+ ArrowUp: () => nudge(1),
81
+ PageDown: () => nudge(-1, 10),
82
+ PageUp: () => nudge(1, 10)
83
+ };
84
+ const action = actions[event.key];
85
+ if (!action) return;
86
+ event.preventDefault();
87
+ const value = action();
88
+ typing.value = value === void 0 ? "" : formatEditing(value);
89
+ }
90
+ function onWheel(event) {
91
+ if (props.disabled || event.target !== document.activeElement) return;
92
+ if (Math.abs(event.deltaY) <= Math.abs(event.deltaX)) return;
93
+ event.preventDefault();
94
+ const value = nudge(event.deltaY < 0 ? 1 : -1);
95
+ typing.value = value === void 0 ? "" : formatEditing(value);
96
+ }
97
+ function onInput(event) {
98
+ const input = event.target;
99
+ if (isPotentialNumber(input.value, locale.value)) {
100
+ typing.value = input.value;
101
+ return;
102
+ }
103
+ input.value = typing.value ?? display.value;
104
+ }
105
+ async function beginEditing(input, selectAll) {
106
+ const formatted = input.value;
107
+ const formattedCaret = input.selectionStart ?? formatted.length;
108
+ const editing = model.value === void 0 ? "" : formatEditing(model.value);
109
+ const editingCharacters = new Set(editing);
110
+ let charactersBeforeCaret = 0;
111
+ for (const character of formatted.slice(0, formattedCaret)) {
112
+ if (editingCharacters.has(character)) charactersBeforeCaret++;
113
+ }
114
+ typing.value = editing;
115
+ await nextTick();
116
+ if (selectAll) {
117
+ input.select();
118
+ return;
119
+ }
120
+ let editingCaret = 0;
121
+ for (const character of [...editing].slice(0, charactersBeforeCaret)) editingCaret += character.length;
122
+ input.setSelectionRange(editingCaret, editingCaret);
123
+ }
124
+ async function onClick(event) {
125
+ const input = event.currentTarget;
126
+ if (typing.value === void 0) await beginEditing(input, false);
127
+ pointerFocus.value = false;
128
+ }
129
+ function onFocus(event) {
130
+ if (props.disabled) return;
131
+ if (pointerFocus.value) return;
132
+ void beginEditing(event.currentTarget, true);
133
+ }
134
+ function onPointerdown() {
135
+ pointerFocus.value = true;
136
+ }
137
+ function onPointercancel() {
138
+ pointerFocus.value = false;
139
+ }
140
+ function onBlur() {
141
+ pointerFocus.value = false;
142
+ if (typing.value === void 0) return;
143
+ const parsed = parseNumber(typing.value, locale.value);
144
+ if (!typing.value.trim()) commit(void 0);
145
+ else if (parsed !== void 0) commit(parsed);
146
+ typing.value = void 0;
147
+ }
148
+ </script>
149
+
150
+ <template>
151
+ <ControlShell
152
+ :size="props.size"
153
+ :ui="props.ui"
154
+ >
155
+ <!--
156
+ `type="text"` y no `number`: el nativo acepta texto que no es un
157
+ número, se anuncia como caja de texto y cambia con la rueda sin
158
+ tener el foco. El papel de `spinbutton` con sus tres `aria-value*`
159
+ es lo que lo convierte en un control de número para quien no ve la
160
+ pantalla.
161
+ -->
162
+ <input
163
+ v-bind="$attrs"
164
+ :aria-valuemax="props.max"
165
+ :aria-valuemin="props.min"
166
+ :aria-valuenow="model"
167
+ :aria-valuetext="props.currency && model !== void 0 ? formatter.format(model) : void 0"
168
+ autocomplete="off"
169
+ autocorrect="off"
170
+ :class="ui.base"
171
+ :disabled="props.disabled"
172
+ inputmode="decimal"
173
+ role="spinbutton"
174
+ spellcheck="false"
175
+ type="text"
176
+ :value="display"
177
+ @blur="onBlur"
178
+ @click="onClick"
179
+ @focus="onFocus"
180
+ @input="onInput"
181
+ @keydown="onKeydown"
182
+ @pointercancel="onPointercancel"
183
+ @pointerdown="onPointerdown"
184
+ @wheel="onWheel"
185
+ />
186
+
187
+ <template #trailing>
188
+ <!--
189
+ Los botones quedan fuera del tabulador a propósito: el control ya
190
+ sube y baja con las flechas, y dos paradas más por campo numérico
191
+ alargan el recorrido del teclado sin añadir nada que no se
192
+ pudiera hacer.
193
+ -->
194
+ <div :class="ui.actions">
195
+ <Button
196
+ :aria-label="messages.numberDecrement"
197
+ color="neutral"
198
+ :disabled="props.disabled || atMin"
199
+ :icon="icons.numberDecrement"
200
+ :size="buttonSize"
201
+ tabindex="-1"
202
+ :ui="stepperUi"
203
+ variant="ghost"
204
+ @click="nudge(-1)"
205
+ />
206
+
207
+ <Button
208
+ :aria-label="messages.numberIncrement"
209
+ color="neutral"
210
+ :disabled="props.disabled || atMax"
211
+ :icon="icons.numberIncrement"
212
+ :size="buttonSize"
213
+ tabindex="-1"
214
+ :ui="stepperUi"
215
+ variant="ghost"
216
+ @click="nudge(1)"
217
+ />
218
+ </div>
219
+ </template>
220
+ </ControlShell>
221
+ </template>
@@ -0,0 +1,36 @@
1
+ import type { VunoSize } from '#vuno/types/base';
2
+ import type { VunoControlOrientation } from '#vuno/types/field';
3
+ import type { VunoUi } from '#vuno/types/slots';
4
+ type __VLS_Props = Props;
5
+ type Props = {
6
+ currency?: string;
7
+ decimals?: number;
8
+ disabled?: boolean;
9
+ max?: number;
10
+ min?: number;
11
+ /** En vertical los botones se apilan; en horizontal, quedan lado a lado. */
12
+ orientation?: VunoControlOrientation;
13
+ size?: VunoSize;
14
+ step?: number;
15
+ ui?: VunoUi<'control' | 'input' | 'numberInput'>;
16
+ };
17
+ type __VLS_ModelProps = {
18
+ modelValue?: number | undefined;
19
+ };
20
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ "update:modelValue": (value: number | undefined) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
25
+ }>, {
26
+ currency: string;
27
+ size: VunoSize;
28
+ orientation: VunoControlOrientation;
29
+ ui: VunoUi<"control" | "input" | "numberInput">;
30
+ decimals: number;
31
+ max: number;
32
+ min: number;
33
+ step: number;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * La aritmética del campo numérico, aparte del componente para poder probarla.
3
+ *
4
+ * Es donde está lo que se rompe sin verse: un paso decimal que arrastra error
5
+ * de coma flotante, un valor que no cae en la rejilla del paso, un recorte que
6
+ * no respeta el mínimo. Nada de esto se nota mirando la pantalla — se nota
7
+ * cuando alguien guarda `0.30000000000000004`.
8
+ */
9
+ /**
10
+ * Suma o resta evitando el error de la coma flotante.
11
+ *
12
+ * `0.1 + 0.2` da `0.30000000000000004`, y con un paso de `0.1` eso aparece a la
13
+ * tercera pulsación. Se redondea a los decimales que traigan los operandos, que
14
+ * son todos los que el resultado puede necesitar.
15
+ */
16
+ export declare function addStep(value: number, step: number): number;
17
+ /** Recorta a los límites que haya; sin ellos devuelve lo que entra. */
18
+ export declare function clampNumber(value: number, min?: number, max?: number): number;
19
+ /**
20
+ * Lleva el valor a la rejilla del paso, contando desde el mínimo.
21
+ *
22
+ * Desde el mínimo y no desde cero: con `min: 1` y `step: 2`, los válidos son
23
+ * 1, 3, 5… y no 0, 2, 4. Es la diferencia entre un campo que acepta lo que
24
+ * escribes y uno que lo corrige a un valor que su propio mínimo prohíbe.
25
+ */
26
+ export declare function snapToStep(value: number, step: number, min?: number): number;
27
+ /**
28
+ * Lee un número escrito por una persona, en su idioma.
29
+ *
30
+ * En castellano el separador decimal es la coma y el de millares el punto, así
31
+ * que `Number('1.234,5')` da `NaN` y `Number('1.234')` da `1.234` —mil doscientos
32
+ * treinta y cuatro leído como uno coma doscientos treinta y cuatro—, que es peor
33
+ * porque no falla: guarda otro número.
34
+ */
35
+ export declare function parseNumber(text: string, locale: string): number | undefined;
36
+ /**
37
+ * Dice si el texto todavía puede convertirse en un número del idioma.
38
+ *
39
+ * Admite estados transitorios necesarios al escribir —vacío, signo o separador
40
+ * decimal sin cifras—, pero no letras, exponentes ni símbolos monetarios.
41
+ */
42
+ export declare function isPotentialNumber(text: string, locale: string): boolean;
@@ -0,0 +1,64 @@
1
+ const numberSymbolsCache = /* @__PURE__ */ new Map();
2
+ export function addStep(value, step) {
3
+ const decimals = Math.max(decimalsOf(value), decimalsOf(step));
4
+ return Number((value + step).toFixed(decimals));
5
+ }
6
+ export function clampNumber(value, min, max) {
7
+ if (min !== void 0 && value < min) return min;
8
+ if (max !== void 0 && value > max) return max;
9
+ return value;
10
+ }
11
+ export function snapToStep(value, step, min = 0) {
12
+ if (!step || step <= 0) return value;
13
+ const steps = Math.round((value - min) / step);
14
+ const [, decimals = ""] = String(step).split(".");
15
+ const offset = Number((steps * step).toFixed(decimals.length));
16
+ return addStep(min, offset);
17
+ }
18
+ export function parseNumber(text, locale) {
19
+ const trimmed = text.trim();
20
+ if (!trimmed) return void 0;
21
+ const { decimal, digit, digits, group, minus } = numberSymbols(locale);
22
+ const integer = `(?:${digit}+|${digit}{1,3}(?:${escapeRegExp(group)}${digit}{3})+)`;
23
+ const complete = new RegExp(`^${escapeRegExp(minus)}?${integer}(?:${escapeRegExp(decimal)}${digit}+)?$`);
24
+ if (!complete.test(trimmed)) return void 0;
25
+ let normalised = trimmed.split(group).join("").split(decimal).join(".").replace(minus, "-");
26
+ for (const [localDigit, asciiDigit] of digits) normalised = normalised.split(localDigit).join(asciiDigit);
27
+ const parsed = Number(normalised);
28
+ return Number.isFinite(parsed) ? parsed : void 0;
29
+ }
30
+ export function isPotentialNumber(text, locale) {
31
+ const { decimal, digit, group, minus } = numberSymbols(locale);
32
+ const sign = `${escapeRegExp(minus)}?`;
33
+ const ungrouped = `${digit}*(?:${escapeRegExp(decimal)}${digit}*)?`;
34
+ const grouped = `${digit}{1,3}(?:${escapeRegExp(group)}${digit}{3})+(?:${escapeRegExp(decimal)}${digit}*)?`;
35
+ return new RegExp(`^${sign}(?:${ungrouped}|${grouped})$`).test(text);
36
+ }
37
+ function decimalsOf(value) {
38
+ const [, decimals = ""] = String(value).split(".");
39
+ return decimals.length;
40
+ }
41
+ function escapeRegExp(value) {
42
+ return value.replace(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
43
+ }
44
+ function numberSymbols(locale) {
45
+ const cached = numberSymbolsCache.get(locale);
46
+ if (cached) return cached;
47
+ const formatter = new Intl.NumberFormat(locale);
48
+ const digitFormatter = new Intl.NumberFormat(locale, { useGrouping: false });
49
+ const parts = formatter.formatToParts(-12345.6);
50
+ const digits = /* @__PURE__ */ new Map();
51
+ for (let value = 0; value <= 9; value++) {
52
+ digits.set(String(value), String(value));
53
+ digits.set(digitFormatter.format(value), String(value));
54
+ }
55
+ const symbols = {
56
+ decimal: parts.find((part) => part.type === "decimal")?.value ?? ".",
57
+ digit: `(?:${[...digits.keys()].map(escapeRegExp).join("|")})`,
58
+ digits,
59
+ group: parts.find((part) => part.type === "group")?.value ?? ",",
60
+ minus: parts.find((part) => part.type === "minusSign")?.value ?? "-"
61
+ };
62
+ numberSymbolsCache.set(locale, symbols);
63
+ return symbols;
64
+ }
@@ -0,0 +1,19 @@
1
+ import type { MaybeRefOrGetter } from 'vue';
2
+ import type { VunoShortcuts, VunoShortcutsOptions } from '#vuno/types/shortcuts';
3
+ /**
4
+ * Atajos de teclado, declarados donde se usan.
5
+ *
6
+ * Se llama `define…` y no `use…` aunque viva en `composables/`, y es
7
+ * deliberado: no devuelve estado sino una forma de parar, y lo que hace es
8
+ * **declarar** algo que se recoge solo al desmontar. `useShortcuts` prometería
9
+ * un valor que nadie lee.
10
+ *
11
+ * Se engancha **una vez** al documento y no un oyente por atajo: con quince
12
+ * atajos declarados en una pantalla, lo segundo instala quince manejadores que
13
+ * corren todos en cada pulsación.
14
+ *
15
+ * @param config El mapa de atajos. Admite un `ref` o un getter para cambiarlos sin volver a montar.
16
+ * @param options Retardo de la secuencia y comparación por posición física.
17
+ * @returns Una función que desengancha, por si hay que parar antes de desmontar.
18
+ */
19
+ export declare function defineShortcuts(config: MaybeRefOrGetter<VunoShortcuts>, options?: VunoShortcutsOptions): () => void;
@@ -0,0 +1,68 @@
1
+ import { onScopeDispose, toValue } from "vue";
2
+ export function defineShortcuts(config, options = {}) {
3
+ if (typeof document === "undefined") return () => {
4
+ };
5
+ const { chainDelay = 800, layoutIndependent = false } = options;
6
+ const platform = navigator.userAgentData?.platform ?? navigator.platform ?? "";
7
+ const isApple = /ipad|iphone|ipod|mac/i.test(platform);
8
+ let chain = [];
9
+ let chainedAt = 0;
10
+ const stop = () => document.removeEventListener("keydown", onKeydown);
11
+ document.addEventListener("keydown", onKeydown);
12
+ onScopeDispose(stop, true);
13
+ return stop;
14
+ function onKeydown(event) {
15
+ const entries = Object.entries(toValue(config)).filter(([, shortcut]) => Boolean(shortcut));
16
+ const now = Date.now();
17
+ chain = now - chainedAt > chainDelay ? [describe(event)] : [...chain, describe(event)];
18
+ chainedAt = now;
19
+ for (let length = chain.length; length > 0; length--) {
20
+ const candidate = chain.slice(-length).join("-");
21
+ const found = entries.find(([name]) => normalize(name) === candidate);
22
+ if (!found) continue;
23
+ const shortcut = resolve(found[1]);
24
+ if (!allowed(shortcut.usingInput, event)) continue;
25
+ event.preventDefault();
26
+ chain = [];
27
+ shortcut.handler(event);
28
+ return;
29
+ }
30
+ }
31
+ function describe(event) {
32
+ const parts = [];
33
+ if (isApple ? event.metaKey : event.ctrlKey) parts.push("meta");
34
+ if (isApple ? event.ctrlKey : false) parts.push("ctrl");
35
+ if (event.altKey) parts.push("alt");
36
+ if (event.shiftKey) parts.push("shift");
37
+ parts.push(key(event));
38
+ return parts.join("_");
39
+ }
40
+ function key(event) {
41
+ if (layoutIndependent)
42
+ return event.code.replace(/^Digit/, "").replace(/^Key/, "").toLowerCase();
43
+ return event.key === " " ? "space" : event.key.toLowerCase();
44
+ }
45
+ }
46
+ function normalize(name) {
47
+ return name.split("-").map((step) => {
48
+ const parts = step.toLowerCase().split("_");
49
+ const pressed = parts.at(-1) ?? "";
50
+ const modifiers = new Set(
51
+ parts.slice(0, -1).map((modifier) => {
52
+ if (modifier === "command") return "meta";
53
+ return modifier === "option" ? "alt" : modifier;
54
+ })
55
+ );
56
+ return [...["meta", "ctrl", "alt", "shift"].filter((modifier) => modifiers.has(modifier)), pressed].join("_");
57
+ }).join("-");
58
+ }
59
+ function resolve(shortcut) {
60
+ return typeof shortcut === "function" ? { handler: shortcut } : shortcut;
61
+ }
62
+ function allowed(usingInput, event) {
63
+ const target = event.target;
64
+ const editing = Boolean(target?.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"]'));
65
+ if (!editing || usingInput === true) return true;
66
+ if (typeof usingInput === "string") return target?.closest("[name]")?.getAttribute("name") === usingInput;
67
+ return false;
68
+ }
@@ -0,0 +1,45 @@
1
+ import type { ComputePositionReturn, Middleware } from '@floating-ui/dom';
2
+ import type { MaybeRefOrGetter } from 'vue';
3
+ import type { VunoPlacement } from '#vuno/types/base';
4
+ /**
5
+ * Anclar algo flotante a algo que está en la página, y mantenerlo anclado.
6
+ *
7
+ * Lo usan el menú, el aviso y la lista del combobox. Antes lo escribía cada uno
8
+ * y las tres copias **ya habían divergido**: dos comprobaban que
9
+ * `ResizeObserver` existe antes de pedirle a `autoUpdate` que observe el tamaño
10
+ * y la tercera no, dos volvían a mirar el elemento después del `await` y la
11
+ * tercera lo hacía de otra forma. Hoy eso no cuesta nada —el DOM de las pruebas
12
+ * trae los dos observadores— y por eso vale como aviso y no como avería: es la
13
+ * misma decisión tomada tres veces, y ya iba por caminos distintos.
14
+ *
15
+ * Lo que queda aquí es lo que los tres hacen igual. Lo que los distingue —dónde
16
+ * se coloca, cuánto se separa, qué mide además— entra por parámetro.
17
+ */
18
+ type VunoAnchorOptions = {
19
+ /**
20
+ * Se llama con la posición ya resuelta, después de colocar.
21
+ *
22
+ * Existe por el `placement` **resuelto**: con `flip`, un aviso pedido arriba
23
+ * que no cabe acaba abajo, y quien pinte una flecha leyendo el prop la deja
24
+ * pegada al lado que ya no toca.
25
+ */
26
+ onPlaced?: (position: ComputePositionReturn) => void;
27
+ /** El elemento de la flecha, si lo hay. Su posición llega en `onPlaced`. */
28
+ arrowElement?: MaybeRefOrGetter<HTMLElement | undefined>;
29
+ /**
30
+ * Contra qué se recorta. Para una lista dentro de un `<dialog>` es el
31
+ * diálogo: sin esto voltea contra la ventana y se sale de la caja que de
32
+ * verdad la contiene.
33
+ */
34
+ boundary?: MaybeRefOrGetter<Element | undefined>;
35
+ /** Separación entre el ancla y lo flotante, en píxeles. */
36
+ distance?: MaybeRefOrGetter<number | undefined>;
37
+ placement?: MaybeRefOrGetter<VunoPlacement>;
38
+ /** Lo que este control necesite además de la base: medir, recortar, lo que sea. */
39
+ middleware?: () => Middleware[];
40
+ };
41
+ export declare function useVunoAnchor(options?: VunoAnchorOptions): {
42
+ anchor: (reference: HTMLElement | undefined, floating: HTMLElement | undefined) => void;
43
+ release: () => void;
44
+ };
45
+ export {};