@astral/ui 4.88.0 → 4.89.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/GuidTypography/GuidTypography.d.ts +2 -8
- package/components/GuidTypography/GuidTypography.js +12 -7
- package/components/GuidTypography/index.d.ts +2 -1
- package/components/GuidTypography/public.d.ts +2 -1
- package/components/GuidTypography/types.d.ts +16 -0
- package/components/GuidTypography/types.js +1 -0
- package/components/GuidTypography/useLogic/index.d.ts +1 -0
- package/components/GuidTypography/useLogic/index.js +1 -0
- package/components/GuidTypography/useLogic/useLogic.d.ts +638 -0
- package/components/GuidTypography/useLogic/useLogic.js +18 -0
- package/components/JsonViewer/NodeValue/styles.d.ts +2 -0
- package/components/PageHeader/HeaderContent/styles.js +7 -2
- package/components/Tabs/Tabs.d.ts +1 -1
- package/components/Tabs/Tabs.js +4 -2
- package/components/Tabs/constants.d.ts +3 -0
- package/components/Tabs/constants.js +4 -0
- package/components/Tabs/index.d.ts +2 -1
- package/components/Tabs/index.js +2 -1
- package/components/Tabs/public.d.ts +1 -0
- package/components/Tabs/public.js +1 -0
- package/node/components/GuidTypography/GuidTypography.d.ts +2 -8
- package/node/components/GuidTypography/GuidTypography.js +11 -6
- package/node/components/GuidTypography/index.d.ts +2 -1
- package/node/components/GuidTypography/public.d.ts +2 -1
- package/node/components/GuidTypography/types.d.ts +16 -0
- package/node/components/GuidTypography/types.js +2 -0
- package/node/components/GuidTypography/useLogic/index.d.ts +1 -0
- package/node/components/GuidTypography/useLogic/index.js +17 -0
- package/node/components/GuidTypography/useLogic/useLogic.d.ts +638 -0
- package/node/components/GuidTypography/useLogic/useLogic.js +22 -0
- package/node/components/JsonViewer/NodeValue/styles.d.ts +2 -0
- package/node/components/PageHeader/HeaderContent/styles.js +7 -2
- package/node/components/Tabs/Tabs.d.ts +1 -1
- package/node/components/Tabs/Tabs.js +4 -2
- package/node/components/Tabs/constants.d.ts +3 -0
- package/node/components/Tabs/constants.js +7 -0
- package/node/components/Tabs/index.d.ts +2 -1
- package/node/components/Tabs/index.js +4 -1
- package/node/components/Tabs/public.d.ts +1 -0
- package/node/components/Tabs/public.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useHidePersonalData } from '../../personalDataSecurity';
|
|
2
|
+
export const useLogic = ({ className, isHidePersonalData, tooltipProps, canCopy, copyParams, ...restProps }) => {
|
|
3
|
+
const hidePersonalDataClassname = useHidePersonalData({
|
|
4
|
+
isEnabled: isHidePersonalData,
|
|
5
|
+
});
|
|
6
|
+
const guidText = typeof restProps.children === 'string' ? restProps.children : undefined;
|
|
7
|
+
const resolvedCopyText = copyParams?.copyText ?? guidText;
|
|
8
|
+
return {
|
|
9
|
+
className,
|
|
10
|
+
isHidePersonalData,
|
|
11
|
+
tooltipProps,
|
|
12
|
+
canCopy,
|
|
13
|
+
copyParams,
|
|
14
|
+
restProps,
|
|
15
|
+
resolvedCopyText,
|
|
16
|
+
hidePersonalDataClassname,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -1050,6 +1050,8 @@ export declare const GuidValue: import("../../styled").StyledComponent<import(".
|
|
|
1050
1050
|
children?: import("react").ReactNode;
|
|
1051
1051
|
} & {
|
|
1052
1052
|
isHidePersonalData?: boolean | undefined;
|
|
1053
|
+
canCopy?: boolean | undefined;
|
|
1054
|
+
copyParams?: import("../../CopyTypography").CopyTypographyProps | undefined;
|
|
1053
1055
|
} & {
|
|
1054
1056
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1055
1057
|
} & {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { styled } from '../../styled';
|
|
2
|
+
import { tabsClassnames } from '../../Tabs';
|
|
2
3
|
export const BreadcrumbsWrapper = styled.div `
|
|
3
4
|
grid-column: 2;
|
|
4
5
|
grid-row: 1;
|
|
@@ -13,10 +14,14 @@ export const TabsWrapper = styled.div `
|
|
|
13
14
|
grid-column: 1 / -1;
|
|
14
15
|
grid-row: 4;
|
|
15
16
|
|
|
16
|
-
padding-top: ${({ theme }) => theme.spacing(
|
|
17
|
+
padding-top: ${({ theme }) => theme.spacing(4)};
|
|
17
18
|
|
|
18
19
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
19
|
-
padding: ${({ theme }) => theme.spacing(0,
|
|
20
|
+
padding: ${({ theme }) => theme.spacing(0, 0, 4, 0)};
|
|
21
|
+
|
|
22
|
+
.${tabsClassnames.root} {
|
|
23
|
+
margin: ${({ theme }) => theme.spacing(0, 4)};
|
|
24
|
+
}
|
|
20
25
|
}
|
|
21
26
|
`;
|
|
22
27
|
export const PageSubheader = styled.div `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TabsProps as MuiTabsProps } from '@mui/material/Tabs';
|
|
2
2
|
import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
|
|
3
3
|
export type TabsProps = WithoutEmotionSpecific<MuiTabsProps>;
|
|
4
|
-
export declare const Tabs: ({ ...tabsProps }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Tabs: ({ className, ...tabsProps }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
package/components/Tabs/Tabs.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useScrollToActiveElement } from '../useScrollToActiveElement';
|
|
3
|
+
import { classNames } from '../utils/classNames';
|
|
4
|
+
import { tabsClassnames } from './constants';
|
|
3
5
|
import { Container, Divider, StyledTabs, Wrapper } from './styles';
|
|
4
|
-
export const Tabs = ({ ...tabsProps }) => {
|
|
6
|
+
export const Tabs = ({ className, ...tabsProps }) => {
|
|
5
7
|
const { containerRef } = useScrollToActiveElement();
|
|
6
|
-
return (_jsx(Container, { children: _jsxs(Wrapper, { children: [_jsx(StyledTabs, { ...tabsProps, ref: containerRef }), _jsx(Divider, {})] }) }));
|
|
8
|
+
return (_jsx(Container, { children: _jsxs(Wrapper, { children: [_jsx(StyledTabs, { ...tabsProps, ref: containerRef, className: classNames(className, tabsClassnames.root) }), _jsx(Divider, {})] }) }));
|
|
7
9
|
};
|
package/components/Tabs/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* Скрытие персональных данных от инструментов мониторинга
|
|
5
|
-
*/
|
|
6
|
-
isHidePersonalData?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const GuidTypography: ({ className, isHidePersonalData, tooltipProps, ...props }: GuidTypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { GuidTypographyProps } from './types';
|
|
2
|
+
export declare const GuidTypography: (props: GuidTypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GuidTypography = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const CopyTypography_1 = require("../CopyTypography");
|
|
5
6
|
const OverflowTypography_1 = require("../OverflowTypography");
|
|
6
|
-
const personalDataSecurity_1 = require("../personalDataSecurity");
|
|
7
7
|
const classNames_1 = require("../utils/classNames");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const useLogic_1 = require("./useLogic");
|
|
9
|
+
const GuidTypography = (props) => {
|
|
10
|
+
const { className, tooltipProps, canCopy, copyParams, restProps, resolvedCopyText, hidePersonalDataClassname, } = (0, useLogic_1.useLogic)(props);
|
|
11
|
+
if (canCopy) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(CopyTypography_1.CopyTypography, { isShowCopyText: true, copyText: resolvedCopyText, tooltipProps: {
|
|
13
|
+
...tooltipProps,
|
|
14
|
+
className: (0, classNames_1.classNames)(tooltipProps?.className, hidePersonalDataClassname),
|
|
15
|
+
}, ...copyParams, children: (0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { visibleLastSymbolsCount: 4, className: (0, classNames_1.classNames)(className, hidePersonalDataClassname), tooltipProps: { title: undefined }, ...restProps }) }));
|
|
16
|
+
}
|
|
12
17
|
return ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { visibleLastSymbolsCount: 4, className: (0, classNames_1.classNames)(className, hidePersonalDataClassname), tooltipProps: {
|
|
13
18
|
...tooltipProps,
|
|
14
19
|
className: (0, classNames_1.classNames)(tooltipProps?.className, hidePersonalDataClassname),
|
|
15
|
-
}, ...
|
|
20
|
+
}, ...restProps }));
|
|
16
21
|
};
|
|
17
22
|
exports.GuidTypography = GuidTypography;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { GuidTypography
|
|
1
|
+
export { GuidTypography } from './GuidTypography';
|
|
2
|
+
export type { GuidTypographyProps } from './types';
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { GuidTypography
|
|
1
|
+
export { GuidTypography } from './GuidTypography';
|
|
2
|
+
export type { GuidTypographyProps } from './types';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CopyTypographyProps } from '../CopyTypography';
|
|
2
|
+
import { type OverflowedTypographyProps } from '../OverflowTypography';
|
|
3
|
+
export type GuidTypographyProps = OverflowedTypographyProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Скрытие персональных данных от инструментов мониторинга
|
|
6
|
+
*/
|
|
7
|
+
isHidePersonalData?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Добавляет возможность копирования
|
|
10
|
+
*/
|
|
11
|
+
canCopy?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Добавляет параметры для CopyTypography
|
|
14
|
+
*/
|
|
15
|
+
copyParams?: CopyTypographyProps;
|
|
16
|
+
};
|
|
@@ -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);
|