@vc-shell/framework 1.0.52 → 1.0.54

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 (390) hide show
  1. package/core/composables/index.ts +0 -1
  2. package/core/composables/useApiClient/index.ts +9 -4
  3. package/core/composables/useAsync/index.ts +2 -6
  4. package/core/composables/useAutosave/index.ts +1 -3
  5. package/core/composables/useFunctions/debounce.ts +1 -4
  6. package/core/composables/useFunctions/delay.ts +1 -4
  7. package/core/composables/useFunctions/once.ts +1 -3
  8. package/core/composables/useFunctions/throttle.ts +1 -4
  9. package/core/composables/useI18n/index.ts +3 -24
  10. package/core/composables/useLoading/index.ts +1 -3
  11. package/core/composables/useNotifications/index.ts +6 -13
  12. package/core/composables/usePermissions/index.ts +1 -1
  13. package/core/composables/useSettings/index.ts +3 -4
  14. package/core/composables/useUser/index.ts +27 -66
  15. package/core/directives/permissions/index.ts +1 -1
  16. package/core/plugins/i18n/index.ts +8 -0
  17. package/core/plugins/index.ts +3 -1
  18. package/core/plugins/modularity/index.ts +32 -0
  19. package/core/plugins/moment/humanize.ts +1 -4
  20. package/core/plugins/validation/index.ts +11 -1
  21. package/core/plugins/validation/rules.ts +48 -170
  22. package/core/types/index.ts +7 -9
  23. package/dist/core/composables/index.d.ts +0 -1
  24. package/dist/core/composables/index.d.ts.map +1 -1
  25. package/dist/core/composables/useApiClient/index.d.ts +9 -3
  26. package/dist/core/composables/useApiClient/index.d.ts.map +1 -1
  27. package/dist/core/composables/useAsync/index.d.ts.map +1 -1
  28. package/dist/core/composables/useAutosave/index.d.ts.map +1 -1
  29. package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
  30. package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
  31. package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
  32. package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
  33. package/dist/core/composables/useI18n/index.d.ts +2 -4
  34. package/dist/core/composables/useI18n/index.d.ts.map +1 -1
  35. package/dist/core/composables/useLoading/index.d.ts.map +1 -1
  36. package/dist/core/composables/useNotifications/index.d.ts +1 -1
  37. package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
  38. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  39. package/dist/core/composables/useUser/index.d.ts +2 -2
  40. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  41. package/dist/core/plugins/i18n/index.d.ts +3 -0
  42. package/dist/core/plugins/i18n/index.d.ts.map +1 -0
  43. package/dist/core/plugins/index.d.ts +3 -1
  44. package/dist/core/plugins/index.d.ts.map +1 -1
  45. package/dist/core/plugins/modularity/index.d.ts +8 -0
  46. package/dist/core/plugins/modularity/index.d.ts.map +1 -0
  47. package/dist/core/plugins/moment/humanize.d.ts.map +1 -1
  48. package/dist/core/plugins/validation/index.d.ts +3 -1
  49. package/dist/core/plugins/validation/index.d.ts.map +1 -1
  50. package/dist/core/plugins/validation/rules.d.ts +32 -11
  51. package/dist/core/plugins/validation/rules.d.ts.map +1 -1
  52. package/dist/core/types/index.d.ts +5 -6
  53. package/dist/core/types/index.d.ts.map +1 -1
  54. package/dist/framework.esm.js +42553 -0
  55. package/dist/framework.js +74 -72
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
  58. package/dist/shared/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
  59. package/dist/shared/app-switcher/index.d.ts +2 -3
  60. package/dist/shared/app-switcher/index.d.ts.map +1 -1
  61. package/dist/shared/assets/components/index.d.ts +1 -1
  62. package/dist/shared/assets/components/index.d.ts.map +1 -1
  63. package/dist/shared/assets/index.d.ts +2 -3
  64. package/dist/shared/assets/index.d.ts.map +1 -1
  65. package/dist/shared/blade-navigation/composables/index.d.ts +1 -1
  66. package/dist/shared/blade-navigation/composables/index.d.ts.map +1 -1
  67. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts +2 -2
  68. package/dist/shared/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  69. package/dist/shared/blade-navigation/index.d.ts +2 -3
  70. package/dist/shared/blade-navigation/index.d.ts.map +1 -1
  71. package/dist/shared/blade-navigation/types/index.d.ts +1 -1
  72. package/dist/shared/blade-navigation/types/index.d.ts.map +1 -1
  73. package/dist/shared/index.d.ts +4 -1
  74. package/dist/shared/index.d.ts.map +1 -1
  75. package/dist/style.css +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/dist/ui/components/atoms/vc-badge/index.d.ts +3 -3
  78. package/dist/ui/components/atoms/vc-badge/index.d.ts.map +1 -1
  79. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts +20 -20
  80. package/dist/ui/components/atoms/vc-badge/vc-badge-model.d.ts.map +1 -1
  81. package/dist/ui/components/atoms/vc-button/index.d.ts +3 -3
  82. package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
  83. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts +30 -24
  84. package/dist/ui/components/atoms/vc-button/vc-button-model.d.ts.map +1 -1
  85. package/dist/ui/components/atoms/vc-card/index.d.ts +5 -0
  86. package/dist/ui/components/atoms/vc-card/index.d.ts.map +1 -0
  87. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts +33 -0
  88. package/dist/ui/components/atoms/vc-card/vc-card-model.d.ts.map +1 -0
  89. package/dist/ui/components/atoms/vc-checkbox/index.d.ts +5 -0
  90. package/dist/ui/components/atoms/vc-checkbox/index.d.ts.map +1 -0
  91. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts +31 -0
  92. package/dist/ui/components/atoms/vc-checkbox/vc-checkbox-model.d.ts.map +1 -0
  93. package/dist/ui/components/atoms/vc-col/index.d.ts +5 -0
  94. package/dist/ui/components/atoms/vc-col/index.d.ts.map +1 -0
  95. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts +13 -0
  96. package/dist/ui/components/atoms/vc-col/vc-col-model.d.ts.map +1 -0
  97. package/dist/ui/components/atoms/vc-container/index.d.ts +5 -0
  98. package/dist/ui/components/atoms/vc-container/index.d.ts.map +1 -0
  99. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts +25 -0
  100. package/dist/ui/components/atoms/vc-container/vc-container-model.d.ts.map +1 -0
  101. package/dist/ui/components/atoms/vc-hint/index.d.ts +2 -0
  102. package/dist/ui/components/atoms/vc-hint/index.d.ts.map +1 -0
  103. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts +5 -0
  104. package/dist/ui/components/atoms/vc-hint/vc-hint-model.d.ts.map +1 -0
  105. package/dist/ui/components/atoms/vc-icon/index.d.ts +5 -0
  106. package/dist/ui/components/atoms/vc-icon/index.d.ts.map +1 -0
  107. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts +17 -0
  108. package/dist/ui/components/atoms/vc-icon/vc-icon-model.d.ts.map +1 -0
  109. package/dist/ui/components/atoms/vc-image/index.d.ts +5 -0
  110. package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -0
  111. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts +38 -0
  112. package/dist/ui/components/atoms/vc-image/vc-image-model.d.ts.map +1 -0
  113. package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
  114. package/dist/ui/components/atoms/vc-info-row/index.d.ts +5 -0
  115. package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +1 -0
  116. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts +25 -0
  117. package/dist/ui/components/atoms/vc-info-row/vc-info-row-model.d.ts.map +1 -0
  118. package/dist/ui/components/atoms/vc-label/index.d.ts +5 -0
  119. package/dist/ui/components/atoms/vc-label/index.d.ts.map +1 -0
  120. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts +18 -0
  121. package/dist/ui/components/atoms/vc-label/vc-label-model.d.ts.map +1 -0
  122. package/dist/ui/components/atoms/vc-link/index.d.ts +5 -0
  123. package/dist/ui/components/atoms/vc-link/index.d.ts.map +1 -0
  124. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts +21 -0
  125. package/dist/ui/components/atoms/vc-link/vc-link-model.d.ts.map +1 -0
  126. package/dist/ui/components/atoms/vc-loading/index.d.ts +5 -0
  127. package/dist/ui/components/atoms/vc-loading/index.d.ts.map +1 -0
  128. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts +13 -0
  129. package/dist/ui/components/atoms/vc-loading/vc-loading-model.d.ts.map +1 -0
  130. package/dist/ui/components/atoms/vc-progress/index.d.ts +5 -0
  131. package/dist/ui/components/atoms/vc-progress/index.d.ts.map +1 -0
  132. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts +17 -0
  133. package/dist/ui/components/atoms/vc-progress/vc-progress-model.d.ts.map +1 -0
  134. package/dist/ui/components/atoms/vc-row/index.d.ts +2 -0
  135. package/dist/ui/components/atoms/vc-row/index.d.ts.map +1 -0
  136. package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts +5 -0
  137. package/dist/ui/components/atoms/vc-row/vc-row-model.d.ts.map +1 -0
  138. package/dist/ui/components/atoms/vc-status/index.d.ts +5 -0
  139. package/dist/ui/components/atoms/vc-status/index.d.ts.map +1 -0
  140. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts +21 -0
  141. package/dist/ui/components/atoms/vc-status/vc-status-model.d.ts.map +1 -0
  142. package/dist/ui/components/atoms/vc-status-icon/index.d.ts +5 -0
  143. package/dist/ui/components/atoms/vc-status-icon/index.d.ts.map +1 -0
  144. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts +13 -0
  145. package/dist/ui/components/atoms/vc-status-icon/vc-status-icon-model.d.ts.map +1 -0
  146. package/dist/ui/components/atoms/vc-switch/index.d.ts +5 -0
  147. package/dist/ui/components/atoms/vc-switch/index.d.ts.map +1 -0
  148. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts +30 -0
  149. package/dist/ui/components/atoms/vc-switch/vc-switch-model.d.ts.map +1 -0
  150. package/dist/ui/components/atoms/vc-widget/index.d.ts +5 -0
  151. package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -0
  152. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts +20 -0
  153. package/dist/ui/components/atoms/vc-widget/vc-widget-model.d.ts.map +1 -0
  154. package/dist/ui/components/index.d.ts +34 -34
  155. package/dist/ui/components/index.d.ts.map +1 -1
  156. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +5 -0
  157. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -0
  158. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts +19 -0
  159. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.d.ts.map +1 -0
  160. package/dist/ui/components/molecules/vc-editor/index.d.ts +5 -0
  161. package/dist/ui/components/molecules/vc-editor/index.d.ts.map +1 -0
  162. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts +33 -0
  163. package/dist/ui/components/molecules/vc-editor/vc-editor-model.d.ts.map +1 -0
  164. package/dist/ui/components/molecules/vc-file-upload/index.d.ts +5 -0
  165. package/dist/ui/components/molecules/vc-file-upload/index.d.ts.map +1 -0
  166. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts +34 -0
  167. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload-model.d.ts.map +1 -0
  168. package/dist/ui/components/molecules/vc-form/index.d.ts +2 -0
  169. package/dist/ui/components/molecules/vc-form/index.d.ts.map +1 -0
  170. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts +5 -0
  171. package/dist/ui/components/molecules/vc-form/vc-form-model.d.ts.map +1 -0
  172. package/dist/ui/components/molecules/vc-input/index.d.ts +3 -3
  173. package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
  174. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +48 -25
  175. package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
  176. package/dist/ui/components/molecules/vc-input-currency/index.d.ts +3 -3
  177. package/dist/ui/components/molecules/vc-input-currency/index.d.ts.map +1 -1
  178. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +36 -28
  179. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
  180. package/dist/ui/components/molecules/vc-notification/index.d.ts +5 -0
  181. package/dist/ui/components/molecules/vc-notification/index.d.ts.map +1 -0
  182. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts +18 -0
  183. package/dist/ui/components/molecules/vc-notification/vc-notification-model.d.ts.map +1 -0
  184. package/dist/ui/components/molecules/vc-pagination/index.d.ts +5 -0
  185. package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -0
  186. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts +25 -0
  187. package/dist/ui/components/molecules/vc-pagination/vc-pagination-model.d.ts.map +1 -0
  188. package/dist/ui/components/molecules/vc-rating/index.d.ts +5 -0
  189. package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -0
  190. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts +21 -0
  191. package/dist/ui/components/molecules/vc-rating/vc-rating-model.d.ts.map +1 -0
  192. package/dist/ui/components/molecules/vc-select/index.d.ts +3 -3
  193. package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
  194. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +67 -32
  195. package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
  196. package/dist/ui/components/molecules/vc-slider/index.d.ts +5 -0
  197. package/dist/ui/components/molecules/vc-slider/index.d.ts.map +1 -0
  198. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts +33 -0
  199. package/dist/ui/components/molecules/vc-slider/vc-slider-model.d.ts.map +1 -0
  200. package/dist/ui/components/molecules/vc-textarea/index.d.ts +5 -0
  201. package/dist/ui/components/molecules/vc-textarea/index.d.ts.map +1 -0
  202. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts +37 -0
  203. package/dist/ui/components/molecules/vc-textarea/vc-textarea-model.d.ts.map +1 -0
  204. package/dist/ui/components/organisms/vc-app/index.d.ts +5 -0
  205. package/dist/ui/components/organisms/vc-app/index.d.ts.map +1 -0
  206. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts +61 -0
  207. package/dist/ui/components/organisms/vc-app/vc-app-model.d.ts.map +1 -0
  208. package/dist/ui/components/organisms/vc-blade/index.d.ts +5 -0
  209. package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -0
  210. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts +34 -0
  211. package/dist/ui/components/organisms/vc-blade/vc-blade-model.d.ts.map +1 -0
  212. package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
  213. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts +5 -0
  214. package/dist/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -0
  215. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts +43 -0
  216. package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.d.ts.map +1 -0
  217. package/dist/ui/components/organisms/vc-gallery/index.d.ts +5 -0
  218. package/dist/ui/components/organisms/vc-gallery/index.d.ts.map +1 -0
  219. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts +74 -0
  220. package/dist/ui/components/organisms/vc-gallery/vc-gallery-model.d.ts.map +1 -0
  221. package/dist/ui/components/organisms/vc-login-form/index.d.ts +5 -0
  222. package/dist/ui/components/organisms/vc-login-form/index.d.ts.map +1 -0
  223. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts +15 -0
  224. package/dist/ui/components/organisms/vc-login-form/vc-login-form-model.d.ts.map +1 -0
  225. package/dist/ui/components/organisms/vc-popup/index.d.ts +5 -0
  226. package/dist/ui/components/organisms/vc-popup/index.d.ts.map +1 -0
  227. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts +22 -0
  228. package/dist/ui/components/organisms/vc-popup/vc-popup-model.d.ts.map +1 -0
  229. package/dist/ui/components/organisms/vc-table/index.d.ts +5 -0
  230. package/dist/ui/components/organisms/vc-table/index.d.ts.map +1 -0
  231. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts +135 -0
  232. package/dist/ui/components/organisms/vc-table/vc-table-model.d.ts.map +1 -0
  233. package/dist/ui/types/index.d.ts +76 -6
  234. package/dist/ui/types/index.d.ts.map +1 -1
  235. package/dist/ui/types/ts-helpers.d.ts +14 -4
  236. package/dist/ui/types/ts-helpers.d.ts.map +1 -1
  237. package/dist/ui/utils/index.d.ts +2 -0
  238. package/dist/ui/utils/index.d.ts.map +1 -0
  239. package/dist/ui/utils/types.d.ts +3 -0
  240. package/dist/ui/utils/types.d.ts.map +1 -0
  241. package/dist/vite.config.d.ts +1 -1
  242. package/dist/vite.config.d.ts.map +1 -1
  243. package/package.json +9 -11
  244. package/shared/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +3 -6
  245. package/shared/app-switcher/composables/useAppSwitcher/index.ts +3 -8
  246. package/shared/app-switcher/index.ts +3 -10
  247. package/shared/assets/components/assets-details/assets-details.vue +10 -31
  248. package/shared/assets/components/index.ts +1 -1
  249. package/shared/assets/index.ts +3 -15
  250. package/shared/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +2 -7
  251. package/shared/blade-navigation/composables/index.ts +1 -1
  252. package/shared/blade-navigation/composables/useBladeNavigation/index.ts +8 -37
  253. package/shared/blade-navigation/index.ts +3 -10
  254. package/shared/blade-navigation/types/index.ts +1 -1
  255. package/shared/index.ts +9 -11
  256. package/ui/components/atoms/vc-badge/index.ts +5 -5
  257. package/ui/components/atoms/vc-badge/vc-badge-model.ts +21 -20
  258. package/ui/components/atoms/vc-badge/vc-badge.vue +5 -11
  259. package/ui/components/atoms/vc-button/index.ts +5 -5
  260. package/ui/components/atoms/vc-button/vc-button-model.ts +31 -24
  261. package/ui/components/atoms/vc-button/vc-button.vue +9 -38
  262. package/ui/components/atoms/vc-card/index.ts +6 -0
  263. package/ui/components/atoms/vc-card/vc-card-model.ts +37 -0
  264. package/ui/components/atoms/vc-card/vc-card.vue +20 -36
  265. package/ui/components/atoms/vc-checkbox/index.ts +8 -0
  266. package/ui/components/atoms/vc-checkbox/vc-checkbox-model.ts +35 -0
  267. package/ui/components/atoms/vc-checkbox/vc-checkbox.vue +15 -30
  268. package/ui/components/atoms/vc-col/index.ts +5 -0
  269. package/ui/components/atoms/vc-col/vc-col-model.ts +15 -0
  270. package/ui/components/atoms/vc-col/vc-col.vue +2 -6
  271. package/ui/components/atoms/vc-container/index.ts +8 -0
  272. package/ui/components/atoms/vc-container/vc-container-model.ts +28 -0
  273. package/ui/components/atoms/vc-container/vc-container.vue +11 -26
  274. package/ui/components/atoms/vc-hint/index.ts +2 -0
  275. package/ui/components/atoms/vc-hint/vc-hint-model.ts +5 -0
  276. package/ui/components/atoms/vc-icon/index.ts +5 -0
  277. package/ui/components/atoms/vc-icon/vc-icon-model.ts +19 -0
  278. package/ui/components/atoms/vc-icon/vc-icon.vue +2 -8
  279. package/ui/components/atoms/vc-image/index.ts +7 -0
  280. package/ui/components/atoms/vc-image/vc-image-model.ts +41 -0
  281. package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -2
  282. package/ui/components/atoms/vc-image/vc-image.vue +12 -42
  283. package/ui/components/atoms/vc-info-row/index.ts +5 -0
  284. package/ui/components/atoms/vc-info-row/vc-info-row-model.ts +27 -0
  285. package/ui/components/atoms/vc-info-row/vc-info-row.vue +14 -24
  286. package/ui/components/atoms/vc-label/index.ts +5 -0
  287. package/ui/components/atoms/vc-label/vc-label-model.ts +20 -0
  288. package/ui/components/atoms/vc-label/vc-label.vue +11 -15
  289. package/ui/components/atoms/vc-link/index.ts +6 -0
  290. package/ui/components/atoms/vc-link/vc-link-model.ts +24 -0
  291. package/ui/components/atoms/vc-link/vc-link.vue +4 -11
  292. package/ui/components/atoms/vc-loading/index.ts +5 -0
  293. package/ui/components/atoms/vc-loading/vc-loading-model.ts +15 -0
  294. package/ui/components/atoms/vc-loading/vc-loading.vue +5 -11
  295. package/ui/components/atoms/vc-progress/index.ts +5 -0
  296. package/ui/components/atoms/vc-progress/vc-progress-model.ts +19 -0
  297. package/ui/components/atoms/vc-progress/vc-progress.vue +5 -20
  298. package/ui/components/atoms/vc-row/index.ts +2 -0
  299. package/ui/components/atoms/vc-row/vc-row-model.ts +5 -0
  300. package/ui/components/atoms/vc-status/index.ts +5 -0
  301. package/ui/components/atoms/vc-status/vc-status-model.ts +23 -0
  302. package/ui/components/atoms/vc-status/vc-status.vue +3 -21
  303. package/ui/components/atoms/vc-status-icon/index.ts +5 -0
  304. package/ui/components/atoms/vc-status-icon/vc-status-icon-model.ts +15 -0
  305. package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +11 -9
  306. package/ui/components/atoms/vc-switch/index.ts +7 -0
  307. package/ui/components/atoms/vc-switch/vc-switch-model.ts +34 -0
  308. package/ui/components/atoms/vc-switch/vc-switch.vue +12 -28
  309. package/ui/components/atoms/vc-widget/index.ts +7 -0
  310. package/ui/components/atoms/vc-widget/vc-widget-model.ts +23 -0
  311. package/ui/components/atoms/vc-widget/vc-widget.vue +15 -22
  312. package/ui/components/index.ts +34 -34
  313. package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +1 -1
  314. package/ui/components/molecules/vc-breadcrumbs/index.ts +5 -0
  315. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs-model.ts +23 -0
  316. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +6 -14
  317. package/ui/components/molecules/vc-editor/index.ts +7 -0
  318. package/ui/components/molecules/vc-editor/vc-editor-model.ts +37 -0
  319. package/ui/components/molecules/vc-editor/vc-editor.vue +25 -56
  320. package/ui/components/molecules/vc-file-upload/index.ts +8 -0
  321. package/ui/components/molecules/vc-file-upload/vc-file-upload-model.ts +37 -0
  322. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +11 -36
  323. package/ui/components/molecules/vc-form/index.ts +2 -0
  324. package/ui/components/molecules/vc-form/vc-form-model.ts +5 -0
  325. package/ui/components/molecules/vc-input/index.ts +5 -6
  326. package/ui/components/molecules/vc-input/vc-input-model.ts +53 -35
  327. package/ui/components/molecules/vc-input/vc-input.vue +41 -29
  328. package/ui/components/molecules/vc-input-currency/index.ts +4 -3
  329. package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +42 -32
  330. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +12 -7
  331. package/ui/components/molecules/vc-notification/index.ts +8 -0
  332. package/ui/components/molecules/vc-notification/vc-notification-model.ts +21 -0
  333. package/ui/components/molecules/vc-notification/vc-notification.vue +4 -13
  334. package/ui/components/molecules/vc-pagination/index.ts +8 -0
  335. package/ui/components/molecules/vc-pagination/vc-pagination-model.ts +29 -0
  336. package/ui/components/molecules/vc-pagination/vc-pagination.vue +21 -23
  337. package/ui/components/molecules/vc-rating/index.ts +5 -0
  338. package/ui/components/molecules/vc-rating/vc-rating-model.ts +23 -0
  339. package/ui/components/molecules/vc-rating/vc-rating.vue +11 -13
  340. package/ui/components/molecules/vc-select/index.ts +5 -5
  341. package/ui/components/molecules/vc-select/vc-select-model.ts +74 -44
  342. package/ui/components/molecules/vc-select/vc-select.vue +128 -173
  343. package/ui/components/molecules/vc-slider/index.ts +5 -0
  344. package/ui/components/molecules/vc-slider/vc-slider-model.ts +34 -0
  345. package/ui/components/molecules/vc-slider/vc-slider.vue +2 -26
  346. package/ui/components/molecules/vc-textarea/index.ts +8 -0
  347. package/ui/components/molecules/vc-textarea/vc-textarea-model.ts +41 -0
  348. package/ui/components/molecules/vc-textarea/vc-textarea.vue +19 -53
  349. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +16 -12
  350. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +13 -4
  351. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +18 -15
  352. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +11 -5
  353. package/ui/components/organisms/vc-app/index.ts +6 -0
  354. package/ui/components/organisms/vc-app/vc-app-model.ts +65 -0
  355. package/ui/components/organisms/vc-app/vc-app.vue +10 -52
  356. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +40 -40
  357. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +20 -14
  358. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -12
  359. package/ui/components/organisms/vc-blade/index.ts +7 -0
  360. package/ui/components/organisms/vc-blade/vc-blade-model.ts +37 -0
  361. package/ui/components/organisms/vc-blade/vc-blade.stories.ts +1 -2
  362. package/ui/components/organisms/vc-blade/vc-blade.vue +13 -40
  363. package/ui/components/organisms/vc-dynamic-property/index.ts +5 -0
  364. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property-model.ts +58 -0
  365. package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +101 -125
  366. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +41 -24
  367. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +16 -11
  368. package/ui/components/organisms/vc-gallery/index.ts +8 -0
  369. package/ui/components/organisms/vc-gallery/vc-gallery-model.ts +78 -0
  370. package/ui/components/organisms/vc-gallery/vc-gallery.vue +11 -88
  371. package/ui/components/organisms/vc-login-form/index.ts +5 -0
  372. package/ui/components/organisms/vc-login-form/vc-login-form-model.ts +16 -0
  373. package/ui/components/organisms/vc-login-form/vc-login-form.vue +2 -15
  374. package/ui/components/organisms/vc-popup/index.ts +7 -0
  375. package/ui/components/organisms/vc-popup/vc-popup-model.ts +25 -0
  376. package/ui/components/organisms/vc-popup/vc-popup.vue +7 -18
  377. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +21 -27
  378. package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +2 -6
  379. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +9 -3
  380. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +31 -43
  381. package/ui/components/organisms/vc-table/index.ts +7 -0
  382. package/ui/components/organisms/vc-table/vc-table-model.ts +116 -0
  383. package/ui/components/organisms/vc-table/vc-table.vue +108 -139
  384. package/ui/types/index.ts +106 -15
  385. package/ui/types/ts-helpers.ts +23 -3
  386. package/ui/utils/index.ts +1 -0
  387. package/ui/utils/types.ts +2 -0
  388. package/core/composables/useLogger/index.ts +0 -24
  389. package/dist/core/composables/useLogger/index.d.ts +0 -5
  390. package/dist/core/composables/useLogger/index.d.ts.map +0 -1
