@antify/ui-module 1.5.1 → 1.7.1

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 (351) hide show
  1. package/dist/module.d.mts +187 -51
  2. package/dist/module.d.ts +187 -51
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +158 -49
  5. package/dist/runtime/components/AntAccordion.vue +10 -5
  6. package/dist/runtime/components/AntAccordionItem.vue +19 -7
  7. package/dist/runtime/components/AntAlert.vue +41 -32
  8. package/dist/runtime/components/AntCard.vue +34 -0
  9. package/dist/runtime/components/AntContent.vue +16 -0
  10. package/dist/runtime/components/AntDropdown.vue +2 -2
  11. package/dist/runtime/components/AntIcon.vue +21 -16
  12. package/dist/runtime/components/AntKeycap.vue +26 -5
  13. package/dist/runtime/components/AntListGroupItem.vue +24 -28
  14. package/dist/runtime/components/AntModal.vue +5 -5
  15. package/dist/runtime/components/AntPagination.vue +53 -48
  16. package/dist/runtime/components/AntPopover.vue +3 -3
  17. package/dist/runtime/components/AntSpinner.vue +56 -50
  18. package/dist/runtime/components/AntTag.vue +75 -40
  19. package/dist/runtime/components/AntToast.vue +40 -31
  20. package/dist/runtime/components/AntToaster.vue +14 -9
  21. package/dist/runtime/components/AntTooltip.vue +35 -35
  22. package/dist/runtime/components/__stories/AntAccordion.stories.mjs +3 -2
  23. package/dist/runtime/components/__stories/AntAlert.stories.d.ts +1 -0
  24. package/dist/runtime/components/__stories/AntAlert.stories.mjs +18 -12
  25. package/dist/runtime/components/__stories/AntCard.stories.d.ts +7 -0
  26. package/dist/runtime/components/__stories/AntCard.stories.mjs +87 -0
  27. package/dist/runtime/components/__stories/AntContent.stories.d.ts +6 -0
  28. package/dist/runtime/components/__stories/AntContent.stories.mjs +26 -0
  29. package/dist/runtime/components/__stories/AntIcon.stories.mjs +7 -4
  30. package/dist/runtime/components/__stories/AntKeycap.stories.mjs +8 -1
  31. package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +3 -3
  32. package/dist/runtime/components/__stories/AntModal.stories.mjs +2 -2
  33. package/dist/runtime/components/__stories/AntSpinner.stories.mjs +7 -7
  34. package/dist/runtime/components/__stories/AntTag.stories.mjs +5 -6
  35. package/dist/runtime/components/__stories/AntToast.stories.mjs +3 -3
  36. package/dist/runtime/components/__stories/AntToaster.stories.d.ts +2 -2
  37. package/dist/runtime/components/__stories/AntToaster.stories.mjs +4 -4
  38. package/dist/runtime/components/__stories/AntTooltip.stories.mjs +11 -11
  39. package/dist/runtime/components/__types/AntIcon.types.d.ts +5 -3
  40. package/dist/runtime/components/__types/AntIcon.types.mjs +5 -3
  41. package/dist/runtime/components/__types/AntKeycap.types.d.ts +4 -0
  42. package/dist/runtime/components/__types/AntKeycap.types.mjs +5 -0
  43. package/dist/runtime/components/__types/AntListGroupItem.types.d.ts +9 -0
  44. package/dist/runtime/components/__types/AntListGroupItem.types.mjs +10 -0
  45. package/dist/runtime/components/__types/AntSpinner.types.d.ts +10 -0
  46. package/dist/runtime/components/__types/AntSpinner.types.mjs +11 -0
  47. package/dist/runtime/components/__types/AntTag.types.d.ts +17 -0
  48. package/dist/runtime/components/__types/AntTag.types.mjs +19 -0
  49. package/dist/runtime/components/__types/AntToaster.types.d.ts +2 -2
  50. package/dist/runtime/components/__types/index.d.ts +6 -1
  51. package/dist/runtime/components/__types/index.mjs +6 -1
  52. package/dist/runtime/components/buttons/AntActionButton.vue +7 -7
  53. package/dist/runtime/components/buttons/AntButton.vue +85 -75
  54. package/dist/runtime/components/buttons/AntCreateButton.vue +2 -2
  55. package/dist/runtime/components/buttons/AntDeleteButton.vue +2 -2
  56. package/dist/runtime/components/buttons/AntDuplicateButton.vue +2 -2
  57. package/dist/runtime/components/buttons/AntEditButton.vue +2 -2
  58. package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +2 -2
  59. package/dist/runtime/components/buttons/AntSaveButton.vue +2 -2
  60. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +6 -6
  61. package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +39 -36
  62. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +1 -1
  63. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +1 -1
  64. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +1 -1
  65. package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +1 -1
  66. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +1 -1
  67. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +1 -1
  68. package/dist/runtime/components/buttons/__types/index.d.ts +1 -1
  69. package/dist/runtime/components/buttons/__types/index.mjs +1 -1
  70. package/dist/runtime/components/crud/AntCrudDetailActions.vue +1 -1
  71. package/dist/runtime/components/crud/AntCrudDetailNav.vue +2 -2
  72. package/dist/runtime/components/crud/AntCrudTableFilter.vue +14 -14
  73. package/dist/runtime/components/crud/AntCrudTableNav.vue +36 -27
  74. package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +1 -1
  75. package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.mjs +1 -1
  76. package/dist/runtime/components/dialogs/AntDeleteDialog.vue +3 -3
  77. package/dist/runtime/components/dialogs/AntDialog.vue +23 -23
  78. package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +3 -1
  79. package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +4 -4
  80. package/dist/runtime/components/forms/AntField.vue +109 -0
  81. package/dist/runtime/components/forms/AntFormGroupLabel.vue +5 -0
  82. package/dist/runtime/components/{form/Elements → forms}/__stories/AntField.stories.mjs +15 -15
  83. package/dist/runtime/components/{form → forms}/__stories/AntFormGroup.stories.mjs +3 -3
  84. package/dist/runtime/components/{form → forms}/__stories/AntFormGroupLabel.stories.mjs +1 -1
  85. package/dist/runtime/components/index.d.ts +46 -6
  86. package/dist/runtime/components/index.mjs +90 -7
  87. package/dist/runtime/components/inputs/AntCheckbox.vue +183 -0
  88. package/dist/runtime/components/inputs/AntCheckboxGroup.vue +117 -0
  89. package/dist/runtime/components/inputs/AntDateInput.vue +97 -0
  90. package/{src/runtime/components/form → dist/runtime/components/inputs}/AntNumberInput.vue +31 -49
  91. package/dist/runtime/components/inputs/AntPasswordInput.vue +107 -0
  92. package/dist/runtime/components/inputs/AntRadio.vue +192 -0
  93. package/dist/runtime/components/inputs/AntRadioGroup.vue +116 -0
  94. package/dist/runtime/components/inputs/AntRangeSlider.vue +101 -0
  95. package/{src/runtime/components/form → dist/runtime/components/inputs}/AntSearch.vue +17 -21
  96. package/dist/runtime/components/{form → inputs}/AntSelect.vue +71 -63
  97. package/dist/runtime/components/inputs/AntSwitch.vue +180 -0
  98. package/dist/runtime/components/inputs/AntSwitcher.vue +196 -0
  99. package/{src/runtime/components/form → dist/runtime/components/inputs}/AntTagInput.vue +100 -75
  100. package/dist/runtime/components/inputs/AntTextInput.vue +72 -0
  101. package/dist/runtime/components/{form → inputs}/AntTextarea.vue +53 -41
  102. package/dist/runtime/components/{form → inputs}/AntUnitInput.vue +17 -23
  103. package/dist/runtime/components/inputs/Elements/AntBaseInput.vue +256 -0
  104. package/dist/runtime/components/{form → inputs}/Elements/AntDropDown.vue +29 -30
  105. package/dist/runtime/components/inputs/Elements/AntInputDescription.vue +58 -0
  106. package/{src/runtime/components/form → dist/runtime/components/inputs}/Elements/AntInputLabel.vue +16 -13
  107. package/dist/runtime/components/inputs/Elements/AntInputLimiter.vue +58 -0
  108. package/dist/runtime/components/{form → inputs}/Elements/__stories/AntBaseInput.stories.d.ts +2 -0
  109. package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +234 -0
  110. package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputDescription.stories.mjs +5 -5
  111. package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLabel.stories.mjs +2 -2
  112. package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLimiter.stories.mjs +5 -5
  113. package/dist/runtime/components/inputs/Elements/__types/index.d.ts +1 -0
  114. package/dist/runtime/components/inputs/Elements/__types/index.mjs +1 -0
  115. package/dist/runtime/components/{form → inputs}/Elements/index.d.ts +1 -1
  116. package/dist/runtime/components/{form → inputs}/Elements/index.mjs +1 -1
  117. package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.mjs +341 -0
  118. package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckboxGroup.stories.mjs +23 -34
  119. package/dist/runtime/components/inputs/__stories/AntDateInput.stories.d.ts +8 -0
  120. package/dist/runtime/components/inputs/__stories/AntDateInput.stories.mjs +193 -0
  121. package/dist/runtime/components/{form → inputs}/__stories/AntNumberInput.stories.d.ts +2 -0
  122. package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.mjs +106 -0
  123. package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.d.ts +8 -0
  124. package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.mjs +156 -0
  125. package/dist/runtime/components/{form/AntRadioWidget → inputs}/__stories/AntRadioGroup.stories.d.ts +1 -1
  126. package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.mjs +243 -0
  127. package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.d.ts +7 -0
  128. package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.mjs +67 -0
  129. package/dist/runtime/components/{form → inputs}/__stories/AntSearch.stories.d.ts +1 -0
  130. package/dist/runtime/components/inputs/__stories/AntSearch.stories.mjs +103 -0
  131. package/dist/runtime/components/{form → inputs}/__stories/AntSelect.stories.mjs +78 -46
  132. package/dist/runtime/components/{form → inputs}/__stories/AntSwitch.stories.d.ts +1 -1
  133. package/dist/runtime/components/inputs/__stories/AntSwitch.stories.mjs +296 -0
  134. package/dist/runtime/components/{form → inputs}/__stories/AntSwitcher.stories.d.ts +1 -1
  135. package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.mjs +235 -0
  136. package/dist/runtime/components/{form → inputs}/__stories/AntTagInput.stories.d.ts +3 -3
  137. package/dist/runtime/components/inputs/__stories/AntTagInput.stories.mjs +228 -0
  138. package/dist/runtime/components/{form → inputs}/__stories/AntTextInput.stories.d.ts +2 -0
  139. package/dist/runtime/components/inputs/__stories/AntTextInput.stories.mjs +225 -0
  140. package/dist/runtime/components/{form → inputs}/__stories/AntTextarea.stories.d.ts +1 -0
  141. package/dist/runtime/components/{form → inputs}/__stories/AntTextarea.stories.mjs +44 -31
  142. package/dist/runtime/components/{form → inputs}/__stories/AntUnitInput.stories.d.ts +1 -0
  143. package/dist/runtime/components/{form → inputs}/__stories/AntUnitInput.stories.mjs +49 -17
  144. package/dist/runtime/components/{form/AntCheckboxWidget/__types/AntCheckbox.d.ts → inputs/__types/AntCheckbox.types.d.ts} +4 -0
  145. package/dist/runtime/components/inputs/__types/AntCheckbox.types.mjs +5 -0
  146. package/dist/runtime/components/inputs/__types/AntDateInput.types.d.ts +7 -0
  147. package/dist/runtime/components/inputs/__types/AntDateInput.types.mjs +8 -0
  148. package/dist/runtime/components/inputs/__types/AntRadio.types.d.ts +13 -0
  149. package/dist/runtime/components/inputs/__types/AntRadio.types.mjs +5 -0
  150. package/dist/runtime/components/inputs/__types/AntSwitch.types.d.ts +4 -0
  151. package/dist/runtime/components/inputs/__types/AntSwitch.types.mjs +5 -0
  152. package/dist/runtime/components/inputs/__types/AntTagInput.types.d.ts +5 -0
  153. package/dist/runtime/components/inputs/__types/AntTagInput.types.mjs +6 -0
  154. package/dist/runtime/components/{form/__types/AntTextInput.type.d.ts → inputs/__types/AntTextInput.types.d.ts} +0 -1
  155. package/dist/runtime/components/{form/__types/AntTextInput.type.mjs → inputs/__types/AntTextInput.types.mjs} +0 -1
  156. package/dist/runtime/components/inputs/__types/index.d.ts +8 -0
  157. package/dist/runtime/components/inputs/__types/index.mjs +8 -0
  158. package/dist/runtime/components/layouts/AntNavLeftLayout.vue +5 -5
  159. package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.mjs +1 -1
  160. package/dist/runtime/components/navbar/AntNavbar.vue +10 -10
  161. package/dist/runtime/components/navbar/AntNavbarItem.vue +5 -5
  162. package/dist/runtime/components/navbar/__types/{NavbarItem.d.ts → NavbarItem.types.d.ts} +2 -2
  163. package/dist/runtime/components/navbar/__types/index.d.ts +1 -0
  164. package/dist/runtime/components/navbar/__types/index.mjs +1 -0
  165. package/dist/runtime/components/table/AntTable.vue +10 -6
  166. package/dist/runtime/components/table/AntTableSortButton.vue +37 -27
  167. package/dist/runtime/components/table/AntTd.vue +21 -10
  168. package/dist/runtime/components/table/AntTh.vue +21 -14
  169. package/dist/runtime/components/table/__stories/AntTable.stories.mjs +35 -36
  170. package/dist/runtime/components/table/__types/{TableHeader.type.d.ts → TableHeader.types.d.ts} +5 -0
  171. package/dist/runtime/components/table/__types/{TableHeader.type.mjs → TableHeader.types.mjs} +6 -0
  172. package/dist/runtime/components/table/__types/index.d.ts +1 -0
  173. package/dist/runtime/components/table/__types/index.mjs +1 -0
  174. package/dist/runtime/components/tabs/AntTabItem.vue +34 -34
  175. package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +4 -4
  176. package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +3 -3
  177. package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +2 -2
  178. package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +6 -6
  179. package/dist/runtime/components/tabs/__types/index.d.ts +1 -0
  180. package/dist/runtime/components/tabs/__types/index.mjs +1 -0
  181. package/dist/runtime/composables/useUi.d.ts +6 -6
  182. package/dist/runtime/composables/useUi.mjs +8 -8
  183. package/dist/runtime/enums/Size.enum.d.ts +4 -1
  184. package/dist/runtime/enums/Size.enum.mjs +4 -1
  185. package/dist/runtime/enums/{ColorType.enum.d.ts → State.enum.d.ts} +2 -2
  186. package/dist/runtime/enums/State.enum.mjs +18 -0
  187. package/dist/runtime/enums/index.d.ts +2 -1
  188. package/dist/runtime/enums/index.mjs +2 -1
  189. package/dist/runtime/plugins/toaster.d.ts +2 -2
  190. package/dist/runtime/plugins/toaster.mjs +5 -5
  191. package/dist/runtime/plugins/ui-module.mjs +1 -1
  192. package/dist/runtime/tailwind.config.d.ts +1 -181
  193. package/dist/runtime/tailwind.config.mjs +3 -0
  194. package/dist/runtime/types.d.ts +5 -4
  195. package/dist/runtime/types.mjs +5 -4
  196. package/dist/types.d.mts +1 -1
  197. package/dist/types.d.ts +1 -1
  198. package/package.json +1 -1
  199. package/src/runtime/components/AntAccordion.vue +10 -5
  200. package/src/runtime/components/AntAccordionItem.vue +19 -7
  201. package/src/runtime/components/AntAlert.vue +41 -32
  202. package/src/runtime/components/AntCard.vue +34 -0
  203. package/src/runtime/components/AntContent.vue +16 -0
  204. package/src/runtime/components/AntDropdown.vue +2 -2
  205. package/src/runtime/components/AntIcon.vue +21 -16
  206. package/src/runtime/components/AntKeycap.vue +26 -5
  207. package/src/runtime/components/AntListGroupItem.vue +24 -28
  208. package/src/runtime/components/AntModal.vue +5 -5
  209. package/src/runtime/components/AntPagination.vue +53 -48
  210. package/src/runtime/components/AntPopover.vue +3 -3
  211. package/src/runtime/components/AntSpinner.vue +56 -50
  212. package/src/runtime/components/AntTag.vue +75 -40
  213. package/src/runtime/components/AntToast.vue +40 -31
  214. package/src/runtime/components/AntToaster.vue +16 -17
  215. package/src/runtime/components/AntTooltip.vue +35 -35
  216. package/src/runtime/components/buttons/AntActionButton.vue +7 -7
  217. package/src/runtime/components/buttons/AntButton.vue +85 -75
  218. package/src/runtime/components/buttons/AntCreateButton.vue +2 -2
  219. package/src/runtime/components/buttons/AntDeleteButton.vue +2 -2
  220. package/src/runtime/components/buttons/AntDuplicateButton.vue +2 -2
  221. package/src/runtime/components/buttons/AntEditButton.vue +2 -2
  222. package/src/runtime/components/buttons/AntSaveAndNewButton.vue +2 -2
  223. package/src/runtime/components/buttons/AntSaveButton.vue +2 -2
  224. package/src/runtime/components/crud/AntCrudDetailActions.vue +1 -1
  225. package/src/runtime/components/crud/AntCrudDetailNav.vue +2 -2
  226. package/src/runtime/components/crud/AntCrudTableFilter.vue +14 -14
  227. package/src/runtime/components/crud/AntCrudTableNav.vue +36 -27
  228. package/src/runtime/components/dialogs/AntDeleteDialog.vue +3 -3
  229. package/src/runtime/components/dialogs/AntDialog.vue +23 -23
  230. package/src/runtime/components/forms/AntField.vue +109 -0
  231. package/src/runtime/components/forms/AntFormGroupLabel.vue +5 -0
  232. package/src/runtime/components/inputs/AntCheckbox.vue +202 -0
  233. package/src/runtime/components/inputs/AntCheckboxGroup.vue +117 -0
  234. package/src/runtime/components/inputs/AntDateInput.vue +97 -0
  235. package/{dist/runtime/components/form → src/runtime/components/inputs}/AntNumberInput.vue +31 -49
  236. package/src/runtime/components/inputs/AntPasswordInput.vue +107 -0
  237. package/src/runtime/components/inputs/AntRadio.vue +200 -0
  238. package/src/runtime/components/inputs/AntRadioGroup.vue +116 -0
  239. package/src/runtime/components/inputs/AntRangeSlider.vue +121 -0
  240. package/{dist/runtime/components/form → src/runtime/components/inputs}/AntSearch.vue +17 -21
  241. package/src/runtime/components/{form → inputs}/AntSelect.vue +71 -63
  242. package/src/runtime/components/inputs/AntSwitch.vue +180 -0
  243. package/src/runtime/components/inputs/AntSwitcher.vue +196 -0
  244. package/{dist/runtime/components/form → src/runtime/components/inputs}/AntTagInput.vue +100 -75
  245. package/src/runtime/components/inputs/AntTextInput.vue +72 -0
  246. package/src/runtime/components/{form → inputs}/AntTextarea.vue +53 -41
  247. package/src/runtime/components/{form → inputs}/AntUnitInput.vue +17 -23
  248. package/src/runtime/components/inputs/Elements/AntBaseInput.vue +304 -0
  249. package/src/runtime/components/{form → inputs}/Elements/AntDropDown.vue +29 -30
  250. package/src/runtime/components/inputs/Elements/AntInputDescription.vue +58 -0
  251. package/{dist/runtime/components/form → src/runtime/components/inputs}/Elements/AntInputLabel.vue +16 -13
  252. package/src/runtime/components/inputs/Elements/AntInputLimiter.vue +58 -0
  253. package/src/runtime/components/layouts/AntNavLeftLayout.vue +5 -5
  254. package/src/runtime/components/navbar/AntNavbar.vue +10 -10
  255. package/src/runtime/components/navbar/AntNavbarItem.vue +5 -5
  256. package/src/runtime/components/table/AntTable.vue +10 -6
  257. package/src/runtime/components/table/AntTableSortButton.vue +37 -27
  258. package/src/runtime/components/table/AntTd.vue +21 -10
  259. package/src/runtime/components/table/AntTh.vue +21 -14
  260. package/src/runtime/components/tabs/AntTabItem.vue +34 -34
  261. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +0 -144
  262. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +0 -91
  263. package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.mjs +0 -289
  264. package/dist/runtime/components/form/AntFormGroupLabel.vue +0 -5
  265. package/dist/runtime/components/form/AntRadioWidget/AntRadio.vue +0 -139
  266. package/dist/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +0 -80
  267. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.d.ts +0 -8
  268. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.mjs +0 -79
  269. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.mjs +0 -125
  270. package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.d.ts +0 -9
  271. package/dist/runtime/components/form/AntRangeSlider.vue +0 -81
  272. package/dist/runtime/components/form/AntSwitch.vue +0 -153
  273. package/dist/runtime/components/form/AntSwitcher.vue +0 -184
  274. package/dist/runtime/components/form/AntTextInput.vue +0 -73
  275. package/dist/runtime/components/form/Elements/AntBaseInput.vue +0 -220
  276. package/dist/runtime/components/form/Elements/AntField.vue +0 -102
  277. package/dist/runtime/components/form/Elements/AntInputDescription.vue +0 -55
  278. package/dist/runtime/components/form/Elements/AntInputLimiter.vue +0 -55
  279. package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.mjs +0 -171
  280. package/dist/runtime/components/form/Elements/__types/index.d.ts +0 -1
  281. package/dist/runtime/components/form/Elements/__types/index.mjs +0 -1
  282. package/dist/runtime/components/form/__stories/AntNumberInput.stories.mjs +0 -67
  283. package/dist/runtime/components/form/__stories/AntRangeSlider.stories.d.ts +0 -6
  284. package/dist/runtime/components/form/__stories/AntRangeSlider.stories.mjs +0 -40
  285. package/dist/runtime/components/form/__stories/AntSearch.stories.mjs +0 -43
  286. package/dist/runtime/components/form/__stories/AntSwitch.stories.mjs +0 -218
  287. package/dist/runtime/components/form/__stories/AntSwitcher.stories.mjs +0 -228
  288. package/dist/runtime/components/form/__stories/AntTagInput.stories.mjs +0 -106
  289. package/dist/runtime/components/form/__stories/AntTextInput.stories.mjs +0 -68
  290. package/dist/runtime/components/form/__types/AntSwitcher.type.mjs +0 -0
  291. package/dist/runtime/components/form/__types/index.d.ts +0 -3
  292. package/dist/runtime/components/form/__types/index.mjs +0 -3
  293. package/dist/runtime/components/form/index.d.ts +0 -12
  294. package/dist/runtime/components/form/index.mjs +0 -24
  295. package/dist/runtime/components/navbar/__types/NavbarItem.mjs +0 -0
  296. package/dist/runtime/enums/ColorType.enum.mjs +0 -18
  297. package/dist/runtime/types/AntListGroupItem.type.d.ts +0 -11
  298. package/dist/runtime/types/AntListGroupItem.type.mjs +0 -12
  299. package/dist/runtime/types/AntTag.type.d.ts +0 -7
  300. package/dist/runtime/types/AntTag.type.mjs +0 -8
  301. package/dist/runtime/types/Checkbox.type.d.ts +0 -8
  302. package/dist/runtime/types/Checkbox.type.mjs +0 -0
  303. package/dist/runtime/types/NavItem.type.d.ts +0 -9
  304. package/dist/runtime/types/NavItem.type.mjs +0 -0
  305. package/dist/runtime/types/RadioButton.type.d.ts +0 -5
  306. package/dist/runtime/types/RadioButton.type.mjs +0 -0
  307. package/dist/runtime/types/Tabs.type.d.ts +0 -6
  308. package/dist/runtime/types/Tabs.type.mjs +0 -0
  309. package/dist/runtime/types/Toaster.type.d.ts +0 -6
  310. package/dist/runtime/types/Toaster.type.mjs +0 -0
  311. package/dist/runtime/types/index.d.ts +0 -7
  312. package/dist/runtime/types/index.mjs +0 -7
  313. package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +0 -166
  314. package/src/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +0 -91
  315. package/src/runtime/components/form/AntFormGroupLabel.vue +0 -5
  316. package/src/runtime/components/form/AntRadioWidget/AntRadio.vue +0 -164
  317. package/src/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +0 -80
  318. package/src/runtime/components/form/AntRangeSlider.vue +0 -101
  319. package/src/runtime/components/form/AntSwitch.vue +0 -153
  320. package/src/runtime/components/form/AntSwitcher.vue +0 -200
  321. package/src/runtime/components/form/AntTextInput.vue +0 -73
  322. package/src/runtime/components/form/Elements/AntBaseInput.vue +0 -251
  323. package/src/runtime/components/form/Elements/AntField.vue +0 -102
  324. package/src/runtime/components/form/Elements/AntInputDescription.vue +0 -55
  325. package/src/runtime/components/form/Elements/AntInputLimiter.vue +0 -55
  326. /package/dist/runtime/components/__types/{Accordion.types.d.ts → AntAccordion.types.d.ts} +0 -0
  327. /package/dist/runtime/components/__types/{Accordion.types.mjs → AntAccordion.types.mjs} +0 -0
  328. /package/dist/runtime/components/buttons/__types/{AntButton.type.d.ts → AntButton.types.d.ts} +0 -0
  329. /package/dist/runtime/components/buttons/__types/{AntButton.type.mjs → AntButton.types.mjs} +0 -0
  330. /package/dist/runtime/components/{form → forms}/AntFormGroup.vue +0 -0
  331. /package/dist/runtime/components/{form/Elements → forms}/__stories/AntField.stories.d.ts +0 -0
  332. /package/dist/runtime/components/{form → forms}/__stories/AntFormGroup.stories.d.ts +0 -0
  333. /package/dist/runtime/components/{form → forms}/__stories/AntFormGroupLabel.stories.d.ts +0 -0
  334. /package/dist/runtime/components/{form → inputs}/AntRichTextEditor.vue +0 -0
  335. /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputDescription.stories.d.ts +0 -0
  336. /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLabel.stories.d.ts +0 -0
  337. /package/dist/runtime/components/{form → inputs}/Elements/__stories/AntInputLimiter.stories.d.ts +0 -0
  338. /package/dist/runtime/components/{form/Elements/__types/AntBaseInput.type.d.ts → inputs/Elements/__types/AntBaseInput.types.d.ts} +0 -0
  339. /package/dist/runtime/components/{form/Elements/__types/AntBaseInput.type.mjs → inputs/Elements/__types/AntBaseInput.types.mjs} +0 -0
  340. /package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckbox.stories.d.ts +0 -0
  341. /package/dist/runtime/components/{form/AntCheckboxWidget → inputs}/__stories/AntCheckboxGroup.stories.d.ts +0 -0
  342. /package/dist/runtime/components/{form → inputs}/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
  343. /package/dist/runtime/components/{form → inputs}/__stories/AntRichTextEditor.stories-old.mjs +0 -0
  344. /package/dist/runtime/components/{form → inputs}/__stories/AntSelect.stories.d.ts +0 -0
  345. /package/dist/runtime/components/{form/__types/AntSelect.type.d.ts → inputs/__types/AntSelect.types.d.ts} +0 -0
  346. /package/dist/runtime/components/{form/AntCheckboxWidget/__types/AntCheckbox.mjs → inputs/__types/AntSelect.types.mjs} +0 -0
  347. /package/dist/runtime/components/{form/__types/AntSwitcher.type.d.ts → inputs/__types/AntSwitcher.types.d.ts} +0 -0
  348. /package/dist/runtime/components/{form/AntRadioWidget/__types/AntRadio.type.mjs → inputs/__types/AntSwitcher.types.mjs} +0 -0
  349. /package/dist/runtime/components/{form/__types/AntSelect.type.mjs → navbar/__types/NavbarItem.types.mjs} +0 -0
  350. /package/src/runtime/components/{form → forms}/AntFormGroup.vue +0 -0
  351. /package/src/runtime/components/{form → inputs}/AntRichTextEditor.vue +0 -0
