@fastkit/vui 0.7.46 → 0.7.47
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 +408 -1
- package/dist/vui.cjs.prod.js +408 -1
- package/dist/vui.css +229 -0
- package/dist/vui.d.ts +688 -0
- package/dist/vui.min.css +1 -1
- package/dist/vui.min.css.map +1 -1
- package/dist/vui.mjs +402 -4
- package/package.json +6 -6
- package/src/components/.DS_Store +0 -0
- package/src/components/VAvatar/.DS_Store +0 -0
- package/src/components/VAvatar/VAvatar.scss +76 -0
- package/src/components/VAvatar/VAvatar.tsx +81 -0
- package/src/components/VAvatar/index.ts +1 -0
- package/src/components/VBusyImage/VBusyImage.scss +58 -0
- package/src/components/VBusyImage/VBusyImage.tsx +278 -0
- package/src/components/VBusyImage/index.ts +1 -0
- package/src/components/VChip/.DS_Store +0 -0
- package/src/components/VChip/VChip.scss +78 -0
- package/src/components/VChip/VChip.tsx +102 -0
- package/src/components/VChip/index.ts +1 -0
- package/src/components/VSkeltonLoader/.DS_Store +0 -0
- package/src/components/VSkeltonLoader/VSkeltonLoaderBone.scss +31 -0
- package/src/components/VSkeltonLoader/VSkeltonLoaderBone.tsx +25 -0
- package/src/components/VSkeltonLoader/index.ts +1 -0
- package/src/components/index.ts +4 -0
- package/src/styles/variables.scss +19 -0
package/dist/vui.cjs.prod.js
CHANGED
|
@@ -9,8 +9,8 @@ var vueUtils = require('@fastkit/vue-utils');
|
|
|
9
9
|
var vueScroller = require('@fastkit/vue-scroller');
|
|
10
10
|
var vueColorScheme = require('@fastkit/vue-color-scheme');
|
|
11
11
|
var vueLoading = require('@fastkit/vue-loading');
|
|
12
|
-
var iconFont = require('@fastkit/icon-font');
|
|
13
12
|
var helpers = require('@fastkit/helpers');
|
|
13
|
+
var iconFont = require('@fastkit/icon-font');
|
|
14
14
|
var vueAppLayout = require('@fastkit/vue-app-layout');
|
|
15
15
|
var vueFormControl = require('@fastkit/vue-form-control');
|
|
16
16
|
var vue3 = require('@tiptap/vue-3');
|
|
@@ -409,6 +409,248 @@ function useElevation(props, opts = {}) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
+
function _isSlot$e(s) {
|
|
413
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const VSkeltonLoaderBone = vue.defineComponent({
|
|
417
|
+
name: 'VSkeltonLoaderBone',
|
|
418
|
+
inheritAttrs: false,
|
|
419
|
+
props: {
|
|
420
|
+
tag: {
|
|
421
|
+
type: String,
|
|
422
|
+
default: 'div'
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
|
|
426
|
+
setup(props, ctx) {
|
|
427
|
+
return () => {
|
|
428
|
+
let _slot;
|
|
429
|
+
|
|
430
|
+
const TagName = props.tag;
|
|
431
|
+
return vue.createVNode(TagName, vue.mergeProps(ctx.attrs, {
|
|
432
|
+
"class": "v-skelton-loader-bone"
|
|
433
|
+
}), _isSlot$e(_slot = vueUtils.renderSlotOrEmpty(ctx.slots)) ? _slot : {
|
|
434
|
+
default: () => [_slot]
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
const IMAGE_ATTRS = ['alt', 'crossorigin', 'decoding', 'sizes', 'src', 'srcset', 'usemap'];
|
|
442
|
+
function splitAttrs(attrs) {
|
|
443
|
+
const el = { ...attrs
|
|
444
|
+
};
|
|
445
|
+
const img = {};
|
|
446
|
+
|
|
447
|
+
for (const ATTR of IMAGE_ATTRS) {
|
|
448
|
+
const value = attrs[ATTR];
|
|
449
|
+
|
|
450
|
+
if (value != null) {
|
|
451
|
+
img[ATTR] = value;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return {
|
|
456
|
+
el,
|
|
457
|
+
img
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
const NUMBERISH_PROP = [Number, String];
|
|
461
|
+
const DEFAULT_HEIGHT = 150;
|
|
462
|
+
|
|
463
|
+
const resolveBusyImageSizeValue = source => {
|
|
464
|
+
if (source == null) return;
|
|
465
|
+
return isNaN(source) ? String(source) : `${source}px`;
|
|
466
|
+
};
|
|
467
|
+
/**
|
|
468
|
+
* 画像表示用コンポーネント
|
|
469
|
+
* <img /> タグのように振る舞うが、ローディング表示や、表示サイズの調整など、ちょっといい感じにやるためのコンポーネント
|
|
470
|
+
*/
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
const VBusyImage = vue.defineComponent({
|
|
474
|
+
name: 'VBusyImage',
|
|
475
|
+
props: { ...undefined,
|
|
476
|
+
aspectRatio: String,
|
|
477
|
+
width: NUMBERISH_PROP,
|
|
478
|
+
height: NUMBERISH_PROP,
|
|
479
|
+
cover: Boolean,
|
|
480
|
+
...vueUtils.defineSlotsProps()
|
|
481
|
+
},
|
|
482
|
+
emits: {
|
|
483
|
+
load: ev => true,
|
|
484
|
+
error: ev => true
|
|
485
|
+
},
|
|
486
|
+
|
|
487
|
+
setup(props, ctx) {
|
|
488
|
+
const loadStateRef = vue.ref(props.cover && isAvairableSrc(ctx.attrs.src) ? 'loading' : 'pending');
|
|
489
|
+
const attrsRef = vue.computed(() => splitAttrs(ctx.attrs));
|
|
490
|
+
const isPendingRef = vue.computed(() => loadStateRef.value === 'pending');
|
|
491
|
+
const isLoadingRef = vue.computed(() => loadStateRef.value === 'loading');
|
|
492
|
+
const isLoadedRef = vue.computed(() => loadStateRef.value === 'loaded');
|
|
493
|
+
const isErrorRef = vue.computed(() => loadStateRef.value === 'error');
|
|
494
|
+
const classesRef = vue.computed(() => [`v-busy-image--${loadStateRef.value}`, {
|
|
495
|
+
'v-busy-image--cover': props.cover,
|
|
496
|
+
'v-busy-image--clickable': typeof ctx.attrs.onClick === 'function'
|
|
497
|
+
}]);
|
|
498
|
+
const nodeRef = vue.ref();
|
|
499
|
+
const coverImageRef = vue.ref();
|
|
500
|
+
const rectsRef = vue.computed(() => {
|
|
501
|
+
const placeholder = {};
|
|
502
|
+
const main = {};
|
|
503
|
+
const {
|
|
504
|
+
cover
|
|
505
|
+
} = props;
|
|
506
|
+
let {
|
|
507
|
+
width,
|
|
508
|
+
height
|
|
509
|
+
} = props;
|
|
510
|
+
|
|
511
|
+
if (height == null && cover) {
|
|
512
|
+
height = DEFAULT_HEIGHT;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if (width == null && cover) {
|
|
516
|
+
width = height;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
width = resolveBusyImageSizeValue(width);
|
|
520
|
+
height = resolveBusyImageSizeValue(height);
|
|
521
|
+
main.width = width;
|
|
522
|
+
main.height = height;
|
|
523
|
+
placeholder.width = width;
|
|
524
|
+
placeholder.height = height;
|
|
525
|
+
|
|
526
|
+
if (placeholder.height == null) {
|
|
527
|
+
placeholder.height = resolveBusyImageSizeValue(DEFAULT_HEIGHT);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (placeholder.width == null) {
|
|
531
|
+
placeholder.width = placeholder.height;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return {
|
|
535
|
+
placeholder,
|
|
536
|
+
main
|
|
537
|
+
};
|
|
538
|
+
});
|
|
539
|
+
const currentRectRef = vue.computed(() => isLoadedRef.value ? rectsRef.value.main : rectsRef.value.placeholder);
|
|
540
|
+
const stylesRef = vue.computed(() => {
|
|
541
|
+
const {
|
|
542
|
+
value: coverImage
|
|
543
|
+
} = coverImageRef;
|
|
544
|
+
const coverSrc = coverImage && coverImage.src;
|
|
545
|
+
const styles = { ...currentRectRef.value
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
if (coverSrc) {
|
|
549
|
+
styles.backgroundImage = `url(${coverSrc})`;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
return styles;
|
|
553
|
+
});
|
|
554
|
+
let booted = false;
|
|
555
|
+
vue.watch(() => ctx.attrs.src, value => {
|
|
556
|
+
coverImageRef.value = undefined;
|
|
557
|
+
|
|
558
|
+
if (isAvairableSrc(value)) {
|
|
559
|
+
loadStateRef.value = 'loading';
|
|
560
|
+
|
|
561
|
+
if (props.cover) {
|
|
562
|
+
helpers.loadImage(value).then(image => {
|
|
563
|
+
coverImageRef.value = image;
|
|
564
|
+
setManualState('load');
|
|
565
|
+
}).catch(err => {
|
|
566
|
+
setManualState('error');
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
} else {
|
|
570
|
+
loadStateRef.value = 'pending';
|
|
571
|
+
}
|
|
572
|
+
}, {
|
|
573
|
+
immediate: helpers.IN_WINDOW
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
const setManualState = loadType => {
|
|
577
|
+
loadStateRef.value = loadType === 'load' ? 'loaded' : 'error';
|
|
578
|
+
const ev = new Event(loadType, {
|
|
579
|
+
bubbles: false,
|
|
580
|
+
cancelable: false,
|
|
581
|
+
composed: false
|
|
582
|
+
});
|
|
583
|
+
ctx.emit(loadType, ev);
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
vue.onMounted(() => {
|
|
587
|
+
if (booted || props.cover) return;
|
|
588
|
+
const image = nodeRef.value;
|
|
589
|
+
if (!image) return;
|
|
590
|
+
const loadType = imageIsReady(image);
|
|
591
|
+
|
|
592
|
+
if (loadType) {
|
|
593
|
+
setManualState(loadType);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
vue.onBeforeUnmount(() => {
|
|
597
|
+
coverImageRef.value = undefined;
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
const handleLoad = ev => {
|
|
601
|
+
booted = true;
|
|
602
|
+
loadStateRef.value = 'loaded';
|
|
603
|
+
ctx.emit('load', ev);
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
const handleError = ev => {
|
|
607
|
+
booted = true;
|
|
608
|
+
loadStateRef.value = 'error';
|
|
609
|
+
ctx.emit('error', ev);
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
ctx.expose({
|
|
613
|
+
state: loadStateRef,
|
|
614
|
+
isPending: isPendingRef,
|
|
615
|
+
isLoading: isLoadingRef,
|
|
616
|
+
isLoaded: isLoadedRef,
|
|
617
|
+
isError: isErrorRef
|
|
618
|
+
});
|
|
619
|
+
return () => {
|
|
620
|
+
const {
|
|
621
|
+
el: elAttrs,
|
|
622
|
+
img: imgAttrs
|
|
623
|
+
} = attrsRef.value;
|
|
624
|
+
const styles = stylesRef.value;
|
|
625
|
+
const children = ctx.slots.default && ctx.slots.default();
|
|
626
|
+
return vue.createVNode("span", vue.mergeProps({
|
|
627
|
+
"class": ['v-busy-image', classesRef.value]
|
|
628
|
+
}, elAttrs, {
|
|
629
|
+
"style": styles
|
|
630
|
+
}), [!props.cover && vue.createVNode("img", vue.mergeProps({
|
|
631
|
+
"key": "img",
|
|
632
|
+
"ref": nodeRef,
|
|
633
|
+
"class": "v-busy-image__node"
|
|
634
|
+
}, imgAttrs, {
|
|
635
|
+
"onLoad": handleLoad,
|
|
636
|
+
"onError": handleError
|
|
637
|
+
}), null), !!children && vue.createVNode("span", {
|
|
638
|
+
"class": "v-busy-image__slot"
|
|
639
|
+
}, [children])]);
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
function imageIsReady(image) {
|
|
646
|
+
if (!image.complete) return false;
|
|
647
|
+
return image.naturalWidth + image.naturalHeight > 0 ? 'load' : 'error';
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
function isAvairableSrc(src) {
|
|
651
|
+
return typeof src === 'string' && src !== '';
|
|
652
|
+
}
|
|
653
|
+
|
|
412
654
|
function extractRawGridValueClasses(value, prefix, getter) {
|
|
413
655
|
if (typeof value !== 'object')
|
|
414
656
|
return `${prefix}${getter ? getter(value) : value}`;
|
|
@@ -634,6 +876,162 @@ const VPaper = vue.defineComponent({
|
|
|
634
876
|
|
|
635
877
|
});
|
|
636
878
|
|
|
879
|
+
const AVATAR_SIZES = ['sm', 'md', 'lg'];
|
|
880
|
+
function createAvatarProps() {
|
|
881
|
+
return { ...vueColorScheme.colorSchemeProps(),
|
|
882
|
+
...vueUtils.navigationableInheritProps,
|
|
883
|
+
size: {
|
|
884
|
+
type: [String, Number],
|
|
885
|
+
default: 'md'
|
|
886
|
+
},
|
|
887
|
+
tile: Boolean,
|
|
888
|
+
rounded: Boolean,
|
|
889
|
+
disabled: Boolean,
|
|
890
|
+
src: String
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
const VAvatar = vue.defineComponent({
|
|
894
|
+
name: 'VAvatar',
|
|
895
|
+
inheritAttrs: false,
|
|
896
|
+
props: createAvatarProps(),
|
|
897
|
+
|
|
898
|
+
setup(props, ctx) {
|
|
899
|
+
const vui = useVui();
|
|
900
|
+
const defaults = vui.setting('buttonDefault');
|
|
901
|
+
const color = vueColorScheme.useColorClasses({
|
|
902
|
+
color: () => props.color || defaults.color,
|
|
903
|
+
variant: () => props.variant || defaults.variant
|
|
904
|
+
});
|
|
905
|
+
const navigationable = vueUtils.useNavigationable(ctx, {
|
|
906
|
+
clickableClassName: () => 'v-avatar--clickable',
|
|
907
|
+
linkFallbackTag: 'div'
|
|
908
|
+
});
|
|
909
|
+
const classes = vue.computed(() => {
|
|
910
|
+
const {
|
|
911
|
+
size
|
|
912
|
+
} = props;
|
|
913
|
+
return [{
|
|
914
|
+
'v-avatar--tile': props.tile,
|
|
915
|
+
'v-avatar--rounded': props.rounded
|
|
916
|
+
}, typeof size === 'string' && `v-avatar--${size}`];
|
|
917
|
+
});
|
|
918
|
+
const styles = vue.computed(() => {
|
|
919
|
+
const {
|
|
920
|
+
size
|
|
921
|
+
} = props;
|
|
922
|
+
if (typeof size !== 'number') return;
|
|
923
|
+
return {
|
|
924
|
+
'--avatar-size': `${size}px`
|
|
925
|
+
};
|
|
926
|
+
});
|
|
927
|
+
return () => {
|
|
928
|
+
const {
|
|
929
|
+
src
|
|
930
|
+
} = props;
|
|
931
|
+
const {
|
|
932
|
+
Tag,
|
|
933
|
+
attrs
|
|
934
|
+
} = navigationable.value;
|
|
935
|
+
return vue.createVNode(Tag, vue.mergeProps(attrs, {
|
|
936
|
+
"class": ['v-avatar', classes.value, color.colorClasses.value],
|
|
937
|
+
"style": styles.value
|
|
938
|
+
}), {
|
|
939
|
+
default: () => [!!src && vue.createVNode(VBusyImage, {
|
|
940
|
+
"class": "v-avatar__image",
|
|
941
|
+
"src": src,
|
|
942
|
+
"cover": true
|
|
943
|
+
}, null) || vueUtils.renderSlotOrEmpty(ctx.slots)]
|
|
944
|
+
});
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
const CHIP_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
951
|
+
function createChipProps() {
|
|
952
|
+
return { ...vueColorScheme.colorSchemeProps(),
|
|
953
|
+
...vueUtils.navigationableInheritProps,
|
|
954
|
+
size: {
|
|
955
|
+
type: String,
|
|
956
|
+
default: 'md'
|
|
957
|
+
},
|
|
958
|
+
startIcon: [String, Function],
|
|
959
|
+
endIcon: [String, Function],
|
|
960
|
+
label: Boolean,
|
|
961
|
+
disabled: Boolean
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
function resolveRawVChipIcon(raw, type) {
|
|
966
|
+
if (!raw) return;
|
|
967
|
+
|
|
968
|
+
if (typeof raw === 'function') {
|
|
969
|
+
return () => {
|
|
970
|
+
const child = raw();
|
|
971
|
+
if (child == null) return;
|
|
972
|
+
return vue.createVNode("span", {
|
|
973
|
+
"class": ['v-chip__icon', `v-chip__icon--${type}`]
|
|
974
|
+
}, [child]);
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
return () => vue.createVNode(VIcon, {
|
|
979
|
+
"class": ['v-chip__icon', `v-chip__icon--${type}`],
|
|
980
|
+
"name": raw
|
|
981
|
+
}, null);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
const VChip = vue.defineComponent({
|
|
985
|
+
name: 'VChip',
|
|
986
|
+
inheritAttrs: false,
|
|
987
|
+
props: createChipProps(),
|
|
988
|
+
|
|
989
|
+
setup(props, ctx) {
|
|
990
|
+
const vui = useVui();
|
|
991
|
+
const defaults = vui.setting('buttonDefault');
|
|
992
|
+
const color = vueColorScheme.useColorClasses({
|
|
993
|
+
color: () => props.color || defaults.color,
|
|
994
|
+
variant: () => props.variant || defaults.variant
|
|
995
|
+
});
|
|
996
|
+
const startIcon = vue.computed(() => {
|
|
997
|
+
const _icon = resolveRawVChipIcon(props.startIcon, 'start');
|
|
998
|
+
|
|
999
|
+
return _icon && _icon();
|
|
1000
|
+
});
|
|
1001
|
+
const endIcon = vue.computed(() => {
|
|
1002
|
+
const _icon = resolveRawVChipIcon(props.endIcon, 'end');
|
|
1003
|
+
|
|
1004
|
+
return _icon && _icon();
|
|
1005
|
+
});
|
|
1006
|
+
const navigationable = vueUtils.useNavigationable(ctx, {
|
|
1007
|
+
clickableClassName: () => 'v-chip--clickable',
|
|
1008
|
+
linkFallbackTag: 'div'
|
|
1009
|
+
});
|
|
1010
|
+
const classes = vue.computed(() => {
|
|
1011
|
+
const {
|
|
1012
|
+
size
|
|
1013
|
+
} = props;
|
|
1014
|
+
return [{
|
|
1015
|
+
'v-chip--label': props.label
|
|
1016
|
+
}, typeof size === 'string' && `v-chip--${size}`];
|
|
1017
|
+
});
|
|
1018
|
+
return () => {
|
|
1019
|
+
const {
|
|
1020
|
+
Tag,
|
|
1021
|
+
attrs
|
|
1022
|
+
} = navigationable.value;
|
|
1023
|
+
return vue.createVNode(Tag, vue.mergeProps(attrs, {
|
|
1024
|
+
"class": ['v-chip', classes.value, color.colorClasses.value]
|
|
1025
|
+
}), {
|
|
1026
|
+
default: () => [startIcon.value, vue.createVNode("span", {
|
|
1027
|
+
"class": "v-chip__content"
|
|
1028
|
+
}, [vueUtils.renderSlotOrEmpty(ctx.slots)]), endIcon.value]
|
|
1029
|
+
});
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
});
|
|
1034
|
+
|
|
637
1035
|
function createCardProps() {
|
|
638
1036
|
return { ...createPaperProps(),
|
|
639
1037
|
...vueUtils.navigationableInheritProps,
|
|
@@ -4520,11 +4918,15 @@ exports.VMenu = vueKit.VMenu;
|
|
|
4520
4918
|
exports.VSnackbar = vueKit.VSnackbar;
|
|
4521
4919
|
exports.VTooltip = vueKit.VTooltip;
|
|
4522
4920
|
exports.ICON_NAMES = iconFont.ICON_NAMES;
|
|
4921
|
+
exports.AVATAR_SIZES = AVATAR_SIZES;
|
|
4922
|
+
exports.CHIP_SIZES = CHIP_SIZES;
|
|
4523
4923
|
exports.CONTROL_FIELD_VARIANTS = CONTROL_FIELD_VARIANTS;
|
|
4524
4924
|
exports.CONTROL_SIZES = CONTROL_SIZES;
|
|
4525
4925
|
exports.PAGINATION_ALIGNS = PAGINATION_ALIGNS;
|
|
4526
4926
|
exports.VApp = VApp;
|
|
4927
|
+
exports.VAvatar = VAvatar;
|
|
4527
4928
|
exports.VBreadcrumbs = VBreadcrumbs;
|
|
4929
|
+
exports.VBusyImage = VBusyImage;
|
|
4528
4930
|
exports.VButton = VButton;
|
|
4529
4931
|
exports.VButtonGroup = VButtonGroup;
|
|
4530
4932
|
exports.VCard = VCard;
|
|
@@ -4532,6 +4934,7 @@ exports.VCardActions = VCardActions;
|
|
|
4532
4934
|
exports.VCardContent = VCardContent;
|
|
4533
4935
|
exports.VCheckbox = VCheckbox;
|
|
4534
4936
|
exports.VCheckboxGroup = VCheckboxGroup;
|
|
4937
|
+
exports.VChip = VChip;
|
|
4535
4938
|
exports.VContentSwitcher = VContentSwitcher;
|
|
4536
4939
|
exports.VDataTable = VDataTable;
|
|
4537
4940
|
exports.VDrawerLayout = VDrawerLayout;
|
|
@@ -4551,6 +4954,7 @@ exports.VPaper = VPaper;
|
|
|
4551
4954
|
exports.VRadio = VRadio;
|
|
4552
4955
|
exports.VRadioGroup = VRadioGroup;
|
|
4553
4956
|
exports.VSelect = VSelect;
|
|
4957
|
+
exports.VSkeltonLoaderBone = VSkeltonLoaderBone;
|
|
4554
4958
|
exports.VSwitch = VSwitch;
|
|
4555
4959
|
exports.VSwitchGroup = VSwitchGroup;
|
|
4556
4960
|
exports.VTabs = VTabs;
|
|
@@ -4588,7 +4992,9 @@ exports.WysiwygLinkTool = WysiwygLinkTool;
|
|
|
4588
4992
|
exports.WysiwygOrderedListTool = WysiwygOrderedListTool;
|
|
4589
4993
|
exports.WysiwygTextColorTool = WysiwygTextColorTool;
|
|
4590
4994
|
exports.configureDataTableDefaults = configureDataTableDefaults;
|
|
4995
|
+
exports.createAvatarProps = createAvatarProps;
|
|
4591
4996
|
exports.createCardProps = createCardProps;
|
|
4997
|
+
exports.createChipProps = createChipProps;
|
|
4592
4998
|
exports.createControlFieldProviderProps = createControlFieldProviderProps;
|
|
4593
4999
|
exports.createControlProps = createControlProps;
|
|
4594
5000
|
exports.createElevationProps = createElevationProps;
|
|
@@ -4611,6 +5017,7 @@ exports.renderNavigationItemInput = renderNavigationItemInput;
|
|
|
4611
5017
|
exports.resolveNavigationItemInput = resolveNavigationItemInput;
|
|
4612
5018
|
exports.resolveRawIconProp = resolveRawIconProp;
|
|
4613
5019
|
exports.resolveRawWysiwygEditorTools = resolveRawWysiwygEditorTools;
|
|
5020
|
+
exports.splitAttrs = splitAttrs;
|
|
4614
5021
|
exports.useControl = useControl;
|
|
4615
5022
|
exports.useControlField = useControlField;
|
|
4616
5023
|
exports.useElevation = useElevation;
|
package/dist/vui.css
CHANGED
|
@@ -365,6 +365,7 @@ template {
|
|
|
365
365
|
--typo-base-weight: 400;
|
|
366
366
|
--typo-base-height: 1.5;
|
|
367
367
|
--typo-base-spacing: 0em;
|
|
368
|
+
--typo-medium-weight: 500;
|
|
368
369
|
--typo-h1-size: 2.5rem;
|
|
369
370
|
--typo-h1-weight: 500;
|
|
370
371
|
--typo-h1-height: 1.2222222222222223;
|
|
@@ -410,6 +411,18 @@ template {
|
|
|
410
411
|
--typo-subtitle2-height: 1.57;
|
|
411
412
|
--typo-subtitle2-spacing: 0.00714em;
|
|
412
413
|
--typo-sm-size: calc(var(--root-em) * 0.875);
|
|
414
|
+
--chip-padding: 0.875em;
|
|
415
|
+
--chip-font-weight: var(--typo-base-weight);
|
|
416
|
+
--chip-height-xs: 16px;
|
|
417
|
+
--chip-font-size-xs: 10px;
|
|
418
|
+
--chip-height-sm: 24px;
|
|
419
|
+
--chip-font-size-sm: 12px;
|
|
420
|
+
--chip-height-md: 32px;
|
|
421
|
+
--chip-font-size-md: 14px;
|
|
422
|
+
--chip-height-lg: 54px;
|
|
423
|
+
--chip-font-size-lg: 16px;
|
|
424
|
+
--chip-height-xl: 66px;
|
|
425
|
+
--chip-font-size-xl: 18px;
|
|
413
426
|
--control-field-rem-sm: 0.875rem;
|
|
414
427
|
--control-field-rem-md: 1rem;
|
|
415
428
|
--control-field-rem-lg: 1.125rem;
|
|
@@ -935,6 +948,82 @@ thead th {
|
|
|
935
948
|
justify-content: center;
|
|
936
949
|
transition: transform 150ms linear;
|
|
937
950
|
}
|
|
951
|
+
.v-skelton-loader-bone {
|
|
952
|
+
position: relative;
|
|
953
|
+
overflow: hidden;
|
|
954
|
+
cursor: progress;
|
|
955
|
+
background: rgba(0, 0, 0, 0.12);
|
|
956
|
+
border-radius: inherit;
|
|
957
|
+
}
|
|
958
|
+
.v-skelton-loader-bone::after {
|
|
959
|
+
position: absolute;
|
|
960
|
+
top: 0;
|
|
961
|
+
right: 0;
|
|
962
|
+
left: 0;
|
|
963
|
+
z-index: 1;
|
|
964
|
+
height: 100%;
|
|
965
|
+
content: "";
|
|
966
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
|
|
967
|
+
transform: translateX(-100%);
|
|
968
|
+
animation: v-skelton-loader-bone-loading 1.5s infinite;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
@keyframes v-skelton-loader-bone-loading {
|
|
972
|
+
100% {
|
|
973
|
+
transform: translateX(100%);
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
.v-busy-image {
|
|
977
|
+
position: relative;
|
|
978
|
+
display: inline-block;
|
|
979
|
+
max-width: 100%;
|
|
980
|
+
vertical-align: bottom;
|
|
981
|
+
}
|
|
982
|
+
.v-busy-image--clickable {
|
|
983
|
+
cursor: pointer;
|
|
984
|
+
}
|
|
985
|
+
.v-busy-image--cover {
|
|
986
|
+
background-repeat: no-repeat;
|
|
987
|
+
background-position: center;
|
|
988
|
+
background-size: cover;
|
|
989
|
+
}
|
|
990
|
+
.v-busy-image--loading::before {
|
|
991
|
+
position: absolute;
|
|
992
|
+
top: 0;
|
|
993
|
+
right: 0;
|
|
994
|
+
bottom: 0;
|
|
995
|
+
left: 0;
|
|
996
|
+
display: block;
|
|
997
|
+
content: "";
|
|
998
|
+
background: rgba(0, 0, 0, 0.1);
|
|
999
|
+
animation: v-tiny-image-blink normal 1.5s infinite ease-in-out;
|
|
1000
|
+
}
|
|
1001
|
+
.v-busy-image__node {
|
|
1002
|
+
position: relative;
|
|
1003
|
+
display: inline-block;
|
|
1004
|
+
max-width: 100%;
|
|
1005
|
+
vertical-align: bottom;
|
|
1006
|
+
}
|
|
1007
|
+
.v-busy-image__slot {
|
|
1008
|
+
position: absolute;
|
|
1009
|
+
top: 0;
|
|
1010
|
+
left: 0;
|
|
1011
|
+
width: 100%;
|
|
1012
|
+
height: 100%;
|
|
1013
|
+
pointer-events: none;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
@keyframes v-tiny-image-blink {
|
|
1017
|
+
0% {
|
|
1018
|
+
opacity: 1;
|
|
1019
|
+
}
|
|
1020
|
+
50% {
|
|
1021
|
+
opacity: 0;
|
|
1022
|
+
}
|
|
1023
|
+
100% {
|
|
1024
|
+
opacity: 1;
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
938
1027
|
.v-grid-item {
|
|
939
1028
|
display: block;
|
|
940
1029
|
}
|
|
@@ -974,6 +1063,146 @@ thead th {
|
|
|
974
1063
|
border-bottom-right-radius: inherit;
|
|
975
1064
|
border-bottom-left-radius: inherit;
|
|
976
1065
|
}
|
|
1066
|
+
.v-avatar {
|
|
1067
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
1068
|
+
padding: 0;
|
|
1069
|
+
touch-action: manipulation;
|
|
1070
|
+
cursor: pointer;
|
|
1071
|
+
user-select: none;
|
|
1072
|
+
background-color: transparent;
|
|
1073
|
+
border: 0;
|
|
1074
|
+
outline: 0;
|
|
1075
|
+
appearance: none;
|
|
1076
|
+
--avatar-radius: 50%;
|
|
1077
|
+
--avatar-font-weight: var(--typo-medium-weight);
|
|
1078
|
+
--avatar-base-font-size: var(--typo-base-size);
|
|
1079
|
+
--avatar-font-size: var(--avatar-base-font-size);
|
|
1080
|
+
display: inline-flex;
|
|
1081
|
+
flex-basis: var(--avatar-size);
|
|
1082
|
+
align-items: center;
|
|
1083
|
+
justify-content: center;
|
|
1084
|
+
width: var(--avatar-size);
|
|
1085
|
+
min-width: var(--avatar-size);
|
|
1086
|
+
height: var(--avatar-size);
|
|
1087
|
+
overflow: hidden;
|
|
1088
|
+
font-size: var(--avatar-font-size);
|
|
1089
|
+
font-weight: var(--avatar-font-weight);
|
|
1090
|
+
line-height: 1;
|
|
1091
|
+
text-align: center;
|
|
1092
|
+
vertical-align: bottom;
|
|
1093
|
+
cursor: default;
|
|
1094
|
+
border-style: solid;
|
|
1095
|
+
border-width: 1px;
|
|
1096
|
+
border-radius: var(--avatar-radius);
|
|
1097
|
+
--shadow-color: rgba(0, 0, 0, 0) !important;
|
|
1098
|
+
--focusShadow-color: rgba(0, 0, 0, 0) !important;
|
|
1099
|
+
}
|
|
1100
|
+
.v-avatar::-moz-focus-inner {
|
|
1101
|
+
border: 0;
|
|
1102
|
+
}
|
|
1103
|
+
.v-avatar, .v-avatar:hover, .v-avatar:focus {
|
|
1104
|
+
text-decoration: none;
|
|
1105
|
+
}
|
|
1106
|
+
.v-avatar--clickable {
|
|
1107
|
+
cursor: pointer;
|
|
1108
|
+
}
|
|
1109
|
+
.v-avatar--sm {
|
|
1110
|
+
--avatar-size: 36px;
|
|
1111
|
+
--avatar-font-size: calc(var(--avatar-base-font-size) * 0.75);
|
|
1112
|
+
}
|
|
1113
|
+
.v-avatar--md {
|
|
1114
|
+
--avatar-size: 48px;
|
|
1115
|
+
}
|
|
1116
|
+
.v-avatar--lg {
|
|
1117
|
+
--avatar-size: 62px;
|
|
1118
|
+
--avatar-font-size: calc(var(--avatar-base-font-size) * 1.25);
|
|
1119
|
+
}
|
|
1120
|
+
.v-avatar--rounded {
|
|
1121
|
+
--avatar-radius: 4px;
|
|
1122
|
+
}
|
|
1123
|
+
.v-avatar--tile {
|
|
1124
|
+
--avatar-radius: 0;
|
|
1125
|
+
}
|
|
1126
|
+
.v-avatar img, .v-avatar__image {
|
|
1127
|
+
display: inline-flex;
|
|
1128
|
+
width: inherit !important;
|
|
1129
|
+
height: inherit !important;
|
|
1130
|
+
border-radius: inherit;
|
|
1131
|
+
object-fit: cover;
|
|
1132
|
+
}
|
|
1133
|
+
.v-chip {
|
|
1134
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
1135
|
+
padding: 0;
|
|
1136
|
+
touch-action: manipulation;
|
|
1137
|
+
cursor: pointer;
|
|
1138
|
+
user-select: none;
|
|
1139
|
+
background-color: transparent;
|
|
1140
|
+
border: 0;
|
|
1141
|
+
outline: 0;
|
|
1142
|
+
appearance: none;
|
|
1143
|
+
--chip-radius: calc(var(--chip-height) / 2);
|
|
1144
|
+
display: inline-flex;
|
|
1145
|
+
align-items: center;
|
|
1146
|
+
justify-content: center;
|
|
1147
|
+
height: var(--chip-height);
|
|
1148
|
+
padding: 0 var(--chip-padding);
|
|
1149
|
+
overflow: hidden;
|
|
1150
|
+
font-size: var(--chip-font-size);
|
|
1151
|
+
font-weight: var(--chip-font-weight);
|
|
1152
|
+
line-height: 1;
|
|
1153
|
+
text-align: center;
|
|
1154
|
+
white-space: nowrap;
|
|
1155
|
+
vertical-align: bottom;
|
|
1156
|
+
cursor: default;
|
|
1157
|
+
border-style: solid;
|
|
1158
|
+
border-width: 1px;
|
|
1159
|
+
border-radius: var(--chip-radius);
|
|
1160
|
+
--shadow-color: rgba(0, 0, 0, 0) !important;
|
|
1161
|
+
--focusShadow-color: rgba(0, 0, 0, 0) !important;
|
|
1162
|
+
}
|
|
1163
|
+
.v-chip::-moz-focus-inner {
|
|
1164
|
+
border: 0;
|
|
1165
|
+
}
|
|
1166
|
+
.v-chip, .v-chip:hover, .v-chip:focus {
|
|
1167
|
+
text-decoration: none;
|
|
1168
|
+
}
|
|
1169
|
+
.v-chip--clickable {
|
|
1170
|
+
cursor: pointer;
|
|
1171
|
+
}
|
|
1172
|
+
.v-chip--xs {
|
|
1173
|
+
--chip-height: var(--chip-height-xs);
|
|
1174
|
+
--chip-font-size: var(--chip-font-size-xs);
|
|
1175
|
+
}
|
|
1176
|
+
.v-chip--sm {
|
|
1177
|
+
--chip-height: var(--chip-height-sm);
|
|
1178
|
+
--chip-font-size: var(--chip-font-size-sm);
|
|
1179
|
+
}
|
|
1180
|
+
.v-chip--md {
|
|
1181
|
+
--chip-height: var(--chip-height-md);
|
|
1182
|
+
--chip-font-size: var(--chip-font-size-md);
|
|
1183
|
+
}
|
|
1184
|
+
.v-chip--lg {
|
|
1185
|
+
--chip-height: var(--chip-height-lg);
|
|
1186
|
+
--chip-font-size: var(--chip-font-size-lg);
|
|
1187
|
+
}
|
|
1188
|
+
.v-chip--xl {
|
|
1189
|
+
--chip-height: var(--chip-height-xl);
|
|
1190
|
+
--chip-font-size: var(--chip-font-size-xl);
|
|
1191
|
+
}
|
|
1192
|
+
.v-chip--label {
|
|
1193
|
+
--chip-radius: 4px;
|
|
1194
|
+
}
|
|
1195
|
+
.v-chip__icon--start {
|
|
1196
|
+
margin-right: calc(var(--chip-padding) * 0.5);
|
|
1197
|
+
margin-left: calc(var(--chip-padding) * -0.5);
|
|
1198
|
+
}
|
|
1199
|
+
.v-chip__icon--end {
|
|
1200
|
+
margin-right: calc(var(--chip-padding) * -0.5);
|
|
1201
|
+
margin-left: calc(var(--chip-padding) * 0.5);
|
|
1202
|
+
}
|
|
1203
|
+
.v-chip .v-avatar {
|
|
1204
|
+
--avatar-size: 14px;
|
|
1205
|
+
}
|
|
977
1206
|
.v-card {
|
|
978
1207
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
979
1208
|
position: relative;
|