mediacube-ui 0.1.346 → 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.
Files changed (108) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/0.mediacube-ui.umd.js +50 -0
  3. package/dist/assets/img/icons.3b7d59b2f49c67a2a3a4566b8ab233fd.svg +1 -0
  4. package/dist/assets/img/no_table_data.236cd56f46cfb71fc363b008d4ca70d5.png +0 -0
  5. package/dist/assets/img/no_user.e0030d6e54e2400e1181fd22b83cf8ae.png +0 -0
  6. package/dist/mediacube-ui.umd.js +1 -0
  7. package/package.json +14 -16
  8. package/src/assets/tokens/tokens.json +5 -0
  9. package/dist/mediacube-ui.common.js +0 -378
  10. package/src/elements/McAvatar/McAvatar.vue +0 -274
  11. package/src/elements/McBadge/McBadge.vue +0 -148
  12. package/src/elements/McButton/McButton.vue +0 -841
  13. package/src/elements/McChip/McChip.vue +0 -300
  14. package/src/elements/McCropper/McCropper.vue +0 -133
  15. package/src/elements/McDate/McDate.vue +0 -105
  16. package/src/elements/McDatePicker/McDatePicker.vue +0 -902
  17. package/src/elements/McField/McFieldCheckbox/McFieldCheckbox.vue +0 -332
  18. package/src/elements/McField/McFieldRadio/McFieldRadioButton/McFieldRadioButton.vue +0 -201
  19. package/src/elements/McField/McFieldRadio/McFieldRadioGroup/McFieldRadioGroup.vue +0 -194
  20. package/src/elements/McField/McFieldSelect/McFieldSelect.vue +0 -1087
  21. package/src/elements/McField/McFieldText/McFieldText.vue +0 -969
  22. package/src/elements/McField/McFieldToggle/McFieldToggle.vue +0 -268
  23. package/src/elements/McInfinityLoadingIndicator/McInfinityLoadingIndicator.vue +0 -97
  24. package/src/elements/McNotification/McNotification.vue +0 -209
  25. package/src/elements/McProgress/McProgress.vue +0 -218
  26. package/src/elements/McRangeSlider/McRangeSlider.vue +0 -195
  27. package/src/elements/McSeparator/McSeparator.vue +0 -143
  28. package/src/elements/McSlideUpDown/McSlideUpDown.vue +0 -157
  29. package/src/elements/McSvgIcon/McSvgIcon.vue +0 -127
  30. package/src/elements/McTabs/McTab/McTab.vue +0 -187
  31. package/src/elements/McTabs/McTabs/McTabs.vue +0 -531
  32. package/src/elements/McTitle/McTitle.vue +0 -365
  33. package/src/elements/McTooltip/McTooltip.vue +0 -334
  34. package/src/helpers/consts.js +0 -3
  35. package/src/helpers/delayedAction.js +0 -26
  36. package/src/helpers/storybookFunctions.js +0 -20
  37. package/src/helpers/storybookVariables.js +0 -24
  38. package/src/mixins/equalFieldHeight.js +0 -59
  39. package/src/mixins/fieldErrors.js +0 -28
  40. package/src/patterns/McAccordion/McAccordion.vue +0 -53
  41. package/src/patterns/McCells/McCell/McCell.vue +0 -101
  42. package/src/patterns/McChat/McChat.vue +0 -305
  43. package/src/patterns/McChat/McChatComment/McChatComment.vue +0 -265
  44. package/src/patterns/McChat/McChatForm/McChatForm.vue +0 -147
  45. package/src/patterns/McCollapse/McCollapse.vue +0 -280
  46. package/src/patterns/McDrawer/McDrawer.vue +0 -146
  47. package/src/patterns/McDropdown/McDropdown.vue +0 -247
  48. package/src/patterns/McDropdown/McDropdownPanel/McDropdownPanel.vue +0 -40
  49. package/src/patterns/McFakeScroll/McFakeScroll.vue +0 -277
  50. package/src/patterns/McFilter/McFilter.vue +0 -847
  51. package/src/patterns/McFilter/McFilterChip/McFilterChip.vue +0 -83
  52. package/src/patterns/McFilter/McFilterTags/McFilterTags.vue +0 -374
  53. package/src/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue +0 -70
  54. package/src/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue +0 -132
  55. package/src/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue +0 -221
  56. package/src/patterns/McFilter/McFilterTypeSimple/McFilterTypeSimple.vue +0 -161
  57. package/src/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue +0 -62
  58. package/src/patterns/McGrid/McGridCol/McGridCol.vue +0 -165
  59. package/src/patterns/McGrid/McGridRow/McGridRow.vue +0 -158
  60. package/src/patterns/McModal/McModal.vue +0 -680
  61. package/src/patterns/McOverlay/McOverlay.vue +0 -78
  62. package/src/patterns/McPreview/McPreview.vue +0 -118
  63. package/src/patterns/McSideBar/McSideBar/McSideBar.vue +0 -387
  64. package/src/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue +0 -125
  65. package/src/patterns/McSideBar/McSideBarButton/McSideBarButton.vue +0 -252
  66. package/src/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue +0 -367
  67. package/src/patterns/McSideBar/McSideBarTop/McSideBarTop.vue +0 -238
  68. package/src/patterns/McStack/McStack.vue +0 -158
  69. package/src/patterns/McTable/McTable/McTable.vue +0 -854
  70. package/src/patterns/McTable/McTableCol/McTableCol.vue +0 -296
  71. package/src/patterns/McTableCard/McTableCard.vue +0 -135
  72. package/src/patterns/McTableCard/McTableCardHeader/McTableCardHeader.vue +0 -74
  73. package/src/patterns/McTopBar/McTopBar.vue +0 -153
  74. package/src/patterns/McWrapScroll/McWrapScroll.vue +0 -291
  75. package/src/styles/_functions.scss +0 -187
  76. package/src/styles/_mixins.scss +0 -612
  77. package/src/styles/_spacing.scss +0 -33
  78. package/src/styles/_variables.scss +0 -23
  79. package/src/styles/global.scss +0 -308
  80. package/src/styles/main.scss +0 -4
  81. package/src/styles/table.scss +0 -10
  82. package/src/styles/toast.scss +0 -55
  83. package/src/templates/layouts/McContentFixed/McContentFixed.vue +0 -60
  84. package/src/templates/layouts/McMain/McMain.vue +0 -115
  85. package/src/templates/layouts/McRoot/McRoot.vue +0 -45
  86. package/src/tokens/animations.scss +0 -9
  87. package/src/tokens/border-radius.scss +0 -26
  88. package/src/tokens/box-shadows.scss +0 -28
  89. package/src/tokens/colors.scss +0 -82
  90. package/src/tokens/durations.scss +0 -7
  91. package/src/tokens/easings.scss +0 -6
  92. package/src/tokens/font-families.scss +0 -8
  93. package/src/tokens/font-sizes.scss +0 -23
  94. package/src/tokens/font-weights.scss +0 -9
  95. package/src/tokens/gradients.scss +0 -19
  96. package/src/tokens/letter-spacings.scss +0 -6
  97. package/src/tokens/line-heights.scss +0 -22
  98. package/src/tokens/media-queries.scss +0 -32
  99. package/src/tokens/opacities.scss +0 -8
  100. package/src/tokens/sizes.scss +0 -47
  101. package/src/tokens/spacings.scss +0 -38
  102. package/src/tokens/z-indexes.scss +0 -14
  103. package/src/utils/dayjs.js +0 -19
  104. package/src/utils/filters.js +0 -11
  105. package/src/utils/getTokens.js +0 -41
  106. package/src/utils/load-icons.js +0 -3
  107. package/src/utils/treeSearch.js +0 -30
  108. package/src/utils/webFontLoader.js +0 -12
