@sberbusiness/triplex-next-mcp-server 1.43.0-beta → 1.45.0-beta

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 (85) hide show
  1. package/README.md +7 -6
  2. package/bundle/components/AlertContext.md +11 -8
  3. package/bundle/components/AlertProcess.md +16 -12
  4. package/bundle/components/Badge.md +6 -3
  5. package/bundle/components/BodyPage.md +72 -4
  6. package/bundle/components/Button.md +46 -43
  7. package/bundle/components/ButtonDropdownExtended.md +3 -2
  8. package/bundle/components/ButtonIcon.md +7 -4
  9. package/bundle/components/Calendar.md +62 -59
  10. package/bundle/components/Caption.md +26 -23
  11. package/bundle/components/Checkbox.md +32 -29
  12. package/bundle/components/CheckboxTreeExtended.md +9 -5
  13. package/bundle/components/Chip.md +44 -41
  14. package/bundle/components/CodeText.md +26 -23
  15. package/bundle/components/Col.md +1 -2
  16. package/bundle/components/CollapsibleTree.md +8 -5
  17. package/bundle/components/CollapsibleTreeExtended.md +6 -1
  18. package/bundle/components/DatePickerExtended.md +409 -262
  19. package/bundle/components/Dropdown.md +33 -28
  20. package/bundle/components/EmptyView.md +12 -5
  21. package/bundle/components/ExpandAnimation.md +263 -218
  22. package/bundle/components/Footer.md +235 -278
  23. package/bundle/components/FooterPage.md +6 -2
  24. package/bundle/components/FormField.md +44 -41
  25. package/bundle/components/FormGroup.md +192 -52
  26. package/bundle/components/Header.md +491 -211
  27. package/bundle/components/HeaderPage.md +6 -2
  28. package/bundle/components/ImageGallery.md +33 -34
  29. package/bundle/components/ImageGalleryExtended.md +33 -34
  30. package/bundle/components/Island.md +52 -14
  31. package/bundle/components/LightBox.md +25 -18
  32. package/bundle/components/Link.md +211 -96
  33. package/bundle/components/ListActionItem.md +7 -4
  34. package/bundle/components/ListItem.md +11 -8
  35. package/bundle/components/ListItemControlsButton.md +16 -13
  36. package/bundle/components/ListItemControlsButtonDropdown.md +9 -6
  37. package/bundle/components/ListItemSelectable.md +7 -4
  38. package/bundle/components/ListMasterFooter.md +8 -5
  39. package/bundle/components/ListMasterHeader.md +8 -5
  40. package/bundle/components/ListSortableItem.md +11 -8
  41. package/bundle/components/ListTableItem.md +7 -4
  42. package/bundle/components/LoaderMiddle.md +7 -4
  43. package/bundle/components/LoaderScreen.md +11 -8
  44. package/bundle/components/LoaderSmall.md +7 -4
  45. package/bundle/components/Marker.md +184 -69
  46. package/bundle/components/MarkerStatus.md +206 -88
  47. package/bundle/components/MaskedField.md +2 -4
  48. package/bundle/components/MasterTable.md +602 -0
  49. package/bundle/components/ModalWindow.md +7 -4
  50. package/bundle/components/MultiselectField.md +2183 -132
  51. package/bundle/components/Notification.md +12 -9
  52. package/bundle/components/Overlay.md +33 -5
  53. package/bundle/components/Page.md +2 -2
  54. package/bundle/components/Pagination.md +27 -21
  55. package/bundle/components/Row.md +1 -1
  56. package/bundle/components/SelectExtendedField.md +3 -3
  57. package/bundle/components/SelectField.md +466 -148
  58. package/bundle/components/SliderExtended.md +39 -36
  59. package/bundle/components/SmallInput.md +194 -51
  60. package/bundle/components/Suggest.md +535 -99
  61. package/bundle/components/SwipeableArea.md +428 -79
  62. package/bundle/components/TableBasic.md +2302 -0
  63. package/bundle/components/TabsExtended.md +24 -21
  64. package/bundle/components/Tag.md +263 -78
  65. package/bundle/components/Text.md +28 -25
  66. package/bundle/components/TextField.md +3 -4
  67. package/bundle/components/ThemeProvider.md +50 -1
  68. package/bundle/components/Title.md +26 -23
  69. package/bundle/components/Tooltip.md +24 -21
  70. package/bundle/components/TopOverlay.md +368 -89
  71. package/bundle/components/TreeView.md +343 -166
  72. package/bundle/components/TreeViewNode.md +436 -0
  73. package/bundle/guides/codestyle.md +3 -0
  74. package/bundle/guides/commits.md +106 -26
  75. package/bundle/guides/context.md +84 -12
  76. package/bundle/guides/guidelines.md +321 -0
  77. package/bundle/guides/template.md +22 -12
  78. package/bundle/manifest.json +54 -20
  79. package/bundle/release-notes/1.44.0.mdx +113 -0
  80. package/bundle/release-notes/1.45.0.mdx +124 -0
  81. package/bundle/release-notes/1.46.0.mdx +7 -0
  82. package/bundle/tokens.json +6362 -0
  83. package/dist/index.js +177 -28
  84. package/dist/index.js.map +1 -1
  85. package/package.json +1 -1
