@cloud-ru/uikit-product-site-layout 0.2.2 → 0.2.3
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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/components/Layout.d.ts +15 -0
- package/dist/cjs/components/Layout.js +32 -0
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.js +18 -0
- package/dist/cjs/components/styles.module.css +6 -0
- package/dist/cjs/components/types.d.ts +9 -0
- package/dist/cjs/components/types.js +2 -0
- package/dist/cjs/helperComponents/Footer/Footer.d.ts +7 -0
- package/dist/cjs/helperComponents/Footer/Footer.js +25 -0
- package/dist/cjs/helperComponents/Footer/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Footer/index.js +17 -0
- package/dist/cjs/helperComponents/Footer/styles.module.css +7 -0
- package/dist/cjs/helperComponents/Header/Header.d.ts +8 -0
- package/dist/cjs/helperComponents/Header/Header.js +20 -0
- package/dist/cjs/helperComponents/Header/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Header/index.js +17 -0
- package/dist/cjs/helperComponents/Main/Main.d.ts +7 -0
- package/dist/cjs/helperComponents/Main/Main.js +25 -0
- package/dist/cjs/helperComponents/Main/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Main/index.js +17 -0
- package/dist/cjs/helperComponents/Main/styles.module.css +5 -0
- package/dist/cjs/helperComponents/SectionWrapper/SectionWrapper.d.ts +16 -0
- package/dist/cjs/helperComponents/SectionWrapper/SectionWrapper.js +26 -0
- package/dist/cjs/helperComponents/SectionWrapper/index.d.ts +1 -0
- package/dist/cjs/helperComponents/SectionWrapper/index.js +17 -0
- package/dist/cjs/helperComponents/SectionWrapper/styles.module.css +21 -0
- package/dist/cjs/helperComponents/index.d.ts +4 -0
- package/dist/cjs/helperComponents/index.js +20 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/esm/components/Layout.d.ts +15 -0
- package/dist/esm/components/Layout.js +25 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/styles.module.css +6 -0
- package/dist/esm/components/types.d.ts +9 -0
- package/dist/esm/components/types.js +1 -0
- package/dist/esm/helperComponents/Footer/Footer.d.ts +7 -0
- package/dist/esm/helperComponents/Footer/Footer.js +19 -0
- package/dist/esm/helperComponents/Footer/index.d.ts +1 -0
- package/dist/esm/helperComponents/Footer/index.js +1 -0
- package/dist/esm/helperComponents/Footer/styles.module.css +7 -0
- package/dist/esm/helperComponents/Header/Header.d.ts +8 -0
- package/dist/esm/helperComponents/Header/Header.js +17 -0
- package/dist/esm/helperComponents/Header/index.d.ts +1 -0
- package/dist/esm/helperComponents/Header/index.js +1 -0
- package/dist/esm/helperComponents/Main/Main.d.ts +7 -0
- package/dist/esm/helperComponents/Main/Main.js +19 -0
- package/dist/esm/helperComponents/Main/index.d.ts +1 -0
- package/dist/esm/helperComponents/Main/index.js +1 -0
- package/dist/esm/helperComponents/Main/styles.module.css +5 -0
- package/dist/esm/helperComponents/SectionWrapper/SectionWrapper.d.ts +16 -0
- package/dist/esm/helperComponents/SectionWrapper/SectionWrapper.js +20 -0
- package/dist/esm/helperComponents/SectionWrapper/index.d.ts +1 -0
- package/dist/esm/helperComponents/SectionWrapper/index.js +1 -0
- package/dist/esm/helperComponents/SectionWrapper/styles.module.css +21 -0
- package/dist/esm/helperComponents/index.d.ts +4 -0
- package/dist/esm/helperComponents/index.js +4 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.2.3 (2025-11-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.2.2 (2025-11-12)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Footer, FooterProps as LayoutFooterProps, Header, HeaderProps as LayoutHeaderProps, Main, MainProps as LayoutMainProps, SectionWrapper, SectionWrapperProps } from '../helperComponents';
|
|
2
|
+
import { LayoutProps } from './types';
|
|
3
|
+
export declare function LayoutComponent({ children, meta, className, ...rest }: LayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Layout: typeof LayoutComponent & {
|
|
5
|
+
Header: typeof Header;
|
|
6
|
+
Main: typeof Main;
|
|
7
|
+
Footer: typeof Footer;
|
|
8
|
+
SectionWrapper: typeof SectionWrapper;
|
|
9
|
+
};
|
|
10
|
+
export declare namespace SiteLayout {
|
|
11
|
+
type HeaderProps = LayoutHeaderProps;
|
|
12
|
+
type MainProps = LayoutMainProps;
|
|
13
|
+
type FooterProps = LayoutFooterProps;
|
|
14
|
+
type WrapperProps = SectionWrapperProps;
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Layout = void 0;
|
|
18
|
+
exports.LayoutComponent = LayoutComponent;
|
|
19
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
22
|
+
const helperComponents_1 = require("../helperComponents");
|
|
23
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
24
|
+
function LayoutComponent(_a) {
|
|
25
|
+
var { children, meta, className } = _a, rest = __rest(_a, ["children", "meta", "className"]);
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [meta, (0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(styles_module_scss_1.default.layout, className) }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: children }))] }));
|
|
27
|
+
}
|
|
28
|
+
exports.Layout = LayoutComponent;
|
|
29
|
+
exports.Layout.Header = helperComponents_1.Header;
|
|
30
|
+
exports.Layout.Main = helperComponents_1.Main;
|
|
31
|
+
exports.Layout.Footer = helperComponents_1.Footer;
|
|
32
|
+
exports.Layout.SectionWrapper = helperComponents_1.SectionWrapper;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Layout"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type LayoutProps = WithSupportProps<{
|
|
4
|
+
/** Слот под основной контент, рекомендуется использовать helper компоненты Layout.Header, Layout.Footer, etc. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Слот под опциональные meta и всё что должно быть вне зарендеренной страницы */
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type FooterProps = WithSupportProps<WithLayoutType<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare function Footer({ children, className, layoutType, ...rest }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Footer = Footer;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
21
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
22
|
+
function Footer(_a) {
|
|
23
|
+
var { children, className, layoutType } = _a, rest = __rest(_a, ["children", "className", "layoutType"]);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("footer", Object.assign({ className: (0, classnames_1.default)(styles_module_scss_1.default.footer, className), "data-layout-type": layoutType }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: children })));
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Footer"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type HeaderProps = WithSupportProps<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function Header({ children, className, style, ...rest }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Header = Header;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
17
|
+
function Header(_a) {
|
|
18
|
+
var { children, className, style } = _a, rest = __rest(_a, ["children", "className", "style"]);
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("header", Object.assign({ className: className }, (0, uikit_product_utils_1.extractSupportProps)(rest), { style: style, children: children })));
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Header';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Header"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type MainProps = WithSupportProps<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function Main({ children, className, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Main = Main;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
21
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
22
|
+
function Main(_a) {
|
|
23
|
+
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("main", Object.assign({ className: (0, classnames_1.default)(styles_module_scss_1.default.main, className) }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: children })));
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Main';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Main"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type SectionWrapperProps = WithSupportProps<WithLayoutType<{
|
|
4
|
+
id?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const SectionWrapper: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
'data-test-id'?: string;
|
|
10
|
+
} & import("react").AriaAttributes & {
|
|
11
|
+
id?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
} & {
|
|
15
|
+
layoutType: import("@sbercloud/uikit-product-utils").LayoutType;
|
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SectionWrapper = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
const uikit_product_utils_1 = require("@sbercloud/uikit-product-utils");
|
|
22
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
23
|
+
exports.SectionWrapper = (0, react_1.forwardRef)((_a, ref) => {
|
|
24
|
+
var { id, children, className, layoutType } = _a, rest = __rest(_a, ["id", "children", "className", "layoutType"]);
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("section", Object.assign({ id: id, ref: ref, className: (0, classnames_1.default)(styles_module_scss_1.default.sectionWrapper, className), "data-layout-type": layoutType }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.contentWrapper, "data-layout-type": layoutType, children: children }) })));
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SectionWrapper';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SectionWrapper"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.sectionWrapper{
|
|
2
|
+
display:flex;
|
|
3
|
+
justify-content:center;
|
|
4
|
+
width:100%;
|
|
5
|
+
min-width:0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.contentWrapper{
|
|
9
|
+
width:100%;
|
|
10
|
+
max-width:1216px;
|
|
11
|
+
padding:0 var(--dimension-4m, 32px);
|
|
12
|
+
min-width:0;
|
|
13
|
+
}
|
|
14
|
+
.contentWrapper[data-layout-type=tablet]{
|
|
15
|
+
max-width:unset;
|
|
16
|
+
padding:0 var(--dimension-4m, 32px);
|
|
17
|
+
}
|
|
18
|
+
.contentWrapper[data-layout-type=mobile]{
|
|
19
|
+
max-width:unset;
|
|
20
|
+
padding:0 var(--dimension-2m, 16px);
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Header"), exports);
|
|
18
|
+
__exportStar(require("./Main"), exports);
|
|
19
|
+
__exportStar(require("./Footer"), exports);
|
|
20
|
+
__exportStar(require("./SectionWrapper"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Footer, FooterProps as LayoutFooterProps, Header, HeaderProps as LayoutHeaderProps, Main, MainProps as LayoutMainProps, SectionWrapper, SectionWrapperProps } from '../helperComponents';
|
|
2
|
+
import { LayoutProps } from './types';
|
|
3
|
+
export declare function LayoutComponent({ children, meta, className, ...rest }: LayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Layout: typeof LayoutComponent & {
|
|
5
|
+
Header: typeof Header;
|
|
6
|
+
Main: typeof Main;
|
|
7
|
+
Footer: typeof Footer;
|
|
8
|
+
SectionWrapper: typeof SectionWrapper;
|
|
9
|
+
};
|
|
10
|
+
export declare namespace SiteLayout {
|
|
11
|
+
type HeaderProps = LayoutHeaderProps;
|
|
12
|
+
type MainProps = LayoutMainProps;
|
|
13
|
+
type FooterProps = LayoutFooterProps;
|
|
14
|
+
type WrapperProps = SectionWrapperProps;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { extractSupportProps } from '@sbercloud/uikit-product-utils';
|
|
15
|
+
import { Footer, Header, Main, SectionWrapper, } from '../helperComponents';
|
|
16
|
+
import styles from './styles.module.css';
|
|
17
|
+
export function LayoutComponent(_a) {
|
|
18
|
+
var { children, meta, className } = _a, rest = __rest(_a, ["children", "meta", "className"]);
|
|
19
|
+
return (_jsxs(_Fragment, { children: [meta, _jsx("div", Object.assign({ className: cn(styles.layout, className) }, extractSupportProps(rest), { children: children }))] }));
|
|
20
|
+
}
|
|
21
|
+
export const Layout = LayoutComponent;
|
|
22
|
+
Layout.Header = Header;
|
|
23
|
+
Layout.Main = Main;
|
|
24
|
+
Layout.Footer = Footer;
|
|
25
|
+
Layout.SectionWrapper = SectionWrapper;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type LayoutProps = WithSupportProps<{
|
|
4
|
+
/** Слот под основной контент, рекомендуется использовать helper компоненты Layout.Header, Layout.Footer, etc. */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Слот под опциональные meta и всё что должно быть вне зарендеренной страницы */
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type FooterProps = WithSupportProps<WithLayoutType<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare function Footer({ children, className, layoutType, ...rest }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { extractSupportProps } from '@sbercloud/uikit-product-utils';
|
|
15
|
+
import styles from './styles.module.css';
|
|
16
|
+
export function Footer(_a) {
|
|
17
|
+
var { children, className, layoutType } = _a, rest = __rest(_a, ["children", "className", "layoutType"]);
|
|
18
|
+
return (_jsx("footer", Object.assign({ className: cn(styles.footer, className), "data-layout-type": layoutType }, extractSupportProps(rest), { children: children })));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Footer';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type HeaderProps = WithSupportProps<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function Header({ children, className, style, ...rest }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { extractSupportProps } from '@sbercloud/uikit-product-utils';
|
|
14
|
+
export function Header(_a) {
|
|
15
|
+
var { children, className, style } = _a, rest = __rest(_a, ["children", "className", "style"]);
|
|
16
|
+
return (_jsx("header", Object.assign({ className: className }, extractSupportProps(rest), { style: style, children: children })));
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Header';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type MainProps = WithSupportProps<{
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function Main({ children, className, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { extractSupportProps } from '@sbercloud/uikit-product-utils';
|
|
15
|
+
import styles from './styles.module.css';
|
|
16
|
+
export function Main(_a) {
|
|
17
|
+
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
18
|
+
return (_jsx("main", Object.assign({ className: cn(styles.main, className) }, extractSupportProps(rest), { children: children })));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Main';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Main';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
export type SectionWrapperProps = WithSupportProps<WithLayoutType<{
|
|
4
|
+
id?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const SectionWrapper: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
'data-test-id'?: string;
|
|
10
|
+
} & import("react").AriaAttributes & {
|
|
11
|
+
id?: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
} & {
|
|
15
|
+
layoutType: import("@sbercloud/uikit-product-utils").LayoutType;
|
|
16
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { forwardRef } from 'react';
|
|
15
|
+
import { extractSupportProps } from '@sbercloud/uikit-product-utils';
|
|
16
|
+
import styles from './styles.module.css';
|
|
17
|
+
export const SectionWrapper = forwardRef((_a, ref) => {
|
|
18
|
+
var { id, children, className, layoutType } = _a, rest = __rest(_a, ["id", "children", "className", "layoutType"]);
|
|
19
|
+
return (_jsx("section", Object.assign({ id: id, ref: ref, className: cn(styles.sectionWrapper, className), "data-layout-type": layoutType }, extractSupportProps(rest), { children: _jsx("div", { className: styles.contentWrapper, "data-layout-type": layoutType, children: children }) })));
|
|
20
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SectionWrapper';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SectionWrapper';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.sectionWrapper{
|
|
2
|
+
display:flex;
|
|
3
|
+
justify-content:center;
|
|
4
|
+
width:100%;
|
|
5
|
+
min-width:0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.contentWrapper{
|
|
9
|
+
width:100%;
|
|
10
|
+
max-width:1216px;
|
|
11
|
+
padding:0 var(--dimension-4m, 32px);
|
|
12
|
+
min-width:0;
|
|
13
|
+
}
|
|
14
|
+
.contentWrapper[data-layout-type=tablet]{
|
|
15
|
+
max-width:unset;
|
|
16
|
+
padding:0 var(--dimension-4m, 32px);
|
|
17
|
+
}
|
|
18
|
+
.contentWrapper[data-layout-type=mobile]{
|
|
19
|
+
max-width:unset;
|
|
20
|
+
padding:0 var(--dimension-2m, 16px);
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-site-layout",
|
|
3
3
|
"title": "Site Layout",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
"name": "Akhremenko Grigorii",
|
|
31
31
|
"url": "https://github.com/AGrigorii"
|
|
32
32
|
},
|
|
33
|
+
"contributors": [],
|
|
33
34
|
"license": "Apache-2.0",
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@cloud-ru/uikit-product-utils": "7.0.
|
|
40
|
+
"@cloud-ru/uikit-product-utils": "7.0.1",
|
|
40
41
|
"classnames": "2.5.1"
|
|
41
42
|
},
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9c11b1e33e716c874534a1c162266c8591f2ed03"
|
|
43
44
|
}
|