@astral/ui 4.75.0 → 4.76.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/components/PageContent/PageContentHeader/Description/Description.js +2 -1
- package/components/PageContent/PageContentHeader/Description/styles.d.ts +5 -0
- package/components/PageContent/PageContentHeader/Description/styles.js +10 -0
- package/components/PageContent/PageContentHeader/PageContentHeader.js +10 -1
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/MobilePageContentHeaderActions.d.ts +3 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/MobilePageContentHeaderActions.js +12 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/styles.d.ts +38 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/styles.js +41 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/useLogic.d.ts +14 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/useLogic.js +23 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/composeCloseIntoActions.d.ts +14 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/composeCloseIntoActions.js +18 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActions.d.ts +2 -3
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActions.js +8 -3
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/PageContentHeaderActionsSkeleton.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/PageContentHeaderActionsSkeleton.js +5 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/styles.d.ts +8 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/styles.js +13 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/index.d.ts +2 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/index.js +2 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/types.d.ts +3 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderActions/types.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderContext.d.ts +9 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderContext.js +8 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/PageContentHeaderProvider.d.ts +7 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/PageContentHeaderProvider.js +7 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/index.js +1 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/index.d.ts +2 -0
- package/components/PageContent/PageContentHeader/PageContentHeaderContext/index.js +2 -0
- package/components/PageContent/PageContentHeader/Title/Title.js +2 -3
- package/components/PageContent/PageContentHeader/Title/styles.d.ts +7 -0
- package/components/PageContent/PageContentHeader/Title/styles.js +9 -0
- package/components/PageContent/PageContentHeader/styles.js +8 -6
- package/components/PageContent/PageContentHeader/useLogic/index.d.ts +1 -0
- package/components/PageContent/PageContentHeader/useLogic/index.js +1 -0
- package/components/PageContent/PageContentHeader/useLogic/useLogic.d.ts +4 -0
- package/components/PageContent/PageContentHeader/useLogic/useLogic.js +15 -0
- package/components/PageContent/public.d.ts +1 -1
- package/components/PageContent/public.js +1 -1
- package/components/PageContent/styles.js +4 -0
- package/node/components/PageContent/PageContentHeader/Description/Description.js +2 -1
- package/node/components/PageContent/PageContentHeader/Description/styles.d.ts +5 -0
- package/node/components/PageContent/PageContentHeader/Description/styles.js +13 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeader.js +10 -1
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/MobilePageContentHeaderActions.d.ts +3 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/MobilePageContentHeaderActions.js +16 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/styles.d.ts +38 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/styles.js +44 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/useLogic.d.ts +14 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/useLogic.js +27 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/composeCloseIntoActions.d.ts +14 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/composeCloseIntoActions.js +22 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/composeCloseIntoActions/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/MobilePageContentHeaderActions/useLogic/utils/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActions.d.ts +2 -3
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActions.js +7 -2
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/PageContentHeaderActionsSkeleton.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/PageContentHeaderActionsSkeleton.js +9 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/styles.d.ts +8 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/PageContentHeaderActionsSkeleton/styles.js +16 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/index.d.ts +2 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/index.js +2 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/types.d.ts +3 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderActions/types.js +2 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderContext.d.ts +9 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderContext.js +11 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/PageContentHeaderProvider.d.ts +7 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/PageContentHeaderProvider.js +11 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/PageContentHeaderProvider/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/index.d.ts +2 -0
- package/node/components/PageContent/PageContentHeader/PageContentHeaderContext/index.js +18 -0
- package/node/components/PageContent/PageContentHeader/Title/Title.js +1 -2
- package/node/components/PageContent/PageContentHeader/Title/styles.d.ts +7 -0
- package/node/components/PageContent/PageContentHeader/Title/styles.js +10 -1
- package/node/components/PageContent/PageContentHeader/styles.js +8 -6
- package/node/components/PageContent/PageContentHeader/useLogic/index.d.ts +1 -0
- package/node/components/PageContent/PageContentHeader/useLogic/index.js +17 -0
- package/node/components/PageContent/PageContentHeader/useLogic/useLogic.d.ts +4 -0
- package/node/components/PageContent/PageContentHeader/useLogic/useLogic.js +19 -0
- package/node/components/PageContent/public.d.ts +1 -1
- package/node/components/PageContent/public.js +2 -1
- package/node/components/PageContent/styles.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MobilePageContentHeaderActions = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const DotsVOutlineMd_1 = require("../../../../../icons/DotsVOutlineMd");
|
|
6
|
+
const BottomDrawer_1 = require("../../../../BottomDrawer");
|
|
7
|
+
const PageActions_1 = require("../../../../PageHeader/PageActions");
|
|
8
|
+
const Typography_1 = require("../../../../Typography");
|
|
9
|
+
const Description_1 = require("../../Description");
|
|
10
|
+
const styles_1 = require("./styles");
|
|
11
|
+
const useLogic_1 = require("./useLogic");
|
|
12
|
+
const MobilePageContentHeaderActions = (props) => {
|
|
13
|
+
const { open, handleOpenMenu, handleCloseMenu, main, secondary, secondaryVisible, title, description, } = (0, useLogic_1.useLogic)(props);
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { title: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E", variant: "text", color: "grey", onClick: handleOpenMenu, children: (0, jsx_runtime_1.jsx)(DotsVOutlineMd_1.DotsVOutlineMd, {}) }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { title: "\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F", onClose: handleCloseMenu, open: open, children: (0, jsx_runtime_1.jsxs)(styles_1.BottomDrawerWrapper, { children: [(0, jsx_runtime_1.jsxs)(styles_1.AddonInfoWrapper, { children: [(0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h6", children: title }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description })] }), (0, jsx_runtime_1.jsxs)(styles_1.ActionsWrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledMainActions, { actions: main, size: "large" }), (0, jsx_runtime_1.jsx)(PageActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: "large" }), (0, jsx_runtime_1.jsx)(PageActions_1.SecondaryActions, { actions: secondary, size: "large" })] })] }) })] }));
|
|
15
|
+
};
|
|
16
|
+
exports.MobilePageContentHeaderActions = MobilePageContentHeaderActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobilePageContentHeaderActions';
|
|
@@ -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("./MobilePageContentHeaderActions"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BottomDrawerWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const AddonInfoWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const StyledIconButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "size" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
|
|
11
|
+
variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
|
|
12
|
+
loading?: boolean | undefined;
|
|
13
|
+
color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
|
|
14
|
+
component?: import("react").ElementType | undefined;
|
|
15
|
+
selected?: boolean | undefined;
|
|
16
|
+
size?: "large" | "medium" | undefined;
|
|
17
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
export declare const ActionsWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const StyledMainActions: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../../ActionGroup").MainActionsProps<import("react").ElementType>, "actions"> & {
|
|
25
|
+
actions?: import("../../../..").MainAction<import("react").ElementType>[] | undefined;
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
size: import("../../../..").ButtonSize;
|
|
28
|
+
spacing?: number | undefined;
|
|
29
|
+
} & {
|
|
30
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
31
|
+
}, {}, {}>;
|
|
32
|
+
export declare const StyledSkeleton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../..").WithoutEmotionSpecific<import("@mui/material").SkeletonProps<import("react").ElementType, unknown>>, "animation" | "variant"> & {
|
|
33
|
+
component?: import("react").ElementType | undefined;
|
|
34
|
+
variant?: "text" | "circular" | "rounded" | undefined;
|
|
35
|
+
shapeSize?: "large" | "medium" | "small" | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
38
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledSkeleton = exports.StyledMainActions = exports.ActionsWrapper = exports.StyledIconButton = exports.AddonInfoWrapper = exports.BottomDrawerWrapper = void 0;
|
|
4
|
+
const IconButton_1 = require("../../../../IconButton");
|
|
5
|
+
const PageActions_1 = require("../../../../PageHeader/PageActions");
|
|
6
|
+
const Skeleton_1 = require("../../../../Skeleton");
|
|
7
|
+
const styled_1 = require("../../../../styled");
|
|
8
|
+
const Tooltip_1 = require("../../../../Tooltip");
|
|
9
|
+
exports.BottomDrawerWrapper = styled_1.styled.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: ${({ theme }) => theme.spacing(6)};
|
|
13
|
+
|
|
14
|
+
padding: ${({ theme }) => theme.spacing(4)};
|
|
15
|
+
`;
|
|
16
|
+
exports.AddonInfoWrapper = styled_1.styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: ${({ theme }) => theme.spacing(3)};
|
|
20
|
+
`;
|
|
21
|
+
exports.StyledIconButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
22
|
+
${({ theme }) => theme.breakpoints.up('sm')} {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
exports.ActionsWrapper = styled_1.styled.div `
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
30
|
+
|
|
31
|
+
& .${Tooltip_1.tooltipClassnames.contentWrapper} {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
exports.StyledMainActions = (0, styled_1.styled)(PageActions_1.MainActions) `
|
|
36
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
37
|
+
padding-bottom: 0;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
exports.StyledSkeleton = (0, styled_1.styled)(Skeleton_1.Skeleton) `
|
|
41
|
+
${({ theme }) => theme.breakpoints.up('sm')} {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -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("./useLogic"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type PageContentHeaderActionsProps } from '../../types';
|
|
3
|
+
type UseLogicParams<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = PageContentHeaderActionsProps<TMainActionComponent, TSecondaryActionComponent>;
|
|
4
|
+
export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>({ main: rawMain, secondary: rawSecondary, secondaryVisible: rawSecondaryVisible, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent>) => {
|
|
5
|
+
open: boolean;
|
|
6
|
+
handleOpenMenu: () => void;
|
|
7
|
+
handleCloseMenu: () => void;
|
|
8
|
+
main: import("../../../../..").MainAction<TMainActionComponent>[];
|
|
9
|
+
secondary: import("../../../../../ActionGroup").SecondaryAction<TSecondaryActionComponent>[];
|
|
10
|
+
secondaryVisible: import("../../../../../ActionGroup").SecondaryVisibleAction[];
|
|
11
|
+
title: import("react").ReactNode;
|
|
12
|
+
description: import("react").ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const useMenu_1 = require("../../../../../useMenu");
|
|
6
|
+
const PageContentHeaderContext_1 = require("../../../PageContentHeaderContext");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const useLogic = ({ main: rawMain = [], secondary: rawSecondary = [], secondaryVisible: rawSecondaryVisible = [], }) => {
|
|
9
|
+
const { open, handleOpenMenu, handleCloseMenu } = (0, useMenu_1.useMenu)();
|
|
10
|
+
const { title, description } = (0, react_1.useContext)(PageContentHeaderContext_1.PageContentHeaderContext);
|
|
11
|
+
const [main, secondary, secondaryVisible] = (0, react_1.useMemo)(() => [
|
|
12
|
+
(0, utils_1.composeCloseIntoActions)(rawMain, handleCloseMenu),
|
|
13
|
+
(0, utils_1.composeCloseIntoActions)(rawSecondary, handleCloseMenu),
|
|
14
|
+
(0, utils_1.composeCloseIntoActions)(rawSecondaryVisible, handleCloseMenu),
|
|
15
|
+
], [rawMain, rawSecondary, rawSecondaryVisible, handleCloseMenu]);
|
|
16
|
+
return {
|
|
17
|
+
open,
|
|
18
|
+
handleOpenMenu,
|
|
19
|
+
handleCloseMenu,
|
|
20
|
+
main,
|
|
21
|
+
secondary,
|
|
22
|
+
secondaryVisible,
|
|
23
|
+
title,
|
|
24
|
+
description,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.useLogic = useLogic;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type MouseEventHandler } from 'react';
|
|
2
|
+
type NestedAction = {
|
|
3
|
+
onClick?: MouseEventHandler;
|
|
4
|
+
};
|
|
5
|
+
type Action = {
|
|
6
|
+
onClick?: MouseEventHandler;
|
|
7
|
+
isNested?: boolean;
|
|
8
|
+
actions?: NestedAction[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Рекурсивно оборачивает onClick обработчики действий, добавляя вызов closeFn
|
|
12
|
+
*/
|
|
13
|
+
export declare const composeCloseIntoActions: <TAction extends Action>(actions: TAction[], closeFn: () => void) => TAction[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.composeCloseIntoActions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Рекурсивно оборачивает onClick обработчики действий, добавляя вызов closeFn
|
|
6
|
+
*/
|
|
7
|
+
const composeCloseIntoActions = (actions, closeFn) => {
|
|
8
|
+
return actions.map((action) => {
|
|
9
|
+
const composed = {
|
|
10
|
+
...action,
|
|
11
|
+
onClick: (event) => {
|
|
12
|
+
action.onClick?.(event);
|
|
13
|
+
closeFn();
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
if (action.actions) {
|
|
17
|
+
composed.actions = (0, exports.composeCloseIntoActions)(action.actions, closeFn);
|
|
18
|
+
}
|
|
19
|
+
return composed;
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.composeCloseIntoActions = composeCloseIntoActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './composeCloseIntoActions';
|
|
@@ -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("./composeCloseIntoActions"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './composeCloseIntoActions';
|
|
@@ -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("./composeCloseIntoActions"), exports);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ElementType } from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
export
|
|
4
|
-
export declare const PageContentHeaderActions: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>(props: PageContentHeaderActionsProps<TMainActionComponent, TSecondaryActionComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import { type PageContentHeaderActionsProps } from './types';
|
|
3
|
+
export declare const PageContentHeaderActions: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>({ isLoading, ...props }: PageContentHeaderActionsProps<TMainActionComponent, TSecondaryActionComponent>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageContentHeaderActions = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const PageHeader_1 = require("../../../PageHeader");
|
|
6
|
-
const
|
|
7
|
-
|
|
6
|
+
const MobilePageContentHeaderActions_1 = require("./MobilePageContentHeaderActions");
|
|
7
|
+
const PageContentHeaderActionsSkeleton_1 = require("./PageContentHeaderActionsSkeleton");
|
|
8
|
+
const PageContentHeaderActions = ({ isLoading, ...props }) => {
|
|
9
|
+
if (isLoading) {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(PageContentHeaderActionsSkeleton_1.PageContentHeaderActionsSkeleton, {});
|
|
11
|
+
}
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(PageHeader_1.PageActions, { size: "medium", spacing: 1, ...props }), (0, jsx_runtime_1.jsx)(MobilePageContentHeaderActions_1.MobilePageContentHeaderActions, { ...props })] }));
|
|
8
13
|
};
|
|
9
14
|
exports.PageContentHeaderActions = PageContentHeaderActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PageContentHeaderActionsSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageContentHeaderActionsSkeleton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const styles_1 = require("./styles");
|
|
6
|
+
const PageContentHeaderActionsSkeleton = () => {
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(styles_1.StyledSkeleton, { variant: "rounded" });
|
|
8
|
+
};
|
|
9
|
+
exports.PageContentHeaderActionsSkeleton = PageContentHeaderActionsSkeleton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageContentHeaderActionsSkeleton';
|
|
@@ -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("./PageContentHeaderActionsSkeleton"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledSkeleton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../../..").WithoutEmotionSpecific<import("@mui/material").SkeletonProps<import("react").ElementType, unknown>>, "animation" | "variant"> & {
|
|
3
|
+
component?: import("react").ElementType | undefined;
|
|
4
|
+
variant?: "text" | "circular" | "rounded" | undefined;
|
|
5
|
+
shapeSize?: "large" | "medium" | "small" | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledSkeleton = void 0;
|
|
4
|
+
const Skeleton_1 = require("../../../../Skeleton");
|
|
5
|
+
const styled_1 = require("../../../../styled");
|
|
6
|
+
exports.StyledSkeleton = (0, styled_1.styled)(Skeleton_1.Skeleton) `
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
|
|
9
|
+
width: 180px;
|
|
10
|
+
height: 32px;
|
|
11
|
+
|
|
12
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
13
|
+
width: 40px;
|
|
14
|
+
height: 40px;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./PageContentHeaderActions"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
__exportStar(require("./PageContentHeaderActionsSkeleton"), exports);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
|
+
import type { PageActionsProps } from '../../../PageHeader';
|
|
3
|
+
export type PageContentHeaderActionsProps<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = PageActionsProps<TMainActionComponent, TSecondaryActionComponent>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type PageContentHeaderContextProps = {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Контекст для проброса параметров (title, description) для использования внутри bottomDrawer в мобильном отображении.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PageContentHeaderContext: import("react").Context<PageContentHeaderContextProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageContentHeaderContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Контекст для проброса параметров (title, description) для использования внутри bottomDrawer в мобильном отображении.
|
|
7
|
+
*/
|
|
8
|
+
exports.PageContentHeaderContext = (0, react_1.createContext)({
|
|
9
|
+
title: undefined,
|
|
10
|
+
description: undefined,
|
|
11
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type PageContentHeaderContextProps } from '../PageContentHeaderContext';
|
|
3
|
+
type Props = PageContentHeaderContextProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const PageContentHeaderProvider: ({ children, title, description, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageContentHeaderProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const PageContentHeaderContext_1 = require("../PageContentHeaderContext");
|
|
7
|
+
const PageContentHeaderProvider = ({ children, title, description, }) => {
|
|
8
|
+
const contextValue = (0, react_1.useMemo)(() => ({ title, description }), [title, description]);
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(PageContentHeaderContext_1.PageContentHeaderContext.Provider, { value: contextValue, children: children }));
|
|
10
|
+
};
|
|
11
|
+
exports.PageContentHeaderProvider = PageContentHeaderProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageContentHeaderProvider';
|
|
@@ -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("./PageContentHeaderProvider"), exports);
|
|
@@ -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("./PageContentHeaderContext"), exports);
|
|
18
|
+
__exportStar(require("./PageContentHeaderProvider"), exports);
|
|
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Title = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const OverflowTypography_1 = require("../../../OverflowTypography");
|
|
6
|
-
const Skeleton_1 = require("../../../Skeleton");
|
|
7
6
|
const styles_1 = require("./styles");
|
|
8
7
|
const Title = ({ title, isLoading, children }) => {
|
|
9
8
|
if (!title && !children && isLoading) {
|
|
10
|
-
return (0, jsx_runtime_1.jsx)(
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(styles_1.StyledSkeleton, { variant: "rounded" });
|
|
11
10
|
}
|
|
12
11
|
if (typeof title === 'string') {
|
|
13
12
|
return ((0, jsx_runtime_1.jsxs)(styles_1.TitleWrapper, { component: "h3", variant: "h5", children: [(0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { component: "div", variant: "inherit", children: title }), children] }));
|
|
@@ -10,3 +10,10 @@ export declare const TitleWrapper: import("@emotion/styled/dist/declarations/src
|
|
|
10
10
|
} & import("react").HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLSpanElement> & {
|
|
11
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
12
|
}, {}, {}>;
|
|
13
|
+
export declare const StyledSkeleton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../../..").WithoutEmotionSpecific<import("@mui/material").SkeletonProps<import("react").ElementType, unknown>>, "animation" | "variant"> & {
|
|
14
|
+
component?: import("react").ElementType | undefined;
|
|
15
|
+
variant?: "text" | "circular" | "rounded" | undefined;
|
|
16
|
+
shapeSize?: "large" | "medium" | "small" | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TitleWrapper = void 0;
|
|
3
|
+
exports.StyledSkeleton = exports.TitleWrapper = void 0;
|
|
4
|
+
const Skeleton_1 = require("../../../Skeleton");
|
|
4
5
|
const styled_1 = require("../../../styled");
|
|
5
6
|
const Typography_1 = require("../../../Typography");
|
|
6
7
|
exports.TitleWrapper = (0, styled_1.styled)(Typography_1.Typography) `
|
|
@@ -9,3 +10,11 @@ exports.TitleWrapper = (0, styled_1.styled)(Typography_1.Typography) `
|
|
|
9
10
|
gap: ${({ theme }) => theme.spacing(1)};
|
|
10
11
|
align-items: center;
|
|
11
12
|
`;
|
|
13
|
+
exports.StyledSkeleton = (0, styled_1.styled)(Skeleton_1.Skeleton) `
|
|
14
|
+
width: 200px;
|
|
15
|
+
height: 20px;
|
|
16
|
+
|
|
17
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
@@ -14,13 +14,13 @@ exports.Wrapper = styled_1.styled.header `
|
|
|
14
14
|
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
15
15
|
|
|
16
16
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
17
|
-
|
|
17
|
+
gap: ${({ theme }) => theme.spacing(5)};
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
height: 48px;
|
|
20
|
+
padding: ${({ theme }) => theme.spacing(0, 1, 0, 4)};
|
|
21
|
+
|
|
22
|
+
background-color: ${({ theme }) => theme.palette.background.default};
|
|
23
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
24
24
|
}
|
|
25
25
|
`;
|
|
26
26
|
exports.TitleBlock = styled_1.styled.div `
|
|
@@ -29,6 +29,8 @@ exports.TitleBlock = styled_1.styled.div `
|
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
|
|
31
31
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
32
|
+
width: 100%;
|
|
33
|
+
|
|
32
34
|
& .${constants_1.pageContentHeaderClassnames.description} {
|
|
33
35
|
display: none;
|
|
34
36
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -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("./useLogic"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const PageHeader_1 = require("../../../PageHeader");
|
|
6
|
+
const useViewportType_1 = require("../../../useViewportType");
|
|
7
|
+
const useLogic = () => {
|
|
8
|
+
const [pageHeaderContainer, setPageHeaderContainer] = (0, react_1.useState)(null);
|
|
9
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
const container = document.querySelector(`.${PageHeader_1.pageHeaderClassnames.root}`);
|
|
12
|
+
setPageHeaderContainer(container);
|
|
13
|
+
}, []);
|
|
14
|
+
return {
|
|
15
|
+
pageHeaderContainer,
|
|
16
|
+
isMobile,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.useLogic = useLogic;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { pageContentClassnames } from './constants';
|
|
2
2
|
export { PageContent } from './PageContent';
|
|
3
|
-
export { PageContentHeader, PageContentHeaderActions, type PageContentHeaderActionsProps, type PageContentHeaderProps, } from './PageContentHeader';
|
|
3
|
+
export { PageContentHeader, PageContentHeaderActions, type PageContentHeaderActionsProps, PageContentHeaderActionsSkeleton, type PageContentHeaderProps, } from './PageContentHeader';
|
|
4
4
|
export type { PageContentProps } from './types';
|