@loomhq/lens 10.68.2 → 10.68.3
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.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ declare type HslaColor = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const BaseColors: readonly ["red", "blurpleLight", "blurpleMedium", "blurple", "blurpleDark", "offWhite", "blueLight", "blue", "blueDark", "orangeLight", "orange", "orangeDark", "tealLight", "teal", "tealDark", "yellowLight", "yellow", "yellowDark"];
|
|
8
8
|
declare const GreyColors: readonly ["grey8", "grey7", "grey6", "grey5", "grey4", "grey3", "grey2", "grey1", "white"];
|
|
9
|
-
declare const SharedColors: readonly ["
|
|
10
|
-
declare const SemanticColors: readonly ["body", "bodyDimmed", "background", "backgroundHover", "backgroundActive", "backgroundSecondary", "backgroundSecondary2", "overlay", "border", "disabledBackground", "formFieldBorder", "formFieldBackground", "buttonBorder", "upgrade", "upgradeHover", "upgradeActive", "tabBackground", "discoveryBackground", "discoveryLightBackground", "discoveryTitle", "discoveryHighlight"];
|
|
9
|
+
declare const SharedColors: readonly ["primaryHover", "primaryActive", "focusRing", "record", "recordHover", "recordActive", "info", "success", "warning", "danger", "dangerHover", "dangerActive", "backdrop", "backdropDark", "disabledContent", "highlight"];
|
|
10
|
+
declare const SemanticColors: readonly ["primary", "body", "bodyDimmed", "background", "backgroundHover", "backgroundActive", "backgroundSecondary", "backgroundSecondary2", "overlay", "border", "disabledBackground", "formFieldBorder", "formFieldBackground", "buttonBorder", "upgrade", "upgradeHover", "upgradeActive", "tabBackground", "discoveryBackground", "discoveryLightBackground", "discoveryTitle", "discoveryHighlight"];
|
|
11
11
|
declare type ThemesColorVariant = Record<typeof SharedColors[number] | typeof SemanticColors[number], HslaColor>;
|
|
12
12
|
declare type ThemesColors = {
|
|
13
13
|
light: ThemesColorVariant;
|
package/dist/colors.js
CHANGED
|
@@ -30,7 +30,6 @@ const GreyColors = [
|
|
|
30
30
|
'white',
|
|
31
31
|
];
|
|
32
32
|
const SharedColors = [
|
|
33
|
-
'primary',
|
|
34
33
|
'primaryHover',
|
|
35
34
|
'primaryActive',
|
|
36
35
|
'focusRing',
|
|
@@ -49,6 +48,7 @@ const SharedColors = [
|
|
|
49
48
|
'highlight',
|
|
50
49
|
];
|
|
51
50
|
const SemanticColors = [
|
|
51
|
+
'primary',
|
|
52
52
|
'body',
|
|
53
53
|
'bodyDimmed',
|
|
54
54
|
'background',
|
|
@@ -116,10 +116,9 @@ export const hslaGreys = {
|
|
|
116
116
|
white: { h: 240, s: 7, l: 100, a: 1 },
|
|
117
117
|
};
|
|
118
118
|
const themeSharedColors = {
|
|
119
|
-
primary: hslaBaseColors.blurple,
|
|
120
119
|
primaryHover: darken(hslaBaseColors.blurple, hoverIncrease),
|
|
121
|
-
primaryActive: darken(hslaBaseColors.blurple, activeIncrease),
|
|
122
120
|
focusRing: alpha(hslaBaseColors.blurple, focusRingAlpha),
|
|
121
|
+
primaryActive: darken(hslaBaseColors.blurple, activeIncrease),
|
|
123
122
|
record: hslaBaseColors.orange,
|
|
124
123
|
recordHover: darken(hslaBaseColors.orange, hoverIncrease),
|
|
125
124
|
recordActive: darken(hslaBaseColors.orange, activeIncrease),
|
|
@@ -141,8 +140,8 @@ const themeSharedColors = {
|
|
|
141
140
|
};
|
|
142
141
|
// This object has a specific spread order for documentation purposes
|
|
143
142
|
export const themeColors = {
|
|
144
|
-
light: Object.assign(Object.assign({ body: hslaGreys.grey8, bodyDimmed: hslaGreys.grey6, 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 } }),
|
|
145
|
-
dark: Object.assign(Object.assign({ body: hslaGreys.grey1, bodyDimmed: hslaGreys.grey5, 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 } }),
|
|
143
|
+
light: Object.assign(Object.assign({ primary: hslaBaseColors.blurple, body: hslaGreys.grey8, bodyDimmed: hslaGreys.grey6, 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 } }),
|
|
144
|
+
dark: Object.assign(Object.assign({ primary: { h: 242, s: 87, l: 73, a: 1 }, body: hslaGreys.grey1, bodyDimmed: hslaGreys.grey5, 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 } }),
|
|
146
145
|
};
|
|
147
146
|
export const hslaColors = Object.assign(Object.assign({}, hslaBaseColors), hslaGreys);
|
|
148
147
|
export const colorsNames = [
|
|
@@ -49,7 +49,7 @@ const variantStyles = {
|
|
|
49
49
|
},
|
|
50
50
|
primary: {
|
|
51
51
|
color: getColorValue('white'),
|
|
52
|
-
backgroundColor: getColorValue('
|
|
52
|
+
backgroundColor: getColorValue('blurple'),
|
|
53
53
|
borderColor: 'transparent',
|
|
54
54
|
hover: getColorValue('primaryHover'),
|
|
55
55
|
active: getColorValue('primaryActive'),
|
|
@@ -12,13 +12,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import styled from '@emotion/styled';
|
|
14
14
|
import { css } from '@emotion/core';
|
|
15
|
-
import { getColorValue } from '../../utilities';
|
|
15
|
+
import { getColorValue, getFocusRing } from '../../utilities';
|
|
16
16
|
const variants = {
|
|
17
17
|
neutral: {
|
|
18
18
|
color: getColorValue('inherit'),
|
|
19
|
+
focusRing: getFocusRing(),
|
|
19
20
|
},
|
|
20
21
|
primary: {
|
|
21
22
|
color: getColorValue('primary'),
|
|
23
|
+
focusRing: getFocusRing(),
|
|
22
24
|
},
|
|
23
25
|
};
|
|
24
26
|
const statusStyles = {
|
|
@@ -41,6 +43,16 @@ const LinkWrapper = styled.a `
|
|
|
41
43
|
${props => !props.disabled && `color: ${variants[props.variant].color}`};
|
|
42
44
|
${props => (props.disabled ? statusStyles.disabled : statusStyles.enabled)};
|
|
43
45
|
${props => props.as === 'button' && buttonStyles.isButton};
|
|
46
|
+
&:focus {
|
|
47
|
+
outline: 0px solid transparent;
|
|
48
|
+
}
|
|
49
|
+
&:focus-visible {
|
|
50
|
+
outline: none;
|
|
51
|
+
${getFocusRing()};
|
|
52
|
+
}
|
|
53
|
+
&::-moz-focus-inner {
|
|
54
|
+
border: 0;
|
|
55
|
+
}
|
|
44
56
|
@supports not (text-underline-offset: 0.35em) {
|
|
45
57
|
box-shadow: 0 1px 0 currentColor;
|
|
46
58
|
padding: 0 0 1px 0;
|