@via-profit/ui-kit 0.1.0-rc.34 → 0.1.0-rc.36

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.
@@ -85,7 +85,7 @@ const ModalWrapper = props => {
85
85
  containerRef.current.focus();
86
86
  }
87
87
  const keydown = (event) => {
88
- if (event.key.toLowerCase() !== 'tab') {
88
+ if (event.key.toLowerCase() !== 'tab' || !isOpenProp) {
89
89
  return;
90
90
  }
91
91
  event.preventDefault();
@@ -99,7 +99,7 @@ const ModalWrapper = props => {
99
99
  }
100
100
  window.document.removeEventListener('keydown', keydown);
101
101
  };
102
- }, [nextFocus]);
102
+ }, [nextFocus, isOpenProp]);
103
103
  /**
104
104
  * Component will unmount
105
105
  * Mark component as unmounted
@@ -5,7 +5,6 @@ import { ConfirmBoxContentProps } from './ConfirmBoxContent';
5
5
  import { ConfirmBoxFooterProps } from './ConfirmBoxFooter';
6
6
  import { ConfirmBoxHeaderProps } from './ConfirmBoxHeader';
7
7
  export interface ConfirmBoxProps extends Omit<BaseModalProps, 'overrides'> {
8
- readonly variant: 'confirm-box';
9
8
  /**
10
9
  * Dialog header
11
10
  */
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BaseModalProps } from '../BaseModal';
3
3
  export interface DialogProps extends BaseModalProps {
4
- readonly variant: 'dialog';
5
4
  readonly children: React.ReactNode | React.ReactNode[];
6
5
  }
7
6
  declare const Dialog: React.FC<DialogProps>;
@@ -6,7 +6,6 @@ import { DrawerHeaderProps } from './DrawerHeader';
6
6
  import { DrawerContentProps } from './DrawerContent';
7
7
  import { DrawerFooterProps } from './DrawerFooter';
8
8
  export interface DrawerProps extends Omit<BaseModalProps, 'overrides'> {
9
- readonly variant: 'drawer';
10
9
  /**
11
10
  * Drawer position\
12
11
  * \
@@ -5,7 +5,6 @@ import { MessageBoxContentProps } from './MessageBoxContent';
5
5
  import { MessageBoxFooterProps } from './MessageBoxFooter';
6
6
  import { MessageBoxHeaderProps } from './MessageBoxHeader';
7
7
  export interface MessageBoxProps extends Omit<BaseModalProps, 'overrides'> {
8
- readonly variant: 'message-box';
9
8
  /**
10
9
  * Dialog header
11
10
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@via-profit/ui-kit",
3
- "version": "0.1.0-rc.34",
3
+ "version": "0.1.0-rc.36",
4
4
  "description": "UI Kit",
5
5
  "repository": {
6
6
  "type": "git",