@cloudtower/eagle 0.33.48 → 0.33.49
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/dist/cjs/core/LineChart/LineChartLegend.js +23 -6
- package/dist/cjs/coreX/BarChart/index.js +5 -2
- package/dist/cjs/coreX/UnderlineTootip/index.js +70 -0
- package/dist/cjs/index.js +30 -27
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3385 -3369
- package/dist/esm/core/LineChart/LineChartLegend.js +23 -6
- package/dist/esm/coreX/BarChart/index.js +4 -2
- package/dist/esm/coreX/UnderlineTootip/index.js +61 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +3721 -3702
- package/dist/src/coreX/BarChart/index.d.ts +1 -0
- package/dist/src/coreX/UnderlineTootip/index.d.ts +43 -0
- package/dist/src/coreX/index.d.ts +4 -2
- package/dist/stories/docs/coreX/UnserlineTooltip.stories.d.ts +11 -0
- package/dist/style.css +3385 -3369
- package/package.json +4 -4
|
@@ -22,6 +22,23 @@ const LineChartColorBlock = ({ background, borderd = false }) => /* @__PURE__ */
|
|
|
22
22
|
const LineChartLegend = (props) => {
|
|
23
23
|
const { deselected, onClick, legends, onHover, hovering, hovereringSelf } = props;
|
|
24
24
|
const [isDropdownOpen, setIsDropdownOpen] = React__default.useState(false);
|
|
25
|
+
const shouldSkipHover = (e) => {
|
|
26
|
+
const target = e.target;
|
|
27
|
+
const relatedTarget = e.relatedTarget;
|
|
28
|
+
const isFromIconSuffix = (target == null ? void 0 : target.closest(".icon-suffix-wrapper")) !== null;
|
|
29
|
+
const isToIconSuffix = (relatedTarget == null ? void 0 : relatedTarget.closest(".icon-suffix-wrapper")) !== null;
|
|
30
|
+
return isFromIconSuffix || isToIconSuffix;
|
|
31
|
+
};
|
|
32
|
+
const handleMouseEnter = (legendId) => (e) => {
|
|
33
|
+
if (!shouldSkipHover(e)) {
|
|
34
|
+
onHover("enter", legendId);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const handleMouseLeave = (legendId) => (e) => {
|
|
38
|
+
if (!shouldSkipHover(e)) {
|
|
39
|
+
onHover("leave", legendId);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
25
42
|
return /* @__PURE__ */ React__default.createElement(
|
|
26
43
|
ExtraOverflow,
|
|
27
44
|
{
|
|
@@ -39,13 +56,13 @@ const LineChartLegend = (props) => {
|
|
|
39
56
|
className: cs(
|
|
40
57
|
LegendItemsStyleDropdown,
|
|
41
58
|
deselected.includes(legend.id) && "deselected",
|
|
42
|
-
hovering.includes(legend.id) && "hovering",
|
|
59
|
+
(hovering == null ? void 0 : hovering.includes(legend.id)) && "hovering",
|
|
43
60
|
hovereringSelf.includes(legend.id) && "hoverering-self"
|
|
44
61
|
),
|
|
45
62
|
key: legend.id,
|
|
46
63
|
onClick: () => onClick(legend.id),
|
|
47
|
-
onMouseEnter: () =>
|
|
48
|
-
onMouseLeave: () =>
|
|
64
|
+
onMouseEnter: () => handleMouseEnter(legend.id),
|
|
65
|
+
onMouseLeave: () => handleMouseLeave(legend.id)
|
|
49
66
|
},
|
|
50
67
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
51
68
|
/* @__PURE__ */ React__default.createElement("span", { className: "legend-name" }, /* @__PURE__ */ React__default.createElement(Truncate, { text: legend.name, len: 50, backLen: 20 })),
|
|
@@ -72,12 +89,12 @@ const LineChartLegend = (props) => {
|
|
|
72
89
|
className: cs(
|
|
73
90
|
LegendItemsStyle,
|
|
74
91
|
deselected.includes(legend.id) && "deselected",
|
|
75
|
-
hovering.includes(legend.id) && "hovering",
|
|
92
|
+
(hovering == null ? void 0 : hovering.includes(legend.id)) && "hovering",
|
|
76
93
|
hovereringSelf.includes(legend.id) && "hoverering-self"
|
|
77
94
|
),
|
|
78
95
|
key: legend.id,
|
|
79
|
-
onMouseEnter: (
|
|
80
|
-
onMouseLeave: (
|
|
96
|
+
onMouseEnter: handleMouseEnter(legend.id),
|
|
97
|
+
onMouseLeave: handleMouseLeave(legend.id),
|
|
81
98
|
onClick: () => onClick(legend.id)
|
|
82
99
|
},
|
|
83
100
|
/* @__PURE__ */ React__default.createElement(LineChartColorBlock, { background: legend.color }),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { formatPercent } from '../../utils/tower.js';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
|
+
import cs from 'classnames';
|
|
3
4
|
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -63,10 +64,11 @@ const BarItem = props => {
|
|
|
63
64
|
};
|
|
64
65
|
const BarChart = ({
|
|
65
66
|
data,
|
|
66
|
-
total
|
|
67
|
+
total,
|
|
68
|
+
className
|
|
67
69
|
}) => {
|
|
68
70
|
return /* @__PURE__ */React__default.createElement("div", {
|
|
69
|
-
className: StackBar
|
|
71
|
+
className: cs(StackBar, className)
|
|
70
72
|
}, (data || []).map((item, index) => {
|
|
71
73
|
const {
|
|
72
74
|
value,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { cx } from '@linaria/core';
|
|
2
|
+
import Tooltip from '../../core/Tooltip/index.js';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value
|
|
14
|
+
}) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
|
|
26
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
};
|
|
30
|
+
const UnderlineTooltipStyle = "E_u15heuvq";
|
|
31
|
+
const UnderlineTooltip = props => {
|
|
32
|
+
const _a = props,
|
|
33
|
+
{
|
|
34
|
+
style = "dashed",
|
|
35
|
+
color = "rgba(107, 128, 167, 0.6)",
|
|
36
|
+
width = "1px",
|
|
37
|
+
contentColor,
|
|
38
|
+
customContentColor,
|
|
39
|
+
link,
|
|
40
|
+
underlineContentClassName,
|
|
41
|
+
title,
|
|
42
|
+
children,
|
|
43
|
+
className
|
|
44
|
+
} = _a,
|
|
45
|
+
rest = __objRest(_a, ["style", "color", "width", "contentColor", "customContentColor", "link", "underlineContentClassName", "title", "children", "className"]);
|
|
46
|
+
return /* @__PURE__ */React__default.createElement(Tooltip, __spreadValues({
|
|
47
|
+
className: cx(UnderlineTooltipStyle, className),
|
|
48
|
+
title: title || children
|
|
49
|
+
}, rest), /* @__PURE__ */React__default.createElement("span", {
|
|
50
|
+
className: cx("content", !customContentColor && contentColor, link && "link", underlineContentClassName),
|
|
51
|
+
style: {
|
|
52
|
+
borderBottomColor: color,
|
|
53
|
+
borderBottomStyle: style,
|
|
54
|
+
borderBottomWidth: width,
|
|
55
|
+
color: customContentColor
|
|
56
|
+
}
|
|
57
|
+
}, children));
|
|
58
|
+
};
|
|
59
|
+
var UnderlineTooltip$1 = UnderlineTooltip;
|
|
60
|
+
|
|
61
|
+
export { UnderlineTooltipStyle, UnderlineTooltip$1 as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -135,6 +135,7 @@ export { default as DeprecatedDonutChart } from './coreX/DeprecatedDonutChart/in
|
|
|
135
135
|
export { default as DropdownTransition } from './coreX/DropdownTransition/index.js';
|
|
136
136
|
export { default as GoBackButton } from './coreX/GoBackButton/index.js';
|
|
137
137
|
export { default as I18nNameTag } from './coreX/I18nNameTag/index.js';
|
|
138
|
+
export { default as KubeConfigModal } from './coreX/KubeConfigModal/index.js';
|
|
138
139
|
export { default as NamesTooltip } from './coreX/NamesTooltip/index.js';
|
|
139
140
|
export { default as OverflowTooltip } from './coreX/OverflowTooltip/index.js';
|
|
140
141
|
export { default as SidebarSubtitle } from './coreX/SidebarSubtitle/index.js';
|
|
@@ -143,8 +144,8 @@ export { default as SortableList } from './coreX/SortableList/index.js';
|
|
|
143
144
|
export { default as SummaryTable, SummaryTableRow } from './coreX/SummaryTable/index.js';
|
|
144
145
|
export { default as SwitchWithText } from './coreX/SwitchWithText/index.js';
|
|
145
146
|
export { default as TabMenu } from './coreX/TabMenu/index.js';
|
|
147
|
+
export { default as UnderlineTooltip, UnderlineTooltipStyle } from './coreX/UnderlineTootip/index.js';
|
|
146
148
|
export { default as UnitWithChart, UnitWrapper } from './coreX/UnitWithChart/index.js';
|
|
147
|
-
export { default as KubeConfigModal } from './coreX/KubeConfigModal/index.js';
|
|
148
149
|
export { CheckPointItem, CheckPointList } from './coreX/CheckPointList/index.js';
|
|
149
150
|
export { getCalendarTitle } from './coreX/common/getCalendarTitle.js';
|
|
150
151
|
export { default as AbsoluteDate } from './coreX/DateRangePicker/AbsoluteDate.js';
|