@fastkit/vui 0.19.54 → 0.19.55
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/vui.mjs +31 -28
- package/dist/vui.mjs.map +1 -1
- package/package.json +19 -19
- package/src/components/VBusyImage/VBusyImage.tsx +3 -1
- package/src/components/VButton/VButton.tsx +7 -3
- package/src/components/VCheckbox/VCheckbox.tsx +2 -1
- package/src/components/VFormControl/VFormControl.tsx +3 -3
- package/src/components/VRadio/VRadio.tsx +2 -1
- package/src/components/VSelect/VSelect.tsx +6 -4
- package/src/components/VSwitch/VSwitch.tsx +2 -1
- package/src/components/VTextField/VTextField.tsx +5 -5
- package/src/components/VTextarea/VTextarea.tsx +5 -4
- package/src/components/VTooltip/VTooltip.tsx +3 -2
- package/src/composables/form-selector.tsx +2 -1
- package/src/service.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastkit/vui",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.55",
|
|
4
4
|
"description": "A simple, extensible UI kit for Vue applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fastkit",
|
|
@@ -44,31 +44,31 @@
|
|
|
44
44
|
"src"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@fastkit/helpers": "^0.14.5",
|
|
48
|
-
"@fastkit/dom": "^0.2.6",
|
|
49
47
|
"@fastkit/color-scheme": "^2.0.10",
|
|
48
|
+
"@fastkit/dom": "^0.2.6",
|
|
49
|
+
"@fastkit/helpers": "^0.14.5",
|
|
50
50
|
"@fastkit/color-scheme-gen": "^0.14.13",
|
|
51
51
|
"@fastkit/media-match": "^2.0.7",
|
|
52
|
-
"@fastkit/
|
|
52
|
+
"@fastkit/vue-body-scroll-lock": "^0.2.12",
|
|
53
53
|
"@fastkit/tiny-logger": "^0.14.5",
|
|
54
|
+
"@fastkit/vue-form-control": "^0.20.27",
|
|
55
|
+
"@fastkit/vue-click-outside": "^0.2.11",
|
|
56
|
+
"@fastkit/media-match-gen": "^0.14.13",
|
|
57
|
+
"@fastkit/vue-keyboard": "^0.2.5",
|
|
54
58
|
"@fastkit/icon-font": "^2.0.7",
|
|
55
|
-
"@fastkit/vue-
|
|
56
|
-
"@fastkit/
|
|
59
|
+
"@fastkit/vue-location": "^0.4.1",
|
|
60
|
+
"@fastkit/vue-color-scheme": "^0.15.14",
|
|
61
|
+
"@fastkit/vue-app-layout": "^0.16.1",
|
|
62
|
+
"@fastkit/vue-resize": "^0.2.11",
|
|
63
|
+
"@fastkit/vue-stack": "^0.16.18",
|
|
64
|
+
"@fastkit/vue-transitions": "^0.2.12",
|
|
65
|
+
"@fastkit/vue-utils": "^0.15.11",
|
|
66
|
+
"@fastkit/vue-scroller": "^0.15.11",
|
|
57
67
|
"@fastkit/stylebase": "^0.13.1",
|
|
58
|
-
"@fastkit/vue-click-outside": "^0.2.10",
|
|
59
|
-
"@fastkit/vue-app-layout": "^0.16.0",
|
|
60
|
-
"@fastkit/vue-keyboard": "^0.2.5",
|
|
61
|
-
"@fastkit/vue-color-scheme": "^0.15.13",
|
|
62
|
-
"@fastkit/vue-action": "^0.3.17",
|
|
63
|
-
"@fastkit/vue-form-control": "^0.20.26",
|
|
64
|
-
"@fastkit/vue-resize": "^0.2.10",
|
|
65
|
-
"@fastkit/vue-transitions": "^0.2.11",
|
|
66
|
-
"@fastkit/vue-stack": "^0.16.17",
|
|
67
|
-
"@fastkit/vue-loading": "^0.15.13",
|
|
68
|
-
"@fastkit/vue-utils": "^0.15.10",
|
|
69
|
-
"@fastkit/vue-location": "^0.4.0",
|
|
70
68
|
"@fastkit/vue-media-match": "^0.14.10",
|
|
71
|
-
"@fastkit/vue-
|
|
69
|
+
"@fastkit/vue-action": "^0.3.18",
|
|
70
|
+
"@fastkit/rules": "^0.14.7",
|
|
71
|
+
"@fastkit/vue-loading": "^0.15.14"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"vue": "^3.4.0",
|
|
@@ -177,8 +177,10 @@ export const VBusyImage = defineComponent({
|
|
|
177
177
|
watch(
|
|
178
178
|
() =>
|
|
179
179
|
[ctx.attrs.src as string | null | undefined, mounted.value] as const,
|
|
180
|
-
([src, _mounted]) => {
|
|
180
|
+
([src, _mounted], before) => {
|
|
181
181
|
if (!_mounted) return;
|
|
182
|
+
if (src === before?.[0] && !props.cover && !isPendingRef.value) return;
|
|
183
|
+
|
|
182
184
|
coverImageRef.value = undefined;
|
|
183
185
|
if (isAvailableSrc(src)) {
|
|
184
186
|
loadStateRef.value = 'loading';
|
|
@@ -7,7 +7,11 @@ import {
|
|
|
7
7
|
VNodeChild,
|
|
8
8
|
} from 'vue';
|
|
9
9
|
import { colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
ExtractPropInput,
|
|
12
|
+
createPropsOptions,
|
|
13
|
+
withCtx,
|
|
14
|
+
} from '@fastkit/vue-utils';
|
|
11
15
|
import { VAction, actionableInheritProps } from '@fastkit/vue-action';
|
|
12
16
|
import { useVui } from '../../injections';
|
|
13
17
|
import { createControlProps, useControl } from '../../composables';
|
|
@@ -136,7 +140,7 @@ export const VButton = defineComponent({
|
|
|
136
140
|
class={['v-button', classes.value]}
|
|
137
141
|
guardInProgressClass="v-button--guard-in-progress"
|
|
138
142
|
v-slots={{
|
|
139
|
-
default: () => (
|
|
143
|
+
default: withCtx(() => (
|
|
140
144
|
<>
|
|
141
145
|
<span class="v-button__content">
|
|
142
146
|
{startIcon.value}
|
|
@@ -152,7 +156,7 @@ export const VButton = defineComponent({
|
|
|
152
156
|
/>
|
|
153
157
|
)}
|
|
154
158
|
</>
|
|
155
|
-
),
|
|
159
|
+
)),
|
|
156
160
|
}}
|
|
157
161
|
/>
|
|
158
162
|
);
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createFormSelectorItemSettings,
|
|
5
5
|
useFormSelectorItemControl,
|
|
6
6
|
} from '@fastkit/vue-form-control';
|
|
7
|
+
import { withCtxForSlots } from '@fastkit/vue-utils';
|
|
7
8
|
import { createControlProps, useControl } from '../../composables';
|
|
8
9
|
import {
|
|
9
10
|
VUI_CHECKBOX_GROUP_SYMBOL,
|
|
@@ -61,7 +62,7 @@ export const VCheckbox = defineComponent({
|
|
|
61
62
|
invalid={nodeControl.invalid}
|
|
62
63
|
disabled={nodeControl.isDisabled}
|
|
63
64
|
readonly={nodeControl.isReadonly}
|
|
64
|
-
v-slots={slots}
|
|
65
|
+
v-slots={withCtxForSlots(slots)}
|
|
65
66
|
/>
|
|
66
67
|
);
|
|
67
68
|
},
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
FormNodeWrapper,
|
|
8
8
|
RequiredChipSource,
|
|
9
9
|
} from '@fastkit/vue-form-control';
|
|
10
|
-
import { defineSlots } from '@fastkit/vue-utils';
|
|
10
|
+
import { defineSlots, typedSlotsWithCtx } from '@fastkit/vue-utils';
|
|
11
11
|
import { useVuiColorProvider, useVui } from '../../injections';
|
|
12
12
|
import type { VuiService } from '../../service';
|
|
13
13
|
import { VIcon } from '../VIcon';
|
|
@@ -142,7 +142,7 @@ export const VFormControl = defineComponent({
|
|
|
142
142
|
? _hinttipDelay
|
|
143
143
|
: undefined
|
|
144
144
|
}
|
|
145
|
-
v-slots={{
|
|
145
|
+
v-slots={typedSlotsWithCtx(VTooltip, {
|
|
146
146
|
activator: (tooltip) => (
|
|
147
147
|
<a
|
|
148
148
|
class="v-form-control__label__hinttip"
|
|
@@ -152,7 +152,7 @@ export const VFormControl = defineComponent({
|
|
|
152
152
|
{hinttip.tip}
|
|
153
153
|
</a>
|
|
154
154
|
),
|
|
155
|
-
}}>
|
|
155
|
+
})}>
|
|
156
156
|
<div class="v-form-control__label__hinttip__hint">
|
|
157
157
|
{hinttip.hint}
|
|
158
158
|
</div>
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createFormSelectorItemSettings,
|
|
5
5
|
useFormSelectorItemControl,
|
|
6
6
|
} from '@fastkit/vue-form-control';
|
|
7
|
+
import { withCtxForSlots } from '@fastkit/vue-utils';
|
|
7
8
|
import { createControlProps, useControl } from '../../composables';
|
|
8
9
|
import { VUI_RADIO_GROUP_SYMBOL, VUI_RADIO_SYMBOL } from '../../injections';
|
|
9
10
|
import { VCheckable } from '../VCheckable';
|
|
@@ -44,7 +45,7 @@ export const VRadio = defineComponent({
|
|
|
44
45
|
invalid={nodeControl.invalid}
|
|
45
46
|
disabled={nodeControl.isDisabled}
|
|
46
47
|
readonly={nodeControl.isReadonly}
|
|
47
|
-
v-slots={slots}
|
|
48
|
+
v-slots={withCtxForSlots(slots)}
|
|
48
49
|
/>
|
|
49
50
|
);
|
|
50
51
|
},
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
createPropsOptions,
|
|
21
21
|
VNodeChildOrSlot,
|
|
22
22
|
resolveVNodeChildOrSlots,
|
|
23
|
+
withCtxForSlots,
|
|
24
|
+
withCtx,
|
|
23
25
|
} from '@fastkit/vue-utils';
|
|
24
26
|
import { useKeyboard } from '@fastkit/vue-keyboard';
|
|
25
27
|
import { VStackActivatorPayload, MenuAPI } from '@fastkit/vue-stack';
|
|
@@ -403,8 +405,8 @@ export const VSelect = defineComponent({
|
|
|
403
405
|
}}
|
|
404
406
|
v-slots={{
|
|
405
407
|
...ctx.slots,
|
|
406
|
-
default: controlDefaultSlot,
|
|
407
|
-
endAdornment: endAdornmentSlot,
|
|
408
|
+
default: withCtx(controlDefaultSlot),
|
|
409
|
+
endAdornment: withCtx(endAdornmentSlot),
|
|
408
410
|
}}
|
|
409
411
|
/>
|
|
410
412
|
);
|
|
@@ -429,7 +431,7 @@ export const VSelect = defineComponent({
|
|
|
429
431
|
v-model={menuOpened.value}
|
|
430
432
|
ref={menuRef}
|
|
431
433
|
onClose={clearKeyFocused}
|
|
432
|
-
v-slots={menuSlots}
|
|
434
|
+
v-slots={withCtxForSlots(menuSlots)}
|
|
433
435
|
/>
|
|
434
436
|
);
|
|
435
437
|
|
|
@@ -445,7 +447,7 @@ export const VSelect = defineComponent({
|
|
|
445
447
|
onClickLabel={handleClickLabel}
|
|
446
448
|
v-slots={{
|
|
447
449
|
...ctx.slots,
|
|
448
|
-
default: defaultSlot,
|
|
450
|
+
default: withCtx(defaultSlot),
|
|
449
451
|
}}
|
|
450
452
|
/>
|
|
451
453
|
);
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createFormSelectorItemSettings,
|
|
5
5
|
useFormSelectorItemControl,
|
|
6
6
|
} from '@fastkit/vue-form-control';
|
|
7
|
+
import { withCtxForSlots } from '@fastkit/vue-utils';
|
|
7
8
|
import { createControlProps, useControl } from '../../composables';
|
|
8
9
|
import { VUI_SWITCH_GROUP_SYMBOL, VUI_SWITCH_SYMBOL } from '../../injections';
|
|
9
10
|
import { VCheckable } from '../VCheckable';
|
|
@@ -59,7 +60,7 @@ export const VSwitch = defineComponent({
|
|
|
59
60
|
invalid={nodeControl.invalid}
|
|
60
61
|
disabled={nodeControl.isDisabled}
|
|
61
62
|
readonly={nodeControl.isReadonly}
|
|
62
|
-
v-slots={slots}
|
|
63
|
+
v-slots={withCtxForSlots(slots)}
|
|
63
64
|
/>
|
|
64
65
|
);
|
|
65
66
|
},
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
FormNodeWrapperSlots,
|
|
8
8
|
TextInputNodeEmits,
|
|
9
9
|
} from '@fastkit/vue-form-control';
|
|
10
|
-
import { defineSlots, ExtractPropInput } from '@fastkit/vue-utils';
|
|
10
|
+
import { defineSlots, ExtractPropInput, withCtx } from '@fastkit/vue-utils';
|
|
11
11
|
import { VFormControl } from '../VFormControl';
|
|
12
12
|
import {
|
|
13
13
|
VControlField,
|
|
@@ -73,12 +73,12 @@ export const VTextField = defineComponent({
|
|
|
73
73
|
size={control.size.value}
|
|
74
74
|
v-slots={{
|
|
75
75
|
...ctx.slots,
|
|
76
|
-
default: () => [
|
|
76
|
+
default: withCtx(() => [
|
|
77
77
|
inputControl.createInputElement({
|
|
78
78
|
class: 'v-text-field__input__element',
|
|
79
79
|
}),
|
|
80
80
|
inputControl.createDatalist(),
|
|
81
|
-
],
|
|
81
|
+
]),
|
|
82
82
|
}}
|
|
83
83
|
/>
|
|
84
84
|
);
|
|
@@ -106,8 +106,8 @@ export const VTextField = defineComponent({
|
|
|
106
106
|
onClickLabel={handleClickLabel}
|
|
107
107
|
v-slots={{
|
|
108
108
|
...ctx.slots,
|
|
109
|
-
default: defaultSlot,
|
|
110
|
-
infoAppends: infoAppendsSlot,
|
|
109
|
+
default: withCtx(defaultSlot),
|
|
110
|
+
infoAppends: withCtx(infoAppendsSlot),
|
|
111
111
|
}}
|
|
112
112
|
/>
|
|
113
113
|
);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createFormNodeWrapperProps,
|
|
7
7
|
FormNodeWrapperSlots,
|
|
8
8
|
} from '@fastkit/vue-form-control';
|
|
9
|
-
import { defineSlots } from '@fastkit/vue-utils';
|
|
9
|
+
import { defineSlots, withCtx } from '@fastkit/vue-utils';
|
|
10
10
|
import { VFormControl } from '../VFormControl';
|
|
11
11
|
import {
|
|
12
12
|
VControlField,
|
|
@@ -60,10 +60,11 @@ export const VTextarea = defineComponent({
|
|
|
60
60
|
endAdornment={props.endAdornment}
|
|
61
61
|
v-slots={{
|
|
62
62
|
...ctx.slots,
|
|
63
|
-
default: () =>
|
|
63
|
+
default: withCtx(() =>
|
|
64
64
|
inputControl.createInputElement({
|
|
65
65
|
class: 'v-textarea__input__element',
|
|
66
66
|
}),
|
|
67
|
+
),
|
|
67
68
|
}}
|
|
68
69
|
/>
|
|
69
70
|
);
|
|
@@ -88,8 +89,8 @@ export const VTextarea = defineComponent({
|
|
|
88
89
|
}}
|
|
89
90
|
v-slots={{
|
|
90
91
|
...ctx.slots,
|
|
91
|
-
default: defaultSlot,
|
|
92
|
-
infoAppends: infoAppendsSlot,
|
|
92
|
+
default: withCtx(defaultSlot),
|
|
93
|
+
infoAppends: withCtx(infoAppendsSlot),
|
|
93
94
|
}}
|
|
94
95
|
/>
|
|
95
96
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './VTooltip.scss';
|
|
2
2
|
|
|
3
3
|
import { defineComponent } from 'vue';
|
|
4
|
+
import { typedSlotWithCtx } from '@fastkit/vue-utils';
|
|
4
5
|
import { VMenu } from '../VMenu';
|
|
5
6
|
|
|
6
7
|
export const VTooltip = defineComponent({
|
|
@@ -30,9 +31,9 @@ export const VTooltip = defineComponent({
|
|
|
30
31
|
class="v-tooltip"
|
|
31
32
|
v-slots={{
|
|
32
33
|
...ctx.slots,
|
|
33
|
-
default: (payload) => [
|
|
34
|
+
default: typedSlotWithCtx(VMenu, 'default', (payload) => [
|
|
34
35
|
<span class="v-tooltip__inner">{defaultSlot?.(payload)}</span>,
|
|
35
|
-
],
|
|
36
|
+
]),
|
|
36
37
|
}}
|
|
37
38
|
/>
|
|
38
39
|
);
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
FormNodeControl,
|
|
11
11
|
} from '@fastkit/vue-form-control';
|
|
12
12
|
import {
|
|
13
|
+
withCtx,
|
|
13
14
|
defineSlots,
|
|
14
15
|
TypedSlot,
|
|
15
16
|
VNodeChildOrSlot,
|
|
@@ -166,7 +167,7 @@ export function defineFormSelectorComponent(
|
|
|
166
167
|
error={selectorControl.itemsLoadFailed}
|
|
167
168
|
v-slots={{
|
|
168
169
|
...ctx.slots,
|
|
169
|
-
default: defaultSlot,
|
|
170
|
+
default: withCtx(defaultSlot),
|
|
170
171
|
}}
|
|
171
172
|
/>
|
|
172
173
|
);
|
package/src/service.tsx
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
VStackBuiltinActions,
|
|
15
15
|
BUILTIN_ACTION_HANDLERS,
|
|
16
16
|
} from '@fastkit/vue-stack';
|
|
17
|
-
import { type VNodeChildOrSlot } from '@fastkit/vue-utils';
|
|
17
|
+
import { type VNodeChildOrSlot, withCtx } from '@fastkit/vue-utils';
|
|
18
18
|
import { type VueColorSchemePluginSettings } from '@fastkit/vue-color-scheme';
|
|
19
19
|
import type { Router } from 'vue-router';
|
|
20
20
|
import { RouterLink, useLink, UseLinkOptions } from 'vue-router';
|
|
@@ -385,10 +385,10 @@ export class VuiService {
|
|
|
385
385
|
stack.resolve(_state);
|
|
386
386
|
}}
|
|
387
387
|
v-slots={{
|
|
388
|
-
default: (_form) => {
|
|
388
|
+
default: withCtx((_form: VueForm) => {
|
|
389
389
|
form = _form;
|
|
390
390
|
return slot(_state, { form, stack });
|
|
391
|
-
},
|
|
391
|
+
}),
|
|
392
392
|
}}
|
|
393
393
|
/>
|
|
394
394
|
));
|