@astral/ui 4.90.1 → 4.91.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.
@@ -6,9 +6,8 @@ import { Tag } from '../Tag';
6
6
  import { Typography } from '../Typography';
7
7
  import { cva } from '../utils/cva';
8
8
  import { descriptionListClassnames } from './constants';
9
- import { DescriptionWrapper, ListWrapper, StyledDescriptionName, StyledDescriptionValue, Title, Wrapper, } from './styles';
9
+ import { DescriptionWrapper, ListWrapper, StyledDescriptionName, Title, Wrapper, } from './styles';
10
10
  import { useLogic } from './useLogic';
11
- import { getTooltipProps } from './utils';
12
11
  const descriptionList = cva(descriptionListClassnames.root, {
13
12
  variants: {
14
13
  variant: {
@@ -39,8 +38,7 @@ export const DescriptionList = ({ items, variant: listVariant = 'default', title
39
38
  return (_jsx(Description.Value, { isHidePersonalData: optionProps.isHidePersonalData, children: _jsx(Tag, { label: value, color: color, variant: "light" }) }));
40
39
  }
41
40
  if (variant === 'guid') {
42
- const tooltipProps = getTooltipProps(canCopy);
43
- return (_jsx(StyledDescriptionValue, { canCopy: canCopy, "$isCopy": canCopy, color: color, copyPosition: copyPosition, copyText: copyText, children: _jsx(GuidTypography, { tooltipProps: tooltipProps, children: value }) }));
41
+ return (_jsx(Description.Value, { isHidePersonalData: optionProps.isHidePersonalData, children: _jsx(GuidTypography, { copyParams: { copyText: copyText || String(value) }, canCopy: canCopy, children: value }) }));
44
42
  }
45
43
  return (_jsx(Description.Value, { canCopy: canCopy, color: color, copyPosition: copyPosition, isHidePersonalData: optionProps.isHidePersonalData, children: value }));
46
44
  }, []);
@@ -20,17 +20,6 @@ export declare const ListWrapper: import("../styled").StyledComponent<{
20
20
  $variant?: DescriptionListVariant | undefined;
21
21
  $hasDivider: boolean;
22
22
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, {}>;
23
- export declare const StyledDescriptionValue: import("../styled").StyledComponent<Pick<import("../Typography").TypographyProps, "color" | "children" | "variant" | "isTabularNums"> & {
24
- stub?: import("react").ReactNode;
25
- canCopy?: boolean | undefined;
26
- copyPosition?: "left" | "right" | undefined;
27
- copyText?: string | undefined;
28
- isHidePersonalData?: boolean | undefined;
29
- } & {
30
- theme?: import("@emotion/react").Theme | undefined;
31
- } & {
32
- $isCopy?: boolean | undefined;
33
- }, {}, {}>;
34
23
  export declare const DescriptionWrapper: import("../styled").StyledComponent<{
35
24
  theme?: import("@emotion/react").Theme | undefined;
36
25
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -49,13 +49,6 @@ export const ListWrapper = styled('dl', {
49
49
  row-gap: ${({ theme }) => theme.spacing(3)};
50
50
  }
51
51
  `;
52
- export const StyledDescriptionValue = styled(Description.Value, {
53
- shouldForwardProp: (prop) => !['$isCopy'].includes(prop),
54
- }) `
55
- display: ${({ $isCopy }) => $isCopy && 'flex'};
56
-
57
- width: ${({ $isCopy }) => $isCopy && 'calc(100% - 20px)'};
58
- `;
59
52
  export const DescriptionWrapper = styled.div `
60
53
  display: flex;
61
54
  flex-direction: column;
@@ -11,7 +11,6 @@ const cva_1 = require("../utils/cva");
11
11
  const constants_1 = require("./constants");
12
12
  const styles_1 = require("./styles");
13
13
  const useLogic_1 = require("./useLogic");
14
- const utils_1 = require("./utils");
15
14
  const descriptionList = (0, cva_1.cva)(constants_1.descriptionListClassnames.root, {
16
15
  variants: {
17
16
  variant: {
@@ -42,8 +41,7 @@ const DescriptionList = ({ items, variant: listVariant = 'default', title, direc
42
41
  return ((0, jsx_runtime_1.jsx)(Description_1.Description.Value, { isHidePersonalData: optionProps.isHidePersonalData, children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { label: value, color: color, variant: "light" }) }));
43
42
  }
44
43
  if (variant === 'guid') {
45
- const tooltipProps = (0, utils_1.getTooltipProps)(canCopy);
46
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledDescriptionValue, { canCopy: canCopy, "$isCopy": canCopy, color: color, copyPosition: copyPosition, copyText: copyText, children: (0, jsx_runtime_1.jsx)(GuidTypography_1.GuidTypography, { tooltipProps: tooltipProps, children: value }) }));
44
+ return ((0, jsx_runtime_1.jsx)(Description_1.Description.Value, { isHidePersonalData: optionProps.isHidePersonalData, children: (0, jsx_runtime_1.jsx)(GuidTypography_1.GuidTypography, { copyParams: { copyText: copyText || String(value) }, canCopy: canCopy, children: value }) }));
47
45
  }
48
46
  return ((0, jsx_runtime_1.jsx)(Description_1.Description.Value, { canCopy: canCopy, color: color, copyPosition: copyPosition, isHidePersonalData: optionProps.isHidePersonalData, children: value }));
49
47
  }, []);
@@ -20,17 +20,6 @@ export declare const ListWrapper: import("@emotion/styled/dist/declarations/src/
20
20
  $variant?: DescriptionListVariant | undefined;
21
21
  $hasDivider: boolean;
22
22
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDListElement>, HTMLDListElement>, {}>;
23
- export declare const StyledDescriptionValue: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Pick<import("../Typography").TypographyProps, "color" | "children" | "variant" | "isTabularNums"> & {
24
- stub?: import("react").ReactNode;
25
- canCopy?: boolean | undefined;
26
- copyPosition?: "left" | "right" | undefined;
27
- copyText?: string | undefined;
28
- isHidePersonalData?: boolean | undefined;
29
- } & {
30
- theme?: import("@emotion/react").Theme | undefined;
31
- } & {
32
- $isCopy?: boolean | undefined;
33
- }, {}, {}>;
34
23
  export declare const DescriptionWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
35
24
  theme?: import("@emotion/react").Theme | undefined;
36
25
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Title = exports.DescriptionWrapper = exports.StyledDescriptionValue = exports.ListWrapper = exports.Wrapper = exports.StyledDescriptionName = void 0;
3
+ exports.Title = exports.DescriptionWrapper = exports.ListWrapper = exports.Wrapper = exports.StyledDescriptionName = void 0;
4
4
  const Description_1 = require("../Description");
5
5
  const styled_1 = require("../styled");
6
6
  const Typography_1 = require("../Typography");
@@ -52,13 +52,6 @@ exports.ListWrapper = (0, styled_1.styled)('dl', {
52
52
  row-gap: ${({ theme }) => theme.spacing(3)};
53
53
  }
54
54
  `;
55
- exports.StyledDescriptionValue = (0, styled_1.styled)(Description_1.Description.Value, {
56
- shouldForwardProp: (prop) => !['$isCopy'].includes(prop),
57
- }) `
58
- display: ${({ $isCopy }) => $isCopy && 'flex'};
59
-
60
- width: ${({ $isCopy }) => $isCopy && 'calc(100% - 20px)'};
61
- `;
62
55
  exports.DescriptionWrapper = styled_1.styled.div `
63
56
  display: flex;
64
57
  flex-direction: column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.90.1",
3
+ "version": "4.91.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {