@sito/ui 0.0.36 → 0.0.37

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.
@@ -0,0 +1,8 @@
1
+ import { HTMLProps } from "react";
2
+ export interface ButtonProps extends HTMLProps<HTMLButtonElement> {
3
+ tooltip?: string | undefined;
4
+ color?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
5
+ type?: "button" | "submit" | "reset" | undefined;
6
+ }
7
+ declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
8
+ export default Button;
@@ -0,0 +1,13 @@
1
+ import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
2
+ import { ButtonProps } from "../Button/Button";
3
+ export interface ErrorProps {
4
+ onRetry?: () => void | undefined;
5
+ icon?: IconDefinition | undefined;
6
+ title?: string | undefined;
7
+ text: string;
8
+ button?: string | undefined;
9
+ buttonProps?: ButtonProps;
10
+ className?: string | undefined;
11
+ }
12
+ export declare const Error: (props: ErrorProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Error;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ export interface ErrorFallbackProps {
3
+ error: Error;
4
+ resetErrorBoundary?: () => void | undefined;
5
+ }
6
+ export interface HandlerProps {
7
+ children: ReactNode;
8
+ onRetry?: () => void | undefined;
9
+ }
10
+ export default function Handler(props: HandlerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { IconProp } from "@fortawesome/fontawesome-svg-core";
3
+ import { ButtonProps } from "../Button/Button";
4
+ export interface IconButtonProps extends ButtonProps {
5
+ icon: IconProp;
6
+ }
7
+ declare const IconButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
8
+ export default IconButton;
@@ -0,0 +1,6 @@
1
+ import { HTMLProps } from "react";
2
+ export interface ImageProps extends HTMLProps<HTMLImageElement> {
3
+ container: HTMLProps<HTMLDivElement>;
4
+ }
5
+ declare function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
6
+ export default Image;
@@ -0,0 +1,11 @@
1
+ import { HTMLProps, ReactNode } from "react";
2
+ export interface InputControlProps extends HTMLProps<HTMLInputElement> {
3
+ leftComponent?: ReactNode | undefined;
4
+ rightComponent?: ReactNode | undefined;
5
+ color?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
6
+ orientation?: "column" | "row" | undefined;
7
+ label: string | undefined;
8
+ type?: "date" | "datetime-local" | "email" | "number" | "password" | "search" | "tel" | "time" | "url" | "text" | undefined;
9
+ }
10
+ declare const InputControl: import("react").ForwardRefExoticComponent<Omit<InputControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
11
+ export default InputControl;
@@ -0,0 +1,10 @@
1
+ import { HTMLProps, ReactNode } from "react";
2
+ export interface SelectControlProps extends HTMLProps<HTMLSelectElement> {
3
+ leftComponent?: ReactNode | undefined;
4
+ rightComponent?: ReactNode | undefined;
5
+ color?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
6
+ orientation?: "column" | "row" | undefined;
7
+ label: string | undefined;
8
+ }
9
+ declare const SelectControl: import("react").ForwardRefExoticComponent<Omit<SelectControlProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
10
+ export default SelectControl;
@@ -0,0 +1,10 @@
1
+ import { HTMLProps, ReactNode } from "react";
2
+ export interface TextareaControlProps extends HTMLProps<HTMLTextAreaElement> {
3
+ leftComponent?: ReactNode | undefined;
4
+ rightComponent?: ReactNode | undefined;
5
+ color?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
6
+ orientation?: "column" | "row" | undefined;
7
+ label: string | undefined;
8
+ }
9
+ declare const TextareaControl: import("react").ForwardRefExoticComponent<Omit<TextareaControlProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
10
+ export default TextareaControl;
@@ -0,0 +1,8 @@
1
+ import { HTMLProps } from "react";
2
+ export interface LoadingProps extends HTMLProps<HTMLDivElement> {
3
+ color?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
4
+ loaderClass?: "string" | undefined;
5
+ strokeWidth?: "string" | undefined;
6
+ }
7
+ declare const Loading: (props: LoadingProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default Loading;
@@ -0,0 +1,5 @@
1
+ import { IconButtonProps } from "../IconButton/IconButton";
2
+ export interface NotificationProps {
3
+ closeProps?: IconButtonProps | undefined;
4
+ }
5
+ export default function Notification(props: NotificationProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export interface PrintAfterProps {
3
+ children: React.ReactNode;
4
+ delay?: number | undefined;
5
+ animation?: "string" | undefined;
6
+ }
7
+ declare const PrintAfter: import("react").MemoExoticComponent<(props: PrintAfterProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export default PrintAfter;
@@ -0,0 +1,9 @@
1
+ import { InputHTMLAttributes } from "react";
2
+ export interface SwitcherProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value"> {
3
+ value?: boolean | undefined;
4
+ activeColor?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
5
+ inactiveColor?: "primary" | "secondary" | "ternary" | "inherit" | undefined;
6
+ label: string | undefined;
7
+ }
8
+ declare const Switcher: import("react").ForwardRefExoticComponent<SwitcherProps & import("react").RefAttributes<HTMLInputElement>>;
9
+ export default Switcher;
@@ -0,0 +1,3 @@
1
+ import { HTMLProps } from "react";
2
+ declare const ToTop: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
3
+ export default ToTop;
@@ -0,0 +1,15 @@
1
+ import Button, { ButtonProps } from "./Button/Button";
2
+ import IconButton, { IconButtonProps } from "./IconButton/IconButton";
3
+ import InputControl, { InputControlProps } from "./InputControl/Input";
4
+ import SelectControl, { SelectControlProps } from "./InputControl/Select";
5
+ import TextareaControl, { TextareaControlProps } from "./InputControl/Textarea";
6
+ import Switcher, { SwitcherProps } from "./Switch/Switch";
7
+ import Image, { ImageProps } from "./Image/Image";
8
+ import PrintAfter, { PrintAfterProps } from "./PrintAfter/PrintAfter";
9
+ import ToTop from "./ToTop/ToTop";
10
+ import Notification, { NotificationProps } from "./Notification/Notification";
11
+ import Loading, { LoadingProps } from "./Loading/Loading";
12
+ import Handler, { ErrorFallbackProps, HandlerProps } from "./Error/Handler";
13
+ import Error, { ErrorProps } from "./Error/Error";
14
+ export { Button, IconButton, InputControl, SelectControl, TextareaControl, Switcher, Image, PrintAfter, ToTop, Notification, Loading, Handler, Error, };
15
+ export type { ErrorFallbackProps, HandlerProps, ErrorProps, ButtonProps, IconButtonProps, InputControlProps, SelectControlProps, TextareaControlProps, SwitcherProps, ImageProps, PrintAfterProps, NotificationProps, LoadingProps, };
@@ -0,0 +1,14 @@
1
+ /**
2
+ *
3
+ * @param data anything to encrypt
4
+ * @param key key for encryption
5
+ * @returns encrypted data
6
+ */
7
+ export declare function encrypt(data: unknown, key?: string): string;
8
+ /**
9
+ *
10
+ * @param data string to decrypt
11
+ * @param key key for encryption
12
+ * @returns decrypted data
13
+ */
14
+ export declare function decrypt(data: string, key?: string): any;
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./components/components";
2
+ export * from "./providers/providers";
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ export interface ModeProviderData {
3
+ mode: "dark" | "light" | "OS";
4
+ setMode: React.Dispatch<React.SetStateAction<"dark" | "light" | "OS">>;
5
+ toggleMode: () => void;
6
+ }
7
+ export interface ModeProviderProps {
8
+ children: ReactNode;
9
+ }
10
+ export declare const ModeProvider: (props: ModeProviderProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const useMode: () => ModeProviderData;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from "react";
2
+ export interface NotificationProviderData {
3
+ notification: NotificationType;
4
+ setNotification: React.Dispatch<NotificationActionType>;
5
+ }
6
+ export interface NotificationProviderProps {
7
+ children: ReactNode;
8
+ }
9
+ export interface NotificationType {
10
+ visible: boolean;
11
+ type: "success" | "error" | "info" | "warning" | "hide";
12
+ message: string;
13
+ }
14
+ export interface NotificationActionType {
15
+ type: "hide" | "success" | "error" | "info" | "warning";
16
+ message?: "string";
17
+ }
18
+ export declare const NotificationProvider: (props: NotificationProviderProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const useNotification: () => NotificationProviderData;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ export interface StyleProviderProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const StyleProvider: (props: StyleProviderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const useStyle: () => {};
@@ -0,0 +1,5 @@
1
+ import { ModeProviderData, ModeProviderProps, ModeProvider, useMode } from "./ModeProvider";
2
+ import { NotificationProviderData, NotificationProviderProps, NotificationActionType, NotificationType, NotificationProvider, useNotification } from "./NotificationProvider";
3
+ import { StyleProvider, StyleProviderProps, useStyle } from "./StyleProvider";
4
+ export type { ModeProviderData, ModeProviderProps, NotificationProviderData, NotificationProviderProps, NotificationActionType, NotificationType, StyleProviderProps, };
5
+ export { ModeProvider, useMode, NotificationProvider, useNotification, useStyle, StyleProvider, };