@cloud-ru/uikit-product-site-section 0.27.1 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +24 -18
  3. package/dist/cjs/components/SectionBasic/SectionBasic.js +2 -1
  4. package/dist/cjs/components/SectionBasic/styles.module.css +20 -8
  5. package/dist/cjs/components/SectionBasic/utils.d.ts +2 -0
  6. package/dist/cjs/components/SectionBasic/utils.js +6 -0
  7. package/dist/cjs/constants.d.ts +1 -0
  8. package/dist/cjs/constants.js +1 -0
  9. package/dist/cjs/helperComponents/SectionTitle/SectionTitle.d.ts +2 -1
  10. package/dist/cjs/helperComponents/SectionTitle/SectionTitle.js +2 -2
  11. package/dist/cjs/helperComponents/SectionTitle/styles.module.css +12 -5
  12. package/dist/esm/components/SectionBasic/SectionBasic.js +2 -1
  13. package/dist/esm/components/SectionBasic/styles.module.css +20 -8
  14. package/dist/esm/components/SectionBasic/utils.d.ts +2 -0
  15. package/dist/esm/components/SectionBasic/utils.js +2 -0
  16. package/dist/esm/constants.d.ts +1 -0
  17. package/dist/esm/constants.js +1 -0
  18. package/dist/esm/helperComponents/SectionTitle/SectionTitle.d.ts +2 -1
  19. package/dist/esm/helperComponents/SectionTitle/SectionTitle.js +2 -2
  20. package/dist/esm/helperComponents/SectionTitle/styles.module.css +12 -5
  21. package/package.json +3 -3
  22. package/src/components/SectionBasic/SectionBasic.tsx +2 -0
  23. package/src/components/SectionBasic/styles.module.scss +24 -11
  24. package/src/components/SectionBasic/utils.ts +5 -0
  25. package/src/constants.ts +1 -0
  26. package/src/helperComponents/SectionTitle/SectionTitle.tsx +5 -3
  27. package/src/helperComponents/SectionTitle/styles.module.scss +16 -5
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 0.28.0 (2026-01-12)
7
+
8
+
9
+ ### Features
10
+
11
+ * **SITE-10270:** add graphite background for section basic ([be969ea](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/be969ea8936e9b8745a75ca72ecc27b7a0af3b4e))
12
+
13
+
14
+
15
+
16
+
17
+ ## 0.27.2 (2025-12-24)
18
+
19
+ ### Only dependencies have been changed
20
+ * [@cloud-ru/uikit-product-site-cards@0.14.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/site-cards/CHANGELOG.md)
21
+
22
+
23
+
24
+
25
+
6
26
  ## 0.27.1 (2025-12-24)
7
27
 
8
28
  ### Only dependencies have been changed
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  | expandedDefault | `string \| string[]` | - | |
18
18
  | onExpandedChange | `((value?: string) => void) \| ((value?: string[]) => void)` | - | |
19
19
  | id | `string` | - | id секции |
20
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
20
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
21
21
  | outline | `boolean` | - | Внешний бордер для блоков |
22
22
  | className | `string` | - | CSS-класс |
23
23
  ## SectionBasic
@@ -36,7 +36,7 @@
36
36
  | tabBarItems | `TabBarItem[]` | - | Массив табов |
37
37
  | filterItems | `FieldSelectProps[]` | - | Массив фильтров |
38
38
  | pagination | `PaginationProps` | - | Настройки пагинации |
39
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | neutral-background1-level | Цвет фона |
39
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | neutral-background1-level | Цвет фона |
40
40
  | className | `string` | - | CSS-класс |
41
41
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
42
42
  ## SectionBenefits
@@ -50,7 +50,7 @@
50
50
  | id | `string` | - | id секции |
51
51
  | title | `string` | - | Название секции |
52
52
  | subtitle | `string` | - | Название подзаголовка секции |
53
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона секции |
53
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона секции |
54
54
  | titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
55
55
  | subtitleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
56
56
  | description | `string` | - | Описание секции |
@@ -69,7 +69,7 @@
69
69
  | titleTag | enum Tag: `"span"`, `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`, `"h6"`, `"div"`, `"label"`, `"p"` | h3 | Тэг заголовка |
70
70
  | description | `string \| string[]` | - | Описание под баннером |
71
71
  | className | `string` | - | CSS класс |
72
- | backgroundSectionColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Фон подложки |
72
+ | backgroundSectionColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Фон подложки |
73
73
  | appearance | "decor" \| "brand" \| "graphite" | brand | |
74
74
  | color | enum ColorType: `"neutral"`, `"white"`, `"violet"`, `"blue"` | - | |
75
75
  | backgroundType | "color" \| "image" | color | |
@@ -89,8 +89,9 @@
89
89
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
90
90
  | id | `string` | - | id секции |
91
91
  | className | `string` | - | CSS - класснейм |
92
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
92
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
93
93
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
94
+ | appearance | "neutral" \| "invert" | - | |
94
95
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
95
96
  | infiniteScroll | `boolean` | false | Цикличная прокрутка |
96
97
  ## SectionCaseCarousel
@@ -107,8 +108,9 @@
107
108
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
108
109
  | id | `string` | - | id секции |
109
110
  | className | `string` | - | CSS - класснейм |
