qbs-react-grid 2.2.1 → 2.2.3
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/css/qbs-react-grid.css +1 -1
- package/dist/css/qbs-react-grid.min.css +1 -1
- package/dist/css/qbs-react-grid.min.css.map +1 -1
- package/es/less/pagination.less +9 -9
- package/es/less/qbs-table.less +64 -37
- package/es/qbsTable/utilities/CardMenuDropdown.js +1 -2
- package/es/qbsTable/utilities/ToolTip.d.ts +8 -1
- package/es/qbsTable/utilities/ToolTip.js +106 -76
- package/es/qbsTable/utilities/VerticalDropDownMenu.js +3 -3
- package/es/qbsTable/utilities/icons.js +1 -1
- package/lib/less/pagination.less +9 -9
- package/lib/less/qbs-table.less +64 -37
- package/lib/qbsTable/utilities/CardMenuDropdown.js +1 -2
- package/lib/qbsTable/utilities/ToolTip.d.ts +8 -1
- package/lib/qbsTable/utilities/ToolTip.js +106 -76
- package/lib/qbsTable/utilities/VerticalDropDownMenu.js +3 -3
- package/lib/qbsTable/utilities/icons.js +1 -1
- package/package.json +1 -1
- package/src/less/pagination.less +9 -9
- package/src/less/qbs-table.less +64 -37
- package/src/qbsTable/utilities/CardMenuDropdown.tsx +1 -1
- package/src/qbsTable/utilities/ToolTip.tsx +138 -77
- package/src/qbsTable/utilities/VerticalDropDownMenu.tsx +3 -3
- package/src/qbsTable/utilities/icons.tsx +1 -1
package/es/less/qbs-table.less
CHANGED
|
@@ -387,71 +387,98 @@
|
|
|
387
387
|
.qbs-table-tooltip {
|
|
388
388
|
cursor: pointer;
|
|
389
389
|
position: relative;
|
|
390
|
-
|
|
391
|
-
display: flex;
|
|
390
|
+
display: inline-flex;
|
|
392
391
|
}
|
|
393
392
|
|
|
394
393
|
.qbs-table-tooltip .tooltiptext {
|
|
395
394
|
visibility: hidden;
|
|
396
|
-
background-color:
|
|
397
|
-
color:
|
|
395
|
+
background-color: var(--tooltip-bg, #222);
|
|
396
|
+
color: var(--tooltip-text, #fff);
|
|
398
397
|
text-align: center;
|
|
399
|
-
padding: 6px;
|
|
400
|
-
border-radius:
|
|
398
|
+
padding: 6px 10px;
|
|
399
|
+
border-radius: 6px;
|
|
401
400
|
position: absolute;
|
|
402
|
-
z-index:
|
|
401
|
+
z-index: 10050;
|
|
403
402
|
opacity: 0;
|
|
404
|
-
transition: opacity 0.
|
|
403
|
+
transition: opacity 0.15s ease;
|
|
405
404
|
font-size: 12px;
|
|
406
|
-
font-
|
|
407
|
-
font-weight: 400;
|
|
405
|
+
font-weight: 500;
|
|
408
406
|
line-height: 16px;
|
|
409
|
-
|
|
410
|
-
max-width:
|
|
407
|
+
white-space: nowrap;
|
|
408
|
+
max-width: min(280px, 90vw);
|
|
409
|
+
pointer-events: none;
|
|
410
|
+
inset-inline-start: 50%;
|
|
411
|
+
translate: -50% 0;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
.qbs-table-tooltip.up .tooltiptext {
|
|
414
|
-
bottom: calc(100% +
|
|
415
|
-
|
|
416
|
-
left: unset;
|
|
415
|
+
bottom: calc(100% + 8px);
|
|
416
|
+
top: auto;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
.qbs-table-tooltip.down .tooltiptext {
|
|
420
|
-
right: -10px;
|
|
421
420
|
top: calc(100% + 8px);
|
|
421
|
+
bottom: auto;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
// .qbs-table-tooltip:hover .tooltiptext {
|
|
425
|
-
// visibility: visible;
|
|
426
|
-
// opacity: 1;
|
|
427
|
-
// }
|
|
428
|
-
|
|
429
424
|
.qbs-table-tooltip .tooltiptext::after {
|
|
430
425
|
content: '';
|
|
431
426
|
position: absolute;
|
|
432
|
-
|
|
433
|
-
|
|
427
|
+
inset-inline-start: 50%;
|
|
428
|
+
translate: -50% 0;
|
|
429
|
+
border: 5px solid transparent;
|
|
434
430
|
}
|
|
435
431
|
|
|
436
432
|
.qbs-table-tooltip.up .tooltiptext::after {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
margin-left: -5px !important;
|
|
440
|
-
top: 100% !important;
|
|
441
|
-
left: unset !important;
|
|
433
|
+
top: 100%;
|
|
434
|
+
border-top-color: var(--tooltip-bg, #222);
|
|
442
435
|
}
|
|
443
436
|
|
|
444
437
|
.qbs-table-tooltip.down .tooltiptext::after {
|
|
445
|
-
|
|
446
|
-
bottom:
|
|
447
|
-
right: 12px !important;
|
|
448
|
-
margin-left: -5px !important;
|
|
449
|
-
left: unset !important;
|
|
438
|
+
bottom: 100%;
|
|
439
|
+
border-bottom-color: var(--tooltip-bg, #222);
|
|
450
440
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
441
|
+
|
|
442
|
+
.qbs-table-tooltip-floating.tooltiptext {
|
|
443
|
+
position: fixed;
|
|
444
|
+
z-index: 10050;
|
|
445
|
+
visibility: hidden;
|
|
446
|
+
opacity: 0;
|
|
447
|
+
pointer-events: none;
|
|
448
|
+
background-color: var(--tooltip-bg, #222);
|
|
449
|
+
color: var(--tooltip-text, #fff);
|
|
450
|
+
text-align: center;
|
|
451
|
+
padding: 6px 10px;
|
|
452
|
+
border-radius: 6px;
|
|
453
|
+
font-size: 12px;
|
|
454
|
+
font-weight: 500;
|
|
455
|
+
line-height: 16px;
|
|
456
|
+
white-space: nowrap;
|
|
457
|
+
max-width: min(280px, 90vw);
|
|
458
|
+
transition: opacity 0.15s ease;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.qbs-table-tooltip-floating.tooltiptext.is-positioned {
|
|
462
|
+
visibility: visible;
|
|
463
|
+
opacity: 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.qbs-table-tooltip-floating.tooltiptext::after {
|
|
467
|
+
content: '';
|
|
468
|
+
position: absolute;
|
|
469
|
+
left: var(--tooltip-arrow-offset, 50%);
|
|
470
|
+
translate: -50% 0;
|
|
471
|
+
border: 5px solid transparent;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.qbs-table-tooltip-floating--down.tooltiptext::after {
|
|
475
|
+
bottom: 100%;
|
|
476
|
+
border-bottom-color: var(--tooltip-bg, #222);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.qbs-table-tooltip-floating--up.tooltiptext::after {
|
|
480
|
+
top: 100%;
|
|
481
|
+
border-top-color: var(--tooltip-bg, #222);
|
|
455
482
|
}
|
|
456
483
|
.rs-table-row {
|
|
457
484
|
overflow: visible !important;
|
|
@@ -67,8 +67,7 @@ var CardMenuDropdown = function CardMenuDropdown(_ref) {
|
|
|
67
67
|
ref: menuButtonRef
|
|
68
68
|
}, /*#__PURE__*/React.createElement(TooltipComponent, {
|
|
69
69
|
title: labels.actions,
|
|
70
|
-
enabled: false
|
|
71
|
-
ref: menuButtonRef
|
|
70
|
+
enabled: false
|
|
72
71
|
}, /*#__PURE__*/React.createElement(ThreeDotIcon, null))), openMenu && /*#__PURE__*/React.createElement("div", {
|
|
73
72
|
className: " qbs-card-dropdown rounded absolute right-0 mt-2 w-auto min-w-11 z-10 shadow-modalShadow bg-white dark:bg-[#424242] dark:text-white",
|
|
74
73
|
style: menuPositionStyles
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type TooltipComponentProps = {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
tableBodyRef?: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
/** When false, renders children only (no tooltip). */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const TooltipComponent: React.FC<TooltipComponentProps>;
|
|
3
10
|
export default TooltipComponent;
|
|
@@ -1,87 +1,117 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// const dropRef = useRef(null);
|
|
6
|
-
// const menuButtonRef = useRef<HTMLElement>(null);
|
|
7
|
-
// const adjustDropdownPosition = () => {
|
|
8
|
-
// if (menuButtonRef.current && tableBodyRef?.current) {
|
|
9
|
-
// const inputBoxRect = menuButtonRef.current?.getBoundingClientRect();
|
|
10
|
-
// const tableRect = tableBodyRef.current.getBoundingClientRect();
|
|
11
|
-
// // Calculate positions relative to the table
|
|
12
|
-
// const spaceAbove = inputBoxRect.top - tableRect.top;
|
|
13
|
-
// const spaceBelow = tableRect.bottom - inputBoxRect.bottom;
|
|
14
|
-
|
|
15
|
-
// if (spaceAbove > spaceBelow) {
|
|
16
|
-
// setDropdownPosition('top-position');
|
|
17
|
-
// } else {
|
|
18
|
-
// setDropdownPosition('bottom-position');
|
|
19
|
-
// }
|
|
20
|
-
// }
|
|
21
|
-
// };
|
|
22
|
-
|
|
23
|
-
// return (
|
|
24
|
-
// <div className={`qbs-table-tooltip ${dropdownPosition == 'bottom-position' ? 'down' : 'up'} `}>
|
|
25
|
-
// <span
|
|
26
|
-
// ref={menuButtonRef}
|
|
27
|
-
// style={{ display: 'flex' }}
|
|
28
|
-
// onMouseEnter={() => adjustDropdownPosition()}
|
|
29
|
-
// >
|
|
30
|
-
// {children}
|
|
31
|
-
// </span>
|
|
32
|
-
// <span ref={dropRef} className={'tooltiptext'}>
|
|
33
|
-
// {title}
|
|
34
|
-
// </span>
|
|
35
|
-
// </div>
|
|
36
|
-
// );
|
|
37
|
-
// };
|
|
38
|
-
|
|
39
|
-
// export default TooltipComponent;
|
|
40
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
var VIEWPORT_PADDING = 8;
|
|
4
|
+
var TOOLTIP_GAP = 8;
|
|
41
5
|
var TooltipComponent = function TooltipComponent(_ref) {
|
|
42
6
|
var title = _ref.title,
|
|
43
7
|
children = _ref.children,
|
|
44
|
-
tableBodyRef = _ref.tableBodyRef
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
8
|
+
tableBodyRef = _ref.tableBodyRef,
|
|
9
|
+
_ref$enabled = _ref.enabled,
|
|
10
|
+
enabled = _ref$enabled === void 0 ? true : _ref$enabled;
|
|
11
|
+
var _useState = useState(false),
|
|
12
|
+
visible = _useState[0],
|
|
13
|
+
setVisible = _useState[1];
|
|
14
|
+
var _useState2 = useState(false),
|
|
15
|
+
positioned = _useState2[0],
|
|
16
|
+
setPositioned = _useState2[1];
|
|
17
|
+
var _useState3 = useState('down'),
|
|
18
|
+
placement = _useState3[0],
|
|
19
|
+
setPlacement = _useState3[1];
|
|
20
|
+
var _useState4 = useState({
|
|
21
|
+
top: 0,
|
|
22
|
+
left: 0
|
|
23
|
+
}),
|
|
24
|
+
coords = _useState4[0],
|
|
25
|
+
setCoords = _useState4[1];
|
|
26
|
+
var _useState5 = useState(0),
|
|
27
|
+
arrowOffset = _useState5[0],
|
|
28
|
+
setArrowOffset = _useState5[1];
|
|
29
|
+
var triggerRef = useRef(null);
|
|
30
|
+
var tooltipRef = useRef(null);
|
|
31
|
+
var updatePosition = useCallback(function () {
|
|
32
|
+
var _tableBodyRef$current, _tableBodyRef$current2, _trigger$closest;
|
|
33
|
+
var trigger = triggerRef.current;
|
|
34
|
+
var tooltip = tooltipRef.current;
|
|
35
|
+
if (!trigger || !tooltip) {
|
|
36
|
+
return;
|
|
56
37
|
}
|
|
38
|
+
var triggerRect = trigger.getBoundingClientRect();
|
|
39
|
+
var tooltipRect = tooltip.getBoundingClientRect();
|
|
40
|
+
var boundaryRect = (_tableBodyRef$current = tableBodyRef === null || tableBodyRef === void 0 ? void 0 : (_tableBodyRef$current2 = tableBodyRef.current) === null || _tableBodyRef$current2 === void 0 ? void 0 : _tableBodyRef$current2.getBoundingClientRect()) != null ? _tableBodyRef$current : (_trigger$closest = trigger.closest('.qbs-table')) === null || _trigger$closest === void 0 ? void 0 : _trigger$closest.getBoundingClientRect();
|
|
41
|
+
var spaceAbove = boundaryRect ? triggerRect.top - boundaryRect.top : triggerRect.top;
|
|
42
|
+
var spaceBelow = boundaryRect ? boundaryRect.bottom - triggerRect.bottom : window.innerHeight - triggerRect.bottom;
|
|
43
|
+
var nextPlacement = spaceBelow >= tooltipRect.height + TOOLTIP_GAP || spaceBelow >= spaceAbove ? 'down' : 'up';
|
|
44
|
+
var triggerCenter = triggerRect.left + triggerRect.width / 2;
|
|
45
|
+
var left = triggerCenter - tooltipRect.width / 2;
|
|
46
|
+
if (left < VIEWPORT_PADDING) {
|
|
47
|
+
left = VIEWPORT_PADDING;
|
|
48
|
+
} else if (left + tooltipRect.width > window.innerWidth - VIEWPORT_PADDING) {
|
|
49
|
+
left = window.innerWidth - VIEWPORT_PADDING - tooltipRect.width;
|
|
50
|
+
}
|
|
51
|
+
var top = nextPlacement === 'down' ? triggerRect.bottom + TOOLTIP_GAP : triggerRect.top - tooltipRect.height - TOOLTIP_GAP;
|
|
52
|
+
setPlacement(nextPlacement);
|
|
53
|
+
setCoords({
|
|
54
|
+
top: top,
|
|
55
|
+
left: left
|
|
56
|
+
});
|
|
57
|
+
setArrowOffset(triggerCenter - left);
|
|
58
|
+
setPositioned(true);
|
|
59
|
+
}, [tableBodyRef]);
|
|
60
|
+
var showTooltip = function showTooltip() {
|
|
61
|
+
setPositioned(false);
|
|
62
|
+
setVisible(true);
|
|
63
|
+
};
|
|
64
|
+
var hideTooltip = function hideTooltip() {
|
|
65
|
+
setVisible(false);
|
|
66
|
+
setPositioned(false);
|
|
57
67
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
onMouseLeave: function onMouseLeave() {
|
|
62
|
-
var _menuButtonRef$curren;
|
|
63
|
-
var tooltip = menuButtonRef === null || menuButtonRef === void 0 ? void 0 : (_menuButtonRef$curren = menuButtonRef.current) === null || _menuButtonRef$curren === void 0 ? void 0 : _menuButtonRef$curren.querySelector('.tooltiptext');
|
|
64
|
-
if (tooltip) {
|
|
65
|
-
tooltip.style.visibility = 'hidden';
|
|
66
|
-
tooltip.style.opacity = '0';
|
|
67
|
-
}
|
|
68
|
+
useLayoutEffect(function () {
|
|
69
|
+
if (!visible) {
|
|
70
|
+
return;
|
|
68
71
|
}
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
updatePosition();
|
|
73
|
+
var frame = window.requestAnimationFrame(updatePosition);
|
|
74
|
+
return function () {
|
|
75
|
+
return window.cancelAnimationFrame(frame);
|
|
76
|
+
};
|
|
77
|
+
}, [visible, title, updatePosition]);
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
if (!visible) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
var handleReposition = function handleReposition() {
|
|
83
|
+
return updatePosition();
|
|
84
|
+
};
|
|
85
|
+
window.addEventListener('resize', handleReposition);
|
|
86
|
+
window.addEventListener('scroll', handleReposition, true);
|
|
87
|
+
return function () {
|
|
88
|
+
window.removeEventListener('resize', handleReposition);
|
|
89
|
+
window.removeEventListener('scroll', handleReposition, true);
|
|
90
|
+
};
|
|
91
|
+
}, [visible, updatePosition]);
|
|
92
|
+
if (!title || enabled === false) {
|
|
93
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
94
|
+
}
|
|
95
|
+
var portalRoot = typeof document !== 'undefined' ? document.body : null;
|
|
96
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
97
|
+
ref: triggerRef,
|
|
98
|
+
className: "qbs-table-tooltip-trigger",
|
|
71
99
|
style: {
|
|
72
|
-
display: 'flex'
|
|
100
|
+
display: 'inline-flex'
|
|
73
101
|
},
|
|
74
|
-
onMouseEnter:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
102
|
+
onMouseEnter: showTooltip,
|
|
103
|
+
onMouseLeave: hideTooltip,
|
|
104
|
+
onFocus: showTooltip,
|
|
105
|
+
onBlur: hideTooltip
|
|
106
|
+
}, children), visible && portalRoot && /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("span", {
|
|
107
|
+
ref: tooltipRef,
|
|
108
|
+
role: "tooltip",
|
|
109
|
+
className: "qbs-table-tooltip-floating tooltiptext qbs-table-tooltip-floating--" + placement + " " + (positioned ? 'is-positioned' : ''),
|
|
110
|
+
style: {
|
|
111
|
+
top: coords.top,
|
|
112
|
+
left: coords.left,
|
|
113
|
+
'--tooltip-arrow-offset': arrowOffset + "px"
|
|
82
114
|
}
|
|
83
|
-
},
|
|
84
|
-
className: "tooltiptext"
|
|
85
|
-
}, title)));
|
|
115
|
+
}, title), portalRoot));
|
|
86
116
|
};
|
|
87
117
|
export default TooltipComponent;
|
|
@@ -123,7 +123,7 @@ var VerticalMenuDropdown = function VerticalMenuDropdown(_ref) {
|
|
|
123
123
|
};
|
|
124
124
|
var portalTarget = document.getElementById('portal-root');
|
|
125
125
|
var dropdownContent = /*#__PURE__*/React.createElement("div", {
|
|
126
|
-
className: "absolute z-
|
|
126
|
+
className: "absolute z-[60] min-w-48 rounded-md vertical-menu-dropdown-content",
|
|
127
127
|
ref: menuRef,
|
|
128
128
|
style: {
|
|
129
129
|
width: 200,
|
|
@@ -137,7 +137,7 @@ var VerticalMenuDropdown = function VerticalMenuDropdown(_ref) {
|
|
|
137
137
|
var _item$hide3;
|
|
138
138
|
return !(item !== null && item !== void 0 && item.hidden) && !(item !== null && item !== void 0 && (_item$hide3 = item.hide) !== null && _item$hide3 !== void 0 && _item$hide3.call(item, rowData, rowIndex)) ? /*#__PURE__*/React.createElement("div", {
|
|
139
139
|
key: item.title,
|
|
140
|
-
className: "vertical-menu-item px-4 py-2 text-sm text-
|
|
140
|
+
className: "vertical-menu-item px-4 py-2 text-sm text-base-black hover:bg-gray-light-1 cursor-pointer flex items-center gap-2 transition-colors",
|
|
141
141
|
onClick: function onClick(e) {
|
|
142
142
|
var _item$action;
|
|
143
143
|
e.preventDefault();
|
|
@@ -158,7 +158,7 @@ var VerticalMenuDropdown = function VerticalMenuDropdown(_ref) {
|
|
|
158
158
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
159
159
|
className: "inline-block vertical-menu-dropdown-wrapper"
|
|
160
160
|
}, handleShowHideMenu() > 0 && /*#__PURE__*/React.createElement("button", {
|
|
161
|
-
className: "vertical-menu-trigger-button p-2 rounded hover:bg-gray-
|
|
161
|
+
className: "vertical-menu-trigger-button p-2 rounded text-base-gray hover:bg-gray-light-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
162
162
|
onClick: toggleMenu,
|
|
163
163
|
ref: menuButtonRef
|
|
164
164
|
}, /*#__PURE__*/React.createElement(ThreeDotIcon, null))), openMenu && portalTarget && /*#__PURE__*/ReactDOM.createPortal(dropdownContent, portalTarget));
|
|
@@ -8,7 +8,7 @@ export var ThreeDotIcon = function ThreeDotIcon() {
|
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9
9
|
}, /*#__PURE__*/React.createElement("path", {
|
|
10
10
|
d: "M2 2.16665L2 2.17498M2 7.99998L2 8.00831M2 13.8333L2 13.8416M2 2.99998C1.53976 2.99998 1.16667 2.62688 1.16667 2.16665C1.16667 1.70641 1.53976 1.33331 2 1.33331C2.46024 1.33331 2.83333 1.70641 2.83333 2.16665C2.83333 2.62688 2.46024 2.99998 2 2.99998ZM2 8.83331C1.53976 8.83331 1.16667 8.46022 1.16667 7.99998C1.16667 7.53974 1.53976 7.16665 2 7.16665C2.46024 7.16665 2.83333 7.53974 2.83333 7.99998C2.83333 8.46022 2.46024 8.83331 2 8.83331ZM2 14.6666C1.53976 14.6666 1.16666 14.2935 1.16666 13.8333C1.16666 13.3731 1.53976 13 2 13C2.46024 13 2.83333 13.3731 2.83333 13.8333C2.83333 14.2935 2.46024 14.6666 2 14.6666Z",
|
|
11
|
-
stroke: "
|
|
11
|
+
stroke: "currentColor",
|
|
12
12
|
strokeWidth: "1.5",
|
|
13
13
|
strokeLinecap: "round",
|
|
14
14
|
strokeLinejoin: "round"
|
package/lib/less/pagination.less
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
min-height: 40px;
|
|
6
6
|
align-items: center;
|
|
7
7
|
border-radius: 0 0 4px 4px;
|
|
8
|
-
border-top: 1px solid #d6d8dc;
|
|
9
|
-
background: #fff;
|
|
8
|
+
border-top: 1px solid var(--base-gray-border, #d6d8dc);
|
|
9
|
+
background: var(--table-bg, #fff);
|
|
10
10
|
&-header {
|
|
11
11
|
border-bottom: 1px solid #eee;
|
|
12
12
|
position: absolute;
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
font-weight: 500;
|
|
28
28
|
line-height: 20px;
|
|
29
29
|
border-radius: 6px;
|
|
30
|
-
border: 1px solid #d6d8dc;
|
|
31
|
-
background: #fff;
|
|
30
|
+
border: 1px solid var(--base-gray-border, #d6d8dc);
|
|
31
|
+
background: var(--gray-light-1, #fff);
|
|
32
32
|
}
|
|
33
33
|
.qbs-table-icon-container {
|
|
34
34
|
padding: 0;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
line-height: 20px;
|
|
112
|
-
color: #313131;
|
|
112
|
+
color: var(--gray-dark-3, #313131);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
.custom-select-trigger {
|
|
126
126
|
padding: 2px 8px;
|
|
127
127
|
cursor: pointer;
|
|
128
|
-
border: 1px solid #d6d8dc;
|
|
128
|
+
border: 1px solid var(--base-gray-border, #d6d8dc);
|
|
129
129
|
border-radius: 4px;
|
|
130
130
|
min-width: 65px;
|
|
131
131
|
position: relative;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
list-style: none;
|
|
141
141
|
margin: 2px 0 0;
|
|
142
142
|
padding: 0;
|
|
143
|
-
background: #fff;
|
|
143
|
+
background: var(--gray-light-1, #fff);
|
|
144
144
|
border-radius: 8px;
|
|
145
145
|
box-shadow: 0 8px 20px 0 #00000026;
|
|
146
146
|
}
|
|
@@ -158,7 +158,7 @@ ul.custom-select-options.top {
|
|
|
158
158
|
|
|
159
159
|
.custom-select-option:hover,
|
|
160
160
|
.custom-select-option.selected {
|
|
161
|
-
background-color: #f0f0f0;
|
|
161
|
+
background-color: var(--table-row-hover-bg, #f0f0f0);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.custom-select-trigger:before {
|
|
@@ -167,7 +167,7 @@ ul.custom-select-options.top {
|
|
|
167
167
|
right: 10px;
|
|
168
168
|
top: 6px;
|
|
169
169
|
font-weight: bold;
|
|
170
|
-
border: solid black;
|
|
170
|
+
border: solid var(--gray-dark-3, black);
|
|
171
171
|
border-width: 0 1px 1px 0;
|
|
172
172
|
display: inline-block;
|
|
173
173
|
padding: 3px;
|
package/lib/less/qbs-table.less
CHANGED
|
@@ -387,71 +387,98 @@
|
|
|
387
387
|
.qbs-table-tooltip {
|
|
388
388
|
cursor: pointer;
|
|
389
389
|
position: relative;
|
|
390
|
-
|
|
391
|
-
display: flex;
|
|
390
|
+
display: inline-flex;
|
|
392
391
|
}
|
|
393
392
|
|
|
394
393
|
.qbs-table-tooltip .tooltiptext {
|
|
395
394
|
visibility: hidden;
|
|
396
|
-
background-color:
|
|
397
|
-
color:
|
|
395
|
+
background-color: var(--tooltip-bg, #222);
|
|
396
|
+
color: var(--tooltip-text, #fff);
|
|
398
397
|
text-align: center;
|
|
399
|
-
padding: 6px;
|
|
400
|
-
border-radius:
|
|
398
|
+
padding: 6px 10px;
|
|
399
|
+
border-radius: 6px;
|
|
401
400
|
position: absolute;
|
|
402
|
-
z-index:
|
|
401
|
+
z-index: 10050;
|
|
403
402
|
opacity: 0;
|
|
404
|
-
transition: opacity 0.
|
|
403
|
+
transition: opacity 0.15s ease;
|
|
405
404
|
font-size: 12px;
|
|
406
|
-
font-
|
|
407
|
-
font-weight: 400;
|
|
405
|
+
font-weight: 500;
|
|
408
406
|
line-height: 16px;
|
|
409
|
-
|
|
410
|
-
max-width:
|
|
407
|
+
white-space: nowrap;
|
|
408
|
+
max-width: min(280px, 90vw);
|
|
409
|
+
pointer-events: none;
|
|
410
|
+
inset-inline-start: 50%;
|
|
411
|
+
translate: -50% 0;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
.qbs-table-tooltip.up .tooltiptext {
|
|
414
|
-
bottom: calc(100% +
|
|
415
|
-
|
|
416
|
-
left: unset;
|
|
415
|
+
bottom: calc(100% + 8px);
|
|
416
|
+
top: auto;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
.qbs-table-tooltip.down .tooltiptext {
|
|
420
|
-
right: -10px;
|
|
421
420
|
top: calc(100% + 8px);
|
|
421
|
+
bottom: auto;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
// .qbs-table-tooltip:hover .tooltiptext {
|
|
425
|
-
// visibility: visible;
|
|
426
|
-
// opacity: 1;
|
|
427
|
-
// }
|
|
428
|
-
|
|
429
424
|
.qbs-table-tooltip .tooltiptext::after {
|
|
430
425
|
content: '';
|
|
431
426
|
position: absolute;
|
|
432
|
-
|
|
433
|
-
|
|
427
|
+
inset-inline-start: 50%;
|
|
428
|
+
translate: -50% 0;
|
|
429
|
+
border: 5px solid transparent;
|
|
434
430
|
}
|
|
435
431
|
|
|
436
432
|
.qbs-table-tooltip.up .tooltiptext::after {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
margin-left: -5px !important;
|
|
440
|
-
top: 100% !important;
|
|
441
|
-
left: unset !important;
|
|
433
|
+
top: 100%;
|
|
434
|
+
border-top-color: var(--tooltip-bg, #222);
|
|
442
435
|
}
|
|
443
436
|
|
|
444
437
|
.qbs-table-tooltip.down .tooltiptext::after {
|
|
445
|
-
|
|
446
|
-
bottom:
|
|
447
|
-
right: 12px !important;
|
|
448
|
-
margin-left: -5px !important;
|
|
449
|
-
left: unset !important;
|
|
438
|
+
bottom: 100%;
|
|
439
|
+
border-bottom-color: var(--tooltip-bg, #222);
|
|
450
440
|
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
441
|
+
|
|
442
|
+
.qbs-table-tooltip-floating.tooltiptext {
|
|
443
|
+
position: fixed;
|
|
444
|
+
z-index: 10050;
|
|
445
|
+
visibility: hidden;
|
|
446
|
+
opacity: 0;
|
|
447
|
+
pointer-events: none;
|
|
448
|
+
background-color: var(--tooltip-bg, #222);
|
|
449
|
+
color: var(--tooltip-text, #fff);
|
|
450
|
+
text-align: center;
|
|
451
|
+
padding: 6px 10px;
|
|
452
|
+
border-radius: 6px;
|
|
453
|
+
font-size: 12px;
|
|
454
|
+
font-weight: 500;
|
|
455
|
+
line-height: 16px;
|
|
456
|
+
white-space: nowrap;
|
|
457
|
+
max-width: min(280px, 90vw);
|
|
458
|
+
transition: opacity 0.15s ease;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.qbs-table-tooltip-floating.tooltiptext.is-positioned {
|
|
462
|
+
visibility: visible;
|
|
463
|
+
opacity: 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.qbs-table-tooltip-floating.tooltiptext::after {
|
|
467
|
+
content: '';
|
|
468
|
+
position: absolute;
|
|
469
|
+
left: var(--tooltip-arrow-offset, 50%);
|
|
470
|
+
translate: -50% 0;
|
|
471
|
+
border: 5px solid transparent;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.qbs-table-tooltip-floating--down.tooltiptext::after {
|
|
475
|
+
bottom: 100%;
|
|
476
|
+
border-bottom-color: var(--tooltip-bg, #222);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.qbs-table-tooltip-floating--up.tooltiptext::after {
|
|
480
|
+
top: 100%;
|
|
481
|
+
border-top-color: var(--tooltip-bg, #222);
|
|
455
482
|
}
|
|
456
483
|
.rs-table-row {
|
|
457
484
|
overflow: visible !important;
|
|
@@ -74,8 +74,7 @@ var CardMenuDropdown = function CardMenuDropdown(_ref) {
|
|
|
74
74
|
ref: menuButtonRef
|
|
75
75
|
}, /*#__PURE__*/_react["default"].createElement(_ToolTip["default"], {
|
|
76
76
|
title: labels.actions,
|
|
77
|
-
enabled: false
|
|
78
|
-
ref: menuButtonRef
|
|
77
|
+
enabled: false
|
|
79
78
|
}, /*#__PURE__*/_react["default"].createElement(_icons.ThreeDotIcon, null))), openMenu && /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
79
|
className: " qbs-card-dropdown rounded absolute right-0 mt-2 w-auto min-w-11 z-10 shadow-modalShadow bg-white dark:bg-[#424242] dark:text-white",
|
|
81
80
|
style: menuPositionStyles
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type TooltipComponentProps = {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
tableBodyRef?: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
/** When false, renders children only (no tooltip). */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const TooltipComponent: React.FC<TooltipComponentProps>;
|
|
3
10
|
export default TooltipComponent;
|