@formixru/b2b-ui 1.0.0
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/CONTRIBUTING.md +61 -0
- package/README.md +30 -0
- package/package.json +110 -0
- package/src/base.scss +89 -0
- package/src/components/action-list/index.scss +38 -0
- package/src/components/banner/index.scss +30 -0
- package/src/components/breadcrumbs/index.js +8 -0
- package/src/components/breadcrumbs/index.scss +55 -0
- package/src/components/button/index.scss +223 -0
- package/src/components/checkbox/index.scss +94 -0
- package/src/components/color-input/index.scss +88 -0
- package/src/components/color-input/index.vue +156 -0
- package/src/components/date-input/index.scss +126 -0
- package/src/components/date-input/index.vue +240 -0
- package/src/components/delete-all/index.scss +44 -0
- package/src/components/dialog/index.js +221 -0
- package/src/components/dialog/index.scss +198 -0
- package/src/components/empty-list/index.scss +97 -0
- package/src/components/file-input/index.scss +119 -0
- package/src/components/file-input/index.vue +333 -0
- package/src/components/font-input/index.scss +47 -0
- package/src/components/font-input/index.vue +154 -0
- package/src/components/form/index.js +228 -0
- package/src/components/form/index.scss +398 -0
- package/src/components/header-announcement/index.scss +48 -0
- package/src/components/input/index.js +85 -0
- package/src/components/input/index.scss +87 -0
- package/src/components/link/index.scss +266 -0
- package/src/components/loader/index.js +65 -0
- package/src/components/loader/index.scss +99 -0
- package/src/components/nobr/index.scss +5 -0
- package/src/components/overlay/index.js +82 -0
- package/src/components/overlay/index.scss +29 -0
- package/src/components/pagination/index.scss +59 -0
- package/src/components/pagination-group/index.js +5 -0
- package/src/components/pagination-group/index.scss +86 -0
- package/src/components/quantity-input/index.scss +179 -0
- package/src/components/quantity-input/index.vue +141 -0
- package/src/components/radio/index.scss +80 -0
- package/src/components/radio-list/index.scss +79 -0
- package/src/components/range-input/index.scss +109 -0
- package/src/components/range-input/index.vue +185 -0
- package/src/components/rating-input/index.js +32 -0
- package/src/components/rating-input/index.scss +36 -0
- package/src/components/select/index.js +6 -0
- package/src/components/select/index.scss +84 -0
- package/src/components/sidebar/index.js +174 -0
- package/src/components/sidebar/index.scss +398 -0
- package/src/components/simple-page/index.scss +32 -0
- package/src/components/slider-nav/index.scss +82 -0
- package/src/components/slider-pagination/index.scss +130 -0
- package/src/components/spinner/index.scss +35 -0
- package/src/components/sr-only/index.scss +25 -0
- package/src/components/steps/index.scss +155 -0
- package/src/components/suggest-input/index.scss +141 -0
- package/src/components/suggest-input/index.vue +324 -0
- package/src/components/tabs/index.js +192 -0
- package/src/components/tabs/index.scss +137 -0
- package/src/components/time-select/index.scss +27 -0
- package/src/components/toggle/index.scss +76 -0
- package/src/components/tooltip/index.js +69 -0
- package/src/components/tooltip/index.scss +112 -0
- package/src/components/total/index.scss +162 -0
- package/src/components/warning-message/index.scss +170 -0
- package/src/components/warning-message/index.vue +94 -0
- package/src/components/wysiwyg/index.scss +344 -0
- package/src/helpers/css-var.js +8 -0
- package/src/helpers/error-handler.js +61 -0
- package/src/helpers/get-smart-captcha.js +7 -0
- package/src/helpers/is-in-viewport.js +10 -0
- package/src/helpers/mm.js +52 -0
- package/src/helpers/scroll-to.js +21 -0
- package/src/variables.scss +1295 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
|
|
3
|
+
$b: '.delete-all';
|
|
4
|
+
|
|
5
|
+
#{$b} {
|
|
6
|
+
align-items: center;
|
|
7
|
+
color: $delete-all-color;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
transition-duration: var(--duration-micro-s);
|
|
12
|
+
transition-property: color;
|
|
13
|
+
transition-timing-function: var(--easing-standard);
|
|
14
|
+
|
|
15
|
+
&:hover,
|
|
16
|
+
&:focus-visible {
|
|
17
|
+
color: $delete-all-active-color;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.action-list & {
|
|
21
|
+
color: $deleta-all-action-list-color;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__icon {
|
|
25
|
+
fill: $delete-all-icon-color;
|
|
26
|
+
height: 4px * 6;
|
|
27
|
+
margin-right: 4px * 2;
|
|
28
|
+
position: relative;
|
|
29
|
+
top: -2px;
|
|
30
|
+
transition-duration: var(--duration-micro-s);
|
|
31
|
+
transition-property: fill;
|
|
32
|
+
transition-timing-function: var(--easing-standard);
|
|
33
|
+
width: 4px * 6;
|
|
34
|
+
|
|
35
|
+
#{$b}:hover &,
|
|
36
|
+
#{$b}:focus-visible & {
|
|
37
|
+
fill: $delete-all-icon-active-color;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.action-list & {
|
|
41
|
+
fill: $delete-all-action-list-icon-color;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/* globals BX */
|
|
2
|
+
|
|
3
|
+
import { is } from '@advdominion/is';
|
|
4
|
+
import _throttle from 'lodash-es/throttle.js';
|
|
5
|
+
|
|
6
|
+
import { cssVar } from '../../helpers/css-var.js';
|
|
7
|
+
import { errorHandler } from '../../helpers/error-handler.js';
|
|
8
|
+
import { mm } from '../../helpers/mm.js';
|
|
9
|
+
import { clearLoaderTimeout, hide as hideLoader, show as showLoader } from '../loader/index.js';
|
|
10
|
+
import { disableScroll, enableScroll } from '../overlay/index.js';
|
|
11
|
+
|
|
12
|
+
const isDialogOverflow = ($b) => {
|
|
13
|
+
return $b.scrollHeight > $b.clientHeight;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const init = ($b) => {
|
|
17
|
+
// Перемещаем кнопку закрытия модального окна для моб. устройств
|
|
18
|
+
if (!mm('tablet-landscape-up')) {
|
|
19
|
+
// $b.find('.dialog__close').prependTo($b); ??
|
|
20
|
+
$b.prepend($b.querySelector('.dialog__close'));
|
|
21
|
+
}
|
|
22
|
+
// Отключаем скролл у body, если при загрузке на странице есть видимое диалоговое окно
|
|
23
|
+
if (!$b.hidden) {
|
|
24
|
+
disableScroll();
|
|
25
|
+
if (isDialogOverflow($b)) {
|
|
26
|
+
$b.classList.add('dialog_overflow');
|
|
27
|
+
} else {
|
|
28
|
+
$b.classList.remove('dialog_overflow');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if ($b._OVERFLOW_OBSERVER_) {
|
|
32
|
+
$b._OVERFLOW_OBSERVER_.disconnect();
|
|
33
|
+
}
|
|
34
|
+
$b._OVERFLOW_OBSERVER_ = new MutationObserver(() => {
|
|
35
|
+
if (isDialogOverflow($b)) {
|
|
36
|
+
$b.classList.add('dialog_overflow');
|
|
37
|
+
} else {
|
|
38
|
+
$b.classList.remove('dialog_overflow');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
$b._OVERFLOW_OBSERVER_.observe($b, {
|
|
42
|
+
childList: true,
|
|
43
|
+
attributes: true,
|
|
44
|
+
subtree: true,
|
|
45
|
+
attributeFilter: ['hidden'],
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const show = async ($b) => {
|
|
50
|
+
if ($b && $b.hidden) {
|
|
51
|
+
$b.dispatchEvent(new CustomEvent('dialog-show'));
|
|
52
|
+
|
|
53
|
+
disableScroll();
|
|
54
|
+
$b.hidden = false;
|
|
55
|
+
|
|
56
|
+
await Promise.all([
|
|
57
|
+
$b.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
58
|
+
duration: cssVar('--duration-enter-m'),
|
|
59
|
+
easing: cssVar('--easing-deceleration'),
|
|
60
|
+
}).finished,
|
|
61
|
+
$b
|
|
62
|
+
.querySelector('.dialog__wrapper')
|
|
63
|
+
.animate([{ transform: 'translateY(-15px)' }, { transform: 'translateY(0)' }], {
|
|
64
|
+
duration: cssVar('--duration-enter-m'),
|
|
65
|
+
easing: cssVar('--easing-deceleration'),
|
|
66
|
+
}).finished,
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
$b.dispatchEvent(new CustomEvent('dialog-shown'));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return new Promise((resolve) => {
|
|
73
|
+
resolve();
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const hide = async ($b) => {
|
|
78
|
+
if ($b && !$b.hidden) {
|
|
79
|
+
$b.dispatchEvent(new CustomEvent('dialog-hide'));
|
|
80
|
+
|
|
81
|
+
await Promise.all([
|
|
82
|
+
$b.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
83
|
+
duration: cssVar('--duration-leave-m'),
|
|
84
|
+
easing: cssVar('--easing-acceleration'),
|
|
85
|
+
}).finished,
|
|
86
|
+
$b
|
|
87
|
+
.querySelector('.dialog__wrapper')
|
|
88
|
+
.animate([{ transform: 'translateY(0)' }, { transform: 'translateY(-15px)' }], {
|
|
89
|
+
duration: cssVar('--duration-leave-m'),
|
|
90
|
+
easing: cssVar('--easing-acceleration'),
|
|
91
|
+
}).finished,
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
$b.hidden = true;
|
|
95
|
+
enableScroll();
|
|
96
|
+
$b.dispatchEvent(new CustomEvent('dialog-hidden'));
|
|
97
|
+
} else {
|
|
98
|
+
enableScroll();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const initDialogContent = ($b) => {
|
|
103
|
+
try {
|
|
104
|
+
window.__FORMIX__DIALOG__INIT_CONTENT($b);
|
|
105
|
+
} catch {
|
|
106
|
+
console.warn('Функция __FORMIX__DIALOG__INIT_CONTENT не установлена');
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const get = async (id, url) => {
|
|
111
|
+
if (url && url !== '#') {
|
|
112
|
+
showLoader();
|
|
113
|
+
try {
|
|
114
|
+
const response = await fetch(url, {
|
|
115
|
+
method: 'GET',
|
|
116
|
+
headers: {
|
|
117
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
118
|
+
'X-Session-Id': BX.message('bitrix_sessid'),
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
if (!response.ok) {
|
|
122
|
+
throw response;
|
|
123
|
+
}
|
|
124
|
+
let data = await response.text();
|
|
125
|
+
try {
|
|
126
|
+
data = JSON.parse(data);
|
|
127
|
+
if (is(data.redirect, 'String')) {
|
|
128
|
+
if (data.redirect.length > 0) {
|
|
129
|
+
location.assign(data.redirect);
|
|
130
|
+
clearLoaderTimeout();
|
|
131
|
+
} else {
|
|
132
|
+
location.reload();
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
try {
|
|
136
|
+
await window.__FORMIX__DIALOG__INIT_JSON();
|
|
137
|
+
} catch {
|
|
138
|
+
console.warn('Функция __FORMIX__DIALOG__INIT_JSON не установлена');
|
|
139
|
+
}
|
|
140
|
+
data = data.content || '';
|
|
141
|
+
}
|
|
142
|
+
} catch {} // eslint-disable-line no-empty
|
|
143
|
+
if (data.length > 0) {
|
|
144
|
+
const $b = document.querySelector(id);
|
|
145
|
+
$b.querySelector('.dialog__container').innerHTML = data;
|
|
146
|
+
await show($b);
|
|
147
|
+
hideLoader();
|
|
148
|
+
initDialogContent($b);
|
|
149
|
+
} else {
|
|
150
|
+
hideLoader();
|
|
151
|
+
}
|
|
152
|
+
} catch (error) {
|
|
153
|
+
if (error.status === 401) {
|
|
154
|
+
location.reload();
|
|
155
|
+
} else {
|
|
156
|
+
hideLoader();
|
|
157
|
+
errorHandler(error);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
const $b = document.querySelector(id);
|
|
162
|
+
show($b);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
let prevWindowHeight = window.innerHeight;
|
|
167
|
+
const resizeWindowListener = () => {
|
|
168
|
+
if (window.innerHeight !== prevWindowHeight) {
|
|
169
|
+
prevWindowHeight = window.innerHeight;
|
|
170
|
+
for (const $el of document.querySelectorAll('.dialog')) {
|
|
171
|
+
if (!$el.hidden) {
|
|
172
|
+
if (isDialogOverflow($el)) {
|
|
173
|
+
$el.classList.add('dialog_overflow');
|
|
174
|
+
} else {
|
|
175
|
+
$el.classList.remove('dialog_overflow');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
window.addEventListener('resize', _throttle(resizeWindowListener, 100));
|
|
182
|
+
|
|
183
|
+
let $pointerDownTarget;
|
|
184
|
+
document.body.addEventListener('pointerdown', (event) => {
|
|
185
|
+
const { target } = event;
|
|
186
|
+
if (target.closest('.dialog')) {
|
|
187
|
+
$pointerDownTarget = target;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
document.body.addEventListener('click', (event) => {
|
|
192
|
+
const { target } = event;
|
|
193
|
+
if (target.closest('[data-dialog]')) {
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
const $el = target.closest('[data-dialog]');
|
|
196
|
+
let url = $el.dataset.dialogFetch || $el.href;
|
|
197
|
+
if (url) {
|
|
198
|
+
url = new URL(url, location.origin);
|
|
199
|
+
}
|
|
200
|
+
get($el.dataset.dialog, url);
|
|
201
|
+
} else if (target.closest('[data-dialog-close]')) {
|
|
202
|
+
hide(target.closest('[data-dialog-close]').closest('.dialog'));
|
|
203
|
+
} else if (target.matches('.dialog') && target === $pointerDownTarget) {
|
|
204
|
+
/*
|
|
205
|
+
Человек может нажать кнопку в одном месте, а отжать в другом (например, при выделении),
|
|
206
|
+
поэтому проверяем, чтобы элементы pointerdown и click были одинаковыми
|
|
207
|
+
*/
|
|
208
|
+
hide(target);
|
|
209
|
+
$pointerDownTarget = undefined;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
document.body.addEventListener('keydown', (event) => {
|
|
214
|
+
if (event.key === 'Escape') {
|
|
215
|
+
const $el = [...document.querySelectorAll('.dialog')].filter((el) => !el.hidden);
|
|
216
|
+
|
|
217
|
+
if ($el.length > 0) {
|
|
218
|
+
hide($el.at(-1));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
});
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
|
|
3
|
+
$b: '.dialog';
|
|
4
|
+
|
|
5
|
+
#{$b} {
|
|
6
|
+
background-color: $dialog-backdrop-color;
|
|
7
|
+
height: calc(100% - var(--tab-bar-height));
|
|
8
|
+
left: 0;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
-webkit-overflow-scrolling: touch;
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
width: 100%;
|
|
14
|
+
z-index: 990;
|
|
15
|
+
|
|
16
|
+
@media (--tablet-landscape-up) {
|
|
17
|
+
align-items: center;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
height: 100%;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
padding: 4px * 10 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&_overflow {
|
|
26
|
+
@media (--tablet-landscape-up) {
|
|
27
|
+
justify-content: flex-start;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&_s {
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&_m {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&_l {
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__wrapper {
|
|
41
|
+
background-color: $dialog-bg;
|
|
42
|
+
color: $dialog-color;
|
|
43
|
+
min-height: 100%;
|
|
44
|
+
padding: 4px * 8 4px * 4;
|
|
45
|
+
width: 100%;
|
|
46
|
+
|
|
47
|
+
@media (--tablet-landscape-up) {
|
|
48
|
+
border-radius: $dialog-radius;
|
|
49
|
+
box-shadow: $dialog-shadow;
|
|
50
|
+
min-height: auto;
|
|
51
|
+
padding: 4px * 10;
|
|
52
|
+
position: relative;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#{$b}_overflow & {
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
min-height: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#{$b}_s & {
|
|
61
|
+
max-width: $dialog-s-max-width;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#{$b}_m & {
|
|
65
|
+
max-width: $dialog-m-max-width;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
#{$b}_l & {
|
|
69
|
+
max-width: $dialog-l-max-width;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__close {
|
|
74
|
+
align-items: center;
|
|
75
|
+
background-color: $dialog-bg;
|
|
76
|
+
border-radius: $dialog-close-radius;
|
|
77
|
+
color: $dialog-close-color;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
display: flex;
|
|
80
|
+
height: 4px * 10;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
position: fixed;
|
|
83
|
+
right: 4px * 2;
|
|
84
|
+
top: 4px * 2;
|
|
85
|
+
transition-duration: var(--duration-micro-s);
|
|
86
|
+
transition-property: color;
|
|
87
|
+
transition-timing-function: var(--easing-standard);
|
|
88
|
+
width: 4px * 10;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
|
|
91
|
+
@media (--tablet-landscape-up) {
|
|
92
|
+
position: absolute;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:hover,
|
|
96
|
+
&:focus-visible {
|
|
97
|
+
color: $dialog-close-active-color;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&__close-icon {
|
|
102
|
+
fill: currentcolor;
|
|
103
|
+
height: 4px * 5;
|
|
104
|
+
width: 4px * 5;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&__container {
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&__header {
|
|
111
|
+
align-items: center;
|
|
112
|
+
display: flex;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__header-image {
|
|
116
|
+
border: $dialog-header-image-border-width solid $dialog-header-image-border-color;
|
|
117
|
+
border-radius: $dialog-radius;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
height: 4px * 20;
|
|
120
|
+
margin-right: 4px * 6;
|
|
121
|
+
object-fit: contain;
|
|
122
|
+
width: 4px * 20;
|
|
123
|
+
|
|
124
|
+
@media (--tablet-portrait-down) {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (--desktop-up) {
|
|
129
|
+
height: 4px * 22;
|
|
130
|
+
width: 4px * 22;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__header-wrapper {
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__title {
|
|
138
|
+
width: calc(100% - 40px);
|
|
139
|
+
|
|
140
|
+
@include font($dialog-title-mobile-font);
|
|
141
|
+
|
|
142
|
+
@media (--tablet-landscape-up) {
|
|
143
|
+
width: auto;
|
|
144
|
+
|
|
145
|
+
@include font($dialog-title-desktop-font);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&__descr {
|
|
150
|
+
margin-top: 4px * 6;
|
|
151
|
+
max-width: 672px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&__form {
|
|
155
|
+
margin-top: 4px * 6;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&__product-table {
|
|
159
|
+
margin-top: 4px * 6;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&__action-list {
|
|
163
|
+
align-items: center;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
margin-top: 4px * 6;
|
|
167
|
+
|
|
168
|
+
@media (--tablet-landscape-up) {
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&_right {
|
|
173
|
+
@media (--tablet-landscape-up) {
|
|
174
|
+
justify-content: flex-end;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&__action-item {
|
|
180
|
+
max-width: 4px * 62;
|
|
181
|
+
white-space: normal;
|
|
182
|
+
|
|
183
|
+
&:not(:first-child) {
|
|
184
|
+
margin-top: 4px * 6;
|
|
185
|
+
|
|
186
|
+
@media (--tablet-landscape-up) {
|
|
187
|
+
margin-left: 4px * 6;
|
|
188
|
+
margin-top: 0;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&.button {
|
|
193
|
+
@media (--tablet-portrait-down) {
|
|
194
|
+
width: 100%;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use '../../variables' as *;
|
|
2
|
+
|
|
3
|
+
$b: '.empty-list';
|
|
4
|
+
|
|
5
|
+
#{$b} {
|
|
6
|
+
background-color: $empty-list-bg;
|
|
7
|
+
border-radius: $empty-list-radius;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
padding: 4px * 6 4px * 4;
|
|
11
|
+
|
|
12
|
+
@include dark-border;
|
|
13
|
+
|
|
14
|
+
@media (--tablet-landscape-up) {
|
|
15
|
+
align-items: center;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
padding: 4px * 10 4px * 6;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&_shadow {
|
|
21
|
+
box-shadow: $shadow;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__icon {
|
|
25
|
+
align-self: center;
|
|
26
|
+
fill: $empty-list-icon-color;
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
margin-bottom: 4px * 6;
|
|
29
|
+
width: 4px * 30;
|
|
30
|
+
|
|
31
|
+
@media (--tablet-landscape-up) {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
margin-right: 4px * 12;
|
|
34
|
+
width: 4px * 60;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__content {
|
|
39
|
+
flex-grow: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__title {
|
|
43
|
+
margin-bottom: 4px * 4;
|
|
44
|
+
|
|
45
|
+
@include font($empty-list-title-mobile-font);
|
|
46
|
+
|
|
47
|
+
@media (--tablet-landscape-up) {
|
|
48
|
+
@include font($empty-list-title-desktop-font);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&__descr {
|
|
53
|
+
max-width: 4px * 150;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__action {
|
|
57
|
+
margin-top: 4px * 4;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__footer {
|
|
61
|
+
border-top: $empty-list-footer-separator-width solid $empty-list-footer-separator-color;
|
|
62
|
+
margin-top: 4px * 4;
|
|
63
|
+
padding-top: 4px * 4;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__action-list {
|
|
67
|
+
#{$b}__descr + & {
|
|
68
|
+
margin-top: 4px * 4;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__action-item {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&__action-link {
|
|
76
|
+
align-items: center;
|
|
77
|
+
display: flex;
|
|
78
|
+
padding-bottom: 4px * 2;
|
|
79
|
+
padding-top: 4px * 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__action-icon {
|
|
83
|
+
fill: $empty-list-action-icon-color;
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
height: 4px * 6;
|
|
86
|
+
margin-right: 4px * 2;
|
|
87
|
+
transition-duration: var(--duration-micro-s);
|
|
88
|
+
transition-property: color;
|
|
89
|
+
transition-timing-function: var(--easing-standard);
|
|
90
|
+
width: 4px * 6;
|
|
91
|
+
|
|
92
|
+
#{$b}__action-link:hover &,
|
|
93
|
+
#{$b}__action-link:focus-visible & {
|
|
94
|
+
fill: $empty-list-action-icon-active-color;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use '../../variables' as *;
|
|
3
|
+
|
|
4
|
+
$b: '.file-input';
|
|
5
|
+
|
|
6
|
+
#{$b} {
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: $file-input-bg;
|
|
9
|
+
border: $file-input-border-width solid $file-input-border-color;
|
|
10
|
+
border-radius: $file-input-radius;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
max-width: 4px * 96;
|
|
15
|
+
padding: 4px * 5 4px * 4;
|
|
16
|
+
transition-duration: var(--duration-micro-s);
|
|
17
|
+
transition-property: background-color, border-color;
|
|
18
|
+
transition-timing-function: var(--easing-standard);
|
|
19
|
+
|
|
20
|
+
&_dragover {
|
|
21
|
+
background-color: $file-input-dragover-bg;
|
|
22
|
+
border-color: $file-input-dragover-border-color;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__descr {
|
|
26
|
+
color: $file-input-descr-color;
|
|
27
|
+
margin-top: 4px * 4;
|
|
28
|
+
text-align: center;
|
|
29
|
+
|
|
30
|
+
@include font($file-input-descr-font);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__file-list {
|
|
34
|
+
margin-top: 4px * 4;
|
|
35
|
+
width: 100%;
|
|
36
|
+
|
|
37
|
+
&:empty {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__file {
|
|
43
|
+
align-items: center;
|
|
44
|
+
background-color: $file-input-file-bg;
|
|
45
|
+
border-radius: $file-input-file-radius;
|
|
46
|
+
display: flex;
|
|
47
|
+
min-height: 4px * 11;
|
|
48
|
+
padding: 4px * 3;
|
|
49
|
+
transition-duration: var(--duration-micro-s);
|
|
50
|
+
transition-property: background-color;
|
|
51
|
+
transition-timing-function: var(--easing-standard);
|
|
52
|
+
|
|
53
|
+
&:not(:first-child) {
|
|
54
|
+
margin-top: 4px * 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#{$b}_dragover & {
|
|
58
|
+
background-color: $file-input-dragover-file-bg;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__file-wrapper {
|
|
63
|
+
width: calc(100% - 28px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__file-name {
|
|
67
|
+
color: $file-input-file-name-color;
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
transition-duration: var(--duration-micro-s);
|
|
72
|
+
transition-property: opacity;
|
|
73
|
+
transition-timing-function: var(--easing-standard);
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
|
|
76
|
+
@include font($file-input-file-name-font);
|
|
77
|
+
|
|
78
|
+
#{$b}__file_active & {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__file-error {
|
|
84
|
+
color: $file-input-file-error-color;
|
|
85
|
+
margin-top: 4px;
|
|
86
|
+
|
|
87
|
+
@include font($file-input-file-error-font);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__remove {
|
|
91
|
+
align-items: center;
|
|
92
|
+
color: $file-input-remove-color;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
margin-left: 4px * 2;
|
|
97
|
+
transition-duration: var(--duration-micro-s);
|
|
98
|
+
transition-property: color;
|
|
99
|
+
transition-timing-function: var(--easing-standard);
|
|
100
|
+
|
|
101
|
+
&:hover,
|
|
102
|
+
&:focus-visible {
|
|
103
|
+
color: $file-input-remove-active-color;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&__icon {
|
|
108
|
+
fill: currentcolor;
|
|
109
|
+
height: 4px * 4;
|
|
110
|
+
width: 4px * 4;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&__loader {
|
|
114
|
+
container-type: size;
|
|
115
|
+
height: 4px * 5;
|
|
116
|
+
margin-left: 4px * 2;
|
|
117
|
+
width: 4px * 5;
|
|
118
|
+
}
|
|
119
|
+
}
|