@sberbusiness/triplex-next-mcp-server 0.24.0-beta1 → 0.36.0-beta0

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 (66) hide show
  1. package/README.md +10 -0
  2. package/bundle/components/Alert.md +272 -0
  3. package/bundle/components/Amount.md +138 -0
  4. package/bundle/components/AmountField.md +174 -0
  5. package/bundle/components/Avatar.md +72 -0
  6. package/bundle/components/Badge.md +203 -0
  7. package/bundle/components/BodyPage.md +186 -0
  8. package/bundle/components/Button.md +370 -85
  9. package/bundle/components/ButtonDropdown.md +328 -70
  10. package/bundle/components/ButtonIcon.md +98 -42
  11. package/bundle/components/Calendar.md +58 -0
  12. package/bundle/components/Checkbox.md +77 -44
  13. package/bundle/components/CheckboxTree.md +61 -0
  14. package/bundle/components/CheckboxTreeExtended.md +114 -0
  15. package/bundle/components/CheckboxXGroup.md +120 -16
  16. package/bundle/components/CheckboxYGroup.md +88 -15
  17. package/bundle/components/CollapsibleTree.md +581 -0
  18. package/bundle/components/CollapsibleTreeExtended.md +418 -0
  19. package/bundle/components/EmptyView.md +133 -15
  20. package/bundle/components/FooterPage.md +203 -0
  21. package/bundle/components/Gap.md +115 -57
  22. package/bundle/components/HeaderPage.md +226 -0
  23. package/bundle/components/HelpBox.md +231 -72
  24. package/bundle/components/ImageGallery.md +423 -0
  25. package/bundle/components/ImageGalleryExtended.md +606 -0
  26. package/bundle/components/List.md +194 -186
  27. package/bundle/components/ListItem.md +251 -0
  28. package/bundle/components/ListItemControlsButton.md +103 -0
  29. package/bundle/components/ListItemControlsButtonDropdown.md +107 -0
  30. package/bundle/components/ListItemSelectable.md +99 -0
  31. package/bundle/components/ListItemTable.md +390 -0
  32. package/bundle/components/ListMaster.md +877 -156
  33. package/bundle/components/ListMasterFooter.md +80 -0
  34. package/bundle/components/ListMasterHeader.md +86 -0
  35. package/bundle/components/ListSortable.md +153 -0
  36. package/bundle/components/ListSortableItem.md +175 -0
  37. package/bundle/components/ModalWindow.md +427 -237
  38. package/bundle/components/MonthYearField.md +145 -109
  39. package/bundle/components/Notification.md +625 -155
  40. package/bundle/components/Overlay.md +271 -170
  41. package/bundle/components/Page.md +283 -186
  42. package/bundle/components/Pagination.md +206 -229
  43. package/bundle/components/SliderExtended.md +285 -0
  44. package/bundle/guides/codestyle.md +38 -11
  45. package/bundle/guides/commits.md +1 -2
  46. package/bundle/guides/context.md +34 -30
  47. package/bundle/guides/stories.md +110 -40
  48. package/bundle/guides/template.md +3 -7
  49. package/bundle/guides/tests.md +6 -2
  50. package/bundle/manifest.json +194 -24
  51. package/bundle/release-notes/1.26.0.mdx +33 -2
  52. package/bundle/release-notes/1.27.0.mdx +43 -0
  53. package/bundle/release-notes/1.28.0.mdx +25 -0
  54. package/bundle/release-notes/1.29.0.mdx +47 -0
  55. package/bundle/release-notes/1.30.0.mdx +56 -0
  56. package/bundle/release-notes/1.31.0.mdx +52 -0
  57. package/bundle/release-notes/1.32.0.mdx +35 -0
  58. package/bundle/release-notes/1.33.0.mdx +61 -0
  59. package/bundle/release-notes/1.34.0.mdx +35 -0
  60. package/bundle/release-notes/1.35.0.mdx +21 -0
  61. package/bundle/release-notes/1.35.1.mdx +11 -0
  62. package/bundle/release-notes/1.36.0.mdx +21 -0
  63. package/bundle/release-notes/1.37.0.mdx +30 -0
  64. package/dist/index.js +2 -0
  65. package/dist/index.js.map +1 -1
  66. package/package.json +1 -1
