@antify/ui-module 1.1.3

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 (336) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/module.cjs +5 -0
  4. package/dist/module.d.mts +131 -0
  5. package/dist/module.d.ts +131 -0
  6. package/dist/module.json +5 -0
  7. package/dist/module.mjs +339 -0
  8. package/dist/runtime/assets/tailwind.css +1 -0
  9. package/dist/runtime/components/AntAccordion.vue +59 -0
  10. package/dist/runtime/components/AntAccordionItem.vue +66 -0
  11. package/dist/runtime/components/AntAlert.vue +137 -0
  12. package/dist/runtime/components/AntDropdown.vue +79 -0
  13. package/dist/runtime/components/AntIcon.vue +51 -0
  14. package/dist/runtime/components/AntKeycap.vue +24 -0
  15. package/dist/runtime/components/AntListGroup.vue +24 -0
  16. package/dist/runtime/components/AntListGroupItem.vue +81 -0
  17. package/dist/runtime/components/AntModal.vue +87 -0
  18. package/dist/runtime/components/AntPagination.vue +201 -0
  19. package/dist/runtime/components/AntPopover.vue +112 -0
  20. package/dist/runtime/components/AntSkeleton.vue +38 -0
  21. package/dist/runtime/components/AntSpinner.vue +95 -0
  22. package/dist/runtime/components/AntTag.vue +79 -0
  23. package/dist/runtime/components/AntToast.vue +109 -0
  24. package/dist/runtime/components/AntToaster.vue +46 -0
  25. package/dist/runtime/components/AntTooltip.vue +165 -0
  26. package/dist/runtime/components/Main.stories.mdx +10 -0
  27. package/dist/runtime/components/__stories/AntAccordion.stories.d.ts +9 -0
  28. package/dist/runtime/components/__stories/AntAccordion.stories.mjs +97 -0
  29. package/dist/runtime/components/__stories/AntAlert.stories.d.ts +10 -0
  30. package/dist/runtime/components/__stories/AntAlert.stories.mjs +75 -0
  31. package/dist/runtime/components/__stories/AntDropdown.stories.d.ts +6 -0
  32. package/dist/runtime/components/__stories/AntDropdown.stories.mjs +52 -0
  33. package/dist/runtime/components/__stories/AntIcon.stories.d.ts +8 -0
  34. package/dist/runtime/components/__stories/AntIcon.stories.mjs +90 -0
  35. package/dist/runtime/components/__stories/AntKeycap.stories.d.ts +9 -0
  36. package/dist/runtime/components/__stories/AntKeycap.stories.mjs +59 -0
  37. package/dist/runtime/components/__stories/AntListGroup.stories.d.ts +7 -0
  38. package/dist/runtime/components/__stories/AntListGroup.stories.mjs +36 -0
  39. package/dist/runtime/components/__stories/AntListGroupItem.stories.d.ts +10 -0
  40. package/dist/runtime/components/__stories/AntListGroupItem.stories.mjs +62 -0
  41. package/dist/runtime/components/__stories/AntModal.stories.d.ts +7 -0
  42. package/dist/runtime/components/__stories/AntModal.stories.mjs +78 -0
  43. package/dist/runtime/components/__stories/AntPagination.stories.d.ts +8 -0
  44. package/dist/runtime/components/__stories/AntPagination.stories.mjs +39 -0
  45. package/dist/runtime/components/__stories/AntPopover.stories.d.ts +6 -0
  46. package/dist/runtime/components/__stories/AntPopover.stories.mjs +47 -0
  47. package/dist/runtime/components/__stories/AntSkeleton.stories.d.ts +8 -0
  48. package/dist/runtime/components/__stories/AntSkeleton.stories.mjs +43 -0
  49. package/dist/runtime/components/__stories/AntSpinner.stories.d.ts +6 -0
  50. package/dist/runtime/components/__stories/AntSpinner.stories.mjs +34 -0
  51. package/dist/runtime/components/__stories/AntTag.stories.d.ts +7 -0
  52. package/dist/runtime/components/__stories/AntTag.stories.mjs +44 -0
  53. package/dist/runtime/components/__stories/AntToast.stories.d.ts +8 -0
  54. package/dist/runtime/components/__stories/AntToast.stories.mjs +66 -0
  55. package/dist/runtime/components/__stories/AntToaster.stories.d.ts +34 -0
  56. package/dist/runtime/components/__stories/AntToaster.stories.mjs +42 -0
  57. package/dist/runtime/components/__stories/AntTooltip.stories.d.ts +6 -0
  58. package/dist/runtime/components/__stories/AntTooltip.stories.mjs +43 -0
  59. package/dist/runtime/components/__types/Accordion.types.d.ts +4 -0
  60. package/dist/runtime/components/__types/Accordion.types.mjs +5 -0
  61. package/dist/runtime/components/__types/AntIcon.types.d.ts +5 -0
  62. package/dist/runtime/components/__types/AntIcon.types.mjs +6 -0
  63. package/dist/runtime/components/__types/AntToaster.types.d.ts +8 -0
  64. package/dist/runtime/components/__types/AntToaster.types.mjs +0 -0
  65. package/dist/runtime/components/__types/index.d.ts +2 -0
  66. package/dist/runtime/components/__types/index.mjs +2 -0
  67. package/dist/runtime/components/buttons/AntButton.vue +227 -0
  68. package/dist/runtime/components/buttons/AntCreateButton.vue +32 -0
  69. package/dist/runtime/components/buttons/AntDeleteButton.vue +32 -0
  70. package/dist/runtime/components/buttons/AntSaveAndNewButton.vue +32 -0
  71. package/dist/runtime/components/buttons/AntSaveButton.vue +31 -0
  72. package/dist/runtime/components/buttons/__stories/AntButton.stories.d.ts +15 -0
  73. package/dist/runtime/components/buttons/__stories/AntButton.stories.mjs +272 -0
  74. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.d.ts +10 -0
  75. package/dist/runtime/components/buttons/__stories/AntCreateButton.stories.mjs +57 -0
  76. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.d.ts +10 -0
  77. package/dist/runtime/components/buttons/__stories/AntDeleteButton.stories.mjs +57 -0
  78. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.d.ts +10 -0
  79. package/dist/runtime/components/buttons/__stories/AntSaveAndNewButton.stories.mjs +57 -0
  80. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.d.ts +10 -0
  81. package/dist/runtime/components/buttons/__stories/AntSaveButton.stories.mjs +57 -0
  82. package/dist/runtime/components/buttons/__types/AntButton.type.d.ts +4 -0
  83. package/dist/runtime/components/buttons/__types/AntButton.type.mjs +5 -0
  84. package/dist/runtime/components/buttons/__types/index.d.ts +1 -0
  85. package/dist/runtime/components/buttons/__types/index.mjs +1 -0
  86. package/dist/runtime/components/crud/AntCrud.vue +42 -0
  87. package/dist/runtime/components/crud/AntCrudDetail.vue +11 -0
  88. package/dist/runtime/components/crud/AntCrudDetailActions.vue +51 -0
  89. package/dist/runtime/components/crud/AntCrudDetailNav.vue +51 -0
  90. package/dist/runtime/components/crud/AntCrudTableFilter.vue +120 -0
  91. package/dist/runtime/components/crud/AntCrudTableNav.vue +129 -0
  92. package/dist/runtime/components/crud/__stories/AntCrud.stories.d.ts +6 -0
  93. package/dist/runtime/components/crud/__stories/AntCrud.stories.mjs +126 -0
  94. package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.d.ts +7 -0
  95. package/dist/runtime/components/crud/__stories/AntCrudDetail.stories.mjs +80 -0
  96. package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.d.ts +6 -0
  97. package/dist/runtime/components/crud/__stories/AntCrudDetailActions.stories.mjs +25 -0
  98. package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.d.ts +6 -0
  99. package/dist/runtime/components/crud/__stories/AntCrudDetailNav.stories.mjs +41 -0
  100. package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.d.ts +6 -0
  101. package/dist/runtime/components/crud/__stories/AntCrudTableFilter.stories.mjs +25 -0
  102. package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.d.ts +8 -0
  103. package/dist/runtime/components/crud/__stories/AntCrudTableNav.stories.mjs +56 -0
  104. package/dist/runtime/components/dialogs/AntDeleteDialog.vue +29 -0
  105. package/dist/runtime/components/dialogs/AntDialog.vue +147 -0
  106. package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.d.ts +6 -0
  107. package/dist/runtime/components/dialogs/__stories/AndDeleteDialog.stories.mjs +30 -0
  108. package/dist/runtime/components/dialogs/__stories/AntDialog.stories.d.ts +6 -0
  109. package/dist/runtime/components/dialogs/__stories/AntDialog.stories.mjs +60 -0
  110. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +145 -0
  111. package/dist/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +91 -0
  112. package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.d.ts +8 -0
  113. package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckbox.stories.mjs +286 -0
  114. package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckboxGroup.stories.d.ts +7 -0
  115. package/dist/runtime/components/form/AntCheckboxWidget/__stories/AntCheckboxGroup.stories.mjs +96 -0
  116. package/dist/runtime/components/form/AntCheckboxWidget/__types/AntCheckbox.d.ts +6 -0
  117. package/dist/runtime/components/form/AntCheckboxWidget/__types/AntCheckbox.mjs +0 -0
  118. package/dist/runtime/components/form/AntFormGroup.vue +21 -0
  119. package/dist/runtime/components/form/AntFormGroupLabel.vue +5 -0
  120. package/dist/runtime/components/form/AntNumberInput.vue +170 -0
  121. package/dist/runtime/components/form/AntRadioWidget/AntRadio.vue +139 -0
  122. package/dist/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +80 -0
  123. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.d.ts +8 -0
  124. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadio.stories.mjs +79 -0
  125. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.d.ts +8 -0
  126. package/dist/runtime/components/form/AntRadioWidget/__stories/AntRadioGroup.stories.mjs +125 -0
  127. package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.d.ts +9 -0
  128. package/dist/runtime/components/form/AntRadioWidget/__types/AntRadio.type.mjs +0 -0
  129. package/dist/runtime/components/form/AntRangeSlider.vue +81 -0
  130. package/dist/runtime/components/form/AntRichTextEditor.vue +237 -0
  131. package/dist/runtime/components/form/AntSearch.vue +76 -0
  132. package/dist/runtime/components/form/AntSelect.vue +346 -0
  133. package/dist/runtime/components/form/AntSwitch.vue +145 -0
  134. package/dist/runtime/components/form/AntSwitcher.vue +184 -0
  135. package/dist/runtime/components/form/AntTextInput.vue +73 -0
  136. package/dist/runtime/components/form/AntTextarea.vue +170 -0
  137. package/dist/runtime/components/form/AntUnitInput.vue +99 -0
  138. package/dist/runtime/components/form/Elements/AntBaseInput.vue +216 -0
  139. package/dist/runtime/components/form/Elements/AntDropDown.vue +160 -0
  140. package/dist/runtime/components/form/Elements/AntField.vue +102 -0
  141. package/dist/runtime/components/form/Elements/AntInputDescription.vue +55 -0
  142. package/dist/runtime/components/form/Elements/AntInputLabel.vue +55 -0
  143. package/dist/runtime/components/form/Elements/AntInputLimiter.vue +55 -0
  144. package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.d.ts +9 -0
  145. package/dist/runtime/components/form/Elements/__stories/AntBaseInput.stories.mjs +168 -0
  146. package/dist/runtime/components/form/Elements/__stories/AntField.stories.d.ts +6 -0
  147. package/dist/runtime/components/form/Elements/__stories/AntField.stories.mjs +80 -0
  148. package/dist/runtime/components/form/Elements/__stories/AntInputDescription.stories.d.ts +6 -0
  149. package/dist/runtime/components/form/Elements/__stories/AntInputDescription.stories.mjs +34 -0
  150. package/dist/runtime/components/form/Elements/__stories/AntInputLabel.stories.d.ts +7 -0
  151. package/dist/runtime/components/form/Elements/__stories/AntInputLabel.stories.mjs +46 -0
  152. package/dist/runtime/components/form/Elements/__stories/AntInputLimiter.stories.d.ts +6 -0
  153. package/dist/runtime/components/form/Elements/__stories/AntInputLimiter.stories.mjs +37 -0
  154. package/dist/runtime/components/form/Elements/__types/AntBaseInput.type.d.ts +16 -0
  155. package/dist/runtime/components/form/Elements/__types/AntBaseInput.type.mjs +17 -0
  156. package/dist/runtime/components/form/Elements/__types/index.d.ts +1 -0
  157. package/dist/runtime/components/form/Elements/__types/index.mjs +1 -0
  158. package/dist/runtime/components/form/Elements/index.d.ts +6 -0
  159. package/dist/runtime/components/form/Elements/index.mjs +12 -0
  160. package/dist/runtime/components/form/__stories/AntFormGroup.stories.d.ts +6 -0
  161. package/dist/runtime/components/form/__stories/AntFormGroup.stories.mjs +33 -0
  162. package/dist/runtime/components/form/__stories/AntFormGroupLabel.stories.d.ts +6 -0
  163. package/dist/runtime/components/form/__stories/AntFormGroupLabel.stories.mjs +20 -0
  164. package/dist/runtime/components/form/__stories/AntNumberInput.stories.d.ts +7 -0
  165. package/dist/runtime/components/form/__stories/AntNumberInput.stories.mjs +67 -0
  166. package/dist/runtime/components/form/__stories/AntRangeSlider.stories.d.ts +6 -0
  167. package/dist/runtime/components/form/__stories/AntRangeSlider.stories.mjs +40 -0
  168. package/dist/runtime/components/form/__stories/AntRichTextEditor.stories-old.d.ts +0 -0
  169. package/dist/runtime/components/form/__stories/AntRichTextEditor.stories-old.mjs +0 -0
  170. package/dist/runtime/components/form/__stories/AntSearch.stories.d.ts +6 -0
  171. package/dist/runtime/components/form/__stories/AntSearch.stories.mjs +43 -0
  172. package/dist/runtime/components/form/__stories/AntSelect.stories.d.ts +13 -0
  173. package/dist/runtime/components/form/__stories/AntSelect.stories.mjs +220 -0
  174. package/dist/runtime/components/form/__stories/AntSwitch.stories.d.ts +8 -0
  175. package/dist/runtime/components/form/__stories/AntSwitch.stories.mjs +215 -0
  176. package/dist/runtime/components/form/__stories/AntSwitcher.stories.d.ts +8 -0
  177. package/dist/runtime/components/form/__stories/AntSwitcher.stories.mjs +225 -0
  178. package/dist/runtime/components/form/__stories/AntTextInput.stories.d.ts +7 -0
  179. package/dist/runtime/components/form/__stories/AntTextInput.stories.mjs +68 -0
  180. package/dist/runtime/components/form/__stories/AntTextarea.stories.d.ts +8 -0
  181. package/dist/runtime/components/form/__stories/AntTextarea.stories.mjs +128 -0
  182. package/dist/runtime/components/form/__stories/AntUnitInput.stories.d.ts +8 -0
  183. package/dist/runtime/components/form/__stories/AntUnitInput.stories.mjs +84 -0
  184. package/dist/runtime/components/form/__types/AntSelect.type.d.ts +4 -0
  185. package/dist/runtime/components/form/__types/AntSelect.type.mjs +0 -0
  186. package/dist/runtime/components/form/__types/AntSwitcher.type.d.ts +4 -0
  187. package/dist/runtime/components/form/__types/AntSwitcher.type.mjs +0 -0
  188. package/dist/runtime/components/form/__types/AntTextInput.type.d.ts +7 -0
  189. package/dist/runtime/components/form/__types/AntTextInput.type.mjs +8 -0
  190. package/dist/runtime/components/form/__types/index.d.ts +3 -0
  191. package/dist/runtime/components/form/__types/index.mjs +3 -0
  192. package/dist/runtime/components/form/index.d.ts +11 -0
  193. package/dist/runtime/components/form/index.mjs +22 -0
  194. package/dist/runtime/components/index.d.ts +22 -0
  195. package/dist/runtime/components/index.mjs +41 -0
  196. package/dist/runtime/components/layouts/AntNavLeftLayout.vue +36 -0
  197. package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.d.ts +7 -0
  198. package/dist/runtime/components/layouts/__stories/AntNavLeftLayout.stories.mjs +68 -0
  199. package/dist/runtime/components/navbar/AntNavbar.vue +25 -0
  200. package/dist/runtime/components/navbar/AntNavbarItem.vue +78 -0
  201. package/dist/runtime/components/navbar/__stories/AntNavbar.stories.d.ts +6 -0
  202. package/dist/runtime/components/navbar/__stories/AntNavbar.stories.mjs +66 -0
  203. package/dist/runtime/components/navbar/__types/NavbarItem.d.ts +10 -0
  204. package/dist/runtime/components/navbar/__types/NavbarItem.mjs +0 -0
  205. package/dist/runtime/components/table/AntTable.vue +192 -0
  206. package/dist/runtime/components/table/AntTableSortButton.vue +26 -0
  207. package/dist/runtime/components/table/AntTd.vue +70 -0
  208. package/dist/runtime/components/table/AntTh.vue +67 -0
  209. package/dist/runtime/components/table/__stories/AntTable.stories.d.ts +9 -0
  210. package/dist/runtime/components/table/__stories/AntTable.stories.mjs +274 -0
  211. package/dist/runtime/components/table/__types/TableHeader.type.d.ts +31 -0
  212. package/dist/runtime/components/table/__types/TableHeader.type.mjs +19 -0
  213. package/dist/runtime/components/tabs/AntTabItem.vue +115 -0
  214. package/dist/runtime/components/tabs/AntTabs.vue +47 -0
  215. package/dist/runtime/components/tabs/__stories/AntTabItem.stories.d.ts +6 -0
  216. package/dist/runtime/components/tabs/__stories/AntTabItem.stories.mjs +32 -0
  217. package/dist/runtime/components/tabs/__stories/AntTabs.stories.d.ts +9 -0
  218. package/dist/runtime/components/tabs/__stories/AntTabs.stories.mjs +173 -0
  219. package/dist/runtime/components/tabs/__types/AntTabItem.types.d.ts +17 -0
  220. package/dist/runtime/components/tabs/__types/AntTabItem.types.mjs +6 -0
  221. package/dist/runtime/components/transitions/AntTransitionCollapseHeight.vue +92 -0
  222. package/dist/runtime/composables/useUi.d.ts +20 -0
  223. package/dist/runtime/composables/useUi.mjs +31 -0
  224. package/dist/runtime/composables/useUiClient.d.ts +34 -0
  225. package/dist/runtime/composables/useUiClient.mjs +61 -0
  226. package/dist/runtime/composables/useValidator.d.ts +1 -0
  227. package/dist/runtime/composables/useValidator.mjs +1 -0
  228. package/dist/runtime/enums/ColorType.enum.d.ts +16 -0
  229. package/dist/runtime/enums/ColorType.enum.mjs +18 -0
  230. package/dist/runtime/enums/Direction.enum.d.ts +4 -0
  231. package/dist/runtime/enums/Direction.enum.mjs +5 -0
  232. package/dist/runtime/enums/Grouped.enum.d.ts +6 -0
  233. package/dist/runtime/enums/Grouped.enum.mjs +7 -0
  234. package/dist/runtime/enums/Position.enum.d.ts +12 -0
  235. package/dist/runtime/enums/Position.enum.mjs +14 -0
  236. package/dist/runtime/enums/Size.enum.d.ts +4 -0
  237. package/dist/runtime/enums/Size.enum.mjs +5 -0
  238. package/dist/runtime/enums/index.d.ts +4 -0
  239. package/dist/runtime/enums/index.mjs +4 -0
  240. package/dist/runtime/env.d.ts +8 -0
  241. package/dist/runtime/handler.d.ts +1 -0
  242. package/dist/runtime/handler.mjs +5 -0
  243. package/dist/runtime/plugins/toaster.d.ts +22 -0
  244. package/dist/runtime/plugins/toaster.mjs +53 -0
  245. package/dist/runtime/plugins/ui-module.d.ts +2 -0
  246. package/dist/runtime/plugins/ui-module.mjs +13 -0
  247. package/dist/runtime/shims/vue.d.ts +5 -0
  248. package/dist/runtime/tailwind.config.d.ts +182 -0
  249. package/dist/runtime/tailwind.config.mjs +196 -0
  250. package/dist/runtime/types/AntListGroupItem.type.d.ts +11 -0
  251. package/dist/runtime/types/AntListGroupItem.type.mjs +12 -0
  252. package/dist/runtime/types/AntTag.type.d.ts +8 -0
  253. package/dist/runtime/types/AntTag.type.mjs +9 -0
  254. package/dist/runtime/types/Checkbox.type.d.ts +8 -0
  255. package/dist/runtime/types/Checkbox.type.mjs +0 -0
  256. package/dist/runtime/types/NavItem.type.d.ts +9 -0
  257. package/dist/runtime/types/NavItem.type.mjs +0 -0
  258. package/dist/runtime/types/RadioButton.type.d.ts +5 -0
  259. package/dist/runtime/types/RadioButton.type.mjs +0 -0
  260. package/dist/runtime/types/Tabs.type.d.ts +6 -0
  261. package/dist/runtime/types/Tabs.type.mjs +0 -0
  262. package/dist/runtime/types/Toaster.type.d.ts +6 -0
  263. package/dist/runtime/types/Toaster.type.mjs +0 -0
  264. package/dist/runtime/types/index.d.ts +7 -0
  265. package/dist/runtime/types/index.mjs +7 -0
  266. package/dist/runtime/types.d.ts +7 -0
  267. package/dist/runtime/types.mjs +7 -0
  268. package/dist/runtime/utils/helper.d.ts +4 -0
  269. package/dist/runtime/utils/helper.mjs +12 -0
  270. package/dist/runtime/utils.d.ts +14 -0
  271. package/dist/runtime/utils.mjs +20 -0
  272. package/dist/types.d.mts +8 -0
  273. package/dist/types.d.ts +8 -0
  274. package/package.json +81 -0
  275. package/src/runtime/components/AntAccordion.vue +59 -0
  276. package/src/runtime/components/AntAccordionItem.vue +104 -0
  277. package/src/runtime/components/AntAlert.vue +137 -0
  278. package/src/runtime/components/AntDropdown.vue +100 -0
  279. package/src/runtime/components/AntIcon.vue +51 -0
  280. package/src/runtime/components/AntKeycap.vue +24 -0
  281. package/src/runtime/components/AntListGroup.vue +24 -0
  282. package/src/runtime/components/AntListGroupItem.vue +81 -0
  283. package/src/runtime/components/AntModal.vue +129 -0
  284. package/src/runtime/components/AntPagination.vue +201 -0
  285. package/src/runtime/components/AntPopover.vue +133 -0
  286. package/src/runtime/components/AntSkeleton.vue +38 -0
  287. package/src/runtime/components/AntSpinner.vue +95 -0
  288. package/src/runtime/components/AntTag.vue +79 -0
  289. package/src/runtime/components/AntToast.vue +109 -0
  290. package/src/runtime/components/AntToaster.vue +71 -0
  291. package/src/runtime/components/AntTooltip.vue +165 -0
  292. package/src/runtime/components/buttons/AntButton.vue +227 -0
  293. package/src/runtime/components/buttons/AntCreateButton.vue +32 -0
  294. package/src/runtime/components/buttons/AntDeleteButton.vue +32 -0
  295. package/src/runtime/components/buttons/AntSaveAndNewButton.vue +32 -0
  296. package/src/runtime/components/buttons/AntSaveButton.vue +31 -0
  297. package/src/runtime/components/crud/AntCrud.vue +66 -0
  298. package/src/runtime/components/crud/AntCrudDetail.vue +11 -0
  299. package/src/runtime/components/crud/AntCrudDetailActions.vue +51 -0
  300. package/src/runtime/components/crud/AntCrudDetailNav.vue +51 -0
  301. package/src/runtime/components/crud/AntCrudTableFilter.vue +120 -0
  302. package/src/runtime/components/crud/AntCrudTableNav.vue +129 -0
  303. package/src/runtime/components/dialogs/AntDeleteDialog.vue +29 -0
  304. package/src/runtime/components/dialogs/AntDialog.vue +181 -0
  305. package/src/runtime/components/form/AntCheckboxWidget/AntCheckbox.vue +167 -0
  306. package/src/runtime/components/form/AntCheckboxWidget/AntCheckboxGroup.vue +91 -0
  307. package/src/runtime/components/form/AntFormGroup.vue +21 -0
  308. package/src/runtime/components/form/AntFormGroupLabel.vue +5 -0
  309. package/src/runtime/components/form/AntNumberInput.vue +170 -0
  310. package/src/runtime/components/form/AntRadioWidget/AntRadio.vue +164 -0
  311. package/src/runtime/components/form/AntRadioWidget/AntRadioGroup.vue +80 -0
  312. package/src/runtime/components/form/AntRangeSlider.vue +101 -0
  313. package/src/runtime/components/form/AntRichTextEditor.vue +237 -0
  314. package/src/runtime/components/form/AntSearch.vue +76 -0
  315. package/src/runtime/components/form/AntSelect.vue +346 -0
  316. package/src/runtime/components/form/AntSwitch.vue +145 -0
  317. package/src/runtime/components/form/AntSwitcher.vue +200 -0
  318. package/src/runtime/components/form/AntTextInput.vue +73 -0
  319. package/src/runtime/components/form/AntTextarea.vue +170 -0
  320. package/src/runtime/components/form/AntUnitInput.vue +99 -0
  321. package/src/runtime/components/form/Elements/AntBaseInput.vue +247 -0
  322. package/src/runtime/components/form/Elements/AntDropDown.vue +160 -0
  323. package/src/runtime/components/form/Elements/AntField.vue +102 -0
  324. package/src/runtime/components/form/Elements/AntInputDescription.vue +55 -0
  325. package/src/runtime/components/form/Elements/AntInputLabel.vue +55 -0
  326. package/src/runtime/components/form/Elements/AntInputLimiter.vue +55 -0
  327. package/src/runtime/components/layouts/AntNavLeftLayout.vue +36 -0
  328. package/src/runtime/components/navbar/AntNavbar.vue +25 -0
  329. package/src/runtime/components/navbar/AntNavbarItem.vue +78 -0
  330. package/src/runtime/components/table/AntTable.vue +192 -0
  331. package/src/runtime/components/table/AntTableSortButton.vue +26 -0
  332. package/src/runtime/components/table/AntTd.vue +70 -0
  333. package/src/runtime/components/table/AntTh.vue +67 -0
  334. package/src/runtime/components/tabs/AntTabItem.vue +115 -0
  335. package/src/runtime/components/tabs/AntTabs.vue +47 -0
  336. package/src/runtime/components/transitions/AntTransitionCollapseHeight.vue +96 -0
