mediacube-ui 0.1.346 → 0.1.348
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 +4 -0
- package/dist/mediacube-ui.umd.js +1 -0
- package/package.json +13 -8
- package/src/assets/tokens/tokens.json +5 -0
- package/src/elements/McAvatar/McAvatar.vue +2 -0
- package/src/elements/McBadge/McBadge.vue +5 -0
- package/src/elements/McButton/McButton.vue +9 -0
- package/src/elements/McChip/McChip.vue +6 -1
- package/src/elements/McCropper/McCropper.vue +2 -0
- package/src/elements/McDate/McDate.vue +2 -0
- package/src/elements/McDatePicker/McDatePicker.vue +10 -2
- package/src/elements/McField/McFieldCheckbox/McFieldCheckbox.vue +7 -0
- package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.vue +6 -0
- package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.vue +4 -0
- package/src/elements/McField/McFieldSelect/McFieldSelect.vue +1 -0
- package/src/elements/McField/McFieldText/McFieldText.vue +13 -5
- package/src/elements/McField/McFieldToggle/McFieldToggle.vue +5 -0
- package/src/elements/McNotification/McNotification.vue +6 -0
- package/src/elements/McProgress/McProgress.vue +5 -0
- package/src/elements/McRangeSlider/McRangeSlider.vue +4 -0
- package/src/elements/McSvgIcon/McSvgIcon.vue +1 -0
- package/src/elements/McTabs/McTab/McTab.vue +2 -0
- package/src/elements/McTabs/McTabs/McTabs.vue +7 -0
- package/src/elements/McTitle/McTitle.vue +5 -0
- package/src/elements/McTooltip/McTooltip.vue +5 -0
- package/src/helpers/storybookFunctions.js +0 -1
- package/src/patterns/McCells/McCell/McCell.vue +1 -0
- package/src/patterns/McChat/McChat.vue +1 -0
- package/src/patterns/McChat/McChatComment/McChatComment.vue +4 -1
- package/src/patterns/McChat/McChatForm/McChatForm.vue +3 -0
- package/src/patterns/McCollapse/McCollapse.vue +2 -0
- package/src/patterns/McDrawer/McDrawer.vue +4 -0
- package/src/patterns/McDropdown/McDropdown.vue +2 -0
- package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.vue +4 -0
- package/src/patterns/McFakeScroll/McFakeScroll.vue +2 -0
- package/src/patterns/McFilter/McFilterChip/McFilterChip.vue +2 -0
- package/src/patterns/McFilter/McFilterTags/McFilterTags.vue +2 -0
- package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue +1 -0
- package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue +3 -0
- package/src/patterns/McFilter/McFilterTypeSimple/McFilterTypeSimple.vue +4 -1
- package/src/patterns/McGrid/McGridCol/McGridCol.vue +1 -0
- package/src/patterns/McModal/McModal.vue +7 -1
- package/src/patterns/McOverlay/McOverlay.vue +1 -0
- package/src/patterns/McPreview/McPreview.vue +1 -0
- package/src/patterns/McSideBar/McSideBar/McSideBar.vue +2 -0
- package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue +1 -0
- package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.vue +5 -0
- package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue +2 -0
- package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.vue +5 -0
- package/src/patterns/McStack/McStack.vue +5 -0
- package/src/patterns/McTable/McTable/McTable.vue +7 -1
- package/src/patterns/McTable/McTableCol/McTableCol.vue +6 -3
- package/src/patterns/McTableCard/McTableCard.vue +3 -0
- package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.vue +2 -0
- package/src/patterns/McTopBar/McTopBar.vue +2 -0
- package/src/patterns/McWrapScroll/McWrapScroll.vue +2 -0
- package/src/styles/_functions.scss +2 -0
- package/src/styles/_mixins.scss +7 -0
- package/src/styles/global.scss +3 -0
- package/src/styles/table.scss +2 -0
- package/src/styles/toast.scss +4 -0
- package/src/utils/filters.js +6 -6
- package/src/utils/load-icons.js +1 -1
- package/src/utils/treeSearch.js +23 -23
- package/dist/mediacube-ui.common.js +0 -378
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
/**
|
|
51
51
|
* Значение
|
|
52
52
|
*/
|
|
53
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
53
54
|
value: {
|
|
54
55
|
// type: [String, Number],
|
|
55
56
|
default: null,
|
|
@@ -199,6 +200,8 @@ export default {
|
|
|
199
200
|
|
|
200
201
|
<style lang="scss">
|
|
201
202
|
@import '../../../styles/mixins';
|
|
203
|
+
@import '../../../tokens/spacings';
|
|
204
|
+
@import '../../../tokens/sizes';
|
|
202
205
|
.mc-filter-type-relation {
|
|
203
206
|
$block-name: &;
|
|
204
207
|
width: 300px;
|
|
@@ -33,6 +33,7 @@ export default {
|
|
|
33
33
|
/**
|
|
34
34
|
* Значение
|
|
35
35
|
*/
|
|
36
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
36
37
|
value: {
|
|
37
38
|
// type: [String, Number],
|
|
38
39
|
default: null,
|
|
@@ -81,7 +82,7 @@ export default {
|
|
|
81
82
|
if (!_isEmpty(this.currentValues) && this.filter.value in this.currentValues) {
|
|
82
83
|
const category = this.currentValues[this.filter.value]
|
|
83
84
|
let selected = []
|
|
84
|
-
for (let [
|
|
85
|
+
for (let [, val] of Object.entries(category)) {
|
|
85
86
|
selected = [...selected, ...(Array.isArray(val) ? val : [[val]])]
|
|
86
87
|
}
|
|
87
88
|
options = options.filter(o => !selected.includes(String(o.value)))
|
|
@@ -139,6 +140,8 @@ export default {
|
|
|
139
140
|
|
|
140
141
|
<style lang="scss">
|
|
141
142
|
@import '../../../styles/mixins';
|
|
143
|
+
@import '../../../tokens/spacings';
|
|
144
|
+
@import '../../../tokens/sizes';
|
|
142
145
|
.mc-filter-type-simple {
|
|
143
146
|
$block-name: &;
|
|
144
147
|
width: 300px;
|
|
@@ -289,6 +289,12 @@ export default {
|
|
|
289
289
|
@import '../../tokens/z-indexes';
|
|
290
290
|
@import '../../tokens/durations';
|
|
291
291
|
@import '../../tokens/font-families';
|
|
292
|
+
@import '../../tokens/spacings';
|
|
293
|
+
@import '../../tokens/sizes';
|
|
294
|
+
@import '../../tokens/colors';
|
|
295
|
+
@import '../../tokens/font-sizes';
|
|
296
|
+
@import '../../tokens/media-queries';
|
|
297
|
+
@import '../../tokens/font-weights';
|
|
292
298
|
.v--modal-block-scroll {
|
|
293
299
|
width: 100%;
|
|
294
300
|
}
|
|
@@ -355,7 +361,7 @@ export default {
|
|
|
355
361
|
.mc-modal {
|
|
356
362
|
&__inner {
|
|
357
363
|
border-radius: 32px;
|
|
358
|
-
box-shadow:
|
|
364
|
+
box-shadow: 0 15px 30px $box-shadow-color;
|
|
359
365
|
padding: $space-400;
|
|
360
366
|
}
|
|
361
367
|
&__btn-close,
|
|
@@ -53,6 +53,7 @@ export default {
|
|
|
53
53
|
* Если нужна ссылка внутри приложения:
|
|
54
54
|
* `{name: 'test', params: { id: test.id }}`
|
|
55
55
|
*/
|
|
56
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
56
57
|
to: {
|
|
57
58
|
default: null,
|
|
58
59
|
},
|
|
@@ -60,6 +61,7 @@ export default {
|
|
|
60
61
|
* Если нужна обычная ссылка:
|
|
61
62
|
* `https://mediacube.agency/`
|
|
62
63
|
*/
|
|
64
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
63
65
|
href: {
|
|
64
66
|
default: null,
|
|
65
67
|
},
|
|
@@ -183,6 +185,9 @@ export default {
|
|
|
183
185
|
|
|
184
186
|
<style lang="scss">
|
|
185
187
|
@import '../../../styles/mixins';
|
|
188
|
+
@import '../../../tokens/spacings';
|
|
189
|
+
@import '../../../tokens/colors';
|
|
190
|
+
@import '../../../tokens/sizes';
|
|
186
191
|
.mc-side-bar-button {
|
|
187
192
|
$block-name: &;
|
|
188
193
|
&__tooltip {
|
|
@@ -182,6 +182,11 @@ export default {
|
|
|
182
182
|
|
|
183
183
|
<style lang="scss">
|
|
184
184
|
@import '../../../styles/mixins';
|
|
185
|
+
@import '../../../tokens/colors';
|
|
186
|
+
@import '../../../tokens/spacings';
|
|
187
|
+
@import '../../../tokens/font-sizes';
|
|
188
|
+
@import '../../../tokens/line-heights';
|
|
189
|
+
@import '../../../tokens/sizes';
|
|
185
190
|
.mc-side-bar-top {
|
|
186
191
|
$block-name: &;
|
|
187
192
|
@include reset-text-indents();
|
|
@@ -112,6 +112,11 @@ export default {
|
|
|
112
112
|
<style lang="scss">
|
|
113
113
|
@import '../../styles/mixins';
|
|
114
114
|
@import '../../tokens/font-families';
|
|
115
|
+
@import '../../tokens/font-weights';
|
|
116
|
+
@import '../../tokens/font-sizes';
|
|
117
|
+
@import '../../tokens/line-heights';
|
|
118
|
+
@import '../../tokens/spacings';
|
|
119
|
+
@import '../../tokens/colors';
|
|
115
120
|
.mc-stack {
|
|
116
121
|
$block-name: &;
|
|
117
122
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<component
|
|
24
24
|
:is="tag"
|
|
25
25
|
v-bind="attrs"
|
|
26
|
-
v-on="{ ...$listeners, 'sort-change':
|
|
26
|
+
v-on="{ ...$listeners, 'sort-change': handleSort }"
|
|
27
27
|
@scroll="handleScroll"
|
|
28
28
|
@context-menu-click="contextMenuClickEvent"
|
|
29
29
|
>
|
|
@@ -586,6 +586,12 @@ export default {
|
|
|
586
586
|
@import '../../../styles/mixins';
|
|
587
587
|
@import '../../../tokens/font-families';
|
|
588
588
|
@import '../../../tokens/animations';
|
|
589
|
+
@import '../../../tokens/colors';
|
|
590
|
+
@import '../../../tokens/font-sizes';
|
|
591
|
+
@import '../../../tokens/font-weights';
|
|
592
|
+
@import '../../../tokens/line-heights';
|
|
593
|
+
@import '../../../tokens/spacings';
|
|
594
|
+
@import '../../../tokens/sizes';
|
|
589
595
|
|
|
590
596
|
@import '~vxe-table/styles/variable.scss';
|
|
591
597
|
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
:name="getSortIcon(column)"
|
|
27
27
|
:color="getSortColor(column)"
|
|
28
28
|
size="200"
|
|
29
|
-
/>{{
|
|
30
|
-
|
|
31
|
-
}}<div slot="icon-append" class="mc-table-col__header-append">
|
|
29
|
+
/>{{ $attrs.type === 'seq' ? '#' : column.title }}
|
|
30
|
+
<div slot="icon-append" class="mc-table-col__header-append">
|
|
32
31
|
<!-- @slot Слот для вставки в конец после заголовка столбца -->
|
|
33
32
|
<slot name="header-append" />
|
|
34
33
|
</div>
|
|
@@ -189,6 +188,10 @@ export default {
|
|
|
189
188
|
|
|
190
189
|
<style lang="scss">
|
|
191
190
|
@import '../../../styles/mixins';
|
|
191
|
+
@import '../../../tokens/colors';
|
|
192
|
+
@import '../../../tokens/spacings';
|
|
193
|
+
@import '../../../tokens/sizes';
|
|
194
|
+
@import '../../../tokens/font-weights';
|
|
192
195
|
@import '~vxe-table/styles/variable.scss';
|
|
193
196
|
//override variables:
|
|
194
197
|
@import '../../../styles/table.scss';
|
package/src/styles/_mixins.scss
CHANGED
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
@import '../tokens/border-radius';
|
|
19
|
+
@import "../tokens/spacings";
|
|
20
|
+
@import "../tokens/colors";
|
|
21
|
+
@import "../tokens/line-heights";
|
|
22
|
+
@import "../tokens/font-sizes";
|
|
23
|
+
@import "../tokens/font-weights";
|
|
24
|
+
@import "../tokens/media-queries";
|
|
25
|
+
@import "../styles/functions";
|
|
19
26
|
|
|
20
27
|
@mixin size(
|
|
21
28
|
$width,
|
package/src/styles/global.scss
CHANGED
package/src/styles/table.scss
CHANGED
package/src/styles/toast.scss
CHANGED
package/src/utils/filters.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import numeral from
|
|
1
|
+
import numeral from 'numeral'
|
|
2
2
|
|
|
3
3
|
export const number = (value, decimals = 2) => {
|
|
4
|
-
|
|
4
|
+
if (value == null) return null
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
let deciamlsString = ''.padStart(decimals, '0')
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
return numeral(value)
|
|
9
|
+
.format('0,0.' + deciamlsString)
|
|
10
|
+
.replace(/,/g, ' ')
|
|
11
11
|
}
|
package/src/utils/load-icons.js
CHANGED
package/src/utils/treeSearch.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export const findParentComponent = ($component, name) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
let $parent = null
|
|
3
|
+
do {
|
|
4
|
+
if (!$component) {
|
|
5
|
+
return null
|
|
6
|
+
}
|
|
7
|
+
let $componentParent = $component.$parent
|
|
8
|
+
if ($componentParent && $componentParent.$options.name === name) {
|
|
9
|
+
$parent = $componentParent
|
|
10
|
+
} else {
|
|
11
|
+
$component = $componentParent
|
|
12
|
+
}
|
|
13
|
+
} while ($parent == null)
|
|
14
|
+
return $parent
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export const findChildrenComponents = ($component, name) => {
|
|
18
|
-
|
|
18
|
+
if ($component.$children == null || $component.$children.length === 0) return []
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
let $collapses = []
|
|
21
|
+
$component.$children.forEach($child => {
|
|
22
|
+
if ($child.$options.name === name) {
|
|
23
|
+
$collapses = [...$collapses, $child]
|
|
24
|
+
} else {
|
|
25
|
+
$collapses = [...$collapses, ...findChildrenComponents($child, name)]
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
return $collapses
|
|
30
30
|
}
|