@finema/core 1.4.205 → 1.4.207

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 (64) hide show
  1. package/README.md +60 -60
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/components/Alert.vue +48 -48
  5. package/dist/runtime/components/Avatar.vue +27 -27
  6. package/dist/runtime/components/Badge.vue +11 -11
  7. package/dist/runtime/components/Breadcrumb.vue +44 -44
  8. package/dist/runtime/components/Button/Group.vue +37 -37
  9. package/dist/runtime/components/Button/index.vue +75 -75
  10. package/dist/runtime/components/Card.vue +38 -38
  11. package/dist/runtime/components/Core.vue +45 -45
  12. package/dist/runtime/components/Dialog/index.vue +108 -108
  13. package/dist/runtime/components/Dropdown/index.vue +70 -70
  14. package/dist/runtime/components/FlexDeck/Base.vue +152 -152
  15. package/dist/runtime/components/FlexDeck/index.vue +68 -68
  16. package/dist/runtime/components/Form/FieldWrapper.vue +23 -23
  17. package/dist/runtime/components/Form/Fields.vue +230 -230
  18. package/dist/runtime/components/Form/InputCheckbox/index.vue +28 -28
  19. package/dist/runtime/components/Form/InputDateTime/index.vue +61 -61
  20. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +83 -83
  21. package/dist/runtime/components/Form/InputNumber/index.vue +27 -27
  22. package/dist/runtime/components/Form/InputRadio/index.vue +27 -27
  23. package/dist/runtime/components/Form/InputSelect/index.vue +54 -45
  24. package/dist/runtime/components/Form/InputSelect/types.d.ts +1 -0
  25. package/dist/runtime/components/Form/InputSelectMultiple/index.vue +54 -54
  26. package/dist/runtime/components/Form/InputStatic/index.vue +16 -16
  27. package/dist/runtime/components/Form/InputTags/index.vue +141 -141
  28. package/dist/runtime/components/Form/InputText/index.vue +68 -68
  29. package/dist/runtime/components/Form/InputTextarea/index.vue +25 -25
  30. package/dist/runtime/components/Form/InputToggle/index.vue +27 -27
  31. package/dist/runtime/components/Form/InputUploadDropzone/index.vue +206 -206
  32. package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +342 -342
  33. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +241 -241
  34. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +89 -89
  35. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +170 -170
  36. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +161 -161
  37. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +64 -64
  38. package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +178 -178
  39. package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +95 -95
  40. package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +151 -151
  41. package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +219 -219
  42. package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +55 -55
  43. package/dist/runtime/components/Form/InputWYSIWYG/index.vue +228 -228
  44. package/dist/runtime/components/Form/index.vue +6 -6
  45. package/dist/runtime/components/Icon.vue +23 -23
  46. package/dist/runtime/components/Image.vue +36 -36
  47. package/dist/runtime/components/Loader.vue +27 -27
  48. package/dist/runtime/components/Modal/index.vue +146 -146
  49. package/dist/runtime/components/QRCode.vue +22 -22
  50. package/dist/runtime/components/SimplePagination.vue +96 -96
  51. package/dist/runtime/components/Slideover/index.vue +110 -110
  52. package/dist/runtime/components/Table/Base.vue +153 -153
  53. package/dist/runtime/components/Table/ColumnDate.vue +16 -16
  54. package/dist/runtime/components/Table/ColumnDateTime.vue +18 -18
  55. package/dist/runtime/components/Table/ColumnImage.vue +15 -15
  56. package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
  57. package/dist/runtime/components/Table/ColumnText.vue +29 -29
  58. package/dist/runtime/components/Table/Simple.vue +69 -69
  59. package/dist/runtime/components/Table/index.vue +65 -65
  60. package/dist/runtime/components/Tabs/index.vue +64 -64
  61. package/dist/runtime/components/TeleportSafe.vue +40 -40
  62. package/package.json +103 -102
  63. package/dist/runtime/components/Form/InputDateTime/index.vue~ +0 -61
  64. package/dist/runtime/ui.config/table.ts~ +0 -48
