@antify/ui-module 1.7.3 → 1.8.2

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 (364) hide show
  1. package/README.md +43 -52
  2. package/dist/module.d.mts +1 -251
  3. package/dist/module.d.ts +1 -251
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +97 -418
  6. package/dist/runtime/composables/useUiClient.d.ts +2 -2
  7. package/dist/runtime/composables/useUiClient.mjs +1 -2
  8. package/dist/runtime/plugins/ui-module.mjs +3 -2
  9. package/dist/runtime/tailwind.config.d.ts +2 -3
  10. package/dist/runtime/tailwind.config.mjs +20 -204
  11. package/dist/types.d.mts +1 -1
  12. package/dist/types.d.ts +1 -1
  13. package/package.json +10 -41
  14. package/dist/runtime/components/AntAccordion.vue +0 -64
  15. package/dist/runtime/components/AntAccordionItem.vue +0 -81
  16. package/dist/runtime/components/AntAlert.vue +0 -146
  17. package/dist/runtime/components/AntCard.vue +0 -34
  18. package/dist/runtime/components/AntContent.vue +0 -16
  19. package/dist/runtime/components/AntDropdown.vue +0 -79
  20. package/dist/runtime/components/AntIcon.vue +0 -56
  21. package/dist/runtime/components/AntKeycap.vue +0 -45
  22. package/dist/runtime/components/AntListGroup.vue +0 -24
  23. package/dist/runtime/components/AntListGroupItem.vue +0 -83
  24. package/dist/runtime/components/AntModal.vue +0 -88
  25. package/dist/runtime/components/AntPagination.vue +0 -206
  26. package/dist/runtime/components/AntPopover.vue +0 -114
  27. package/dist/runtime/components/AntSkeleton.vue +0 -38
  28. package/dist/runtime/components/AntSpinner.vue +0 -101
  29. package/dist/runtime/components/AntTag.vue +0 -114
  30. package/dist/runtime/components/AntToast.vue +0 -119
  31. package/dist/runtime/components/AntToaster.vue +0 -51
  32. package/dist/runtime/components/AntTooltip.vue +0 -189
  33. package/dist/runtime/components/Main.mdx +0 -11
  34. package/dist/runtime/components/Main.stories.d.ts +0 -7
  35. package/dist/runtime/components/Main.stories.mjs +0 -8
  36. package/dist/runtime/components/__stories/AntAccordion.stories.d.ts +0 -9
  37. package/dist/runtime/components/__stories/AntAccordion.stories.mjs +0 -101
  38. package/dist/runtime/components/__stories/AntAlert.stories.d.ts +0 -11
  39. package/dist/runtime/components/__stories/AntAlert.stories.mjs +0 -81
  40. package/dist/runtime/components/__stories/AntCard.stories.d.ts +0 -7
  41. package/dist/runtime/components/__stories/AntCard.stories.mjs +0 -87
  42. package/dist/runtime/components/__stories/AntContent.stories.d.ts +0 -6
  43. package/dist/runtime/components/__stories/AntContent.stories.mjs +0 -26
  44. package/dist/runtime/components/__stories/AntDropdown.stories.d.ts +0 -6
  45. package/dist/runtime/components/__stories/AntDropdown.stories.mjs +0 -52
  46. package/dist/runtime/components/__stories/AntIcon.stories.d.ts +0 -8
  47. package/dist/runtime/components/__stories/AntIcon.stories.mjs +0 -93
  48. package/dist/runtime/components/__stories/AntKeycap.stories.d.ts +0 -9
  49. package/dist/runtime/components/__stories/AntKeycap.stories.mjs +0 -69
  50. package/dist/runtime/components/__stories/AntListGroup.stories.d.ts +0 -7
  51. package/dist/runtime/components/__stories/AntListGroup.stories.mjs +0 -36
  52. package/dist/runtime/components/__stories/AntListGroupItem.stories.d.ts +0 -10
  53. package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +0 -62
  54. package/dist/runtime/components/__stories/AntModal.stories.d.ts +0 -7
  55. package/dist/runtime/components/__stories/AntModal.stories.mjs +0 -78
  56. package/dist/runtime/components/__stories/AntPagination.stories.d.ts +0 -8
  57. package/dist/runtime/components/__stories/AntPagination.stories.mjs +0 -39
  58. package/dist/runtime/components/__stories/AntPopover.stories.d.ts +0 -6
  59. package/dist/runtime/components/__stories/AntPopover.stories.mjs +0 -47
  60. package/dist/runtime/components/__stories/AntSkeleton.stories.d.ts +0 -8
  61. package/dist/runtime/components/__stories/AntSkeleton.stories.mjs +0 -43
  62. package/dist/runtime/components/__stories/AntSpinner.stories.d.ts +0 -6
  63. package/dist/runtime/components/__stories/AntSpinner.stories.mjs +0 -34
  64. package/dist/runtime/components/__stories/AntTag.stories.d.ts +0 -7
  65. package/dist/runtime/components/__stories/AntTag.stories.mjs +0 -43
  66. package/dist/runtime/components/__stories/AntToast.stories.d.ts +0 -8
  67. package/dist/runtime/components/__stories/AntToast.stories.mjs +0 -66
  68. package/dist/runtime/components/__stories/AntToaster.stories.d.ts +0 -34
  69. package/dist/runtime/components/__stories/AntToaster.stories.mjs +0 -42
  70. package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +0 -16
  71. package/dist/runtime/components/__stories/AntTooltip.stories.mjs +0 -241
  72. package/dist/runtime/components/__types/AntAccordion.types.d.ts +0 -4
  73. package/dist/runtime/components/__types/AntAccordion.types.mjs +0 -5
  74. package/dist/runtime/components/__types/AntIcon.types.d.ts +0 -8
  75. package/dist/runtime/components/__types/AntIcon.types.mjs +0 -9
  76. package/dist/runtime/components/__types/AntKeycap.types.d.ts +0 -4
  77. package/dist/runtime/components/__types/AntKeycap.types.mjs +0 -5
  78. package/dist/runtime/components/__types/AntListGroupItem.types.d.ts +0 -9
  79. package/dist/runtime/components/__types/AntListGroupItem.types.mjs +0 -10
  80. package/dist/runtime/components/__types/AntSpinner.types.d.ts +0 -10
  81. package/dist/runtime/components/__types/AntSpinner.types.mjs +0 -11
  82. package/dist/runtime/components/__types/AntTag.types.d.ts +0 -17
  83. package/dist/runtime/components/__types/AntTag.types.mjs +0 -19
  84. package/dist/runtime/components/__types/AntToaster.types.d.ts +0 -8
  85. package/dist/runtime/components/__types/AntToaster.types.mjs +0 -0
  86. package/dist/runtime/components/__types/index.d.ts +0 -7
  87. package/dist/runtime/components/__types/index.mjs +0 -7
  88. package/dist/runtime/components/buttons/AntActionButton.vue +0 -74
  89. package/dist/runtime/components/buttons/AntButton.vue +0 -257
  90. package/dist/runtime/components/buttons/AntCreateButton.vue +0 -54
  91. package/dist/runtime/components/buttons/AntDeleteButton.vue +0 -54
  92. package/dist/runtime/components/buttons/AntDuplicateButton.vue +0 -54
  93. package/dist/runtime/components/buttons/AntEditButton.vue +0 -54
  94. package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +0 -56
  95. package/dist/runtime/components/buttons/AntSaveButton.vue +0 -55
  96. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.d.ts +0 -11
  97. package/dist/runtime/components/buttons/__stories/AntActionButton.stories.mjs +0 -86
  98. package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +0 -16
  99. package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +0 -313
  100. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +0 -12
  101. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +0 -76
  102. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +0 -12
  103. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +0 -76
  104. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.d.ts +0 -12
  105. package/dist/runtime/components/buttons/__stories/AntDuplicateButton.stories.mjs +0 -76
  106. package/dist/runtime/components/buttons/__stories/AntEditButton.stories.d.ts +0 -12
  107. package/dist/runtime/components/buttons/__stories/AntEditButton.stories.mjs +0 -76
  108. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +0 -12
  109. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +0 -76
  110. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +0 -12
  111. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +0 -76
  112. package/dist/runtime/components/buttons/__types/AntButton.types.d.ts +0 -4
  113. package/dist/runtime/components/buttons/__types/AntButton.types.mjs +0 -5
  114. package/dist/runtime/components/buttons/__types/index.d.ts +0 -1
  115. package/dist/runtime/components/buttons/__types/index.mjs +0 -1
  116. package/dist/runtime/components/crud/AntCrud.vue +0 -45
  117. package/dist/runtime/components/crud/AntCrudDetail.vue +0 -11
  118. package/dist/runtime/components/crud/AntCrudDetailActions.vue +0 -58
  119. package/dist/runtime/components/crud/AntCrudDetailNav.vue +0 -64
  120. package/dist/runtime/components/crud/AntCrudTableFilter.vue +0 -122
  121. package/dist/runtime/components/crud/AntCrudTableNav.vue +0 -149
  122. package/dist/runtime/components/crud/__stories/AntCrud.stories.d.ts +0 -6
  123. package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +0 -126
  124. package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.d.ts +0 -7
  125. package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.mjs +0 -80
  126. package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.d.ts +0 -6
  127. package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.mjs +0 -25
  128. package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.d.ts +0 -6
  129. package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.mjs +0 -41
  130. package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.d.ts +0 -6
  131. package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.mjs +0 -25
  132. package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.d.ts +0 -8
  133. package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.mjs +0 -56
  134. package/dist/runtime/components/dialogs/AntDeleteDialog.vue +0 -29
  135. package/dist/runtime/components/dialogs/AntDialog.vue +0 -147
  136. package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.d.ts +0 -6
  137. package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +0 -32
  138. package/dist/runtime/components/dialogs/__stories/AntDialog.stories.d.ts +0 -6
  139. package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +0 -60
  140. package/dist/runtime/components/forms/AntField.vue +0 -123
  141. package/dist/runtime/components/forms/AntFormGroup.vue +0 -36
  142. package/dist/runtime/components/forms/AntFormGroupLabel.vue +0 -5
  143. package/dist/runtime/components/forms/__stories/AntField.stories.d.ts +0 -6
  144. package/dist/runtime/components/forms/__stories/AntField.stories.mjs +0 -80
  145. package/dist/runtime/components/forms/__stories/AntFormGroup.stories.d.ts +0 -6
  146. package/dist/runtime/components/forms/__stories/AntFormGroup.stories.mjs +0 -33
  147. package/dist/runtime/components/forms/__stories/AntFormGroupLabel.stories.d.ts +0 -6
  148. package/dist/runtime/components/forms/__stories/AntFormGroupLabel.stories.mjs +0 -20
  149. package/dist/runtime/components/index.d.ts +0 -62
  150. package/dist/runtime/components/index.mjs +0 -124
  151. package/dist/runtime/components/inputs/AntCheckbox.vue +0 -182
  152. package/dist/runtime/components/inputs/AntCheckboxGroup.vue +0 -117
  153. package/dist/runtime/components/inputs/AntDateInput.vue +0 -104
  154. package/dist/runtime/components/inputs/AntNumberInput.vue +0 -157
  155. package/dist/runtime/components/inputs/AntPasswordInput.vue +0 -107
  156. package/dist/runtime/components/inputs/AntRadio.vue +0 -206
  157. package/dist/runtime/components/inputs/AntRadioGroup.vue +0 -127
  158. package/dist/runtime/components/inputs/AntRangeSlider.vue +0 -101
  159. package/dist/runtime/components/inputs/AntRichTextEditor.vue +0 -237
  160. package/dist/runtime/components/inputs/AntSearch.vue +0 -75
  161. package/dist/runtime/components/inputs/AntSelect.vue +0 -319
  162. package/dist/runtime/components/inputs/AntSwitch.vue +0 -192
  163. package/dist/runtime/components/inputs/AntSwitcher.vue +0 -196
  164. package/dist/runtime/components/inputs/AntTagInput.vue +0 -339
  165. package/dist/runtime/components/inputs/AntTextInput.vue +0 -75
  166. package/dist/runtime/components/inputs/AntTextarea.vue +0 -191
  167. package/dist/runtime/components/inputs/AntUnitInput.vue +0 -96
  168. package/dist/runtime/components/inputs/Elements/AntBaseInput.vue +0 -271
  169. package/dist/runtime/components/inputs/Elements/AntDropDown.vue +0 -189
  170. package/dist/runtime/components/inputs/Elements/AntInputDescription.vue +0 -58
  171. package/dist/runtime/components/inputs/Elements/AntInputLabel.vue +0 -62
  172. package/dist/runtime/components/inputs/Elements/AntInputLimiter.vue +0 -58
  173. package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.d.ts +0 -11
  174. package/dist/runtime/components/inputs/Elements/__stories/AntBaseInput.stories.mjs +0 -234
  175. package/dist/runtime/components/inputs/Elements/__stories/AntInputDescription.stories.d.ts +0 -6
  176. package/dist/runtime/components/inputs/Elements/__stories/AntInputDescription.stories.mjs +0 -34
  177. package/dist/runtime/components/inputs/Elements/__stories/AntInputLabel.stories.d.ts +0 -7
  178. package/dist/runtime/components/inputs/Elements/__stories/AntInputLabel.stories.mjs +0 -46
  179. package/dist/runtime/components/inputs/Elements/__stories/AntInputLimiter.stories.d.ts +0 -6
  180. package/dist/runtime/components/inputs/Elements/__stories/AntInputLimiter.stories.mjs +0 -37
  181. package/dist/runtime/components/inputs/Elements/__types/AntBaseInput.types.d.ts +0 -17
  182. package/dist/runtime/components/inputs/Elements/__types/AntBaseInput.types.mjs +0 -18
  183. package/dist/runtime/components/inputs/Elements/__types/index.d.ts +0 -1
  184. package/dist/runtime/components/inputs/Elements/__types/index.mjs +0 -1
  185. package/dist/runtime/components/inputs/Elements/index.d.ts +0 -6
  186. package/dist/runtime/components/inputs/Elements/index.mjs +0 -12
  187. package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.d.ts +0 -8
  188. package/dist/runtime/components/inputs/__stories/AntCheckbox.stories.mjs +0 -382
  189. package/dist/runtime/components/inputs/__stories/AntCheckboxGroup.stories.d.ts +0 -7
  190. package/dist/runtime/components/inputs/__stories/AntCheckboxGroup.stories.mjs +0 -84
  191. package/dist/runtime/components/inputs/__stories/AntDateInput.stories.d.ts +0 -8
  192. package/dist/runtime/components/inputs/__stories/AntDateInput.stories.mjs +0 -193
  193. package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.d.ts +0 -10
  194. package/dist/runtime/components/inputs/__stories/AntNumberInput.stories.mjs +0 -246
  195. package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.d.ts +0 -8
  196. package/dist/runtime/components/inputs/__stories/AntPasswordInput.stories.mjs +0 -156
  197. package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.d.ts +0 -8
  198. package/dist/runtime/components/inputs/__stories/AntRadioGroup.stories.mjs +0 -251
  199. package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.d.ts +0 -7
  200. package/dist/runtime/components/inputs/__stories/AntRangeSlider.stories.mjs +0 -67
  201. package/dist/runtime/components/inputs/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
  202. package/dist/runtime/components/inputs/__stories/AntRichTextEditor.stories-old.mjs +0 -0
  203. package/dist/runtime/components/inputs/__stories/AntSearch.stories.d.ts +0 -7
  204. package/dist/runtime/components/inputs/__stories/AntSearch.stories.mjs +0 -103
  205. package/dist/runtime/components/inputs/__stories/AntSelect.stories.d.ts +0 -13
  206. package/dist/runtime/components/inputs/__stories/AntSelect.stories.mjs +0 -255
  207. package/dist/runtime/components/inputs/__stories/AntSwitch.stories.d.ts +0 -8
  208. package/dist/runtime/components/inputs/__stories/AntSwitch.stories.mjs +0 -344
  209. package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.d.ts +0 -8
  210. package/dist/runtime/components/inputs/__stories/AntSwitcher.stories.mjs +0 -235
  211. package/dist/runtime/components/inputs/__stories/AntTagInput.stories.d.ts +0 -9
  212. package/dist/runtime/components/inputs/__stories/AntTagInput.stories.mjs +0 -228
  213. package/dist/runtime/components/inputs/__stories/AntTextInput.stories.d.ts +0 -9
  214. package/dist/runtime/components/inputs/__stories/AntTextInput.stories.mjs +0 -225
  215. package/dist/runtime/components/inputs/__stories/AntTextarea.stories.d.ts +0 -9
  216. package/dist/runtime/components/inputs/__stories/AntTextarea.stories.mjs +0 -144
  217. package/dist/runtime/components/inputs/__stories/AntUnitInput.stories.d.ts +0 -9
  218. package/dist/runtime/components/inputs/__stories/AntUnitInput.stories.mjs +0 -116
  219. package/dist/runtime/components/inputs/__types/AntCheckbox.types.d.ts +0 -6
  220. package/dist/runtime/components/inputs/__types/AntCheckbox.types.mjs +0 -0
  221. package/dist/runtime/components/inputs/__types/AntDateInput.types.d.ts +0 -7
  222. package/dist/runtime/components/inputs/__types/AntDateInput.types.mjs +0 -8
  223. package/dist/runtime/components/inputs/__types/AntRadio.types.d.ts +0 -9
  224. package/dist/runtime/components/inputs/__types/AntRadio.types.mjs +0 -0
  225. package/dist/runtime/components/inputs/__types/AntSelect.types.d.ts +0 -4
  226. package/dist/runtime/components/inputs/__types/AntSelect.types.mjs +0 -0
  227. package/dist/runtime/components/inputs/__types/AntSwitcher.types.d.ts +0 -4
  228. package/dist/runtime/components/inputs/__types/AntSwitcher.types.mjs +0 -0
  229. package/dist/runtime/components/inputs/__types/AntTagInput.types.d.ts +0 -5
  230. package/dist/runtime/components/inputs/__types/AntTagInput.types.mjs +0 -6
  231. package/dist/runtime/components/inputs/__types/AntTextInput.types.d.ts +0 -6
  232. package/dist/runtime/components/inputs/__types/AntTextInput.types.mjs +0 -7
  233. package/dist/runtime/components/inputs/__types/index.d.ts +0 -7
  234. package/dist/runtime/components/inputs/__types/index.mjs +0 -7
  235. package/dist/runtime/components/layouts/AntNavLeftLayout.vue +0 -36
  236. package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.d.ts +0 -7
  237. package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.mjs +0 -68
  238. package/dist/runtime/components/navbar/AntNavbar.vue +0 -25
  239. package/dist/runtime/components/navbar/AntNavbarItem.vue +0 -78
  240. package/dist/runtime/components/navbar/__stories/AntNavbar.stories.d.ts +0 -6
  241. package/dist/runtime/components/navbar/__stories/AntNavbar.stories.mjs +0 -66
  242. package/dist/runtime/components/navbar/__types/NavbarItem.types.d.ts +0 -10
  243. package/dist/runtime/components/navbar/__types/NavbarItem.types.mjs +0 -0
  244. package/dist/runtime/components/navbar/__types/index.d.ts +0 -1
  245. package/dist/runtime/components/navbar/__types/index.mjs +0 -1
  246. package/dist/runtime/components/table/AntTable.vue +0 -218
  247. package/dist/runtime/components/table/AntTableSortButton.vue +0 -48
  248. package/dist/runtime/components/table/AntTd.vue +0 -81
  249. package/dist/runtime/components/table/AntTh.vue +0 -78
  250. package/dist/runtime/components/table/__stories/AntTable.stories.d.ts +0 -9
  251. package/dist/runtime/components/table/__stories/AntTable.stories.mjs +0 -273
  252. package/dist/runtime/components/table/__types/TableHeader.types.d.ts +0 -36
  253. package/dist/runtime/components/table/__types/TableHeader.types.mjs +0 -25
  254. package/dist/runtime/components/table/__types/index.d.ts +0 -1
  255. package/dist/runtime/components/table/__types/index.mjs +0 -1
  256. package/dist/runtime/components/tabs/AntTabItem.vue +0 -118
  257. package/dist/runtime/components/tabs/AntTabs.vue +0 -47
  258. package/dist/runtime/components/tabs/__stories/AntTabItem.stories.d.ts +0 -6
  259. package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +0 -32
  260. package/dist/runtime/components/tabs/__stories/AntTabs.stories.d.ts +0 -9
  261. package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +0 -173
  262. package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +0 -17
  263. package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +0 -6
  264. package/dist/runtime/components/tabs/__types/index.d.ts +0 -1
  265. package/dist/runtime/components/tabs/__types/index.mjs +0 -1
  266. package/dist/runtime/components/transitions/AntTransitionCollapseHeight.vue +0 -92
  267. package/dist/runtime/composables/useUi.d.ts +0 -20
  268. package/dist/runtime/composables/useUi.mjs +0 -31
  269. package/dist/runtime/composables/useValidator.d.ts +0 -1
  270. package/dist/runtime/composables/useValidator.mjs +0 -1
  271. package/dist/runtime/enums/Direction.enum.d.ts +0 -4
  272. package/dist/runtime/enums/Direction.enum.mjs +0 -5
  273. package/dist/runtime/enums/Grouped.enum.d.ts +0 -6
  274. package/dist/runtime/enums/Grouped.enum.mjs +0 -7
  275. package/dist/runtime/enums/Position.enum.d.ts +0 -12
  276. package/dist/runtime/enums/Position.enum.mjs +0 -14
  277. package/dist/runtime/enums/Size.enum.d.ts +0 -7
  278. package/dist/runtime/enums/Size.enum.mjs +0 -8
  279. package/dist/runtime/enums/State.enum.d.ts +0 -16
  280. package/dist/runtime/enums/State.enum.mjs +0 -18
  281. package/dist/runtime/enums/index.d.ts +0 -5
  282. package/dist/runtime/enums/index.mjs +0 -5
  283. package/dist/runtime/env.d.ts +0 -8
  284. package/dist/runtime/handler.d.ts +0 -1
  285. package/dist/runtime/handler.mjs +0 -5
  286. package/dist/runtime/plugins/toaster.d.ts +0 -22
  287. package/dist/runtime/plugins/toaster.mjs +0 -53
  288. package/dist/runtime/shims/vue.d.ts +0 -5
  289. package/dist/runtime/types.d.ts +0 -8
  290. package/dist/runtime/types.mjs +0 -8
  291. package/dist/runtime/utils/helper.d.ts +0 -4
  292. package/dist/runtime/utils/helper.mjs +0 -12
  293. package/dist/runtime/utils.d.ts +0 -20
  294. package/dist/runtime/utils.mjs +0 -41
  295. package/src/runtime/components/AntAccordion.vue +0 -64
  296. package/src/runtime/components/AntAccordionItem.vue +0 -119
  297. package/src/runtime/components/AntAlert.vue +0 -146
  298. package/src/runtime/components/AntCard.vue +0 -34
  299. package/src/runtime/components/AntContent.vue +0 -16
  300. package/src/runtime/components/AntDropdown.vue +0 -100
  301. package/src/runtime/components/AntIcon.vue +0 -56
  302. package/src/runtime/components/AntKeycap.vue +0 -45
  303. package/src/runtime/components/AntListGroup.vue +0 -24
  304. package/src/runtime/components/AntListGroupItem.vue +0 -83
  305. package/src/runtime/components/AntModal.vue +0 -130
  306. package/src/runtime/components/AntPagination.vue +0 -206
  307. package/src/runtime/components/AntPopover.vue +0 -135
  308. package/src/runtime/components/AntSkeleton.vue +0 -38
  309. package/src/runtime/components/AntSpinner.vue +0 -101
  310. package/src/runtime/components/AntTag.vue +0 -114
  311. package/src/runtime/components/AntToast.vue +0 -119
  312. package/src/runtime/components/AntToaster.vue +0 -70
  313. package/src/runtime/components/AntTooltip.vue +0 -189
  314. package/src/runtime/components/buttons/AntActionButton.vue +0 -74
  315. package/src/runtime/components/buttons/AntButton.vue +0 -257
  316. package/src/runtime/components/buttons/AntCreateButton.vue +0 -54
  317. package/src/runtime/components/buttons/AntDeleteButton.vue +0 -54
  318. package/src/runtime/components/buttons/AntDuplicateButton.vue +0 -54
  319. package/src/runtime/components/buttons/AntEditButton.vue +0 -54
  320. package/src/runtime/components/buttons/AntSaveAndNewButton.vue +0 -56
  321. package/src/runtime/components/buttons/AntSaveButton.vue +0 -55
  322. package/src/runtime/components/crud/AntCrud.vue +0 -69
  323. package/src/runtime/components/crud/AntCrudDetail.vue +0 -11
  324. package/src/runtime/components/crud/AntCrudDetailActions.vue +0 -58
  325. package/src/runtime/components/crud/AntCrudDetailNav.vue +0 -64
  326. package/src/runtime/components/crud/AntCrudTableFilter.vue +0 -122
  327. package/src/runtime/components/crud/AntCrudTableNav.vue +0 -149
  328. package/src/runtime/components/dialogs/AntDeleteDialog.vue +0 -29
  329. package/src/runtime/components/dialogs/AntDialog.vue +0 -181
  330. package/src/runtime/components/forms/AntField.vue +0 -123
  331. package/src/runtime/components/forms/AntFormGroup.vue +0 -36
  332. package/src/runtime/components/forms/AntFormGroupLabel.vue +0 -5
  333. package/src/runtime/components/inputs/AntCheckbox.vue +0 -201
  334. package/src/runtime/components/inputs/AntCheckboxGroup.vue +0 -117
  335. package/src/runtime/components/inputs/AntDateInput.vue +0 -104
  336. package/src/runtime/components/inputs/AntNumberInput.vue +0 -157
  337. package/src/runtime/components/inputs/AntPasswordInput.vue +0 -107
  338. package/src/runtime/components/inputs/AntRadio.vue +0 -214
  339. package/src/runtime/components/inputs/AntRadioGroup.vue +0 -127
  340. package/src/runtime/components/inputs/AntRangeSlider.vue +0 -121
  341. package/src/runtime/components/inputs/AntRichTextEditor.vue +0 -237
  342. package/src/runtime/components/inputs/AntSearch.vue +0 -75
  343. package/src/runtime/components/inputs/AntSelect.vue +0 -319
  344. package/src/runtime/components/inputs/AntSwitch.vue +0 -192
  345. package/src/runtime/components/inputs/AntSwitcher.vue +0 -196
  346. package/src/runtime/components/inputs/AntTagInput.vue +0 -339
  347. package/src/runtime/components/inputs/AntTextInput.vue +0 -75
  348. package/src/runtime/components/inputs/AntTextarea.vue +0 -191
  349. package/src/runtime/components/inputs/AntUnitInput.vue +0 -96
  350. package/src/runtime/components/inputs/Elements/AntBaseInput.vue +0 -319
  351. package/src/runtime/components/inputs/Elements/AntDropDown.vue +0 -189
  352. package/src/runtime/components/inputs/Elements/AntInputDescription.vue +0 -58
  353. package/src/runtime/components/inputs/Elements/AntInputLabel.vue +0 -62
  354. package/src/runtime/components/inputs/Elements/AntInputLimiter.vue +0 -58
  355. package/src/runtime/components/layouts/AntNavLeftLayout.vue +0 -36
  356. package/src/runtime/components/navbar/AntNavbar.vue +0 -25
  357. package/src/runtime/components/navbar/AntNavbarItem.vue +0 -78
  358. package/src/runtime/components/table/AntTable.vue +0 -218
  359. package/src/runtime/components/table/AntTableSortButton.vue +0 -48
  360. package/src/runtime/components/table/AntTd.vue +0 -81
  361. package/src/runtime/components/table/AntTh.vue +0 -78
  362. package/src/runtime/components/tabs/AntTabItem.vue +0 -118
  363. package/src/runtime/components/tabs/AntTabs.vue +0 -47
  364. package/src/runtime/components/transitions/AntTransitionCollapseHeight.vue +0 -96
