@fastkit/vui 0.6.31 ā 0.6.35
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.cjs.js +207 -11
- package/dist/vui.cjs.prod.js +207 -11
- package/dist/vui.css +37 -2
- package/dist/vui.d.ts +141 -0
- package/dist/vui.esm-bundler.js +203 -13
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/package.json +11 -9
package/dist/vui.css
CHANGED
|
@@ -965,13 +965,14 @@ thead th {
|
|
|
965
965
|
.v-button--rounded {
|
|
966
966
|
--padding: 0;
|
|
967
967
|
min-width: 0;
|
|
968
|
+
aspect-ratio: 1/1;
|
|
968
969
|
margin: calc(var(--root-em) * 0.125) calc(var(--root-em) * 0.125);
|
|
969
970
|
border-radius: 50%;
|
|
970
|
-
aspect-ratio: 1/1;
|
|
971
971
|
--height: auto;
|
|
972
972
|
}
|
|
973
973
|
.v-button--icon {
|
|
974
|
-
min-width:
|
|
974
|
+
min-width: 1.9285714286em;
|
|
975
|
+
margin: calc(var(--root-em) * 0.125) calc(var(--root-em) * 0.125);
|
|
975
976
|
--height: 1.9285714286em;
|
|
976
977
|
--padding: 0em;
|
|
977
978
|
}
|
|
@@ -1010,6 +1011,25 @@ thead th {
|
|
|
1010
1011
|
z-index: 1;
|
|
1011
1012
|
transform: translate(-50%, -50%);
|
|
1012
1013
|
}
|
|
1014
|
+
.v-button-group {
|
|
1015
|
+
display: inline-flex;
|
|
1016
|
+
align-items: stretch;
|
|
1017
|
+
}
|
|
1018
|
+
.v-button-group__item {
|
|
1019
|
+
position: relative;
|
|
1020
|
+
margin: 0;
|
|
1021
|
+
}
|
|
1022
|
+
.v-button-group__item--has-left {
|
|
1023
|
+
border-top-left-radius: 0;
|
|
1024
|
+
border-bottom-left-radius: 0;
|
|
1025
|
+
}
|
|
1026
|
+
.v-button-group__item--has-right {
|
|
1027
|
+
border-top-right-radius: 0;
|
|
1028
|
+
border-bottom-right-radius: 0;
|
|
1029
|
+
}
|
|
1030
|
+
.v-button-group__item:focus {
|
|
1031
|
+
z-index: 1;
|
|
1032
|
+
}
|
|
1013
1033
|
.v-pagination {
|
|
1014
1034
|
--pagination-size: var(--pagination-item-size);
|
|
1015
1035
|
--pagination-margin: var(--pagination-item-margin);
|
|
@@ -1708,6 +1728,21 @@ thead th {
|
|
|
1708
1728
|
font-style: italic;
|
|
1709
1729
|
color: var(--control-disabled-color);
|
|
1710
1730
|
}
|
|
1731
|
+
.v-wysiwyg-editor__input {
|
|
1732
|
+
cursor: text;
|
|
1733
|
+
}
|
|
1734
|
+
.v-wysiwyg-editor__input__element {
|
|
1735
|
+
width: 100%;
|
|
1736
|
+
min-width: 0;
|
|
1737
|
+
padding: 8px 0;
|
|
1738
|
+
margin: 0;
|
|
1739
|
+
}
|
|
1740
|
+
.v-wysiwyg-editor__input__element .ProseMirror {
|
|
1741
|
+
outline: none;
|
|
1742
|
+
}
|
|
1743
|
+
.v-wysiwyg-editor__input__element p {
|
|
1744
|
+
margin: 0;
|
|
1745
|
+
}
|
|
1711
1746
|
.v-tabs {
|
|
1712
1747
|
position: relative;
|
|
1713
1748
|
width: 100%;
|
package/dist/vui.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ComponentOptionsMixin } from 'vue';
|
|
|
6
6
|
import { ComputedRef } from 'vue';
|
|
7
7
|
import { CSSProperties } from 'vue';
|
|
8
8
|
import { DefineComponent } from 'vue';
|
|
9
|
+
import { Editor } from '@tiptap/vue-3';
|
|
9
10
|
import { EmitsOptions } from 'vue';
|
|
10
11
|
import { ExtractPropInput } from '@fastkit/vue-utils';
|
|
11
12
|
import { ExtractPropTypes } from 'vue';
|
|
@@ -879,6 +880,38 @@ export declare const VButton: DefineComponent<{
|
|
|
879
880
|
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false" | undefined;
|
|
880
881
|
}>;
|
|
881
882
|
|
|
883
|
+
export declare const VButtonGroup: DefineComponent<{
|
|
884
|
+
disabled: BooleanConstructor;
|
|
885
|
+
size: {
|
|
886
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
887
|
+
validator: (value: any) => boolean;
|
|
888
|
+
};
|
|
889
|
+
variant: PropType<ColorVariant>;
|
|
890
|
+
theme: PropType<ThemeName>;
|
|
891
|
+
color: PropType<ScopeName>;
|
|
892
|
+
textColor: PropType<PaletteName>;
|
|
893
|
+
borderColor: PropType<PaletteName>;
|
|
894
|
+
}, () => JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
|
|
895
|
+
disabled?: unknown;
|
|
896
|
+
size?: unknown;
|
|
897
|
+
variant?: unknown;
|
|
898
|
+
theme?: unknown;
|
|
899
|
+
color?: unknown;
|
|
900
|
+
textColor?: unknown;
|
|
901
|
+
borderColor?: unknown;
|
|
902
|
+
} & {
|
|
903
|
+
disabled: boolean;
|
|
904
|
+
} & {
|
|
905
|
+
theme?: ThemeName | undefined;
|
|
906
|
+
color?: ScopeName | undefined;
|
|
907
|
+
textColor?: PaletteName | undefined;
|
|
908
|
+
borderColor?: PaletteName | undefined;
|
|
909
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
910
|
+
variant?: ColorVariant | undefined;
|
|
911
|
+
}>, {
|
|
912
|
+
disabled: boolean;
|
|
913
|
+
}>;
|
|
914
|
+
|
|
882
915
|
export declare type VButtonIcon = () => VNodeChild;
|
|
883
916
|
|
|
884
917
|
export declare type VButtonProps = ExtractPropInput<typeof vueButtonProps>;
|
|
@@ -4080,6 +4113,114 @@ export declare interface VuiServiceUISettings {
|
|
|
4080
4113
|
|
|
4081
4114
|
export declare type VuiVNodeResolver = () => VNodeChild;
|
|
4082
4115
|
|
|
4116
|
+
export declare const VWysiwygEditor: DefineComponent<{
|
|
4117
|
+
'v-slots': PropType<ResolveRawSlots<FormControlSlots & InputBoxSlots>>;
|
|
4118
|
+
size: {
|
|
4119
|
+
type: PropType<"sm" | "md" | "lg">;
|
|
4120
|
+
validator: (value: any) => boolean;
|
|
4121
|
+
};
|
|
4122
|
+
variant: {
|
|
4123
|
+
type: PropType<"flat" | "outlined" | "filled">;
|
|
4124
|
+
validator: (value: any) => boolean;
|
|
4125
|
+
};
|
|
4126
|
+
startAdornment: PropType<VNodeChildOrSlot<any>>;
|
|
4127
|
+
endAdornment: PropType<VNodeChildOrSlot<any>>;
|
|
4128
|
+
tabindex: {
|
|
4129
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
4130
|
+
default: number;
|
|
4131
|
+
};
|
|
4132
|
+
nodeControl: PropType<FormNodeControl<any, any>>;
|
|
4133
|
+
label: PropType<VNodeChildOrSlot<any>>;
|
|
4134
|
+
hint: PropType<VNodeChildOrSlot<any>>;
|
|
4135
|
+
infoAppends: PropType<VNodeChildOrSlot<any>>;
|
|
4136
|
+
validating: BooleanConstructor;
|
|
4137
|
+
pending: BooleanConstructor;
|
|
4138
|
+
focused: BooleanConstructor;
|
|
4139
|
+
dirty: BooleanConstructor;
|
|
4140
|
+
pristine: BooleanConstructor;
|
|
4141
|
+
errors: {
|
|
4142
|
+
type: PropType<FormNodeError[]>;
|
|
4143
|
+
default: () => FormNodeError[];
|
|
4144
|
+
};
|
|
4145
|
+
disabled: BooleanConstructor;
|
|
4146
|
+
readonly: BooleanConstructor;
|
|
4147
|
+
touched: BooleanConstructor;
|
|
4148
|
+
untouched: BooleanConstructor;
|
|
4149
|
+
required: BooleanConstructor;
|
|
4150
|
+
invalid: BooleanConstructor;
|
|
4151
|
+
valid: BooleanConstructor;
|
|
4152
|
+
hiddenInfo: BooleanConstructor;
|
|
4153
|
+
}, {
|
|
4154
|
+
editor: Ref<Editor>;
|
|
4155
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
|
|
4156
|
+
'v-slots'?: unknown;
|
|
4157
|
+
size?: unknown;
|
|
4158
|
+
variant?: unknown;
|
|
4159
|
+
startAdornment?: unknown;
|
|
4160
|
+
endAdornment?: unknown;
|
|
4161
|
+
tabindex?: unknown;
|
|
4162
|
+
nodeControl?: unknown;
|
|
4163
|
+
label?: unknown;
|
|
4164
|
+
hint?: unknown;
|
|
4165
|
+
infoAppends?: unknown;
|
|
4166
|
+
validating?: unknown;
|
|
4167
|
+
pending?: unknown;
|
|
4168
|
+
focused?: unknown;
|
|
4169
|
+
dirty?: unknown;
|
|
4170
|
+
pristine?: unknown;
|
|
4171
|
+
errors?: unknown;
|
|
4172
|
+
disabled?: unknown;
|
|
4173
|
+
readonly?: unknown;
|
|
4174
|
+
touched?: unknown;
|
|
4175
|
+
untouched?: unknown;
|
|
4176
|
+
required?: unknown;
|
|
4177
|
+
invalid?: unknown;
|
|
4178
|
+
valid?: unknown;
|
|
4179
|
+
hiddenInfo?: unknown;
|
|
4180
|
+
} & {
|
|
4181
|
+
validating: boolean;
|
|
4182
|
+
pending: boolean;
|
|
4183
|
+
focused: boolean;
|
|
4184
|
+
dirty: boolean;
|
|
4185
|
+
pristine: boolean;
|
|
4186
|
+
disabled: boolean;
|
|
4187
|
+
readonly: boolean;
|
|
4188
|
+
touched: boolean;
|
|
4189
|
+
untouched: boolean;
|
|
4190
|
+
required: boolean;
|
|
4191
|
+
invalid: boolean;
|
|
4192
|
+
valid: boolean;
|
|
4193
|
+
hiddenInfo: boolean;
|
|
4194
|
+
errors: FormNodeError[];
|
|
4195
|
+
tabindex: string | number;
|
|
4196
|
+
} & {
|
|
4197
|
+
nodeControl?: FormNodeControl<any, any> | undefined;
|
|
4198
|
+
label?: VNodeChildOrSlot<any>;
|
|
4199
|
+
hint?: VNodeChildOrSlot<any>;
|
|
4200
|
+
infoAppends?: VNodeChildOrSlot<any>;
|
|
4201
|
+
startAdornment?: VNodeChildOrSlot<any>;
|
|
4202
|
+
endAdornment?: VNodeChildOrSlot<any>;
|
|
4203
|
+
variant?: "flat" | "outlined" | "filled" | undefined;
|
|
4204
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
4205
|
+
"v-slots"?: ResolveRawSlots<FormControlSlots & InputBoxSlots> | undefined;
|
|
4206
|
+
}>, {
|
|
4207
|
+
validating: boolean;
|
|
4208
|
+
pending: boolean;
|
|
4209
|
+
focused: boolean;
|
|
4210
|
+
dirty: boolean;
|
|
4211
|
+
pristine: boolean;
|
|
4212
|
+
disabled: boolean;
|
|
4213
|
+
readonly: boolean;
|
|
4214
|
+
touched: boolean;
|
|
4215
|
+
untouched: boolean;
|
|
4216
|
+
required: boolean;
|
|
4217
|
+
invalid: boolean;
|
|
4218
|
+
valid: boolean;
|
|
4219
|
+
hiddenInfo: boolean;
|
|
4220
|
+
errors: FormNodeError[];
|
|
4221
|
+
tabindex: string | number;
|
|
4222
|
+
}>;
|
|
4223
|
+
|
|
4083
4224
|
|
|
4084
4225
|
export * from "@fastkit/vue-kit";
|
|
4085
4226
|
export * from "@fastkit/vue-loading";
|
package/dist/vui.esm-bundler.js
CHANGED
|
@@ -3,13 +3,15 @@ export * from '@fastkit/vue-kit';
|
|
|
3
3
|
export { VDialog, VMenu, VSnackbar } from '@fastkit/vue-kit';
|
|
4
4
|
import { useRouter, RouterLink, useLink, useRoute } from 'vue-router';
|
|
5
5
|
import { createPropsOptions as createPropsOptions$1, defineSlotsProps as defineSlotsProps$1, renderSlotOrEmpty as renderSlotOrEmpty$1, navigationableInheritProps, VLink, rawNumberPropType, resolveNumberish, resizeDirectiveArgument, VExpandTransition, LocationService, setDefaultRouterLink } from '@fastkit/vue-utils';
|
|
6
|
-
import { inject, computed, provide, defineComponent, createVNode, mergeProps, ref, watch, withDirectives, createTextVNode,
|
|
6
|
+
import { inject, computed, provide, defineComponent, createVNode, mergeProps, isVNode, cloneVNode, ref, watch, withDirectives, createTextVNode, Fragment, vShow, onBeforeUpdate, vModelSelect, onMounted, onBeforeUnmount, Transition } from 'vue';
|
|
7
7
|
import { useScopeColorClass, colorSchemeProps, useColorClasses, toScopeColorClass } from '@fastkit/vue-color-scheme';
|
|
8
8
|
import { VProgressCircular } from '@fastkit/vue-loading';
|
|
9
9
|
export * from '@fastkit/vue-loading';
|
|
10
10
|
export { ICON_NAMES } from '@fastkit/icon-font';
|
|
11
11
|
import { isPromise } from '@fastkit/helpers';
|
|
12
12
|
import { VAppContainer, VAppLayoutControl } from '@fastkit/vue-app-layout';
|
|
13
|
+
import { useEditor, EditorContent, BubbleMenu } from '@tiptap/vue-3';
|
|
14
|
+
import StarterKit from '@tiptap/starter-kit';
|
|
13
15
|
import { getDocumentScroller as getDocumentScroller$1 } from '@fastkit/vue-scroller';
|
|
14
16
|
|
|
15
17
|
const CONTROL_SIZES = ['sm', 'md', 'lg'];
|
|
@@ -478,8 +480,10 @@ const VButton = defineComponent({
|
|
|
478
480
|
});
|
|
479
481
|
const isPlain = computed(() => color.variant.value.value === vui.setting('plainVariant') && color.color.value.value === defaults.color);
|
|
480
482
|
const isLoading = computed(() => props.loading); // const isDisabled = computed(() => props.disabled);
|
|
483
|
+
// const isRounded = computed(() =>
|
|
484
|
+
// props.rounded != null ? props.rounded : !!icon.value,
|
|
485
|
+
// );
|
|
481
486
|
|
|
482
|
-
const isRounded = computed(() => props.rounded || !!icon.value);
|
|
483
487
|
const spacer = computed(() => {
|
|
484
488
|
const _spacer = props.spacer;
|
|
485
489
|
if (!_spacer) return;
|
|
@@ -489,7 +493,7 @@ const VButton = defineComponent({
|
|
|
489
493
|
spacer.value ? `v-button--spacer-${spacer.value}` : undefined, `v-button--${control.size.value}`, {
|
|
490
494
|
'v-button--loading': isLoading.value,
|
|
491
495
|
'v-button--icon': !!icon.value,
|
|
492
|
-
'v-button--rounded':
|
|
496
|
+
'v-button--rounded': props.rounded,
|
|
493
497
|
'v-button--plain': isPlain.value
|
|
494
498
|
}]);
|
|
495
499
|
return () => {
|
|
@@ -510,6 +514,66 @@ const VButton = defineComponent({
|
|
|
510
514
|
|
|
511
515
|
});
|
|
512
516
|
|
|
517
|
+
const VButtonGroup = defineComponent({
|
|
518
|
+
name: 'VButtonGroup',
|
|
519
|
+
props: { ...colorSchemeProps(),
|
|
520
|
+
...createControlProps(),
|
|
521
|
+
disabled: Boolean
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
setup(props, ctx) {
|
|
525
|
+
return () => {
|
|
526
|
+
let buttonLength = 0;
|
|
527
|
+
const children = (renderSlotOrEmpty$1(ctx.slots) || []).map(node => {
|
|
528
|
+
if (!isVNode(node) || node.type !== VButton) {
|
|
529
|
+
return {
|
|
530
|
+
isButton: false,
|
|
531
|
+
node
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
buttonLength++;
|
|
536
|
+
return {
|
|
537
|
+
isButton: true,
|
|
538
|
+
node
|
|
539
|
+
};
|
|
540
|
+
}); // const children = renderSlotOrEmpty(ctx.slots) || [];
|
|
541
|
+
// const $children = children.map((child) => {
|
|
542
|
+
// if (!isVNode(child) || child.type !== VButton) return child;
|
|
543
|
+
// const $child = cloneVNode(child, {
|
|
544
|
+
// ...props,
|
|
545
|
+
// ...child.props,
|
|
546
|
+
// });
|
|
547
|
+
// return $child;
|
|
548
|
+
// });
|
|
549
|
+
|
|
550
|
+
let buttonIndex = 0;
|
|
551
|
+
const $children = children.map(child => {
|
|
552
|
+
if (child.isButton) {
|
|
553
|
+
buttonIndex++;
|
|
554
|
+
const hasLeft = buttonIndex > 1;
|
|
555
|
+
const hasRight = buttonIndex < buttonLength;
|
|
556
|
+
const childProps = child.node.props;
|
|
557
|
+
return cloneVNode(child.node, { ...props,
|
|
558
|
+
...childProps,
|
|
559
|
+
rouded: false,
|
|
560
|
+
class: ['v-button-group__item', {
|
|
561
|
+
'v-button-group__item--has-left': hasLeft,
|
|
562
|
+
'v-button-group__item--has-right': hasRight
|
|
563
|
+
}]
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return child.node;
|
|
568
|
+
});
|
|
569
|
+
return createVNode("div", {
|
|
570
|
+
"class": "v-button-group"
|
|
571
|
+
}, [$children]);
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
});
|
|
576
|
+
|
|
513
577
|
function _isSlot$c(s) {
|
|
514
578
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
515
579
|
}
|
|
@@ -840,9 +904,9 @@ const VListTile = defineComponent({
|
|
|
840
904
|
return icon;
|
|
841
905
|
});
|
|
842
906
|
const endIcon = computed(() => resolveRawIconProp(false, props.endIcon));
|
|
843
|
-
const hasTo = computed(() => !!
|
|
907
|
+
const hasTo = computed(() => !!ctx.attrs.to);
|
|
844
908
|
const link = useLink({
|
|
845
|
-
to:
|
|
909
|
+
to: ctx.attrs.to || ''
|
|
846
910
|
});
|
|
847
911
|
const isActive = computed(() => {
|
|
848
912
|
if (!hasTo.value) return false;
|
|
@@ -964,7 +1028,11 @@ function _isSlot$a(s) {
|
|
|
964
1028
|
|
|
965
1029
|
function createNavigationItemProps() {
|
|
966
1030
|
return { ...createListTileProps(),
|
|
967
|
-
match: String
|
|
1031
|
+
match: String // key: {
|
|
1032
|
+
// type: [String, Number],
|
|
1033
|
+
// required: true,
|
|
1034
|
+
// },
|
|
1035
|
+
|
|
968
1036
|
};
|
|
969
1037
|
}
|
|
970
1038
|
function resolveNavigationItemInput(input) {
|
|
@@ -1009,12 +1077,14 @@ const VNavigationItem = defineComponent({
|
|
|
1009
1077
|
const c = props.children;
|
|
1010
1078
|
return c && c.length ? c : undefined;
|
|
1011
1079
|
});
|
|
1012
|
-
const to = computed(() =>
|
|
1080
|
+
const to = computed(() => ctx.attrs.to);
|
|
1013
1081
|
const match = computed(() => {
|
|
1014
1082
|
const {
|
|
1015
|
-
match
|
|
1016
|
-
to
|
|
1083
|
+
match
|
|
1017
1084
|
} = props;
|
|
1085
|
+
const {
|
|
1086
|
+
to
|
|
1087
|
+
} = ctx.attrs;
|
|
1018
1088
|
if (match) return match;
|
|
1019
1089
|
if (!to) return;
|
|
1020
1090
|
if (typeof to === 'string') return to;
|
|
@@ -1084,6 +1154,7 @@ const VNavigationItem = defineComponent({
|
|
|
1084
1154
|
});
|
|
1085
1155
|
|
|
1086
1156
|
function open() {
|
|
1157
|
+
if (!children.value) return;
|
|
1087
1158
|
opened.value = true;
|
|
1088
1159
|
}
|
|
1089
1160
|
|
|
@@ -1097,9 +1168,13 @@ const VNavigationItem = defineComponent({
|
|
|
1097
1168
|
|
|
1098
1169
|
const onClick = ev => {
|
|
1099
1170
|
if (!to.value) {
|
|
1100
|
-
toggle();
|
|
1101
|
-
}
|
|
1171
|
+
return toggle();
|
|
1172
|
+
}
|
|
1102
1173
|
|
|
1174
|
+
open(); // if (!to.value) {
|
|
1175
|
+
// toggle();
|
|
1176
|
+
// }
|
|
1177
|
+
// ctx.emit('click', ev);
|
|
1103
1178
|
};
|
|
1104
1179
|
|
|
1105
1180
|
const onChangeActive = isActive => {
|
|
@@ -1121,6 +1196,9 @@ const VNavigationItem = defineComponent({
|
|
|
1121
1196
|
ctx.emit('changeActive', isActive);
|
|
1122
1197
|
};
|
|
1123
1198
|
|
|
1199
|
+
ctx.expose({
|
|
1200
|
+
close
|
|
1201
|
+
});
|
|
1124
1202
|
return () => {
|
|
1125
1203
|
let _slot;
|
|
1126
1204
|
|
|
@@ -1172,6 +1250,28 @@ const VNavigation = defineComponent({
|
|
|
1172
1250
|
const c = props.caption;
|
|
1173
1251
|
return typeof c === 'function' ? c() : c;
|
|
1174
1252
|
});
|
|
1253
|
+
const itemsRef = ref([]);
|
|
1254
|
+
onBeforeUpdate(() => {
|
|
1255
|
+
itemsRef.value = [];
|
|
1256
|
+
});
|
|
1257
|
+
|
|
1258
|
+
function setItemRef(item, itemRef) {
|
|
1259
|
+
itemsRef.value.push({
|
|
1260
|
+
key: item.key,
|
|
1261
|
+
ref: itemRef
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
function onItemActivated(item) {
|
|
1266
|
+
itemsRef.value.forEach(({
|
|
1267
|
+
key,
|
|
1268
|
+
ref
|
|
1269
|
+
}) => {
|
|
1270
|
+
if (key === item.key) return;
|
|
1271
|
+
ref.close();
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1175
1275
|
return () => {
|
|
1176
1276
|
const $caption = caption.value;
|
|
1177
1277
|
return createVNode("nav", {
|
|
@@ -1180,7 +1280,17 @@ const VNavigation = defineComponent({
|
|
|
1180
1280
|
"class": "v-navigation__caption"
|
|
1181
1281
|
}, [$caption]), items.value.map(item => renderNavigationItemInput(item, {
|
|
1182
1282
|
class: 'v-navigation__item',
|
|
1183
|
-
startIconEmptySpace: startIconEmptySpace.value
|
|
1283
|
+
startIconEmptySpace: startIconEmptySpace.value,
|
|
1284
|
+
ref: ref => {
|
|
1285
|
+
setItemRef(item, ref);
|
|
1286
|
+
},
|
|
1287
|
+
onChangeActive: isActive => {
|
|
1288
|
+
if (isActive
|
|
1289
|
+
/* && item.children && item.children.length*/
|
|
1290
|
+
) {
|
|
1291
|
+
onItemActivated(item);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1184
1294
|
}))]);
|
|
1185
1295
|
};
|
|
1186
1296
|
}
|
|
@@ -1929,6 +2039,86 @@ const VTextarea = defineComponent({
|
|
|
1929
2039
|
|
|
1930
2040
|
});
|
|
1931
2041
|
|
|
2042
|
+
const VWysiwygEditor = defineComponent({
|
|
2043
|
+
name: 'VWysiwygEditor',
|
|
2044
|
+
props: { // ...props,
|
|
2045
|
+
...createFormControlProps(),
|
|
2046
|
+
...createControlFieldProps(),
|
|
2047
|
+
...createControlFieldProviderProps(),
|
|
2048
|
+
...createControlProps(),
|
|
2049
|
+
...defineSlotsProps()
|
|
2050
|
+
},
|
|
2051
|
+
|
|
2052
|
+
// emits,
|
|
2053
|
+
setup(props, ctx) {
|
|
2054
|
+
const editor = useEditor({
|
|
2055
|
+
content: '<p>Iām running Tiptap with Vue.js. š</p>',
|
|
2056
|
+
extensions: [StarterKit]
|
|
2057
|
+
}); // const vui = useVui();
|
|
2058
|
+
// const inputControl = useTiptapControl(props, ctx, {
|
|
2059
|
+
// nodeType: VUI_TEXTAREA_SYMBOL,
|
|
2060
|
+
// defaultRows: vui.tiptapRows,
|
|
2061
|
+
// });
|
|
2062
|
+
// const control = useControl(props);
|
|
2063
|
+
// useControlField(props);
|
|
2064
|
+
|
|
2065
|
+
return {
|
|
2066
|
+
editor // ...inputControl.expose(),
|
|
2067
|
+
// ...control,
|
|
2068
|
+
|
|
2069
|
+
};
|
|
2070
|
+
},
|
|
2071
|
+
|
|
2072
|
+
render() {
|
|
2073
|
+
return createVNode(VFormControl, {
|
|
2074
|
+
"nodeControl": this.nodeControl,
|
|
2075
|
+
"label": this.label,
|
|
2076
|
+
"hint": this.hint,
|
|
2077
|
+
"hiddenInfo": this.hiddenInfo,
|
|
2078
|
+
"onClickLabel": ev => {// this.focus();
|
|
2079
|
+
}
|
|
2080
|
+
}, { ...this.$slots,
|
|
2081
|
+
default: () => createVNode(VControlField, {
|
|
2082
|
+
"class": "v-wysiwyg-editor__input",
|
|
2083
|
+
"autoHeight": true,
|
|
2084
|
+
"startAdornment": this.startAdornment,
|
|
2085
|
+
"endAdornment": this.endAdornment
|
|
2086
|
+
}, { ...this.$slots,
|
|
2087
|
+
default: () => {
|
|
2088
|
+
const {
|
|
2089
|
+
editor
|
|
2090
|
+
} = this;
|
|
2091
|
+
return createVNode(Fragment, null, [createVNode(EditorContent, {
|
|
2092
|
+
"class": "v-wysiwyg-editor__input__element wysiwyg",
|
|
2093
|
+
"editor": editor
|
|
2094
|
+
}, null), !!editor && createVNode(BubbleMenu, {
|
|
2095
|
+
"class": "v-wysiwyg-editor__bubble-menu",
|
|
2096
|
+
"editor": editor
|
|
2097
|
+
}, {
|
|
2098
|
+
default: () => [createVNode(VButton, {
|
|
2099
|
+
"size": "sm",
|
|
2100
|
+
"onClick": () => {
|
|
2101
|
+
editor.chain().focus().toggleBold().run();
|
|
2102
|
+
}
|
|
2103
|
+
}, {
|
|
2104
|
+
default: () => [createTextVNode("Bold")]
|
|
2105
|
+
})]
|
|
2106
|
+
})]);
|
|
2107
|
+
} // this.tiptapControl.createInputElement({
|
|
2108
|
+
// class: 'v-wysiwyg-editor__input__element',
|
|
2109
|
+
// }),
|
|
2110
|
+
|
|
2111
|
+
}) // infoAppends: () => {
|
|
2112
|
+
// const { counterResult } = this;
|
|
2113
|
+
// if (!counterResult) return;
|
|
2114
|
+
// return <VTextCounter {...counterResult} />;
|
|
2115
|
+
// },
|
|
2116
|
+
|
|
2117
|
+
});
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
});
|
|
2121
|
+
|
|
1932
2122
|
const {
|
|
1933
2123
|
props,
|
|
1934
2124
|
emits
|
|
@@ -3445,4 +3635,4 @@ function installVuiPlugin(app, opts) {
|
|
|
3445
3635
|
return app.use(VuiPlugin, opts);
|
|
3446
3636
|
}
|
|
3447
3637
|
|
|
3448
|
-
export { CONTROL_FIELD_VARIANTS, CONTROL_SIZES, PAGINATION_ALIGNS, VApp, VBreadcrumbs, VButton, VCard, VCardActions, VCardContent, VCheckbox, VCheckboxGroup, VContentSwitcher, VDataTable, VDrawerLayout, VForm, VHero, VIcon, VListTile, VNavigation, VNavigationItem, VOption, VOptionGroup, VPagination, VPaper, VRadio, VRadioGroup, VSelect, VSwitch, VSwitchGroup, VTabs, VTextField, VTextarea, VToolbar, VToolbarEdge, VToolbarMenu, VToolbarTitle, VUI_CHECKBOX_GROUP_SYMBOL, VUI_CHECKBOX_SYMBOL, VUI_FORM_SYMBOL, VUI_OPTION_SYMBOL, VUI_RADIO_GROUP_SYMBOL, VUI_RADIO_SYMBOL, VUI_SELECT_SYMBOL, VUI_SWITCH_GROUP_SYMBOL, VUI_SWITCH_SYMBOL, VUI_TEXTAREA_SYMBOL, VUI_TEXT_FIELD_SYMBOL, VuiColorProviderInjectionKey, VuiControlFieldInjectionKey, VuiControlInjectionKey, VuiInjectionKey, VuiPlugin, VuiService, configureDataTableDefaults, createCardProps, createControlFieldProviderProps, createControlProps, createElevationProps, createListTileProps, createNavigationItemProps, createPaperBaseProps, createPaperProps, defineFormSelectorComponent, iconProps, installVuiPlugin, listTileEmits, paginationProps, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|
|
3638
|
+
export { CONTROL_FIELD_VARIANTS, CONTROL_SIZES, PAGINATION_ALIGNS, VApp, VBreadcrumbs, VButton, VButtonGroup, VCard, VCardActions, VCardContent, VCheckbox, VCheckboxGroup, VContentSwitcher, VDataTable, VDrawerLayout, VForm, VHero, VIcon, VListTile, VNavigation, VNavigationItem, VOption, VOptionGroup, VPagination, VPaper, VRadio, VRadioGroup, VSelect, VSwitch, VSwitchGroup, VTabs, VTextField, VTextarea, VToolbar, VToolbarEdge, VToolbarMenu, VToolbarTitle, VUI_CHECKBOX_GROUP_SYMBOL, VUI_CHECKBOX_SYMBOL, VUI_FORM_SYMBOL, VUI_OPTION_SYMBOL, VUI_RADIO_GROUP_SYMBOL, VUI_RADIO_SYMBOL, VUI_SELECT_SYMBOL, VUI_SWITCH_GROUP_SYMBOL, VUI_SWITCH_SYMBOL, VUI_TEXTAREA_SYMBOL, VUI_TEXT_FIELD_SYMBOL, VWysiwygEditor, VuiColorProviderInjectionKey, VuiControlFieldInjectionKey, VuiControlInjectionKey, VuiInjectionKey, VuiPlugin, VuiService, configureDataTableDefaults, createCardProps, createControlFieldProviderProps, createControlProps, createElevationProps, createListTileProps, createNavigationItemProps, createPaperBaseProps, createPaperProps, defineFormSelectorComponent, iconProps, installVuiPlugin, listTileEmits, paginationProps, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|