@hazelcast/ui 1.3.3-next.24 → 1.3.3-next.25
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/lib/Table/Cell.module.scss +7 -3
- package/lib/Table/EnhancedRenderers.js +2 -1
- package/lib/Table/EnhancedRenderers.js.map +1 -1
- package/lib/Table/Header.module.scss +8 -7
- package/lib/Table/Row.module.scss +7 -16
- package/lib/Table/Table.module.scss +2 -0
- package/lib/Tooltip.d.ts +1 -0
- package/lib/Tooltip.js +3 -3
- package/lib/Tooltip.js.map +1 -1
- package/lib/TruncatedText.d.ts +1 -0
- package/lib/TruncatedText.js +2 -2
- package/lib/TruncatedText.js.map +1 -1
- package/package.json +2 -2
- package/styles/typography/fonts/UbuntuMono-Bold.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-BoldItalic.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-Italic.woff2 +0 -0
- package/styles/typography/fonts/UbuntuMono-Regular.woff2 +0 -0
- package/styles/typography/ubuntu-mono.css +31 -0
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: center;
|
|
9
|
-
height: c.$grid *
|
|
9
|
+
height: c.$grid * 12;
|
|
10
10
|
padding-right: c.$grid * 5;
|
|
11
11
|
padding-left: c.$grid * 5;
|
|
12
12
|
color: c.$colorText;
|
|
13
13
|
background-color: inherit;
|
|
14
|
+
font-family: 'Ubuntu Mono', monospace;
|
|
14
15
|
|
|
15
|
-
@include c.typographyBodySmall;
|
|
16
16
|
@include h.overflowEllipsis;
|
|
17
17
|
|
|
18
18
|
&.alignLeft {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&:not(:last-of-type) {
|
|
35
|
-
border-right: c.$borderWidth solid c.$
|
|
35
|
+
border-right: c.$borderWidth solid c.$colorNeutralWhite;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -51,3 +51,7 @@
|
|
|
51
51
|
.selectable {
|
|
52
52
|
user-select: none;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
.truncated {
|
|
56
|
+
font-family: 'Ubuntu Mono', monospace;
|
|
57
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TruncatedText } from '../TruncatedText';
|
|
3
|
+
import styles from './Cell.module.scss';
|
|
3
4
|
export const EnhancedHeaderFooterRenderer = ({ column, columnResizing, type }) => {
|
|
4
5
|
const value = column[type];
|
|
5
6
|
if (typeof value === 'string') {
|
|
@@ -11,6 +12,6 @@ export const EnhancedCellRenderer = ({ cell, hasCellRenderer, columnResizing })
|
|
|
11
12
|
if (hasCellRenderer) {
|
|
12
13
|
return cell.render('Cell');
|
|
13
14
|
}
|
|
14
|
-
return React.createElement(TruncatedText, { text: cell.value, forceUpdateToken: columnResizing.isResizingColumn });
|
|
15
|
+
return React.createElement(TruncatedText, { text: cell.value, forceUpdateToken: columnResizing.isResizingColumn, tooltipClassName: styles.truncated });
|
|
15
16
|
};
|
|
16
17
|
//# sourceMappingURL=EnhancedRenderers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnhancedRenderers.js","sourceRoot":"","sources":["../../src/Table/EnhancedRenderers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"EnhancedRenderers.js","sourceRoot":"","sources":["../../src/Table/EnhancedRenderers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAGtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,OAAO,MAAM,MAAM,oBAAoB,CAAA;AAkBvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAwC,EAAE,EAAE;IACvI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,OAAO,oBAAC,aAAa,IAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,cAAc,CAAC,gBAAgB,GAAI,CAAA;KACzF;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAiB,CAAA;AAC5C,CAAC,CAAA;AAQD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAmB,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAgC,EAAE,EAAE;IAChI,IAAI,eAAe,EAAE;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAiB,CAAA;KAC3C;IAED,OAAO,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,gBAAgB,EAAE,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,CAAC,SAAS,GAAI,CAAA;AACnI,CAAC,CAAA"}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
align-items: center;
|
|
9
|
-
width:
|
|
9
|
+
width: 20px;
|
|
10
10
|
height: 100%;
|
|
11
11
|
top: 0;
|
|
12
|
-
right: -
|
|
12
|
+
right: -10px;
|
|
13
13
|
z-index: c.$zIndex100;
|
|
14
14
|
cursor: col-resize;
|
|
15
15
|
user-select: none;
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
/* doiuse-enable css-touch-action */
|
|
21
21
|
|
|
22
22
|
.separator {
|
|
23
|
-
width:
|
|
24
|
-
height:
|
|
25
|
-
background: c.$
|
|
23
|
+
width: 1px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
background: c.$colorNeutralWhite;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.resizing,
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
.th {
|
|
38
38
|
display: flex;
|
|
39
39
|
align-items: center;
|
|
40
|
-
height: c.$grid *
|
|
40
|
+
height: c.$grid * 12;
|
|
41
41
|
padding-left: c.$grid * 5;
|
|
42
42
|
padding-right: c.$grid * 5;
|
|
43
43
|
color: c.$colorText;
|
|
44
|
+
background: #e9f0f9;
|
|
44
45
|
|
|
45
46
|
@include c.typographyBodySmall('bold');
|
|
46
47
|
@include h.overflowEllipsis;
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
&:hover {
|
|
81
|
-
background-color:
|
|
82
|
+
background-color: #ccdff5;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
@use '../../styles/constants' as c;
|
|
2
2
|
@use '../../styles/helpers' as h;
|
|
3
3
|
|
|
4
|
-
@mixin rowBase {
|
|
5
|
-
background-color: c.$colorNeutralLighter;
|
|
6
|
-
margin-bottom: c.$grid * 1.25;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
.row {
|
|
10
|
-
@include
|
|
5
|
+
@include c.typographyBodySmall;
|
|
11
6
|
|
|
12
7
|
&.clickable {
|
|
13
8
|
cursor: pointer;
|
|
@@ -18,18 +13,17 @@
|
|
|
18
13
|
// Do not remove outline for high-contrast modes
|
|
19
14
|
// https://stackoverflow.com/a/52616313
|
|
20
15
|
outline: c.$outlineWidth solid transparent;
|
|
21
|
-
background-color:
|
|
16
|
+
background-color: #e2e7fa;
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
&:hover {
|
|
25
|
-
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
background-color: #e2e7fa;
|
|
26
22
|
}
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
.linkRow {
|
|
31
|
-
@include rowBase;
|
|
32
|
-
|
|
33
27
|
cursor: pointer;
|
|
34
28
|
|
|
35
29
|
.link {
|
|
@@ -42,15 +36,12 @@
|
|
|
42
36
|
// Do not remove outline for high-contrast modes
|
|
43
37
|
// https://stackoverflow.com/a/52616313
|
|
44
38
|
outline: c.$outlineWidth solid transparent;
|
|
45
|
-
background-color:
|
|
39
|
+
background-color: #e2e7fa;
|
|
46
40
|
}
|
|
47
41
|
|
|
48
42
|
&:hover {
|
|
49
|
-
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
background-color: #e2e7fa;
|
|
50
45
|
}
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
|
-
|
|
54
|
-
.headerRow {
|
|
55
|
-
margin-bottom: c.$grid * 1.25;
|
|
56
|
-
}
|
package/lib/Tooltip.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export type TooltipProps = {
|
|
|
13
13
|
padding?: number;
|
|
14
14
|
placement?: Placement;
|
|
15
15
|
visible?: boolean;
|
|
16
|
+
className?: string;
|
|
16
17
|
hoverAbleTooltip?: boolean;
|
|
17
18
|
children: (ref: React.Dispatch<React.SetStateAction<HTMLElement | null>>, onMouseEnter?: MouseEventHandler, onMouseLeave?: MouseEventHandler) => ReactNode;
|
|
18
19
|
popperRef?: MutableRefObject<PopperRef | undefined>;
|
package/lib/Tooltip.js
CHANGED
|
@@ -22,7 +22,7 @@ const TooltipContext = createContext(null);
|
|
|
22
22
|
* ### Usage
|
|
23
23
|
* Wrap the target element with Tooltip component and use the "content" property to define what should be displayed inside the tooltip.
|
|
24
24
|
*/
|
|
25
|
-
export const Tooltip = ({ id, content, hideTimeoutDuration = 100, offset = 10, padding = 10, placement = 'top', visible: visibilityOverride, children, popperRef, wordBreak, updateToken, tooltipContainer = 'body', hoverAbleTooltip = true, disabled = false, zIndex = 20, arrow = true, color, }) => {
|
|
25
|
+
export const Tooltip = ({ id, content, hideTimeoutDuration = 100, offset = 10, padding = 10, placement = 'top', visible: visibilityOverride, children, popperRef, wordBreak, updateToken, tooltipContainer = 'body', hoverAbleTooltip = true, disabled = false, zIndex = 20, arrow = true, color, className, }) => {
|
|
26
26
|
const [isShown, setShown] = useState(false);
|
|
27
27
|
const timeoutRef = useRef(null);
|
|
28
28
|
const context = useContext(TooltipContext);
|
|
@@ -127,12 +127,12 @@ export const Tooltip = ({ id, content, hideTimeoutDuration = 100, offset = 10, p
|
|
|
127
127
|
onMouseLeave(e);
|
|
128
128
|
}),
|
|
129
129
|
content !== undefined && (React.createElement(React.Fragment, null,
|
|
130
|
-
React.createElement("span", { ...(id && { id }), className: styles.tooltipSr, role: "tooltip", "data-test": "tooltip-sr" }, content),
|
|
130
|
+
React.createElement("span", { ...(id && { id }), className: cn(styles.tooltipSr, className), role: "tooltip", "data-test": "tooltip-sr" }, content),
|
|
131
131
|
tooltipPortalContainer &&
|
|
132
132
|
ReactDOM.createPortal(React.createElement(React.Fragment, null,
|
|
133
133
|
React.createElement("span", { ref: setPopperElement, className: cn(styles.overlay, {
|
|
134
134
|
[styles.hidden]: !isTooltipVisible,
|
|
135
|
-
}, color && [styles[color]]), style: { ...popper.styles.popper, ...{ zIndex: context ? zIndex + 1 : zIndex }, wordBreak }, "data-test": "tooltip-overlay", "aria-hidden": true, ...popper.attributes.popper },
|
|
135
|
+
}, color && [styles[color]], className), style: { ...popper.styles.popper, ...{ zIndex: context ? zIndex + 1 : zIndex }, wordBreak }, "data-test": "tooltip-overlay", "aria-hidden": true, ...popper.attributes.popper },
|
|
136
136
|
content,
|
|
137
137
|
arrow && (React.createElement("span", { ref: setArrowElement, className: styles.arrow, style: popper.styles.arrow, "data-test": "tooltip-arrow", ...popper.attributes.arrow })))), tooltipPortalContainer)))));
|
|
138
138
|
};
|
package/lib/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,WAAW,EACX,QAAQ,EACR,mBAAmB,EAGnB,eAAe,EACf,aAAa,EACb,UAAU,EACV,OAAO,EACP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AAC,EACxB,SAAS,CACV,EACD,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,eACjF,iBAAiB,0BAEvB,MAAM,CAAC,UAAU,CAAC,MAAM;wBAE3B,OAAO;wBACP,KAAK,IAAI,CACR,8BACE,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,MAAM,CAAC,KAAK,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,eAChB,eAAe,KACrB,MAAM,CAAC,UAAU,CAAC,KAAK,GAC3B,CACH,CACI,CACN,EACH,sBAAsB,CACvB,CACF,CACJ,CACuB,CAC3B,CAAA;AACH,CAAC,CAAA"}
|
package/lib/TruncatedText.d.ts
CHANGED
package/lib/TruncatedText.js
CHANGED
|
@@ -5,7 +5,7 @@ import useIsomorphicLayoutEffect from 'react-use/lib/useIsomorphicLayoutEffect';
|
|
|
5
5
|
import { useUID } from 'react-uid';
|
|
6
6
|
import { Tooltip } from './Tooltip';
|
|
7
7
|
import styles from './TruncatedText.module.scss';
|
|
8
|
-
export const TruncatedText = ({ text, forceUpdateToken, className, tooltipVisible, tooltipPlacement = 'top', hoverAbleTooltip, multiline, }) => {
|
|
8
|
+
export const TruncatedText = ({ text, forceUpdateToken, className, tooltipVisible, tooltipPlacement = 'top', hoverAbleTooltip, multiline, tooltipClassName, }) => {
|
|
9
9
|
const textRef = useRef(null);
|
|
10
10
|
const [tooltip, setTooltip] = useState();
|
|
11
11
|
const idTooltip = useUID();
|
|
@@ -17,7 +17,7 @@ export const TruncatedText = ({ text, forceUpdateToken, className, tooltipVisibl
|
|
|
17
17
|
// https://codepen.io/triple-j/pen/wadKQB
|
|
18
18
|
setTooltip(span.offsetWidth < span.scrollWidth || span.offsetHeight < span.scrollHeight ? text : undefined);
|
|
19
19
|
}, [text, forceUpdateToken]);
|
|
20
|
-
return (React.createElement(Tooltip, { id: idTooltip, content: tooltip, visible: tooltipVisible, placement: tooltipPlacement, updateToken: forceUpdateToken, hoverAbleTooltip: hoverAbleTooltip }, (ref) => (React.createElement("div", { ref: mergeRefs([textRef, ref]), className: cn(styles.truncatedText, { [styles.multiline]: multiline }, className) },
|
|
20
|
+
return (React.createElement(Tooltip, { id: idTooltip, content: tooltip, visible: tooltipVisible, className: tooltipClassName, placement: tooltipPlacement, updateToken: forceUpdateToken, hoverAbleTooltip: hoverAbleTooltip }, (ref) => (React.createElement("div", { ref: mergeRefs([textRef, ref]), className: cn(styles.truncatedText, { [styles.multiline]: multiline }, className) },
|
|
21
21
|
React.createElement("span", { "aria-labelledby": tooltip ? idTooltip : undefined }, text)))));
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=TruncatedText.js.map
|
package/lib/TruncatedText.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TruncatedText.js","sourceRoot":"","sources":["../src/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,MAAM,EAAE,QAAQ,EAAuC,MAAM,OAAO,CAAA;AACxF,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,yBAAyB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAA;AAEjD,OAAO,MAAM,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"TruncatedText.js","sourceRoot":"","sources":["../src/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,MAAM,EAAE,QAAQ,EAAuC,MAAM,OAAO,CAAA;AACxF,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,YAAY,CA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AAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,CAAC;QACpH,iDAAuB,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAG,IAAI,CAAQ,CACjE,CACP,CACO,CACX,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazelcast/ui",
|
|
3
|
-
"version": "1.3.3-next.
|
|
3
|
+
"version": "1.3.3-next.25+f817741",
|
|
4
4
|
"description": "Hazelcast design system components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"homepage": "https://github.com/hazelcast/frontend-shared#readme",
|
|
@@ -121,5 +121,5 @@
|
|
|
121
121
|
"react": "^17 || ^18",
|
|
122
122
|
"react-dom": "^17 || ^18"
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "f8177415a8b2d82431a2bfc74e044c587bc94adc"
|
|
125
125
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Ubuntu Mono';
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-display: swap;
|
|
5
|
+
font-weight: 400;
|
|
6
|
+
src: url('./fonts/UbuntuMono-Regular.woff2') format('woff2');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'Ubuntu Mono';
|
|
11
|
+
font-style: italic;
|
|
12
|
+
font-display: swap;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
src: url('./fonts/UbuntuMono-Italic.woff2') format('woff2');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: 'Ubuntu Mono';
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-display: swap;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
src: url('./fonts/UbuntuMono-Bold.woff2') format('woff2');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'Ubuntu Mono';
|
|
27
|
+
font-style: italic;
|
|
28
|
+
font-display: swap;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
src: url('./fonts/UbuntuMono-BoldItalic.woff2') format('woff2');
|
|
31
|
+
}
|