@gravity-ui/page-constructor 7.6.2 → 7.7.1

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 (74) hide show
  1. package/README.md +4 -0
  2. package/build/cjs/blocks/CardLayout/CardLayout.js.map +1 -1
  3. package/build/cjs/blocks/Companies/schema.d.ts +1 -0
  4. package/build/cjs/blocks/Companies/schema.js +2 -1
  5. package/build/cjs/blocks/Companies/schema.js.map +1 -1
  6. package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -2
  7. package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
  8. package/build/cjs/blocks/FilterBlock/FilterBlock.js.map +1 -1
  9. package/build/cjs/blocks/Header/Header.d.ts +7 -1
  10. package/build/cjs/blocks/Header/Header.js +6 -7
  11. package/build/cjs/blocks/Header/Header.js.map +1 -1
  12. package/build/cjs/blocks/Tabs/TabContent/TabContent.js +12 -12
  13. package/build/cjs/blocks/Tabs/TabContent/TabContent.js.map +1 -1
  14. package/build/cjs/blocks/Tabs/Tabs.js +1 -1
  15. package/build/cjs/blocks/Tabs/Tabs.js.map +1 -1
  16. package/build/cjs/components/UnpublishedLabel/UnpublishedLabel.js.map +1 -1
  17. package/build/cjs/components/YandexForm/YandexForm.js +1 -1
  18. package/build/cjs/components/YandexForm/YandexForm.js.map +1 -1
  19. package/build/cjs/containers/PageConstructor/Provider.js.map +1 -1
  20. package/build/cjs/context/windowWidthContext/BreakpointContext.js +1 -1
  21. package/build/cjs/context/windowWidthContext/BreakpointContext.js.map +1 -1
  22. package/build/cjs/grid/Grid/Grid.js.map +1 -1
  23. package/build/cjs/grid/Row/Row.d.ts +1 -1
  24. package/build/cjs/grid/Row/Row.js.map +1 -1
  25. package/build/cjs/models/constructor-items/sub-blocks.d.ts +1 -1
  26. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  27. package/build/cjs/models/navigation.d.ts +1 -1
  28. package/build/cjs/models/navigation.js.map +1 -1
  29. package/build/cjs/schema/constants.d.ts +5 -0
  30. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  31. package/build/cjs/sub-blocks/BackgroundCard/BackgroundCard.js.map +1 -1
  32. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +5 -0
  33. package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -0
  34. package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
  35. package/build/esm/blocks/CardLayout/CardLayout.js.map +1 -1
  36. package/build/esm/blocks/Companies/schema.d.ts +1 -0
  37. package/build/esm/blocks/Companies/schema.js +2 -1
  38. package/build/esm/blocks/Companies/schema.js.map +1 -1
  39. package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -2
  40. package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
  41. package/build/esm/blocks/FilterBlock/FilterBlock.js.map +1 -1
  42. package/build/esm/blocks/Header/Header.d.ts +7 -1
  43. package/build/esm/blocks/Header/Header.js +6 -7
  44. package/build/esm/blocks/Header/Header.js.map +1 -1
  45. package/build/esm/blocks/Tabs/TabContent/TabContent.js +7 -7
  46. package/build/esm/blocks/Tabs/TabContent/TabContent.js.map +1 -1
  47. package/build/esm/blocks/Tabs/Tabs.js +2 -2
  48. package/build/esm/blocks/Tabs/Tabs.js.map +1 -1
  49. package/build/esm/components/UnpublishedLabel/UnpublishedLabel.js.map +1 -1
  50. package/build/esm/components/YandexForm/YandexForm.js +1 -1
  51. package/build/esm/components/YandexForm/YandexForm.js.map +1 -1
  52. package/build/esm/containers/PageConstructor/Provider.js.map +1 -1
  53. package/build/esm/context/windowWidthContext/BreakpointContext.js +1 -1
  54. package/build/esm/context/windowWidthContext/BreakpointContext.js.map +1 -1
  55. package/build/esm/grid/Grid/Grid.d.ts +1 -1
  56. package/build/esm/grid/Grid/Grid.js +1 -1
  57. package/build/esm/grid/Grid/Grid.js.map +1 -1
  58. package/build/esm/grid/Row/Row.d.ts +1 -1
  59. package/build/esm/grid/Row/Row.js.map +1 -1
  60. package/build/esm/models/constructor-items/sub-blocks.d.ts +1 -1
  61. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  62. package/build/esm/models/navigation.d.ts +1 -1
  63. package/build/esm/models/navigation.js.map +1 -1
  64. package/build/esm/schema/constants.d.ts +5 -0
  65. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js +2 -2
  66. package/build/esm/sub-blocks/BackgroundCard/BackgroundCard.js.map +1 -1
  67. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +5 -0
  68. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -1
  69. package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
  70. package/package.json +1 -1
  71. package/schema/index.js +1 -1
  72. package/server/models/constructor-items/sub-blocks.d.ts +1 -1
  73. package/server/models/navigation.d.ts +1 -1
  74. package/widget/index.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BreakpointContext.js","sourceRoot":"../../../../src","sources":["context/windowWidthContext/BreakpointContext.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAC/B,0EAAuC;AACvC,uDAAyC;AACzC,kDAA4C;AAE5C,MAAM,aAAa,GAAG,uBAAW,CAAC,EAAE,CAAC;AACrC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEnB,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAS,aAAa,CAAC,CAAC;AAEtE,MAAM,mBAAmB,GAAG,CAAC,EAAC,QAAQ,EAA0B,EAAE,EAAE;IACvE,MAAM,EAAC,QAAQ,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAU,CAAC,CAAC;IAEhD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO;QACX,CAAC;QAED,MAAM,YAAY,GAAG,IAAA,kBAAQ,EACzB,GAAG,EAAE;YACD,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC,EACD,mBAAmB,EACnB,EAAC,OAAO,EAAE,IAAI,EAAC,CAClB,CAAC;QAEF,YAAY,EAAE,CAAC;QAEf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAEjE,6CAA6C;QAC7C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACH,uBAAC,0BAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAAG,QAAQ,GAA+B,CAC5F,CAAC;AACN,CAAC,CAAC;AA7BW,QAAA,mBAAmB,uBA6B9B;AAEK,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;AAA5D,QAAA,cAAc,kBAA8C","sourcesContent":["import * as React from 'react';\nimport throttle from 'lodash/throttle';\nimport {SSRContext} from '../ssrContext';\nimport {BREAKPOINTS} from '../../constants';\n\nconst DEFAULT_WIDTH = BREAKPOINTS.xl;\nconst UPDATE_FREQUENCY_MS = 100;\n\nexport const WindowWidthContext = React.createContext<number>(DEFAULT_WIDTH);\n\nexport const WindowWidthProvider = ({children}: React.PropsWithChildren) => {\n const {isServer} = React.useContext(SSRContext);\n\n const [windowWidth, setWindowWidth] = React.useState(DEFAULT_WIDTH);\n\n React.useEffect(() => {\n if (isServer) {\n return;\n }\n\n const handleResize = throttle(\n () => {\n setWindowWidth(window.innerWidth);\n },\n UPDATE_FREQUENCY_MS,\n {leading: true},\n );\n\n handleResize();\n\n window.addEventListener('resize', handleResize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => window.removeEventListener('resize', handleResize);\n }, [isServer]);\n\n return (\n <WindowWidthContext.Provider value={windowWidth}>{children}</WindowWidthContext.Provider>\n );\n};\n\nexport const useWindowWidth = () => React.useContext(WindowWidthContext);\n"]}
1
+ {"version":3,"file":"BreakpointContext.js","sourceRoot":"../../../../src","sources":["context/windowWidthContext/BreakpointContext.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAE/B,0EAAuC;AAEvC,kDAA4C;AAC5C,uDAAyC;AAEzC,MAAM,aAAa,GAAG,uBAAW,CAAC,EAAE,CAAC;AACrC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEnB,QAAA,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAS,aAAa,CAAC,CAAC;AAEtE,MAAM,mBAAmB,GAAG,CAAC,EAAC,QAAQ,EAA0B,EAAE,EAAE;IACvE,MAAM,EAAC,QAAQ,EAAC,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAU,CAAC,CAAC;IAEhD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO;QACX,CAAC;QAED,MAAM,YAAY,GAAG,IAAA,kBAAQ,EACzB,GAAG,EAAE;YACD,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC,EACD,mBAAmB,EACnB,EAAC,OAAO,EAAE,IAAI,EAAC,CAClB,CAAC;QAEF,YAAY,EAAE,CAAC;QAEf,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAEjE,6CAA6C;QAC7C,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACH,uBAAC,0BAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAAG,QAAQ,GAA+B,CAC5F,CAAC;AACN,CAAC,CAAC;AA7BW,QAAA,mBAAmB,uBA6B9B;AAEK,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,0BAAkB,CAAC,CAAC;AAA5D,QAAA,cAAc,kBAA8C","sourcesContent":["import * as React from 'react';\n\nimport throttle from 'lodash/throttle';\n\nimport {BREAKPOINTS} from '../../constants';\nimport {SSRContext} from '../ssrContext';\n\nconst DEFAULT_WIDTH = BREAKPOINTS.xl;\nconst UPDATE_FREQUENCY_MS = 100;\n\nexport const WindowWidthContext = React.createContext<number>(DEFAULT_WIDTH);\n\nexport const WindowWidthProvider = ({children}: React.PropsWithChildren) => {\n const {isServer} = React.useContext(SSRContext);\n\n const [windowWidth, setWindowWidth] = React.useState(DEFAULT_WIDTH);\n\n React.useEffect(() => {\n if (isServer) {\n return;\n }\n\n const handleResize = throttle(\n () => {\n setWindowWidth(window.innerWidth);\n },\n UPDATE_FREQUENCY_MS,\n {leading: true},\n );\n\n handleResize();\n\n window.addEventListener('resize', handleResize, {passive: true});\n\n // eslint-disable-next-line consistent-return\n return () => window.removeEventListener('resize', handleResize);\n }, [isServer]);\n\n return (\n <WindowWidthContext.Provider value={windowWidth}>{children}</WindowWidthContext.Provider>\n );\n};\n\nexport const useWindowWidth = () => React.useContext(WindowWidthContext);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","sourceRoot":"../../../../src","sources":["grid/Grid/Grid.tsx"],"names":[],"mappings":";;;;AAEA,gDAAkC;AAKlC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,MAAM,CAAC,CAAC;AASjB,MAAM,IAAI,GAAG,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,GAAG,EAAE,GACc,EAAE,EAAE,CAAC,CACtC,gCAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,SAAS,CAAC,YAC/C,gCAAK,SAAS,EAAE,mBAAmB,cAAc,EAAE,YAAG,QAAQ,GAAO,GACnE,CACT,CAAC;AAVW,QAAA,IAAI,QAUf","sourcesContent":["import * as React from 'react';\n\nimport {block} from '../../utils';\n\nimport '../styles/bootstrap.scss';\nimport './Grid.scss';\n\nconst b = block('Grid');\n\nexport interface GridProps {\n debug?: boolean;\n className?: string;\n containerClass?: string;\n style?: React.CSSProperties;\n}\n\nexport const Grid = ({\n debug,\n children,\n className,\n style,\n containerClass = '',\n}: React.PropsWithChildren<GridProps>) => (\n <div style={style} className={b({debug}, className)}>\n <div className={`container-fluid ${containerClass}`}>{children}</div>\n </div>\n);\n"]}
1
+ {"version":3,"file":"Grid.js","sourceRoot":"../../../../src","sources":["grid/Grid/Grid.tsx"],"names":[],"mappings":";;;;AAEA,gDAAkC;AAKlC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,MAAM,CAAC,CAAC;AASjB,MAAM,IAAI,GAAG,CAAC,EACjB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,GAAG,EAAE,GACc,EAAE,EAAE,CAAC,CACtC,gCAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,SAAS,CAAC,YAC/C,gCAAK,SAAS,EAAE,mBAAmB,cAAc,EAAE,YAAG,QAAQ,GAAO,GACnE,CACT,CAAC;AAVW,QAAA,IAAI,QAUf","sourcesContent":["import * as React from 'react';\n\nimport {block} from '../../utils';\n\nimport './Grid.scss';\nimport '../styles/bootstrap.scss';\n\nconst b = block('Grid');\n\nexport interface GridProps {\n debug?: boolean;\n className?: string;\n containerClass?: string;\n style?: React.CSSProperties;\n}\n\nexport const Grid = ({\n debug,\n children,\n className,\n style,\n containerClass = '',\n}: React.PropsWithChildren<GridProps>) => (\n <div style={style} className={b({debug}, className)}>\n <div className={`container-fluid ${containerClass}`}>{children}</div>\n </div>\n);\n"]}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { AriaProps, Roleable } from "../../models/index.js";
2
3
  import { ClassNameProps, Refable } from "../../models/common.js";
3
4
  import { GridAlignItems, GridJustifyContent } from "../types.js";
4
- import { AriaProps, Roleable } from "../../models/index.js";
5
5
  export interface RowProps extends ClassNameProps, Refable<HTMLDivElement>, Roleable, AriaProps {
6
6
  id?: string;
7
7
  justifyContent?: GridJustifyContent;
@@ -1 +1 @@
1
- {"version":3,"file":"Row.js","sourceRoot":"../../../../src","sources":["grid/Row/Row.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAelB,QAAA,GAAG,GAAG,KAAK,CAAC,UAAU,CAA2B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzE,MAAM,EAAC,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAC,GACzF,KAAK,CAAC;IAEV,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACxC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,IAAI,WAAW,CAAC;aACzE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtD,OAAO,CACH,gCAAK,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAM,SAAS,YACpF,QAAQ,GACP,CACT,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,WAAG,CAAC,WAAW,GAAG,KAAK,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {ClassNameProps, Refable} from '../../models/common';\nimport {GridAlignItems, GridJustifyContent} from '../types';\nimport {AriaProps, Roleable} from '../../models';\n\nexport interface RowProps extends ClassNameProps, Refable<HTMLDivElement>, Roleable, AriaProps {\n id?: string;\n justifyContent?: GridJustifyContent;\n alignItems?: GridAlignItems;\n noGutter?: boolean;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {\n const {id, className, justifyContent, alignItems, noGutter, style, role, ariaProps, children} =\n props;\n\n const getClassName = React.useCallback(() => {\n return ['row', className, justifyContent, alignItems, noGutter && 'no-gutter']\n .filter(Boolean)\n .join(' ');\n }, [className, justifyContent, alignItems, noGutter]);\n\n return (\n <div ref={ref} id={id} className={getClassName()} style={style} role={role} {...ariaProps}>\n {children}\n </div>\n );\n});\n\nRow.displayName = 'Row';\n"]}
1
+ {"version":3,"file":"Row.js","sourceRoot":"../../../../src","sources":["grid/Row/Row.tsx"],"names":[],"mappings":";;;;;AAAA,qDAA+B;AAelB,QAAA,GAAG,GAAG,KAAK,CAAC,UAAU,CAA2B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACzE,MAAM,EAAC,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAC,GACzF,KAAK,CAAC;IAEV,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACxC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,IAAI,WAAW,CAAC;aACzE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtD,OAAO,CACH,gCAAK,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAM,SAAS,YACpF,QAAQ,GACP,CACT,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,WAAG,CAAC,WAAW,GAAG,KAAK,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {AriaProps, Roleable} from '../../models';\nimport {ClassNameProps, Refable} from '../../models/common';\nimport {GridAlignItems, GridJustifyContent} from '../types';\n\nexport interface RowProps extends ClassNameProps, Refable<HTMLDivElement>, Roleable, AriaProps {\n id?: string;\n justifyContent?: GridJustifyContent;\n alignItems?: GridAlignItems;\n noGutter?: boolean;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n}\n\nexport const Row = React.forwardRef<HTMLDivElement, RowProps>((props, ref) => {\n const {id, className, justifyContent, alignItems, noGutter, style, role, ariaProps, children} =\n props;\n\n const getClassName = React.useCallback(() => {\n return ['row', className, justifyContent, alignItems, noGutter && 'no-gutter']\n .filter(Boolean)\n .join(' ');\n }, [className, justifyContent, alignItems, noGutter]);\n\n return (\n <div ref={ref} id={id} className={getClassName()} style={style} role={role} {...ariaProps}>\n {children}\n </div>\n );\n});\n\nRow.displayName = 'Row';\n"]}
@@ -98,7 +98,7 @@ export interface QuoteProps extends Themable, CardBaseProps {
98
98
  quoteType?: QuoteType;
99
99
  button?: ButtonProps;
100
100
  }
101
- export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {
101
+ export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, CardLayoutProps, Omit<ContentBlockProps, 'centered' | 'controlPosition'> {
102
102
  url?: string;
103
103
  urlTitle?: string;
104
104
  background?: ThemeSupporting<ImageObjectProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":";;;AA8BA,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,4BAAZ,YAAY,QAoBvB;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAYD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n size?: 's' | 'm' | 'l';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n target?: string;\n iconPosition?: IconPosition;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
1
+ {"version":3,"file":"sub-blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/sub-blocks.ts"],"names":[],"mappings":";;;AA8BA,IAAY,YAoBX;AApBD,WAAY,YAAY;IACpB,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf;;OAEG;IACH,gDAAgC,CAAA;IAChC,wCAAwB,CAAA;IACxB,0CAA0B,CAAA;IAC1B,0CAA0B,CAAA;IAC1B,kDAAkC,CAAA;IAClC,wCAAwB,CAAA;IACxB,mCAAmB,CAAA;IACnB,4CAA4B,CAAA;IAC5B;;OAEG;IACH,6BAAa,CAAA;IACb,wCAAwB,CAAA;IACxB,wCAAwB,CAAA;AAC5B,CAAC,EApBW,YAAY,4BAAZ,YAAY,QAoBvB;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,6BAAa,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAYD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import {ClassNameProps, QuoteType} from '../../models';\nimport {ThemeSupporting} from '../../utils';\nimport {\n HubspotEventData,\n HubspotEventHandlers,\n HubspotFormDefaultValues,\n} from '../../utils/hubspot';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {ContentBlockProps} from './blocks';\nimport {\n AuthorItem,\n ButtonProps,\n CardBaseProps,\n CardLayoutProps,\n ContentTheme,\n DividerSize,\n ImageCardMargins,\n ImageObjectProps,\n ImageProps,\n LayoutItemContentMargin,\n LinkProps,\n MediaProps,\n MediaView,\n PriceDetailedProps,\n TextTheme,\n Themable,\n ThemedImage,\n} from './common';\n\nexport enum SubBlockType {\n Divider = 'divider',\n Quote = 'quote',\n /**\n * @deprecated Will be removed\n */\n PriceDetailed = 'price-detailed',\n MediaCard = 'media-card',\n BannerCard = 'banner-card',\n LayoutItem = 'layout-item',\n BackgroundCard = 'background-card',\n BasicCard = 'basic-card',\n Content = 'content',\n HubspotForm = 'hubspot-form',\n /**\n * @deprecated Will be removed, use BasicCard instead\n */\n Card = 'card',\n PriceCard = 'price-card',\n ImageCard = 'image-card',\n}\n\nexport enum IconPosition {\n Top = 'top',\n Left = 'left',\n}\n\nexport interface PositionedIcon {\n value: ImageProps;\n position?: IconPosition;\n}\n\nexport interface IconWrapperProps {\n icon?: PositionedIcon;\n size?: 's' | 'm' | 'l';\n}\n\nexport enum ImageCardDirection {\n Direct = 'direct',\n Reverse = 'reverse',\n}\n\nexport const SubBlockTypes = Object.values(SubBlockType);\n\nexport interface DividerProps {\n size?: DividerSize;\n border?: boolean;\n}\n\nexport interface HubspotFormProps extends HubspotEventHandlers, AnalyticsEventsBase {\n className?: string;\n theme?: ContentTheme;\n isMobile?: boolean;\n region?: string;\n portalId: string;\n formId: string;\n formInstanceId?: string;\n formClassName?: string;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeLoad?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onBeforeSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onSubmit?: (arg: HubspotEventData) => void;\n\n /**\n * To use this handler for component that is rendered in iframe, set up useLoopBackHubspotEvents hook on top level frame\n */\n onLoad?: (arg: HubspotEventData) => void;\n hubspotEvents?: string[];\n createDOMElement?: boolean;\n defaultValues?: HubspotFormDefaultValues;\n}\n\n//cards\nexport interface QuoteProps extends Themable, CardBaseProps {\n text?: string;\n // for backward compatibility, yfmText will become property 'text' in major\n yfmText?: string;\n image: ThemedImage;\n logo: ThemeSupporting<ImageProps>;\n color?: string;\n /**\n * @deprecated use property button instead\n */\n url?: string;\n /**\n * @deprecated use property button instead\n */\n urlTitle?: string;\n author?: AuthorItem;\n /**\n * @deprecated use property button instead\n */\n buttonText?: string;\n theme?: TextTheme;\n quoteType?: QuoteType;\n button?: ButtonProps;\n}\n\nexport interface BackgroundCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'centered' | 'controlPosition'> {\n url?: string;\n urlTitle?: string;\n background?: ThemeSupporting<ImageObjectProps>;\n paddingBottom?: 's' | 'm' | 'l' | 'xl';\n backgroundColor?: string;\n}\n\nexport interface BasicCardProps\n extends CardBaseProps,\n AnalyticsEventsBase,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'theme' | 'controlPosition'> {\n url: string;\n urlTitle?: string;\n icon?: ThemeSupporting<ImageProps>;\n target?: string;\n iconPosition?: IconPosition;\n}\n\nexport interface BannerCardProps {\n title: string;\n subtitle?: string;\n className?: string;\n image?: ThemeSupporting<string>;\n disableCompress?: boolean;\n color?: ThemeSupporting<string>;\n theme?: TextTheme;\n button?: Pick<ButtonProps, 'text' | 'url' | 'target' | 'theme'>;\n mediaView?: MediaView;\n}\n\nexport interface MediaCardProps extends MediaProps, AnalyticsEventsBase, CardBaseProps {}\n\nexport interface PriceCardProps extends CardBaseProps, Pick<ContentBlockProps, 'theme'> {\n title: string;\n price: string;\n pricePeriod?: string;\n priceDetails?: string;\n description?: string;\n buttons?: ButtonProps[];\n links?: LinkProps[];\n backgroundColor?: string;\n list?: string[];\n}\n\nexport interface LayoutItemProps extends ClassNameProps, CardLayoutProps, AnalyticsEventsBase {\n content: Omit<ContentBlockProps, 'colSizes' | 'centered'>;\n contentMargin?: LayoutItemContentMargin;\n media?: ThemeSupporting<MediaProps>;\n metaInfo?: string[];\n border?: boolean;\n fullscreen?: boolean;\n icon?: ThemeSupporting<PositionedIcon>;\n}\n\nexport interface ImageCardProps\n extends CardBaseProps,\n CardLayoutProps,\n Omit<ContentBlockProps, 'colSizes' | 'centered' | 'controlPosition'> {\n image: ThemeSupporting<ImageProps>;\n enableImageBorderRadius?: boolean;\n margins?: ImageCardMargins;\n direction?: ImageCardDirection;\n backgroundColor?: string;\n url?: string;\n urlTitle?: string;\n target?: string;\n}\n\n// sub-block models\nexport type DividerModel = {\n type: SubBlockType.Divider;\n} & DividerProps;\n\nexport type QuoteModel = {\n type: SubBlockType.Quote;\n} & QuoteProps;\n\nexport type LayoutItemModel = {\n type: SubBlockType.LayoutItem;\n} & LayoutItemProps;\n\nexport type BackgroundCardModel = {\n type: SubBlockType.BackgroundCard;\n} & BackgroundCardProps;\n\n/** @deprecated */\nexport type PriceDetailedModel = {\n type: SubBlockType.PriceDetailed;\n} & PriceDetailedProps;\n\nexport type MediaCardModel = {\n type: SubBlockType.MediaCard;\n} & MediaCardProps;\n\nexport type HubspotFormModel = {\n type: SubBlockType.HubspotForm;\n} & HubspotFormProps;\n\nexport type BannerCardModel = {\n type: SubBlockType.BannerCard;\n} & BannerCardProps;\n\nexport type BasicCardModel = {\n type: SubBlockType.BasicCard;\n} & BasicCardProps;\n\nexport type PriceCardModel = {\n type: SubBlockType.PriceCard;\n} & PriceCardProps;\n\nexport type ImageCardModel = {\n type: SubBlockType.ImageCard;\n} & ImageCardProps;\n\nexport type SubBlockModels =\n | DividerModel\n | QuoteModel\n | PriceDetailedModel\n | MediaCardModel\n | BackgroundCardModel\n | HubspotFormModel\n | BannerCardModel\n | BasicCardModel\n | PriceCardModel\n | LayoutItemModel\n | ImageCardModel;\n\nexport type SubBlock = SubBlockModels;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { ThemeSupporting } from "../utils/index.js";
2
- import { ButtonProps, ImageProps } from "./constructor-items/index.js";
3
2
  import { AnalyticsEventsBase } from "./common.js";
3
+ import { ButtonProps, ImageProps } from "./constructor-items/index.js";
4
4
  export declare enum NavigationItemType {
5
5
  Link = "link",
6
6
  Dropdown = "dropdown",
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sourceRoot":"../../../src","sources":["models/navigation.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,mCAAa,CAAA;IACb,2CAAqB,CAAA;IACrB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,oDAA8B,CAAA;AAClC,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AASrE,IAAY,0BAWX;AAXD,WAAY,0BAA0B;IAClC,qDAAuB,CAAA;IACvB,iDAAmB,CAAA;IACnB,mDAAqB,CAAA;IACrB,0DAA4B,CAAA;IAC5B,4DAA8B,CAAA;IAC9B,oEAAsC,CAAA;IACtC,2DAA6B,CAAA;IAC7B,yDAA2B,CAAA;IAC3B,gEAAkC,CAAA;IAClC,mDAAqB,CAAA;AACzB,CAAC,EAXW,0BAA0B,0CAA1B,0BAA0B,QAWrC","sourcesContent":["import {ThemeSupporting} from '../utils';\n\nimport {ButtonProps, ImageProps} from './constructor-items';\nimport {AnalyticsEventsBase} from './common';\n\nexport enum NavigationItemType {\n Link = 'link',\n Dropdown = 'dropdown',\n Button = 'button',\n Social = 'social',\n GithubButton = 'github-button',\n}\n\nexport const NavigationItemTypes = Object.values(NavigationItemType);\n\nexport interface NavigationItemBase {\n text: string;\n icon?: ImageProps;\n url?: string;\n iconSize?: number;\n}\n\nexport enum NavigationGithubButtonIcon {\n heart = 'octicon-heart',\n eye = 'octicon-eye',\n star = 'octicon-star',\n fork = 'octicon-repo-forked',\n issue = 'octicon-issue-opened',\n comment = 'octicon-comment-discussion',\n download = 'octicon-download',\n package = 'octicon-package',\n template = 'octicon-repo-template',\n play = 'octicon-play',\n}\n\nexport interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {\n type: NavigationItemType.GithubButton;\n url: string;\n urlTitle?: string;\n label?: string;\n icon?: keyof typeof NavigationGithubButtonIcon;\n size?: string;\n}\n\nexport interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'>, AnalyticsEventsBase {\n type: NavigationItemType.Link;\n url: string;\n urlTitle?: string;\n arrow?: boolean;\n target?: string;\n}\n\nexport interface NavigationButtonItem extends ButtonProps {\n type: NavigationItemType.Button;\n}\n\nexport interface NavigationDropdownItem extends NavigationItemBase {\n type: NavigationItemType.Dropdown;\n items: NavigationLinkItem[];\n hidePopup: () => void;\n isActive: boolean;\n}\n\nexport interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {\n type: NavigationItemType.Social;\n icon: ImageProps;\n url: string;\n urlTitle?: string;\n}\n\nexport type NavigationItemModel =\n | NavigationLinkItem\n | NavigationButtonItem\n | NavigationDropdownItem;\n\nexport type NavigationItemData =\n | NavigationLinkItem\n | NavigationButtonItem\n | NavigationSocialItem\n | NavigationDropdownItem;\n\nexport interface NavigationLogoData {\n icon: ImageProps;\n text?: string;\n url?: string;\n urlTitle?: string;\n alt?: string;\n}\n\nexport type ThemedNavigationLogoData = NavigationLogoData & ThemeSupporting<NavigationLogoData>;\n\nexport interface HeaderData {\n leftItems: NavigationItemModel[];\n rightItems?: NavigationItemModel[];\n\n /**\n * Items for the navigation header on mobile devices.\n * They are located to the right of the Logo and to the left of the MobileMenuButton.\n * @type {NavigationItemModel[]}\n */\n customMobileHeaderItems?: NavigationItemModel[];\n iconSize?: number;\n withBorder?: boolean;\n withBorderOnScroll?: boolean;\n}\n\nexport interface FooterColumn {\n title: string;\n links: NavigationItemModel[];\n}\n\nexport interface FooterUnderline {\n links?: NavigationItemModel[];\n copyright?: string;\n}\n\nexport interface FooterData {\n columns: FooterColumn[];\n social?: NavigationSocialItem[];\n underline?: FooterUnderline;\n}\n\nexport interface NavigationData {\n logo: ThemedNavigationLogoData;\n header: HeaderData;\n footer?: FooterData;\n renderNavigation?: () => React.ReactNode;\n}\n"]}
1
+ {"version":3,"file":"navigation.js","sourceRoot":"../../../src","sources":["models/navigation.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC1B,mCAAa,CAAA;IACb,2CAAqB,CAAA;IACrB,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,oDAA8B,CAAA;AAClC,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AASrE,IAAY,0BAWX;AAXD,WAAY,0BAA0B;IAClC,qDAAuB,CAAA;IACvB,iDAAmB,CAAA;IACnB,mDAAqB,CAAA;IACrB,0DAA4B,CAAA;IAC5B,4DAA8B,CAAA;IAC9B,oEAAsC,CAAA;IACtC,2DAA6B,CAAA;IAC7B,yDAA2B,CAAA;IAC3B,gEAAkC,CAAA;IAClC,mDAAqB,CAAA;AACzB,CAAC,EAXW,0BAA0B,0CAA1B,0BAA0B,QAWrC","sourcesContent":["import {ThemeSupporting} from '../utils';\n\nimport {AnalyticsEventsBase} from './common';\nimport {ButtonProps, ImageProps} from './constructor-items';\n\nexport enum NavigationItemType {\n Link = 'link',\n Dropdown = 'dropdown',\n Button = 'button',\n Social = 'social',\n GithubButton = 'github-button',\n}\n\nexport const NavigationItemTypes = Object.values(NavigationItemType);\n\nexport interface NavigationItemBase {\n text: string;\n icon?: ImageProps;\n url?: string;\n iconSize?: number;\n}\n\nexport enum NavigationGithubButtonIcon {\n heart = 'octicon-heart',\n eye = 'octicon-eye',\n star = 'octicon-star',\n fork = 'octicon-repo-forked',\n issue = 'octicon-issue-opened',\n comment = 'octicon-comment-discussion',\n download = 'octicon-download',\n package = 'octicon-package',\n template = 'octicon-repo-template',\n play = 'octicon-play',\n}\n\nexport interface NavigationGithubButton extends Omit<NavigationItemBase, 'icon'> {\n type: NavigationItemType.GithubButton;\n url: string;\n urlTitle?: string;\n label?: string;\n icon?: keyof typeof NavigationGithubButtonIcon;\n size?: string;\n}\n\nexport interface NavigationLinkItem extends Omit<NavigationItemBase, 'url'>, AnalyticsEventsBase {\n type: NavigationItemType.Link;\n url: string;\n urlTitle?: string;\n arrow?: boolean;\n target?: string;\n}\n\nexport interface NavigationButtonItem extends ButtonProps {\n type: NavigationItemType.Button;\n}\n\nexport interface NavigationDropdownItem extends NavigationItemBase {\n type: NavigationItemType.Dropdown;\n items: NavigationLinkItem[];\n hidePopup: () => void;\n isActive: boolean;\n}\n\nexport interface NavigationSocialItem extends Omit<NavigationItemBase, 'text'> {\n type: NavigationItemType.Social;\n icon: ImageProps;\n url: string;\n urlTitle?: string;\n}\n\nexport type NavigationItemModel =\n | NavigationLinkItem\n | NavigationButtonItem\n | NavigationDropdownItem;\n\nexport type NavigationItemData =\n | NavigationLinkItem\n | NavigationButtonItem\n | NavigationSocialItem\n | NavigationDropdownItem;\n\nexport interface NavigationLogoData {\n icon: ImageProps;\n text?: string;\n url?: string;\n urlTitle?: string;\n alt?: string;\n}\n\nexport type ThemedNavigationLogoData = NavigationLogoData & ThemeSupporting<NavigationLogoData>;\n\nexport interface HeaderData {\n leftItems: NavigationItemModel[];\n rightItems?: NavigationItemModel[];\n\n /**\n * Items for the navigation header on mobile devices.\n * They are located to the right of the Logo and to the left of the MobileMenuButton.\n * @type {NavigationItemModel[]}\n */\n customMobileHeaderItems?: NavigationItemModel[];\n iconSize?: number;\n withBorder?: boolean;\n withBorderOnScroll?: boolean;\n}\n\nexport interface FooterColumn {\n title: string;\n links: NavigationItemModel[];\n}\n\nexport interface FooterUnderline {\n links?: NavigationItemModel[];\n copyright?: string;\n}\n\nexport interface FooterData {\n columns: FooterColumn[];\n social?: NavigationSocialItem[];\n underline?: FooterUnderline;\n}\n\nexport interface NavigationData {\n logo: ThemedNavigationLogoData;\n header: HeaderData;\n footer?: FooterData;\n renderNavigation?: () => React.ReactNode;\n}\n"]}
@@ -926,6 +926,11 @@ export declare const cardSchemas: {
926
926
  type: string;
927
927
  enum: string[];
928
928
  };
929
+ colSizes: {
930
+ type: string;
931
+ additionalProperties: boolean;
932
+ properties: {};
933
+ };
929
934
  title: {
930
935
  oneOf: ({
931
936
  type: string;
@@ -9,13 +9,13 @@ const utils_1 = require("../../utils/index.js");
9
9
  const Content_1 = tslib_1.__importDefault(require("../Content/Content.js"));
10
10
  const b = (0, utils_1.block)('background-card');
11
11
  const BackgroundCard = (props) => {
12
- const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, urlTitle, controlPosition = 'content', list, size = 's', } = props;
12
+ const { url, title, text, border, background, paddingBottom, backgroundColor, additionalInfo, theme: cardTheme = 'default', links, buttons, analyticsEvents, urlTitle, colSizes = { all: 12, md: 12 }, controlPosition = 'content', list, size = 's', } = props;
13
13
  const titleId = (0, uikit_1.useUniqId)();
14
14
  const theme = (0, theme_1.useTheme)();
15
15
  const hasBackgroundColor = backgroundColor || cardTheme !== 'default';
16
16
  const borderType = hasBackgroundColor ? 'none' : border;
17
17
  const areControlsInFooter = !paddingBottom && controlPosition === 'footer';
18
- return ((0, jsx_runtime_1.jsx)(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), contentClassName: b('content'), url: url, border: borderType, analyticsEvents: analyticsEvents, urlTitle: urlTitle, children: (0, jsx_runtime_1.jsxs)(components_1.CardBase.Content, { children: [(0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('image'), ...(0, utils_1.getThemedValue)(background, theme), style: { backgroundColor } }), (0, jsx_runtime_1.jsx)(Content_1.default, { titleId: titleId, title: title, text: text, additionalInfo: additionalInfo, size: size, theme: cardTheme, links: links, buttons: buttons, list: list, colSizes: { all: 12, md: 12 }, controlPosition: areControlsInFooter ? 'bottom' : 'default' })] }) }));
18
+ return ((0, jsx_runtime_1.jsx)(components_1.CardBase, { className: b({ padding: paddingBottom, theme: cardTheme }), contentClassName: b('content'), url: url, border: borderType, analyticsEvents: analyticsEvents, urlTitle: urlTitle, children: (0, jsx_runtime_1.jsxs)(components_1.CardBase.Content, { children: [(0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('image'), ...(0, utils_1.getThemedValue)(background, theme), style: { backgroundColor } }), (0, jsx_runtime_1.jsx)(Content_1.default, { titleId: titleId, title: title, text: text, additionalInfo: additionalInfo, size: size, theme: cardTheme, links: links, buttons: buttons, list: list, colSizes: colSizes, controlPosition: areControlsInFooter ? 'bottom' : 'default' })] }) }));
19
19
  };
20
20
  exports.default = BackgroundCard;
21
21
  //# sourceMappingURL=BackgroundCard.js.map
@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AAC,OAAO,CAAC,KACjB,IAAA,sBAAc,EAAC,UAAU,EAAE,KAAK,CAAC,EACrC,KAAK,EAAE,EAAC,eAAe,EAAC,GAC1B,EACF,uBAAC,iBAAO,IACJ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,EAC3B,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GAC7D,IACa,GACZ,CACd,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {BackgroundImage, CardBase} from '../../components/';\nimport {useTheme} from '../../context/theme';\nimport {BackgroundCardProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport Content from '../Content/Content';\n\nimport './BackgroundCard.scss';\n\nconst b = block('background-card');\n\nconst BackgroundCard = (props: BackgroundCardProps) => {\n const {\n url,\n title,\n text,\n border,\n background,\n paddingBottom,\n backgroundColor,\n additionalInfo,\n theme: cardTheme = 'default',\n links,\n buttons,\n analyticsEvents,\n urlTitle,\n controlPosition = 'content',\n list,\n size = 's',\n } = props;\n\n const titleId = useUniqId();\n\n const theme = useTheme();\n const hasBackgroundColor = backgroundColor || cardTheme !== 'default';\n const borderType = hasBackgroundColor ? 'none' : border;\n const areControlsInFooter = !paddingBottom && controlPosition === 'footer';\n\n return (\n <CardBase\n className={b({padding: paddingBottom, theme: cardTheme})}\n contentClassName={b('content')}\n url={url}\n border={borderType}\n analyticsEvents={analyticsEvents}\n urlTitle={urlTitle}\n >\n <CardBase.Content>\n <BackgroundImage\n className={b('image')}\n {...getThemedValue(background, theme)}\n style={{backgroundColor}}\n />\n <Content\n titleId={titleId}\n title={title}\n text={text}\n additionalInfo={additionalInfo}\n size={size}\n theme={cardTheme}\n links={links}\n buttons={buttons}\n list={list}\n colSizes={{all: 12, md: 12}}\n controlPosition={areControlsInFooter ? 'bottom' : 'default'}\n />\n </CardBase.Content>\n </CardBase>\n );\n};\n\nexport default BackgroundCard;\n"]}
1
+ {"version":3,"file":"BackgroundCard.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/BackgroundCard.tsx"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAE5C,0DAA4D;AAC5D,wDAA6C;AAE7C,gDAAkD;AAClD,4EAAyC;AAIzC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,iBAAiB,CAAC,CAAC;AAEnC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IAClD,MAAM,EACF,GAAG,EACH,KAAK,EACL,IAAI,EACJ,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,KAAK,EACL,OAAO,EACP,eAAe,EACf,QAAQ,EACR,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAC,EAC5B,eAAe,GAAG,SAAS,EAC3B,IAAI,EACJ,IAAI,GAAG,GAAG,GACb,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE5B,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,MAAM,kBAAkB,GAAG,eAAe,IAAI,SAAS,KAAK,SAAS,CAAC;IACtE,MAAM,UAAU,GAAG,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,mBAAmB,GAAG,CAAC,aAAa,IAAI,eAAe,KAAK,QAAQ,CAAC;IAE3E,OAAO,CACH,uBAAC,qBAAQ,IACL,SAAS,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAC,CAAC,EACxD,gBAAgB,EAAE,CAAC,CAAC,SAAS,CAAC,EAC9B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,UAAU,EAClB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,YAElB,wBAAC,qBAAQ,CAAC,OAAO,eACb,uBAAC,4BAAe,IACZ,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,KACjB,IAAA,sBAAc,EAAC,UAAU,EAAE,KAAK,CAAC,EACrC,KAAK,EAAE,EAAC,eAAe,EAAC,GAC1B,EACF,uBAAC,iBAAO,IACJ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,GAC7D,IACa,GACZ,CACd,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import {useUniqId} from '@gravity-ui/uikit';\n\nimport {BackgroundImage, CardBase} from '../../components/';\nimport {useTheme} from '../../context/theme';\nimport {BackgroundCardProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport Content from '../Content/Content';\n\nimport './BackgroundCard.scss';\n\nconst b = block('background-card');\n\nconst BackgroundCard = (props: BackgroundCardProps) => {\n const {\n url,\n title,\n text,\n border,\n background,\n paddingBottom,\n backgroundColor,\n additionalInfo,\n theme: cardTheme = 'default',\n links,\n buttons,\n analyticsEvents,\n urlTitle,\n colSizes = {all: 12, md: 12},\n controlPosition = 'content',\n list,\n size = 's',\n } = props;\n\n const titleId = useUniqId();\n\n const theme = useTheme();\n const hasBackgroundColor = backgroundColor || cardTheme !== 'default';\n const borderType = hasBackgroundColor ? 'none' : border;\n const areControlsInFooter = !paddingBottom && controlPosition === 'footer';\n\n return (\n <CardBase\n className={b({padding: paddingBottom, theme: cardTheme})}\n contentClassName={b('content')}\n url={url}\n border={borderType}\n analyticsEvents={analyticsEvents}\n urlTitle={urlTitle}\n >\n <CardBase.Content>\n <BackgroundImage\n className={b('image')}\n {...getThemedValue(background, theme)}\n style={{backgroundColor}}\n />\n <Content\n titleId={titleId}\n title={title}\n text={text}\n additionalInfo={additionalInfo}\n size={size}\n theme={cardTheme}\n links={links}\n buttons={buttons}\n list={list}\n colSizes={colSizes}\n controlPosition={areControlsInFooter ? 'bottom' : 'default'}\n />\n </CardBase.Content>\n </CardBase>\n );\n};\n\nexport default BackgroundCard;\n"]}
@@ -175,6 +175,11 @@ export declare const BackgroundCard: {
175
175
  type: string;
176
176
  enum: string[];
177
177
  };
178
+ colSizes: {
179
+ type: string;
180
+ additionalProperties: boolean;
181
+ properties: {};
182
+ };
178
183
  title: {
179
184
  oneOf: ({
180
185
  type: string;
@@ -48,6 +48,7 @@ exports.BackgroundCard = {
48
48
  type: 'string',
49
49
  enum: ['content', 'footer'],
50
50
  },
51
+ colSizes: common_1.containerSizesObject,
51
52
  },
52
53
  },
53
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAA+D;AAC/D,8DAA+F;AAC/F,4DAAmE;AACnE,iDAA8C;AAE9C,MAAM,0BAA0B,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAErE,QAAA,cAAc,GAAG;IAC1B,iBAAiB,EAAE;QACf,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE;YACR,GAAG,kBAAS;YACZ,GAAG,iBAAQ;YACX,GAAG,wBAAe;YAClB,GAAG,0BAA0B;YAC7B,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;YACvC,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;aAC9B;YACD,eAAe,EAAE;gBACb,KAAK,EAAE;oBACH;wBACI,GAAG,4BAAoB;wBACvB,UAAU,EAAE,QAAQ;qBACvB;oBACD;wBACI,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,4BAAoB;wBAC3B,UAAU,EAAE,MAAM;qBACrB;iBACJ;aACJ;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;SACJ;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageObjectProps} from '../../components/Image/schema';\nimport {BaseProps, CardBase, CardLayoutProps, withTheme} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../Content/schema';\n\nconst BackgroundCardContentProps = omit(ContentBase, ['size', 'controlPosition']);\n\nexport const BackgroundCard = {\n 'background-card': {\n additionalProperties: false,\n required: ['title', 'text'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BackgroundCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n background: withTheme(ImageObjectProps),\n backgroundColor: {\n type: 'string',\n },\n paddingBottom: {\n type: 'string',\n enum: ['s', 'm', 'l', 'xl'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["sub-blocks/BackgroundCard/schema.ts"],"names":[],"mappings":";;;;AAAA,kEAA+B;AAE/B,6DAA+D;AAC/D,8DAMwC;AACxC,4DAAmE;AACnE,iDAA8C;AAE9C,MAAM,0BAA0B,GAAG,IAAA,cAAI,EAAC,oBAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAErE,QAAA,cAAc,GAAG;IAC1B,iBAAiB,EAAE;QACf,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;QAC3B,UAAU,EAAE;YACR,GAAG,kBAAS;YACZ,GAAG,iBAAQ;YACX,GAAG,wBAAe;YAClB,GAAG,0BAA0B;YAC7B,GAAG,EAAE;gBACD,IAAI,EAAE,QAAQ;aACjB;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,QAAQ;aACjB;YACD,UAAU,EAAE,IAAA,kBAAS,EAAC,yBAAgB,CAAC;YACvC,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;aACjB;YACD,aAAa,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;aAC9B;YACD,eAAe,EAAE;gBACb,KAAK,EAAE;oBACH;wBACI,GAAG,4BAAoB;wBACvB,UAAU,EAAE,QAAQ;qBACvB;oBACD;wBACI,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,4BAAoB;wBAC3B,UAAU,EAAE,MAAM;qBACrB;iBACJ;aACJ;YACD,eAAe,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;aAC9B;YACD,QAAQ,EAAE,6BAAoB;SACjC;KACJ;CACJ,CAAC","sourcesContent":["import omit from 'lodash/omit';\n\nimport {ImageObjectProps} from '../../components/Image/schema';\nimport {\n BaseProps,\n CardBase,\n CardLayoutProps,\n containerSizesObject,\n withTheme,\n} from '../../schema/validators/common';\nimport {AnalyticsEventSchema} from '../../schema/validators/event';\nimport {ContentBase} from '../Content/schema';\n\nconst BackgroundCardContentProps = omit(ContentBase, ['size', 'controlPosition']);\n\nexport const BackgroundCard = {\n 'background-card': {\n additionalProperties: false,\n required: ['title', 'text'],\n properties: {\n ...BaseProps,\n ...CardBase,\n ...CardLayoutProps,\n ...BackgroundCardContentProps,\n url: {\n type: 'string',\n },\n urlTitle: {\n type: 'string',\n },\n background: withTheme(ImageObjectProps),\n backgroundColor: {\n type: 'string',\n },\n paddingBottom: {\n type: 'string',\n enum: ['s', 'm', 'l', 'xl'],\n },\n analyticsEvents: {\n oneOf: [\n {\n ...AnalyticsEventSchema,\n optionName: 'single',\n },\n {\n type: 'array',\n items: AnalyticsEventSchema,\n optionName: 'list',\n },\n ],\n },\n controlPosition: {\n type: 'string',\n enum: ['content', 'footer'],\n },\n colSizes: containerSizesObject,\n },\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,KAAK,EAAC,kCAAyB;AACtE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAuB,GAAG,EAAC,4BAAmB;AAEzD,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,kBAAkB,CAAC;A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eAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
1
+ {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,KAAK,EAAC,kCAAyB;AACtE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAuB,GAAG,EAAC,4BAAmB;AAEzD,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,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,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
@@ -10,6 +10,7 @@ export declare const CompaniesBlock: {
10
10
  description: {
11
11
  type: string;
12
12
  contentType: string;
13
+ inputType: string;
13
14
  };
14
15
  images: {
15
16
  oneOf: (({
@@ -12,7 +12,8 @@ export const CompaniesBlock = {
12
12
  },
13
13
  description: {
14
14
  type: 'string',
15
- contentType: 'text',
15
+ contentType: 'yfm',
16
+ inputType: 'textarea',
16
17
  },
17
18
  images: withTheme({
18
19
  type: 'object',
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Companies/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAC,0CAAuC;AAErF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,iBAAiB,EAAE;QACf,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC7B,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,eAAe;YAClB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB;YACD,MAAM,EAAE,SAAS,CAAC;gBACd,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;gBACzC,UAAU,EAAE;oBACR,OAAO,EAAE;wBACL,IAAI,EAAE,QAAQ;qBACjB;oBACD,MAAM,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACjB;oBACD,MAAM,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACjB;oBACD,GAAG,EAAE;wBACD,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,MAAM;qBACtB;iBACJ;aACJ,CAAC;SACL;KACJ;CACJ,CAAC","sourcesContent":["import {AnimatableProps, BaseProps, withTheme} from '../../schema/validators/common';\n\nexport const CompaniesBlock = {\n 'companies-block': {\n additionalProperties: false,\n required: ['title', 'images'],\n properties: {\n ...BaseProps,\n ...AnimatableProps,\n title: {\n type: 'string',\n contentType: 'text',\n },\n description: {\n type: 'string',\n contentType: 'text',\n },\n images: withTheme({\n type: 'object',\n required: ['desktop', 'tablet', 'mobile'],\n properties: {\n desktop: {\n type: 'string',\n },\n tablet: {\n type: 'string',\n },\n mobile: {\n type: 'string',\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n }),\n },\n },\n};\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/Companies/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,SAAS,EAAC,0CAAuC;AAErF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,iBAAiB,EAAE;QACf,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC7B,UAAU,EAAE;YACR,GAAG,SAAS;YACZ,GAAG,eAAe;YAClB,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACtB;YACD,WAAW,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,KAAK;gBAClB,SAAS,EAAE,UAAU;aACxB;YACD,MAAM,EAAE,SAAS,CAAC;gBACd,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC;gBACzC,UAAU,EAAE;oBACR,OAAO,EAAE;wBACL,IAAI,EAAE,QAAQ;qBACjB;oBACD,MAAM,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACjB;oBACD,MAAM,EAAE;wBACJ,IAAI,EAAE,QAAQ;qBACjB;oBACD,GAAG,EAAE;wBACD,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,MAAM;qBACtB;iBACJ;aACJ,CAAC;SACL;KACJ;CACJ,CAAC","sourcesContent":["import {AnimatableProps, BaseProps, withTheme} from '../../schema/validators/common';\n\nexport const CompaniesBlock = {\n 'companies-block': {\n additionalProperties: false,\n required: ['title', 'images'],\n properties: {\n ...BaseProps,\n ...AnimatableProps,\n title: {\n type: 'string',\n contentType: 'text',\n },\n description: {\n type: 'string',\n contentType: 'yfm',\n inputType: 'textarea',\n },\n images: withTheme({\n type: 'object',\n required: ['desktop', 'tablet', 'mobile'],\n properties: {\n desktop: {\n type: 'string',\n },\n tablet: {\n type: 'string',\n },\n mobile: {\n type: 'string',\n },\n alt: {\n type: 'string',\n contentType: 'text',\n },\n },\n }),\n },\n },\n};\n"]}
@@ -2,13 +2,13 @@ import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from 'react';
4
4
  import { BackgroundImage, FileLink } from "../../components/index.js";
5
+ import { BREAKPOINTS } from "../../constants.js";
5
6
  import { useTheme } from "../../context/theme/index.js";
7
+ import { useWindowWidth } from "../../context/windowWidthContext/index.js";
6
8
  import { Col } from "../../grid/index.js";
7
9
  import { Content } from "../../sub-blocks/index.js";
8
10
  import { block, getThemedValue } from "../../utils/index.js";
9
11
  import './ContentLayout.css';
10
- import { useWindowWidth } from "../../context/windowWidthContext/index.js";
11
- import { BREAKPOINTS } from "../../constants.js";
12
12
  const b = block('content-layout-block');
13
13
  function getFileTextSize(size) {
14
14
  switch (size) {
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,kCAAyB;AAC3D,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAE/B,OAAO,EAAC,OAAO,EAAC,kCAAyB;AACzC,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAC,cAAc,EAAC,kDAAyC;AAChE,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,MAAM,CAAC,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;Q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Q,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,eAAC,QAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,KAAC,eAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {BREAKPOINTS} from '../../constants';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAC,kCAAyB;AAC3D,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,cAAc,EAAC,kDAAyC;AAChE,OAAO,EAAC,GAAG,EAAC,4BAAmB;AAE/B,OAAO,EAAC,OAAO,EAAC,kCAAyB;AACzC,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,qBAAqB,CAAC;AAE7B,MAAM,CAAC,GAAG,KAAK,CAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;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,WAAW,EACf,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,eAAC,QAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,cAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,KAAC,eAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FilterBlock.js","sourceRoot":"../../../../src","sources":["blocks/FilterBlock/FilterBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAC,oBAAW;AACnC,OAAO,EAAC,YAAY,EAAE,KAAK,EAAC,kCAAyB;AACrD,OAAO,UAAiC,kDAA+C;AACvF,OAAO,EAAC,eAAe,EAAC,6EAAoE;AAC5F,OAAO,EAAC,GAAG,EAAE,GAAG,EAAC,4BAAmB;AAEpC,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,6BAAoB;AAE/C,OAAO,EAAC,IAAI,EAAC,wBAAe;AAC5B,OAAO,mBAAmB,CAAC;AAE3B,MAAM,CAAC,GAAG,KAAK,CAAC,cAAc,CAA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,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,YACxE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;wBACvB,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;wBAErC,OAAO,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAO,GAAG,CAAI,CAAC;oBACpE,CAAC,CAAC,GACY,GAChB,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {CardLayoutBlock} from '..';\nimport {AnimateBlock, Title} from '../../components';\nimport ButtonTabs, {ButtonTabsItemProps} from '../../components/ButtonTabs/ButtonTabs';\nimport {ConstructorItem} from '../../containers/PageConstructor/components/ConstructorItem';\nimport {Col, Row} from '../../grid';\nimport {FilterBlockProps, FilterItem} from '../../models';\nimport {block, getBlockKey} from '../../utils';\n\nimport {i18n} from './i18n';\nimport './FilterBlock.scss';\n\nconst b = block('filter-block');\n\nconst FilterBlock = ({\n title,\n description,\n tags,\n tagButtonSize,\n allTag,\n items,\n colSizes,\n centered,\n animated,\n}: FilterBlockProps) => {\n const tabButtons = React.useMemo(() => {\n const allButton: ButtonTabsItemProps | undefined = allTag\n ? {id: null, title: typeof allTag === 'boolean' ? i18n('label-all-tag') : allTag}\n : undefined;\n const otherButtons: ButtonTabsItemProps[] | undefined =\n tags && tags.map((tag) => ({id: tag.id, title: tag.label}));\n return [...(allButton ? [allButton] : []), ...(otherButtons ? otherButtons : [])];\n }, [allTag, tags]);\n\n const [selectedTag, setSelectedTag] = React.useState(\n tabButtons.length ? tabButtons[0].id : null,\n );\n\n const actualTag: string | null = React.useMemo(() => {\n return tabButtons.length && !tabButtons.find((tab) => tab.id === selectedTag)\n ? tabButtons[0].id\n : selectedTag;\n }, [tabButtons, selectedTag]);\n\n const cards = React.useMemo(() => {\n const itemsToShow: FilterItem[] = actualTag\n ? items.filter((item) => item.tags.includes(actualTag))\n : items;\n\n return itemsToShow.map((item) => item.card);\n }, [actualTag, items]);\n\n return (\n <AnimateBlock className={b()} animate={animated}>\n {title && (\n <Title\n className={b('title', {centered: centered})}\n title={title}\n subtitle={description}\n />\n )}\n {tabButtons.length && (\n <Row>\n <Col>\n <ButtonTabs\n className={b('tabs', {centered: centered})}\n items={tabButtons}\n activeTab={selectedTag}\n onSelectTab={setSelectedTag}\n tabSize={tagButtonSize}\n />\n </Col>\n </Row>\n )}\n <Row className={b('block-container')}>\n <CardLayoutBlock title=\"\" colSizes={colSizes} className={b('cards-container')}>\n {cards.map((card, index) => {\n const key = getBlockKey(card, index);\n\n return <ConstructorItem data={card} blockKey={key} key={key} />;\n })}\n </CardLayoutBlock>\n </Row>\n </AnimateBlock>\n );\n};\nexport default FilterBlock;\n"]}
1
+ {"version":3,"file":"FilterBlock.js","sourceRoot":"../../../../src","sources":["blocks/FilterBlock/FilterBlock.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,eAAe,EAAC,oBAAW;AACnC,OAAO,EAAC,YAAY,EAAE,KAAK,EAAC,kCAAyB;AACrD,OAAO,UAAiC,kDAA+C;AACvF,OAAO,EAAC,eAAe,EAAC,6EAAoE;AAC5F,OAAO,EAAC,GAAG,EAAE,GAAG,EAAC,4BAAmB;AAEpC,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,6BAAoB;AAE/C,OAAO,EAAC,IAAI,EAAC,wBAAe;AAE5B,OAAO,mBAAmB,CAAC;AAE3B,MAAM,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAEhC,MAAM,WAAW,GAAG,CAAC,EACjB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAa,EACb,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,GACO,EAAE,EAAE;IACnB,MA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,IAAI,EAAE,KAAK,CAAC,CAAC;wBAErC,OAAO,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAO,GAAG,CAAI,CAAC;oBACpE,CAAC,CAAC,GACY,GAChB,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {CardLayoutBlock} from '..';\nimport {AnimateBlock, Title} from '../../components';\nimport ButtonTabs, {ButtonTabsItemProps} from '../../components/ButtonTabs/ButtonTabs';\nimport {ConstructorItem} from '../../containers/PageConstructor/components/ConstructorItem';\nimport {Col, Row} from '../../grid';\nimport {FilterBlockProps, FilterItem} from '../../models';\nimport {block, getBlockKey} from '../../utils';\n\nimport {i18n} from './i18n';\n\nimport './FilterBlock.scss';\n\nconst b = block('filter-block');\n\nconst FilterBlock = ({\n title,\n description,\n tags,\n tagButtonSize,\n allTag,\n items,\n colSizes,\n centered,\n animated,\n}: FilterBlockProps) => {\n const tabButtons = React.useMemo(() => {\n const allButton: ButtonTabsItemProps | undefined = allTag\n ? {id: null, title: typeof allTag === 'boolean' ? i18n('label-all-tag') : allTag}\n : undefined;\n const otherButtons: ButtonTabsItemProps[] | undefined =\n tags && tags.map((tag) => ({id: tag.id, title: tag.label}));\n return [...(allButton ? [allButton] : []), ...(otherButtons ? otherButtons : [])];\n }, [allTag, tags]);\n\n const [selectedTag, setSelectedTag] = React.useState(\n tabButtons.length ? tabButtons[0].id : null,\n );\n\n const actualTag: string | null = React.useMemo(() => {\n return tabButtons.length && !tabButtons.find((tab) => tab.id === selectedTag)\n ? tabButtons[0].id\n : selectedTag;\n }, [tabButtons, selectedTag]);\n\n const cards = React.useMemo(() => {\n const itemsToShow: FilterItem[] = actualTag\n ? items.filter((item) => item.tags.includes(actualTag))\n : items;\n\n return itemsToShow.map((item) => item.card);\n }, [actualTag, items]);\n\n return (\n <AnimateBlock className={b()} animate={animated}>\n {title && (\n <Title\n className={b('title', {centered: centered})}\n title={title}\n subtitle={description}\n />\n )}\n {tabButtons.length && (\n <Row>\n <Col>\n <ButtonTabs\n className={b('tabs', {centered: centered})}\n items={tabButtons}\n activeTab={selectedTag}\n onSelectTab={setSelectedTag}\n tabSize={tagButtonSize}\n />\n </Col>\n </Row>\n )}\n <Row className={b('block-container')}>\n <CardLayoutBlock title=\"\" colSizes={colSizes} className={b('cards-container')}>\n {cards.map((card, index) => {\n const key = getBlockKey(card, index);\n\n return <ConstructorItem data={card} blockKey={key} key={key} />;\n })}\n </CardLayoutBlock>\n </Row>\n </AnimateBlock>\n );\n};\nexport default FilterBlock;\n"]}
@@ -1,6 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { ClassNameProps, HeaderBlockProps } from "../../models/index.js";
3
3
  import './Header.css';
4
- export type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps;
4
+ type ElementsClassName = {
5
+ gridClassName?: string;
6
+ mediaClassName?: string;
7
+ contentWrapperClassName?: string;
8
+ contentInnerClassName?: string;
9
+ };
10
+ export type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps & ElementsClassName;
5
11
  export declare const HeaderBlock: (props: React.PropsWithChildren<HeaderBlockFullProps>) => import("react/jsx-runtime").JSX.Element;
6
12
  export default HeaderBlock;
@@ -1,18 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable complexity */
3
2
  import { useUniqId } from '@gravity-ui/uikit';
4
3
  import { Button, Media, RouterLink } from "../../components/index.js";
5
4
  import HeaderBreadcrumbs from "../../components/HeaderBreadcrumbs/HeaderBreadcrumbs.js";
6
5
  import { getMediaImage } from "../../components/Media/Image/utils.js";
7
6
  import YFMWrapper from "../../components/YFMWrapper/YFMWrapper.js";
7
+ import { BREAKPOINTS } from "../../constants.js";
8
8
  import { useTheme } from "../../context/theme/index.js";
9
+ import { useWindowWidth } from "../../context/windowWidthContext/index.js";
9
10
  import { Col, Grid, Row } from "../../grid/index.js";
10
11
  import { block, getThemedValue } from "../../utils/index.js";
11
12
  import { mergeVideoMicrodata } from "../../utils/microdata.js";
12
13
  import { getImageSize, getTitleSizes, titleWithImageSizes } from "./utils.js";
13
14
  import './Header.css';
14
- import { useWindowWidth } from "../../context/windowWidthContext/index.js";
15
- import { BREAKPOINTS } from "../../constants.js";
16
15
  const b = block('header-block');
17
16
  const Background = ({ background, isMobile }) => {
18
17
  const { url, image, fullWidthMedia, video, color } = background;
@@ -22,7 +21,7 @@ const Background = ({ background, isMobile }) => {
22
21
  };
23
22
  const FullWidthBackground = ({ background }) => (_jsx("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background?.color } }));
24
23
  export const HeaderBlock = (props) => {
25
- const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, renderTitle, children, mediaView = 'full', centered, additionalInfo, } = props;
24
+ const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, gridClassName, breadcrumbs, status, renderTitle, children, mediaView = 'full', centered, additionalInfo, mediaClassName, contentWrapperClassName, contentInnerClassName, } = props;
26
25
  const windowWidth = useWindowWidth();
27
26
  const isMobile = windowWidth <= BREAKPOINTS.sm;
28
27
  const theme = useTheme();
@@ -44,11 +43,11 @@ export const HeaderBlock = (props) => {
44
43
  ['full-width']: fullWidth,
45
44
  ['media-view']: mediaView,
46
45
  ['controls-view']: textTheme,
47
- }, className), children: [backgroundThemed && fullWidth && _jsx(FullWidthBackground, { background: backgroundThemed }), backgroundThemed && _jsx(Background, { background: backgroundThemed, isMobile: isMobile }), _jsxs(Grid, { containerClass: b('container-fluid'), children: [breadcrumbs && (_jsx(Row, { className: b('breadcrumbs'), children: _jsx(Col, { children: _jsx(HeaderBreadcrumbs, { ...breadcrumbs, theme: textTheme }) }) })), _jsx(Row, { children: _jsxs(Col, { reset: true, className: b('content-wrapper'), children: [_jsx(Row, { children: _jsx(Col, { className: b('content', {
46
+ }, className), children: [backgroundThemed && fullWidth && _jsx(FullWidthBackground, { background: backgroundThemed }), backgroundThemed && _jsx(Background, { background: backgroundThemed, isMobile: isMobile }), _jsxs(Grid, { containerClass: b('container-fluid'), className: b(null, gridClassName), children: [breadcrumbs && (_jsx(Row, { className: b('breadcrumbs'), children: _jsx(Col, { children: _jsx(HeaderBreadcrumbs, { ...breadcrumbs, theme: textTheme }) }) })), _jsx(Row, { children: _jsxs(Col, { reset: true, className: b('content-wrapper', contentWrapperClassName), children: [_jsx(Row, { children: _jsx(Col, { className: b('content', {
48
47
  offset,
49
48
  theme: textTheme,
50
49
  'vertical-offset': curVerticalOffset,
51
- }), children: _jsxs(Col, { sizes: titleSizes, className: b('content-inner', { centered }), children: [overtitle && (_jsx("div", { className: b('overtitle'), children: typeof overtitle === 'string' ? (_jsx(YFMWrapper, { tagName: "div", className: b('overtitle'), content: overtitle, modifiers: { constructor: true } })) : (overtitle) })), _jsxs(YFMWrapper, { content: title, contentClassName: b('title'), className: b('title-container'), modifiers: { constructor: true, constructorTheme: textTheme }, tagName: "h1", contentPosition: "end", children: [status, renderTitle ? renderTitle(title) : null] }), description && (_jsx("div", { className: b('description', { theme: textTheme }), children: _jsx(YFMWrapper, { content: description, modifiers: {
50
+ }), children: _jsxs(Col, { sizes: titleSizes, className: b('content-inner', { centered }, contentInnerClassName), children: [overtitle && (_jsx("div", { className: b('overtitle'), children: typeof overtitle === 'string' ? (_jsx(YFMWrapper, { tagName: "div", className: b('overtitle'), content: overtitle, modifiers: { constructor: true } })) : (overtitle) })), _jsxs(YFMWrapper, { content: title, contentClassName: b('title'), className: b('title-container'), modifiers: { constructor: true, constructorTheme: textTheme }, tagName: "h1", contentPosition: "end", children: [status, renderTitle ? renderTitle(title) : null] }), description && (_jsx("div", { className: b('description', { theme: textTheme }), children: _jsx(YFMWrapper, { content: description, modifiers: {
52
51
  constructor: true,
53
52
  constructorTheme: textTheme,
54
53
  } }) })), additionalInfo && (_jsx("div", { className: b('additional-info', { theme: textTheme }), children: _jsx(YFMWrapper, { content: additionalInfo, modifiers: {
@@ -57,7 +56,7 @@ export const HeaderBlock = (props) => {
57
56
  } }) })), buttons && (_jsx("div", { className: b('buttons'), "data-qa": "header-buttons", children: buttons.map((button, index) => (_jsx(RouterLink, { href: button.url, children: _jsx(Button, { className: b('button'), size: "xl", extraProps: {
58
57
  'aria-describedby': titleId,
59
58
  ...button.extraProps,
60
- }, ...button }, index) }, index))) })), children] }) }) }), hasRightSideImage && (_jsx(Media, { className: b('media', { [curImageSize]: true }), videoClassName: b('video'), imageClassName: b('image'), ...mediaWithMicrodata }))] }) })] })] }));
59
+ }, ...button }, index) }, index))) })), children] }) }) }), hasRightSideImage && (_jsx(Media, { className: b('media', { [curImageSize]: true }, mediaClassName), videoClassName: b('video'), imageClassName: b('image'), ...mediaWithMicrodata }))] }) })] })] }));
61
60
  };
62
61
  export default HeaderBlock;
63
62
  //# sourceMappingURL=Header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAC3D,OAAO,iBAAiB,gEAA6D;AACrF,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,UAAU,kDAA+C;AAChE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAC,4BAAmB;AAE1C,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAClD,OAAO,EAAC,mBAAmB,EAAC,iCAA8B;AAE1D,OAAO,EAAC,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAC,mBAAgB;AACzE,OAAO,cAAc,CAAC;AACtB,OAAO,EAAC,cAA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E,CAAC,CAAC,SAAS,CAAC,aAAU,gBAAgB,YACjD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,UAAU,IAAC,IAAI,EAAE,MAAM,CAAC,GAAG,YACxB,KAAC,MAAM,IAEH,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EACtB,IAAI,EAAC,IAAI,EACT,UAAU,EAAE;gEACR,kBAAkB,EAAE,OAAO;gEAC3B,GAAG,MAAM,CAAC,UAAU;6DACvB,KACG,MAAM,IAPL,KAAK,CAQZ,IAV6B,KAAK,CAW3B,CAChB,CAAC,GACA,CACT,EACA,QAAQ,IACP,GACJ,GACJ,EACL,iBAAiB,IAAI,CAClB,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAC,CAAC,EAC7C,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,KACtB,kBAAkB,GACxB,CACL,IACC,GACJ,IACH,IACF,CACZ,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport {useUniqId} from '@gravity-ui/uikit';\nimport * as React from 'react';\n\nimport {Button, Media, RouterLink} from '../../components';\nimport HeaderBreadcrumbs from '../../components/HeaderBreadcrumbs/HeaderBreadcrumbs';\nimport {getMediaImage} from '../../components/Media/Image/utils';\nimport YFMWrapper from '../../components/YFMWrapper/YFMWrapper';\nimport {useTheme} from '../../context/theme';\nimport {Col, Grid, Row} from '../../grid';\nimport {ClassNameProps, HeaderBlockBackground, HeaderBlockProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport {mergeVideoMicrodata} from '../../utils/microdata';\n\nimport {getImageSize, getTitleSizes, titleWithImageSizes} from './utils';\nimport './Header.scss';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {BREAKPOINTS} from '../../constants';\n\nconst b = block('header-block');\n\nexport type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps;\n\ninterface BackgroundProps {\n background: HeaderBlockBackground;\n isMobile: boolean;\n}\n\nconst Background = ({background, isMobile}: BackgroundProps) => {\n const {url, image, fullWidthMedia, video, color} = background;\n const imageObject = url ? getMediaImage(url) : image;\n const renderMedia = !isMobile || (typeof image === 'object' && 'mobile' in image);\n\n return (\n <div\n className={b('background', {media: true, 'full-width-media': fullWidthMedia})}\n style={{backgroundColor: color}}\n >\n {renderMedia && (\n <Media\n {...background}\n className={b('background-media')}\n imageClassName={b('image')}\n videoClassName={b('video')}\n isBackground={true}\n parallax={false}\n video={isMobile ? undefined : video}\n image={imageObject}\n />\n )}\n </div>\n );\n};\n\ninterface FullWidthBackgroundProps {\n background: HeaderBlockBackground;\n}\n\nconst FullWidthBackground = ({background}: FullWidthBackgroundProps) => (\n <div\n className={b('background', {['full-width']: true})}\n style={{backgroundColor: background?.color}}\n />\n);\n\nexport const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>) => {\n const {\n title,\n overtitle,\n description,\n buttons,\n image,\n video,\n width = 'm',\n imageSize,\n offset = 'default',\n background,\n theme: textTheme = 'light',\n verticalOffset = 'm',\n className,\n breadcrumbs,\n status,\n renderTitle,\n children,\n mediaView = 'full',\n centered,\n additionalInfo,\n } = props;\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n const theme = useTheme();\n const hasRightSideImage = Boolean((image || video) && !centered);\n const curImageSize = imageSize || getImageSize(width);\n const titleSizes = hasRightSideImage ? titleWithImageSizes(curImageSize) : getTitleSizes(width);\n let curVerticalOffset = verticalOffset;\n\n if (hasRightSideImage && !verticalOffset) {\n curVerticalOffset = 'm';\n }\n\n const backgroundThemed = background && getThemedValue(background, theme);\n const imageThemed = image && getThemedValue(image, theme);\n const videoThemed = video && getThemedValue(video, theme);\n const mediaWithMicrodata = mergeVideoMicrodata(\n {video: videoThemed, image: imageThemed},\n {name: title, description},\n );\n const fullWidth = backgroundThemed?.fullWidth || backgroundThemed?.fullWidthMedia;\n const titleId = useUniqId();\n\n return (\n <header\n className={b(\n {\n ['has-media']: hasRightSideImage,\n ['full-width']: fullWidth,\n ['media-view']: mediaView,\n ['controls-view']: textTheme,\n },\n className,\n )}\n >\n {backgroundThemed && fullWidth && <FullWidthBackground background={backgroundThemed} />}\n {backgroundThemed && <Background background={backgroundThemed} isMobile={isMobile} />}\n <Grid containerClass={b('container-fluid')}>\n {breadcrumbs && (\n <Row className={b('breadcrumbs')}>\n <Col>\n <HeaderBreadcrumbs {...breadcrumbs} theme={textTheme} />\n </Col>\n </Row>\n )}\n <Row>\n <Col reset className={b('content-wrapper')}>\n <Row>\n <Col\n className={b('content', {\n offset,\n theme: textTheme,\n 'vertical-offset': curVerticalOffset,\n })}\n >\n <Col sizes={titleSizes} className={b('content-inner', {centered})}>\n {overtitle && (\n <div className={b('overtitle')}>\n {typeof overtitle === 'string' ? (\n <YFMWrapper\n tagName=\"div\"\n className={b('overtitle')}\n content={overtitle}\n modifiers={{constructor: true}}\n />\n ) : (\n overtitle\n )}\n </div>\n )}\n <YFMWrapper\n content={title}\n contentClassName={b('title')}\n className={b('title-container')}\n modifiers={{constructor: true, constructorTheme: textTheme}}\n tagName=\"h1\"\n contentPosition=\"end\"\n >\n {status}\n {renderTitle ? renderTitle(title) : null}\n </YFMWrapper>\n {description && (\n <div className={b('description', {theme: textTheme})}>\n <YFMWrapper\n content={description}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {additionalInfo && (\n <div className={b('additional-info', {theme: textTheme})}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {buttons && (\n <div className={b('buttons')} data-qa=\"header-buttons\">\n {buttons.map((button, index) => (\n <RouterLink href={button.url} key={index}>\n <Button\n key={index}\n className={b('button')}\n size=\"xl\"\n extraProps={{\n 'aria-describedby': titleId,\n ...button.extraProps,\n }}\n {...button}\n />\n </RouterLink>\n ))}\n </div>\n )}\n {children}\n </Col>\n </Col>\n </Row>\n {hasRightSideImage && (\n <Media\n className={b('media', {[curImageSize]: true})}\n videoClassName={b('video')}\n imageClassName={b('image')}\n {...mediaWithMicrodata}\n />\n )}\n </Col>\n </Row>\n </Grid>\n </header>\n );\n};\n\nexport default HeaderBlock;\n"]}
1
+ {"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAC,kCAAyB;AAC3D,OAAO,iBAAiB,gEAA6D;AACrF,OAAO,EAAC,aAAa,EAAC,8CAA2C;AACjE,OAAO,UAAU,kDAA+C;AAChE,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,cAAc,EAAC,kDAAyC;AAChE,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAC,4BAAmB;AAE1C,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAClD,OAAO,EAAC,mBAAmB,EAAC,iCAA8B;AAE1D,OAAO,EAAC,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAC,mBAAgB;AAEzE,OAAO,cAAc,CAAC;AAEtB,MAAM,CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAgBhC,MAAM,UAAU,GAAG,CAAC,EAAC,UAAU,EAAE,QAAQ,EAAkB,EAAE,EAAE;IAC3D,MAAM,EAAC,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,UAAU,CAAC;IAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC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C,EACtB,IAAI,EAAC,IAAI,EACT,UAAU,EAAE;gEACR,kBAAkB,EAAE,OAAO;gEAC3B,GAAG,MAAM,CAAC,UAAU;6DACvB,KACG,MAAM,IAPL,KAAK,CAQZ,IAV6B,KAAK,CAW3B,CAChB,CAAC,GACA,CACT,EACA,QAAQ,IACP,GACJ,GACJ,EACL,iBAAiB,IAAI,CAClB,KAAC,KAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAC,EAAE,cAAc,CAAC,EAC7D,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,KACtB,kBAAkB,GACxB,CACL,IACC,GACJ,IACH,IACF,CACZ,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport * as React from 'react';\n\nimport {useUniqId} from '@gravity-ui/uikit';\n\nimport {Button, Media, RouterLink} from '../../components';\nimport HeaderBreadcrumbs from '../../components/HeaderBreadcrumbs/HeaderBreadcrumbs';\nimport {getMediaImage} from '../../components/Media/Image/utils';\nimport YFMWrapper from '../../components/YFMWrapper/YFMWrapper';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col, Grid, Row} from '../../grid';\nimport {ClassNameProps, HeaderBlockBackground, HeaderBlockProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport {mergeVideoMicrodata} from '../../utils/microdata';\n\nimport {getImageSize, getTitleSizes, titleWithImageSizes} from './utils';\n\nimport './Header.scss';\n\nconst b = block('header-block');\n\ntype ElementsClassName = {\n gridClassName?: string;\n mediaClassName?: string;\n contentWrapperClassName?: string;\n contentInnerClassName?: string;\n};\n\nexport type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps & ElementsClassName;\n\ninterface BackgroundProps {\n background: HeaderBlockBackground;\n isMobile: boolean;\n}\n\nconst Background = ({background, isMobile}: BackgroundProps) => {\n const {url, image, fullWidthMedia, video, color} = background;\n const imageObject = url ? getMediaImage(url) : image;\n const renderMedia = !isMobile || (typeof image === 'object' && 'mobile' in image);\n\n return (\n <div\n className={b('background', {media: true, 'full-width-media': fullWidthMedia})}\n style={{backgroundColor: color}}\n >\n {renderMedia && (\n <Media\n {...background}\n className={b('background-media')}\n imageClassName={b('image')}\n videoClassName={b('video')}\n isBackground={true}\n parallax={false}\n video={isMobile ? undefined : video}\n image={imageObject}\n />\n )}\n </div>\n );\n};\n\ninterface FullWidthBackgroundProps {\n background: HeaderBlockBackground;\n}\n\nconst FullWidthBackground = ({background}: FullWidthBackgroundProps) => (\n <div\n className={b('background', {['full-width']: true})}\n style={{backgroundColor: background?.color}}\n />\n);\n\nexport const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>) => {\n const {\n title,\n overtitle,\n description,\n buttons,\n image,\n video,\n width = 'm',\n imageSize,\n offset = 'default',\n background,\n theme: textTheme = 'light',\n verticalOffset = 'm',\n className,\n gridClassName,\n breadcrumbs,\n status,\n renderTitle,\n children,\n mediaView = 'full',\n centered,\n additionalInfo,\n mediaClassName,\n contentWrapperClassName,\n contentInnerClassName,\n } = props;\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n const theme = useTheme();\n const hasRightSideImage = Boolean((image || video) && !centered);\n const curImageSize = imageSize || getImageSize(width);\n const titleSizes = hasRightSideImage ? titleWithImageSizes(curImageSize) : getTitleSizes(width);\n let curVerticalOffset = verticalOffset;\n\n if (hasRightSideImage && !verticalOffset) {\n curVerticalOffset = 'm';\n }\n\n const backgroundThemed = background && getThemedValue(background, theme);\n const imageThemed = image && getThemedValue(image, theme);\n const videoThemed = video && getThemedValue(video, theme);\n const mediaWithMicrodata = mergeVideoMicrodata(\n {video: videoThemed, image: imageThemed},\n {name: title, description},\n );\n const fullWidth = backgroundThemed?.fullWidth || backgroundThemed?.fullWidthMedia;\n const titleId = useUniqId();\n\n return (\n <header\n className={b(\n {\n ['has-media']: hasRightSideImage,\n ['full-width']: fullWidth,\n ['media-view']: mediaView,\n ['controls-view']: textTheme,\n },\n className,\n )}\n >\n {backgroundThemed && fullWidth && <FullWidthBackground background={backgroundThemed} />}\n {backgroundThemed && <Background background={backgroundThemed} isMobile={isMobile} />}\n <Grid containerClass={b('container-fluid')} className={b(null, gridClassName)}>\n {breadcrumbs && (\n <Row className={b('breadcrumbs')}>\n <Col>\n <HeaderBreadcrumbs {...breadcrumbs} theme={textTheme} />\n </Col>\n </Row>\n )}\n <Row>\n <Col reset className={b('content-wrapper', contentWrapperClassName)}>\n <Row>\n <Col\n className={b('content', {\n offset,\n theme: textTheme,\n 'vertical-offset': curVerticalOffset,\n })}\n >\n <Col\n sizes={titleSizes}\n className={b(\n 'content-inner',\n {centered},\n contentInnerClassName,\n )}\n >\n {overtitle && (\n <div className={b('overtitle')}>\n {typeof overtitle === 'string' ? (\n <YFMWrapper\n tagName=\"div\"\n className={b('overtitle')}\n content={overtitle}\n modifiers={{constructor: true}}\n />\n ) : (\n overtitle\n )}\n </div>\n )}\n <YFMWrapper\n content={title}\n contentClassName={b('title')}\n className={b('title-container')}\n modifiers={{constructor: true, constructorTheme: textTheme}}\n tagName=\"h1\"\n contentPosition=\"end\"\n >\n {status}\n {renderTitle ? renderTitle(title) : null}\n </YFMWrapper>\n {description && (\n <div className={b('description', {theme: textTheme})}>\n <YFMWrapper\n content={description}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {additionalInfo && (\n <div className={b('additional-info', {theme: textTheme})}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {buttons && (\n <div className={b('buttons')} data-qa=\"header-buttons\">\n {buttons.map((button, index) => (\n <RouterLink href={button.url} key={index}>\n <Button\n key={index}\n className={b('button')}\n size=\"xl\"\n extraProps={{\n 'aria-describedby': titleId,\n ...button.extraProps,\n }}\n {...button}\n />\n </RouterLink>\n ))}\n </div>\n )}\n {children}\n </Col>\n </Col>\n </Row>\n {hasRightSideImage && (\n <Media\n className={b('media', {[curImageSize]: true}, mediaClassName)}\n videoClassName={b('video')}\n imageClassName={b('image')}\n {...mediaWithMicrodata}\n />\n )}\n </Col>\n </Row>\n </Grid>\n </header>\n );\n};\n\nexport default HeaderBlock;\n"]}
@@ -1,17 +1,17 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from 'react';
4
+ import { useUniqId } from '@gravity-ui/uikit';
5
+ import { FullscreenImage, YFMWrapper } from "../../../components/index.js";
6
+ import { getMediaImage } from "../../../components/Media/Image/utils.js";
7
+ import Media from "../../../components/Media/Media.js";
8
+ import { getHeight } from "../../../components/VideoBlock/VideoBlock.js";
4
9
  import { ProjectSettingsContext } from "../../../context/projectSettingsContext/index.js";
5
- import { block, getThemedValue } from "../../../utils/index.js";
6
10
  import { useTheme } from "../../../context/theme/index.js";
7
- import { getHeight } from "../../../components/VideoBlock/VideoBlock.js";
8
- import { getMediaImage } from "../../../components/Media/Image/utils.js";
9
- import TabsTextContent from "../TabsTextContent/TabsTextContent.js";
10
11
  import { Col, GridColumnOrderClasses, Row } from "../../../grid/index.js";
11
- import Media from "../../../components/Media/Media.js";
12
+ import { block, getThemedValue } from "../../../utils/index.js";
12
13
  import { mergeVideoMicrodata } from "../../../utils/microdata.js";
13
- import { FullscreenImage, YFMWrapper } from "../../../components/index.js";
14
- import { useUniqId } from '@gravity-ui/uikit';
14
+ import TabsTextContent from "../TabsTextContent/TabsTextContent.js";
15
15
  import './TabContent.css';
16
16
  const b = block('tab-content');
17
17
  export const TabContent = ({ tabData, isActive, isReverse, contentSize, centered, play, getTabElementId, getTabContentElementId, }) => {