@@ -0,0 +1,95 @@
1
+ <script lang="ts" setup>
2
+ import {computed, onMounted} from 'vue';
3
+ import {Size} from '../enums/Size.enum'
4
+ import {handleEnumValidation} from '../handler';
5
+ import {ColorType} from '../enums/ColorType.enum';
6
+
7
+ const props = withDefaults(defineProps<{
8
+ colorType?: ColorType,
9
+ size?: Size;
10
+ inverted?: boolean;
11
+ }>(), {
12
+ size: Size.md,
13
+ colorType: ColorType.base,
14
+ inverted: false
15
+ });
16
+
17
+ const classes = computed(() => ({
18
+ 'animate-spin': true,
19
+ 'w-4 h-4': props.size === Size.sm,
20
+ 'w-5 h-5': props.size === Size.md,
21
+ }));
22
+ onMounted(() => {
23
+ handleEnumValidation(props.size, Size, 'size');
24
+ handleEnumValidation(props.colorType, ColorType, 'colorType');
25
+ });
26
+ const circleClass = computed(() => {
27
+ const invertedVariants: Record<ColorType, string> = {
28
+ [ColorType.base]: 'fill-neutral-500',
29
+ [ColorType.primary]: 'fill-primary-700',
30
+ [ColorType.secondary]: 'fill-secondary-700',
31
+ [ColorType.danger]: 'fill-danger-700',
32
+ [ColorType.info]: 'fill-info-700',
33
+ [ColorType.success]: 'fill-success-700',
34
+ [ColorType.warning]: 'fill-warning-700',
35
+ };
36
+ const notInvertedVariants: Record<ColorType, string> = {
37
+ [ColorType.base]: 'fill-neutral-100',
38
+ [ColorType.primary]: 'fill-primary-100',
39
+ [ColorType.secondary]: 'fill-secondary-100',
40
+ [ColorType.danger]: 'fill-danger-100',
41
+ [ColorType.info]: 'fill-info-100',
42
+ [ColorType.success]: 'fill-success-100',
43
+ [ColorType.warning]: 'fill-warning-100',
44
+ };
45
+
46
+ return {
47
+ [invertedVariants[props.colorType]]: props.inverted,
48
+ [notInvertedVariants[props.colorType]]: !props.inverted,
49
+ };
50
+ });
51
+ const spinningElementClass = computed(() => {
52
+ const invertedVariants: Record<ColorType, string> = {
53
+ [ColorType.base]: 'fill-neutral-100',
54
+ [ColorType.primary]: 'fill-primary-100',
55
+ [ColorType.secondary]: 'fill-secondary-100',
56
+ [ColorType.danger]: 'fill-danger-100',
57
+ [ColorType.info]: 'fill-info-100',
58
+ [ColorType.success]: 'fill-success-100',
59
+ [ColorType.warning]: 'fill-warning-100',
60
+ };
61
+ const notInvertedVariants: Record<ColorType, string> = {
62
+ [ColorType.base]: 'fill-neutral-500',
63
+ [ColorType.primary]: 'fill-primary-500',
64
+ [ColorType.secondary]: 'fill-secondary-500',
65
+ [ColorType.danger]: 'fill-danger-500',
66
+ [ColorType.info]: 'fill-info-500',
67
+ [ColorType.success]: 'fill-success-500',
68
+ [ColorType.warning]: 'fill-warning-500',
69
+ };
70
+
71
+ return {
72
+ [invertedVariants[props.colorType]]: props.inverted,
73
+ [notInvertedVariants[props.colorType]]: !props.inverted,
74
+ };
75
+ });
76
+ </script>
77
+
78
+ <template>
79
+ <svg
80
+ :class="classes"
81
+ viewBox="0 0 16 16"
82
+ fill="none"
83
+ xmlns="http://www.w3.org/2000/svg"
84
+ data-e2e="spinner"
85
+ >
86
+ <path
87
+ :class="circleClass"
88
+ d="M8 16C12.4183 16 16 12.4183 16 8H14C14 11.5346 11.5346 14 8 14C4.46538 14 2 11.5346 2 8C2 4.46538 4.46538 2 8 2V0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"
89
+ />
90
+ <path
91
+ :class="spinningElementClass"
92
+ d="M16 8C16 6.94942 15.7931 5.90914 15.391 4.93853C14.989 3.96793 14.3997 3.08601 13.6569 2.34315C12.914 1.60028 12.0321 1.011 11.0615 0.608963C10.0909 0.206926 9.05057 -1.7116e-07 8 0L8 2C8.78793 2 9.56815 2.15519 10.2961 2.45672C11.0241 2.75825 11.6855 3.20021 12.2426 3.75736C12.7998 4.31451 13.2417 4.97595 13.5433 5.7039C13.8448 6.43185 14 7.21207 14 8H16Z"
93
+ />
94
+ </svg>
95
+ </template>
@@ -0,0 +1,79 @@
1
+ <script lang="ts" setup>
2
+ import {computed, onMounted} from 'vue';
3
+ import {Size} from '../enums/Size.enum'
4
+ import {TagColorType} from '../types/AntTag.type';
5
+ import {handleEnumValidation} from '../handler';
6
+ import {type IconDefinition} from '@fortawesome/free-solid-svg-icons';
7
+ import {faCircleXmark} from '@fortawesome/free-solid-svg-icons';
8
+
9
+ const props = withDefaults(defineProps<{
10
+ colorType?: TagColorType,
11
+ size?: Size;
12
+ iconLeft?: IconDefinition;
13
+ dismiss?: boolean
14
+ }>(), {
15
+ size: Size.md,
16
+ colorType: TagColorType.neutral300,
17
+ dismiss: false
18
+ });
19
+
20
+ const classes = computed(() => {
21
+ const variants: Record<TagColorType, string> = {
22
+ [TagColorType.danger]: 'bg-danger-500 text-danger-500-font',
23
+ [TagColorType.info]: 'bg-info-500 text-info-500-font',
24
+ [TagColorType.neutral300]: 'bg-neutral-300 text-neutral-300-font',
25
+ [TagColorType.neutral50]: 'bg-neutral-50 text-neutral-50-font',
26
+ [TagColorType.success]: 'bg-success-500 text-success-500-font',
27
+ [TagColorType.warning]: 'bg-warning-500 text-warning-500-font',
28
+ };
29
+
30
+ return {
31
+ 'rounded-md inline-flex items-center': true,
32
+ 'px-1.5 py-1 text-sm gap-1.5': props.size === Size.md,
33
+ 'px-1 py-0.5 text-xs gap-1': props.size === Size.sm,
34
+ [variants[props.colorType]]: true,
35
+ };
36
+ });
37
+ const iconClasses = computed(() => ({
38
+ 'h-3': props.size === Size.sm,
39
+ 'h-4': props.size === Size.md,
40
+ }));
41
+
42
+ onMounted(() => {
43
+ handleEnumValidation(props.size, Size, 'size');
44
+ handleEnumValidation(props.colorType, TagColorType, 'colorType');
45
+ });
46
+ </script>
47
+
48
+ <template>
49
+ <span
50
+ :class="classes"
51
+ data-e2e="tag"
52
+ >
53
+ <span
54
+ v-if="iconLeft"
55
+ class="inline-flex items-center justify-center"
56
+ :class="{'w-4 h-4': props.size === Size.sm, 'w-5 h-5': props.size === Size.md}"
57
+ >
58
+ <fa-icon
59
+ :icon="iconLeft"
60
+ :class="iconClasses"
61
+ />
62
+ </span>
63
+
64
+ <slot/>
65
+
66
+ <span
67
+ v-if="dismiss"
68
+ class="inline-flex items-center justify-center"
69
+ :class="{'w-4 h-4': props.size === Size.sm, 'w-5 h-5': props.size === Size.md}"
70
+ >
71
+ <fa-icon
72
+ :icon="faCircleXmark"
73
+ :class="iconClasses"
74
+ class="cursor-pointer"
75
+ @click="() => $emit('close')"
76
+ />
77
+ </span>
78
+ </span>
79
+ </template>
@@ -0,0 +1,109 @@
1
+ <script lang="ts" setup>
2
+ import {computed, onMounted, useSlots} from 'vue';
3
+ import {handleEnumValidation} from '../handler';
4
+ import {
5
+ faCheckCircle,
6
+ faExclamationCircle,
7
+ faExclamationTriangle,
8
+ faInfoCircle,
9
+ faXmark
10
+ } from '@fortawesome/free-solid-svg-icons';
11
+ import AntIcon from './AntIcon.vue';
12
+ import AntButton from './buttons/AntButton.vue';
13
+ import {ColorType, InputColorType} from '../enums';
14
+
15
+ const props = withDefaults(defineProps<{
16
+ title?: string,
17
+ colorType?: InputColorType,
18
+ showUndo?: boolean,
19
+ icon?: boolean
20
+ }>(), {
21
+ colorType: InputColorType.base,
22
+ showUndo: false,
23
+ icon: true
24
+ });
25
+
26
+ const icons = {
27
+ [InputColorType.base]: faInfoCircle,
28
+ [InputColorType.info]: faInfoCircle,
29
+ [InputColorType.danger]: faExclamationCircle,
30
+ [InputColorType.warning]: faExclamationTriangle,
31
+ [InputColorType.success]: faCheckCircle,
32
+ };
33
+
34
+ const _icon = computed(() => icons[props.colorType]);
35
+ const classes = computed(() => {
36
+ const variants: Record<InputColorType, string> = {
37
+ [InputColorType.base]: 'bg-neutral-100 border-neutral-500 text-neutral-500',
38
+ [InputColorType.danger]: 'bg-danger-100 border-danger-500 text-danger-500',
39
+ [InputColorType.info]: 'bg-info-100 border-info-500 text-info-500',
40
+ [InputColorType.success]: 'bg-success-100 border-success-500 text-success-500',
41
+ [InputColorType.warning]: 'bg-warning-100 border-warning-500 text-warning-500',
42
+ };
43
+
44
+ return {
45
+ 'inline-flex flex-col gap-2.5 rounded-md p-2.5 border transition-colors shadow-md': true,
46
+ [variants[props.colorType]]: true,
47
+ };
48
+ });
49
+ const hasDefaultSlot = computed(() => useSlots()['default'] || false);
50
+ const iconColor = computed(() => {
51
+ const variants = {
52
+ [InputColorType.base]: 'text-neutral-100-font',
53
+ [InputColorType.danger]: 'text-danger-500',
54
+ [InputColorType.info]: 'text-info-500',
55
+ [InputColorType.success]: 'text-success-500',
56
+ [InputColorType.warning]: 'text-warning-500',
57
+ };
58
+
59
+ return variants[props.colorType];
60
+ });
61
+
62
+ onMounted(() => {
63
+ handleEnumValidation(props.colorType, InputColorType, 'colorType');
64
+ });
65
+ </script>
66
+
67
+ <template>
68
+ <div
69
+ :class="classes"
70
+ data-e2e="toast"
71
+ >
72
+ <div class="inline-flex items-center justify-between w-content gap-2.5">
73
+ <div class="inline-flex items-center gap-2.5">
74
+ <AntIcon
75
+ v-if="icon"
76
+ :icon="_icon"
77
+ :color="iconColor"
78
+ />
79
+
80
+ <div class="whitespace-pre" :class="{'font-semibold': hasDefaultSlot}">
81
+ <slot name="title">
82
+ {{ title }}
83
+ </slot>
84
+ </div>
85
+ </div>
86
+
87
+ <AntIcon
88
+ :icon="faXmark"
89
+ class="cursor-pointer"
90
+ :color="iconColor"
91
+ @click="() => $emit('close')"
92
+ />
93
+ </div>
94
+
95
+ <div v-if="hasDefaultSlot">
96
+ <slot/>
97
+ </div>
98
+
99
+ <div v-if="showUndo" class="flex justify-end">
100
+ <AntButton
101
+ :color-type="props.colorType as unknown as ColorType"
102
+ filled
103
+ @click="() => $emit('undo')"
104
+ >
105
+ undo
106
+ </AntButton>
107
+ </div>
108
+ </div>
109
+ </template>
@@ -0,0 +1,46 @@
1
+ <script lang="ts" setup>
2
+ /**
3
+ * To let the toaster show toasts, use the plugin "$uiModule.toaster" property.
4
+ */
5
+ import {computed} from 'vue';
6
+ import AntToast from './AntToast.vue';
7
+ import {CornerPosition} from '../enums/Position.enum';
8
+
9
+ const props = withDefaults(defineProps<{
10
+ position?: CornerPosition;
11
+ }>(), {
12
+ position: CornerPosition.bottomLeft
13
+ });
14
+
15
+ const classes = computed(() => ({
16
+ 'left-0 top-0': props.position === CornerPosition.topLeft,
17
+ 'right-0 top-0': props.position === CornerPosition.topRight,
18
+ 'left-0 bottom-0': props.position === CornerPosition.bottomLeft,
19
+ 'right-0 bottom-0': props.position === CornerPosition.bottomRight,
20
+ }));
21
+ </script>
22
+
23
+ <template>
24
+ <div
25
+ class="absolute flex flex-col items-baseline space-y-2.5 p-2.5"
26
+ :class="classes"
27
+ data-e2e="toaster"
28
+ >
29
+ <TransitionGroup name="list">
30
+ <AntToast
31
+ v-for="toast of $uiModule.toaster.getToasts()"
32
+ :title="toast.title"
33
+ :color-type="toast.type"
34
+ :icon="toast.hasIcon"
35
+ @close="$uiModule.toaster.removeToast(toast)"
36
+ v-bind:key="`ant-toast-${toast.id}`"
37
+ >
38
+ <template v-if="toast.content" #default>{{ toast.content }}</template>
39
+ </AntToast>
40
+ </TransitionGroup>
41
+ </div>
42
+ </template>
43
+
44
+ <style>
45
+ .list-move{transition:all .5s ease}.list-enter-active{animation:bounce-in-left .6s}.list-leave-active{animation:bounce-in-left .4s reverse}@keyframes bounce-in-left{0%{opacity:0;transform:translateX(-10rem)}50%{opacity:1;transform:translateX(.5rem)}to{opacity:1;transform:translateX(0)}}
46
+ </style>
@@ -0,0 +1,165 @@
1
+ <script lang="ts" setup>
2
+ import {computed, onMounted, ref} from 'vue';
3
+ import {handleEnumValidation} from '../handler';
4
+ import {InputColorType, Position} from '../enums';
5
+ import {classesToObjectSyntax} from '../utils';
6
+
7
+ const props = withDefaults(defineProps<{
8
+ content?: string,
9
+ position?: Position,
10
+ tooltipClasses?: string | Record<string, boolean>,
11
+ colorType?: InputColorType
12
+ }>(), {
13
+ position: Position.left,
14
+ tooltipClasses: '',
15
+ colorType: InputColorType.base
16
+ });
17
+ const visible = ref(false);
18
+ const _tooltipClasses = computed(() => ({
19
+ 'absolute w-max inline-flex': true,
20
+ // Position
21
+ 'bottom-full pb-3.5': props.position === Position.top,
22
+ 'top-full pt-3.5': props.position === Position.bottom,
23
+ 'right-full pr-3.5': props.position === Position.left,
24
+ 'left-full pl-3.5': props.position === Position.right,
25
+ ...classesToObjectSyntax(props.tooltipClasses)
26
+ }));
27
+ const classes = computed(() => ({
28
+ 'z-10 absolute flex': true,
29
+ 'top-0 left-0 right-0 -m-[2px] justify-center': props.position === Position.bottom,
30
+ 'bottom-0 left-0 right-0 -m-[2px] justify-center': props.position === Position.top,
31
+ 'top-0 left-0 bottom-0 -ml-[2.2px] items-center': props.position === Position.right,
32
+ 'top-0 right-0 bottom-0 -mr-[2.2px] items-center': props.position === Position.left,
33
+ }));
34
+ const itemContainerClasses = computed(() => ({
35
+ 'relative flex items-center': true,
36
+ 'justify-center': props.position === Position.bottom,
37
+ 'justify-center rotate-180': props.position === Position.top,
38
+ 'justify-center -rotate-90': props.position === Position.right,
39
+ 'justify-center rotate-90': props.position === Position.left,
40
+ }));
41
+ const contentClasses = computed(() => {
42
+ const variants: Record<InputColorType, string> = {
43
+ [InputColorType.base]: 'text-neutral-50-font bg-neutral-50 border-neutral-300',
44
+ [InputColorType.danger]: 'text-danger-500-font bg-danger-500 border-danger-500',
45
+ [InputColorType.info]: 'text-info-500-font bg-info-500 border-info-500',
46
+ [InputColorType.success]: 'text-success-500-font bg-success-500 border-success-500',
47
+ [InputColorType.warning]: 'text-warning-500-font bg-warning-500 border-warning-500',
48
+ };
49
+
50
+ return {[variants[props.colorType]]: true};
51
+ });
52
+ const svgPathClasses = computed(() => {
53
+ const variants: Record<InputColorType, string> = {
54
+ [InputColorType.base]: 'fill-neutral-50 stroke-neutral-50',
55
+ [InputColorType.danger]: 'fill-danger-500 stroke-danger-500',
56
+ [InputColorType.info]: 'fill-info-500 stroke-info-500',
57
+ [InputColorType.success]: 'fill-success-500 stroke-success-500',
58
+ [InputColorType.warning]: 'fill-warning-500 stroke-warning-500',
59
+ };
60
+
61
+ return {[variants[props.colorType]]: true};
62
+ });
63
+ const arrowSvgPathClasses = computed(() => {
64
+ const variants: Record<InputColorType, string> = {
65
+ [InputColorType.base]: 'stroke-neutral-300',
66
+ [InputColorType.danger]: 'stroke-danger-500',
67
+ [InputColorType.info]: 'stroke-info-500',
68
+ [InputColorType.success]: 'stroke-success-500',
69
+ [InputColorType.warning]: 'stroke-warning-500',
70
+ };
71
+
72
+ return {[variants[props.colorType]]: true};
73
+ });
74
+
75
+ onMounted(() => {
76
+ handleEnumValidation(props.position, Position, 'Position')
77
+ handleEnumValidation(props.colorType, InputColorType, 'colorType')
78
+ });
79
+
80
+ /**
81
+ * To prevent a fliggering ux, add a delay on hover and leaving the hover target,
82
+ * before showing the tooltip content.
83
+ */
84
+ const delayVisible = ref(visible.value);
85
+
86
+ function onMouseOver() {
87
+ delayVisible.value = true;
88
+
89
+ setTimeout(() => {
90
+ if (delayVisible.value) {
91
+ visible.value = true
92
+ }
93
+ }, 300)
94
+ }
95
+
96
+ function onMouseLeave() {
97
+ delayVisible.value = false
98
+ visible.value = false
99
+ }
100
+ </script>
101
+
102
+ <template>
103
+ <div
104
+ class="relative inline-flex justify-center items-center"
105
+ data-e2e="tooltip"
106
+ @mouseover="onMouseOver"
107
+ @mouseleave="onMouseLeave"
108
+ >
109
+ <slot/>
110
+
111
+ <div v-if="visible" :class="_tooltipClasses">
112
+ <div
113
+ class="shadow-lg text-sm relative inline-flex flex-col relative"
114
+ >
115
+ <div
116
+ :class="classes"
117
+ >
118
+ <div
119
+ :class="itemContainerClasses"
120
+ >
121
+ <svg
122
+ class="absolute mt-[.5px]"
123
+ width="30"
124
+ height="8"
125
+ viewBox="0 0 35 8"
126
+ fill="none"
127
+ xmlns="http://www.w3.org/2000/svg"
128
+ >
129
+ <path
130
+ d="M20.3284 1.82843L23.1569 4.65685C24.6571 6.15715 26.692 7 28.8137 7L6.18629 7C8.30802 7 10.3429 6.15715 11.8431 4.65686L14.6716 1.82843C16.2337 0.266331 18.7663 0.266328 20.3284 1.82843Z"
131
+ :class="svgPathClasses"
132
+ />
133
+
134
+ <path
135
+ d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7L34.5 7Z"
136
+ :class="svgPathClasses"
137
+ />
138
+ </svg>
139
+
140
+ <svg
141
+ class="absolute"
142
+ width="30"
143
+ height="8"
144
+ viewBox="0 0 35 8"
145
+ fill="none"
146
+ xmlns="http://www.w3.org/2000/svg"
147
+ >
148
+ <path
149
+ d="M34.5 7L28.8137 7C26.692 7 24.6571 6.15715 23.1569 4.65685L20.3284 1.82843C18.7663 0.266328 16.2337 0.266331 14.6716 1.82843L11.8431 4.65686C10.3429 6.15715 8.30802 7 6.18629 7L0.5 7"
150
+ :class="arrowSvgPathClasses"
151
+ />
152
+ </svg>
153
+ </div>
154
+ </div>
155
+
156
+ <div
157
+ class="p-2.5 rounded-md border"
158
+ :class="contentClasses"
159
+ >
160
+ <slot name="content"/>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ </template>
@@ -0,0 +1,10 @@
1
+ import { Canvas, Meta, Story } from '@storybook/addon-docs';
2
+
3
+ <Meta title="Main" />
4
+
5
+ <h1>This is the storybook for Antify UI.</h1>
6
+
7
+ <p>
8
+ Antify UI is a Tailwind based components library for use in Vue 3 / Nuxt
9
+ projects.{' '}
10
+ </p>
@@ -0,0 +1,9 @@
1
+ import AntAccordion from '../AntAccordion.vue';
2
+ import { type Meta, type StoryObj } from '@storybook/vue3';
3
+ declare const meta: Meta<typeof AntAccordion>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AntAccordion>;
6
+ export declare const Docs: Story;
7
+ export declare const CustomContent: Story;
8
+ export declare const MultipleCollapseStrategy: Story;
9
+ export declare const htmlInContent: Story;
@@ -0,0 +1,97 @@
1
+ import AntAccordion from "../AntAccordion.vue";
2
+ import AntAccordionItem from "../AntAccordionItem.vue";
3
+ import { CollapseStrategy } from "../__types/Accordion.types.mjs";
4
+ const meta = {
5
+ title: "Components/Accordion",
6
+ component: AntAccordion,
7
+ subcomponents: { AntAccordionItem },
8
+ parameters: { controls: { sort: "requiredFirst" } },
9
+ argTypes: {
10
+ collapseStrategy: {
11
+ control: { type: "select" },
12
+ options: Object.values(CollapseStrategy)
13
+ }
14
+ }
15
+ };
16
+ export default meta;
17
+ export const Docs = {
18
+ render: (args) => ({
19
+ components: { AntAccordion, AntAccordionItem },
20
+ setup() {
21
+ return { args };
22
+ },
23
+ template: `
24
+ <div class="p-4">
25
+ <AntAccordion v-bind="args"/>
26
+ </div>`
27
+ }),
28
+ args: {
29
+ items: [
30
+ {
31
+ label: "First entry",
32
+ content: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
33
+ },
34
+ {
35
+ label: "Second entry",
36
+ content: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
37
+ },
38
+ {
39
+ label: "Third entry",
40
+ content: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
41
+ },
42
+ {
43
+ label: "Fourth entry",
44
+ content: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
45
+ }
46
+ ]
47
+ }
48
+ };
49
+ export const CustomContent = {
50
+ render: (args) => ({
51
+ components: { AntAccordion, AntAccordionItem },
52
+ setup() {
53
+ return { args };
54
+ },
55
+ template: `
56
+ <div class="p-4">
57
+ <AntAccordion v-bind="args">
58
+ <template #item-content="{item, index}">
59
+ <div class="text-danger-500">{{ item.content }}</div>
60
+ </template>
61
+ </AntAccordion>
62
+ </div>`
63
+ }),
64
+ args: {
65
+ ...Docs.args
66
+ }
67
+ };
68
+ export const MultipleCollapseStrategy = {
69
+ render: Docs.render,
70
+ args: {
71
+ ...Docs.args,
72
+ collapseStrategy: CollapseStrategy.multiple
73
+ }
74
+ };
75
+ export const htmlInContent = {
76
+ render: Docs.render,
77
+ args: {
78
+ items: [
79
+ {
80
+ label: "First entry",
81
+ content: `Lorem <strong>ipsum</strong> dolor sit amet, consetetur sadipscing elitr, <br/>
82
+ sed diam nonumy eirmod tempor invidunt <br/>
83
+ ut labore et dolore magna aliquyam erat, <br/>
84
+ sed diam voluptua. At vero eos et accusam et <br/>
85
+ justo duo dolores et ea rebum. Stet clita kasd`
86
+ },
87
+ {
88
+ label: "Second entry",
89
+ content: `Lorem <strong>ipsum</strong> dolor sit amet, consetetur sadipscing elitr, <br/>
90
+ sed diam nonumy eirmod tempor invidunt <br/>
91
+ ut labore et dolore magna aliquyam erat, <br/>
92
+ sed diam voluptua. At vero eos et accusam et <br/>
93
+ justo duo dolores et ea rebum. Stet clita kasd`
94
+ }
95
+ ]
96
+ }
97
+ };
@@ -0,0 +1,10 @@
1
+ import AntAlert from '../AntAlert.vue';
2
+ import { type Meta, type StoryObj } from '@storybook/vue3';
3
+ declare const meta: Meta<typeof AntAlert>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AntAlert>;
6
+ export declare const Docs: Story;
7
+ export declare const WithContent: Story;
8
+ export declare const WithoutContent: Story;
9
+ export declare const WithQuestionIcon: Story;
10
+ export declare const Skeleton: Story;