@finema/core 1.4.220 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +79 -60
  2. package/dist/module.d.mts +4 -24
  3. package/dist/module.json +4 -3
  4. package/dist/module.mjs +75 -213
  5. package/dist/runtime/components/App.vue +27 -0
  6. package/dist/runtime/components/App.vue.d.ts +12 -0
  7. package/dist/runtime/components/DevToolsWindow/index.vue +312 -0
  8. package/dist/runtime/components/DevToolsWindow/index.vue.d.ts +2 -0
  9. package/dist/runtime/components/Dialog/index.vue +77 -110
  10. package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
  11. package/dist/runtime/components/Empty.vue +33 -18
  12. package/dist/runtime/components/Empty.vue.d.ts +12 -0
  13. package/dist/runtime/components/FlexDeck/Base.vue +154 -159
  14. package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
  15. package/dist/runtime/components/FlexDeck/index.vue +67 -68
  16. package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
  17. package/dist/runtime/components/Form/FieldWrapper.vue +35 -23
  18. package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
  19. package/dist/runtime/components/Form/Fields.vue +92 -230
  20. package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
  21. package/dist/runtime/components/Form/InputCheckbox/index.vue +53 -28
  22. package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +3 -0
  23. package/dist/runtime/components/Form/InputCheckbox/types.d.ts +5 -1
  24. package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -1
  25. package/dist/runtime/components/Form/InputDateTime/index.vue +97 -68
  26. package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
  27. package/dist/runtime/components/Form/InputNumber/index.vue +61 -27
  28. package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +5 -0
  29. package/dist/runtime/components/Form/InputNumber/types.d.ts +10 -5
  30. package/dist/runtime/components/Form/InputSelect/index.vue +95 -55
  31. package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +5 -0
  32. package/dist/runtime/components/Form/InputSelect/types.d.ts +14 -8
  33. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +108 -54
  34. package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +3 -0
  35. package/dist/runtime/components/Form/InputSelectMultiple/types.d.ts +9 -8
  36. package/dist/runtime/components/Form/InputText/index.vue +135 -68
  37. package/dist/runtime/components/Form/InputText/index.vue.d.ts +5 -0
  38. package/dist/runtime/components/Form/InputText/types.d.ts +4 -3
  39. package/dist/runtime/components/Form/InputTextarea/index.vue +57 -25
  40. package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +3 -0
  41. package/dist/runtime/components/Form/InputTextarea/types.d.ts +7 -2
  42. package/dist/runtime/components/Form/InputToggle/index.vue +51 -27
  43. package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +3 -0
  44. package/dist/runtime/components/Form/InputToggle/types.d.ts +5 -1
  45. package/dist/runtime/components/Form/index.vue +5 -6
  46. package/dist/runtime/components/Form/index.vue.d.ts +12 -0
  47. package/dist/runtime/components/Form/types.d.ts +13 -27
  48. package/dist/runtime/components/Image.vue +51 -36
  49. package/dist/runtime/components/Image.vue.d.ts +13 -0
  50. package/dist/runtime/components/Loader.vue +29 -27
  51. package/dist/runtime/components/Loader.vue.d.ts +22 -0
  52. package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +44 -41
  53. package/dist/runtime/components/Log/LogItem.vue.d.ts +6 -0
  54. package/dist/runtime/components/Log/index.vue +28 -0
  55. package/dist/runtime/components/Log/index.vue.d.ts +7 -0
  56. package/dist/runtime/components/Table/Base.vue +166 -161
  57. package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
  58. package/dist/runtime/components/Table/ColumnDate.vue +14 -16
  59. package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
  60. package/dist/runtime/components/Table/ColumnDateTime.vue +16 -18
  61. package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
  62. package/dist/runtime/components/Table/ColumnImage.vue +16 -15
  63. package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
  64. package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
  65. package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
  66. package/dist/runtime/components/Table/ColumnText.vue +24 -29
  67. package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
  68. package/dist/runtime/components/Table/Simple.vue +69 -70
  69. package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
  70. package/dist/runtime/components/Table/index.vue +178 -65
  71. package/dist/runtime/components/Table/index.vue.d.ts +25 -0
  72. package/dist/runtime/components/Table/types.d.ts +14 -18
  73. package/dist/runtime/components/Table/{types.mjs → types.js} +1 -0
  74. package/dist/runtime/components/TeleportSafe.vue +42 -40
  75. package/dist/runtime/components/TeleportSafe.vue.d.ts +16 -0
  76. package/dist/runtime/composables/loaderList.d.ts +2 -2
  77. package/dist/runtime/composables/loaderList.js +51 -0
  78. package/dist/runtime/composables/loaderObject.d.ts +1 -1
  79. package/dist/runtime/composables/loaderObject.js +50 -0
  80. package/dist/runtime/composables/loaderPage.d.ts +10 -11
  81. package/dist/runtime/composables/loaderPage.js +243 -0
  82. package/dist/runtime/composables/useApp.d.ts +4 -9
  83. package/dist/runtime/composables/{useApp.mjs → useApp.js} +0 -12
  84. package/dist/runtime/composables/useConfig.d.ts +3 -3
  85. package/dist/runtime/composables/useConfig.js +12 -0
  86. package/dist/runtime/composables/useDialog.d.ts +1 -7
  87. package/dist/runtime/composables/useDialog.js +53 -0
  88. package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
  89. package/dist/runtime/composables/{useFlexDeck.mjs → useFlexDeck.js} +5 -5
  90. package/dist/runtime/composables/useForm.d.ts +5 -2
  91. package/dist/runtime/composables/useForm.js +37 -0
  92. package/dist/runtime/composables/useNotification.d.ts +6 -22
  93. package/dist/runtime/composables/{useNotification.mjs → useNotification.js} +5 -21
  94. package/dist/runtime/composables/useTable.d.ts +12 -11
  95. package/dist/runtime/composables/{useTable.mjs → useTable.js} +3 -8
  96. package/dist/runtime/composables/useUpload.d.ts +2 -2
  97. package/dist/runtime/composables/{useUpload.mjs → useUpload.js} +1 -1
  98. package/dist/runtime/helpers/apiBaseHelper.d.ts +29 -0
  99. package/dist/runtime/helpers/apiBaseHelper.js +63 -0
  100. package/dist/runtime/helpers/apiListHelper.d.ts +4 -6
  101. package/dist/runtime/helpers/apiListHelper.js +50 -0
  102. package/dist/runtime/helpers/apiObjectHelper.d.ts +19 -20
  103. package/dist/runtime/helpers/apiObjectHelper.js +51 -0
  104. package/dist/runtime/helpers/apiPageHelper.d.ts +44 -44
  105. package/dist/runtime/helpers/apiPageHelper.js +287 -0
  106. package/dist/runtime/helpers/componentHelper.d.ts +11 -12
  107. package/dist/runtime/helpers/{componentHelper.mjs → componentHelper.js} +2 -7
  108. package/dist/runtime/i18n/valibot.d.ts +69 -0
  109. package/dist/runtime/i18n/valibot.js +72 -0
  110. package/dist/runtime/plugin.d.ts +1 -1
  111. package/dist/runtime/plugin.js +12 -0
  112. package/dist/runtime/server/tsconfig.json +3 -0
  113. package/dist/runtime/theme/button.d.ts +5 -0
  114. package/dist/runtime/theme/button.js +1 -0
  115. package/dist/runtime/theme/dialog.d.ts +31 -0
  116. package/dist/runtime/theme/dialog.js +21 -0
  117. package/dist/runtime/theme/empty.d.ts +7 -0
  118. package/dist/runtime/theme/empty.js +7 -0
  119. package/dist/runtime/theme/form.d.ts +18 -0
  120. package/dist/runtime/theme/form.js +16 -0
  121. package/dist/runtime/theme/index.d.ts +10 -0
  122. package/dist/runtime/theme/index.js +10 -0
  123. package/dist/runtime/theme/input.d.ts +8 -0
  124. package/dist/runtime/theme/input.js +4 -0
  125. package/dist/runtime/theme/inputNumber.d.ts +8 -0
  126. package/dist/runtime/theme/inputNumber.js +4 -0
  127. package/dist/runtime/theme/loader.d.ts +28 -0
  128. package/dist/runtime/theme/loader.js +18 -0
  129. package/dist/runtime/theme/selectMenu.d.ts +17 -0
  130. package/dist/runtime/theme/selectMenu.js +18 -0
  131. package/dist/runtime/theme/table.d.ts +10 -0
  132. package/dist/runtime/theme/table.js +10 -0
  133. package/dist/runtime/theme/textarea.d.ts +5 -0
  134. package/dist/runtime/theme/textarea.js +1 -0
  135. package/dist/runtime/types/lib.d.ts +1 -1
  136. package/dist/runtime/utils/ArrayHelper.d.ts +1 -1
  137. package/dist/runtime/utils/{ArrayHelper.mjs → ArrayHelper.js} +1 -1
  138. package/dist/runtime/utils/ObjectHelper.d.ts +3 -3
  139. package/dist/runtime/utils/{ObjectHelper.mjs → ObjectHelper.js} +3 -3
  140. package/dist/runtime/utils/ParamHelper.d.ts +1 -1
  141. package/dist/runtime/utils/{ParamHelper.mjs → ParamHelper.js} +1 -1
  142. package/dist/types.d.mts +2 -15
  143. package/package.json +91 -100
  144. package/dist/module.cjs +0 -5
  145. package/dist/module.d.ts +0 -50
  146. package/dist/runtime/components/Alert.vue +0 -48
  147. package/dist/runtime/components/Avatar.vue +0 -27
  148. package/dist/runtime/components/Badge.vue +0 -11
  149. package/dist/runtime/components/Breadcrumb.vue +0 -44
  150. package/dist/runtime/components/Button/Group.vue +0 -37
  151. package/dist/runtime/components/Button/index.vue +0 -75
  152. package/dist/runtime/components/Card.vue +0 -38
  153. package/dist/runtime/components/Core.vue +0 -45
  154. package/dist/runtime/components/Dropdown/index.vue +0 -70
  155. package/dist/runtime/components/Dropdown/types.d.ts +0 -2
  156. package/dist/runtime/components/Dropdown/types.mjs +0 -17
  157. package/dist/runtime/components/Form/InputDateTimeRange/date_range_time_field.types.d.ts +0 -17
  158. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +0 -91
  159. package/dist/runtime/components/Form/InputRadio/index.vue +0 -27
  160. package/dist/runtime/components/Form/InputRadio/types.d.ts +0 -8
  161. package/dist/runtime/components/Form/InputStatic/index.vue +0 -16
  162. package/dist/runtime/components/Form/InputStatic/types.d.ts +0 -4
  163. package/dist/runtime/components/Form/InputTags/index.vue +0 -141
  164. package/dist/runtime/components/Form/InputTags/types.d.ts +0 -11
  165. package/dist/runtime/components/Form/InputTextarea/types.mjs +0 -0
  166. package/dist/runtime/components/Form/InputToggle/types.mjs +0 -0
  167. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +0 -206
  168. package/dist/runtime/components/Form/InputUploadDropzone/types.d.ts +0 -11
  169. package/dist/runtime/components/Form/InputUploadDropzone/types.mjs +0 -0
  170. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +0 -362
  171. package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.d.ts +0 -23
  172. package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.mjs +0 -0
  173. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +0 -241
  174. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +0 -110
  175. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +0 -171
  176. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.d.ts +0 -23
  177. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.mjs +0 -0
  178. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +0 -161
  179. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +0 -64
  180. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +0 -178
  181. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.d.ts +0 -21
  182. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.mjs +0 -0
  183. package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +0 -95
  184. package/dist/runtime/components/Form/InputUploadFileClassic/types.d.ts +0 -13
  185. package/dist/runtime/components/Form/InputUploadFileClassic/types.mjs +0 -0
  186. package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +0 -151
  187. package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.d.ts +0 -18
  188. package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.mjs +0 -0
  189. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +0 -219
  190. package/dist/runtime/components/Form/InputUploadImageAuto/types.d.ts +0 -20
  191. package/dist/runtime/components/Form/InputUploadImageAuto/types.mjs +0 -0
  192. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -55
  193. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +0 -230
  194. package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +0 -19
  195. package/dist/runtime/components/Form/InputWYSIWYG/types.mjs +0 -0
  196. package/dist/runtime/components/Icon.vue +0 -23
  197. package/dist/runtime/components/Log.vue +0 -22
  198. package/dist/runtime/components/Modal/index.vue +0 -146
  199. package/dist/runtime/components/OTPInput.vue +0 -127
  200. package/dist/runtime/components/QRCode.vue +0 -22
  201. package/dist/runtime/components/SimplePagination.vue +0 -96
  202. package/dist/runtime/components/Slideover/index.vue +0 -110
  203. package/dist/runtime/components/Tabs/index.vue +0 -64
  204. package/dist/runtime/composables/loaderList.mjs +0 -52
  205. package/dist/runtime/composables/loaderObject.mjs +0 -52
  206. package/dist/runtime/composables/loaderPage.mjs +0 -229
  207. package/dist/runtime/composables/useConfig.mjs +0 -9
  208. package/dist/runtime/composables/useDialog.mjs +0 -81
  209. package/dist/runtime/composables/useForm.mjs +0 -18
  210. package/dist/runtime/core.config.d.ts +0 -14
  211. package/dist/runtime/core.config.mjs +0 -14
  212. package/dist/runtime/helpers/apiListHelper.mjs +0 -44
  213. package/dist/runtime/helpers/apiObjectHelper.mjs +0 -46
  214. package/dist/runtime/helpers/apiPageHelper.mjs +0 -270
  215. package/dist/runtime/plugin.mjs +0 -149
  216. package/dist/runtime/types/common.mjs +0 -0
  217. package/dist/runtime/types/config.d.ts +0 -1
  218. package/dist/runtime/types/config.mjs +0 -0
  219. package/dist/runtime/types/lib.mjs +0 -0
  220. package/dist/runtime/ui.config/alert.d.ts +0 -3
  221. package/dist/runtime/ui.config/alert.mjs +0 -6
  222. package/dist/runtime/ui.config/badge.d.ts +0 -3
  223. package/dist/runtime/ui.config/badge.mjs +0 -1
  224. package/dist/runtime/ui.config/breadcrumb.d.ts +0 -1
  225. package/dist/runtime/ui.config/breadcrumb.mjs +0 -7
  226. package/dist/runtime/ui.config/button.d.ts +0 -3
  227. package/dist/runtime/ui.config/button.mjs +0 -8
  228. package/dist/runtime/ui.config/buttonGroup.d.ts +0 -3
  229. package/dist/runtime/ui.config/buttonGroup.mjs +0 -1
  230. package/dist/runtime/ui.config/card.d.ts +0 -1
  231. package/dist/runtime/ui.config/card.mjs +0 -2
  232. package/dist/runtime/ui.config/checkbox.d.ts +0 -3
  233. package/dist/runtime/ui.config/checkbox.mjs +0 -1
  234. package/dist/runtime/ui.config/formGroup.d.ts +0 -3
  235. package/dist/runtime/ui.config/formGroup.mjs +0 -5
  236. package/dist/runtime/ui.config/icon.d.ts +0 -3
  237. package/dist/runtime/ui.config/icon.mjs +0 -3
  238. package/dist/runtime/ui.config/index.d.ts +0 -16
  239. package/dist/runtime/ui.config/index.mjs +0 -16
  240. package/dist/runtime/ui.config/input.d.ts +0 -3
  241. package/dist/runtime/ui.config/input.mjs +0 -5
  242. package/dist/runtime/ui.config/modal.d.ts +0 -1
  243. package/dist/runtime/ui.config/modal.mjs +0 -34
  244. package/dist/runtime/ui.config/notification.d.ts +0 -11
  245. package/dist/runtime/ui.config/notification.mjs +0 -13
  246. package/dist/runtime/ui.config/notifications.d.ts +0 -3
  247. package/dist/runtime/ui.config/notifications.mjs +0 -3
  248. package/dist/runtime/ui.config/pagination.d.ts +0 -3
  249. package/dist/runtime/ui.config/pagination.mjs +0 -37
  250. package/dist/runtime/ui.config/select.d.ts +0 -3
  251. package/dist/runtime/ui.config/select.mjs +0 -5
  252. package/dist/runtime/ui.config/selectMenu.d.ts +0 -3
  253. package/dist/runtime/ui.config/selectMenu.mjs +0 -5
  254. package/dist/runtime/ui.config/slideover.d.ts +0 -1
  255. package/dist/runtime/ui.config/slideover.mjs +0 -16
  256. package/dist/runtime/ui.config/table.d.ts +0 -3
  257. package/dist/runtime/ui.config/table.mjs +0 -47
  258. package/dist/runtime/ui.config/tabs.d.ts +0 -3
  259. package/dist/runtime/ui.config/tabs.mjs +0 -4
  260. package/dist/runtime/ui.config/tags.d.ts +0 -25
  261. package/dist/runtime/ui.config/tags.mjs +0 -25
  262. package/dist/runtime/ui.config/textarea.d.ts +0 -3
  263. package/dist/runtime/ui.config/textarea.mjs +0 -5
  264. package/dist/runtime/ui.config/toggle.d.ts +0 -3
  265. package/dist/runtime/ui.config/toggle.mjs +0 -5
  266. package/dist/runtime/ui.config/uploadDropzoneImage.d.ts +0 -83
  267. package/dist/runtime/ui.config/uploadDropzoneImage.mjs +0 -26
  268. package/dist/runtime/ui.config/uploadFileDropzone.d.ts +0 -61
  269. package/dist/runtime/ui.config/uploadFileDropzone.mjs +0 -61
  270. package/dist/runtime/ui.config/uploadFileInputClassicAuto.d.ts +0 -8
  271. package/dist/runtime/ui.config/uploadFileInputClassicAuto.mjs +0 -8
  272. package/dist/runtime/ui.config/uploadImage.d.ts +0 -34
  273. package/dist/runtime/ui.config/uploadImage.mjs +0 -36
  274. package/dist/runtime/ui.css +0 -1
  275. package/dist/runtime/utils/ArrayHelper.spec.d.ts +0 -1
  276. package/dist/runtime/utils/ArrayHelper.spec.mjs +0 -112
  277. package/dist/runtime/utils/FileHelper.spec.d.ts +0 -1
  278. package/dist/runtime/utils/FileHelper.spec.mjs +0 -14
  279. package/dist/runtime/utils/ObjectHelper.spec.d.ts +0 -1
  280. package/dist/runtime/utils/ObjectHelper.spec.mjs +0 -52
  281. package/dist/runtime/utils/ParamHelper.spec.d.ts +0 -1
  282. package/dist/runtime/utils/ParamHelper.spec.mjs +0 -78
  283. package/dist/runtime/utils/StringHelper.spec.d.ts +0 -1
  284. package/dist/runtime/utils/StringHelper.spec.mjs +0 -76
  285. package/dist/runtime/utils/TimeHelper.spec.d.ts +0 -1
  286. package/dist/runtime/utils/TimeHelper.spec.mjs +0 -79
  287. package/dist/runtime/utils/TimeHelper.thai.spec.d.ts +0 -1
  288. package/dist/runtime/utils/TimeHelper.thai.spec.mjs +0 -31
  289. package/dist/types.d.ts +0 -16
  290. package/dist/runtime/components/FlexDeck/{types.mjs → types.js} +0 -0
  291. package/dist/runtime/components/Form/InputCheckbox/{types.mjs → types.js} +0 -0
  292. package/dist/runtime/components/Form/InputDateTime/{date_time_field.types.mjs → date_time_field.types.js} +0 -0
  293. package/dist/runtime/components/Form/{InputDateTimeRange/date_range_time_field.types.mjs → InputNumber/types.js} +0 -0
  294. package/dist/runtime/components/Form/{InputNumber/types.mjs → InputSelect/types.js} +0 -0
  295. package/dist/runtime/components/Form/{InputRadio/types.mjs → InputSelectMultiple/types.js} +0 -0
  296. package/dist/runtime/components/Form/{InputSelect/types.mjs → InputText/types.js} +0 -0
  297. package/dist/runtime/components/Form/{InputSelectMultiple/types.mjs → InputTextarea/types.js} +0 -0
  298. package/dist/runtime/components/Form/{InputStatic/types.mjs → InputToggle/types.js} +0 -0
  299. package/dist/runtime/components/Form/{types.mjs → types.js} +0 -0
  300. package/dist/runtime/composables/{useWatch.mjs → useWatch.js} +0 -0
  301. package/dist/runtime/lib/{Requester.mjs → Requester.js} +0 -0
  302. package/dist/runtime/{components/Form/InputTags/types.mjs → types/common.js} +0 -0
  303. package/dist/runtime/{components/Form/InputText/types.mjs → types/lib.js} +0 -0
  304. package/dist/runtime/utils/{FileHelper.mjs → FileHelper.js} +0 -0
  305. package/dist/runtime/utils/{StringHelper.mjs → StringHelper.js} +0 -0
  306. package/dist/runtime/utils/{TimeHelper.mjs → TimeHelper.js} +1 -1
  307. /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
