@rt-tools/ui-kit-v2 0.5.0 → 0.6.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.
Files changed (103) hide show
  1. package/README.md +71 -0
  2. package/fesm2022/rt-tools-ui-kit-v2.mjs +166 -166
  3. package/fesm2022/rt-tools-ui-kit-v2.mjs.map +1 -1
  4. package/package.json +1 -1
  5. package/rt-tools-ui-kit-v2-0.6.0.tgz +0 -0
  6. package/src/lib/components/aside/_rt-aside-overlay.scss +73 -71
  7. package/src/lib/components/aside/footer/rt-aside-footer.component.scss +20 -16
  8. package/src/lib/components/aside/header/rt-aside-header.component.scss +72 -70
  9. package/src/lib/components/aside/rt-aside.component.scss +107 -105
  10. package/src/lib/components/aside/unsaved-dialog/rt-aside-unsaved-dialog.component.scss +33 -31
  11. package/src/lib/components/aside-section/rt-aside-section.component.scss +27 -23
  12. package/src/lib/components/autocomplete/rt-autocomplete.component.scss +124 -118
  13. package/src/lib/components/bar-list/rt-bar-list.component.scss +85 -81
  14. package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +64 -57
  15. package/src/lib/components/button/rt-button.directive.scss +319 -280
  16. package/src/lib/components/calendar/rt-calendar.component.scss +106 -102
  17. package/src/lib/components/card/rt-card.component.scss +53 -45
  18. package/src/lib/components/chat/rt-chat.component.scss +312 -306
  19. package/src/lib/components/checkbox/rt-checkbox.component.scss +61 -54
  20. package/src/lib/components/collapsible-text/rt-collapsible-text.component.scss +36 -34
  21. package/src/lib/components/confirm-popover/rt-confirm-popover.component.scss +36 -30
  22. package/src/lib/components/container/rt-container.component.scss +91 -87
  23. package/src/lib/components/counter/rt-counter.component.scss +14 -12
  24. package/src/lib/components/counter-row/rt-counter-row.component.scss +31 -27
  25. package/src/lib/components/date-picker/rt-date-picker.component.scss +73 -71
  26. package/src/lib/components/delta-view/rt-delta-view.component.scss +27 -25
  27. package/src/lib/components/detail-list/rt-detail-list.component.scss +8 -6
  28. package/src/lib/components/detail-list/rt-detail-row.component.scss +18 -16
  29. package/src/lib/components/dialog/footer/rt-dialog-footer.component.scss +19 -17
  30. package/src/lib/components/dialog/header/rt-dialog-header.component.scss +27 -25
  31. package/src/lib/components/dialog/rt-dialog.component.scss +59 -56
  32. package/src/lib/components/download-link/rt-download-link.component.scss +32 -27
  33. package/src/lib/components/empty-state/rt-empty-state.component.scss +50 -46
  34. package/src/lib/components/field/rt-field.component.scss +63 -61
  35. package/src/lib/components/file-card/rt-file-card.component.scss +84 -78
  36. package/src/lib/components/file-drop/rt-file-drop.component.scss +83 -77
  37. package/src/lib/components/file-input/rt-file-input.component.scss +20 -18
  38. package/src/lib/components/file-list/rt-file-list.component.scss +9 -7
  39. package/src/lib/components/filter-control/rt-filter-control.component.scss +16 -14
  40. package/src/lib/components/header/rt-header.component.scss +61 -55
  41. package/src/lib/components/icon/rt-icon.component.scss +14 -12
  42. package/src/lib/components/icon-button/CONTEXT.md +4 -2
  43. package/src/lib/components/icon-button/rt-icon-button.component.scss +128 -112
  44. package/src/lib/components/info-item/rt-info-item.component.scss +38 -36
  45. package/src/lib/components/input/rt-input.component.scss +102 -98
  46. package/src/lib/components/input-number/rt-input-number.component.scss +84 -82
  47. package/src/lib/components/live-badge/rt-live-badge.component.scss +27 -23
  48. package/src/lib/components/logo/rt-logo.component.scss +54 -52
  49. package/src/lib/components/menu/rt-menu-confirm-dialog.component.scss +30 -28
  50. package/src/lib/components/menu/rt-menu-item.component.scss +47 -42
  51. package/src/lib/components/menu/rt-menu.component.scss +23 -15
  52. package/src/lib/components/message/rt-message.component.scss +53 -49
  53. package/src/lib/components/message-composer/rt-message-composer.component.scss +55 -49
  54. package/src/lib/components/money-list/rt-money-list.component.scss +13 -9
  55. package/src/lib/components/money-list/rt-money-row.component.scss +23 -19
  56. package/src/lib/components/multiselect/rt-multiselect.component.scss +169 -161
  57. package/src/lib/components/night-grid/rt-night-grid.component.scss +47 -42
  58. package/src/lib/components/note/rt-note.component.scss +15 -11
  59. package/src/lib/components/notifications-bell/rt-notifications-bell.component.scss +34 -27
  60. package/src/lib/components/page-header/rt-page-header-mobile.scss +142 -134
  61. package/src/lib/components/page-header/rt-page-header-submenu.scss +130 -123
  62. package/src/lib/components/page-header/rt-page-header.component.scss +221 -210
  63. package/src/lib/components/pagination/rt-pagination.component.scss +88 -81
  64. package/src/lib/components/photo-viewer/rt-photo-viewer.component.scss +109 -105
  65. package/src/lib/components/rich-editor/rt-rich-editor.component.scss +63 -59
  66. package/src/lib/components/section-nav/rt-section-nav.component.scss +53 -47
  67. package/src/lib/components/select/rt-select.component.scss +146 -138
  68. package/src/lib/components/skeleton/rt-skeleton.component.scss +50 -41
  69. package/src/lib/components/skeleton-wrapper/rt-skeleton-wrapper.component.scss +8 -6
  70. package/src/lib/components/spinner/rt-spinner.component.scss +35 -32
  71. package/src/lib/components/split-button/rt-split-button.component.scss +74 -62
  72. package/src/lib/components/stat-tile/rt-stat-tile.component.scss +95 -91
  73. package/src/lib/components/stepper/rt-stepper.component.scss +107 -101
  74. package/src/lib/components/table/copy-cell/rt-copy-cell.component.scss +34 -30
  75. package/src/lib/components/table/rt-table.component.scss +260 -252
  76. package/src/lib/components/table/settings-aside/rt-table-settings-aside.component.scss +7 -5
  77. package/src/lib/components/table/settings-panel/rt-table-settings-panel.component.scss +71 -61
  78. package/src/lib/components/table/sort-header/rt-table-sort-header.component.scss +31 -29
  79. package/src/lib/components/tabs/rt-tabs.component.scss +184 -175
  80. package/src/lib/components/tag/rt-tag.component.scss +97 -92
  81. package/src/lib/components/textarea/rt-textarea.component.scss +62 -60
  82. package/src/lib/components/theme-toggle/rt-theme-toggle.component.scss +7 -5
  83. package/src/lib/components/thread-list/rt-thread-list.component.scss +221 -212
  84. package/src/lib/components/timeline/rt-timeline.component.scss +82 -76
  85. package/src/lib/components/toast/rt-toast.component.scss +169 -160
  86. package/src/lib/components/toast/rt-toaster.component.scss +37 -35
  87. package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +129 -122
  88. package/src/lib/components/toggle-switch/rt-toggle-switch.component.scss +97 -91
  89. package/src/lib/components/toolbar/rt-toolbar.component.scss +56 -54
  90. package/src/lib/components/tooltip/rt-tooltip.component.scss +20 -15
  91. package/src/lib/components/welcome-dialog/rt-welcome-dialog.component.scss +46 -44
  92. package/src/lib/components/workspace/rt-workspace.component.scss +139 -131
  93. package/src/lib/components/workspace-details/rt-workspace-details.component.scss +105 -101
  94. package/src/styles/_index.scss +4 -0
  95. package/src/styles/_layers.scss +22 -0
  96. package/src/styles/_login.scss +87 -85
  97. package/src/styles/_mixins.scss +1 -1
  98. package/src/styles/_primitives.scss +126 -67
  99. package/src/styles/_scrollbar.scss +21 -19
  100. package/src/styles/_semantic.scss +140 -56
  101. package/src/styles/_theme-dark.scss +60 -27
  102. package/styles/tokens.css +628 -408
  103. package/rt-tools-ui-kit-v2-0.5.0.tgz +0 -0
