@cloud-ru/ds-uikit-product-notification 1.0.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/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/README.md +728 -0
- package/dist/cjs/components/NotificationCard/NotificationCard.d.ts +43 -0
- package/dist/cjs/components/NotificationCard/NotificationCard.js +80 -0
- package/dist/cjs/components/NotificationCard/NotificationCardSkeleton.d.ts +7 -0
- package/dist/cjs/components/NotificationCard/NotificationCardSkeleton.js +16 -0
- package/dist/cjs/components/NotificationCard/helpers.d.ts +4 -0
- package/dist/cjs/components/NotificationCard/helpers.js +31 -0
- package/dist/cjs/components/NotificationCard/index.d.ts +2 -0
- package/dist/cjs/components/NotificationCard/index.js +18 -0
- package/dist/cjs/components/NotificationCard/styles.module.css +216 -0
- package/dist/cjs/components/NotificationPanel/NotificationPanel.d.ts +22 -0
- package/dist/cjs/components/NotificationPanel/NotificationPanel.js +23 -0
- package/dist/cjs/components/NotificationPanel/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanel/index.js +17 -0
- package/dist/cjs/components/NotificationPanel/styles.module.css +10 -0
- package/dist/cjs/components/NotificationPanelContent/NotificationPanelContent.d.ts +45 -0
- package/dist/cjs/components/NotificationPanelContent/NotificationPanelContent.js +43 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/NotificationCardStack.d.ts +18 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/NotificationCardStack.js +43 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/hooks.d.ts +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/hooks.js +22 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/styles.module.css +69 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/utils.d.ts +4 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationCardStack/utils.js +11 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelBlank/NotificationPanelBlank.d.ts +4 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelBlank/NotificationPanelBlank.js +15 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelBlank/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelBlank/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelBlank/styles.module.css +3 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelGroup/NotificationPanelGroup.d.ts +12 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelGroup/NotificationPanelGroup.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelGroup/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelGroup/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelGroup/styles.module.css +35 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettings.d.ts +12 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettings.js +24 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.d.ts +9 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.js +27 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/components/NotificationPanelSettings/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/components/index.d.ts +4 -0
- package/dist/cjs/components/NotificationPanelContent/components/index.js +20 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/StackTail/StackTail.d.ts +6 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/StackTail/StackTail.js +11 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/StackTail/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/StackTail/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/StackTail/styles.module.css +49 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/index.d.ts +1 -0
- package/dist/cjs/components/NotificationPanelContent/helperComponents/index.js +17 -0
- package/dist/cjs/components/NotificationPanelContent/index.d.ts +2 -0
- package/dist/cjs/components/NotificationPanelContent/index.js +18 -0
- package/dist/cjs/components/NotificationPanelContent/styles.module.css +98 -0
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.js +19 -0
- package/dist/cjs/constants.d.ts +57 -0
- package/dist/cjs/constants.js +60 -0
- package/dist/cjs/helperComponents/ActionsButton/ActionsButton.d.ts +19 -0
- package/dist/cjs/helperComponents/ActionsButton/ActionsButton.js +28 -0
- package/dist/cjs/helperComponents/ActionsButton/index.d.ts +1 -0
- package/dist/cjs/helperComponents/ActionsButton/index.js +17 -0
- package/dist/cjs/helperComponents/ActionsButton/styles.module.css +3 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/style.css +483 -0
- package/dist/cjs/types.d.ts +12 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utils.d.ts +3 -0
- package/dist/cjs/utils.js +7 -0
- package/dist/esm/components/NotificationCard/NotificationCard.d.ts +43 -0
- package/dist/esm/components/NotificationCard/NotificationCard.js +74 -0
- package/dist/esm/components/NotificationCard/NotificationCardSkeleton.d.ts +7 -0
- package/dist/esm/components/NotificationCard/NotificationCardSkeleton.js +10 -0
- package/dist/esm/components/NotificationCard/helpers.d.ts +4 -0
- package/dist/esm/components/NotificationCard/helpers.js +27 -0
- package/dist/esm/components/NotificationCard/index.d.ts +2 -0
- package/dist/esm/components/NotificationCard/index.js +2 -0
- package/dist/esm/components/NotificationCard/styles.module.css +216 -0
- package/dist/esm/components/NotificationPanel/NotificationPanel.d.ts +22 -0
- package/dist/esm/components/NotificationPanel/NotificationPanel.js +17 -0
- package/dist/esm/components/NotificationPanel/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanel/index.js +1 -0
- package/dist/esm/components/NotificationPanel/styles.module.css +10 -0
- package/dist/esm/components/NotificationPanelContent/NotificationPanelContent.d.ts +45 -0
- package/dist/esm/components/NotificationPanelContent/NotificationPanelContent.js +37 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/NotificationCardStack.d.ts +18 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/NotificationCardStack.js +37 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/hooks.d.ts +17 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/hooks.js +19 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/styles.module.css +69 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/utils.d.ts +4 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationCardStack/utils.js +7 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelBlank/NotificationPanelBlank.d.ts +4 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelBlank/NotificationPanelBlank.js +9 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelBlank/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelBlank/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelBlank/styles.module.css +3 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelGroup/NotificationPanelGroup.d.ts +12 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelGroup/NotificationPanelGroup.js +11 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelGroup/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelGroup/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelGroup/styles.module.css +35 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettings.d.ts +12 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettings.js +21 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.d.ts +9 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.js +21 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/components/NotificationPanelSettings/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/components/index.d.ts +4 -0
- package/dist/esm/components/NotificationPanelContent/components/index.js +4 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/StackTail/StackTail.d.ts +6 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/StackTail/StackTail.js +5 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/StackTail/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/StackTail/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/StackTail/styles.module.css +49 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/index.d.ts +1 -0
- package/dist/esm/components/NotificationPanelContent/helperComponents/index.js +1 -0
- package/dist/esm/components/NotificationPanelContent/index.d.ts +2 -0
- package/dist/esm/components/NotificationPanelContent/index.js +2 -0
- package/dist/esm/components/NotificationPanelContent/styles.module.css +98 -0
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/constants.d.ts +57 -0
- package/dist/esm/constants.js +57 -0
- package/dist/esm/helperComponents/ActionsButton/ActionsButton.d.ts +19 -0
- package/dist/esm/helperComponents/ActionsButton/ActionsButton.js +22 -0
- package/dist/esm/helperComponents/ActionsButton/index.d.ts +1 -0
- package/dist/esm/helperComponents/ActionsButton/index.js +1 -0
- package/dist/esm/helperComponents/ActionsButton/styles.module.css +3 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/style.css +483 -0
- package/dist/esm/types.d.ts +12 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils.d.ts +3 -0
- package/dist/esm/utils.js +4 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +60 -0
- package/src/components/NotificationCard/NotificationCard.tsx +252 -0
- package/src/components/NotificationCard/NotificationCardSkeleton.tsx +40 -0
- package/src/components/NotificationCard/helpers.tsx +36 -0
- package/src/components/NotificationCard/index.ts +2 -0
- package/src/components/NotificationCard/styles.module.scss +165 -0
- package/src/components/NotificationPanel/NotificationPanel.tsx +56 -0
- package/src/components/NotificationPanel/index.ts +1 -0
- package/src/components/NotificationPanel/styles.module.scss +15 -0
- package/src/components/NotificationPanelContent/NotificationPanelContent.tsx +168 -0
- package/src/components/NotificationPanelContent/components/NotificationCardStack/NotificationCardStack.tsx +128 -0
- package/src/components/NotificationPanelContent/components/NotificationCardStack/hooks.ts +45 -0
- package/src/components/NotificationPanelContent/components/NotificationCardStack/index.ts +1 -0
- package/src/components/NotificationPanelContent/components/NotificationCardStack/styles.module.scss +90 -0
- package/src/components/NotificationPanelContent/components/NotificationCardStack/utils.ts +11 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelBlank/NotificationPanelBlank.tsx +21 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelBlank/index.ts +1 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelBlank/styles.module.scss +5 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelGroup/NotificationPanelGroup.tsx +31 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelGroup/index.ts +1 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelGroup/styles.module.scss +45 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettings.tsx +34 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.tsx +43 -0
- package/src/components/NotificationPanelContent/components/NotificationPanelSettings/index.ts +1 -0
- package/src/components/NotificationPanelContent/components/index.ts +4 -0
- package/src/components/NotificationPanelContent/helperComponents/StackTail/StackTail.tsx +17 -0
- package/src/components/NotificationPanelContent/helperComponents/StackTail/index.ts +1 -0
- package/src/components/NotificationPanelContent/helperComponents/StackTail/styles.module.scss +85 -0
- package/src/components/NotificationPanelContent/helperComponents/index.ts +1 -0
- package/src/components/NotificationPanelContent/index.ts +2 -0
- package/src/components/NotificationPanelContent/styles.module.scss +116 -0
- package/src/components/index.ts +3 -0
- package/src/constants.ts +58 -0
- package/src/helperComponents/ActionsButton/ActionsButton.tsx +73 -0
- package/src/helperComponents/ActionsButton/index.ts +1 -0
- package/src/helperComponents/ActionsButton/styles.module.scss +3 -0
- package/src/index.ts +4 -0
- package/src/types.ts +15 -0
- package/src/utils.ts +6 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
.notificationPanelHeader{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:column;
|
|
4
|
+
gap:var(--sn-primitive-dimension-4, 4px);
|
|
5
|
+
padding-block:var(--sn-primitive-dimension-24, 24px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.notificationPanelHeadline{
|
|
9
|
+
display:flex;
|
|
10
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
11
|
+
align-items:center;
|
|
12
|
+
height:var(--sn-primitive-dimension-32, 32px);
|
|
13
|
+
padding-inline:var(--sn-primitive-dimension-24, 24px);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.notificationPanelTitle{
|
|
17
|
+
flex:1 1 auto;
|
|
18
|
+
min-width:0;
|
|
19
|
+
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.notificationPanelHeaderActions{
|
|
23
|
+
display:flex;
|
|
24
|
+
align-items:center;
|
|
25
|
+
justify-content:flex-end;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.actionsRow{
|
|
29
|
+
display:flex;
|
|
30
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
31
|
+
align-items:center;
|
|
32
|
+
justify-content:space-between;
|
|
33
|
+
padding-top:var(--sn-primitive-dimension-12, 12px);
|
|
34
|
+
padding-inline:var(--sn-primitive-dimension-24, 24px);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.notificationPanelBody{
|
|
38
|
+
display:flex;
|
|
39
|
+
flex-direction:column;
|
|
40
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
41
|
+
min-height:100%;
|
|
42
|
+
padding-right:var(--sn-primitive-dimension-24, 24px);
|
|
43
|
+
padding-bottom:var(--sn-primitive-dimension-16, 16px);
|
|
44
|
+
padding-left:var(--sn-primitive-dimension-24, 24px);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.notificationPanelFooterButton{
|
|
48
|
+
cursor:pointer;
|
|
49
|
+
padding:var(--sn-primitive-dimension-12, 12px) var(--sn-primitive-dimension-24, 24px);
|
|
50
|
+
border:none;
|
|
51
|
+
border-top:var(--sn-primitive-strokeWeight-strokeRegular, 1px) solid var(--sn-theme-color-available-borderColor, var(--sn-brand-color-state-neutralBorder-forLightMode-default-borderColor, rgba(159, 166, 198, 0.3019607843)));
|
|
52
|
+
color:var(--sn-theme-color-neutral-text, var(--sn-brand-color-neutral-45, var(--sn-primitive-color-gray-45, #81869c)));
|
|
53
|
+
background-color:transparent;
|
|
54
|
+
}
|
|
55
|
+
.notificationPanelFooterButton:hover{
|
|
56
|
+
background-color:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
|
|
57
|
+
}
|
|
58
|
+
.notificationPanelFooterButton:focus-visible{
|
|
59
|
+
outline:var(--sn-primitive-strokeWeight-strokeSemiBold, 2px) solid var(--sn-theme-color-available-complementary, #000000);
|
|
60
|
+
outline-offset:0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wrapper{
|
|
64
|
+
display:flex;
|
|
65
|
+
flex-direction:column;
|
|
66
|
+
height:100%;
|
|
67
|
+
min-height:0;
|
|
68
|
+
background-color:var(--sn-theme-color-neutral-background1Level, var(--sn-brand-color-neutral-95, var(--sn-primitive-color-gray-95, #fdfdfd)));
|
|
69
|
+
}
|
|
70
|
+
.wrapper[data-layout-type=mobile] .notificationPanelHeader{
|
|
71
|
+
gap:0;
|
|
72
|
+
padding-block:var(--sn-primitive-dimension-8, 8px);
|
|
73
|
+
}
|
|
74
|
+
.wrapper[data-layout-type=mobile] .notificationPanelHeadline{
|
|
75
|
+
padding-bottom:var(--sn-primitive-dimension-8, 8px);
|
|
76
|
+
padding-inline:var(--sn-primitive-dimension-16, 16px);
|
|
77
|
+
}
|
|
78
|
+
.wrapper[data-layout-type=mobile] .actionsRow{
|
|
79
|
+
padding-top:0;
|
|
80
|
+
padding-inline:var(--sn-primitive-dimension-16, 16px);
|
|
81
|
+
}
|
|
82
|
+
.wrapper[data-layout-type=mobile] .notificationPanelBody{
|
|
83
|
+
padding:var(--sn-primitive-dimension-8, 8px) var(--sn-primitive-dimension-16, 16px) var(--sn-primitive-dimension-16, 16px);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.scrollArea{
|
|
87
|
+
flex:1 1 auto;
|
|
88
|
+
min-height:0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.scrollStub{
|
|
92
|
+
width:100%;
|
|
93
|
+
height:var(--sn-primitive-dimension-1, 1px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.inlineFlex{
|
|
97
|
+
display:inline-flex;
|
|
98
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./NotificationCard"), exports);
|
|
18
|
+
__exportStar(require("./NotificationPanelContent"), exports);
|
|
19
|
+
__exportStar(require("./NotificationPanel"), exports);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const APPEARANCE: {
|
|
2
|
+
readonly Default: "default";
|
|
3
|
+
readonly Error: "error";
|
|
4
|
+
readonly Warning: "warning";
|
|
5
|
+
readonly Success: "success";
|
|
6
|
+
};
|
|
7
|
+
export declare const TEST_IDS: {
|
|
8
|
+
readonly card: {
|
|
9
|
+
readonly root: "notification-card";
|
|
10
|
+
readonly label: "notification-card__label";
|
|
11
|
+
readonly title: "notification-card__title";
|
|
12
|
+
readonly description: "notification-card__description";
|
|
13
|
+
readonly link: "notification-card__link";
|
|
14
|
+
readonly date: "notification-card__date";
|
|
15
|
+
readonly statusIndicator: "notification-card__status-indicator";
|
|
16
|
+
readonly skeleton: "notification-card__skeleton";
|
|
17
|
+
readonly actions: {
|
|
18
|
+
readonly wrapper: "notification-card__actions";
|
|
19
|
+
readonly droplist: "notification-card__droplist";
|
|
20
|
+
readonly droplistTrigger: "notification-card__droplist-trigger";
|
|
21
|
+
readonly droplistAction: "notification-card__droplist-action";
|
|
22
|
+
};
|
|
23
|
+
readonly primaryButton: "notification-card__primary-button";
|
|
24
|
+
readonly secondaryButton: "notification-card__secondary-button";
|
|
25
|
+
};
|
|
26
|
+
readonly panel: {
|
|
27
|
+
readonly root: "notification-panel";
|
|
28
|
+
readonly title: "notification-panel__title";
|
|
29
|
+
readonly segments: "notification-panel__segments";
|
|
30
|
+
readonly chipToggle: "notification-panel__chip-toggle";
|
|
31
|
+
readonly settings: {
|
|
32
|
+
readonly droplist: "notification-panel__settings__droplist";
|
|
33
|
+
readonly droplistTrigger: "notification-panel__settings__droplist-trigger";
|
|
34
|
+
readonly droplistAction: "notification-panel__settings__droplist-action";
|
|
35
|
+
};
|
|
36
|
+
readonly readAll: "notification-panel__read-all";
|
|
37
|
+
readonly footerButton: "notification-panel__footer-button";
|
|
38
|
+
readonly blank: "notification-panel__blank";
|
|
39
|
+
readonly error: "notification-panel__error";
|
|
40
|
+
readonly group: {
|
|
41
|
+
readonly root: "notification-panel__group";
|
|
42
|
+
readonly title: "notification-panel__group__title";
|
|
43
|
+
};
|
|
44
|
+
readonly cardStack: {
|
|
45
|
+
readonly headline: "notification-panel__card-stack__headline";
|
|
46
|
+
readonly wrapper: "notification-panel__card-stack__wrapper";
|
|
47
|
+
readonly title: "notification-panel__card-stack__title";
|
|
48
|
+
readonly openButton: "notification-panel__card-stack__open-button";
|
|
49
|
+
readonly actions: {
|
|
50
|
+
readonly wrapper: "notification-panel__card-stack__actions";
|
|
51
|
+
readonly droplist: "notification-panel__card-stack__droplist";
|
|
52
|
+
readonly droplistTrigger: "notification-panel__card-stack__droplist-trigger";
|
|
53
|
+
readonly droplistAction: "notification-panel__card-stack__droplist-action";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEST_IDS = exports.APPEARANCE = void 0;
|
|
4
|
+
exports.APPEARANCE = {
|
|
5
|
+
Default: 'default',
|
|
6
|
+
Error: 'error',
|
|
7
|
+
Warning: 'warning',
|
|
8
|
+
Success: 'success',
|
|
9
|
+
};
|
|
10
|
+
exports.TEST_IDS = {
|
|
11
|
+
card: {
|
|
12
|
+
root: 'notification-card',
|
|
13
|
+
label: 'notification-card__label',
|
|
14
|
+
title: 'notification-card__title',
|
|
15
|
+
description: 'notification-card__description',
|
|
16
|
+
link: 'notification-card__link',
|
|
17
|
+
date: 'notification-card__date',
|
|
18
|
+
statusIndicator: 'notification-card__status-indicator',
|
|
19
|
+
skeleton: 'notification-card__skeleton',
|
|
20
|
+
actions: {
|
|
21
|
+
wrapper: 'notification-card__actions',
|
|
22
|
+
droplist: 'notification-card__droplist',
|
|
23
|
+
droplistTrigger: 'notification-card__droplist-trigger',
|
|
24
|
+
droplistAction: 'notification-card__droplist-action',
|
|
25
|
+
},
|
|
26
|
+
primaryButton: 'notification-card__primary-button',
|
|
27
|
+
secondaryButton: 'notification-card__secondary-button',
|
|
28
|
+
},
|
|
29
|
+
panel: {
|
|
30
|
+
root: 'notification-panel',
|
|
31
|
+
title: 'notification-panel__title',
|
|
32
|
+
segments: 'notification-panel__segments',
|
|
33
|
+
chipToggle: 'notification-panel__chip-toggle',
|
|
34
|
+
settings: {
|
|
35
|
+
droplist: 'notification-panel__settings__droplist',
|
|
36
|
+
droplistTrigger: 'notification-panel__settings__droplist-trigger',
|
|
37
|
+
droplistAction: 'notification-panel__settings__droplist-action',
|
|
38
|
+
},
|
|
39
|
+
readAll: 'notification-panel__read-all',
|
|
40
|
+
footerButton: 'notification-panel__footer-button',
|
|
41
|
+
blank: 'notification-panel__blank',
|
|
42
|
+
error: 'notification-panel__error',
|
|
43
|
+
group: {
|
|
44
|
+
root: 'notification-panel__group',
|
|
45
|
+
title: 'notification-panel__group__title',
|
|
46
|
+
},
|
|
47
|
+
cardStack: {
|
|
48
|
+
headline: 'notification-panel__card-stack__headline',
|
|
49
|
+
wrapper: 'notification-panel__card-stack__wrapper',
|
|
50
|
+
title: 'notification-panel__card-stack__title',
|
|
51
|
+
openButton: 'notification-panel__card-stack__open-button',
|
|
52
|
+
actions: {
|
|
53
|
+
wrapper: 'notification-panel__card-stack__actions',
|
|
54
|
+
droplist: 'notification-panel__card-stack__droplist',
|
|
55
|
+
droplistTrigger: 'notification-panel__card-stack__droplist-trigger',
|
|
56
|
+
droplistAction: 'notification-panel__card-stack__droplist-action',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dispatch, ReactElement, SetStateAction } from 'react';
|
|
2
|
+
import { Action } from '../../types';
|
|
3
|
+
export type ActionsButtonTestIds = {
|
|
4
|
+
wrapper: string;
|
|
5
|
+
droplist: string;
|
|
6
|
+
droplistTrigger: string;
|
|
7
|
+
droplistAction: string;
|
|
8
|
+
};
|
|
9
|
+
export type ActionsButtonProps = {
|
|
10
|
+
actions: Action[];
|
|
11
|
+
open: boolean;
|
|
12
|
+
setDroplistOpen: Dispatch<SetStateAction<boolean>>;
|
|
13
|
+
icon: ReactElement;
|
|
14
|
+
/** Доступное имя кнопки-триггера (icon-only кнопка иначе безымянна для скринридера). */
|
|
15
|
+
triggerAriaLabel: string;
|
|
16
|
+
testIds: ActionsButtonTestIds;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAriaLabel, testIds, className, }: ActionsButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ActionsButton = ActionsButton;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const button_1 = require("@cloud-ru/ds-button");
|
|
9
|
+
const list_1 = require("@cloud-ru/ds-list");
|
|
10
|
+
const tag_1 = require("@cloud-ru/ds-tag");
|
|
11
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
12
|
+
const utils_1 = require("../../utils");
|
|
13
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
14
|
+
function ActionsButton({ actions, open, setDroplistOpen, icon, triggerAriaLabel, testIds, className, }) {
|
|
15
|
+
return (
|
|
16
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
17
|
+
(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.inlineFlex, className), "data-test-id": testIds.wrapper, onClick: utils_1.stopPropagationClick, children: (0, jsx_runtime_1.jsx)(list_1.Droplist, { size: 'm', trigger: 'clickAndFocusVisible', open: open, onOpenChange: setDroplistOpen, placement: 'bottom-end', scroll: true, "data-test-id": testIds.droplist, items: actions.map(({ onClick, disabled, content, tagLabel, icon: itemIcon }, index) => ({
|
|
18
|
+
onClick: e => {
|
|
19
|
+
setDroplistOpen(false);
|
|
20
|
+
onClick?.(e);
|
|
21
|
+
},
|
|
22
|
+
disabled,
|
|
23
|
+
content,
|
|
24
|
+
beforeContent: itemIcon,
|
|
25
|
+
afterContent: tagLabel ? (0, jsx_runtime_1.jsx)(tag_1.Tag, { label: tagLabel }) : undefined,
|
|
26
|
+
'data-test-id': `${testIds.droplistAction}-${index}`,
|
|
27
|
+
})), triggerClassName: styles_module_scss_1.default.inlineFlex, children: (0, jsx_runtime_1.jsx)(button_1.Button, { view: 'function', appearance: 'neutral', size: 'm', icon: icon, "aria-label": triggerAriaLabel, "data-test-id": testIds.droplistTrigger }) }) }));
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionsButton';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ActionsButton"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.setNonce = void 0;
|
|
18
|
+
__exportStar(require("./components"), exports);
|
|
19
|
+
__exportStar(require("./constants"), exports);
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
var scroll_1 = require("@cloud-ru/ds-scroll");
|
|
22
|
+
Object.defineProperty(exports, "setNonce", { enumerable: true, get: function () { return scroll_1.setNonce; } });
|