@loomhq/lens 10.51.2 → 10.51.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.
@@ -26,6 +26,7 @@ declare type ModalProps = {
26
26
  };
27
27
  declare type ModalCardProps = {
28
28
  children?: React.ReactNode;
29
+ id?: string;
29
30
  isOpen?: boolean;
30
31
  onKeyDown?: React.ReactEventHandler;
31
32
  onCloseClick?: React.ReactEventHandler;
@@ -36,6 +36,7 @@ const ModalCardWrapper = styled.dialog `
36
36
  margin: 0 auto;
37
37
  position: relative;
38
38
  overflow: auto;
39
+ width: 100%;
39
40
  // TODO: LNS-150: Bake dialog resets into native resets file
40
41
  border: 0;
41
42
  padding: 0;
@@ -128,7 +129,7 @@ export const ModalCard = (_a) => {
128
129
  React.createElement(ModalCardChildrenSection, null, children))));
129
130
  };
130
131
  const Modal = React.forwardRef((_a, ref) => {
131
- var { children, isOpen, mainButton, secondaryButton, alternativeButton, title, noPadding, onCloseClick, onBackgroundClick, onKeyDown, hasDividers, maxWidth = 60, zIndex = 1000 } = _a, props = __rest(_a, ["children", "isOpen", "mainButton", "secondaryButton", "alternativeButton", "title", "noPadding", "onCloseClick", "onBackgroundClick", "onKeyDown", "hasDividers", "maxWidth", "zIndex"]);
132
+ var { children, id, isOpen, mainButton, secondaryButton, alternativeButton, title, noPadding, onCloseClick, onBackgroundClick, onKeyDown, hasDividers, maxWidth = 60, zIndex = 1000 } = _a, props = __rest(_a, ["children", "id", "isOpen", "mainButton", "secondaryButton", "alternativeButton", "title", "noPadding", "onCloseClick", "onBackgroundClick", "onKeyDown", "hasDividers", "maxWidth", "zIndex"]);
132
133
  const hasButtons = mainButton || secondaryButton || alternativeButton ? true : false;
133
134
  const closeClickHandler = e => {
134
135
  if (onBackgroundClick) {
@@ -143,7 +144,7 @@ const Modal = React.forwardRef((_a, ref) => {
143
144
  React.createElement(ModalCard, { ref: ref,
144
145
  // TODO: LNS-148: Add aria labelling for screenreader support
145
146
  // ariaLabelledBy={title}
146
- isOpen: isOpen, maxWidth: maxWidth, onCloseClick: onCloseClick },
147
+ id: id, isOpen: isOpen, maxWidth: maxWidth, onCloseClick: onCloseClick },
147
148
  React.createElement(ContentWrapper, { rows: `${title ? 'auto ' : ''} ${children ? '1fr ' : ''} ${hasButtons ? 'auto' : ''}` },
148
149
  title && (React.createElement(TitleSection, { bottom: children
149
150
  ? 'var(--lns-space-medium)'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "10.51.2",
3
+ "version": "10.51.4",
4
4
  "scripts": {
5
5
  "dev": "next",
6
6
  "build:next": "next build",