@formixru/b2b-ui 3.3.0 → 3.4.1
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 +27 -27
- package/src/base.scss +2 -0
- package/src/components/color-input/index.scss +2 -2
- package/src/components/color-input/index.vue +1 -2
- package/src/components/dialog/index.js +1 -1
- package/src/components/form/index.scss +0 -1
- package/src/components/quantity-input/index.vue +3 -3
- package/src/components/request/index.js +33 -11
- package/src/components/sidebar/index.js +2 -1
- package/src/components/sr-only/index.scss +3 -13
- package/src/components/steps/index.scss +5 -4
- package/src/components/tabs/index.js +1 -1
- package/src/components/tabs/index.scss +13 -4
- package/src/components/tooltip/index.js +9 -4
- package/src/components/warning-message/index.scss +1 -1
- package/src/utils/mm.js +1 -1
- package/src/variables.scss +20 -20
- package/src/utils/css-var.js +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formixru/b2b-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,60 +15,60 @@
|
|
|
15
15
|
"_postinstall": "husky",
|
|
16
16
|
"prepack": "yarn pinst --disable",
|
|
17
17
|
"postpack": "yarn pinst --enable",
|
|
18
|
-
"lint:eslint": "yarn
|
|
19
|
-
"lint:stylelint": "yarn
|
|
20
|
-
"lint:prettier": "yarn prettier
|
|
21
|
-
"lint": "yarn
|
|
18
|
+
"lint:eslint": "yarn node build-scripts/eslint.js",
|
|
19
|
+
"lint:stylelint": "yarn node build-scripts/stylelint.js",
|
|
20
|
+
"lint:prettier": "yarn node build-scripts/prettier.js",
|
|
21
|
+
"lint": "yarn node build-scripts/lint.js",
|
|
22
22
|
"dev": "storybook dev -p 3000",
|
|
23
23
|
"build": "storybook build -o www"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@advdominion/
|
|
26
|
+
"@advdominion/css-var": "^1.0.1",
|
|
27
|
+
"@advdominion/eslint-config": "^2.0.0",
|
|
27
28
|
"@advdominion/get-scrollbar-width": "^2.0.1",
|
|
28
29
|
"@advdominion/pluralize": "^1.0.2",
|
|
29
|
-
"@advdominion/scroll-to": "^1.0.
|
|
30
|
+
"@advdominion/scroll-to": "^1.0.1",
|
|
31
|
+
"@advdominion/stylelint-config": "^1.1.0",
|
|
30
32
|
"@advdominion/tooltip": "^6.0.0",
|
|
31
|
-
"@floating-ui/dom": "^1.7.
|
|
33
|
+
"@floating-ui/dom": "^1.7.5",
|
|
32
34
|
"@popperjs/core": "^2.11.8",
|
|
33
35
|
"@prettier/plugin-php": "^0.24.0",
|
|
34
|
-
"@storybook/addon-designs": "^11.1.
|
|
35
|
-
"@storybook/addon-docs": "^10.2.
|
|
36
|
-
"@storybook/addon-links": "^10.2.
|
|
37
|
-
"@storybook/vue3-vite": "^10.2.
|
|
38
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
39
|
-
"@vueless/storybook-dark-mode": "^10.0.
|
|
36
|
+
"@storybook/addon-designs": "^11.1.2",
|
|
37
|
+
"@storybook/addon-docs": "^10.2.13",
|
|
38
|
+
"@storybook/addon-links": "^10.2.13",
|
|
39
|
+
"@storybook/vue3-vite": "^10.2.13",
|
|
40
|
+
"@vitejs/plugin-vue": "^6.0.4",
|
|
41
|
+
"@vueless/storybook-dark-mode": "^10.0.7",
|
|
40
42
|
"browserslist": "^4.28.1",
|
|
41
43
|
"color": "^5.0.3",
|
|
42
44
|
"dayjs": "^1.11.19",
|
|
43
45
|
"es-toolkit": "^1.44.0",
|
|
44
|
-
"eslint": "^
|
|
46
|
+
"eslint": "^10.0.2",
|
|
45
47
|
"husky": "^9.1.7",
|
|
46
48
|
"imask": "^7.6.1",
|
|
47
49
|
"lint-staged": "^16.2.7",
|
|
48
50
|
"mime": "^4.1.0",
|
|
49
|
-
"msw": "^2.12.
|
|
51
|
+
"msw": "^2.12.10",
|
|
50
52
|
"msw-storybook-addon": "^2.0.6",
|
|
51
53
|
"nouislider": "^15.8.1",
|
|
52
54
|
"pinst": "^3.0.0",
|
|
53
55
|
"postcss": "^8.5.6",
|
|
54
|
-
"postcss-preset-env": "^11.
|
|
55
|
-
"prettier": "^3.8.
|
|
56
|
+
"postcss-preset-env": "^11.2.0",
|
|
57
|
+
"prettier": "^3.8.1",
|
|
56
58
|
"reset-css": "^5.0.2",
|
|
57
|
-
"sass-embedded": "^1.97.
|
|
58
|
-
"storybook": "^10.2.
|
|
59
|
-
"stylelint": "^
|
|
60
|
-
"
|
|
61
|
-
"stylelint-config-standard-vue": "^1.0.0",
|
|
62
|
-
"stylelint-order": "^7.0.0",
|
|
63
|
-
"swiper": "^12.0.3",
|
|
59
|
+
"sass-embedded": "^1.97.3",
|
|
60
|
+
"storybook": "^10.2.13",
|
|
61
|
+
"stylelint": "^17.4.0",
|
|
62
|
+
"swiper": "^12.1.2",
|
|
64
63
|
"update-browserslist-db": "^1.2.3",
|
|
65
64
|
"v-calendar": "3.0.1",
|
|
66
65
|
"vite": "^7.3.1",
|
|
67
|
-
"vue": "^3.5.
|
|
68
|
-
"vue-eslint-parser": "^10.
|
|
66
|
+
"vue": "^3.5.29",
|
|
67
|
+
"vue-eslint-parser": "^10.4.0",
|
|
69
68
|
"yargs": "^18.0.0"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
71
|
+
"@advdominion/css-var": "^1.0.0",
|
|
72
72
|
"@advdominion/get-scrollbar-width": "^2.0.0",
|
|
73
73
|
"@advdominion/pluralize": "^1.0.0",
|
|
74
74
|
"@advdominion/scroll-to": "^1.0.0",
|
package/src/base.scss
CHANGED
|
@@ -76,12 +76,12 @@ $b: '.color-input';
|
|
|
76
76
|
|
|
77
77
|
#{$b}__example_autocolor & {
|
|
78
78
|
&:first-child {
|
|
79
|
-
clip:
|
|
79
|
+
clip-path: inset(0 calc(100% - 6px) 0 0);
|
|
80
80
|
fill: $color-input-icon-dark-color;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:last-child {
|
|
84
|
-
clip:
|
|
84
|
+
clip-path: inset(0 0 0 6px);
|
|
85
85
|
fill: $color-input-icon-light-color;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -75,11 +75,10 @@
|
|
|
75
75
|
</template>
|
|
76
76
|
|
|
77
77
|
<script setup>
|
|
78
|
+
import { cssVar } from '@advdominion/css-var';
|
|
78
79
|
import Color from 'color';
|
|
79
80
|
import { computed, ref, toRefs, watch } from 'vue';
|
|
80
81
|
|
|
81
|
-
import { cssVar } from '../../utils/css-var.js';
|
|
82
|
-
|
|
83
82
|
const ICONS_PATH = window.ICONS_PATH;
|
|
84
83
|
|
|
85
84
|
const emit = defineEmits(['input']);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { cssVar } from '@advdominion/css-var';
|
|
1
2
|
import { throttle } from 'es-toolkit';
|
|
2
3
|
|
|
3
|
-
import { cssVar } from '../../utils/css-var.js';
|
|
4
4
|
import { mm } from '../../utils/mm.js';
|
|
5
5
|
import { hide as hideLoader } from '../loader/index.js';
|
|
6
6
|
import { disableScroll, enableScroll } from '../overlay/index.js';
|
|
@@ -110,11 +110,11 @@ const input = (inputValue) => {
|
|
|
110
110
|
} else {
|
|
111
111
|
quantity.value = Number(inputValue);
|
|
112
112
|
if (quantity.value < min.value) {
|
|
113
|
-
newValue = min.value;
|
|
114
113
|
quantity.value = min.value;
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
newValue = min.value;
|
|
115
|
+
} else if (max.value > 0 && quantity.value > max.value) {
|
|
117
116
|
quantity.value = max.value;
|
|
117
|
+
newValue = max.value;
|
|
118
118
|
} else {
|
|
119
119
|
newValue = quantity.value;
|
|
120
120
|
}
|
|
@@ -30,6 +30,7 @@ export const request = async ({
|
|
|
30
30
|
loader = true,
|
|
31
31
|
showLoaderDelay,
|
|
32
32
|
hideLoaderOnSuccess = true,
|
|
33
|
+
interceptData = true,
|
|
33
34
|
}) => {
|
|
34
35
|
const reqUrl = new URL(url, location.origin);
|
|
35
36
|
const options = {
|
|
@@ -91,22 +92,38 @@ export const request = async ({
|
|
|
91
92
|
location.reload();
|
|
92
93
|
}
|
|
93
94
|
} else {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if (interceptData) {
|
|
96
|
+
try {
|
|
97
|
+
await window.__FORMIX__REQUEST__INTERCEPT_DATA(data);
|
|
98
|
+
} catch {
|
|
99
|
+
console.warn('Функция __FORMIX__REQUEST__INTERCEPT_DATA не установлена');
|
|
100
|
+
}
|
|
98
101
|
}
|
|
102
|
+
|
|
103
|
+
const isReloadPending =
|
|
104
|
+
(data.reloadOnHideDialog && data.hideDialog) || (data.reloadOnHideSidebar && data.hideSidebar);
|
|
105
|
+
const isUIComponentClosing = data.hideDialog || data.hideSidebar;
|
|
106
|
+
const shouldSkipLoaderClose = isReloadPending || (data.trigger && !isUIComponentClosing);
|
|
107
|
+
const shouldHideLoader = loader && hideLoaderOnSuccess && !shouldSkipLoaderClose;
|
|
108
|
+
let isLoaderHidden = false;
|
|
109
|
+
|
|
99
110
|
if (data.dialog) {
|
|
100
111
|
const elementId = getElementId(data.dialog.id);
|
|
101
112
|
const $dialog = document.querySelector(elementId);
|
|
102
113
|
if ($dialog) {
|
|
103
114
|
$dialog.querySelector('.dialog__container').innerHTML = data.dialog.content;
|
|
115
|
+
// Вызываем hideLoader так же как в основном компоненте - до функции show()
|
|
116
|
+
if (shouldHideLoader && !isLoaderHidden) {
|
|
117
|
+
hideLoader();
|
|
118
|
+
isLoaderHidden = true;
|
|
119
|
+
}
|
|
104
120
|
await showDialog($dialog);
|
|
105
121
|
initRequestContent($dialog);
|
|
106
122
|
} else {
|
|
107
123
|
console.error(`Диалоговое окно с id ${elementId?.replace(/^#/, '')} не найдено`);
|
|
108
124
|
}
|
|
109
125
|
}
|
|
126
|
+
|
|
110
127
|
if (data.reloadOnHideDialog) {
|
|
111
128
|
if (data.dialog) {
|
|
112
129
|
const elementId = getElementId(data.dialog.id);
|
|
@@ -120,6 +137,7 @@ export const request = async ({
|
|
|
120
137
|
});
|
|
121
138
|
}
|
|
122
139
|
}
|
|
140
|
+
|
|
123
141
|
if (data.hideDialog) {
|
|
124
142
|
if (data.dialog) {
|
|
125
143
|
const elementId = getElementId(data.dialog.id);
|
|
@@ -131,17 +149,24 @@ export const request = async ({
|
|
|
131
149
|
hideDialog($b.closest('.dialog'));
|
|
132
150
|
}
|
|
133
151
|
}
|
|
152
|
+
|
|
134
153
|
if (data.sidebar) {
|
|
135
154
|
const elementId = getElementId(data.sidebar.id);
|
|
136
155
|
const $sidebar = document.querySelector(elementId);
|
|
137
156
|
if ($sidebar) {
|
|
138
157
|
$sidebar.innerHTML = data.sidebar.content;
|
|
158
|
+
// Вызываем hideLoader так же как в основном компоненте - до функции show()
|
|
159
|
+
if (shouldHideLoader && !isLoaderHidden) {
|
|
160
|
+
hideLoader();
|
|
161
|
+
isLoaderHidden = true;
|
|
162
|
+
}
|
|
139
163
|
await showSidebar($sidebar);
|
|
140
164
|
initRequestContent($sidebar);
|
|
141
165
|
} else {
|
|
142
166
|
console.error(`Сайдбар с id ${elementId?.replace(/^#/, '')} не найден`);
|
|
143
167
|
}
|
|
144
168
|
}
|
|
169
|
+
|
|
145
170
|
if (data.reloadOnHideSidebar) {
|
|
146
171
|
if (data.sidebar) {
|
|
147
172
|
const elementId = getElementId(data.sidebar.id);
|
|
@@ -155,6 +180,7 @@ export const request = async ({
|
|
|
155
180
|
});
|
|
156
181
|
}
|
|
157
182
|
}
|
|
183
|
+
|
|
158
184
|
if (data.hideSidebar) {
|
|
159
185
|
if (data.sidebar) {
|
|
160
186
|
const elementId = getElementId(data.sidebar.id);
|
|
@@ -166,6 +192,7 @@ export const request = async ({
|
|
|
166
192
|
hideSidebar($b.closest('.sidebar'));
|
|
167
193
|
}
|
|
168
194
|
}
|
|
195
|
+
|
|
169
196
|
if (data.trigger) {
|
|
170
197
|
const $trigger = document.querySelector(data.trigger);
|
|
171
198
|
if ($trigger) {
|
|
@@ -177,13 +204,8 @@ export const request = async ({
|
|
|
177
204
|
}
|
|
178
205
|
}
|
|
179
206
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
!(data.reloadOnHideSidebar && data.hideSidebar) &&
|
|
183
|
-
(!data.trigger || data.hideDialog || data.hideSidebar) &&
|
|
184
|
-
loader &&
|
|
185
|
-
hideLoaderOnSuccess
|
|
186
|
-
) {
|
|
207
|
+
|
|
208
|
+
if (shouldHideLoader && !isLoaderHidden) {
|
|
187
209
|
hideLoader();
|
|
188
210
|
}
|
|
189
211
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { cssVar } from '
|
|
1
|
+
import { cssVar } from '@advdominion/css-var';
|
|
2
|
+
|
|
2
3
|
import { mm } from '../../utils/mm.js';
|
|
3
4
|
import { hide as hideLoader } from '../loader/index.js';
|
|
4
5
|
import { disableScroll, enableScroll, hide as hideOverlay, show as showOverlay } from '../overlay/index.js';
|
|
@@ -3,22 +3,12 @@
|
|
|
3
3
|
// https://allyjs.io/tutorials/hiding-elements.html#2017-edition-of-visuallyhidden
|
|
4
4
|
|
|
5
5
|
.sr-only {
|
|
6
|
-
border-
|
|
7
|
-
border-left-style: none;
|
|
8
|
-
border-right-style: none;
|
|
9
|
-
border-top-style: none;
|
|
10
|
-
clip: rect(0 0 0 0);
|
|
6
|
+
border-style: none;
|
|
11
7
|
clip-path: inset(100%);
|
|
12
8
|
height: 1px;
|
|
13
|
-
margin
|
|
14
|
-
margin-left: -1px;
|
|
15
|
-
margin-right: -1px;
|
|
16
|
-
margin-top: -1px;
|
|
9
|
+
margin: -1px;
|
|
17
10
|
overflow: hidden;
|
|
18
|
-
padding
|
|
19
|
-
padding-left: 0;
|
|
20
|
-
padding-right: 0;
|
|
21
|
-
padding-top: 0;
|
|
11
|
+
padding: 0;
|
|
22
12
|
position: absolute;
|
|
23
13
|
white-space: nowrap;
|
|
24
14
|
width: 1px;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
1
2
|
@use '../../variables' as *;
|
|
2
3
|
|
|
3
4
|
$b: '.steps';
|
|
@@ -7,7 +8,7 @@ $b: '.steps';
|
|
|
7
8
|
position: relative;
|
|
8
9
|
|
|
9
10
|
&::before {
|
|
10
|
-
background-image: linear-gradient(-90deg,
|
|
11
|
+
background-image: linear-gradient(-90deg, color.change($content-bg, $alpha: 0), $content-bg);
|
|
11
12
|
content: none;
|
|
12
13
|
height: 100%;
|
|
13
14
|
left: 0;
|
|
@@ -18,12 +19,12 @@ $b: '.steps';
|
|
|
18
19
|
|
|
19
20
|
.content_fill_grey &,
|
|
20
21
|
.content__block_fill_grey & {
|
|
21
|
-
background-image: linear-gradient(-90deg,
|
|
22
|
+
background-image: linear-gradient(-90deg, color.change($content-bg-grey, $alpha: 0), $content-bg-grey);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
&::after {
|
|
26
|
-
background-image: linear-gradient(90deg,
|
|
27
|
+
background-image: linear-gradient(90deg, color.change($content-bg, $alpha: 0), $content-bg);
|
|
27
28
|
content: '';
|
|
28
29
|
height: 100%;
|
|
29
30
|
position: absolute;
|
|
@@ -38,7 +39,7 @@ $b: '.steps';
|
|
|
38
39
|
|
|
39
40
|
.content_fill_grey &,
|
|
40
41
|
.content__block_fill_grey & {
|
|
41
|
-
background-image: linear-gradient(90deg,
|
|
42
|
+
background-image: linear-gradient(90deg, color.change($content-bg-grey, $alpha: 0), $content-bg-grey);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
1
2
|
@use '../../variables' as *;
|
|
2
3
|
|
|
3
4
|
$b: '.tabs';
|
|
@@ -32,7 +33,11 @@ $b: '.tabs';
|
|
|
32
33
|
&_shadow-start {
|
|
33
34
|
&::before {
|
|
34
35
|
@media (--tablet-landscape-up) {
|
|
35
|
-
background-image: linear-gradient(
|
|
36
|
+
background-image: linear-gradient(
|
|
37
|
+
-90deg,
|
|
38
|
+
color.change($content-bg-grey, $alpha: 0),
|
|
39
|
+
$content-bg-grey
|
|
40
|
+
);
|
|
36
41
|
content: '';
|
|
37
42
|
height: calc(100% - #{$tabs-border-width});
|
|
38
43
|
left: 0;
|
|
@@ -44,7 +49,7 @@ $b: '.tabs';
|
|
|
44
49
|
|
|
45
50
|
#{$b}_white-bg & {
|
|
46
51
|
@media (--tablet-landscape-up) {
|
|
47
|
-
background-image: linear-gradient(-90deg,
|
|
52
|
+
background-image: linear-gradient(-90deg, color.change($content-bg, $alpha: 0), $content-bg);
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
55
|
}
|
|
@@ -53,7 +58,11 @@ $b: '.tabs';
|
|
|
53
58
|
&_shadow-end {
|
|
54
59
|
&::after {
|
|
55
60
|
@media (--tablet-landscape-up) {
|
|
56
|
-
background-image: linear-gradient(
|
|
61
|
+
background-image: linear-gradient(
|
|
62
|
+
90deg,
|
|
63
|
+
color.change($content-bg-grey, $alpha: 0),
|
|
64
|
+
$content-bg-grey
|
|
65
|
+
);
|
|
57
66
|
content: '';
|
|
58
67
|
height: calc(100% - #{$tabs-border-width});
|
|
59
68
|
position: absolute;
|
|
@@ -65,7 +74,7 @@ $b: '.tabs';
|
|
|
65
74
|
|
|
66
75
|
#{$b}_white-bg & {
|
|
67
76
|
@media (--tablet-landscape-up) {
|
|
68
|
-
background-image: linear-gradient(90deg,
|
|
77
|
+
background-image: linear-gradient(90deg, color.change($content-bg, $alpha: 0), $content-bg);
|
|
69
78
|
}
|
|
70
79
|
}
|
|
71
80
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* globals BX */
|
|
2
2
|
|
|
3
|
-
import { cssVar } from '
|
|
3
|
+
import { cssVar } from '@advdominion/css-var';
|
|
4
|
+
|
|
4
5
|
import { errorHandler } from '../../utils/error-handler.js';
|
|
5
6
|
|
|
6
7
|
export const init = async ($b) => {
|
|
@@ -11,16 +12,20 @@ export const init = async ($b) => {
|
|
|
11
12
|
if ($b.dataset.tooltipImage) {
|
|
12
13
|
content = `<img class="tooltip__image" src=${$b.dataset.tooltipImage} alt="">`;
|
|
13
14
|
}
|
|
15
|
+
const tooltipFetch = $b.dataset.tooltipFetch;
|
|
14
16
|
|
|
15
17
|
return new Promise((resolve) => {
|
|
16
18
|
if ($b._tooltip) {
|
|
17
|
-
|
|
19
|
+
if (tooltipFetch) {
|
|
20
|
+
$b._tooltip._isFetching = false;
|
|
21
|
+
$b._tooltip._isFetched = false;
|
|
22
|
+
} else {
|
|
23
|
+
$b._tooltip.setContent(content);
|
|
24
|
+
}
|
|
18
25
|
resolve();
|
|
19
26
|
return;
|
|
20
27
|
}
|
|
21
28
|
|
|
22
|
-
const tooltipFetch = $b.dataset.tooltipFetch;
|
|
23
|
-
|
|
24
29
|
let appendTo = document.body;
|
|
25
30
|
const $special = $b.closest('.dialog, .sidebar, .filter, .compare-pane');
|
|
26
31
|
if ($special) {
|
package/src/utils/mm.js
CHANGED
package/src/variables.scss
CHANGED
|
@@ -268,10 +268,10 @@ $bg-color-info: $color-primary !default;
|
|
|
268
268
|
$bg-color-tertiary: #212223 !default;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
$backdrop-color:
|
|
271
|
+
$backdrop-color: color.change($color-black, $alpha: 0.3) !default;
|
|
272
272
|
|
|
273
273
|
@if $dark {
|
|
274
|
-
$backdrop-color:
|
|
274
|
+
$backdrop-color: color.change($color-black, $alpha: 0.75) !default;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
$font-color-primary: $color-grey-20 !default;
|
|
@@ -321,8 +321,8 @@ $radius: 4px * 2 !default;
|
|
|
321
321
|
$radius-s: 4px !default;
|
|
322
322
|
$radius-l: 10000px !default;
|
|
323
323
|
|
|
324
|
-
$shadow: 0 2px 16px 0
|
|
325
|
-
$shadow-s: 0 2px 8px 0
|
|
324
|
+
$shadow: 0 2px 16px 0 color.change($color-black, $alpha: 0.1) !default;
|
|
325
|
+
$shadow-s: 0 2px 8px 0 color.change($color-black, $alpha: 0.1) !default;
|
|
326
326
|
|
|
327
327
|
@if $dark {
|
|
328
328
|
$shadow: none !default;
|
|
@@ -458,8 +458,8 @@ $button-height: 4px * 12 !default;
|
|
|
458
458
|
$button-min-width: 4px * 38 !default;
|
|
459
459
|
$button-padding: 0 4px * 7 !default;
|
|
460
460
|
|
|
461
|
-
$button-disabled-bg:
|
|
462
|
-
$button-disabled-border-color:
|
|
461
|
+
$button-disabled-bg: color.change($color-primary, $alpha: 0.35) !default;
|
|
462
|
+
$button-disabled-border-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
463
463
|
$button-disabled-color: $color-white !default;
|
|
464
464
|
|
|
465
465
|
$button-active-bg: $color-primary-40 !default;
|
|
@@ -488,8 +488,8 @@ $button-alt-border-color: $color-primary !default;
|
|
|
488
488
|
$button-alt-color: $color-primary !default;
|
|
489
489
|
|
|
490
490
|
$button-alt-disabled-bg: transparent !default;
|
|
491
|
-
$button-alt-disabled-border-color:
|
|
492
|
-
$button-alt-disabled-color:
|
|
491
|
+
$button-alt-disabled-border-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
492
|
+
$button-alt-disabled-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
493
493
|
|
|
494
494
|
$button-alt-active-bg: $color-primary-40 !default;
|
|
495
495
|
$button-alt-active-border-color: $color-primary-40 !default;
|
|
@@ -504,7 +504,7 @@ $button-ghost-color: $color-primary !default;
|
|
|
504
504
|
|
|
505
505
|
$button-ghost-disabled-bg: $color-grey-90 !default;
|
|
506
506
|
$button-ghost-disabled-border-color: $color-grey-90 !default;
|
|
507
|
-
$button-ghost-disabled-color:
|
|
507
|
+
$button-ghost-disabled-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
508
508
|
|
|
509
509
|
$button-ghost-active-bg: $color-primary-80 !default;
|
|
510
510
|
$button-ghost-active-border-color: $color-primary-80 !default;
|
|
@@ -533,8 +533,8 @@ $button-inverted-border-color: $color-white !default;
|
|
|
533
533
|
$button-inverted-color: $color-white !default;
|
|
534
534
|
|
|
535
535
|
$button-inverted-disabled-bg: transparent !default;
|
|
536
|
-
$button-inverted-disabled-border-color:
|
|
537
|
-
$button-inverted-disabled-color:
|
|
536
|
+
$button-inverted-disabled-border-color: color.change($color-white, $alpha: 0.5) !default;
|
|
537
|
+
$button-inverted-disabled-color: color.change($color-white, $alpha: 0.5) !default;
|
|
538
538
|
|
|
539
539
|
$button-inverted-active-bg: $color-white !default;
|
|
540
540
|
$button-inverted-active-border-color: $color-white !default;
|
|
@@ -548,7 +548,7 @@ $input-border-color: $color-grey-80 !default;
|
|
|
548
548
|
$input-radius: $radius !default;
|
|
549
549
|
$input-color: $font-color-primary !default;
|
|
550
550
|
$input-font: ('font-size': $font-size, 'line-height': $line-height-s, 'font-family': $font-family) !default;
|
|
551
|
-
$input-placeholder-color:
|
|
551
|
+
$input-placeholder-color: color.change($input-color, $alpha: 0.5) !default;
|
|
552
552
|
$input-height: 4px * 12 !default;
|
|
553
553
|
$input-padding-x: 4px * 4 !default;
|
|
554
554
|
$input-padding-y: 4px * 3 !default;
|
|
@@ -560,10 +560,10 @@ $input-active-border-color: $color-primary !default;
|
|
|
560
560
|
$input-active-outline-color: $input-active-border-color !default;
|
|
561
561
|
$input-active-color: $input-color !default;
|
|
562
562
|
|
|
563
|
-
$input-disabled-bg:
|
|
563
|
+
$input-disabled-bg: color.change($color-primary-20, $alpha: 0.07) !default;
|
|
564
564
|
$input-disabled-border-color: $color-grey-90 !default;
|
|
565
|
-
$input-disabled-color:
|
|
566
|
-
$input-disabled-placeholder-color:
|
|
565
|
+
$input-disabled-color: color.change($input-color, $alpha: 0.5) !default;
|
|
566
|
+
$input-disabled-placeholder-color: color.change($input-color, $alpha: 0.25) !default;
|
|
567
567
|
|
|
568
568
|
$input-error-bg: $input-bg !default;
|
|
569
569
|
$input-error-border-color: $color-error !default;
|
|
@@ -753,8 +753,8 @@ $radio-list-color: $color-primary !default;
|
|
|
753
753
|
$radio-list-font: ('font-weight': bold, 'font-size': $font-size-s, 'line-height': 1) !default;
|
|
754
754
|
|
|
755
755
|
$radio-list-disabled-bg: $bg-color-tertiary !default;
|
|
756
|
-
$radio-list-disabled-border-color:
|
|
757
|
-
$radio-list-disabled-color:
|
|
756
|
+
$radio-list-disabled-border-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
757
|
+
$radio-list-disabled-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
758
758
|
|
|
759
759
|
$radio-list-active-bg: $color-primary !default;
|
|
760
760
|
$radio-list-active-border-color: $color-primary !default;
|
|
@@ -764,8 +764,8 @@ $radio-list-selected-bg: $color-primary-40 !default;
|
|
|
764
764
|
$radio-list-selected-border-color: $color-primary-40 !default;
|
|
765
765
|
$radio-list-selected-color: $color-white !default;
|
|
766
766
|
|
|
767
|
-
$radio-list-selected-disabled-bg:
|
|
768
|
-
$radio-list-selected-disabled-border-color:
|
|
767
|
+
$radio-list-selected-disabled-bg: color.change($color-primary, $alpha: 0.35) !default;
|
|
768
|
+
$radio-list-selected-disabled-border-color: color.change($color-primary, $alpha: 0.35) !default;
|
|
769
769
|
$radio-list-selected-disabled-color: $color-white !default;
|
|
770
770
|
|
|
771
771
|
/********** Переключатель (.toggle) **********/
|
|
@@ -787,7 +787,7 @@ $toggle-active-check-color: $color-white !default;
|
|
|
787
787
|
|
|
788
788
|
$toggle-active-disabled-bg: $color-success !default;
|
|
789
789
|
$toggle-active-disabled-border-color: $color-success !default;
|
|
790
|
-
$toggle-active-disabled-check-color:
|
|
790
|
+
$toggle-active-disabled-check-color: color.change($color-white, $alpha: 0.5) !default;
|
|
791
791
|
|
|
792
792
|
$toggle-label-color: $font-color-secondary !default;
|
|
793
793
|
$toggle-label-font: ('font-size': $font-size, 'line-height': $line-height-s) !default;
|
package/src/utils/css-var.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const cssVar = (name, element = document.documentElement) => {
|
|
2
|
-
const value = window.getComputedStyle(element).getPropertyValue(name);
|
|
3
|
-
const durationRegExp = /(^[\d.]+)(ms|s)$/;
|
|
4
|
-
if (durationRegExp.test(value)) {
|
|
5
|
-
const [, numericValue, unit] = durationRegExp.exec(value);
|
|
6
|
-
return unit === 's' ? numericValue * 1000 : Number(numericValue);
|
|
7
|
-
}
|
|
8
|
-
return value;
|
|
9
|
-
};
|