react-artasys-ui 0.1.21 → 0.1.22
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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/lib/Button/Button.d.ts +12 -10
- package/lib/Button/index.d.ts +3 -2
- package/lib/Checkbox/Checkbox.d.ts +7 -7
- package/lib/Components/Arrow/Arrow.d.ts +6 -6
- package/lib/Dropdown/Dropdown.d.ts +18 -17
- package/lib/Dropdown/Item.d.ts +11 -11
- package/lib/Dropdown/Items.d.ts +6 -6
- package/lib/File/File.d.ts +18 -17
- package/lib/FileInput/FileInput.d.ts +13 -0
- package/lib/FileInput/index.d.ts +3 -0
- package/lib/Form/Element/Element.d.ts +16 -15
- package/lib/Form/Form.d.ts +10 -11
- package/lib/Input/Input.d.ts +11 -8
- package/lib/Loading/Loading.d.ts +6 -0
- package/lib/Loading/index.d.ts +3 -0
- package/lib/Progress/Progress.d.ts +7 -7
- package/lib/Provider/Provider.d.ts +7 -0
- package/lib/Provider/ProviderContext.d.ts +1 -0
- package/lib/Provider/index.d.ts +2 -0
- package/lib/Select/Optgroup.d.ts +7 -8
- package/lib/Select/Option.d.ts +8 -8
- package/lib/Select/Select.d.ts +18 -18
- package/lib/Spinner/Spinner.d.ts +8 -7
- package/lib/Spinner/index.d.ts +3 -3
- package/lib/TextArea/TextArea.d.ts +10 -7
- package/lib/UploadImages/Image.d.ts +16 -16
- package/lib/UploadImages/UploadImages.d.ts +9 -9
- package/lib/index.d.ts +19 -16
- package/lib/src/Button/Button.d.ts +12 -0
- package/lib/src/Button/index.d.ts +3 -0
- package/lib/src/Checkbox/Checkbox.d.ts +7 -0
- package/{src/Checkbox/index.tsx → lib/src/Checkbox/index.d.ts} +2 -2
- package/lib/src/Components/Arrow/Arrow.d.ts +6 -0
- package/{src/Components/Arrow/index.tsx → lib/src/Components/Arrow/index.d.ts} +2 -3
- package/lib/src/Dropdown/Dropdown.d.ts +18 -0
- package/lib/src/Dropdown/Item.d.ts +11 -0
- package/lib/src/Dropdown/Items.d.ts +6 -0
- package/lib/src/Dropdown/index.d.ts +9 -0
- package/lib/src/File/File.d.ts +18 -0
- package/lib/src/File/index.d.ts +3 -0
- package/lib/src/FileInput/FileInput.d.ts +14 -0
- package/lib/src/FileInput/index.d.ts +3 -0
- package/lib/src/Form/Element/Element.d.ts +16 -0
- package/lib/src/Form/Element/index.d.ts +3 -0
- package/lib/src/Form/Form.d.ts +10 -0
- package/{src/Form/index.tsx → lib/src/Form/index.d.ts} +5 -8
- package/{src/Form/types.ts → lib/src/Form/types.d.ts} +11 -17
- package/lib/src/Form/useForm.d.ts +17 -0
- package/lib/src/Input/Input.d.ts +11 -0
- package/{src/Input/index.tsx → lib/src/Input/index.d.ts} +2 -3
- package/lib/src/Loading/Loading.d.ts +6 -0
- package/lib/src/Loading/index.d.ts +3 -0
- package/lib/src/Progress/Progress.d.ts +7 -0
- package/{src/Progress/index.tsx → lib/src/Progress/index.d.ts} +2 -3
- package/lib/src/Provider/Provider.d.ts +7 -0
- package/lib/src/Provider/ProviderContext.d.ts +1 -0
- package/lib/src/Provider/index.d.ts +2 -0
- package/lib/src/Select/Optgroup.d.ts +7 -0
- package/lib/src/Select/Option.d.ts +8 -0
- package/lib/src/Select/Select.d.ts +18 -0
- package/lib/src/Select/index.d.ts +11 -0
- package/lib/src/Spinner/Spinner.d.ts +8 -0
- package/lib/src/Spinner/index.d.ts +3 -0
- package/lib/src/TextArea/TextArea.d.ts +9 -0
- package/{src/TextArea/index.tsx → lib/src/TextArea/index.d.ts} +2 -3
- package/lib/src/UploadImages/Image.d.ts +16 -0
- package/lib/src/UploadImages/UploadImages.d.ts +9 -0
- package/lib/src/UploadImages/index.d.ts +5 -0
- package/lib/src/index.d.ts +19 -0
- package/lib/src/ui-types.d.ts +3 -0
- package/lib/stories/Button.stories.d.ts +6 -0
- package/lib/stories/Checkbox.stories.d.ts +6 -0
- package/lib/stories/Dropdown/Dropdown.stories.d.ts +6 -0
- package/lib/stories/Dropdown/Item.stories.d.ts +6 -0
- package/lib/stories/Dropdown/Items.stories.d.ts +6 -0
- package/lib/stories/File.stories.d.ts +6 -0
- package/lib/stories/FileInput.stories.d.ts +9 -0
- package/lib/stories/Form/Element/Element.stories.d.ts +6 -0
- package/lib/stories/Form/Form.stories.d.ts +6 -0
- package/lib/stories/Input.stories.d.ts +6 -0
- package/lib/stories/Loading.stories.d.ts +6 -0
- package/lib/stories/Progress.stories.d.ts +6 -0
- package/lib/stories/Select/Select.stories.d.ts +6 -0
- package/lib/stories/Spinner.stories.d.ts +6 -0
- package/lib/stories/TextArea.stories.d.ts +6 -0
- package/lib/ui-types.d.ts +3 -0
- package/package.json +26 -5
- package/__tests__/static.test.js +0 -0
- package/babel.config.json +0 -3
- package/src/Button/Button.tsx +0 -29
- package/src/Button/index.tsx +0 -3
- package/src/Button/style.module.css +0 -45
- package/src/Checkbox/Checkbox.tsx +0 -22
- package/src/Checkbox/style.module.css +0 -74
- package/src/Components/Arrow/Arrow.tsx +0 -18
- package/src/Components/Arrow/style.module.css +0 -40
- package/src/Dropdown/Dropdown.tsx +0 -114
- package/src/Dropdown/Item.tsx +0 -42
- package/src/Dropdown/Items.tsx +0 -38
- package/src/Dropdown/index.tsx +0 -28
- package/src/Dropdown/style.module.css +0 -89
- package/src/File/File.tsx +0 -85
- package/src/File/index.tsx +0 -9
- package/src/Form/Element/Element.tsx +0 -54
- package/src/Form/Element/index.tsx +0 -7
- package/src/Form/Element/style.module.css +0 -119
- package/src/Form/Form.tsx +0 -40
- package/src/Form/style.module.css +0 -30
- package/src/Form/useForm.tsx +0 -76
- package/src/Input/Input.tsx +0 -49
- package/src/Input/style.module.css +0 -16
- package/src/Progress/Progress.tsx +0 -28
- package/src/Progress/style.module.css +0 -72
- package/src/Select/Optgroup.tsx +0 -19
- package/src/Select/Option.tsx +0 -47
- package/src/Select/Select.tsx +0 -143
- package/src/Select/index.tsx +0 -33
- package/src/Select/style.module.css +0 -117
- package/src/Spinner/Spinner.tsx +0 -21
- package/src/Spinner/index.tsx +0 -8
- package/src/Spinner/style.module.css +0 -65
- package/src/TextArea/TextArea.tsx +0 -57
- package/src/UploadImages/Image.tsx +0 -86
- package/src/UploadImages/UploadImages.tsx +0 -57
- package/src/UploadImages/index.tsx +0 -13
- package/src/UploadImages/style.module.css +0 -108
- package/src/index.ts +0 -62
- package/tsconfig.json +0 -118
- package/types.d.ts +0 -1
- package/webpack.config.js +0 -59
package/lib/Button/Button.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { type ButtonHTMLAttributes, type HTMLAttributes } from "react";
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
wait?: boolean;
|
|
4
|
+
classNameContainer?: string;
|
|
5
|
+
styleContainer?: HTMLAttributes<HTMLDivElement>['style'];
|
|
6
|
+
variant?: 'primary' | 'light' | 'secondary' | 'secondary-light' | 'tertiary';
|
|
7
|
+
size?: 'normal' | 'small' | 'large';
|
|
8
|
+
icon?: 'left' | 'right' | 'only' | 'no';
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: ({ children, className, classNameContainer, styleContainer, wait, variant, size, icon, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Button;
|
package/lib/Button/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import Button from "./Button";
|
|
2
|
-
export
|
|
1
|
+
import Button, { type ButtonProps } from "./Button";
|
|
2
|
+
export type { ButtonProps };
|
|
3
|
+
export default Button;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
interface ICheckbox extends IElement<HTMLInputElement
|
|
4
|
-
type?: 'checkbox' | 'radio';
|
|
5
|
-
}
|
|
6
|
-
declare const Checkbox: import("react").ForwardRefExoticComponent<ICheckbox & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
-
export default Checkbox;
|
|
1
|
+
import { IElement } from "../Form/Element";
|
|
2
|
+
import { UIComponent } from "../ui-types";
|
|
3
|
+
export interface ICheckbox extends UIComponent<IElement<HTMLInputElement>> {
|
|
4
|
+
type?: 'checkbox' | 'radio';
|
|
5
|
+
}
|
|
6
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<ICheckbox & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default Checkbox;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AllHTMLAttributes } from "react";
|
|
2
|
-
interface IArrow extends AllHTMLAttributes<HTMLDivElement> {
|
|
3
|
-
direction?: 'up' | 'down' | 'left' | 'right';
|
|
4
|
-
}
|
|
5
|
-
declare const Arrow: ({ className, direction, ...props }: IArrow) => JSX.Element;
|
|
6
|
-
export default Arrow;
|
|
1
|
+
import { AllHTMLAttributes } from "react";
|
|
2
|
+
interface IArrow extends AllHTMLAttributes<HTMLDivElement> {
|
|
3
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
4
|
+
}
|
|
5
|
+
declare const Arrow: ({ className, direction, ...props }: IArrow) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Arrow;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { AllHTMLAttributes, FunctionComponentElement } from "react";
|
|
2
|
-
import type { IItem, TChildrenAction } from "./Item";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { AllHTMLAttributes, FunctionComponentElement } from "react";
|
|
2
|
+
import type { IItem, TChildrenAction } from "./Item";
|
|
3
|
+
import { UIComponent } from "../ui-types";
|
|
4
|
+
export declare const Context: import("react").Context<TChildrenAction>;
|
|
5
|
+
export interface IDropdown extends UIComponent<AllHTMLAttributes<HTMLDivElement>> {
|
|
6
|
+
direction?: 'down' | 'up';
|
|
7
|
+
position?: 'left' | 'right';
|
|
8
|
+
split?: boolean;
|
|
9
|
+
hover?: boolean;
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
items?: FunctionComponentElement<IItem> | FunctionComponentElement<IItem>[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
enableRerenderItems?: boolean;
|
|
14
|
+
onShow?: () => void;
|
|
15
|
+
onHide?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const Dropdown: ({ children, className, items, arrow, direction, position, split, disabled, hover, enableRerenderItems, onShow, onHide, ...props }: IDropdown) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Dropdown;
|
package/lib/Dropdown/Item.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AllHTMLAttributes, ReactElement } from "react";
|
|
2
|
-
export type TChildrenAction = {
|
|
3
|
-
close: () => void;
|
|
4
|
-
};
|
|
5
|
-
export interface IItem extends Omit<AllHTMLAttributes<HTMLLIElement>, 'children'> {
|
|
6
|
-
children?: ((action: TChildrenAction) => ReactElement) | string | ReactElement;
|
|
7
|
-
autoClose?: boolean;
|
|
8
|
-
active?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Item: ({ children, onClick, autoClose, active, className, ...props }: IItem) => JSX.Element;
|
|
11
|
-
export default Item;
|
|
1
|
+
import { AllHTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export type TChildrenAction = {
|
|
3
|
+
close: () => void;
|
|
4
|
+
};
|
|
5
|
+
export interface IItem extends Omit<AllHTMLAttributes<HTMLLIElement>, 'children'> {
|
|
6
|
+
children?: ((action: TChildrenAction) => ReactElement) | string | ReactElement;
|
|
7
|
+
autoClose?: boolean;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Item: ({ children, onClick, autoClose, active, className, ...props }: IItem) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Item;
|
package/lib/Dropdown/Items.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IDropdown } from "./Dropdown";
|
|
2
|
-
interface IItems extends Pick<IDropdown, 'items' | 'disabled' | 'enableRerenderItems'> {
|
|
3
|
-
isOpen: boolean;
|
|
4
|
-
}
|
|
5
|
-
declare const Items: ({ items, isOpen, enableRerenderItems, disabled }: IItems) => JSX.Element | null;
|
|
6
|
-
export default Items;
|
|
1
|
+
import type { IDropdown } from "./Dropdown";
|
|
2
|
+
export interface IItems extends Pick<IDropdown, 'items' | 'disabled' | 'enableRerenderItems'> {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const Items: ({ items, isOpen, enableRerenderItems, disabled }: IItems) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export default Items;
|
package/lib/File/File.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { AllHTMLAttributes } from "react";
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { AllHTMLAttributes } from "react";
|
|
2
|
+
import { UIComponent } from "../ui-types";
|
|
3
|
+
export type TFileMime = 'image/png' | 'image/jpg' | 'image/jpeg' | 'image/gif';
|
|
4
|
+
export type TFileData = {
|
|
5
|
+
name: string;
|
|
6
|
+
type: TFileMime;
|
|
7
|
+
size: number;
|
|
8
|
+
mime: TFileMime;
|
|
9
|
+
data: string;
|
|
10
|
+
base64?: string | null | ArrayBuffer;
|
|
11
|
+
};
|
|
12
|
+
export interface TFile<T = any> extends UIComponent<Omit<AllHTMLAttributes<T>, 'onChange' | 'accept'>> {
|
|
13
|
+
onChange?: (data: TFileData) => void;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
accept?: TFileMime[];
|
|
16
|
+
}
|
|
17
|
+
declare const File: ({ onChange, children, multiple, accept, ...props }: TFile) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default File;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IElement } from '../Form/Element';
|
|
3
|
+
import { UIComponent } from '../ui-types';
|
|
4
|
+
export interface IFileInput extends UIComponent<IElement<HTMLInputElement>> {
|
|
5
|
+
onChangeFiles?: (files: FileList | null) => void;
|
|
6
|
+
accept?: string;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
wait?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const FileInput: ({ onChange, onChangeFiles, accept, multiple, wait, children, className, ...props }: IFileInput) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default FileInput;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { AllHTMLAttributes, ReactElement } from "react";
|
|
2
|
-
export interface IElement<T = any> extends Omit<AllHTMLAttributes<T>, 'children'> {
|
|
3
|
-
children?: ((props: AllHTMLAttributes<T>) => ReactElement) | AllHTMLAttributes<T>["children"];
|
|
4
|
-
error?: string;
|
|
5
|
-
formValue?: string | number;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
styleContainer?: React.HTMLAttributes<T>["style"];
|
|
9
|
-
classNameContainer?: string;
|
|
10
|
-
beforeElement?: React.ReactElement;
|
|
11
|
-
afterElement?: React.ReactElement;
|
|
12
|
-
hiddenContainer?: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { AllHTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export interface IElement<T = any> extends Omit<AllHTMLAttributes<T>, 'children'> {
|
|
3
|
+
children?: ((props: AllHTMLAttributes<T>) => ReactElement) | AllHTMLAttributes<T>["children"];
|
|
4
|
+
error?: string;
|
|
5
|
+
formValue?: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
styleContainer?: React.HTMLAttributes<T>["style"];
|
|
9
|
+
classNameContainer?: string;
|
|
10
|
+
beforeElement?: React.ReactElement;
|
|
11
|
+
afterElement?: React.ReactElement;
|
|
12
|
+
hiddenContainer?: boolean;
|
|
13
|
+
wait?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Element: ({ children, beforeElement, afterElement, error, placeholder, styleContainer, classNameContainer, hiddenContainer, formValue, wait, ...props }: IElement) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Element;
|
package/lib/Form/Form.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { FormHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface IForm extends FormHTMLAttributes<HTMLFormElement
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
wait?: boolean;
|
|
6
|
-
progress?: number;
|
|
7
|
-
progressRadius?: boolean;
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default Form;
|
|
1
|
+
import { FormHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { UIComponent } from '../ui-types';
|
|
3
|
+
export interface IForm extends UIComponent<FormHTMLAttributes<HTMLFormElement>> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
wait?: boolean;
|
|
6
|
+
progress?: number;
|
|
7
|
+
progressRadius?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Form: ({ children, wait, progress, progressRadius, className, onSubmit, ...props }: IForm) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Form;
|
package/lib/Input/Input.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { type HTMLInputTypeAttribute } from "react";
|
|
2
|
-
import { IElement } from "../Form/Element";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { type HTMLInputTypeAttribute } from "react";
|
|
2
|
+
import { IElement } from "../Form/Element";
|
|
3
|
+
import { UIComponent } from "../ui-types";
|
|
4
|
+
export interface IInput extends UIComponent<IElement<HTMLInputElement>> {
|
|
5
|
+
onChangeText?: (text: string) => void;
|
|
6
|
+
type?: HTMLInputTypeAttribute;
|
|
7
|
+
wait?: boolean;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Input: import("react").ForwardRefExoticComponent<IInput & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default Input;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AllHTMLAttributes } from 'react';
|
|
2
|
+
export interface LoadingProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'color'> {
|
|
3
|
+
color?: 'primary' | 'light' | 'secondary' | 'secondary-light' | 'tertiary';
|
|
4
|
+
}
|
|
5
|
+
declare const Loading: ({ color, ...props }: LoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Loading;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
interface IProgress {
|
|
2
|
-
value?: number | string;
|
|
3
|
-
size?: 'small' | 'middle' | 'large';
|
|
4
|
-
radius?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const Progress: ({ value, size, radius }: IProgress) => JSX.Element;
|
|
7
|
-
export default Progress;
|
|
1
|
+
export interface IProgress {
|
|
2
|
+
value?: number | string;
|
|
3
|
+
size?: 'small' | 'middle' | 'large';
|
|
4
|
+
radius?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Progress: ({ value, size, radius }: IProgress) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Progress;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { UIComponent } from "../ui-types";
|
|
3
|
+
interface ProviderProps extends UIComponent {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const Provider: ({ children }: ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Provider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ProviderContext: import("react").Context<{}>;
|
package/lib/Select/Optgroup.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default Optgroup;
|
|
1
|
+
import type { TOptionElement } from "./Select";
|
|
2
|
+
export interface IOptgroup {
|
|
3
|
+
children?: TOptionElement;
|
|
4
|
+
label?: string | React.ReactElement;
|
|
5
|
+
}
|
|
6
|
+
declare const Optgroup: ({ children, label }: IOptgroup) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Optgroup;
|
package/lib/Select/Option.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LiHTMLAttributes } from "react";
|
|
2
|
-
export interface IOption extends LiHTMLAttributes<HTMLLIElement> {
|
|
3
|
-
value?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
children?: string | React.ReactElement;
|
|
6
|
-
}
|
|
7
|
-
declare const Option: ({ children, value, disabled, hidden, onClick, ...props }: IOption) => JSX.Element | null;
|
|
8
|
-
export default Option;
|
|
1
|
+
import { LiHTMLAttributes } from "react";
|
|
2
|
+
export interface IOption extends LiHTMLAttributes<HTMLLIElement> {
|
|
3
|
+
value?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
children?: string | React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
declare const Option: ({ children, value, disabled, hidden, onClick, ...props }: IOption) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export default Option;
|
package/lib/Select/Select.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { FunctionComponentElement, ReactNode } from "react";
|
|
2
|
-
import { IElement } from "../Form/Element";
|
|
3
|
-
import type { IOptgroup } from "./Optgroup";
|
|
4
|
-
import type { IOption } from "./Option";
|
|
5
|
-
export declare const Context: import("react").Context<{
|
|
6
|
-
selected: string;
|
|
7
|
-
emptyValue:
|
|
8
|
-
setSelect: (value: string) => void;
|
|
9
|
-
setSelected: (value: string) => void;
|
|
10
|
-
setTitle: (title: IOption[
|
|
11
|
-
}>;
|
|
12
|
-
export type TOptionElement = FunctionComponentElement<IOption> | FunctionComponentElement<IOption>[] | ReactNode;
|
|
13
|
-
export interface ISelect extends Omit<IElement, 'children'> {
|
|
14
|
-
children?: TOptionElement | FunctionComponentElement<IOptgroup> | FunctionComponentElement<IOptgroup>[];
|
|
15
|
-
onChangeSelect?: (value: string) => void;
|
|
16
|
-
}
|
|
17
|
-
declare const Select: import("react").ForwardRefExoticComponent<ISelect & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
|
-
export default Select;
|
|
1
|
+
import { FunctionComponentElement, ReactNode } from "react";
|
|
2
|
+
import { IElement } from "../Form/Element";
|
|
3
|
+
import type { IOptgroup } from "./Optgroup";
|
|
4
|
+
import type { IOption } from "./Option";
|
|
5
|
+
export declare const Context: import("react").Context<{
|
|
6
|
+
selected: string;
|
|
7
|
+
emptyValue: React.MutableRefObject<boolean>;
|
|
8
|
+
setSelect: (value: string) => void;
|
|
9
|
+
setSelected: (value: string) => void;
|
|
10
|
+
setTitle: (title: IOption["children"]) => void;
|
|
11
|
+
}>;
|
|
12
|
+
export type TOptionElement = FunctionComponentElement<IOption> | FunctionComponentElement<IOption>[] | ReactNode;
|
|
13
|
+
export interface ISelect extends Omit<IElement, 'children'> {
|
|
14
|
+
children?: TOptionElement | FunctionComponentElement<IOptgroup> | FunctionComponentElement<IOptgroup>[];
|
|
15
|
+
onChangeSelect?: (value: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const Select: import("react").ForwardRefExoticComponent<ISelect & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
|
+
export default Select;
|
package/lib/Spinner/Spinner.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AllHTMLAttributes } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { AllHTMLAttributes } from "react";
|
|
2
|
+
import type { UIComponent } from "../ui-types";
|
|
3
|
+
export interface SpinnerProps extends UIComponent<Omit<AllHTMLAttributes<HTMLDivElement>, 'size'>> {
|
|
4
|
+
size?: 'small' | 'middle' | 'large';
|
|
5
|
+
contrast?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Spinner: ({ size, contrast, ...props }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Spinner;
|
package/lib/Spinner/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Spinner, {
|
|
2
|
-
export type {
|
|
3
|
-
export default Spinner;
|
|
1
|
+
import Spinner, { type SpinnerProps } from "./Spinner";
|
|
2
|
+
export type { SpinnerProps };
|
|
3
|
+
export default Spinner;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { IElement } from "../Form/Element";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IElement } from "../Form/Element";
|
|
3
|
+
import { UIComponent } from "../ui-types";
|
|
4
|
+
export interface ITextArea extends UIComponent<IElement<HTMLTextAreaElement>> {
|
|
5
|
+
onChangeText?: (text: string) => void;
|
|
6
|
+
wait?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const TextArea: React.ForwardRefExoticComponent<ITextArea & React.RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
export default TextArea;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { TFileData } from "../File";
|
|
2
|
-
export type TImageData = TFileData & {
|
|
3
|
-
id?: string | number;
|
|
4
|
-
setWait: (status: boolean) => void;
|
|
5
|
-
setId: (id: string | number) => void;
|
|
6
|
-
};
|
|
7
|
-
export interface IImage extends TFileData {
|
|
8
|
-
onChange?: (data: TImageData) => void;
|
|
9
|
-
onId?: (id: string | number) => void;
|
|
10
|
-
onRemove?: () => void;
|
|
11
|
-
onClick?: (data: TImageData) => void;
|
|
12
|
-
id?: string | number;
|
|
13
|
-
src?: string;
|
|
14
|
-
}
|
|
15
|
-
declare const Image: ({ onChange, onClick, onId, onRemove, ...props }: IImage) => JSX.Element;
|
|
16
|
-
export default Image;
|
|
1
|
+
import type { TFileData } from "../File";
|
|
2
|
+
export type TImageData = TFileData & {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
setWait: (status: boolean) => void;
|
|
5
|
+
setId: (id: string | number) => void;
|
|
6
|
+
};
|
|
7
|
+
export interface IImage extends TFileData {
|
|
8
|
+
onChange?: (data: TImageData) => void;
|
|
9
|
+
onId?: (id: string | number) => void;
|
|
10
|
+
onRemove?: () => void;
|
|
11
|
+
onClick?: (data: TImageData) => void;
|
|
12
|
+
id?: string | number;
|
|
13
|
+
src?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const Image: ({ onChange, onClick, onId, onRemove, ...props }: IImage) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default Image;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TImageData, IImage } from "./Image";
|
|
2
|
-
export interface IUploadImages {
|
|
3
|
-
onChange?: (data: TImageData) => void;
|
|
4
|
-
onChangeArray?: (data: IImage[]) => void;
|
|
5
|
-
onClick?: (data: TImageData) => void;
|
|
6
|
-
imagesArray?: TImageData[];
|
|
7
|
-
}
|
|
8
|
-
declare const UploadImages: ({ imagesArray, onChange, onChangeArray, onClick }: IUploadImages) => JSX.Element;
|
|
9
|
-
export default UploadImages;
|
|
1
|
+
import { TImageData, IImage } from "./Image";
|
|
2
|
+
export interface IUploadImages {
|
|
3
|
+
onChange?: (data: TImageData) => void;
|
|
4
|
+
onChangeArray?: (data: IImage[]) => void;
|
|
5
|
+
onClick?: (data: TImageData) => void;
|
|
6
|
+
imagesArray?: TImageData[];
|
|
7
|
+
}
|
|
8
|
+
declare const UploadImages: ({ imagesArray, onChange, onChangeArray, onClick }: IUploadImages) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default UploadImages;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import Form, { useForm, FormElement } from "./Form";
|
|
2
|
-
import Element, { IElement } from "./Form/Element";
|
|
3
|
-
import Input from "./Input";
|
|
4
|
-
import TextArea from "./TextArea";
|
|
5
|
-
import Spinner from "./Spinner";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import Form, { useForm, FormElement } from "./Form";
|
|
2
|
+
import Element, { IElement } from "./Form/Element";
|
|
3
|
+
import Input from "./Input";
|
|
4
|
+
import TextArea from "./TextArea";
|
|
5
|
+
import Spinner from "./Spinner";
|
|
6
|
+
import Loading from "./Loading";
|
|
7
|
+
import FileInput, { IFileInput } from "./FileInput";
|
|
8
|
+
import File, { TFileData, TFileMime } from "./File";
|
|
9
|
+
import Button, { ButtonProps } from "./Button";
|
|
10
|
+
import UploadImages, { IUploadImages, TImageData, IImage } from "./UploadImages";
|
|
11
|
+
import Checkbox from "./Checkbox";
|
|
12
|
+
import Progress from "./Progress";
|
|
13
|
+
import Select, { SelectOption, SelectOptgroup } from "./Select";
|
|
14
|
+
import Dropdown, { DropdownItem } from "./Dropdown";
|
|
15
|
+
import './brands/brands.css';
|
|
16
|
+
declare const UI: {};
|
|
17
|
+
export { Form, FormElement, Element, useForm, Input, TextArea, Spinner, Loading, File, Button, UploadImages, Checkbox, Progress, Select, SelectOption, SelectOptgroup, Dropdown, DropdownItem, FileInput, };
|
|
18
|
+
export type { TFileData, TFileMime, IUploadImages, IImage, TImageData, IElement, ButtonProps, IFileInput };
|
|
19
|
+
export default UI;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type HTMLAttributes } from "react";
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
wait?: boolean;
|
|
4
|
+
classNameContainer?: string;
|
|
5
|
+
styleContainer?: HTMLAttributes<HTMLDivElement>['style'];
|
|
6
|
+
variant?: 'primary' | 'light' | 'secondary' | 'secondary-light' | 'tertiary';
|
|
7
|
+
size?: 'normal' | 'small' | 'large';
|
|
8
|
+
icon?: 'left' | 'right' | 'only' | 'no';
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const Button: ({ children, className, classNameContainer, styleContainer, wait, variant, size, icon, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default Button;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IElement } from "../Form/Element";
|
|
2
|
+
import { UIComponent } from "../ui-types";
|
|
3
|
+
export interface ICheckbox extends UIComponent<IElement<HTMLInputElement>> {
|
|
4
|
+
type?: 'checkbox' | 'radio';
|
|
5
|
+
}
|
|
6
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<ICheckbox & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default Checkbox;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Checkbox from "./Checkbox";
|
|
2
|
-
export default Checkbox;
|
|
1
|
+
import Checkbox from "./Checkbox";
|
|
2
|
+
export default Checkbox;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AllHTMLAttributes } from "react";
|
|
2
|
+
interface IArrow extends AllHTMLAttributes<HTMLDivElement> {
|
|
3
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
4
|
+
}
|
|
5
|
+
declare const Arrow: ({ className, direction, ...props }: IArrow) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Arrow;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import Arrow from "./Arrow";
|
|
2
|
-
|
|
3
|
-
export default Arrow;
|
|
1
|
+
import Arrow from "./Arrow";
|
|
2
|
+
export default Arrow;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AllHTMLAttributes, FunctionComponentElement } from "react";
|
|
2
|
+
import type { IItem, TChildrenAction } from "./Item";
|
|
3
|
+
import { UIComponent } from "../ui-types";
|
|
4
|
+
export declare const Context: import("react").Context<TChildrenAction>;
|
|
5
|
+
export interface IDropdown extends UIComponent<AllHTMLAttributes<HTMLDivElement>> {
|
|
6
|
+
direction?: 'down' | 'up';
|
|
7
|
+
position?: 'left' | 'right';
|
|
8
|
+
split?: boolean;
|
|
9
|
+
hover?: boolean;
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
items?: FunctionComponentElement<IItem> | FunctionComponentElement<IItem>[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
enableRerenderItems?: boolean;
|
|
14
|
+
onShow?: () => void;
|
|
15
|
+
onHide?: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const Dropdown: ({ children, className, items, arrow, direction, position, split, disabled, hover, enableRerenderItems, onShow, onHide, ...props }: IDropdown) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default Dropdown;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AllHTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export type TChildrenAction = {
|
|
3
|
+
close: () => void;
|
|
4
|
+
};
|
|
5
|
+
export interface IItem extends Omit<AllHTMLAttributes<HTMLLIElement>, 'children'> {
|
|
6
|
+
children?: ((action: TChildrenAction) => ReactElement) | string | ReactElement;
|
|
7
|
+
autoClose?: boolean;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Item: ({ children, onClick, autoClose, active, className, ...props }: IItem) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Item;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDropdown } from "./Dropdown";
|
|
2
|
+
export interface IItems extends Pick<IDropdown, 'items' | 'disabled' | 'enableRerenderItems'> {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const Items: ({ items, isOpen, enableRerenderItems, disabled }: IItems) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export default Items;
|