@loomhq/lens 10.76.4 → 10.77.1
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/avatar/avatar.js +1 -1
- package/dist/components/icon/available-icons/index.d.ts +1 -0
- package/dist/components/icon/available-icons/index.js +1 -0
- package/dist/components/icon/available-icons/warning-alert.d.ts +2 -0
- package/dist/components/icon/available-icons/warning-alert.js +4 -0
- package/dist/components/text/text.d.ts +3 -2
- package/dist/components/text/text.js +15 -7
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/variables.d.ts +76 -70
- package/dist/variables.js +25 -3
- package/package.json +1 -1
|
@@ -45,7 +45,7 @@ const AvatarWrapper = styled.span `
|
|
|
45
45
|
align-items: center;
|
|
46
46
|
justify-content: center;
|
|
47
47
|
line-height: 1;
|
|
48
|
-
font-weight: var(--lns-fontWeight-
|
|
48
|
+
font-weight: var(--lns-fontWeight-bold);
|
|
49
49
|
${props => getAvatarSize(props.size)};
|
|
50
50
|
position: relative;
|
|
51
51
|
z-index: 0;
|
|
@@ -187,6 +187,7 @@ export { default as SvgVolumeMute } from "./volume-mute.js";
|
|
|
187
187
|
export { default as SvgVolumeOff } from "./volume-off.js";
|
|
188
188
|
export { default as SvgVolumeUp } from "./volume-up.js";
|
|
189
189
|
export { default as SvgVolumeX } from "./volume-x.js";
|
|
190
|
+
export { default as SvgWarningAlert } from "./warning-alert.js";
|
|
190
191
|
export { default as SvgWarningAmber } from "./warning-amber.js";
|
|
191
192
|
export { default as SvgXCircle } from "./x-circle.js";
|
|
192
193
|
export { default as SvgZap } from "./zap.js";
|
|
@@ -187,6 +187,7 @@ export { default as SvgVolumeMute } from './volume-mute.js';
|
|
|
187
187
|
export { default as SvgVolumeOff } from './volume-off.js';
|
|
188
188
|
export { default as SvgVolumeUp } from './volume-up.js';
|
|
189
189
|
export { default as SvgVolumeX } from './volume-x.js';
|
|
190
|
+
export { default as SvgWarningAlert } from './warning-alert.js';
|
|
190
191
|
export { default as SvgWarningAmber } from './warning-amber.js';
|
|
191
192
|
export { default as SvgXCircle } from './x-circle.js';
|
|
192
193
|
export { default as SvgZap } from './zap.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const SvgWarningAlert = props => (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none" }, props),
|
|
3
|
+
React.createElement("path", { fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd", d: "M7.42 2.293A1 1 0 0 1 8.127 2h7.245a1 1 0 0 1 .708.293l5.127 5.127a1 1 0 0 1 .293.707v7.245a1 1 0 0 1-.293.708l-5.127 5.127a1 1 0 0 1-.707.293H8.128a1 1 0 0 1-.708-.293L2.293 16.08A1 1 0 0 1 2 15.373V8.128a1 1 0 0 1 .293-.708L7.42 2.293ZM8.542 4 4 8.542v6.416L8.542 19.5h6.416l4.542-4.542V8.542L14.958 4H8.542Zm2.208 11.25a1 1 0 0 1 1-1h.009a1 1 0 1 1 0 2h-.009a1 1 0 0 1-1-1Zm2-7a1 1 0 1 0-2 0v3.5a1 1 0 1 0 2 0v-3.5Z" })));
|
|
4
|
+
export default SvgWarningAlert;
|
|
@@ -11,12 +11,13 @@ 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
12
|
declare const Text: ({ children, size, color, isInline, isDimmed, fontWeight, hasEllipsis, ellipsisLines, variant, htmlTag, alignment, sizeMinMax, ...props }: TextProps & React.ComponentProps<typeof TextWrapper>) => JSX.Element;
|
|
13
13
|
export declare const availableSizes: string[];
|
|
14
|
+
export declare const deprecatedSizes: string[];
|
|
14
15
|
export declare const availableFontWeights: string[];
|
|
15
16
|
export declare const availableHtmlTags: string[];
|
|
16
17
|
export declare const alignments: string[];
|
|
17
18
|
interface TextProps {
|
|
18
|
-
size?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
19
|
-
fontWeight?: '
|
|
19
|
+
size?: 'body-sm' | 'body-md' | 'body-lg' | 'heading-sm' | 'heading-md' | 'heading-lg' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge';
|
|
20
|
+
fontWeight?: 'book' | 'bold';
|
|
20
21
|
variant?: 'body' | 'title' | 'mainTitle';
|
|
21
22
|
alignment?: 'left' | 'right' | 'center';
|
|
22
23
|
color?: string;
|
|
@@ -17,16 +17,16 @@ import { textIsDimmedDeprecated } from '../../console-messages';
|
|
|
17
17
|
export const dimAmount = 0.6;
|
|
18
18
|
export const variants = {
|
|
19
19
|
body: {
|
|
20
|
-
size: '
|
|
21
|
-
fontWeight: '
|
|
20
|
+
size: 'body-md',
|
|
21
|
+
fontWeight: 'book',
|
|
22
22
|
},
|
|
23
23
|
title: {
|
|
24
|
-
size: '
|
|
24
|
+
size: 'body-lg',
|
|
25
25
|
fontWeight: 'bold',
|
|
26
26
|
},
|
|
27
27
|
mainTitle: {
|
|
28
|
-
size: '
|
|
29
|
-
fontWeight: '
|
|
28
|
+
size: 'heading-md',
|
|
29
|
+
fontWeight: 'bold',
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
const getTextPxSize = size => textSizes[size].fontSize * unit;
|
|
@@ -77,13 +77,21 @@ const TextWrapper = styled.span `
|
|
|
77
77
|
`}
|
|
78
78
|
`;
|
|
79
79
|
const Text = (_a) => {
|
|
80
|
-
var { children, size = '
|
|
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"]);
|
|
81
81
|
if (isDimmed) {
|
|
82
82
|
console.warn(textIsDimmedDeprecated);
|
|
83
83
|
}
|
|
84
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));
|
|
85
85
|
};
|
|
86
86
|
export const availableSizes = [
|
|
87
|
+
'body-sm',
|
|
88
|
+
'body-md',
|
|
89
|
+
'body-lg',
|
|
90
|
+
'heading-sm',
|
|
91
|
+
'heading-md',
|
|
92
|
+
'heading-lg',
|
|
93
|
+
];
|
|
94
|
+
export const deprecatedSizes = [
|
|
87
95
|
'small',
|
|
88
96
|
'medium',
|
|
89
97
|
'large',
|
|
@@ -91,7 +99,7 @@ export const availableSizes = [
|
|
|
91
99
|
'xxlarge',
|
|
92
100
|
'xxxlarge',
|
|
93
101
|
];
|
|
94
|
-
export const availableFontWeights = ['
|
|
102
|
+
export const availableFontWeights = ['book', 'bold'];
|
|
95
103
|
export const availableHtmlTags = ['h1', 'h2', 'h3', 'h4', 'p', 'span', 'div'];
|
|
96
104
|
export const alignments = ['left', 'right', 'center'];
|
|
97
105
|
export default Text;
|
|
@@ -149,7 +149,7 @@ const Tooltip = (_a) => {
|
|
|
149
149
|
renderLayer(React.createElement("div", Object.assign({}, layerProps, { style: Object.assign(Object.assign({}, layerProps.style), { zIndex }) }),
|
|
150
150
|
React.createElement(TooltipBox, Object.assign({ maxWidth: maxWidth, onMouseEnter: () => setIsOverTooltip(true), onMouseLeave: () => setIsOverTooltip(false) }, rest),
|
|
151
151
|
React.createElement(Arrange, { gap: "small" },
|
|
152
|
-
React.createElement(Text, { size: "small", fontWeight: "
|
|
152
|
+
React.createElement(Text, { size: "small", fontWeight: "bold" }, content),
|
|
153
153
|
shortcut && (React.createElement(Arrange, { gap: "xsmall" }, shortcut.map((char, index) => (React.createElement(ShortcutBox, { key: index }, char)))))))))));
|
|
154
154
|
};
|
|
155
155
|
export const availablePlacements = Object.keys(placements);
|
package/dist/variables.d.ts
CHANGED
|
@@ -1,84 +1,90 @@
|
|
|
1
1
|
export const unit: 8;
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
2
|
+
export const textSizes: {
|
|
3
|
+
small: {
|
|
4
|
+
fontSize: number;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
};
|
|
7
|
+
'body-sm': {
|
|
8
|
+
fontSize: number;
|
|
9
|
+
lineHeight: number;
|
|
10
|
+
};
|
|
11
|
+
medium: {
|
|
12
|
+
fontSize: number;
|
|
13
|
+
lineHeight: number;
|
|
14
|
+
};
|
|
15
|
+
'body-md': {
|
|
16
|
+
fontSize: number;
|
|
17
|
+
lineHeight: number;
|
|
18
|
+
};
|
|
19
|
+
large: {
|
|
20
|
+
fontSize: number;
|
|
21
|
+
lineHeight: number;
|
|
22
|
+
};
|
|
23
|
+
'body-lg': {
|
|
24
|
+
fontSize: number;
|
|
25
|
+
lineHeight: number;
|
|
26
|
+
};
|
|
27
|
+
xlarge: {
|
|
28
|
+
fontSize: number;
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
};
|
|
31
|
+
'heading-sm': {
|
|
32
|
+
fontSize: number;
|
|
33
|
+
lineHeight: number;
|
|
34
|
+
};
|
|
35
|
+
xxlarge: {
|
|
36
|
+
fontSize: number;
|
|
37
|
+
lineHeight: number;
|
|
38
|
+
};
|
|
39
|
+
'heading-md': {
|
|
40
|
+
fontSize: number;
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
};
|
|
43
|
+
xxxlarge: {
|
|
44
|
+
fontSize: number;
|
|
45
|
+
lineHeight: number;
|
|
46
|
+
};
|
|
47
|
+
'heading-lg': {
|
|
48
|
+
fontSize: number;
|
|
49
|
+
lineHeight: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
38
52
|
export namespace fontWeights {
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
export { medium_1 as medium };
|
|
42
|
-
export const bold: number;
|
|
43
|
-
export const black: number;
|
|
53
|
+
const book: number;
|
|
54
|
+
const bold: number;
|
|
44
55
|
}
|
|
45
56
|
export namespace radii {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
const xlarge_1: string;
|
|
51
|
-
export { xlarge_1 as xlarge };
|
|
52
|
-
export const full: string;
|
|
57
|
+
const medium: string;
|
|
58
|
+
const large: string;
|
|
59
|
+
const xlarge: string;
|
|
60
|
+
const full: string;
|
|
53
61
|
}
|
|
54
62
|
export namespace shadows {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export { large_2 as large };
|
|
63
|
+
export const small: string;
|
|
64
|
+
const medium_1: string;
|
|
65
|
+
export { medium_1 as medium };
|
|
66
|
+
const large_1: string;
|
|
67
|
+
export { large_1 as large };
|
|
61
68
|
}
|
|
62
69
|
export namespace spaces {
|
|
63
70
|
export const xsmall: number;
|
|
64
|
-
const
|
|
65
|
-
export {
|
|
66
|
-
const
|
|
67
|
-
export {
|
|
68
|
-
const
|
|
69
|
-
export {
|
|
70
|
-
const
|
|
71
|
-
export {
|
|
72
|
-
const
|
|
73
|
-
export { xxlarge_1 as xxlarge };
|
|
71
|
+
const small_1: number;
|
|
72
|
+
export { small_1 as small };
|
|
73
|
+
const medium_2: number;
|
|
74
|
+
export { medium_2 as medium };
|
|
75
|
+
const large_2: number;
|
|
76
|
+
export { large_2 as large };
|
|
77
|
+
const xlarge_1: number;
|
|
78
|
+
export { xlarge_1 as xlarge };
|
|
79
|
+
export const xxlarge: number;
|
|
74
80
|
}
|
|
75
81
|
export namespace breakpoints {
|
|
76
82
|
const xsmall_1: string;
|
|
77
83
|
export { xsmall_1 as xsmall };
|
|
78
|
-
const
|
|
79
|
-
export {
|
|
80
|
-
const
|
|
81
|
-
export {
|
|
82
|
-
const
|
|
83
|
-
export {
|
|
84
|
+
const small_2: string;
|
|
85
|
+
export { small_2 as small };
|
|
86
|
+
const medium_3: string;
|
|
87
|
+
export { medium_3 as medium };
|
|
88
|
+
const large_3: string;
|
|
89
|
+
export { large_3 as large };
|
|
84
90
|
}
|
package/dist/variables.js
CHANGED
|
@@ -5,32 +5,54 @@ export const textSizes = {
|
|
|
5
5
|
fontSize: 1.5,
|
|
6
6
|
lineHeight: 1.5,
|
|
7
7
|
},
|
|
8
|
+
'body-sm': {
|
|
9
|
+
fontSize: 1.5,
|
|
10
|
+
lineHeight: 1.5,
|
|
11
|
+
},
|
|
8
12
|
medium: {
|
|
9
13
|
fontSize: 1.75,
|
|
10
14
|
lineHeight: 1.6,
|
|
11
15
|
},
|
|
16
|
+
'body-md': {
|
|
17
|
+
fontSize: 1.75,
|
|
18
|
+
lineHeight: 1.6,
|
|
19
|
+
},
|
|
12
20
|
large: {
|
|
13
21
|
fontSize: 2.25,
|
|
14
22
|
lineHeight: 1.45,
|
|
15
23
|
},
|
|
24
|
+
'body-lg': {
|
|
25
|
+
fontSize: 2.25,
|
|
26
|
+
lineHeight: 1.45,
|
|
27
|
+
},
|
|
16
28
|
xlarge: {
|
|
17
29
|
fontSize: 3,
|
|
18
30
|
lineHeight: 1.35,
|
|
19
31
|
},
|
|
32
|
+
'heading-sm': {
|
|
33
|
+
fontSize: 3,
|
|
34
|
+
lineHeight: 1.35,
|
|
35
|
+
},
|
|
20
36
|
xxlarge: {
|
|
21
37
|
fontSize: 4,
|
|
22
38
|
lineHeight: 1.2,
|
|
23
39
|
},
|
|
40
|
+
'heading-md': {
|
|
41
|
+
fontSize: 4,
|
|
42
|
+
lineHeight: 1.2,
|
|
43
|
+
},
|
|
24
44
|
xxxlarge: {
|
|
25
45
|
fontSize: 6,
|
|
26
46
|
lineHeight: 1.15,
|
|
27
47
|
},
|
|
48
|
+
'heading-lg': {
|
|
49
|
+
fontSize: 6,
|
|
50
|
+
lineHeight: 1.15,
|
|
51
|
+
},
|
|
28
52
|
};
|
|
29
53
|
export const fontWeights = {
|
|
30
|
-
|
|
31
|
-
medium: 500,
|
|
54
|
+
book: 400,
|
|
32
55
|
bold: 700,
|
|
33
|
-
black: 900,
|
|
34
56
|
};
|
|
35
57
|
export const radii = {
|
|
36
58
|
medium: u(1),
|