@cloud-ru/ds-uikit-product-modal-predefined 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 +359 -0
- package/dist/cjs/components/DeleteModal/DeleteModal.d.ts +2 -0
- package/dist/cjs/components/DeleteModal/DeleteModal.js +39 -0
- package/dist/cjs/components/DeleteModal/index.d.ts +1 -0
- package/dist/cjs/components/DeleteModal/index.js +17 -0
- package/dist/cjs/components/DeleteModal/styles.module.css +33 -0
- package/dist/cjs/components/RecallModal/RecallModal.d.ts +2 -0
- package/dist/cjs/components/RecallModal/RecallModal.js +37 -0
- package/dist/cjs/components/RecallModal/index.d.ts +1 -0
- package/dist/cjs/components/RecallModal/index.js +17 -0
- package/dist/cjs/components/RecallModal/styles.module.css +33 -0
- package/dist/cjs/components/ReleaseNotes/ReleaseNotes.d.ts +7 -0
- package/dist/cjs/components/ReleaseNotes/ReleaseNotes.js +15 -0
- package/dist/cjs/components/ReleaseNotes/index.d.ts +1 -0
- package/dist/cjs/components/ReleaseNotes/index.js +17 -0
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.js +19 -0
- package/dist/cjs/constants.d.ts +27 -0
- package/dist/cjs/constants.js +30 -0
- package/dist/cjs/helperComponents/DesktopReleaseNotes/DesktopReleaseNotes.d.ts +2 -0
- package/dist/cjs/helperComponents/DesktopReleaseNotes/DesktopReleaseNotes.js +21 -0
- package/dist/cjs/helperComponents/DesktopReleaseNotes/index.d.ts +1 -0
- package/dist/cjs/helperComponents/DesktopReleaseNotes/index.js +17 -0
- package/dist/cjs/helperComponents/DesktopReleaseNotes/styles.module.css +19 -0
- package/dist/cjs/helperComponents/InputConfirm/InputConfirm.d.ts +48 -0
- package/dist/cjs/helperComponents/InputConfirm/InputConfirm.js +15 -0
- package/dist/cjs/helperComponents/InputConfirm/index.d.ts +1 -0
- package/dist/cjs/helperComponents/InputConfirm/index.js +17 -0
- package/dist/cjs/helperComponents/InputConfirm/styles.module.css +38 -0
- package/dist/cjs/helperComponents/MobileReleaseNotes/MobileReleaseNotes.d.ts +2 -0
- package/dist/cjs/helperComponents/MobileReleaseNotes/MobileReleaseNotes.js +26 -0
- package/dist/cjs/helperComponents/MobileReleaseNotes/index.d.ts +1 -0
- package/dist/cjs/helperComponents/MobileReleaseNotes/index.js +17 -0
- package/dist/cjs/helperComponents/NoteItem/NoteItem.d.ts +6 -0
- package/dist/cjs/helperComponents/NoteItem/NoteItem.js +20 -0
- package/dist/cjs/helperComponents/NoteItem/index.d.ts +1 -0
- package/dist/cjs/helperComponents/NoteItem/index.js +17 -0
- package/dist/cjs/helperComponents/NoteItem/styles.module.css +53 -0
- package/dist/cjs/helperComponents/ReleaseNotesContent/ReleaseNotesContent.d.ts +28 -0
- package/dist/cjs/helperComponents/ReleaseNotesContent/ReleaseNotesContent.js +30 -0
- package/dist/cjs/helperComponents/ReleaseNotesContent/index.d.ts +1 -0
- package/dist/cjs/helperComponents/ReleaseNotesContent/index.js +17 -0
- package/dist/cjs/helperComponents/ReleaseNotesContent/styles.module.css +40 -0
- package/dist/cjs/helperComponents/ReleaseNotesFooter/ReleaseNotesFooter.d.ts +25 -0
- package/dist/cjs/helperComponents/ReleaseNotesFooter/ReleaseNotesFooter.js +17 -0
- package/dist/cjs/helperComponents/ReleaseNotesFooter/index.d.ts +1 -0
- package/dist/cjs/helperComponents/ReleaseNotesFooter/index.js +17 -0
- package/dist/cjs/helperComponents/ReleaseNotesFooter/styles.module.css +27 -0
- package/dist/cjs/helperComponents/index.d.ts +6 -0
- package/dist/cjs/helperComponents/index.js +22 -0
- package/dist/cjs/hooks.d.ts +26 -0
- package/dist/cjs/hooks.js +59 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/locale/index.d.ts +143 -0
- package/dist/cjs/locale/index.js +76 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/style.css +243 -0
- package/dist/cjs/types.d.ts +67 -0
- package/dist/cjs/types.js +2 -0
- package/dist/esm/components/DeleteModal/DeleteModal.d.ts +2 -0
- package/dist/esm/components/DeleteModal/DeleteModal.js +33 -0
- package/dist/esm/components/DeleteModal/index.d.ts +1 -0
- package/dist/esm/components/DeleteModal/index.js +1 -0
- package/dist/esm/components/DeleteModal/styles.module.css +33 -0
- package/dist/esm/components/RecallModal/RecallModal.d.ts +2 -0
- package/dist/esm/components/RecallModal/RecallModal.js +31 -0
- package/dist/esm/components/RecallModal/index.d.ts +1 -0
- package/dist/esm/components/RecallModal/index.js +1 -0
- package/dist/esm/components/RecallModal/styles.module.css +33 -0
- package/dist/esm/components/ReleaseNotes/ReleaseNotes.d.ts +7 -0
- package/dist/esm/components/ReleaseNotes/ReleaseNotes.js +12 -0
- package/dist/esm/components/ReleaseNotes/index.d.ts +1 -0
- package/dist/esm/components/ReleaseNotes/index.js +1 -0
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/constants.d.ts +27 -0
- package/dist/esm/constants.js +27 -0
- package/dist/esm/helperComponents/DesktopReleaseNotes/DesktopReleaseNotes.d.ts +2 -0
- package/dist/esm/helperComponents/DesktopReleaseNotes/DesktopReleaseNotes.js +15 -0
- package/dist/esm/helperComponents/DesktopReleaseNotes/index.d.ts +1 -0
- package/dist/esm/helperComponents/DesktopReleaseNotes/index.js +1 -0
- package/dist/esm/helperComponents/DesktopReleaseNotes/styles.module.css +19 -0
- package/dist/esm/helperComponents/InputConfirm/InputConfirm.d.ts +48 -0
- package/dist/esm/helperComponents/InputConfirm/InputConfirm.js +9 -0
- package/dist/esm/helperComponents/InputConfirm/index.d.ts +1 -0
- package/dist/esm/helperComponents/InputConfirm/index.js +1 -0
- package/dist/esm/helperComponents/InputConfirm/styles.module.css +38 -0
- package/dist/esm/helperComponents/MobileReleaseNotes/MobileReleaseNotes.d.ts +2 -0
- package/dist/esm/helperComponents/MobileReleaseNotes/MobileReleaseNotes.js +23 -0
- package/dist/esm/helperComponents/MobileReleaseNotes/index.d.ts +1 -0
- package/dist/esm/helperComponents/MobileReleaseNotes/index.js +1 -0
- package/dist/esm/helperComponents/NoteItem/NoteItem.d.ts +6 -0
- package/dist/esm/helperComponents/NoteItem/NoteItem.js +14 -0
- package/dist/esm/helperComponents/NoteItem/index.d.ts +1 -0
- package/dist/esm/helperComponents/NoteItem/index.js +1 -0
- package/dist/esm/helperComponents/NoteItem/styles.module.css +53 -0
- package/dist/esm/helperComponents/ReleaseNotesContent/ReleaseNotesContent.d.ts +28 -0
- package/dist/esm/helperComponents/ReleaseNotesContent/ReleaseNotesContent.js +24 -0
- package/dist/esm/helperComponents/ReleaseNotesContent/index.d.ts +1 -0
- package/dist/esm/helperComponents/ReleaseNotesContent/index.js +1 -0
- package/dist/esm/helperComponents/ReleaseNotesContent/styles.module.css +40 -0
- package/dist/esm/helperComponents/ReleaseNotesFooter/ReleaseNotesFooter.d.ts +25 -0
- package/dist/esm/helperComponents/ReleaseNotesFooter/ReleaseNotesFooter.js +11 -0
- package/dist/esm/helperComponents/ReleaseNotesFooter/index.d.ts +1 -0
- package/dist/esm/helperComponents/ReleaseNotesFooter/index.js +1 -0
- package/dist/esm/helperComponents/ReleaseNotesFooter/styles.module.css +27 -0
- package/dist/esm/helperComponents/index.d.ts +6 -0
- package/dist/esm/helperComponents/index.js +6 -0
- package/dist/esm/hooks.d.ts +26 -0
- package/dist/esm/hooks.js +55 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/locale/index.d.ts +143 -0
- package/dist/esm/locale/index.js +73 -0
- package/dist/esm/style.css +243 -0
- package/dist/esm/types.d.ts +67 -0
- package/dist/esm/types.js +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +63 -0
- package/src/components/DeleteModal/DeleteModal.tsx +116 -0
- package/src/components/DeleteModal/index.ts +1 -0
- package/src/components/DeleteModal/styles.module.scss +37 -0
- package/src/components/RecallModal/RecallModal.tsx +111 -0
- package/src/components/RecallModal/index.ts +1 -0
- package/src/components/RecallModal/styles.module.scss +37 -0
- package/src/components/ReleaseNotes/ReleaseNotes.tsx +15 -0
- package/src/components/ReleaseNotes/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/constants.ts +29 -0
- package/src/helperComponents/DesktopReleaseNotes/DesktopReleaseNotes.tsx +85 -0
- package/src/helperComponents/DesktopReleaseNotes/index.ts +1 -0
- package/src/helperComponents/DesktopReleaseNotes/styles.module.scss +24 -0
- package/src/helperComponents/InputConfirm/InputConfirm.tsx +72 -0
- package/src/helperComponents/InputConfirm/index.ts +1 -0
- package/src/helperComponents/InputConfirm/styles.module.scss +30 -0
- package/src/helperComponents/MobileReleaseNotes/MobileReleaseNotes.tsx +88 -0
- package/src/helperComponents/MobileReleaseNotes/index.ts +1 -0
- package/src/helperComponents/NoteItem/NoteItem.tsx +58 -0
- package/src/helperComponents/NoteItem/index.ts +1 -0
- package/src/helperComponents/NoteItem/styles.module.scss +54 -0
- package/src/helperComponents/ReleaseNotesContent/ReleaseNotesContent.tsx +119 -0
- package/src/helperComponents/ReleaseNotesContent/index.ts +1 -0
- package/src/helperComponents/ReleaseNotesContent/styles.module.scss +45 -0
- package/src/helperComponents/ReleaseNotesFooter/ReleaseNotesFooter.tsx +84 -0
- package/src/helperComponents/ReleaseNotesFooter/index.ts +1 -0
- package/src/helperComponents/ReleaseNotesFooter/styles.module.scss +25 -0
- package/src/helperComponents/index.ts +6 -0
- package/src/hooks.ts +89 -0
- package/src/index.ts +4 -0
- package/src/locale/index.ts +77 -0
- package/src/types.ts +80 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
declare const MODAL_PREDEFINED_MESSAGES: {
|
|
2
|
+
readonly 'en-GB': {
|
|
3
|
+
readonly deleteModal: {
|
|
4
|
+
readonly title: "Delete {{objectType}}";
|
|
5
|
+
readonly fallbackTitle: "Delete object";
|
|
6
|
+
readonly content: "This action cannot be undone.";
|
|
7
|
+
readonly confirmLabel: "To allow deletion, enter:";
|
|
8
|
+
readonly approve: "Delete";
|
|
9
|
+
readonly cancel: "Cancel";
|
|
10
|
+
};
|
|
11
|
+
readonly recallModal: {
|
|
12
|
+
readonly title: "Recall request";
|
|
13
|
+
readonly content: "This action cannot be undone.";
|
|
14
|
+
readonly confirmLabel: "To recall the request, enter:";
|
|
15
|
+
readonly approve: "Recall request";
|
|
16
|
+
readonly cancel: "Cancel";
|
|
17
|
+
};
|
|
18
|
+
readonly confirm: {
|
|
19
|
+
readonly nameLabel: "Enter name to confirm";
|
|
20
|
+
readonly textLabel: "Enter text to confirm";
|
|
21
|
+
readonly namePlaceholder: "Name";
|
|
22
|
+
readonly textPlaceholder: "Text";
|
|
23
|
+
readonly error: "The entered value does not match the confirmation text";
|
|
24
|
+
};
|
|
25
|
+
readonly releaseNotes: {
|
|
26
|
+
readonly title: "What is new";
|
|
27
|
+
readonly readLater: "Read later";
|
|
28
|
+
readonly counter: "{{page}} of {{total}}";
|
|
29
|
+
readonly noDataTitle: "No news yet";
|
|
30
|
+
readonly noDataDescription: "Platform news will appear here soon";
|
|
31
|
+
readonly errorTitle: "Could not get data";
|
|
32
|
+
readonly errorDescription: "Try to reload the page";
|
|
33
|
+
readonly retry: "Refresh";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly 'ru-RU': {
|
|
37
|
+
readonly deleteModal: {
|
|
38
|
+
readonly title: "Удаление {{objectType}}";
|
|
39
|
+
readonly fallbackTitle: "Удалить объект";
|
|
40
|
+
readonly content: "Это действие нельзя отменить.";
|
|
41
|
+
readonly confirmLabel: "Чтобы разрешить удаление, введите:";
|
|
42
|
+
readonly approve: "Удалить";
|
|
43
|
+
readonly cancel: "Отмена";
|
|
44
|
+
};
|
|
45
|
+
readonly recallModal: {
|
|
46
|
+
readonly title: "Отзыв заявки";
|
|
47
|
+
readonly content: "Это действие нельзя отменить.";
|
|
48
|
+
readonly confirmLabel: "Чтобы отозвать заявку, введите:";
|
|
49
|
+
readonly approve: "Отозвать заявку";
|
|
50
|
+
readonly cancel: "Отмена";
|
|
51
|
+
};
|
|
52
|
+
readonly confirm: {
|
|
53
|
+
readonly nameLabel: "Введите название для подтверждения";
|
|
54
|
+
readonly textLabel: "Введите текст для подтверждения";
|
|
55
|
+
readonly namePlaceholder: "Введите название";
|
|
56
|
+
readonly textPlaceholder: "Текст";
|
|
57
|
+
readonly error: "Введенное значение не совпадает с текстом подтверждения";
|
|
58
|
+
};
|
|
59
|
+
readonly releaseNotes: {
|
|
60
|
+
readonly title: "Что нового";
|
|
61
|
+
readonly readLater: "Ознакомиться позже";
|
|
62
|
+
readonly counter: "{{page}} из {{total}}";
|
|
63
|
+
readonly noDataTitle: "Новостей пока нет";
|
|
64
|
+
readonly noDataDescription: "Скоро здесь появятся новости платформы";
|
|
65
|
+
readonly errorTitle: "Не удалось получить данные";
|
|
66
|
+
readonly errorDescription: "Попробуйте перезагрузить страницу";
|
|
67
|
+
readonly retry: "Обновить";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type ModalPredefinedMessages = (typeof MODAL_PREDEFINED_MESSAGES)['en-GB'];
|
|
72
|
+
/** locale компонента ModalPredefined: `modalPredefinedLocale.useTranslations()` в коде, `.extend(...)` в сервисе. */
|
|
73
|
+
export declare const modalPredefinedLocale: import("@cloud-ru/ds-locale").DefinedLocale<{
|
|
74
|
+
readonly 'en-GB': {
|
|
75
|
+
readonly deleteModal: {
|
|
76
|
+
readonly title: "Delete {{objectType}}";
|
|
77
|
+
readonly fallbackTitle: "Delete object";
|
|
78
|
+
readonly content: "This action cannot be undone.";
|
|
79
|
+
readonly confirmLabel: "To allow deletion, enter:";
|
|
80
|
+
readonly approve: "Delete";
|
|
81
|
+
readonly cancel: "Cancel";
|
|
82
|
+
};
|
|
83
|
+
readonly recallModal: {
|
|
84
|
+
readonly title: "Recall request";
|
|
85
|
+
readonly content: "This action cannot be undone.";
|
|
86
|
+
readonly confirmLabel: "To recall the request, enter:";
|
|
87
|
+
readonly approve: "Recall request";
|
|
88
|
+
readonly cancel: "Cancel";
|
|
89
|
+
};
|
|
90
|
+
readonly confirm: {
|
|
91
|
+
readonly nameLabel: "Enter name to confirm";
|
|
92
|
+
readonly textLabel: "Enter text to confirm";
|
|
93
|
+
readonly namePlaceholder: "Name";
|
|
94
|
+
readonly textPlaceholder: "Text";
|
|
95
|
+
readonly error: "The entered value does not match the confirmation text";
|
|
96
|
+
};
|
|
97
|
+
readonly releaseNotes: {
|
|
98
|
+
readonly title: "What is new";
|
|
99
|
+
readonly readLater: "Read later";
|
|
100
|
+
readonly counter: "{{page}} of {{total}}";
|
|
101
|
+
readonly noDataTitle: "No news yet";
|
|
102
|
+
readonly noDataDescription: "Platform news will appear here soon";
|
|
103
|
+
readonly errorTitle: "Could not get data";
|
|
104
|
+
readonly errorDescription: "Try to reload the page";
|
|
105
|
+
readonly retry: "Refresh";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly 'ru-RU': {
|
|
109
|
+
readonly deleteModal: {
|
|
110
|
+
readonly title: "Удаление {{objectType}}";
|
|
111
|
+
readonly fallbackTitle: "Удалить объект";
|
|
112
|
+
readonly content: "Это действие нельзя отменить.";
|
|
113
|
+
readonly confirmLabel: "Чтобы разрешить удаление, введите:";
|
|
114
|
+
readonly approve: "Удалить";
|
|
115
|
+
readonly cancel: "Отмена";
|
|
116
|
+
};
|
|
117
|
+
readonly recallModal: {
|
|
118
|
+
readonly title: "Отзыв заявки";
|
|
119
|
+
readonly content: "Это действие нельзя отменить.";
|
|
120
|
+
readonly confirmLabel: "Чтобы отозвать заявку, введите:";
|
|
121
|
+
readonly approve: "Отозвать заявку";
|
|
122
|
+
readonly cancel: "Отмена";
|
|
123
|
+
};
|
|
124
|
+
readonly confirm: {
|
|
125
|
+
readonly nameLabel: "Введите название для подтверждения";
|
|
126
|
+
readonly textLabel: "Введите текст для подтверждения";
|
|
127
|
+
readonly namePlaceholder: "Введите название";
|
|
128
|
+
readonly textPlaceholder: "Текст";
|
|
129
|
+
readonly error: "Введенное значение не совпадает с текстом подтверждения";
|
|
130
|
+
};
|
|
131
|
+
readonly releaseNotes: {
|
|
132
|
+
readonly title: "Что нового";
|
|
133
|
+
readonly readLater: "Ознакомиться позже";
|
|
134
|
+
readonly counter: "{{page}} из {{total}}";
|
|
135
|
+
readonly noDataTitle: "Новостей пока нет";
|
|
136
|
+
readonly noDataDescription: "Скоро здесь появятся новости платформы";
|
|
137
|
+
readonly errorTitle: "Не удалось получить данные";
|
|
138
|
+
readonly errorDescription: "Попробуйте перезагрузить страницу";
|
|
139
|
+
readonly retry: "Обновить";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
}, "@cloud-ru/ds-uikit-product-modal-predefined">;
|
|
143
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineLocale, defineMessages } from '@cloud-ru/ds-locale';
|
|
2
|
+
const MODAL_PREDEFINED_MESSAGES = defineMessages({
|
|
3
|
+
'en-GB': {
|
|
4
|
+
deleteModal: {
|
|
5
|
+
title: 'Delete {{objectType}}',
|
|
6
|
+
fallbackTitle: 'Delete object',
|
|
7
|
+
content: 'This action cannot be undone.',
|
|
8
|
+
confirmLabel: 'To allow deletion, enter:',
|
|
9
|
+
approve: 'Delete',
|
|
10
|
+
cancel: 'Cancel',
|
|
11
|
+
},
|
|
12
|
+
recallModal: {
|
|
13
|
+
title: 'Recall request',
|
|
14
|
+
content: 'This action cannot be undone.',
|
|
15
|
+
confirmLabel: 'To recall the request, enter:',
|
|
16
|
+
approve: 'Recall request',
|
|
17
|
+
cancel: 'Cancel',
|
|
18
|
+
},
|
|
19
|
+
confirm: {
|
|
20
|
+
nameLabel: 'Enter name to confirm',
|
|
21
|
+
textLabel: 'Enter text to confirm',
|
|
22
|
+
namePlaceholder: 'Name',
|
|
23
|
+
textPlaceholder: 'Text',
|
|
24
|
+
error: 'The entered value does not match the confirmation text',
|
|
25
|
+
},
|
|
26
|
+
releaseNotes: {
|
|
27
|
+
title: 'What is new',
|
|
28
|
+
readLater: 'Read later',
|
|
29
|
+
counter: '{{page}} of {{total}}',
|
|
30
|
+
noDataTitle: 'No news yet',
|
|
31
|
+
noDataDescription: 'Platform news will appear here soon',
|
|
32
|
+
errorTitle: 'Could not get data',
|
|
33
|
+
errorDescription: 'Try to reload the page',
|
|
34
|
+
retry: 'Refresh',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
'ru-RU': {
|
|
38
|
+
deleteModal: {
|
|
39
|
+
title: 'Удаление {{objectType}}',
|
|
40
|
+
fallbackTitle: 'Удалить объект',
|
|
41
|
+
content: 'Это действие нельзя отменить.',
|
|
42
|
+
confirmLabel: 'Чтобы разрешить удаление, введите:',
|
|
43
|
+
approve: 'Удалить',
|
|
44
|
+
cancel: 'Отмена',
|
|
45
|
+
},
|
|
46
|
+
recallModal: {
|
|
47
|
+
title: 'Отзыв заявки',
|
|
48
|
+
content: 'Это действие нельзя отменить.',
|
|
49
|
+
confirmLabel: 'Чтобы отозвать заявку, введите:',
|
|
50
|
+
approve: 'Отозвать заявку',
|
|
51
|
+
cancel: 'Отмена',
|
|
52
|
+
},
|
|
53
|
+
confirm: {
|
|
54
|
+
nameLabel: 'Введите название для подтверждения',
|
|
55
|
+
textLabel: 'Введите текст для подтверждения',
|
|
56
|
+
namePlaceholder: 'Введите название',
|
|
57
|
+
textPlaceholder: 'Текст',
|
|
58
|
+
error: 'Введенное значение не совпадает с текстом подтверждения',
|
|
59
|
+
},
|
|
60
|
+
releaseNotes: {
|
|
61
|
+
title: 'Что нового',
|
|
62
|
+
readLater: 'Ознакомиться позже',
|
|
63
|
+
counter: '{{page}} из {{total}}',
|
|
64
|
+
noDataTitle: 'Новостей пока нет',
|
|
65
|
+
noDataDescription: 'Скоро здесь появятся новости платформы',
|
|
66
|
+
errorTitle: 'Не удалось получить данные',
|
|
67
|
+
errorDescription: 'Попробуйте перезагрузить страницу',
|
|
68
|
+
retry: 'Обновить',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
/** locale компонента ModalPredefined: `modalPredefinedLocale.useTranslations()` в коде, `.extend(...)` в сервисе. */
|
|
73
|
+
export const modalPredefinedLocale = defineLocale('@cloud-ru/ds-uikit-product-modal-predefined', MODAL_PREDEFINED_MESSAGES);
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
.safeAreaTop{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:column;
|
|
4
|
+
align-items:flex-start;
|
|
5
|
+
align-self:stretch;
|
|
6
|
+
padding-top:var(--sn-modal-anatomy-container-safeArea-paddingTop, var(--sn-density-spacing-interval-l, var(--sn-primitive-dimension-24, 24px)));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.safeAreaBottom{
|
|
10
|
+
display:flex;
|
|
11
|
+
flex-direction:column;
|
|
12
|
+
align-items:flex-start;
|
|
13
|
+
align-self:stretch;
|
|
14
|
+
padding-bottom:var(--sn-modal-anatomy-container-safeArea-paddingBottom, var(--sn-density-spacing-interval-s, var(--sn-primitive-dimension-8, 8px)));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.body{
|
|
18
|
+
min-height:auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.content{
|
|
22
|
+
display:flex;
|
|
23
|
+
flex-direction:column;
|
|
24
|
+
row-gap:var(--sn-primitive-dimension-16, 16px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.footer{
|
|
28
|
+
display:flex;
|
|
29
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
30
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
31
|
+
justify-content:flex-end;
|
|
32
|
+
width:100%;
|
|
33
|
+
}
|
|
34
|
+
.safeAreaTop{
|
|
35
|
+
display:flex;
|
|
36
|
+
flex-direction:column;
|
|
37
|
+
align-items:flex-start;
|
|
38
|
+
align-self:stretch;
|
|
39
|
+
padding-top:var(--sn-modal-anatomy-container-safeArea-paddingTop, var(--sn-density-spacing-interval-l, var(--sn-primitive-dimension-24, 24px)));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.safeAreaBottom{
|
|
43
|
+
display:flex;
|
|
44
|
+
flex-direction:column;
|
|
45
|
+
align-items:flex-start;
|
|
46
|
+
align-self:stretch;
|
|
47
|
+
padding-bottom:var(--sn-modal-anatomy-container-safeArea-paddingBottom, var(--sn-density-spacing-interval-s, var(--sn-primitive-dimension-8, 8px)));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.body{
|
|
51
|
+
min-height:auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.content{
|
|
55
|
+
display:flex;
|
|
56
|
+
flex-direction:column;
|
|
57
|
+
row-gap:var(--sn-primitive-dimension-16, 16px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.footer{
|
|
61
|
+
display:flex;
|
|
62
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
63
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
64
|
+
justify-content:flex-end;
|
|
65
|
+
width:100%;
|
|
66
|
+
}
|
|
67
|
+
.safeAreaTop{
|
|
68
|
+
display:flex;
|
|
69
|
+
flex-direction:column;
|
|
70
|
+
align-items:flex-start;
|
|
71
|
+
align-self:stretch;
|
|
72
|
+
padding-top:var(--sn-modal-anatomy-container-safeArea-paddingTop, var(--sn-density-spacing-interval-l, var(--sn-primitive-dimension-24, 24px)));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.safeAreaBottom{
|
|
76
|
+
display:flex;
|
|
77
|
+
flex-direction:column;
|
|
78
|
+
align-items:flex-start;
|
|
79
|
+
align-self:stretch;
|
|
80
|
+
padding-bottom:var(--sn-modal-anatomy-container-safeArea-paddingBottom, var(--sn-density-spacing-interval-s, var(--sn-primitive-dimension-8, 8px)));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.body{
|
|
84
|
+
min-height:calc(6 * var(--sn-primitive-dimension-64, 64px));
|
|
85
|
+
}
|
|
86
|
+
.root{
|
|
87
|
+
display:flex;
|
|
88
|
+
flex-direction:column;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.confirmText{
|
|
92
|
+
display:flex;
|
|
93
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
94
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
95
|
+
align-items:center;
|
|
96
|
+
justify-content:space-between;
|
|
97
|
+
margin-bottom:var(--sn-primitive-dimension-8, 8px);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.confirmText[data-align=start]{
|
|
101
|
+
-moz-column-gap:var(--sn-primitive-dimension-4, 4px);
|
|
102
|
+
column-gap:var(--sn-primitive-dimension-4, 4px);
|
|
103
|
+
justify-content:flex-start;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.confirmLabel{
|
|
107
|
+
font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
108
|
+
font-weight:var(--sn-regular-body-m-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-m, var(--sn-brand-font-fontWeight-light-regular-body-m, var(--sn-primitive-font-fontWeightValue-400, 400))));
|
|
109
|
+
line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
110
|
+
font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
111
|
+
letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
112
|
+
paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
113
|
+
color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.confirmValue{
|
|
117
|
+
font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
118
|
+
font-weight:var(--sn-regular-body-m-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-m, var(--sn-brand-font-fontWeight-light-regular-body-m, var(--sn-primitive-font-fontWeightValue-400, 400))));
|
|
119
|
+
line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
120
|
+
font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
121
|
+
letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
122
|
+
paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
123
|
+
}
|
|
124
|
+
.root{
|
|
125
|
+
display:grid;
|
|
126
|
+
grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
|
|
127
|
+
-moz-column-gap:var(--sn-primitive-dimension-24, 24px);
|
|
128
|
+
column-gap:var(--sn-primitive-dimension-24, 24px);
|
|
129
|
+
min-height:calc(5 * var(--sn-primitive-dimension-64, 64px));
|
|
130
|
+
}
|
|
131
|
+
.root[data-surface=bottomSheet]{
|
|
132
|
+
grid-template-columns:minmax(0, 1fr);
|
|
133
|
+
row-gap:var(--sn-primitive-dimension-16, 16px);
|
|
134
|
+
min-height:0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.media{
|
|
138
|
+
position:relative;
|
|
139
|
+
overflow:hidden;
|
|
140
|
+
min-width:0;
|
|
141
|
+
border-radius:var(--sn-primitive-dimension-16, 16px);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.image,
|
|
145
|
+
.video{
|
|
146
|
+
display:block;
|
|
147
|
+
width:100%;
|
|
148
|
+
height:100%;
|
|
149
|
+
-o-object-fit:cover;
|
|
150
|
+
object-fit:cover;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.videoSkeleton{
|
|
154
|
+
position:absolute;
|
|
155
|
+
inset:0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.content{
|
|
159
|
+
display:flex;
|
|
160
|
+
flex-direction:column;
|
|
161
|
+
row-gap:var(--sn-primitive-dimension-12, 12px);
|
|
162
|
+
min-width:0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.description{
|
|
166
|
+
min-height:0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.root[data-surface=modal] .content{
|
|
170
|
+
row-gap:var(--sn-primitive-dimension-16, 16px);
|
|
171
|
+
order:1;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.root[data-surface=modal] .media{
|
|
175
|
+
order:2;
|
|
176
|
+
}
|
|
177
|
+
.root{
|
|
178
|
+
display:flex;
|
|
179
|
+
flex-direction:column;
|
|
180
|
+
row-gap:var(--sn-primitive-dimension-16, 16px);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.modal{
|
|
184
|
+
min-width:calc(11 * var(--sn-primitive-dimension-64, 64px));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.bottomSheet{
|
|
188
|
+
min-width:0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.carousel{
|
|
192
|
+
min-width:0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.stateWrapper{
|
|
196
|
+
display:flex;
|
|
197
|
+
flex-direction:column;
|
|
198
|
+
align-items:center;
|
|
199
|
+
justify-content:center;
|
|
200
|
+
width:100%;
|
|
201
|
+
}
|
|
202
|
+
.stateWrapper[data-surface=modal]{
|
|
203
|
+
height:calc(7 * var(--sn-primitive-dimension-64, 64px) - var(--sn-primitive-dimension-4, 4px));
|
|
204
|
+
}
|
|
205
|
+
.stateWrapper[data-surface=bottomSheet]{
|
|
206
|
+
min-height:calc(7 * var(--sn-primitive-dimension-64, 64px));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.state{
|
|
210
|
+
width:100%;
|
|
211
|
+
max-width:calc(9 * var(--sn-primitive-dimension-64, 64px) + 3 * var(--sn-primitive-dimension-16, 16px));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.loading{
|
|
215
|
+
height:calc(5 * var(--sn-primitive-dimension-64, 64px));
|
|
216
|
+
}
|
|
217
|
+
.root{
|
|
218
|
+
position:relative;
|
|
219
|
+
display:flex;
|
|
220
|
+
-moz-column-gap:var(--sn-primitive-dimension-16, 16px);
|
|
221
|
+
column-gap:var(--sn-primitive-dimension-16, 16px);
|
|
222
|
+
align-items:center;
|
|
223
|
+
justify-content:space-between;
|
|
224
|
+
width:100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.controls{
|
|
228
|
+
display:flex;
|
|
229
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
230
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
231
|
+
align-items:center;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.counter{
|
|
235
|
+
font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
236
|
+
font-weight:var(--sn-regular-body-m-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-m, var(--sn-brand-font-fontWeight-light-regular-body-m, var(--sn-primitive-font-fontWeightValue-400, 400))));
|
|
237
|
+
line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
238
|
+
font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
239
|
+
letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
240
|
+
paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
241
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
242
|
+
white-space:nowrap;
|
|
243
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ButtonProps } from '@cloud-ru/ds-button';
|
|
2
|
+
import { ModalCustomProps } from '@cloud-ru/ds-modal';
|
|
3
|
+
import { ValueOf, WithSupportProps } from '@cloud-ru/ds-utils';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { CONFIRM_TEXT_VARIANT, CONTENT_STATE } from './constants.js';
|
|
6
|
+
export type ReleaseNotesContentState = ValueOf<typeof CONTENT_STATE>;
|
|
7
|
+
export type ConfirmTextVariant = ValueOf<typeof CONFIRM_TEXT_VARIANT>;
|
|
8
|
+
export type NoteItemProps = {
|
|
9
|
+
/** Заголовок новости */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Описание новости в markdown */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Иллюстрация */
|
|
14
|
+
image: {
|
|
15
|
+
src: string;
|
|
16
|
+
alt: string;
|
|
17
|
+
};
|
|
18
|
+
/** Видео вместо статичной иллюстрации */
|
|
19
|
+
video?: string;
|
|
20
|
+
};
|
|
21
|
+
type BaseActionModalProps = Pick<ModalCustomProps, 'open' | 'onClose' | 'mode' | 'closeOnPopstate'> & {
|
|
22
|
+
/** Подсказка рядом с заголовком */
|
|
23
|
+
titleTooltip?: ReactNode;
|
|
24
|
+
/** Состояние с подтверждением через ввод текста */
|
|
25
|
+
confirmable?: boolean;
|
|
26
|
+
/** Текст, который нужно ввести для подтверждения */
|
|
27
|
+
confirmText?: string;
|
|
28
|
+
/** Скрыть кнопку копирования текста подтверждения */
|
|
29
|
+
hideConfirmCopyButton?: boolean;
|
|
30
|
+
/** Основной текст модалки */
|
|
31
|
+
content?: ReactNode;
|
|
32
|
+
/** Подзаголовок */
|
|
33
|
+
subtitle?: ReactNode;
|
|
34
|
+
};
|
|
35
|
+
export type DeleteModalProps = WithSupportProps<BaseActionModalProps & {
|
|
36
|
+
/** Тип удаляемого объекта, отображается в заголовке */
|
|
37
|
+
objectType?: string;
|
|
38
|
+
/** Колбэк подтверждения удаления */
|
|
39
|
+
onDelete(onClose: () => void): void;
|
|
40
|
+
/** Состояние загрузки кнопки удаления */
|
|
41
|
+
deleting?: boolean;
|
|
42
|
+
/** Тип текста подтверждения */
|
|
43
|
+
confirmTextVariant?: ConfirmTextVariant;
|
|
44
|
+
}>;
|
|
45
|
+
export type RecallModalProps = WithSupportProps<BaseActionModalProps & {
|
|
46
|
+
/** Колбэк подтверждения отзыва */
|
|
47
|
+
onRecall(onClose: () => void): void;
|
|
48
|
+
/** Состояние загрузки кнопки отзыва */
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
export type ReleaseNotesProps = WithSupportProps<Pick<ModalCustomProps, 'open' | 'onClose' | 'closeOnPopstate'> & {
|
|
52
|
+
/** Визуальное состояние контента по Figma */
|
|
53
|
+
contentState?: ReleaseNotesContentState;
|
|
54
|
+
/** Массив новостей */
|
|
55
|
+
items: NoteItemProps[];
|
|
56
|
+
/** Состояние загрузки контента */
|
|
57
|
+
loading?: boolean;
|
|
58
|
+
/** Действие "Ознакомиться позже" */
|
|
59
|
+
onReadLaterClick?(): void;
|
|
60
|
+
/** Действие перезагрузки на экране ошибки */
|
|
61
|
+
onDataErrorRetryClick?(): void;
|
|
62
|
+
/** Действие при смене слайда */
|
|
63
|
+
onSlideChange?(slide: number): void;
|
|
64
|
+
/** Только mobile: дополнительные пропсы action-кнопки "Ознакомиться позже" (на desktop игнорируется). */
|
|
65
|
+
readLaterButtonProps?: Partial<ButtonProps>;
|
|
66
|
+
}>;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|