x-ui-design 0.2.56 → 0.2.58

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,4 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from '../../types/button';
3
+ declare const ButtonClient: (props: ButtonProps) => React.JSX.Element;
4
+ export default ButtonClient;
@@ -0,0 +1,8 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ButtonProps } from '../../types/button';
3
+ import './style.css';
4
+ declare const Button: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, iconPosition, disabled, ghost, danger, block, children, href, iconNode, isLoading, ...restProps }: ButtonProps & {
5
+ iconNode?: ReactNode;
6
+ isLoading?: boolean;
7
+ }) => ReactElement;
8
+ export default Button;
@@ -0,0 +1 @@
1
+ export { default as Button } from './Button';
@@ -0,0 +1,23 @@
1
+ import React, { MouseEvent } from 'react';
2
+ import './style.css';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<import("../../types").DefaultProps & {
4
+ disabled?: boolean;
5
+ onChange?: (e: MouseEvent<HTMLInputElement> & import("../../types").TargetProps) => void;
6
+ onClick?: React.MouseEventHandler<HTMLElement>;
7
+ onMouseEnter?: React.MouseEventHandler<HTMLElement>;
8
+ onMouseLeave?: React.MouseEventHandler<HTMLElement>;
9
+ onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
10
+ onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
11
+ value?: boolean;
12
+ tabIndex?: number;
13
+ name?: string;
14
+ children?: React.ReactNode;
15
+ id?: string;
16
+ autoFocus?: boolean;
17
+ type?: string;
18
+ skipGroup?: boolean;
19
+ required?: boolean;
20
+ defaultChecked?: boolean;
21
+ checked?: boolean;
22
+ } & React.RefAttributes<HTMLDivElement>>;
23
+ export default Checkbox;
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox';
@@ -0,0 +1,4 @@
1
+ import { RuleType } from '../types';
2
+ export declare const parseValue: (value: RuleType) => RuleType;
3
+ export declare function createArray(length: number): number[];
4
+ export declare function clsx(...args: RuleType[]): string;
@@ -0,0 +1,22 @@
1
+ import './styles/global.css';
2
+ declare const Checkbox: import("react").ComponentType<import("./types").DefaultProps & {
3
+ disabled?: boolean;
4
+ onChange?: (e: import("react").MouseEvent<HTMLInputElement> & import("./types").TargetProps) => void;
5
+ onClick?: import("react").MouseEventHandler<HTMLElement>;
6
+ onMouseEnter?: import("react").MouseEventHandler<HTMLElement>;
7
+ onMouseLeave?: import("react").MouseEventHandler<HTMLElement>;
8
+ onKeyPress?: import("react").KeyboardEventHandler<HTMLElement>;
9
+ onKeyDown?: import("react").KeyboardEventHandler<HTMLElement>;
10
+ value?: boolean;
11
+ tabIndex?: number;
12
+ name?: string;
13
+ children?: import("react").ReactNode;
14
+ id?: string;
15
+ autoFocus?: boolean;
16
+ type?: string;
17
+ skipGroup?: boolean;
18
+ required?: boolean;
19
+ defaultChecked?: boolean;
20
+ checked?: boolean;
21
+ } & import("react").RefAttributes<HTMLDivElement>>;
22
+ export { Checkbox };
@@ -0,0 +1,42 @@
1
+ import { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react';
2
+ export declare const ButtonTypes: readonly ["default", "primary", "dashed", "link", "text", "ghost"];
3
+ export declare const ButtonShapes: readonly ["default", "circle", "round"];
4
+ export declare const ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
5
+ export declare const ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
6
+ export type ButtonType = (typeof ButtonTypes)[number];
7
+ export type ButtonShape = (typeof ButtonShapes)[number];
8
+ export type ButtonVariantType = (typeof ButtonVariantTypes)[number];
9
+ export type ButtonColorType = (typeof ButtonColorTypes)[number];
10
+ export type SizeType = 'small' | 'middle' | 'large' | undefined;
11
+ export type ButtonHTMLType = 'button' | 'submit' | 'reset';
12
+ export interface BaseButtonProps {
13
+ type?: ButtonType;
14
+ color?: ButtonColorType;
15
+ variant?: ButtonVariantType;
16
+ icon?: ReactNode;
17
+ iconPosition?: 'start' | 'end';
18
+ shape?: ButtonShape;
19
+ size?: SizeType;
20
+ disabled?: boolean;
21
+ loading?: boolean | {
22
+ delay?: number;
23
+ icon?: ReactNode;
24
+ };
25
+ prefixCls?: string;
26
+ className?: string;
27
+ rootClassName?: string;
28
+ ghost?: boolean;
29
+ danger?: boolean;
30
+ block?: boolean;
31
+ children?: ReactNode;
32
+ classNames?: {
33
+ icon?: string;
34
+ };
35
+ styles?: {
36
+ icon?: CSSProperties;
37
+ };
38
+ }
39
+ export interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
40
+ href?: string;
41
+ htmlType?: ButtonHTMLType;
42
+ }
@@ -0,0 +1,22 @@
1
+ import { KeyboardEventHandler, MouseEvent, MouseEventHandler, ReactNode } from 'react';
2
+ import { DefaultProps, TargetProps } from '.';
3
+ export type CheckboxProps = DefaultProps & {
4
+ disabled?: boolean;
5
+ onChange?: (e: MouseEvent<HTMLInputElement> & TargetProps) => void;
6
+ onClick?: MouseEventHandler<HTMLElement>;
7
+ onMouseEnter?: MouseEventHandler<HTMLElement>;
8
+ onMouseLeave?: MouseEventHandler<HTMLElement>;
9
+ onKeyPress?: KeyboardEventHandler<HTMLElement>;
10
+ onKeyDown?: KeyboardEventHandler<HTMLElement>;
11
+ value?: boolean;
12
+ tabIndex?: number;
13
+ name?: string;
14
+ children?: ReactNode;
15
+ id?: string;
16
+ autoFocus?: boolean;
17
+ type?: string;
18
+ skipGroup?: boolean;
19
+ required?: boolean;
20
+ defaultChecked?: boolean;
21
+ checked?: boolean;
22
+ };
@@ -0,0 +1,25 @@
1
+ import { CSSProperties, MouseEvent } from 'react';
2
+ export type RuleType = any;
3
+ export type RuleTypes = RuleType | RuleType[];
4
+ export type SizeType = 'small' | 'middle' | 'large';
5
+ export type MouseEventHandlerSelect = MouseEvent<HTMLDivElement> & TargetProps;
6
+ export interface DefaultProps {
7
+ prefixCls?: string;
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ noStyle?: boolean;
11
+ }
12
+ export type TargetProps = {
13
+ target: {
14
+ value: RuleType;
15
+ };
16
+ };
17
+ export type SyntheticBaseEvent = {
18
+ target: EventTarget & {
19
+ value: RuleType;
20
+ };
21
+ nativeEvent?: Event & {
22
+ data?: string | null;
23
+ };
24
+ currentTarget: EventTarget;
25
+ };
@@ -0,0 +1,14 @@
1
+ export declare const prefixClsForm = "xUi-form";
2
+ export declare const prefixClsFormItem = "xUi-form-item";
3
+ export declare const prefixClsEmpty = "xUi-empty";
4
+ export declare const prefixClsInput = "xUi-input";
5
+ export declare const prefixClsSelect = "xUi-select";
6
+ export declare const prefixClsCheckbox = "xUi-checkbox";
7
+ export declare const prefixClsRadio = "xUi-radio";
8
+ export declare const prefixClsTextArea = "xUi-textarea";
9
+ export declare const prefixClsUpload = "xUi-upload";
10
+ export declare const prefixClsDatePicker = "xUi-datepicker";
11
+ export declare const prefixClsRangePicker = "xUi-rangepicker";
12
+ export declare const prefixClsTimePicker = "xUi-timepicker";
13
+ export declare const prefixClsButton = "xUi-button";
14
+ export declare const prefixClsSkeleton = "xUi-skeleton";
@@ -0,0 +1,38 @@
1
+ import * as react from 'react';
2
+ import { CSSProperties } from 'react';
3
+
4
+ type RuleType = any;
5
+ interface DefaultProps {
6
+ prefixCls?: string;
7
+ className?: string;
8
+ style?: CSSProperties;
9
+ noStyle?: boolean;
10
+ }
11
+ type TargetProps = {
12
+ target: {
13
+ value: RuleType;
14
+ };
15
+ };
16
+
17
+ declare const Checkbox: react.ComponentType<DefaultProps & {
18
+ disabled?: boolean;
19
+ onChange?: (e: react.MouseEvent<HTMLInputElement> & TargetProps) => void;
20
+ onClick?: react.MouseEventHandler<HTMLElement>;
21
+ onMouseEnter?: react.MouseEventHandler<HTMLElement>;
22
+ onMouseLeave?: react.MouseEventHandler<HTMLElement>;
23
+ onKeyPress?: react.KeyboardEventHandler<HTMLElement>;
24
+ onKeyDown?: react.KeyboardEventHandler<HTMLElement>;
25
+ value?: boolean;
26
+ tabIndex?: number;
27
+ name?: string;
28
+ children?: react.ReactNode;
29
+ id?: string;
30
+ autoFocus?: boolean;
31
+ type?: string;
32
+ skipGroup?: boolean;
33
+ required?: boolean;
34
+ defaultChecked?: boolean;
35
+ checked?: boolean;
36
+ } & react.RefAttributes<HTMLDivElement>>;
37
+
38
+ export { Checkbox };