@spaced-out/ui-design-system 0.3.21 → 0.3.22

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.3.22](https://github.com/spaced-out/ui-design-system/compare/v0.3.21...v0.3.22) (2025-02-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * removed the truncate styles from tooltip body ([#317](https://github.com/spaced-out/ui-design-system/issues/317)) ([54ff442](https://github.com/spaced-out/ui-design-system/commit/54ff4421a10fa406ede441a5bd61ba37700b6615))
11
+
5
12
  ### [0.3.21](https://github.com/spaced-out/ui-design-system/compare/v0.3.20...v0.3.21) (2025-02-05)
6
13
 
7
14
 
package/CONTRIBUTING.md CHANGED
@@ -146,7 +146,7 @@ Check out our [**Design Tokens Page**](https://spaced-out.github.io/ui-design-sy
146
146
  > In the `consumer's` directory's run:
147
147
 
148
148
  ```bash
149
- yarn add @spaced-out/ui-design-system@file:../../ui-design-system
149
+ yarn add @spaced-out/ui-design-system@file:../ui-design-system
150
150
  ```
151
151
 
152
152
  > This would copy the genesis design system package to node modules locally and create an entry in the `consumer's` package.json
@@ -48,10 +48,21 @@ const TruncatedTextWithTooltip = _ref => {
48
48
  };
49
49
  return /*#__PURE__*/React.createElement(_ConditionalWrapper.ConditionalWrapper, {
50
50
  condition: Boolean(showMouseTip),
51
- wrapper: children => /*#__PURE__*/React.createElement(_Tooltip.Tooltip, _extends({}, tooltip, {
52
- body: tooltip?.body ?? children,
53
- elevation: tooltip?.elevation ?? 'toast'
54
- }), children)
51
+ wrapper: children => {
52
+ const child = React.Children.only(children);
53
+
54
+ //Vivek: This children in tooltip body is modified to remove line clamp style
55
+ const modifiedChild = /*#__PURE__*/React.cloneElement(child, {
56
+ style: {
57
+ '--line-clamp': tooltip?.bodyMaxLines || line,
58
+ '--word-break': wordBreak
59
+ }
60
+ });
61
+ return /*#__PURE__*/React.createElement(_Tooltip.Tooltip, _extends({}, tooltip, {
62
+ body: tooltip?.body || modifiedChild,
63
+ elevation: tooltip?.elevation ?? 'toast'
64
+ }), children);
65
+ }
55
66
  }, /*#__PURE__*/React.createElement("span", {
56
67
  className: (0, _classify.default)(_TruncatedTextWithTooltipModule.default.truncateLineClamp, classNames?.wrapper),
57
68
  style: styles,
@@ -70,15 +70,27 @@ export const TruncatedTextWithTooltip = ({
70
70
  return (
71
71
  <ConditionalWrapper
72
72
  condition={Boolean(showMouseTip)}
73
- wrapper={(children) => (
74
- <Tooltip
75
- {...tooltip}
76
- body={tooltip?.body ?? children}
77
- elevation={tooltip?.elevation ?? 'toast'}
78
- >
79
- {children}
80
- </Tooltip>
81
- )}
73
+ wrapper={(children) => {
74
+ const child = React.Children.only(children);
75
+
76
+ //Vivek: This children in tooltip body is modified to remove line clamp style
77
+ const modifiedChild = React.cloneElement(child, {
78
+ style: {
79
+ '--line-clamp': tooltip?.bodyMaxLines || line,
80
+ '--word-break': wordBreak,
81
+ },
82
+ });
83
+
84
+ return (
85
+ <Tooltip
86
+ {...tooltip}
87
+ body={tooltip?.body || modifiedChild}
88
+ elevation={tooltip?.elevation ?? 'toast'}
89
+ >
90
+ {children}
91
+ </Tooltip>
92
+ );
93
+ }}
82
94
  >
83
95
  <span
84
96
  className={classify(css.truncateLineClamp, classNames?.wrapper)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {