@cloud-ru/uikit-product-page-layout 2.2.0 → 2.3.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 +11 -0
- package/dist/cjs/components/PageForm/PageForm.d.ts +1 -0
- package/dist/cjs/components/PageForm/PageForm.js +5 -2
- package/dist/cjs/components/PageForm/styles.module.css +1 -0
- package/dist/esm/components/PageForm/PageForm.d.ts +1 -0
- package/dist/esm/components/PageForm/PageForm.js +5 -2
- package/dist/esm/components/PageForm/styles.module.css +1 -0
- package/package.json +2 -2
- package/src/components/PageForm/PageForm.tsx +5 -1
- package/src/components/PageForm/styles.module.scss +1 -0
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
|
+
# 2.3.0 (2026-07-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **FF-8766:** add view for additional button on PageForm ([2b06914](https://github.com/cloud-ru-tech/uikit-product/commit/2b069144004d50625bd520b694bbfa05a294413c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# 2.2.0 (2026-07-09)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -24,14 +24,17 @@ const Headline_1 = require("../Headline");
|
|
|
24
24
|
const hooks_1 = require("./hooks");
|
|
25
25
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
26
26
|
function PageForm(_a) {
|
|
27
|
-
var _b, _c;
|
|
27
|
+
var _b, _c, _d;
|
|
28
28
|
var { children, stepper, title, subHeader, className, footer, sideBlock, priceSummary, stickyFooter } = _a, rest = __rest(_a, ["children", "stepper", "title", "subHeader", "className", "footer", "sideBlock", "priceSummary", "stickyFooter"]);
|
|
29
29
|
const getButtonLabel = (0, hooks_1.useGetButtonLabel)();
|
|
30
30
|
const { sentinelRef, atBottom } = (0, hooks_1.useStickyFooterShadow)(stickyFooter);
|
|
31
31
|
const moreItems = (0, react_1.useMemo)(() => [priceSummary === null || priceSummary === void 0 ? void 0 : priceSummary.content].concat(sideBlock === null || sideBlock === void 0 ? void 0 : sideBlock.map(item => item.content)).filter(Boolean), [priceSummary === null || priceSummary === void 0 ? void 0 : priceSummary.content, sideBlock]);
|
|
32
32
|
const PrimaryButton = (0, hooks_1.useButtonWithTooltip)({ Button: button_1.ButtonFilled, tooltip: footer === null || footer === void 0 ? void 0 : footer.buttonPrimary.tooltip });
|
|
33
33
|
const SecondaryButton = (0, hooks_1.useButtonWithTooltip)({ Button: button_1.ButtonOutline, tooltip: (_b = footer === null || footer === void 0 ? void 0 : footer.buttonSecondary) === null || _b === void 0 ? void 0 : _b.tooltip });
|
|
34
|
-
const AdditionalButton = (0, hooks_1.useButtonWithTooltip)({
|
|
34
|
+
const AdditionalButton = (0, hooks_1.useButtonWithTooltip)({
|
|
35
|
+
Button: ((_c = footer === null || footer === void 0 ? void 0 : footer.buttonAdditional) === null || _c === void 0 ? void 0 : _c.view) === 'outline' ? button_1.ButtonOutline : button_1.ButtonSimple,
|
|
36
|
+
tooltip: (_d = footer === null || footer === void 0 ? void 0 : footer.buttonAdditional) === null || _d === void 0 ? void 0 : _d.tooltip,
|
|
37
|
+
});
|
|
35
38
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(styles_module_scss_1.default.container, className) }, (0, uikit_product_utils_1.extractSupportProps)(rest), { children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.form, { [styles_module_scss_1.default.formStickyFooter]: stickyFooter && footer }), children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.headline, children: (0, jsx_runtime_1.jsx)(Headline_1.Headline, { title: title, subHeader: subHeader }) }), stepper, (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.body, children: children }), footer && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(styles_module_scss_1.default.footer, {
|
|
36
39
|
[styles_module_scss_1.default.footerSticky]: stickyFooter,
|
|
37
40
|
[styles_module_scss_1.default.footerStuck]: stickyFooter && !atBottom,
|
|
@@ -18,14 +18,17 @@ import { Headline } from '../Headline';
|
|
|
18
18
|
import { useButtonWithTooltip, useGetButtonLabel, useStickyFooterShadow } from './hooks';
|
|
19
19
|
import styles from './styles.module.css';
|
|
20
20
|
export function PageForm(_a) {
|
|
21
|
-
var _b, _c;
|
|
21
|
+
var _b, _c, _d;
|
|
22
22
|
var { children, stepper, title, subHeader, className, footer, sideBlock, priceSummary, stickyFooter } = _a, rest = __rest(_a, ["children", "stepper", "title", "subHeader", "className", "footer", "sideBlock", "priceSummary", "stickyFooter"]);
|
|
23
23
|
const getButtonLabel = useGetButtonLabel();
|
|
24
24
|
const { sentinelRef, atBottom } = useStickyFooterShadow(stickyFooter);
|
|
25
25
|
const moreItems = useMemo(() => [priceSummary === null || priceSummary === void 0 ? void 0 : priceSummary.content].concat(sideBlock === null || sideBlock === void 0 ? void 0 : sideBlock.map(item => item.content)).filter(Boolean), [priceSummary === null || priceSummary === void 0 ? void 0 : priceSummary.content, sideBlock]);
|
|
26
26
|
const PrimaryButton = useButtonWithTooltip({ Button: ButtonFilled, tooltip: footer === null || footer === void 0 ? void 0 : footer.buttonPrimary.tooltip });
|
|
27
27
|
const SecondaryButton = useButtonWithTooltip({ Button: ButtonOutline, tooltip: (_b = footer === null || footer === void 0 ? void 0 : footer.buttonSecondary) === null || _b === void 0 ? void 0 : _b.tooltip });
|
|
28
|
-
const AdditionalButton = useButtonWithTooltip({
|
|
28
|
+
const AdditionalButton = useButtonWithTooltip({
|
|
29
|
+
Button: ((_c = footer === null || footer === void 0 ? void 0 : footer.buttonAdditional) === null || _c === void 0 ? void 0 : _c.view) === 'outline' ? ButtonOutline : ButtonSimple,
|
|
30
|
+
tooltip: (_d = footer === null || footer === void 0 ? void 0 : footer.buttonAdditional) === null || _d === void 0 ? void 0 : _d.tooltip,
|
|
31
|
+
});
|
|
29
32
|
return (_jsxs("div", Object.assign({ className: cn(styles.container, className) }, extractSupportProps(rest), { children: [_jsxs("div", { className: cn(styles.form, { [styles.formStickyFooter]: stickyFooter && footer }), children: [_jsx("div", { className: styles.headline, children: _jsx(Headline, { title: title, subHeader: subHeader }) }), stepper, _jsx("div", { className: styles.body, children: children }), footer && (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(styles.footer, {
|
|
30
33
|
[styles.footerSticky]: stickyFooter,
|
|
31
34
|
[styles.footerStuck]: stickyFooter && !atBottom,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-page-layout",
|
|
3
3
|
"title": "Page Layout",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@cloud-ru/uikit-product-locale": "*"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "ce9cf047930e27c34bafffbd1a19a079ed318f24"
|
|
61
61
|
}
|
|
@@ -62,6 +62,7 @@ export type PageFormProps = WithSupportProps<
|
|
|
62
62
|
} & Omit<ButtonOutlineProps, 'label'>;
|
|
63
63
|
buttonAdditional?: ButtonSimpleProps & {
|
|
64
64
|
tooltip?: TooltipProps;
|
|
65
|
+
view?: 'simple' | 'outline';
|
|
65
66
|
};
|
|
66
67
|
};
|
|
67
68
|
}
|
|
@@ -91,7 +92,10 @@ export function PageForm({
|
|
|
91
92
|
|
|
92
93
|
const PrimaryButton = useButtonWithTooltip({ Button: ButtonFilled, tooltip: footer?.buttonPrimary.tooltip });
|
|
93
94
|
const SecondaryButton = useButtonWithTooltip({ Button: ButtonOutline, tooltip: footer?.buttonSecondary?.tooltip });
|
|
94
|
-
const AdditionalButton = useButtonWithTooltip({
|
|
95
|
+
const AdditionalButton = useButtonWithTooltip({
|
|
96
|
+
Button: footer?.buttonAdditional?.view === 'outline' ? ButtonOutline : ButtonSimple,
|
|
97
|
+
tooltip: footer?.buttonAdditional?.tooltip,
|
|
98
|
+
});
|
|
95
99
|
|
|
96
100
|
return (
|
|
97
101
|
<div className={cn(styles.container, className)} {...extractSupportProps(rest)}>
|