@snack-uikit/notification 0.3.17-preview-85c5f47b.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 (75) hide show
  1. package/CHANGELOG.md +333 -0
  2. package/LICENSE +201 -0
  3. package/README.md +134 -0
  4. package/dist/components/NotificationCard/NotificationCard.d.ts +36 -0
  5. package/dist/components/NotificationCard/NotificationCard.js +60 -0
  6. package/dist/components/NotificationCard/components/NotificationCardFunction.d.ts +7 -0
  7. package/dist/components/NotificationCard/components/NotificationCardFunction.js +13 -0
  8. package/dist/components/NotificationCard/components/NotificationCardSkeleton.d.ts +1 -0
  9. package/dist/components/NotificationCard/components/NotificationCardSkeleton.js +8 -0
  10. package/dist/components/NotificationCard/components/index.d.ts +2 -0
  11. package/dist/components/NotificationCard/components/index.js +2 -0
  12. package/dist/components/NotificationCard/constants.d.ts +20 -0
  13. package/dist/components/NotificationCard/constants.js +21 -0
  14. package/dist/components/NotificationCard/helpers.d.ts +2 -0
  15. package/dist/components/NotificationCard/helpers.js +18 -0
  16. package/dist/components/NotificationCard/index.d.ts +1 -0
  17. package/dist/components/NotificationCard/index.js +1 -0
  18. package/dist/components/NotificationCard/styles.module.css +128 -0
  19. package/dist/components/NotificationPanel/NotificationPanel.d.ts +42 -0
  20. package/dist/components/NotificationPanel/NotificationPanel.js +38 -0
  21. package/dist/components/NotificationPanel/components/NotificationPanelBlank/NotificationPanelBlank.d.ts +20 -0
  22. package/dist/components/NotificationPanel/components/NotificationPanelBlank/NotificationPanelBlank.js +24 -0
  23. package/dist/components/NotificationPanel/components/NotificationPanelBlank/index.d.ts +1 -0
  24. package/dist/components/NotificationPanel/components/NotificationPanelBlank/index.js +1 -0
  25. package/dist/components/NotificationPanel/components/NotificationPanelBlank/styles.module.css +27 -0
  26. package/dist/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.d.ts +9 -0
  27. package/dist/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.js +12 -0
  28. package/dist/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.d.ts +8 -0
  29. package/dist/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.js +13 -0
  30. package/dist/components/NotificationPanel/components/NotificationPanelSettings/index.d.ts +1 -0
  31. package/dist/components/NotificationPanel/components/NotificationPanelSettings/index.js +1 -0
  32. package/dist/components/NotificationPanel/components/index.d.ts +2 -0
  33. package/dist/components/NotificationPanel/components/index.js +2 -0
  34. package/dist/components/NotificationPanel/constants.d.ts +17 -0
  35. package/dist/components/NotificationPanel/constants.js +17 -0
  36. package/dist/components/NotificationPanel/index.d.ts +1 -0
  37. package/dist/components/NotificationPanel/index.js +1 -0
  38. package/dist/components/NotificationPanel/styles.module.css +97 -0
  39. package/dist/components/index.d.ts +2 -0
  40. package/dist/components/index.js +2 -0
  41. package/dist/helperComponents/NotificationPanelPopover/NotificationPanelPopover.d.ts +9 -0
  42. package/dist/helperComponents/NotificationPanelPopover/NotificationPanelPopover.js +22 -0
  43. package/dist/helperComponents/NotificationPanelPopover/index.d.ts +1 -0
  44. package/dist/helperComponents/NotificationPanelPopover/index.js +1 -0
  45. package/dist/helperComponents/NotificationPanelPopover/styles.module.css +20 -0
  46. package/dist/helperComponents/index.d.ts +1 -0
  47. package/dist/helperComponents/index.js +1 -0
  48. package/dist/index.d.ts +1 -0
  49. package/dist/index.js +1 -0
  50. package/package.json +50 -0
  51. package/src/components/NotificationCard/NotificationCard.tsx +172 -0
  52. package/src/components/NotificationCard/components/NotificationCardFunction.tsx +60 -0
  53. package/src/components/NotificationCard/components/NotificationCardSkeleton.tsx +30 -0
  54. package/src/components/NotificationCard/components/index.ts +2 -0
  55. package/src/components/NotificationCard/constants.ts +21 -0
  56. package/src/components/NotificationCard/helpers.tsx +19 -0
  57. package/src/components/NotificationCard/index.ts +1 -0
  58. package/src/components/NotificationCard/styles.module.scss +172 -0
  59. package/src/components/NotificationPanel/NotificationPanel.tsx +134 -0
  60. package/src/components/NotificationPanel/components/NotificationPanelBlank/NotificationPanelBlank.tsx +65 -0
  61. package/src/components/NotificationPanel/components/NotificationPanelBlank/index.ts +1 -0
  62. package/src/components/NotificationPanel/components/NotificationPanelBlank/styles.module.scss +32 -0
  63. package/src/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettings.tsx +31 -0
  64. package/src/components/NotificationPanel/components/NotificationPanelSettings/NotificationPanelSettingsDroplist.tsx +50 -0
  65. package/src/components/NotificationPanel/components/NotificationPanelSettings/index.ts +1 -0
  66. package/src/components/NotificationPanel/components/index.ts +2 -0
  67. package/src/components/NotificationPanel/constants.ts +17 -0
  68. package/src/components/NotificationPanel/index.ts +1 -0
  69. package/src/components/NotificationPanel/styles.module.scss +109 -0
  70. package/src/components/index.ts +2 -0
  71. package/src/helperComponents/NotificationPanelPopover/NotificationPanelPopover.tsx +60 -0
  72. package/src/helperComponents/NotificationPanelPopover/index.ts +1 -0
  73. package/src/helperComponents/NotificationPanelPopover/styles.module.scss +23 -0
  74. package/src/helperComponents/index.ts +1 -0
  75. package/src/index.ts +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,333 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## 0.3.16 (2023-12-05)