@@ -0,0 +1,225 @@
1
+ import { Size } from "../../../enums/Size.enum.mjs";
2
+ import AntTextInput from "../AntTextInput.vue";
3
+ import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validate";
4
+ import { TextInputType } from "../__types/AntTextInput.types.mjs";
5
+ import { InputState } from "../../../enums/index.mjs";
6
+ import { computed, reactive } from "vue";
7
+ const meta = {
8
+ title: "Inputs/Text Input",
9
+ component: AntTextInput,
10
+ parameters: { controls: { sort: "requiredFirst" } },
11
+ argTypes: {
12
+ modelValue: {
13
+ control: "text",
14
+ table: { type: { summary: "string|null" } }
15
+ },
16
+ state: {
17
+ control: { type: "select" },
18
+ options: Object.values(InputState)
19
+ },
20
+ size: {
21
+ control: { type: "select" },
22
+ options: Object.values(Size),
23
+ table: { defaultValue: { summary: Size.md } }
24
+ },
25
+ placeholder: {
26
+ table: { defaultValue: { summary: "this.label" } }
27
+ },
28
+ type: {
29
+ control: { type: "select" },
30
+ options: Object.values(TextInputType),
31
+ table: { defaultValue: { summary: TextInputType.text } }
32
+ }
33
+ }
34
+ };
35
+ export default meta;
36
+ export const Docs = {
37
+ render: (args) => ({
38
+ components: { AntTextInput },
39
+ setup() {
40
+ return { args };
41
+ },
42
+ template: `
43
+ <AntTextInput
44
+ v-bind="args"
45
+ v-model="args.modelValue"
46
+ />`
47
+ }),
48
+ args: {
49
+ modelValue: null,
50
+ label: "Label",
51
+ description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
52
+ }
53
+ };
54
+ export const withValidator = {
55
+ render: (args) => ({
56
+ components: { AntTextInput },
57
+ setup() {
58
+ const errorValidator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
59
+ const warningValidator = reactive(useFieldValidator(
60
+ (val) => val?.length >= 1 && val?.length <= 4 ? "It`s recommended to have a value with a length greater than 4" : true
61
+ ));
62
+ const infoValidator = reactive(useFieldValidator(
63
+ (val) => val?.length >= 5 && val?.length <= 8 ? "Way better! But if you type in 4 characters more, the value is perfect!" : true
64
+ ));
65
+ const successValidator = reactive(useFieldValidator(
66
+ (val) => val?.length >= 9 ? "Yes! The value length is big enough now" : true
67
+ ));
68
+ const state = computed(() => {
69
+ if (args.state) {
70
+ return args.state;
71
+ }
72
+ if (errorValidator.hasErrors()) {
73
+ return InputState.danger;
74
+ }
75
+ if (warningValidator.hasErrors()) {
76
+ return InputState.warning;
77
+ }
78
+ if (infoValidator.hasErrors()) {
79
+ return InputState.info;
80
+ }
81
+ if (successValidator.hasErrors()) {
82
+ return InputState.success;
83
+ }
84
+ return void 0;
85
+ });
86
+ const messages = computed(() => {
87
+ if (args.messages) {
88
+ return args.messages;
89
+ }
90
+ if (errorValidator.hasErrors()) {
91
+ return errorValidator.getErrors();
92
+ }
93
+ if (warningValidator.hasErrors()) {
94
+ return warningValidator.getErrors();
95
+ }
96
+ if (infoValidator.hasErrors()) {
97
+ return infoValidator.getErrors();
98
+ }
99
+ if (successValidator.hasErrors()) {
100
+ return successValidator.getErrors();
101
+ }
102
+ return void 0;
103
+ });
104
+ function validate(val) {
105
+ errorValidator.validate(val);
106
+ warningValidator.validate(val);
107
+ infoValidator.validate(val);
108
+ successValidator.validate(val);
109
+ }
110
+ return {
111
+ args,
112
+ validate,
113
+ state,
114
+ messages,
115
+ InputState
116
+ };
117
+ },
118
+ template: `
119
+ <AntTextInput
120
+ v-bind="args"
121
+ v-model="args.modelValue"
122
+ :state="state"
123
+ :messages="messages"
124
+ @validate="validate"
125
+ />`
126
+ }),
127
+ args: {
128
+ modelValue: null,
129
+ label: "Label",
130
+ description: "Focus in the element and blur out. After that, follow the error, warning, info and success instructions"
131
+ }
132
+ };
133
+ export const limited = {
134
+ render: (args) => ({
135
+ components: { AntTextInput },
136
+ setup() {
137
+ const validator = reactive(useFieldValidator([(val) => val.length <= 10 || "Max. 10 characters allowed"]));
138
+ return { args, validator, InputState };
139
+ },
140
+ template: `
141
+ <AntTextInput
142
+ v-bind="args"
143
+ v-model="args.modelValue"
144
+ :state="args.state ? args.state : (validator.hasErrors() ? InputState.danger : undefined)"
145
+ :messages="Array.isArray(args.messages) ? args.messages : validator.getErrors()"
146
+ @validate="(val) => validator.validate(val)"
147
+ />`
148
+ }),
149
+ args: {
150
+ ...Docs.args,
151
+ modelValue: "A to long value",
152
+ max: 10,
153
+ limiter: true
154
+ }
155
+ };
156
+ export const Summary = {
157
+ parameters: {
158
+ chromatic: { disableSnapshot: false }
159
+ },
160
+ render: (args) => ({
161
+ components: { AntTextInput },
162
+ setup() {
163
+ return { args, InputState };
164
+ },
165
+ template: `
166
+ <div class="flex gap-2.5">
167
+ <AntTextInput
168
+ v-bind="args"
169
+ v-model="args.modelValue"
170
+ />
171
+ <AntTextInput
172
+ v-bind="args"
173
+ v-model="args.modelValue"
174
+ :state="InputState.info"
175
+ />
176
+ <AntTextInput
177
+ v-bind="args"
178
+ v-model="args.modelValue"
179
+ :state="InputState.success"
180
+ />
181
+ <AntTextInput
182
+ v-bind="args"
183
+ v-model="args.modelValue"
184
+ :state="InputState.warning"
185
+ />
186
+ <AntTextInput
187
+ v-bind="args"
188
+ v-model="args.modelValue"
189
+ :state="InputState.danger"
190
+ />
191
+ </div>
192
+ <div class="flex gap-2.5">
193
+ <AntTextInput
194
+ v-bind="args"
195
+ v-model="args.modelValue"
196
+ />
197
+ <AntTextInput
198
+ v-bind="args"
199
+ v-model="args.modelValue"
200
+ :state="InputState.info"
201
+ />
202
+ <AntTextInput
203
+ v-bind="args"
204
+ v-model="args.modelValue"
205
+ :state="InputState.success"
206
+ />
207
+ <AntTextInput
208
+ v-bind="args"
209
+ v-model="args.modelValue"
210
+ :state="InputState.warning"
211
+ />
212
+ <AntTextInput
213
+ v-bind="args"
214
+ v-model="args.modelValue"
215
+ :state="InputState.danger"
216
+ />
217
+ </div>
218
+ `
219
+ }),
220
+ args: {
221
+ modelValue: null,
222
+ label: "Label",
223
+ description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
224
+ }
225
+ };
@@ -4,5 +4,6 @@ declare const meta: Meta<typeof AntTextarea>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof AntTextarea>;
6
6
  export declare const Docs: Story;
