mediacube-ui 0.1.33 → 0.1.35
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/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg data-token-name="youtube_outlined" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M20.8394 7.34203C20.6294 6.42172 20.008 5.69573 19.2178 5.44641C17.7888 5 12.0551 5 12.0551 5C12.0551 5 6.32426 5 4.89246 5.44641C4.10506 5.69207 3.48358 6.41805 3.27091 7.34203C2.88867 9.01216 2.88867 12.5 2.88867 12.5C2.88867 12.5 2.88867 15.9878 3.27091 17.658C3.48083 18.5783 4.10231 19.3043 4.89246 19.5536C6.32426 20 12.0551 20 12.0551 20C12.0551 20 17.7888 20 19.2178 19.5536C20.0052 19.3079 20.6267 18.582 20.8394 17.658C21.2216 15.9878 21.2216 12.5 21.2216 12.5C21.2216 12.5 21.2216 9.01216 20.8394 7.34203Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M10.2227 15.2499L14.9856 12.5L10.2227 9.75006V15.2499Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -559,7 +559,7 @@ export default {
|
|
|
559
559
|
},
|
|
560
560
|
formattedToNumber(value) {
|
|
561
561
|
const [first] =
|
|
562
|
-
|
|
562
|
+
/-?\d*[\.]?\d*/.exec(
|
|
563
563
|
String(value)
|
|
564
564
|
?.replace(/ /gm, '')
|
|
565
565
|
?.trim(),
|
|
@@ -604,7 +604,7 @@ export default {
|
|
|
604
604
|
const has_fraction = !!String(formatted_number)?.match(/\./)
|
|
605
605
|
|
|
606
606
|
const [int, fraction] = String(formatted_number)
|
|
607
|
-
.replace(/[^\d
|
|
607
|
+
.replace(/[^\d\.-]/g, '')
|
|
608
608
|
.replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')
|
|
609
609
|
.split('.')
|
|
610
610
|
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-tooltip="{ content, placement, classes: tooltipClasses, trigger, show, container }"
|
|
4
|
-
class="mc-tooltip-target"
|
|
5
|
-
>
|
|
2
|
+
<div v-tooltip="tooltipProps" class="mc-tooltip-target">
|
|
6
3
|
<!-- @slot Слот для элемента, у которого будет всплывать тултип -->
|
|
7
4
|
<slot />
|
|
8
5
|
</div>
|
|
@@ -88,17 +85,39 @@ export default {
|
|
|
88
85
|
type: Boolean,
|
|
89
86
|
default: false,
|
|
90
87
|
},
|
|
88
|
+
maxLines: {
|
|
89
|
+
type: Number,
|
|
90
|
+
default: null,
|
|
91
|
+
},
|
|
91
92
|
},
|
|
92
93
|
computed: {
|
|
94
|
+
tooltipProps() {
|
|
95
|
+
return {
|
|
96
|
+
content: this.content,
|
|
97
|
+
placement: this.placement,
|
|
98
|
+
classes: this.tooltipClasses,
|
|
99
|
+
trigger: this.trigger,
|
|
100
|
+
show: this.show,
|
|
101
|
+
container: this.container,
|
|
102
|
+
template: `<div class="tooltip" style="${this.tooltipVariables}" role="tooltip"> <div class="tooltip-arrow"></div> <div class="tooltip-inner test-class"><div class="tooltip-inner__content"></div></div> </div>`,
|
|
103
|
+
innerSelector: '.tooltip-inner__content',
|
|
104
|
+
}
|
|
105
|
+
},
|
|
93
106
|
tooltipClasses() {
|
|
94
107
|
return [
|
|
95
108
|
'mc-tooltip',
|
|
96
109
|
`mc-tooltip--color-${this.color}`,
|
|
97
110
|
`mc-tooltip--width-${this.maxWidth}`,
|
|
98
111
|
`mc-tooltip--size-${this.size}`,
|
|
112
|
+
this.maxLines ? 'mc-tooltip--lines-limit' : '',
|
|
99
113
|
this.arrowDisabled ? 'mc-tooltip--arrow-disabled' : '',
|
|
100
114
|
]
|
|
101
115
|
},
|
|
116
|
+
tooltipVariables() {
|
|
117
|
+
const variables = [this.maxLines && `--tooltip-content-max-lines: ${this.maxLines}`].filter(i => i)
|
|
118
|
+
|
|
119
|
+
return variables.join(' ')
|
|
120
|
+
},
|
|
102
121
|
},
|
|
103
122
|
}
|
|
104
123
|
</script>
|
|
@@ -118,13 +137,16 @@ export default {
|
|
|
118
137
|
.tooltip-inner {
|
|
119
138
|
@include inset-squish-space($space-300);
|
|
120
139
|
background: $color-black;
|
|
121
|
-
color: $color-white;
|
|
122
140
|
border-radius: $radius-100;
|
|
123
|
-
font-family: $font-family-main;
|
|
124
|
-
line-height: $line-height-250;
|
|
125
|
-
font-size: $font-size-300;
|
|
126
141
|
box-shadow: $shadow-s;
|
|
127
142
|
padding: $space-100 $space-150;
|
|
143
|
+
|
|
144
|
+
&__content {
|
|
145
|
+
color: $color-white;
|
|
146
|
+
font-family: $font-family-main;
|
|
147
|
+
line-height: $line-height-250;
|
|
148
|
+
font-size: $font-size-300;
|
|
149
|
+
}
|
|
128
150
|
}
|
|
129
151
|
|
|
130
152
|
.tooltip-arrow {
|
|
@@ -238,7 +260,10 @@ export default {
|
|
|
238
260
|
&.tooltip {
|
|
239
261
|
.tooltip-inner {
|
|
240
262
|
@include inset-squish-space($space-200);
|
|
241
|
-
|
|
263
|
+
|
|
264
|
+
&__content {
|
|
265
|
+
font-size: $font-size-200;
|
|
266
|
+
}
|
|
242
267
|
}
|
|
243
268
|
}
|
|
244
269
|
}
|
|
@@ -246,7 +271,24 @@ export default {
|
|
|
246
271
|
&.tooltip {
|
|
247
272
|
.tooltip-inner {
|
|
248
273
|
@include inset-squish-space($space-300);
|
|
249
|
-
|
|
274
|
+
|
|
275
|
+
&__content {
|
|
276
|
+
font-size: $font-size-300;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&--lines-limit {
|
|
284
|
+
&.tooltip {
|
|
285
|
+
.tooltip-inner {
|
|
286
|
+
&__content {
|
|
287
|
+
display: -webkit-box;
|
|
288
|
+
-webkit-box-orient: vertical;
|
|
289
|
+
-webkit-line-clamp: var(--tooltip-content-max-lines);
|
|
290
|
+
overflow: hidden;
|
|
291
|
+
text-overflow: ellipsis;
|
|
250
292
|
}
|
|
251
293
|
}
|
|
252
294
|
}
|