@@ -275,3 +275,206 @@ export const Badge = Object.assign(
275
275
  | Дата | Изменение |
276
276
  |---|---|
277
277
  | 2026-04-18 | Создан документ |
278
+
279
+ ---
280
+
281
+ ## Примеры использования
282
+
283
+ ### Default
284
+
285
+ `stories/Badge/examples/DefaultExample.tsx`
286
+
287
+ ```tsx
288
+ import React from "react";
289
+ import { Badge, EComponentSize, EFontType, EFontWeightText, ETextSize, Text } from "@sberbusiness/triplex-next";
290
+
291
+ export const DefaultExample = () => (
292
+ <Badge size={EComponentSize.MD}>
293
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
294
+ Badge text
295
+ </Text>
296
+ </Badge>
297
+ );
298
+ ```
299
+
300
+ ### Sizes
301
+
302
+ `stories/Badge/examples/SizesExample.tsx`
303
+
304
+ ```tsx
305
+ import React from "react";
306
+ import {
307
+ Badge,
308
+ Caption,
309
+ ECaptionSize,
310
+ EComponentSize,
311
+ EFontType,
312
+ EFontWeightCaption,
313
+ EFontWeightText,
314
+ ETextSize,
315
+ Text,
316
+ } from "@sberbusiness/triplex-next";
317
+
318
+ export const SizesExample = () => (
319
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px", maxWidth: "150px" }}>
320
+ <div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
321
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>SM</div>
322
+ <Badge size={EComponentSize.SM}>
323
+ <Caption size={ECaptionSize.C1} weight={EFontWeightCaption.REGULAR} type={EFontType.PRIMARY_INVERT}>
324
+ Badge text SM
325
+ </Caption>
326
+ </Badge>
327
+ </div>
328
+ <div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
329
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>MD</div>
330
+ <Badge size={EComponentSize.MD}>
331
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
332
+ Badge text MD
333
+ </Text>
334
+ </Badge>
335
+ </div>
336
+ <div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
337
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>LG</div>
338
+ <Badge size={EComponentSize.LG}>
339
+ <Text size={ETextSize.B3} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
340
+ Badge text LG
341
+ </Text>
342
+ </Badge>
343
+ </div>
344
+ </div>
345
+ );
346
+ ```
347
+
348
+ ### WithPrefixAndPostfix
349
+
350
+ `stories/Badge/examples/WithPrefixAndPostfixExample.tsx`
351
+
352
+ ```tsx
353
+ import React from "react";
354
+ import {
355
+ PercentsmallStrokeSrvIcon16,
356
+ PercentsmallStrokeSrvIcon20,
357
+ PercentsmallStrokeSrvIcon24,
358
+ } from "@sberbusiness/icons-next";
359
+ import {
360
+ Badge,
361
+ Caption,
362
+ ECaptionSize,
363
+ EComponentSize,
364
+ EFontType,
365
+ EFontWeightCaption,
366
+ EFontWeightText,
367
+ ETextSize,
368
+ Text,
369
+ } from "@sberbusiness/triplex-next";
370
+
371
+ export const WithPrefixAndPostfixExample = () => (
372
+ <div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
373
+ <Badge
374
+ size={EComponentSize.SM}
375
+ prefix={<PercentsmallStrokeSrvIcon16 paletteIndex={7} />}
376
+ postfix={<PercentsmallStrokeSrvIcon16 paletteIndex={7} />}
377
+ >
378
+ <Caption size={ECaptionSize.C1} weight={EFontWeightCaption.REGULAR} type={EFontType.PRIMARY_INVERT}>
379
+ Badge text SM
380
+ </Caption>
381
+ </Badge>
382
+ <Badge
383
+ size={EComponentSize.MD}
384
+ prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}
385
+ postfix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}
386
+ >
387
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
388
+ Badge text MD
389
+ </Text>
390
+ </Badge>
391
+ <Badge
392
+ size={EComponentSize.LG}
393
+ prefix={<PercentsmallStrokeSrvIcon24 paletteIndex={7} />}
394
+ postfix={<PercentsmallStrokeSrvIcon24 paletteIndex={7} />}
395
+ >
396
+ <Text size={ETextSize.B3} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
397
+ Badge text LG
398
+ </Text>
399
+ </Badge>
400
+ </div>
401
+ );
402
+ ```
403
+
404
+ ### DotSizes
405
+
406
+ `stories/Badge/examples/DotSizesExample.tsx`
407
+
408
+ ```tsx
409
+ import React from "react";
410
+ import { Badge, EComponentSize } from "@sberbusiness/triplex-next";
411
+
412
+ const SIZES = Object.values(EComponentSize);
413
+
414
+ export const DotSizesExample = () => (
415
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
416
+ {SIZES.map((size) => (
417
+ <div key={size} style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
418
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{size.toUpperCase()}</div>
419
+ <Badge.Dot size={size} />
420
+ </div>
421
+ ))}
422
+ </div>
423
+ );
424
+ ```
425
+
426
+ ### Example
427
+
428
+ `stories/Badge/examples/ProductionExample.tsx`
429
+
430
+ ```tsx
431
+ import React from "react";
432
+ import { NewsmallFilledSrvIcon20, PercentsmallStrokeSrvIcon20 } from "@sberbusiness/icons-next";
433
+ import { Badge, EComponentSize, EFontType, EFontWeightText, ETextSize, Text } from "@sberbusiness/triplex-next";
434
+
435
+ export const ProductionExample = () => (
436
+ <div style={{ display: "flex", gap: "16px" }}>
437
+ <Badge size={EComponentSize.MD} prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />} />
438
+ <Badge size={EComponentSize.MD} prefix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}>
439
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
440
+ Badge text
441
+ </Text>
442
+ </Badge>
443
+ <Badge size={EComponentSize.MD} postfix={<PercentsmallStrokeSrvIcon20 paletteIndex={7} />}>
444
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
445
+ Badge text
446
+ </Text>
447
+ </Badge>
448
+ <Badge
449
+ size={EComponentSize.MD}
450
+ prefix={<NewsmallFilledSrvIcon20 paletteIndex={7} />}
451
+ style={{ backgroundColor: "#1297FE" }}
452
+ >
453
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.PRIMARY_INVERT}>
454
+ Новинка
455
+ </Text>
456
+ </Badge>
457
+ <Badge size={EComponentSize.MD} style={{ backgroundColor: "#E3FFFA" }}>
458
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.BRAND}>
459
+ Рисков не выявлено
460
+ </Text>
461
+ </Badge>
462
+ <Badge size={EComponentSize.MD} style={{ backgroundColor: "#FFF0F3" }}>
463
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.ERROR}>
464
+ Негативные факторы
465
+ </Text>
466
+ </Badge>
467
+ <Badge size={EComponentSize.MD} style={{ backgroundColor: "#FFF4DB" }}>
468
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.WARNING}>
469
+ Обратите внимание
470
+ </Text>
471
+ </Badge>
472
+ <Badge size={EComponentSize.MD} style={{ backgroundColor: "#EEF3FC" }}>
473
+ <Text size={ETextSize.B4} weight={EFontWeightText.REGULAR} type={EFontType.SYSTEM}>
474
+ Нет данных
475
+ </Text>
476
+ </Badge>
477
+ </div>
478
+ );
479
+ ```
480
+
@@ -0,0 +1,186 @@
1
+ ---
2
+ component: BodyPage
3
+ category: Page
4
+ related: [Page, HeaderPage, FooterPage, Body, Island, LightBox]
5
+ tokens: []
6
+ stories: stories/Page/BodyPage/BodyPage.stories.tsx
7
+ version: "1.0"
8
+ ---
9
+
10
+ # BodyPage
11
+
12
+ ## Назначение
13
+
14
+ Тело страницы `Page`. Доступен как статическое свойство `Page.Body`. Контейнер для основного
15
+ контента страницы между `Page.Header` и `Page.Footer`.
16
+
17
+ Используй когда: нужно разместить основной контент внутри `Page` — как в карточке (Island), так и без неё.
18
+ Не используй когда: нужен заголовок или футер страницы — для этого есть `Page.Header` / `Page.Footer`.
19
+
20
+ ---
21
+
22
+ ## Варианты и props
23
+
24
+ Публичный API — discriminated union по `type`: `IBodyPageTypeFirstProps | IBodyPageTypeSecondProps`.
25
+ Оба интерфейса расширяют `IBodyProps` (≈ `React.HTMLAttributes<HTMLDivElement>`).
26
+
27
+ ### Обязательные props
28
+
29
+ | Prop | Тип | Описание |
30
+ |---|---|---|
31
+ | `type` | `EBodyPageType` | `FIRST` — контент оборачивается в `Island` (карточка с белым фоном и тенью). `SECOND` — контент без карточки. |
32
+ | `children` | `React.ReactNode` | Контент тела страницы. |
33
+
34
+ ### Опциональные props
35
+
36
+ | Prop | Тип | По умолчанию | Описание |
37
+ |---|---|---|---|
38
+ | `verticalMargin` | `EBodyPageVerticalMargin` | `LARGE` | Вертикальные отступы: `LARGE` = 24px (16px на узких экранах), `SMALL` = 16px (8px на узких). В LightBox используется `SMALL`. |
39
+ | `size` | `EComponentSize` | — | Размер острова (Island). **Доступен только для `type=FIRST`**; для `type=SECOND` типизирован как `never`. |
40
+
41
+ ### Ограничения по типам
42
+
43
+ - `size` доступен только при `type=FIRST` (в `SECOND` контент не оборачивается в Island, поэтому `size?: never`).
44
+
45
+ ---
46
+
47
+ ## Дизайн-токены
48
+
49
+ Собственных CSS-переменных нет. Внешний вид карточки наследуется от `Island` (`EIslandType.TYPE_1`).
50
+ Вертикальные отступы заданы фиксированными значениями в `styles/BodyPage.module.less`
51
+ (24/16px и адаптив 16/8px на `@screen-sm-max`).
52
+
53
+ ---
54
+
55
+ ## Инварианты
56
+
57
+ - `forwardRef<HTMLDivElement>` — не убирать. Ref всегда указывает на корневой элемент
58
+ (Island для FIRST, Body для SECOND).
59
+ - `displayName = "BodyPage"` — не менять.
60
+ - Discriminated union по `type` и значения `EBodyPageType` / `EBodyPageVerticalMargin` — часть
61
+ публичного API, менять нельзя.
62
+ - Экспорты `BodyPage`, `IBodyPageTypeFirstProps`, `IBodyPageTypeSecondProps` идут в barrel
63
+ `src/components/Page/index.ts` — сохранять.
64
+ - `verticalMargin` по умолчанию `LARGE` — менять дефолт нельзя без обсуждения.
65
+
66
+ ---
67
+
68
+ ## Accessibility
69
+
70
+ Особого a11y-поведения нет — это структурный контейнер. Семантику и aria-атрибуты задаёт
71
+ потребитель через проброшенные HTML-атрибуты (`...rest` уходит в `Body`).
72
+
73
+ ---
74
+
75
+ ## Связанные компоненты
76
+
77
+ - `Page` — родитель; `BodyPage` доступен как `Page.Body`.
78
+ - `HeaderPage` (`Page.Header`), `FooterPage` (`Page.Footer`) — соседи внутри `Page`.
79
+ - `Body` — внутренний контейнер контента (рендерится в обоих типах).
80
+ - `Island` — карточка-обёртка для `type=FIRST`.
81
+ - `LightBox` — типичное место использования с `verticalMargin=SMALL`.
82
+
83
+ ---
84
+
85
+ ## Stories
86
+
87
+ Основные истории: `stories/Page/BodyPage/BodyPage.stories.tsx`
88
+ Файлы примеров: `stories/Page/BodyPage/examples/`
89
+
90
+ | Story | Example file | Что демонстрирует |
91
+ |---|---|---|
92
+ | `Playground` | `Playground.tsx` | Интерактивный контроль `type` и `verticalMargin` |
93
+ | `Default` | `Default.tsx` | Минимальный пример (FIRST, контент в карточке) |
94
+ | `Types` | `Types.tsx` | Сравнение типов FIRST и SECOND |
95
+ | `VerticalMargins` | `VerticalMargins.tsx` | Отступы LARGE (24px) и SMALL (16px) |
96
+ | `VisualTests` | `VisualTests.tsx` | Матрица type × verticalMargin для скриншот-регрессии |
97
+
98
+ ---
99
+
100
+ ## История изменений
101
+
102
+ | Дата | Изменение |
103
+ |---|---|
104
+ | 2026-06-18 | Создан документ. AI-рефакторинг (clsx order, JSDoc), unit-тесты, миграция stories на modern pattern. |
105
+
106
+ ---
107
+
108
+ ## Примеры использования
109
+
110
+ ### Default
111
+
112
+ `stories/Page/BodyPage/examples/Default.tsx`
113
+
114
+ ```tsx
115
+ import React from "react";
116
+ import { Page, EBodyPageType, Text, ETextSize, EFontType } from "@sberbusiness/triplex-next";
117
+
118
+ export const Default = () => (
119
+ <Page.Body type={EBodyPageType.FIRST}>
120
+ <Text tag="div" size={ETextSize.B2} type={EFontType.PRIMARY}>
121
+ BodyPage типа FIRST оборачивает контент в Island (карточку) с белым фоном и тенью.
122
+ </Text>
123
+ </Page.Body>
124
+ );
125
+ ```
126
+
127
+ ### Types
128
+
129
+ `stories/Page/BodyPage/examples/Types.tsx`
130
+
131
+ ```tsx
132
+ import React from "react";
133
+ import { Page, EBodyPageType, Text, ETextSize, EFontType } from "@sberbusiness/triplex-next";
134
+
135
+ export const Types = () => (
136
+ <div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
137
+ <div>
138
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: 700 }}>FIRST</div>
139
+ <Page.Body type={EBodyPageType.FIRST}>
140
+ <Text tag="div" size={ETextSize.B2} type={EFontType.PRIMARY}>
141
+ Тип FIRST оборачивает контент в Island (карточку) с белым фоном и тенью.
142
+ </Text>
143
+ </Page.Body>
144
+ </div>
145
+ <div>
146
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: 700 }}>SECOND</div>
147
+ <Page.Body type={EBodyPageType.SECOND}>
148
+ <Text tag="div" size={ETextSize.B2} type={EFontType.PRIMARY}>
149
+ Тип SECOND отображает контент без карточки.
150
+ </Text>
151
+ </Page.Body>
152
+ </div>
153
+ </div>
154
+ );
155
+ ```
156
+
157
+ ### VerticalMargins
158
+
159
+ `stories/Page/BodyPage/examples/VerticalMargins.tsx`
160
+
161
+ ```tsx
162
+ import React from "react";
163
+ import { Page, EBodyPageType, EBodyPageVerticalMargin, Text, ETextSize, EFontType } from "@sberbusiness/triplex-next";
164
+
165
+ export const VerticalMargins = () => (
166
+ <div style={{ display: "flex", flexDirection: "column", gap: "24px" }}>
167
+ <div>
168
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: 700 }}>LARGE (24px)</div>
169
+ <Page.Body type={EBodyPageType.FIRST} verticalMargin={EBodyPageVerticalMargin.LARGE}>
170
+ <Text tag="div" size={ETextSize.B2} type={EFontType.PRIMARY}>
171
+ Отступы сверху и снизу 24px (значение по умолчанию).
172
+ </Text>
173
+ </Page.Body>
174
+ </div>
175
+ <div>
176
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: 700 }}>SMALL (16px)</div>
177
+ <Page.Body type={EBodyPageType.FIRST} verticalMargin={EBodyPageVerticalMargin.SMALL}>
178
+ <Text tag="div" size={ETextSize.B2} type={EFontType.PRIMARY}>
179
+ Уменьшенные отступы сверху и снизу 16px. Используется в LightBox.
180
+ </Text>
181
+ </Page.Body>
182
+ </div>
183
+ </div>
184
+ );
185
+ ```
186
+