react-core-ts 2.1.41 → 2.1.43
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/styles/components/autocomplete.css +36 -142
- package/dist/styles/global.css +1 -3
- package/dist/styles/styles/components/autocomplete.css +5 -0
- package/dist/utilities/NewTooltip.js +34 -47
- package/dist/utilities/NewTooltip.js.map +1 -1
- package/dist/utilities/expandableTootltip.js +36 -70
- package/dist/utilities/expandableTootltip.js.map +1 -1
- package/dist/utilities/getPosition.d.ts +9 -0
- package/dist/utilities/getPosition.js +41 -1
- package/dist/utilities/getPosition.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/components/autocomplete.css +5 -0
- package/src/utilities/NewTooltip.tsx +55 -70
- package/src/utilities/expandableTootltip.tsx +53 -83
- package/src/utilities/getPosition.ts +62 -0
- package/dist/styles/components/modern-input.css +0 -208
- package/dist/styles/components/qbs-fallbacks.css +0 -174
- package/dist/styles/library-entry.css +0 -9
|
@@ -705,6 +705,11 @@ span.dropdown-search-icon {
|
|
|
705
705
|
border-color: transparent transparent #000 transparent;
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
+
.custom_tooltip_style_class.up.tooltiptext::after,
|
|
709
|
+
.custom_tooltip_style_class.down.tooltiptext::after {
|
|
710
|
+
left: var(--tooltip-arrow-left, 50%);
|
|
711
|
+
}
|
|
712
|
+
|
|
708
713
|
.autocomplete-suggections .qbs-autocomplete-suggections-items {
|
|
709
714
|
display: flex;
|
|
710
715
|
/* justify-content: space-between; */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
|
+
import { getPortalTooltipCoords } from './getPosition';
|
|
3
4
|
|
|
4
5
|
const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
5
6
|
const [dropdownPosition, setDropdownPosition] = useState('bottom-position');
|
|
6
|
-
const dropRef = useRef(null);
|
|
7
|
+
const dropRef = useRef<HTMLDivElement | null>(null);
|
|
7
8
|
const menuButtonRef = useRef<HTMLDivElement>(null);
|
|
8
9
|
const [isTooltipMounted, setIsTooltipMounted] = useState(false);
|
|
9
10
|
|
|
@@ -11,11 +12,11 @@ const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
|
11
12
|
const [tooltipStyle, setTooltipStyle] = useState({
|
|
12
13
|
top: 0,
|
|
13
14
|
left: 0,
|
|
14
|
-
|
|
15
|
+
arrowOffset: 50,
|
|
15
16
|
});
|
|
16
17
|
const hideTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
17
18
|
|
|
18
|
-
const handleMouseEnter = (
|
|
19
|
+
const handleMouseEnter = () => {
|
|
19
20
|
if (hideTimeoutRef.current) {
|
|
20
21
|
clearTimeout(hideTimeoutRef.current);
|
|
21
22
|
hideTimeoutRef.current = null;
|
|
@@ -25,63 +26,45 @@ const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
menuButtonRef.current
|
|
29
|
+
const updatePosition = useCallback(() => {
|
|
30
|
+
if (!menuButtonRef.current || !dropRef.current) return;
|
|
31
|
+
|
|
32
|
+
const coords = getPortalTooltipCoords(
|
|
33
|
+
menuButtonRef.current,
|
|
33
34
|
dropRef.current
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let dropPosition: 'top-position' | 'bottom-position' = 'bottom-position';
|
|
45
|
-
if (spaceBelow >= tooltipHeight + 20) {
|
|
46
|
-
dropPosition = 'bottom-position';
|
|
47
|
-
} else if (spaceAbove >= tooltipHeight + 20) {
|
|
48
|
-
dropPosition = 'top-position';
|
|
49
|
-
} else {
|
|
50
|
-
dropPosition =
|
|
51
|
-
spaceBelow > spaceAbove ? 'bottom-position' : 'top-position';
|
|
35
|
+
);
|
|
36
|
+
setDropdownPosition(coords.placement);
|
|
37
|
+
setTooltipStyle((prev) => {
|
|
38
|
+
if (
|
|
39
|
+
prev.top === coords.top &&
|
|
40
|
+
prev.left === coords.left &&
|
|
41
|
+
prev.arrowOffset === coords.arrowOffset
|
|
42
|
+
) {
|
|
43
|
+
return prev;
|
|
52
44
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
setTooltipStyle((prev) => ({
|
|
78
|
-
...prev,
|
|
79
|
-
top: correctedTop,
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
}, 0);
|
|
83
|
-
}
|
|
84
|
-
}, [visible]);
|
|
45
|
+
return {
|
|
46
|
+
top: coords.top,
|
|
47
|
+
left: coords.left,
|
|
48
|
+
arrowOffset: coords.arrowOffset,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
if (!visible || !isTooltipMounted) return;
|
|
55
|
+
|
|
56
|
+
updatePosition();
|
|
57
|
+
const frame = window.requestAnimationFrame(updatePosition);
|
|
58
|
+
|
|
59
|
+
window.addEventListener('resize', updatePosition);
|
|
60
|
+
window.addEventListener('scroll', updatePosition, true);
|
|
61
|
+
|
|
62
|
+
return () => {
|
|
63
|
+
window.cancelAnimationFrame(frame);
|
|
64
|
+
window.removeEventListener('resize', updatePosition);
|
|
65
|
+
window.removeEventListener('scroll', updatePosition, true);
|
|
66
|
+
};
|
|
67
|
+
}, [visible, isTooltipMounted, updatePosition]);
|
|
85
68
|
|
|
86
69
|
useEffect(() => {
|
|
87
70
|
const handleMouseMove = (event: MouseEvent) => {
|
|
@@ -152,17 +135,19 @@ const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
|
152
135
|
className={`tooltiptext custom_tooltip_style_class ${
|
|
153
136
|
dropdownPosition == 'bottom-position' ? 'down' : 'up'
|
|
154
137
|
}`}
|
|
155
|
-
style={
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
138
|
+
style={
|
|
139
|
+
{
|
|
140
|
+
top: tooltipStyle.top,
|
|
141
|
+
left: tooltipStyle.left,
|
|
142
|
+
opacity: visible ? 1 : 0,
|
|
143
|
+
visibility: visible ? 'visible' : 'hidden',
|
|
144
|
+
minWidth: '60px',
|
|
145
|
+
maxWidth: '200px',
|
|
146
|
+
pointerEvents: 'auto',
|
|
147
|
+
maxHeight: '210px',
|
|
148
|
+
'--tooltip-arrow-left': `${tooltipStyle.arrowOffset}px`,
|
|
149
|
+
} as React.CSSProperties
|
|
150
|
+
}
|
|
166
151
|
>
|
|
167
152
|
<div
|
|
168
153
|
className=""
|
|
@@ -1,99 +1,65 @@
|
|
|
1
|
-
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom';
|
|
3
|
+
import { getPortalTooltipCoords } from './getPosition';
|
|
3
4
|
|
|
4
5
|
const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
5
6
|
const [dropdownPosition, setDropdownPosition] = useState('bottom-position');
|
|
6
|
-
const dropRef = useRef(null);
|
|
7
|
+
const dropRef = useRef<HTMLSpanElement | null>(null);
|
|
7
8
|
const menuButtonRef = useRef<HTMLDivElement>(null);
|
|
8
9
|
const [visible, setVisible] = useState(false);
|
|
9
10
|
const [tooltipStyle, setTooltipStyle] = useState({
|
|
10
11
|
top: 0,
|
|
11
12
|
left: 0,
|
|
12
|
-
|
|
13
|
+
arrowOffset: 50,
|
|
13
14
|
});
|
|
14
|
-
const adjustDropdownPosition = (): string => {
|
|
15
|
-
if (menuButtonRef.current) {
|
|
16
|
-
const inputBoxRect = menuButtonRef.current?.getBoundingClientRect();
|
|
17
|
-
const viewportHeight = window.innerHeight;
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (spaceAbove > spaceBelow) {
|
|
22
|
-
if (spaceAbove > 90 && spaceBelow < 120) {
|
|
23
|
-
return 'top-position';
|
|
24
|
-
} else {
|
|
25
|
-
return 'bottom-position';
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
const diff: number = spaceBelow - spaceAbove;
|
|
29
|
-
if (spaceAbove > 90 && spaceBelow > 90 && diff < 90) {
|
|
30
|
-
return 'top-position';
|
|
31
|
-
} else {
|
|
32
|
-
return 'bottom-position';
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const handleMouseEnter = (e: React.MouseEvent) => {
|
|
39
|
-
if (menuButtonRef.current) {
|
|
40
|
-
const dropPosition = adjustDropdownPosition();
|
|
41
|
-
setDropdownPosition(dropPosition);
|
|
42
|
-
const rect = (e.target as HTMLElement).getBoundingClientRect();
|
|
43
|
-
let top = rect.bottom + window.scrollY;
|
|
44
|
-
let left = rect.left + window.scrollX;
|
|
45
|
-
const height = rect.height;
|
|
46
|
-
const width = dropRef?.current?.offsetWidth;
|
|
47
|
-
if (dropPosition === 'bottom-position') {
|
|
48
|
-
top = top + height / 2 - 5;
|
|
49
|
-
} else {
|
|
50
|
-
top = top - height * 2 + 15;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
setTooltipStyle({
|
|
54
|
-
top: top,
|
|
55
|
-
left: left,
|
|
56
|
-
width: width,
|
|
57
|
-
});
|
|
58
|
-
setVisible(true);
|
|
59
|
-
}
|
|
16
|
+
const handleMouseEnter = () => {
|
|
17
|
+
setVisible(true);
|
|
60
18
|
};
|
|
61
19
|
|
|
62
20
|
const handleMouseLeave = () => {
|
|
63
21
|
setVisible(false);
|
|
64
22
|
};
|
|
65
23
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
? prevStyle.top
|
|
82
|
-
: prevStyle.top - tooltipHeight,
|
|
83
|
-
}));
|
|
24
|
+
const updatePosition = useCallback(() => {
|
|
25
|
+
if (!menuButtonRef.current || !dropRef.current) return;
|
|
26
|
+
|
|
27
|
+
const coords = getPortalTooltipCoords(
|
|
28
|
+
menuButtonRef.current,
|
|
29
|
+
dropRef.current
|
|
30
|
+
);
|
|
31
|
+
setDropdownPosition(coords.placement);
|
|
32
|
+
setTooltipStyle((prev) => {
|
|
33
|
+
if (
|
|
34
|
+
prev.top === coords.top &&
|
|
35
|
+
prev.left === coords.left &&
|
|
36
|
+
prev.arrowOffset === coords.arrowOffset
|
|
37
|
+
) {
|
|
38
|
+
return prev;
|
|
84
39
|
}
|
|
85
|
-
|
|
40
|
+
return {
|
|
41
|
+
top: coords.top,
|
|
42
|
+
left: coords.left,
|
|
43
|
+
arrowOffset: coords.arrowOffset,
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
}, []);
|
|
47
|
+
|
|
48
|
+
useLayoutEffect(() => {
|
|
49
|
+
if (!visible) return;
|
|
86
50
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
51
|
+
updatePosition();
|
|
52
|
+
const frame = window.requestAnimationFrame(updatePosition);
|
|
90
53
|
|
|
91
|
-
window.addEventListener('resize',
|
|
54
|
+
window.addEventListener('resize', updatePosition);
|
|
55
|
+
window.addEventListener('scroll', updatePosition, true);
|
|
92
56
|
|
|
93
57
|
return () => {
|
|
94
|
-
window.
|
|
58
|
+
window.cancelAnimationFrame(frame);
|
|
59
|
+
window.removeEventListener('resize', updatePosition);
|
|
60
|
+
window.removeEventListener('scroll', updatePosition, true);
|
|
95
61
|
};
|
|
96
|
-
}, [visible,
|
|
62
|
+
}, [visible, updatePosition]);
|
|
97
63
|
|
|
98
64
|
useEffect(() => {
|
|
99
65
|
const handleClickOutside = (event: MouseEvent) => {
|
|
@@ -122,19 +88,23 @@ const ExpandableToolTip: React.FC<any> = ({ title, children, enabled }) => {
|
|
|
122
88
|
tooltipStyle &&
|
|
123
89
|
ReactDOM.createPortal(
|
|
124
90
|
<span
|
|
125
|
-
ref={(node) =>
|
|
91
|
+
ref={(node) => {
|
|
92
|
+
dropRef.current = node;
|
|
93
|
+
}}
|
|
126
94
|
className={`tooltiptext custom_tooltip_style_class ${
|
|
127
95
|
dropdownPosition == 'bottom-position' ? 'down' : 'up'
|
|
128
96
|
}`}
|
|
129
|
-
style={
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
97
|
+
style={
|
|
98
|
+
{
|
|
99
|
+
top: tooltipStyle.top,
|
|
100
|
+
left: tooltipStyle.left,
|
|
101
|
+
opacity: 1,
|
|
102
|
+
minWidth: '60px',
|
|
103
|
+
maxWidth: '200px',
|
|
104
|
+
visibility: 'visible',
|
|
105
|
+
'--tooltip-arrow-left': `${tooltipStyle.arrowOffset}px`,
|
|
106
|
+
} as React.CSSProperties
|
|
107
|
+
}
|
|
138
108
|
>
|
|
139
109
|
<span className="tooltip-text-container">{title}</span>
|
|
140
110
|
</span>,
|
|
@@ -59,3 +59,65 @@ export const applyToolTipPositionClass = (
|
|
|
59
59
|
textFieldElement.classList.add(positionClass);
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
+
|
|
63
|
+
export type PortalTooltipPlacement = 'top-position' | 'bottom-position';
|
|
64
|
+
|
|
65
|
+
export type PortalTooltipCoords = {
|
|
66
|
+
top: number;
|
|
67
|
+
left: number;
|
|
68
|
+
arrowOffset: number;
|
|
69
|
+
placement: PortalTooltipPlacement;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const VIEWPORT_PAD = 8;
|
|
73
|
+
const TOOLTIP_GAP = 8;
|
|
74
|
+
const ARROW_HALF = 5;
|
|
75
|
+
|
|
76
|
+
/** Center a portaled tooltip on its trigger and keep the arrow on the trigger. */
|
|
77
|
+
export const getPortalTooltipCoords = (
|
|
78
|
+
anchorEl: HTMLElement,
|
|
79
|
+
tooltipEl: HTMLElement
|
|
80
|
+
): PortalTooltipCoords => {
|
|
81
|
+
const anchor = anchorEl.getBoundingClientRect();
|
|
82
|
+
const tooltipWidth = Math.max(tooltipEl.offsetWidth, 60);
|
|
83
|
+
const tooltipHeight = tooltipEl.offsetHeight;
|
|
84
|
+
|
|
85
|
+
const spaceAbove = anchor.top;
|
|
86
|
+
const spaceBelow = window.innerHeight - anchor.bottom;
|
|
87
|
+
|
|
88
|
+
let placement: PortalTooltipPlacement = 'bottom-position';
|
|
89
|
+
if (spaceBelow >= tooltipHeight + 20) {
|
|
90
|
+
placement = 'bottom-position';
|
|
91
|
+
} else if (spaceAbove >= tooltipHeight + 20) {
|
|
92
|
+
placement = 'top-position';
|
|
93
|
+
} else {
|
|
94
|
+
placement = spaceBelow > spaceAbove ? 'bottom-position' : 'top-position';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const top =
|
|
98
|
+
placement === 'bottom-position'
|
|
99
|
+
? anchor.bottom + TOOLTIP_GAP + window.scrollY
|
|
100
|
+
: anchor.top - tooltipHeight - TOOLTIP_GAP + window.scrollY;
|
|
101
|
+
|
|
102
|
+
const triggerCenterX = anchor.left + anchor.width / 2;
|
|
103
|
+
const minLeft = VIEWPORT_PAD;
|
|
104
|
+
const maxLeft = window.innerWidth - tooltipWidth - VIEWPORT_PAD;
|
|
105
|
+
let left =
|
|
106
|
+
maxLeft < minLeft
|
|
107
|
+
? minLeft
|
|
108
|
+
: Math.min(Math.max(triggerCenterX - tooltipWidth / 2, minLeft), maxLeft);
|
|
109
|
+
|
|
110
|
+
const minArrow = ARROW_HALF + 6;
|
|
111
|
+
const maxArrow = Math.max(minArrow, tooltipWidth - ARROW_HALF - 6);
|
|
112
|
+
const arrowOffset = Math.min(
|
|
113
|
+
Math.max(triggerCenterX - left, minArrow),
|
|
114
|
+
maxArrow
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
top,
|
|
119
|
+
left: left + window.scrollX,
|
|
120
|
+
arrowOffset,
|
|
121
|
+
placement,
|
|
122
|
+
};
|
|
123
|
+
};
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Self-contained modern TextField / Autocomplete input styles.
|
|
3
|
-
* These used to live in host apps; the library must ship them for Vite / local preview.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/* Base peer input (height + border) */
|
|
7
|
-
input.qbs-peer,
|
|
8
|
-
.qbs-textfield input[class*='qbs-h-'] {
|
|
9
|
-
box-sizing: border-box !important;
|
|
10
|
-
display: block;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 2.5rem !important;
|
|
13
|
-
min-height: 2.5rem !important;
|
|
14
|
-
margin: 0;
|
|
15
|
-
border-style: solid;
|
|
16
|
-
border-width: 1px;
|
|
17
|
-
border-color: #d0d5dd;
|
|
18
|
-
border-radius: 4px;
|
|
19
|
-
background-color: #fff;
|
|
20
|
-
color: #111827;
|
|
21
|
-
font-size: 0.875rem;
|
|
22
|
-
font-weight: 400;
|
|
23
|
-
line-height: 1.25rem;
|
|
24
|
-
padding-left: 0.875rem;
|
|
25
|
-
padding-right: 0.875rem;
|
|
26
|
-
padding-top: 0;
|
|
27
|
-
padding-bottom: 0;
|
|
28
|
-
outline: none;
|
|
29
|
-
-webkit-appearance: none;
|
|
30
|
-
appearance: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
input.qbs-peer.qbs-h-\[34px\],
|
|
34
|
-
.qbs-textfield input.qbs-h-\[34px\] {
|
|
35
|
-
height: 34px !important;
|
|
36
|
-
min-height: 34px !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
input.qbs-peer.qbs-h-\[25px\],
|
|
40
|
-
.qbs-textfield input.qbs-h-\[25px\] {
|
|
41
|
-
height: 25px !important;
|
|
42
|
-
min-height: 25px !important;
|
|
43
|
-
font-size: 0.75rem;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
input.qbs-peer:focus:not(.qbs-input-error) {
|
|
47
|
-
border-color: #001f3f;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
input.qbs-peer:disabled {
|
|
51
|
-
color: #98a2b3;
|
|
52
|
-
background-color: #f2f4f7;
|
|
53
|
-
cursor: not-allowed;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/*
|
|
57
|
-
* Error state — must beat `input.qbs-peer` / `:focus` (element+class specificity).
|
|
58
|
-
* Broken Tailwind classes like `focus:qbs-border-error-[#FDA29B]` never ship in CSS.
|
|
59
|
-
*/
|
|
60
|
-
input.qbs-peer.qbs-input-error,
|
|
61
|
-
.qbs-textfield input.qbs-input-error,
|
|
62
|
-
.qbs-autocomplete-container-table-view input.qbs-input-error {
|
|
63
|
-
border-color: #fda29b !important;
|
|
64
|
-
outline: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
input.qbs-peer.qbs-input-error:focus,
|
|
68
|
-
.qbs-textfield input.qbs-input-error:focus,
|
|
69
|
-
.qbs-autocomplete-container-table-view input.qbs-input-error:focus {
|
|
70
|
-
border-color: #fda29b !important;
|
|
71
|
-
outline: none;
|
|
72
|
-
box-shadow: 0 0 0 3px rgba(253, 162, 155, 0.35);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Host-token fallbacks (prefixed utilities that are not in default Tailwind theme) */
|
|
76
|
-
.qbs-border-input-light {
|
|
77
|
-
border-color: #d0d5dd;
|
|
78
|
-
}
|
|
79
|
-
.qbs-text-input-text {
|
|
80
|
-
color: #111827;
|
|
81
|
-
}
|
|
82
|
-
.qbs-text-input-disabled,
|
|
83
|
-
.disabled\:qbs-text-input-disabled:disabled {
|
|
84
|
-
color: #98a2b3;
|
|
85
|
-
}
|
|
86
|
-
.qbs-bg-disabled,
|
|
87
|
-
.disabled\:qbs-bg-disabled:disabled {
|
|
88
|
-
background-color: #f2f4f7;
|
|
89
|
-
}
|
|
90
|
-
.qbs-text-grey-dark {
|
|
91
|
-
color: #344054;
|
|
92
|
-
}
|
|
93
|
-
.qbs-text-error-light {
|
|
94
|
-
color: #f04438;
|
|
95
|
-
}
|
|
96
|
-
.qbs-text-error-icon,
|
|
97
|
-
.qbs-text-error-label {
|
|
98
|
-
color: #f04438;
|
|
99
|
-
}
|
|
100
|
-
.qbs-text-warning-icon,
|
|
101
|
-
.qbs-text-warning-label {
|
|
102
|
-
color: #f79009;
|
|
103
|
-
}
|
|
104
|
-
.qbs-text-tick-label {
|
|
105
|
-
color: #28b440;
|
|
106
|
-
}
|
|
107
|
-
.qbs-text-grey-medium {
|
|
108
|
-
color: #667085;
|
|
109
|
-
}
|
|
110
|
-
.qbs-border-grey-light {
|
|
111
|
-
border-color: #d0d5dd;
|
|
112
|
-
}
|
|
113
|
-
.qbs-text-table-bodyColor {
|
|
114
|
-
color: #667085;
|
|
115
|
-
}
|
|
116
|
-
.placeholder-input-label::placeholder {
|
|
117
|
-
color: #667085;
|
|
118
|
-
}
|
|
119
|
-
.qbs-bg-bodyBG {
|
|
120
|
-
background-color: #f9fafb;
|
|
121
|
-
}
|
|
122
|
-
.qbs-text-xxs {
|
|
123
|
-
font-size: 0.625rem;
|
|
124
|
-
line-height: 0.875rem;
|
|
125
|
-
}
|
|
126
|
-
.qbs-input-outline {
|
|
127
|
-
outline: none;
|
|
128
|
-
}
|
|
129
|
-
.text-common {
|
|
130
|
-
font-size: 0.875rem;
|
|
131
|
-
line-height: 1.25rem;
|
|
132
|
-
}
|
|
133
|
-
.text-error {
|
|
134
|
-
color: #f04438;
|
|
135
|
-
}
|
|
136
|
-
.text-grey-secondary {
|
|
137
|
-
color: #667085;
|
|
138
|
-
}
|
|
139
|
-
.text-text-primary {
|
|
140
|
-
color: #101828;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* Floating label: hide native placeholder when modern label is used */
|
|
144
|
-
.placeholder-transparent::placeholder {
|
|
145
|
-
color: transparent !important;
|
|
146
|
-
}
|
|
147
|
-
.placeholder-transparent::-webkit-input-placeholder {
|
|
148
|
-
color: transparent !important;
|
|
149
|
-
}
|
|
150
|
-
.focus\:placeholder-grey-secondary:focus::placeholder {
|
|
151
|
-
color: #98a2b3;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.modern-input-label-truncate {
|
|
155
|
-
max-width: calc(100% - 1.75rem);
|
|
156
|
-
overflow: hidden;
|
|
157
|
-
text-overflow: ellipsis;
|
|
158
|
-
white-space: nowrap;
|
|
159
|
-
pointer-events: none;
|
|
160
|
-
background-color: transparent;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.modern-input-label-size {
|
|
164
|
-
font-size: 0.875rem;
|
|
165
|
-
line-height: 1.25rem;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.modern-input-peer-focus-label-size,
|
|
169
|
-
.peer-focus\:modern-input-peer-focus-label-size {
|
|
170
|
-
font-size: 0.75rem;
|
|
171
|
-
line-height: 1rem;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* When peer has value / is focused, shrink label (Tailwind peer-focus variant class name) */
|
|
175
|
-
.qbs-peer:focus ~ .peer-focus\:modern-input-peer-focus-label-size,
|
|
176
|
-
.qbs-peer:not(:placeholder-shown) ~ .modern-input-peer-focus-label-size,
|
|
177
|
-
.qbs-peer:not(:placeholder-shown) ~ label.modern-input-label-truncate {
|
|
178
|
-
font-size: 0.75rem;
|
|
179
|
-
line-height: 1rem;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.active-input-label-bg {
|
|
183
|
-
background-color: #fff;
|
|
184
|
-
padding-left: 0.25rem;
|
|
185
|
-
padding-right: 0.25rem;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.disabled-input-label-bg {
|
|
189
|
-
background-color: #f2f4f7;
|
|
190
|
-
padding-left: 0.25rem;
|
|
191
|
-
padding-right: 0.25rem;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/* Ensure bordered utility actually draws a border */
|
|
195
|
-
.qbs-border {
|
|
196
|
-
border-style: solid;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Utilities that apps expect but Tailwind may not emit / lose specificity */
|
|
200
|
-
.qbs-z-1 {
|
|
201
|
-
z-index: 1;
|
|
202
|
-
}
|
|
203
|
-
.qbs-start-\[14px\] {
|
|
204
|
-
inset-inline-start: 14px;
|
|
205
|
-
}
|
|
206
|
-
.hover\:qbs-text-dark:hover {
|
|
207
|
-
color: #101828;
|
|
208
|
-
}
|