@synerise/ds-description 1.3.0 → 1.3.2
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/CHANGELOG.md +8 -0
- package/README.md +5 -4
- package/dist/Description.d.ts +2 -2
- package/dist/Description.js +16 -19
- package/dist/Description.styles.d.ts +2 -2
- package/dist/Description.styles.js +26 -37
- package/dist/Description.types.js +1 -1
- package/dist/Row/Copy.d.ts +2 -2
- package/dist/Row/Copy.js +33 -47
- package/dist/Row/Copy.types.d.ts +2 -2
- package/dist/Row/Copy.types.js +1 -1
- package/dist/Row/DescriptionRow.d.ts +2 -2
- package/dist/Row/DescriptionRow.js +29 -33
- package/dist/Row/DescriptionRow.styles.d.ts +10 -10
- package/dist/Row/DescriptionRow.styles.js +31 -39
- package/dist/Row/DescriptionRow.types.d.ts +1 -1
- package/dist/Row/DescriptionRow.types.js +1 -1
- package/dist/Row/Star.d.ts +2 -2
- package/dist/Row/Star.js +10 -21
- package/dist/Row/Star.types.js +1 -1
- package/dist/index.js +8 -3
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-description@1.3.1...@synerise/ds-description@1.3.2) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-description
|
|
9
|
+
|
|
10
|
+
## [1.3.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-description@1.3.0...@synerise/ds-description@1.3.1) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-description
|
|
13
|
+
|
|
6
14
|
# [1.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-description@1.2.7...@synerise/ds-description@1.3.0) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
### Features
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @synerise/ds-description
|
|
|
19
19
|
import Description, {DescriptionRow} from '@synerise/ds-description';
|
|
20
20
|
|
|
21
21
|
<Description type='inline'>
|
|
22
|
-
<DescriptionRow label="Name" value="John Kowalski" prefixEl="Mr"
|
|
22
|
+
<DescriptionRow label="Name" value="John Kowalski" prefixEl="Mr" suffixEl="<Avatar>JK</Avatar>" />
|
|
23
23
|
</Description>
|
|
24
24
|
|
|
25
25
|
```
|
|
@@ -34,17 +34,18 @@ import Description, {DescriptionRow} from '@synerise/ds-description';
|
|
|
34
34
|
|
|
35
35
|
| Property | Description | Type | Default |
|
|
36
36
|
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ------- |
|
|
37
|
-
| type | Type of description: `table` - description will looks like vertical table, `inline` - value will aligns to label, `corner` - label and value have space-between them | `table`/ `inline`/ `corner` | `table` |
|
|
37
|
+
| type | Type of description: `table` - description will looks like vertical table, `inline` - value will aligns to label, `corner` - label and value have space-between them | `table`/ `inline`/ `corner`/ `numbered-list` | `table` |
|
|
38
38
|
| ratio | Define size of column if type='table' | `50-50`/ `25-75` | `50-50` |
|
|
39
39
|
|
|
40
40
|
### DescriptionRow
|
|
41
41
|
|
|
42
42
|
| Property | Description | Type | Default |
|
|
43
43
|
| --------- | ------------------------------------------------------ | ------------------------ | ------- |
|
|
44
|
-
| label | Label of description row | string
|
|
44
|
+
| label | Label of description row | string / React.ReactNode | - |
|
|
45
45
|
| labelIcon | Icon visible before row label | React.ReactNode | - |
|
|
46
46
|
| value | Value of description row | string / React.ReactNode | - |
|
|
47
47
|
| prefixEl | Element rendered before value | string / React.ReactNode | - |
|
|
48
48
|
| suffixEl | Element rendered after value | string / React.ReactNode | - |
|
|
49
49
|
| copyValue | Whether to render copy icon on the end of row | string | - |
|
|
50
|
-
| starType | Whether to render star before value, and type of
|
|
50
|
+
| starType | Whether to render star before value, and type of star | `active`, `inactive` | - |
|
|
51
|
+
| texts | Override tooltip strings for copy icon (`copyTooltip`, `copiedTooltip`) | `RowTexts` | - |
|
package/dist/Description.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DescriptionProps } from './Description.types';
|
|
3
3
|
declare const Description: ({ type, children, ratio, }: DescriptionProps) => React.JSX.Element;
|
|
4
4
|
export default Description;
|
package/dist/Description.js
CHANGED
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Description as Description$1 } from "./Description.styles.js";
|
|
5
|
+
const Description = ({
|
|
6
|
+
type = "table",
|
|
7
|
+
children,
|
|
8
|
+
ratio = "50-50"
|
|
9
|
+
}) => {
|
|
10
|
+
const hasSingleChild = React.useMemo(() => {
|
|
11
11
|
return !Array.isArray(children);
|
|
12
12
|
}, [children]);
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const className = classnames("ds-description", {
|
|
14
|
+
"single-row": hasSingleChild
|
|
15
15
|
});
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
singleRow: hasSingleChild
|
|
21
|
-
}, children);
|
|
16
|
+
return /* @__PURE__ */ jsx(Description$1, { type, ratio, className, singleRow: hasSingleChild, children });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
Description as default
|
|
22
20
|
};
|
|
23
|
-
export default Description;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Description: import(
|
|
1
|
+
import { DescriptionRatio, DescriptionType } from './Description.types';
|
|
2
|
+
export declare const Description: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
type: DescriptionType;
|
|
4
4
|
ratio?: DescriptionRatio;
|
|
5
5
|
singleRow: boolean;
|
|
@@ -1,45 +1,34 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import { PrefixWrapper,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'25-75': '25% 75%',
|
|
9
|
-
'50-50': '50% 50%',
|
|
10
|
-
auto: 'auto auto'
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { PrefixWrapper, SuffixWrapper, ValueWrapper, RowLabel, RowWrapper, RowValue } from "./Row/DescriptionRow.styles.js";
|
|
3
|
+
const getColumnsWidth = (ratio = null) => {
|
|
4
|
+
const mapRatioToWidth = {
|
|
5
|
+
"25-75": "25% 75%",
|
|
6
|
+
"50-50": "50% 50%",
|
|
7
|
+
auto: "auto auto"
|
|
11
8
|
};
|
|
12
|
-
return ratio !== null && mapRatioToWidth[ratio] ? mapRatioToWidth[ratio] :
|
|
13
|
-
};
|
|
14
|
-
var tableStyles = function tableStyles(ratio) {
|
|
15
|
-
return css(["", "{display:grid;grid-column-gap:16px;grid-template-columns:", ";}"], RowWrapper, getColumnsWidth(ratio));
|
|
16
|
-
};
|
|
17
|
-
var inlineStyles = function inlineStyles() {
|
|
18
|
-
return css(["", "{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", "{margin-right:8px;}", "{display:-webkit-box;flex:1;overflow-x:visible;}}"], RowWrapper, RowLabel, RowValue);
|
|
9
|
+
return ratio !== null && mapRatioToWidth[ratio] ? mapRatioToWidth[ratio] : "1fr auto";
|
|
19
10
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
11
|
+
const tableStyles = (ratio) => css(["", "{display:grid;grid-column-gap:16px;grid-template-columns:", ";}"], RowWrapper, getColumnsWidth(ratio));
|
|
12
|
+
const inlineStyles = () => css(["", "{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;", "{margin-right:8px;}", "{display:-webkit-box;flex:1;overflow-x:visible;}}"], RowWrapper, RowLabel, RowValue);
|
|
13
|
+
const cornerStyles = () => css(["", "{display:flex;align-items:center;justify-content:space-between;}"], RowWrapper);
|
|
14
|
+
const Description = /* @__PURE__ */ styled.div.withConfig({
|
|
24
15
|
displayName: "Descriptionstyles__Description",
|
|
25
16
|
componentId: "sc-1myairu-0"
|
|
26
|
-
})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;", ",", ",", ",", "{padding:", ";}", ""], PrefixWrapper, SuffixWrapper, ValueWrapper, RowLabel,
|
|
27
|
-
return props.singleRow ? '0' : '7px 0';
|
|
28
|
-
}, function (props) {
|
|
17
|
+
})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;", ",", ",", ",", "{padding:", ";}", ""], PrefixWrapper, SuffixWrapper, ValueWrapper, RowLabel, (props) => props.singleRow ? "0" : "7px 0", (props) => {
|
|
29
18
|
switch (props.type) {
|
|
30
|
-
case
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
return cornerStyles();
|
|
41
|
-
}
|
|
19
|
+
case "table": {
|
|
20
|
+
return tableStyles(props.ratio);
|
|
21
|
+
}
|
|
22
|
+
case "inline": {
|
|
23
|
+
return inlineStyles();
|
|
24
|
+
}
|
|
25
|
+
case "corner": {
|
|
26
|
+
return cornerStyles();
|
|
27
|
+
}
|
|
42
28
|
default:
|
|
43
29
|
return inlineStyles();
|
|
44
30
|
}
|
|
45
|
-
});
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
Description
|
|
34
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Row/Copy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CopyProps } from './Copy.types';
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated it will receive no further updates and will be removed from future DS versions
|
|
5
5
|
*/
|
package/dist/Row/Copy.js
CHANGED
|
@@ -1,63 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
};
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import copy from "copy-to-clipboard";
|
|
3
|
+
import { useMemo, useState, useCallback } from "react";
|
|
4
|
+
import { useIntl } from "react-intl";
|
|
5
|
+
import Icon, { CopyClipboardM } from "@synerise/ds-icon";
|
|
6
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
7
|
+
import { Copyable } from "./DescriptionRow.styles.js";
|
|
8
|
+
const Copy = ({
|
|
9
|
+
copyValue,
|
|
10
|
+
texts,
|
|
11
|
+
className,
|
|
12
|
+
onMouseEnter,
|
|
13
|
+
onMouseLeave
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
formatMessage
|
|
17
|
+
} = useIntl();
|
|
18
|
+
const textsObj = useMemo(() => texts || {
|
|
19
|
+
copiedTooltip: formatMessage({
|
|
20
|
+
id: "DS.DESCRIPTION.COPIED"
|
|
21
|
+
}),
|
|
22
|
+
copyTooltip: formatMessage({
|
|
23
|
+
id: "DS.DESCRIPTION.COPY-VALUE"
|
|
24
|
+
})
|
|
27
25
|
}, [texts, formatMessage]);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var _useState2 = useState(textsObj.copyTooltip),
|
|
32
|
-
tooltipTitle = _useState2[0],
|
|
33
|
-
setTooltipTitle = _useState2[1];
|
|
34
|
-
var handleCopy = useCallback(function () {
|
|
26
|
+
const [tooltipOpen, setTooltipOpen] = useState(false);
|
|
27
|
+
const [tooltipTitle, setTooltipTitle] = useState(textsObj.copyTooltip);
|
|
28
|
+
const handleCopy = useCallback(() => {
|
|
35
29
|
if (copyValue && copy(copyValue)) {
|
|
36
30
|
setTooltipTitle(textsObj.copiedTooltip);
|
|
37
31
|
setTooltipOpen(true);
|
|
38
32
|
}
|
|
39
33
|
}, [copyValue, setTooltipTitle, textsObj.copiedTooltip]);
|
|
40
|
-
|
|
34
|
+
const handleMouseEnter = useCallback((event) => {
|
|
41
35
|
event.stopPropagation();
|
|
42
36
|
setTooltipTitle(textsObj.copyTooltip);
|
|
43
37
|
setTooltipOpen(true);
|
|
44
38
|
onMouseEnter && onMouseEnter(event);
|
|
45
39
|
}, [setTooltipOpen, textsObj, onMouseEnter]);
|
|
46
|
-
|
|
40
|
+
const handleMouseLeave = useCallback((event) => {
|
|
47
41
|
event.stopPropagation();
|
|
48
42
|
setTooltipOpen(false);
|
|
49
43
|
onMouseLeave && onMouseLeave(event);
|
|
50
44
|
}, [setTooltipOpen, onMouseLeave]);
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
className: "ds-description-copy " + className,
|
|
56
|
-
onClick: handleCopy,
|
|
57
|
-
onMouseEnter: handleMouseEnter,
|
|
58
|
-
onMouseLeave: handleMouseLeave
|
|
59
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
60
|
-
component: /*#__PURE__*/React.createElement(CopyClipboardM, null)
|
|
61
|
-
})));
|
|
45
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: tooltipTitle, open: tooltipOpen, children: /* @__PURE__ */ jsx(Copyable, { className: `ds-description-copy ${className}`, onClick: handleCopy, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(CopyClipboardM, {}) }) }) });
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
Copy as default
|
|
62
49
|
};
|
|
63
|
-
export default Copy;
|
package/dist/Row/Copy.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
2
|
+
import { RowTexts } from './DescriptionRow.types';
|
|
3
3
|
export type CopyProps = WithHTMLAttributes<HTMLDivElement, {
|
|
4
4
|
copyValue: string;
|
|
5
5
|
texts?: RowTexts;
|
package/dist/Row/Copy.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DescriptionRowProps } from './DescriptionRow.types';
|
|
3
3
|
declare const DescriptionRow: React.FC<DescriptionRowProps>;
|
|
4
4
|
export default DescriptionRow;
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import Star from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
copyValue: copyValue,
|
|
31
|
-
texts: texts
|
|
32
|
-
})));
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { RowWrapper, RowLabel, Label, RowValue, PrefixWrapper, ValueWrapper, SuffixWrapper, StyledCopyIcon } from "./DescriptionRow.styles.js";
|
|
3
|
+
import Star from "./Star.js";
|
|
4
|
+
const DescriptionRow = ({
|
|
5
|
+
label,
|
|
6
|
+
labelIcon,
|
|
7
|
+
value,
|
|
8
|
+
prefixEl,
|
|
9
|
+
suffixEl,
|
|
10
|
+
copyValue,
|
|
11
|
+
starType,
|
|
12
|
+
texts
|
|
13
|
+
}) => {
|
|
14
|
+
return /* @__PURE__ */ jsxs(RowWrapper, { copyable: Boolean(copyValue), children: [
|
|
15
|
+
label && /* @__PURE__ */ jsxs(RowLabel, { className: "ds-description-label", children: [
|
|
16
|
+
labelIcon,
|
|
17
|
+
/* @__PURE__ */ jsx(Label, { title: typeof label === "string" ? label : void 0, children: label })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs(RowValue, { children: [
|
|
20
|
+
starType !== void 0 && /* @__PURE__ */ jsx(Star, { starType, hasPrefixEl: Boolean(prefixEl) }),
|
|
21
|
+
prefixEl && /* @__PURE__ */ jsx(PrefixWrapper, { className: "ds-description-prefix", children: prefixEl }),
|
|
22
|
+
value && /* @__PURE__ */ jsx(ValueWrapper, { className: "ds-description-value", title: typeof value === "string" ? value : void 0, children: value }),
|
|
23
|
+
suffixEl && /* @__PURE__ */ jsx(SuffixWrapper, { className: "ds-description-suffix", children: suffixEl }),
|
|
24
|
+
typeof copyValue === "string" && /* @__PURE__ */ jsx(StyledCopyIcon, { copyValue, texts })
|
|
25
|
+
] })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
DescriptionRow as default
|
|
33
30
|
};
|
|
34
|
-
export default DescriptionRow;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export declare const RowLabel: import(
|
|
2
|
-
export declare const Label: import(
|
|
3
|
-
export declare const RowValue: import(
|
|
4
|
-
export declare const Copyable: import(
|
|
5
|
-
export declare const StyledCopyIcon: import(
|
|
6
|
-
export declare const RowWrapper: import(
|
|
1
|
+
export declare const RowLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
2
|
+
export declare const Label: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const RowValue: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const Copyable: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const StyledCopyIcon: import('styled-components').StyledComponent<({ copyValue, texts, onMouseEnter, onMouseLeave, icon, placement, onCopy, onClick, ...rest }: import('@synerise/ds-copy-icon').CopyIconProps) => React.JSX.Element, any, {}, never>;
|
|
6
|
+
export declare const RowWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
7
7
|
copyable: boolean;
|
|
8
8
|
}, never>;
|
|
9
|
-
export declare const PrefixWrapper: import(
|
|
10
|
-
export declare const SuffixWrapper: import(
|
|
11
|
-
export declare const ValueWrapper: import(
|
|
12
|
-
export declare const StarWrapper: import(
|
|
9
|
+
export declare const PrefixWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const SuffixWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const ValueWrapper: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
12
|
+
export declare const StarWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
13
13
|
hasPrefixEl: boolean;
|
|
14
14
|
}, never>;
|
|
@@ -1,65 +1,57 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import CopyIcon from
|
|
3
|
-
import { IconContainer } from
|
|
4
|
-
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import CopyIcon from "@synerise/ds-copy-icon";
|
|
3
|
+
import { IconContainer } from "@synerise/ds-icon";
|
|
4
|
+
const RowLabel = /* @__PURE__ */ styled.span.withConfig({
|
|
5
5
|
displayName: "DescriptionRowstyles__RowLabel",
|
|
6
6
|
componentId: "sc-dj6vdq-0"
|
|
7
|
-
})(["display:flex;font-size:13px;line-height:1.38;color:", ";font-weight:normal;flex-direction:row;align-items:center;justify-content:flex-start;overflow-x:hidden;", "{margin-right:4px;svg{color:", ";fill:", ";}}"],
|
|
8
|
-
|
|
9
|
-
}, IconContainer, function (props) {
|
|
10
|
-
return props.theme.palette['grey-600'];
|
|
11
|
-
}, function (props) {
|
|
12
|
-
return props.theme.palette['grey-600'];
|
|
13
|
-
});
|
|
14
|
-
export var Label = styled.span.withConfig({
|
|
7
|
+
})(["display:flex;font-size:13px;line-height:1.38;color:", ";font-weight:normal;flex-direction:row;align-items:center;justify-content:flex-start;overflow-x:hidden;", "{margin-right:4px;svg{color:", ";fill:", ";}}"], (props) => props.theme.palette["grey-600"], IconContainer, (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-600"]);
|
|
8
|
+
const Label = /* @__PURE__ */ styled.span.withConfig({
|
|
15
9
|
displayName: "DescriptionRowstyles__Label",
|
|
16
10
|
componentId: "sc-dj6vdq-1"
|
|
17
11
|
})(["width:100%;text-overflow:ellipsis;white-space:nowrap;display:inline;overflow-x:hidden;"]);
|
|
18
|
-
|
|
12
|
+
const RowValue = /* @__PURE__ */ styled.div.withConfig({
|
|
19
13
|
displayName: "DescriptionRowstyles__RowValue",
|
|
20
14
|
componentId: "sc-dj6vdq-2"
|
|
21
|
-
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;font-size:13px;line-height:1.38;color:", ";font-weight:500;overflow-x:hidden;.ds-status{margin:0;}"],
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
export var Copyable = styled.div.withConfig({
|
|
15
|
+
})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;font-size:13px;line-height:1.38;color:", ";font-weight:500;overflow-x:hidden;.ds-status{margin:0;}"], (props) => props.theme.palette["grey-800"]);
|
|
16
|
+
const Copyable = /* @__PURE__ */ styled.div.withConfig({
|
|
25
17
|
displayName: "DescriptionRowstyles__Copyable",
|
|
26
18
|
componentId: "sc-dj6vdq-3"
|
|
27
|
-
})(["visibility:hidden;position:relative;opacity:0;margin-left:8px;svg{color:", ";fill:", ";}&:hover{svg{color:", ";fill:", ";}}"],
|
|
28
|
-
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return props.theme.palette['grey-600'];
|
|
31
|
-
}, function (props) {
|
|
32
|
-
return props.theme.palette['blue-600'];
|
|
33
|
-
}, function (props) {
|
|
34
|
-
return props.theme.palette['blue-600'];
|
|
35
|
-
});
|
|
36
|
-
export var StyledCopyIcon = styled(CopyIcon).withConfig({
|
|
19
|
+
})(["visibility:hidden;position:relative;opacity:0;margin-left:8px;svg{color:", ";fill:", ";}&:hover{svg{color:", ";fill:", ";}}"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["grey-600"], (props) => props.theme.palette["blue-600"], (props) => props.theme.palette["blue-600"]);
|
|
20
|
+
const StyledCopyIcon = /* @__PURE__ */ styled(CopyIcon).withConfig({
|
|
37
21
|
displayName: "DescriptionRowstyles__StyledCopyIcon",
|
|
38
22
|
componentId: "sc-dj6vdq-4"
|
|
39
23
|
})(["visibility:hidden;position:relative;margin-left:8px;opacity:0;"]);
|
|
40
|
-
|
|
24
|
+
const RowWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
41
25
|
displayName: "DescriptionRowstyles__RowWrapper",
|
|
42
26
|
componentId: "sc-dj6vdq-5"
|
|
43
|
-
})(["width:100%;", "{", "}&:hover{", "{visibility:visible;opacity:1;}}&:hover{", "{visibility:visible;opacity:1;}}a,[href]{color:inherit;text-decoration:none;cursor:pointer;&:hover{color:", ";}}"], Copyable,
|
|
27
|
+
})(["width:100%;", "{", "}&:hover{", "{visibility:visible;opacity:1;}}&:hover{", "{visibility:visible;opacity:1;}}a,[href]{color:inherit;text-decoration:none;cursor:pointer;&:hover{color:", ";}}"], Copyable, (props) => {
|
|
44
28
|
return props.copyable && css(["cursor:pointer;"]);
|
|
45
|
-
}, Copyable, StyledCopyIcon,
|
|
46
|
-
|
|
47
|
-
});
|
|
48
|
-
export var PrefixWrapper = styled.div.withConfig({
|
|
29
|
+
}, Copyable, StyledCopyIcon, (props) => props.theme.palette["blue-600"]);
|
|
30
|
+
const PrefixWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
49
31
|
displayName: "DescriptionRowstyles__PrefixWrapper",
|
|
50
32
|
componentId: "sc-dj6vdq-6"
|
|
51
33
|
})(["margin-right:8px;"]);
|
|
52
|
-
|
|
34
|
+
const SuffixWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
53
35
|
displayName: "DescriptionRowstyles__SuffixWrapper",
|
|
54
36
|
componentId: "sc-dj6vdq-7"
|
|
55
37
|
})(["margin-left:8px;.ds-button{margin-left:16px;}"]);
|
|
56
|
-
|
|
38
|
+
const ValueWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
57
39
|
displayName: "DescriptionRowstyles__ValueWrapper",
|
|
58
40
|
componentId: "sc-dj6vdq-8"
|
|
59
41
|
})(["white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;width:100%;"]);
|
|
60
|
-
|
|
42
|
+
const StarWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
61
43
|
displayName: "DescriptionRowstyles__StarWrapper",
|
|
62
44
|
componentId: "sc-dj6vdq-9"
|
|
63
|
-
})(["margin-right:", ";"],
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
})(["margin-right:", ";"], (props) => props.hasPrefixEl ? "16px" : "8px");
|
|
46
|
+
export {
|
|
47
|
+
Copyable,
|
|
48
|
+
Label,
|
|
49
|
+
PrefixWrapper,
|
|
50
|
+
RowLabel,
|
|
51
|
+
RowValue,
|
|
52
|
+
RowWrapper,
|
|
53
|
+
StarWrapper,
|
|
54
|
+
StyledCopyIcon,
|
|
55
|
+
SuffixWrapper,
|
|
56
|
+
ValueWrapper
|
|
57
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Row/Star.d.ts
CHANGED
package/dist/Row/Star.js
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { theme } from
|
|
3
|
-
import Icon, { StarFillM, StarM } from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
12
|
-
component: /*#__PURE__*/React.createElement(StarFillM, null),
|
|
13
|
-
color: theme.palette['yellow-600']
|
|
14
|
-
})) : /*#__PURE__*/React.createElement(S.StarWrapper, {
|
|
15
|
-
className: "ds-description-star",
|
|
16
|
-
hasPrefixEl: hasPrefixEl
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
18
|
-
component: /*#__PURE__*/React.createElement(StarM, null),
|
|
19
|
-
color: theme.palette['grey-300']
|
|
20
|
-
}));
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from "@synerise/ds-core";
|
|
3
|
+
import Icon, { StarFillM, StarM } from "@synerise/ds-icon";
|
|
4
|
+
import { StarWrapper } from "./DescriptionRow.styles.js";
|
|
5
|
+
const Star = ({
|
|
6
|
+
starType,
|
|
7
|
+
hasPrefixEl
|
|
8
|
+
}) => starType === "active" ? /* @__PURE__ */ jsx(StarWrapper, { className: "ds-description-star", hasPrefixEl, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(StarFillM, {}), color: theme.palette["yellow-600"] }) }) : /* @__PURE__ */ jsx(StarWrapper, { className: "ds-description-star", hasPrefixEl, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(StarM, {}), color: theme.palette["grey-300"] }) });
|
|
9
|
+
export {
|
|
10
|
+
Star as default
|
|
21
11
|
};
|
|
22
|
-
export default Star;
|
package/dist/Row/Star.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as default2 } from "./Description.js";
|
|
2
|
+
import { default as default3 } from "./Row/DescriptionRow.js";
|
|
3
|
+
import { default as default4 } from "./Row/Copy.js";
|
|
4
|
+
export {
|
|
5
|
+
default4 as DescriptionCopyable,
|
|
6
|
+
default3 as DescriptionRow,
|
|
7
|
+
default2 as default
|
|
8
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-description",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Description UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
26
|
-
"test": "vitest",
|
|
27
|
-
"test:watch": "
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
28
|
"types": "tsc --noEmit",
|
|
29
29
|
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
30
|
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-copy-icon": "^1.2.
|
|
39
|
-
"@synerise/ds-icon": "^1.
|
|
40
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
41
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-copy-icon": "^1.2.2",
|
|
39
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
40
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
41
|
+
"@synerise/ds-utils": "^1.7.1",
|
|
42
42
|
"classnames": "^2.5.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
55
55
|
}
|