@loomhq/lens 10.57.3 → 10.57.5
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/colors.js
CHANGED
|
@@ -76,7 +76,6 @@ export const saturate = (color, percentage) => (Object.assign(Object.assign({},
|
|
|
76
76
|
export const alpha = (color, alpha) => (Object.assign(Object.assign({}, color), { a: alpha }));
|
|
77
77
|
const hoverIncrease = 15.8;
|
|
78
78
|
const activeIncrease = 31.6;
|
|
79
|
-
const bodyDimmedAlpha = 0.6;
|
|
80
79
|
const borderAlpha = 0.2;
|
|
81
80
|
const backdropAlpha = 0.5;
|
|
82
81
|
const backdropDarkAlpha = 0.8;
|
|
@@ -106,7 +105,7 @@ export const hslaBaseColors = {
|
|
|
106
105
|
export const hslaGreys = {
|
|
107
106
|
grey8: { h: 0, s: 0, l: 13, a: 1 },
|
|
108
107
|
grey7: { h: 242, s: 21, l: 28, a: 1 },
|
|
109
|
-
grey6: { h:
|
|
108
|
+
grey6: { h: 252, s: 13, l: 46, a: 1 },
|
|
110
109
|
grey5: { h: 240, s: 7, l: 62, a: 1 },
|
|
111
110
|
grey4: { h: 240, s: 5.8, l: 76.3, a: 1 },
|
|
112
111
|
grey3: { h: 240, s: 6, l: 87, a: 1 },
|
|
@@ -138,8 +137,8 @@ const themeSharedColors = {
|
|
|
138
137
|
};
|
|
139
138
|
// This object has a specific spread order for documentation purposes
|
|
140
139
|
export const themeColors = {
|
|
141
|
-
light: Object.assign(Object.assign({ body: hslaGreys.grey8, bodyDimmed:
|
|
142
|
-
dark: Object.assign(Object.assign({ body: hslaGreys.grey1, bodyDimmed:
|
|
140
|
+
light: Object.assign(Object.assign({ body: hslaGreys.grey8, bodyDimmed: hslaGreys.grey6, background: hslaGreys.white, backgroundHover: alpha(hslaGreys.grey7, 0.1), backgroundActive: alpha(hslaGreys.grey7, 0.3), backgroundSecondary: alpha(hslaGreys.grey7, 0.04), backgroundSecondary2: { h: 45, s: 34, l: 78, a: 0.2 }, overlay: hslaGreys.white, border: alpha(hslaGreys.grey6, borderAlpha) }, themeSharedColors), { disabledBackground: hslaGreys.grey2, formFieldBorder: hslaGreys.grey3, formFieldBackground: hslaGreys.white, buttonBorder: alpha(hslaGreys.grey6, buttonBorderAlpha), upgrade: { h: 206, s: 100, l: 93, a: 1 }, upgradeHover: darken({ h: 206, s: 100, l: 93, a: 1 }, 9), upgradeActive: darken({ h: 206, s: 100, l: 93, a: 1 }, 17), tabBackground: alpha(hslaGreys.grey6, tabBackgroundAlpha), discoveryBackground: { h: 206, s: 100, l: 93, a: 1 }, discoveryLightBackground: { h: 206, s: 100, l: 97, a: 1 }, discoveryTitle: hslaGreys.grey8, discoveryHighlight: { h: 206, s: 100, l: 77, a: 0.3 } }),
|
|
141
|
+
dark: Object.assign(Object.assign({ body: hslaGreys.grey1, bodyDimmed: hslaGreys.grey5, background: hslaGreys.grey8, backgroundHover: alpha(hslaGreys.white, 0.1), backgroundActive: alpha(hslaGreys.white, 0.2), backgroundSecondary: alpha(hslaGreys.white, 0.04), backgroundSecondary2: { h: 45, s: 13, l: 44, a: 0.2 }, overlay: lighten(hslaGreys.grey8, 50), border: alpha(hslaGreys.grey4, borderAlpha) }, themeSharedColors), { disabledBackground: darken(hslaGreys.grey6, 50), formFieldBorder: hslaGreys.grey6, formFieldBackground: hslaGreys.grey8, buttonBorder: alpha(hslaGreys.white, buttonBorderAlpha), upgrade: { h: 206, s: 92, l: 81, a: 1 }, upgradeHover: darken({ h: 206, s: 92, l: 81, a: 1 }, 9), upgradeActive: darken({ h: 206, s: 92, l: 81, a: 1 }, 17), tabBackground: alpha(hslaGreys.white, tabBackgroundAlpha), discoveryBackground: { h: 206, s: 92, l: 81, a: 1 }, discoveryLightBackground: hslaGreys.grey8, discoveryTitle: hslaBaseColors.blue, discoveryHighlight: { h: 206, s: 100, l: 77, a: 0.3 } }),
|
|
143
142
|
};
|
|
144
143
|
export const hslaColors = Object.assign(Object.assign({}, hslaBaseColors), hslaGreys);
|
|
145
144
|
export const colorsNames = [
|
|
@@ -51,6 +51,12 @@ export const TooltipBox = (_a) => {
|
|
|
51
51
|
const TooltipChildren = styled.div `
|
|
52
52
|
display: ${props => (props.isInline ? 'inline-block' : 'block')};
|
|
53
53
|
${props => props.verticalAlign && `vertical-align: ${props.verticalAlign}`};
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
// Note: 0px solid transparent prevents focus rings from disappearing for -ms-high-contrast.
|
|
56
|
+
// TODO(LNS-183): Provide more robust polyfill/support for :focus for older versions of Safari, which don't support :focus-visible
|
|
57
|
+
outline: 0px solid transparent;
|
|
58
|
+
box-shadow: var(--lns-formFieldBorderShadowFocus);
|
|
59
|
+
}
|
|
54
60
|
`;
|
|
55
61
|
function getInitialDelaySpeed(delay) {
|
|
56
62
|
switch (delay) {
|
|
@@ -66,7 +72,7 @@ const Tooltip = (_a) => {
|
|
|
66
72
|
var { children, content, placement = 'topCenter', keepOpen, triggerOffset = 4, maxWidth = 26, isInline = true, isDisabled, container, tabIndex = 0, zIndex = 1100, verticalAlign = 'middle', delay = 'immediate' } = _a, rest = __rest(_a, ["children", "content", "placement", "keepOpen", "triggerOffset", "maxWidth", "isInline", "isDisabled", "container", "tabIndex", "zIndex", "verticalAlign", "delay"]);
|
|
67
73
|
const [show, hoverProps] = useHover({
|
|
68
74
|
delayEnter: getInitialDelaySpeed(delay),
|
|
69
|
-
delayLeave:
|
|
75
|
+
delayLeave: 200,
|
|
70
76
|
});
|
|
71
77
|
const [isOverTooltip, setIsOverTooltip] = useState(false);
|
|
72
78
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -82,7 +88,7 @@ const Tooltip = (_a) => {
|
|
|
82
88
|
setIsOpen(true);
|
|
83
89
|
}
|
|
84
90
|
// We have to watch this separately since hover and focus are managed separately. So, an element can be keyboard focused while another element is mouse hovered.
|
|
85
|
-
if (!show) {
|
|
91
|
+
if (!show && !keepTooltipOpenOnHover) {
|
|
86
92
|
setIsOpen(false);
|
|
87
93
|
}
|
|
88
94
|
}, [
|