@touchtech/baselayer-ui 5.3.1 → 5.3.2-alpha.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,4 +1,4 @@
1
- import { ReactNode, RefObject, SyntheticEvent } from "react";
1
+ import React, { ReactNode, RefObject } from "react";
2
2
  import { Size } from "../../types";
3
3
  declare type ButtonProps = {
4
4
  children: ReactNode;
@@ -14,11 +14,12 @@ declare type ButtonProps = {
14
14
  stretchHorizontally?: boolean;
15
15
  stretchVertically?: boolean;
16
16
  autoFocus?: boolean;
17
- onClick?: (event?: SyntheticEvent<HTMLButtonElement>) => void;
17
+ onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
18
+ onPointerDown?: (event: React.PointerEvent<HTMLButtonElement>) => void;
18
19
  size?: Size;
19
20
  type?: "submit" | "reset" | "button";
20
21
  align?: "left" | "center";
21
22
  offsetSides?: Array<"left" | "right">;
22
23
  };
23
- declare function Button({ children, className, onClick, containerRef, disabled, inverted, rounded, noShadow, noPadding, noBorder, transparent, stretchHorizontally, stretchVertically, autoFocus, offsetSides, align, size, type, }: ButtonProps): JSX.Element;
24
+ declare function Button({ children, className, onClick, onPointerDown, containerRef, disabled, inverted, rounded, noShadow, noPadding, noBorder, transparent, stretchHorizontally, stretchVertically, autoFocus, offsetSides, align, size, type, }: ButtonProps): JSX.Element;
24
25
  export default Button;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as useToggle } from "./useToggle";
2
+ export { default as useOutsideClick } from "./useOutsideClick";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ declare type Callback = (event: Event) => void;
3
+ export default function useOutsideClick(callback: Callback): import("react").MutableRefObject<HTMLDivElement>;
4
+ export {};
@@ -0,0 +1 @@
1
+ export default function useToggle(initialValue?: boolean): [boolean, (newValue?: boolean) => void];