@loomhq/lens 10.23.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.
@@ -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
 
@@ -65,7 +65,7 @@ export const IconButtonBox = 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
 
@@ -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.23.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",