mediacube-ui 0.1.345 → 0.1.347
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/0.mediacube-ui.umd.js +50 -0
- package/dist/assets/img/icons.3b7d59b2f49c67a2a3a4566b8ab233fd.svg +1 -0
- package/dist/assets/img/no_table_data.236cd56f46cfb71fc363b008d4ca70d5.png +0 -0
- package/dist/assets/img/no_user.e0030d6e54e2400e1181fd22b83cf8ae.png +0 -0
- package/dist/mediacube-ui.umd.js +1 -0
- package/package.json +14 -16
- package/src/assets/icons.svg +1 -1
- package/src/assets/tokens/tokens.json +5 -0
- package/dist/mediacube-ui.common.js +0 -378
- package/src/elements/McAvatar/McAvatar.vue +0 -274
- package/src/elements/McBadge/McBadge.vue +0 -148
- package/src/elements/McButton/McButton.vue +0 -841
- package/src/elements/McChip/McChip.vue +0 -300
- package/src/elements/McCropper/McCropper.vue +0 -133
- package/src/elements/McDate/McDate.vue +0 -105
- package/src/elements/McDatePicker/McDatePicker.vue +0 -902
- package/src/elements/McField/McFieldCheckbox/McFieldCheckbox.vue +0 -332
- package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.vue +0 -201
- package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.vue +0 -194
- package/src/elements/McField/McFieldSelect/McFieldSelect.vue +0 -1087
- package/src/elements/McField/McFieldText/McFieldText.vue +0 -969
- package/src/elements/McField/McFieldToggle/McFieldToggle.vue +0 -268
- package/src/elements/McInfinityLoadingIndicator/McInfinityLoadingIndicator.vue +0 -97
- package/src/elements/McNotification/McNotification.vue +0 -209
- package/src/elements/McProgress/McProgress.vue +0 -218
- package/src/elements/McRangeSlider/McRangeSlider.vue +0 -195
- package/src/elements/McSeparator/McSeparator.vue +0 -143
- package/src/elements/McSlideUpDown/McSlideUpDown.vue +0 -157
- package/src/elements/McSvgIcon/McSvgIcon.vue +0 -127
- package/src/elements/McTabs/McTab/McTab.vue +0 -187
- package/src/elements/McTabs/McTabs/McTabs.vue +0 -531
- package/src/elements/McTitle/McTitle.vue +0 -365
- package/src/elements/McTooltip/McTooltip.vue +0 -334
- package/src/helpers/consts.js +0 -3
- package/src/helpers/delayedAction.js +0 -26
- package/src/helpers/storybookFunctions.js +0 -20
- package/src/helpers/storybookVariables.js +0 -24
- package/src/mixins/equalFieldHeight.js +0 -59
- package/src/mixins/fieldErrors.js +0 -28
- package/src/patterns/McAccordion/McAccordion.vue +0 -53
- package/src/patterns/McCells/McCell/McCell.vue +0 -101
- package/src/patterns/McChat/McChat.vue +0 -305
- package/src/patterns/McChat/McChatComment/McChatComment.vue +0 -265
- package/src/patterns/McChat/McChatForm/McChatForm.vue +0 -147
- package/src/patterns/McCollapse/McCollapse.vue +0 -280
- package/src/patterns/McDrawer/McDrawer.vue +0 -146
- package/src/patterns/McDropdown/McDropdown.vue +0 -247
- package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.vue +0 -40
- package/src/patterns/McFakeScroll/McFakeScroll.vue +0 -277
- package/src/patterns/McFilter/McFilter.vue +0 -847
- package/src/patterns/McFilter/McFilterChip/McFilterChip.vue +0 -83
- package/src/patterns/McFilter/McFilterTags/McFilterTags.vue +0 -374
- package/src/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue +0 -70
- package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue +0 -132
- package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue +0 -221
- package/src/patterns/McFilter/McFilterTypeSimple/McFilterTypeSimple.vue +0 -161
- package/src/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue +0 -62
- package/src/patterns/McGrid/McGridCol/McGridCol.vue +0 -165
- package/src/patterns/McGrid/McGridRow/McGridRow.vue +0 -158
- package/src/patterns/McModal/McModal.vue +0 -680
- package/src/patterns/McOverlay/McOverlay.vue +0 -78
- package/src/patterns/McPreview/McPreview.vue +0 -118
- package/src/patterns/McSideBar/McSideBar/McSideBar.vue +0 -387
- package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue +0 -125
- package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.vue +0 -252
- package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue +0 -367
- package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.vue +0 -238
- package/src/patterns/McStack/McStack.vue +0 -158
- package/src/patterns/McTable/McTable/McTable.vue +0 -854
- package/src/patterns/McTable/McTableCol/McTableCol.vue +0 -296
- package/src/patterns/McTableCard/McTableCard.vue +0 -135
- package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.vue +0 -74
- package/src/patterns/McTopBar/McTopBar.vue +0 -153
- package/src/patterns/McWrapScroll/McWrapScroll.vue +0 -291
- package/src/styles/_functions.scss +0 -187
- package/src/styles/_mixins.scss +0 -612
- package/src/styles/_spacing.scss +0 -33
- package/src/styles/_variables.scss +0 -23
- package/src/styles/global.scss +0 -308
- package/src/styles/main.scss +0 -4
- package/src/styles/table.scss +0 -10
- package/src/styles/toast.scss +0 -55
- package/src/templates/layouts/McContentFixed/McContentFixed.vue +0 -60
- package/src/templates/layouts/McMain/McMain.vue +0 -115
- package/src/templates/layouts/McRoot/McRoot.vue +0 -45
- package/src/tokens/animations.scss +0 -9
- package/src/tokens/border-radius.scss +0 -26
- package/src/tokens/box-shadows.scss +0 -28
- package/src/tokens/colors.scss +0 -82
- package/src/tokens/durations.scss +0 -7
- package/src/tokens/easings.scss +0 -6
- package/src/tokens/font-families.scss +0 -8
- package/src/tokens/font-sizes.scss +0 -23
- package/src/tokens/font-weights.scss +0 -9
- package/src/tokens/gradients.scss +0 -18
- package/src/tokens/letter-spacings.scss +0 -6
- package/src/tokens/line-heights.scss +0 -22
- package/src/tokens/media-queries.scss +0 -32
- package/src/tokens/opacities.scss +0 -8
- package/src/tokens/sizes.scss +0 -47
- package/src/tokens/spacings.scss +0 -38
- package/src/tokens/z-indexes.scss +0 -14
- package/src/utils/dayjs.js +0 -19
- package/src/utils/filters.js +0 -11
- package/src/utils/getTokens.js +0 -41
- package/src/utils/load-icons.js +0 -3
- package/src/utils/treeSearch.js +0 -30
- package/src/utils/webFontLoader.js +0 -12
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: 'McBadge',
|
|
4
|
-
functional: true,
|
|
5
|
-
props: {
|
|
6
|
-
/**
|
|
7
|
-
* Дизайн:
|
|
8
|
-
* `purple, purple-outline т.д.`
|
|
9
|
-
*/
|
|
10
|
-
variation: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: 'transparent',
|
|
13
|
-
},
|
|
14
|
-
/**
|
|
15
|
-
* Вертикальная черта (в таблице, к примеру)
|
|
16
|
-
*/
|
|
17
|
-
verticalLine: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: false,
|
|
20
|
-
},
|
|
21
|
-
modern: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
render(h, { props, slots, data, listeners }) {
|
|
27
|
-
const variation = `${props.variation}${props.modern ? '-modern' : ''}`
|
|
28
|
-
const classes = {
|
|
29
|
-
'mc-badge': true,
|
|
30
|
-
'mc-badge--vertical-line': props.verticalLine,
|
|
31
|
-
'mc-badge--modern': props.modern,
|
|
32
|
-
...(data.class || {}),
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (data.staticClass) {
|
|
36
|
-
const staticClasses = data.staticClass.split(' ')
|
|
37
|
-
staticClasses.forEach(c => c && (classes[c] = true))
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let style = {}
|
|
41
|
-
const texts = variation.split('-')
|
|
42
|
-
const currentStyle = texts[texts.length - 1]
|
|
43
|
-
const color = props.variation ? variation.replace(`-${currentStyle}`, '') : variation
|
|
44
|
-
const setProperty = ({ property = '--mc-badge-color', value, newColor = color } = {}) =>
|
|
45
|
-
(style[property] = value || `var(--color-${newColor})`)
|
|
46
|
-
switch (currentStyle) {
|
|
47
|
-
case 'outline': {
|
|
48
|
-
setProperty()
|
|
49
|
-
setProperty({ property: '--mc-badge-border-color' })
|
|
50
|
-
setProperty({ property: '--mc-badge-background-color', newColor: 'white' })
|
|
51
|
-
setProperty({ property: '--mc-badge-background-opacity', value: '0.4' })
|
|
52
|
-
break
|
|
53
|
-
}
|
|
54
|
-
case 'invert':
|
|
55
|
-
case 'modern': {
|
|
56
|
-
setProperty()
|
|
57
|
-
setProperty({ property: '--mc-badge-background-color' })
|
|
58
|
-
setProperty({ property: '--mc-badge-background-opacity', value: '0.1' })
|
|
59
|
-
break
|
|
60
|
-
}
|
|
61
|
-
default: {
|
|
62
|
-
const lightColors = ['hover-gray', 'white', 'lighter-blue', 'lighter-purple', 'toxic', 'transparent']
|
|
63
|
-
lightColors.includes(variation) && setProperty({ newColor: 'black' })
|
|
64
|
-
setProperty({ property: '--mc-badge-background-color', newColor: variation })
|
|
65
|
-
break
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (data.staticStyle) {
|
|
69
|
-
style = data.staticStyle
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return h(
|
|
73
|
-
'section',
|
|
74
|
-
{
|
|
75
|
-
class: classes,
|
|
76
|
-
style,
|
|
77
|
-
on: listeners,
|
|
78
|
-
},
|
|
79
|
-
[
|
|
80
|
-
h(
|
|
81
|
-
'div',
|
|
82
|
-
{
|
|
83
|
-
class: 'mc-badge__text',
|
|
84
|
-
},
|
|
85
|
-
slots()['default'],
|
|
86
|
-
),
|
|
87
|
-
h('div', {
|
|
88
|
-
class: 'mc-badge__background',
|
|
89
|
-
}),
|
|
90
|
-
],
|
|
91
|
-
)
|
|
92
|
-
},
|
|
93
|
-
}
|
|
94
|
-
</script>
|
|
95
|
-
|
|
96
|
-
<style lang="scss">
|
|
97
|
-
@import '../../styles/mixins';
|
|
98
|
-
@import '../../tokens/font-families';
|
|
99
|
-
@import '../../tokens/letter-spacings';
|
|
100
|
-
.mc-badge {
|
|
101
|
-
$block-name: &;
|
|
102
|
-
--mc-badge-color: #{$color-white};
|
|
103
|
-
--mc-badge-background-color: inherit;
|
|
104
|
-
--mc-badge-background-opacity: initial;
|
|
105
|
-
--mc-badge-border-color: #{$color-transparent};
|
|
106
|
-
@include ellipsis(100%, inline-flex);
|
|
107
|
-
align-items: center;
|
|
108
|
-
color: var(--mc-badge-color);
|
|
109
|
-
position: relative;
|
|
110
|
-
font-family: $font-family-main;
|
|
111
|
-
font-size: $font-size-100;
|
|
112
|
-
line-height: $line-height-150;
|
|
113
|
-
height: $line-height-200;
|
|
114
|
-
font-weight: $font-weight-medium;
|
|
115
|
-
text-transform: uppercase;
|
|
116
|
-
letter-spacing: $letter-spacing-m;
|
|
117
|
-
vertical-align: middle;
|
|
118
|
-
padding: 2px $space-100;
|
|
119
|
-
border-radius: $radius-50;
|
|
120
|
-
&:before {
|
|
121
|
-
content: '';
|
|
122
|
-
position: absolute;
|
|
123
|
-
left: 0;
|
|
124
|
-
top: 0;
|
|
125
|
-
@include size(100%);
|
|
126
|
-
background-color: var(--mc-badge-background-color);
|
|
127
|
-
opacity: var(--mc-badge-background-opacity);
|
|
128
|
-
border: 1px solid var(--mc-badge-border-color);
|
|
129
|
-
border-radius: inherit;
|
|
130
|
-
}
|
|
131
|
-
&__text {
|
|
132
|
-
z-index: 1;
|
|
133
|
-
}
|
|
134
|
-
&--modern {
|
|
135
|
-
border-radius: $radius-50;
|
|
136
|
-
}
|
|
137
|
-
&--vertical-line {
|
|
138
|
-
padding: 0;
|
|
139
|
-
border-radius: 0;
|
|
140
|
-
width: 5px;
|
|
141
|
-
#{$block-name} {
|
|
142
|
-
&__text {
|
|
143
|
-
display: none;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
</style>
|