@loomhq/lens 10.64.0 → 10.65.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.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ 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 ["primary", "primaryHover", "primaryActive", "focusRing", "record", "recordHover", "recordActive", "success", "danger", "dangerHover", "dangerActive", "backdrop", "backdropDark", "disabledContent", "highlight"];
|
|
9
|
+
declare const SharedColors: readonly ["primary", "primaryHover", "primaryActive", "focusRing", "record", "recordHover", "recordActive", "info", "success", "warning", "danger", "dangerHover", "dangerActive", "backdrop", "backdropDark", "disabledContent", "highlight"];
|
|
10
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"];
|
|
11
11
|
declare type ThemesColorVariant = Record<typeof SharedColors[number] | typeof SemanticColors[number], HslaColor>;
|
|
12
12
|
declare type ThemesColors = {
|
package/dist/colors.js
CHANGED
|
@@ -37,7 +37,9 @@ const SharedColors = [
|
|
|
37
37
|
'record',
|
|
38
38
|
'recordHover',
|
|
39
39
|
'recordActive',
|
|
40
|
+
'info',
|
|
40
41
|
'success',
|
|
42
|
+
'warning',
|
|
41
43
|
'danger',
|
|
42
44
|
'dangerHover',
|
|
43
45
|
'dangerActive',
|
|
@@ -121,7 +123,9 @@ const themeSharedColors = {
|
|
|
121
123
|
record: hslaBaseColors.orange,
|
|
122
124
|
recordHover: darken(hslaBaseColors.orange, hoverIncrease),
|
|
123
125
|
recordActive: darken(hslaBaseColors.orange, activeIncrease),
|
|
126
|
+
info: hslaBaseColors.blue,
|
|
124
127
|
success: hslaBaseColors.teal,
|
|
128
|
+
warning: hslaBaseColors.yellowDark,
|
|
125
129
|
danger: hslaBaseColors.red,
|
|
126
130
|
dangerHover: darken(hslaBaseColors.red, hoverIncrease),
|
|
127
131
|
dangerActive: darken(hslaBaseColors.red, activeIncrease),
|
|
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
13
13
|
import FocusTrap from 'focus-trap-react';
|
|
14
14
|
import { getColorValue, getPlacement, getRadius, getShadow, getSize, getSizeValue, u, } from '../../utilities';
|
|
15
15
|
import React, { useEffect } from 'react';
|
|
16
|
-
import
|
|
16
|
+
import usePreventScroll from '../../hooks/use-prevent-scroll';
|
|
17
17
|
import Backdrop from '../backdrop/backdrop';
|
|
18
18
|
import Container from '../container/container';
|
|
19
19
|
import IconButton from '../icon-button/icon-button';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@
|
|
|
6
6
|
* are passed to html or body, whichever level makes more sense
|
|
7
7
|
* for your application.
|
|
8
8
|
**/
|
|
9
|
-
|
|
9
|
+
declare function usePreventScroll(level: 'body' | 'html', enabled?: boolean): void;
|
|
10
|
+
export default usePreventScroll;
|
|
@@ -7,7 +7,7 @@ import { useLayoutEffect } from 'react';
|
|
|
7
7
|
* are passed to html or body, whichever level makes more sense
|
|
8
8
|
* for your application.
|
|
9
9
|
**/
|
|
10
|
-
|
|
10
|
+
function usePreventScroll(level, enabled) {
|
|
11
11
|
const safeDocument = document;
|
|
12
12
|
useLayoutEffect(() => {
|
|
13
13
|
const html = safeDocument === null || safeDocument === void 0 ? void 0 : safeDocument.documentElement;
|
|
@@ -70,3 +70,4 @@ export function usePreventScroll(level, enabled) {
|
|
|
70
70
|
// TODO(LNS-215): Clear styles on return to make utility more extendable for other uses
|
|
71
71
|
}, [safeDocument, enabled, level]);
|
|
72
72
|
}
|
|
73
|
+
export default usePreventScroll;
|