@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.
- package/README.md +71 -0
- package/fesm2022/rt-tools-ui-kit-v2.mjs +395 -188
- package/fesm2022/rt-tools-ui-kit-v2.mjs.map +1 -1
- package/package.json +1 -1
- package/rt-tools-ui-kit-v2-0.6.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/CONTEXT.md +22 -0
- 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/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/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/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/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/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 +34 -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/CONTEXT.md +40 -0
- package/src/lib/components/table/sort-header/rt-table-sort-header.component.scss +31 -29
- package/src/lib/components/tabs/CONTEXT.md +5 -0
- 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/CONTEXT.md +8 -0
- 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 +56 -54
- package/src/lib/components/tooltip/rt-tooltip.component.scss +20 -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 +4 -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 +126 -67
- package/src/styles/_scrollbar.scss +21 -19
- package/src/styles/_semantic.scss +140 -56
- package/src/styles/_theme-dark.scss +60 -27
- package/styles/tokens.css +628 -408
- package/types/rt-tools-ui-kit-v2.d.ts +9 -16
- package/rt-tools-ui-kit-v2-0.4.0.tgz +0 -0
|
@@ -1,98 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
/* rt-timeline — вертикальный таймлайн-степпер в common/ui. ViewEncapsulation.None.
|
|
3
|
+
Хост адресуется по имени элемента, а не по классу блока: класс `.rt-timeline` висит
|
|
4
|
+
и на `<rt-timeline>`, и на корне шаблона, поэтому правила блока вложены в хост —
|
|
5
|
+
так они достаются только корню шаблона. */
|
|
5
6
|
|
|
6
|
-
rt-timeline {
|
|
7
|
-
|
|
7
|
+
rt-timeline {
|
|
8
|
+
display: block;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
margin: 0;
|
|
14
|
-
list-style: none;
|
|
10
|
+
.rt-timeline {
|
|
11
|
+
--rt-timeline-dot-radius: var(--rt-radius-full);
|
|
12
|
+
--rt-timeline-dot-shadow: var(--rt-shadow-step-indicator);
|
|
13
|
+
--rt-timeline-dot-border-width: var(--rt-border-width-thin);
|
|
15
14
|
|
|
16
|
-
&__item {
|
|
17
15
|
display: flex;
|
|
18
|
-
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
list-style: none;
|
|
20
|
+
|
|
21
|
+
&__item {
|
|
22
|
+
display: flex;
|
|
23
|
+
gap: var(--rt-space-sm);
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
// Последний шаг без линии — не растягиваем хвост под ним.
|
|
26
|
+
&:last-child {
|
|
27
|
+
.rt-timeline__body {
|
|
28
|
+
padding-block-end: 0;
|
|
29
|
+
}
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
|
-
}
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
&__rail {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
inline-size: 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__dot {
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
flex: none;
|
|
43
|
+
border-radius: var(--rt-timeline-dot-radius);
|
|
44
|
+
background: var(--rt-color-stepper-track);
|
|
45
|
+
block-size: 10px;
|
|
46
|
+
inline-size: 10px;
|
|
47
|
+
margin-block-start: var(--rt-space-xs);
|
|
48
|
+
|
|
49
|
+
&--status--complete {
|
|
50
|
+
background: var(--rt-color-stepper-progress);
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
margin-block-start: var(--rt-space-xs);
|
|
53
|
+
&--status--current {
|
|
54
|
+
background: var(--rt-color-stepper-current);
|
|
55
|
+
block-size: 14px;
|
|
56
|
+
box-shadow: var(--rt-timeline-dot-shadow);
|
|
57
|
+
inline-size: 14px;
|
|
58
|
+
margin-block-start: var(--rt-space-2xs);
|
|
59
|
+
}
|
|
43
60
|
|
|
44
|
-
|
|
45
|
-
|
|
61
|
+
&--status--pending {
|
|
62
|
+
border: var(--rt-timeline-dot-border-width) solid var(--rt-color-stepper-track);
|
|
63
|
+
background: transparent;
|
|
64
|
+
}
|
|
46
65
|
}
|
|
47
66
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
inline-size:
|
|
67
|
+
// Соединительная линия тянется от точки вниз до следующего шага.
|
|
68
|
+
&__line {
|
|
69
|
+
flex: 1 1 auto;
|
|
70
|
+
background: var(--rt-color-stepper-track);
|
|
71
|
+
inline-size: 2px;
|
|
53
72
|
margin-block-start: var(--rt-space-2xs);
|
|
54
73
|
}
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
&__body {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
gap: var(--rt-space-2xs);
|
|
79
|
+
padding-block-end: var(--rt-space-md);
|
|
59
80
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Соединительная линия тянется от точки вниз до следующего шага.
|
|
63
|
-
&__line {
|
|
64
|
-
flex: 1 1 auto;
|
|
65
|
-
background: var(--rt-color-stepper-track);
|
|
66
|
-
inline-size: 2px;
|
|
67
|
-
margin-block-start: var(--rt-space-2xs);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&__body {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
gap: var(--rt-space-2xs);
|
|
74
|
-
padding-block-end: var(--rt-space-md);
|
|
75
|
-
}
|
|
76
81
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
&__label {
|
|
83
|
+
color: var(--rt-color-text-primary);
|
|
84
|
+
font-size: var(--rt-text-sm);
|
|
85
|
+
line-height: var(--rt-leading-snug);
|
|
86
|
+
}
|
|
82
87
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
&__meta {
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
flex-wrap: wrap;
|
|
91
|
+
color: var(--rt-color-text-muted);
|
|
92
|
+
font-size: var(--rt-text-xs);
|
|
93
|
+
gap: var(--rt-space-xs);
|
|
94
|
+
line-height: var(--rt-leading-snug);
|
|
95
|
+
}
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
// Точка-разделитель между временем и инициатором.
|
|
98
|
+
&__actor:before {
|
|
99
|
+
content: '·';
|
|
100
|
+
margin-inline-end: var(--rt-space-xs);
|
|
101
|
+
}
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
}
|
|
@@ -43,6 +43,14 @@ this.#notifications.error('Не удалось сохранить', 'danger', {
|
|
|
43
43
|
- `meta` — приписка над сообщением (номер заявки), `description` — вторая строка под ним.
|
|
44
44
|
- Положение раскладывается на два модификатора: `rt-toaster--y--bottom` и `rt-toaster--x--right`.
|
|
45
45
|
|
|
46
|
+
## Края
|
|
47
|
+
|
|
48
|
+
- **Нулевая длительность не значит «висит, пока не закроют».** `duration: 0` — это таймер на
|
|
49
|
+
ноль миллисекунд: тост гасит себя сразу после первой отрисовки. Держать его открытым умеет
|
|
50
|
+
только пауза таймера — признак `interacting` либо развёрнутая стопка.
|
|
51
|
+
- **В матрице каждому тосту ставится `[interacting]="true"`.** Иначе ячейки гаснут одна за
|
|
52
|
+
другой, пока смотришь на показ, и кадр снимается с пустой сетки.
|
|
53
|
+
|
|
46
54
|
## Доступность
|
|
47
55
|
|
|
48
56
|
Стопка — `role="region"` с переведённой подписью, каждый тост — `role="status"` с
|
|
@@ -1,201 +1,210 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border-radius: var(--rt-radius-md);
|
|
14
|
-
background: var(--rt-color-bg-surface);
|
|
15
|
-
box-shadow: var(--rt-shadow-card);
|
|
16
|
-
color: var(--rt-color-text-primary);
|
|
17
|
-
font-size: var(--rt-text-sm);
|
|
18
|
-
font-weight: var(--rt-font-weight-medium);
|
|
19
|
-
gap: var(--rt-space-2);
|
|
20
|
-
line-height: var(--rt-leading-normal);
|
|
21
|
-
opacity: 0;
|
|
22
|
-
outline: none;
|
|
23
|
-
overflow-wrap: anywhere;
|
|
24
|
-
touch-action: none;
|
|
25
|
-
transform: var(--y);
|
|
26
|
-
transition:
|
|
27
|
-
transform var(--rt-duration-slow),
|
|
28
|
-
opacity var(--rt-duration-slow),
|
|
29
|
-
height var(--rt-duration-slow),
|
|
30
|
-
box-shadow var(--rt-duration-base);
|
|
31
|
-
|
|
32
|
-
&:after {
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
.rt-toast {
|
|
3
|
+
--rt-toast-radius: var(--rt-radius-md);
|
|
4
|
+
--rt-toast-border-width: var(--rt-border-width-thin);
|
|
5
|
+
--rt-toast-shadow: var(--rt-shadow-card);
|
|
6
|
+
--rt-toast-enter-duration: var(--rt-duration-slow);
|
|
7
|
+
--rt-toast-shadow-duration: var(--rt-duration-base);
|
|
8
|
+
--rt-toast-leave-duration: var(--rt-duration-slower);
|
|
9
|
+
--rt-toast-fade-duration: var(--rt-duration-fast);
|
|
10
|
+
--y: translateY(100%);
|
|
11
|
+
--lift-amount: calc(var(--lift) * var(--gap));
|
|
12
|
+
|
|
33
13
|
position: absolute;
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
z-index: var(--z-index);
|
|
15
|
+
display: flex;
|
|
36
16
|
width: 100%;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
align-items: center;
|
|
19
|
+
padding: var(--rt-space-4);
|
|
20
|
+
border: var(--rt-toast-border-width) solid var(--rt-color-border-subtle);
|
|
21
|
+
border-radius: var(--rt-toast-radius);
|
|
22
|
+
background: var(--rt-color-bg-surface);
|
|
23
|
+
box-shadow: var(--rt-toast-shadow);
|
|
24
|
+
color: var(--rt-color-text-primary);
|
|
25
|
+
font-size: var(--rt-text-sm);
|
|
26
|
+
font-weight: var(--rt-font-weight-medium);
|
|
27
|
+
gap: var(--rt-space-2);
|
|
28
|
+
line-height: var(--rt-leading-normal);
|
|
29
|
+
opacity: 0;
|
|
30
|
+
outline: none;
|
|
31
|
+
overflow-wrap: anywhere;
|
|
32
|
+
touch-action: none;
|
|
33
|
+
transform: var(--y);
|
|
34
|
+
transition:
|
|
35
|
+
transform var(--rt-toast-enter-duration),
|
|
36
|
+
opacity var(--rt-toast-enter-duration),
|
|
37
|
+
height var(--rt-toast-enter-duration),
|
|
38
|
+
box-shadow var(--rt-toast-shadow-duration);
|
|
39
|
+
|
|
40
|
+
&:after {
|
|
41
|
+
position: absolute;
|
|
42
|
+
bottom: 100%;
|
|
43
|
+
left: 0;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: calc(var(--gap) + 1px);
|
|
46
|
+
content: '';
|
|
47
|
+
}
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
> * {
|
|
50
|
+
transition: opacity var(--rt-toast-enter-duration);
|
|
51
|
+
}
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
&--y--top {
|
|
54
|
+
--y: translateY(-100%);
|
|
55
|
+
--lift: 1;
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
.rt-toast__description {
|
|
61
|
-
color: inherit;
|
|
57
|
+
top: 0;
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
color: var(--rt-color-state-info);
|
|
68
|
-
}
|
|
60
|
+
&--y--bottom {
|
|
61
|
+
--y: translateY(100%);
|
|
62
|
+
--lift: -1;
|
|
69
63
|
|
|
70
|
-
|
|
71
|
-
border-color: var(--rt-color-state-success-bg);
|
|
72
|
-
background: var(--rt-color-state-success-bg);
|
|
73
|
-
color: var(--rt-color-state-success);
|
|
64
|
+
bottom: 0;
|
|
74
65
|
}
|
|
75
66
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
67
|
+
&--filled {
|
|
68
|
+
.rt-toast__description {
|
|
69
|
+
color: inherit;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.rt-toast--severity--info {
|
|
73
|
+
border-color: var(--rt-color-state-info-bg);
|
|
74
|
+
background: var(--rt-color-state-info-bg);
|
|
75
|
+
color: var(--rt-color-state-info);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.rt-toast--severity--success {
|
|
79
|
+
border-color: var(--rt-color-state-success-bg);
|
|
80
|
+
background: var(--rt-color-state-success-bg);
|
|
81
|
+
color: var(--rt-color-state-success);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.rt-toast--severity--warning {
|
|
85
|
+
border-color: var(--rt-color-state-warning-bg);
|
|
86
|
+
background: var(--rt-color-state-warning-bg);
|
|
87
|
+
color: var(--rt-color-state-warning);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.rt-toast--severity--danger {
|
|
91
|
+
border-color: var(--rt-color-state-danger-bg);
|
|
92
|
+
background: var(--rt-color-state-danger-bg);
|
|
93
|
+
color: var(--rt-color-state-danger);
|
|
94
|
+
}
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
background: var(--rt-color-state-danger-bg);
|
|
85
|
-
color: var(--rt-color-state-danger);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
97
|
+
&--mounted {
|
|
98
|
+
--y: translateY(0);
|
|
88
99
|
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
opacity: 1;
|
|
101
|
+
}
|
|
91
102
|
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
&:not(.rt-toast--expanded, .rt-toast--front) {
|
|
104
|
+
--scale: var(--toasts-before) * 0.05 + 1;
|
|
105
|
+
--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
|
|
94
106
|
|
|
95
|
-
|
|
96
|
-
--scale: var(--toasts-before) * 0.05 + 1;
|
|
97
|
-
--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
|
|
107
|
+
height: var(--front-toast-height);
|
|
98
108
|
|
|
99
|
-
|
|
109
|
+
> * {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
100
113
|
|
|
101
|
-
|
|
114
|
+
&--hidden {
|
|
102
115
|
opacity: 0;
|
|
116
|
+
pointer-events: none;
|
|
103
117
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&--hidden {
|
|
107
|
-
opacity: 0;
|
|
108
|
-
pointer-events: none;
|
|
109
|
-
}
|
|
110
118
|
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
&--mounted.rt-toast--expanded {
|
|
120
|
+
--y: translateY(calc(var(--lift) * var(--offset)));
|
|
113
121
|
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
height: var(--initial-height);
|
|
123
|
+
}
|
|
116
124
|
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
&--removed.rt-toast--front {
|
|
126
|
+
--y: translateY(calc(var(--lift) * -100%));
|
|
119
127
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
&--removed.rt-toast--expanded:not(.rt-toast--front) {
|
|
124
|
-
--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
|
|
128
|
+
opacity: 0;
|
|
129
|
+
}
|
|
125
130
|
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
&--removed.rt-toast--expanded:not(.rt-toast--front) {
|
|
132
|
+
--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
|
|
128
133
|
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
opacity: 0;
|
|
135
|
+
}
|
|
131
136
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
transform var(--rt-duration-slower),
|
|
135
|
-
opacity var(--rt-duration-base);
|
|
136
|
-
}
|
|
137
|
+
&--removed:not(.rt-toast--front, .rt-toast--expanded) {
|
|
138
|
+
--y: translateY(40%);
|
|
137
139
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
140
|
+
opacity: 0;
|
|
141
|
+
transition:
|
|
142
|
+
transform var(--rt-toast-leave-duration),
|
|
143
|
+
opacity var(--rt-toast-shadow-duration);
|
|
144
|
+
}
|
|
144
145
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
&--removed:not(.rt-toast--front):before {
|
|
147
|
+
position: absolute;
|
|
148
|
+
content: '';
|
|
149
|
+
inset: 0;
|
|
150
|
+
transform: scaleY(2);
|
|
151
|
+
}
|
|
148
152
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
flex: 1 1 auto;
|
|
153
|
-
flex-direction: column;
|
|
154
|
-
gap: var(--rt-space-0-5);
|
|
155
|
-
}
|
|
153
|
+
&__icon {
|
|
154
|
+
flex-shrink: 0;
|
|
155
|
+
}
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
&__content {
|
|
158
|
+
display: flex;
|
|
159
|
+
min-width: 0;
|
|
160
|
+
flex: 1 1 auto;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
gap: var(--rt-space-0-5);
|
|
163
|
+
}
|
|
162
164
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
&__description {
|
|
166
|
+
color: var(--rt-color-text-muted);
|
|
167
|
+
font-size: var(--rt-text-xs);
|
|
168
|
+
font-weight: var(--rt-font-weight-regular);
|
|
169
|
+
}
|
|
168
170
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
margin-block-start: var(--rt-space-1);
|
|
175
|
-
}
|
|
171
|
+
&__meta {
|
|
172
|
+
color: var(--rt-color-text-muted);
|
|
173
|
+
font-size: var(--rt-text-xs);
|
|
174
|
+
font-weight: var(--rt-font-weight-regular);
|
|
175
|
+
}
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
&__actions {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-wrap: wrap;
|
|
180
|
+
align-items: center;
|
|
181
|
+
gap: var(--rt-space-2);
|
|
182
|
+
margin-block-start: var(--rt-space-1);
|
|
183
|
+
}
|
|
180
184
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
margin-inline-start: auto;
|
|
185
|
-
opacity: 0;
|
|
186
|
-
transition: opacity var(--rt-duration-fast);
|
|
187
|
-
}
|
|
185
|
+
& &__action {
|
|
186
|
+
align-self: flex-start;
|
|
187
|
+
}
|
|
188
188
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
& &__close {
|
|
190
|
+
flex-shrink: 0;
|
|
191
|
+
align-self: flex-start;
|
|
192
|
+
margin-inline-start: auto;
|
|
193
|
+
opacity: 0;
|
|
194
|
+
transition: opacity var(--rt-toast-fade-duration);
|
|
195
|
+
}
|
|
193
196
|
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
&:hover &__close,
|
|
198
|
+
& &__close:focus-visible {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
196
201
|
|
|
197
|
-
|
|
202
|
+
@media (prefers-reduced-motion) {
|
|
198
203
|
transition: none;
|
|
204
|
+
|
|
205
|
+
> * {
|
|
206
|
+
transition: none;
|
|
207
|
+
}
|
|
199
208
|
}
|
|
200
209
|
}
|
|
201
210
|
}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
right
|
|
15
|
-
|
|
1
|
+
@layer rt-kit.components {
|
|
2
|
+
.rt-toaster {
|
|
3
|
+
--width: 356px;
|
|
4
|
+
--toaster-offset: 32px;
|
|
5
|
+
|
|
6
|
+
position: fixed;
|
|
7
|
+
z-index: 1100;
|
|
8
|
+
width: var(--width);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
outline: none;
|
|
13
|
+
|
|
14
|
+
&--x--right {
|
|
15
|
+
right: max(var(--toaster-offset), env(safe-area-inset-right));
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
&--x--left {
|
|
19
|
+
left: max(var(--toaster-offset), env(safe-area-inset-left));
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
&--x--center {
|
|
23
|
+
left: 50%;
|
|
24
|
+
transform: translateX(-50%);
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
&--y--top {
|
|
28
|
+
top: max(var(--toaster-offset), env(safe-area-inset-top));
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
&--y--bottom {
|
|
32
|
+
bottom: max(var(--toaster-offset), env(safe-area-inset-bottom));
|
|
33
|
+
}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
@media (width <= 480px) {
|
|
36
|
+
--toaster-offset: 16px;
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
right: var(--toaster-offset);
|
|
39
|
+
left: var(--toaster-offset);
|
|
40
|
+
width: auto;
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
&--x--center {
|
|
43
|
+
transform: none;
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
}
|