@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
package/README.md CHANGED
@@ -80,6 +80,9 @@ npm run inspect
80
80
  # Обновить bundle/ из последнего релиза triplex-next
81
81
  npm run fetch-bundle
82
82
 
83
+ # Обновить только AI-ready компоненты из bundle, остальные данные сохранить
84
+ npm run fetch-bundle -- --merge --file path/to/mcp-data.json
85
+
83
86
  # Обновить bundle/icons.json из @sberbusiness/icons-next
84
87
  npm run fetch-icons
85
88
 
@@ -111,6 +114,13 @@ bundle/
111
114
  содержимое в поддиректории выше. Транзиентный `mcp-data.json` удаляется
112
115
  после раскладки.
113
116
 
117
+ По умолчанию дерево перезаписывается целиком. Флаг `--merge` включает
118
+ инкрементальное обновление: компоненты, у которых в bundle есть данные
119
+ (`raw !== null`), перезаписываются, остальные сохраняют текущую документацию
120
+ и записи в `manifest.json`. Гайды и release notes из bundle перезаписываются,
121
+ отсутствующие в bundle — сохраняются. Режим полезен, пока AI-документация
122
+ в triplex-next выверяется покомпонентно.
123
+
114
124
  В triplex-next bundle собирается скриптом `scripts/generateMcpData.ts`
115
125
  (npm-команда `generateMcpData`) и автоматически прикладывается к релиз-ассетам
116
126
  через `.github/workflows/release.yml`.
