@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,129 +1,133 @@
1
- /* rt-calendar — ViewEncapsulation.None: правила таргетируют BEM-класс блока.
2
- `.rt-calendar` — сам хост (шаблон начинается с ng-container, класс ставит host). */
3
-
4
- .rt-calendar {
5
- display: block;
6
-
7
- &__header {
8
- display: flex;
9
- align-items: center;
10
- justify-content: space-between;
11
- margin-bottom: var(--rt-space-3);
12
- gap: var(--rt-space-3);
13
- }
14
-
15
- &__nav {
16
- flex: 0 0 auto;
17
- }
1
+ @layer rt-kit.components {
2
+ /* rt-calendar — ViewEncapsulation.None: правила таргетируют BEM-класс блока.
3
+ `.rt-calendar` — сам хост (шаблон начинается с ng-container, класс ставит host). */
18
4
 
19
- &__months {
20
- display: grid;
21
- gap: var(--rt-space-6);
22
- grid-template-columns: repeat(2, 1fr);
23
- }
5
+ .rt-calendar {
6
+ --rt-calendar-day-radius: var(--rt-radius-md);
24
7
 
25
- &__month-title {
26
- margin: 0 0 var(--rt-space-2);
27
- color: var(--rt-color-text-primary);
28
- font-weight: var(--rt-font-weight-semibold);
29
- text-align: center;
8
+ display: block;
30
9
 
31
- &:first-letter {
32
- text-transform: uppercase;
10
+ &__header {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
14
+ margin-bottom: var(--rt-space-4);
15
+ gap: var(--rt-space-4);
33
16
  }
34
- }
35
-
36
- &__grid {
37
- display: grid;
38
- gap: var(--rt-space-0-5);
39
- grid-template-columns: repeat(7, 1fr);
40
- }
41
17
 
42
- &__weekday {
43
- padding: var(--rt-space-1) 0;
44
- color: var(--rt-color-text-muted);
45
- font-size: var(--rt-text-xs);
46
- text-align: center;
47
- }
18
+ &__nav {
19
+ flex: 0 0 auto;
20
+ }
48
21
 
49
- &__day {
50
- display: flex;
51
- flex-direction: column;
52
- align-items: center;
53
- padding: var(--rt-space-1-5) var(--rt-space-0-5);
54
- border: none;
55
- border-radius: var(--rt-radius-md);
56
- background: none;
57
- color: var(--rt-color-text-primary);
58
- cursor: pointer;
59
- font: inherit;
60
- gap: var(--rt-space-0-5);
61
-
62
- &:hover:not(:disabled, [data-state='start'], [data-state='end'], [data-state='in-range']) {
63
- background: var(--rt-color-bg-subtle);
22
+ &__months {
23
+ display: grid;
24
+ gap: var(--rt-space-6);
25
+ grid-template-columns: repeat(2, 1fr);
64
26
  }
65
27
 
66
- &:disabled {
67
- cursor: not-allowed;
28
+ &__month-title {
29
+ margin: 0 0 var(--rt-space-2);
30
+ color: var(--rt-color-text-primary);
31
+ font-weight: var(--rt-font-weight-semibold);
32
+ text-align: center;
33
+
34
+ &:first-letter {
35
+ text-transform: uppercase;
36
+ }
68
37
  }
69
38
 
70
- &[data-state='past'],
71
- &[data-state='blocked'] {
72
- color: var(--rt-color-text-muted);
73
- opacity: 0.45;
39
+ &__grid {
40
+ display: grid;
41
+ gap: var(--rt-space-0-5);
42
+ grid-template-columns: repeat(7, 1fr);
74
43
  }
75
44
 
76
- &[data-state='busy'] {
45
+ &__weekday {
46
+ padding: var(--rt-space-1) 0;
77
47
  color: var(--rt-color-text-muted);
78
- opacity: 0.45;
79
- text-decoration: line-through;
48
+ font-size: var(--rt-text-xs);
49
+ text-align: center;
80
50
  }
81
51
 
82
- &[data-state='start'],
83
- &[data-state='end'] {
84
- background: var(--rt-color-action-primary);
85
- color: var(--rt-color-action-on-primary);
52
+ &__day {
53
+ display: flex;
54
+ flex-direction: column;
55
+ align-items: center;
56
+ padding: var(--rt-space-2) var(--rt-space-0-5);
57
+ border: none;
58
+ border-radius: var(--rt-calendar-day-radius);
59
+ background: none;
60
+ color: var(--rt-color-text-primary);
61
+ cursor: pointer;
62
+ font: inherit;
63
+ gap: var(--rt-space-0-5);
64
+
65
+ &:hover:not(:disabled, [data-state='start'], [data-state='end'], [data-state='in-range']) {
66
+ background: var(--rt-color-bg-subtle);
67
+ }
68
+
69
+ &:disabled {
70
+ cursor: not-allowed;
71
+ }
72
+
73
+ &[data-state='past'],
74
+ &[data-state='blocked'] {
75
+ color: var(--rt-color-text-muted);
76
+ opacity: 0.45;
77
+ }
78
+
79
+ &[data-state='busy'] {
80
+ color: var(--rt-color-text-muted);
81
+ opacity: 0.45;
82
+ text-decoration: line-through;
83
+ }
84
+
85
+ &[data-state='start'],
86
+ &[data-state='end'] {
87
+ background: var(--rt-color-action-primary);
88
+ color: var(--rt-color-action-on-primary);
89
+ }
90
+
91
+ &[data-state='in-range'] {
92
+ background: var(--rt-color-action-primary-soft);
93
+ color: var(--rt-color-text-link);
94
+ font-weight: var(--rt-font-weight-semibold);
95
+ }
86
96
  }
87
97
 
88
- &[data-state='in-range'] {
89
- background: var(--rt-color-action-primary-soft);
90
- color: var(--rt-color-text-link);
91
- font-weight: var(--rt-font-weight-semibold);
98
+ &__day-num {
99
+ font-size: var(--rt-text-sm);
100
+ font-weight: var(--rt-font-weight-medium);
92
101
  }
93
- }
94
-
95
- &__day-num {
96
- font-size: var(--rt-text-sm);
97
- font-weight: var(--rt-font-weight-medium);
98
- }
99
-
100
- &__day-sublabel {
101
- font-size: var(--rt-text-2xs);
102
- opacity: 0.75;
103
- }
104
102
 
105
- @media (width <= 640px) {
106
- &__months {
107
- grid-template-columns: 1fr;
103
+ &__day-sublabel {
104
+ font-size: var(--rt-text-2xs);
105
+ opacity: 0.75;
108
106
  }
109
107
 
110
- /* на мобиле показываем один месяц — навигация листает по одному */
111
- &__month:last-child {
112
- display: none;
113
- }
114
- }
108
+ @media (width <= 640px) {
109
+ &__months {
110
+ grid-template-columns: 1fr;
111
+ }
115
112
 
116
- /* Экраны уже 375px: колонка не сжимается ниже строки с ценой — разряды
117
- разделены неразрывным пробелом, и перенести её нечем. Освобождаем
118
- ширину боковыми отступами клетки и ступенью кегля, а не прячем цену:
119
- без неё календарь перестаёт быть прайс-листом */
120
- @media (width <= 374px) {
121
- &__day {
122
- padding-inline: 0;
113
+ /* на мобиле показываем один месяц — навигация листает по одному */
114
+ &__month:last-child {
115
+ display: none;
116
+ }
123
117
  }
124
118
 
125
- &__day-sublabel {
126
- font-size: var(--rt-text-3xs);
119
+ /* Экраны уже 375px: колонка не сжимается ниже строки с ценой — разряды
120
+ разделены неразрывным пробелом, и перенести её нечем. Освобождаем
121
+ ширину боковыми отступами клетки и ступенью кегля, а не прячем цену:
122
+ без неё календарь перестаёт быть прайс-листом */
123
+ @media (width <= 374px) {
124
+ &__day {
125
+ padding-inline: 0;
126
+ }
127
+
128
+ &__day-sublabel {
129
+ font-size: var(--rt-text-3xs);
130
+ }
127
131
  }
128
132
  }
129
133
  }
@@ -1,59 +1,67 @@
1
- /* rt-card — контейнер карточки в common/ui. ViewEncapsulation.None.
2
- Хост адресуется по имени элемента, а не по классу блока: класс `.rt-card` висит
3
- и на `<rt-card>`, и на корне шаблона, поэтому правила блока вложены в хост —
4
- так они достаются только корню шаблона. */
1
+ @layer rt-kit.components {
2
+ /* rt-card — контейнер карточки в common/ui. ViewEncapsulation.None.
3
+ Хост адресуется по имени элемента, а не по классу блока: класс `.rt-card` висит
4
+ и на `<rt-card>`, и на корне шаблона, поэтому правила блока вложены в хост —
5
+ так они достаются только корню шаблона. */
5
6
 
6
- rt-card {
7
- display: block;
8
-
9
- .rt-card {
7
+ rt-card {
10
8
  display: block;
11
- padding: var(--rt-space-lg);
12
- border-radius: var(--rt-radius-xl);
13
- background: var(--rt-color-bg-surface);
14
- box-shadow: var(--rt-shadow-card);
15
- color: var(--rt-color-text-primary);
16
-
17
- &--clickable {
18
- cursor: pointer;
19
- transition:
20
- box-shadow var(--rt-duration-fast) ease,
21
- transform var(--rt-duration-fast) ease;
22
-
23
- &:hover {
24
- box-shadow: var(--rt-shadow-lg);
25
- }
26
9
 
27
- &:focus-visible {
28
- box-shadow: var(--rt-shadow-focus-ring);
29
- outline: 2px solid transparent;
30
- outline-offset: 2px;
10
+ .rt-card {
11
+ --rt-card-radius: var(--rt-radius-xl);
12
+ --rt-card-shadow: var(--rt-shadow-card);
13
+ --rt-card-shadow-hover: var(--rt-shadow-lg);
14
+ --rt-card-focus-shadow: var(--rt-shadow-focus-ring);
15
+ --rt-card-transition-duration: var(--rt-duration-fast);
16
+
17
+ display: block;
18
+ padding: var(--rt-space-lg);
19
+ border-radius: var(--rt-card-radius);
20
+ background: var(--rt-color-bg-surface);
21
+ box-shadow: var(--rt-card-shadow);
22
+ color: var(--rt-color-text-primary);
23
+
24
+ &--clickable {
25
+ cursor: pointer;
26
+ transition:
27
+ box-shadow var(--rt-card-transition-duration) ease,
28
+ transform var(--rt-card-transition-duration) ease;
29
+
30
+ &:hover {
31
+ box-shadow: var(--rt-card-shadow-hover);
32
+ }
33
+
34
+ &:focus-visible {
35
+ box-shadow: var(--rt-card-focus-shadow);
36
+ outline: 2px solid transparent;
37
+ outline-offset: 2px;
38
+ }
31
39
  }
32
- }
33
40
 
34
- &__header {
35
- margin-block-end: var(--rt-space-md);
41
+ &__header {
42
+ margin-block-end: var(--rt-space-md);
36
43
 
37
- &:empty {
38
- display: none;
44
+ &:empty {
45
+ display: none;
46
+ }
39
47
  }
40
- }
41
48
 
42
- &__title {
43
- margin: 0;
44
- font-size: var(--rt-text-lg);
45
- line-height: var(--rt-leading-snug);
46
- }
49
+ &__title {
50
+ margin: 0;
51
+ font-size: var(--rt-text-lg);
52
+ line-height: var(--rt-leading-snug);
53
+ }
47
54
 
48
- &__content {
49
- display: block;
50
- }
55
+ &__content {
56
+ display: block;
57
+ }
51
58
 
52
- &__footer {
53
- margin-block-start: var(--rt-space-md);
59
+ &__footer {
60
+ margin-block-start: var(--rt-space-md);
54
61
 
55
- &:empty {
56
- display: none;
62
+ &:empty {
63
+ display: none;
64
+ }
57
65
  }
58
66
  }
59
67
  }