@@ -1,7 +1,9 @@
1
- /* rt-table-settings-aside — ViewEncapsulation.None (common/ui). Своей раскладки нет:
2
- chrome даёт rt-aside, тело — rt-table-settings-panel. `.rt-table-settings-aside` —
3
- сам хост, и он не должен добавлять бокс между асайдом и его местом в overlay. */
1
+ @layer rt-kit.components {
2
+ /* rt-table-settings-aside — ViewEncapsulation.None (common/ui). Своей раскладки нет:
3
+ chrome даёт rt-aside, тело — rt-table-settings-panel. `.rt-table-settings-aside` —
4
+ сам хост, и он не должен добавлять бокс между асайдом и его местом в overlay. */
4
5
 
5
- .rt-table-settings-aside {
6
- display: contents;
6
+ .rt-table-settings-aside {
7
+ display: contents;
8
+ }
7
9
  }
@@ -1,77 +1,87 @@
1
- /* rt-table-settings-panel — ViewEncapsulation.None (common/ui): правила таргетируют
2
- BEM-класс блока, как во всём ките. */
3
- .rt-table-settings-panel {
4
- &__list {
5
- display: flex;
6
- min-width: 320px;
7
- flex-direction: column;
8
- padding: 0;
9
- margin: 0;
10
- gap: var(--rt-space-2xs);
11
- list-style: none;
12
- }
13
-
14
- &__row {
15
- display: flex;
16
- align-items: center;
17
- padding: var(--rt-space-2xs) var(--rt-space-xs);
18
- border: var(--rt-border-width-thin) solid var(--rt-color-border-default);
19
- border-radius: var(--rt-radius-md);
20
- background-color: var(--rt-color-bg-surface);
21
- gap: var(--rt-space-sm);
1
+ @layer rt-kit.components {
2
+ /* rt-table-settings-panel — ViewEncapsulation.None (common/ui): правила таргетируют
3
+ BEM-класс блока, как во всём ките. */
4
+ .rt-table-settings-panel {
5
+ --rt-table-settings-panel-row-radius: var(--rt-radius-md);
6
+ --rt-table-settings-panel-row-border-width: var(--rt-border-width-thin);
7
+ --rt-table-settings-panel-row-shadow: var(--rt-shadow-card);
22
8
 
23
- &--hidden {
24
- color: var(--rt-color-text-muted);
9
+ &__list {
10
+ display: flex;
11
+ min-width: 320px;
12
+ flex-direction: column;
13
+ padding: 0;
14
+ margin: 0;
15
+ gap: var(--rt-space-2xs);
16
+ list-style: none;
25
17
  }
26
18
 
27
- &.cdk-drag-preview {
28
- box-shadow: var(--rt-shadow-card);
29
- }
19
+ &__row {
20
+ /* Строка при перетаскивании уезжает в .cdk-drag-preview вне блока:
21
+ свойство объявляется на ней самой, а не в корне. */
22
+ --rt-table-settings-panel-drag-duration: var(--rt-duration-base);
30
23
 
31
- &.cdk-drag-placeholder {
32
- opacity: 0.4;
33
- }
24
+ display: flex;
25
+ align-items: center;
26
+ padding: var(--rt-space-2xs) var(--rt-space-xs);
27
+ border: var(--rt-table-settings-panel-row-border-width) solid var(--rt-color-border-default);
28
+ border-radius: var(--rt-table-settings-panel-row-radius);
29
+ background-color: var(--rt-color-bg-surface);
30
+ gap: var(--rt-space-sm);
31
+
32
+ &--hidden {
33
+ color: var(--rt-color-text-muted);
34
+ }
35
+
36
+ &.cdk-drag-preview {
37
+ box-shadow: var(--rt-table-settings-panel-row-shadow);
38
+ }
39
+
40
+ &.cdk-drag-placeholder {
41
+ opacity: 0.4;
42
+ }
34
43
 
35
- &.cdk-drag-animating {
36
- transition: transform var(--rt-duration-base) cubic-bezier(0, 0, 0.2, 1);
44
+ &.cdk-drag-animating {
45
+ transition: transform var(--rt-table-settings-panel-drag-duration) cubic-bezier(0, 0, 0.2, 1);
46
+ }
37
47
  }
38
- }
39
48
 
40
- &__handle {
41
- display: inline-flex;
42
- width: 24px;
43
- height: 24px;
44
- align-items: center;
45
- justify-content: center;
46
- padding: 0;
47
- border: none;
48
- background: none;
49
- cursor: grab;
49
+ &__handle {
50
+ display: inline-flex;
51
+ width: 24px;
52
+ height: 24px;
53
+ align-items: center;
54
+ justify-content: center;
55
+ padding: 0;
56
+ border: none;
57
+ background: none;
58
+ cursor: grab;
59
+
60
+ &:active {
61
+ cursor: grabbing;
62
+ }
50
63
 
51
- &:active {
52
- cursor: grabbing;
64
+ &--placeholder {
65
+ cursor: default;
66
+ }
53
67
  }
54
68
 
55
- &--placeholder {
56
- cursor: default;
69
+ &__label {
70
+ overflow: hidden;
71
+ min-width: 0;
72
+ flex: 1;
73
+ font-size: var(--rt-text-sm);
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
57
76
  }
58
- }
59
77
 
60
- &__label {
61
- overflow: hidden;
62
- min-width: 0;
63
- flex: 1;
64
- font-size: var(--rt-text-sm);
65
- text-overflow: ellipsis;
66
- white-space: nowrap;
78
+ &__toggle {
79
+ margin-left: auto;
80
+ }
67
81
  }
68
82
 
69
- &__toggle {
70
- margin-left: auto;
83
+ /* Плавающий клон строки во время перетаскивания (CDK монтирует его в body). */
84
+ .cdk-drop-list-dragging .rt-table-settings-panel__row:not(.cdk-drag-placeholder) {
85
+ transition: transform var(--rt-table-settings-panel-drag-duration) cubic-bezier(0, 0, 0.2, 1);
71
86
  }
72
87
  }
73
-
74
- /* Плавающий клон строки во время перетаскивания (CDK монтирует его в body). */
75
- .cdk-drop-list-dragging .rt-table-settings-panel__row:not(.cdk-drag-placeholder) {
76
- transition: transform var(--rt-duration-base) cubic-bezier(0, 0, 0.2, 1);
77
- }
@@ -1,39 +1,41 @@
1
- /* rt-table-sort-header — заголовок сортируемой колонки внутри rt-table.
2
- ViewEncapsulation.None: классы доступны без scope-attrs, токены --rt-* наследуются. */
1
+ @layer rt-kit.components {
2
+ /* rt-table-sort-header — заголовок сортируемой колонки внутри rt-table.
3
+ ViewEncapsulation.None: классы доступны без scope-attrs, токены --rt-* наследуются. */
3
4
 
4
- .rt-table-sort-header {
5
- &__button {
6
- display: inline-flex;
7
- align-items: center;
8
- padding: 0;
9
- border: none;
10
- background: none;
11
- color: inherit;
12
- cursor: pointer;
13
- font: inherit;
14
- gap: var(--rt-space-xs);
15
- text-align: inherit;
5
+ .rt-table-sort-header {
6
+ &__button {
7
+ display: inline-flex;
8
+ align-items: center;
9
+ padding: 0;
10
+ border: none;
11
+ background: none;
12
+ color: inherit;
13
+ cursor: pointer;
14
+ font: inherit;
15
+ gap: var(--rt-space-xs);
16
+ text-align: inherit;
16
17
 
17
- &:hover {
18
- color: var(--rt-color-text-primary);
19
- }
18
+ &:hover {
19
+ color: var(--rt-color-text-primary);
20
+ }
20
21
 
21
- &:focus-visible {
22
- outline: 2px solid var(--rt-color-action-primary);
23
- outline-offset: 2px;
22
+ &:focus-visible {
23
+ outline: 2px solid var(--rt-color-action-primary);
24
+ outline-offset: 2px;
25
+ }
24
26
  }
25
- }
26
27
 
27
- &__icon {
28
- flex: 0 0 auto;
29
- color: var(--rt-color-text-muted);
30
- }
28
+ &__icon {
29
+ flex: 0 0 auto;
30
+ color: var(--rt-color-text-muted);
31
+ }
31
32
 
32
- &__button--active {
33
- color: var(--rt-color-text-primary);
33
+ &__button--active {
34
+ color: var(--rt-color-text-primary);
34
35
 
35
- .rt-table-sort-header__icon {
36
- color: var(--rt-color-action-primary);
36
+ .rt-table-sort-header__icon {
37
+ color: var(--rt-color-action-primary);
38
+ }
37
39
  }
38
40
  }
39
41
  }
@@ -1,219 +1,228 @@
1
- .rt-tabs {
2
- display: flex;
3
- -webkit-tap-highlight-color: transparent;
1
+ @layer rt-kit.components {
2
+ .rt-tabs {
3
+ --rt-tabs-border-width: var(--rt-border-width-thin);
4
+ --rt-tabs-transition-duration: var(--rt-duration-fast);
4
5
 
5
- &--direction--horizontal {
6
- flex-direction: column;
7
- }
8
-
9
- &--direction--vertical {
10
- flex-direction: row;
11
- }
12
-
13
- &__header {
14
- display: flex;
15
- align-items: center;
16
- }
17
-
18
- &__tab-list-wrapper {
19
- position: relative;
20
- display: flex;
21
- overflow: hidden;
22
- flex: 1 1 auto;
23
- align-items: center;
24
- }
25
-
26
- &__tab-list {
27
6
  display: flex;
28
- border-bottom: var(--rt-border-width-thin) solid var(--rt-color-border-default);
29
- margin: 0;
30
- -ms-overflow-style: none;
31
- overflow-x: auto;
32
- scrollbar-width: none;
33
- white-space: nowrap;
34
-
35
- &::-webkit-scrollbar {
36
- display: none;
37
- }
7
+ -webkit-tap-highlight-color: transparent;
38
8
 
39
9
  &--direction--horizontal {
40
- width: 100%;
41
- flex-direction: row;
42
- }
43
-
44
- &--direction--vertical {
45
10
  flex-direction: column;
46
- border-right: var(--rt-border-width-thin) solid var(--rt-color-border-default);
47
- border-bottom: 0;
48
11
  }
49
12
 
50
- &--stretch {
51
- justify-content: space-between;
13
+ &--direction--vertical {
14
+ flex-direction: row;
52
15
  }
53
- }
54
16
 
55
- &__rest {
56
- position: absolute;
57
- z-index: 1;
58
- top: 0;
59
- bottom: 0;
60
- display: flex;
61
- width: var(--rt-control-height-lg);
62
- align-items: center;
63
- justify-content: center;
64
- background-color: var(--rt-color-bg-surface);
65
- color: var(--rt-color-text-muted);
66
- cursor: pointer;
67
- transition: color var(--rt-duration-fast) linear;
68
- visibility: hidden;
69
-
70
- &:hover {
71
- color: var(--rt-color-text-primary);
17
+ &__header {
18
+ display: flex;
19
+ align-items: center;
72
20
  }
73
21
 
74
- &--before {
75
- left: 0;
76
- border-right: var(--rt-border-width-thin) solid var(--rt-color-border-default);
22
+ &__tab-list-wrapper {
23
+ position: relative;
24
+ display: flex;
25
+ overflow: hidden;
26
+ flex: 1 1 auto;
27
+ align-items: center;
77
28
  }
78
29
 
79
- &--after {
80
- right: 0;
81
- border-left: var(--rt-border-width-thin) solid var(--rt-color-border-default);
30
+ &__tab-list {
31
+ display: flex;
32
+ border-bottom: var(--rt-tabs-border-width) solid var(--rt-color-border-default);
33
+ margin: 0;
34
+ -ms-overflow-style: none;
35
+ overflow-x: auto;
36
+ scrollbar-width: none;
37
+ white-space: nowrap;
38
+
39
+ &::-webkit-scrollbar {
40
+ display: none;
41
+ }
42
+
43
+ &--direction--horizontal {
44
+ width: 100%;
45
+ flex-direction: row;
46
+ }
47
+
48
+ &--direction--vertical {
49
+ flex-direction: column;
50
+ border-right: var(--rt-tabs-border-width) solid var(--rt-color-border-default);
51
+ border-bottom: 0;
52
+ }
53
+
54
+ &--stretch {
55
+ justify-content: space-between;
56
+ }
82
57
  }
83
58
 
84
- &--visible {
85
- visibility: visible;
59
+ &__rest {
60
+ position: absolute;
61
+ z-index: 1;
62
+ top: 0;
63
+ bottom: 0;
64
+ display: flex;
65
+ width: var(--rt-control-height-lg);
66
+ align-items: center;
67
+ justify-content: center;
68
+ background-color: var(--rt-color-bg-surface);
69
+ color: var(--rt-color-text-muted);
70
+ cursor: pointer;
71
+ transition: color var(--rt-tabs-transition-duration) linear;
72
+ visibility: hidden;
73
+
74
+ &:hover {
75
+ color: var(--rt-color-text-primary);
76
+ }
77
+
78
+ &--before {
79
+ left: 0;
80
+ border-right: var(--rt-tabs-border-width) solid var(--rt-color-border-default);
81
+ }
82
+
83
+ &--after {
84
+ right: 0;
85
+ border-left: var(--rt-tabs-border-width) solid var(--rt-color-border-default);
86
+ }
87
+
88
+ &--visible {
89
+ visibility: visible;
90
+ }
86
91
  }
87
- }
88
92
 
89
- &__controls {
90
- display: flex;
91
- flex-shrink: 0;
92
- align-items: center;
93
+ &__controls {
94
+ display: flex;
95
+ flex-shrink: 0;
96
+ align-items: center;
93
97
 
94
- &--before {
95
- padding-right: var(--rt-space-md);
96
- }
98
+ &--before {
99
+ padding-right: var(--rt-space-md);
100
+ }
97
101
 
98
- &--after {
99
- padding-left: var(--rt-space-md);
102
+ &--after {
103
+ padding-left: var(--rt-space-md);
104
+ }
100
105
  }
101
- }
102
106
 
103
- &__content {
104
- display: flex;
105
- min-height: 0;
106
- flex: 1 1 auto;
107
- flex-direction: column;
108
- padding-top: var(--rt-space-md);
109
- gap: var(--rt-space-md);
110
- line-height: var(--rt-leading-relaxed);
107
+ &__content {
108
+ display: flex;
109
+ min-height: 0;
110
+ flex: 1 1 auto;
111
+ flex-direction: column;
112
+ padding-top: var(--rt-space-md);
113
+ gap: var(--rt-space-md);
114
+ line-height: var(--rt-leading-relaxed);
111
115
 
112
- &--scrollable {
113
- overflow: auto;
116
+ &--scrollable {
117
+ overflow: auto;
118
+ }
114
119
  }
115
120
  }
116
- }
117
-
118
- .rt-tab-item {
119
- position: relative;
120
- display: inline-flex;
121
- align-items: center;
122
- justify-content: center;
123
- padding: var(--rt-space-2) var(--rt-space-3);
124
- border: 0;
125
- margin: 0;
126
- background-color: transparent;
127
- color: var(--rt-color-text-muted);
128
- cursor: pointer;
129
- font-family: inherit;
130
- font-size: var(--rt-text-sm);
131
- font-weight: var(--rt-font-weight-semibold);
132
- gap: var(--rt-space-sm);
133
- line-height: var(--rt-leading-none);
134
- transition:
135
- color var(--rt-duration-fast) linear,
136
- background-color var(--rt-duration-fast) linear;
137
- white-space: nowrap;
138
-
139
- /* Нижний индикатор активной вкладки — поверх border-bottom полосы. */
140
- &:after {
141
- position: absolute;
142
- bottom: calc(-1 * var(--rt-border-width-thin));
143
- height: 2px;
144
- background-color: transparent;
145
- content: '';
146
- inset-inline: 0;
147
- pointer-events: none;
148
- }
149
-
150
- &:hover:not(.rt-tab-item--disabled, .rt-tab-item--selected) {
151
- background-color: var(--rt-color-bg-hover);
152
- color: var(--rt-color-text-primary);
153
- }
154
121
 
155
- /* Inset-outline вместо box-shadow ring: полоса вкладок — scroll-контейнер
156
- (overflow), который обрезал бы внешнее кольцо. Inset рисуется внутри
157
- элемента, не клиппится и переживает forced-colors. */
158
- &:focus-visible {
159
- outline: 2px solid var(--rt-color-action-primary);
160
- outline-offset: -3px;
161
- }
122
+ .rt-tab-item {
123
+ --rt-tab-item-border-width: var(--rt-border-width-thin);
124
+ --rt-tab-item-badge-radius: var(--rt-radius-full);
125
+ --rt-tab-item-transition-duration: var(--rt-duration-fast);
162
126
 
163
- &__title {
164
- overflow: hidden;
165
- max-width: 200px;
166
- text-overflow: ellipsis;
167
- }
168
-
169
- &__icon {
170
- flex-shrink: 0;
171
- }
172
-
173
- &__badge {
127
+ position: relative;
174
128
  display: inline-flex;
175
- min-width: 18px;
176
- height: 18px;
177
129
  align-items: center;
178
130
  justify-content: center;
179
- padding: 0 var(--rt-space-1-5);
180
- border-radius: var(--rt-radius-full);
181
- background-color: var(--rt-color-bg-surface-subtle);
131
+ padding: var(--rt-space-2) var(--rt-space-4);
132
+ border: 0;
133
+ margin: 0;
134
+ background-color: transparent;
182
135
  color: var(--rt-color-text-muted);
183
- font-size: var(--rt-text-xs);
184
- font-weight: var(--rt-font-weight-medium);
136
+ cursor: pointer;
137
+ font-family: inherit;
138
+ font-size: var(--rt-text-sm);
139
+ font-weight: var(--rt-font-weight-semibold);
140
+ gap: var(--rt-space-sm);
185
141
  line-height: var(--rt-leading-none);
186
- }
187
-
188
- &--selected {
189
- color: var(--rt-color-action-primary);
190
- cursor: default;
142
+ transition:
143
+ color var(--rt-tab-item-transition-duration) linear,
144
+ background-color var(--rt-tab-item-transition-duration) linear;
145
+ white-space: nowrap;
191
146
 
147
+ /* Нижний индикатор активной вкладки — поверх border-bottom полосы. */
192
148
  &:after {
193
- background-color: var(--rt-color-action-primary);
149
+ position: absolute;
150
+ bottom: calc(-1 * var(--rt-tab-item-border-width));
151
+ height: 2px;
152
+ background-color: transparent;
153
+ content: '';
154
+ inset-inline: 0;
155
+ pointer-events: none;
156
+ }
157
+
158
+ &:hover:not(.rt-tab-item--disabled, .rt-tab-item--selected) {
159
+ background-color: var(--rt-color-bg-hover);
160
+ color: var(--rt-color-text-primary);
161
+ }
162
+
163
+ /* Inset-outline вместо box-shadow ring: полоса вкладок — scroll-контейнер
164
+ (overflow), который обрезал бы внешнее кольцо. Inset рисуется внутри
165
+ элемента, не клиппится и переживает forced-colors. */
166
+ &:focus-visible {
167
+ outline: 2px solid var(--rt-color-action-primary);
168
+ outline-offset: -3px;
169
+ }
170
+
171
+ &__title {
172
+ overflow: hidden;
173
+ max-width: 200px;
174
+ text-overflow: ellipsis;
175
+ }
176
+
177
+ &__icon {
178
+ flex-shrink: 0;
179
+ }
180
+
181
+ &__badge {
182
+ display: inline-flex;
183
+ min-width: 18px;
184
+ height: 18px;
185
+ align-items: center;
186
+ justify-content: center;
187
+ padding: 0 var(--rt-space-2);
188
+ border-radius: var(--rt-tab-item-badge-radius);
189
+ background-color: var(--rt-color-bg-surface-subtle);
190
+ color: var(--rt-color-text-muted);
191
+ font-size: var(--rt-text-xs);
192
+ font-weight: var(--rt-font-weight-medium);
193
+ line-height: var(--rt-leading-none);
194
194
  }
195
195
 
196
- .rt-tab-item__badge {
197
- background-color: var(--rt-color-action-primary-soft);
196
+ &--selected {
198
197
  color: var(--rt-color-action-primary);
198
+ cursor: default;
199
+
200
+ &:after {
201
+ background-color: var(--rt-color-action-primary);
202
+ }
203
+
204
+ .rt-tab-item__badge {
205
+ background-color: var(--rt-color-action-primary-soft);
206
+ color: var(--rt-color-action-primary);
207
+ }
199
208
  }
200
- }
201
209
 
202
- &--invalid {
203
- color: var(--rt-color-state-danger);
210
+ &--invalid {
211
+ color: var(--rt-color-state-danger);
204
212
 
205
- &:after {
206
- background-color: var(--rt-color-state-danger);
213
+ &:after {
214
+ background-color: var(--rt-color-state-danger);
215
+ }
207
216
  }
208
- }
209
217
 
210
- &--disabled {
211
- color: var(--rt-color-text-disabled);
212
- cursor: not-allowed;
213
- }
218
+ &--disabled {
219
+ color: var(--rt-color-text-disabled);
220
+ cursor: not-allowed;
221
+ }
214
222
 
215
- &--stretch {
216
- max-width: 100%;
217
- flex: 1 1 auto;
223
+ &--stretch {
224
+ max-width: 100%;
225
+ flex: 1 1 auto;
226
+ }
218
227
  }
219
228
  }