@rt-tools/ui-kit-v2 0.4.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 (108) hide show
  1. package/README.md +71 -0
  2. package/fesm2022/rt-tools-ui-kit-v2.mjs +395 -188
  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/CONTEXT.md +22 -0
  23. package/src/lib/components/container/rt-container.component.scss +91 -87
  24. package/src/lib/components/counter/rt-counter.component.scss +14 -12
  25. package/src/lib/components/counter-row/rt-counter-row.component.scss +31 -27
  26. package/src/lib/components/date-picker/rt-date-picker.component.scss +73 -71
  27. package/src/lib/components/delta-view/rt-delta-view.component.scss +27 -25
  28. package/src/lib/components/detail-list/rt-detail-list.component.scss +8 -6
  29. package/src/lib/components/detail-list/rt-detail-row.component.scss +18 -16
  30. package/src/lib/components/dialog/footer/rt-dialog-footer.component.scss +19 -17
  31. package/src/lib/components/dialog/header/rt-dialog-header.component.scss +27 -25
  32. package/src/lib/components/dialog/rt-dialog.component.scss +59 -56
  33. package/src/lib/components/download-link/rt-download-link.component.scss +32 -27
  34. package/src/lib/components/empty-state/rt-empty-state.component.scss +50 -46
  35. package/src/lib/components/field/rt-field.component.scss +63 -61
  36. package/src/lib/components/file-card/rt-file-card.component.scss +84 -78
  37. package/src/lib/components/file-drop/rt-file-drop.component.scss +83 -77
  38. package/src/lib/components/file-input/rt-file-input.component.scss +20 -18
  39. package/src/lib/components/file-list/rt-file-list.component.scss +9 -7
  40. package/src/lib/components/filter-control/rt-filter-control.component.scss +16 -14
  41. package/src/lib/components/header/rt-header.component.scss +61 -55
  42. package/src/lib/components/icon/rt-icon.component.scss +14 -12
  43. package/src/lib/components/icon-button/CONTEXT.md +4 -2
  44. package/src/lib/components/icon-button/rt-icon-button.component.scss +128 -112
  45. package/src/lib/components/info-item/rt-info-item.component.scss +38 -36
  46. package/src/lib/components/input/rt-input.component.scss +102 -98
  47. package/src/lib/components/input-number/rt-input-number.component.scss +84 -82
  48. package/src/lib/components/live-badge/rt-live-badge.component.scss +27 -23
  49. package/src/lib/components/logo/rt-logo.component.scss +54 -52
  50. package/src/lib/components/menu/rt-menu-confirm-dialog.component.scss +30 -28
  51. package/src/lib/components/menu/rt-menu-item.component.scss +47 -42
  52. package/src/lib/components/menu/rt-menu.component.scss +23 -15
  53. package/src/lib/components/message/rt-message.component.scss +53 -49
  54. package/src/lib/components/message-composer/rt-message-composer.component.scss +55 -49
  55. package/src/lib/components/money-list/rt-money-list.component.scss +13 -9
  56. package/src/lib/components/money-list/rt-money-row.component.scss +23 -19
  57. package/src/lib/components/multiselect/rt-multiselect.component.scss +169 -161
  58. package/src/lib/components/night-grid/rt-night-grid.component.scss +47 -42
  59. package/src/lib/components/note/rt-note.component.scss +15 -11
  60. package/src/lib/components/notifications-bell/rt-notifications-bell.component.scss +34 -27
  61. package/src/lib/components/page-header/rt-page-header-mobile.scss +142 -134
  62. package/src/lib/components/page-header/rt-page-header-submenu.scss +130 -123
  63. package/src/lib/components/page-header/rt-page-header.component.scss +221 -210
  64. package/src/lib/components/pagination/rt-pagination.component.scss +88 -81
  65. package/src/lib/components/photo-viewer/rt-photo-viewer.component.scss +109 -105
  66. package/src/lib/components/rich-editor/rt-rich-editor.component.scss +63 -59
  67. package/src/lib/components/section-nav/rt-section-nav.component.scss +53 -47
  68. package/src/lib/components/select/rt-select.component.scss +146 -138
  69. package/src/lib/components/skeleton/rt-skeleton.component.scss +50 -41
  70. package/src/lib/components/skeleton-wrapper/rt-skeleton-wrapper.component.scss +8 -6
  71. package/src/lib/components/spinner/rt-spinner.component.scss +35 -32
  72. package/src/lib/components/split-button/rt-split-button.component.scss +74 -62
  73. package/src/lib/components/stat-tile/rt-stat-tile.component.scss +95 -91
  74. package/src/lib/components/stepper/rt-stepper.component.scss +107 -101
  75. package/src/lib/components/table/copy-cell/rt-copy-cell.component.scss +34 -30
  76. package/src/lib/components/table/rt-table.component.scss +260 -252
  77. package/src/lib/components/table/settings-aside/rt-table-settings-aside.component.scss +7 -5
  78. package/src/lib/components/table/settings-panel/rt-table-settings-panel.component.scss +71 -61
  79. package/src/lib/components/table/sort-header/CONTEXT.md +40 -0
  80. package/src/lib/components/table/sort-header/rt-table-sort-header.component.scss +31 -29
  81. package/src/lib/components/tabs/CONTEXT.md +5 -0
  82. package/src/lib/components/tabs/rt-tabs.component.scss +184 -175
  83. package/src/lib/components/tag/rt-tag.component.scss +97 -92
  84. package/src/lib/components/textarea/rt-textarea.component.scss +62 -60
  85. package/src/lib/components/theme-toggle/rt-theme-toggle.component.scss +7 -5
  86. package/src/lib/components/thread-list/rt-thread-list.component.scss +221 -212
  87. package/src/lib/components/timeline/rt-timeline.component.scss +82 -76
  88. package/src/lib/components/toast/CONTEXT.md +8 -0
  89. package/src/lib/components/toast/rt-toast.component.scss +169 -160
  90. package/src/lib/components/toast/rt-toaster.component.scss +37 -35
  91. package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +129 -122
  92. package/src/lib/components/toggle-switch/rt-toggle-switch.component.scss +97 -91
  93. package/src/lib/components/toolbar/rt-toolbar.component.scss +56 -54
  94. package/src/lib/components/tooltip/rt-tooltip.component.scss +20 -15
  95. package/src/lib/components/welcome-dialog/rt-welcome-dialog.component.scss +46 -44
  96. package/src/lib/components/workspace/rt-workspace.component.scss +139 -131
  97. package/src/lib/components/workspace-details/rt-workspace-details.component.scss +105 -101
  98. package/src/styles/_index.scss +4 -0
  99. package/src/styles/_layers.scss +22 -0
  100. package/src/styles/_login.scss +87 -85
  101. package/src/styles/_mixins.scss +1 -1
  102. package/src/styles/_primitives.scss +126 -67
  103. package/src/styles/_scrollbar.scss +21 -19
  104. package/src/styles/_semantic.scss +140 -56
  105. package/src/styles/_theme-dark.scss +60 -27
  106. package/styles/tokens.css +628 -408
  107. package/types/rt-tools-ui-kit-v2.d.ts +9 -16
  108. package/rt-tools-ui-kit-v2-0.4.0.tgz +0 -0
@@ -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
  }
@@ -1,98 +1,103 @@
1
- /* rt-tag — status pill в common/ui. ViewEncapsulation.None.
2
- Хост адресуется по имени элемента, а не по классу блока: класс `.rt-tag` висит
3
- и на `<rt-tag>`, и на корне шаблона, поэтому правила блока вложены в хост —
4
- так они достаются только корню шаблона. */
1
+ @layer rt-kit.components {
2
+ /* rt-tag — status pill в common/ui. ViewEncapsulation.None.
3
+ Хост адресуется по имени элемента, а не по классу блока: класс `.rt-tag` висит
4
+ и на `<rt-tag>`, и на корне шаблона, поэтому правила блока вложены в хост —
5
+ так они достаются только корню шаблона. */
5
6
 
6
- rt-tag {
7
- display: inline-flex;
8
-
9
- .rt-tag {
7
+ rt-tag {
10
8
  display: inline-flex;
11
- align-items: center;
12
- padding: var(--rt-space-1) var(--rt-space-2);
13
- border-radius: var(--rt-radius-md);
14
- background: var(--rt-neutral-100);
15
- color: var(--rt-neutral-700);
16
- font-size: var(--rt-text-sm);
17
- gap: var(--rt-space-1);
18
- line-height: var(--rt-leading-tight);
19
-
20
- &--shape--pill {
21
- border-radius: var(--rt-radius-full);
22
- }
23
-
24
- &--shape--square {
25
- border-radius: var(--rt-radius-sm);
26
- }
27
-
28
- /* Явный radius переопределяет shape — правила идут позже по порядку. */
29
- &--radius--none {
30
- border-radius: var(--rt-radius-none);
31
- }
32
-
33
- &--radius--sm {
34
- border-radius: var(--rt-radius-sm);
35
- }
36
-
37
- &--radius--md {
38
- border-radius: var(--rt-radius-md);
39
- }
40
-
41
- &--radius--lg {
42
- border-radius: var(--rt-radius-lg);
43
- }
44
-
45
- &--radius--full {
46
- border-radius: var(--rt-radius-full);
47
- }
48
-
49
- &--severity--info {
50
- background: var(--rt-color-state-info-bg);
51
- color: var(--rt-color-state-info);
52
- }
53
-
54
- &--severity--success {
55
- background: var(--rt-color-state-success-bg);
56
- color: var(--rt-color-state-success);
57
- }
58
-
59
- &--severity--warning {
60
- background: var(--rt-color-state-warning-bg);
61
- color: var(--rt-color-state-warning);
62
- }
63
-
64
- &--severity--danger {
65
- background: var(--rt-color-state-danger-bg);
66
- color: var(--rt-color-state-danger);
67
- }
68
-
69
- &--severity--secondary,
70
- &--severity--neutral {
71
- background: var(--rt-color-bg-subtle);
72
- color: var(--rt-color-text-primary);
73
- }
74
-
75
- /* Outlined: прозрачный фон + рамка цвета палитры (currentColor = текст).
76
- После severity-блоков — иначе их `background` перебил бы transparent. */
77
- &--appearance--outlined {
78
- border: var(--rt-border-width-thin) solid currentcolor;
79
- background: transparent;
80
- }
81
-
82
- &__icon {
83
- flex-shrink: 0;
84
- }
85
-
86
- &__icon-end {
87
- flex-shrink: 0;
88
- }
89
-
90
- &__text {
91
- line-height: var(--rt-leading-none);
92
- }
93
9
 
94
- &__close {
95
- margin-inline-start: var(--rt-space-0-5);
10
+ .rt-tag {
11
+ --rt-tag-radius: var(--rt-radius-md);
12
+ --rt-tag-border-width: var(--rt-border-width-thin);
13
+
14
+ display: inline-flex;
15
+ align-items: center;
16
+ padding: var(--rt-space-1) var(--rt-space-2);
17
+ border-radius: var(--rt-tag-radius);
18
+ background: var(--rt-neutral-100);
19
+ color: var(--rt-neutral-700);
20
+ font-size: var(--rt-text-sm);
21
+ gap: var(--rt-space-1);
22
+ line-height: var(--rt-leading-tight);
23
+
24
+ &--shape--pill {
25
+ --rt-tag-radius: var(--rt-radius-full);
26
+ }
27
+
28
+ &--shape--square {
29
+ --rt-tag-radius: var(--rt-radius-sm);
30
+ }
31
+
32
+ /* Явный radius переопределяет shape — правила идут позже по порядку. */
33
+ &--radius--none {
34
+ --rt-tag-radius: var(--rt-radius-none);
35
+ }
36
+
37
+ &--radius--sm {
38
+ --rt-tag-radius: var(--rt-radius-sm);
39
+ }
40
+
41
+ &--radius--md {
42
+ --rt-tag-radius: var(--rt-radius-md);
43
+ }
44
+
45
+ &--radius--lg {
46
+ --rt-tag-radius: var(--rt-radius-lg);
47
+ }
48
+
49
+ &--radius--full {
50
+ --rt-tag-radius: var(--rt-radius-full);
51
+ }
52
+
53
+ &--severity--info {
54
+ background: var(--rt-color-state-info-bg);
55
+ color: var(--rt-color-state-info);
56
+ }
57
+
58
+ &--severity--success {
59
+ background: var(--rt-color-state-success-bg);
60
+ color: var(--rt-color-state-success);
61
+ }
62
+
63
+ &--severity--warning {
64
+ background: var(--rt-color-state-warning-bg);
65
+ color: var(--rt-color-state-warning);
66
+ }
67
+
68
+ &--severity--danger {
69
+ background: var(--rt-color-state-danger-bg);
70
+ color: var(--rt-color-state-danger);
71
+ }
72
+
73
+ &--severity--secondary,
74
+ &--severity--neutral {
75
+ background: var(--rt-color-bg-subtle);
76
+ color: var(--rt-color-text-primary);
77
+ }
78
+
79
+ /* Outlined: прозрачный фон + рамка цвета палитры (currentColor = текст).
80
+ После severity-блоков — иначе их `background` перебил бы transparent. */
81
+ &--appearance--outlined {
82
+ border: var(--rt-tag-border-width) solid currentcolor;
83
+ background: transparent;
84
+ }
85
+
86
+ &__icon {
87
+ flex-shrink: 0;
88
+ }
89
+
90
+ &__icon-end {
91
+ flex-shrink: 0;
92
+ }
93
+
94
+ &__text {
95
+ line-height: var(--rt-leading-none);
96
+ }
97
+
98
+ &__close {
99
+ margin-inline-start: var(--rt-space-0-5);
100
+ }
96
101
  }
97
102
  }
98
103
  }