@fastkit/vui 0.6.15 → 0.6.19
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 +9 -0
- package/dist/tool/vite-plugin.d.ts.map +1 -1
- package/dist/vui.cjs.js +359 -80
- package/dist/vui.cjs.prod.js +359 -80
- package/dist/vui.css +78 -10
- package/dist/vui.d.ts +286 -50
- package/dist/vui.esm-bundler.js +356 -81
- 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,12 +1,13 @@
|
|
|
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, isVNode, ref, withDirectives, vModelSelect, createTextVNode } from 'vue';
|
|
4
|
+
import { inject, computed, provide, defineComponent, createVNode, mergeProps, watch, isVNode, ref, Fragment, withDirectives, vShow, vModelSelect, createTextVNode } from 'vue';
|
|
5
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 } from '@fastkit/vue-utils';
|
|
6
|
+
import { createPropsOptions as createPropsOptions$1, defineSlotsProps as defineSlotsProps$1, renderSlotOrEmpty as renderSlotOrEmpty$1, navigationableProps, navigationableEmits, useNavigationable, 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 { useLink, useRoute } from 'vue-router';
|
|
10
11
|
|
|
11
12
|
const CONTROL_SIZES = ['sm', 'md', 'lg'];
|
|
12
13
|
const CONTROL_FIELD_VARIANTS = ['outlined', 'filled', 'flat'];
|
|
@@ -252,16 +253,24 @@ function useElevation(props, opts = {}) {
|
|
|
252
253
|
};
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
function
|
|
256
|
-
return {
|
|
257
|
-
square: Boolean,
|
|
256
|
+
function createPaperBaseProps() {
|
|
257
|
+
return {
|
|
258
258
|
color: String,
|
|
259
259
|
tag: {
|
|
260
260
|
type: String,
|
|
261
261
|
default: 'div'
|
|
262
262
|
},
|
|
263
263
|
...defineSlotsProps$1()
|
|
264
|
-
};
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function createPaperProps() {
|
|
267
|
+
return { ...createElevationProps(),
|
|
268
|
+
...createPaperBaseProps(),
|
|
269
|
+
square: Boolean,
|
|
270
|
+
headerProps: Object,
|
|
271
|
+
bodyProps: Object,
|
|
272
|
+
footerProps: Object
|
|
273
|
+
};
|
|
265
274
|
}
|
|
266
275
|
const VPaper = defineComponent({
|
|
267
276
|
name: 'VPaper',
|
|
@@ -278,6 +287,9 @@ const VPaper = defineComponent({
|
|
|
278
287
|
'v-paper--has-color': !!scope.value.value,
|
|
279
288
|
'v-paper--square': props.square
|
|
280
289
|
}]);
|
|
290
|
+
const headerProps = computed(() => props.headerProps);
|
|
291
|
+
const bodyProps = computed(() => props.bodyProps);
|
|
292
|
+
const footerProps = computed(() => props.footerProps);
|
|
281
293
|
return () => {
|
|
282
294
|
const TagName = tag.value;
|
|
283
295
|
const header = renderSlotOrEmpty$1(ctx.slots, 'header');
|
|
@@ -285,13 +297,13 @@ const VPaper = defineComponent({
|
|
|
285
297
|
return createVNode(TagName, {
|
|
286
298
|
"class": ['v-paper', classes.value]
|
|
287
299
|
}, {
|
|
288
|
-
default: () => [header && createVNode("div", {
|
|
300
|
+
default: () => [header && createVNode("div", mergeProps({
|
|
289
301
|
"class": "v-paper__header"
|
|
290
|
-
}, [header]), createVNode("div", {
|
|
302
|
+
}, headerProps.value), [header]), createVNode("div", mergeProps({
|
|
291
303
|
"class": "v-paper__body"
|
|
292
|
-
}, [renderSlotOrEmpty$1(ctx.slots, 'default')]), footer && createVNode("div", {
|
|
304
|
+
}, bodyProps.value), [renderSlotOrEmpty$1(ctx.slots, 'default')]), footer && createVNode("div", mergeProps({
|
|
293
305
|
"class": "v-paper__footer"
|
|
294
|
-
}, [footer])]
|
|
306
|
+
}, footerProps.value), [footer])]
|
|
295
307
|
});
|
|
296
308
|
};
|
|
297
309
|
}
|
|
@@ -344,13 +356,27 @@ const VCardActions = defineComponent({
|
|
|
344
356
|
|
|
345
357
|
});
|
|
346
358
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
359
|
+
// prop: RawIconProp<T>,
|
|
360
|
+
// payload: () => T,
|
|
361
|
+
// ): RawIconProp {
|
|
362
|
+
// if (!prop || typeof prop !== 'function') {
|
|
363
|
+
// return prop;
|
|
364
|
+
// }
|
|
365
|
+
// const fn = (gen: IconGenerator): VNodeChild => {
|
|
366
|
+
// const t = payload();
|
|
367
|
+
// return prop(gen, t);
|
|
368
|
+
// };
|
|
369
|
+
// return fn;
|
|
370
|
+
// }
|
|
371
|
+
// export const rawRawIconProp = [String, Function] as PropType<RawIconProp>;
|
|
372
|
+
|
|
373
|
+
const _rawIconProp = [String, Function];
|
|
374
|
+
function rawIconProp() {
|
|
375
|
+
return _rawIconProp;
|
|
350
376
|
}
|
|
351
|
-
function resolveRawIconProp(prop, extraProps) {
|
|
377
|
+
function resolveRawIconProp(payload, prop, extraProps) {
|
|
352
378
|
if (!prop) return;
|
|
353
|
-
return typeof prop === 'function' ? prop(input => createVNode(VIcon, mergeProps(input, extraProps), null)) : createVNode(VIcon, mergeProps(extraProps, {
|
|
379
|
+
return typeof prop === 'function' ? prop(input => createVNode(VIcon, mergeProps(input, extraProps), null), payload) : createVNode(VIcon, mergeProps(extraProps, {
|
|
354
380
|
"name": prop
|
|
355
381
|
}), null);
|
|
356
382
|
}
|
|
@@ -421,7 +447,7 @@ const LOADING_SIZE_MAP = {
|
|
|
421
447
|
const VButton = defineComponent({
|
|
422
448
|
name: 'VButton',
|
|
423
449
|
props: vueButtonProps,
|
|
424
|
-
emits: { ...navigationableEmits
|
|
450
|
+
emits: { ...navigationableEmits
|
|
425
451
|
},
|
|
426
452
|
|
|
427
453
|
setup(props, ctx) {
|
|
@@ -505,17 +531,23 @@ const VButton = defineComponent({
|
|
|
505
531
|
});
|
|
506
532
|
|
|
507
533
|
function createListTileProps() {
|
|
508
|
-
const icon =
|
|
509
|
-
return
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
534
|
+
const icon = rawIconProp();
|
|
535
|
+
return { ...navigationableProps,
|
|
536
|
+
...createPropsOptions$1({
|
|
537
|
+
startIcon: icon,
|
|
538
|
+
endIcon: icon,
|
|
539
|
+
fallbackTag: {
|
|
540
|
+
type: String,
|
|
541
|
+
default: 'div'
|
|
542
|
+
},
|
|
543
|
+
startIconEmptySpace: Boolean,
|
|
544
|
+
color: String,
|
|
545
|
+
exactMatch: Boolean
|
|
546
|
+
})
|
|
547
|
+
};
|
|
517
548
|
}
|
|
518
|
-
const listTileEmits = { ...navigationableEmits
|
|
549
|
+
const listTileEmits = { ...navigationableEmits,
|
|
550
|
+
changeActive: isActive => true
|
|
519
551
|
};
|
|
520
552
|
const VListTile = defineComponent({
|
|
521
553
|
name: 'VListTile',
|
|
@@ -524,20 +556,57 @@ const VListTile = defineComponent({
|
|
|
524
556
|
},
|
|
525
557
|
|
|
526
558
|
setup(props, ctx) {
|
|
527
|
-
const startIcon = computed(() =>
|
|
528
|
-
|
|
529
|
-
|
|
559
|
+
const startIcon = computed(() => {
|
|
560
|
+
let icon = resolveRawIconProp(false, props.startIcon);
|
|
561
|
+
|
|
562
|
+
if (!icon && props.startIconEmptySpace) {
|
|
563
|
+
icon = resolveRawIconProp(false, '$empty');
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return icon;
|
|
567
|
+
});
|
|
568
|
+
const endIcon = computed(() => resolveRawIconProp(false, props.endIcon));
|
|
569
|
+
const navigationable = useNavigationable(props, () => props.fallbackTag, ctx);
|
|
570
|
+
const hasTo = computed(() => !!props.to);
|
|
571
|
+
const link = useLink({
|
|
572
|
+
to: props.to || ''
|
|
573
|
+
});
|
|
574
|
+
const isActive = computed(() => {
|
|
575
|
+
if (!hasTo.value) return false;
|
|
576
|
+
return props.exactMatch ? link.isExactActive.value : link.isActive.value;
|
|
577
|
+
});
|
|
578
|
+
const color = useScopeColorClass(props);
|
|
579
|
+
const classes = computed(() => {
|
|
580
|
+
const _color = color.value;
|
|
581
|
+
const hasColor = !!_color.value;
|
|
582
|
+
const _navigationable = navigationable.value;
|
|
583
|
+
const clickable = _navigationable.clickable;
|
|
584
|
+
return [color.value.className, _navigationable.classes, {
|
|
585
|
+
'v-list-tile--clickable': clickable,
|
|
586
|
+
'v-list-tile--plain': !hasColor,
|
|
587
|
+
'v-list-tile--has-color': hasColor,
|
|
588
|
+
'v-list-tile--active': isActive.value
|
|
589
|
+
}];
|
|
590
|
+
});
|
|
591
|
+
watch(() => isActive.value, isActive => {
|
|
592
|
+
ctx.emit('changeActive', isActive);
|
|
593
|
+
}, {
|
|
594
|
+
immediate: true
|
|
595
|
+
});
|
|
530
596
|
return () => {
|
|
531
597
|
const _startIcon = startIcon.value;
|
|
532
598
|
const _endIcon = endIcon.value;
|
|
533
599
|
const {
|
|
534
600
|
Tag,
|
|
535
|
-
attrs
|
|
536
|
-
classes
|
|
601
|
+
attrs
|
|
537
602
|
} = navigationable.value;
|
|
538
603
|
return createVNode(Tag, mergeProps({
|
|
539
|
-
"class": ['v-list-tile', classes]
|
|
540
|
-
}, attrs
|
|
604
|
+
"class": ['v-list-tile', classes.value]
|
|
605
|
+
}, attrs, {
|
|
606
|
+
"onClick": ev => {
|
|
607
|
+
ctx.emit('click', ev);
|
|
608
|
+
}
|
|
609
|
+
}), {
|
|
541
610
|
default: () => [_startIcon && createVNode("span", {
|
|
542
611
|
"class": "v-list-tile__icon v-list-tile__icon--start"
|
|
543
612
|
}, [_startIcon]), createVNode("span", {
|
|
@@ -551,8 +620,34 @@ const VListTile = defineComponent({
|
|
|
551
620
|
|
|
552
621
|
});
|
|
553
622
|
|
|
554
|
-
const
|
|
555
|
-
name: '
|
|
623
|
+
const VDrawerLayout = defineComponent({
|
|
624
|
+
name: 'VDrawerLayout',
|
|
625
|
+
props: { ...createPaperBaseProps()
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
setup(props, ctx) {
|
|
629
|
+
return () => {
|
|
630
|
+
const paperProps = computed(() => ({
|
|
631
|
+
color: props.color,
|
|
632
|
+
tag: props.tag
|
|
633
|
+
}));
|
|
634
|
+
return createVNode(VPaper, mergeProps({
|
|
635
|
+
"class": "v-drawer-layout"
|
|
636
|
+
}, paperProps.value, {
|
|
637
|
+
"square": true,
|
|
638
|
+
"headerProps": {
|
|
639
|
+
class: 'v-drawer-layout__header'
|
|
640
|
+
},
|
|
641
|
+
"bodyProps": {
|
|
642
|
+
class: 'v-drawer-layout__body'
|
|
643
|
+
},
|
|
644
|
+
"footerProps": {
|
|
645
|
+
class: 'v-drawer-layout__footer'
|
|
646
|
+
}
|
|
647
|
+
}), ctx.slots);
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
|
|
556
651
|
});
|
|
557
652
|
|
|
558
653
|
function _isSlot$6(s) {
|
|
@@ -560,72 +655,225 @@ function _isSlot$6(s) {
|
|
|
560
655
|
}
|
|
561
656
|
|
|
562
657
|
function createNavigationItemProps() {
|
|
563
|
-
return { ...createListTileProps()
|
|
658
|
+
return { ...createListTileProps(),
|
|
659
|
+
match: String
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
function resolveNavigationItemInput(input) {
|
|
663
|
+
let label = input.label;
|
|
664
|
+
const props = { ...input
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
if (typeof label === 'function') {
|
|
668
|
+
label = label();
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
delete props.label;
|
|
672
|
+
return {
|
|
673
|
+
label,
|
|
674
|
+
props
|
|
564
675
|
};
|
|
565
676
|
}
|
|
677
|
+
function renderNavigationItemInput(input, extraProps) {
|
|
678
|
+
const {
|
|
679
|
+
label,
|
|
680
|
+
props
|
|
681
|
+
} = resolveNavigationItemInput(input);
|
|
682
|
+
return createVNode(VNavigationItem, { ...props,
|
|
683
|
+
...extraProps
|
|
684
|
+
}, _isSlot$6(label) ? label : {
|
|
685
|
+
default: () => [label]
|
|
686
|
+
});
|
|
687
|
+
}
|
|
566
688
|
const VNavigationItem = defineComponent({
|
|
567
689
|
name: 'VNavigationItem',
|
|
568
|
-
|
|
690
|
+
inheritAttrs: false,
|
|
691
|
+
props: { ...createNavigationItemProps(),
|
|
692
|
+
children: Array
|
|
693
|
+
},
|
|
569
694
|
emits: { ...listTileEmits
|
|
570
695
|
},
|
|
571
696
|
|
|
572
697
|
setup(props, ctx) {
|
|
573
|
-
const
|
|
574
|
-
|
|
698
|
+
const vui = useVui();
|
|
699
|
+
const opened = ref(false);
|
|
700
|
+
const children = computed(() => {
|
|
701
|
+
const c = props.children;
|
|
702
|
+
return c && c.length ? c : undefined;
|
|
703
|
+
});
|
|
704
|
+
const to = computed(() => props.to);
|
|
705
|
+
const match = computed(() => {
|
|
706
|
+
const {
|
|
707
|
+
match,
|
|
708
|
+
to
|
|
709
|
+
} = props;
|
|
710
|
+
if (match) return match;
|
|
711
|
+
if (!to) return;
|
|
712
|
+
if (typeof to === 'string') return to;
|
|
713
|
+
return to.path;
|
|
714
|
+
});
|
|
715
|
+
const classes = computed(() => [{
|
|
716
|
+
'v-navigation-item--opened': opened.value
|
|
717
|
+
}]);
|
|
718
|
+
const route = useRoute(); // const classes = computed(() => [
|
|
719
|
+
// // {
|
|
720
|
+
// // 'v-navigation-item--matched': matched.value,
|
|
721
|
+
// // },
|
|
722
|
+
// ]);
|
|
723
|
+
|
|
724
|
+
watch(() => route.path, newPath => {
|
|
725
|
+
const c = children.value;
|
|
726
|
+
const m = match.value;
|
|
727
|
+
|
|
728
|
+
if (!c || !m) {
|
|
729
|
+
// matched.value = false;
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
if (newPath.match(m)) {
|
|
734
|
+
open(); // matched.value = true;
|
|
735
|
+
} else {
|
|
736
|
+
close(); // matched.value = false;
|
|
737
|
+
}
|
|
738
|
+
}, {
|
|
739
|
+
immediate: true
|
|
740
|
+
}); // const iconPayload = () => opened.value;
|
|
741
|
+
|
|
742
|
+
const _props = computed(() => {
|
|
743
|
+
const c = children.value;
|
|
744
|
+
let {
|
|
745
|
+
endIcon
|
|
746
|
+
} = props;
|
|
747
|
+
|
|
748
|
+
if (c && !endIcon) {
|
|
749
|
+
endIcon = vui.icon('navigationExpand');
|
|
750
|
+
|
|
751
|
+
if (typeof endIcon === 'string') {
|
|
752
|
+
const name = endIcon;
|
|
753
|
+
|
|
754
|
+
endIcon = gen => {
|
|
755
|
+
return gen({
|
|
756
|
+
name,
|
|
757
|
+
rotate: opened.value ? 180 : 0
|
|
758
|
+
});
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
const __props = { ...props,
|
|
764
|
+
endIcon
|
|
765
|
+
};
|
|
766
|
+
delete __props.children; // const _activeClass = props.activeClass;
|
|
767
|
+
// const activeClass = `v-navigation-item--active${
|
|
768
|
+
// _activeClass ? ` ${_activeClass}` : ''
|
|
769
|
+
// }`;
|
|
770
|
+
|
|
771
|
+
return { ...__props // activeClass,
|
|
772
|
+
// startIcon: toRawIconProp(__props.startIcon, iconPayload),
|
|
773
|
+
// endIcon: toRawIconProp(__props.endIcon, iconPayload),
|
|
774
|
+
|
|
775
|
+
};
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
function open() {
|
|
779
|
+
opened.value = true;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
function close() {
|
|
783
|
+
opened.value = false;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
function toggle() {
|
|
787
|
+
return opened.value ? close() : open();
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const onClick = ev => {
|
|
791
|
+
if (!to.value) {
|
|
792
|
+
toggle();
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
ctx.emit('click', ev);
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
const onChangeActive = isActive => {
|
|
799
|
+
// if (isActive) {
|
|
800
|
+
// // open();
|
|
801
|
+
// // if (typeof window !== 'undefined') {
|
|
802
|
+
// // // open();
|
|
803
|
+
// // // console.log('hoge', window);
|
|
804
|
+
// // setTimeout(() => {
|
|
805
|
+
// // open();
|
|
806
|
+
// // }, 1000);
|
|
807
|
+
// // }
|
|
808
|
+
// // open();
|
|
809
|
+
// // console.log(props);
|
|
810
|
+
// // setTimeout(() => {
|
|
811
|
+
// // open();
|
|
812
|
+
// // }, 500);
|
|
813
|
+
// }
|
|
814
|
+
ctx.emit('changeActive', isActive);
|
|
815
|
+
};
|
|
575
816
|
|
|
576
817
|
return () => {
|
|
577
818
|
let _slot;
|
|
578
819
|
|
|
579
|
-
|
|
580
|
-
|
|
820
|
+
const _children = children.value;
|
|
821
|
+
const fallbackTag = _children ? 'button' : undefined;
|
|
822
|
+
return createVNode(Fragment, null, [createVNode(VListTile, mergeProps(_props.value, {
|
|
823
|
+
"fallbackTag": fallbackTag,
|
|
824
|
+
"endIcon": _props.value.endIcon,
|
|
825
|
+
"class": ['v-navigation-item', classes.value],
|
|
826
|
+
"onClick": onClick,
|
|
827
|
+
"onChangeActive": onChangeActive
|
|
581
828
|
}), _isSlot$6(_slot = renderSlotOrEmpty$1(ctx.slots, 'default')) ? _slot : {
|
|
582
829
|
default: () => [_slot]
|
|
583
|
-
})
|
|
830
|
+
}), _children && createVNode(VExpandTransition, null, {
|
|
831
|
+
default: () => [withDirectives(createVNode("div", {
|
|
832
|
+
"class": "v-navigation-item__expand"
|
|
833
|
+
}, [_children.map(child => renderNavigationItemInput(child, {
|
|
834
|
+
startIconEmptySpace: _props.value.startIconEmptySpace // onClick,
|
|
835
|
+
// onChangeActive,
|
|
836
|
+
|
|
837
|
+
}))]), [[vShow, opened.value]])]
|
|
838
|
+
})]);
|
|
584
839
|
};
|
|
585
840
|
}
|
|
586
841
|
|
|
587
842
|
});
|
|
588
843
|
|
|
589
|
-
function _isSlot$5(s) {
|
|
590
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
844
|
const VNavigation = defineComponent({
|
|
594
845
|
name: 'VNavigation',
|
|
595
846
|
props: {
|
|
596
847
|
items: {
|
|
597
848
|
type: Array,
|
|
598
849
|
required: true
|
|
599
|
-
}
|
|
850
|
+
},
|
|
851
|
+
color: String,
|
|
852
|
+
startIconEmptySpace: {
|
|
853
|
+
type: Boolean,
|
|
854
|
+
default: true
|
|
855
|
+
},
|
|
856
|
+
caption: [String, Function]
|
|
600
857
|
},
|
|
601
858
|
|
|
602
859
|
setup(props, ctx) {
|
|
603
860
|
const items = computed(() => props.items);
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
delete _props.label;
|
|
614
|
-
return {
|
|
615
|
-
label,
|
|
616
|
-
props: _props
|
|
617
|
-
};
|
|
618
|
-
}));
|
|
861
|
+
const color = useScopeColorClass(props);
|
|
862
|
+
const classes = computed(() => [color.value.className]);
|
|
863
|
+
const startIconEmptySpace = computed(() => props.startIconEmptySpace);
|
|
864
|
+
const caption = computed(() => {
|
|
865
|
+
const c = props.caption;
|
|
866
|
+
return typeof c === 'function' ? c() : c;
|
|
867
|
+
});
|
|
619
868
|
return () => {
|
|
869
|
+
const $caption = caption.value;
|
|
620
870
|
return createVNode("nav", {
|
|
621
|
-
"class":
|
|
622
|
-
}, [
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}), _isSlot$5(label) ? label : {
|
|
628
|
-
default: () => [label]
|
|
871
|
+
"class": ['v-navigation', classes.value]
|
|
872
|
+
}, [!!$caption && createVNode("div", {
|
|
873
|
+
"class": "v-navigation__caption"
|
|
874
|
+
}, [$caption]), items.value.map(item => renderNavigationItemInput(item, {
|
|
875
|
+
class: 'v-navigation__item',
|
|
876
|
+
startIconEmptySpace: startIconEmptySpace.value
|
|
629
877
|
}))]);
|
|
630
878
|
};
|
|
631
879
|
}
|
|
@@ -725,7 +973,7 @@ const VCheckbox = defineComponent({
|
|
|
725
973
|
|
|
726
974
|
});
|
|
727
975
|
|
|
728
|
-
function _isSlot$
|
|
976
|
+
function _isSlot$5(s) {
|
|
729
977
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
730
978
|
}
|
|
731
979
|
|
|
@@ -737,7 +985,7 @@ const VCheckboxGroup = defineFormSelectorComponent({
|
|
|
737
985
|
itemRenderer: ({
|
|
738
986
|
attrs,
|
|
739
987
|
slots
|
|
740
|
-
}) => createVNode(VCheckbox, attrs, _isSlot$
|
|
988
|
+
}) => createVNode(VCheckbox, attrs, _isSlot$5(slots) ? slots : {
|
|
741
989
|
default: () => [slots]
|
|
742
990
|
})
|
|
743
991
|
});
|
|
@@ -789,7 +1037,7 @@ const VRadio = defineComponent({
|
|
|
789
1037
|
|
|
790
1038
|
});
|
|
791
1039
|
|
|
792
|
-
function _isSlot$
|
|
1040
|
+
function _isSlot$4(s) {
|
|
793
1041
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
794
1042
|
}
|
|
795
1043
|
|
|
@@ -800,7 +1048,7 @@ const VRadioGroup = defineFormSelectorComponent({
|
|
|
800
1048
|
itemRenderer: ({
|
|
801
1049
|
attrs,
|
|
802
1050
|
slots
|
|
803
|
-
}) => createVNode(VRadio, attrs, _isSlot$
|
|
1051
|
+
}) => createVNode(VRadio, attrs, _isSlot$4(slots) ? slots : {
|
|
804
1052
|
default: () => [slots]
|
|
805
1053
|
})
|
|
806
1054
|
});
|
|
@@ -862,7 +1110,7 @@ const VSwitch = defineComponent({
|
|
|
862
1110
|
|
|
863
1111
|
});
|
|
864
1112
|
|
|
865
|
-
function _isSlot$
|
|
1113
|
+
function _isSlot$3(s) {
|
|
866
1114
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
867
1115
|
}
|
|
868
1116
|
|
|
@@ -874,7 +1122,7 @@ const VSwitchGroup = defineFormSelectorComponent({
|
|
|
874
1122
|
itemRenderer: ({
|
|
875
1123
|
attrs,
|
|
876
1124
|
slots
|
|
877
|
-
}) => createVNode(VSwitch, attrs, _isSlot$
|
|
1125
|
+
}) => createVNode(VSwitch, attrs, _isSlot$3(slots) ? slots : {
|
|
878
1126
|
default: () => [slots]
|
|
879
1127
|
})
|
|
880
1128
|
});
|
|
@@ -1417,7 +1665,7 @@ const VForm = defineComponent({
|
|
|
1417
1665
|
|
|
1418
1666
|
});
|
|
1419
1667
|
|
|
1420
|
-
function _isSlot$
|
|
1668
|
+
function _isSlot$2(s) {
|
|
1421
1669
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
1422
1670
|
}
|
|
1423
1671
|
|
|
@@ -1429,7 +1677,7 @@ const VApp = defineComponent({
|
|
|
1429
1677
|
return () => {
|
|
1430
1678
|
let _slot;
|
|
1431
1679
|
|
|
1432
|
-
return createVNode(VStackRoot, null, _isSlot$
|
|
1680
|
+
return createVNode(VStackRoot, null, _isSlot$2(_slot = renderSlotOrEmpty(ctx.slots, 'default')) ? _slot : {
|
|
1433
1681
|
default: () => [_slot]
|
|
1434
1682
|
});
|
|
1435
1683
|
};
|
|
@@ -1469,8 +1717,35 @@ const VToolbar = defineComponent({
|
|
|
1469
1717
|
|
|
1470
1718
|
});
|
|
1471
1719
|
|
|
1720
|
+
function _isSlot$1(s) {
|
|
1721
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1472
1724
|
const VToolbarMenu = defineComponent({
|
|
1473
1725
|
name: 'VToolbarMenu',
|
|
1726
|
+
inheritAttrs: false,
|
|
1727
|
+
props: {},
|
|
1728
|
+
|
|
1729
|
+
setup(props, ctx) {
|
|
1730
|
+
const vui = useVui();
|
|
1731
|
+
const plain = vui.setting('plainVariant');
|
|
1732
|
+
return () => {
|
|
1733
|
+
let _slot;
|
|
1734
|
+
|
|
1735
|
+
const variant = props.variant || plain;
|
|
1736
|
+
return createVNode(VButton, mergeProps(ctx.attrs, {
|
|
1737
|
+
"variant": variant,
|
|
1738
|
+
"class": ['v-toolbar-menu']
|
|
1739
|
+
}), _isSlot$1(_slot = renderSlotOrEmpty$1(ctx.slots)) ? _slot : {
|
|
1740
|
+
default: () => [_slot]
|
|
1741
|
+
});
|
|
1742
|
+
};
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
});
|
|
1746
|
+
|
|
1747
|
+
const VToolbarEdge = defineComponent({
|
|
1748
|
+
name: 'VToolbarEdge',
|
|
1474
1749
|
props: {
|
|
1475
1750
|
edge: {
|
|
1476
1751
|
type: String,
|
|
@@ -1484,8 +1759,8 @@ const VToolbarMenu = defineComponent({
|
|
|
1484
1759
|
const children = renderSlotOrEmpty$1(ctx.slots, 'default');
|
|
1485
1760
|
const hasChildren = !!children && children.length > 0;
|
|
1486
1761
|
return createVNode("div", {
|
|
1487
|
-
"class": ['v-toolbar-
|
|
1488
|
-
[`v-toolbar-
|
|
1762
|
+
"class": ['v-toolbar-edge', `v-toolbar-edge--${edge.value}`, {
|
|
1763
|
+
[`v-toolbar-edge--empty`]: !hasChildren
|
|
1489
1764
|
}]
|
|
1490
1765
|
}, [children]);
|
|
1491
1766
|
};
|
|
@@ -1615,4 +1890,4 @@ function installVuiPlugin(app, opts) {
|
|
|
1615
1890
|
return app.use(VuiPlugin, opts);
|
|
1616
1891
|
}
|
|
1617
1892
|
|
|
1618
|
-
export { CONTROL_FIELD_VARIANTS, CONTROL_SIZES,
|
|
1893
|
+
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, 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, rawIconProp, renderNavigationItemInput, resolveNavigationItemInput, resolveRawIconProp, useControl, useControlField, useElevation, useVui, useVuiColorProvider, vueButtonProps };
|