@fastkit/vui 0.7.14 → 0.7.17
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/tool/index.js +1 -0
- package/dist/tool/vite-plugin.d.ts.map +1 -1
- package/dist/vui.cjs.js +92 -69
- package/dist/vui.cjs.prod.js +92 -69
- package/dist/vui.css +45 -17
- package/dist/vui.d.ts +32 -0
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/dist/vui.mjs +94 -72
- package/package.json +6 -6
- package/src/components/VFormControl/VFormControl.scss +42 -0
- package/src/components/VFormControl/VFormControl.tsx +34 -2
- package/src/components/VSelect/VSelect.tsx +1 -0
- package/src/components/VTextField/VTextField.tsx +1 -0
- package/src/components/VTextarea/VTextarea.tsx +1 -0
- package/src/components/VWysiwygEditor/VWysiwygEditor.tsx +1 -0
- package/src/components/kits.ts +1 -1
- package/src/composables/form-selector.tsx +1 -0
- package/src/service.tsx +1 -0
- package/src/tool/vite-plugin.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastkit/vui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.17",
|
|
4
4
|
"description": "@fastkit/vui",
|
|
5
5
|
"buildOptions": {
|
|
6
6
|
"name": "Vui",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"vue": "^3.2.26"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@fastkit/color-scheme": "0.7.
|
|
36
|
-
"@fastkit/icon-font": "0.7.
|
|
37
|
-
"@fastkit/tiny-logger": "0.7.
|
|
38
|
-
"@fastkit/vite-kit": "0.7.
|
|
39
|
-
"@fastkit/vue-kit": "0.7.
|
|
35
|
+
"@fastkit/color-scheme": "0.7.17",
|
|
36
|
+
"@fastkit/icon-font": "0.7.17",
|
|
37
|
+
"@fastkit/tiny-logger": "0.7.17",
|
|
38
|
+
"@fastkit/vite-kit": "0.7.17",
|
|
39
|
+
"@fastkit/vue-kit": "0.7.17",
|
|
40
40
|
"@tiptap/extension-link": "^2.0.0-beta.35",
|
|
41
41
|
"@tiptap/extension-underline": "^2.0.0-beta.22",
|
|
42
42
|
"@tiptap/starter-kit": "^2.0.0-beta.168",
|
|
@@ -19,12 +19,54 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&__label {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
22
24
|
align-self: flex-start;
|
|
23
25
|
font-size: var(--control-label-font-size);
|
|
24
26
|
font-weight: var(--control-label-font-weight);
|
|
25
27
|
line-height: var(--control-label-height);
|
|
26
28
|
color: var(--my-label-color);
|
|
27
29
|
letter-spacing: 0.00938em;
|
|
30
|
+
|
|
31
|
+
&__hinttip {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
margin-top: -0.2em;
|
|
35
|
+
margin-left: 0.6em;
|
|
36
|
+
// font-size: calc(var(--root-em) * 0.5);
|
|
37
|
+
font-size: 80%;
|
|
38
|
+
line-height: 1;
|
|
39
|
+
color: inherit;
|
|
40
|
+
// color: var(--palette-muted);
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
letter-spacing: normal;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
|
|
45
|
+
// &:hover,
|
|
46
|
+
// &:focus {
|
|
47
|
+
// text-decoration: underline;
|
|
48
|
+
// }
|
|
49
|
+
|
|
50
|
+
&__icon {
|
|
51
|
+
position: relative;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
font-size: 120%;
|
|
56
|
+
text-decoration: none !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:hover &__icon,
|
|
60
|
+
&:focus &__icon {
|
|
61
|
+
&::before {
|
|
62
|
+
opacity: 0.1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__hint {
|
|
67
|
+
font-size: calc(var(--root-em) * 0.75);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
28
70
|
}
|
|
29
71
|
|
|
30
72
|
// &--disabled &__body {
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
renderSlotOrEmpty,
|
|
10
10
|
} from '@fastkit/vue-kit';
|
|
11
11
|
import { useVuiColorProvider, useVui } from '../../injections';
|
|
12
|
+
import { VIcon } from '../VIcon';
|
|
13
|
+
import { VTooltip } from '../kits';
|
|
12
14
|
|
|
13
15
|
const { props, emits } = createFormControlSettings();
|
|
14
16
|
|
|
@@ -24,10 +26,19 @@ export const VFormControl = defineComponent({
|
|
|
24
26
|
},
|
|
25
27
|
emits,
|
|
26
28
|
setup(props, ctx) {
|
|
27
|
-
const
|
|
29
|
+
const vui = useVui();
|
|
30
|
+
|
|
31
|
+
const control = useFormControl(props, ctx, {
|
|
32
|
+
hinttipPrepend: () => (
|
|
33
|
+
<VIcon
|
|
34
|
+
class="v-form-control__label__hinttip__icon"
|
|
35
|
+
name={vui.icon('hinttip')}
|
|
36
|
+
/>
|
|
37
|
+
),
|
|
38
|
+
});
|
|
39
|
+
|
|
28
40
|
ctx.expose(control.expose());
|
|
29
41
|
|
|
30
|
-
const vui = useVui();
|
|
31
42
|
const colorProvider = useVuiColorProvider();
|
|
32
43
|
|
|
33
44
|
const classes = computed(() => [
|
|
@@ -53,6 +64,8 @@ export const VFormControl = defineComponent({
|
|
|
53
64
|
const label = control.renderLabel();
|
|
54
65
|
const message = control.renderMessage();
|
|
55
66
|
const appends = control.renderInfoAppends();
|
|
67
|
+
const hinttip = control.renderHinttip();
|
|
68
|
+
|
|
56
69
|
return (
|
|
57
70
|
<div class={['v-form-control', classes.value]}>
|
|
58
71
|
{label && (
|
|
@@ -63,6 +76,25 @@ export const VFormControl = defineComponent({
|
|
|
63
76
|
}}>
|
|
64
77
|
{label}
|
|
65
78
|
{control.required && vui.getRequiredChip()}
|
|
79
|
+
{hinttip && (
|
|
80
|
+
<VTooltip
|
|
81
|
+
top
|
|
82
|
+
openOnHover={false}
|
|
83
|
+
v-slots={{
|
|
84
|
+
activator: (ctx) => (
|
|
85
|
+
<a
|
|
86
|
+
class="v-form-control__label__hinttip"
|
|
87
|
+
href="javascript:void(0)"
|
|
88
|
+
{...ctx.attrs}>
|
|
89
|
+
{hinttip.tip}
|
|
90
|
+
</a>
|
|
91
|
+
),
|
|
92
|
+
}}>
|
|
93
|
+
<div class="v-form-control__label__hinttip__hint">
|
|
94
|
+
{hinttip.hint}
|
|
95
|
+
</div>
|
|
96
|
+
</VTooltip>
|
|
97
|
+
)}
|
|
66
98
|
</label>
|
|
67
99
|
)}
|
|
68
100
|
<div class="v-form-control__body">
|
package/src/components/kits.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { VDialog, VMenu, VSnackbar } from '@fastkit/vue-kit';
|
|
1
|
+
export { VDialog, VMenu, VSnackbar, VTooltip } from '@fastkit/vue-kit';
|
package/src/service.tsx
CHANGED
package/src/tool/vite-plugin.ts
CHANGED
|
@@ -170,6 +170,7 @@ export function viteVuiPlugin(
|
|
|
170
170
|
editorLinkOff: 'mdi-link-off' as any,
|
|
171
171
|
editorUndo: 'mdi-undo-variant' as any,
|
|
172
172
|
editorRedo: 'mdi-redo-variant' as any,
|
|
173
|
+
hinttip: 'mdi-help-circle-outline' as any,
|
|
173
174
|
// navigationExpand: (gen, active) => {
|
|
174
175
|
// return gen({
|
|
175
176
|
// name: 'mdi-menu-down' as any,
|