@@ -2,7 +2,8 @@
2
2
  component: HeaderPage
3
3
  category: Page
4
4
  related: [Page, BodyPage, FooterPage, Header, Island, LightBox]
5
- tokens: [--triplex-next-HeaderPage-StickyShadow]
5
+ tokens:
6
+ - HeaderPage.StickyShadow
6
7
  stories: stories/Page/HeaderPage/HeaderPage.stories.tsx
7
8
  version: "1.0"
8
9
  ---
@@ -52,9 +53,12 @@ version: "1.0"
52
53
 
53
54
  ## Дизайн-токены
54
55
 
56
+ Переопределяются через `ThemeProvider` (prop `tokens`) — см. `ThemeProvider-ai.md` →
57
+ «Как переопределять токены». Значения по умолчанию — `src/components/DesignTokens/components/HeaderPage.ts`.
58
+
55
59
  | Токен | Назначение |
56
60
  |---|---|
57
- | `--triplex-next-HeaderPage-StickyShadow` | Тень прилипшего заголовка (когда `sticky` и заголовок коснулся верхней границы, `data-stuck="true"`). |
61
+ | `HeaderPage.StickyShadow` | Тень прилипшего заголовка (когда `sticky` и заголовок коснулся верхней границы, `data-stuck="true"`). |
58
62
 
59
63
  Внешний вид карточки наследуется от `Island` (`EIslandType.TYPE_1`). Радиус верхних углов при