@@ -12,9 +12,17 @@
12
12
  ]"
13
13
  >
14
14
  <!-- Input label -->
15
- <VcLabel v-if="label" class="tw-mb-2" :required="required">
15
+ <VcLabel
16
+ v-if="label"
17
+ class="tw-mb-2"
18
+ :required="required"
19
+ >
16
20
  <span>{{ label }}</span>
17
- <template v-if="tooltip" v-slot:tooltip>{{ tooltip }}</template>
21
+ <template
22
+ v-if="tooltip"
23
+ v-slot:tooltip
24
+ >{{ tooltip }}</template
25
+ >
18
26
  </VcLabel>
19
27
 
20
28
  <div class="tw-flex tw-flex-nowrap tw-items-start">
@@ -25,9 +33,7 @@
25
33
  >
26
34
  <slot name="prepend"></slot>
27
35
  </div>
28
- <div
29
- class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-auto tw-relative"
30
- >
36
+ <div class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-auto tw-relative">
31
37
  <div class="vc-input__field-wrapper">
32
38
  <div class="tw-flex tw-flex-nowrap tw-flex-auto tw-h-full">
33
39
  <div
@@ -72,13 +78,14 @@
72
78
  {{ suffix }}
73
79
  </div>
74
80
  <div
75
- v-if="
76
- clearable && modelValue && !disabled && type !== 'password'
77
- "
81
+ v-if="clearable && modelValue && !disabled && type !== 'password'"
78
82
  class="vc-input__clear"
