@fastkit/vui 0.6.14 → 0.6.18
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 +322 -72
- package/dist/vui.cjs.prod.js +322 -72
- package/dist/vui.css +66 -6
- package/dist/vui.d.ts +159 -47
- package/dist/vui.esm-bundler.js +320 -73
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/package.json +6 -6
package/dist/vui.cjs.prod.js
CHANGED
|
@@ -8,6 +8,7 @@ var vueColorScheme = require('@fastkit/vue-color-scheme');
|
|
|
8
8
|
var vueUtils = require('@fastkit/vue-utils');
|
|
9
9
|
var vueLoading = require('@fastkit/vue-loading');
|
|
10
10
|
var iconFont = require('@fastkit/icon-font');
|
|
11
|
+
var vueRouter = require('vue-router');
|
|
11
12
|
|
|
12
13
|
const CONTROL_SIZES = ['sm', 'md', 'lg'];
|
|
13
14
|
const CONTROL_FIELD_VARIANTS = ['outlined', 'filled', 'flat'];
|
|
@@ -253,16 +254,24 @@ function useElevation(props, opts = {}) {
|
|
|
253
254
|
};
|
|
254
255
|
}
|
|
255
256
|
|
|
256
|
-
function
|
|
257
|
-
return {
|
|
258
|
-
square: Boolean,
|
|
257
|
+
function createPaperBaseProps() {
|
|
258
|
+
return {
|
|
259
259
|
color: String,
|
|
260
260
|
tag: {
|
|
261
261
|
type: String,
|
|
262
262
|
default: 'div'
|
|
263
263
|
},
|
|
264
264
|
...vueUtils.defineSlotsProps()
|
|
265
|
-
};
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function createPaperProps() {
|
|
268
|
+
return { ...createElevationProps(),
|
|
269
|
+
...createPaperBaseProps(),
|
|
270
|
+
square: Boolean,
|
|
271
|
+
headerProps: Object,
|
|
272
|
+
bodyProps: Object,
|
|
273
|
+
footerProps: Object
|
|
274
|
+
};
|
|
266
275
|
}
|
|
267
276
|
const VPaper = vue.defineComponent({
|
|
268
277
|
name: 'VPaper',
|
|
@@ -279,6 +288,9 @@ const VPaper = vue.defineComponent({
|
|
|
279
288
|
'v-paper--has-color': !!scope.value.value,
|
|
280
289
|
'v-paper--square': props.square
|
|
281
290
|
}]);
|
|
291
|
+
const headerProps = vue.computed(() => props.headerProps);
|
|
292
|
+
const bodyProps = vue.computed(() => props.bodyProps);
|
|
293
|
+
const footerProps = vue.computed(() => props.footerProps);
|
|
282
294
|
return () => {
|
|
283
295
|
const TagName = tag.value;
|
|
284
296
|
const header = vueUtils.renderSlotOrEmpty(ctx.slots, 'header');
|
|
@@ -286,13 +298,13 @@ const VPaper = vue.defineComponent({
|
|
|
286
298
|
return vue.createVNode(TagName, {
|
|
287
299
|
"class": ['v-paper', classes.value]
|
|
288
300
|
}, {
|
|
289
|
-
default: () => [header && vue.createVNode("div", {
|
|
301
|
+
default: () => [header && vue.createVNode("div", vue.mergeProps({
|
|
290
302
|
"class": "v-paper__header"
|
|
291
|
-
}, [header]), vue.createVNode("div", {
|
|
303
|
+
}, headerProps.value), [header]), vue.createVNode("div", vue.mergeProps({
|
|
292
304
|
"class": "v-paper__body"
|
|
293
|
-
}, [vueUtils.renderSlotOrEmpty(ctx.slots, 'default')]), footer && vue.createVNode("div", {
|
|
305
|
+
}, bodyProps.value), [vueUtils.renderSlotOrEmpty(ctx.slots, 'default')]), footer && vue.createVNode("div", vue.mergeProps({
|
|
294
306
|
"class": "v-paper__footer"
|
|
295
|
-
}, [footer])]
|
|
307
|
+
}, footerProps.value), [footer])]
|
|
296
308
|
});
|
|
297
309
|
};
|
|
298
310
|
}
|
|
@@ -345,13 +357,27 @@ const VCardActions = vue.defineComponent({
|
|
|
345
357
|
|
|
346
358
|
});
|
|
347
359
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
360
|
+
// prop: RawIconProp<T>,
|
|
361
|
+
// payload: () => T,
|
|
362
|
+
// ): RawIconProp {
|
|
363
|
+
// if (!prop || typeof prop !== 'function') {
|
|
364
|
+
// return prop;
|
|
365
|
+
// }
|
|
366
|
+
// const fn = (gen: IconGenerator): VNodeChild => {
|
|
367
|
+
// const t = payload();
|
|
368
|
+
// return prop(gen, t);
|
|
369
|
+
// };
|
|
370
|
+
// return fn;
|
|
371
|
+
// }
|
|
372
|
+
// export const rawRawIconProp = [String, Function] as PropType<RawIconProp>;
|
|
373
|
+
|
|
374
|
+
const _rawIconProp = [String, Function];
|
|
375
|
+
function rawIconProp() {
|
|
376
|
+
return _rawIconProp;
|
|
351
377
|
}
|
|
352
|
-
function resolveRawIconProp(prop, extraProps) {
|
|
378
|
+
function resolveRawIconProp(payload, prop, extraProps) {
|
|
353
379
|
if (!prop) return;
|
|
354
|
-
return typeof prop === 'function' ? prop(input => vue.createVNode(VIcon, vue.mergeProps(input, extraProps), null)) : vue.createVNode(VIcon, vue.mergeProps(extraProps, {
|
|
380
|
+
return typeof prop === 'function' ? prop(input => vue.createVNode(VIcon, vue.mergeProps(input, extraProps), null), payload) : vue.createVNode(VIcon, vue.mergeProps(extraProps, {
|
|
355
381
|
"name": prop
|
|
356
382
|
}), null);
|
|
357
383
|
}
|
|
@@ -422,7 +448,7 @@ const LOADING_SIZE_MAP = {
|
|
|
422
448
|
const VButton = vue.defineComponent({
|
|
423
449
|
name: 'VButton',
|
|
424
450
|
props: vueButtonProps,
|
|
425
|
-
emits: { ...vueUtils.navigationableEmits
|
|
451
|
+
emits: { ...vueUtils.navigationableEmits
|
|
426
452
|
},
|
|
427
453
|
|
|
428
454
|
setup(props, ctx) {
|
|
@@ -506,17 +532,22 @@ const VButton = vue.defineComponent({
|
|
|
506
532
|
});
|
|
507
533
|
|
|
508
534
|
function createListTileProps() {
|
|
509
|
-
const icon =
|
|
510
|
-
return
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
535
|
+
const icon = rawIconProp();
|
|
536
|
+
return { ...vueUtils.navigationableProps,
|
|
537
|
+
...vueUtils.createPropsOptions({
|
|
538
|
+
startIcon: icon,
|
|
539
|
+
endIcon: icon,
|
|
540
|
+
fallbackTag: {
|
|
541
|
+
type: String,
|
|
542
|
+
default: 'div'
|
|
543
|
+
},
|
|
544
|
+
startIconEmptySpace: Boolean,
|
|
545
|
+
color: String
|
|
546
|
+
})
|
|
547
|
+
};
|
|
518
548
|
}
|
|
519
|
-
const listTileEmits = { ...vueUtils.navigationableEmits
|
|
549
|
+
const listTileEmits = { ...vueUtils.navigationableEmits,
|
|
550
|
+
changeActive: isActive => true
|
|
520
551
|
};
|
|
521
552
|
const VListTile = vue.defineComponent({
|
|
522
553
|
name: 'VListTile',
|
|
@@ -525,20 +556,57 @@ const VListTile = vue.defineComponent({
|
|
|
525
556
|
},
|
|
526
557
|
|
|
527
558
|
setup(props, ctx) {
|
|
528
|
-
const startIcon = vue.computed(() =>
|
|
529
|
-
|
|
530
|
-
|
|
559
|
+
const startIcon = vue.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 = vue.computed(() => resolveRawIconProp(false, props.endIcon));
|
|
569
|
+
const navigationable = vueUtils.useNavigationable(props, () => props.fallbackTag, ctx);
|
|
570
|
+
const hasTo = vue.computed(() => !!props.to);
|
|
571
|
+
const link = vueRouter.useLink({
|
|
572
|
+
to: props.to || ''
|
|
573
|
+
});
|
|
574
|
+
const isActive = vue.computed(() => {
|
|
575
|
+
if (!hasTo.value) return false;
|
|
576
|
+
return link.isActive.value;
|
|
577
|
+
});
|
|
578
|
+
const color = vueColorScheme.useScopeColorClass(props);
|
|
579
|
+
const classes = vue.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
|
+
vue.watch(() => isActive.value, isActive => {
|
|
592
|
+
ctx.emit('changeActive', isActive);
|
|
593
|
+
}, {
|
|
594
|
+
immediate: true
|
|
595
|
+
});
|
|
531
596
|
return () => {
|
|
532
597
|
const _startIcon = startIcon.value;
|
|
533
598
|
const _endIcon = endIcon.value;
|
|
534
599
|
const {
|
|
535
600
|
Tag,
|
|
536
|
-
attrs
|
|
537
|
-
classes
|
|
601
|
+
attrs
|
|
538
602
|
} = navigationable.value;
|
|
539
603
|
return vue.createVNode(Tag, vue.mergeProps({
|
|
540
|
-
"class": ['v-list-tile', classes]
|
|
541
|
-
}, attrs
|
|
604
|
+
"class": ['v-list-tile', classes.value]
|
|
605
|
+
}, attrs, {
|
|
606
|
+
"onClick": ev => {
|
|
607
|
+
ctx.emit('click', ev);
|
|
608
|
+
}
|
|
609
|
+
}), {
|
|
542
610
|
default: () => [_startIcon && vue.createVNode("span", {
|
|
543
611
|
"class": "v-list-tile__icon v-list-tile__icon--start"
|
|
544
612
|
}, [_startIcon]), vue.createVNode("span", {
|
|
@@ -552,81 +620,260 @@ const VListTile = vue.defineComponent({
|
|
|
552
620
|
|
|
553
621
|
});
|
|
554
622
|
|
|
555
|
-
const
|
|
556
|
-
name: '
|
|
623
|
+
const VDrawerLayout = vue.defineComponent({
|
|
624
|
+
name: 'VDrawerLayout',
|
|
625
|
+
props: { ...createPaperBaseProps()
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
setup(props, ctx) {
|
|
629
|
+
return () => {
|
|
630
|
+
const paperProps = vue.computed(() => ({
|
|
631
|
+
color: props.color,
|
|
632
|
+
tag: props.tag
|
|
633
|
+
}));
|
|
634
|
+
return vue.createVNode(VPaper, vue.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
|
+
|
|
557
651
|
});
|
|
558
652
|
|
|
559
|
-
function _isSlot$
|
|
653
|
+
function _isSlot$5(s) {
|
|
560
654
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
561
655
|
}
|
|
562
656
|
|
|
563
657
|
function createNavigationItemProps() {
|
|
564
|
-
return { ...createListTileProps()
|
|
658
|
+
return { ...createListTileProps(),
|
|
659
|
+
match: String
|
|
565
660
|
};
|
|
566
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
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function renderNavigationItemInput(input, extraProps) {
|
|
678
|
+
const {
|
|
679
|
+
label,
|
|
680
|
+
props
|
|
681
|
+
} = resolveNavigationItemInput(input);
|
|
682
|
+
return vue.createVNode(VNavigationItem, { ...props,
|
|
683
|
+
...extraProps
|
|
684
|
+
}, _isSlot$5(label) ? label : {
|
|
685
|
+
default: () => [label]
|
|
686
|
+
});
|
|
687
|
+
}
|
|
567
688
|
const VNavigationItem = vue.defineComponent({
|
|
568
689
|
name: 'VNavigationItem',
|
|
569
|
-
|
|
690
|
+
inheritAttrs: false,
|
|
691
|
+
props: { ...createNavigationItemProps(),
|
|
692
|
+
children: Array
|
|
693
|
+
},
|
|
570
694
|
emits: { ...listTileEmits
|
|
571
695
|
},
|
|
572
696
|
|
|
573
697
|
setup(props, ctx) {
|
|
574
|
-
const
|
|
575
|
-
|
|
698
|
+
const vui = useVui();
|
|
699
|
+
const opened = vue.ref(false);
|
|
700
|
+
const children = vue.computed(() => {
|
|
701
|
+
const c = props.children;
|
|
702
|
+
return c && c.length ? c : undefined;
|
|
703
|
+
});
|
|
704
|
+
const to = vue.computed(() => props.to);
|
|
705
|
+
const match = vue.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 = vue.computed(() => [{
|
|
716
|
+
'v-navigation-item--opened': opened.value
|
|
717
|
+
}]);
|
|
718
|
+
const route = vueRouter.useRoute(); // const classes = computed(() => [
|
|
719
|
+
// // {
|
|
720
|
+
// // 'v-navigation-item--matched': matched.value,
|
|
721
|
+
// // },
|
|
722
|
+
// ]);
|
|
723
|
+
|
|
724
|
+
vue.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 = vue.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
|
+
};
|
|
576
816
|
|
|
577
817
|
return () => {
|
|
578
818
|
let _slot;
|
|
579
819
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
820
|
+
const _children = children.value;
|
|
821
|
+
const fallbackTag = _children ? 'button' : undefined;
|
|
822
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode(VListTile, vue.mergeProps(_props.value, {
|
|
823
|
+
"fallbackTag": fallbackTag,
|
|
824
|
+
"endIcon": _props.value.endIcon,
|
|
825
|
+
"class": ['v-navigation-item', classes.value],
|
|
826
|
+
"onClick": onClick,
|
|
827
|
+
"onChangeActive": onChangeActive
|
|
828
|
+
}), _isSlot$5(_slot = vueUtils.renderSlotOrEmpty(ctx.slots, 'default')) ? _slot : {
|
|
583
829
|
default: () => [_slot]
|
|
584
|
-
})
|
|
830
|
+
}), _children && vue.createVNode(vueUtils.VExpandTransition, null, {
|
|
831
|
+
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
832
|
+
"class": "v-navigation-item__expand"
|
|
833
|
+
}, [_children.map(child => renderNavigationItemInput(child, {
|
|
834
|
+
startIconEmptySpace: _props.value.startIconEmptySpace // onClick,
|
|
835
|
+
// onChangeActive,
|
|
836
|
+
|
|
837
|
+
}))]), [[vue.vShow, opened.value]])]
|
|
838
|
+
})]);
|
|
585
839
|
};
|
|
586
840
|
}
|
|
587
841
|
|
|
588
842
|
});
|
|
589
843
|
|
|
590
|
-
function _isSlot$5(s) {
|
|
591
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
844
|
const VNavigation = vue.defineComponent({
|
|
595
845
|
name: 'VNavigation',
|
|
596
846
|
props: {
|
|
597
847
|
items: {
|
|
598
848
|
type: Array,
|
|
599
849
|
required: true
|
|
600
|
-
}
|
|
850
|
+
},
|
|
851
|
+
color: String,
|
|
852
|
+
startIconEmptySpace: {
|
|
853
|
+
type: Boolean,
|
|
854
|
+
default: true
|
|
855
|
+
},
|
|
856
|
+
caption: [String, Function]
|
|
601
857
|
},
|
|
602
858
|
|
|
603
859
|
setup(props, ctx) {
|
|
604
860
|
const items = vue.computed(() => props.items);
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
delete _props.label;
|
|
615
|
-
return {
|
|
616
|
-
label,
|
|
617
|
-
props: _props
|
|
618
|
-
};
|
|
619
|
-
}));
|
|
861
|
+
const color = vueColorScheme.useScopeColorClass(props);
|
|
862
|
+
const classes = vue.computed(() => [color.value.className]);
|
|
863
|
+
const startIconEmptySpace = vue.computed(() => props.startIconEmptySpace);
|
|
864
|
+
const caption = vue.computed(() => {
|
|
865
|
+
const c = props.caption;
|
|
866
|
+
return typeof c === 'function' ? c() : c;
|
|
867
|
+
});
|
|
620
868
|
return () => {
|
|
869
|
+
const $caption = caption.value;
|
|
621
870
|
return vue.createVNode("nav", {
|
|
622
|
-
"class":
|
|
623
|
-
}, [
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}), _isSlot$5(label) ? label : {
|
|
629
|
-
default: () => [label]
|
|
871
|
+
"class": ['v-navigation', classes.value]
|
|
872
|
+
}, [!!$caption && vue.createVNode("div", {
|
|
873
|
+
"class": "v-navigation__caption"
|
|
874
|
+
}, [$caption]), items.value.map(item => renderNavigationItemInput(item, {
|
|
875
|
+
class: 'v-navigation__item',
|
|
876
|
+
startIconEmptySpace: startIconEmptySpace.value
|
|
630
877
|
}))]);
|
|
631
878
|
};
|
|
632
879
|
}
|
|
@@ -1622,7 +1869,6 @@ exports.VSnackbar = vueKit.VSnackbar;
|
|
|
1622
1869
|
exports.ICON_NAMES = iconFont.ICON_NAMES;
|
|
1623
1870
|
exports.CONTROL_FIELD_VARIANTS = CONTROL_FIELD_VARIANTS;
|
|
1624
1871
|
exports.CONTROL_SIZES = CONTROL_SIZES;
|
|
1625
|
-
exports.VAccordion = VAccordion;
|
|
1626
1872
|
exports.VApp = VApp;
|
|
1627
1873
|
exports.VButton = VButton;
|
|
1628
1874
|
exports.VCard = VCard;
|
|
@@ -1630,6 +1876,7 @@ exports.VCardActions = VCardActions;
|
|
|
1630
1876
|
exports.VCardContent = VCardContent;
|
|
1631
1877
|
exports.VCheckbox = VCheckbox;
|
|
1632
1878
|
exports.VCheckboxGroup = VCheckboxGroup;
|
|
1879
|
+
exports.VDrawerLayout = VDrawerLayout;
|
|
1633
1880
|
exports.VForm = VForm;
|
|
1634
1881
|
exports.VIcon = VIcon;
|
|
1635
1882
|
exports.VListTile = VListTile;
|
|
@@ -1671,12 +1918,15 @@ exports.createControlProps = createControlProps;
|
|
|
1671
1918
|
exports.createElevationProps = createElevationProps;
|
|
1672
1919
|
exports.createListTileProps = createListTileProps;
|
|
1673
1920
|
exports.createNavigationItemProps = createNavigationItemProps;
|
|
1921
|
+
exports.createPaperBaseProps = createPaperBaseProps;
|
|
1674
1922
|
exports.createPaperProps = createPaperProps;
|
|
1675
1923
|
exports.defineFormSelectorComponent = defineFormSelectorComponent;
|
|
1676
1924
|
exports.iconProps = iconProps;
|
|
1677
1925
|
exports.installVuiPlugin = installVuiPlugin;
|
|
1678
1926
|
exports.listTileEmits = listTileEmits;
|
|
1679
|
-
exports.
|
|
1927
|
+
exports.rawIconProp = rawIconProp;
|
|
1928
|
+
exports.renderNavigationItemInput = renderNavigationItemInput;
|
|
1929
|
+
exports.resolveNavigationItemInput = resolveNavigationItemInput;
|
|
1680
1930
|
exports.resolveRawIconProp = resolveRawIconProp;
|
|
1681
1931
|
exports.useControl = useControl;
|
|
1682
1932
|
exports.useControlField = useControlField;
|
package/dist/vui.css
CHANGED
|
@@ -923,22 +923,44 @@ h6,
|
|
|
923
923
|
transform: translate(-50%, -50%);
|
|
924
924
|
}
|
|
925
925
|
.v-list-tile {
|
|
926
|
+
--tile-background: var(--main-color, transparent);
|
|
927
|
+
--tile-active-background: var(--deep-color, transparent);
|
|
928
|
+
--tile-text-color: var(--text-color);
|
|
929
|
+
--tile-text-active-color: var(--text-color);
|
|
930
|
+
--tile-pin-color: transparent;
|
|
931
|
+
--paper-link-color: var(--tile-text-color);
|
|
926
932
|
display: flex;
|
|
927
933
|
align-items: center;
|
|
928
934
|
width: 100%;
|
|
929
935
|
padding: 10px;
|
|
930
|
-
color:
|
|
936
|
+
color: var(--tile-text-color);
|
|
931
937
|
text-align: left;
|
|
932
938
|
text-decoration: none;
|
|
933
|
-
|
|
939
|
+
user-select: none;
|
|
940
|
+
background: var(--tile-background);
|
|
934
941
|
border: 0;
|
|
935
|
-
border-left: 3px solid
|
|
942
|
+
border-left: 3px solid var(--tile-pin-color);
|
|
936
943
|
border-radius: 0;
|
|
937
944
|
outline: 0;
|
|
945
|
+
transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
938
946
|
appearance: none;
|
|
939
947
|
}
|
|
948
|
+
.v-list-tile--clickable {
|
|
949
|
+
cursor: pointer;
|
|
950
|
+
--tile-text-color: var(--nav-color);
|
|
951
|
+
--tile-text-active-color: var(--navActive-color, var(--nav-color));
|
|
952
|
+
}
|
|
953
|
+
.v-list-tile--clickable:hover, .v-list-tile--clickable:focus {
|
|
954
|
+
--tile-background: var(--tile-active-background);
|
|
955
|
+
--tile-text-color: var(--tile-text-active-color);
|
|
956
|
+
}
|
|
957
|
+
.v-list-tile--active {
|
|
958
|
+
--tile-pin-color: var(--pin-color);
|
|
959
|
+
--tile-text-color: var(--tile-text-active-color);
|
|
960
|
+
--tile-background: var(--tile-active-background);
|
|
961
|
+
}
|
|
940
962
|
.v-list-tile__body {
|
|
941
|
-
font-size: 0.
|
|
963
|
+
font-size: 0.8125rem;
|
|
942
964
|
font-weight: 500;
|
|
943
965
|
line-height: 1.5;
|
|
944
966
|
}
|
|
@@ -949,8 +971,46 @@ h6,
|
|
|
949
971
|
margin-left: auto;
|
|
950
972
|
text-align: right;
|
|
951
973
|
}
|
|
952
|
-
|
|
953
|
-
|
|
974
|
+
.v-drawer-layout {
|
|
975
|
+
display: flex;
|
|
976
|
+
flex-direction: column;
|
|
977
|
+
align-items: stretch;
|
|
978
|
+
width: 100%;
|
|
979
|
+
height: 100%;
|
|
980
|
+
}
|
|
981
|
+
.v-drawer-layout__header {
|
|
982
|
+
display: flex;
|
|
983
|
+
flex: 0 0 var(--v-app-layout-vertial-fixed-height);
|
|
984
|
+
align-items: center;
|
|
985
|
+
justify-content: center;
|
|
986
|
+
height: var(--v-app-layout-vertial-fixed-height);
|
|
987
|
+
}
|
|
988
|
+
.v-drawer-layout__body {
|
|
989
|
+
flex: 1 1 100%;
|
|
990
|
+
overflow: auto;
|
|
991
|
+
-webkit-overflow-scrolling: touch;
|
|
992
|
+
}
|
|
993
|
+
.v-drawer-layout__footer {
|
|
994
|
+
flex: 0 0 auto;
|
|
995
|
+
margin-top: auto;
|
|
996
|
+
}
|
|
997
|
+
.v-navigation-item--opened {
|
|
998
|
+
--tile-background: var(--tile-active-background);
|
|
999
|
+
}
|
|
1000
|
+
.v-navigation-item__expand {
|
|
1001
|
+
transition: height 0.2s;
|
|
1002
|
+
}
|
|
1003
|
+
.v-navigation-item__expand .v-navigation-item {
|
|
1004
|
+
--tile-background: var(--tile-active-background);
|
|
1005
|
+
}
|
|
1006
|
+
.v-navigation__caption {
|
|
1007
|
+
display: block;
|
|
1008
|
+
padding: calc(var(--root-em) * 0.625) calc(var(--root-em) * 1.5625);
|
|
1009
|
+
margin: 1em 0 0;
|
|
1010
|
+
font-size: 0.75rem;
|
|
1011
|
+
color: var(--caption-color);
|
|
1012
|
+
text-transform: uppercase;
|
|
1013
|
+
}
|
|
954
1014
|
.v-checkbox {
|
|
955
1015
|
--my-border-color: var(--color);
|
|
956
1016
|
--my-faux-bg-color: transparent;
|