@@ -1,841 +0,0 @@
1
- <template>
2
- <component
3
- :is="tag"
4
- ref="mc-button"
5
- v-tooltip="tooltipOptions"
6
- v-bind="tagBind"
7
- class="mc-button"
8
- :class="classes"
9
- :exact="exact"
10
- :style="styles"
11
- v-on="$listeners"
12
- @mouseover="animateUp"
13
- @mouseleave="animateDown"
14
- @blur="handleBlur"
15
- >
16
- <span v-if="$slots['icon-prepend']" class="mc-button__prepend">
17
- <!-- @slot Слот для вставки в начало -->
18
- <slot class="mc-button__prepend" name="icon-prepend" />
19
- </span>
20
- <span v-if="loading" class="mc-button__loader">
21
- <mc-svg-icon class="mc-button__loader-icon" type="div" name="loader" />
22
- </span>
23
- <span v-if="$slots.default" class="mc-button__text">
24
- <!-- @slot Слот по умолчанию -->
25
- <slot />
26
- </span>
27
- <span v-if="$slots['icon-append']" class="mc-button__append">
28
- <!-- @slot Слот для вставки в конец -->
29
- <slot name="icon-append" />
30
- </span>
31
- <div v-if="!isVariationLink" class="mc-button__background" />
32
- </component>
33
- </template>
34
-
35
- <script>
36
- import McSvgIcon from '../McSvgIcon/McSvgIcon'
37
- import { VTooltip } from 'v-tooltip'
38
-
39
- VTooltip.options.defaultBoundariesElement = 'window'
40
- export default {
41
- name: 'McButton',
42
- components: {
43
- McSvgIcon,
44
- },
45
- directives: {
46
- tooltip: VTooltip,
47
- },
48
- props: {
49
- /**
50
- * Если нужна ссылка внутри приложения:
51
- * `{name: 'test', params: { id: test.id }}`
52
- */
53
- to: {
54
- default: null,
55
- },
56
- /**
57
- * Если нужна обычная ссылка:
58
- * `https://mediacube.agency/`
59
- */
60
- href: {
61
- default: null,
62
- },
63
- /**
64
- * По умолчанию ожидается использование в `nuxt.js`
65
- *
66
- */
67
- nuxt: {
68
- type: Boolean,
69
- default: true,
70
- },
71
- /**
72
- * Отключенное состояние
73
- *
74
- */
75
- disabled: {
76
- type: Boolean,
77
- default: false,
78
- },
79
- /**
80
- * Дизэйблить не меняя внешнего вида
81
- *
82
- */
83
- inactive: {
84
- type: Boolean,
85
- default: false,
86
- },
87
- /**
88
- * Индикация загрузки
89
- *
90
- */
91
- loading: {
92
- type: Boolean,
93
- default: false,
94
- },
95
- /**
96
- * Индикация загрузки
97
- * вращением иконки
98
- */
99
- iconLoading: {
100
- type: Boolean,
101
- default: false,
102
- },
103
- /**
104
- * Типы:
105
- * `button, submit, reset`
106
- */
107
- type: {
108
- type: String,
109
- default: null,
110
- },
111
- /**
112
- * Дизайн:
113
- * `purple, red, purple-outline, purple-invert, purple-flat и т.д.`
114
- */
115
- variation: {
116
- type: String,
117
- default: 'purple',
118
- },
119
- /**
120
- * Размеры:
121
- * `xs, xs-compact, s, s-compact, m, m-compact, l, l-compact`
122
- */
123
- size: {
124
- type: String,
125
- default: 'm',
126
- },
127
- /**
128
- * Тень
129
- *
130
- */
131
- shadow: {
132
- type: Boolean,
133
- default: false,
134
- },
135
- /**
136
- * Круглая
137
- *
138
- */
139
- rounded: {
140
- type: Boolean,
141
- default: false,
142
- },
143
- /**
144
- * Закругленная
145
- *
146
- */
147
- semiRounded: {
148
- type: Boolean,
149
- default: false,
150
- },
151
- /**
152
- * Позиция текста внутри кнопки:
153
- * `left, center, right`
154
- */
155
- textAlign: {
156
- type: String,
157
- default: 'center',
158
- },
159
- /**
160
- * На всю ширину
161
- *
162
- */
163
- fullWidth: {
164
- type: Boolean,
165
- default: false,
166
- },
167
- /**
168
- * Если нужно активное состояние
169
- *
170
- */
171
- isActive: {
172
- type: Boolean,
173
- default: false,
174
- },
175
- /**
176
- * exact
177
- *
178
- */
179
- exact: {
180
- type: Boolean,
181
- default: false,
182
- },
183
- /**
184
- * Заглавные буквы
185
- */
186
- uppercase: {
187
- type: Boolean,
188
- default: false,
189
- },
190
- /**
191
- * Тег по умолчанию
192
- */
193
- defaultTag: {
194
- type: String,
195
- default: 'button',
196
- },
197
- /**
198
- * Если нужен другой цвет при взаимодействии
199
- */
200
- secondaryColor: {
201
- type: String,
202
- default: '',
203
- },
204
- /**
205
- * Если нужна подчёркнутая ссылка
206
- */
207
- underlineLink: {
208
- type: Boolean,
209
- default: false,
210
- },
211
- /**
212
- * Если нужен постоянный
213
- * фон у типа 'flat'
214
- */
215
- bgFlat: {
216
- type: Boolean,
217
- default: false,
218
- },
219
- /**
220
- * Жирность шрифта:
221
- * `normal, medium, semi-bold`
222
- */
223
- weight: {
224
- type: String,
225
- default: 'semi-bold',
226
- },
227
- /**
228
- * Нужна ли кастомная анимация для кнопки
229
- */
230
- animation: {
231
- type: Boolean,
232
- default: false,
233
- },
234
- /**
235
- * Настройка кастомной анимации - смена бг // текста при наведении
236
- */
237
- customAnimation: {
238
- type: Object,
239
- default: () => ({
240
- background: null,
241
- text: null,
242
- }),
243
- },
244
- /**
245
- * Тултип при наличии
246
- */
247
- tooltip: {
248
- type: String,
249
- default: null,
250
- },
251
-
252
- /**
253
- * Атрибут tabindex для главного элемента
254
- *
255
- */
256
- tabindex: {
257
- type: [String, Number],
258
- },
259
- },
260
- data: () => ({
261
- custom_background: null,
262
- }),
263
- computed: {
264
- classes() {
265
- return {
266
- [`mc-button--variation-${this.variation}`]: this.variation,
267
- [`mc-button--size-${this.size}`]: this.size,
268
- [`mc-button--text-align-${this.textAlign}`]: this.textAlign,
269
- 'mc-button--loading': this.loading,
270
- 'mc-button--icon-loading': this.iconLoading,
271
- 'mc-button--is-active': this.isActive,
272
- 'mc-button--disabled': this.disabled,
273
- 'mc-button--rounded': this.rounded && /-compact$/.test(this.size),
274
- 'mc-button--semi-rounded': this.semiRounded,
275
- 'mc-button--full-width': this.fullWidth,
276
- 'mc-button--uppercase': this.uppercase,
277
- 'mc-button--shadow': this.shadow,
278
- 'mc-button--secondary-color': !!this.secondaryColor,
279
- 'mc-button--underline-link': this.underlineLink,
280
- 'mc-button--bg-flat': this.bgFlat,
281
- [`mc-button--type-${this.buttonVariation.type}`]: this.buttonVariation.type,
282
- 'mc-button--inactive': this.inactive,
283
- }
284
- },
285
- buttonVariation() {
286
- const variation = this.custom_background || this.variation
287
- const texts = variation.split('-')
288
- const currentStyle = texts[texts.length - 1]
289
- let color = variation.replace(`-${currentStyle}`, '')
290
- switch (currentStyle) {
291
- case 'link':
292
- case 'flat':
293
- case 'outline':
294
- case 'invert': {
295
- break
296
- }
297
- default: {
298
- color = variation
299
- break
300
- }
301
- }
302
- return {
303
- color,
304
- type: currentStyle,
305
- }
306
- },
307
- styles() {
308
- let hoverBrightness
309
- let textColor
310
- switch (this.buttonVariation.type) {
311
- case 'link':
312
- case 'flat':
313
- case 'outline':
314
- case 'invert': {
315
- break
316
- }
317
- default: {
318
- switch (this.buttonVariation.color) {
319
- case 'yellow':
320
- case 'white': {
321
- hoverBrightness = '0.9'
322
- break
323
- }
324
- case 'toxic': {
325
- break
326
- }
327
- default: {
328
- textColor = 'white'
329
- }
330
- }
331
- break
332
- }
333
- }
334
-
335
- return {
336
- '--mc-button-secondary-color': this.secondaryColor && `var(--color-${this.secondaryColor})`,
337
- '--mc-button-background-color': this.variation && `var(--color-${this.buttonVariation.color})`,
338
- '--mc-button-font-weight': this.weight && `var(--font-weight-${this.weight})`,
339
- '--mc-button-hover-brightness': hoverBrightness,
340
- '--mc-button-text-color': textColor && `var(--color-${textColor})`,
341
- }
342
- },
343
- tag() {
344
- if (this.to && this.$router) {
345
- return this.nuxt ? 'nuxt-link' : 'router-link'
346
- } else if (this.href) {
347
- return 'a'
348
- }
349
- return this.defaultTag
350
- },
351
- isVariationLink() {
352
- return this.buttonVariation.type === 'link'
353
- },
354
- tagBind() {
355
- const result = {}
356
- if (this.to) {
357
- result.to = this.to
358
- } else if (this.href) {
359
- result.href = this.href
360
- } else if (this.disabled || this.loading) {
361
- result.disabled = true
362
- }
363
-
364
- if (this.isVariationLink) result.rel = 'noreferrer'
365
- result.type = this.type
366
- result.tabindex = this.tabindex
367
-
368
- return result
369
- },
370
- tooltipOptions() {
371
- return this.tooltip
372
- ? {
373
- content: this.tooltip,
374
- placement: 'top',
375
- classes: 'mc-tooltip mc-tooltip--width-m mc-tooltip--size-s',
376
- trigger: 'hover focus',
377
- show: false,
378
- container: 'body',
379
- template: `<div class="tooltip" role="tooltip"> <div class="tooltip-arrow"></div> <div class="tooltip-inner"><div class="tooltip-inner__content"></div></div> </div>`,
380
- innerSelector: '.tooltip-inner__content',
381
- }
382
- : null
383
- },
384
- },
385
- watch: {
386
- animation() {
387
- this.setDefault()
388
- },
389
- },
390
- methods: {
391
- animateUp() {
392
- if (this.animation) {
393
- this.customAnimation?.text &&
394
- (this.$refs['mc-button'].querySelector('.mc-button__text').innerHTML = this.customAnimation?.text)
395
- this.custom_background = this.customAnimation?.background
396
- }
397
- },
398
- animateDown() {
399
- if (this.$refs['mc-button'] && this.animation) {
400
- this.setDefault()
401
- }
402
- },
403
- setDefault() {
404
- const defaultSlotText = this.$slots.default && this.$slots.default.find(s => s.text && s.text.trim().length)
405
- this.$refs['mc-button'].querySelector('.mc-button__text').innerHTML = defaultSlotText
406
- ? defaultSlotText.text
407
- : ''
408
- this.custom_background = null
409
- },
410
- handleBlur(e) {
411
- this.$refs['mc-button'].blur()
412
- this.$emit('blur', e)
413
- },
414
- },
415
- }
416
- </script>
417
-
418
- <style lang="scss">
419
- @import '../../styles/mixins';
420
- @import '../../tokens/durations';
421
- @import '../../tokens/opacities';
422
- @import '../../tokens/font-families';
423
- @import '../../tokens/letter-spacings';
424
- @import '../../tokens/animations';
425
- .mc-button {
426
- $block-name: &;
427
- @include reset();
428
- --mc-button-background-color: #{$color-transparent};
429
- --mc-button-font-weight: #{$font-weight-normal};
430
- --mc-button-text-color: #{$color-black};
431
- --mc-button-hover-brightness: 0.9;
432
- --mc-button-secondary-color: initial;
433
- position: relative;
434
- display: inline-flex;
435
- justify-content: center;
436
- align-items: center;
437
- border: none;
438
- flex-wrap: nowrap;
439
- max-width: 100%;
440
- font-family: $font-family-main;
441
- border-radius: $radius-100;
442
- white-space: nowrap;
443
- user-select: none;
444
- text-decoration: none;
445
- text-transform: none;
446
- background: none;
447
- cursor: pointer;
448
- outline: 0;
449
- transition: all $duration-s;
450
- font-weight: var(--mc-button-font-weight);
451
- color: var(--mc-button-text-color);
452
- -webkit-appearance: none;
453
- -webkit-text-fill-color: currentColor;
454
- z-index: 0;
455
-
456
- &__loader {
457
- display: none;
458
- @include align(true, true, absolute);
459
- z-index: 1;
460
- &-icon {
461
- animation: $animation-spinner;
462
- }
463
- }
464
- &__prepend,
465
- &__append {
466
- display: inline-flex;
467
- align-items: center;
468
- z-index: 1;
469
- }
470
-
471
- &__text {
472
- @include ellipsis($display: inline-block);
473
- @include layout-flex-fix();
474
- z-index: 1;
475
- &:empty {
476
- display: none;
477
- }
478
- }
479
- @mixin hoverMixin {
480
- @media #{$media-desktop} {
481
- &:hover {
482
- #{$block-name}__background {
483
- @content;
484
- }
485
- }
486
- }
487
-
488
- &:active {
489
- #{$block-name}__background {
490
- @content;
491
- }
492
- }
493
- }
494
- @include hoverMixin {
495
- filter: brightness(var(--mc-button-hover-brightness));
496
- }
497
-
498
- &--size {
499
- &-xxs {
500
- height: $size-300;
501
- padding: 0 $space-100;
502
- letter-spacing: normal;
503
- font-size: $font-size-200;
504
- line-height: $line-height-200;
505
-
506
- &-compact {
507
- @include size($size-300);
508
- padding: $space-50;
509
- .mc-svg-icon {
510
- @include size($size-200);
511
- }
512
- }
513
- .mc-svg-icon {
514
- @include size($size-200);
515
- }
516
-
517
- #{$block-name} {
518
- &__prepend {
519
- margin-inline-end: $space-50;
520
- }
521
- &__append {
522
- margin-inline-start: $space-50;
523
- }
524
- }
525
- }
526
- &-xs {
527
- height: $size-400;
528
- padding: 0 $space-150;
529
- letter-spacing: normal;
530
- font-size: $font-size-200;
531
- line-height: $line-height-200;
532
-
533
- &-compact {
534
- @include size($size-400);
535
- padding: 6px;
536
- .mc-svg-icon {
537
- @include size($size-250);
538
- }
539
- }
540
- .mc-svg-icon {
541
- @include size($size-250);
542
- }
543
-
544
- #{$block-name} {
545
- &__prepend {
546
- margin-inline-end: $space-50;
547
- }
548
- &__append {
549
- margin-inline-start: $space-50;
550
- }
551
- }
552
- }
553
- &-s {
554
- height: $size-500;
555
- padding: 0 $space-200;
556
- letter-spacing: normal;
557
- font-size: $font-size-200;
558
- line-height: $line-height-200;
559
-
560
- &-compact {
561
- @include size($size-500);
562
- padding: $space-150;
563
- .mc-svg-icon {
564
- @include size($size-250);
565
- }
566
- }
567
- .mc-svg-icon {
568
- @include size($size-250);
569
- }
570
-
571
- #{$block-name} {
572
- &__prepend {
573
- margin-inline-end: $space-50;
574
- }
575
- &__append {
576
- margin-inline-start: $space-50;
577
- }
578
- }
579
- }
580
- &-m {
581
- height: $size-500;
582
- padding: 0 $space-200;
583
- font-size: $font-size-200;
584
- line-height: $line-height-200;
585
-
586
- &-compact {
587
- @include size($size-500);
588
- padding: $space-100;
589
- .mc-svg-icon {
590
- @include size($size-300);
591
- }
592
- }
593
- .mc-svg-icon {
594
- @include size($size-300);
595
- }
596
-
597
- #{$block-name} {
598
- &__prepend {
599
- margin-inline-end: $space-50;
600
- }
601
- &__append {
602
- margin-inline-start: $space-50;
603
- }
604
- }
605
- }
606
- &-l {
607
- height: $size-600;
608
- padding: $space-150 $space-300;
609
- font-size: $font-size-200;
610
- line-height: $line-height-200;
611
-
612
- &-compact {
613
- @include size($size-600);
614
- padding: $space-150;
615
- .mc-svg-icon {
616
- @include size($size-300);
617
- }
618
- }
619
- .mc-svg-icon {
620
- @include size($size-300);
621
- }
622
-
623
- #{$block-name} {
624
- &__prepend {
625
- margin-inline-end: $space-100;
626
- }
627
- &__append {
628
- margin-inline-start: $space-100;
629
- }
630
- }
631
- }
632
-
633
- &-s,
634
- &-m,
635
- &-l {
636
- &-compact {
637
- #{$block-name} {
638
- &__prepend,
639
- &__append {
640
- margin: 0 !important;
641
- }
642
- }
643
- }
644
- }
645
- }
646
-
647
- &__background {
648
- position: absolute;
649
- top: 0;
650
- left: 0;
651
- @include size(100%);
652
- opacity: 1 !important;
653
- border: 1px solid $color-transparent;
654
- border-radius: inherit;
655
- background-color: var(--mc-button-background-color);
656
- transition: all $duration-s;
657
- }
658
- &--type {
659
- &-outline {
660
- color: var(--mc-button-background-color);
661
- #{$block-name}__background {
662
- opacity: 0.6 !important;
663
- background-color: $color-transparent;
664
- border-color: var(--mc-button-background-color);
665
- }
666
- @media #{$media-desktop} {
667
- &:hover {
668
- #{$block-name}__background {
669
- background-color: var(--mc-button-background-color);
670
- opacity: 0.2 !important;
671
- }
672
- }
673
- &:active {
674
- #{$block-name}__background {
675
- background-color: var(--mc-button-background-color);
676
- border: none;
677
- }
678
- }
679
- }
680
- }
681
- &-invert {
682
- color: var(--mc-button-background-color);
683
- #{$block-name} {
684
- &__background {
685
- opacity: 0.1 !important;
686
- }
687
- }
688
- @include hoverMixin {
689
- opacity: 0.2 !important;
690
- }
691
- }
692
- &-flat {
693
- color: var(--mc-button-background-color);
694
- #{$block-name}__background {
695
- opacity: 0 !important;
696
- }
697
- @include hoverMixin {
698
- opacity: 0.1 !important;
699
- }
700
- }
701
- &-link {
702
- color: var(--mc-button-background-color);
703
- padding: 0;
704
- @include size(auto);
705
- border: none;
706
- user-select: text;
707
- &#{$block-name}--size-l {
708
- line-height: $line-height-250;
709
- }
710
- &#{$block-name} {
711
- &--disabled {
712
- opacity: $opacity-disabled;
713
- background-color: transparent !important;
714
- color: var(--mc-button-background-color) !important;
715
- border-color: transparent !important;
716
- }
717
- }
718
- @media #{$media-desktop} {
719
- &:hover {
720
- filter: brightness(0.85);
721
- }
722
- }
723
-
724
- &:active {
725
- filter: brightness(0.85);
726
- }
727
- #{$block-name} {
728
- &__background {
729
- display: none;
730
- }
731
- }
732
- }
733
- }
734
- &--bg-flat {
735
- #{$block-name} {
736
- &__background {
737
- opacity: 0.1 !important;
738
- }
739
- }
740
- }
741
- &--shadow {
742
- box-shadow: 0 3px 10px var(--mc-button-background-color);
743
- }
744
- &--underline-link {
745
- #{$block-name}__text {
746
- text-decoration: underline !important;
747
- }
748
- }
749
-
750
- &--secondary-color {
751
- @media #{$media-desktop} {
752
- &:hover {
753
- color: var(--mc-button-secondary-color);
754
- }
755
- }
756
- &:active {
757
- color: var(--mc-button-secondary-color);
758
- }
759
- }
760
-
761
- &--uppercase {
762
- text-transform: uppercase;
763
- letter-spacing: $letter-spacing-m;
764
- }
765
-
766
- &--is-active,
767
- &.nuxt-link-active {
768
- color: $color-purple;
769
- background-color: transparent;
770
- border-color: transparent;
771
- pointer-events: none;
772
- }
773
-
774
- &--rounded {
775
- border-radius: $radius-circle;
776
- }
777
-
778
- &--semi-rounded {
779
- border-radius: 50px;
780
- }
781
-
782
- &--full-width {
783
- width: 100%;
784
- }
785
-
786
- &--text-align {
787
- &-left {
788
- justify-content: flex-start;
789
- }
790
- &-center {
791
- justify-content: center;
792
- }
793
- &-right {
794
- justify-content: flex-end;
795
- }
796
- }
797
-
798
- &--loading,
799
- &--icon-loading,
800
- &--disabled {
801
- pointer-events: none;
802
- }
803
-
804
- &--loading {
805
- #{$block-name} {
806
- &__loader {
807
- display: inline-block;
808
- }
809
- }
810
-
811
- > *:not(#{$block-name}__loader) {
812
- opacity: 0;
813
- }
814
- }
815
- &--icon-loading {
816
- #{$block-name} {
817
- &__append,
818
- &__prepend {
819
- .mc-svg-icon {
820
- animation: $animation-spinner;
821
- }
822
- }
823
- }
824
- }
825
-
826
- &--disabled {
827
- color: $color-outline-gray;
828
- cursor: not-allowed;
829
- #{$block-name} {
830
- &__background {
831
- background-color: $color-hover-gray;
832
- border-color: $color-hover-gray;
833
- }
834
- }
835
- }
836
-
837
- &--inactive {
838
- pointer-events: none;
839
- }
840
- }
841
- </style>