110
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
111
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
111
112
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
113
+ | appearance | "neutral" \| "invert" | - | |
112
114
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
113
115
  | infiniteScroll | `boolean` | false | Цикличная прокрутка |
114
116
  ## SectionCatalog
@@ -120,7 +122,7 @@
120
122
  | title* | `string` | - | Заголовок |
121
123
  | id | `string` | - | id секции |
122
124
  | className | `string` | - | CSS-класс |
123
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
125
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
124
126
  | selectedCategory | `string` | - | Выбранная категория продуктов |
125
127
  | onCategorySelect | `(category: string) => void` | - | Колбек смены выбранной категории продуктов |
126
128
  | footer | `FooterItem[]` | - | Список элементов для футера в каталоге |
@@ -138,8 +140,9 @@
138
140
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
139
141
  | id | `string` | - | id секции |
140
142
  | className | `string` | - | CSS - класснейм |
141
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
143
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
142
144
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
145
+ | appearance | "neutral" \| "invert" | - | |
143
146
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
144
147
  | infiniteScroll | `boolean` | false | Цикличная прокрутка |
145
148
  ## SectionContent
@@ -152,7 +155,7 @@
152
155
  | title | `string` | - | Заголовок |
153
156
  | description | `string` | - | Описание |
154
157
  | button | `Omit<ButtonFilledProps, "size" \| "fullWidth">` | - | Кнопка действия |
155
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | neutral-background1-level | Цвет фона |
158
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | neutral-background1-level | Цвет фона |
156
159
  | contentPosition | "left" \| "right" | left | Местоположение контента в секции |
157
160
  | video | `ReactNode \| VideoPlayerProps` | - | |
158
161
  | onPlay | `() => void` | - | |
@@ -169,7 +172,7 @@
169
172
  | title | `string` | - | Заголовок |
170
173
  | description | `string` | - | Описание |
171
174
  | items | `Item[]` | - | Список элементов |
172
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
175
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
173
176
  | contentPosition | "left" \| "right" | left | Местоположение контента в секции |
174
177
  | video | `ReactNode \| VideoPlayerProps` | - | |
175
178
  | onPlay | `() => void` | - | |
@@ -188,7 +191,7 @@
188
191
  | activeTab | `string` | - | Выбранная вкладок |
189
192
  | onActiveTabChange | `() => void` | - | колбэк на смену вкладки |
190
193
  | button | `Omit<ButtonFilledProps, "size" \| "fullWidth">` | - | Кнопка действия |
191
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
194
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
192
195
  | titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
193
196
  ## SectionExpertsCarousel
194
197
  ### Props
@@ -204,8 +207,9 @@
204
207
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
205
208
  | id | `string` | - | id секции |
206
209
  | className | `string` | - | CSS - класснейм |
207
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
210
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
208
211
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
212
+ | appearance | "neutral" \| "invert" | - | |
209
213
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
210
214
  | infiniteScroll | `boolean` | false | Цикличная прокрутка |
211
215
  ## SectionLeading
@@ -218,7 +222,7 @@
218
222
  | description | `string` | - | Описание секции |
219
223
  | titleSectionSize | enum Size: `"s"`, `"m"`, `"l"` | m | Размер шрифтов заголовка и подзаголовка |
220
224
  | titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
221
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
225
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
222
226
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
223
227
  | id | `string` | - | id секции |
224
228
  | footerDescription | `string` | - | Описание секции |
@@ -238,8 +242,9 @@
238
242
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
239
243
  | id | `string` | - | id секции |
240
244
  | className | `string` | - | CSS - класснейм |
241
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
245
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
242
246
  | moreButton | `{ label?: string; href?: string; onClick: MouseEventHandler<HTMLElement>; 'data-test-id'?: string; }` | - | Кнопка внизу секции |
247
+ | appearance | "neutral" \| "invert" | - | |
243
248
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
244
249
  | infiniteScroll | `boolean` | false | Цикличная прокрутка |
245
250
  ## SectionMedia
@@ -251,7 +256,7 @@
251
256
  | description | `string` | - | Описание секции |
252
257
  | titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
253
258
  | id | `string` | - | id секции |
254
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
259
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
255
260
  | video | `ReactNode \| VideoPlayerProps` | - | |
256
261
  | onPlay | `() => void` | - | |
257
262
  | onError | `ReactEventHandler<HTMLVideoElement>` | - | |
@@ -293,7 +298,7 @@
293
298
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
294
299
  | id | `string` | - | id секции |
295
300
  | className | `string` | - | CSS-класс |
296
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Цвет фона |
301
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Цвет фона |
297
302
  | gap | "s" \| "m" \| "l" \| "xs" | s | Размер отступов сетки |
298
303
  ## SectionTable
299
304
  ### Props
@@ -306,7 +311,7 @@
306
311
  | title | `string` | - | Заголовок |
307
312
  | subtitle | `string` | - | Подзаголовок |
308
313
  | description | `string` | - | Описание |
309
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | - | Фон подложки |
314
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | - | Фон подложки |
310
315
  | withHeader | `boolean` | - | |
311
316
  ## SectionCarousel
312
317
  ### Props
@@ -324,8 +329,9 @@
324
329
  | titleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег заголовка |
325
330
  | subtitleTag | enum SectionTag: `"h2"`, `"h3"`, `"h4"` | - | Тег подзаголовка |
