@loomhq/lens 10.71.0 → 10.72.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/button/button.js +1 -1
- package/dist/components/color-picker/color-picker.js +1 -1
- package/dist/components/container/container.d.ts +2 -1
- package/dist/components/container/container.js +3 -2
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/link/link.js +8 -11
- package/dist/components/select/select.js +1 -1
- package/dist/components/tabs/tabs.js +22 -8
- package/dist/components/text-button/text-button.js +3 -2
- package/dist/components/text-input/text-input.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ResponsiveType } from '../../types';
|
|
3
3
|
declare const ContainerWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContainerWrapperProps, object>;
|
|
4
|
-
declare const Container: ({ children, backgroundColor, contentColor, borderColor, radius, borderSide, borderWidth, shadow, padding, paddingX, paddingY, paddingLeft, paddingRight, paddingTop, paddingBottom, margin, marginX, marginY, marginLeft, marginRight, marginTop, marginBottom, width, height, minWidth, minHeight, maxWidth, maxHeight, htmlTag, position, overflow, zIndex, top, bottom, left, right, ...props }: ContainerProps & React.ComponentProps<typeof ContainerWrapper>) => JSX.Element;
|
|
4
|
+
declare const Container: ({ children, backgroundColor, backgroundImage, contentColor, borderColor, radius, borderSide, borderWidth, shadow, padding, paddingX, paddingY, paddingLeft, paddingRight, paddingTop, paddingBottom, margin, marginX, marginY, marginLeft, marginRight, marginTop, marginBottom, width, height, minWidth, minHeight, maxWidth, maxHeight, htmlTag, position, overflow, zIndex, top, bottom, left, right, ...props }: ContainerProps & React.ComponentProps<typeof ContainerWrapper>) => JSX.Element;
|
|
5
5
|
export declare const availableBorderSides: string[];
|
|
6
6
|
export declare const availableRadii: string[];
|
|
7
7
|
export declare const availableHtmlTags: string[];
|
|
8
8
|
interface SharedProps {
|
|
9
9
|
backgroundColor?: string;
|
|
10
|
+
backgroundImage?: string;
|
|
10
11
|
contentColor?: string;
|
|
11
12
|
borderColor?: string;
|
|
12
13
|
radius?: 'medium' | 'large' | 'xlarge' | 'full';
|
|
@@ -28,6 +28,7 @@ const ContainerWrapper = styled.div `
|
|
|
28
28
|
${props => props.overflow && `overflow: ${props.overflow}`};
|
|
29
29
|
${props => props.backgroundColor &&
|
|
30
30
|
`background-color: ${getColorValue(props.backgroundColor)}`};
|
|
31
|
+
${props => props.backgroundImage && `background-image: ${props.backgroundImage}`}
|
|
31
32
|
${props => props.contentColor && `color: ${getColorValue(props.contentColor)}`};
|
|
32
33
|
${props => getBorderSideAndColor(props.borderSide, props.borderColor, props.borderWidth)};
|
|
33
34
|
${props => getRadius(props.radius)};
|
|
@@ -55,8 +56,8 @@ const ContainerWrapper = styled.div `
|
|
|
55
56
|
${props => props.zIndex && `z-index: ${props.zIndex}`};
|
|
56
57
|
`;
|
|
57
58
|
const Container = (_a) => {
|
|
58
|
-
var { children, backgroundColor, contentColor, borderColor, radius, borderSide, borderWidth = '1px', shadow, padding, paddingX, paddingY, paddingLeft, paddingRight, paddingTop, paddingBottom, margin, marginX, marginY, marginLeft, marginRight, marginTop, marginBottom, width, height, minWidth, minHeight, maxWidth, maxHeight, htmlTag = 'div', position, overflow, zIndex, top, bottom, left, right } = _a, props = __rest(_a, ["children", "backgroundColor", "contentColor", "borderColor", "radius", "borderSide", "borderWidth", "shadow", "padding", "paddingX", "paddingY", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "margin", "marginX", "marginY", "marginLeft", "marginRight", "marginTop", "marginBottom", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "htmlTag", "position", "overflow", "zIndex", "top", "bottom", "left", "right"]);
|
|
59
|
-
return (React.createElement(ContainerWrapper, Object.assign({ backgroundColor: backgroundColor, contentColor: contentColor, borderColor: borderColor, radius: radius, borderSide: borderSide, shadow: shadow, padding: padding, paddingLeft: paddingX || paddingLeft, paddingRight: paddingX || paddingRight, paddingTop: paddingY || paddingTop, paddingBottom: paddingY || paddingBottom, margin: margin, marginLeft: marginX || marginLeft, marginRight: marginX || marginRight, marginTop: marginY || marginTop, marginBottom: marginY || marginBottom, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight, as: htmlTag, position: position, top: top, bottom: bottom, left: left, right: right, overflow: overflow, zIndex: zIndex, borderWidth: borderWidth }, props), children));
|
|
59
|
+
var { children, backgroundColor, backgroundImage, contentColor, borderColor, radius, borderSide, borderWidth = '1px', shadow, padding, paddingX, paddingY, paddingLeft, paddingRight, paddingTop, paddingBottom, margin, marginX, marginY, marginLeft, marginRight, marginTop, marginBottom, width, height, minWidth, minHeight, maxWidth, maxHeight, htmlTag = 'div', position, overflow, zIndex, top, bottom, left, right } = _a, props = __rest(_a, ["children", "backgroundColor", "backgroundImage", "contentColor", "borderColor", "radius", "borderSide", "borderWidth", "shadow", "padding", "paddingX", "paddingY", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "margin", "marginX", "marginY", "marginLeft", "marginRight", "marginTop", "marginBottom", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "htmlTag", "position", "overflow", "zIndex", "top", "bottom", "left", "right"]);
|
|
60
|
+
return (React.createElement(ContainerWrapper, Object.assign({ backgroundColor: backgroundColor, backgroundImage: backgroundImage, contentColor: contentColor, borderColor: borderColor, radius: radius, borderSide: borderSide, shadow: shadow, padding: padding, paddingLeft: paddingX || paddingLeft, paddingRight: paddingX || paddingRight, paddingTop: paddingY || paddingTop, paddingBottom: paddingY || paddingBottom, margin: margin, marginLeft: marginX || marginLeft, marginRight: marginX || marginRight, marginTop: marginY || marginTop, marginBottom: marginY || marginBottom, width: width, height: height, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight, as: htmlTag, position: position, top: top, bottom: bottom, left: left, right: right, overflow: overflow, zIndex: zIndex, borderWidth: borderWidth }, props), children));
|
|
60
61
|
};
|
|
61
62
|
export const availableBorderSides = ['all', 'left', 'right', 'top', 'bottom'];
|
|
62
63
|
export const availableRadii = ['medium', 'large', 'xlarge', 'full'];
|
|
@@ -32,7 +32,7 @@ export const IconButtonBox = styled.button `
|
|
|
32
32
|
width: ${props => sizeStyles[props.size].size};
|
|
33
33
|
height: ${props => sizeStyles[props.size].size};
|
|
34
34
|
position: relative;
|
|
35
|
-
outline:
|
|
35
|
+
outline: 1px solid transparent;
|
|
36
36
|
transition: 0.6s background-color;
|
|
37
37
|
display: inline-flex;
|
|
38
38
|
justify-content: center;
|
|
@@ -43,24 +43,21 @@ const LinkWrapper = styled.a `
|
|
|
43
43
|
${props => !props.disabled && `color: ${variants[props.variant].color}`};
|
|
44
44
|
${props => (props.disabled ? statusStyles.disabled : statusStyles.enabled)};
|
|
45
45
|
${props => props.as === 'button' && buttonStyles.isButton};
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
border-radius: 0.28em;
|
|
47
|
+
box-shadow: 0 0 0 1px transparent;
|
|
48
|
+
text-decoration: underline;
|
|
49
|
+
text-underline-offset: 0.35em;
|
|
50
|
+
transition: 0.3s box-shadow;
|
|
51
|
+
&:focus,
|
|
52
|
+
&:focus-visible {
|
|
53
|
+
outline: 1px solid transparent;
|
|
48
54
|
}
|
|
49
55
|
&:focus-visible {
|
|
50
|
-
outline: none;
|
|
51
56
|
${getFocusRing()};
|
|
52
57
|
}
|
|
53
58
|
&::-moz-focus-inner {
|
|
54
59
|
border: 0;
|
|
55
60
|
}
|
|
56
|
-
@supports not (text-underline-offset: 0.35em) {
|
|
57
|
-
box-shadow: 0 1px 0 currentColor;
|
|
58
|
-
padding: 0 0 1px 0;
|
|
59
|
-
}
|
|
60
|
-
@supports (text-underline-offset: 0.35em) {
|
|
61
|
-
text-underline-offset: 0.35em;
|
|
62
|
-
text-decoration: underline;
|
|
63
|
-
}
|
|
64
61
|
`;
|
|
65
62
|
const Link = (_a) => {
|
|
66
63
|
var { children, href, variant = 'primary', htmlTag = 'a', isDisabled } = _a, props = __rest(_a, ["children", "href", "variant", "htmlTag", "isDisabled"]);
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { getColorValue, getFocusRing, getFontWeight, getSize, getSizeValue, u, } from '../../utilities';
|
|
12
|
+
import { getColorValue, getFocusRing, getFontWeight, getRadius, getSize, getSizeValue, u, } from '../../utilities';
|
|
13
13
|
import Container from '../container/container';
|
|
14
14
|
import Icon from '../icon/icon';
|
|
15
15
|
import React from 'react';
|
|
@@ -21,6 +21,8 @@ const Wrapper = styled.div `
|
|
|
21
21
|
`};
|
|
22
22
|
`;
|
|
23
23
|
const TabsNav = styled.nav `
|
|
24
|
+
--activeIndicatorHeight: 3px;
|
|
25
|
+
|
|
24
26
|
display: flex;
|
|
25
27
|
overflow: auto;
|
|
26
28
|
-ms-overflow-style: none;
|
|
@@ -49,27 +51,33 @@ const TabWrapper = styled.button `
|
|
|
49
51
|
appearance: none;
|
|
50
52
|
font: inherit;
|
|
51
53
|
background: transparent;
|
|
52
|
-
cursor: pointer;
|
|
53
54
|
border: none;
|
|
55
|
+
${getRadius('medium')};
|
|
56
|
+
cursor: pointer;
|
|
54
57
|
display: inline-flex;
|
|
55
58
|
align-items: center;
|
|
56
59
|
justify-content: center;
|
|
57
60
|
vertical-align: middle;
|
|
58
|
-
padding: 0 0
|
|
61
|
+
padding: 0 0 calc(var(--lns-space-small) + var(--activeIndicatorHeight)) 0;
|
|
62
|
+
position: relative;
|
|
59
63
|
color: inherit;
|
|
60
64
|
text-decoration: none;
|
|
61
65
|
flex-shrink: 0;
|
|
62
66
|
${getFontWeight('medium')};
|
|
63
67
|
transition: 0.6s color;
|
|
64
|
-
border-bottom: ${u(0.375)} solid transparent;
|
|
65
68
|
white-space: nowrap;
|
|
66
69
|
color: ${props => getColorValue(props.isActive ? 'body' : 'bodyDimmed')};
|
|
67
70
|
${props => props.isActive &&
|
|
68
71
|
`border-color: ${getColorValue('primary')};
|
|
69
72
|
`};
|
|
70
73
|
|
|
71
|
-
&:focus
|
|
72
|
-
|
|
74
|
+
&:focus,
|
|
75
|
+
&:focus-visible {
|
|
76
|
+
outline: 1px solid transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&:focus-visible {
|
|
80
|
+
${getFocusRing(undefined, 'inset')};
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
&:hover {
|
|
@@ -77,8 +85,14 @@ const TabWrapper = styled.button `
|
|
|
77
85
|
transition: 0.3s color;
|
|
78
86
|
}
|
|
79
87
|
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
&::after {
|
|
89
|
+
bottom: 0;
|
|
90
|
+
${getRadius('medium')};
|
|
91
|
+
content: '';
|
|
92
|
+
height: var(--activeIndicatorHeight);
|
|
93
|
+
position: absolute;
|
|
94
|
+
width: 100%;
|
|
95
|
+
${props => props.isActive && `background-color: ${getColorValue('primary')}`};
|
|
82
96
|
}
|
|
83
97
|
`;
|
|
84
98
|
export const Tab = (_a) => {
|
|
@@ -48,8 +48,9 @@ const TextButtonWrapper = styled.button `
|
|
|
48
48
|
${props => props.offsetSide &&
|
|
49
49
|
`margin-${props.offsetSide}: calc(-1 * ${sizeStyles[props.size].xSpace})`};
|
|
50
50
|
|
|
51
|
-
&:focus
|
|
52
|
-
|
|
51
|
+
&:focus,
|
|
52
|
+
&:focus-visible {
|
|
53
|
+
outline: 1px solid transparent;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
&:focus-visible {
|