@finema/core 1.4.219 → 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.
- package/README.md +58 -39
- package/dist/module.d.mts +4 -24
- package/dist/module.json +4 -3
- package/dist/module.mjs +75 -213
- package/dist/runtime/components/App.vue +27 -0
- package/dist/runtime/components/App.vue.d.ts +12 -0
- package/dist/runtime/components/DevToolsWindow/index.vue +312 -0
- package/dist/runtime/components/DevToolsWindow/index.vue.d.ts +2 -0
- package/dist/runtime/components/Dialog/index.vue +67 -100
- package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
- package/dist/runtime/components/Empty.vue +29 -14
- package/dist/runtime/components/Empty.vue.d.ts +12 -0
- package/dist/runtime/components/FlexDeck/Base.vue +82 -87
- package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
- package/dist/runtime/components/FlexDeck/index.vue +38 -39
- package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
- package/dist/runtime/components/Form/FieldWrapper.vue +21 -9
- package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
- package/dist/runtime/components/Form/Fields.vue +84 -222
- package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +43 -18
- package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputCheckbox/types.d.ts +5 -1
- package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -1
- package/dist/runtime/components/Form/InputDateTime/index.vue +59 -30
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
- package/dist/runtime/components/Form/InputNumber/index.vue +51 -17
- package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputNumber/types.d.ts +10 -5
- package/dist/runtime/components/Form/InputSelect/index.vue +77 -37
- package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputSelect/types.d.ts +14 -8
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +91 -37
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputSelectMultiple/types.d.ts +9 -8
- package/dist/runtime/components/Form/InputText/index.vue +103 -36
- package/dist/runtime/components/Form/InputText/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputText/types.d.ts +4 -3
- package/dist/runtime/components/Form/InputTextarea/index.vue +43 -11
- package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputTextarea/types.d.ts +7 -2
- package/dist/runtime/components/Form/InputToggle/index.vue +41 -17
- package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputToggle/types.d.ts +5 -1
- package/dist/runtime/components/Form/index.vue +0 -1
- package/dist/runtime/components/Form/index.vue.d.ts +12 -0
- package/dist/runtime/components/Form/types.d.ts +13 -27
- package/dist/runtime/components/Image.vue +47 -32
- package/dist/runtime/components/Image.vue.d.ts +13 -0
- package/dist/runtime/components/Loader.vue +21 -19
- package/dist/runtime/components/Loader.vue.d.ts +22 -0
- package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +19 -16
- package/dist/runtime/components/Log/LogItem.vue.d.ts +6 -0
- package/dist/runtime/components/Log/index.vue +28 -0
- package/dist/runtime/components/Log/index.vue.d.ts +7 -0
- package/dist/runtime/components/Table/Base.vue +103 -98
- package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
- package/dist/runtime/components/Table/ColumnDate.vue +10 -12
- package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnDateTime.vue +11 -13
- package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnImage.vue +12 -11
- package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnNumber.vue +12 -12
- package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnText.vue +19 -24
- package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
- package/dist/runtime/components/Table/Simple.vue +41 -42
- package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
- package/dist/runtime/components/Table/index.vue +159 -46
- package/dist/runtime/components/Table/index.vue.d.ts +25 -0
- package/dist/runtime/components/Table/types.d.ts +14 -18
- package/dist/runtime/components/Table/{types.mjs → types.js} +1 -0
- package/dist/runtime/components/TeleportSafe.vue +31 -29
- package/dist/runtime/components/TeleportSafe.vue.d.ts +16 -0
- package/dist/runtime/composables/loaderList.d.ts +2 -2
- package/dist/runtime/composables/loaderList.js +51 -0
- package/dist/runtime/composables/loaderObject.d.ts +1 -1
- package/dist/runtime/composables/loaderObject.js +50 -0
- package/dist/runtime/composables/loaderPage.d.ts +10 -11
- package/dist/runtime/composables/loaderPage.js +243 -0
- package/dist/runtime/composables/useApp.d.ts +4 -9
- package/dist/runtime/composables/{useApp.mjs → useApp.js} +0 -12
- package/dist/runtime/composables/useConfig.d.ts +3 -3
- package/dist/runtime/composables/useConfig.js +12 -0
- package/dist/runtime/composables/useDialog.d.ts +1 -7
- package/dist/runtime/composables/useDialog.js +53 -0
- package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
- package/dist/runtime/composables/{useFlexDeck.mjs → useFlexDeck.js} +5 -5
- package/dist/runtime/composables/useForm.d.ts +5 -2
- package/dist/runtime/composables/useForm.js +37 -0
- package/dist/runtime/composables/useNotification.d.ts +6 -22
- package/dist/runtime/composables/{useNotification.mjs → useNotification.js} +5 -21
- package/dist/runtime/composables/useTable.d.ts +12 -11
- package/dist/runtime/composables/{useTable.mjs → useTable.js} +3 -8
- package/dist/runtime/composables/useUpload.d.ts +2 -2
- package/dist/runtime/composables/{useUpload.mjs → useUpload.js} +1 -1
- package/dist/runtime/helpers/apiBaseHelper.d.ts +29 -0
- package/dist/runtime/helpers/apiBaseHelper.js +63 -0
- package/dist/runtime/helpers/apiListHelper.d.ts +4 -6
- package/dist/runtime/helpers/apiListHelper.js +50 -0
- package/dist/runtime/helpers/apiObjectHelper.d.ts +19 -20
- package/dist/runtime/helpers/apiObjectHelper.js +51 -0
- package/dist/runtime/helpers/apiPageHelper.d.ts +44 -44
- package/dist/runtime/helpers/apiPageHelper.js +287 -0
- package/dist/runtime/helpers/componentHelper.d.ts +11 -12
- package/dist/runtime/helpers/{componentHelper.mjs → componentHelper.js} +2 -7
- package/dist/runtime/i18n/valibot.d.ts +69 -0
- package/dist/runtime/i18n/valibot.js +72 -0
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugin.js +12 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/button.d.ts +5 -0
- package/dist/runtime/theme/button.js +1 -0
- package/dist/runtime/theme/dialog.d.ts +31 -0
- package/dist/runtime/theme/dialog.js +21 -0
- package/dist/runtime/theme/empty.d.ts +7 -0
- package/dist/runtime/theme/empty.js +7 -0
- package/dist/runtime/theme/form.d.ts +18 -0
- package/dist/runtime/theme/form.js +16 -0
- package/dist/runtime/theme/index.d.ts +10 -0
- package/dist/runtime/theme/index.js +10 -0
- package/dist/runtime/theme/input.d.ts +8 -0
- package/dist/runtime/theme/input.js +4 -0
- package/dist/runtime/theme/inputNumber.d.ts +8 -0
- package/dist/runtime/theme/inputNumber.js +4 -0
- package/dist/runtime/theme/loader.d.ts +28 -0
- package/dist/runtime/theme/loader.js +18 -0
- package/dist/runtime/theme/selectMenu.d.ts +17 -0
- package/dist/runtime/theme/selectMenu.js +18 -0
- package/dist/runtime/theme/table.d.ts +10 -0
- package/dist/runtime/theme/table.js +10 -0
- package/dist/runtime/theme/textarea.d.ts +5 -0
- package/dist/runtime/theme/textarea.js +1 -0
- package/dist/runtime/types/lib.d.ts +1 -1
- package/dist/runtime/utils/ArrayHelper.d.ts +1 -1
- package/dist/runtime/utils/{ArrayHelper.mjs → ArrayHelper.js} +1 -1
- package/dist/runtime/utils/ObjectHelper.d.ts +3 -3
- package/dist/runtime/utils/{ObjectHelper.mjs → ObjectHelper.js} +3 -3
- package/dist/runtime/utils/ParamHelper.d.ts +1 -1
- package/dist/runtime/utils/{ParamHelper.mjs → ParamHelper.js} +1 -1
- package/dist/types.d.mts +2 -15
- package/package.json +54 -63
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -50
- package/dist/runtime/components/Alert.vue +0 -48
- package/dist/runtime/components/Avatar.vue +0 -27
- package/dist/runtime/components/Badge.vue +0 -11
- package/dist/runtime/components/Breadcrumb.vue +0 -44
- package/dist/runtime/components/Button/Group.vue +0 -37
- package/dist/runtime/components/Button/index.vue +0 -75
- package/dist/runtime/components/Card.vue +0 -38
- package/dist/runtime/components/Core.vue +0 -45
- package/dist/runtime/components/Dropdown/index.vue +0 -70
- package/dist/runtime/components/Dropdown/types.d.ts +0 -2
- package/dist/runtime/components/Dropdown/types.mjs +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/date_range_time_field.types.d.ts +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +0 -91
- package/dist/runtime/components/Form/InputRadio/index.vue +0 -27
- package/dist/runtime/components/Form/InputRadio/types.d.ts +0 -8
- package/dist/runtime/components/Form/InputStatic/index.vue +0 -16
- package/dist/runtime/components/Form/InputStatic/types.d.ts +0 -4
- package/dist/runtime/components/Form/InputTags/index.vue +0 -141
- package/dist/runtime/components/Form/InputTags/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputTextarea/types.mjs +0 -0
- package/dist/runtime/components/Form/InputToggle/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +0 -206
- package/dist/runtime/components/Form/InputUploadDropzone/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputUploadDropzone/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +0 -362
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +0 -241
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +0 -110
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +0 -171
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +0 -161
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +0 -64
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +0 -178
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.d.ts +0 -21
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +0 -95
- package/dist/runtime/components/Form/InputUploadFileClassic/types.d.ts +0 -13
- package/dist/runtime/components/Form/InputUploadFileClassic/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +0 -151
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.d.ts +0 -18
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +0 -219
- package/dist/runtime/components/Form/InputUploadImageAuto/types.d.ts +0 -20
- package/dist/runtime/components/Form/InputUploadImageAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -55
- package/dist/runtime/components/Form/InputWYSIWYG/index.vue +0 -230
- package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +0 -19
- package/dist/runtime/components/Form/InputWYSIWYG/types.mjs +0 -0
- package/dist/runtime/components/Icon.vue +0 -23
- package/dist/runtime/components/Log.vue +0 -22
- package/dist/runtime/components/Modal/index.vue +0 -146
- package/dist/runtime/components/OTPInput.vue +0 -127
- package/dist/runtime/components/QRCode.vue +0 -22
- package/dist/runtime/components/SimplePagination.vue +0 -96
- package/dist/runtime/components/Slideover/index.vue +0 -110
- package/dist/runtime/components/Tabs/index.vue +0 -64
- package/dist/runtime/composables/loaderList.mjs +0 -52
- package/dist/runtime/composables/loaderObject.mjs +0 -52
- package/dist/runtime/composables/loaderPage.mjs +0 -229
- package/dist/runtime/composables/useConfig.mjs +0 -9
- package/dist/runtime/composables/useDialog.mjs +0 -81
- package/dist/runtime/composables/useForm.mjs +0 -18
- package/dist/runtime/core.config.d.ts +0 -14
- package/dist/runtime/core.config.mjs +0 -14
- package/dist/runtime/helpers/apiListHelper.mjs +0 -44
- package/dist/runtime/helpers/apiObjectHelper.mjs +0 -46
- package/dist/runtime/helpers/apiPageHelper.mjs +0 -270
- package/dist/runtime/plugin.mjs +0 -149
- package/dist/runtime/types/common.mjs +0 -0
- package/dist/runtime/types/config.d.ts +0 -1
- package/dist/runtime/types/config.mjs +0 -0
- package/dist/runtime/types/lib.mjs +0 -0
- package/dist/runtime/ui.config/alert.d.ts +0 -3
- package/dist/runtime/ui.config/alert.mjs +0 -6
- package/dist/runtime/ui.config/badge.d.ts +0 -3
- package/dist/runtime/ui.config/badge.mjs +0 -1
- package/dist/runtime/ui.config/breadcrumb.d.ts +0 -1
- package/dist/runtime/ui.config/breadcrumb.mjs +0 -7
- package/dist/runtime/ui.config/button.d.ts +0 -3
- package/dist/runtime/ui.config/button.mjs +0 -8
- package/dist/runtime/ui.config/buttonGroup.d.ts +0 -3
- package/dist/runtime/ui.config/buttonGroup.mjs +0 -1
- package/dist/runtime/ui.config/card.d.ts +0 -1
- package/dist/runtime/ui.config/card.mjs +0 -2
- package/dist/runtime/ui.config/checkbox.d.ts +0 -3
- package/dist/runtime/ui.config/checkbox.mjs +0 -1
- package/dist/runtime/ui.config/formGroup.d.ts +0 -3
- package/dist/runtime/ui.config/formGroup.mjs +0 -5
- package/dist/runtime/ui.config/icon.d.ts +0 -3
- package/dist/runtime/ui.config/icon.mjs +0 -3
- package/dist/runtime/ui.config/index.d.ts +0 -16
- package/dist/runtime/ui.config/index.mjs +0 -16
- package/dist/runtime/ui.config/input.d.ts +0 -3
- package/dist/runtime/ui.config/input.mjs +0 -5
- package/dist/runtime/ui.config/modal.d.ts +0 -1
- package/dist/runtime/ui.config/modal.mjs +0 -34
- package/dist/runtime/ui.config/notification.d.ts +0 -11
- package/dist/runtime/ui.config/notification.mjs +0 -13
- package/dist/runtime/ui.config/notifications.d.ts +0 -3
- package/dist/runtime/ui.config/notifications.mjs +0 -3
- package/dist/runtime/ui.config/pagination.d.ts +0 -3
- package/dist/runtime/ui.config/pagination.mjs +0 -37
- package/dist/runtime/ui.config/select.d.ts +0 -3
- package/dist/runtime/ui.config/select.mjs +0 -5
- package/dist/runtime/ui.config/selectMenu.d.ts +0 -3
- package/dist/runtime/ui.config/selectMenu.mjs +0 -5
- package/dist/runtime/ui.config/slideover.d.ts +0 -1
- package/dist/runtime/ui.config/slideover.mjs +0 -16
- package/dist/runtime/ui.config/table.d.ts +0 -3
- package/dist/runtime/ui.config/table.mjs +0 -47
- package/dist/runtime/ui.config/tabs.d.ts +0 -3
- package/dist/runtime/ui.config/tabs.mjs +0 -4
- package/dist/runtime/ui.config/tags.d.ts +0 -25
- package/dist/runtime/ui.config/tags.mjs +0 -25
- package/dist/runtime/ui.config/textarea.d.ts +0 -3
- package/dist/runtime/ui.config/textarea.mjs +0 -5
- package/dist/runtime/ui.config/toggle.d.ts +0 -3
- package/dist/runtime/ui.config/toggle.mjs +0 -5
- package/dist/runtime/ui.config/uploadDropzoneImage.d.ts +0 -83
- package/dist/runtime/ui.config/uploadDropzoneImage.mjs +0 -26
- package/dist/runtime/ui.config/uploadFileDropzone.d.ts +0 -61
- package/dist/runtime/ui.config/uploadFileDropzone.mjs +0 -61
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.d.ts +0 -8
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.mjs +0 -8
- package/dist/runtime/ui.config/uploadImage.d.ts +0 -34
- package/dist/runtime/ui.config/uploadImage.mjs +0 -36
- package/dist/runtime/ui.css +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.mjs +0 -112
- package/dist/runtime/utils/FileHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/FileHelper.spec.mjs +0 -14
- package/dist/runtime/utils/ObjectHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ObjectHelper.spec.mjs +0 -52
- package/dist/runtime/utils/ParamHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ParamHelper.spec.mjs +0 -78
- package/dist/runtime/utils/StringHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/StringHelper.spec.mjs +0 -76
- package/dist/runtime/utils/TimeHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.spec.mjs +0 -79
- package/dist/runtime/utils/TimeHelper.thai.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.thai.spec.mjs +0 -31
- package/dist/types.d.ts +0 -16
- package/dist/runtime/components/FlexDeck/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputCheckbox/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputDateTime/{date_time_field.types.mjs → date_time_field.types.js} +0 -0
- package/dist/runtime/components/Form/{InputDateTimeRange/date_range_time_field.types.mjs → InputNumber/types.js} +0 -0
- package/dist/runtime/components/Form/{InputNumber/types.mjs → InputSelect/types.js} +0 -0
- package/dist/runtime/components/Form/{InputRadio/types.mjs → InputSelectMultiple/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelect/types.mjs → InputText/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelectMultiple/types.mjs → InputTextarea/types.js} +0 -0
- package/dist/runtime/components/Form/{InputStatic/types.mjs → InputToggle/types.js} +0 -0
- package/dist/runtime/components/Form/{types.mjs → types.js} +0 -0
- package/dist/runtime/composables/{useWatch.mjs → useWatch.js} +0 -0
- package/dist/runtime/lib/{Requester.mjs → Requester.js} +0 -0
- package/dist/runtime/{components/Form/InputTags/types.mjs → types/common.js} +0 -0
- package/dist/runtime/{components/Form/InputText/types.mjs → types/lib.js} +0 -0
- package/dist/runtime/utils/{FileHelper.mjs → FileHelper.js} +0 -0
- package/dist/runtime/utils/{StringHelper.mjs → StringHelper.js} +0 -0
- package/dist/runtime/utils/{TimeHelper.mjs → TimeHelper.js} +1 -1
- /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
package/README.md
CHANGED
|
@@ -1,60 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
2
3
|
|
|
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
|
+
-->
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
https://gitlab.finema.co/finema/nuxt3-template-with-uikit
|
|
10
|
+
# Finema UI Kit
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
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]
|
|
10
16
|
|
|
11
|
-
|
|
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.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
- [📖 Storybook](https://your-storybook-url.com) <!-- Add a link to your Storybook -->
|
|
21
|
+
- [🕹️ Playground](#playground)
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your UI kit provides here -->
|
|
26
|
+
- 🎨 Wide range of customizable components, built for Vue and Nuxt
|
|
27
|
+
- 📱 Responsive design out-of-the-box
|
|
28
|
+
- ♿ Accessibility focused
|
|
29
|
+
- 🛠️ Easy to integrate and use with Nuxt auto-import capabilities
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
yarn add --dev @finema/core
|
|
31
|
+
## 🚀 Installation
|
|
21
32
|
|
|
33
|
+
Install the UI kit in your project using npm or yarn:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install @finema/core
|
|
22
37
|
```
|
|
23
38
|
|
|
24
|
-
|
|
39
|
+
or
|
|
25
40
|
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
modules: [
|
|
29
|
-
'@finema/core'
|
|
30
|
-
]
|
|
31
|
-
})
|
|
41
|
+
```bash
|
|
42
|
+
yarn add @finema/core
|
|
32
43
|
```
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
## 🛠️ Available Scripts
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
In the project directory, you can run the following scripts:
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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).
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
pnpm dev:prepare
|
|
56
|
+
## 🕹️ Playground
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
pnpm dev
|
|
58
|
+
This project includes a `playground` directory that you can use to test and experiment with the UI components.
|
|
47
59
|
|
|
48
|
-
|
|
49
|
-
|
|
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`.
|
|
50
64
|
|
|
51
|
-
|
|
52
|
-
pnpm lint
|
|
65
|
+
## 🤝 Contributing
|
|
53
66
|
|
|
54
|
-
|
|
55
|
-
pnpm test
|
|
56
|
-
pnpm test:watch
|
|
67
|
+
Contributions are welcome! Please refer to the `CONTRIBUTING.md` file for guidelines. (You'll need to create this file).
|
|
57
68
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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?:
|
|
24
|
+
core?: Partial<typeof core>;
|
|
46
25
|
}
|
|
47
26
|
}
|
|
48
27
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
49
28
|
|
|
50
|
-
export {
|
|
29
|
+
export { _default as default };
|
|
30
|
+
export type { ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,52 +1,13 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
|
-
import
|
|
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.
|
|
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
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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(
|
|
70
|
+
async setup(_options, _nuxt) {
|
|
211
71
|
const { resolve } = createResolver(import.meta.url);
|
|
212
72
|
const runtimeDir = resolve("./runtime");
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
252
|
-
);
|
|
253
|
-
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
await installModule("@pinia/nuxt");
|
|
116
|
+
await installModule(
|
|
117
|
+
"@vee-validate/nuxt",
|
|
254
118
|
{
|
|
255
|
-
|
|
256
|
-
|
|
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("
|
|
262
|
-
|
|
263
|
-
|
|
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:
|
|
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
|
+
};
|