@loomhq/lens 10.80.0 → 10.80.2

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.
@@ -64,7 +64,7 @@ export { default as SvgDeleteForever } from "./delete-forever.js";
64
64
  export { default as SvgDesktopMac } from "./desktop-mac.js";
65
65
  export { default as SvgDomain } from "./domain.js";
66
66
  export { default as SvgDownload } from "./download.js";
67
- export { default as SvgEdge } from "./edge-logo.js";
67
+ export { default as SvgEdgeLogo } from "./edge-logo.js";
68
68
  export { default as SvgEdit } from "./edit.js";
69
69
  export { default as SvgEditBorder } from "./edit-border.js";
70
70
  export { default as SvgExitToApp } from "./exit-to-app.js";
@@ -146,7 +146,7 @@ export { default as SvgReplyLeft } from "./reply-left.js";
146
146
  export { default as SvgReplyRight } from "./reply-right.js";
147
147
  export { default as SvgRotateCcw } from "./rotate-ccw.js";
148
148
  export { default as SvgRotateLeft } from "./rotate-left.js";
149
- export { default as SvgSafari } from "./safari-logo.js";
149
+ export { default as SvgSafariLogo } from "./safari-logo.js";
150
150
  export { default as SvgScissors } from "./scissors.js";
151
151
  export { default as SvgSearch } from "./search.js";
152
152
  export { default as SvgSend } from "./send.js";
@@ -64,7 +64,7 @@ export { default as SvgDeleteForever } from './delete-forever.js';
64
64
  export { default as SvgDesktopMac } from './desktop-mac.js';
65
65
  export { default as SvgDomain } from './domain.js';
66
66
  export { default as SvgDownload } from './download.js';
67
- export { default as SvgEdge } from './edge-logo.js';
67
+ export { default as SvgEdgeLogo } from './edge-logo.js';
68
68
  export { default as SvgEdit } from './edit.js';
69
69
  export { default as SvgEditBorder } from './edit-border.js';
70
70
  export { default as SvgExitToApp } from './exit-to-app.js';
@@ -146,7 +146,7 @@ export { default as SvgReplyLeft } from './reply-left.js';
146
146
  export { default as SvgReplyRight } from './reply-right.js';
147
147
  export { default as SvgRotateCcw } from './rotate-ccw.js';
148
148
  export { default as SvgRotateLeft } from './rotate-left.js';
149
- export { default as SvgSafari } from './safari-logo.js';
149
+ export { default as SvgSafariLogo } from './safari-logo.js';
150
150
  export { default as SvgScissors } from './scissors.js';
151
151
  export { default as SvgSearch } from './search.js';
152
152
  export { default as SvgSend } from './send.js';
@@ -13,10 +13,10 @@ function SvgSafariLogo(props) {
13
13
  React.createElement("path", { d: "M52.7887 51.245L43.2113 41.2153L18.8143 74.0996L52.7887 51.245Z", fill: "#F1F1F1" }),
14
14
  React.createElement("path", { opacity: "0.243", d: "M18.8143 74.0996L52.7887 51.245L77.1857 18.3607L18.8143 74.0996Z", fill: "black" })),
