@cloud-ru/uikit-product-site-layout 0.2.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/helperComponents/Main/Main.d.ts +4 -4
- package/dist/cjs/helperComponents/Main/Main.js +2 -2
- package/dist/cjs/helperComponents/Main/styles.module.css +20 -0
- package/dist/cjs/helperComponents/SectionWrapper/SectionWrapper.d.ts +1 -1
- package/dist/esm/helperComponents/Main/Main.d.ts +4 -4
- package/dist/esm/helperComponents/Main/Main.js +2 -2
- package/dist/esm/helperComponents/Main/styles.module.css +20 -0
- package/dist/esm/helperComponents/SectionWrapper/SectionWrapper.d.ts +1 -1
- package/package.json +2 -2
- package/src/helperComponents/Main/Main.tsx +11 -7
- package/src/helperComponents/Main/styles.module.scss +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.4.0 (2025-12-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **SITE-10318:** edit layout styles ([d4db088](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/d4db088946220586887d3ea7fd2bfe6cf7fc6bd0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 0.3.0 (2025-12-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **SITE-10318:** edit layout content wrapper style ([174419a](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/174419a9bfa32f8c16aa6765f809dc8c4946ea8e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## 0.2.7 (2025-11-24)
|
|
7
29
|
|
|
8
30
|
### Only dependencies have been changed
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
-
export type MainProps = WithSupportProps<{
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
export type MainProps = WithSupportProps<WithLayoutType<{
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function Main({ children, className, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare function Main({ children, className, layoutType, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,6 +20,6 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
20
20
|
const uikit_product_utils_1 = require("@cloud-ru/uikit-product-utils");
|
|
21
21
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
22
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 })));
|
|
23
|
+
var { children, className, layoutType } = _a, rest = __rest(_a, ["children", "className", "layoutType"]);
|
|
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: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.mainContent, "data-layout-type": layoutType, children: children }) })));
|
|
25
25
|
}
|
|
@@ -2,4 +2,24 @@
|
|
|
2
2
|
display:flex;
|
|
3
3
|
flex:1;
|
|
4
4
|
flex-direction:inherit;
|
|
5
|
+
background:var(--sys-neutral-background, #eeeff3);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mainContent{
|
|
9
|
+
margin:0 auto;
|
|
10
|
+
width:100%;
|
|
11
|
+
max-width:1440px;
|
|
12
|
+
min-width:0;
|
|
13
|
+
box-sizing:border-box;
|
|
14
|
+
}
|
|
15
|
+
.mainContent[data-layout-type=desktop], .mainContent[data-layout-type=desktopSmall]{
|
|
16
|
+
padding:0 var(--dimension-2m, 16px);
|
|
17
|
+
}
|
|
18
|
+
.mainContent[data-layout-type=tablet]{
|
|
19
|
+
max-width:unset;
|
|
20
|
+
padding:0 var(--dimension-2m, 16px);
|
|
21
|
+
}
|
|
22
|
+
.mainContent[data-layout-type=mobile]{
|
|
23
|
+
max-width:unset;
|
|
24
|
+
padding:0;
|
|
5
25
|
}
|
|
@@ -12,5 +12,5 @@ export declare const SectionWrapper: import("react").ForwardRefExoticComponent<{
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
className?: string;
|
|
14
14
|
} & {
|
|
15
|
-
layoutType: import("@cloud-ru/uikit-product-utils").LayoutType;
|
|
15
|
+
layoutType: import("@cloud-ru/uikit-product-utils/.").LayoutType;
|
|
16
16
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
-
export type MainProps = WithSupportProps<{
|
|
2
|
+
import { WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
3
|
+
export type MainProps = WithSupportProps<WithLayoutType<{
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function Main({ children, className, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare function Main({ children, className, layoutType, ...rest }: MainProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,6 +14,6 @@ import cn from 'classnames';
|
|
|
14
14
|
import { extractSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
15
15
|
import styles from './styles.module.css';
|
|
16
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 })));
|
|
17
|
+
var { children, className, layoutType } = _a, rest = __rest(_a, ["children", "className", "layoutType"]);
|
|
18
|
+
return (_jsx("main", Object.assign({ className: cn(styles.main, className) }, extractSupportProps(rest), { children: _jsx("div", { className: styles.mainContent, "data-layout-type": layoutType, children: children }) })));
|
|
19
19
|
}
|
|
@@ -2,4 +2,24 @@
|
|
|
2
2
|
display:flex;
|
|
3
3
|
flex:1;
|
|
4
4
|
flex-direction:inherit;
|
|
5
|
+
background:var(--sys-neutral-background, #eeeff3);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mainContent{
|
|
9
|
+
margin:0 auto;
|
|
10
|
+
width:100%;
|
|
11
|
+
max-width:1440px;
|
|
12
|
+
min-width:0;
|
|
13
|
+
box-sizing:border-box;
|
|
14
|
+
}
|
|
15
|
+
.mainContent[data-layout-type=desktop], .mainContent[data-layout-type=desktopSmall]{
|
|
16
|
+
padding:0 var(--dimension-2m, 16px);
|
|
17
|
+
}
|
|
18
|
+
.mainContent[data-layout-type=tablet]{
|
|
19
|
+
max-width:unset;
|
|
20
|
+
padding:0 var(--dimension-2m, 16px);
|
|
21
|
+
}
|
|
22
|
+
.mainContent[data-layout-type=mobile]{
|
|
23
|
+
max-width:unset;
|
|
24
|
+
padding:0;
|
|
5
25
|
}
|
|
@@ -12,5 +12,5 @@ export declare const SectionWrapper: import("react").ForwardRefExoticComponent<{
|
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
className?: string;
|
|
14
14
|
} & {
|
|
15
|
-
layoutType: import("@cloud-ru/uikit-product-utils").LayoutType;
|
|
15
|
+
layoutType: import("@cloud-ru/uikit-product-utils/.").LayoutType;
|
|
16
16
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
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.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@cloud-ru/uikit-product-utils": "8.0.1",
|
|
40
40
|
"classnames": "2.5.1"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "14f18bff39619ba8f885fff42922458e7e0ee62c"
|
|
43
43
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import cn from 'classnames';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
import { extractSupportProps, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
4
|
+
import { extractSupportProps, WithLayoutType, WithSupportProps } from '@cloud-ru/uikit-product-utils';
|
|
5
5
|
|
|
6
6
|
import styles from './styles.module.scss';
|
|
7
7
|
|
|
8
|
-
export type MainProps = WithSupportProps<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export type MainProps = WithSupportProps<
|
|
9
|
+
WithLayoutType<{
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}>
|
|
13
|
+
>;
|
|
12
14
|
|
|
13
|
-
export function Main({ children, className, ...rest }: MainProps) {
|
|
15
|
+
export function Main({ children, className, layoutType, ...rest }: MainProps) {
|
|
14
16
|
return (
|
|
15
17
|
<main className={cn(styles.main, className)} {...extractSupportProps(rest)}>
|
|
16
|
-
{
|
|
18
|
+
<div className={styles.mainContent} data-layout-type={layoutType}>
|
|
19
|
+
{children}
|
|
20
|
+
</div>
|
|
17
21
|
</main>
|
|
18
22
|
);
|
|
19
23
|
}
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
+
@use '@sbercloud/figma-tokens-cloud-platform/build/scss/styles-theme-variables' as var;
|
|
2
|
+
|
|
1
3
|
.main {
|
|
2
4
|
display: flex;
|
|
3
5
|
flex: 1;
|
|
4
6
|
flex-direction: inherit;
|
|
7
|
+
background: var.$sys-neutral-background;
|
|
5
8
|
}
|
|
6
9
|
|
|
10
|
+
.mainContent {
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
width: 100%;
|
|
13
|
+
max-width: 1440px;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
|
|
17
|
+
&[data-layout-type='desktop'],
|
|
18
|
+
&[data-layout-type='desktopSmall'] {
|
|
19
|
+
padding: 0 var.$dimension-2m;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&[data-layout-type='tablet'] {
|
|
23
|
+
max-width: unset;
|
|
24
|
+
padding: 0 var.$dimension-2m;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-layout-type='mobile'] {
|
|
28
|
+
max-width: unset;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|