326
331
  | titleAlign | "left" \| "center" | - | Выравнивание текста |
332
+ | appearance | "neutral" \| "invert" | - | |
327
333
  | id | `string` | - | id секции |
328
- | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"` | neutral-background1-level | Цвет фона |
334
+ | backgroundColor | enum SectionColor: `"neutral-background1-level"`, `"neutral-background"`, `"graphite-accent-default"` | neutral-background1-level | Цвет фона |
329
335
  | className | `string` | - | CSS - класснейм |
330
336
  | autoSwipe | `number` | 9 | Автоматическое переключение слайдов в секундах |
331
337
  | gap | `string` | var(--dimension-2m) | Расстояние между айтемами |
@@ -28,6 +28,7 @@ const tabs_1 = require("@snack-uikit/tabs");
28
28
  const constants_1 = require("../../constants");
29
29
  const helperComponents_1 = require("../../helperComponents");
30
30
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
31
+ const utils_1 = require("./utils");
31
32
  const getInitialTab = (tabBarItems) => {
32
33
  if (!tabBarItems || tabBarItems.length < 1) {
33
34
  return undefined;
@@ -41,5 +42,5 @@ function SectionBasic(_a) {
41
42
  const [currentTab, setCurrentTab] = (0, react_1.useState)(getInitialTab(tabBarItems));
42
43
  const { t } = (0, uikit_product_locale_1.useLocale)('SiteSection');
43
44
  const showFooter = Boolean(pagination || moreButton);
44
- return ((0, jsx_runtime_1.jsx)(uikit_product_site_layout_1.Layout.SectionWrapper, Object.assign({ id: id, layoutType: layoutType, className: (0, classnames_1.default)(className, styles_module_scss_1.default.wrapper), "data-section-background": backgroundColor }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.sectionBasic, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)(helperComponents_1.SectionTitle, { layoutType: layoutType, title: title, description: description, titleSectionSize: titleSectionSize, titleTag: titleTag, titleAlign: titleAlign, subtitle: subtitle, subtitleTag: subtitleTag }), (tabBarItems === null || tabBarItems === void 0 ? void 0 : tabBarItems.length) && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.sectionTabs, children: (0, jsx_runtime_1.jsx)(tabs_1.Tabs, { value: currentTab, onChange: setCurrentTab, children: (0, jsx_runtime_1.jsx)(tabs_1.Tabs.TabBar, { children: tabBarItems.map(tabProps => ((0, jsx_runtime_1.jsx)(tabs_1.Tabs.Tab, Object.assign({}, tabProps), tabProps.value))) }) }) })), (filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.sectionFilters, "data-layout-type": layoutType, children: filterItems.map(filterProps => ((0, jsx_runtime_1.jsx)(uikit_product_mobile_fields_1.AdaptiveFieldSelect, Object.assign({}, filterProps, { className: (0, classnames_1.default)(filterProps.className, styles_module_scss_1.default.filter), layoutType: layoutType, size: 'l' }), filterProps.id))) })), children, showFooter && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.footer, "data-layout-type": layoutType, children: [pagination && (0, jsx_runtime_1.jsx)(pagination_1.Pagination, Object.assign({}, pagination)), moreButton && ((0, jsx_runtime_1.jsx)(button_1.ButtonOutline, { className: styles_module_scss_1.default.showMoreButton, label: (_b = moreButton.label) !== null && _b !== void 0 ? _b : t('Basic.showMore'), onClick: moreButton.onClick, href: moreButton.href, "data-test-id": (_c = moreButton['data-test-id']) !== null && _c !== void 0 ? _c : 'section__more-btn', appearance: 'neutral', size: 'l', type: 'button', "data-layout-type": layoutType }))] }))] }) })));
45
+ return ((0, jsx_runtime_1.jsx)(uikit_product_site_layout_1.Layout.SectionWrapper, Object.assign({ id: id, layoutType: layoutType, className: (0, classnames_1.default)(className, styles_module_scss_1.default.wrapper), "data-section-background": backgroundColor }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.sectionBasic, "data-layout-type": layoutType, children: [(0, jsx_runtime_1.jsx)(helperComponents_1.SectionTitle, { layoutType: layoutType, title: title, description: description, titleSectionSize: titleSectionSize, titleTag: titleTag, titleAlign: titleAlign, subtitle: subtitle, subtitleTag: subtitleTag, appearance: (0, utils_1.getAppearanceByBackground)(backgroundColor) }), (tabBarItems === null || tabBarItems === void 0 ? void 0 : tabBarItems.length) && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.sectionTabs, children: (0, jsx_runtime_1.jsx)(tabs_1.Tabs, { value: currentTab, onChange: setCurrentTab, children: (0, jsx_runtime_1.jsx)(tabs_1.Tabs.TabBar, { children: tabBarItems.map(tabProps => ((0, jsx_runtime_1.jsx)(tabs_1.Tabs.Tab, Object.assign({}, tabProps), tabProps.value))) }) }) })), (filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.sectionFilters, "data-layout-type": layoutType, children: filterItems.map(filterProps => ((0, jsx_runtime_1.jsx)(uikit_product_mobile_fields_1.AdaptiveFieldSelect, Object.assign({}, filterProps, { className: (0, classnames_1.default)(filterProps.className, styles_module_scss_1.default.filter), layoutType: layoutType, size: 'l' }), filterProps.id))) })), children, showFooter && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.footer, "data-layout-type": layoutType, children: [pagination && (0, jsx_runtime_1.jsx)(pagination_1.Pagination, Object.assign({}, pagination)), moreButton && ((0, jsx_runtime_1.jsx)(button_1.ButtonOutline, { className: styles_module_scss_1.default.showMoreButton, label: (_b = moreButton.label) !== null && _b !== void 0 ? _b : t('Basic.showMore'), onClick: moreButton.onClick, href: moreButton.href, "data-test-id": (_c = moreButton['data-test-id']) !== null && _c !== void 0 ? _c : 'section__more-btn', appearance: 'neutral', size: 'l', type: 'button', "data-layout-type": layoutType }))] }))] }) })));
45
46
  }
@@ -13,13 +13,6 @@
13
13
  padding:var(--dimension-4m, 32px) 0;
14
14
  }
15
15
 
16
- .wrapper[data-section-background=neutral-background1-level]{
17
- background-color:var(--sys-neutral-background1-level, #fdfdfd);
18
- }
19
- .wrapper[data-section-background=neutral-background]{
20
- background-color:var(--sys-neutral-background, #eeeff3);
21
- }
22
-
23
16
  .sectionTitle{
24
17
  display:flex;
25
18
  flex-direction:column;
@@ -31,7 +24,7 @@
31
24
  }
32
25
 
33
26
  .description{
34
- color:var(--sys-neutral-text-support, #6d707f);
27
+ color:var(--sys-neutral-text-support, #656774);
35
28
  }
36
29
 
37
30
  .sectionTabs{
@@ -68,4 +61,23 @@
68
61
 
69
62
  .showMoreButton[data-layout-type=mobile]{
70
63
  width:100%;
64
+ }
65
+
66
+ .wrapper{
67
+ border-radius:var(--dimension-050m, 4px);
68
+ }
69
+ .wrapper[data-section-background=neutral-background1-level]{
70
+ background-color:var(--sys-neutral-background1-level, #fdfdfd);
71
+ }
72
+ .wrapper[data-section-background=neutral-background]{
73
+ background-color:var(--sys-neutral-background, #eeeff3);
74
+ }
75
+ .wrapper[data-section-background=graphite-accent-default]{
76
+ background-color:var(--sys-graphite-accent-default, #222222);
77
+ }
78
+ .wrapper[data-section-background=graphite-accent-default] .title,
79
+ .wrapper[data-section-background=graphite-accent-default] .sectionTitle,
80
+ .wrapper[data-section-background=graphite-accent-default] .description,
81
+ .wrapper[data-section-background=graphite-accent-default] .sectionTabs{
82
+ color:var(--sys-graphite-on-accent, #ffffff);
71
83
  }
@@ -0,0 +1,2 @@
1
+ import { SectionColor } from '../../types';
2
+ export declare const getAppearanceByBackground: (backgroundColor: SectionColor) => "neutral" | "invert";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAppearanceByBackground = void 0;
4
+ const constants_1 = require("../../constants");
5
+ const getAppearanceByBackground = (backgroundColor) => backgroundColor === constants_1.SECTION_COLORS.GraphiteAccentDefault ? 'invert' : 'neutral';
6
+ exports.getAppearanceByBackground = getAppearanceByBackground;
@@ -1,4 +1,5 @@
1
1
  export declare const SECTION_COLORS: {
2
2
  readonly NeutralBackground1Level: "neutral-background1-level";
3
3
  readonly NeutralBackground: "neutral-background";
4
+ readonly GraphiteAccentDefault: "graphite-accent-default";
4
5
  };
@@ -4,4 +4,5 @@ exports.SECTION_COLORS = void 0;
4
4
  exports.SECTION_COLORS = {
5
5
  NeutralBackground1Level: 'neutral-background1-level',
6
6
  NeutralBackground: 'neutral-background',
7
+ GraphiteAccentDefault: 'graphite-accent-default',
7
8
  };
@@ -18,5 +18,6 @@ export type SectionTitleProps = WithLayoutType<{
18
18
  subtitleTag?: SectionTag;
19
19
  /** Выравнивание текста */
20
20
  titleAlign?: 'left' | 'center';
21
+ appearance?: 'neutral' | 'invert';
21
22
  }>;
22
- export declare function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize, titleTag, subtitleTag, layoutType, titleAlign, }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize, titleTag, subtitleTag, layoutType, titleAlign, appearance, }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
@@ -11,7 +11,7 @@ const link_1 = require("@snack-uikit/link");
11
11
  const typography_1 = require("@snack-uikit/typography");
12
12
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
13
13
  const utils_1 = require("./utils");
14
- function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize = 'm', titleTag = 'h2', subtitleTag = 'h3', layoutType, titleAlign = 'left', }) {
14
+ function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize = 'm', titleTag = 'h2', subtitleTag = 'h3', layoutType, titleAlign = 'left', appearance, }) {
15
15
  const titleProps = (0, react_1.useMemo)(() => (0, utils_1.getTitleTypographyProps)({ titleSectionSize, layoutType }), [layoutType, titleSectionSize]);
16
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (title || description) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.sectionTitle, "data-align": titleAlign, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.titlesWrapper, "data-align": titleAlign, children: [title && ((0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, titleProps, { tag: titleTag, className: styles_module_scss_1.default.title, children: titleLink ? (0, jsx_runtime_1.jsx)(link_1.Link, Object.assign({}, titleLink, titleProps, { text: title })) : (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }))), subtitle && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { family: 'sans', purpose: 'label', size: 'l', tag: subtitleTag, className: styles_module_scss_1.default.subtitle, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: subtitle }) }))] }), description && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyL, { className: styles_module_scss_1.default.description, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: description }) }))] })) }));
16
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (title || description) && ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.sectionTitle, "data-align": titleAlign, "data-text-color": appearance, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.titlesWrapper, "data-align": titleAlign, children: [title && ((0, jsx_runtime_1.jsx)(typography_1.Typography, Object.assign({ family: 'sans' }, titleProps, { tag: titleTag, className: styles_module_scss_1.default.title, children: titleLink ? (0, jsx_runtime_1.jsx)(link_1.Link, Object.assign({}, titleLink, titleProps, { text: title })) : (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: title }) }))), subtitle && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansLabelL, { tag: subtitleTag, className: styles_module_scss_1.default.subtitle, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: subtitle }) }))] }), description && ((0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyL, { className: styles_module_scss_1.default.description, children: (0, jsx_runtime_1.jsx)(uikit_product_site_rich_text_1.RichText, { richText: description }) }))] })) }));
17
17
  }
@@ -9,10 +9,6 @@
9
9
  text-align:center;
10
10
  }
11
11
 
12
- .sectionTitle{
13
- flex-direction:column;
14
- }
15
-
16
12
  .titlesWrapper{
17
13
  flex-direction:column-reverse;
18
14
  }
@@ -27,5 +23,16 @@
27
23
  }
28
24
 
29
25
  .description{
30
- color:var(--sys-neutral-text-support, #6d707f);
26
+ color:var(--sys-neutral-text-support, #656774);
27
+ }
28
+
29
+ .sectionTitle{
30
+ flex-direction:column;
31
+ }
32
+ .sectionTitle[data-text-color=invert] .title,
33
+ .sectionTitle[data-text-color=invert] .description{
34
+ color:var(--sys-graphite-on-accent, #ffffff);
35
+ }
36
+ .sectionTitle[data-text-color=invert] .subtitle{
37
+ color:var(--sys-graphite-text-disabled, #a3a3a3);
31
38
  }
@@ -22,6 +22,7 @@ import { Tabs } from '@snack-uikit/tabs';
22
22
  import { SECTION_COLORS } from '../../constants';
23
23
  import { SectionTitle } from '../../helperComponents';
24
24
  import styles from './styles.module.css';
25
+ import { getAppearanceByBackground } from './utils';
25
26
  const getInitialTab = (tabBarItems) => {
26
27
  if (!tabBarItems || tabBarItems.length < 1) {
27
28
  return undefined;
@@ -35,5 +36,5 @@ export function SectionBasic(_a) {
35
36
  const [currentTab, setCurrentTab] = useState(getInitialTab(tabBarItems));
36
37
  const { t } = useLocale('SiteSection');
37
38
  const showFooter = Boolean(pagination || moreButton);
38
- return (_jsx(Layout.SectionWrapper, Object.assign({ id: id, layoutType: layoutType, className: cn(className, styles.wrapper), "data-section-background": backgroundColor }, extractSupportProps(rest), { children: _jsxs("div", { className: styles.sectionBasic, "data-layout-type": layoutType, children: [_jsx(SectionTitle, { layoutType: layoutType, title: title, description: description, titleSectionSize: titleSectionSize, titleTag: titleTag, titleAlign: titleAlign, subtitle: subtitle, subtitleTag: subtitleTag }), (tabBarItems === null || tabBarItems === void 0 ? void 0 : tabBarItems.length) && (_jsx("div", { className: styles.sectionTabs, children: _jsx(Tabs, { value: currentTab, onChange: setCurrentTab, children: _jsx(Tabs.TabBar, { children: tabBarItems.map(tabProps => (_jsx(Tabs.Tab, Object.assign({}, tabProps), tabProps.value))) }) }) })), (filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && (_jsx("div", { className: styles.sectionFilters, "data-layout-type": layoutType, children: filterItems.map(filterProps => (_jsx(AdaptiveFieldSelect, Object.assign({}, filterProps, { className: cn(filterProps.className, styles.filter), layoutType: layoutType, size: 'l' }), filterProps.id))) })), children, showFooter && (_jsxs("div", { className: styles.footer, "data-layout-type": layoutType, children: [pagination && _jsx(Pagination, Object.assign({}, pagination)), moreButton && (_jsx(ButtonOutline, { className: styles.showMoreButton, label: (_b = moreButton.label) !== null && _b !== void 0 ? _b : t('Basic.showMore'), onClick: moreButton.onClick, href: moreButton.href, "data-test-id": (_c = moreButton['data-test-id']) !== null && _c !== void 0 ? _c : 'section__more-btn', appearance: 'neutral', size: 'l', type: 'button', "data-layout-type": layoutType }))] }))] }) })));
39
+ return (_jsx(Layout.SectionWrapper, Object.assign({ id: id, layoutType: layoutType, className: cn(className, styles.wrapper), "data-section-background": backgroundColor }, extractSupportProps(rest), { children: _jsxs("div", { className: styles.sectionBasic, "data-layout-type": layoutType, children: [_jsx(SectionTitle, { layoutType: layoutType, title: title, description: description, titleSectionSize: titleSectionSize, titleTag: titleTag, titleAlign: titleAlign, subtitle: subtitle, subtitleTag: subtitleTag, appearance: getAppearanceByBackground(backgroundColor) }), (tabBarItems === null || tabBarItems === void 0 ? void 0 : tabBarItems.length) && (_jsx("div", { className: styles.sectionTabs, children: _jsx(Tabs, { value: currentTab, onChange: setCurrentTab, children: _jsx(Tabs.TabBar, { children: tabBarItems.map(tabProps => (_jsx(Tabs.Tab, Object.assign({}, tabProps), tabProps.value))) }) }) })), (filterItems === null || filterItems === void 0 ? void 0 : filterItems.length) && (_jsx("div", { className: styles.sectionFilters, "data-layout-type": layoutType, children: filterItems.map(filterProps => (_jsx(AdaptiveFieldSelect, Object.assign({}, filterProps, { className: cn(filterProps.className, styles.filter), layoutType: layoutType, size: 'l' }), filterProps.id))) })), children, showFooter && (_jsxs("div", { className: styles.footer, "data-layout-type": layoutType, children: [pagination && _jsx(Pagination, Object.assign({}, pagination)), moreButton && (_jsx(ButtonOutline, { className: styles.showMoreButton, label: (_b = moreButton.label) !== null && _b !== void 0 ? _b : t('Basic.showMore'), onClick: moreButton.onClick, href: moreButton.href, "data-test-id": (_c = moreButton['data-test-id']) !== null && _c !== void 0 ? _c : 'section__more-btn', appearance: 'neutral', size: 'l', type: 'button', "data-layout-type": layoutType }))] }))] }) })));
39
40
  }
@@ -13,13 +13,6 @@
13
13
  padding:var(--dimension-4m, 32px) 0;
14
14
  }
15
15
 
16
- .wrapper[data-section-background=neutral-background1-level]{
17
- background-color:var(--sys-neutral-background1-level, #fdfdfd);
18
- }
19
- .wrapper[data-section-background=neutral-background]{
20
- background-color:var(--sys-neutral-background, #eeeff3);
21
- }
22
-
23
16
  .sectionTitle{
24
17
  display:flex;
25
18
  flex-direction:column;
@@ -31,7 +24,7 @@
31
24
  }
32
25
 
33
26
  .description{
34
- color:var(--sys-neutral-text-support, #6d707f);
27
+ color:var(--sys-neutral-text-support, #656774);
35
28
  }
36
29
 
37
30
  .sectionTabs{
@@ -68,4 +61,23 @@
68
61
 
69
62
  .showMoreButton[data-layout-type=mobile]{
70
63
  width:100%;
64
+ }
65
+
66
+ .wrapper{
67
+ border-radius:var(--dimension-050m, 4px);
68
+ }
69
+ .wrapper[data-section-background=neutral-background1-level]{
70
+ background-color:var(--sys-neutral-background1-level, #fdfdfd);
71
+ }
72
+ .wrapper[data-section-background=neutral-background]{
73
+ background-color:var(--sys-neutral-background, #eeeff3);
74
+ }
75
+ .wrapper[data-section-background=graphite-accent-default]{
76
+ background-color:var(--sys-graphite-accent-default, #222222);
77
+ }
78
+ .wrapper[data-section-background=graphite-accent-default] .title,
79
+ .wrapper[data-section-background=graphite-accent-default] .sectionTitle,
80
+ .wrapper[data-section-background=graphite-accent-default] .description,
81
+ .wrapper[data-section-background=graphite-accent-default] .sectionTabs{
82
+ color:var(--sys-graphite-on-accent, #ffffff);
71
83
  }
@@ -0,0 +1,2 @@
1
+ import { SectionColor } from '../../types';
2
+ export declare const getAppearanceByBackground: (backgroundColor: SectionColor) => "neutral" | "invert";
@@ -0,0 +1,2 @@
1
+ import { SECTION_COLORS } from '../../constants';
2
+ export const getAppearanceByBackground = (backgroundColor) => backgroundColor === SECTION_COLORS.GraphiteAccentDefault ? 'invert' : 'neutral';
@@ -1,4 +1,5 @@
1
1
  export declare const SECTION_COLORS: {
2
2
  readonly NeutralBackground1Level: "neutral-background1-level";
3
3
  readonly NeutralBackground: "neutral-background";
4
+ readonly GraphiteAccentDefault: "graphite-accent-default";
4
5
  };
@@ -1,4 +1,5 @@
1
1
  export const SECTION_COLORS = {
2
2
  NeutralBackground1Level: 'neutral-background1-level',
3
3
  NeutralBackground: 'neutral-background',
4
+ GraphiteAccentDefault: 'graphite-accent-default',
4
5
  };
@@ -18,5 +18,6 @@ export type SectionTitleProps = WithLayoutType<{
18
18
  subtitleTag?: SectionTag;
19
19
  /** Выравнивание текста */
20
20
  titleAlign?: 'left' | 'center';
21
+ appearance?: 'neutral' | 'invert';
21
22
  }>;
22
- export declare function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize, titleTag, subtitleTag, layoutType, titleAlign, }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize, titleTag, subtitleTag, layoutType, titleAlign, appearance, }: SectionTitleProps): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ import { Link } from '@snack-uikit/link';
5
5
  import { Typography } from '@snack-uikit/typography';
6
6
  import styles from './styles.module.css';
7
7
  import { getTitleTypographyProps } from './utils';
8
- export function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize = 'm', titleTag = 'h2', subtitleTag = 'h3', layoutType, titleAlign = 'left', }) {
8
+ export function SectionTitle({ title, subtitle, titleLink, description, titleSectionSize = 'm', titleTag = 'h2', subtitleTag = 'h3', layoutType, titleAlign = 'left', appearance, }) {
9
9
  const titleProps = useMemo(() => getTitleTypographyProps({ titleSectionSize, layoutType }), [layoutType, titleSectionSize]);
10
- return (_jsx(_Fragment, { children: (title || description) && (_jsxs("div", { className: styles.sectionTitle, "data-align": titleAlign, children: [_jsxs("div", { className: styles.titlesWrapper, "data-align": titleAlign, children: [title && (_jsx(Typography, Object.assign({ family: 'sans' }, titleProps, { tag: titleTag, className: styles.title, children: titleLink ? _jsx(Link, Object.assign({}, titleLink, titleProps, { text: title })) : _jsx(RichText, { richText: title }) }))), subtitle && (_jsx(Typography, { family: 'sans', purpose: 'label', size: 'l', tag: subtitleTag, className: styles.subtitle, children: _jsx(RichText, { richText: subtitle }) }))] }), description && (_jsx(Typography.SansBodyL, { className: styles.description, children: _jsx(RichText, { richText: description }) }))] })) }));
10
+ return (_jsx(_Fragment, { children: (title || description) && (_jsxs("div", { className: styles.sectionTitle, "data-align": titleAlign, "data-text-color": appearance, children: [_jsxs("div", { className: styles.titlesWrapper, "data-align": titleAlign, children: [title && (_jsx(Typography, Object.assign({ family: 'sans' }, titleProps, { tag: titleTag, className: styles.title, children: titleLink ? _jsx(Link, Object.assign({}, titleLink, titleProps, { text: title })) : _jsx(RichText, { richText: title }) }))), subtitle && (_jsx(Typography.SansLabelL, { tag: subtitleTag, className: styles.subtitle, children: _jsx(RichText, { richText: subtitle }) }))] }), description && (_jsx(Typography.SansBodyL, { className: styles.description, children: _jsx(RichText, { richText: description }) }))] })) }));
11
11
  }
@@ -9,10 +9,6 @@
9
9
  text-align:center;
10
10
  }
11
11
 
12
- .sectionTitle{
13
- flex-direction:column;
14
- }
15
-
16
12
  .titlesWrapper{
17
13
  flex-direction:column-reverse;
18
14
  }
@@ -27,5 +23,16 @@
27
23
  }
28
24
 
29
25
  .description{
30
- color:var(--sys-neutral-text-support, #6d707f);
26
+ color:var(--sys-neutral-text-support, #656774);
27
+ }
28
+
29
+ .sectionTitle{
30
+ flex-direction:column;
31
+ }
32
+ .sectionTitle[data-text-color=invert] .title,
33
+ .sectionTitle[data-text-color=invert] .description{
34
+ color:var(--sys-graphite-on-accent, #ffffff);
35
+ }
36
+ .sectionTitle[data-text-color=invert] .subtitle{
37
+ color:var(--sys-graphite-text-disabled, #a3a3a3);
31
38
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloud-ru/uikit-product-site-section",
3
3
  "title": "Site Section",
4
- "version": "0.27.1",
4
+ "version": "0.28.0",
5
5
  "sideEffects": [
6
6
  "*.css",
7
7
  "*.woff",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@cloud-ru/uikit-product-icons": "16.1.1",
40
40
  "@cloud-ru/uikit-product-mobile-fields": "0.12.4",
41
- "@cloud-ru/uikit-product-site-cards": "0.13.0",
41
+ "@cloud-ru/uikit-product-site-cards": "0.14.0",
42
42
  "@cloud-ru/uikit-product-site-case-card": "0.5.1",
43
43
  "@cloud-ru/uikit-product-site-grid": "0.1.10",
44
44
  "@cloud-ru/uikit-product-site-layout": "0.5.2",
@@ -67,5 +67,5 @@
67
67
  "@cloud-ru/uikit-product-locale": "*",
68
68
  "@snack-uikit/figma-tokens": "*"
69
69
  },
70
- "gitHead": "629fe2bd96a28ea24b60a04c913fbbe453d104b7"
70
+ "gitHead": "261f5170723ff343e64bb472677c4b0cce7dbefc"
71
71
  }
@@ -13,6 +13,7 @@ import { SECTION_COLORS } from '../../constants';
13
13
  import { SectionTitle, SectionTitleProps } from '../../helperComponents';
14
14
  import { SectionColor } from '../../types';
15
15
  import styles from './styles.module.scss';
16
+ import { getAppearanceByBackground } from './utils';
16
17
 
17
18
  type TabBarItem = WithSupportProps<{
18
19
  value: string;
@@ -103,6 +104,7 @@ export function SectionBasic({
103
104
  titleAlign={titleAlign}
104
105
  subtitle={subtitle}
105
106
  subtitleTag={subtitleTag}
107
+ appearance={getAppearanceByBackground(backgroundColor)}
106
108
  />
107
109
 
108
110
  {tabBarItems?.length && (
@@ -1,4 +1,4 @@
1
- @use '@sbercloud/figma-tokens-cloud-platform/build/scss/styles-theme-variables' as var;
1
+ @use '@sbercloud/figma-tokens-web/build/scss/styles-theme-variables' as var;
2
2
 
3
3
  .sectionBasic {
4
4
  display: flex;
@@ -18,16 +18,6 @@
18
18
  }
19
19
  }
20
20
 
21
- .wrapper {
22
- &[data-section-background='neutral-background1-level'] {
23
- background-color: var.$sys-neutral-background1-level;
24
- }
25
-
26
- &[data-section-background='neutral-background'] {
27
- background-color: var.$sys-neutral-background;
28
- }
29
- }
30
-
31
21
  .sectionTitle {
32
22
  display: flex;
33
23
  flex-direction: column;
@@ -84,3 +74,26 @@
84
74
  width: 100%;
85
75
  }
86
76
  }
77
+
78
+ .wrapper {
79
+ &[data-section-background='neutral-background1-level'] {
80
+ background-color: var.$sys-neutral-background1-level;
81
+ }
82
+
83
+ &[data-section-background='neutral-background'] {
84
+ background-color: var.$sys-neutral-background;
85
+ }
86
+
87
+ &[data-section-background='graphite-accent-default'] {
88
+ background-color: var.$sys-graphite-accent-default;
89
+
90
+ .title,
91
+ .sectionTitle,
92
+ .description,
93
+ .sectionTabs {
94
+ color: var.$sys-graphite-on-accent;
95
+ }
96
+ }
97
+
98
+ border-radius: var.$dimension-050m;
99
+ }
@@ -0,0 +1,5 @@
1
+ import { SECTION_COLORS } from '../../constants';
2
+ import { SectionColor } from '../../types';
3
+
4
+ export const getAppearanceByBackground = (backgroundColor: SectionColor): 'neutral' | 'invert' =>
5
+ backgroundColor === SECTION_COLORS.GraphiteAccentDefault ? 'invert' : 'neutral';
package/src/constants.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export const SECTION_COLORS = {
2
2
  NeutralBackground1Level: 'neutral-background1-level',
3
3
  NeutralBackground: 'neutral-background',
4
+ GraphiteAccentDefault: 'graphite-accent-default',
4
5
  } as const;
@@ -26,6 +26,7 @@ export type SectionTitleProps = WithLayoutType<{
26
26
  subtitleTag?: SectionTag;
27
27
  /** Выравнивание текста */
28
28
  titleAlign?: 'left' | 'center';
29
+ appearance?: 'neutral' | 'invert';
29
30
  }>;
30
31
 
31
32
  export function SectionTitle({
@@ -38,6 +39,7 @@ export function SectionTitle({
38
39
  subtitleTag = 'h3',
39
40
  layoutType,
40
41
  titleAlign = 'left',
42
+ appearance,
41
43
  }: SectionTitleProps) {
42
44
  const titleProps = useMemo(
43
45
  () => getTitleTypographyProps({ titleSectionSize, layoutType }),
@@ -47,7 +49,7 @@ export function SectionTitle({
47
49
  return (
48
50
  <>
49
51
  {(title || description) && (
50
- <div className={styles.sectionTitle} data-align={titleAlign}>
52
+ <div className={styles.sectionTitle} data-align={titleAlign} data-text-color={appearance}>
51
53
  <div className={styles.titlesWrapper} data-align={titleAlign}>
52
54
  {title && (
53
55
  <Typography family='sans' {...titleProps} tag={titleTag} className={styles.title}>
@@ -55,9 +57,9 @@ export function SectionTitle({
55
57
  </Typography>
56
58
  )}
57
59
  {subtitle && (
58
- <Typography family='sans' purpose='label' size='l' tag={subtitleTag} className={styles.subtitle}>
60
+ <Typography.SansLabelL tag={subtitleTag} className={styles.subtitle}>
59
61
  <RichText richText={subtitle} />
60
- </Typography>
62
+ </Typography.SansLabelL>
61
63
  )}
62
64
  </div>
63
65
  {description && (
@@ -1,4 +1,4 @@
1
- @use '@sbercloud/figma-tokens-cloud-platform/build/scss/styles-theme-variables' as var;
1
+ @use '@sbercloud/figma-tokens-web/build/scss/styles-theme-variables' as var;
2
2
 
3
3
  .sectionTitle,
4
4
  .titlesWrapper {
@@ -11,10 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
- .sectionTitle {
15
- flex-direction: column;
16
- }
17
-
18
14
  .titlesWrapper {
19
15
  flex-direction: column-reverse;
20
16
  }
@@ -31,3 +27,18 @@
31
27
  .description {
32
28
  color: var.$sys-neutral-text-support;
33
29
  }
30
+
31
+ .sectionTitle {
32
+ flex-direction: column;
33
+
34
+ &[data-text-color='invert'] {
35
+ .title,
36
+ .description {
37
+ color: var.$sys-graphite-on-accent;
38
+ }
39
+
40
+ .subtitle {
41
+ color: var.$sys-graphite-text-disabled;
42
+ }
43
+ }
44
+ }