@finema/core 1.4.217 → 1.4.218

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 (67) 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/Empty.vue +18 -18
  15. package/dist/runtime/components/FlexDeck/Base.vue +159 -159
  16. package/dist/runtime/components/FlexDeck/index.vue +68 -68
  17. package/dist/runtime/components/Form/FieldWrapper.vue +23 -23
  18. package/dist/runtime/components/Form/Fields.vue +230 -230
  19. package/dist/runtime/components/Form/InputCheckbox/index.vue +28 -28
  20. package/dist/runtime/components/Form/InputDateTime/index.vue +68 -68
  21. package/dist/runtime/components/Form/InputDateTimeRange/index.vue +91 -91
  22. package/dist/runtime/components/Form/InputNumber/index.vue +27 -27
  23. package/dist/runtime/components/Form/InputRadio/index.vue +27 -27
  24. package/dist/runtime/components/Form/InputSelect/index.vue +55 -55
  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 +362 -350
  33. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +241 -241
  34. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +110 -102
  35. package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +171 -171
  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/Log.vue +22 -22
  49. package/dist/runtime/components/LogItem.vue +41 -41
  50. package/dist/runtime/components/Modal/index.vue +146 -146
  51. package/dist/runtime/components/OTPInput.vue +127 -127
  52. package/dist/runtime/components/QRCode.vue +22 -22
  53. package/dist/runtime/components/SimplePagination.vue +96 -96
  54. package/dist/runtime/components/Slideover/index.vue +110 -110
  55. package/dist/runtime/components/Table/Base.vue +161 -161
  56. package/dist/runtime/components/Table/ColumnDate.vue +16 -16
  57. package/dist/runtime/components/Table/ColumnDateTime.vue +18 -18
  58. package/dist/runtime/components/Table/ColumnImage.vue +15 -15
  59. package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
  60. package/dist/runtime/components/Table/ColumnText.vue +29 -29
  61. package/dist/runtime/components/Table/Simple.vue +70 -70
  62. package/dist/runtime/components/Table/index.vue +65 -65
  63. package/dist/runtime/components/Tabs/index.vue +64 -64
  64. package/dist/runtime/components/TeleportSafe.vue +40 -40
  65. package/dist/runtime/helpers/componentHelper.d.ts +1 -0
  66. package/dist/runtime/helpers/componentHelper.mjs +5 -0
  67. package/package.json +100 -100
