@loomhq/lens 10.21.0 → 10.23.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/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(darken(hslaGreys.grey6, 100), 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 } }),
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 { css } from '@emotion/core';
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 { getFocusRing, getFontWeight, getRadius, getTextSize, u, getColorValue, getSize, } from '../../utilities';
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
- &.focus-visible ~ .CheckboxBox {
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,2 @@
1
+ export default SvgPower;
2
+ declare function SvgPower(props: any): JSX.Element;
@@ -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,6 +1,6 @@
1
1
  import React from 'react';
2
- declare const IconButtonWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, IconButtonWrapperProps, object>;
3
- declare const IconButton: ({ altText, icon, onClick, iconColor, isDisabled, size, ...props }: IconButtonProps & React.ComponentProps<typeof IconButtonWrapper>) => JSX.Element;
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;
4
4
  declare type IconButtonProps = {
5
5
  altText: string;
6
6
  icon?: React.ReactNode;
@@ -9,7 +9,7 @@ declare type IconButtonProps = {
9
9
  isDisabled?: boolean;
10
10
  size?: 'small' | 'medium';
11
11
  };
12
- declare type IconButtonWrapperProps = {
12
+ declare type IconButtonBoxProps = {
13
13
  size?: 'small' | 'medium';
14
14
  };
15
15
  export default IconButton;
@@ -9,10 +9,10 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
+ import { getColorValue, getFocusRing, getRadius, u } from '../../utilities';
13
+ import Icon from '../icon/icon';
12
14
  import React from 'react';
13
15
  import styled from '@emotion/styled';
14
- import { u, getFocusRing, getRadius, getColorValue } from '../../utilities';
15
- import Icon from '../icon/icon';
16
16
  const sizeStyles = {
17
17
  small: {
18
18
  size: u(3),
@@ -23,7 +23,7 @@ const sizeStyles = {
23
23
  iconSize: 3,
24
24
  },
25
25
  };
26
- const IconButtonWrapper = styled.button `
26
+ export const IconButtonBox = styled.button `
27
27
  background-color: transparent;
28
28
  border: none;
29
29
  appearance: none;
@@ -65,7 +65,7 @@ const IconButtonWrapper = styled.button `
65
65
  ${getRadius('medium')};
66
66
  }
67
67
 
68
- &.focus-visible:before {
68
+ &:focus-visible:before {
69
69
  ${getFocusRing()};
70
70
  }
71
71
 
@@ -75,7 +75,7 @@ const IconButtonWrapper = styled.button `
75
75
  `;
76
76
  const IconButton = (_a) => {
77
77
  var { altText, icon, onClick, iconColor = 'body', isDisabled, size = 'medium' } = _a, props = __rest(_a, ["altText", "icon", "onClick", "iconColor", "isDisabled", "size"]);
78
- return (React.createElement(IconButtonWrapper, Object.assign({ "aria-label": altText, onClick: onClick, disabled: isDisabled, size: size }, props),
78
+ return (React.createElement(IconButtonBox, Object.assign({ "aria-label": altText, onClick: onClick, 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;
@@ -7,7 +7,6 @@ export { default as TextInput } from "./text-input/text-input";
7
7
  export { default as Distribute } from "./distribute/distribute";
8
8
  export { default as Container } from "./container/container";
9
9
  export { default as Layout } from "./layout/layout";
10
- export { default as IconButton } from "./icon-button/icon-button";
11
10
  export { default as Loader } from "./loader/loader";
12
11
  export { default as Checkbox } from "./checkbox/checkbox";
13
12
  export { default as TextButton } from "./text-button/text-button";
@@ -28,6 +27,7 @@ export { default as Arrange } from "./arrange/arrange";
28
27
  export { default as ColorPicker } from "./color-picker/color-picker";
29
28
  export * from "./icon/available-icons";
30
29
  export { default as BaseStyles, buildGlobalStylesheet } from "./base-styles/base-styles";
30
+ export { default as IconButton, IconButtonBox } from "./icon-button/icon-button";
31
31
  export { default as Menu, MenuItem } from "./menu/menu";
32
32
  export { default as Modal, ModalCard } from "./modal/modal";
33
33
  export { default as Tooltip, TooltipBox } from "./tooltip/tooltip";
@@ -9,6 +9,7 @@ export { default as Distribute } from './distribute/distribute';
9
9
  export { default as Container } from './container/container';
10
10
  export { default as Layout } from './layout/layout';
11
11
  export { default as IconButton } from './icon-button/icon-button';
12
+ export { IconButtonBox } from './icon-button/icon-button';
12
13
  export { default as Loader } from './loader/loader';
13
14
  export { default as Checkbox } from './checkbox/checkbox';
14
15
  export { default as TextButton } from './text-button/text-button';
@@ -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 'focus-visible/dist/focus-visible';
13
- import { getFontWeight, getRadius, getSize, getTextSize, u, getColorValue, } from '../../utilities';
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
- &.focus-visible ~ .RadioBox {
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, getColorValue } from '../../utilities';
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
- &.focus-visible ~ .SwitchBox {
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, getColorValue, } from '../../utilities';
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
- &.focus-visible {
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
- &.focus-visible {
53
+ &:focus-visible {
55
54
  ${getFocusRing()};
56
55
  }
57
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "10.21.0",
3
+ "version": "10.23.1",
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",