@finema/core 1.3.8 → 1.3.10
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Button/index.vue +80 -1
- package/dist/runtime/components/Form/Fields.vue +6 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +21 -0
- package/dist/runtime/components/Form/InputCheckbox/types.d.ts +8 -0
- package/dist/runtime/components/Form/InputCheckbox/types.mjs +0 -0
- package/dist/runtime/components/Form/InputToggle/index.vue +1 -1
- package/dist/runtime/components/Form/InputToggle/types.d.ts +2 -0
- package/dist/runtime/components/Form/types.d.ts +2 -1
- package/dist/runtime/components/Form/types.mjs +1 -0
- package/package.json +2 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UButton v-bind="$
|
|
2
|
+
<UButton v-bind="$props">
|
|
3
3
|
<template #leading>
|
|
4
4
|
<slot name="leading" />
|
|
5
5
|
</template>
|
|
@@ -11,7 +11,86 @@
|
|
|
11
11
|
</UButton>
|
|
12
12
|
</template>
|
|
13
13
|
<script lang="ts" setup>
|
|
14
|
+
import { UButton } from '#components'
|
|
15
|
+
import { type PropType } from 'vue'
|
|
16
|
+
|
|
14
17
|
defineOptions({
|
|
15
18
|
inheritAttrs: true,
|
|
16
19
|
})
|
|
20
|
+
|
|
21
|
+
defineProps({
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: 'button',
|
|
25
|
+
},
|
|
26
|
+
block: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: null,
|
|
33
|
+
},
|
|
34
|
+
loading: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
padded: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true,
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
type: String,
|
|
48
|
+
validator(value: unknown): boolean {
|
|
49
|
+
return ['2xs', 'xs', 'sm', 'md', 'lg', 'xl'].includes(value as string)
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
color: {
|
|
53
|
+
type: String,
|
|
54
|
+
},
|
|
55
|
+
variant: {
|
|
56
|
+
type: String,
|
|
57
|
+
},
|
|
58
|
+
icon: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
62
|
+
loadingIcon: {
|
|
63
|
+
type: String,
|
|
64
|
+
},
|
|
65
|
+
leadingIcon: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: null,
|
|
68
|
+
},
|
|
69
|
+
trailingIcon: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: null,
|
|
72
|
+
},
|
|
73
|
+
trailing: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false,
|
|
76
|
+
},
|
|
77
|
+
leading: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
81
|
+
square: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
truncate: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false,
|
|
88
|
+
},
|
|
89
|
+
class: {
|
|
90
|
+
type: [String, Object, Array] as PropType<any>,
|
|
91
|
+
},
|
|
92
|
+
ui: {
|
|
93
|
+
type: Object,
|
|
94
|
+
},
|
|
95
|
+
})
|
|
17
96
|
</script>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FieldWrapper v-bind="wrapperProps" label="">
|
|
3
|
+
<UCheckbox
|
|
4
|
+
v-model="value"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:name="name"
|
|
7
|
+
:label="props.label"
|
|
8
|
+
:color="color"
|
|
9
|
+
:ui="ui"
|
|
10
|
+
/>
|
|
11
|
+
</FieldWrapper>
|
|
12
|
+
</template>
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import { useFieldHOC } from '#core/composables/useForm'
|
|
15
|
+
import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
|
|
16
|
+
import { type ICheckboxFieldProps } from '#core/components/Form/InputCheckbox/types'
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<ICheckboxFieldProps>(), {})
|
|
19
|
+
|
|
20
|
+
const { value, wrapperProps, disabled, handleChange } = useFieldHOC<boolean>(props)
|
|
21
|
+
</script>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IFieldProps, type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
|
|
2
|
+
export interface ICheckboxFieldProps extends IFieldProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
ui?: object | any;
|
|
5
|
+
}
|
|
6
|
+
export type ICheckboxField = IFormFieldBase<INPUT_TYPES.CHECKBOX, ICheckboxFieldProps, {
|
|
7
|
+
change?: (value: string) => void;
|
|
8
|
+
}>;
|
|
File without changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type IFieldProps, type IFormFieldBase, type INPUT_TYPES } from '#core/components/Form/types';
|
|
2
2
|
export interface IToggleFieldProps extends IFieldProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
ui?: object | any;
|
|
3
5
|
}
|
|
4
6
|
export type IToggleField = IFormFieldBase<INPUT_TYPES.TOGGLE, IToggleFieldProps, {
|
|
5
7
|
change?: (value: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Development Team",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"lint:fix": "eslint . --fix",
|
|
30
30
|
"test": "vitest run",
|
|
31
31
|
"test:watch": "vitest watch",
|
|
32
|
-
"release": "release-it",
|
|
32
|
+
"release": "release-it --ci",
|
|
33
33
|
"prepare": "husky install"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|