@loomhq/lens 10.22.0 → 10.24.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/colors.js +1 -1
- package/dist/components/base-styles/base-styles.js +1 -1
- package/dist/components/button/button.d.ts +0 -1
- package/dist/components/button/button.js +5 -9
- package/dist/components/checkbox/checkbox.js +2 -2
- 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/power.d.ts +2 -0
- package/dist/components/icon/available-icons/power.js +5 -0
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/pill/pill.d.ts +0 -1
- package/dist/components/pill/pill.js +2 -3
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/tabs/tabs.js +3 -3
- package/dist/components/text-button/text-button.d.ts +0 -1
- package/dist/components/text-button/text-button.js +4 -5
- package/dist/components/text-input/text-input.js +12 -2
- package/package.json +3 -4
package/dist/colors.js
CHANGED
|
@@ -136,7 +136,7 @@ const themeSharedColors = {
|
|
|
136
136
|
// This object has a specific spread order for documentation purposes
|
|
137
137
|
export const themeColors = {
|
|
138
138
|
light: Object.assign(Object.assign({ body: hslaGreys.grey8, bodyDimmed: alpha(saturate(hslaGreys.grey8, 264), bodyDimmedAlpha), 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 } }),
|
|
139
|
-
dark: Object.assign(Object.assign({ body: hslaGreys.grey1, bodyDimmed: alpha(saturate(hslaGreys.grey1, 472), bodyDimmedAlpha), background: hslaGreys.grey8, backgroundHover: alpha(hslaGreys.white, 0.1), backgroundActive: alpha(
|
|
139
|
+
dark: Object.assign(Object.assign({ body: hslaGreys.grey1, bodyDimmed: alpha(saturate(hslaGreys.grey1, 472), bodyDimmedAlpha), 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 } }),
|
|
140
140
|
};
|
|
141
141
|
export const hslaColors = Object.assign(Object.assign({}, hslaBaseColors), hslaGreys);
|
|
142
142
|
export const colorsNames = [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Global, css } from '@emotion/core';
|
|
2
|
+
import { getAllCssVarsString, getThemeStylesString } from '../../css-variables';
|
|
2
3
|
import { getColorValue, getTextSize } from '../../utilities';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import { cssUtilities } from '../../css-utilities';
|
|
5
|
-
import { getAllCssVarsString, getThemeStylesString } from '../../css-variables';
|
|
6
6
|
const buildGlobalStylesheet = (rootElement = ':root', bodyElement = 'body') => {
|
|
7
7
|
return `
|
|
8
8
|
${rootElement} {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'focus-visible/dist/focus-visible';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
declare const ButtonWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ButtonWrapperProps, object>;
|
|
4
3
|
declare const Button: ({ size, children, variant, hasFullWidth, icon, iconPosition, logoSrc, hasLoader, isDisabled, htmlTag, ...props }: ButtonProps & React.ComponentProps<typeof ButtonWrapper>) => JSX.Element;
|
|
@@ -9,13 +9,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
13
|
-
import styled from '@emotion/styled';
|
|
14
|
-
import 'focus-visible/dist/focus-visible';
|
|
15
|
-
import React from 'react';
|
|
12
|
+
import { getColorValue, getFocusRing, getFontWeight, getRadius, getSize, getTextSize, u, } from '../../utilities';
|
|
16
13
|
import Icon from '../icon/icon';
|
|
17
14
|
import Loader from '../loader/loader';
|
|
18
|
-
import
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { css } from '@emotion/core';
|
|
17
|
+
import styled from '@emotion/styled';
|
|
19
18
|
const sizesStyles = {
|
|
20
19
|
small: {
|
|
21
20
|
height: u(4),
|
|
@@ -126,11 +125,8 @@ const ButtonWrapper = styled.button `
|
|
|
126
125
|
background-color: ${props => variantStyles[props.variant].active};
|
|
127
126
|
}
|
|
128
127
|
|
|
129
|
-
&:focus {
|
|
128
|
+
&:focus-visible {
|
|
130
129
|
outline: none;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&.focus-visible {
|
|
134
130
|
${getFocusRing()};
|
|
135
131
|
}
|
|
136
132
|
|
|
@@ -9,8 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { getFocusRing, u, getColorValue } from '../../utilities';
|
|
13
12
|
import React, { forwardRef, useEffect, useRef } from 'react';
|
|
13
|
+
import { getColorValue, getFocusRing, u } from '../../utilities';
|
|
14
14
|
import styled from '@emotion/styled';
|
|
15
15
|
const SvgCheckboxCheck = props => (React.createElement("svg", Object.assign({ width: 12, height: 9, viewBox: "0 0 12 9", fill: "none" }, props),
|
|
16
16
|
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.707.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-3-3a1 1 0 011.414-1.414L4 6.586 10.293.293a1 1 0 011.414 0z", fill: "currentColor" })));
|
|
@@ -50,7 +50,7 @@ const CheckboxInput = styled.input `
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
&:focus-visible ~ .CheckboxBox {
|
|
54
54
|
${getFocusRing()};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -209,3 +209,4 @@ export { default as SvgSplit } from "./split.js";
|
|
|
209
209
|
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
|
+
export { default as SvgPower } from "./power.js";
|
|
@@ -209,3 +209,4 @@ export { default as SvgSplit } from './split.js';
|
|
|
209
209
|
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
|
+
export { default as SvgPower } from './power.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
const SvgPower = props => (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none" }, props),
|
|
3
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.39868 6.49277C7.78927 6.88324 7.78937 7.5164 7.39891 7.90699C6.49008 8.81611 5.87123 9.97431 5.62059 11.2351C5.36996 12.4959 5.49881 13.8028 5.99084 14.9904C6.48287 16.178 7.31599 17.193 8.38487 17.9071C9.45374 18.6213 10.7104 19.0024 11.9959 19.0024C13.2813 19.0024 14.538 18.6213 15.6068 17.9071C16.6757 17.193 17.5088 16.178 18.0009 14.9904C18.4929 13.8028 18.6217 12.4959 18.3711 11.2351C18.1205 9.97431 17.5016 8.81611 16.5928 7.90699C16.2023 7.5164 16.2024 6.88324 16.593 6.49277C16.9836 6.10231 17.6168 6.10242 18.0072 6.49301C19.1957 7.68186 20.005 9.19642 20.3327 10.8452C20.6605 12.4939 20.492 14.2029 19.8486 15.7559C19.2051 17.3089 18.1157 18.6362 16.7179 19.5701C15.3202 20.504 13.6769 21.0024 11.9959 21.0024C10.3148 21.0024 8.67155 20.504 7.27379 19.5701C5.87604 18.6362 4.78657 17.3089 4.14314 15.7559C3.49972 14.2029 3.33123 12.4939 3.65898 10.8452C3.98672 9.19642 4.796 7.68186 5.98446 6.49301C6.37493 6.10242 7.00809 6.10231 7.39868 6.49277Z", fill: "currentColor" }),
|
|
4
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2.5C12.5523 2.5 13 2.94772 13 3.5H12H11C11 2.94772 11.4477 2.5 12 2.5ZM12 3.5H11V11.5C11 12.0523 11.4477 12.5 12 12.5C12.5523 12.5 13 12.0523 13 11.5V3.5H12Z", fill: "currentColor" })));
|
|
5
|
+
export default SvgPower;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'focus-visible/dist/focus-visible';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
declare const PillWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PillWrapperProps, object>;
|
|
4
3
|
declare const Pill: ({ color, backgroundColor, children, icon, iconPosition, ...props }: PillProps & React.ComponentProps<typeof PillWrapper>) => JSX.Element;
|
|
@@ -9,12 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import '
|
|
13
|
-
import
|
|
12
|
+
import { getColorValue, getFontWeight, getRadius, getSize, getTextSize, u, } from '../../utilities';
|
|
13
|
+
import Container from '../container/container';
|
|
14
14
|
import Icon from '../icon/icon';
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import styled from '@emotion/styled';
|
|
17
|
-
import Container from '../container/container';
|
|
18
17
|
const PillWrapper = styled.div `
|
|
19
18
|
display: inline-grid;
|
|
20
19
|
grid-auto-flow: column;
|
|
@@ -9,8 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { getFocusRing, u, getColorValue } from '../../utilities';
|
|
13
12
|
import React, { forwardRef } from 'react';
|
|
13
|
+
import { getColorValue, getFocusRing, u } from '../../utilities';
|
|
14
14
|
import styled from '@emotion/styled';
|
|
15
15
|
const RadioLabel = styled.label `
|
|
16
16
|
display: block;
|
|
@@ -55,7 +55,7 @@ const RadioInput = styled.input `
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
&:focus-visible ~ .RadioBox {
|
|
59
59
|
${getFocusRing()};
|
|
60
60
|
}
|
|
61
61
|
`;
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { getFocusRing, u
|
|
12
|
+
import { getColorValue, getFocusRing, u } from '../../utilities';
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import styled from '@emotion/styled';
|
|
15
15
|
const switchHeight = 2;
|
|
@@ -47,7 +47,7 @@ const SwitchInput = styled.input `
|
|
|
47
47
|
position: absolute;
|
|
48
48
|
opacity: 0;
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
&:focus-visible ~ .SwitchBox {
|
|
51
51
|
${getFocusRing()};
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -9,11 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { getFocusRing, getFontWeight, getSize, getSizeValue, u,
|
|
12
|
+
import { getColorValue, getFocusRing, getFontWeight, getSize, getSizeValue, u, } from '../../utilities';
|
|
13
|
+
import Container from '../container/container';
|
|
13
14
|
import Icon from '../icon/icon';
|
|
14
15
|
import React from 'react';
|
|
15
16
|
import styled from '@emotion/styled';
|
|
16
|
-
import Container from '../container/container';
|
|
17
17
|
const negativeScrollOffset = scrollOffset => `calc(-1 * ${getSizeValue(scrollOffset)})`;
|
|
18
18
|
const Wrapper = styled.div `
|
|
19
19
|
${props => props.scrollOffset &&
|
|
@@ -77,7 +77,7 @@ const TabWrapper = styled.button `
|
|
|
77
77
|
transition: 0.3s color;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
&:focus-visible {
|
|
81
81
|
${getFocusRing(undefined, 'inset')};
|
|
82
82
|
}
|
|
83
83
|
`;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import 'focus-visible/dist/focus-visible';
|
|
3
2
|
declare const TextButtonWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, TextButtonWrapperProps, object>;
|
|
4
3
|
declare const TextButton: ({ onClick, size, children, icon, iconPosition, isDisabled, htmlTag, offsetSide, ...props }: TextButtonProps & React.ComponentProps<typeof TextButtonWrapper>) => JSX.Element;
|
|
5
4
|
declare type TextButtonProps = {
|
|
@@ -9,12 +9,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
+
import { getColorValue, getFocusRing, getFontWeight, getRadius, getTextSize, u, } from '../../utilities';
|
|
13
|
+
import Container from '../container/container';
|
|
14
|
+
import Icon from '../icon/icon';
|
|
12
15
|
import React from 'react';
|
|
13
16
|
import styled from '@emotion/styled';
|
|
14
|
-
import { u, getTextSize, getRadius, getFontWeight, getFocusRing, getColorValue, } from '../../utilities';
|
|
15
|
-
import Icon from '../icon/icon';
|
|
16
|
-
import Container from '../container/container';
|
|
17
|
-
import 'focus-visible/dist/focus-visible';
|
|
18
17
|
const sizeStyles = {
|
|
19
18
|
small: {
|
|
20
19
|
textSize: 'small',
|
|
@@ -51,7 +50,7 @@ const TextButtonWrapper = styled.button `
|
|
|
51
50
|
outline: none;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
&:focus-visible {
|
|
55
54
|
${getFocusRing()};
|
|
56
55
|
}
|
|
57
56
|
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loomhq/lens",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.24.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "next",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"downshift": "^5.0.0",
|
|
26
|
-
"focus-visible": "^5.0.2",
|
|
27
26
|
"lodash": "^4.17.21",
|
|
28
27
|
"react-color": "^2.19.3",
|
|
29
28
|
"react-laag": "^2.0.3",
|
|
@@ -33,9 +32,9 @@
|
|
|
33
32
|
"peerDependencies": {
|
|
34
33
|
"@emotion/core": "^10.1.1",
|
|
35
34
|
"@emotion/styled": "^10.0.27",
|
|
35
|
+
"@types/react": "^17.0.3",
|
|
36
36
|
"react": "^16.12.0",
|
|
37
|
-
"react-dom": "^16.12.0"
|
|
38
|
-
"@types/react": "^17.0.3"
|
|
37
|
+
"react-dom": "^16.12.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@babel/cli": "^7.8.4",
|