@spaced-out/ui-design-system 0.3.21 → 0.3.23-beta.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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +2 -2
- package/lib/components/SideMenuLink/SideMenuLink.js +2 -2
- package/lib/components/SideMenuLink/SideMenuLink.js.flow +2 -2
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js +15 -4
- package/lib/components/TruncatedTextWithTooltip/TruncatedTextWithTooltip.js.flow +21 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.23-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.3.22...v0.3.23-beta.0) (2025-02-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* tooltip for SideMenuLink as Link and Button ([#321](https://github.com/spaced-out/ui-design-system/issues/321)) ([656d9e4](https://github.com/spaced-out/ui-design-system/commit/656d9e4c927573c52dedf27574dd202004e3c24b))
|
|
11
|
+
|
|
12
|
+
### [0.3.22](https://github.com/spaced-out/ui-design-system/compare/v0.3.21...v0.3.22) (2025-02-06)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* 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))
|
|
18
|
+
|
|
5
19
|
### [0.3.21](https://github.com/spaced-out/ui-design-system/compare/v0.3.20...v0.3.21) (2025-02-05)
|
|
6
20
|
|
|
7
21
|
|
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
|
|
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
|
|
@@ -155,7 +155,7 @@ Check out our [**Design Tokens Page**](https://spaced-out.github.io/ui-design-sy
|
|
|
155
155
|
...
|
|
156
156
|
"dependencies": {
|
|
157
157
|
...
|
|
158
|
-
"@spaced-out/ui-design-system": "file
|
|
158
|
+
"@spaced-out/ui-design-system": "file:../ui_design_system",
|
|
159
159
|
...
|
|
160
160
|
},
|
|
161
161
|
...
|
|
@@ -224,7 +224,7 @@ const SideMenuLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
224
224
|
condition: to !== undefined,
|
|
225
225
|
wrapper: children => /*#__PURE__*/React.createElement(_Link.Link, {
|
|
226
226
|
to: to,
|
|
227
|
-
tabIndex:
|
|
227
|
+
tabIndex: -1,
|
|
228
228
|
linkComponent: LinkComponent,
|
|
229
229
|
className: (0, _classify.default)(_SideMenuLinkModule.default.linkComponent, {
|
|
230
230
|
[_SideMenuLinkModule.default.closed]: !opened
|
|
@@ -245,7 +245,7 @@ const SideMenuLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
245
245
|
}, classNames?.wrapper),
|
|
246
246
|
onClick: onChangeHandler,
|
|
247
247
|
ref: ref,
|
|
248
|
-
tabIndex: disabled
|
|
248
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
249
249
|
disabled: disabled,
|
|
250
250
|
key: pageNameKey
|
|
251
251
|
}), pageNameKey && MENU_NAME_LIST[pageNameKey] ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -256,7 +256,7 @@ export const SideMenuLink: React$AbstractComponent<
|
|
|
256
256
|
wrapper={(children) => (
|
|
257
257
|
<Link
|
|
258
258
|
to={to}
|
|
259
|
-
tabIndex={
|
|
259
|
+
tabIndex={-1}
|
|
260
260
|
linkComponent={LinkComponent}
|
|
261
261
|
className={classify(css.linkComponent, {
|
|
262
262
|
[css.closed]: !opened,
|
|
@@ -289,7 +289,7 @@ export const SideMenuLink: React$AbstractComponent<
|
|
|
289
289
|
)}
|
|
290
290
|
onClick={onChangeHandler}
|
|
291
291
|
ref={ref}
|
|
292
|
-
tabIndex={disabled
|
|
292
|
+
tabIndex={disabled ? -1 : tabIndex}
|
|
293
293
|
disabled={disabled}
|
|
294
294
|
key={pageNameKey}
|
|
295
295
|
>
|
|
@@ -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 =>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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)}
|