@fastkit/vui 0.6.16 → 0.6.20
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 +385 -15
- package/dist/vui.cjs.prod.js +385 -15
- package/dist/vui.css +138 -4
- package/dist/vui.d.ts +263 -3
- package/dist/vui.esm-bundler.js +385 -20
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/package.json +6 -6
package/dist/vui.esm-bundler.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { createPropsOptions, createFormControlSettings, defineSlotsProps, useFormControl, renderSlotOrEmpty, createFormSelectorSettings, createFormControlProps, useFormSelectorControl, createFormSelectorItemSettings, useFormSelectorItemControl, createFormSelectorItemGroupProps, useFormSelectorItemGroupControl, resolveVNodeChildOrSlots, useParentFormNode, VMenu, createTextInputSettings, useTextInputControl, createTextareaSettings, useTextareaControl, createFormSettings, useForm, getDocumentScroller, useInjectTheme, VStackRoot, VueColorSchemePlugin, installVueStackPlugin } from '@fastkit/vue-kit';
|
|
2
2
|
export * from '@fastkit/vue-kit';
|
|
3
3
|
export { VDialog, VMenu, VSnackbar } from '@fastkit/vue-kit';
|
|
4
|
-
import { inject, computed, provide, defineComponent, createVNode, mergeProps, watch,
|
|
5
|
-
import { useScopeColorClass, colorSchemeProps, useColorClasses } from '@fastkit/vue-color-scheme';
|
|
6
|
-
import { createPropsOptions as createPropsOptions$1, defineSlotsProps as defineSlotsProps$1, renderSlotOrEmpty as renderSlotOrEmpty$1, navigationableProps, navigationableEmits, useNavigationable, VExpandTransition } from '@fastkit/vue-utils';
|
|
4
|
+
import { inject, computed, provide, defineComponent, createVNode, mergeProps, ref, watch, withDirectives, createTextVNode, isVNode, Fragment, vShow, vModelSelect } from 'vue';
|
|
5
|
+
import { useScopeColorClass, colorSchemeProps, useColorClasses, toScopeColorClass } from '@fastkit/vue-color-scheme';
|
|
6
|
+
import { createPropsOptions as createPropsOptions$1, defineSlotsProps as defineSlotsProps$1, renderSlotOrEmpty as renderSlotOrEmpty$1, navigationableProps, navigationableEmits, useNavigationable, rawNumberPropType, resolveNumberish, getRouteQuery, resizeDirectiveArgument, getQueryMergedLocation, VExpandTransition } from '@fastkit/vue-utils';
|
|
7
7
|
import { VProgressCircular } from '@fastkit/vue-loading';
|
|
8
8
|
export * from '@fastkit/vue-loading';
|
|
9
9
|
export { ICON_NAMES } from '@fastkit/icon-font';
|
|
10
|
-
import {
|
|
10
|
+
import { range, isPromise } from '@fastkit/helpers';
|
|
11
|
+
import { useRouter, useRoute, RouterLink, useLink } from 'vue-router';
|
|
12
|
+
import { VAppContainer } from '@fastkit/vue-app-layout';
|
|
11
13
|
|
|
12
14
|
const CONTROL_SIZES = ['sm', 'md', 'lg'];
|
|
13
15
|
const CONTROL_FIELD_VARIANTS = ['outlined', 'filled', 'flat'];
|
|
@@ -530,6 +532,296 @@ const VButton = defineComponent({
|
|
|
530
532
|
|
|
531
533
|
});
|
|
532
534
|
|
|
535
|
+
function _isSlot$8(s) {
|
|
536
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const PAGINATION_ALIGNS = ['left', 'center', 'right'];
|
|
540
|
+
function paginationProps() {
|
|
541
|
+
return createPropsOptions$1({
|
|
542
|
+
/**
|
|
543
|
+
* Active Pages
|
|
544
|
+
*/
|
|
545
|
+
modelValue: {
|
|
546
|
+
type: rawNumberPropType,
|
|
547
|
+
default: 1
|
|
548
|
+
},
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Total number of pages
|
|
552
|
+
*/
|
|
553
|
+
length: {
|
|
554
|
+
type: rawNumberPropType,
|
|
555
|
+
default: 0
|
|
556
|
+
},
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Maximum number of links to display.
|
|
560
|
+
*/
|
|
561
|
+
totalVisible: rawNumberPropType,
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* true when narrowing
|
|
565
|
+
*/
|
|
566
|
+
dense: Boolean,
|
|
567
|
+
disabled: Boolean,
|
|
568
|
+
align: {
|
|
569
|
+
type: String,
|
|
570
|
+
default: 'center'
|
|
571
|
+
},
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* To synchronize with a query, use the query name
|
|
575
|
+
*/
|
|
576
|
+
routeQuery: String,
|
|
577
|
+
beforeChange: Function,
|
|
578
|
+
color: String
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
const VPagination = defineComponent({
|
|
582
|
+
name: 'VPagination',
|
|
583
|
+
props: paginationProps(),
|
|
584
|
+
emits: {
|
|
585
|
+
change: page => true
|
|
586
|
+
},
|
|
587
|
+
|
|
588
|
+
setup(props, ctx) {
|
|
589
|
+
const vui = useVui();
|
|
590
|
+
const elRef = ref(null);
|
|
591
|
+
const router = useRouter();
|
|
592
|
+
const route = useRoute();
|
|
593
|
+
const internalValue = ref(1);
|
|
594
|
+
const containerWidth = ref(0);
|
|
595
|
+
const itemSize = ref(0);
|
|
596
|
+
const capacityLength = computed(() => {
|
|
597
|
+
const _itemSize = itemSize.value;
|
|
598
|
+
if (!_itemSize) return 0;
|
|
599
|
+
return Math.floor(containerWidth.value / _itemSize);
|
|
600
|
+
});
|
|
601
|
+
const colorScope = useScopeColorClass({
|
|
602
|
+
color: () => props.color || vui.setting('primaryScope')
|
|
603
|
+
});
|
|
604
|
+
const computedLength = computed(() => resolveNumberish(props.length));
|
|
605
|
+
const computedTotalVisible = computed(() => resolveNumberish(props.totalVisible));
|
|
606
|
+
const computedNumbersLength = computed(() => capacityLength.value - 2 - 2);
|
|
607
|
+
const computedPage = computed(() => {
|
|
608
|
+
const {
|
|
609
|
+
routeQuery
|
|
610
|
+
} = props;
|
|
611
|
+
|
|
612
|
+
if (routeQuery) {
|
|
613
|
+
return getRouteQuery(route.query, routeQuery, Number, 1);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
return internalValue.value;
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
const _range = (from, to) => range(to - from, from);
|
|
620
|
+
|
|
621
|
+
const computedItems = computed(() => {
|
|
622
|
+
const maxButtons = computedNumbersLength.value;
|
|
623
|
+
const totalVisible = computedTotalVisible.value;
|
|
624
|
+
const length = computedLength.value;
|
|
625
|
+
const pageValue = computedPage.value;
|
|
626
|
+
const maxLength = Math.min(Math.max(0, totalVisible || 0) || length, Math.max(0, maxButtons) || length, length);
|
|
627
|
+
|
|
628
|
+
if (length <= maxLength) {
|
|
629
|
+
return _range(1, length);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
const even = maxLength % 2 === 0 ? 1 : 0;
|
|
633
|
+
const left = Math.floor(maxLength / 2);
|
|
634
|
+
const right = length - left + 1 + even;
|
|
635
|
+
|
|
636
|
+
if (pageValue > left && pageValue < right) {
|
|
637
|
+
const start = pageValue - left + 2;
|
|
638
|
+
const end = pageValue + left - 2 - even;
|
|
639
|
+
return [1, 'truncate', ..._range(start, end), 'truncate', length];
|
|
640
|
+
} else if (pageValue === left) {
|
|
641
|
+
const end = pageValue + left - 1 - even;
|
|
642
|
+
return [..._range(1, end), 'truncate', length];
|
|
643
|
+
} else if (pageValue === right) {
|
|
644
|
+
const start = pageValue - left + 1;
|
|
645
|
+
return [1, 'truncate', ..._range(start, length)];
|
|
646
|
+
} else {
|
|
647
|
+
return [..._range(1, left), 'truncate', ..._range(right, length)];
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
const isActive = computed(() => computedLength.value > 1);
|
|
651
|
+
const isTransitioning = computed(() => {
|
|
652
|
+
const {
|
|
653
|
+
routeQuery
|
|
654
|
+
} = props;
|
|
655
|
+
if (!routeQuery) return false; // @TODO
|
|
656
|
+
// return this.$location.isQueryOnlyTransitioning(routeQuery);
|
|
657
|
+
|
|
658
|
+
return false;
|
|
659
|
+
});
|
|
660
|
+
const isDisabled = computed(() => props.disabled || isTransitioning.value);
|
|
661
|
+
const classes = computed(() => [{
|
|
662
|
+
'v-pagination--disabled': isDisabled.value,
|
|
663
|
+
'v-pagination--dense': props.dense,
|
|
664
|
+
[`v-pagination--${props.align}`]: true
|
|
665
|
+
}, colorScope.value.className]);
|
|
666
|
+
|
|
667
|
+
async function setPage(value) {
|
|
668
|
+
if (isDisabled.value) return;
|
|
669
|
+
const {
|
|
670
|
+
beforeChange,
|
|
671
|
+
routeQuery
|
|
672
|
+
} = props;
|
|
673
|
+
const newPage = resolveNumberish(value);
|
|
674
|
+
if (computedPage.value === newPage) return;
|
|
675
|
+
|
|
676
|
+
if (beforeChange) {
|
|
677
|
+
try {
|
|
678
|
+
let result = beforeChange(newPage);
|
|
679
|
+
if (isPromise(result)) result = await result;
|
|
680
|
+
if (result === false) return;
|
|
681
|
+
} catch (e) {}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (routeQuery) {
|
|
685
|
+
const to = createRoutableLocationByPage(newPage, routeQuery);
|
|
686
|
+
return router.push(to).then(failure => {
|
|
687
|
+
!failure && ctx.emit('change', newPage);
|
|
688
|
+
});
|
|
689
|
+
} else {
|
|
690
|
+
internalValue.value = newPage;
|
|
691
|
+
ctx.emit('update:modelValue', newPage);
|
|
692
|
+
ctx.emit('change', newPage);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
function createPageInfo(source) {
|
|
697
|
+
const currentPage = computedPage.value;
|
|
698
|
+
const length = computedLength.value;
|
|
699
|
+
let number;
|
|
700
|
+
let page;
|
|
701
|
+
let active;
|
|
702
|
+
let disabled;
|
|
703
|
+
|
|
704
|
+
if (typeof source === 'number') {
|
|
705
|
+
number = true;
|
|
706
|
+
page = source;
|
|
707
|
+
active = currentPage === page;
|
|
708
|
+
disabled = false;
|
|
709
|
+
} else if (source === 'truncate') {
|
|
710
|
+
number = false;
|
|
711
|
+
active = false;
|
|
712
|
+
disabled = false;
|
|
713
|
+
} else {
|
|
714
|
+
number = false;
|
|
715
|
+
const isPrev = source === 'prev';
|
|
716
|
+
const ammount = isPrev ? -1 : 1;
|
|
717
|
+
page = currentPage + ammount;
|
|
718
|
+
active = false;
|
|
719
|
+
disabled = page < 1 || page > length;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return {
|
|
723
|
+
number,
|
|
724
|
+
page,
|
|
725
|
+
active,
|
|
726
|
+
disabled
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
function createRoutableLocationByPage(page, routeQuery) {
|
|
731
|
+
return getQueryMergedLocation({
|
|
732
|
+
[routeQuery]: page
|
|
733
|
+
}, route);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
function genItem(source, index) {
|
|
737
|
+
const {
|
|
738
|
+
number,
|
|
739
|
+
page,
|
|
740
|
+
active,
|
|
741
|
+
disabled
|
|
742
|
+
} = createPageInfo(source);
|
|
743
|
+
const type = number ? 'num' : source; // const staticClass = `pagination__item`;
|
|
744
|
+
|
|
745
|
+
const classes = ['v-pagination__item', {
|
|
746
|
+
[`v-pagination__item--${type}`]: true,
|
|
747
|
+
'v-pagination__item--active': active,
|
|
748
|
+
'v-pagination__item--disabled': disabled
|
|
749
|
+
}];
|
|
750
|
+
const children = number ? page : (() => {
|
|
751
|
+
if (type === 'truncate') {
|
|
752
|
+
return createVNode("span", null, [createTextVNode("...")]);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
const isPrev = type === 'prev';
|
|
756
|
+
const name = isPrev ? 'chevron-left' : 'chevron-right';
|
|
757
|
+
return createVNode(VIcon, {
|
|
758
|
+
"class": "v-pagination__item__icon",
|
|
759
|
+
"name": name
|
|
760
|
+
}, null);
|
|
761
|
+
})();
|
|
762
|
+
|
|
763
|
+
const onClick = ev => {
|
|
764
|
+
ev.preventDefault();
|
|
765
|
+
if (page === undefined || active || disabled) return;
|
|
766
|
+
setPage(page);
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
const key = `${source}-${index}`;
|
|
770
|
+
const {
|
|
771
|
+
routeQuery
|
|
772
|
+
} = props;
|
|
773
|
+
|
|
774
|
+
if (page !== undefined && routeQuery) {
|
|
775
|
+
const to = createRoutableLocationByPage(page, routeQuery);
|
|
776
|
+
return createVNode(RouterLink, {
|
|
777
|
+
"class": classes,
|
|
778
|
+
"to": to,
|
|
779
|
+
"key": key
|
|
780
|
+
}, _isSlot$8(children) ? children : {
|
|
781
|
+
default: () => [children]
|
|
782
|
+
});
|
|
783
|
+
} else {
|
|
784
|
+
return createVNode("button", {
|
|
785
|
+
"class": classes,
|
|
786
|
+
"type": "button",
|
|
787
|
+
"value": page,
|
|
788
|
+
"onClick": onClick,
|
|
789
|
+
"key": key
|
|
790
|
+
}, [children]);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
watch(() => props.modelValue, modelValue => {
|
|
795
|
+
internalValue.value = resolveNumberish(modelValue);
|
|
796
|
+
}, {
|
|
797
|
+
immediate: true
|
|
798
|
+
});
|
|
799
|
+
return () => {
|
|
800
|
+
if (!isActive.value) return undefined;
|
|
801
|
+
const $items = ['prev', ...computedItems.value, 'next'].map((i, index) => genItem(i, index));
|
|
802
|
+
return withDirectives(createVNode("nav", {
|
|
803
|
+
"class": ['v-pagination', classes.value],
|
|
804
|
+
"ref": elRef
|
|
805
|
+
}, [$items]), [resizeDirectiveArgument(({
|
|
806
|
+
width
|
|
807
|
+
}) => {
|
|
808
|
+
const el = elRef.value;
|
|
809
|
+
|
|
810
|
+
if (el) {
|
|
811
|
+
const style = window.getComputedStyle(el, 'before');
|
|
812
|
+
const width = style.getPropertyValue('width');
|
|
813
|
+
const margin = style.getPropertyValue('margin');
|
|
814
|
+
const size = parseFloat(width) + parseFloat(margin) * 0.5;
|
|
815
|
+
itemSize.value = size;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
containerWidth.value = width;
|
|
819
|
+
})]);
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
});
|
|
824
|
+
|
|
533
825
|
function createListTileProps() {
|
|
534
826
|
const icon = rawIconProp();
|
|
535
827
|
return { ...navigationableProps,
|
|
@@ -541,7 +833,8 @@ function createListTileProps() {
|
|
|
541
833
|
default: 'div'
|
|
542
834
|
},
|
|
543
835
|
startIconEmptySpace: Boolean,
|
|
544
|
-
color: String
|
|
836
|
+
color: String,
|
|
837
|
+
exactMatch: Boolean
|
|
545
838
|
})
|
|
546
839
|
};
|
|
547
840
|
}
|
|
@@ -572,7 +865,7 @@ const VListTile = defineComponent({
|
|
|
572
865
|
});
|
|
573
866
|
const isActive = computed(() => {
|
|
574
867
|
if (!hasTo.value) return false;
|
|
575
|
-
return link.isActive.value;
|
|
868
|
+
return props.exactMatch ? link.isExactActive.value : link.isActive.value;
|
|
576
869
|
});
|
|
577
870
|
const color = useScopeColorClass(props);
|
|
578
871
|
const classes = computed(() => {
|
|
@@ -649,7 +942,52 @@ const VDrawerLayout = defineComponent({
|
|
|
649
942
|
|
|
650
943
|
});
|
|
651
944
|
|
|
652
|
-
function _isSlot$
|
|
945
|
+
function _isSlot$7(s) {
|
|
946
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
const VHero = defineComponent({
|
|
950
|
+
name: 'VHero',
|
|
951
|
+
props: {
|
|
952
|
+
color: {
|
|
953
|
+
type: String,
|
|
954
|
+
default: 'primary'
|
|
955
|
+
},
|
|
956
|
+
tag: {
|
|
957
|
+
type: String,
|
|
958
|
+
default: 'header'
|
|
959
|
+
},
|
|
960
|
+
hTag: {
|
|
961
|
+
type: String,
|
|
962
|
+
default: 'h1'
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
|
|
966
|
+
setup(props, ctx) {
|
|
967
|
+
return () => {
|
|
968
|
+
let _slot;
|
|
969
|
+
|
|
970
|
+
const TagName = props.tag;
|
|
971
|
+
const HTagName = props.hTag;
|
|
972
|
+
return createVNode(VAppContainer, {
|
|
973
|
+
"pulled": true
|
|
974
|
+
}, {
|
|
975
|
+
default: () => [createVNode(TagName, {
|
|
976
|
+
"class": ['v-hero', toScopeColorClass(props.color)]
|
|
977
|
+
}, {
|
|
978
|
+
default: () => [createVNode(HTagName, {
|
|
979
|
+
"class": "v-hero__title"
|
|
980
|
+
}, _isSlot$7(_slot = renderSlotOrEmpty$1(ctx.slots, 'default')) ? _slot : {
|
|
981
|
+
default: () => [_slot]
|
|
982
|
+
})]
|
|
983
|
+
})]
|
|
984
|
+
});
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
function _isSlot$6(s) {
|
|
653
991
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
654
992
|
}
|
|
655
993
|
|
|
@@ -680,7 +1018,7 @@ function renderNavigationItemInput(input, extraProps) {
|
|
|
680
1018
|
} = resolveNavigationItemInput(input);
|
|
681
1019
|
return createVNode(VNavigationItem, { ...props,
|
|
682
1020
|
...extraProps
|
|
683
|
-
}, _isSlot$
|
|
1021
|
+
}, _isSlot$6(label) ? label : {
|
|
684
1022
|
default: () => [label]
|
|
685
1023
|
});
|
|
686
1024
|
}
|
|
@@ -824,7 +1162,7 @@ const VNavigationItem = defineComponent({
|
|
|
824
1162
|
"class": ['v-navigation-item', classes.value],
|
|
825
1163
|
"onClick": onClick,
|
|
826
1164
|
"onChangeActive": onChangeActive
|
|
827
|
-
}), _isSlot$
|
|
1165
|
+
}), _isSlot$6(_slot = renderSlotOrEmpty$1(ctx.slots, 'default')) ? _slot : {
|
|
828
1166
|
default: () => [_slot]
|
|
829
1167
|
}), _children && createVNode(VExpandTransition, null, {
|
|
830
1168
|
default: () => [withDirectives(createVNode("div", {
|
|
@@ -972,7 +1310,7 @@ const VCheckbox = defineComponent({
|
|
|
972
1310
|
|
|
973
1311
|
});
|
|
974
1312
|
|
|
975
|
-
function _isSlot$
|
|
1313
|
+
function _isSlot$5(s) {
|
|
976
1314
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
977
1315
|
}
|
|
978
1316
|
|
|
@@ -984,7 +1322,7 @@ const VCheckboxGroup = defineFormSelectorComponent({
|
|
|
984
1322
|
itemRenderer: ({
|
|
985
1323
|
attrs,
|
|
986
1324
|
slots
|
|
987
|
-
}) => createVNode(VCheckbox, attrs, _isSlot$
|
|
1325
|
+
}) => createVNode(VCheckbox, attrs, _isSlot$5(slots) ? slots : {
|
|
988
1326
|
default: () => [slots]
|
|
989
1327
|
})
|
|
990
1328
|
});
|
|
@@ -1036,7 +1374,7 @@ const VRadio = defineComponent({
|
|
|
1036
1374
|
|
|
1037
1375
|
});
|
|
1038
1376
|
|
|
1039
|
-
function _isSlot$
|
|
1377
|
+
function _isSlot$4(s) {
|
|
1040
1378
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
1041
1379
|
}
|
|
1042
1380
|
|
|
@@ -1047,7 +1385,7 @@ const VRadioGroup = defineFormSelectorComponent({
|
|
|
1047
1385
|
itemRenderer: ({
|
|
1048
1386
|
attrs,
|
|
1049
1387
|
slots
|
|
1050
|
-
}) => createVNode(VRadio, attrs, _isSlot$
|
|
1388
|
+
}) => createVNode(VRadio, attrs, _isSlot$4(slots) ? slots : {
|
|
1051
1389
|
default: () => [slots]
|
|
1052
1390
|
})
|
|
1053
1391
|
});
|
|
@@ -1109,7 +1447,7 @@ const VSwitch = defineComponent({
|
|
|
1109
1447
|
|
|
1110
1448
|
});
|
|
1111
1449
|
|
|
1112
|
-
function _isSlot$
|
|
1450
|
+
function _isSlot$3(s) {
|
|
1113
1451
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
1114
1452
|
}
|
|
1115
1453
|
|
|
@@ -1121,7 +1459,7 @@ const VSwitchGroup = defineFormSelectorComponent({
|
|
|
1121
1459
|
itemRenderer: ({
|
|
1122
1460
|
attrs,
|
|
1123
1461
|
slots
|
|
1124
|
-
}) => createVNode(VSwitch, attrs, _isSlot$
|
|
1462
|
+
}) => createVNode(VSwitch, attrs, _isSlot$3(slots) ? slots : {
|
|
1125
1463
|
default: () => [slots]
|
|
1126
1464
|
})
|
|
1127
1465
|
});
|
|
@@ -1664,7 +2002,7 @@ const VForm = defineComponent({
|
|
|
1664
2002
|
|
|
1665
2003
|
});
|
|
1666
2004
|
|
|
1667
|
-
function _isSlot$
|
|
2005
|
+
function _isSlot$2(s) {
|
|
1668
2006
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
1669
2007
|
}
|
|
1670
2008
|
|
|
@@ -1676,7 +2014,7 @@ const VApp = defineComponent({
|
|
|
1676
2014
|
return () => {
|
|
1677
2015
|
let _slot;
|
|
1678
2016
|
|
|
1679
|
-
return createVNode(VStackRoot, null, _isSlot$
|
|
2017
|
+
return createVNode(VStackRoot, null, _isSlot$2(_slot = renderSlotOrEmpty(ctx.slots, 'default')) ? _slot : {
|
|
1680
2018
|
default: () => [_slot]
|
|
1681
2019
|
});
|
|
1682
2020
|
};
|
|
@@ -1716,8 +2054,35 @@ const VToolbar = defineComponent({
|
|
|
1716
2054
|
|
|
1717
2055
|
});
|
|
1718
2056
|
|
|
2057
|
+
function _isSlot$1(s) {
|
|
2058
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
2059
|
+
}
|
|
2060
|
+
|
|
1719
2061
|
const VToolbarMenu = defineComponent({
|
|
1720
2062
|
name: 'VToolbarMenu',
|
|
2063
|
+
inheritAttrs: false,
|
|
2064
|
+
props: {},
|
|
2065
|
+
|
|
2066
|
+
setup(props, ctx) {
|
|
2067
|
+
const vui = useVui();
|
|
2068
|
+
const plain = vui.setting('plainVariant');
|
|
2069
|
+
return () => {
|
|
2070
|
+
let _slot;
|
|
2071
|
+
|
|
2072
|
+
const variant = props.variant || plain;
|
|
2073
|
+
return createVNode(VButton, mergeProps(ctx.attrs, {
|
|
2074
|
+
"variant": variant,
|
|
2075
|
+
"class": ['v-toolbar-menu']
|
|
2076
|
+
}), _isSlot$1(_slot = renderSlotOrEmpty$1(ctx.slots)) ? _slot : {
|
|
2077
|
+
default: () => [_slot]
|
|
2078
|
+
});
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
});
|
|
2083
|
+
|
|
2084
|
+
const VToolbarEdge = defineComponent({
|
|
2085
|
+
name: 'VToolbarEdge',
|
|
1721
2086
|
props: {
|
|
1722
2087
|
edge: {
|
|
1723
2088
|
type: String,
|
|
@@ -1731,8 +2096,8 @@ const VToolbarMenu = defineComponent({
|
|
|
1731
2096
|
const children = renderSlotOrEmpty$1(ctx.slots, 'default');
|
|
1732
2097
|
const hasChildren = !!children && children.length > 0;
|
|
1733
2098
|
return createVNode("div", {
|
|
1734
|
-
"class": ['v-toolbar-
|
|
1735
|
-
[`v-toolbar-
|
|
2099
|
+
"class": ['v-toolbar-edge', `v-toolbar-edge--${edge.value}`, {
|
|
2100
|
+
[`v-toolbar-edge--empty`]: !hasChildren
|
|
1736
2101
|
}]
|
|
1737
2102
|
}, [children]);
|
|
1738
2103
|
};
|
|
@@ -1862,4 +2227,4 @@ function installVuiPlugin(app, opts) {
|
|
|
1862
2227
|
return app.use(VuiPlugin, opts);
|
|
1863
2228
|
}
|
|
1864
2229
|
|
|
1865
|
-
export { CONTROL_FIELD_VARIANTS, CONTROL_SIZES, VApp, VButton, VCard, VCardActions, VCardContent, VCheckbox, VCheckboxGroup, VDrawerLayout, VForm, VIcon, VListTile, VNavigation, VNavigationItem, VOption, VOptionGroup, VPaper, VRadio, VRadioGroup, VSelect, VSwitch, VSwitchGroup, VTextField, VTextarea, VToolbar, 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, createCardProps, createControlFieldProviderProps, createControlProps, createElevationProps, createListTileProps, createNavigationItemProps, createPaperBaseProps, createPaperProps, defineFormSelectorComponent, iconProps, installVuiPlugin, listTileEmits, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|
|
2230
|
+
export { CONTROL_FIELD_VARIANTS, CONTROL_SIZES, PAGINATION_ALIGNS, VApp, VButton, VCard, VCardActions, VCardContent, VCheckbox, VCheckboxGroup, VDrawerLayout, VForm, VHero, VIcon, VListTile, VNavigation, VNavigationItem, VOption, VOptionGroup, VPagination, VPaper, VRadio, VRadioGroup, VSelect, VSwitch, VSwitchGroup, 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, createCardProps, createControlFieldProviderProps, createControlProps, createElevationProps, createListTileProps, createNavigationItemProps, createPaperBaseProps, createPaperProps, defineFormSelectorComponent, iconProps, installVuiPlugin, listTileEmits, paginationProps, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|