@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.
- package/README.md +87 -7
- package/fesm2022/rt-tools-ui-kit-v2.mjs +1929 -994
- package/fesm2022/rt-tools-ui-kit-v2.mjs.map +1 -1
- package/package.json +1 -1
- package/rt-tools-ui-kit-v2-0.7.0.tgz +0 -0
- package/src/lib/components/aside/_rt-aside-overlay.scss +73 -71
- package/src/lib/components/aside/footer/rt-aside-footer.component.scss +20 -16
- package/src/lib/components/aside/header/rt-aside-header.component.scss +72 -70
- package/src/lib/components/aside/rt-aside.component.scss +107 -105
- package/src/lib/components/aside/unsaved-dialog/rt-aside-unsaved-dialog.component.scss +33 -31
- package/src/lib/components/aside-section/rt-aside-section.component.scss +27 -23
- package/src/lib/components/autocomplete/rt-autocomplete.component.scss +124 -118
- package/src/lib/components/bar-list/rt-bar-list.component.scss +85 -81
- package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +64 -57
- package/src/lib/components/button/rt-button.directive.scss +319 -280
- package/src/lib/components/calendar/rt-calendar.component.scss +106 -102
- package/src/lib/components/card/rt-card.component.scss +53 -45
- package/src/lib/components/chat/rt-chat.component.scss +312 -306
- package/src/lib/components/checkbox/rt-checkbox.component.scss +61 -54
- package/src/lib/components/collapsible-text/rt-collapsible-text.component.scss +36 -34
- package/src/lib/components/confirm-popover/rt-confirm-popover.component.scss +36 -30
- package/src/lib/components/container/rt-container.component.scss +91 -87
- package/src/lib/components/counter/rt-counter.component.scss +14 -12
- package/src/lib/components/counter-row/rt-counter-row.component.scss +31 -27
- package/src/lib/components/date-picker/rt-date-picker.component.scss +73 -71
- package/src/lib/components/delta-view/rt-delta-view.component.scss +27 -25
- package/src/lib/components/detail-list/rt-detail-list.component.scss +8 -6
- package/src/lib/components/detail-list/rt-detail-row.component.scss +18 -16
- package/src/lib/components/dialog/footer/rt-dialog-footer.component.scss +19 -17
- package/src/lib/components/dialog/header/rt-dialog-header.component.scss +27 -25
- package/src/lib/components/dialog/rt-dialog.component.scss +59 -56
- package/src/lib/components/download-link/rt-download-link.component.scss +32 -27
- package/src/lib/components/empty-state/rt-empty-state.component.scss +50 -46
- package/src/lib/components/field/rt-field.component.scss +63 -61
- package/src/lib/components/file-card/rt-file-card.component.scss +84 -78
- package/src/lib/components/file-drop/rt-file-drop.component.scss +83 -77
- package/src/lib/components/file-input/rt-file-input.component.scss +20 -18
- package/src/lib/components/file-list/rt-file-list.component.scss +9 -7
- package/src/lib/components/filter-control/rt-filter-control.component.scss +16 -14
- package/src/lib/components/header/rt-header.component.scss +61 -55
- package/src/lib/components/icon/CONTEXT.md +16 -10
- package/src/lib/components/icon/rt-icon.component.scss +14 -12
- package/src/lib/components/icon-button/CONTEXT.md +4 -2
- package/src/lib/components/icon-button/rt-icon-button.component.scss +128 -112
- package/src/lib/components/info-item/rt-info-item.component.scss +38 -36
- package/src/lib/components/input/CONTEXT.md +9 -7
- package/src/lib/components/input/rt-input.component.scss +102 -98
- package/src/lib/components/input-number/rt-input-number.component.scss +84 -82
- package/src/lib/components/live-badge/rt-live-badge.component.scss +27 -23
- package/src/lib/components/logo/rt-logo.component.scss +54 -52
- package/src/lib/components/markdown-text/CONTEXT.md +40 -0
- package/src/lib/components/markdown-text/rt-markdown-text.component.scss +130 -0
- package/src/lib/components/menu/rt-menu-confirm-dialog.component.scss +30 -28
- package/src/lib/components/menu/rt-menu-item.component.scss +47 -42
- package/src/lib/components/menu/rt-menu.component.scss +23 -15
- package/src/lib/components/message/rt-message.component.scss +53 -49
- package/src/lib/components/message-composer/CONTEXT.md +1 -1
- package/src/lib/components/message-composer/rt-message-composer.component.scss +55 -49
- package/src/lib/components/money-list/rt-money-list.component.scss +13 -9
- package/src/lib/components/money-list/rt-money-row.component.scss +23 -19
- package/src/lib/components/multiselect/rt-multiselect.component.scss +169 -161
- package/src/lib/components/night-grid/rt-night-grid.component.scss +47 -42
- package/src/lib/components/note/rt-note.component.scss +15 -11
- package/src/lib/components/notifications-bell/rt-notifications-bell.component.scss +34 -27
- package/src/lib/components/page-header/rt-page-header-mobile.scss +142 -134
- package/src/lib/components/page-header/rt-page-header-submenu.scss +130 -123
- package/src/lib/components/page-header/rt-page-header.component.scss +221 -210
- package/src/lib/components/pagination/rt-pagination.component.scss +88 -81
- package/src/lib/components/photo-viewer/rt-photo-viewer.component.scss +109 -105
- package/src/lib/components/rich-editor/CONTEXT.md +1 -1
- package/src/lib/components/rich-editor/rt-rich-editor.component.scss +63 -59
- package/src/lib/components/section-nav/rt-section-nav.component.scss +53 -47
- package/src/lib/components/select/rt-select.component.scss +146 -138
- package/src/lib/components/skeleton/rt-skeleton.component.scss +50 -41
- package/src/lib/components/skeleton-wrapper/rt-skeleton-wrapper.component.scss +8 -6
- package/src/lib/components/spinner/rt-spinner.component.scss +35 -32
- package/src/lib/components/split-button/rt-split-button.component.scss +74 -62
- package/src/lib/components/stat-tile/rt-stat-tile.component.scss +95 -91
- package/src/lib/components/stepper/rt-stepper.component.scss +107 -101
- package/src/lib/components/table/copy-cell/rt-copy-cell.component.scss +39 -30
- package/src/lib/components/table/rt-table.component.scss +260 -252
- package/src/lib/components/table/settings-aside/rt-table-settings-aside.component.scss +7 -5
- package/src/lib/components/table/settings-panel/rt-table-settings-panel.component.scss +71 -61
- package/src/lib/components/table/sort-header/rt-table-sort-header.component.scss +31 -29
- package/src/lib/components/tabs/rt-tabs.component.scss +184 -175
- package/src/lib/components/tag/rt-tag.component.scss +97 -92
- package/src/lib/components/textarea/rt-textarea.component.scss +62 -60
- package/src/lib/components/theme-toggle/rt-theme-toggle.component.scss +7 -5
- package/src/lib/components/thread-list/rt-thread-list.component.scss +221 -212
- package/src/lib/components/timeline/rt-timeline.component.scss +82 -76
- package/src/lib/components/toast/rt-toast.component.scss +169 -160
- package/src/lib/components/toast/rt-toaster.component.scss +37 -35
- package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +129 -122
- package/src/lib/components/toggle-switch/rt-toggle-switch.component.scss +97 -91
- package/src/lib/components/toolbar/rt-toolbar.component.scss +63 -54
- package/src/lib/components/tooltip/rt-tooltip.component.scss +24 -15
- package/src/lib/components/welcome-dialog/rt-welcome-dialog.component.scss +46 -44
- package/src/lib/components/workspace/rt-workspace.component.scss +139 -131
- package/src/lib/components/workspace-details/rt-workspace-details.component.scss +105 -101
- package/src/styles/_index.scss +11 -0
- package/src/styles/_layers.scss +22 -0
- package/src/styles/_login.scss +87 -85
- package/src/styles/_mixins.scss +1 -1
- package/src/styles/_primitives.scss +138 -66
- package/src/styles/_scrollbar.scss +21 -19
- package/src/styles/_semantic.scss +155 -62
- package/src/styles/_theme-dark-rules.scss +23 -0
- package/src/styles/_theme-dark.scss +61 -42
- package/styles/tokens.css +754 -418
- package/types/rt-tools-ui-kit-v2.d.ts +292 -103
- package/rt-tools-ui-kit-v2-0.5.0.tgz +0 -0
|
@@ -1,102 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// Адаптив завязан на собственную ширину компонента, а не на viewport:
|
|
8
|
-
// в узком контейнере (зажатая таблица / aside) числовая полоса прячется,
|
|
9
|
-
// показывается compact-форма «‹ Стр. N из M ›».
|
|
10
|
-
container-type: inline-size;
|
|
11
|
-
gap: var(--rt-space-md);
|
|
12
|
-
|
|
13
|
-
&__range {
|
|
14
|
-
color: var(--rt-color-text-muted);
|
|
15
|
-
font-size: var(--rt-text-sm);
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
}
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
.rt-pagination {
|
|
3
|
+
--rt-pagination-page-radius: var(--rt-radius-md);
|
|
4
|
+
--rt-pagination-page-border-width: var(--rt-border-width-thin);
|
|
5
|
+
--rt-pagination-focus-shadow: var(--rt-shadow-focus-ring);
|
|
6
|
+
--rt-pagination-transition-duration: var(--rt-duration-fast);
|
|
18
7
|
|
|
19
|
-
&__nav {
|
|
20
8
|
display: flex;
|
|
21
9
|
align-items: center;
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
padding: var(--rt-space-4) var(--rt-space-xs);
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
gap: var(--rt-space-
|
|
30
|
-
}
|
|
13
|
+
// Адаптив завязан на собственную ширину компонента, а не на viewport:
|
|
14
|
+
// в узком контейнере (зажатая таблица / aside) числовая полоса прячется,
|
|
15
|
+
// показывается compact-форма «‹ Стр. N из M ›».
|
|
16
|
+
container-type: inline-size;
|
|
17
|
+
gap: var(--rt-space-md);
|
|
31
18
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
&__range {
|
|
20
|
+
color: var(--rt-color-text-muted);
|
|
21
|
+
font-size: var(--rt-text-sm);
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
}
|
|
37
24
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
border: var(--rt-border-width-thin) solid var(--rt-color-border-default);
|
|
43
|
-
border-radius: var(--rt-radius-md);
|
|
44
|
-
background: transparent;
|
|
45
|
-
color: var(--rt-color-text-primary);
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
transition:
|
|
48
|
-
background-color var(--rt-duration-fast) ease,
|
|
49
|
-
border-color var(--rt-duration-fast) ease,
|
|
50
|
-
color var(--rt-duration-fast) ease;
|
|
51
|
-
|
|
52
|
-
&:hover:not(:disabled, &--current) {
|
|
53
|
-
border-color: var(--rt-color-border-strong);
|
|
54
|
-
background: var(--rt-color-bg-surface-subtle);
|
|
25
|
+
&__nav {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--rt-space-xs);
|
|
55
29
|
}
|
|
56
30
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
31
|
+
// Compact-форма по умолчанию скрыта — показывается только в узком контейнере.
|
|
32
|
+
&__compact {
|
|
33
|
+
display: none;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--rt-space-xs);
|
|
61
36
|
}
|
|
62
37
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
&__compact-label {
|
|
39
|
+
color: var(--rt-color-text-primary);
|
|
40
|
+
font-size: var(--rt-text-sm);
|
|
41
|
+
white-space: nowrap;
|
|
67
42
|
}
|
|
68
43
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
44
|
+
&__page {
|
|
45
|
+
min-width: var(--rt-space-xl);
|
|
46
|
+
height: var(--rt-space-xl);
|
|
47
|
+
padding: 0 var(--rt-space-sm);
|
|
48
|
+
border: var(--rt-pagination-page-border-width) solid var(--rt-color-border-default);
|
|
49
|
+
border-radius: var(--rt-pagination-page-radius);
|
|
50
|
+
background: transparent;
|
|
51
|
+
color: var(--rt-color-text-primary);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition:
|
|
54
|
+
background-color var(--rt-pagination-transition-duration) ease,
|
|
55
|
+
border-color var(--rt-pagination-transition-duration) ease,
|
|
56
|
+
color var(--rt-pagination-transition-duration) ease;
|
|
57
|
+
|
|
58
|
+
&:hover:not(:disabled, &--current) {
|
|
59
|
+
border-color: var(--rt-color-border-strong);
|
|
60
|
+
background: var(--rt-color-bg-surface-subtle);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
box-shadow: var(--rt-pagination-focus-shadow);
|
|
65
|
+
outline: 2px solid transparent;
|
|
66
|
+
outline-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&--current {
|
|
70
|
+
border-color: var(--rt-color-border-strong);
|
|
71
|
+
background: var(--rt-color-bg-surface-subtle);
|
|
72
|
+
font-weight: var(--rt-font-weight-semibold);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:disabled {
|
|
76
|
+
cursor: default;
|
|
77
|
+
opacity: 0.6;
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
|
-
}
|
|
74
80
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
&__gap {
|
|
82
|
+
padding: 0 var(--rt-space-xs);
|
|
83
|
+
color: var(--rt-color-text-muted);
|
|
84
|
+
}
|
|
79
85
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
&__per-page {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: var(--rt-space-sm);
|
|
90
|
+
}
|
|
85
91
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
&__per-page-label {
|
|
93
|
+
color: var(--rt-color-text-muted);
|
|
94
|
+
font-size: var(--rt-text-sm);
|
|
95
|
+
}
|
|
89
96
|
}
|
|
90
|
-
}
|
|
91
97
|
|
|
92
|
-
// Узкий контейнер: прячем числовую полосу и диапазон, показываем compact-форму.
|
|
93
|
-
@container (max-width: 460px) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
// Узкий контейнер: прячем числовую полосу и диапазон, показываем compact-форму.
|
|
99
|
+
@container (max-width: 460px) {
|
|
100
|
+
.rt-pagination__nav,
|
|
101
|
+
.rt-pagination__range {
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
.rt-pagination__compact {
|
|
106
|
+
display: flex;
|
|
107
|
+
}
|
|
101
108
|
}
|
|
102
109
|
}
|
|
@@ -1,130 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
.rt-photo-viewer {
|
|
5
|
-
display: block;
|
|
6
|
-
width: 100vw;
|
|
7
|
-
height: 100vh;
|
|
8
|
-
height: 100dvh;
|
|
9
|
-
background: var(--rt-color-bg-inverse);
|
|
10
|
-
|
|
11
|
-
// Обёртка существует ради ловушки фокуса и повторяет размеры хоста:
|
|
12
|
-
// display: contents ломает ловушку — ей нужен настоящий бокс
|
|
13
|
-
&__surface {
|
|
14
|
-
position: absolute;
|
|
15
|
-
inset: 0;
|
|
16
|
-
}
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
/* rt-photo-viewer — ViewEncapsulation.None: правила таргетируют BEM-класс блока.
|
|
3
|
+
`.rt-photo-viewer` — сам хост (шаблон начинается с ng-container, класс ставит host). */
|
|
17
4
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
z-index: 1;
|
|
21
|
-
top: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
padding: var(--rt-space-4) var(--rt-space-5);
|
|
28
|
-
color: var(--rt-color-text-inverse);
|
|
29
|
-
gap: var(--rt-space-4);
|
|
30
|
-
}
|
|
5
|
+
.rt-photo-viewer {
|
|
6
|
+
--rt-photo-viewer-control-radius: var(--rt-radius-md);
|
|
31
7
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
8
|
+
display: block;
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100vh;
|
|
11
|
+
height: 100dvh;
|
|
12
|
+
background: var(--rt-color-bg-inverse);
|
|
13
|
+
|
|
14
|
+
// Обёртка существует ради ловушки фокуса и повторяет размеры хоста:
|
|
15
|
+
// display: contents ломает ловушку — ей нужен настоящий бокс
|
|
16
|
+
&__surface {
|
|
17
|
+
position: absolute;
|
|
18
|
+
inset: 0;
|
|
19
|
+
}
|
|
42
20
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
&__bar {
|
|
22
|
+
position: absolute;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
top: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
padding: var(--rt-space-4) var(--rt-space-5);
|
|
31
|
+
color: var(--rt-color-text-inverse);
|
|
32
|
+
gap: var(--rt-space-4);
|
|
33
|
+
}
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
justify-content: center;
|
|
53
|
-
padding: var(--rt-space-10) var(--rt-space-4);
|
|
54
|
-
margin: 0;
|
|
55
|
-
scroll-snap-align: center;
|
|
35
|
+
&__counter {
|
|
36
|
+
font-size: var(--rt-text-sm);
|
|
37
|
+
font-variant-numeric: tabular-nums;
|
|
38
|
+
}
|
|
56
39
|
|
|
57
|
-
|
|
40
|
+
&__track {
|
|
58
41
|
display: flex;
|
|
42
|
+
overflow: auto hidden;
|
|
59
43
|
width: 100%;
|
|
60
44
|
height: 100%;
|
|
45
|
+
|
|
46
|
+
// Свайп, инерцию и прилипание кадра даёт браузер
|
|
47
|
+
scroll-snap-type: x mandatory;
|
|
48
|
+
scrollbar-width: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__slide {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex: 0 0 100%;
|
|
61
54
|
align-items: center;
|
|
62
55
|
justify-content: center;
|
|
56
|
+
padding: var(--rt-space-10) var(--rt-space-4);
|
|
57
|
+
margin: 0;
|
|
58
|
+
scroll-snap-align: center;
|
|
59
|
+
|
|
60
|
+
picture {
|
|
61
|
+
display: flex;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
63
67
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Кадры вертикальные, поэтому ограничение по высоте важнее, чем по ширине
|
|
67
|
-
&__image {
|
|
68
|
-
display: block;
|
|
69
|
-
max-width: 100%;
|
|
70
|
-
max-height: 100%;
|
|
71
|
-
object-fit: contain;
|
|
72
|
-
}
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
left: 0;
|
|
82
|
-
padding: var(--rt-space-4) var(--rt-space-5);
|
|
83
|
-
background: var(--rt-color-bg-surface);
|
|
84
|
-
color: var(--rt-color-text-primary);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/* TODO: отрефакторить это дерьмо */
|
|
88
|
-
&__bar rt-icon-button,
|
|
89
|
-
&__arrow-prev,
|
|
90
|
-
&__arrow-next {
|
|
91
|
-
--rt-icon-button-color: var(--rt-color-text-inverse);
|
|
92
|
-
--rt-icon-button-color-bg-hover: color-mix(in srgb, var(--rt-color-text-inverse) 24%, transparent);
|
|
69
|
+
// Кадры вертикальные, поэтому ограничение по высоте важнее, чем по ширине
|
|
70
|
+
&__image {
|
|
71
|
+
display: block;
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
max-height: 100%;
|
|
74
|
+
object-fit: contain;
|
|
75
|
+
}
|
|
93
76
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
// Панель правки: светлая полоса поверх тёмного просмотра — она рабочая
|
|
78
|
+
// область, а не часть кадра
|
|
79
|
+
&__panel {
|
|
80
|
+
position: absolute;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
right: 0;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
padding: var(--rt-space-4) var(--rt-space-5);
|
|
86
|
+
background: var(--rt-color-bg-surface);
|
|
87
|
+
color: var(--rt-color-text-primary);
|
|
88
|
+
}
|
|
97
89
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
90
|
+
/* TODO: отрефакторить это дерьмо */
|
|
91
|
+
&__bar rt-icon-button,
|
|
92
|
+
&__arrow-prev,
|
|
93
|
+
&__arrow-next {
|
|
94
|
+
--rt-icon-button-color: var(--rt-color-text-inverse);
|
|
95
|
+
--rt-icon-button-color-bg-hover: color-mix(in srgb, var(--rt-color-text-inverse) 24%, transparent);
|
|
104
96
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
border-radius: var(--rt-photo-viewer-control-radius);
|
|
98
|
+
background: color-mix(in srgb, var(--rt-color-bg-inverse) 55%, transparent);
|
|
99
|
+
}
|
|
108
100
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
&__arrow-prev,
|
|
102
|
+
&__arrow-next {
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 50%;
|
|
105
|
+
transform: translateY(-50%);
|
|
106
|
+
}
|
|
112
107
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.rt-photo-viewer__slide {
|
|
116
|
-
padding-bottom: var(--rt-space-20);
|
|
108
|
+
&__arrow-prev {
|
|
109
|
+
left: var(--rt-space-4);
|
|
117
110
|
}
|
|
118
|
-
}
|
|
119
111
|
|
|
120
|
-
@media (width <= 700px) {
|
|
121
|
-
&__arrow-prev,
|
|
122
112
|
&__arrow-next {
|
|
123
|
-
|
|
113
|
+
right: var(--rt-space-4);
|
|
124
114
|
}
|
|
125
115
|
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
// С панелью кадру нужно место под неё, иначе низ снимка уходит под полосу
|
|
117
|
+
&:has(.rt-photo-viewer__panel) {
|
|
118
|
+
.rt-photo-viewer__slide {
|
|
119
|
+
padding-bottom: var(--rt-space-20);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (width <= 700px) {
|
|
124
|
+
&__arrow-prev,
|
|
125
|
+
&__arrow-next {
|
|
126
|
+
display: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&__slide {
|
|
130
|
+
padding: var(--rt-space-12) 0;
|
|
131
|
+
}
|
|
128
132
|
}
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| вход | тип | умолчание |
|
|
14
14
|
| ------------- | ---------------------- | --------- |
|
|
15
15
|
| `placeholder` | `string` | `''` |
|
|
16
|
-
| `toolbar` | `
|
|
16
|
+
| `toolbar` | `TRtRichEditorToolbar` | `'full'` |
|
|
17
17
|
|
|
18
18
|
Выход: `enterPressed` — Enter без Shift (перенос при этом гасится).
|
|
19
19
|
|
|
@@ -1,71 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// height-ограниченном родителе (композер в fill-режиме): без этого контейнер
|
|
8
|
-
// с фиксированной высотой вываливается за ужатый хост и перекрывает соседей.
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
min-block-size: 0;
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
// Базовая тема Quill (snow) подключена глобально в project.json приложения (styles).
|
|
3
|
+
// Здесь — только перекрытие цветов на семантические --rt-* токены (dark-aware):
|
|
4
|
+
// нативный snow светлый (иконки #444, границы #ccc) и в тёмной теме не читается.
|
|
5
|
+
.rt-rich-editor {
|
|
6
|
+
--rt-rich-editor-radius: var(--rt-radius-md);
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
// Хост — flex-колонка (тулбар над контейнером). min-block-size:0 позволяет
|
|
9
|
+
// ужиматься ниже интринзик-высоты Quill, когда редактор — flex-item в
|
|
10
|
+
// height-ограниченном родителе (композер в fill-режиме): без этого контейнер
|
|
11
|
+
// с фиксированной высотой вываливается за ужатый хост и перекрывает соседей.
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
min-block-size: 0;
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
16
|
+
.ql-toolbar.ql-snow,
|
|
17
|
+
.ql-container.ql-snow {
|
|
18
|
+
border-color: var(--rt-color-border-default);
|
|
19
|
+
}
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
border-end-end-radius: var(--rt-radius-md);
|
|
30
|
-
border-end-start-radius: var(--rt-radius-md);
|
|
31
|
-
font-family: inherit;
|
|
32
|
-
font-size: inherit;
|
|
33
|
-
min-block-size: 0;
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
}
|
|
21
|
+
.ql-toolbar.ql-snow {
|
|
22
|
+
flex: 0 0 auto;
|
|
23
|
+
border-start-end-radius: var(--rt-rich-editor-radius);
|
|
24
|
+
border-start-start-radius: var(--rt-rich-editor-radius);
|
|
25
|
+
}
|
|
36
26
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
// Native snow задаёт контейнеру Helvetica 13px — возвращаем шрифт приложения.
|
|
28
|
+
// flex:1 + min-block-size:0 + overflow держат зону ввода внутри хоста —
|
|
29
|
+
// при нехватке высоты контент скроллится, а не наезжает на контролы.
|
|
30
|
+
.ql-container.ql-snow {
|
|
31
|
+
flex: 1 1 auto;
|
|
32
|
+
border-end-end-radius: var(--rt-rich-editor-radius);
|
|
33
|
+
border-end-start-radius: var(--rt-rich-editor-radius);
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
font-size: inherit;
|
|
36
|
+
min-block-size: 0;
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
}
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
.ql-editor {
|
|
41
|
+
background-color: var(--rt-color-bg-surface-subtle);
|
|
42
|
+
color: var(--rt-color-text-primary);
|
|
43
|
+
min-block-size: 96px;
|
|
44
|
+
}
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
.ql-editor.ql-blank:before {
|
|
47
|
+
color: var(--rt-color-text-muted);
|
|
48
|
+
font-style: normal;
|
|
49
|
+
}
|
|
52
50
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
// Иконки тулбара — приглушённый цвет по умолчанию (native #444 в dark не виден).
|
|
52
|
+
.ql-snow .ql-stroke {
|
|
53
|
+
stroke: var(--rt-color-text-muted);
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
.ql-snow .ql-fill {
|
|
57
|
+
fill: var(--rt-color-text-muted);
|
|
58
|
+
}
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
.ql-snow .ql-picker {
|
|
61
|
+
color: var(--rt-color-text-muted);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Активная/наведённая кнопка — акцентный цвет.
|
|
65
|
+
.ql-snow .ql-toolbar button:hover .ql-stroke,
|
|
66
|
+
.ql-snow button.ql-active .ql-stroke {
|
|
67
|
+
stroke: var(--rt-color-text-link);
|
|
68
|
+
}
|
|
66
69
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
.ql-snow .ql-toolbar button:hover .ql-fill,
|
|
71
|
+
.ql-snow button.ql-active .ql-fill {
|
|
72
|
+
fill: var(--rt-color-text-link);
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
}
|