@inntechcorp/it-design 2.1.93 → 2.1.95

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,12 +1,24 @@
1
1
  import { ReactPortal } from "react";
2
2
  import { ModalProps } from "types/ModalProps";
3
+ import { ModalState } from "enums/enum";
3
4
  import { ModalContainerProps } from "../context/ModalContext";
4
5
  type ContainerExtraProps = {
5
6
  /**
6
7
  * All modals shown or to be shown.
7
8
  */
8
9
  modals: Required<ModalProps>[];
10
+ /**
11
+ * IDs of visible modals.
12
+ */
13
+ visibleModals: string[];
14
+ /**
15
+ * Current modal event.
16
+ */
17
+ modalEvent: {
18
+ event: ModalState;
19
+ id: string;
20
+ };
9
21
  };
10
22
  type ModalType = ModalContainerProps & ContainerExtraProps;
11
- declare const ModalContainer: ({ onShowModal, onHideModal, onRemoveModal, onModalEvent, modals }: ModalType) => ReactPortal | null;
23
+ declare const ModalContainer: ({ onShowModal, onHideModal, onRemoveModal, onModalEvent, modals, visibleModals, modalEvent }: ModalType) => ReactPortal | null;
12
24
  export default ModalContainer;
@@ -1,8 +1,15 @@
1
1
  import { FC } from 'react';
2
+ import { ModalState } from 'enums/enum';
2
3
  import { ModalProps } from 'types/ModalProps';
3
4
  import { ModalContainerProps } from '../context/ModalContext';
4
5
  type ModalExtraProps = {
5
6
  isActive: boolean;
7
+ modalEvent: {
8
+ event: ModalState;
9
+ id: string;
10
+ };
11
+ hideModalFromProvider: (id: string) => void;
12
+ isVisible: boolean;
6
13
  };
7
14
  type ModalType = Required<ModalProps> & ModalContainerProps & ModalExtraProps;
8
15
  declare const Modal: FC<ModalType>;
@@ -1,2 +1,2 @@
1
1
  import { ITDSizeSlug } from "../index";
2
- export default function GetSizeBySizeSlug(size: ITDSizeSlug): "large" | "small" | "x-small" | "medium" | "default" | "x-large" | "df";
2
+ export default function GetSizeBySizeSlug(size: ITDSizeSlug): "default" | "x-small" | "small" | "medium" | "large" | "x-large" | "df";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.1.93",
3
+ "version": "2.1.95",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",