7
+
8
+ ### Only dependencies have been changed
9
+ * [@snack-uikit/chips@0.8.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
10
+
11
+
12
+
13
+
14
+
15
+ ## 0.3.15 (2023-11-29)
16
+
17
+ ### Only dependencies have been changed
18
+ * [@snack-uikit/chips@0.8.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
19
+ * [@snack-uikit/droplist@0.10.12](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
20
+
21
+
22
+
23
+
24
+
25
+ ## 0.3.14 (2023-11-22)
26
+
27
+ ### Only dependencies have been changed
28
+ * [@snack-uikit/link@0.7.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
29
+
30
+
31
+
32
+
33
+
34
+ ## 0.3.13 (2023-11-22)
35
+
36
+ ### Only dependencies have been changed
37
+ * [@snack-uikit/chips@0.8.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
38
+ * [@snack-uikit/droplist@0.10.11](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
39
+
40
+
41
+
42
+
43
+
44
+ ## 0.3.12 (2023-11-21)
45
+
46
+ ### Only dependencies have been changed
47
+ * [@snack-uikit/chips@0.8.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
48
+ * [@snack-uikit/droplist@0.10.10](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
49
+
50
+
51
+
52
+
53
+
54
+ ## 0.3.11 (2023-11-21)
55
+
56
+ ### Only dependencies have been changed
57
+ * [@snack-uikit/chips@0.8.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
58
+ * [@snack-uikit/droplist@0.10.9](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
59
+
60
+
61
+
62
+
63
+
64
+ ## 0.3.10 (2023-11-16)
65
+
66
+ ### Only dependencies have been changed
67
+ * [@snack-uikit/chips@0.7.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
68
+ * [@snack-uikit/droplist@0.10.8](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
69
+ * [@snack-uikit/link@0.6.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
70
+ * [@snack-uikit/popover-private@0.10.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
71
+ * [@snack-uikit/truncate-string@0.2.16](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
72
+
73
+
74
+
75
+
76
+
77
+ ## 0.3.9 (2023-11-16)
78
+
79
+ ### Only dependencies have been changed
80
+ * [@snack-uikit/chips@0.7.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
81
+ * [@snack-uikit/droplist@0.10.7](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
82
+
83
+
84
+
85
+
86
+
87
+ ## 0.3.8 (2023-11-16)
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * **FF-3712:** chips usage update ([dee75b1](https://github.com/cloud-ru-tech/snack-uikit/commit/dee75b1725afdc1a90d734b55c3d18f4f168664f))
93
+
94
+
95
+
96
+
97
+
98
+ ## 0.3.7 (2023-11-10)
99
+
100
+ ### Only dependencies have been changed
101
+ * [@snack-uikit/link@0.6.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
102
+
103
+
104
+
105
+
106
+
107
+ ## 0.3.6 (2023-11-09)
108
+
109
+ ### Only dependencies have been changed
110
+ * [@snack-uikit/chips@0.6.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
111
+ * [@snack-uikit/droplist@0.10.5](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
112
+ * [@snack-uikit/icons@0.18.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icons/CHANGELOG.md)
113
+ * [@snack-uikit/link@0.6.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
114
+ * [@snack-uikit/truncate-string@0.2.15](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
115
+
116
+
117
+
118
+
119
+
120
+ ## 0.3.5 (2023-11-08)
121
+
122
+ ### Only dependencies have been changed
123
+ * [@snack-uikit/button@0.13.5](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/button/CHANGELOG.md)
124
+ * [@snack-uikit/chips@0.6.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
125
+ * [@snack-uikit/droplist@0.10.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
126
+ * [@snack-uikit/icon-predefined@0.2.5](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icon-predefined/CHANGELOG.md)
127
+ * [@snack-uikit/link@0.6.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
128
+ * [@snack-uikit/popover-private@0.9.5](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
129
+ * [@snack-uikit/scroll@0.3.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/scroll/CHANGELOG.md)
130
+ * [@snack-uikit/skeleton@0.2.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/skeleton/CHANGELOG.md)
131
+ * [@snack-uikit/truncate-string@0.2.14](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
132
+ * [@snack-uikit/typography@0.4.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/typography/CHANGELOG.md)
133
+ * [@snack-uikit/utils@2.0.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/utils/CHANGELOG.md)
134
+
135
+
136
+
137
+
138
+
139
+ ## 0.3.4 (2023-11-01)
140
+
141
+ ### Only dependencies have been changed
142
+ * [@snack-uikit/link@0.6.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
143
+
144
+
145
+
146
+
147
+
148
+ ## 0.3.3 (2023-10-31)
149
+
150
+
151
+ ### Bug Fixes
152
+
153
+ * **FF-0000:** remove extractDataProps ([9d676b9](https://github.com/cloud-ru-tech/snack-uikit/commit/9d676b9df214167bfd1b7ce9f1590891ca62f9a3))
154
+
155
+
156
+
157
+
158
+
159
+ ## 0.3.2 (2023-10-26)
160
+
161
+ ### Only dependencies have been changed
162
+ * [@snack-uikit/button@0.13.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/button/CHANGELOG.md)
163
+ * [@snack-uikit/chips@0.6.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
164
+ * [@snack-uikit/droplist@0.10.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
165
+ * [@snack-uikit/icons@0.18.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icons/CHANGELOG.md)
166
+ * [@snack-uikit/link@0.5.9](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
167
+ * [@snack-uikit/truncate-string@0.2.12](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
168
+
169
+
170
+
171
+
172
+
173
+ ## 0.3.1 (2023-10-25)
174
+
175
+ ### Only dependencies have been changed
176
+ * [@snack-uikit/button@0.13.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/button/CHANGELOG.md)
177
+ * [@snack-uikit/chips@0.5.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
178
+ * [@snack-uikit/droplist@0.10.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
179
+ * [@snack-uikit/icon-predefined@0.2.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icon-predefined/CHANGELOG.md)
180
+ * [@snack-uikit/link@0.5.8](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
181
+ * [@snack-uikit/popover-private@0.9.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
182
+ * [@snack-uikit/scroll@0.3.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/scroll/CHANGELOG.md)
183
+ * [@snack-uikit/skeleton@0.2.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/skeleton/CHANGELOG.md)
184
+ * [@snack-uikit/truncate-string@0.2.11](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
185
+ * [@snack-uikit/typography@0.4.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/typography/CHANGELOG.md)
186
+ * [@snack-uikit/utils@1.3.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/utils/CHANGELOG.md)
187
+
188
+
189
+
190
+
191
+
192
+ # 0.3.0 (2023-10-18)
193
+
194
+
195
+ ### Features
196
+
197
+ * **FF-3326:** use useKeyboardNavigation from Droplist package instead of local implementation ([9615d55](https://github.com/cloud-ru-tech/snack-uikit/commit/9615d5589ee6743ad7fc24c95e1fb96a9ab42752))
198
+
199
+
200
+
201
+
202
+
203
+ ## 0.2.8 (2023-10-16)
204
+
205
+ ### Only dependencies have been changed
206
+ * [@snack-uikit/chips@0.4.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
207
+ * [@snack-uikit/droplist@0.9.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
208
+ * [@snack-uikit/icons@0.17.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icons/CHANGELOG.md)
209
+ * [@snack-uikit/link@0.5.7](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
210
+ * [@snack-uikit/popover-private@0.9.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
211
+ * [@snack-uikit/truncate-string@0.2.10](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
212
+
213
+
214
+
215
+
216
+
217
+ ## 0.2.7 (2023-10-13)
218
+
219
+ ### Only dependencies have been changed
220
+ * [@snack-uikit/chips@0.4.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
221
+ * [@snack-uikit/droplist@0.9.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
222
+
223
+
224
+
225
+
226
+
227
+ ## 0.2.6 (2023-10-13)
228
+
229
+ ### Only dependencies have been changed
230
+ * [@snack-uikit/chips@0.4.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
231
+ * [@snack-uikit/droplist@0.9.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
232
+ * [@snack-uikit/icon-predefined@0.2.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icon-predefined/CHANGELOG.md)
233
+ * [@snack-uikit/popover-private@0.9.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
234
+ * [@snack-uikit/scroll@0.3.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/scroll/CHANGELOG.md)
235
+ * [@snack-uikit/skeleton@0.2.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/skeleton/CHANGELOG.md)
236
+ * [@snack-uikit/truncate-string@0.2.9](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
237
+ * [@snack-uikit/typography@0.4.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/typography/CHANGELOG.md)
238
+
239
+
240
+
241
+
242
+
243
+ ## 0.2.5 (2023-10-12)
244
+
245
+ ### Only dependencies have been changed
246
+ * [@snack-uikit/button@0.13.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/button/CHANGELOG.md)
247
+ * [@snack-uikit/chips@0.4.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
248
+ * [@snack-uikit/droplist@0.9.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
249
+ * [@snack-uikit/link@0.5.6](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
250
+ * [@snack-uikit/truncate-string@0.2.8](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
251
+
252
+
253
+
254
+
255
+
256
+ ## 0.2.4 (2023-10-12)
257
+
258
+ ### Only dependencies have been changed
259
+ * [@snack-uikit/chips@0.4.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
260
+ * [@snack-uikit/droplist@0.9.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
261
+ * [@snack-uikit/popover-private@0.9.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
262
+ * [@snack-uikit/truncate-string@0.2.7](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
263
+
264
+
265
+
266
+
267
+
268
+ ## 0.2.3 (2023-10-11)
269
+
270
+
271
+ ### Bug Fixes
272
+
273
+ * **FF-3409:** add triggerRef; remove useless onClick handler ([0ef74b4](https://github.com/cloud-ru-tech/snack-uikit/commit/0ef74b4dd4dd24893efa0a05e1756576344b8c65))
274
+
275
+
276
+
277
+
278
+
279
+ ## 0.2.2 (2023-10-06)
280
+
281
+ ### Only dependencies have been changed
282
+ * [@snack-uikit/button@0.12.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/button/CHANGELOG.md)
283
+ * [@snack-uikit/chips@0.3.8](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
284
+ * [@snack-uikit/droplist@0.8.3](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
285
+ * [@snack-uikit/icon-predefined@0.2.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/icon-predefined/CHANGELOG.md)
286
+ * [@snack-uikit/link@0.5.4](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/link/CHANGELOG.md)
287
+ * [@snack-uikit/popover-private@0.8.1](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/popover-private/CHANGELOG.md)
288
+ * [@snack-uikit/scroll@0.3.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/scroll/CHANGELOG.md)
289
+ * [@snack-uikit/skeleton@0.2.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/skeleton/CHANGELOG.md)
290
+ * [@snack-uikit/truncate-string@0.2.5](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/truncate-string/CHANGELOG.md)
291
+ * [@snack-uikit/typography@0.4.0](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/typography/CHANGELOG.md)
292
+
293
+
294
+
295
+
296
+
297
+ ## 0.2.1 (2023-10-05)
298
+
299
+ ### Only dependencies have been changed
300
+ * [@snack-uikit/chips@0.3.7](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/chips/CHANGELOG.md)
301
+ * [@snack-uikit/droplist@0.8.2](https://github.com/cloud-ru-tech/snack-uikit/blob/master/packages/droplist/CHANGELOG.md)
302
+
303
+
304
+
305
+
306
+
307
+ # 0.2.0 (2023-10-05)
308
+
309
+
310
+ ### BREAKING CHANGES
311
+
312
+
313
+ * **FF-3409:** update actions buttons typings, fix focus order ([b9edc06](https://github.com/cloud-ru-tech/snack-uikit/commit/b9edc06e4e8db6b8c5dbe39ab4d26b770bf7f820))
314
+
315
+
316
+
317
+
318
+ # 0.1.0 (2023-09-28)
319
+
320
+
321
+ ### Features
322
+
323
+ * **FF-2661:** add Notification package ([650001f](https://github.com/cloud-ru-tech/snack-uikit/commit/650001fcd6023fe660b81345d1d4123ca5cc7347))
324
+
325
+
326
+
327
+
328
+
329
+ ## CHANGELOG
330
+
331
+ ### v0.0.0
332
+
333
+ - Initial version
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2023 Cloud technology Limited (Ltd.)
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # Notification
2
+
3
+ ## Installation
4
+ `npm i @snack-uikit/notification`
5
+
6
+ [Changelog](./CHANGELOG.md)
7
+
8
+ ## TODO:
9
+ - remove custom hook for droplist keyboard handles
10
+
11
+ ## Example
12
+
13
+ ```typescript jsx
14
+ import { NotificationCard, NotificationPanel } from '@snack-uikit/notification';
15
+
16
+ const cards = [
17
+ {
18
+ id: 'cardId',
19
+ label: ['Category', 'Subcategory'].join('・'),
20
+ appearance: NotificationCard.appearances.ErrorCritical,
21
+ title: 'Title truncate two line',
22
+ content: `Demo content.`,
23
+ link: {
24
+ text: 'Link to detailed information',
25
+ href: '#',
26
+ },
27
+ date: 'DD.MM.YYYY HH:MM',
28
+ actions: [
29
+ {
30
+ option: 'action 1',
31
+ onClick: handleActionClick,
32
+ },
33
+ {
34
+ option: 'action 2',
35
+ onClick: handleActionClick,
36
+ },
37
+ ],
38
+ }
39
+ ];
40
+
41
+ // ...
42
+
43
+ <NotificationPanel
44
+ title='Notifications'
45
+ triggerElement={<ButtonTonal label='open' />}
46
+ readAllButton={{
47
+ label: 'Mark all as read',
48
+ onClick() {},
49
+ }}
50
+ chips={[
51
+ {
52
+ label: ChipFilter.All,
53
+ checked: true,
54
+ onChange() { /* */ },
55
+ },
56
+ {
57
+ label: ChipFilter.Unread,
58
+ checked: false,
59
+ onChange() { /* */ },
60
+ },
61
+ ]}
62
+ content={
63
+ !cards.length ? (
64
+ <NotificationPanel.Blank
65
+ icon={PlaceholderSVG}
66
+ title='No notifications'
67
+ description={'Here you will see new event notifications\nwhen something happens'}
68
+ />
69
+ ) : (
70
+ cards.map(card => <NotificationCard {...card} key={card.id} />)
71
+ )
72
+ }
73
+ />
74
+ ```
75
+
76
+
77
+ [//]: DOCUMENTATION_SECTION_START
78
+ [//]: THIS_SECTION_IS_AUTOGENERATED_PLEASE_DONT_EDIT_IT
79
+ ## NotificationCard
80
+ Компонент карточки уведомления
81
+ ### Props
82
+ | name | type | default value | description |
83
+ |------|------|---------------|-------------|
84
+ | date* | `string` | - | Дата уведомления |
85
+ | content* | `ReactNode` | - | Контент уведомления |
86
+ | title* | `string` | - | Заголовок уведомления |
87
+ | id* | `string` | - | Идентификатор уведомления |
88
+ | appearance | enum Appearance: `"neutral"`, `"error"`, `"errorCritical"`, `"warning"`, `"success"` | Appearance.Neutral | Тип уведомления |
89
+ | label | `string` | - | Лейбл перед заголовком |
90
+ | unread | `boolean` | - | Управление состоянием прочитано/не прочитано |
91
+ | link | `Omit<LinkProps, "data-test-id" \| "size" \| "onColor" \| "onSurface">` | - | Ссылка |
92
+ | onClick | `MouseEventHandler<HTMLDivElement>` | - | Колбэк клика по карточке |
93
+ | onVisible | `(cardId: string) => void` | - | Колбэк при попадании карточки в область видимости на 80% |
94
+ | actions | `Pick<DroplistItemSingleProps, "onClick" \| "option" \| "caption" \| "description" \| "tagLabel" \| "disabled" \| "icon">[]` | - | Дополнительные действия у карточки |
95
+ | className | `string` | - | CSS-класс |
96
+ ## NotificationPanel
97
+ Компонент панели для уведомлений
98
+ ### Props
99
+ | name | type | default value | description |
100
+ |------|------|---------------|-------------|
101
+ | triggerElement* | `ReactNode \| ChildrenFunction` | - | Элемент для открытия панели |
102
+ | title* | `string` | - | Заголовок панели |
103
+ | settings | `NotificationPanelSettingsProps` | - | Кнопка настроек и выпадающий список |
104
+ | chips | `Omit<ChipToggleProps, "data-test-id" \| "size">[]` | - | Чипы для фильтрации |
105
+ | readAllButton | `Omit<ButtonFunctionProps, "data-test-id"> & { onClick: MouseEventHandler<HTMLElement>; }` | - | Кнопка в "шапке" панели |
106
+ | footerButton | `{ label: string; onClick: MouseEventHandler<HTMLButtonElement>; }` | - | Кнопка внизу панели |
107
+ | loading | `boolean` | - | Состояние загрузки |
108
+ | content | `ReactNode` | - | Контент для отрисовки (e.g NotificationCard \| NotificationPanel.Blank) |
109
+ | skeletonsAmount | `number` | 2 | Количество скелетонов карточек для отображения при загрузке |
110
+ | className | `string` | - | CSS-класс |
111
+ | triggerClassName | `string` | - | CSS-класс триггера |
112
+ | open | `boolean` | - | Управляет состоянием показан/не показан. |
113
+ | onOpenChange | `(isOpen: boolean) => void` | - | Колбек отображения компонента. Срабатывает при изменении состояния open. |
114
+ | hoverDelayOpen | `number` | - | Задержка открытия по ховеру |
115
+ | hoverDelayClose | `number` | - | Задержка закрытия по ховеру |
116
+ | offset | `number` | 0 | Отступ поповера от его триггер-элемента (в пикселях). |
117
+ | closeOnEscapeKey | `boolean` | true | Закрывать ли по нажатию на кнопку `Esc` |
118
+ | triggerClickByKeys | `boolean` | true | Вызывается ли попоповер по нажатию клавиш Enter/Space (при trigger = `Click`) |
119
+ | triggerRef | `ForwardedRef<HTMLElement \| ReferenceType>` | - | Ref ссылка на триггер |
120
+ | trigger | enum Trigger: `"click"`, `"hover"`, `"focusVisible"`, `"focus"`, `"hoverAndFocusVisible"`, `"hoverAndFocus"`, `"clickAndFocusVisible"` | - | Условие отображения поповера: <br> - `Click` - открывать по клику <br> - `Hover` - открывать по ховеру <br> - `FocusVisible` - открывать по focus-visible <br> - `Focus` - открывать по фокусу <br> - `HoverAndFocusVisible` - открывать по ховеру и focus-visible <br> - `HoverAndFocus` - открывать по ховеру и фокусу <br> - `ClickAndFocusVisible` - открывать по клику и focus-visible |
121
+ | placement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | Placement.Top | Положение поповера относительно своего триггера (children). |
122
+ | contentClassName | `string` | - | CSS-класс для элемента содержащего контент |
123
+ ## NotificationPanel.Blank
124
+ ### Props
125
+ | name | type | default value | description |
126
+ |------|------|---------------|-------------|
127
+ | title* | `ReactNode` | - | Заголовок |
128
+ | description | `ReactNode` | - | Описание |
129
+ | icon | `JSXElementConstructor<{ size?: number; className?: string; }>` | - | Иконка |
130
+ | iconAppearance | enum Appearance: `"primary"`, `"neutral"`, `"red"`, `"orange"`, `"yellow"`, `"green"`, `"blue"`, `"violet"`, `"pink"` | - | Цвет обводки для иконки |
131
+ | className | `string` | - | CSS-класс |
132
+
133
+
134
+ [//]: DOCUMENTATION_SECTION_END