@topvisor/ui 0.0.13 → 0.0.14

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 (57) hide show
  1. package/.chunks/forms-1b3f76e9.es.js +410 -0
  2. package/.chunks/forms-1b3f76e9.es.js.map +1 -0
  3. package/.chunks/forms-512abfa7.amd.js +413 -0
  4. package/.chunks/forms-512abfa7.amd.js.map +1 -0
  5. package/README.md +62 -85
  6. package/{l/common → common}/common.amd.js +0 -1
  7. package/{l/common → common}/common.amd.js.map +1 -1
  8. package/{l/common → common}/common.js +0 -1
  9. package/{l/common → common}/common.js.map +1 -1
  10. package/core.css +442 -371
  11. package/dark.css +127 -115
  12. package/forms/forms.amd.js +11 -0
  13. package/forms/forms.amd.js.map +1 -0
  14. package/forms/forms.js +11 -0
  15. package/forms/forms.js.map +1 -0
  16. package/{c/style.css → forms.css} +301 -252
  17. package/helpers/helpers.amd.js +6 -0
  18. package/helpers/helpers.amd.js.map +1 -0
  19. package/helpers/helpers.js +6 -0
  20. package/helpers/helpers.js.map +1 -0
  21. package/icomoon/demo-files/Read Me.txt +7 -7
  22. package/icomoon/demo-files/demo.css +161 -161
  23. package/icomoon/demo-files/demo.js +30 -30
  24. package/icomoon/demo.html +2931 -2931
  25. package/icomoon/fonts/Topvisor-2.svg +231 -231
  26. package/icomoon/style.css +644 -644
  27. package/light.css +127 -128
  28. package/package.json +19 -19
  29. package/c/_plugin-vue_export-helper-cb5c78ba.js +0 -12
  30. package/c/_plugin-vue_export-helper-cb5c78ba.js.map +0 -1
  31. package/c/_plugin-vue_export-helper-cc2b3d55.js +0 -11
  32. package/c/_plugin-vue_export-helper-cc2b3d55.js.map +0 -1
  33. package/c/button/button.amd.js +0 -99
  34. package/c/button/button.amd.js.map +0 -1
  35. package/c/button/button.js +0 -100
  36. package/c/button/button.js.map +0 -1
  37. package/c/checkbox/checkbox.amd.js +0 -58
  38. package/c/checkbox/checkbox.amd.js.map +0 -1
  39. package/c/checkbox/checkbox.js +0 -59
  40. package/c/checkbox/checkbox.js.map +0 -1
  41. package/c/example/example.amd.js +0 -35
  42. package/c/example/example.amd.js.map +0 -1
  43. package/c/example/example.js +0 -36
  44. package/c/example/example.js.map +0 -1
  45. package/c/icon/icon.amd.js +0 -22
  46. package/c/icon/icon.amd.js.map +0 -1
  47. package/c/icon/icon.js +0 -22
  48. package/c/icon/icon.js.map +0 -1
  49. package/c/radio/radio.amd.js +0 -49
  50. package/c/radio/radio.amd.js.map +0 -1
  51. package/c/radio/radio.js +0 -50
  52. package/c/radio/radio.js.map +0 -1
  53. package/l/forms/forms.amd.js +0 -206
  54. package/l/forms/forms.amd.js.map +0 -1
  55. package/l/forms/forms.js +0 -205
  56. package/l/forms/forms.js.map +0 -1
  57. package/l/style.css +0 -352
package/core.css CHANGED
@@ -201,374 +201,445 @@
201
201
  --color-top-50: #A6E0A3;
202
202
  --color-top-100: #C7D7D7;
203
203
  --color-top-10000: #FCC94A;
