@loomhq/lens 10.82.3 → 10.82.4

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,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SeverityLevels } from './types';
3
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;
4
+ declare const NotificationBar: ({ children, onCloseClick, isOpen, severity, id, }: NotificationBarProps & React.ComponentProps<typeof NotificationBarWrapper>) => JSX.Element;
5
5
  declare type NotificationBarProps = {
6
6
  children?: React.ReactNode;
7
7
  isOpen?: boolean;
@@ -12,6 +12,5 @@ declare type NotificationBarWrapperProps = {
12
12
  children?: React.ReactNode;
13
13
  isOpen?: boolean;
14
14
  severity: SeverityLevels;
15
- button: React.ReactNode;
16
15
  };
17
16
  export default NotificationBar;
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import React, { useEffect } from 'react';
13
2
  import { u } from '../../utilities';
14
3
  import styled from '@emotion/styled';
@@ -72,9 +61,8 @@ const NotificationBarWrapper = styled.aside `
72
61
  --alignItems: center;
73
62
  }
74
63
  `;
75
- const NotificationBar = (_a) => {
76
- var _b, _c, _d;
77
- var { children, onCloseClick, isOpen, severity = 'info' } = _a, props = __rest(_a, ["children", "onCloseClick", "isOpen", "severity"]);
64
+ const NotificationBar = ({ children, onCloseClick, isOpen, severity = 'info', id, }) => {
65
+ var _a, _b, _c;
78
66
  useEffect(() => {
79
67
  if (!isOpen) {
80
68
  return;
@@ -93,16 +81,16 @@ const NotificationBar = (_a) => {
93
81
  usePushPageDown(isOpen);
94
82
  // NOTE: The UI for internal alert is slightly different.
95
83
  const isInternalAlert = severity === 'internal';
96
- return isOpen ? (React.createElement(NotificationBarWrapper, Object.assign({ isOpen: isOpen, severity: severity }, props),
84
+ return isOpen ? (React.createElement(NotificationBarWrapper, { isOpen: isOpen, severity: severity, id: id },
97
85
  React.createElement(Arrange, { alignItems: { default: 'start', small: 'center' }, justifyContent: "space-between", autoFlow: isInternalAlert ? 'column' : undefined, columns: !isInternalAlert ? ['1fr auto'] : undefined },
98
86
  React.createElement(Container, { paddingY: { default: 'xsmall', xsmall: 0 },
99
87
  // Visually offsets the close X so that text appears centre-aligned
100
88
  paddingLeft: !isInternalAlert ? { default: 0, medium: u(3.5) } : undefined, width: "100%" },
101
89
  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,
90
+ ((_a = severityStyles[severity]) === null || _a === void 0 ? void 0 : _a.icon) ? (React.createElement(Align, { alignment: "topLeft" },
91
+ React.createElement(Icon, { icon: severityStyles[severity].icon, color: (_b = severityStyles[severity].color) !== null && _b !== void 0 ? _b : 'var(--lns-color-white)' }))) : null,
104
92
  ' ',
105
93
  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;
94
+ React.createElement(IconButton, { iconColor: (_c = severityStyles[severity].color) !== null && _c !== void 0 ? _c : 'var(--lns-color-white)', tabIndex: 0, altText: "Close", icon: React.createElement(SvgClose, null), onClick: onCloseClick }))) : null;
107
95
  };
108
96
  export default NotificationBar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "10.82.3",
3
+ "version": "10.82.4",
4
4
  "scripts": {
5
5
  "dev": "next",
6
6
  "build:next": "next build",