7
+ export declare const withValidator: Story;
7
8
  export declare const limited: Story;
8
9
  export declare const summary: Story;
@@ -2,19 +2,19 @@ import { isRequiredRule, notBlankRule, useFieldValidator } from "@antify/validat
2
2
  import { Grouped as _Grouped } from "../../../enums/Grouped.enum.mjs";
3
3
  import { Size } from "../../../enums/Size.enum.mjs";
4
4
  import AntTextarea from "../AntTextarea.vue";
5
- import { InputColorType } from "../../../enums/index.mjs";
5
+ import { InputState } from "../../../enums/index.mjs";
6
6
  import { reactive } from "vue";
7
7
  const meta = {
8
- title: "Components/Forms/Textarea",
8
+ title: "Inputs/Textarea",
9
9
  component: AntTextarea,
10
10
  parameters: { controls: { sort: "requiredFirst" } },
11
11
  argTypes: {
12
- colorType: {
12
+ state: {
13
13
  control: { type: "select" },
14
- options: Object.values(InputColorType)
14
+ options: Object.values(InputState)
15
15
  },
16
16
  size: {
17
- control: { type: "radio" },
17
+ control: { type: "select" },
18
18
  options: Object.values(Size)
19
19
  },
20
20
  placeholder: {
@@ -32,24 +32,44 @@ const meta = {
32
32
  },
33
33
  showIcon: {
34
34
  control: "boolean",
35
- description: "Some InputColorTypes can has an icon. Control with this property if it get shown or not.",
35
+ description: "Some InputStates can has an icon. Control with this property if it get shown or not.",
36
36
  table: { type: { summary: "Type" } }
37
37
  }
38
38
  }
39
39
  };
40
40
  export default meta;
41
41
  export const Docs = {
42
+ render: (args) => ({
43
+ components: { AntTextarea },
44
+ setup: () => {
45
+ return { args };
46
+ },
47
+ template: `
48
+ <AntTextarea
49
+ v-bind="args"
50
+ v-model="args.modelValue"
51
+ />
52
+ `
53
+ }),
54
+ args: {
55
+ modelValue: null,
56
+ label: "Label",
57
+ description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
58
+ }
59
+ };
60
+ export const withValidator = {
42
61
  render: (args) => ({
43
62
  components: { AntTextarea },
44
63
  setup: () => {
45
64
  const validator = reactive(useFieldValidator([isRequiredRule, notBlankRule]));
46
- return { args, validator };
65
+ return { args, validator, InputState };
47
66
  },
48
67
  template: `
49
68
  <AntTextarea
50
69
  v-bind="args"
51
70
  v-model="args.modelValue"
52
- :errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
71
+ :state="args.state ? args.state : (validator.hasErrors() ? InputState.danger : undefined)"
72
+ :messages="Array.isArray(args.messages) ? args.messages : validator.getErrors()"
53
73
  @validate="val => validator.validate(val)"
54
74
  />
55
75
  `
@@ -67,13 +87,14 @@ export const limited = {
67
87
  const validator = reactive(useFieldValidator(
68
88
  (val) => val?.length <= 10 || "Max. 10 characters allowed"
69
89
  ));
70
- return { args, validator };
90
+ return { args, validator, InputState };
71
91
  },
72
92
  template: `
73
93
  <AntTextarea
74
94
  v-bind="args"
75
95
  v-model="args.modelValue"
76
- :errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
96
+ :state="args.state ? args.state : (validator.hasErrors() ? InputState.danger : undefined)"
97
+ :messages="Array.isArray(args.messages) ? args.messages : validator.getErrors()"
77
98
  @validate="(val) => validator.validate(val)"
78
99
  />
79
100
  `
@@ -97,33 +118,25 @@ export const summary = {
97
118
  template: `
98
119
  <div class="pb-10 flex flex-col gap-2">
99
120
  <div class="flex gap-2">
100
- <AntTextarea v-bind="args" v-model:value="modelValue" color-type="base"/>
101
- <AntTextarea v-bind="args" v-model:value="modelValue" color-type="info"/>
102
- <AntTextarea v-bind="args" v-model:value="modelValue" color-type="success"/>
103
- <AntTextarea v-bind="args" v-model:value="modelValue" color-type="warning"/>
104
- <AntTextarea v-bind="args" v-model:value="modelValue" color-type="danger"/>
105
- </div>
106
-
107
- <div class="flex gap-2">
108
- <AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="base"/>
109
- <AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="info"/>
110
- <AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="success"/>
111
- <AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="warning"/>
112
- <AntTextarea v-bind="args" v-model:value="modelValue" :show-icon="false" color-type="danger"/>
121
+ <AntTextarea v-bind="args" v-model="modelValue" state="base"/>
122
+ <AntTextarea v-bind="args" v-model="modelValue" state="info"/>
123
+ <AntTextarea v-bind="args" v-model="modelValue" state="success"/>
124
+ <AntTextarea v-bind="args" v-model="modelValue" state="warning"/>
125
+ <AntTextarea v-bind="args" v-model="modelValue" state="danger"/>
113
126
  </div>
114
127
 
115
128
  <div class="flex gap-2">
116
- <AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="base"/>
117
- <AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="info"/>
118
- <AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="success"/>
119
- <AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="warning"/>
120
- <AntTextarea v-bind="args" v-model:value="modelValue" :icon-left="faSearch" color-type="danger"/>
129
+ <AntTextarea v-bind="args" v-model="modelValue" :show-icon="false" state="base"/>
130
+ <AntTextarea v-bind="args" v-model="modelValue" :show-icon="false" state="info"/>
131
+ <AntTextarea v-bind="args" v-model="modelValue" :show-icon="false" state="success"/>
132
+ <AntTextarea v-bind="args" v-model="modelValue" :show-icon="false" state="warning"/>
133
+ <AntTextarea v-bind="args" v-model="modelValue" :show-icon="false" state="danger"/>
121
134
  </div>
122
135
 
123
136
  <div class="flex gap-[-2px]">
124
- <AntTextarea v-bind="args" v-model:value="modelValue" grouped="left"/>
125
- <AntTextarea v-bind="args" v-model:value="modelValue" grouped="center" color-type="danger"/>
126
- <AntTextarea v-bind="args" v-model:value="modelValue" grouped="right" color-type="info"/>
137
+ <AntTextarea v-bind="args" v-model="modelValue" grouped="left"/>
138
+ <AntTextarea v-bind="args" v-model="modelValue" grouped="center" state="danger"/>
139
+ <AntTextarea v-bind="args" v-model="modelValue" grouped="right" state="info"/>
127
140
  </div>
128
141
  </div>`
129
142
  }),
@@ -4,5 +4,6 @@ declare const meta: Meta<typeof AntUnitInput>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof AntUnitInput>;
6
6
  export declare const Docs: Story;
7
+ export declare const withValidator: Story;
7
8
  export declare const Limited: Story;
8
9
  export declare const UnitAsIcon: Story;
@@ -1,11 +1,11 @@
1
1
  import { Size } from "../../../enums/Size.enum.mjs";
2
2
  import AntUnitInput from "../AntUnitInput.vue";
3
3
  import { faEuroSign } from "@fortawesome/free-solid-svg-icons";
4
- import { InputColorType } from "../../../enums/index.mjs";
4
+ import { InputState } from "../../../enums/index.mjs";
5
5
  import { isRequiredRule, useFieldValidator } from "@antify/validate";
6
6
  import { reactive } from "vue";
7
7
  const meta = {
8
- title: "Components/Forms/Unit Input",
8
+ title: "Inputs/Unit Input",
9
9
  component: AntUnitInput,
10
10
  parameters: { controls: { sort: "requiredFirst" } },
11
11
  argTypes: {
@@ -17,12 +17,12 @@ const meta = {
17
17
  description: "Will be displayed right to the input.<br>Use text or Font-awesome Icons.",
18
18
  table: { type: { summary: "string|IconDefinition" } }
19
19
  },
20
- colorType: {
20
+ state: {
21
21
  control: { type: "select" },
22
- options: Object.values(InputColorType)
22
+ options: Object.values(InputState)
23
23
  },
24
24
  size: {
25
- control: { type: "radio" },
25
+ control: { type: "select" },
26
26
  options: Object.values(Size)
27
27
  },
28
28
  placeholder: {
@@ -40,18 +40,36 @@ export const Docs = {
40
40
  render: (args) => ({
41
41
  components: { AntUnitInput },
42
42
  setup() {
43
- const validator = reactive(useFieldValidator([
44
- isRequiredRule,
45
- (val) => typeof val !== "number" || val <= 8 || "Value should not be bigger than 8"
46
- ]));
47
- return { args, validator };
43
+ return { args };
48
44
  },
49
45
  template: `
50
46
  <AntUnitInput
51
47
  v-bind="args"
52
48
  v-model="args.modelValue"
53
49
  :unit="args.unit"
54
- :errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
50
+ />`
51
+ }),
52
+ args: {
53
+ modelValue: null,
54
+ unit: "\u20AC",
55
+ label: "Label",
56
+ description: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod"
57
+ }
58
+ };
59
+ export const withValidator = {
60
+ render: (args) => ({
61
+ components: { AntUnitInput },
62
+ setup() {
63
+ const validator = reactive(useFieldValidator([isRequiredRule]));
64
+ return { args, validator, InputState };
65
+ },
66
+ template: `
67
+ <AntUnitInput
68
+ v-bind="args"
69
+ v-model="args.modelValue"
70
+ :unit="args.unit"
71
+ :state="args.state ? args.state : (validator.hasErrors() ? InputState.danger : undefined)"
72
+ :messages="Array.isArray(args.messages) ? args.messages : validator.getErrors()"
55
73
  @validate="(val) => validator.validate(val)"
56
74
  />`
57
75
  }),
@@ -63,16 +81,30 @@ export const Docs = {
63
81
  }
64
82
  };
65
83
  export const Limited = {
66
- render: Docs.render,
84
+ render: (args) => ({
85
+ components: { AntUnitInput },
86
+ setup() {
87
+ const validator = reactive(useFieldValidator([
88
+ isRequiredRule,
89
+ (val) => val <= 10 || "Value should not be bigger than 10",
90
+ (val) => val <= 11 || "It should be really not bigger than 10!!!!"
91
+ ]));
92
+ return { args, validator };
93
+ },
94
+ template: `
95
+ <AntUnitInput
96
+ v-bind="args"
97
+ v-model="args.modelValue"
98
+ :unit="args.unit"
99
+ :errors="Array.isArray(args.errors) ? args.errors : validator.getErrors()"
100
+ @validate="(val) => validator.validate(val)"
101
+ />`
102
+ }),
67
103
  args: {
68
104
  ...Docs.args,
69
105
  modelValue: 50,
70
106
  limiter: true,
71
- max: 10,
72
- validator: useFieldValidator([
73
- (val) => val <= 10 || "Value should not be bigger than 10",
74
- (val) => val <= 11 || "It should be really not bigger than 10!!!!"
75
- ])
107
+ max: 10
76
108
  }
77
109
  };
78
110
  export const UnitAsIcon = {
@@ -4,3 +4,7 @@ export type AntCheckboxType = {
4
4
  disabled?: boolean;
5
5
  readonly?: boolean;
6
6
  };
7
+ export declare enum AntCheckboxSize {
8
+ md = "md",
9
+ sm = "sm"
10
+ }
@@ -0,0 +1,5 @@
1
+ export var AntCheckboxSize = /* @__PURE__ */ ((AntCheckboxSize2) => {
2
+ AntCheckboxSize2["md"] = "md";
3
+ AntCheckboxSize2["sm"] = "sm";
4
+ return AntCheckboxSize2;
5
+ })(AntCheckboxSize || {});
@@ -0,0 +1,7 @@
1
+ export declare enum AntDateInputTypes {
2
+ date = "date",
3
+ datetimeLocal = "datetime-local",
4
+ month = "month",
5
+ time = "time",
6
+ week = "week"
7
+ }
@@ -0,0 +1,8 @@
1
+ export var AntDateInputTypes = /* @__PURE__ */ ((AntDateInputTypes2) => {
2
+ AntDateInputTypes2["date"] = "date";
3
+ AntDateInputTypes2["datetimeLocal"] = "datetime-local";
4
+ AntDateInputTypes2["month"] = "month";
5
+ AntDateInputTypes2["time"] = "time";
6
+ AntDateInputTypes2["week"] = "week";
7
+ return AntDateInputTypes2;
8
+ })(AntDateInputTypes || {});
@@ -0,0 +1,13 @@
1
+ import { InputState } from '../../../enums';
2
+ export declare enum AntRadioSize {
3
+ md = "md",
4
+ sm = "sm"
5
+ }
6
+ export type AntRadioTypes = {
7
+ value: string;
8
+ label?: string;
9
+ disabled?: boolean;
10
+ readonly?: boolean;
11
+ state?: InputState;
12
+ [key: string]: unknown;
13
+ };
@@ -0,0 +1,5 @@
1
+ export var AntRadioSize = /* @__PURE__ */ ((AntRadioSize2) => {
2
+ AntRadioSize2["md"] = "md";
3
+ AntRadioSize2["sm"] = "sm";
4
+ return AntRadioSize2;
5
+ })(AntRadioSize || {});
@@ -0,0 +1,4 @@
1
+ export declare enum AntSwitchSize {
2
+ md = "md",
3
+ sm = "sm"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var AntSwitchSize = /* @__PURE__ */ ((AntSwitchSize2) => {
2
+ AntSwitchSize2["md"] = "md";
3
+ AntSwitchSize2["sm"] = "sm";
4
+ return AntSwitchSize2;
5
+ })(AntSwitchSize || {});
@@ -0,0 +1,5 @@
1
+ export declare enum AntTagInputSize {
2
+ lg = "lg",
3
+ md = "md",
4
+ sm = "sm"
5
+ }
@@ -0,0 +1,6 @@
1
+ export var AntTagInputSize = /* @__PURE__ */ ((AntTagInputSize2) => {
2
+ AntTagInputSize2["lg"] = "lg";
3
+ AntTagInputSize2["md"] = "md";
4
+ AntTagInputSize2["sm"] = "sm";
5
+ return AntTagInputSize2;
6
+ })(AntTagInputSize || {});
@@ -1,6 +1,5 @@
1
1
  export declare enum TextInputType {
2
2
  email = "email",
3
- password = "password",
4
3
  tel = "tel",
5
4
  text = "text",
6
5
  url = "url"
@@ -1,6 +1,5 @@
1
1
  export var TextInputType = /* @__PURE__ */ ((TextInputType2) => {
2
2
  TextInputType2["email"] = "email";
3
- TextInputType2["password"] = "password";
4
3
  TextInputType2["tel"] = "tel";
5
4
  TextInputType2["text"] = "text";
6
5
  TextInputType2["url"] = "url";
@@ -0,0 +1,8 @@
1
+ export * from './AntCheckbox.types';
2
+ export * from './AntDateInput.types';
3
+ export * from './AntRadio.types';
4
+ export * from './AntSelect.types';
5
+ export * from './AntSwitch.types';
6
+ export * from './AntSwitcher.types';
7
+ export * from './AntTagInput.types';
8
+ export * from './AntTextInput.types';
@@ -0,0 +1,8 @@
1
+ export * from "./AntCheckbox.types.mjs";
2
+ export * from "./AntDateInput.types.mjs";
3
+ export * from "./AntRadio.types.mjs";
4
+ export * from "./AntSelect.types.mjs";
5
+ export * from "./AntSwitch.types.mjs";
6
+ export * from "./AntSwitcher.types.mjs";
7
+ export * from "./AntTagInput.types.mjs";
8
+ export * from "./AntTextInput.types.mjs";
@@ -2,18 +2,18 @@
2
2
  import {computed, useSlots} from 'vue';
3
3
  import AntNavbar from '../navbar/AntNavbar.vue';
4
4
  import type {RouteLocationRaw} from 'vue-router';
5
- import type {NavbarItem} from '../navbar/__types/NavbarItem';
5
+ import type {NavbarItemTypes} from '../navbar/__types/NavbarItem.types';
6
6
 
7
7
  defineProps<{
8
- navbarItems: NavbarItem[];
8
+ navbarItems: NavbarItemTypes[];
9
9
  logoRoute?: RouteLocationRaw;
10
- }>()
10
+ }>();
11
11
 
12
12
  const hasLogoImageSlot = computed(() => useSlots()['logo-image'] || false);
13
13
  </script>
14
14
 
15
15
  <template>
16
- <div class="flex gap-px bg-neutral-300 h-screen overflow-hidden">
16
+ <div class="flex gap-px bg-neutral-300 h-screen min-w-full overflow-y-hidden">
17
17
  <div class="flex flex-col gap-px bg-neutral-300 w-52 shrink-0">
18
18
  <component
19
19
  :is="logoRoute ? 'RouterLink' : 'div'"
@@ -29,7 +29,7 @@ const hasLogoImageSlot = computed(() => useSlots()['logo-image'] || false);
29
29
  />
30
30
  </div>
31
31
 
32
- <div class="flex-grow">
32
+ <div class="w-px flex-grow">
33
33
  <slot />
34
34
  </div>
35
35
  </div>
@@ -25,7 +25,7 @@ export const Docs = {
25
25
  <img src="/logo.svg" class="h-full w-full"/>
26
26
  </template>
27
27
 
28
- <div class="slot m-2.5">SLOT</div>
28
+ <div class="slot m-2.5 h-full !text-white !border-white">SLOT</div>
29
29
  </AntNavLeftLayout>
30
30
  `
31
31
  }),