@cloud-ru/ds-uikit-product-notification 2.0.7 → 2.0.8
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/CHANGELOG.md +6 -0
- package/dist/cjs/components/NotificationCard/NotificationCardSkeleton.js +1 -1
- package/dist/cjs/components/NotificationCard/styles.module.css +2 -3
- package/dist/cjs/components/NotificationPanel/components/NotificationCardStack/styles.module.css +2 -3
- package/dist/cjs/components/NotificationPanel/styles.module.css +3 -1
- package/dist/cjs/style.css +7 -7
- package/dist/esm/components/NotificationCard/NotificationCardSkeleton.js +1 -1
- package/dist/esm/components/NotificationCard/styles.module.css +2 -3
- package/dist/esm/components/NotificationPanel/components/NotificationCardStack/styles.module.css +2 -3
- package/dist/esm/components/NotificationPanel/styles.module.css +3 -1
- package/dist/esm/style.css +7 -7
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/NotificationCard/NotificationCardSkeleton.tsx +4 -4
- package/src/components/NotificationCard/styles.module.scss +5 -6
- package/src/components/NotificationPanel/components/NotificationCardStack/styles.module.scss +2 -3
- package/src/components/NotificationPanel/helperComponents/StackTail/styles.module.scss +7 -3
- package/src/components/NotificationPanel/styles.module.scss +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/ds-uikit-product-notification",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Пакет уведомлений — карточка NotificationCard, лента NotificationPanelContent со стеками и группами и адаптивная обёртка NotificationPanel (drawer на desktop, bottom-sheet на mobile).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
37
|
"@cloud-ru/ds-adaptive": "^1.0.1",
|
|
38
38
|
"@cloud-ru/ds-button": "^1.0.2",
|
|
39
|
-
"@cloud-ru/ds-drawer": "^1.1.1",
|
|
40
|
-
"@cloud-ru/ds-icons": "^1.1.0",
|
|
41
39
|
"@cloud-ru/ds-chips": "^1.0.15",
|
|
40
|
+
"@cloud-ru/ds-drawer": "^1.1.1",
|
|
41
|
+
"@cloud-ru/ds-list": "^2.1.3",
|
|
42
42
|
"@cloud-ru/ds-info-block": "^1.0.1",
|
|
43
|
+
"@cloud-ru/ds-icons": "^1.1.0",
|
|
43
44
|
"@cloud-ru/ds-link": "^1.0.4",
|
|
44
|
-
"@cloud-ru/ds-list": "^2.1.3",
|
|
45
|
-
"@cloud-ru/ds-materials": "^1.0.1",
|
|
46
45
|
"@cloud-ru/ds-scroll": "^1.0.2",
|
|
46
|
+
"@cloud-ru/ds-materials": "^1.0.1",
|
|
47
47
|
"@cloud-ru/ds-segment-control": "^1.0.5",
|
|
48
48
|
"@cloud-ru/ds-skeleton": "^1.0.1",
|
|
49
49
|
"@cloud-ru/ds-status": "^1.1.0",
|
|
@@ -18,13 +18,13 @@ export function NotificationCardSkeleton({ className, ...rest }: NotificationCar
|
|
|
18
18
|
data-test-id={TEST_IDS.card.skeleton}
|
|
19
19
|
{...extractSupportProps(rest)}
|
|
20
20
|
>
|
|
21
|
-
<SkeletonText width={140} variant='
|
|
21
|
+
<SkeletonText width={140} variant='body' size='s' lines={1} />
|
|
22
22
|
|
|
23
23
|
<div className={styles.notificationCardTitle}>
|
|
24
24
|
<div className={styles.notificationCardTitleIcon}>
|
|
25
|
-
<SkeletonText width={16} variant='
|
|
25
|
+
<SkeletonText width={16} variant='label' size='l' lines={1} />
|
|
26
26
|
</div>
|
|
27
|
-
<SkeletonText width={140} variant='
|
|
27
|
+
<SkeletonText width={140} variant='label' size='l' lines={1} />
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
<div className={styles.notificationCardContent}>
|
|
@@ -33,7 +33,7 @@ export function NotificationCardSkeleton({ className, ...rest }: NotificationCar
|
|
|
33
33
|
|
|
34
34
|
<div className={styles.notificationCardFooter}>
|
|
35
35
|
<SkeletonText width={140} variant='body' size='s' lines={1} />
|
|
36
|
-
<SkeletonText width={140} variant='
|
|
36
|
+
<SkeletonText width={140} variant='body' size='s' lines={1} />
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
@@ -17,7 +17,6 @@ $appearance-unread-bg: (
|
|
|
17
17
|
|
|
18
18
|
.stateLayer {
|
|
19
19
|
pointer-events: none;
|
|
20
|
-
visibility: initial;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
.notificationCardTitleIcon {
|
|
@@ -26,7 +25,7 @@ $appearance-unread-bg: (
|
|
|
26
25
|
align-items: center;
|
|
27
26
|
justify-content: center;
|
|
28
27
|
|
|
29
|
-
width: base.$sn-
|
|
28
|
+
width: base.$sn-density-size-icon-xs;
|
|
30
29
|
height: base.$sn-primitive-dimension-20;
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -62,10 +61,7 @@ $appearance-unread-bg: (
|
|
|
62
61
|
cursor: pointer;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
outline: base.$sn-primitive-strokeWeight-strokeSemiBold solid base.$sn-theme-color-available-complementary;
|
|
67
|
-
outline-offset: 0;
|
|
68
|
-
}
|
|
64
|
+
@include m.with-focus-frame('regular', 'inside');
|
|
69
65
|
|
|
70
66
|
// `:has(:focus-visible)`, а не `:focus-within:not(:focus)` — после клика мышью по
|
|
71
67
|
// кнопке действий фокус остаётся на native <button> (обычный `:focus`, не
|
|
@@ -133,6 +129,9 @@ $appearance-unread-bg: (
|
|
|
133
129
|
.notificationCardDate {
|
|
134
130
|
display: flex;
|
|
135
131
|
flex: 1 1 auto;
|
|
132
|
+
// Figma: `sn/notification/anatomy/notificationCard/date/gap` — алиас на
|
|
133
|
+
// `sn.primitive.dimension.4`. Коллекция `notification` пока не выгружена в
|
|
134
|
+
// `@cloud-ru/ds-figma-variables`, поэтому ссылаемся на примитив напрямую.
|
|
136
135
|
gap: base.$sn-primitive-dimension-4;
|
|
137
136
|
align-items: center;
|
|
138
137
|
justify-content: flex-end;
|
package/src/components/NotificationPanel/components/NotificationCardStack/styles.module.scss
CHANGED
|
@@ -24,7 +24,6 @@ $duration: var(--snack-notification-stack-animation-duration);
|
|
|
24
24
|
|
|
25
25
|
.right {
|
|
26
26
|
display: flex;
|
|
27
|
-
gap: base.$sn-primitive-dimension-4;
|
|
28
27
|
align-items: center;
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -71,9 +70,9 @@ $duration: var(--snack-notification-stack-animation-duration);
|
|
|
71
70
|
|
|
72
71
|
display: flex;
|
|
73
72
|
flex-direction: column;
|
|
74
|
-
gap: base.$sn-primitive-dimension-
|
|
73
|
+
gap: base.$sn-primitive-dimension-4;
|
|
75
74
|
|
|
76
|
-
margin-top: base.$sn-primitive-dimension-
|
|
75
|
+
margin-top: base.$sn-primitive-dimension-4;
|
|
77
76
|
|
|
78
77
|
opacity: 0;
|
|
79
78
|
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
// реальные карточки стопки выезжают на его место.
|
|
5
5
|
$halfDuration: calc(var(--snack-notification-stack-animation-duration) / 2);
|
|
6
6
|
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
7
|
+
// Обе величины — параметры анимации, а не размеры из макета: дизайн-токенов для них
|
|
8
|
+
// нет и быть не должно.
|
|
9
|
+
// `$tail-card-height` — высота заглушки под клип: наружу торчит только нижняя кромка
|
|
10
|
+
// в 4px, остальное срезает `overflow: hidden` родителя.
|
|
11
|
+
// `$tail-slide-distance` — насколько корешки уезжают вниз при раскрытии, пока по ним
|
|
12
|
+
// сверху выезжает реальная стопка. Значение с запасом перекрывает высоту двух карточек;
|
|
13
|
+
// к концу пути корешки уже полностью прозрачны, поэтому точность здесь не важна.
|
|
10
14
|
$tail-card-height: 200px;
|
|
11
15
|
$tail-slide-distance: 416px;
|
|
12
16
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
background-color: base.$sn-theme-color-neutral-background1Level;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
// Кнопки шапки (`markAllWrapper` + `functionWrapper` в Figma) прижаты к правому краю строки
|
|
7
|
+
// Кнопки шапки (`markAllWrapper` + `functionWrapper` в Figma) прижаты к правому краю строки
|
|
8
|
+
// заголовка и стыкуются без зазора — воздух между иконками даёт паддинг самих кнопок.
|
|
8
9
|
.headerActions {
|
|
9
10
|
display: flex;
|
|
10
11
|
flex: 1 1 auto;
|
|
11
|
-
gap: base.$sn-primitive-dimension-8;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: flex-end;
|
|
14
14
|
}
|
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: space-between;
|
|
21
21
|
|
|
22
|
+
// Figma `functions` внутри `slotSubHeadline` — фрейм 36px с контролами 24px, прижатыми
|
|
23
|
+
// к низу. Сам `subHeadlineWrapper` дровера вертикальных отступов не даёт.
|
|
24
|
+
// В sheet-мастере контролы занимают всю высоту слота, поэтому отступ только на desktop.
|
|
25
|
+
&:not([data-mobile]) {
|
|
26
|
+
padding-top: base.$sn-primitive-dimension-12;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
// Сегменты в мобильном мастере растянуты на всю ширину sheet'а.
|
|
23
30
|
&[data-mobile] > * {
|
|
24
31
|
flex: 1 1 auto;
|