@touchtech/baselayer-ui 2.22.3 → 2.22.5-beta.1
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.
- package/README.md +79 -79
- package/dist/components/Button/Button.d.ts +24 -0
- package/dist/components/Button/__tests__/Button.test.d.ts +1 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/ButtonBadge/ButtonBadge.d.ts +7 -0
- package/dist/components/ButtonBadge/__tests__/ButtonBadge.test.d.ts +1 -0
- package/dist/components/ButtonBadge/index.d.ts +1 -0
- package/dist/components/ButtonLink/ButtonLink.d.ts +22 -0
- package/dist/components/ButtonLink/__tests__/ButtonLink.test.d.ts +1 -0
- package/dist/components/ButtonLink/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +11 -0
- package/dist/components/ColorPicker/__tests__/ColorPicker.test.d.ts +1 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.d.ts +10 -0
- package/dist/components/ColorSwatch/__tests__/ColorSwatch.test.d.ts +1 -0
- package/dist/components/ColorSwatch/index.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +19 -0
- package/dist/components/ConfirmationModal/__tests__/ConfirmationModal.test.d.ts +1 -0
- package/dist/components/ConfirmationModal/index.d.ts +1 -0
- package/dist/components/FileInput/FileInput.d.ts +22 -0
- package/dist/components/FileInput/__tests__/FileInput.test.d.ts +1 -0
- package/dist/components/FileInput/index.d.ts +2 -0
- package/dist/components/FloatingPanel/FloatingPanel.d.ts +14 -0
- package/dist/components/FloatingPanel/__tests__/FloatingPanel.test.d.ts +1 -0
- package/dist/components/FloatingPanel/index.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +10 -0
- package/dist/components/Icon/__tests__/Icon.test.d.ts +1 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +21 -0
- package/dist/components/IconButton/__tests__/IconButton.test.d.ts +1 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/IconButtonLink/IconButtonLink.d.ts +20 -0
- package/dist/components/IconButtonLink/__tests__/IconButtonLink.test.d.ts +1 -0
- package/dist/components/IconButtonLink/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +14 -0
- package/dist/components/Image/__tests__/Image.test.d.ts +1 -0
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/Label/Label.d.ts +9 -0
- package/dist/components/Label/__tests/Label.test.d.ts +1 -0
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/ListView/ListView.d.ts +10 -0
- package/dist/components/ListView/ListViewItem.d.ts +14 -0
- package/dist/components/ListView/ListViewLinkItem.d.ts +13 -0
- package/dist/components/ListView/__tests__/ListView.test.d.ts +1 -0
- package/dist/components/ListView/index.d.ts +3 -0
- package/dist/components/Menu/Menu.d.ts +11 -0
- package/dist/components/Menu/MenuContainer.d.ts +13 -0
- package/dist/components/Menu/MenuItem.d.ts +10 -0
- package/dist/components/Menu/MenuLinkItem.d.ts +9 -0
- package/dist/components/Menu/__tests__/Menu.test.d.ts +1 -0
- package/dist/components/Menu/__tests__/MenuLinkItem.test.d.ts +1 -0
- package/dist/components/Menu/index.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts +14 -0
- package/dist/components/Modal/__tests__/Modal.test.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Overlay/Overlay.d.ts +10 -0
- package/dist/components/Overlay/__tests__/Overlay.test.d.ts +1 -0
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/TextInput/TextInput.d.ts +18 -0
- package/dist/components/TextInput/__tests__/TextInput.test.d.ts +1 -0
- package/dist/components/TextInput/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +8 -0
- package/dist/components/Toast/ToastContainer.d.ts +7 -0
- package/dist/components/Toast/__tests__/Toast.test.d.ts +1 -0
- package/dist/components/Toast/__tests__/ToastContainer.test.d.ts +1 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Video/Video.d.ts +23 -0
- package/dist/components/Video/__tests__/Video.test.d.ts +1 -0
- package/dist/components/Video/index.d.ts +1 -0
- package/dist/hooks/__tests__/useToggle.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useOutsideClick.d.ts +4 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +12 -0
- package/dist/styles.css +1337 -0
- package/dist/types/index.d.ts +7 -0
- package/package.json +93 -93
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
|
+
declare type OverlayProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
5
|
+
transparent?: boolean;
|
|
6
|
+
isFixed?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare function Overlay({ children, containerRef, transparent, isFixed, onClick, }: OverlayProps): JSX.Element;
|
|
10
|
+
export default Overlay;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Overlay } from "./Overlay";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Size, TextInputType } from "../../types";
|
|
3
|
+
declare type TextInputProps = {
|
|
4
|
+
label?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
onBlur?: () => void;
|
|
7
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
type?: TextInputType;
|
|
12
|
+
size?: Size;
|
|
13
|
+
noBorder?: boolean;
|
|
14
|
+
autoFocus?: boolean;
|
|
15
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
16
|
+
};
|
|
17
|
+
declare function TextInput({ label, onChange, onBlur, onKeyDown, placeholder, value, name, inputRef, size, type, autoFocus, noBorder, }: TextInputProps): JSX.Element;
|
|
18
|
+
export default TextInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TextInput } from "./TextInput";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
|
+
declare type ToastProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
};
|
|
7
|
+
declare function Toast({ children, containerRef, onClick }: ToastProps): JSX.Element;
|
|
8
|
+
export default Toast;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* There is a known issue in React in regards to the 'muted' property which causes the warning:
|
|
4
|
+
* "Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering."
|
|
5
|
+
*
|
|
6
|
+
* https://github.com/facebook/react/issues/10389
|
|
7
|
+
* https://github.com/facebook/react/issues/6544
|
|
8
|
+
* https://github.com/testing-library/react-testing-library/issues/470
|
|
9
|
+
*/
|
|
10
|
+
declare type Layout = "cover" | "contain" | "stretchHorizontally" | "stretchVertically";
|
|
11
|
+
export declare type VideoProps = {
|
|
12
|
+
src: string;
|
|
13
|
+
type: string;
|
|
14
|
+
layout?: Layout;
|
|
15
|
+
autoPlay?: boolean;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
muted?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
containerRef?: RefObject<HTMLDivElement>;
|
|
20
|
+
poster?: string;
|
|
21
|
+
};
|
|
22
|
+
declare function Video({ src, type, children, containerRef, poster, muted, loop, autoPlay, layout, }: VideoProps): JSX.Element;
|
|
23
|
+
export default Video;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Video, VideoProps } from "./Video";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useToggle(initialValue?: boolean): [boolean, (newValue?: boolean) => void];
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from "./components/ButtonBadge";
|
|
2
|
+
export * from "./components/Button";
|
|
3
|
+
export * from "./components/ButtonLink";
|
|
4
|
+
export * from "./components/Checkbox";
|
|
5
|
+
export * from "./components/ColorPicker";
|
|
6
|
+
export * from "./components/ColorSwatch";
|
|
7
|
+
export * from "./components/ConfirmationModal";
|
|
8
|
+
export * from "./components/FileInput";
|
|
9
|
+
export * from "./components/FloatingPanel";
|
|
10
|
+
export * from "./components/Icon";
|
|
11
|
+
export * from "./components/IconButton";
|
|
12
|
+
export * from "./components/IconButtonLink";
|
|
13
|
+
export * from "./components/Image";
|
|
14
|
+
export * from "./components/ListView";
|
|
15
|
+
export * from "./components/Menu";
|
|
16
|
+
export * from "./components/Modal";
|
|
17
|
+
export * from "./components/Overlay";
|
|
18
|
+
export * from "./components/Label";
|
|
19
|
+
export * from "./components/TextInput";
|
|
20
|
+
export * from "./components/Toast";
|
|
21
|
+
export * from "./components/Video";
|
|
22
|
+
export * from "./hooks";
|