mediacube-ui 0.1.385 → 0.1.387
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.387](https://github.com/MediaCubeCo/mcui/compare/v0.1.386...v0.1.387) (2025-06-16)
|
|
6
|
+
|
|
7
|
+
### [0.1.386](https://github.com/MediaCubeCo/mcui/compare/v0.1.385...v0.1.386) (2025-06-16)
|
|
8
|
+
|
|
5
9
|
### [0.1.385](https://github.com/MediaCubeCo/mcui/compare/v0.1.384...v0.1.385) (2025-06-05)
|
|
6
10
|
|
|
7
11
|
### [0.1.384](https://github.com/MediaCubeCo/mcui/compare/v0.1.383...v0.1.384) (2025-06-05)
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
<template slot="singleLabel" slot-scope="{ option }">
|
|
30
30
|
<mc-preview v-if="optionWithPreview" class="option__desc" size="l">
|
|
31
|
-
<template
|
|
31
|
+
<template v-if="option?.icon || option?.image" #left>
|
|
32
32
|
<mc-avatar v-if="option.image" :src="option.image" size="400" />
|
|
33
33
|
<mc-svg-icon v-else :name="option.icon" :color="option.iconColor || 'main'" size="400" />
|
|
34
34
|
</template>
|
|
@@ -53,16 +53,26 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
55
|
|
|
56
|
-
<template
|
|
57
|
-
|
|
56
|
+
<template
|
|
57
|
+
v-if="optionsTooltip || optionWithPreview || optionWithPreviewOnly"
|
|
58
|
+
slot="option"
|
|
59
|
+
slot-scope="{ option }"
|
|
60
|
+
>
|
|
61
|
+
<mc-preview v-if="optionWithPreview || optionWithPreviewOnly" class="option__desc" size="l">
|
|
58
62
|
<template v-if="option?.icon || option?.image" #left>
|
|
59
63
|
<mc-avatar v-if="option.image" :src="option.image" size="400" />
|
|
60
64
|
<mc-svg-icon v-else :name="option.icon" :color="option.iconColor || 'main'" size="400" />
|
|
61
65
|
</template>
|
|
62
66
|
<mc-title slot="top" weight="semi-bold" v-html="option.name" />
|
|
63
|
-
<mc-title slot="bottom" color="gray" :pre-line="option.preLine"
|
|
67
|
+
<mc-title v-if="!!option.text" slot="bottom" color="gray" :pre-line="option.preLine"
|
|
68
|
+
>{{ option.text }}
|
|
69
|
+
</mc-title>
|
|
64
70
|
</mc-preview>
|
|
65
|
-
<mc-title
|
|
71
|
+
<mc-title
|
|
72
|
+
v-else-if="(optionWithPreview || optionWithPreviewOnly) && option.$isLabel"
|
|
73
|
+
weight="semi-bold"
|
|
74
|
+
variation="subtitle"
|
|
75
|
+
>
|
|
66
76
|
{{ option.$groupLabel }}
|
|
67
77
|
</mc-title>
|
|
68
78
|
<mc-tooltip
|
|
@@ -121,6 +131,7 @@ import McPreview from '../../../patterns/McPreview/McPreview'
|
|
|
121
131
|
import fieldErrors from '../../../mixins/fieldErrors'
|
|
122
132
|
import equalFieldHeight from '../../../mixins/equalFieldHeight'
|
|
123
133
|
import { LANGUAGES } from '../../../helpers/consts'
|
|
134
|
+
|
|
124
135
|
export default {
|
|
125
136
|
name: 'McFieldSelect',
|
|
126
137
|
components: { McSvgIcon, McAvatar, McTitle, McTooltip, MultiSelect, McPreview },
|
|
@@ -306,6 +317,14 @@ export default {
|
|
|
306
317
|
type: Boolean,
|
|
307
318
|
default: false,
|
|
308
319
|
},
|
|
320
|
+
/**
|
|
321
|
+
* Если айтемам в селекте нужны превью с иконками и описанием
|
|
322
|
+
* (только в выпадающем списке. Выбранное значение будет выводиться без описания)
|
|
323
|
+
*/
|
|
324
|
+
optionWithPreviewOnly: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: false,
|
|
327
|
+
},
|
|
309
328
|
tabindex: {
|
|
310
329
|
type: [String, Number],
|
|
311
330
|
default: null,
|
|
@@ -417,8 +436,8 @@ export default {
|
|
|
417
436
|
computedOptions() {
|
|
418
437
|
let options = !this.groupKeys
|
|
419
438
|
? [...this.options, ...this.local_options].filter(
|
|
420
|
-
|
|
421
|
-
|
|
439
|
+
(v, i, a) => a.findIndex(afi => afi.value === v.value) === i,
|
|
440
|
+
)
|
|
422
441
|
: this.options
|
|
423
442
|
if (this.searchValueInOptions && this.taggable) {
|
|
424
443
|
const search = this.searchValue
|
|
@@ -617,7 +636,7 @@ export default {
|
|
|
617
636
|
iosViewportIndent -
|
|
618
637
|
ref.$refs.list.getBoundingClientRect().height -
|
|
619
638
|
8}px`
|
|
620
|
-
|
|
639
|
+
ref.$refs.list.style.bottom = 'auto'
|
|
621
640
|
break
|
|
622
641
|
case 'bottom':
|
|
623
642
|
ref.$refs.list.style.bottom = 'auto'
|
|
@@ -727,6 +746,7 @@ export default {
|
|
|
727
746
|
@import '../../../tokens/font-weights';
|
|
728
747
|
@import '../../../tokens/sizes';
|
|
729
748
|
@import '../../../tokens/spacings';
|
|
749
|
+
|
|
730
750
|
.mc-field-select {
|
|
731
751
|
$block-name: &;
|
|
732
752
|
--mc-field-select-color: initial;
|
|
@@ -775,6 +795,7 @@ export default {
|
|
|
775
795
|
line-height: $line-height-200;
|
|
776
796
|
padding-inline-start: $space-50;
|
|
777
797
|
color: var(--mc-field-select-label-color);
|
|
798
|
+
|
|
778
799
|
&--indent-left {
|
|
779
800
|
margin-inline-start: $space-300;
|
|
780
801
|
}
|
|
@@ -825,6 +846,7 @@ export default {
|
|
|
825
846
|
top: 6px;
|
|
826
847
|
padding: 0;
|
|
827
848
|
z-index: 1;
|
|
849
|
+
|
|
828
850
|
&::before {
|
|
829
851
|
direction: ltr;
|
|
830
852
|
width: 0;
|
|
@@ -845,9 +867,11 @@ export default {
|
|
|
845
867
|
padding-inline: $space-100 $space-500;
|
|
846
868
|
overflow: hidden;
|
|
847
869
|
text-align: start;
|
|
870
|
+
|
|
848
871
|
&:hover {
|
|
849
872
|
border-color: var(--color-main);
|
|
850
873
|
}
|
|
874
|
+
|
|
851
875
|
&:before {
|
|
852
876
|
content: '';
|
|
853
877
|
position: absolute;
|
|
@@ -953,6 +977,7 @@ export default {
|
|
|
953
977
|
background-color: $color-hover-gray;
|
|
954
978
|
color: $color-black;
|
|
955
979
|
}
|
|
980
|
+
|
|
956
981
|
&--selected {
|
|
957
982
|
background-color: var(--color-main-alpha-10) !important;
|
|
958
983
|
color: $color-black !important;
|
|
@@ -962,6 +987,12 @@ export default {
|
|
|
962
987
|
&--group.multiselect__option--disabled {
|
|
963
988
|
background-color: $color-white !important;
|
|
964
989
|
}
|
|
990
|
+
|
|
991
|
+
.option__desc {
|
|
992
|
+
.mc-preview__bottom {
|
|
993
|
+
margin-top: 0;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
965
996
|
}
|
|
966
997
|
|
|
967
998
|
&--active {
|
|
@@ -970,8 +1001,10 @@ export default {
|
|
|
970
1001
|
&:before {
|
|
971
1002
|
background-color: $color-transparent;
|
|
972
1003
|
}
|
|
1004
|
+
|
|
973
1005
|
border-color: var(--mc-field-select-border-color);
|
|
974
1006
|
}
|
|
1007
|
+
|
|
975
1008
|
&__select {
|
|
976
1009
|
&::before {
|
|
977
1010
|
border-color: var(--color-main) $color-transparent $color-transparent;
|
|
@@ -979,6 +1012,7 @@ export default {
|
|
|
979
1012
|
}
|
|
980
1013
|
}
|
|
981
1014
|
}
|
|
1015
|
+
|
|
982
1016
|
&__spinner {
|
|
983
1017
|
&:after,
|
|
984
1018
|
&:before {
|
|
@@ -997,6 +1031,7 @@ export default {
|
|
|
997
1031
|
}
|
|
998
1032
|
}
|
|
999
1033
|
}
|
|
1034
|
+
|
|
1000
1035
|
&--hide-arrow {
|
|
1001
1036
|
.multiselect {
|
|
1002
1037
|
&__select {
|
|
@@ -1015,20 +1050,25 @@ export default {
|
|
|
1015
1050
|
|
|
1016
1051
|
&--disabled {
|
|
1017
1052
|
cursor: not-allowed;
|
|
1053
|
+
|
|
1018
1054
|
.multiselect--disabled {
|
|
1019
1055
|
opacity: 1;
|
|
1020
1056
|
background: transparent;
|
|
1057
|
+
|
|
1021
1058
|
.multiselect {
|
|
1022
1059
|
&__placeholder {
|
|
1023
1060
|
color: $color-gray;
|
|
1024
1061
|
}
|
|
1062
|
+
|
|
1025
1063
|
&__single {
|
|
1026
1064
|
& #{$block-name}__label-text {
|
|
1027
1065
|
color: $color-gray;
|
|
1028
1066
|
}
|
|
1029
1067
|
}
|
|
1068
|
+
|
|
1030
1069
|
&__select {
|
|
1031
1070
|
background-color: transparent;
|
|
1071
|
+
|
|
1032
1072
|
&::before {
|
|
1033
1073
|
border-color: $color-outline-gray transparent transparent;
|
|
1034
1074
|
}
|
|
@@ -1041,6 +1081,7 @@ export default {
|
|
|
1041
1081
|
.mc-preview {
|
|
1042
1082
|
align-items: center;
|
|
1043
1083
|
}
|
|
1084
|
+
|
|
1044
1085
|
&#{$block-name} {
|
|
1045
1086
|
&--grouped {
|
|
1046
1087
|
.multiselect {
|
|
@@ -1049,55 +1090,67 @@ export default {
|
|
|
1049
1090
|
}
|
|
1050
1091
|
}
|
|
1051
1092
|
}
|
|
1093
|
+
|
|
1052
1094
|
&--empty {
|
|
1053
1095
|
.multiselect {
|
|
1054
1096
|
&__tags {
|
|
1055
1097
|
padding: 0;
|
|
1056
1098
|
border-radius: $radius-100 !important;
|
|
1057
1099
|
}
|
|
1100
|
+
|
|
1058
1101
|
&__placeholder {
|
|
1059
1102
|
padding-inline-start: $space-150;
|
|
1060
1103
|
}
|
|
1104
|
+
|
|
1061
1105
|
&__select {
|
|
1062
1106
|
display: block;
|
|
1063
1107
|
}
|
|
1064
1108
|
}
|
|
1065
1109
|
}
|
|
1066
1110
|
}
|
|
1111
|
+
|
|
1067
1112
|
.multiselect {
|
|
1068
1113
|
&__content {
|
|
1069
1114
|
padding: 0;
|
|
1070
1115
|
}
|
|
1116
|
+
|
|
1071
1117
|
&--active {
|
|
1072
1118
|
.multiselect__select {
|
|
1073
1119
|
transform: translateY(-50%) rotate(180deg);
|
|
1074
1120
|
}
|
|
1075
1121
|
}
|
|
1122
|
+
|
|
1076
1123
|
&__select {
|
|
1077
1124
|
top: 50%;
|
|
1078
1125
|
transform: translateY(-50%);
|
|
1079
1126
|
}
|
|
1127
|
+
|
|
1080
1128
|
&__single {
|
|
1081
1129
|
margin: 0;
|
|
1082
1130
|
}
|
|
1131
|
+
|
|
1083
1132
|
&__tags {
|
|
1084
1133
|
padding: $space-200 0;
|
|
1085
1134
|
padding-inline: $space-150;
|
|
1086
1135
|
cursor: pointer;
|
|
1087
1136
|
border-color: $color-outline-light;
|
|
1088
1137
|
}
|
|
1138
|
+
|
|
1089
1139
|
&__option,
|
|
1090
1140
|
&__content-wrapper,
|
|
1091
1141
|
&__tags {
|
|
1092
1142
|
border-radius: $radius-200 !important;
|
|
1093
1143
|
}
|
|
1144
|
+
|
|
1094
1145
|
&__option {
|
|
1095
1146
|
padding: $space-200 $space-150;
|
|
1147
|
+
|
|
1096
1148
|
&--group {
|
|
1097
1149
|
padding: 0 0 $space-100 0;
|
|
1098
1150
|
min-height: auto;
|
|
1099
1151
|
}
|
|
1100
1152
|
}
|
|
1153
|
+
|
|
1101
1154
|
&__element {
|
|
1102
1155
|
&:not([role='option']) {
|
|
1103
1156
|
&:not(:first-of-type) {
|
|
@@ -1115,6 +1168,7 @@ export default {
|
|
|
1115
1168
|
overflow-y: auto;
|
|
1116
1169
|
position: initial;
|
|
1117
1170
|
}
|
|
1171
|
+
|
|
1118
1172
|
&__spinner {
|
|
1119
1173
|
background: transparent;
|
|
1120
1174
|
right: calc(#{$space-50} / 2);
|
|
@@ -1139,15 +1193,19 @@ export default {
|
|
|
1139
1193
|
z-index: 1;
|
|
1140
1194
|
width: auto;
|
|
1141
1195
|
}
|
|
1196
|
+
|
|
1142
1197
|
&-toggle {
|
|
1143
1198
|
pointer-events: auto;
|
|
1199
|
+
|
|
1144
1200
|
&:before {
|
|
1145
1201
|
border-color: black transparent transparent !important;
|
|
1146
1202
|
}
|
|
1203
|
+
|
|
1147
1204
|
&--close {
|
|
1148
1205
|
transform: rotate(180deg);
|
|
1149
1206
|
}
|
|
1150
1207
|
}
|
|
1208
|
+
|
|
1151
1209
|
.multiselect__tags {
|
|
1152
1210
|
display: flex;
|
|
1153
1211
|
justify-content: space-between;
|