@@ -1,319 +0,0 @@
1
- <script lang="ts" setup>
2
- import {computed, onMounted, watch, useSlots} from 'vue';
3
- import {Size} from '../../../enums/Size.enum';
4
- import AntSkeleton from '../../AntSkeleton.vue';
5
- import AntIcon from '../../AntIcon.vue';
6
- import {BaseInputType} from './__types/AntBaseInput.types';
7
- import {Grouped} from '../../../enums/Grouped.enum';
8
- import {
9
- faCircleCheck,
10
- faCircleInfo,
11
- faExclamationCircle,
12
- faExclamationTriangle,
13
- faXmark,
14
- type IconDefinition
15
- } from '@fortawesome/free-solid-svg-icons';
16
- import {handleEnumValidation} from '../../../handler';
17
- import {classesToObjectSyntax, hasSlotContent} from '../../../utils';
18
- import {InputState} from '../../../enums';
19
- import {IconSize} from '../../__types';
20
-
21
- defineOptions({inheritAttrs: false});
22
-
23
- const emit = defineEmits(['update:modelValue', 'blur', 'validate', 'update:inputRef']);
24
- const props = withDefaults(defineProps<{
25
- modelValue: string | number | null;
26
- size?: Size;
27
- state?: InputState;
28
- disabled?: boolean;
29
- readonly?: boolean;
30
- placeholder?: string;
31
- skeleton?: boolean;
32
- type?: BaseInputType;
33
- grouped?: Grouped;
34
- wrapperClass?: string | Record<string, boolean>;
35
- showIcon?: boolean;
36
- iconLeft?: IconDefinition;
37
- nullable?: boolean;
38
- inputRef?: null | HTMLInputElement;
39
- }>(), {
40
- state: InputState.base,
41
- disabled: false,
42
- readonly: false,
43
- size: Size.md,
44
- skeleton: false,
45
- type: BaseInputType.text,
46
- grouped: Grouped.none,
47
- showIcon: true,
48
- default: false,
49
- nullable: false,
50
- inputRef: null
51
- });
52
- const slot = useSlots();
53
- const hasInputState = computed(() => props.skeleton || props.readonly || props.disabled);
54
- const icons = {
55
- [InputState.info]: faCircleInfo,
56
- [InputState.warning]: faExclamationTriangle,
57
- [InputState.danger]: faExclamationCircle,
58
- [InputState.success]: faCircleCheck,
59
- [InputState.base]: null,
60
- };
61
- const inputClasses = computed(() => {
62
- const variants: Record<InputState, string> = {
63
- [InputState.base]: 'outline-neutral-300 focus:ring-primary-200 bg-white placeholder:text-neutral-500',
64
- [InputState.danger]: 'outline-danger-500 focus:ring-danger-200 bg-danger-100 placeholder:text-danger-700',
65
- [InputState.info]: 'outline-info-500 focus:ring-info-200 bg-info-100 placeholder:text-info-700',
66
- [InputState.success]: 'outline-success-500 focus:ring-success-200 bg-success-100 placeholder:text-success-700',
67
- [InputState.warning]: 'outline-warning-500 focus:ring-warning-200 bg-warning-100 placeholder:text-warning-700',
68
- };
69
-
70
- return {
71
- 'block transition-colors relative border-none outline w-full focus:z-10 text-black': true,
72
- 'outline-offset-[-1px] outline-1 focus:outline-offset-[-1px] focus:outline-1': true,
73
- 'disabled:opacity-50 disabled:cursor-not-allowed': props.disabled,
74
- 'text-right': props.type === BaseInputType.number,
75
- [variants[props.state]]: true,
76
- // Size
77
- 'p-1 text-xs': props.size === Size.xs2,
78
- 'p-1.5 text-xs': props.size === Size.xs,
79
- 'p-1.5 text-sm': props.size === Size.sm,
80
- 'p-2 text-sm': props.size === Size.md,
81
- 'p-2.5 text-sm': props.size === Size.lg,
82
- 'focus:ring-2': !hasInputState.value && (props.size === Size.sm || props.size === Size.xs || props.size === Size.xs2),
83
- 'focus:ring-4': !hasInputState.value && (props.size === Size.lg || props.size === Size.md),
84
-
85
- // Icon left
86
- 'pl-6': props.size === Size.xs2 && props.iconLeft,
87
- 'pl-7': props.size === Size.sm && props.iconLeft || props.size === Size.xs && props.iconLeft,
88
- 'pl-8': props.size === Size.md && props.iconLeft,
89
- 'pl-9': props.size === Size.lg && props.iconLeft,
90
- // Icon right
91
- 'pr-6': props.size === Size.xs2 && props.showIcon && icon.value ||
92
- props.size === Size.xs2 && props.nullable ||
93
- props.size === Size.xs2 && hasSlotContent(slot['icon-right']),
94
- 'pr-7': props.size === Size.xs && props.showIcon && icon.value ||
95
- props.size === Size.xs && props.nullable ||
96
- props.size === Size.xs && hasSlotContent(slot['icon-right']),
97
- 'pr-8': props.size === Size.sm && props.showIcon && icon.value ||
98
- props.size === Size.sm && props.nullable ||
99
- props.size === Size.sm && hasSlotContent(slot['icon-right']),
100
- 'pr-9': props.size === Size.md && props.showIcon && icon.value ||
101
- props.size === Size.md && props.nullable ||
102
- props.size === Size.md && hasSlotContent(slot['icon-right']),
103
- 'pr-10': props.size === Size.lg && props.showIcon && icon.value ||
104
- props.size === Size.lg && props.nullable ||
105
- props.size === Size.lg && hasSlotContent(slot['icon-right']),
106
- // Grouped
107
- 'rounded-tl-md rounded-bl-md rounded-tr-none rounded-br-none': props.grouped === Grouped.left,
108
- 'rounded-none': props.grouped === Grouped.center,
109
- 'rounded-tl-none rounded-bl-none rounded-tr-md rounded-br-md': props.grouped === Grouped.right,
110
- 'rounded-md': props.grouped === Grouped.none,
111
- 'invisible': props.skeleton,
112
- };
113
- });
114
- const iconClasses = computed(() => ({
115
- 'transition-[height]': true,
116
- 'opacity-50': props.disabled
117
- }));
118
- const iconColorClass = computed(() => {
119
- const variants: Record<InputState, string> = {
120
- [InputState.base]: 'text-for-white-bg-font',
121
- [InputState.danger]: 'text-danger-700',
122
- [InputState.info]: 'text-info-700',
123
- [InputState.success]: 'text-success-700',
124
- [InputState.warning]: 'text-warning-700',
125
- };
126
-
127
- return variants[props.state];
128
- });
129
- const _wrapperClass = computed(() => ({
130
- '-mr-px': props.grouped !== Grouped.none,
131
- 'cursor-not-allowed': props.disabled,
132
- ...classesToObjectSyntax(props.wrapperClass)
133
- }));
134
- const icon = computed(() => icons[props.state]);
135
- const _modelValue = computed<string | number | null>({
136
- get: () => props.modelValue,
137
- set: (val: string | number | null) => {
138
- if (props.type === BaseInputType.number && typeof val !== 'number') {
139
- return emit('update:modelValue', null);
140
- }
141
-
142
- emit('update:modelValue', val);
143
- },
144
- });
145
- const inputIconSize = computed(() => {
146
- if (props.size === Size.xs || props.size === Size.xs2) {
147
- return IconSize.xs;
148
- }
149
-
150
- return IconSize.sm;
151
- });
152
- const _inputRef = computed({
153
- get() {
154
- return props.inputRef;
155
- },
156
- set(val) {
157
- emit('update:inputRef', val);
158
- }
159
- });
160
-
161
- watch(_modelValue, (val) => {
162
- if ([InputState.danger, InputState.warning, InputState.info].includes(props.state)) {
163
- emit('validate', val);
164
- }
165
- }, {deep: true});
166
- watch(() => props.skeleton, (val) => {
167
- if (!val && props.modelValue !== null) {
168
- emit('validate', props.modelValue);
169
- }
170
- });
171
-
172
- onMounted(() => {
173
- handleEnumValidation(props.size, Size, 'size');
174
- handleEnumValidation(props.state, InputState, 'state');
175
- handleEnumValidation(props.type, BaseInputType, 'type');
176
- handleEnumValidation(props.grouped, Grouped, 'grouped');
177
-
178
- /**
179
- * Validate default value without delayed data fetching.
180
- */
181
- if (!props.skeleton && props.modelValue !== null) {
182
- emit('validate', props.modelValue);
183
- }
184
- });
185
-
186
- function onBlur(e: FocusEvent) {
187
- emit('validate', props.modelValue);
188
- emit('blur', e);
189
- }
190
-
191
- function onClickClearIcon() {
192
- if (!props.disabled) {
193
- _modelValue.value = null;
194
- }
195
- }
196
- </script>
197
-
198
- <template>
199
- <div
200
- class="block relative w-full h-fit"
201
- :class="_wrapperClass"
202
- >
203
- <div
204
- v-if="iconLeft"
205
- class="absolute h-full flex items-center justify-center z-20"
206
- :class="{
207
- 'w-6': size === Size.xs2,
208
- 'w-7': size === Size.sm,
209
- 'w-8': size === Size.xs,
210
- 'w-9': size === Size.md,
211
- 'w-10': size === Size.lg,
212
- 'opacity-50': disabled,
213
- }"
214
- >
215
- <AntIcon
216
- :icon="iconLeft"
217
- :size="inputIconSize"
218
- color="text-for-white-bg-font"
219
- />
220
- </div>
221
-
222
- <input
223
- ref="_inputRef"
224
- v-model="_modelValue"
225
- :class="inputClasses"
226
- :type="type"
227
- :placeholder="placeholder"
228
- :disabled="disabled || skeleton"
229
- :readonly="readonly"
230
- :tabindex="hasInputState ? -1 : 0"
231
- v-bind="$attrs"
232
- @blur="onBlur"
233
- >
234
-
235
- <div
236
- v-if="(nullable && _modelValue !== null && _modelValue !== '') || (showIcon && icon) || hasSlotContent(slot['icon-right'])"
237
- class="absolute h-full flex items-center justify-center right-0 top-0 transition-all z-20"
238
- :class="{'w-6': size === Size.xs2, 'w-7': size === Size.xs2, 'w-8': size === Size.sm, 'w-9': size === Size.md, 'w-10': size === Size.lg}"
239
- >
240
- <slot name="icon-right">
241
- <AntIcon
242
- v-if="nullable && _modelValue !== null && _modelValue !== ''"
243
- :icon="faXmark"
244
- :class="{'cursor-pointer': !disabled, ...iconClasses}"
245
- :color="iconColorClass"
246
- :size="inputIconSize"
247
- @click="() => onClickClearIcon()"
248
- />
249
-
250
- <AntIcon
251
- v-else-if="showIcon && icon"
252
- :icon="icon"
253
- :color="iconColorClass"
254
- :class="iconClasses"
255
- :size="inputIconSize"
256
- />
257
- </slot>
258
- </div>
259
-
260
- <AntSkeleton
261
- v-if="skeleton"
262
- absolute
263
- :grouped="grouped"
264
- rounded
265
- />
266
- </div>
267
- </template>
268
-
269
- <style scoped>
270
- /* Chrome, Safari, Edge, Opera */
271
- input::-webkit-outer-spin-button,
272
- input::-webkit-inner-spin-button {
273
- -webkit-appearance: none;
274
- margin: 0;
275
- }
276
-
277
- /* Firefox */
278
- input[type=number] {
279
- -moz-appearance: textfield;
280
- }
281
-
282
- /* clears the "X" from Internet Explorer */
283
- input[type=search]::-ms-clear {
284
- display: none;
285
- width: 0;
286
- height: 0;
287
- }
288
-
289
- input[type=search]::-ms-reveal {
290
- display: none;
291
- width: 0;
292
- height: 0;
293
- }
294
-
295
- /* clears the "X" from Chrome */
296
- input[type="search"]::-webkit-search-decoration,
297
- input[type="search"]::-webkit-search-cancel-button,
298
- input[type="search"]::-webkit-search-results-button,
299
- input[type="search"]::-webkit-search-results-decoration {
300
- display: none;
301
- }
302
-
303
- /* Remove calendar icon in Chrome */
304
- input[type="date"]::-webkit-datetime-edit-fields-wrapper,
305
- input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
306
- input[type="month"]::-webkit-datetime-edit-fields-wrapper,
307
- input[type="time"]::-webkit-datetime-edit-fields-wrapper,
308
- input[type="week"]::-webkit-datetime-edit-fields-wrapper {
309
- padding: 0;
310
- }
311
-
312
- input[type="date"]::-webkit-calendar-picker-indicator,
313
- input[type="datetime-local"]::-webkit-calendar-picker-indicator,
314
- input[type="month"]::-webkit-calendar-picker-indicator,
315
- input[type="time"]::-webkit-calendar-picker-indicator,
316
- input[type="week"]::-webkit-calendar-picker-indicator {
317
- display: none;
318
- }
319
- </style>
@@ -1,189 +0,0 @@
1
- <script setup lang="ts">
2
- /**
3
- * This is the custom DropDown for each element (like select / tag-select)
4
- *
5
- * TODO:: add screen reader support
6
- * Fix overflow bug (See Ellipsis Text story)
7
- * TODO:: if the dropdown is open and the user types something, the element with a matching value should be focused.
8
- */
9
-
10
- import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
11
- import { InputState, Size } from '../../../enums';
12
- import type { SelectOption } from '../__types';
13
- import { useVModel } from '@vueuse/core';
14
- import type { Validator } from '@antify/validate';
15
-
16
- const emit = defineEmits([ 'update:open', 'update:modelValue', 'update:focused', 'selectElement' ]);
17
- const props = withDefaults(defineProps<{
18
- modelValue: string | string[] | number | number[] | null;
19
- focused: string | number | null;
20
- open: boolean;
21
- options: SelectOption[];
22
- state?: InputState;
23
- validator?: Validator;
24
- size?: Size;
25
- inputRef?: HTMLElement | null;
26
- closeOnEnter?: boolean;
27
- autoSelectFirstOnOpen?: boolean;
28
- }>(), {
29
- state: InputState.base,
30
- focusOnOpen: true,
31
- closeOnEnter: false,
32
- autoSelectFirstOnOpen: true
33
- });
34
-
35
- const _modelValue = useVModel(props, 'modelValue', emit);
36
- const isOpen = useVModel(props, 'open', emit);
37
- const focusedDropDownItem = useVModel(props, 'focused', emit);
38
-
39
- const dropdownClasses = computed(() => {
40
- const variants: Record<InputState, string> = {
41
- [InputState.base]: 'bg-neutral-300 border-neutral-300',
42
- [InputState.success]: 'bg-success-500 border-success-500',
43
- [InputState.info]: 'bg-info-500 border-info-500',
44
- [InputState.warning]: 'bg-warning-500 border-warning-500',
45
- [InputState.danger]: 'bg-danger-500 border-danger-500',
46
- };
47
-
48
- return {
49
- 'absolute w-full border flex flex-col gap-px outline-none -mt-px overflow-hidden shadow-md z-40': true,
50
- 'rounded-bl-md rounded-br-md': true,
51
- [variants[props.state]]: true,
52
- // Size
53
- 'text-sm': props.size === Size.sm || props.size === Size.md
54
- };
55
- });
56
- const dropDownItemClasses = computed(() => {
57
- const variants: Record<InputState, string> = {
58
- [InputState.base]: 'bg-white text-for-white-bg-font',
59
- [InputState.success]: 'bg-success-100 border-success-100-font',
60
- [InputState.info]: 'bg-info-100 border-info-100-font',
61
- [InputState.warning]: 'bg-warning-100 border-warning-100-font',
62
- [InputState.danger]: 'bg-danger-100 border-danger-100-font',
63
- };
64
-
65
- return {
66
- 'select-none text-ellipsis overflow-hidden whitespace-nowrap': true,
67
- [variants[props.state]]: true,
68
- // Size
69
- 'p-1.5': props.size === Size.sm,
70
- 'p-2': props.size === Size.md,
71
- };
72
- });
73
-
74
- watch(isOpen, () => {
75
- nextTick(() => {
76
- if (props.autoSelectFirstOnOpen) {
77
- focusedDropDownItem.value =
78
- typeof _modelValue.value === 'string' || typeof _modelValue.value === 'number' ? _modelValue.value :
79
- Array.isArray(_modelValue.value) ? _modelValue.value[0] :
80
- props.options[0].value;
81
- } else {
82
- focusedDropDownItem.value = null;
83
- }
84
- });
85
- });
86
-
87
- onMounted(() => {
88
- nextTick(() => {
89
- props.inputRef?.addEventListener('keydown', onKeyDownDropDown);
90
- });
91
- });
92
-
93
- onUnmounted(() => {
94
- props.inputRef?.removeEventListener('keydown', onKeyDownDropDown);
95
- });
96
-
97
- function onKeyDownDropDown(e: KeyboardEvent) {
98
- if (e.key === 'Enter') {
99
- if (props.closeOnEnter) {
100
- isOpen.value = false;
101
- }
102
-
103
- emit('selectElement', focusedDropDownItem.value);
104
- }
105
-
106
- if (e.key === 'Escape') {
107
- isOpen.value = false;
108
- }
109
-
110
- if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {
111
- isOpen.value = true;
112
-
113
- const index = props.options.findIndex(option => option.value === focusedDropDownItem.value);
114
- const option = props.options[index + 1];
115
-
116
- if (index === -1) {
117
- focusedDropDownItem.value = props.options[0].value;
118
- } else if (option !== undefined) {
119
- focusedDropDownItem.value = option.value;
120
- }
121
- }
122
-
123
- if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {
124
- isOpen.value = true;
125
-
126
- const index = props.options.findIndex(option => option.value === focusedDropDownItem.value);
127
- const option = props.options[index - 1];
128
-
129
- if (option !== undefined) {
130
- focusedDropDownItem.value = option.value;
131
- }
132
- }
133
-
134
- if (e.key === 'Tab') {
135
- isOpen.value = false;
136
- }
137
- }
138
-
139
- function getActiveDropDownItemClasses(option: SelectOption) {
140
- const variants: Record<InputState, string> = {
141
- [InputState.base]: 'bg-neutral-50/25',
142
- [InputState.success]: 'bg-success-100/25',
143
- [InputState.info]: 'bg-info-100/25',
144
- [InputState.warning]: 'bg-warning-100/25',
145
- [InputState.danger]: 'bg-danger-100/25',
146
- };
147
-
148
- return option.value === focusedDropDownItem.value ? { [variants[props.state]]: true } : {};
149
- }
150
-
151
- function onClickDropDownItem(e: MouseEvent, value: string | number | null) {
152
- e.preventDefault();
153
- props.inputRef?.focus();
154
-
155
- isOpen.value = false;
156
- emit('selectElement', value);
157
- _modelValue.value = value;
158
- }
159
-
160
- watch(_modelValue, (val) => {
161
- focusedDropDownItem.value = Array.isArray(val) ? val[0] : val;
162
- });
163
- </script>
164
-
165
- <template>
166
- <div
167
- v-if="isOpen"
168
- :class="dropdownClasses"
169
- >
170
- <div
171
- v-for="(option, index) in options"
172
- :key="`option-${index}`"
173
- :class="{...dropDownItemClasses, ...getActiveDropDownItemClasses(option)}"
174
- @mousedown="(e) => onClickDropDownItem(e, option.value)"
175
- @mouseover="() => focusedDropDownItem = option.value"
176
- >
177
- {{ option.label }}
178
- </div>
179
-
180
- <div
181
- v-if="options.length === 0"
182
- :class="{...dropDownItemClasses}"
183
- >
184
- <slot name="empty">
185
- No options available
186
- </slot>
187
- </div>
188
- </div>
189
- </template>
@@ -1,58 +0,0 @@
1
- <script lang="ts" setup>
2
- import {computed, onMounted} from 'vue';
3
- import {Size} from '../../../enums/Size.enum';
4
- import AntSkeleton from '../../AntSkeleton.vue';
5
- import {handleEnumValidation} from '../../../handler';
6
- import {InputState} from '../../../enums';
7
-
8
- const props = withDefaults(defineProps<{
9
- state?: InputState,
10
- size?: Size;
11
- skeleton?: boolean;
12
- }>(), {
13
- skeleton: false,
14
- size: Size.md,
15
- state: InputState.base
16
- });
17
-
18
- const classes = computed(() => {
19
- const variants: Record<InputState, string> = {
20
- [InputState.base]: 'text-for-white-bg-font',
21
- [InputState.danger]: 'text-danger-500',
22
- [InputState.info]: 'text-info-500',
23
- [InputState.success]: 'text-success-500',
24
- [InputState.warning]: 'text-warning-500',
25
- };
26
-
27
- return {
28
- 'relative font-regular inline-block transition-color': true,
29
- 'text-2xs': props.size === Size.xs2,
30
- 'text-xs': props.size === Size.xs,
31
- 'text-sm': props.size === Size.sm,
32
- 'text-md': props.size === Size.md,
33
- 'text-lg': props.size === Size.lg,
34
- [variants[props.state]]: true
35
- };
36
- });
37
-
38
- onMounted(() => {
39
- handleEnumValidation(props.size, Size, 'size');
40
- handleEnumValidation(props.state, InputState, 'state');
41
- });
42
- </script>
43
-
44
- <template>
45
- <div
46
- :class="classes"
47
- >
48
- <span :class="{'invisible': skeleton}">
49
- <slot />
50
- </span>
51
-
52
- <AntSkeleton
53
- v-if="skeleton"
54
- absolute
55
- rounded
56
- />
57
- </div>
58
- </template>
@@ -1,62 +0,0 @@
1
- <script lang="ts" setup>
2
- import {computed, onMounted} from 'vue';
3
- import {Size} from '../../../enums/Size.enum';
4
- import AntSkeleton from '../../AntSkeleton.vue';
5
- import {handleEnumValidation} from '../../../handler';
6
-
7
- defineEmits(['clickContent']);
8
-
9
- const props = withDefaults(defineProps<{
10
- label?: string;
11
- size?: Size;
12
- skeleton?: boolean;
13
- }>(), {
14
- skeleton: false,
15
- size: Size.md,
16
- });
17
-
18
- const fontClasses = computed(() => ({
19
- 'relative font-medium w-fit text-for-white-bg-font': true,
20
- 'text-xs': props.size === Size.xs || props.size === Size.xs2,
21
- 'text-sm': props.size === Size.lg || props.size === Size.md || props.size === Size.sm,
22
- }));
23
- const gapSize = computed(() => ({
24
- 'gap-2.5': props.size === Size.lg,
25
- 'gap-2': props.size === Size.md,
26
- 'gap-1.5': props.size === Size.sm || props.size === Size.xs,
27
- 'gap-1': props.size === Size.xs2,
28
- }));
29
-
30
- onMounted(() => {
31
- handleEnumValidation(props.size, Size, 'size');
32
- });
33
- </script>
34
-
35
- <template>
36
- <label
37
- class="flex flex-col w-full"
38
- :class="gapSize"
39
- >
40
- <span
41
- v-if="label"
42
- :class="fontClasses"
43
- >
44
- <span
45
- :class="{'invisible': skeleton}"
46
- @click="$emit('clickContent')"
47
- >
48
- <slot name="label">
49
- {{ label }}
50
- </slot>
51
- </span>
52
-
53
- <AntSkeleton
54
- v-if="skeleton"
55
- absolute
56
- rounded
57
- />
58
- </span>
59
-
60
- <slot />
61
- </label>
62
- </template>
@@ -1,58 +0,0 @@
1
- <script lang="ts" setup>
2
- import {computed, onMounted} from 'vue';
3
- import {Size} from '../../../enums/Size.enum';
4
- import AntSkeleton from '../../AntSkeleton.vue';
5
- import {handleEnumValidation} from '../../../handler';
6
- import {InputState} from '../../../enums';
7
-
8
- const props = withDefaults(defineProps<{
9
- value: number;
10
- maxValue: number;
11
- state?: InputState;
12
- size?: Size;
13
- skeleton?: boolean;
14
- }>(), {
15
- skeleton: false,
16
- size: Size.md,
17
- state: InputState.base
18
- });
19
-
20
- const classes = computed(() => {
21
- const variants: Record<InputState, string> = {
22
- [InputState.base]: 'text-for-white-bg-font',
23
- [InputState.danger]: 'text-danger-500',
24
- [InputState.info]: 'text-info-500',
25
- [InputState.success]: 'text-success-500',
26
- [InputState.warning]: 'text-warning-500',
27
- };
28
-
29
- return {
30
- 'relative font-regular inline-block transition-color': true,
31
- 'text-2xs': props.size === Size.xs2,
32
- 'text-xs': props.size === Size.xs,
33
- 'text-sm': props.size === Size.sm,
34
- 'text-md': props.size === Size.md,
35
- 'text-lg': props.size === Size.lg,
36
- [variants[props.state]]: true,
37
- };
38
- });
39
-
40
- onMounted(() => {
41
- handleEnumValidation(props.size, Size, 'size');
42
- handleEnumValidation(props.state, InputState, 'state');
43
- });
44
- </script>
45
-
46
- <template>
47
- <div :class="classes">
48
- <span :class="{'invisible': skeleton}">
49
- {{ value }}/{{ maxValue }}
50
- </span>
51
-
52
- <AntSkeleton
53
- v-if="skeleton"
54
- absolute
55
- rounded
56
- />
57
- </div>
58
- </template>