@@ -1,22 +1,22 @@
1
- <template>
2
- <QrcodeVue :value="value" :level="level" :render-as="renderAs" class="size-[350px]" />
3
- </template>
4
- <script lang="ts" setup>
5
- import QrcodeVue, { type RenderAs } from 'qrcode.vue'
6
- import { type PropType } from 'vue'
7
-
8
- defineProps({
9
- value: {
10
- type: String,
11
- required: true,
12
- },
13
- level: {
14
- type: String,
15
- default: 'M',
16
- },
17
- renderAs: {
18
- type: String as PropType<RenderAs>,
19
- default: 'svg',
20
- },
21
- })
22
- </script>
1
+ <template>
2
+ <QrcodeVue :value="value" :level="level" :render-as="renderAs" class="size-[350px]" />
3
+ </template>
4
+ <script lang="ts" setup>
5
+ import QrcodeVue, { type RenderAs } from 'qrcode.vue'
6
+ import { type PropType } from 'vue'
7
+
8
+ defineProps({
9
+ value: {
10
+ type: String,
11
+ required: true,
12
+ },
13
+ level: {
14
+ type: String,
15
+ default: 'M',
16
+ },
17
+ renderAs: {
18
+ type: String as PropType<RenderAs>,
19
+ default: 'svg',
20
+ },
21
+ })
22
+ </script>
@@ -1,96 +1,96 @@
1
- <template>
2
- <div>
3
- <Button
4
- :size="size"
5
- :disabled="!canGoFirstOrPrev || disabled"
6
- :class="[ui.base, ui.rounded]"
7
- v-bind="{ ...((ui.default?.prevButton as object) || {}) }"
8
- :ui="{ rounded: '' }"
9
- aria-label="Prev"
10
- @click="onClickPrev"
11
- />
12
-
13
- <Button
14
- :size="size"
15
- :disabled="!canGoLastOrNext || disabled"
16
- :class="[ui.base, ui.rounded]"
17
- v-bind="{ ...((ui.default?.nextButton as object) || {}) }"
18
- :ui="{ rounded: '' }"
19
- aria-label="Next"
20
- @click="onClickNext"
21
- />
22
- </div>
23
- </template>
24
-
25
- <script lang="ts" setup>
26
- import { useUiConfig } from '../composables/useConfig'
27
- import { pagination } from '#core/ui.config'
28
- import { useUI, type PropType, toRef, computed } from '#imports'
29
- import type { ButtonSize } from '#ui/types/button'
30
- import type { Strategy } from '#ui/types'
31
-
32
- const config = useUiConfig<typeof pagination>(pagination, 'pagination')
33
-
34
- const emits = defineEmits(['update:modelValue'])
35
-
36
- const props = defineProps({
37
- modelValue: {
38
- type: Number,
39
- required: true,
40
- },
41
- pageCount: {
42
- type: Number,
43
- default: 10,
44
- },
45
- total: {
46
- type: Number,
47
- required: true,
48
- },
49
- disabled: {
50
- type: Boolean,
51
- default: false,
52
- },
53
- size: {
54
- type: String as PropType<ButtonSize>,
55
- default: () => pagination.default?.size,
56
- },
57
- class: {
58
- type: [String, Object, Array] as PropType<any>,
59
- default: () => '',
60
- },
61
- ui: {
62
- type: Object as PropType<Partial<typeof config> & { strategy?: Strategy }>,
63
- default: () => ({}),
64
- },
65
- })
66
-
67
- const { ui } = useUI('pagination', toRef(props, 'ui'), config, toRef(props, 'class'))
68
-
69
- const currentPage = computed({
70
- get() {
71
- return props.modelValue
72
- },
73
- set(value: number) {
74
- emits('update:modelValue', value)
75
- },
76
- })
77
-
78
- const pages = computed(() =>
79
- Array.from({ length: Math.ceil(props.total / props.pageCount) }, (_, i) => i + 1)
80
- )
81
-
82
- const canGoFirstOrPrev = computed(() => currentPage.value > 1)
83
- const canGoLastOrNext = computed(() => currentPage.value < pages.value.length)
84
-
85
- const onClickPrev = () => {
86
- if (canGoFirstOrPrev.value) {
87
- currentPage.value--
88
- }
89
- }
90
-
91
- const onClickNext = () => {
92
- if (canGoLastOrNext.value) {
93
- currentPage.value++
94
- }
95
- }
96
- </script>
1
+ <template>
2
+ <div>
3
+ <Button
4
+ :size="size"
5
+ :disabled="!canGoFirstOrPrev || disabled"
6
+ :class="[ui.base, ui.rounded]"
7
+ v-bind="{ ...((ui.default?.prevButton as object) || {}) }"
8
+ :ui="{ rounded: '' }"
9
+ aria-label="Prev"
10
+ @click="onClickPrev"
11
+ />
12
+
13
+ <Button
14
+ :size="size"
15
+ :disabled="!canGoLastOrNext || disabled"
16
+ :class="[ui.base, ui.rounded]"
17
+ v-bind="{ ...((ui.default?.nextButton as object) || {}) }"
18
+ :ui="{ rounded: '' }"
19
+ aria-label="Next"
20
+ @click="onClickNext"
21
+ />
22
+ </div>
23
+ </template>
24
+
25
+ <script lang="ts" setup>
26
+ import { useUiConfig } from '../composables/useConfig'
27
+ import { pagination } from '#core/ui.config'
28
+ import { useUI, type PropType, toRef, computed } from '#imports'
29
+ import type { ButtonSize } from '#ui/types/button'
30
+ import type { Strategy } from '#ui/types'
31
+
32
+ const config = useUiConfig<typeof pagination>(pagination, 'pagination')
33
+
34
+ const emits = defineEmits(['update:modelValue'])
35
+
36
+ const props = defineProps({
37
+ modelValue: {
38
+ type: Number,
39
+ required: true,
40
+ },
41
+ pageCount: {
42
+ type: Number,
43
+ default: 10,
44
+ },
45
+ total: {
46
+ type: Number,
47
+ required: true,
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ size: {
54
+ type: String as PropType<ButtonSize>,
55
+ default: () => pagination.default?.size,
56
+ },
57
+ class: {
58
+ type: [String, Object, Array] as PropType<any>,
59
+ default: () => '',
60
+ },
61
+ ui: {
62
+ type: Object as PropType<Partial<typeof config> & { strategy?: Strategy }>,
63
+ default: () => ({}),
64
+ },
65
+ })
66
+
67
+ const { ui } = useUI('pagination', toRef(props, 'ui'), config, toRef(props, 'class'))
68
+
69
+ const currentPage = computed({
70
+ get() {
71
+ return props.modelValue
72
+ },
73
+ set(value: number) {
74
+ emits('update:modelValue', value)
75
+ },
76
+ })
77
+
78
+ const pages = computed(() =>
79
+ Array.from({ length: Math.ceil(props.total / props.pageCount) }, (_, i) => i + 1)
80
+ )
81
+
82
+ const canGoFirstOrPrev = computed(() => currentPage.value > 1)
83
+ const canGoLastOrNext = computed(() => currentPage.value < pages.value.length)
84
+
85
+ const onClickPrev = () => {
86
+ if (canGoFirstOrPrev.value) {
87
+ currentPage.value--
88
+ }
89
+ }
90
+
91
+ const onClickNext = () => {
92
+ if (canGoLastOrNext.value) {
93
+ currentPage.value++
94
+ }
95
+ }
96
+ </script>
@@ -1,110 +1,110 @@
1
- <template>
2
- <USlideover
3
- v-bind="attrs"
4
- :model-value="modelValue"
5
- :class="$props.class"
6
- :prevent-close="preventClose"
7
- :overlay="overlay"
8
- :transition="transition"
9
- :side="side"
10
- :initial-focus="emptyFocusRef"
11
- :ui="ui"
12
- @update:model-value="$emit('update:modelValue', $event)"
13
- >
14
- <div v-if="!isHideCloseBtn && preventClose" class="absolute right-0 m-4">
15
- <Icon
16
- v-if="!isHideCloseBtn"
17
- name="i-heroicons-x-mark"
18
- class="size-6 cursor-pointer"
19
- @click="close"
20
- />
21
- </div>
22
-
23
- <div :class="['overflow-y-auto', ui.bodyWrapper]">
24
- <slot />
25
- </div>
26
- </USlideover>
27
-
28
- <div ref="emptyFocusRef" />
29
- </template>
30
-
31
- <script lang="ts" setup>
32
- import { ref, type PropType, toRef, defineShortcuts, watch } from '#imports'
33
- import { useUI } from '#ui/composables/useUI'
34
- import { slideover } from '#core/ui.config'
35
- import { useUiConfig } from '#core/composables/useConfig'
36
- import type { Strategy } from '#ui/types'
37
-
38
- const config = useUiConfig<typeof slideover>(slideover, 'slideover')
39
-
40
- const props = defineProps({
41
- modelValue: {
42
- type: Boolean as PropType<boolean>,
43
- default: false,
44
- },
45
- side: {
46
- type: String as PropType<'left' | 'right'>,
47
- default: 'right',
48
- validator: (value: string) => ['left', 'right'].includes(value),
49
- },
50
- overlay: {
51
- type: Boolean,
52
- default: true,
53
- },
54
- preventClose: {
55
- type: Boolean,
56
- default: false,
57
- },
58
- isHideCloseBtn: {
59
- type: Boolean,
60
- default: false,
61
- },
62
- transition: {
63
- type: Boolean,
64
- default: true,
65
- },
66
- size: {
67
- type: String as PropType<keyof typeof slideover.size>,
68
- default: () => slideover.default.size,
69
- },
70
- class: {
71
- type: [String, Array, Object] as PropType<any>,
72
- default: undefined,
73
- },
74
- ui: {
75
- type: Object as PropType<Partial<typeof config & { strategy?: Strategy }>>,
76
- default: undefined,
77
- },
78
- })
79
-
80
- const emits = defineEmits(['update:modelValue'])
81
-
82
- const emptyFocusRef = ref<HTMLElement | null>(null)
83
-
84
- defineShortcuts({
85
- escape: {
86
- usingInput: true,
87
- handler: () => {
88
- if (props.preventClose) return
89
- emits('update:modelValue', false)
90
- },
91
- },
92
- })
93
-
94
- const close = () => {
95
- emits('update:modelValue', false)
96
- }
97
-
98
- const { ui, attrs } = useUI('slideover', toRef(props, 'ui'), config, toRef(props, 'class'))
99
-
100
- watch(
101
- () => props.modelValue,
102
- () => {
103
- if (props.modelValue) {
104
- const size = config.size[props.size]
105
-
106
- ui.value.width = size
107
- }
108
- }
109
- )
110
- </script>
1
+ <template>
2
+ <USlideover
3
+ v-bind="attrs"
4
+ :model-value="modelValue"
5
+ :class="$props.class"
6
+ :prevent-close="preventClose"
7
+ :overlay="overlay"
8
+ :transition="transition"
9
+ :side="side"
10
+ :initial-focus="emptyFocusRef"
11
+ :ui="ui"
12
+ @update:model-value="$emit('update:modelValue', $event)"
13
+ >
14
+ <div v-if="!isHideCloseBtn && preventClose" class="absolute right-0 m-4">
15
+ <Icon
16
+ v-if="!isHideCloseBtn"
17
+ name="i-heroicons-x-mark"
18
+ class="size-6 cursor-pointer"
19
+ @click="close"
20
+ />
21
+ </div>
22
+
23
+ <div :class="['overflow-y-auto', ui.bodyWrapper]">
24
+ <slot />
25
+ </div>
26
+ </USlideover>
27
+
28
+ <div ref="emptyFocusRef" />
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { ref, type PropType, toRef, defineShortcuts, watch } from '#imports'
33
+ import { useUI } from '#ui/composables/useUI'
34
+ import { slideover } from '#core/ui.config'
35
+ import { useUiConfig } from '#core/composables/useConfig'
36
+ import type { Strategy } from '#ui/types'
37
+
38
+ const config = useUiConfig<typeof slideover>(slideover, 'slideover')
39
+
40
+ const props = defineProps({
41
+ modelValue: {
42
+ type: Boolean as PropType<boolean>,
43
+ default: false,
44
+ },
45
+ side: {
46
+ type: String as PropType<'left' | 'right'>,
47
+ default: 'right',
48
+ validator: (value: string) => ['left', 'right'].includes(value),
49
+ },
50
+ overlay: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
54
+ preventClose: {
55
+ type: Boolean,
56
+ default: false,
57
+ },
58
+ isHideCloseBtn: {
59
+ type: Boolean,
60
+ default: false,
61
+ },
62
+ transition: {
63
+ type: Boolean,
64
+ default: true,
65
+ },
66
+ size: {
67
+ type: String as PropType<keyof typeof slideover.size>,
68
+ default: () => slideover.default.size,
69
+ },
70
+ class: {
71
+ type: [String, Array, Object] as PropType<any>,
72
+ default: undefined,
73
+ },
74
+ ui: {
75
+ type: Object as PropType<Partial<typeof config & { strategy?: Strategy }>>,
76
+ default: undefined,
77
+ },
78
+ })
79
+
80
+ const emits = defineEmits(['update:modelValue'])
81
+
82
+ const emptyFocusRef = ref<HTMLElement | null>(null)
83
+
84
+ defineShortcuts({
85
+ escape: {
86
+ usingInput: true,
87
+ handler: () => {
88
+ if (props.preventClose) return
89
+ emits('update:modelValue', false)
90
+ },
91
+ },
92
+ })
93
+
94
+ const close = () => {
95
+ emits('update:modelValue', false)
96
+ }
97
+
98
+ const { ui, attrs } = useUI('slideover', toRef(props, 'ui'), config, toRef(props, 'class'))
99
+
100
+ watch(
101
+ () => props.modelValue,
102
+ () => {
103
+ if (props.modelValue) {
104
+ const size = config.size[props.size]
105
+
106
+ ui.value.width = size
107
+ }
108
+ }
109
+ )
110
+ </script>