@okam/stack-ui 1.8.0 → 1.9.0

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,10 +1,3 @@
1
- import type { Placement } from '@react-types/overlays';
2
- import React from 'react';
3
- import type { TButtonProps } from '../Button/interface';
4
- declare function PopoverButton({ children, buttonProps, placement, offset, }: {
5
- children: React.ReactNode;
6
- buttonProps: TButtonProps;
7
- placement: Placement;
8
- offset: number;
9
- }): import("react/jsx-runtime").JSX.Element;
1
+ import type { TPopoverButtonProps } from './interface';
2
+ declare function PopoverButton(props: TPopoverButtonProps): import("react/jsx-runtime").JSX.Element;
10
3
  export default PopoverButton;
@@ -1,11 +1,19 @@
1
1
  import type { DOMAttributes } from '@react-types/shared';
2
2
  import type React from 'react';
3
- import type { CSSProperties } from 'react';
4
- export interface IPopoverProps {
3
+ import type { Placement } from 'react-aria';
4
+ import type { TDefaultComponent } from '../../types/components';
5
+ import type { TButtonProps } from '../Button/interface';
6
+ export interface TPopoverButtonProps extends TDefaultComponent {
7
+ offset?: number;
8
+ buttonProps: TButtonProps;
9
+ placement?: Placement;
10
+ children: React.ReactElement | React.ReactElement[];
11
+ }
12
+ export interface IPopoverProps extends TDefaultComponent {
5
13
  isOpen: boolean;
6
14
  onClose: () => void;
7
- children: React.ReactNode;
8
- style?: CSSProperties;
15
+ children: React.ReactElement | React.ReactElement[];
16
+ positionProps: DOMAttributes;
9
17
  }
10
18
  export type TPopoverProps = DOMAttributes & IPopoverProps;
11
19
  export type PopoverOrientation = 'left' | 'right';
@@ -6,12 +6,14 @@ export interface TShareButtonProps extends TDefaultComponent<TShareButtonTokens>
6
6
  ariaLabel: string;
7
7
  sharingLinksList: TShareButtonLink[];
8
8
  onShare?: (sharingMedium: string) => void;
9
+ offset?: number;
9
10
  }
10
11
  interface TShareButtonTokens extends TToken {
11
12
  listDirection: 'row' | 'column';
12
13
  }
13
14
  export interface TIconsContainerProps extends Omit<TShareButtonProps, 'ariaLabel' | 'icon'> {
14
15
  isOpen: boolean;
16
+ setIsOpen: (isOpen: boolean) => void;
15
17
  }
16
18
  export interface TShareButtonLink {
17
19
  ariaLabel: string;