@okam/stack-ui 1.20.0 → 1.20.3

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,3 +1,3 @@
1
- import type { LightboxProps } from './interface';
2
- declare const Lightbox: (props: LightboxProps) => import("react/jsx-runtime").JSX.Element;
1
+ import type { TLightboxProps } from './interface';
2
+ declare const Lightbox: (props: TLightboxProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Lightbox;
@@ -1,20 +1,22 @@
1
- import type { AriaOverlayProps } from '@react-aria/overlays';
2
- import type { AriaDialogProps } from '@react-types/dialog';
3
- import type { HTMLAttributes } from 'react';
1
+ import type { DOMAttributes } from '@react-types/shared';
4
2
  import type React from 'react';
3
+ import type { Dispatch, FunctionComponent, SetStateAction } from 'react';
4
+ import type { OverlayTriggerProps as AriaOverlayTriggerProps } from 'react-aria';
5
+ import type { OverlayTriggerProps } from 'react-stately';
5
6
  import type { TDefaultComponent } from '../../types/components';
6
- export interface ModalProps {
7
- children?: React.ReactNode;
7
+ import type { TButtonProps } from '../Button/interface';
8
+ export interface LightboxProps extends Omit<AriaOverlayTriggerProps, 'type'> {
9
+ closeButtonAriaLabel?: string;
10
+ setOpen?: Dispatch<SetStateAction<boolean>>;
8
11
  }
9
- export interface ILightboxProps extends HTMLAttributes<HTMLElement> {
10
- id: string;
11
- children?: React.ReactNode;
12
- label?: string;
13
- thumbnailContent?: React.ReactNode;
14
- lightboxContent?: React.ReactNode;
15
- isOpen?: boolean;
16
- onOpenCallBack?: (bool: boolean) => void;
17
- onCloseCallBack?: () => void;
12
+ export interface TLightboxProps extends OverlayTriggerProps, LightboxProps, TDefaultComponent {
13
+ label: string;
14
+ thumbnailContent: React.ReactNode;
15
+ closeButton?: FunctionComponent<TButtonProps>;
16
+ }
17
+ export interface LightboxAria {
18
+ overlayProps: DOMAttributes & {
19
+ label?: string;
20
+ };
21
+ labelProps: DOMAttributes;
18
22
  }
19
- export type LightboxProps = ILightboxProps & TDefaultComponent;
20
- export type ModalDialogProps = AriaOverlayProps & AriaDialogProps & ModalProps;
@@ -0,0 +1,3 @@
1
+ import type { TModalDialogProps } from '../interface';
2
+ declare const ModalDialog: (props: TModalDialogProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ModalDialog;
@@ -0,0 +1,3 @@
1
+ import type { TModalOverlayProps } from '../interface';
2
+ declare const ModalOverlay: (props: TModalOverlayProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default ModalOverlay;
@@ -1,3 +1,3 @@
1
1
  import type { TModalProps } from './interface';
2
- declare const Modal: (props: TModalProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ declare const Modal: (props: TModalProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Modal;
@@ -1,11 +1,19 @@
1
1
  import type { OverlayTriggerState } from '@react-stately/overlays';
2
2
  import type React from 'react';
3
- export interface TModalProps {
4
- children: React.ReactNode;
3
+ import type { AriaDialogProps, AriaModalOverlayProps } from 'react-aria';
4
+ import type { TDefaultComponent } from '../../types/components';
5
+ export interface TModalProps extends AriaModalOverlayProps, TDefaultComponent {
5
6
  state: OverlayTriggerState;
7
+ children: React.ReactNode;
6
8
  transitionComponent?: (props: {
7
9
  isVisible: boolean;
8
10
  children: React.ReactNode;
9
11
  }) => JSX.Element;
10
- onCloseCallBack?: () => void;
12
+ }
13
+ export interface TModalOverlayProps extends AriaModalOverlayProps, TDefaultComponent {
14
+ children: React.ReactNode;
15
+ state: OverlayTriggerState;
16
+ }
17
+ export interface TModalDialogProps extends AriaDialogProps, TDefaultComponent {
18
+ children: React.ReactNode;
11
19
  }