@rt-tools/ui-kit-v2 0.5.0 → 0.7.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 (111) hide show
  1. package/README.md +87 -7
  2. package/fesm2022/rt-tools-ui-kit-v2.mjs +1929 -994
  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.7.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/CONTEXT.md +16 -10
  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/CONTEXT.md +9 -7
  47. package/src/lib/components/input/rt-input.component.scss +102 -98
  48. package/src/lib/components/input-number/rt-input-number.component.scss +84 -82
  49. package/src/lib/components/live-badge/rt-live-badge.component.scss +27 -23
  50. package/src/lib/components/logo/rt-logo.component.scss +54 -52
  51. package/src/lib/components/markdown-text/CONTEXT.md +40 -0
  52. package/src/lib/components/markdown-text/rt-markdown-text.component.scss +130 -0
  53. package/src/lib/components/menu/rt-menu-confirm-dialog.component.scss +30 -28
  54. package/src/lib/components/menu/rt-menu-item.component.scss +47 -42
  55. package/src/lib/components/menu/rt-menu.component.scss +23 -15
  56. package/src/lib/components/message/rt-message.component.scss +53 -49
  57. package/src/lib/components/message-composer/CONTEXT.md +1 -1
  58. package/src/lib/components/message-composer/rt-message-composer.component.scss +55 -49
  59. package/src/lib/components/money-list/rt-money-list.component.scss +13 -9
  60. package/src/lib/components/money-list/rt-money-row.component.scss +23 -19
  61. package/src/lib/components/multiselect/rt-multiselect.component.scss +169 -161
  62. package/src/lib/components/night-grid/rt-night-grid.component.scss +47 -42
  63. package/src/lib/components/note/rt-note.component.scss +15 -11
  64. package/src/lib/components/notifications-bell/rt-notifications-bell.component.scss +34 -27
  65. package/src/lib/components/page-header/rt-page-header-mobile.scss +142 -134
  66. package/src/lib/components/page-header/rt-page-header-submenu.scss +130 -123
  67. package/src/lib/components/page-header/rt-page-header.component.scss +221 -210
  68. package/src/lib/components/pagination/rt-pagination.component.scss +88 -81
  69. package/src/lib/components/photo-viewer/rt-photo-viewer.component.scss +109 -105
  70. package/src/lib/components/rich-editor/CONTEXT.md +1 -1
  71. package/src/lib/components/rich-editor/rt-rich-editor.component.scss +63 -59
  72. package/src/lib/components/section-nav/rt-section-nav.component.scss +53 -47
  73. package/src/lib/components/select/rt-select.component.scss +146 -138
  74. package/src/lib/components/skeleton/rt-skeleton.component.scss +50 -41
  75. package/src/lib/components/skeleton-wrapper/rt-skeleton-wrapper.component.scss +8 -6
  76. package/src/lib/components/spinner/rt-spinner.component.scss +35 -32
  77. package/src/lib/components/split-button/rt-split-button.component.scss +74 -62
  78. package/src/lib/components/stat-tile/rt-stat-tile.component.scss +95 -91
  79. package/src/lib/components/stepper/rt-stepper.component.scss +107 -101
  80. package/src/lib/components/table/copy-cell/rt-copy-cell.component.scss +39 -30
  81. package/src/lib/components/table/rt-table.component.scss +260 -252
  82. package/src/lib/components/table/settings-aside/rt-table-settings-aside.component.scss +7 -5
  83. package/src/lib/components/table/settings-panel/rt-table-settings-panel.component.scss +71 -61
  84. package/src/lib/components/table/sort-header/rt-table-sort-header.component.scss +31 -29
  85. package/src/lib/components/tabs/rt-tabs.component.scss +184 -175
  86. package/src/lib/components/tag/rt-tag.component.scss +97 -92
  87. package/src/lib/components/textarea/rt-textarea.component.scss +62 -60
  88. package/src/lib/components/theme-toggle/rt-theme-toggle.component.scss +7 -5
  89. package/src/lib/components/thread-list/rt-thread-list.component.scss +221 -212
  90. package/src/lib/components/timeline/rt-timeline.component.scss +82 -76
  91. package/src/lib/components/toast/rt-toast.component.scss +169 -160
  92. package/src/lib/components/toast/rt-toaster.component.scss +37 -35
  93. package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +129 -122
  94. package/src/lib/components/toggle-switch/rt-toggle-switch.component.scss +97 -91
  95. package/src/lib/components/toolbar/rt-toolbar.component.scss +63 -54
  96. package/src/lib/components/tooltip/rt-tooltip.component.scss +24 -15
  97. package/src/lib/components/welcome-dialog/rt-welcome-dialog.component.scss +46 -44
  98. package/src/lib/components/workspace/rt-workspace.component.scss +139 -131
  99. package/src/lib/components/workspace-details/rt-workspace-details.component.scss +105 -101
  100. package/src/styles/_index.scss +11 -0
  101. package/src/styles/_layers.scss +22 -0
  102. package/src/styles/_login.scss +87 -85
  103. package/src/styles/_mixins.scss +1 -1
  104. package/src/styles/_primitives.scss +138 -66
  105. package/src/styles/_scrollbar.scss +21 -19
  106. package/src/styles/_semantic.scss +155 -62
  107. package/src/styles/_theme-dark-rules.scss +23 -0
  108. package/src/styles/_theme-dark.scss +61 -42
  109. package/styles/tokens.css +754 -418
  110. package/types/rt-tools-ui-kit-v2.d.ts +292 -103
  111. package/rt-tools-ui-kit-v2-0.5.0.tgz +0 -0