204
- }.top-comment {
205
- color: var(--color-gray-350);
206
- font-size: 12px;
207
- }
208
-
209
- .top-title {
210
- margin: 1em 0;
211
- font-weight: 600;
212
- }:root {
213
- --top-font-size: 14px;
214
-
215
- --top-forms-radius: 8px;
216
- --top-forms-border-width: 1px;
217
- --top-style_outline-color: transparent;
218
-
219
- --top-forms-base-height: 32px;
220
- /* базовая высота поля, должна быть одинаковой у всех форм в одном контексте */
221
- --top-forms-base-height_l: 36px;
222
- --top-forms-base-height_xl: 40px;
223
-
224
- --top-forms-padding: 8px;
225
- --top-forms-padding_l: 12px;
226
- --top-forms-padding_xl: 16px;
227
-
228
- --top-forms-padding_xl: 16px;
229
-
230
- /* top-radio */
231
- --top-radio-color: var(--color-primary);
232
- --top-radio-color-hover: var(--color-primary-2);
233
- }
234
-
235
- /* common wrappers */
236
- .top-input,
237
- .top-radio.top-radio-system,
238
- .top-radio.top-radio-is_sign,
239
- .top-select,
240
- .top-selectorGroup{
241
- height: auto; min-height: var(--top-forms-base-height); max-width: 100%;
242
- vertical-align: middle;
243
- display: inline-flex; align-items: center;
244
- }
245
-
246
- button,
247
- input,
248
- textarea,
249
- select{
250
- border: 1px solid var(--top-forms-border-color);
251
- color: var(--top-forms-color);
252
- font-size: var(--top-font-size);
253
- font-family: inherit;
254
- }
255
-
256
- .top-button,
257
- .top-input_input,
258
- .top-checkbox_input,
259
- .top-radio_input,
260
- textarea.top-el,
261
- .top-select_select {
262
- display: inline-block;
263
- vertical-align: middle;
264
- appearance: none;
265
- -webkit-appearance: none;
266
- }
267
-
268
- .top-input_input,
269
- textarea.top-el,
270
- .top-select_select {
271
- border: 1px solid var(--top-forms-border-color);
272
- color: var(--top-forms-color);
273
- }
274
-
275
- /* placeholder для textarea */
276
- [contenteditable][placeholder]:empty:before {
277
- content: attr(placeholder);
278
- color: var(--color-text-secondary);
279
- }
280
-
281
- [type="text"].top-el,
282
- [type="number"].top-el,
283
- [type="date"].top-el,
284
- [type="email"].top-el,
285
- [type="password"].top-el,
286
- textarea.top-el,
287
- select.top-el,
288
- .top-button {
289
- box-sizing: border-box;
290
- border-radius: var(--top-forms-radius);
291
- border: var(--top-forms-border-width) solid var(--top-forms-border-color);
292
- height: var(--top-forms-base-height);
293
- padding: 0;
294
- padding-right: calc(var(--top-forms-padding) + var(--top-forms_clear-width) + var(--top-select_arrow-width));
295
- padding-left: calc(max(var(--top-forms-padding), var(--top-icon-both-width)));
296
-
297
- transition: border-color 150ms;
298
- }
299
-
300
- [type="text"].top-el,
301
- [type="number"].top-el,
302
- [type="date"].top-el,
303
- [type="email"].top-el,
304
- [type="password"].top-el,
305
- [type="checkbox"].top-el,
306
- [type="radio"].top-el,
307
- textarea.top-el,
308
- .top-input,
309
- select.top-el,
310
- i.top-el,
311
- span.top-el {
312
- color: var(--top-forms-color);
313
- white-space: nowrap;
314
- display: inline-flex;
315
- }
316
-
317
- [type="checkbox"][class*="top"],
318
- [type="radio"][class*="top"] {
319
- padding: 8px 0;
320
- line-height: 1.3;
321
- }
322
-
323
- .top-button:not(:disabled):focus-visible,
324
- [type="checkbox"]:focus-visible,
325
- [type="radio"]:focus-visible {
326
- outline: 2px solid var(--top-radio-color);
327
- outline-offset: 2px;
328
- position: relative;
329
- z-index: 1;
330
- }
331
-
332
- [type="checkbox"]:before,
333
- [type="checkbox"]:after,
334
- [type="radio"]:before,
335
- [type="radio"]:after,
336
- .top-select:before {
337
- vertical-align: middle;
338
- display: inline-block;
339
- }
340
-
341
- /* [type="checkbox"].top-el,
342
- [type="radio"].top-el{
343
- background: none; width: auto; height: auto; min-height: var(--top-forms-base-height);
344
- text-indent: 0;
345
- } */
346
-
347
- /* label checkbox, label radio */
348
- label.top-checkbox,
349
- label.top-radio {
350
- cursor: pointer;
351
- padding: 8px 0;
352
- color: var(--top-forms-color);
353
- line-height: 1.3;
354
- display: inline-flex;
355
- align-items: flex-start;
356
- gap: 8px;
357
- }
358
-
359
- label.top-checkbox > [type="checkbox"][class*="top"],
360
- label.top-radio > [type="radio"][class*="top"] {
361
- min-height: unset !important;
362
- padding: 0;
363
- margin: 0;
364
- }
365
-
366
- .top-checkbox_caption[data-top-icon]:before,
367
- .top-radio_caption[data-top-icon]:before {
368
- height: 16px;
369
- }
370
-
371
- /* checkbox, radio */
372
- [type="checkbox"].top-el,
373
- [type="radio"].top-el {
374
- cursor: pointer;
375
- border: none;
376
- white-space: normal;
377
- }
378
- [type="checkbox"].top-el:before,
379
- [type="radio"].top-el:before {
380
- flex-shrink: 0;
381
- }
382
- [type="checkbox"][title].top-el:after,
383
- [type="checkbox"][title].top-checkbox_input-switcher:after,
384
- [type="radio"][title].top-el:after {
385
- content: attr(title);
386
- margin-left: 8px;
387
- }
388
-
389
- [type="checkbox"][data-top-icon]:not(.top-checkbox_input-switcher),
390
- [type="radio"][data-top-icon]:not(.top-radioGroup_item) {
391
- --top-icon-size: 24px;
392
- }
393
- [type="checkbox"][data-top-icon]:not(.top-checkbox_input-switcher):before,
394
- [type="radio"][data-top-icon]:not(.top-radioGroup_item):before {
395
- text-indent: calc(18px + 4px);
396
- }
397
- [type="checkbox"][data-top-icon].top-el:not(.top-checkbox_input-switcher):after,
398
- [type="radio"][data-top-icon].top-el:not(.top-radioGroup_item):after {
399
- text-indent: var(--top-icon-both-width);
400
- }
401
-
402
- /* убрать ширину добавляемых элементов */
403
- label.top-el[data-top-icon],
404
- label.top-el[data-top-icon2] {
405
- position: relative;
406
- }
407
- label.top-el[data-top-icon]:before,
408
- label.top-el[data-top-icon2]:after {
409
- position: absolute;
410
- z-index: 3;
411
- }
412
- label.top-el[data-top-icon][data-top-icon2]:after {
413
- left: calc(var(--top-icon-width));
414
- }:root {
415
- --top-icon-size: 0px;
416
- --top-icon-width: 0px;
417
-
418
- --top-icon2-size: 0px;
419
- --top-icon2-width: 0px;
420
-
421
- --top-icon-both-width: 0px;
422
- }
423
-
424
- /* data-top-icon */
425
- [data-top-icon] {
426
- --top-icon-size: 24px;
427
- --top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));
428
- --top-icon-color: inherit;
429
- }
430
- [data-top-icon2] {
431
- --top-icon2-size: 24px;
432
- --top-icon2-width: calc(var(--top-icon2-size) + 8px);
433
- --top-icon2-color: inherit;
434
- }
435
- [data-top-icon=""] {
436
- --top-icon-width: 0px;
437
- }
438
- [data-top-icon2=""] {
439
- --top-icon2-width: 0px;
440
- }
441
-
442
- [data-top-icon]:before,
443
- [data-top-icon2]:after {
444
- pointer-events: none;
445
- content: attr(data-top-icon);
446
- border-radius: var(--top-forms-radius);
447
- width: var(--top-icon-width);
448
- color: var(--top-icon-color);
449
- font-family: Topvisor-2;
450
- font-size: var(--top-icon-size);
451
- font-weight: 400;
452
- line-height: 1;
453
- display: inline-flex;
454
- align-items: center;
455
- justify-content: center;
456
- flex-shrink: 0;
457
- }
458
- [data-top-icon2]:after {
459
- content: attr(data-top-icon2);
460
- width: var(--top-icon2-width);
461
- color: var(--top-icon2-color);
462
- font-size: var(--top-icon2-size);
463
- }
464
-
465
- /* ширина добавляемых элементов */
466
- [data-top-icon],
467
- [data-top-icon2] {
468
- --top-icon-both-width: calc(var(--top-icon-width) + var(--top-icon2-width));
469
- }
470
-
471
- [data-top-icon=""]:before {
472
- font-family: Topvisor;
473
- }.top-ellipsis {
474
- max-height: 100%;
475
- text-overflow: ellipsis;
476
- overflow: hidden;
477
- line-height: 1.23;
478
- flex-grow: 1;
479
- }
480
- .top-ellipsis2,
481
- .top-ellipsis3 {
482
- max-width: fit-content;
483
- display: -webkit-box;
484
- -webkit-line-clamp: 2;
485
- -webkit-box-orient: vertical;
486
- overflow: hidden;
487
- }
488
- .top-ellipsis3 {
489
- -webkit-line-clamp: 3;
490
- }/* top-inited используется для блокировки элементов, js к которым еще не привязан, настраивается в каждом модуле отдельно */
491
- .top-inited {}
492
-
493
- .top-hidden {
494
- display: none !important;
495
- }
496
-
497
- /* top-unvisible используется для скрытия элементов, без изменения видимости */
498
- .top-unvisible {
499
- width: 0;
500
- height: 0;
501
- overflow: hidden;
502
- position: absolute;
503
- }
504
-
505
- .top-loading {}
506
-
507
- .top-disabled {
508
- pointer-events: none;
509
- }
510
-
511
- .top-error,
512
- .top-error::placeholder,
513
- .top-error:before {
514
- --top-forms-border-color: var(--color-negative);
515
-
516
- border-color: var(--color-negative);
517
- }
518
- .top-error {
519
- --top-icon-color: var(--color-negative);
520
-
521
- color: var(--color-negative);
522
- }
523
- .top-error ~ .top-forms-caption {
524
- color: var(--color-negative);
525
- }
526
-
527
- .top-warning {
528
- --top-icon-color: var(--color-orange-500);
529
-
530
- color: var(--color-orange-500);
531
- }
532
-
533
- input.top-error {
534
- animation: top-error 0.3s;
535
- }
536
-
537
- @keyframes top-error {
538
- 0% {}
539
- 30% {
540
- box-shadow: inset var(--color-red-200) 0 0 20px;
541
- }
542
- 100% {}
543
- }@media only screen and (min-width: 900px) {
544
- .top-only-mobile {
545
- display: none !important;
546
- }
547
- }
548
- @media only screen and (max-width: 900px) {
549
- .top-only-pc {
550
- display: none !important;
551
- }
552
- }
553
-
554
- html:not([lang="ru"]) .top-only-ru,
555
- html:not([lang="en"]) .top-only-en {
556
- display: none !important;
557
- }
558
-
559
- html[data-is_admin="0"] .top-only-admin {
560
- display: none !important;
561
- }/* TODO: перенести в компонент */
562
- .top-select_arrow{
563
- --top-select_arrow-color: var(--color-gray-600);
564
- --top-select_arrow-size: 12px;
565
- --top-select_arrow-width: 24px;
566
-
567
- background-image: url("data:image/svg+xml,%3Csvg width='16' height='9' viewBox='0 0 16 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.293 0.29269L8 6.5857L1.70704 0.29269C1.31679 -0.0975633 0.682937 -0.0975633 0.292687 0.29269C-0.0975624 0.682943 -0.0975624 1.31656 0.292687 1.70682L7.29294 8.70713C7.68343 9.09762 8.31657 9.09762 8.70706 8.70713L15.7073 1.70682C16.0976 1.31656 16.0976 0.682943 15.7073 0.29269C15.3171 -0.0975633 14.6832 -0.0975633 14.293 0.29269Z' fill='%23808A99'/%3E%3C/svg%3E");
568
- background-size: 14px;
569
- background-position: calc(100% - var(--top-forms-padding)) 50%;
570
- background-repeat: no-repeat;
571
- padding-right: 32px;
572
- }
573
-
574
- .top-select_arrow ~ [data-action="top-input_clear"]{ --top-select_arrow-width: 24px; }
204
+ }:root {
205
+ --top-padding-1: 4px;
206
+ --top-padding-2: 8px;
207
+ --top-padding-3: 12px;
208
+ --top-padding-4: 16px;
209
+ --top-padding-5: 20px;
210
+ --top-padding-6: 24px;
211
+ --top-padding-7: 28px;
212
+ --top-padding-8: 32px;
213
+ --top-padding-9: 36px;
214
+ --top-padding-10: 40px;
215
+ --top-padding-11: 44px;
216
+ --top-padding-12: 48px;
217
+
218
+ --top-gap-1: 4px;
219
+ --top-gap-2: 8px;
220
+ --top-gap-3: 12px;
221
+ --top-gap-4: 16px;
222
+ --top-gap-5: 20px;
223
+ --top-gap-6: 24px;
224
+ --top-gap-7: 28px;
225
+ --top-gap-8: 32px;
226
+ --top-gap-9: 36px;
227
+ --top-gap-10: 40px;
228
+ --top-gap-11: 44px;
229
+ --top-gap-12: 48px;
230
+
231
+ --top-radius-1: 4px;
232
+ --top-radius-2: 8px;
233
+ --top-radius-3: 12px;
234
+ --top-radius-4: 16px;
235
+ --top-radius-5: 20px;
236
+ --top-radius-6: 24px;
237
+ --top-radius-7: 28px;
238
+ --top-radius-8: 32px;
239
+ --top-radius-9: 36px;
240
+ --top-radius-10: 40px;
241
+ --top-radius-11: 44px;
242
+ --top-radius-12: 48px;
243
+ }.top-comment {
244
+ color: var(--color-gray-350);
245
+ font-size: 12px;
246
+ }
247
+
248
+ .top-title {
249
+ margin: 1em 0;
250
+ font-weight: 600;
251
+ }
252
+
253
+ /* formsCaption */
254
+ :root {
255
+ --top-formsCaption-offset: 16px;
256
+ }
257
+
258
+ .top-formsCaptionWrapper {
259
+ padding-top: 20px;
260
+ }
261
+
262
+ .top-formsCaption {
263
+ pointer-events: none;
264
+ width: calc(100% - var(--top-forms-padding) - var(--top-icon-both-width) - var(--top-forms_clear-width) - var(--top-select_arrow-width));
265
+ padding: 0 var(--top-forms-padding);
266
+ color: var(--color-placeholder);
267
+ white-space: nowrap;
268
+ text-overflow: ellipsis;
269
+ transform: translate(var(--top-icon-both-width), 0);
270
+ position: absolute;
271
+ overflow: hidden;
272
+ transition: 0.1s;
273
+ }
274
+ .top-error ~ .top-formsCaption {
275
+ transition: 0.1s 0.1s;
276
+ }
277
+ /* перефокусировка на поле не должна влиять на отображении заголовка */
278
+ .top-formsCaption * {
279
+ pointer-events: auto;
280
+ }
281
+
282
+ .top-formsCaptionWrapper > input:not([readonly]):focus ~ .top-formsCaption,
283
+ .top-formsCaptionWrapper > input:not(:placeholder-shown) ~ .top-formsCaption,
284
+ .top-formsCaptionWrapper > textarea:not(:placeholder-shown) ~ .top-formsCaption,
285
+ .top-formsCaptionWrapper.top-select > .top-formsCaption,
286
+ .top-formsCaptionWrapper.top-inputRange > .top-formsCaption,
287
+ .top-formsCaptionWrapper-always > .top-formsCaption {
288
+ width: 100%;
289
+ padding: 0;
290
+ color: var(--color-placeholder-active);
291
+ font-size: 11px;
292
+ transform: translate(0, calc(-1em - var(--top-formsCaption-offset)));
293
+ transition: 0.1s;
294
+ }:root {
295
+ --top-font-size: 14px;
296
+
297
+ --top-forms-radius: 8px;
298
+ --top-forms-border-width: 1px;
299
+ --top-style_outline-color: transparent;
300
+
301
+ --top-forms-base-height_s: 32px;
302
+ --top-forms-base-height_l: 36px;
303
+ --top-forms-base-height_xl: 40px;
304
+
305
+ /* высота поля, должна быть одинаковой у всех форм в одном контексте */
306
+ --top-forms-base-height: var(--top-forms-base-height_s);
307
+
308
+ --top-forms-padding: 8px;
309
+ --top-forms-padding_l: 12px;
310
+ --top-forms-padding_xl: 16px;
311
+
312
+ /* forms control */
313
+ --top-forms-option-height: 24px;
314
+ --top-forms-option-color: var(--color-primary);
315
+ --top-forms-option-color-hover: var(--color-primary-2);
316
+
317
+ --top-select_arrow-width: 0px;
318
+ --top-forms_clear-width: 0px;
319
+ }
320
+
321
+ .top-size_s {
322
+ --top-forms-base-height: var(--top-forms-base-height_s);
323
+ }
324
+
325
+ .top-size_l {
326
+ --top-forms-base-height: var(--top-forms-base-height_l);
327
+ }
328
+
329
+ .top-size_xl {
330
+ --top-forms-base-height: var(--top-forms-base-height_xl);
331
+ }
332
+
333
+ /* clear css */
334
+ button,
335
+ input,
336
+ textarea,
337
+ select {
338
+ border: 1px solid var(--top-forms-border-color);
339
+ color: var(--color-text);
340
+ font-size: var(--top-font-size);
341
+ font-family: inherit;
342
+ }
343
+
344
+ :placeholder {
345
+ color: var(--color-placeholder);
346
+ }
347
+
348
+ [contenteditable][placeholder]:empty:before {
349
+ content: attr(placeholder);
350
+ color: var(--color-text-secondary);
351
+ }
352
+
353
+ /* focusable */
354
+ .top-forms-focusable:focus-visible {
355
+ outline: calc(var(--top-forms-border-width) * 2) solid var(--top-forms-option-color);
356
+ outline-offset: 2px;
357
+ position: relative;
358
+ z-index: 1;
359
+ transition: border-color 150ms;
360
+ }
361
+
362
+ /* focusable hover */
363
+ .top-forms-focusable:hover,
364
+ .top-forms-focusable:focus,
365
+ textarea.top-el:not(:disabled):not([readonly]):hover,
366
+ textarea.top-el:not(:disabled):not([readonly]):focus,
367
+ select.top-el:not(:disabled):hover,
368
+ select.top-el:not(:disabled):hover ~ [data-action="top-select_changer"],
369
+ select.top-el:not(:disabled):focus {
370
+ --top-forms-border-color: var(--top-forms-border-color-hover);
371
+ --top-forms-background-color: var(--top-forms-background-color-hover);
372
+ }
373
+
374
+ /* checkbox, radio, switcher */
375
+ .top-forms-optionWrapper {
376
+ cursor: pointer;
377
+ padding: 8px 0;
378
+ color: var(--color-text);
379
+ line-height: 1.3;
380
+ display: inline-flex;
381
+ align-items: flex-start;
382
+ gap: 4px;
383
+ }
384
+
385
+ .top-forms-option {
386
+ cursor: pointer;
387
+ padding: 0;
388
+ margin: 3px;
389
+ display: inline-flex;
390
+ flex-shrink: 0;
391
+ appearance: none;
392
+ -webkit-appearance: none;
393
+ }
394
+
395
+ /* input, textarea, select */
396
+ .top-input_input,
397
+ textarea.top-el,
398
+ select.top-el {
399
+ box-sizing: border-box;
400
+ border-radius: var(--top-forms-radius);
401
+ border: var(--top-forms-border-width) solid var(--top-forms-border-color);
402
+ height: var(--top-forms-base-height);
403
+ padding: 0;
404
+ padding-right: calc(var(--top-forms-padding) + var(--top-forms_clear-width) + var(--top-select_arrow-width));
405
+ padding-left: calc(max(var(--top-forms-padding), var(--top-icon-both-width)));
406
+ display: inline-flex;
407
+ appearance: none;
408
+ -webkit-appearance: none;
409
+ }
410
+
411
+ /* TODO: select */
412
+ .top-select {
413
+ cursor: pointer;
414
+ width: 180px;
415
+ }
416
+
417
+ .top-select:before {
418
+ vertical-align: middle;
419
+ display: inline-block;
420
+ }
421
+
422
+ select.top-el,
423
+ label.top-select_arrow {
424
+ background-color: var(--top-forms-background-color);
425
+ }
426
+
427
+ select.top-el:not(:disabled):focus-visible,
428
+ [contenteditable]:focus-visible,
429
+ .top-selector-multiselect:focus-within {
430
+ outline: 2px solid var(--color-blue-100);
431
+ }
432
+
433
+ /* disabled */
434
+ :disabled,
435
+ :disabled ~ .top-formsCaption,
436
+ .top-disabled[data-top-icon]:before,
437
+ .top-disabled[data-top-icon2]:after {
438
+ cursor: default;
439
+ opacity: 0.5;
440
+ filter: grayscale(100%);
441
+ pointer-events: none;
442
+ }
443
+
444
+ /* убрать ширину добавляемых элементов */
445
+ label[data-top-icon],
446
+ label[data-top-icon2] {
447
+ position: relative;
448
+ }
449
+ label[data-top-icon]:before,
450
+ label[data-top-icon2]:after {
451
+ position: absolute;
452
+ z-index: 3;
453
+ }
454
+ label[data-top-icon][data-top-icon2]:after {
455
+ left: calc(var(--top-icon-width));
456
+ }
457
+
458
+ /* text cleaner */
459
+ .top-cleaner[data-top-icon] {
460
+ --top-icon-size: 20px;
461
+ --top-icon-width: 20px;
462
+ --top-icon-color: var(--color-text-secondary);
463
+
464
+ cursor: pointer;
465
+ border-radius: 50%;
466
+ width: 30px;
467
+ height: 24px;
468
+ margin-left: calc(-30px - 4px);
469
+ transform: translateX(calc(0px - var(--top-forms-border-width) - var(--top-select_arrow-width)));
470
+ display: flex;
471
+ align-items: center;
472
+ justify-content: center;
473
+ position: relative;
474
+ z-index: 1;
475
+ }
476
+ .top-cleaner[data-top-icon]:hover {
477
+ --top-icon-color: var(--color-text-secondary-2);
478
+ }:root {
479
+ --top-icon-size: 24px;
480
+ --top-icon-width: 0px;
481
+
482
+ --top-icon2-size: 24px;
483
+ --top-icon2-width: 0px;
484
+
485
+ --top-icon-both-width: 0px;
486
+ }
487
+
488
+ /* data-top-icon */
489
+ [data-top-icon] {
490
+ --top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));
491
+ --top-icon-color: inherit;
492
+ }
493
+ [data-top-icon2] {
494
+ --top-icon2-width: calc(var(--top-icon2-size) + 8px);
495
+ --top-icon2-color: inherit;
496
+ }
497
+ [data-top-icon=""] {
498
+ --top-icon-width: 0px;
499
+ }
500
+ [data-top-icon2=""] {
501
+ --top-icon2-width: 0px;
502
+ }
503
+
504
+ [data-top-icon]:before,
505
+ [data-top-icon2]:after {
506
+ pointer-events: none;
507
+ content: attr(data-top-icon);
508
+ border-radius: var(--top-forms-radius);
509
+ width: var(--top-icon-width);
510
+ color: var(--top-icon-color);
511
+ font-family: Topvisor-2;
512
+ font-size: var(--top-icon-size);
513
+ font-weight: 400;
514
+ line-height: 1;
515
+ display: inline-flex;
516
+ align-items: center;
517
+ justify-content: center;
518
+ flex-shrink: 0;
519
+ }
520
+ [data-top-icon2]:after {
521
+ content: attr(data-top-icon2);
522
+ width: var(--top-icon2-width);
523
+ color: var(--top-icon2-color);
524
+ font-size: var(--top-icon2-size);
525
+ }
526
+
527
+ /* ширина добавляемых элементов */
528
+ [data-top-icon],
529
+ [data-top-icon2] {
530
+ --top-icon-both-width: calc(var(--top-icon-width) + var(--top-icon2-width));
531
+ }
532
+
533
+ [data-top-icon=""]:before {
534
+ font-family: Topvisor;
535
+ }.top-ellipsis {
536
+ max-height: 100%;
537
+ text-overflow: ellipsis;
538
+ overflow: hidden;
539
+ line-height: 1.23;
540
+ flex-grow: 1;
541
+ }
542
+ .top-ellipsis2,
543
+ .top-ellipsis3 {
544
+ max-width: fit-content;
545
+ display: -webkit-box;
546
+ -webkit-line-clamp: 2;
547
+ -webkit-box-orient: vertical;
548
+ overflow: hidden;
549
+ }
550
+ .top-ellipsis3 {
551
+ -webkit-line-clamp: 3;
552
+ }/* top-inited используется для блокировки элементов, js к которым еще не привязан, настраивается в каждом модуле отдельно */
553
+ .top-inited {}
554
+
555
+ .top-hidden {
556
+ display: none !important;
557
+ }
558
+
559
+ /* top-unvisible используется для скрытия элементов, без изменения видимости */
560
+ .top-unvisible {
561
+ width: 0;
562
+ height: 0;
563
+ overflow: hidden;
564
+ position: absolute;
565
+ }
566
+
567
+ .top-loading {}
568
+
569
+ .top-disabled {
570
+ pointer-events: none;
571
+ }
572
+
573
+ .top-error,
574
+ .top-error::placeholder,
575
+ .top-error:before {
576
+ --top-forms-border-color: var(--color-negative);
577
+
578
+ border-color: var(--color-negative);
579
+ }
580
+ .top-error {
581
+ --top-icon-color: var(--color-negative);
582
+
583
+ color: var(--color-negative);
584
+ }
585
+ .top-error ~ .top-formsCaption {
586
+ color: var(--color-negative);
587
+ }
588
+
589
+ .top-warning {
590
+ --top-icon-color: var(--color-orange-500);
591
+
592
+ color: var(--color-orange-500);
593
+ }
594
+
595
+ input.top-error {
596
+ animation: top-error 0.8s;
597
+ }
598
+
599
+ @keyframes top-error {
600
+ 0% {
601
+ outline-offset: 10px;
602
+ outline: 3px solid transparent;
603
+ }
604
+ 50% {
605
+ outline: 3px solid var(--color-red-100);
606
+ outline-offset: 2px;
607
+ }
608
+ 100% {
609
+ outline: 3px solid transparent;
610
+ outline-offset: 2px;
611
+ }
612
+ }@media only screen and (min-width: 900px) {
613
+ .top-only-mobile {
614
+ display: none !important;
615
+ }
616
+ }
617
+ @media only screen and (max-width: 900px) {
618
+ .top-only-pc {
619
+ display: none !important;
620
+ }
621
+ }
622
+
623
+ html:not([lang="ru"]) .top-only-ru,
624
+ html:not([lang="en"]) .top-only-en {
625
+ display: none !important;
626
+ }
627
+
628
+ html[data-is_admin="0"] .top-only-admin {
629
+ display: none !important;
630
+ }/* TODO: перенести в компонент */
631
+ .top-select_arrow {
632
+ --top-select_arrow-color: var(--color-gray-600);
633
+ --top-select_arrow-size: 12px;
634
+ --top-select_arrow-width: 24px;
635
+
636
+ background-image: url("data:image/svg+xml,%3Csvg width='16' height='9' viewBox='0 0 16 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.293 0.29269L8 6.5857L1.70704 0.29269C1.31679 -0.0975633 0.682937 -0.0975633 0.292687 0.29269C-0.0975624 0.682943 -0.0975624 1.31656 0.292687 1.70682L7.29294 8.70713C7.68343 9.09762 8.31657 9.09762 8.70706 8.70713L15.7073 1.70682C16.0976 1.31656 16.0976 0.682943 15.7073 0.29269C15.3171 -0.0975633 14.6832 -0.0975633 14.293 0.29269Z' fill='%23808A99'/%3E%3C/svg%3E");
637
+ background-size: 14px;
638
+ background-position: calc(100% - var(--top-forms-padding)) 50%;
639
+ background-repeat: no-repeat;
640
+ padding-right: 32px;
641
+ }
642
+
643
+ .top-select_arrow ~ .top-cleaner {
644
+ --top-select_arrow-width: 24px;
645
+ }