60
64
  прилипании плавно обнуляется через CSS-переменную `--r-top` (управляется хуком
@@ -2,21 +2,18 @@
2
2
  component: ImageGallery
3
3
  category: ImageGallery
4
4
  related: [ImageGalleryExtended, MobileView, LightBox]
5
- tokens: [
6
- "--triplex-next-ImageGallery-Accent_Color",
7
- "--triplex-next-ImageGallery-Arrow_Background_Default",
8
- "--triplex-next-ImageGallery-Arrow_Background_Hover",
9
- "--triplex-next-ImageGallery-Arrow_Background_Active",
10
- "--triplex-next-ImageGallery-Arrow_Background_Disabled",
11
- "--triplex-next-ImageGallery-Arrow_BorderColor_Default",
12
- "--triplex-next-ImageGallery-Arrow_BorderColor_Hover",
13
- "--triplex-next-ImageGallery-Arrow_BorderColor_Active",
14
- "--triplex-next-ImageGallery-Arrow_BorderColor_Disabled",
15
- "--triplex-next-ImageGallery-Dot_Background_Default",
16
- "--triplex-next-ImageGallery-Dot_Background_Hover",
17
- "--triplex-next-ImageGallery-Dot_Background_Active",
18
- "--triplex-next-ImageGallery-Thumb_Mask_Background"
19
- ]
5
+ tokens:
6
+ - ImageGallery.Accent_Color
7
+ - ImageGallery.Arrow_Background_Default
8
+ - ImageGallery.Arrow_Background_Hover
9
+ - ImageGallery.Arrow_Background_Active
10
+ - ImageGallery.Arrow_BorderColor_Default
11
+ - ImageGallery.Arrow_BorderColor_Hover
12
+ - ImageGallery.Arrow_BorderColor_Active
13
+ - ImageGallery.Dot_Background_Default
14
+ - ImageGallery.Dot_Background_Hover
15
+ - ImageGallery.Dot_Background_Active
16
+ - ImageGallery.Thumb_Mask_Background
20
17
  stories: stories/ImageGallery/ImageGallery.stories.tsx
21
18
  version: "1.0"
22
19
  ---
@@ -88,28 +85,29 @@ controlled-only контейнера `ImageGalleryExtended`. Изображен
88
85
 
89
86
  ## Дизайн-токены
90
87
 
88
+ Переопределяются через `ThemeProvider` (prop `tokens`) — см. `ThemeProvider-ai.md` →
89
+ «Как переопределять токены». Значения по умолчанию — `src/components/DesignTokens/components/ImageGallery.ts`.
90
+
91
91
  Собственных стилей и `.less`-файлов у `ImageGallery` нет — вся отрисовка
92
92
  делегируется частям `ImageGalleryExtended`. Перечисленные токены принадлежат
93
- семейству и используются через эти части (общий префикс
94
- `--triplex-next-ImageGallery-` намеренно делится обоими семействами).
93
+ семейству и используются через эти части — группа `ImageGallery` намеренно
94
+ делится обоими семействами.
95
95
 
96
- ```
97
- --triplex-next-ImageGallery-Accent_Color
98
-
99
- --triplex-next-ImageGallery-Arrow_Background_Default
100
- --triplex-next-ImageGallery-Arrow_Background_Hover
101
- --triplex-next-ImageGallery-Arrow_Background_Active
102
- --triplex-next-ImageGallery-Arrow_Background_Disabled
103
- --triplex-next-ImageGallery-Arrow_BorderColor_Default
104
- --triplex-next-ImageGallery-Arrow_BorderColor_Hover
105
- --triplex-next-ImageGallery-Arrow_BorderColor_Active
106
- --triplex-next-ImageGallery-Arrow_BorderColor_Disabled
107
-
108
- --triplex-next-ImageGallery-Dot_Background_Default
109
- --triplex-next-ImageGallery-Dot_Background_Hover
110
- --triplex-next-ImageGallery-Dot_Background_Active
111
-
112
- --triplex-next-ImageGallery-Thumb_Mask_Background
96
+ ```text
97
+ ImageGallery.Accent_Color
98
+
99
+ ImageGallery.Arrow_Background_Default
100
+ ImageGallery.Arrow_Background_Hover
101
+ ImageGallery.Arrow_Background_Active
102
+ ImageGallery.Arrow_BorderColor_Default
103
+ ImageGallery.Arrow_BorderColor_Hover
104
+ ImageGallery.Arrow_BorderColor_Active
105
+
106
+ ImageGallery.Dot_Background_Default
107
+ ImageGallery.Dot_Background_Hover
108
+ ImageGallery.Dot_Background_Active
109
+
110
+ ImageGallery.Thumb_Mask_Background
113
111
  ```
114
112
 
115
113
  Runtime CSS-переменная высоты крупной картинки
@@ -195,6 +193,7 @@ Runtime CSS-переменная высоты крупной картинки
195
193
  | Дата | Изменение |
196
194
  |---|---|
197
195
  | 2026-05-28 | Создан документ |
196
+ | 2026-08-31 | Удалены неиспользуемые токены `Arrow_Background_Disabled` и `Arrow_BorderColor_Disabled`: неактивная стрелка скрывается (`display: none`), красить нечем |
198
197
 
199
198
  ---
200
199
 
@@ -2,21 +2,18 @@
2
2
  component: ImageGalleryExtended
3
3
  category: ImageGalleryExtended
4
4
  related: [ImageGallery, MobileView, LightBox]
5
- tokens: [
6
- "--triplex-next-ImageGallery-Accent_Color",
7
- "--triplex-next-ImageGallery-Arrow_Background_Default",
8
- "--triplex-next-ImageGallery-Arrow_Background_Hover",
9
- "--triplex-next-ImageGallery-Arrow_Background_Active",
10
- "--triplex-next-ImageGallery-Arrow_Background_Disabled",
11
- "--triplex-next-ImageGallery-Arrow_BorderColor_Default",
12
- "--triplex-next-ImageGallery-Arrow_BorderColor_Hover",
13
- "--triplex-next-ImageGallery-Arrow_BorderColor_Active",
14
- "--triplex-next-ImageGallery-Arrow_BorderColor_Disabled",
15
- "--triplex-next-ImageGallery-Dot_Background_Default",
16
- "--triplex-next-ImageGallery-Dot_Background_Hover",
17
- "--triplex-next-ImageGallery-Dot_Background_Active",
18
- "--triplex-next-ImageGallery-Thumb_Mask_Background"
19
- ]
5
+ tokens:
6
+ - ImageGallery.Accent_Color
7
+ - ImageGallery.Arrow_Background_Default
8
+ - ImageGallery.Arrow_Background_Hover
9
+ - ImageGallery.Arrow_Background_Active
10
+ - ImageGallery.Arrow_BorderColor_Default
11
+ - ImageGallery.Arrow_BorderColor_Hover
12
+ - ImageGallery.Arrow_BorderColor_Active
13
+ - ImageGallery.Dot_Background_Default
14
+ - ImageGallery.Dot_Background_Hover
15
+ - ImageGallery.Dot_Background_Active
16
+ - ImageGallery.Thumb_Mask_Background
20
17
  stories: stories/ImageGalleryExtended/ImageGalleryExtended.stories.tsx
21
18
  version: "1.0"
22
19
  ---
@@ -123,26 +120,27 @@ child `.Main`, чтобы стрелки позиционировались по
123
120
 
124
121
  ## Дизайн-токены
125
122
 
126
- Токены используют общий с `ImageGallery` префикс `--triplex-next-ImageGallery-`
123
+ Переопределяются через `ThemeProvider` (prop `tokens`) — см. `ThemeProvider-ai.md` →
124
+ «Как переопределять токены». Значения по умолчанию — `src/components/DesignTokens/components/ImageGallery.ts`.
125
+
126
+ Токены живут в общей с `ImageGallery` группе `ImageGallery`
127
127
  (семейства делят визуальный язык).
128
128
 
129
- ```
130
- --triplex-next-ImageGallery-Accent_Color
131
-
132
- --triplex-next-ImageGallery-Arrow_Background_Default
133
- --triplex-next-ImageGallery-Arrow_Background_Hover
134
- --triplex-next-ImageGallery-Arrow_Background_Active
135
- --triplex-next-ImageGallery-Arrow_Background_Disabled
136
- --triplex-next-ImageGallery-Arrow_BorderColor_Default
137
- --triplex-next-ImageGallery-Arrow_BorderColor_Hover
138
- --triplex-next-ImageGallery-Arrow_BorderColor_Active
139
- --triplex-next-ImageGallery-Arrow_BorderColor_Disabled
140
-
141
- --triplex-next-ImageGallery-Dot_Background_Default
142
- --triplex-next-ImageGallery-Dot_Background_Hover
143
- --triplex-next-ImageGallery-Dot_Background_Active
144
-
145
- --triplex-next-ImageGallery-Thumb_Mask_Background
129
+ ```text
130
+ ImageGallery.Accent_Color
131
+
132
+ ImageGallery.Arrow_Background_Default
133
+ ImageGallery.Arrow_Background_Hover
134
+ ImageGallery.Arrow_Background_Active
135
+ ImageGallery.Arrow_BorderColor_Default
136
+ ImageGallery.Arrow_BorderColor_Hover
137
+ ImageGallery.Arrow_BorderColor_Active
138
+
139
+ ImageGallery.Dot_Background_Default
140
+ ImageGallery.Dot_Background_Hover
141
+ ImageGallery.Dot_Background_Active
142
+
143
+ ImageGallery.Thumb_Mask_Background
146
144
  ```
147
145
 
148
146
  Runtime CSS-переменные (задаются компонентом через `style`, **не** дизайн-токены,
@@ -172,7 +170,7 @@ Runtime CSS-переменные (задаются компонентом чер
172
170
  change при изменении.
173
171
  - **Render-функции** `.Nav` и `.Thumbnails` — контракт; форма объекта состояния
174
172
  фиксирована.
175
- - Токены используют префикс `ImageGallery-`, а не `ImageGalleryExtended-` —
173
+ - Токены лежат в группе `ImageGallery`, а не `ImageGalleryExtended` —
176
174
  переименование сломает темизацию у потребителей обоих семейств.
177
175
 
178
176
  ---
@@ -248,6 +246,7 @@ API (экспортируются из barrel ради композиции, н
248
246
  | Дата | Изменение |
249
247
  |---|---|
250
248
  | 2026-05-28 | Создан документ |
249
+ | 2026-08-31 | Удалены неиспользуемые токены `Arrow_Background_Disabled` и `Arrow_BorderColor_Disabled`: неактивная стрелка скрывается (`display: none`), красить нечем |
251
250
 
252
251
  ---
253
252
 
@@ -3,12 +3,12 @@ component: Island
3
3
  category: Layout
4
4
  related: [IslandAccordion, IslandWidget, LoaderScreen, ModalWindow]
5
5
  tokens:
6
- - --triplex-next-Island-Type1_Background
7
- - --triplex-next-Island-Type1_Shadow
8
- - --triplex-next-Island-Type2_Background
9
- - --triplex-next-Island-Type2_Shadow
10
- - --triplex-next-Island-Type3_Background
11
- - --triplex-next-Island-Type3_Shadow
6
+ - Island.Type1_Background
7
+ - Island.Type1_Shadow
8
+ - Island.Type2_Background
9
+ - Island.Type2_Shadow
10
+ - Island.Type3_Background
11
+ - Island.Type3_Shadow
12
12
  stories: stories/Island/Island.stories.tsx
13
13
  version: "1.0"
14
14
  ---
@@ -49,6 +49,7 @@ version: "1.0"
49
49
  | `size` | `EComponentSize` | `EComponentSize.MD` | Скругление, внутренние отступы карточки и отступы между Header / Body / Footer |
50
50
  | `loading` | `boolean` | `false` | Показывает `LoaderScreen` поверх контента карточки |
51
51
  | `loaderScreenProps` | `ILoaderScreenMiddleProps` | `undefined` | Props лоадера: `description`, `controls`, `className` и остальные атрибуты `<div>`. `type` задаёт Island (`middle`) |
52
+ | `withoutPaddings` | `boolean` | `false` | Убирает внутренние отступы карточки. Скругление и отступы между Header / Body / Footer от `size` сохраняются |
52
53
 
53
54
  Компонент расширяет `React.HTMLAttributes<HTMLDivElement>` — все стандартные атрибуты `<div>`
54
55
  (`className`, `style`, `role`, `aria-*`, `data-*`, обработчики событий) попадают на корневой элемент.
@@ -125,13 +126,16 @@ version: "1.0"
125
126
 
126
127
  ## Дизайн-токены
127
128
 
128
- ```
129
- --triplex-next-Island-Type1_Background
130
- --triplex-next-Island-Type1_Shadow
131
- --triplex-next-Island-Type2_Background
132
- --triplex-next-Island-Type2_Shadow
133
- --triplex-next-Island-Type3_Background
134
- --triplex-next-Island-Type3_Shadow
129
+ Переопределяются через `ThemeProvider` (prop `tokens`) — см. `ThemeProvider-ai.md` →
130
+ «Как переопределять токены». Значения по умолчанию — `src/components/DesignTokens/components/Island.ts`.
131
+
132
+ ```text
133
+ Island.Type1_Background
134
+ Island.Type1_Shadow
135
+ Island.Type2_Background
136
+ Island.Type2_Shadow
137
+ Island.Type3_Background
138
+ Island.Type3_Shadow
135
139
  ```
136
140
 
137
141
  Значения задаются в `src/components/DesignTokens/components/Island.ts`. `Type1_Shadow` и
@@ -238,11 +242,12 @@ Island — неинтерактивный контейнер: не выстав
238
242
 
239
243
  | Story | Example file | Что демонстрирует |
240
244
  |---|---|---|
241
- | `Playground` | — | Интерактивный контроль `type`, `size`, `loading` и состава (Header / Body / Footer) |
245
+ | `Playground` | — | Интерактивный контроль `type`, `size`, `loading`, `withoutPaddings` и состава (Header / Body / Footer) |
242
246
  | `Default` | `DefaultExample.tsx` | Минимальная карточка: Header + Body + Footer |
243
247
  | `Types` | `TypesExample.tsx` | Все значения `EIslandType` рядом |
244
248
  | `Sizes` | `SizesExample.tsx` | Размеры SM / MD / LG: скругление, паддинги, отступы между частями |
245
249
  | `Loading` | `Loading.tsx` | `loading`: `LoaderScreen` поверх контента карточки |
250
+ | `WithoutPaddings` | `WithoutPaddings.tsx` | `withoutPaddings` во всех размерах: внутренние отступы убраны, скругление и отступы между Header / Body / Footer сохраняются |
246
251
 
247
252
  Файлы примеров с постфиксом `Example` — локальный legacy-паттерн папки; новые примеры называются
248
253
  по имени story (`Loading.tsx`).
@@ -253,6 +258,7 @@ Island — неинтерактивный контейнер: не выстав
253
258
 
254
259
  | Дата | Изменение |
255
260
  |---|---|
261
+ | 2026-08-24 | Добавлено свойство `withoutPaddings` — отключает внутренние отступы карточки. Добавлена story `WithoutPaddings`. |
256
262
  | 2026-08-11 | Prop состояния загрузки переименован `isLoading` → `loading` — по преобладающей в библиотеке конвенции boolean-props без префикса `is` (`loading` у `Button`, `List`, `Dropdown`, `Suggest`, `Table`). Prop ещё не выпускался, поэтому breaking change нет; `Omit` в `IModalWindowBodyProps` обновлён на `"loading"`. Поведение не изменилось. |
257
263
  | 2026-08-06 | `related` приведён к правилу `docs/ai/CONTEXT.md` → «Как заполнять `related` в AI.md»: убраны потребители (`BodyPage`, `HeaderPage`, `FooterPage`, `Confirm`), `ModalWindowBody` заменён родителем `ModalWindow`, добавлен `LoaderScreen`. Раздел «Связанные компоненты» разбит по типам связи. Добавлено состояние загрузки: props `isLoading` и `loaderScreenProps` — при `isLoading` поверх контента карточки рендерится `LoaderScreen` типа `middle`. Подложка наследует скругление карточки, `z-index` понижен до локального. `ModalWindowBody` эти props не наследует (`Omit`) — его тело скроллируется, лоадер там задаётся на `ModalWindowContent`. Добавлены story `Loading` и unit-тесты. Остальной публичный API не изменён. |
258
264
  | 2026-08-04 | Создан документ. AI-рефакторинг: JSDoc на props, значениях `EIslandType` и субкомпонентах, `displayName` у `IslandHeader` / `IslandBody` / `IslandFooter`, unit-тесты на все типы и размеры, части острова и `mapTypeToClassName`. Исправлено: `className` в `IslandHeader` и `IslandFooter` больше не затирает базовый класс компонента; побочный отступ в `IslandAccordion` погашен в стилях аккордеона, вид библиотечных компонентов не изменился. Публичный API не изменён. |
@@ -375,3 +381,35 @@ export const Loading = () => (
375
381
  );
376
382
  ```
377
383
 
384
+ ### WithoutPaddings
385
+
386
+ `stories/Island/examples/WithoutPaddings.tsx`
387
+
388
+ ```tsx
389
+ import React from "react";
390
+ import { Island, EIslandType, EComponentSize } from "@sberbusiness/triplex-next";
391
+
392
+ const SIZES = Object.values(EComponentSize);
393
+
394
+ export const WithoutPaddings = () => (
395
+ <div
396
+ style={{
397
+ display: "grid",
398
+ gap: 16,
399
+ gridTemplateColumns: "repeat(auto-fit, minmax(260px, 1fr))",
400
+ }}
401
+ >
402
+ {SIZES.map((size) => (
403
+ <div key={size}>
404
+ <div style={{ marginBottom: "8px", fontSize: "16px", fontWeight: "700" }}>{size.toUpperCase()}</div>
405
+ <Island type={EIslandType.TYPE_1} size={size} withoutPaddings>
406
+ <Island.Header>Header content</Island.Header>
407
+ <Island.Body>Body content</Island.Body>
408
+ <Island.Footer>Footer content</Island.Footer>
409
+ </Island>
410
+ </div>
411
+ ))}
412
+ </div>
413
+ );
414
+ ```
415
+
@@ -3,10 +3,9 @@ component: LightBox
3
3
  category: LightBox
4
4
  related: [Page, TopOverlay, Portal, FocusTrapExtended, LoaderScreen, Button, ModalWindow]
5
5
  tokens:
6
- - --triplex-next-LightBox-Backdrop_Background
7
- - --triplex-next-LightBox-Content_Background
8
- - --triplex-next-LightBox-SideOverlay_Background
9
- - --triplex-next-scroll-width
6
+ - LightBox.Backdrop_Background
7
+ - LightBox.Content_Background
8
+ - LightBox.SideOverlay_Background
10
9
  stories: stories/LightBox/LightBox.stories.tsx
11
10
  version: "1.0"
12
11
  ---
@@ -56,7 +55,7 @@ version: "1.0"
56
55
  | Prop | Тип | По умолчанию | Описание |
57
56
  |---|---|---|---|
58
57
  | `size` | `ELightBoxSize` | `MD` | Максимальная ширина контента |
59
- | `isLoading` | `boolean` | — | Состояние загрузки: деактивирует focus trap; `LightBox.Content` показывает `LoaderScreen` |
58
+ | `isLoading` | `boolean` | — | Состояние загрузки: деактивирует focus trap, добавляет модификатор на корневой элемент (кнопка закрытия поднимается над лоадером контента); `LightBox.Content` показывает `LoaderScreen` |
60
59
  | `isSideOverlayOpened` | `boolean` | — | Флаг открытой боковой панели — добавляет модификатор на корневой элемент (блокирует скролл контента) |
61
60
  | `isTopOverlayOpened` | `boolean` | — | Флаг открытой верхней панели — аналогичный модификатор |
62
61
  | `focusTrapProps` | `IFocusTrapExtendedProps` | — | Переопределение настроек `FocusTrapExtended` |
@@ -88,16 +87,19 @@ version: "1.0"
88
87
 
89
88
  ## Дизайн-токены
90
89
 
91
- ```css
92
- --triplex-next-LightBox-Backdrop_Background
93
- --triplex-next-LightBox-Content_Background
94
- --triplex-next-LightBox-SideOverlay_Background
95
- --triplex-next-scroll-width
90
+ Переопределяются через `ThemeProvider` (prop `tokens`) — см. `ThemeProvider-ai.md` →
91
+ «Как переопределять токены». Значения по умолчанию — `src/components/DesignTokens/components/LightBox.ts`.
92
+
93
+ ```text
94
+ LightBox.Backdrop_Background
95
+ LightBox.Content_Background
96
+ LightBox.SideOverlay_Background
96
97
  ```
97
98
 
98
- `--triplex-next-scroll-width` — глобальная переменная ширины скроллбара, проставляется утилитой
99
- `addClassNameWithScrollbarWidth` при открытии лайтбокса. Ширины размеров (`664/864/1064/1264`)
100
- заданы LESS-константами `@lightBox-content-max-width-*`.
99
+ Ширина скроллбара — не токен: `addClassNameWithScrollbarWidth` вешает на `<html>` класс
100
+ `scroll-{0|15|16|17}`, а `styles/LightBoxScroll.module.less` объявляет по нему локальную
101
+ css-переменную `--lightBox-scroll-width`, которую вычитают из ширины оверлеев. Ширины размеров
102
+ (`664/864/1064/1264`) заданы LESS-константами `@lightBox-content-max-width-*`.
101
103
 
102
104
  ---
103
105
 
@@ -128,9 +130,13 @@ version: "1.0"
128
130
  mount-ноды (`LightBoxMountNodeViewManager`, `LB-*`).
129
131
  - **Локальные z-index внутри лайтбокса** (стековый контекст создаёт `.lightBox`): контролы и
130
132
  sticky-шапка/футер `Page` — 100/101, лоадеры `LightBox.Content` и `LightBox.SideOverlay` — 201,
131
- `TopOverlay` — 500. `LoaderScreen` приходит с глобальным `@z-index-loader-screen` (10100), поэтому
132
- обе обёртки лоадера обязаны переопределять его локальным значением — иначе лоадер перекрывает
133
- `TopOverlay`.
133
+ `TopOverlay` — 500. `LoaderScreen` приходит с глобальным `@z-index-loader-screen` (10100),
134
+ поэтому обе обёртки лоадера обязаны переопределять его локальным значением — иначе лоадер
135
+ перекрывает `TopOverlay`.
136
+ - В состоянии загрузки (`isLoading` и без открытых оверлеев) контейнер контролов поднимается
137
+ до 202 — иначе лоадер контента перекрывает кнопку закрытия. Поднимать нужно именно контейнер:
138
+ `.lightBoxControls` — flex-элемент с собственным z-index, то есть создаёт стековый контекст,
139
+ из которого z-index на самой кнопке уже не выберется.
134
140
  - Баррел `index.ts` реэкспортирует `LightBox`, `enums`, `LightBoxSideOverlay` — сохранять.
135
141
  - React 17 совместимость (синхронизация в release-0): React 18-only API не использовать.
136
142
 
@@ -145,8 +151,8 @@ version: "1.0"
145
151
  заголовок с `tabIndex={-1}`).
146
152
  - **Клавиатура**: Esc — клик по `Controls.Close`; ArrowLeft / ArrowRight — клик по
147
153
  `Controls.Prev` / `Controls.Next` при включённых `clickByArrowLeft` / `clickByArrowRight`.
148
- При открытом `SideOverlay` клавиатурные триггеры контролов лайтбокса не активны
149
- (рендерится вариант кнопок без триггера).
154
+ При открытом `SideOverlay` или `TopOverlay` клавиатурные триггеры контролов лайтбокса
155
+ не активны (рендерится вариант кнопок без триггера). В состоянии загрузки Esc работает.
150
156
  - Кнопки `Controls.Close` имеют `data-exclude-modal-focus` — исключаются из начального фокуса
151
157
  (у `Prev`/`Next` атрибута нет).
152
158
  - `title` у `Controls.Close` по умолчанию «Закрыть» — для других языков потребитель передаёт
@@ -200,6 +206,7 @@ version: "1.0"
200
206
  | 2026-07-22 | Добавлен `export` к props-интерфейсам `ILightBoxControlsProps`, `ILightBoxCloseProps`, `ILightBoxPrevProps`, `ILightBoxNextProps`, `ILightBoxSideOverlayLoaderProps` (аддитивно, для консистентности с остальными интерфейсами компонента) |
201
207
  | 2026-07-22 | Багфиксы по ревью PR #474: клавиатурные триггеры контролов целятся в видимую кнопку (стрелки не работали на desktop, Esc — на mobile); таймер-хак блокировки скролла заменён счётчиком смонтированных лайтбоксов; `LightBoxViewManager` снимает классы mount-ноды при размонтировании последнего менеджера |
202
208
  | 2026-08-17 | Исправлено: `LightBox.TopOverlay` перекрывался лоадером `LightBox.Content`. У `.loadingContentOverlay` теперь локальный z-index (201) — выше sticky-шапки и футера `Page`, но ниже `TopOverlay` (500); раньше `LoaderScreen` шёл с глобальным `@z-index-loader-screen` (10100) |
209
+ | 2026-08-25 | Исправлено: в состоянии загрузки кнопка закрытия была недоступна для клика — её перекрывал лоадер `LightBox.Content`. Восстановлен модификатор `isLoading` на корневом элементе (терялся при переходе на CSS Modules): контролы поднимаются над лоадером, кнопки вперёд/назад скрываются. Esc в состоянии загрузки сохранён рабочим |
203
210
 
204
211
  ---
205
212