tvuikit 0.3.2 → 0.3.4

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.
@@ -3,5 +3,6 @@ import { BUTTONS } from '../../variables/colors';
3
3
  export type ButtonProps = {
4
4
  children: ReactNode;
5
5
  variant?: keyof typeof BUTTONS;
6
+ overwriteClassName?: boolean;
6
7
  } & DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
7
- export declare const Button: ({ variant, children, className, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const Button: ({ variant, children, className, overwriteClassName, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ButtonProps } from '../button';
2
+ export type DropdownItemProps = ButtonProps;
3
+ export declare const DropdownItem: ({ children, onClick, className, variant, ...props }: DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { DetailedHTMLProps, HTMLAttributes } from 'react';
2
+ export type DropdownMenuProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3
+ export declare const DropdownMenu: ({ children, className, style, ...props }: DropdownMenuProps) => import('react').ReactPortal | null;
@@ -0,0 +1,3 @@
1
+ import { ButtonProps } from '../button';
2
+ export type DropdownTriggerProps = ButtonProps;
3
+ export declare const DropdownTrigger: ({ children, className, ...props }: DropdownTriggerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { RefObject } from 'react';
2
+ type DropdownContextType = {
3
+ opened: boolean;
4
+ toggle: (state?: boolean) => void;
5
+ dropdownRef: RefObject<HTMLDivElement | null>;
6
+ triggerRef: RefObject<HTMLButtonElement | null>;
7
+ };
8
+ export declare const DropdownContext: import('react').Context<DropdownContextType | null>;
9
+ export declare const useDropdown: () => DropdownContextType;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
2
+ type DivProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
3
+ export type DropdownProps = {
4
+ children: ReactNode;
5
+ onChangeState?: (opened: boolean) => void;
6
+ closeOnClickOutside?: boolean;
7
+ className?: string;
8
+ } & Omit<DivProps, "ref">;
9
+ export declare const Dropdown: ({ children, onChangeState, closeOnClickOutside, className, ...props }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './dropdown';
2
+ export * from './dropdown-menu';
3
+ export * from './dropdown-item';
4
+ export * from './dropdown-trigger';
@@ -0,0 +1,7 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Dropdown } from '.';
3
+ declare const meta: Meta<typeof Dropdown>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Dropdown>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomTrigger: Story;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useClickOutside: (ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void) => void;
@@ -6,4 +6,5 @@ export * from './input';
6
6
  export * from './modal';
7
7
  export * from './switch';
8
8
  export * from './wrapper';
9
+ export * from './dropdown';
9
10
  export * as Guildline from './guideline';