79
83
  @click="onReset"
80
84
  >
81
- <VcIcon size="s" icon="fas fa-times"></VcIcon>
85
+ <VcIcon
86
+ size="s"
87
+ icon="fas fa-times"
88
+ ></VcIcon>
82
89
  </div>
83
90
 
84
91
  <div
@@ -86,7 +93,10 @@
86
93
  v-if="type === 'password' && internalType === 'password'"
87
94
  @click="internalType = 'text'"
88
95
  >
89
- <VcIcon size="s" icon="fas fa-eye-slash"></VcIcon>
96
+ <VcIcon
97
+ size="s"
98
+ icon="fas fa-eye-slash"
99
+ ></VcIcon>
90
100
  </div>
91
101
 
92
102
  <div
@@ -94,7 +104,10 @@
94
104
  v-if="type === 'password' && internalType === 'text'"
95
105
  @click="internalType = 'password'"
96
106
  >
97
- <VcIcon size="s" icon="fas fa-eye"></VcIcon>
107
+ <VcIcon
108
+ size="s"
109
+ icon="fas fa-eye"
110
+ ></VcIcon>
98
111
  </div>
99
112
  </div>
100
113
 
@@ -116,20 +129,27 @@
116
129
  </div>
117
130
  </div>
118
131
  </div>
