@loomhq/lens 10.91.0 → 10.93.0
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/components/icon/available-icons/index.d.ts +0 -1
- package/dist/components/icon/available-icons/index.js +0 -1
- package/dist/components/text/text.d.ts +2 -1
- package/dist/components/text/text.js +5 -3
- package/dist/components/tooltip/tooltip.js +3 -2
- package/package.json +1 -1
- package/dist/components/icon/available-icons/rotate-ccw.d.ts +0 -2
- package/dist/components/icon/available-icons/rotate-ccw.js +0 -6
|
@@ -146,7 +146,6 @@ export { default as SvgRemoveRedEye } from "./remove-red-eye.js";
|
|
|
146
146
|
export { default as SvgReply } from "./reply.js";
|
|
147
147
|
export { default as SvgReplyLeft } from "./reply-left.js";
|
|
148
148
|
export { default as SvgReplyRight } from "./reply-right.js";
|
|
149
|
-
export { default as SvgRotateCcw } from "./rotate-ccw.js";
|
|
150
149
|
export { default as SvgRotateLeft } from "./rotate-left.js";
|
|
151
150
|
export { default as SvgSafariLogo } from "./safari-logo.js";
|
|
152
151
|
export { default as SvgScissors } from "./scissors.js";
|
|
@@ -146,7 +146,6 @@ export { default as SvgRemoveRedEye } from './remove-red-eye.js';
|
|
|
146
146
|
export { default as SvgReply } from './reply.js';
|
|
147
147
|
export { default as SvgReplyLeft } from './reply-left.js';
|
|
148
148
|
export { default as SvgReplyRight } from './reply-right.js';
|
|
149
|
-
export { default as SvgRotateCcw } from './rotate-ccw.js';
|
|
150
149
|
export { default as SvgRotateLeft } from './rotate-left.js';
|
|
151
150
|
export { default as SvgSafariLogo } from './safari-logo.js';
|
|
152
151
|
export { default as SvgScissors } from './scissors.js';
|
|
@@ -9,7 +9,7 @@ declare type VariantsProps = {
|
|
|
9
9
|
export declare const variants: VariantsProps;
|
|
10
10
|
export declare const lineHeightToPx: (size: any) => number;
|
|
11
11
|
declare const TextWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, TextWrapperProps, object>;
|
|
12
|
-
declare const Text: ({ children, size, color, isInline, isDimmed, fontWeight, hasEllipsis, ellipsisLines, variant, htmlTag, alignment, sizeMinMax, ...props }: TextProps & React.ComponentProps<typeof TextWrapper>) => JSX.Element;
|
|
12
|
+
declare const Text: ({ children, size, color, isInline, isDimmed, fontWeight, hasEllipsis, ellipsisLines, noWrap, variant, htmlTag, alignment, sizeMinMax, ...props }: TextProps & React.ComponentProps<typeof TextWrapper>) => JSX.Element;
|
|
13
13
|
export declare const availableSizes: string[];
|
|
14
14
|
export declare const deprecatedSizes: string[];
|
|
15
15
|
export declare const availableFontWeights: string[];
|
|
@@ -24,6 +24,7 @@ interface TextProps {
|
|
|
24
24
|
isInline?: boolean;
|
|
25
25
|
isDimmed?: boolean;
|
|
26
26
|
hasEllipsis?: boolean;
|
|
27
|
+
noWrap?: boolean;
|
|
27
28
|
ellipsisLines?: number;
|
|
28
29
|
htmlTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'span' | 'div';
|
|
29
30
|
children?: React.ReactNode;
|
|
@@ -59,7 +59,9 @@ const TextWrapper = styled.span `
|
|
|
59
59
|
-webkit-box-orient: vertical;
|
|
60
60
|
-webkit-line-clamp: ${props.ellipsisLines};
|
|
61
61
|
`};
|
|
62
|
-
|
|
62
|
+
${props => !props.hasEllipsis &&
|
|
63
|
+
props.noWrap &&
|
|
64
|
+
'white-space: nowrap; overflow: hidden;'};
|
|
63
65
|
${props => props.sizeMinMax &&
|
|
64
66
|
`
|
|
65
67
|
min-height: 0vw;
|
|
@@ -77,11 +79,11 @@ const TextWrapper = styled.span `
|
|
|
77
79
|
`}
|
|
78
80
|
`;
|
|
79
81
|
const Text = (_a) => {
|
|
80
|
-
var { children, size = 'body-md', color, isInline, isDimmed, fontWeight = 'book', hasEllipsis, ellipsisLines, variant, htmlTag = 'span', alignment, sizeMinMax } = _a, props = __rest(_a, ["children", "size", "color", "isInline", "isDimmed", "fontWeight", "hasEllipsis", "ellipsisLines", "variant", "htmlTag", "alignment", "sizeMinMax"]);
|
|
82
|
+
var { children, size = 'body-md', color, isInline, isDimmed, fontWeight = 'book', hasEllipsis, ellipsisLines, noWrap, variant, htmlTag = 'span', alignment, sizeMinMax } = _a, props = __rest(_a, ["children", "size", "color", "isInline", "isDimmed", "fontWeight", "hasEllipsis", "ellipsisLines", "noWrap", "variant", "htmlTag", "alignment", "sizeMinMax"]);
|
|
81
83
|
if (isDimmed) {
|
|
82
84
|
console.warn(textIsDimmedDeprecated);
|
|
83
85
|
}
|
|
84
|
-
return (React.createElement(TextWrapper, Object.assign({ size: variant ? variants[variant].size : size, color: color, isInline: isInline, isDimmed: isDimmed, fontWeight: variant ? variants[variant].fontWeight : fontWeight, hasEllipsis: hasEllipsis, ellipsisLines: ellipsisLines, variant: variant, as: htmlTag, alignment: alignment, sizeMinMax: sizeMinMax }, props), children));
|
|
86
|
+
return (React.createElement(TextWrapper, Object.assign({ size: variant ? variants[variant].size : size, color: color, isInline: isInline, isDimmed: isDimmed, fontWeight: variant ? variants[variant].fontWeight : fontWeight, hasEllipsis: hasEllipsis, ellipsisLines: ellipsisLines, noWrap: noWrap, variant: variant, as: htmlTag, alignment: alignment, sizeMinMax: sizeMinMax }, props), children));
|
|
85
87
|
};
|
|
86
88
|
export const availableSizes = [
|
|
87
89
|
'body-sm',
|
|
@@ -90,12 +90,13 @@ const Tooltip = (_a) => {
|
|
|
90
90
|
const [isOpen, setIsOpen] = useState(false);
|
|
91
91
|
const focusRef = useRef();
|
|
92
92
|
const isTooltipDisabled = !content || isDisabled;
|
|
93
|
-
//
|
|
93
|
+
// Hide the tooltip as soon as isDisabled becomes true, and show it if a user has focused or hovered on it AND it is not disabled
|
|
94
94
|
useEffect(() => {
|
|
95
|
-
const keepTooltipOpenOnHover = isOverTooltip && keepOpen;
|
|
96
95
|
if (isTooltipDisabled) {
|
|
96
|
+
setIsOpen(false);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
+
const keepTooltipOpenOnHover = isOverTooltip && keepOpen;
|
|
99
100
|
if (show || keepTooltipOpenOnHover) {
|
|
100
101
|
setIsOpen(true);
|
|
101
102
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
function SvgRotateCcw(props) {
|
|
3
|
-
return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none" }, props),
|
|
4
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.657 4.08a8.2 8.2 0 11-6.592 10.846 1 1 0 011.886-.665 6.2 6.2 0 101.446-6.428l-1.872 1.76H8.8a1 1 0 010 2H4a1 1 0 01-1-1v-4.8a1 1 0 112 0V8.28l2.017-1.895a8.2 8.2 0 014.64-2.306z", fill: "currentColor" })));
|
|
5
|
-
}
|
|
6
|
-
export default SvgRotateCcw;
|