@@ -0,0 +1,40 @@
1
+ # `rt-markdown-text`
2
+
3
+ Текст, написанный разметкой, показанный узлами: заголовки, списки, таблицы, цитаты и код вместо
4
+ частокола знаков.
5
+
6
+ ```html
7
+ <rt-markdown-text [text]="record.text" />
8
+ ```
9
+
10
+ | вход | тип | умолчание |
11
+ | ------ | ---------------- | -------------- |
12
+ | `text` | `string \| null` | **обязателен** |
13
+
14
+ Выходов нет.
15
+
16
+ ## Главное, что нужно знать
17
+
18
+ **Перечень разметки закрыт и зашит.** Компонент понимает заголовки, абзацы, списки — простые и
19
+ нумерованные, — таблицы, цитаты, код строкой и блоком, жирный, курсив, зачёркнутый и ссылку.
20
+ Настроить перечень нечем: вход один — сам текст.
21
+
22
+ **Всё, чего в перечне нет, остаётся видимым текстом.** Сырой HTML не вычищается, а не
23
+ разбирается вовсе: узла для него разборщик не строит, и присланная строка видна как есть.
24
+ Отсюда же — картинки в вывод не попадают, а ссылка становится ссылкой только при схеме `http`,
25
+ `https` или `mailto`.
26
+
27
+ **Присланная строка в страницу не отдаётся ни разу.** Компонент рисует дерево узлов, которое
28
+ вернул разбор; другого пути у текста внутрь страницы нет.
29
+
30
+ ## Края
31
+
32
+ - **Одиночный перенос строки остаётся переносом.** По правилам `.md` он схлопнулся бы в пробел,
33
+ но тексты, которые сюда приходят, пишут строками осмысленно.
34
+ - **Блок кода не раскрашивается по языкам.** Слово языка у ограды разбирается и на вид не
35
+ влияет: раскраска потребовала бы второй библиотеки в рантайме.
36
+ - **Таблица и блок кода прокручиваются вбок сами** и ширину родителя не растягивают.
37
+ - **Таблица рисуется своей разметкой, а не `rt-table`.** У той колонки объявляются заранее
38
+ директивами, а число столбцов здесь приходит из текста.
39
+ - **Пустой текст не рисует ничего** — ни пустого абзаца, ни отступа: показывать или прятать
40
+ заголовок раздела, решает потребитель.
@@ -0,0 +1,130 @@
1
+ @layer rt-kit.components {
2
+ .rt-markdown-text {
3
+ --rt-markdown-text-radius: var(--rt-radius-sm);
4
+ --rt-markdown-text-border-width: var(--rt-border-width-thin);
5
+
6
+ display: flex;
7
+ min-width: 0;
8
+ max-width: 100%;
9
+ flex-direction: column;
10
+ color: var(--rt-color-text-primary);
11
+ font-family: var(--rt-font-family-sans);
12
+ font-size: var(--rt-text-xs);
13
+ font-weight: var(--rt-font-weight-regular);
14
+ gap: var(--rt-space-sm);
15
+ letter-spacing: var(--rt-letter-spacing-wide);
16
+ line-height: var(--rt-leading-snug);
17
+
18
+ &__heading {
19
+ margin: 0;
20
+ color: var(--rt-color-text-primary);
21
+ font-weight: var(--rt-font-weight-semibold);
22
+
23
+ &--level--1 {
24
+ font-size: var(--rt-text-lg);
25
+ }
26
+
27
+ &--level--2 {
28
+ font-size: var(--rt-text-md);
29
+ }
30
+
31
+ &--level--3,
32
+ &--level--4,
33
+ &--level--5,
34
+ &--level--6 {
35
+ font-size: var(--rt-text-sm);
36
+ }
37
+ }
38
+
39
+ &__paragraph {
40
+ margin: 0;
41
+ }
42
+
43
+ &__list {
44
+ padding-left: var(--rt-space-md);
45
+ margin: 0;
46
+ list-style: disc;
47
+
48
+ &--ordered {
49
+ list-style: decimal;
50
+ }
51
+ }
52
+
53
+ &__item {
54
+ &--level--1 {
55
+ margin-left: var(--rt-space-md);
56
+ }
57
+
58
+ &--level--2 {
59
+ margin-left: var(--rt-space-lg);
60
+ }
61
+ }
62
+
63
+ &__quote {
64
+ padding-left: var(--rt-space-sm);
65
+ border-left: var(--rt-markdown-text-border-width) solid var(--rt-color-border-default);
66
+ margin: 0;
67
+ color: var(--rt-color-text-muted);
68
+ }
69
+
70
+ &__code {
71
+ max-width: 100%;
72
+ padding: var(--rt-space-sm);
73
+ border-radius: var(--rt-markdown-text-radius);
74
+ margin: 0;
75
+ background: var(--rt-color-bg-subtle);
76
+ color: var(--rt-color-text-primary);
77
+ font-family: var(--rt-font-family-mono);
78
+ font-size: var(--rt-text-2xs);
79
+ line-height: var(--rt-leading-snug);
80
+ overflow-x: auto;
81
+ }
82
+
83
+ &__code-inline {
84
+ padding: 0 var(--rt-space-2xs);
85
+ border-radius: var(--rt-markdown-text-radius);
86
+ background: var(--rt-color-bg-subtle);
87
+ font-family: var(--rt-font-family-mono);
88
+ font-size: var(--rt-text-2xs);
89
+ }
90
+
91
+ &__table-scroll {
92
+ max-width: 100%;
93
+ overflow-x: auto;
94
+ }
95
+
96
+ &__table {
97
+ width: 100%;
98
+ border-collapse: collapse;
99
+ }
100
+
101
+ &__head-cell,
102
+ &__cell {
103
+ padding: var(--rt-space-2xs) var(--rt-space-sm);
104
+ border: var(--rt-markdown-text-border-width) solid var(--rt-color-border-default);
105
+ text-align: left;
106
+ }
107
+
108
+ &__head-cell {
109
+ color: var(--rt-color-text-muted);
110
+ font-weight: var(--rt-font-weight-semibold);
111
+ }
112
+
113
+ &__strong {
114
+ font-weight: var(--rt-font-weight-semibold);
115
+ }
116
+
117
+ &__emphasis {
118
+ font-style: italic;
119
+ }
120
+
121
+ &__strike {
122
+ text-decoration: line-through;
123
+ }
124
+
125
+ &__link {
126
+ color: var(--rt-color-text-link);
127
+ text-decoration: underline;
128
+ }
129
+ }
130
+ }
@@ -1,36 +1,38 @@
1
- /* rt-menu-confirm-dialog — confirm-модалка деструктивного пункта rt-menu-item.
2
- ViewEncapsulation.None — селекторы префиксованы `.rt-menu-confirm-dialog`.
3
- Frame (фон/радиус/тень) даёт rt-dialog; здесь — только layout контента. */
1
+ @layer rt-kit.components {
2
+ /* rt-menu-confirm-dialog — confirm-модалка деструктивного пункта rt-menu-item.
3
+ ViewEncapsulation.None — селекторы префиксованы `.rt-menu-confirm-dialog`.
4
+ Frame (фон/радиус/тень) даёт rt-dialog; здесь — только layout контента. */
4
5
 
5
- .rt-menu-confirm-dialog {
6
- display: flex;
7
- box-sizing: border-box;
8
- flex-direction: column;
9
- padding: var(--rt-space-xl);
10
- gap: var(--rt-space-lg);
11
-
12
- &__text {
6
+ .rt-menu-confirm-dialog {
13
7
  display: flex;
8
+ box-sizing: border-box;
14
9
  flex-direction: column;
15
- gap: var(--rt-space-sm);
16
- }
10
+ padding: var(--rt-space-xl);
11
+ gap: var(--rt-space-lg);
17
12
 
18
- &__title {
19
- margin: 0;
20
- color: var(--rt-color-text-primary);
21
- font-size: var(--rt-text-md);
22
- font-weight: var(--rt-font-weight-bold);
23
- }
13
+ &__text {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: var(--rt-space-sm);
17
+ }
24
18
 
25
- &__message {
26
- margin: 0;
27
- color: var(--rt-color-text-secondary);
28
- font-size: var(--rt-text-sm);
29
- }
19
+ &__title {
20
+ margin: 0;
21
+ color: var(--rt-color-text-primary);
22
+ font-size: var(--rt-text-md);
23
+ font-weight: var(--rt-font-weight-bold);
24
+ }
30
25
 
31
- &__footer {
32
- display: flex;
33
- justify-content: flex-end;
34
- gap: var(--rt-space-sm);
26
+ &__message {
27
+ margin: 0;
28
+ color: var(--rt-color-text-muted);
29
+ font-size: var(--rt-text-sm);
30
+ }
31
+
32
+ &__footer {
33
+ display: flex;
34
+ justify-content: flex-end;
35
+ gap: var(--rt-space-sm);
36
+ }
35
37
  }
36
38
  }
@@ -1,54 +1,59 @@
1
- /* rt-menu-item — пункт меню rt-menu. ViewEncapsulation.None.
2
- Host (`<rt-menu-item>`) несёт класс блока и сам является кликабельной зоной. */
3
-
4
- .rt-menu-item {
5
- display: flex;
6
- width: 100%;
7
- box-sizing: border-box;
8
- align-items: center;
9
- padding: var(--rt-space-sm) var(--rt-space-md);
10
- border-radius: var(--rt-radius-sm);
11
- color: var(--rt-color-text-primary);
12
- cursor: pointer;
13
- font-size: var(--rt-text-sm);
14
- gap: var(--rt-space-sm);
15
- text-align: start;
16
- transition: background-color var(--rt-duration-fast) ease;
17
-
18
- &:hover {
19
- background: var(--rt-color-bg-hover);
20
- }
1
+ @layer rt-kit.components {
2
+ /* rt-menu-item — пункт меню rt-menu. ViewEncapsulation.None.
3
+ Host (`<rt-menu-item>`) несёт класс блока и сам является кликабельной зоной. */
4
+
5
+ .rt-menu-item {
6
+ --rt-menu-item-radius: var(--rt-radius-sm);
7
+ --rt-menu-item-transition-duration: var(--rt-duration-fast);
8
+
9
+ display: flex;
10
+ width: 100%;
11
+ box-sizing: border-box;
12
+ align-items: center;
13
+ padding: var(--rt-space-sm) var(--rt-space-md);
14
+ border-radius: var(--rt-menu-item-radius);
15
+ color: var(--rt-color-text-primary);
16
+ cursor: pointer;
17
+ font-size: var(--rt-text-sm);
18
+ gap: var(--rt-space-sm);
19
+ text-align: start;
20
+ transition: background-color var(--rt-menu-item-transition-duration) ease;
21
21
 
22
- &:focus-visible {
23
- background: var(--rt-color-bg-hover);
24
- outline: none;
25
- }
22
+ &:hover {
23
+ background: var(--rt-color-bg-hover);
24
+ }
26
25
 
27
- &__icon {
28
- flex-shrink: 0;
29
- color: var(--rt-color-text-muted);
30
- }
26
+ &:focus-visible {
27
+ background: var(--rt-color-bg-hover);
28
+ outline: none;
29
+ }
31
30
 
32
- &__label {
33
- flex: 1 1 auto;
34
- white-space: nowrap;
35
- }
31
+ &__icon {
32
+ flex-shrink: 0;
33
+ color: var(--rt-color-text-muted);
34
+ }
36
35
 
37
- &--danger {
38
- color: var(--rt-color-state-error-text);
36
+ &__label {
37
+ flex: 1 1 auto;
38
+ white-space: nowrap;
39
+ }
39
40
 
40
- .rt-menu-item__icon {
41
+ &--danger {
41
42
  color: var(--rt-color-state-error-text);
43
+
44
+ .rt-menu-item__icon {
45
+ color: var(--rt-color-state-error-text);
46
+ }
42
47
  }
43
- }
44
48
 
45
- &--disabled {
46
- color: var(--rt-color-text-muted);
47
- cursor: default;
48
- opacity: 0.5;
49
+ &--disabled {
50
+ color: var(--rt-color-text-muted);
51
+ cursor: default;
52
+ opacity: 0.5;
49
53
 
50
- &:hover {
51
- background: transparent;
54
+ &:hover {
55
+ background: transparent;
56
+ }
52
57
  }
53
58
  }
54
59
  }
@@ -1,19 +1,27 @@
1
- /* rt-menu — dropdown-меню действий. ViewEncapsulation.None.
2
- Триггер живёт в host'е, панель (`__panel`) рендерится в CDK Overlay. */
1
+ @layer rt-kit.components {
2
+ /* rt-menu — dropdown-меню действий. ViewEncapsulation.None.
3
+ Триггер живёт в host'е, панель (`__panel`) рендерится в CDK Overlay. */
3
4
 
4
- .rt-menu {
5
- display: inline-flex;
6
- align-items: center;
7
- justify-content: center;
5
+ .rt-menu {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ justify-content: center;
8
9
 
9
- &__panel {
10
- display: flex;
11
- min-width: 180px;
12
- flex-direction: column;
13
- padding: var(--rt-space-xs);
14
- border: var(--rt-border-width-thin) solid var(--rt-color-border-subtle);
15
- border-radius: var(--rt-radius-md);
16
- background: var(--rt-color-bg-surface);
17
- box-shadow: var(--rt-shadow-lg);
10
+ &__panel {
11
+ /* Панель рисуется в CDK Overlay, вне поддерева блока: свойство
12
+ объявляется на ней самой — с корня блока оно бы не докатилось. */
13
+ --rt-menu-panel-radius: var(--rt-radius-md);
14
+ --rt-menu-panel-border-width: var(--rt-border-width-thin);
15
+ --rt-menu-panel-shadow: var(--rt-shadow-lg);
16
+
17
+ display: flex;
18
+ min-width: 180px;
19
+ flex-direction: column;
20
+ padding: var(--rt-space-xs);
21
+ border: var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);
22
+ border-radius: var(--rt-menu-panel-radius);
23
+ background: var(--rt-color-bg-surface);
24
+ box-shadow: var(--rt-menu-panel-shadow);
25
+ }
18
26
  }
19
27
  }
@@ -1,61 +1,65 @@
1
- /* rt-message — alert/banner в common/ui. ViewEncapsulation.None.
2
- Хост адресуется по имени элемента, а не по классу блока: класс `.rt-message` висит
3
- и на `<rt-message>`, и на корне шаблона, поэтому правила блока вложены в хост —
4
- так они достаются только корню шаблона. */
5
-
6
- rt-message {
7
- display: block;
8
-
9
- .rt-message {
10
- display: flex;
11
- align-items: flex-start;
12
- padding: var(--rt-space-3) var(--rt-space-4);
13
- border-radius: var(--rt-radius-md);
14
- background: var(--rt-color-state-info-bg);
15
- color: var(--rt-color-state-info);
16
- font-size: var(--rt-text-sm);
17
- gap: var(--rt-space-2);
18
- line-height: var(--rt-leading-normal);
19
-
20
- &--severity--info {
1
+ @layer rt-kit.components {
2
+ /* rt-message — alert/banner в common/ui. ViewEncapsulation.None.
3
+ Хост адресуется по имени элемента, а не по классу блока: класс `.rt-message` висит
4
+ и на `<rt-message>`, и на корне шаблона, поэтому правила блока вложены в хост —
5
+ так они достаются только корню шаблона. */
6
+
7
+ rt-message {
8
+ display: block;
9
+
10
+ .rt-message {
11
+ --rt-message-radius: var(--rt-radius-md);
12
+
13
+ display: flex;
14
+ align-items: flex-start;
15
+ padding: var(--rt-space-4) var(--rt-space-4);
16
+ border-radius: var(--rt-message-radius);
21
17
  background: var(--rt-color-state-info-bg);
22
18
  color: var(--rt-color-state-info);
23
- }
19
+ font-size: var(--rt-text-sm);
20
+ gap: var(--rt-space-2);
21
+ line-height: var(--rt-leading-normal);
24
22
 
25
- &--severity--success {
26
- background: var(--rt-color-state-success-bg);
27
- color: var(--rt-color-state-success);
28
- }
23
+ &--severity--info {
24
+ background: var(--rt-color-state-info-bg);
25
+ color: var(--rt-color-state-info);
26
+ }
29
27
 
30
- &--severity--warning {
31
- background: var(--rt-color-state-warning-bg);
32
- color: var(--rt-color-state-warning);
33
- }
28
+ &--severity--success {
29
+ background: var(--rt-color-state-success-bg);
30
+ color: var(--rt-color-state-success);
31
+ }
34
32
 
35
- &--severity--danger {
36
- background: var(--rt-color-state-danger-bg);
37
- color: var(--rt-color-state-danger);
38
- }
33
+ &--severity--warning {
34
+ background: var(--rt-color-state-warning-bg);
35
+ color: var(--rt-color-state-warning);
36
+ }
39
37
 
40
- &--severity--secondary,
41
- &--severity--neutral {
42
- background: var(--rt-color-bg-subtle);
43
- color: var(--rt-color-text-primary);
44
- }
38
+ &--severity--danger {
39
+ background: var(--rt-color-state-danger-bg);
40
+ color: var(--rt-color-state-danger);
41
+ }
45
42
 
46
- &__icon {
47
- flex-shrink: 0;
48
- margin-block-start: var(--rt-space-0-5);
49
- }
43
+ &--severity--secondary,
44
+ &--severity--neutral {
45
+ background: var(--rt-color-bg-subtle);
46
+ color: var(--rt-color-text-primary);
47
+ }
50
48
 
51
- &__body {
52
- min-width: 0;
53
- flex: 1 1 auto;
54
- }
49
+ &__icon {
50
+ flex-shrink: 0;
51
+ margin-block-start: var(--rt-space-0-5);
52
+ }
53
+
54
+ &__body {
55
+ min-width: 0;
56
+ flex: 1 1 auto;
57
+ }
55
58
 
56
- &__close {
57
- flex-shrink: 0;
58
- margin-inline-start: auto;
59
+ &__close {
60
+ flex-shrink: 0;
61
+ margin-inline-start: auto;
62
+ }
59
63
  }
60
64
  }
61
65
  }
@@ -18,7 +18,7 @@
18
18
  | `accept` | `string` | `''` |
19
19
  | `sending` / `disabled` | `boolean` | `false` |
20
20
  | `formatting` | `boolean` | `false` |
21
- | `toolbar` | `IRtRichEditorToolbar` | `'full'` |
21
+ | `toolbar` | `TRtRichEditorToolbar` | `'full'` |
22
22
  | `minRows` / `maxRows` | `number` | 1 / 6 |
23
23
  | `droppedFiles` | `File[] \| null` | `null` |
24
24
 
@@ -1,59 +1,65 @@
1
- .rt-message-composer {
2
- display: flex;
3
- flex-direction: column;
4
- padding: var(--rt-space-3);
5
- border: var(--rt-border-width-thin) solid var(--rt-color-border-default);
6
- border-radius: var(--rt-radius-md);
7
- background: var(--rt-color-bg-surface-default, transparent);
8
- gap: var(--rt-space-2);
9
-
10
- &:focus-within {
11
- border-color: var(--rt-color-border-strong, var(--rt-color-border-default));
12
- }
1
+ @layer rt-kit.components {
2
+ .rt-message-composer {
3
+ --rt-message-composer-radius: var(--rt-radius-md);
4
+ --rt-message-composer-border-width: var(--rt-border-width-thin);
5
+ --rt-message-composer-divider-width: var(--rt-border-width-thin);
6
+
7
+ display: flex;
8
+ flex-direction: column;
9
+ padding: var(--rt-space-4);
10
+ border: var(--rt-message-composer-border-width) solid var(--rt-color-border-default);
11
+ border-radius: var(--rt-message-composer-radius);
12
+ background: var(--rt-color-bg-surface);
13
+ gap: var(--rt-space-2);
13
14
 
14
- &__input {
15
- padding: 0;
16
- border: 0;
17
- margin: 0;
18
- background: transparent;
19
- color: inherit;
20
- font: inherit;
21
- font-size: var(--rt-text-sm);
22
- inline-size: 100%;
23
- line-height: var(--rt-leading-snug);
24
- outline: 0;
25
- resize: none;
26
-
27
- &::placeholder {
28
- color: var(--rt-color-text-muted);
15
+ &:focus-within {
16
+ border-color: var(--rt-color-border-strong);
29
17
  }
30
18
 
31
- &:disabled {
32
- cursor: not-allowed;
19
+ &__input {
20
+ padding: 0;
21
+ border: 0;
22
+ margin: 0;
23
+ background: transparent;
24
+ color: inherit;
25
+ font: inherit;
26
+ font-size: var(--rt-text-sm);
27
+ inline-size: 100%;
28
+ line-height: var(--rt-leading-snug);
29
+ outline: 0;
30
+ resize: none;
31
+
32
+ &::placeholder {
33
+ color: var(--rt-color-text-muted);
34
+ }
35
+
36
+ &:disabled {
37
+ cursor: not-allowed;
38
+ }
33
39
  }
34
- }
35
40
 
36
- &__files {
37
- display: flex;
38
- flex-direction: column;
39
- gap: var(--rt-space-1);
40
- }
41
+ &__files {
42
+ display: flex;
43
+ flex-direction: column;
44
+ gap: var(--rt-space-1);
45
+ }
41
46
 
42
- // Разделитель тянется на всю ширину бокса — компенсируем горизонтальный padding.
43
- &__divider {
44
- background: var(--rt-color-border-default);
45
- block-size: var(--rt-border-width-thin);
46
- margin-inline: calc(-1 * var(--rt-space-3));
47
- }
47
+ // Разделитель тянется на всю ширину бокса — компенсируем горизонтальный padding.
48
+ &__divider {
49
+ background: var(--rt-color-border-default);
50
+ block-size: var(--rt-message-composer-divider-width);
51
+ margin-inline: calc(-1 * var(--rt-space-4));
52
+ }
48
53
 
49
- &__controls {
50
- display: flex;
51
- align-items: center;
52
- gap: var(--rt-space-2);
53
- }
54
+ &__controls {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: var(--rt-space-2);
58
+ }
54
59
 
55
- // Кнопка отправки всегда у правого края, даже когда attach скрыт.
56
- &__send {
57
- margin-inline-start: auto;
60
+ // Кнопка отправки всегда у правого края, даже когда attach скрыт.
61
+ &__send {
62
+ margin-inline-start: auto;
63
+ }
58
64
  }
59
65
  }
@@ -1,11 +1,15 @@
1
- /* rt-money-list — финансовый блок на подложке (ViewEncapsulation.None).
2
- Селектор bare `.rt-money-list` (класс на host). */
1
+ @layer rt-kit.components {
2
+ /* rt-money-list — финансовый блок на подложке (ViewEncapsulation.None).
3
+ Селектор bare `.rt-money-list` (класс на host). */
3
4
 
4
- .rt-money-list {
5
- display: flex;
6
- flex-direction: column;
7
- padding: var(--rt-space-md);
8
- border-radius: var(--rt-radius-md);
9
- background: var(--rt-color-bg-subtle);
10
- gap: var(--rt-space-xs);
5
+ .rt-money-list {
6
+ --rt-money-list-radius: var(--rt-radius-md);
7
+
8
+ display: flex;
9
+ flex-direction: column;
10
+ padding: var(--rt-space-md);
11
+ border-radius: var(--rt-money-list-radius);
12
+ background: var(--rt-color-bg-subtle);
13
+ gap: var(--rt-space-xs);
14
+ }
11
15
  }