@@ -315,3 +315,275 @@ export const AlertProcess = Object.assign(
315
315
  | Дата | Изменение |
316
316
  |---|---|
317
317
  | 2026-04-18 | Создан документ |
318
+
319
+ ---
320
+
321
+ ## Примеры использования
322
+
323
+ ### Default
324
+
325
+ `stories/Alerts/examples/AlertContext/DefaultExample.tsx`
326
+
327
+ ```tsx
328
+ import React from "react";
329
+ import { AlertContext, EAlertType } from "@sberbusiness/triplex-next";
330
+
331
+ export const DefaultExample = () => (
332
+ <div style={{ maxWidth: "750px" }}>
333
+ <AlertContext type={EAlertType.INFO}>
334
+ This message provides context or highlights important information to note.
335
+ </AlertContext>
336
+ </div>
337
+ );
338
+ ```
339
+
340
+ ### Types
341
+
342
+ `stories/Alerts/examples/AlertContext/TypesExample.tsx`
343
+
344
+ ```tsx
345
+ import React from "react";
346
+ import { AlertContext, EAlertType } from "@sberbusiness/triplex-next";
347
+
348
+ const TYPES = Object.values(EAlertType).filter((type) => type !== EAlertType.FEATURE);
349
+
350
+ export const TypesExample = () => (
351
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px", maxWidth: "750px" }}>
352
+ {TYPES.map((type) => (
353
+ <div key={type}>
354
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{type.toUpperCase()}</div>
355
+ <AlertContext type={type}>
356
+ This message provides context or highlights important information to note.
357
+ </AlertContext>
358
+ </div>
359
+ ))}
360
+ </div>
361
+ );
362
+ ```
363
+
364
+ ### WithCustomIcon
365
+
366
+ `stories/Alerts/examples/AlertContext/WithCustomIconExample.tsx`
367
+
368
+ ```tsx
369
+ import React from "react";
370
+ import { AlertContext, EAlertType } from "@sberbusiness/triplex-next";
371
+ import { WaitStrokeStsIcon16 } from "@sberbusiness/icons-next";
372
+
373
+ export const WithCustomIconExample = () => (
374
+ <div style={{ maxWidth: "750px" }}>
375
+ <AlertContext type={EAlertType.INFO} renderIcon={<WaitStrokeStsIcon16 paletteIndex={4} />}>
376
+ This message provides context or highlights important information to note.
377
+ </AlertContext>
378
+ </div>
379
+ );
380
+ ```
381
+
382
+ ### Default
383
+
384
+ `stories/Alerts/examples/AlertProcess/DefaultExample.tsx`
385
+
386
+ ```tsx
387
+ import React from "react";
388
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
389
+
390
+ export const DefaultExample = () => (
391
+ <div style={{ maxWidth: "750px" }}>
392
+ <AlertProcess type={EAlertType.INFO}>
393
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
394
+ This message provides context or highlights important information to note.
395
+ </Text>
396
+ </AlertProcess>
397
+ </div>
398
+ );
399
+ ```
400
+
401
+ ### Types
402
+
403
+ `stories/Alerts/examples/AlertProcess/TypesExample.tsx`
404
+
405
+ ```tsx
406
+ import React from "react";
407
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
408
+
409
+ const TYPES = Object.values(EAlertType);
410
+
411
+ export const TypesExample = () => (
412
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px", maxWidth: "750px" }}>
413
+ {TYPES.map((type) => (
414
+ <div key={type}>
415
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{type.toUpperCase()}</div>
416
+ <AlertProcess type={type}>
417
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
418
+ This message provides context or highlights important information to note.
419
+ </Text>
420
+ </AlertProcess>
421
+ </div>
422
+ ))}
423
+ </div>
424
+ );
425
+ ```
426
+
427
+ ### BorderRadius
428
+
429
+ `stories/Alerts/examples/AlertProcess/BorderRadiusExample.tsx`
430
+
431
+ ```tsx
432
+ import React from "react";
433
+ import {
434
+ AlertProcess,
435
+ EAlertProcessBorderRadius,
436
+ EAlertType,
437
+ EFontType,
438
+ ETextSize,
439
+ Text,
440
+ } from "@sberbusiness/triplex-next";
441
+
442
+ const BORDER_RADIUSES = Object.values(EAlertProcessBorderRadius);
443
+
444
+ export const BorderRadiusExample = () => (
445
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px", maxWidth: "750px" }}>
446
+ {BORDER_RADIUSES.map((borderRadius) => (
447
+ <div key={borderRadius}>
448
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>
449
+ {borderRadius.toUpperCase()}
450
+ </div>
451
+ <AlertProcess type={EAlertType.INFO} borderRadius={borderRadius}>
452
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
453
+ This message provides context or highlights important information to note.
454
+ </Text>
455
+ </AlertProcess>
456
+ </div>
457
+ ))}
458
+ </div>
459
+ );
460
+ ```
461
+
462
+ ### WithCustomIcon
463
+
464
+ `stories/Alerts/examples/AlertProcess/WithCustomIconExample.tsx`
465
+
466
+ ```tsx
467
+ import React from "react";
468
+ import { DefaulticonStrokePrdIcon20 } from "@sberbusiness/icons-next";
469
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
470
+
471
+ export const WithCustomIconExample = () => (
472
+ <div style={{ maxWidth: "750px" }}>
473
+ <AlertProcess type={EAlertType.INFO} renderIcon={<DefaulticonStrokePrdIcon20 paletteIndex={0} />}>
474
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
475
+ This message provides context or highlights important information to note.
476
+ </Text>
477
+ </AlertProcess>
478
+ </div>
479
+ );
480
+ ```
481
+
482
+ ### Closable
483
+
484
+ `stories/Alerts/examples/AlertProcess/ClosableExample.tsx`
485
+
486
+ ```tsx
487
+ import React from "react";
488
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
489
+
490
+ export const ClosableExample = () => (
491
+ <div style={{ maxWidth: "750px" }}>
492
+ <AlertProcess type={EAlertType.INFO} closable onClose={() => undefined}>
493
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
494
+ This message provides context or highlights important information to note.
495
+ </Text>
496
+ </AlertProcess>
497
+ </div>
498
+ );
499
+ ```
500
+
501
+ ### WithButtonLink
502
+
503
+ `stories/Alerts/examples/AlertProcess/WithButtonLinkExample.tsx`
504
+
505
+ ```tsx
506
+ import React from "react";
507
+ import {
508
+ AlertProcess,
509
+ Button,
510
+ EAlertType,
511
+ EButtonTheme,
512
+ EComponentSize,
513
+ EFontType,
514
+ ETextSize,
515
+ Gap,
516
+ Text,
517
+ } from "@sberbusiness/triplex-next";
518
+
519
+ export const WithButtonLinkExample = () => (
520
+ <div style={{ maxWidth: "750px" }}>
521
+ <AlertProcess type={EAlertType.INFO}>
522
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
523
+ This message provides context or highlights important information to note.
524
+ </Text>
525
+ <Gap size={8} />
526
+ <Button theme={EButtonTheme.LINK} size={EComponentSize.SM}>
527
+ Button link text
528
+ </Button>
529
+ </AlertProcess>
530
+ </div>
531
+ );
532
+ ```
533
+
534
+ ### WithLink
535
+
536
+ `stories/Alerts/examples/AlertProcess/WithLinkExample.tsx`
537
+
538
+ ```tsx
539
+ import React from "react";
540
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Gap, Link, Text } from "@sberbusiness/triplex-next";
541
+
542
+ export const WithLinkExample = () => (
543
+ <div style={{ maxWidth: "750px" }}>
544
+ <AlertProcess type={EAlertType.INFO}>
545
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
546
+ This message provides context or highlights important information to note.
547
+ </Text>
548
+ <Gap size={8} />
549
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
550
+ <Link href="#" onClick={(event) => event.preventDefault()}>
551
+ Link text
552
+ </Link>
553
+ </Text>
554
+ </AlertProcess>
555
+ </div>
556
+ );
557
+ ```
558
+
559
+ ### WithSpoiler
560
+
561
+ `stories/Alerts/examples/AlertProcess/WithSpoilerExample.tsx`
562
+
563
+ ```tsx
564
+ import React, { useState } from "react";
565
+ import { AlertProcess, EAlertType, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
566
+
567
+ export const WithSpoilerExample = () => {
568
+ const [expanded, setExpanded] = useState(false);
569
+
570
+ return (
571
+ <div style={{ maxWidth: "750px" }}>
572
+ <AlertProcess type={EAlertType.INFO}>
573
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
574
+ По вопросам финмониторинга обращайтесь в рабочие дни с 03:00 до 21:00 МСК с мобильного телефона по
575
+ номеру 0321, доб. 6. Звонки по России бесплатные.
576
+ </Text>
577
+ <AlertProcess.Spoiler open={expanded} onOpen={setExpanded}>
578
+ <Text size={ETextSize.B3} type={EFontType.PRIMARY}>
579
+ У вас нет прав на подписание и отправку заявления в страховую компанию. Подписывать заявления, а
580
+ также заверять документы, имеет право генеральный директор на основании устава, владалец ИП на
581
+ основании доверенности.
582
+ </Text>
583
+ </AlertProcess.Spoiler>
584
+ </AlertProcess>
585
+ </div>
586
+ );
587
+ };
588
+ ```
589
+
@@ -223,3 +223,141 @@ renderCurrencyName = () => [
223
223
  | Дата | Изменение |
224
224
  |---|---|
225
225
  | 2026-04-18 | Создан документ |
226
+
227
+ ---
228
+
229
+ ## Примеры использования
230
+
231
+ ### Default
232
+
233
+ `stories/Amount/examples/DefaultExample.tsx`
234
+
235
+ ```tsx
236
+ import React from "react";
237
+ import { Amount, EFontType, ETextSize, Text } from "@sberbusiness/triplex-next";
238
+
239
+ export const DefaultExample = () => (
240
+ <Text size={ETextSize.B2} type={EFontType.PRIMARY}>
241
+ <Amount value="8967452.31" currency="RUB" currencyTitle="Российские рубли" fractionLength={2} />
242
+ </Text>
243
+ );
244
+ ```
245
+
246
+ ### Example
247
+
248
+ `stories/Amount/examples/ShowcaseExample.tsx`
249
+
250
+ ```tsx
251
+ import React from "react";
252
+ import { Amount, Col, EFontType, EFontWeightText, ETextSize, Row, Text } from "@sberbusiness/triplex-next";
253
+
254
+ const COMMON_PROPS = {
255
+ currency: "RUB",
256
+ currencyTitle: "Российские рубли",
257
+ };
258
+
259
+ const DATA = [
260
+ {
261
+ title: "Обычный",
262
+ element: (
263
+ <Text size={ETextSize.B2}>
264
+ <Amount value="8967452.3145" {...COMMON_PROPS} />
265
+ </Text>
266
+ ),
267
+ },
268
+ {
269
+ title: "Без копеек",
270
+ element: (
271
+ <Text size={ETextSize.B2}>
272
+ <Amount value="8967452.31" fractionLength={0} {...COMMON_PROPS} />
273
+ </Text>
274
+ ),
275
+ },
276
+ {
277
+ title: "С 4 знаками после разделителя",
278
+ element: (
279
+ <Text size={ETextSize.B2}>
280
+ <Amount value="8967452.31" fractionLength={4} {...COMMON_PROPS} />
281
+ </Text>
282
+ ),
283
+ },
284
+ {
285
+ title: "Положительный",
286
+ element: (
287
+ <Text size={ETextSize.B3}>
288
+ <Amount value="+8967452.31" {...COMMON_PROPS} />
289
+ </Text>
290
+ ),
291
+ },
292
+ {
293
+ title: "Положительный (цвет)",
294
+ element: (
295
+ <Text size={ETextSize.B3} type={EFontType.BRAND}>
296
+ <Amount value="+8967452.31" {...COMMON_PROPS} />
297
+ </Text>
298
+ ),
299
+ },
300
+ {
301
+ title: "Отрицательный",
302
+ element: (
303
+ <Text size={ETextSize.B3}>
304
+ <Amount value="-8967452.31" {...COMMON_PROPS} />
305
+ </Text>
306
+ ),
307
+ },
308
+ {
309
+ title: "Отрицательный (цвет)",
310
+ element: (
311
+ <Text size={ETextSize.B3} type={EFontType.ERROR}>
312
+ <Amount value="-8967452.31" {...COMMON_PROPS} />
313
+ </Text>
314
+ ),
315
+ },
316
+ {
317
+ title: "Без валюты",
318
+ element: (
319
+ <Text size={ETextSize.B2}>
320
+ <Amount value="8967452.31" />
321
+ </Text>
322
+ ),
323
+ },
324
+ {
325
+ title: "Большая сумма (50 миллиардов)",
326
+ element: (
327
+ <Text size={ETextSize.B2}>
328
+ <Amount value="50000000000.31" {...COMMON_PROPS} />
329
+ </Text>
330
+ ),
331
+ },
332
+ {
333
+ title: "Адаптивная большая сумма (50 миллиардов)",
334
+ element: (
335
+ <Text size={ETextSize.B2}>
336
+ <Amount value="50000000000.31" {...COMMON_PROPS} adaptive />
337
+ </Text>
338
+ ),
339
+ },
340
+ {
341
+ title: "Акцент",
342
+ element: (
343
+ <Text size={ETextSize.B3} weight={EFontWeightText.SEMIBOLD}>
344
+ <Amount value="8967452.31" {...COMMON_PROPS} />
345
+ </Text>
346
+ ),
347
+ },
348
+ ];
349
+
350
+ export const ShowcaseExample = () => (
351
+ <>
352
+ {DATA.map(({ title, element }) => (
353
+ <Row key={title}>
354
+ <Col size={4}>
355
+ <Text size={ETextSize.B2}>{title}</Text>
356
+ </Col>
357
+ <Col size={4}>{element}</Col>
358
+ </Row>
359
+ ))}
360
+ </>
361
+ );
362
+ ```
363
+
@@ -287,3 +287,177 @@ forwarded ref. `setRef` передаёт instance в оба. Не заменят
287
287
  | Дата | Изменение |
288
288
  |---|---|
289
289
  | 2026-04-18 | Создан документ |
290
+
291
+ ---
292
+
293
+ ## Примеры использования
294
+
295
+ ### Basic
296
+
297
+ `stories/TextFields/examples/AmountField/BasicExample.tsx`
298
+
299
+ ```tsx
300
+ import React, { useState } from "react";
301
+ import { AmountField, EComponentSize, EFormFieldStatus } from "@sberbusiness/triplex-next";
302
+
303
+ export const BasicExample: React.FC = () => {
304
+ const [value, setValue] = useState("");
305
+
306
+ return (
307
+ <div style={{ maxWidth: "300px" }}>
308
+ <AmountField
309
+ inputProps={{
310
+ value,
311
+ placeholder: "0,00",
312
+ onChange: setValue,
313
+ }}
314
+ status={EFormFieldStatus.DEFAULT}
315
+ size={EComponentSize.LG}
316
+ label="Label"
317
+ currency="RUB"
318
+ maxIntegerDigits={18}
319
+ fractionDigits={2}
320
+ />
321
+ </div>
322
+ );
323
+ };
324
+ ```
325
+
326
+ ### Sizes
327
+
328
+ `stories/TextFields/examples/AmountField/SizesExample.tsx`
329
+
330
+ ```tsx
331
+ import React, { useState } from "react";
332
+ import { AmountField, EComponentSize } from "@sberbusiness/triplex-next";
333
+
334
+ const AmountFieldItem: React.FC<{ size: EComponentSize }> = ({ size }) => {
335
+ const [value, setValue] = useState("");
336
+
337
+ return (
338
+ <AmountField
339
+ inputProps={{
340
+ value,
341
+ placeholder: "0,00",
342
+ onChange: setValue,
343
+ }}
344
+ size={size}
345
+ label="Label"
346
+ />
347
+ );
348
+ };
349
+
350
+ export const SizesExample: React.FC = () => {
351
+ const sizes = Object.values(EComponentSize);
352
+
353
+ return (
354
+ <div style={{ maxWidth: "300px", display: "flex", flexDirection: "column", gap: "16px" }}>
355
+ {sizes.map((size) => (
356
+ <AmountFieldItem key={size} size={size} />
357
+ ))}
358
+ </div>
359
+ );
360
+ };
361
+ ```
362
+
363
+ ### Statuses
364
+
365
+ `stories/TextFields/examples/AmountField/StatusesExample.tsx`
366
+
367
+ ```tsx
368
+ import React, { useState } from "react";
369
+ import { AmountField, EFormFieldStatus } from "@sberbusiness/triplex-next";
370
+
371
+ const AmountFieldItem: React.FC<{ status: EFormFieldStatus }> = ({ status }) => {
372
+ const [value, setValue] = useState("");
373
+
374
+ return (
375
+ <AmountField
376
+ inputProps={{
377
+ value,
378
+ placeholder: "0,00",
379
+ onChange: setValue,
380
+ }}
381
+ status={status}
382
+ label="Label"
383
+ />
384
+ );
385
+ };
386
+
387
+ export const StatusesExample: React.FC = () => {
388
+ const statuses = Object.values(EFormFieldStatus);
389
+
390
+ return (
391
+ <div style={{ maxWidth: "300px", display: "flex", flexDirection: "column", gap: "16px" }}>
392
+ {statuses.map((status) => (
393
+ <AmountFieldItem key={status} status={status} />
394
+ ))}
395
+ </div>
396
+ );
397
+ };
398
+ ```
399
+
400
+ ### WithClearButton
401
+
402
+ `stories/TextFields/examples/AmountField/WithClearButtonExample.tsx`
403
+
404
+ ```tsx
405
+ import React, { useState } from "react";
406
+ import { AmountField } from "@sberbusiness/triplex-next";
407
+
408
+ export const WithClearButtonExample: React.FC = () => {
409
+ const [value, setValue] = useState("8967452.31");
410
+
411
+ return (
412
+ <div style={{ maxWidth: "300px" }}>
413
+ <AmountField
414
+ inputProps={{
415
+ value,
416
+ placeholder: "0,00",
417
+ onChange: setValue,
418
+ }}
419
+ label="Label"
420
+ onClear={() => setValue("")}
421
+ />
422
+ </div>
423
+ );
424
+ };
425
+ ```
426
+
427
+ ### Example
428
+
429
+ `stories/TextFields/examples/AmountField/ExampleExample.tsx`
430
+
431
+ ```tsx
432
+ import React, { useState } from "react";
433
+ import { AmountField, HelpBox, ETooltipSize, Text, ETextSize, EFontType, Link } from "@sberbusiness/triplex-next";
434
+
435
+ export const ExampleExample: React.FC = () => {
436
+ const [value, setValue] = useState("");
437
+
438
+ return (
439
+ <div style={{ maxWidth: "300px" }}>
440
+ <AmountField
441
+ inputProps={{
442
+ value,
443
+ placeholder: "0,00",
444
+ onChange: setValue,
445
+ }}
446
+ label="Label"
447
+ currency="RUB"
448
+ postfix={<HelpBox tooltipSize={ETooltipSize.SM}>Helpful details appear here</HelpBox>}
449
+ description={
450
+ <Text tag="div" size={ETextSize.B4} type={EFontType.SECONDARY}>
451
+ (21) Description{" "}
452
+ <Link href="#" onClick={(event) => event.preventDefault()}>
453
+ Link text
454
+ </Link>
455
+ </Text>
456
+ }
457
+ onClear={() => setValue("")}
458
+ />
459
+ </div>
460
+ );
461
+ };
462
+ ```
463
+
@@ -207,3 +207,75 @@ Ref идёт на root div. Используется для анимаций, п
207
207
  | Дата | Изменение |
208
208
  |---|---|
209
209
  | 2026-04-18 | Создан документ |
210
+
211
+ ---
212
+
213
+ ## Примеры использования
214
+
215
+ ### Default
216
+
217
+ `stories/Avatar/examples/DefaultExample.tsx`
218
+
219
+ ```tsx
220
+ import React from "react";
221
+ import { Avatar, EAvatarSize } from "@sberbusiness/triplex-next";
222
+
223
+ export const DefaultExample = () => <Avatar size={EAvatarSize.XXL} />;
224
+ ```
225
+
226
+ ### Sizes
227
+
228
+ `stories/Avatar/examples/SizesExample.tsx`
229
+
230
+ ```tsx
231
+ import React from "react";
232
+ import { Avatar, EAvatarSize } from "@sberbusiness/triplex-next";
233
+
234
+ const SIZES = Object.values(EAvatarSize);
235
+
236
+ export const SizesExample = () => (
237
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
238
+ {SIZES.map((size) => (
239
+ <div key={size} style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
240
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{size.toUpperCase()}</div>
241
+ <Avatar size={size} />
242
+ </div>
243
+ ))}
244
+ </div>
245
+ );
246
+ ```
247
+
248
+ ### Example
249
+
250
+ `stories/Avatar/examples/ExampleUsage.tsx`
251
+
252
+ ```tsx
253
+ import React from "react";
254
+ import { DefaulticonStrokePrdIcon32 } from "@sberbusiness/icons-next";
255
+ import {
256
+ Avatar,
257
+ EAvatarSize,
258
+ EFontType,
259
+ EFontWeightTitle,
260
+ ETitleSize,
261
+ Title as TypographyTitle,
262
+ } from "@sberbusiness/triplex-next";
263
+
264
+ export const ExampleUsage = () => (
265
+ <div style={{ display: "flex", flexDirection: "column", gap: "16px" }}>
266
+ <Avatar
267
+ size={EAvatarSize.XXL}
268
+ style={{ backgroundImage: "url(assets/images/avatar.png)", backgroundSize: "contain" }}
269
+ />
270
+ <Avatar size={EAvatarSize.XXL} style={{ backgroundColor: "#339FF1" }}>
271
+ <TypographyTitle size={ETitleSize.H1} weight={EFontWeightTitle.REGULAR} type={EFontType.PRIMARY_INVERT}>
272
+ AA
273
+ </TypographyTitle>
274
+ </Avatar>
275
+ <Avatar size={EAvatarSize.XXL} style={{ backgroundColor: "#339FF1" }}>
276
+ <DefaulticonStrokePrdIcon32 paletteIndex={7} />
277
+ </Avatar>
278
+ </div>
279
+ );
280
+ ```
281
+