@clicktap/ui 0.12.2 → 0.12.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,17 @@
1
- import { DialogProps } from 'react-aria-components';
2
- export declare function Dialog({ className, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
1
+ import { Key } from 'react';
2
+ import { DialogProps as UIDialogProps } from 'react-aria-components';
3
+ import { MotionStyle, Variants } from 'framer-motion';
4
+ export type DialogProps = UIDialogProps & {
5
+ key?: Key;
6
+ style?: MotionStyle;
7
+ animationVariants?: Variants;
8
+ };
9
+ export declare function Dialog({ className, children, animationVariants, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare namespace Dialog {
11
+ var defaultProps: {
12
+ key: undefined;
13
+ style: undefined;
14
+ animationVariants: undefined;
15
+ };
16
+ }
3
17
  export default Dialog;
@@ -0,0 +1,10 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { DialogTriggerProps } from 'react-aria-components';
3
+ export type DriverAnimationState = 'unmounted' | 'visible' | 'hidden';
4
+ export declare const useDialogTrigger: () => {
5
+ animation: DriverAnimationState;
6
+ setAnimation: Dispatch<SetStateAction<DriverAnimationState>>;
7
+ onOpenChange: (isOpen: boolean) => void;
8
+ };
9
+ export declare function DialogTrigger(props: DialogTriggerProps): import("react/jsx-runtime").JSX.Element;
10
+ export default DialogTrigger;
@@ -1,11 +1,21 @@
1
+ import { Key } from 'react';
1
2
  import { DialogProps } from 'react-aria-components';
3
+ import { MotionStyle, Variants } from 'framer-motion';
2
4
  export type DrawerProps = DialogProps & {
3
5
  direction?: 'top' | 'right' | 'bottom' | 'left';
6
+ key?: Key;
7
+ style?: MotionStyle;
8
+ animationVariants?: Variants;
9
+ size?: string;
4
10
  };
5
- export declare function Drawer({ direction, className, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Drawer({ direction, children, className, animationVariants, ...props }: DrawerProps): import("react/jsx-runtime").JSX.Element;
6
12
  export declare namespace Drawer {
7
13
  var defaultProps: {
8
14
  direction: string;
15
+ key: undefined;
16
+ style: undefined;
17
+ animationVariants: undefined;
18
+ size: string;
9
19
  };
10
20
  }
11
21
  export default Drawer;
@@ -1,3 +1,23 @@
1
- import { ModalOverlayProps } from 'react-aria-components';
2
- export declare function ModalOverlay({ className, ...props }: ModalOverlayProps): import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode, Key } from 'react';
2
+ import { ModalOverlayProps as UiModalOverlayProps, ModalRenderProps } from 'react-aria-components';
3
+ import { MotionStyle, Variant } from 'framer-motion';
4
+ export interface ModalOverlayProps extends Omit<UiModalOverlayProps, 'children' | 'style'> {
5
+ key?: Key;
6
+ style?: MotionStyle;
7
+ animationVariants?: {
8
+ visible: Variant;
9
+ hidden: Variant;
10
+ };
11
+ children: ReactNode | ((values: ModalRenderProps & {
12
+ defaultChildren: ReactNode;
13
+ }) => ReactNode);
14
+ }
15
+ export declare function ModalOverlay(props: ModalOverlayProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare namespace ModalOverlay {
17
+ var defaultProps: {
18
+ key: undefined;
19
+ style: undefined;
20
+ animationVariants: undefined;
21
+ };
22
+ }
3
23
  export default ModalOverlay;
package/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export * from './ContextMenu/ContextMenu';
18
18
  export * from './CreditCardExpirationInput/CreditCardExpirationInput';
19
19
  export * from './CreditCardInput/CreditCardInput';
20
20
  export * from './DateInput/DateInput';
21
+ export * from './DialogTrigger/DialogTrigger';
21
22
  export * from './Divider/Divider';
22
23
  export * from './Divider/types';
23
24
  export * from './Input/Input';