119
- <div
120
- class="tw-absolute tw-translate-y-full tw-left-0 tw-right-0 tw-bottom-0 tw-min-h-[20px]"
121
- >
122
- <Transition name="slide-up" mode="out-in">
132
+ <div class="tw-absolute tw-translate-y-full tw-left-0 tw-right-0 tw-bottom-0 tw-min-h-[20px]">
133
+ <Transition
134
+ name="slide-up"
135
+ mode="out-in"
136
+ >
123
137
  <div v-if="error">
124
138
  <slot name="error">
125
- <VcHint class="vc-input__error" v-if="errorMessage">
139
+ <VcHint
140
+ class="vc-input__error"
141
+ v-if="errorMessage"
142
+ >
126
143
  {{ errorMessage }}
127
144
  </VcHint>
128
145
  </slot>
129
146
  </div>
130
147
  <div v-else>
131
148
  <slot name="hint">
132
- <VcHint class="vc-input__desc" v-if="hint">
149
+ <VcHint
150
+ class="vc-input__desc"
151
+ v-if="hint"
152
+ >
133
153
  {{ hint }}
134
154
  </VcHint>
135
155
  </slot>
@@ -151,19 +171,11 @@
151
171
 
152
172
  <script lang="ts" setup>
153
173
  import { computed, ref, unref, watch } from "vue";