package/package.json CHANGED
@@ -1,102 +1,103 @@
1
- {
2
- "name": "@finema/core",
3
- "version": "1.4.205",
4
- "repository": "https://gitlab.finema.co/finema/ui-kit",
5
- "license": "MIT",
6
- "author": "Finema Dev Core Team",
7
- "type": "module",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/types.d.ts",
11
- "import": "./dist/module.mjs",
12
- "require": "./dist/module.cjs"
13
- }
14
- },
15
- "main": "./dist/module.cjs",
16
- "types": "./dist/types.d.ts",
17
- "files": [
18
- "dist"
19
- ],
20
- "engines": {
21
- "node": ">=18.0.0"
22
- },
23
- "scripts": {
24
- "prepack": "nuxt-module-build build",
25
- "dev": "nuxi dev playground -o",
26
- "docs": "nuxi dev docs -o",
27
- "dev:build": "nuxi build playground",
28
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs",
29
- "docs:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare docs",
30
- "lint": "eslint . --cache",
31
- "lint:fix": "eslint . --fix --cache",
32
- "test": "vitest run",
33
- "test:watch": "vitest watch",
34
- "release": "release-it --ci",
35
- "prepare": "husky install"
36
- },
37
- "dependencies": {
38
- "@nuxt/kit": "^3.13.1",
39
- "@nuxt/ui": "2.18.6",
40
- "@pinia/nuxt": "^0.5.4",
41
- "@tiptap/extension-image": "^2.6.6",
42
- "@tiptap/extension-link": "^2.6.6",
43
- "@tiptap/extension-text-align": "^2.6.6",
44
- "@tiptap/extension-underline": "^2.6.6",
45
- "@tiptap/extension-youtube": "^2.6.6",
46
- "@tiptap/pm": "^2.6.6",
47
- "@tiptap/starter-kit": "^2.6.6",
48
- "@tiptap/vue-3": "^2.6.6",
49
- "@vee-validate/nuxt": "^4.13.2",
50
- "@vee-validate/zod": "^4.13.2",
51
- "@vuepic/vue-datepicker": "^8.2.0",
52
- "@vueup/vue-quill": "^1.2.0",
53
- "@wdns/vue-code-block": "^2.3.3",
54
- "axios": "^1.7.2",
55
- "cheerio": "1.0.0-rc.12",
56
- "date-fns": "^3.3.1",
57
- "date-fns-tz": "^3.1.3",
58
- "defu": "^6.1.4",
59
- "i18next": "^23.12.2",
60
- "maska": "^2.1.11",
61
- "nuxt-lodash": "^2.5.3",
62
- "nuxt-security": "^1.2.2",
63
- "pinia": "^2.1.7",
64
- "qrcode.vue": "^3.4.1",
65
- "url-join": "^5.0.0",
66
- "zod": "^3.23.8",
67
- "zod-i18n-map": "^2.27.0"
68
- },
69
- "devDependencies": {
70
- "@finema/eslint-config": "^1.2.0",
71
- "@nuxt/devtools": "^1.4.2",
72
- "@nuxt/eslint-config": "^0.5.0",
73
- "@nuxt/module-builder": "^0.5.5",
74
- "@nuxt/schema": "^3.13.1",
75
- "@nuxt/test-utils": "^3.13.1",
76
- "@release-it/conventional-changelog": "^8.0.1",
77
- "@types/node": "^20.10.17",
78
- "@types/quill": "^2",
79
- "@vue/test-utils": "^2.4.6",
80
- "changelogen": "^0.5.5",
81
- "eslint": "^8.56.0",
82
- "happy-dom": "^13.0.0",
83
- "husky": "^9.0.11",
84
- "lint-staged": "^15.2.0",
85
- "nuxt": "^3.13.1",
86
- "playwright-core": "^1.42.1",
87
- "prettier": "^3.1.1",
88
- "release-it": "^17.0.1",
89
- "sass": "^1.69.5",
90
- "stylelint": "^16.1.0",
91
- "stylelint-config-prettier-scss": "^1.0.0",
92
- "stylelint-config-standard-scss": "^13.0.0",
93
- "vitest": "^2.0.4"
94
- },
95
- "lint-staged": {
96
- "*.{ts,vue,tsx,js}": "eslint --fix --cache"
97
- },
98
- "workspaces": [
99
- "./*"
100
- ],
101
- "packageManager": "yarn@4.4.1"
102
- }
1
+ {
2
+ "name": "@finema/core",
3
+ "version": "1.4.207",
4
+ "repository": "https://gitlab.finema.co/finema/ui-kit",
5
+ "license": "MIT",
6
+ "author": "Finema Dev Core Team",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types.d.ts",
11
+ "import": "./dist/module.mjs",
12
+ "require": "./dist/module.cjs"
13
+ }
14
+ },
15
+ "main": "./dist/module.cjs",
16
+ "types": "./dist/types.d.ts",
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ },
23
+ "scripts": {
24
+ "prepack": "nuxt-module-build build",
25
+ "dev": "nuxi dev playground -o",
26
+ "docs": "nuxi dev docs -o",
27
+ "dev:build": "nuxi build playground",
28
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs",
29
+ "docs:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare docs",
30
+ "lint": "eslint . --cache",
31
+ "lint:fix": "eslint . --fix --cache",
32
+ "test": "vitest run",
33
+ "test:watch": "vitest watch",
34
+ "release": "release-it --ci",
35
+ "prepare": "husky install"
36
+ },
37
+ "dependencies": {
38
+ "@nuxt/kit": "^3.13.1",
39
+ "@nuxt/ui": "2.18.6",
40
+ "@pinia/nuxt": "^0.5.4",
41
+ "@tiptap/extension-image": "^2.8.0",
42
+ "@tiptap/extension-link": "^2.8.0",
43
+ "@tiptap/extension-text-align": "^2.8.0",
44
+ "@tiptap/extension-text-style": "^2.8.0",
45
+ "@tiptap/extension-underline": "^2.8.0",
46
+ "@tiptap/extension-youtube": "^2.8.0",
47
+ "@tiptap/pm": "^2.8.0",
48
+ "@tiptap/starter-kit": "^2.8.0",
49
+ "@tiptap/vue-3": "^2.8.0",
50
+ "@vee-validate/nuxt": "^4.13.2",
51
+ "@vee-validate/zod": "^4.13.2",
52
+ "@vuepic/vue-datepicker": "^8.2.0",
53
+ "@vueup/vue-quill": "^1.2.0",
54
+ "@wdns/vue-code-block": "^2.3.3",
55
+ "axios": "^1.7.2",
56
+ "cheerio": "1.0.0-rc.12",
57
+ "date-fns": "^3.3.1",
58
+ "date-fns-tz": "^3.1.3",
59
+ "defu": "^6.1.4",
60
+ "i18next": "^23.12.2",
61
+ "maska": "^2.1.11",
62
+ "nuxt-lodash": "^2.5.3",
63
+ "nuxt-security": "^1.2.2",
64
+ "pinia": "^2.1.7",
65
+ "qrcode.vue": "^3.4.1",
66
+ "url-join": "^5.0.0",
67
+ "zod": "^3.23.8",
68
+ "zod-i18n-map": "^2.27.0"
69
+ },
70
+ "devDependencies": {
71
+ "@finema/eslint-config": "^1.2.0",
72
+ "@nuxt/devtools": "^1.4.2",
73
+ "@nuxt/eslint-config": "^0.5.0",
74
+ "@nuxt/module-builder": "^0.5.5",
75
+ "@nuxt/schema": "^3.13.1",
76
+ "@nuxt/test-utils": "^3.13.1",
77
+ "@release-it/conventional-changelog": "^8.0.1",
78
+ "@types/node": "^20.10.17",
79
+ "@types/quill": "^2",
80
+ "@vue/test-utils": "^2.4.6",
81
+ "changelogen": "^0.5.5",
82
+ "eslint": "^8.56.0",
83
+ "happy-dom": "^13.0.0",
84
+ "husky": "^9.0.11",
85
+ "lint-staged": "^15.2.0",
86
+ "nuxt": "^3.13.1",
87
+ "playwright-core": "^1.42.1",
88
+ "prettier": "^3.1.1",
89
+ "release-it": "^17.0.1",
90
+ "sass": "^1.69.5",
91
+ "stylelint": "^16.1.0",
92
+ "stylelint-config-prettier-scss": "^1.0.0",
93
+ "stylelint-config-standard-scss": "^13.0.0",
94
+ "vitest": "^2.0.4"
95
+ },
96
+ "lint-staged": {
97
+ "*.{ts,vue,tsx,js}": "eslint --fix --cache"
98
+ },
99
+ "workspaces": [
100
+ "./*"
101
+ ],
102
+ "packageManager": "yarn@4.4.1"
103
+ }
@@ -1,61 +0,0 @@
1
- <template>
2
- <FieldWrapper v-bind="wrapperProps">
3
- <Datepicker
4
- :model-value="value"
5
- :disabled="wrapperProps.isDisabled"
6
- cancel-text="ยกเลิก"
7
- select-text="เลือก"
8
- locale="th"
9
- :enable-time-picker="!disabledTime"
10
- :placeholder="wrapperProps.placeholder"
11
- :format="format"
12
- :min-date="minDate"
13
- :max-date="maxDate"
14
- :min-time="minTime"
15
- :max-time="maxTime"
16
- :start-time="startTime"
17
- :required="isRequired"
18
- time-picker-inline
19
- @update:model-value="onInput"
20
- >
21
- <template #dp-input="{ value: innerValue }">
22
- <UInput
23
- :trailing-icon="innerValue ? undefined : 'i-heroicons-calendar-days'"
24
- type="text"
25
- :disabled="wrapperProps.isDisabled"
26
- :value="innerValue"
27
- :placeholder="wrapperProps.placeholder"
28
- :readonly="true"
29
- input-class="cursor-pointer select-none"
30
- />
31
- </template>
32
- </Datepicker>
33
- </FieldWrapper>
34
- </template>
35
- <script lang="ts" setup>
36
- import Datepicker from '@vuepic/vue-datepicker'
37
- import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
38
- import { type IDateTimeFieldProps } from '#core/components/Form/InputDateTime/date_time_field.types'
39
- import { TimeHelper, useFieldHOC } from '#imports'
40
- import '@vuepic/vue-datepicker/dist/main.css'
41
-
42
- const props = withDefaults(defineProps<IDateTimeFieldProps>(), {})
43
-
44
- const { value, wrapperProps } = useFieldHOC<string>(props)
45
-
46
- const format = (date: Date) => {
47
- if (props.disabledTime) {
48
- return TimeHelper.displayDate(date)
49
- }
50
-
51
- return TimeHelper.displayDateTime(date)
52
- }
53
-
54
- const onInput = (_value: any) => {
55
- if (props.disabledTime && !props.isReturnISO) {
56
- value.value = TimeHelper.getDateFormTime(_value)
57
- } else {
58
- value.value = _value
59
- }
60
- }
61
- </script>
@@ -1,48 +0,0 @@
1
- import type { DeepPartial } from '#ui/types'
2
- import type * as config from '#ui/ui.config'
3
-
4
- export const table: DeepPartial<(typeof config)['table']> = {
5
- wrapper: 'relative overflow-x-auto bg-white rounded-lg',
6
- base: 'min-w-full table-fixed',
7
- divide: 'divide-y divide-y-2 divide-gray-300 dark:divide-gray-700',
8
- thead: '',
9
- tbody: 'divide-y divide-gray-200 dark:divide-gray-800',
10
- tr: {
11
- base: 'even:bg-gray-50',
12
- selected: 'bg-gray-50 dark:bg-gray-800/50',
13
- active: 'hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer',
14
- },
15
- th: {
16
- base: 'text-left rtl:text-right',
17
- padding: 'px-3 py-3.5',
18
- color: 'text-gray-700 dark:text-white',
19
- font: 'font-normal',
20
- size: 'text-sm',
21
- },
22
- td: {
23
- base: 'whitespace-nowrap',
24
- padding: 'px-3 py-4',
25
- color: 'text-gray-500 dark:text-gray-400',
26
- font: '',
27
- size: 'text-base',
28
- },
29
- progress: {
30
- wrapper: 'absolute inset-x-0 p-0',
31
- },
32
- default: {
33
- sortButton: {
34
- icon: 'i-heroicons-arrows-up-down-20-solid',
35
- trailing: true,
36
- square: true,
37
- color: 'gray',
38
- variant: 'ghost',
39
- class: '-m-1.5 text-gray-700 font-normal',
40
- },
41
- loadingState: {
42
- label: 'กำลังโหลด...',
43
- },
44
- emptyState: {
45
- label: 'ไม่พบข้อมูล',
46
- },
47
- },
48
- }