@loomhq/lens 10.23.1 → 10.26.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 +1 -0
- package/dist/components/icon/available-icons/index.js +1 -0
- package/dist/components/icon/available-icons/replay.d.ts +2 -0
- package/dist/components/icon/available-icons/replay.js +4 -0
- package/dist/components/icon-button/icon-button.d.ts +3 -1
- package/dist/components/icon-button/icon-button.js +4 -4
- package/dist/components/split/split.js +2 -2
- package/dist/components/text-input/text-input.js +12 -2
- package/dist/utilities/responsive.js +2 -2
- package/package.json +1 -1
|
@@ -210,3 +210,4 @@ export { default as SvgRepeat } from "./repeat.js";
|
|
|
210
210
|
export { default as PictureInPicture } from "./picture-in-picture.js";
|
|
211
211
|
export { default as FolderPlus } from "./folder-plus.js";
|
|
212
212
|
export { default as SvgPower } from "./power.js";
|
|
213
|
+
export { default as SvgReplay } from "./replay.js";
|
|
@@ -210,3 +210,4 @@ export { default as SvgRepeat } from './repeat.js';
|
|
|
210
210
|
export { default as PictureInPicture } from './picture-in-picture.js';
|
|
211
211
|
export { default as FolderPlus } from './folder-plus.js';
|
|
212
212
|
export { default as SvgPower } from './power.js';
|
|
213
|
+
export { default as SvgReplay } from './replay.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const SvgReplay = props => (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none" }, props),
|
|
3
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.78306 0.566915C7.31653 0.709856 7.63311 1.25819 7.49017 1.79166L6.7049 4.72234C8.49852 3.41365 10.6667 2.85091 12.7825 3.03412C13.6117 3.10538 14.4088 3.28907 15.1584 3.56987C16.328 4.00704 17.4249 4.69588 18.3654 5.63641C19.2011 6.47209 19.8381 7.43123 20.2764 8.45511C20.7432 9.54315 21.0017 10.7418 21.0017 12.0007C21.0017 13.3939 20.6851 14.7132 20.12 15.8906C19.818 16.5208 19.4384 17.1231 18.9812 17.6833C18.5894 18.1639 18.1489 18.6034 17.6673 18.994C17.1314 19.4292 16.5572 19.7936 15.9571 20.0872C14.7632 20.6723 13.4208 21.0007 12.0017 21.0007C10.6825 21.0007 9.42964 20.7169 8.30077 20.207C7.44004 19.8191 6.62781 19.2888 5.89965 18.6163C4.11775 16.9719 3.00171 14.6166 3.00171 12.0007C3.00171 11.4484 3.44942 11.0007 4.00171 11.0007C4.55399 11.0007 5.00171 11.4484 5.00171 12.0007C5.00171 13.9336 5.78509 15.6835 7.05166 16.9502C7.1301 17.0287 7.21 17.1048 7.29116 17.1787C7.81679 17.6572 8.41556 18.0567 9.06872 18.3585C11.0182 19.2575 13.296 19.2122 15.2124 18.2226C15.5894 18.0277 15.9463 17.7995 16.2795 17.542C16.5127 17.3614 16.7372 17.1642 16.9512 16.9501C17.1573 16.744 17.3479 16.5282 17.523 16.3042C17.8046 15.9434 18.0516 15.5543 18.2591 15.1418C19.1888 13.2906 19.2453 11.113 18.4285 9.22207C17.6657 7.46001 16.1994 6.07343 14.3837 5.41645C13.8441 5.2216 13.2853 5.09519 12.7208 5.03721C12.4844 5.01308 12.2445 5.00072 12.0017 5.00072C11.9934 5.00072 11.985 5.00062 11.9767 5.00042C10.378 5.00603 8.78084 5.55593 7.48702 6.65011L10.8091 7.54027C11.3426 7.68321 11.6592 8.23155 11.5162 8.76501C11.3733 9.29848 10.825 9.61506 10.2915 9.47212L4.79178 7.99848C4.25832 7.85554 3.94174 7.3072 4.08468 6.77373L5.55832 1.27402C5.70126 0.740555 6.2496 0.423973 6.78306 0.566915ZM6.27535 6.32544L6.28616 6.28507L6.34527 6.34418L6.27535 6.32544Z", fill: "currentColor" })));
|
|
4
|
+
export default SvgReplay;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const IconButtonBox: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, IconButtonBoxProps, object>;
|
|
3
|
-
declare const IconButton: ({ altText, icon, onClick, iconColor, isDisabled, size, ...props }: IconButtonProps & React.ComponentProps<typeof IconButtonBox>) => JSX.Element;
|
|
3
|
+
declare const IconButton: ({ altText, icon, onClick, iconColor, isActive, isDisabled, size, ...props }: IconButtonProps & React.ComponentProps<typeof IconButtonBox>) => JSX.Element;
|
|
4
4
|
declare type IconButtonProps = {
|
|
5
5
|
altText: string;
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
onClick?: React.ReactEventHandler;
|
|
8
8
|
iconColor?: string;
|
|
9
|
+
isActive?: boolean;
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
size?: 'small' | 'medium';
|
|
11
12
|
};
|
|
12
13
|
declare type IconButtonBoxProps = {
|
|
13
14
|
size?: 'small' | 'medium';
|
|
15
|
+
isActive?: boolean;
|
|
14
16
|
};
|
|
15
17
|
export default IconButton;
|
|
@@ -24,7 +24,7 @@ const sizeStyles = {
|
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
export const IconButtonBox = styled.button `
|
|
27
|
-
background-color: transparent;
|
|
27
|
+
background-color: ${props => props.isActive ? getColorValue('backgroundActive') : 'transparent'};
|
|
28
28
|
border: none;
|
|
29
29
|
appearance: none;
|
|
30
30
|
cursor: pointer;
|
|
@@ -42,7 +42,7 @@ export const IconButtonBox = styled.button `
|
|
|
42
42
|
|
|
43
43
|
&:hover {
|
|
44
44
|
transition: 0.3s background-color;
|
|
45
|
-
background-color: ${getColorValue('backgroundHover')};
|
|
45
|
+
background-color: ${props => getColorValue(props.isActive ? 'backgroundActive' : 'backgroundHover')};
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&:active {
|
|
@@ -74,8 +74,8 @@ export const IconButtonBox = styled.button `
|
|
|
74
74
|
}
|
|
75
75
|
`;
|
|
76
76
|
const IconButton = (_a) => {
|
|
77
|
-
var { altText, icon, onClick, iconColor = 'body', isDisabled, size = 'medium' } = _a, props = __rest(_a, ["altText", "icon", "onClick", "iconColor", "isDisabled", "size"]);
|
|
78
|
-
return (React.createElement(IconButtonBox, Object.assign({ "aria-label": altText, onClick: onClick, disabled: isDisabled, size: size }, props),
|
|
77
|
+
var { altText, icon, onClick, iconColor = 'body', isActive, isDisabled, size = 'medium' } = _a, props = __rest(_a, ["altText", "icon", "onClick", "iconColor", "isActive", "isDisabled", "size"]);
|
|
78
|
+
return (React.createElement(IconButtonBox, Object.assign({ "aria-label": altText, onClick: onClick, isActive: isActive, disabled: isDisabled, size: size }, props),
|
|
79
79
|
React.createElement(Icon, { icon: icon, size: sizeStyles[size].iconSize, color: isDisabled ? 'disabledContent' : iconColor })));
|
|
80
80
|
};
|
|
81
81
|
export default IconButton;
|
|
@@ -37,8 +37,8 @@ const SplitWrapper = styled.div `
|
|
|
37
37
|
${props => getSizeStyles(props)};
|
|
38
38
|
`;
|
|
39
39
|
const SplitSectionWrapper = styled.div `
|
|
40
|
-
${props =>
|
|
41
|
-
${props =>
|
|
40
|
+
${props => getResponsiveNumber('flex-grow', props.grow)};
|
|
41
|
+
${props => getResponsiveNumber('flex-shrink', props.shrink)};
|
|
42
42
|
${props => props.basis && getSize('flex-basis', props.basis)};
|
|
43
43
|
margin-right: var(--gap);
|
|
44
44
|
margin-bottom: var(--gap);
|
|
@@ -9,10 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import Icon from '../icon/icon';
|
|
13
12
|
import React, { forwardRef } from 'react';
|
|
13
|
+
import { getColorValue, getTextSize, u } from '../../utilities';
|
|
14
|
+
import Icon from '../icon/icon';
|
|
14
15
|
import styled from '@emotion/styled';
|
|
15
|
-
import { u, getColorValue, getTextSize } from '../../utilities';
|
|
16
16
|
const sizesStyles = {
|
|
17
17
|
small: {
|
|
18
18
|
height: u(4),
|
|
@@ -51,6 +51,12 @@ const InputField = styled.input `
|
|
|
51
51
|
|
|
52
52
|
${props => getTextSize(sizesStyles[props.inputSize].textSize)};
|
|
53
53
|
|
|
54
|
+
&::-webkit-search-decoration,
|
|
55
|
+
&::-webkit-search-results-button,
|
|
56
|
+
&::-webkit-search-results-decoration {
|
|
57
|
+
-webkit-appearance: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
&:hover {
|
|
55
61
|
box-shadow: inset 0 0 0 var(--lns-formFieldBorderWidthFocus)
|
|
56
62
|
var(--lns-color-blurple);
|
|
@@ -97,12 +103,16 @@ const TextInput = forwardRef((_a, ref) => {
|
|
|
97
103
|
inputField)) : (inputField);
|
|
98
104
|
});
|
|
99
105
|
export const availableTypes = [
|
|
106
|
+
'datetime-local',
|
|
100
107
|
'email',
|
|
108
|
+
'month',
|
|
101
109
|
'number',
|
|
102
110
|
'password',
|
|
103
111
|
'search',
|
|
104
112
|
'tel',
|
|
105
113
|
'text',
|
|
114
|
+
'time',
|
|
106
115
|
'url',
|
|
116
|
+
'week',
|
|
107
117
|
];
|
|
108
118
|
export default TextInput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import useMedia from '../hooks/use-media';
|
|
2
1
|
import { breakpoints } from '../variables';
|
|
3
2
|
import { getSizeValue } from './size';
|
|
3
|
+
import useMedia from '../hooks/use-media';
|
|
4
4
|
export const getMediaCss = (widthType, breakpoint, declaration) => `@media(${widthType}: ${breakpoint}){${declaration}}`;
|
|
5
5
|
export const arrayToBreakpoints = values => {
|
|
6
6
|
const smallestBreakpoint = Object.values(breakpoints)[0];
|
|
@@ -56,7 +56,7 @@ export const getResponsiveBoolean = (property, valueArray, booleanValue) => {
|
|
|
56
56
|
return `${property}: ${valueArray[0]};`;
|
|
57
57
|
};
|
|
58
58
|
export const getResponsiveNumber = (property, number) => {
|
|
59
|
-
if (number) {
|
|
59
|
+
if (number || number === 0) {
|
|
60
60
|
if (Array.isArray(number)) {
|
|
61
61
|
const rulesetsArray = number.map(numberItem => {
|
|
62
62
|
return `${property}: ${numberItem}`;
|