154
- import { VcInputProps } from "./vc-input-model";
174
+ import { inputEmits, inputProps } from "./vc-input-model";
155
175
 
156
- const props = withDefaults(defineProps<VcInputProps>(), {
157
- modelValue: null,
158
- clearable: false,
159
- required: false,
160
- disabled: false,
161
- type: "text",
162
- name: "Field",
163
- maxlength: "1024",
164
- });
176
+ const props = defineProps(inputProps);
165
177
 
166
- const emit = defineEmits(["update:modelValue"]);
178
+ const emit = defineEmits(inputEmits);
167
179
 
168
180
  let emitTimer;
169
181
  let emitValueFn;
@@ -194,7 +206,7 @@ function onInput(e: Event) {
194
206
  emitValue(newValue);
195
207
  }
196
208
 
197
- function emitValue(val) {
209
+ function emitValue(val: string) {
198
210
  emitValueFn = () => {
199
211
  if (props.modelValue !== val) {
200
212
  emit("update:modelValue", val);
@@ -1,8 +1,9 @@
1
1
  import { ComponentPublicInstance } from "vue";
2
- import { VcInputCurrencyProps } from "./vc-input-currency-model";
3
- import { ComponentConstructor } from "@/ui/types/ts-helpers";
2
+ import { VcInputCurrencyEmits, VcInputCurrencyProps } from "./vc-input-currency-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
4
  import InputCurrency from "./vc-input-currency.vue";
5
5
 
6
6
  export const VcInputCurrency: ComponentConstructor<
7
- ComponentPublicInstance<VcInputCurrencyProps>
7
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
+ ComponentPublicInstance<VcInputCurrencyProps, any, any, any, any, VcInputCurrencyEmits>
8
9
  > = InputCurrency;
@@ -1,114 +1,124 @@
1
- import { VNode } from "vue";
1
+ import { PropType, VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+ import { isString, isNumber } from "./../../../utils";
2
4
 
3
- export type OptionProp =
4
- | ((option: string | Record<string, unknown>) => string)
5
- | string
6
- | undefined;
5
+ export type OptionProp = ((option: string | Record<string, unknown>) => string) | string | undefined;
7
6
 
8
- export interface VcInputCurrencyProps {
7
+ export const inputCurrencyProps = {
9
8
  /**
10
9
  * Model of the currency component; Use with a listener for 'update:price' event OR use v-model:price directive
11
10
  */
12
- modelValue?: string | number | Date | null;
11
+ modelValue: [String, Number, Date],
13
12
  /**
14
13
  * Input label text
15
14
  */
16
- label?: string | undefined;
15
+ label: String,
17
16
  /**
18
17
  * Input placeholder text
19
18
  */
20
- placeholder?: string | undefined;
19
+ placeholder: String,
21
20
  /**
22
21
  * Input description (hint) text below input component
23
22
  */
24
- hint?: string | undefined;
23
+ hint: String,
25
24
  /**
26
25
  * Appends clearable icon when a value is set;
27
26
  * When clicked, model becomes null
28
27
  */
29
- clearable?: boolean | undefined;
28
+ clearable: Boolean,
30
29
  /**
31
30
  * Prefix
32
31
  */
33
- prefix?: string | undefined;
32
+ prefix: String,
34
33
  /**
35
34
  * Suffix
36
35
  */
37
- suffix?: string | undefined;
36
+ suffix: String,
38
37
  /**
39
38
  * Used to specify the name of the control; If not specified, it takes the value 'Field'
40
39
  */
41
- name?: string | undefined;
40
+ name: String,
42
41
  /**
43
42
  * Signals the user a process is in progress by displaying a spinner
44
43
  */
45
- loading?: boolean | undefined;
44
+ loading: Boolean,
46
45
  /**
47
46
  * Debounce amount (in milliseconds) for search input
48
47
  * Default: 0
49
48
  */
50
- debounce?: string | number | undefined;
49
+ debounce: {
50
+ type: [String, Number],
51
+ default: 0,
52
+ },
51
53
  /**
52
54
  * Put component in disabled mode
53
55
  */
54
- disabled?: boolean | undefined;
56
+ disabled: Boolean,
55
57
  /**
56
58
  * Focus field on initial component render
57
59
  */
58
- autofocus?: boolean | undefined;
60
+ autofocus: Boolean,
59
61
  /**
60
62
  * Does field have validation errors?
61
63
  */
62
- error?: boolean | undefined;
64
+ error: Boolean,
63
65
  /**
64
66
  * Validation error message (gets displayed only if 'error' is set to 'true')
65
67
  */
66
- errorMessage?: string | undefined;
68
+ errorMessage: String,
67
69
  /**
68
70
  * Specify a max length of model
69
71
  * Default value: 1024
70
72
  */
71
- maxlength?: string | number | undefined;
73
+ maxlength: [String, Number],
72
74
  /**
73
75
  * Input tooltip information
74
76
  */
75
- tooltip?: string | undefined;
77
+ tooltip: String,
76
78
  /**
77
79
  * Input required state
78
80
  */
79
- required?: boolean | undefined;
81
+ required: Boolean,
80
82
  /**
81
83
  * Option label
82
84
  */
83
- option?: string | undefined;
85
+ option: String,
84
86
  /**
85
87
  * Available options that the user can select from.
86
88
  * Default value: []
87
89
  */
88
- options?: any[] | undefined;
90
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
91
+ options: Array as PropType<any[]>,
89
92
  /**
90
93
  * Property of option which holds the 'value'
91
94
  * Default value: id
92
95
  * @param option The current option being processed
93
96
  * @returns Value of the current option
94
97
  */
95
- optionValue?: OptionProp;
98
+ optionValue: [Function, String] as PropType<OptionProp>,
96
99
  /**
97
100
  * Property of option which holds the 'label'
98
101
  * Default value: title
99
102
  * @param option The current option being processed
100
103
  * @returns Label of the current option
101
104
  */
102
- optionLabel?: OptionProp;
105
+ optionLabel: [Function, String] as PropType<OptionProp>,
106
+ };
107
+
108
+ export const inputCurrencyEmits = {
103
109
  /**
104
- * Emitted when the component needs to change the model; Is also used by v-model
105
- */
106
- "onUpdate:modelValue"?: (value: string | number | null) => void;
110
+ * Emitted when the component needs to change the model; Is also used by v-model
111
+ */
112
+ "update:modelValue": (value: string | number | null) => isString(value) || isNumber(value) || value === null,
107
113
  /**
108
114
  * Emitted when the component needs to change the options model; Is also used by v-model:option
109
115
  */
110
- "onUpdate:option"?: (value: string | number | null) => void;
111
- }
116
+ "update:option": (value: string | number | null) => isString(value) || isNumber(value) || value === null,
117
+ };
118
+
119
+ export type VcInputCurrencyProps = ExtractTypes<typeof inputCurrencyProps>;
120
+ export type VcInputCurrencyEmits = typeof inputCurrencyEmits;
121
+
112
122
  export interface VcInputCurrencySlots {
113
123
  /**
114
124
  * Slot for custom dropdown open handler
@@ -31,7 +31,10 @@
31
31
  @update:modelValue="$emit('update:modelValue', +$event)"
32
32
  >
33
33
  <template v-slot:append-inner>
34
- <slot name="button" :toggleHandler="toggleHandler">
34
+ <slot
35
+ name="button"
36
+ :toggleHandler="toggleHandler"
37
+ >
35
38
  <button
36
39
  class="tw-text-[#43b0e6] tw-not-italic tw-font-medium tw-text-[13px] tw-leading-[20px] tw-cursor-pointer"
37
40
  @click.stop.prevent="toggleHandler"
@@ -41,7 +44,11 @@
41
44
  </slot>
42
45
  </template>
43
46
  <template v-slot:control="{ placeholder }">
44
- <input type="text" ref="inputRef" :placeholder="placeholder" />
47
+ <input
48
+ type="text"
49
+ ref="inputRef"
50
+ :placeholder="placeholder"
51
+ />
45
52
  </template>
46
53
  </VcInput>
47
54
  </template>
@@ -49,15 +56,13 @@
49
56
  </template>
50
57
 
51
58
  <script lang="ts" setup>
52
- import { VcInputCurrencyProps } from "./vc-input-currency-model";
59
+ import { inputCurrencyEmits, inputCurrencyProps } from "./vc-input-currency-model";
53
60
  import { useCurrencyInput, CurrencyDisplay } from "vue-currency-input";
54
61
  import { watch } from "vue";
55
62
 
56
- const props = withDefaults(defineProps<VcInputCurrencyProps>(), {
57
- debounce: 0,
58
- });
63
+ const props = defineProps(inputCurrencyProps);
59
64
 
60
- defineEmits(["update:modelValue", "update:option"]);
65
+ defineEmits(inputCurrencyEmits);
61
66
 
62
67
  const { inputRef, setOptions } = useCurrencyInput({
63
68
  locale: navigator.language,
@@ -0,0 +1,8 @@
1
+ import { ComponentPublicInstance } from "vue";
2
+ import { VcNotificationEmits, VcNotificationProps } from "./vc-notification-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
+ import Notification from "./vc-notification.vue";
5
+ export const VcNotification: ComponentConstructor<
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ ComponentPublicInstance<VcNotificationProps, any, any, any, any, VcNotificationEmits>
8
+ > = Notification;
@@ -0,0 +1,21 @@
1
+ import { VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+
4
+ export const notificationProps = {
5
+ timeout: {
6
+ type: Number,
7
+ default: 0,
8
+ },
9
+ };
10
+
11
+ export const notificationEmits = {
12
+ dismiss: () => true,
13
+ expired: () => true,
14
+ };
15
+
16
+ export type VcNotificationProps = ExtractTypes<typeof notificationProps>;
17
+ export type VcNotificationEmits = typeof notificationEmits;
18
+
19
+ export interface VcNotificationSlots {
20
+ default: () => VNode[];
21
+ }
@@ -17,21 +17,12 @@
17
17
  </template>
18
18
 
19
19
  <script lang="ts" setup>
20
- import { VcIcon } from "@/ui/components";
20
+ import { VcIcon } from "./../../../components";
21
+ import { notificationEmits, notificationProps } from "./vc-notification-model";
21
22
 
22
- const props = defineProps({
23
- variant: {
24
- type: String,
25
- default: "info",
26
- },
23
+ const props = defineProps(notificationProps);
27
24
 
28
- timeout: {
29
- type: Number,
30
- default: 0,
31
- },
32
- });
33
-
34
- const emit = defineEmits(["dismiss", "expired"]);
25
+ const emit = defineEmits(notificationEmits);
35
26
 
36
27
  function Timer(callback: (...args: unknown[]) => unknown, delay: number) {
37
28
  let timerId: number;
@@ -0,0 +1,8 @@
1
+ import { ComponentPublicInstance } from "vue";
2
+ import { VcPaginationEmits, VcPaginationProps } from "./vc-pagination-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
+ import Pagination from "./vc-pagination.vue";
5
+ export const VcPagination: ComponentConstructor<
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ ComponentPublicInstance<VcPaginationProps, any, any, any, any, VcPaginationEmits>
8
+ > = Pagination;
@@ -0,0 +1,29 @@
1
+ import { VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+ import { isNumber } from "./../../../utils";
4
+
5
+ export const paginationProps = {
6
+ expanded: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
10
+ pages: {
11
+ type: Number,
12
+ default: 1,
13
+ },
14
+ currentPage: {
15
+ type: Number,
16
+ default: 1,
17
+ },
18
+ };
19
+
20
+ export const paginationEmits = {
21
+ itemClick: (pages: number) => isNumber(pages),
22
+ };
23
+
24
+ export type VcPaginationProps = ExtractTypes<typeof paginationProps>;
25
+ export type VcPaginationEmits = typeof paginationEmits;
26
+
27
+ export interface VcPaginationSlots {
28
+ default: () => VNode[];
29
+ }
@@ -8,7 +8,10 @@
8
8
  }"
9
9
  @click="currentPage !== 1 && $emit('itemClick', 1)"
10
10
  >
11
- <VcIcon size="xs" icon="fas fa-angle-double-left"></VcIcon>
11
+ <VcIcon
12
+ size="xs"
13
+ icon="fas fa-angle-double-left"
14
+ ></VcIcon>
12
15
  </div>
13
16
 
14
17
  <!-- To previous page arrow -->
@@ -19,7 +22,10 @@
19
22
  }"
20
23
  @click="currentPage !== 1 && $emit('itemClick', currentPage - 1)"
21
24
  >
22
- <VcIcon size="xs" icon="fas fa-arrow-left"></VcIcon>
25
+ <VcIcon
26
+ size="xs"
27
+ icon="fas fa-arrow-left"
28
+ ></VcIcon>
23
29
  </div>
24
30
 
25
31
  <template v-if="expanded && $isDesktop.value">
@@ -75,7 +81,10 @@
75
81
  }"
76
82
  @click="currentPage !== pages && $emit('itemClick', currentPage + 1)"
77
83
  >
78
- <VcIcon size="xs" icon="fas fa-arrow-right"></VcIcon>
84
+ <VcIcon
85
+ size="xs"
86
+ icon="fas fa-arrow-right"
87
+ ></VcIcon>
79
88
  </div>
80
89
 
81
90
  <!-- To last page chevron -->
@@ -86,32 +95,21 @@
86
95
  }"
87
96
  @click="currentPage !== pages && $emit('itemClick', pages)"
88
97
  >
89
- <VcIcon size="xs" icon="fas fa-angle-double-right"></VcIcon>
98
+ <VcIcon
99
+ size="xs"
100
+ icon="fas fa-angle-double-right"
101
+ ></VcIcon>
90
102
  </div>
91
103
  </div>
92
104
  </template>
93
105
 
94
106
  <script lang="ts" setup>
95
- import { VcIcon } from "@/ui/components";
107
+ import { VcIcon } from "./../../../components";
108
+ import { paginationEmits, paginationProps } from "./vc-pagination-model";
96
109
 
97
- defineProps({
98
- expanded: {
99
- type: Boolean,
100
- default: false,
101
- },
110
+ defineProps(paginationProps);
102
111
 
103
- pages: {
104
- type: Number,
105
- default: 1,
106
- },
107
-
108
- currentPage: {
109
- type: Number,
110
- default: 1,
111
- },
112
- });
113
-
114
- defineEmits(["itemClick"]);
112
+ defineEmits(paginationEmits);
115
113
  </script>
116
114
 
117
115
  <style lang="scss">
@@ -119,7 +117,7 @@ defineEmits(["itemClick"]);
119
117
  --pagination-item-width: 30px;
120
118
  --pagination-item-height: 30px;
121
119
  --pagination-item-color: #000000;
122
- --pagination-item-color-hover:tw- #000000;
120
+ --pagination-item-color-hover: #000000;
123
121
  --pagination-item-color-current: #ffffff;
124
122
  --pagination-item-color-disabled: #9c9c9c;
125
123
  --pagination-item-background-color: #ffffff;
@@ -0,0 +1,5 @@
1
+ import { ComponentPublicInstance } from "vue";
2
+ import { VcRatingProps } from "./vc-rating-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
+ import Rating from "./vc-rating.vue";
5
+ export const VcRating: ComponentConstructor<ComponentPublicInstance<VcRatingProps>> = Rating;
@@ -0,0 +1,23 @@
1
+ import { PropType, VNode } from "vue";
2
+ import { ExtractTypes } from "./../../../types/ts-helpers";
3
+
4
+ export const ratingProps = {
5
+ label: String,
6
+ placeholder: String,
7
+ tooltip: String,
8
+ rating: Number,
9
+ max: {
10
+ type: Number,
11
+ default: 5,
12
+ },
13
+ variant: {
14
+ type: String as PropType<"stars" | "star-and-text" | "text">,
15
+ default: "stars",
16
+ },
17
+ };
18
+
19
+ export type VcRatingProps = ExtractTypes<typeof ratingProps>;
20
+
21
+ export interface VcRatingSlots {
22
+ details: () => VNode[];
23
+ }
@@ -1,9 +1,15 @@
1
1
  <template>
2
2
  <div class="vc-rating">
3
3
  <!-- Rating label -->
4
- <VcLabel v-if="label" class="tw-mb-2">
4
+ <VcLabel
5
+ v-if="label"
6
+ class="tw-mb-2"
7
+ >
5
8
  <span>{{ label }}</span>
6
- <template v-if="tooltip" v-slot:tooltip>
9
+ <template
10
+ v-if="tooltip"
11
+ v-slot:tooltip
12
+ >
7
13
  <span v-html="tooltip"></span>
8
14
  </template>
9
15
  </VcLabel>
@@ -41,18 +47,10 @@
41
47
  </template>
42
48
 
43
49
  <script lang="ts" setup>
44
- import { VcIcon, VcLabel } from "@/ui/components";
50
+ import { VcIcon, VcLabel } from "./../../../components";
51
+ import { ratingProps } from "./vc-rating-model";
45
52
 
46
- export interface Props {
47
- label?: string;
48
- placeholder?: string;
49
- tooltip?: string;
50
- rating: number | undefined;
51
- max?: number;
52
- variant?: "stars" | "star-and-text" | "text";
53
- }
54
-
55
- withDefaults(defineProps<Props>(), { max: 5, variant: "stars" });
53
+ defineProps(ratingProps);
56
54
  </script>
57
55
 
58
56
  <style lang="scss">
@@ -1,8 +1,8 @@
1
1
  import { ComponentPublicInstance } from "vue";
2
- import { VcSelectProps } from "./vc-select-model";
3
- import { ComponentConstructor } from "@/ui/types/ts-helpers";
2
+ import { VcSelectProps, VcSelectEmits } from "./vc-select-model";
3
+ import { ComponentConstructor } from "./../../../types/ts-helpers";
4
4
  import Select from "./vc-select.vue";
5
5
 
6
- export const VcSelect: ComponentConstructor<
7
- ComponentPublicInstance<VcSelectProps>
8
- > = Select;
6
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
+ export const VcSelect: ComponentConstructor<ComponentPublicInstance<VcSelectProps, any, any, any, any, VcSelectEmits>> =
8
+ Select;