itube-specs 0.0.854 → 0.0.855
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.
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'vars' as *;
|
|
3
|
+
|
|
4
|
+
// Бандлы вариантов кнопки: каждый вариант даёт полный набор цветов, чтобы
|
|
5
|
+
// место могло переключиться на любой из них целиком, а не по одному цвету.
|
|
6
|
+
$button-variants: (
|
|
7
|
+
primary: (
|
|
8
|
+
'bg': $button-primary-bg,
|
|
9
|
+
'bg--hover': $button-primary-bg--hover,
|
|
10
|
+
'bg--active': $button-primary-bg,
|
|
11
|
+
'text': $button-primary-text,
|
|
12
|
+
'text--active': $button-primary-text,
|
|
13
|
+
'border': $button-primary-border,
|
|
14
|
+
'border--hover': $button-primary-border,
|
|
15
|
+
'border--active': $button-primary-border,
|
|
16
|
+
'icon': $button-primary-text,
|
|
17
|
+
),
|
|
18
|
+
secondary: (
|
|
19
|
+
'bg': $button-secondary-bg,
|
|
20
|
+
'bg--hover': $button-secondary-bg--hover,
|
|
21
|
+
'bg--active': $button-secondary-bg--active,
|
|
22
|
+
'text': $button-secondary-text,
|
|
23
|
+
'text--active': $button-secondary-text--active,
|
|
24
|
+
'border': $button-secondary-border,
|
|
25
|
+
'border--hover': $button-secondary-border,
|
|
26
|
+
'border--active': $button-secondary-border--active,
|
|
27
|
+
'icon': $button-secondary-icon,
|
|
28
|
+
),
|
|
29
|
+
muted: (
|
|
30
|
+
'bg': $button-muted-bg,
|
|
31
|
+
'bg--hover': $button-muted-bg--hover,
|
|
32
|
+
'bg--active': $button-muted-bg,
|
|
33
|
+
'text': $button-muted-text,
|
|
34
|
+
'text--active': $button-muted-text,
|
|
35
|
+
'border': $button-muted-border,
|
|
36
|
+
'border--hover': $button-muted-border--hover,
|
|
37
|
+
'border--active': $button-muted-border,
|
|
38
|
+
'icon': $button-muted-text,
|
|
39
|
+
),
|
|
40
|
+
warning: (
|
|
41
|
+
'bg': $button-warning-bg,
|
|
42
|
+
'bg--hover': $button-warning-bg--hover,
|
|
43
|
+
'bg--active': $button-warning-bg,
|
|
44
|
+
'text': $button-warning-text,
|
|
45
|
+
'text--active': $button-warning-text,
|
|
46
|
+
'border': $button-warning-border,
|
|
47
|
+
'border--hover': $button-warning-border,
|
|
48
|
+
'border--active': $button-warning-border,
|
|
49
|
+
'icon': $button-warning-text,
|
|
50
|
+
),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
// Вид кнопки в конкретном месте выбирает ТЕМА, а не компонент: место говорит
|
|
54
|
+
// «спроси у темы по этому ключу», тема отвечает именем варианта.
|
|
55
|
+
//
|
|
56
|
+
// // в компоненте
|
|
57
|
+
// .auth-login__cancel { @include button-variant(auth-login-cancel); }
|
|
58
|
+
//
|
|
59
|
+
// // в теме
|
|
60
|
+
// $button-variant-overrides: (auth-login-cancel: muted);
|
|
61
|
+
//
|
|
62
|
+
// Ключа в карте темы нет — не печатается ничего, работает вариант из пропа
|
|
63
|
+
// theme= на вызове. Так тема, которой тут нечего менять, не пишет ни строки.
|
|
64
|
+
@mixin button-variant($key) {
|
|
65
|
+
$name: map.get($button-variant-overrides, $key);
|
|
66
|
+
|
|
67
|
+
@if $name {
|
|
68
|
+
$variant: map.get($button-variants, $name);
|
|
69
|
+
|
|
70
|
+
@if not $variant {
|
|
71
|
+
@error 'button-variant(): неизвестный вариант `#{$name}` для ключа `#{$key}`. Допустимые: #{map.keys($button-variants)}';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@each $prop, $value in $variant {
|
|
75
|
+
--button-#{$prop}: #{$value};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
<UiBtn
|
|
27
27
|
:disabled="!isFiltered"
|
|
28
28
|
theme="secondary"
|
|
29
|
+
class="filter-main__reset"
|
|
29
30
|
wide
|
|
30
31
|
size="l"
|
|
31
32
|
@click="reset"
|
|
@@ -306,4 +307,8 @@ function reset() {
|
|
|
306
307
|
grid-template-columns: repeat(2, 1fr);
|
|
307
308
|
column-gap: 8px;
|
|
308
309
|
}
|
|
310
|
+
|
|
311
|
+
.filter-main__reset {
|
|
312
|
+
@include button-variant(filter-reset)
|
|
313
|
+
}
|
|
309
314
|
</style>
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
wide
|
|
37
37
|
:disabled="!isPendingFiltered"
|
|
38
38
|
size="l"
|
|
39
|
+
class="filter-model__reset"
|
|
39
40
|
theme="secondary"
|
|
40
41
|
@click="onResetClick"
|
|
41
42
|
>{{ t('reset_all') }}
|
|
@@ -241,4 +242,8 @@ function onApplyClick() {
|
|
|
241
242
|
.filter-model__units {
|
|
242
243
|
margin-left: 8px;
|
|
243
244
|
}
|
|
245
|
+
|
|
246
|
+
.filter-model__reset {
|
|
247
|
+
@include button-variant(filter-reset);
|
|
248
|
+
}
|
|
244
249
|
</style>
|
package/components/ui/btn.vue
CHANGED
|
@@ -64,13 +64,13 @@ const slotText = computed(() => {
|
|
|
64
64
|
padding-inline: 12px;
|
|
65
65
|
width: max-content;
|
|
66
66
|
font-weight: 500;
|
|
67
|
-
color: $button-primary-text;
|
|
67
|
+
color: var(--button-text, #{$button-primary-text});
|
|
68
68
|
border-radius: $radius-lg;
|
|
69
69
|
text-decoration: none;
|
|
70
70
|
user-select: none;
|
|
71
71
|
white-space: nowrap;
|
|
72
72
|
text-transform: capitalize;
|
|
73
|
-
border: 1px solid $button-primary-border;
|
|
73
|
+
border: 1px solid var(--button-border, #{$button-primary-border});
|
|
74
74
|
|
|
75
75
|
@include from-br(sm) {
|
|
76
76
|
padding-inline: 16px;
|
|
@@ -101,35 +101,35 @@ const slotText = computed(() => {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.ui-btn.--primary {
|
|
104
|
-
background-color: $button-primary-bg;
|
|
104
|
+
background-color: var(--button-bg, #{$button-primary-bg});
|
|
105
105
|
|
|
106
106
|
@include hover(background-color) {
|
|
107
107
|
&:not([disabled], .--disabled) {
|
|
108
|
-
background-color: $button-primary-bg--hover;
|
|
108
|
+
background-color: var(--button-bg--hover, #{$button-primary-bg--hover});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.ui-btn.--secondary {
|
|
114
|
-
background-color: $button-secondary-bg;
|
|
115
|
-
color: $button-secondary-text;
|
|
116
|
-
border-color: $button-secondary-border;
|
|
114
|
+
background-color: var(--button-bg, #{$button-secondary-bg});
|
|
115
|
+
color: var(--button-text, #{$button-secondary-text});
|
|
116
|
+
border-color: var(--button-border, #{$button-secondary-border});
|
|
117
117
|
|
|
118
118
|
@include hover(background-color) {
|
|
119
119
|
&:not(.--active, [disabled], .--disabled) {
|
|
120
|
-
background-color: $button-secondary-bg--hover;
|
|
120
|
+
background-color: var(--button-bg--hover, #{$button-secondary-bg--hover});
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.ui-btn.--secondary > .ui-icon:first-child {
|
|
126
|
-
color: $button-secondary-icon;
|
|
126
|
+
color: var(--button-icon, #{$button-secondary-icon});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.ui-btn.--active.--secondary {
|
|
130
|
-
background-color: $button-secondary-bg--active;
|
|
131
|
-
color: $button-secondary-text--active;
|
|
132
|
-
border-color: $button-secondary-border--active;
|
|
130
|
+
background-color: var(--button-bg--active, #{$button-secondary-bg--active});
|
|
131
|
+
color: var(--button-text--active, #{$button-secondary-text--active});
|
|
132
|
+
border-color: var(--button-border--active, #{$button-secondary-border--active});
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
.ui-btn.--icon {
|
|
@@ -146,22 +146,23 @@ const slotText = computed(() => {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.ui-btn.--muted {
|
|
149
|
-
background-color: $button-muted-bg;
|
|
150
|
-
color: $button-muted-text;
|
|
151
|
-
border-color:
|
|
149
|
+
background-color: var(--button-bg, #{$button-muted-bg});
|
|
150
|
+
color: var(--button-text, #{$button-muted-text});
|
|
151
|
+
border-color: var(--button-border, #{$button-muted-border});
|
|
152
152
|
|
|
153
|
-
@include hover(background-color) {
|
|
154
|
-
background-color: $button-muted-bg--hover;
|
|
153
|
+
@include hover(background-color, border) {
|
|
154
|
+
background-color: var(--button-bg--hover, #{$button-muted-bg--hover});
|
|
155
|
+
border-color: var(--button-border--hover, #{$button-muted-border--hover});
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
.ui-btn.--warning {
|
|
159
|
-
background-color: $button-warning-bg;
|
|
160
|
-
border: 1px solid $button-warning-border;
|
|
161
|
-
color: $button-warning-text;
|
|
160
|
+
background-color: var(--button-bg, #{$button-warning-bg});
|
|
161
|
+
border: 1px solid var(--button-border, #{$button-warning-border});
|
|
162
|
+
color: var(--button-text, #{$button-warning-text});
|
|
162
163
|
|
|
163
164
|
@include hover(background-color) {
|
|
164
|
-
background-color: $button-warning-bg--hover;
|
|
165
|
+
background-color: var(--button-bg--hover, #{$button-warning-bg--hover});
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
</style>
|
package/package.json
CHANGED