15
15
  React.createElement("defs", null,
16
- React.createElement("filter", { id: "filter0_f_2_3913", x: "-4.7342", y: "-1.16092", width: "105.473", height: "102.228", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
16
+ React.createElement("filter", { id: "filter0_f_2_3913", x: "-0.73067", y: "2.8426", width: "97.4657", height: "94.2207", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
17
17
  React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
18
18
  React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
19
- React.createElement("feGaussianBlur", { stdDeviation: "4.47676", result: "effect1_foregroundBlur_2_3913" })),
19
+ React.createElement("feGaussianBlur", { stdDeviation: "2.475", result: "effect1_foregroundBlur_2_3913" })),
20
20
  React.createElement("filter", { id: "filter1_f_2_3913", x: "19.5389", y: "19.2569", width: "59.6289", height: "57.7613", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" },
21
21
  React.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
22
22
  React.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "BackgroundImageFix", result: "shape" }),
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SeverityLevels } from './types';
3
- declare const NotificationBarOuterWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, NotificationBarWrapperProps, object>;
4
- declare const NotificationBar: ({ children, onCloseClick, isOpen, severity, ...props }: NotificationBarProps & React.ComponentProps<typeof NotificationBarOuterWrapper>) => JSX.Element;
3
+ declare const NotificationBarWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, NotificationBarWrapperProps, object>;
4
+ declare const NotificationBar: ({ children, onCloseClick, isOpen, severity, ...props }: NotificationBarProps & React.ComponentProps<typeof NotificationBarWrapper>) => JSX.Element;
5
5
  declare type NotificationBarProps = {
6
6
  children?: React.ReactNode;
7
7
  isOpen?: boolean;
@@ -10,6 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import React, { useEffect } from 'react';
13
+ import { u } from '../../utilities';
13
14
  import styled from '@emotion/styled';
14
15
  import { SvgClose, SvgAlertTriangle, SvgInfo, SvgWarningAlert, } from '../icon/available-icons';
15
16
  import Align from '../align/align';
@@ -45,32 +46,30 @@ const severityStyles = {
45
46
  },
46
47
  };
47
48
  const DURATION = 350;
48
- const NotificationBarOuterWrapper = styled.aside `
49
+ const NotificationBarWrapper = styled.aside `
50
+ --paddingXOffset: var(--lns-space-large);
51
+ --alignItems: start;
52
+
49
53
  display: grid;
50
- align-content: center;
54
+ align-items: var(--alignItems);
55
+ justify-content: space-between;
56
+ grid-template-columns: 1fr auto;
51
57
  ${props => `background-color: ${severityStyles[props.severity].bgColor}`};
52
58
  ${props => `font-family: ${severityStyles[props.severity].fontFamily}`};
53
59
 
54
60
  ${props => `color: ${severityStyles[props.severity].color}`};
55
61
  position: fixed;
56
- padding: var(--lns-space-medium) 0;
62
+ padding: var(--lns-space-medium) var(--paddingXOffset);
57
63
  top: 0;
58
64
  left: 0;
59
65
  transition: ${DURATION}ms box-shadow, ${DURATION}ms transform;
60
- width: 100vw;
66
+ width: 100%;
67
+ box-sizing: border-box;
61
68
  z-index: 1100;
62
69
  opacity: ${props => (props.isOpen ? '1' : '0')};
63
70
  transform: ${props => props.isOpen ? 'translateY(0px)' : 'translateY(-100%)'};
64
- `;
65
- const NotificationBarInnerWrapper = styled.div `
66
- --responsive-padding: var(--lns-space-small);
67
- margin: 0 auto;
68
- max-width: 1600px;
69
- padding-left: var(--responsive-padding);
70
- padding-right: var(--responsive-padding);
71
- width: calc(100% - (2 * var(--responsive-padding)));
72
- @media (min-width: 800px) {
73
- --responsive-padding: var(--lns-space-medium);
71
+ @media (min-width: 872px) {
72
+ --alignItems: center;
74
73
  }
75
74
  `;
76
75
  const NotificationBar = (_a) => {
@@ -92,16 +91,18 @@ const NotificationBar = (_a) => {
92
91
  };
93
92
  }, [isOpen, onCloseClick]);
94
93
  usePushPageDown(isOpen);
95
- return isOpen ? (React.createElement(NotificationBarOuterWrapper, Object.assign({ isOpen: isOpen, severity: severity }, props),
96
- React.createElement(NotificationBarInnerWrapper, null,
97
- React.createElement(Arrange, { alignItems: { default: 'start', small: 'center' }, justifyContent: "space-between", columns: ['1fr auto'] },
98
- React.createElement(Container, { paddingY: { default: 'xsmall', xsmall: 0 }, width: "100%" },
99
- React.createElement(Arrange, { autoFlow: "column", gap: "small", justifyContent: "center" },
100
- ((_b = severityStyles[severity]) === null || _b === void 0 ? void 0 : _b.icon) ? (React.createElement(Align, { alignment: "topLeft" },
101
- React.createElement(Icon, { icon: severityStyles[severity].icon, color: (_c = severityStyles[severity].color) !== null && _c !== void 0 ? _c : 'var(--lns-color-white)' }))) : null,
102
- ' ',
103
- children),
104
- props.button),
105
- React.createElement(IconButton, { iconColor: (_d = severityStyles[severity].color) !== null && _d !== void 0 ? _d : 'var(--lns-color-white)', tabIndex: 0, altText: "Close", icon: React.createElement(SvgClose, null), onClick: onCloseClick }))))) : null;
94
+ // NOTE: The UI for internal alert is slightly different.
95
+ const isInternalAlert = severity === 'internal';
96
+ return isOpen ? (React.createElement(NotificationBarWrapper, Object.assign({ isOpen: isOpen, severity: severity }, props),
97
+ React.createElement(Arrange, { alignItems: { default: 'start', small: 'center' }, justifyContent: "space-between", autoFlow: isInternalAlert ? 'column' : undefined, columns: !isInternalAlert ? ['1fr auto'] : undefined },
98
+ React.createElement(Container, { paddingY: { default: 'xsmall', xsmall: 0 },
99
+ // Visually offsets the close X so that text appears centre-aligned
100
+ paddingLeft: !isInternalAlert ? { default: 0, medium: u(3.5) } : undefined, width: "100%" },
101
+ React.createElement(Arrange, { autoFlow: "column", gap: isInternalAlert ? 'medium' : 'small', justifyContent: "center" },
102
+ ((_b = severityStyles[severity]) === null || _b === void 0 ? void 0 : _b.icon) ? (React.createElement(Align, { alignment: "topLeft" },
103
+ React.createElement(Icon, { icon: severityStyles[severity].icon, color: (_c = severityStyles[severity].color) !== null && _c !== void 0 ? _c : 'var(--lns-color-white)' }))) : null,
104
+ ' ',
105
+ children))),
106
+ React.createElement(IconButton, { iconColor: (_d = severityStyles[severity].color) !== null && _d !== void 0 ? _d : 'var(--lns-color-white)', tabIndex: 0, altText: "Close", icon: React.createElement(SvgClose, null), onClick: onCloseClick }))) : null;
106
107
  };
107
108
  export default NotificationBar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "10.80.0",
3
+ "version": "10.80.2",
4
4
  "scripts": {
5
5
  "dev": "next",
6
6
  "build:next": "next build",