@astral/ui 4.71.4 → 4.72.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.d.ts +2 -1
- package/components/PageContent/PageContentHeader/Description/Description.js +4 -4
- package/components/PageContent/PageContentHeader/PageContentHeader.js +2 -1
- package/components/PageContent/PageContentHeader/constants.d.ts +4 -0
- package/components/PageContent/PageContentHeader/constants.js +5 -0
- package/components/PageContent/PageContentHeader/styles.js +7 -0
- package/node/components/PageContent/PageContentHeader/Description/Description.d.ts +2 -1
- package/node/components/PageContent/PageContentHeader/Description/Description.js +4 -4
- package/node/components/PageContent/PageContentHeader/PageContentHeader.js +2 -1
- package/node/components/PageContent/PageContentHeader/constants.d.ts +4 -0
- package/node/components/PageContent/PageContentHeader/constants.js +8 -0
- package/node/components/PageContent/PageContentHeader/styles.js +7 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
type DescriptionProps = {
|
|
3
3
|
description?: ReactNode;
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
+
className?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Description: ({ description, isLoading }: DescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Description: ({ className, description, isLoading, }: DescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Skeleton } from '../../../Skeleton';
|
|
3
3
|
import { Typography } from '../../../Typography';
|
|
4
|
-
export const Description = ({ description, isLoading }) => {
|
|
4
|
+
export const Description = ({ className, description, isLoading, }) => {
|
|
5
5
|
if (!description && isLoading) {
|
|
6
|
-
return _jsx(Skeleton, { height: 20, width: 300 });
|
|
6
|
+
return _jsx(Skeleton, { className: className, height: 20, width: 300 });
|
|
7
7
|
}
|
|
8
8
|
if (typeof description === 'string') {
|
|
9
|
-
return _jsx(Typography, { variant: "body1", children: description });
|
|
9
|
+
return (_jsx(Typography, { className: className, variant: "body1", children: description }));
|
|
10
10
|
}
|
|
11
|
-
return (_jsx(Typography, { component: "div", variant: "body1", children: description }));
|
|
11
|
+
return (_jsx(Typography, { className: className, component: "div", variant: "body1", children: description }));
|
|
12
12
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { pageContentHeaderClassnames } from './constants';
|
|
2
3
|
import { Description } from './Description';
|
|
3
4
|
import { TitleBlock, Wrapper } from './styles';
|
|
4
5
|
import { Title } from './Title';
|
|
5
6
|
export const PageContentHeader = ({ title, description, actions, children, isLoading, }) => {
|
|
6
|
-
return (_jsxs(Wrapper, { children: [_jsxs(TitleBlock, { children: [_jsx(Title, { title: title, isLoading: isLoading, children: children }), _jsx(Description, { description: description, isLoading: isLoading })] }), actions && actions] }));
|
|
7
|
+
return (_jsxs(Wrapper, { className: pageContentHeaderClassnames.pageContentHeader, children: [_jsxs(TitleBlock, { children: [_jsx(Title, { title: title, isLoading: isLoading, children: children }), _jsx(Description, { className: pageContentHeaderClassnames.description, description: description, isLoading: isLoading })] }), actions && actions] }));
|
|
7
8
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { styled } from '../../styled';
|
|
2
|
+
import { pageContentHeaderClassnames } from './constants';
|
|
2
3
|
export const Wrapper = styled.header `
|
|
3
4
|
display: flex;
|
|
4
5
|
gap: ${({ theme }) => theme.spacing(2)};
|
|
@@ -23,4 +24,10 @@ export const TitleBlock = styled.div `
|
|
|
23
24
|
overflow: hidden;
|
|
24
25
|
display: flex;
|
|
25
26
|
flex-direction: column;
|
|
27
|
+
|
|
28
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
29
|
+
& .${pageContentHeaderClassnames.description} {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
26
33
|
`;
|
|
@@ -2,6 +2,7 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
type DescriptionProps = {
|
|
3
3
|
description?: ReactNode;
|
|
4
4
|
isLoading?: boolean;
|
|
5
|
+
className?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const Description: ({ description, isLoading }: DescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Description: ({ className, description, isLoading, }: DescriptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -4,13 +4,13 @@ exports.Description = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Skeleton_1 = require("../../../Skeleton");
|
|
6
6
|
const Typography_1 = require("../../../Typography");
|
|
7
|
-
const Description = ({ description, isLoading }) => {
|
|
7
|
+
const Description = ({ className, description, isLoading, }) => {
|
|
8
8
|
if (!description && isLoading) {
|
|
9
|
-
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { height: 20, width: 300 });
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { className: className, height: 20, width: 300 });
|
|
10
10
|
}
|
|
11
11
|
if (typeof description === 'string') {
|
|
12
|
-
return (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", children: description });
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { className: className, variant: "body1", children: description }));
|
|
13
13
|
}
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { component: "div", variant: "body1", children: description }));
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { className: className, component: "div", variant: "body1", children: description }));
|
|
15
15
|
};
|
|
16
16
|
exports.Description = Description;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageContentHeader = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
5
6
|
const Description_1 = require("./Description");
|
|
6
7
|
const styles_1 = require("./styles");
|
|
7
8
|
const Title_1 = require("./Title");
|
|
8
9
|
const PageContentHeader = ({ title, description, actions, children, isLoading, }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsxs)(styles_1.TitleBlock, { children: [(0, jsx_runtime_1.jsx)(Title_1.Title, { title: title, isLoading: isLoading, children: children }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description, isLoading: isLoading })] }), actions && actions] }));
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: constants_1.pageContentHeaderClassnames.pageContentHeader, children: [(0, jsx_runtime_1.jsxs)(styles_1.TitleBlock, { children: [(0, jsx_runtime_1.jsx)(Title_1.Title, { title: title, isLoading: isLoading, children: children }), (0, jsx_runtime_1.jsx)(Description_1.Description, { className: constants_1.pageContentHeaderClassnames.description, description: description, isLoading: isLoading })] }), actions && actions] }));
|
|
10
11
|
};
|
|
11
12
|
exports.PageContentHeader = PageContentHeader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pageContentHeaderClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
|
|
5
|
+
exports.pageContentHeaderClassnames = {
|
|
6
|
+
pageContentHeader: (0, createUIKitClassname_1.createUIKitClassname)('page-content-header'),
|
|
7
|
+
description: (0, createUIKitClassname_1.createUIKitClassname)('page-content-header__description'),
|
|
8
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TitleBlock = exports.Wrapper = void 0;
|
|
4
4
|
const styled_1 = require("../../styled");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
5
6
|
exports.Wrapper = styled_1.styled.header `
|
|
6
7
|
display: flex;
|
|
7
8
|
gap: ${({ theme }) => theme.spacing(2)};
|
|
@@ -26,4 +27,10 @@ exports.TitleBlock = styled_1.styled.div `
|
|
|
26
27
|
overflow: hidden;
|
|
27
28
|
display: flex;
|
|
28
29
|
flex-direction: column;
|
|
30
|
+
|
|
31
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
32
|
+
& .${constants_1.pageContentHeaderClassnames.description} {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
29
36
|
`;
|