@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.
Files changed (41) hide show
  1. package/components/GuidTypography/GuidTypography.d.ts +2 -8
  2. package/components/GuidTypography/GuidTypography.js +12 -7
  3. package/components/GuidTypography/index.d.ts +2 -1
  4. package/components/GuidTypography/public.d.ts +2 -1
  5. package/components/GuidTypography/types.d.ts +16 -0
  6. package/components/GuidTypography/types.js +1 -0
  7. package/components/GuidTypography/useLogic/index.d.ts +1 -0
  8. package/components/GuidTypography/useLogic/index.js +1 -0
  9. package/components/GuidTypography/useLogic/useLogic.d.ts +638 -0
  10. package/components/GuidTypography/useLogic/useLogic.js +18 -0
  11. package/components/JsonViewer/NodeValue/styles.d.ts +2 -0
  12. package/components/PageHeader/HeaderContent/styles.js +7 -2
  13. package/components/Tabs/Tabs.d.ts +1 -1
  14. package/components/Tabs/Tabs.js +4 -2
  15. package/components/Tabs/constants.d.ts +3 -0
  16. package/components/Tabs/constants.js +4 -0
  17. package/components/Tabs/index.d.ts +2 -1
  18. package/components/Tabs/index.js +2 -1
  19. package/components/Tabs/public.d.ts +1 -0
  20. package/components/Tabs/public.js +1 -0
  21. package/node/components/GuidTypography/GuidTypography.d.ts +2 -8
  22. package/node/components/GuidTypography/GuidTypography.js +11 -6
  23. package/node/components/GuidTypography/index.d.ts +2 -1
  24. package/node/components/GuidTypography/public.d.ts +2 -1
  25. package/node/components/GuidTypography/types.d.ts +16 -0
  26. package/node/components/GuidTypography/types.js +2 -0
  27. package/node/components/GuidTypography/useLogic/index.d.ts +1 -0
  28. package/node/components/GuidTypography/useLogic/index.js +17 -0
  29. package/node/components/GuidTypography/useLogic/useLogic.d.ts +638 -0
  30. package/node/components/GuidTypography/useLogic/useLogic.js +22 -0
  31. package/node/components/JsonViewer/NodeValue/styles.d.ts +2 -0
  32. package/node/components/PageHeader/HeaderContent/styles.js +7 -2
  33. package/node/components/Tabs/Tabs.d.ts +1 -1
  34. package/node/components/Tabs/Tabs.js +4 -2
  35. package/node/components/Tabs/constants.d.ts +3 -0
  36. package/node/components/Tabs/constants.js +7 -0
  37. package/node/components/Tabs/index.d.ts +2 -1
  38. package/node/components/Tabs/index.js +4 -1
  39. package/node/components/Tabs/public.d.ts +1 -0
  40. package/node/components/Tabs/public.js +3 -0
  41. package/package.json +1 -1
@@ -1,8 +1,2 @@
1
- import { type OverflowedTypographyProps } from '../OverflowTypography';
2
- export type GuidTypographyProps = OverflowedTypographyProps & {
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;
@@ -1,13 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { OverflowTypography, } from '../OverflowTypography';
3
- import { useHidePersonalData } from '../personalDataSecurity';
2
+ import { CopyTypography } from '../CopyTypography';
3
+ import { OverflowTypography } from '../OverflowTypography';
4
4
  import { classNames } from '../utils/classNames';
5
- export const GuidTypography = ({ className, isHidePersonalData, tooltipProps, ...props }) => {
6
- const hidePersonalDataClassname = useHidePersonalData({
7
- isEnabled: isHidePersonalData,
8
- });
5
+ import { useLogic } from './useLogic';
6
+ export const GuidTypography = (props) => {
7
+ const { className, tooltipProps, canCopy, copyParams, restProps, resolvedCopyText, hidePersonalDataClassname, } = useLogic(props);
8
+ if (canCopy) {
9
+ return (_jsx(CopyTypography, { isShowCopyText: true, copyText: resolvedCopyText, tooltipProps: {
10
+ ...tooltipProps,
11
+ className: classNames(tooltipProps?.className, hidePersonalDataClassname),
12
+ }, ...copyParams, children: _jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: classNames(className, hidePersonalDataClassname), tooltipProps: { title: undefined }, ...restProps }) }));
13
+ }
9
14
  return (_jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: classNames(className, hidePersonalDataClassname), tooltipProps: {
10
15
  ...tooltipProps,
11
16
  className: classNames(tooltipProps?.className, hidePersonalDataClassname),
12
- }, ...props }));
17
+ }, ...restProps }));
13
18
  };
@@ -1 +1,2 @@
1
- export { GuidTypography, type GuidTypographyProps } from './GuidTypography';
1
+ export { GuidTypography } from './GuidTypography';
2
+ export type { GuidTypographyProps } from './types';
@@ -1 +1,2 @@
1
- export { GuidTypography, type GuidTypographyProps } from './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 {};
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1 @@
1
+ export * from './useLogic';