package/README.md CHANGED
@@ -1,60 +1,79 @@
1
- # @finema/core Nuxt Module
2
-
3
- [✨  Release Notes](/CHANGELOG.md)
4
-
5
- ## Starter template
6
- https://gitlab.finema.co/finema/nuxt3-template-with-uikit
7
-
8
- ## Remark
9
- - Temporary use resolutions for vue 3.3.13 instead of ^3.4.0 due to [this issue](https://github.com/nuxt/ui/issues/1171) and planned to be fixed in the next vue 3.5 version.
10
-
11
- ## Quick Setup
12
-
13
- 1. Add `@finema/core` dependency to your project
14
-
15
- ```bash
16
- # Using pnpm
17
- pnpm add -D @finema/core
18
-
19
- # Using yarn
20
- yarn add --dev @finema/core
21
-
22
- ```
23
-
24
- 1. Add `@finema/core` to the `modules` section of `nuxt.config.ts`
25
-
26
- ```js
27
- export default defineNuxtConfig({
28
- modules: [
29
- '@finema/core'
30
- ]
31
- })
32
- ```
33
-
34
- That's it! You can now use @finema/core in your Nuxt app ✨
35
-
36
- ## Development
37
-
38
- ```bash
39
- # Install dependencies
40
- pnpm install
41
-
42
- # Generate type stubs
43
- pnpm dev:prepare
44
-
45
- # Develop with the playground
46
- pnpm dev
47
-
48
- # Build the playground
49
- pnpm dev:build
50
-
51
- # Run ESLint
52
- pnpm lint
53
-
54
- # Run Vitest
55
- pnpm test
56
- pnpm test:watch
57
-
58
- # Release new version
59
- pnpm release
60
- ```
1
+ <!--
2
+ Get your module up and running quickly.
3
+
4
+ Find and replace all on all files (CMD+SHIFT+F):
5
+ - Name: Finema UI Kit (Note: package.json has name: @finema/core, consider aligning these)
6
+ - Package name: @finema/core
7
+ - Description: A comprehensive UI kit for Finema projects.
8
+ -->
9
+
10
+ # Finema UI Kit
11
+
12
+ [![npm version][npm-version-src]][npm-version-href]
13
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
14
+ [![License][license-src]][license-href]
15
+ [![Nuxt][nuxt-src]][nuxt-href]
16
+
17
+ A comprehensive UI kit for building consistent and beautiful user interfaces for Finema projects, designed to integrate seamlessly with Nuxt. This package is named `@finema/core` on npm.
18
+
19
+ - [✨ &nbsp;Release Notes](/CHANGELOG.md)
20
+ - [📖 &nbsp;Storybook](https://your-storybook-url.com) <!-- Add a link to your Storybook -->
21
+ - [🕹️ &nbsp;Playground](#playground)
22
+
23
+ ## Features
24
+
25
+ <!-- Highlight some of the features your UI kit provides here -->
26
+ - 🎨 &nbsp;Wide range of customizable components, built for Vue and Nuxt
27
+ - 📱 &nbsp;Responsive design out-of-the-box
28
+ - ♿ &nbsp;Accessibility focused
29
+ - 🛠️ &nbsp;Easy to integrate and use with Nuxt auto-import capabilities
30
+
31
+ ## 🚀 Installation
32
+
33
+ Install the UI kit in your project using npm or yarn:
34
+
35
+ ```bash
36
+ npm install @finema/core
37
+ ```
38
+
39
+ or
40
+
41
+ ```bash
42
+ yarn add @finema/core
43
+ ```
44
+
45
+ ## 🛠️ Available Scripts
46
+
47
+ In the project directory, you can run the following scripts:
48
+
49
+ - `npm run dev` or `yarn dev`: Runs the playground app in development mode.
50
+ - `npm run dev:build` or `yarn dev:build`: Builds the playground app.
51
+ - `npm run dev:prepare` or `yarn dev:prepare`: Prepares the development environment.
52
+ - `npm run lint` or `yarn lint`: Lints the codebase.
53
+ - `npm run test` or `yarn test`: Runs tests.
54
+ - `npm run release` or `yarn release`: Creates a new release (lints, tests, builds, publishes).
55
+
56
+ ## 🕹️ Playground
57
+
58
+ This project includes a `playground` directory that you can use to test and experiment with the UI components.
59
+
60
+ To run the playground:
61
+ 1. Navigate to the `playground` directory.
62
+ 2. Install dependencies if you haven't already (`npm install` or `yarn install`).
63
+ 3. Run `npm run dev` or `yarn dev`.
64
+
65
+ ## 🤝 Contributing
66
+
67
+ Contributions are welcome! Please refer to the `CONTRIBUTING.md` file for guidelines. (You'll need to create this file).
68
+
69
+ <!--
70
+ Badge URLs - Keep these at the bottom of the file for better readability
71
+ -->
72
+ [npm-version-src]: https://img.shields.io/npm/v/@finema/core.svg
73
+ [npm-version-href]: https://npmjs.com/package/@finema/core
74
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@finema/core.svg
75
+ [npm-downloads-href]: https://npmjs.com/package/@finema/core
76
+ [license-src]: https://img.shields.io/npm/l/@finema/core.svg
77
+ [license-href]: https://npmjs.com/package/@finema/core
78
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-00DC82?logo=nuxt.js
79
+ [nuxt-href]: https://nuxt.com
package/dist/module.d.mts CHANGED
@@ -11,40 +11,20 @@ declare const core: {
11
11
  is_thai_year: boolean;
12
12
  is_thai_month: boolean;
13
13
  site_name: string;
14
+ color: string;
14
15
  is_simple_pagination: boolean;
15
16
  time_zone: string;
16
17
  };
17
18
 
18
- declare const config_core: typeof core;
19
- declare namespace config {
20
- export { config_core as core };
21
- }
22
-
23
19
  interface ModuleOptions {
24
- /**
25
- * @default ''
26
- */
27
20
  prefix?: string;
28
- /**
29
- * @default false
30
- */
31
- global?: boolean;
32
- securityDisabled?: boolean;
33
- }
34
- type CORE = {
35
- strategy?: 'merge' | 'override';
36
- [key: string]: any;
37
- } & Partial<typeof config>;
38
- declare module 'nuxt/schema' {
39
- interface AppConfigInput {
40
- core?: CORE;
41
- }
42
21
  }
43
22
  declare module '@nuxt/schema' {
44
23
  interface AppConfigInput {
45
- core?: CORE;
24
+ core?: Partial<typeof core>;
46
25
  }
47
26
  }
48
27
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
49
28
 
50
- export { type ModuleOptions, _default as default };
29
+ export { _default as default };
30
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@finema/core",
3
- "version": "1.4.220",
3
+ "version": "2.1.0",
4
4
  "configKey": "core",
5
- "compatibility": {
6
- "nuxt": "^3.7.4"
5
+ "builder": {
6
+ "@nuxt/module-builder": "1.0.1",
7
+ "unbuild": "3.5.0"
7
8
  }
8
9
  }
package/dist/module.mjs CHANGED
@@ -1,52 +1,13 @@
1
1
  import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
2
- import { defu } from 'defu';
2
+ import defu from 'defu';
3
+ import * as theme from '../dist/runtime/theme/index.js';
3
4
 
4
5
  const name = "@finema/core";
5
- const version = "1.4.220";
6
+ const version = "2.1.0";
6
7
 
7
- const colorModeOptions = {
8
- preference: "light"
9
- };
10
- const veeValidateNuxtOptions = {
11
- // disable or enable auto imports
12
- autoImports: true,
13
- // Use different names for components
14
- componentNames: {
15
- Form: "VForm",
16
- Field: "VField",
17
- FieldArray: "VFieldArray",
18
- ErrorMessage: "VErrorMessage"
19
- }
20
- };
21
- const nuxtSecurityOptions = {
22
- headers: {
23
- xXSSProtection: "1; mode=block",
24
- crossOriginEmbedderPolicy: "unsafe-none",
25
- contentSecurityPolicy: {
26
- "img-src": ["*", "'self'", "data:", "https", "blob:"],
27
- "script-src": [
28
- "'self'",
29
- "'unsafe-inline'",
30
- "https://www.google-analytics.com",
31
- "https://www.googletagmanager.com",
32
- "https://fonts.googleapis.com",
33
- "https://cdnjs.cloudflare.com"
34
- ],
35
- "script-src-attr": [
36
- "'unsafe-inline'",
37
- "https://www.google-analytics.com",
38
- "https://www.googletagmanager.com",
39
- "https://fonts.googleapis.com",
40
- "https://cdnjs.cloudflare.com"
41
- ]
42
- }
43
- }
44
- };
45
8
  const nuxtAppOptions = {
46
9
  head: {
47
- htmlAttrs: {
48
- lang: "en"
49
- },
10
+ htmlAttrs: { lang: "en" },
50
11
  meta: [
51
12
  { charset: "utf-8" },
52
13
  {
@@ -64,24 +25,6 @@ const nuxtAppOptions = {
64
25
  }
65
26
  ],
66
27
  link: [
67
- {
68
- rel: "preconnect",
69
- href: "https://fonts.googleapis.com"
70
- },
71
- {
72
- rel: "preconnect",
73
- href: "https://fonts.gstatic.com",
74
- crossorigin: ""
75
- },
76
- {
77
- rel: "dns-prefetch",
78
- href: "https://www.google-analytics.com/"
79
- },
80
- {
81
- rel: "preconnect",
82
- href: "https://www.google-analytics.com/",
83
- crossorigin: ""
84
- },
85
28
  {
86
29
  rel: "icon",
87
30
  type: "image/x-icon",
@@ -100,177 +43,96 @@ const nuxtRunTimeConfigOptions = {
100
43
  }
101
44
  };
102
45
 
103
- const colors = {
104
- black: "#20243E",
105
- white: "#FFFFFF",
106
- dark: {
107
- DEFAULT: "#20243E",
108
- 50: "#6D7280",
109
- 100: "#505050"
110
- },
111
- light: {
112
- DEFAULT: "#FAFAFA"
113
- },
114
- gray: {
115
- DEFAULT: "#9095A6",
116
- disabled: "#C1C4D0",
117
- border: "#E2E4EA",
118
- fill: "#F4F5FA",
119
- 50: "#E0E0E0",
120
- 600: "#616161",
121
- 700: "#757575"
122
- },
123
- cool: {
124
- DEFAULT: "#9095A6",
125
- disabled: "#C1C4D0",
126
- border: "#E2E4EA",
127
- fill: "#F4F5FA",
128
- 50: "#E0E0E0",
129
- 600: "#616161",
130
- 700: "#757575"
131
- },
132
- secondary: {
133
- DEFAULT: "#EE8B36",
134
- 50: "#fdf1e7",
135
- 100: "#f9d6b8",
136
- 200: "#f5bb89",
137
- 300: "#f1a05a",
138
- 400: "#ed852b",
139
- 500: "#d46b12",
140
- 600: "#a5540e",
141
- 700: "#763c0a",
142
- 800: "#472406",
143
- 900: "#180c02"
144
- },
145
- info: {
146
- DEFAULT: "#0D8CEE",
147
- 50: "#F3F9FE",
148
- 100: "#E7F4FD",
149
- 200: "#EBF6FF",
150
- 300: "#9ED1F8",
151
- 400: "#56AFF3",
152
- 500: "#0D8CEE",
153
- 600: "#0C7ED6",
154
- 700: "#08548F",
155
- 800: "#063F6B",
156
- 900: "#042A47"
157
- },
158
- danger: {
159
- DEFAULT: "#F25555",
160
- 50: "#FEF7F7",
161
- 100: "#FEEEEE",
162
- 200: "#FFDFDF",
163
- 300: "#FABBBB",
164
- 400: "#F68888",
165
- 500: "#F25555",
166
- 600: "#DA4D4D",
167
- 700: "#913333",
168
- 800: "#6D2626",
169
- 900: "#491A1A"
170
- },
171
- success: {
172
- DEFAULT: "#3FB061",
173
- 50: "#F5FBF7",
174
- 100: "#ECF7EF",
175
- 200: "#DAEEE0",
176
- 300: "#B2DFC0",
177
- 400: "#79C890",
178
- 500: "#3FB061",
179
- 600: "#399E57",
180
- 700: "#266A3A",
181
- 800: "#1C4F2C",
182
- 900: "#13351D"
183
- },
184
- warning: {
185
- DEFAULT: "#FF9A35",
186
- 50: "#FFFAF5",
187
- 100: "#FFF5EB",
188
- 200: "#FEF1CC",
189
- 300: "#FFD7AE",
190
- 400: "#FFB872",
191
- 500: "#FF9A35",
192
- 600: "#E68B30",
193
- 700: "#995C20",
194
- 800: "#734518",
195
- 900: "#4D2E10"
196
- }
46
+ const core = {
47
+ limit_per_page: 30,
48
+ default_primary_key: "id",
49
+ time_format: "HH:mm",
50
+ date_format: "dd-MM-yyyy",
51
+ date_time_format: "dd-MM-yyyy HH:mm",
52
+ date_format_system: "yyyy-MM-dd",
53
+ date_time_format_system: "yyyy-MM-dd HH:mm",
54
+ is_thai_year: false,
55
+ is_thai_month: false,
56
+ site_name: "",
57
+ color: "#3675FB",
58
+ is_simple_pagination: false,
59
+ time_zone: "Asia/Bangkok"
197
60
  };
198
61
 
199
62
  const module = defineNuxtModule({
200
63
  meta: {
201
64
  name,
202
65
  version,
203
- configKey: "core",
204
- compatibility: {
205
- nuxt: "^3.7.4"
206
- }
66
+ configKey: "core"
207
67
  },
208
68
  // Default configuration options of the Nuxt module
209
69
  defaults: {},
210
- async setup(options, nuxt) {
70
+ async setup(_options, _nuxt) {
211
71
  const { resolve } = createResolver(import.meta.url);
212
72
  const runtimeDir = resolve("./runtime");
213
- nuxt.options.build.transpile.push(runtimeDir);
214
- nuxt.options.alias["#core"] = runtimeDir;
215
- nuxt.options.css.push(resolve(runtimeDir, "ui.css"));
216
- nuxt.hook("tailwindcss:config", (tailwindConfig) => {
217
- tailwindConfig.theme.extend.colors = defu(colors, tailwindConfig.theme.extend.colors);
218
- tailwindConfig.content = defu(
219
- {
220
- files: [
221
- ...tailwindConfig.content.files || [],
222
- resolve(runtimeDir, "components/**/*.{vue,mjs,ts}"),
223
- resolve(runtimeDir, "composables/**/*.{vue,mjs,ts}"),
224
- resolve(runtimeDir, "ui.config/**/*.{mjs,js,ts}")
225
- ]
226
- },
227
- tailwindConfig.content
228
- );
229
- });
73
+ const stylesDir = resolve("./styles");
74
+ _nuxt.options.build.transpile.push(runtimeDir);
75
+ _nuxt.options.alias["#core"] = runtimeDir;
76
+ _nuxt.options.css.push(resolve(stylesDir, "main.css"));
77
+ _nuxt.options.app = defu(nuxtAppOptions, _nuxt.options.app);
78
+ _nuxt.options.runtimeConfig = defu(
79
+ nuxtRunTimeConfigOptions,
80
+ _nuxt.options.runtimeConfig
81
+ );
82
+ _nuxt.options.appConfig.core = defu(
83
+ _nuxt.options.appConfig.core || {},
84
+ core
85
+ );
86
+ _nuxt.options.colorMode = { preference: "light" };
87
+ _nuxt.options.appConfig.ui = {
88
+ colors: {
89
+ primary: "main",
90
+ secondary: "secondary",
91
+ tertiary: "tertiary",
92
+ success: "success",
93
+ info: "info",
94
+ warning: "warning",
95
+ error: "error",
96
+ neutral: "slate"
97
+ },
98
+ ...theme
99
+ };
230
100
  await installModule("@nuxt/ui", {
231
- safelistColors: ["secondary", "success", "info", "danger", "warning"]
232
- });
233
- await installModule("nuxt-lodash", {
234
- prefix: "_",
235
- upperAfterPrefix: false
236
- });
237
- nuxt.options.app = defu(nuxtAppOptions, nuxt.options.app);
238
- nuxt.options.colorMode = defu(colorModeOptions, nuxt.options.colorMode);
239
- nuxt.options.devtools = defu({ enabled: true }, nuxt.options.devtools);
240
- nuxt.options.runtimeConfig = defu(nuxtRunTimeConfigOptions, nuxt.options.runtimeConfig);
241
- nuxt.options.build = defu(
242
- {
243
- transpile: [
244
- ...nuxt.options.build?.transpile || [],
245
- "date-fns",
246
- "date-fns-tz",
247
- "@vuepic/vue-datepicker",
248
- "defu"
101
+ prefix: "",
102
+ colorMode: false,
103
+ theme: {
104
+ colors: [
105
+ "primary",
106
+ "secondary",
107
+ "tertiary",
108
+ "info",
109
+ "success",
110
+ "warning",
111
+ "error"
249
112
  ]
250
- },
251
- nuxt.options.build
252
- );
253
- nuxt.options.vite = defu(
113
+ }
114
+ });
115
+ await installModule("@pinia/nuxt");
116
+ await installModule(
117
+ "@vee-validate/nuxt",
254
118
  {
255
- optimizeDeps: {
256
- include: [...nuxt.options.vite?.optimizeDeps?.include || [], "@wdns/vue-code-block"]
119
+ autoImports: true,
120
+ componentNames: {
121
+ Form: "VForm",
122
+ Field: "VField",
123
+ FieldArray: "VFieldArray",
124
+ ErrorMessage: "VErrorMessage"
257
125
  }
258
- },
259
- nuxt.options.vite
126
+ }
260
127
  );
261
- await installModule("@pinia/nuxt");
262
- await installModule("@vee-validate/nuxt", veeValidateNuxtOptions);
263
- if (!options.securityDisabled) {
264
- await installModule("nuxt-security", nuxtSecurityOptions);
265
- }
266
- addPlugin({
267
- src: resolve(runtimeDir, "plugin")
128
+ await installModule("nuxt-lodash", {
129
+ prefix: "_",
130
+ upperAfterPrefix: false
268
131
  });
132
+ addPlugin(resolve("./runtime/plugin"));
269
133
  void addComponentsDir({
270
134
  path: resolve(runtimeDir, "components"),
271
- prefix: options.prefix,
272
- global: options.global,
273
- watch: false
135
+ prefix: _options.prefix
274
136
  });
275
137
  addImportsDir(resolve(runtimeDir, "composables"));
276
138
  addImportsDir(resolve(runtimeDir, "utils"));
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <NuxtLoadingIndicator :color="coreConfig.color" />
3
+ <UApp :locale="th">
4
+ <slot />
5
+ </UApp>
6
+ <DevOnly>
7
+ <DevToolsWindow />
8
+ </DevOnly>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { th } from "@nuxt/ui/locale";
13
+ import UApp from "#ui/components/App";
14
+ import { useHead } from "#imports";
15
+ import { useCoreConfig } from "#core/composables/useConfig";
16
+ import DevToolsWindow from "#core/components/DevToolsWindow/index.vue";
17
+ const coreConfig = useCoreConfig();
18
+ useHead({
19
+ titleTemplate: (titleChunk) => {
20
+ return titleChunk ? `${titleChunk} %separator %siteName` : "%siteName";
21
+ },
22
+ templateParams: {
23
+ siteName: coreConfig.site_name,
24
+ separator: "-"
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,12 @@
1
+ declare var __VLS_9: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_9) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };