@gravity-ui/page-constructor 1.20.4 → 1.21.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 (78) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/cjs/blocks/CardLayout/CardLayout.d.ts +3 -5
  3. package/build/cjs/blocks/CardLayout/CardLayout.js +2 -6
  4. package/build/cjs/blocks/FilterBlock/FilterBlock.css +50 -0
  5. package/build/cjs/blocks/FilterBlock/FilterBlock.d.ts +4 -0
  6. package/build/cjs/blocks/FilterBlock/FilterBlock.js +48 -0
  7. package/build/cjs/blocks/FilterBlock/i18n/en.json +3 -0
  8. package/build/cjs/blocks/FilterBlock/i18n/index.d.ts +2 -0
  9. package/build/cjs/blocks/FilterBlock/i18n/index.js +8 -0
  10. package/build/cjs/blocks/FilterBlock/i18n/ru.json +3 -0
  11. package/build/cjs/blocks/FilterBlock/schema.d.ts +229 -0
  12. package/build/cjs/blocks/FilterBlock/schema.js +41 -0
  13. package/build/cjs/blocks/Tabs/Tabs.css +27 -18
  14. package/build/cjs/blocks/index.d.ts +1 -0
  15. package/build/cjs/blocks/index.js +3 -1
  16. package/build/cjs/components/Button/Button.css +4 -0
  17. package/build/cjs/components/ButtonTabs/ButtonTabs.css +16 -3
  18. package/build/cjs/components/ButtonTabs/ButtonTabs.d.ts +7 -4
  19. package/build/cjs/components/ButtonTabs/ButtonTabs.js +2 -6
  20. package/build/cjs/constructor-items.d.ts +2 -1
  21. package/build/cjs/constructor-items.js +1 -0
  22. package/build/cjs/containers/PageConstructor/PageConstructor.css +8 -0
  23. package/build/cjs/containers/PageConstructor/PageConstructor.js +13 -14
  24. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +3 -5
  25. package/build/cjs/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -3
  26. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +3 -3
  27. package/build/cjs/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +5 -7
  28. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -2
  29. package/build/cjs/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -3
  30. package/build/cjs/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +3 -1
  31. package/build/cjs/context/innerContext/InnerContext.d.ts +4 -1
  32. package/build/cjs/context/innerContext/InnerContext.js +2 -0
  33. package/build/cjs/models/constructor-items/blocks.d.ts +26 -3
  34. package/build/cjs/models/constructor-items/blocks.js +1 -0
  35. package/build/cjs/utils/blocks.d.ts +1 -0
  36. package/build/cjs/utils/blocks.js +6 -1
  37. package/build/esm/blocks/CardLayout/CardLayout.d.ts +3 -5
  38. package/build/esm/blocks/CardLayout/CardLayout.js +3 -7
  39. package/build/esm/blocks/FilterBlock/FilterBlock.css +50 -0
  40. package/build/esm/blocks/FilterBlock/FilterBlock.d.ts +5 -0
  41. package/build/esm/blocks/FilterBlock/FilterBlock.js +46 -0
  42. package/build/esm/blocks/FilterBlock/i18n/en.json +3 -0
  43. package/build/esm/blocks/FilterBlock/i18n/index.d.ts +2 -0
  44. package/build/esm/blocks/FilterBlock/i18n/index.js +5 -0
  45. package/build/esm/blocks/FilterBlock/i18n/ru.json +3 -0
  46. package/build/esm/blocks/FilterBlock/schema.d.ts +229 -0
  47. package/build/esm/blocks/FilterBlock/schema.js +38 -0
  48. package/build/esm/blocks/Tabs/Tabs.css +27 -18
  49. package/build/esm/blocks/index.d.ts +1 -0
  50. package/build/esm/blocks/index.js +1 -0
  51. package/build/esm/components/Button/Button.css +4 -0
  52. package/build/esm/components/ButtonTabs/ButtonTabs.css +16 -3
  53. package/build/esm/components/ButtonTabs/ButtonTabs.d.ts +7 -4
  54. package/build/esm/components/ButtonTabs/ButtonTabs.js +2 -6
  55. package/build/esm/constructor-items.d.ts +2 -1
  56. package/build/esm/constructor-items.js +2 -1
  57. package/build/esm/containers/PageConstructor/PageConstructor.css +8 -0
  58. package/build/esm/containers/PageConstructor/PageConstructor.js +15 -16
  59. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.d.ts +3 -5
  60. package/build/esm/containers/PageConstructor/components/ConstructorBlock/ConstructorBlock.js +3 -3
  61. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.d.ts +3 -3
  62. package/build/esm/containers/PageConstructor/components/ConstructorBlocks/ConstructorBlocks.js +5 -7
  63. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.d.ts +3 -2
  64. package/build/esm/containers/PageConstructor/components/ConstructorItem/ConstructorItem.js +5 -3
  65. package/build/esm/containers/PageConstructor/components/ConstructorLoadable/ConstructorLoadable.js +3 -1
  66. package/build/esm/context/innerContext/InnerContext.d.ts +4 -1
  67. package/build/esm/context/innerContext/InnerContext.js +2 -0
  68. package/build/esm/models/constructor-items/blocks.d.ts +26 -3
  69. package/build/esm/models/constructor-items/blocks.js +1 -0
  70. package/build/esm/utils/blocks.d.ts +1 -0
  71. package/build/esm/utils/blocks.js +4 -0
  72. package/package.json +1 -1
  73. package/server/models/constructor-items/blocks.d.ts +26 -3
  74. package/server/models/constructor-items/blocks.js +1 -0
  75. package/server/utils/blocks.d.ts +1 -0
  76. package/server/utils/blocks.js +6 -1
  77. package/styles/mixins.scss +62 -5
  78. package/styles/root.scss +10 -0
@@ -1,11 +1,13 @@
1
1
  import React, { useContext } from 'react';
2
2
  import Loadable from '../../../Loadable/Loadable';
3
3
  import { InnerContext } from '../../../../context/innerContext';
4
+ import { BlockIdContext } from '../../../../context/blockIdContext';
4
5
  export const ConstructorLoadable = (props) => {
5
6
  const { itemMap } = useContext(InnerContext);
6
7
  const { block, blockKey, config, serviceId, params } = props;
7
8
  const { type } = block;
8
9
  const { fetch, component: ChildComponent } = config;
9
10
  const Component = itemMap[type];
10
- return (React.createElement(Loadable, { key: blockKey, block: block, blockKey: blockKey, Component: Component, ChildComponent: ChildComponent, fetch: fetch, serviceId: serviceId, params: params }));
11
+ return (React.createElement(BlockIdContext.Provider, { value: blockKey, key: blockKey },
12
+ React.createElement(Loadable, { key: blockKey, block: block, blockKey: blockKey, Component: Component, ChildComponent: ChildComponent, fetch: fetch, serviceId: serviceId, params: params })));
11
13
  };
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
2
  import { ItemMap } from '../../containers/PageConstructor/PageConstructor';
3
- import { LoadableConfig } from '../../models';
3
+ import { LoadableConfig, ShouldRenderBlock } from '../../models';
4
4
  export interface InnerContextType {
5
5
  blockTypes: string[];
6
+ subBlockTypes: string[];
7
+ headerBlockTypes: string[];
6
8
  itemMap: ItemMap;
7
9
  loadables?: LoadableConfig;
10
+ shouldRenderBlock?: ShouldRenderBlock;
8
11
  }
9
12
  export declare const InnerContext: React.Context<InnerContextType>;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  export const InnerContext = React.createContext({
3
3
  blockTypes: [],
4
+ subBlockTypes: [],
5
+ headerBlockTypes: [],
4
6
  itemMap: {},
5
7
  });
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
+ import { ButtonSize } from '@gravity-ui/uikit';
2
3
  import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
3
4
  import { ThemeSupporting } from '../../utils';
4
5
  import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
5
- import { BannerCardProps, SubBlock } from './sub-blocks';
6
+ import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
6
7
  export declare enum BlockType {
7
8
  PromoFeaturesBlock = "promo-features-block",
8
9
  ExtendedFeaturesBlock = "extended-features-block",
@@ -26,7 +27,8 @@ export declare enum BlockType {
26
27
  CardLayoutBlock = "card-layout-block",
27
28
  ContentLayoutBlock = "content-layout-block",
28
29
  ShareBlock = "share-block",
29
- MapBlock = "map-block"
30
+ MapBlock = "map-block",
31
+ FilterBlock = "filter-block"
30
32
  }
31
33
  export declare const BlockTypes: BlockType[];
32
34
  export declare const HeaderBlockTypes: BlockType[];
@@ -251,6 +253,24 @@ export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChi
251
253
  description?: string;
252
254
  colSizes?: GridColumnSizesType;
253
255
  }
256
+ export type FilterTag = {
257
+ id: string;
258
+ label: string;
259
+ };
260
+ export type FilterItem = {
261
+ tags: string[];
262
+ card: SubBlockModels;
263
+ };
264
+ export interface FilterBlockProps extends Animatable, LoadableChildren {
265
+ title?: TitleProps | string;
266
+ description?: string;
267
+ tags: FilterTag[];
268
+ items: FilterItem[];
269
+ tagButtonSize?: ButtonSize;
270
+ allTag?: boolean | string;
271
+ colSizes?: GridColumnSizesType;
272
+ centered?: boolean;
273
+ }
254
274
  export interface IconsBlockProps {
255
275
  title?: string;
256
276
  size?: 's' | 'm' | 'l';
@@ -350,6 +370,9 @@ export type LinkTableBlockModel = {
350
370
  export type CardLayoutBlockModel = {
351
371
  type: BlockType.CardLayoutBlock;
352
372
  } & CardLayoutBlockProps;
373
+ export type FilterBlockModel = {
374
+ type: BlockType.FilterBlock;
375
+ } & FilterBlockProps;
353
376
  export type IconsBlockModel = {
354
377
  type: BlockType.IconsBlock;
355
378
  } & IconsBlockProps;
@@ -362,6 +385,6 @@ export type ContentLayoutBlockModel = {
362
385
  export type ShareBLockModel = {
363
386
  type: BlockType.ShareBlock;
364
387
  } & ShareBlockProps;
365
- type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
388
+ type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
366
389
  export type Block = BlockModels & BlockBaseProps;
367
390
  export {};
@@ -23,6 +23,7 @@ export var BlockType;
23
23
  BlockType["ContentLayoutBlock"] = "content-layout-block";
24
24
  BlockType["ShareBlock"] = "share-block";
25
25
  BlockType["MapBlock"] = "map-block";
26
+ BlockType["FilterBlock"] = "filter-block";
26
27
  })(BlockType || (BlockType = {}));
27
28
  export const BlockTypes = Object.values(BlockType);
28
29
  export const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
@@ -6,5 +6,6 @@ export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) =
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
7
7
  [x: string]: any;
8
8
  };
9
+ export declare const getCustomSubBlockTypes: (customBlocks?: CustomConfig) => string[];
9
10
  export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => string[];
10
11
  export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
@@ -18,6 +18,10 @@ export const getCustomBlockTypes = ({ blocks = {}, headers = {} } = {}) => [
18
18
  ...Object.keys(headers),
19
19
  ];
20
20
  export const getCustomItems = ({ blocks = {}, headers = {}, subBlocks = {} } = {}) => (Object.assign(Object.assign(Object.assign({}, blocks), headers), subBlocks));
21
+ export const getCustomSubBlockTypes = (customBlocks = {}) => {
22
+ const { subBlocks = {} } = customBlocks;
23
+ return Object.keys(subBlocks);
24
+ };
21
25
  export const getCustomHeaderTypes = (customBlocks = {}) => {
22
26
  const { headers = {} } = customBlocks;
23
27
  return Object.keys(headers);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.20.4",
3
+ "version": "1.21.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
+ import { ButtonSize } from '@gravity-ui/uikit';
2
3
  import { BackgroundImageProps, ButtonProps, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, Justify, LinkProps, LinkTheme, MediaDirection, MediaProps, MapProps, PreviewItemProps, PreviewRatioMediaContent, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleProps, LegendTableMarkerType, AnchorProps, TitleBaseProps, Animatable, BlockHeaderProps, ImageDeviceProps } from './common';
3
4
  import { ThemeSupporting } from '../../utils';
4
5
  import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
5
- import { BannerCardProps, SubBlock } from './sub-blocks';
6
+ import { BannerCardProps, SubBlock, SubBlockModels } from './sub-blocks';
6
7
  export declare enum BlockType {
7
8
  PromoFeaturesBlock = "promo-features-block",
8
9
  ExtendedFeaturesBlock = "extended-features-block",
@@ -26,7 +27,8 @@ export declare enum BlockType {
26
27
  CardLayoutBlock = "card-layout-block",
27
28
  ContentLayoutBlock = "content-layout-block",
28
29
  ShareBlock = "share-block",
29
- MapBlock = "map-block"
30
+ MapBlock = "map-block",
31
+ FilterBlock = "filter-block"
30
32
  }
31
33
  export declare const BlockTypes: BlockType[];
32
34
  export declare const HeaderBlockTypes: BlockType[];
@@ -251,6 +253,24 @@ export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChi
251
253
  description?: string;
252
254
  colSizes?: GridColumnSizesType;
253
255
  }
256
+ export type FilterTag = {
257
+ id: string;
258
+ label: string;
259
+ };
260
+ export type FilterItem = {
261
+ tags: string[];
262
+ card: SubBlockModels;
263
+ };
264
+ export interface FilterBlockProps extends Animatable, LoadableChildren {
265
+ title?: TitleProps | string;
266
+ description?: string;
267
+ tags: FilterTag[];
268
+ items: FilterItem[];
269
+ tagButtonSize?: ButtonSize;
270
+ allTag?: boolean | string;
271
+ colSizes?: GridColumnSizesType;
272
+ centered?: boolean;
273
+ }
254
274
  export interface IconsBlockProps {
255
275
  title?: string;
256
276
  size?: 's' | 'm' | 'l';
@@ -350,6 +370,9 @@ export type LinkTableBlockModel = {
350
370
  export type CardLayoutBlockModel = {
351
371
  type: BlockType.CardLayoutBlock;
352
372
  } & CardLayoutBlockProps;
373
+ export type FilterBlockModel = {
374
+ type: BlockType.FilterBlock;
375
+ } & FilterBlockProps;
353
376
  export type IconsBlockModel = {
354
377
  type: BlockType.IconsBlock;
355
378
  } & IconsBlockProps;
@@ -362,6 +385,6 @@ export type ContentLayoutBlockModel = {
362
385
  export type ShareBLockModel = {
363
386
  type: BlockType.ShareBlock;
364
387
  } & ShareBlockProps;
365
- type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel;
388
+ type BlockModels = SliderBlockModel | ServiceDemoBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | CalculatorBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | SecurityBlockModel | TableBlockModel | TabsBlockModel | SimpleBlockModel | LinkTableBlockModel | HeaderBlockModel | PreviewBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel;
366
389
  export type Block = BlockModels & BlockBaseProps;
367
390
  export {};
@@ -26,6 +26,7 @@ var BlockType;
26
26
  BlockType["ContentLayoutBlock"] = "content-layout-block";
27
27
  BlockType["ShareBlock"] = "share-block";
28
28
  BlockType["MapBlock"] = "map-block";
29
+ BlockType["FilterBlock"] = "filter-block";
29
30
  })(BlockType = exports.BlockType || (exports.BlockType = {}));
30
31
  exports.BlockTypes = Object.values(BlockType);
31
32
  exports.HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];
@@ -6,5 +6,6 @@ export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) =
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
7
7
  [x: string]: any;
8
8
  };
9
+ export declare const getCustomSubBlockTypes: (customBlocks?: CustomConfig) => string[];
9
10
  export declare const getCustomHeaderTypes: (customBlocks?: CustomConfig) => string[];
10
11
  export declare const getShareLink: (url: string, type: PCShareSocialNetwork, title?: string, text?: string) => string | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getShareLink = exports.getCustomHeaderTypes = exports.getCustomItems = exports.getCustomBlockTypes = exports.getBlockKey = exports.getHeaderTag = void 0;
3
+ exports.getShareLink = exports.getCustomHeaderTypes = exports.getCustomSubBlockTypes = exports.getCustomItems = exports.getCustomBlockTypes = exports.getBlockKey = exports.getHeaderTag = void 0;
4
4
  const models_1 = require("../models");
5
5
  function getHeaderTag(size) {
6
6
  switch (size) {
@@ -25,6 +25,11 @@ const getCustomBlockTypes = ({ blocks = {}, headers = {} } = {}) => [
25
25
  exports.getCustomBlockTypes = getCustomBlockTypes;
26
26
  const getCustomItems = ({ blocks = {}, headers = {}, subBlocks = {} } = {}) => (Object.assign(Object.assign(Object.assign({}, blocks), headers), subBlocks));
27
27
  exports.getCustomItems = getCustomItems;
28
+ const getCustomSubBlockTypes = (customBlocks = {}) => {
29
+ const { subBlocks = {} } = customBlocks;
30
+ return Object.keys(subBlocks);
31
+ };
32
+ exports.getCustomSubBlockTypes = getCustomSubBlockTypes;
28
33
  const getCustomHeaderTypes = (customBlocks = {}) => {
29
34
  const { headers = {} } = customBlocks;
30
35
  return Object.keys(headers);
@@ -481,12 +481,69 @@ unpredictable css rules order in build */
481
481
  }
482
482
  }
483
483
 
484
- @mixin monochromeButton() {
485
- --yc-button-background-color: var(--pc-monochrome-button-background-color);
486
- --yc-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
487
- color: var(--pc-monochrome-button-color);
484
+ @mixin button($color, $backgroundColor, $hoverColor: $color, $hoverBackgroundColor) {
485
+ --yc-button-background-color: #{$backgroundColor};
486
+ --yc-button-background-color-hover: #{$hoverBackgroundColor};
487
+
488
+ &,
489
+ &:link,
490
+ &:visited,
491
+ &:active,
492
+ &:focus {
493
+ color: $color;
494
+ }
488
495
 
489
496
  &:hover {
490
- color: var(--pc-monochrome-button-color);
497
+ color: $hoverColor;
498
+ }
499
+ }
500
+
501
+ @mixin monochrome-button() {
502
+ @include button(
503
+ var(--pc-monochrome-button-color),
504
+ var(--pc-monochrome-button-background-color),
505
+ $hoverBackgroundColor: var(--pc-monochrome-button-background-color-hover)
506
+ );
507
+ }
508
+
509
+ @mixin centerable-title() {
510
+ &_centered {
511
+ text-align: center;
512
+
513
+ & > * {
514
+ margin: 0 auto;
515
+ }
516
+ }
517
+ }
518
+
519
+ @mixin tab-panel() {
520
+ display: flex;
521
+ flex-wrap: nowrap;
522
+ justify-content: flex-start;
523
+ overflow: auto;
524
+
525
+ &_centered {
526
+ display: flex;
527
+ justify-content: center;
528
+ flex-wrap: wrap;
529
+ }
530
+
531
+ @media (max-width: map-get($gridBreakpoints, 'md')) {
532
+ display: flex;
533
+ flex-wrap: nowrap;
534
+ justify-content: flex-start;
535
+ overflow: auto;
536
+
537
+ margin-left: -$indentL;
538
+ margin-right: -$indentL;
539
+ padding-left: $indentL;
540
+ padding-right: $indentL - $indentXXXS;
541
+ }
542
+
543
+ @media (max-width: map-get($gridBreakpoints, 'sm')) {
544
+ margin-left: -$indentSM;
545
+ margin-right: -$indentSM;
546
+ padding-left: $indentSM;
547
+ padding-right: $indentXS;
491
548
  }
492
549
  }
package/styles/root.scss CHANGED
@@ -19,6 +19,16 @@
19
19
  --pc-text-header-color: var(--yc-color-text-primary);
20
20
  --pc-media-card-meta-info-color: var(--yc-color-text-secondary);
21
21
 
22
+ --pc-tab-item-color: var(--yc-color-text-primary);
23
+ --pc-tab-item-background-color: var(--yc-color-base-generic);
24
+ --pc-tab-item-background-color-hover: var(--yc-color-base-generic-hover);
25
+
26
+ --pc-selected-tab-item-color: var(--pc-monochrome-button-color);
27
+ --pc-selected-tab-item-background-color: var(--pc-monochrome-button-background-color);
28
+ --pc-selected-tab-item-background-color-hover: var(
29
+ --pc-monochrome-button-background-color-hover
30
+ );
31
+
22
32
  &.yc-root_theme_dark {
23
33
  --pc-color-sfx-shadow: var(--yc-color-sfx-shadow);
24
34
  --pc-color-line-generic-active-solid: #6c6c70;