x-ui-design 0.1.63 → 0.1.65

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.
Files changed (70) hide show
  1. package/dist/esm/types/components/Button/Button.d.ts +1 -1
  2. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +2 -2
  3. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +2 -2
  4. package/dist/esm/types/components/DatePicker/RangePicker/RangePicker.d.ts +1 -1
  5. package/dist/esm/types/components/DatePicker/TimePicker/TimePicker.d.ts +1 -1
  6. package/dist/esm/types/components/Empty/Empty.d.ts +1 -1
  7. package/dist/esm/types/components/Form/Form.d.ts +1 -1
  8. package/dist/esm/types/components/Form/Item/index.d.ts +1 -1
  9. package/dist/esm/types/components/Input/Input.d.ts +3 -3
  10. package/dist/esm/types/components/Radio/Button/Button.d.ts +1 -1
  11. package/dist/esm/types/components/Radio/Group/Group.d.ts +1 -1
  12. package/dist/esm/types/components/Radio/Radio.d.ts +2 -2
  13. package/dist/esm/types/components/Select/Option/Option.d.ts +1 -1
  14. package/dist/esm/types/components/Select/Select.d.ts +9 -9
  15. package/dist/esm/types/components/Select/Tag/Tag.d.ts +1 -1
  16. package/dist/esm/types/components/Skeleton/Avatar/Avatar.d.ts +8 -0
  17. package/dist/esm/types/components/Skeleton/Avatar/index.d.ts +1 -0
  18. package/dist/esm/types/components/Skeleton/Button/Button.d.ts +5 -0
  19. package/dist/esm/types/components/Skeleton/Button/index.d.ts +1 -0
  20. package/dist/esm/types/components/Skeleton/Image/Image.d.ts +5 -0
  21. package/dist/esm/types/components/Skeleton/Image/index.d.ts +1 -0
  22. package/dist/esm/types/components/Skeleton/Input/Input.d.ts +5 -0
  23. package/dist/esm/types/components/Skeleton/Input/index.d.ts +1 -0
  24. package/dist/esm/types/components/Skeleton/Skeleton.d.ts +11 -0
  25. package/dist/esm/types/components/Skeleton/index.d.ts +1 -0
  26. package/dist/esm/types/components/Upload/Upload.d.ts +1 -1
  27. package/dist/esm/types/helpers/index.d.ts +1 -1
  28. package/dist/esm/types/hooks/useForm.d.ts +2 -2
  29. package/dist/esm/types/hooks/useWatch.d.ts +2 -2
  30. package/dist/esm/types/index.d.ts +1 -1
  31. package/dist/index.d.ts +47 -1
  32. package/dist/index.esm.js.map +1 -1
  33. package/dist/index.js.map +1 -1
  34. package/lib/components/Button/Button.tsx +3 -3
  35. package/lib/components/Checkbox/Checkbox.tsx +4 -4
  36. package/lib/components/DatePicker/DatePicker.tsx +3 -3
  37. package/lib/components/DatePicker/RangePicker/RangePicker.tsx +3 -3
  38. package/lib/components/DatePicker/TimePicker/TimePicker.tsx +4 -4
  39. package/lib/components/Empty/Empty.tsx +2 -2
  40. package/lib/components/Form/Form.tsx +2 -2
  41. package/lib/components/Form/Item/index.tsx +5 -5
  42. package/lib/components/Input/Input.tsx +4 -4
  43. package/lib/components/Input/Textarea/Textarea.tsx +3 -3
  44. package/lib/components/Radio/Button/Button.tsx +3 -3
  45. package/lib/components/Radio/Group/Group.tsx +4 -4
  46. package/lib/components/Radio/Radio.tsx +3 -3
  47. package/lib/components/Select/Option/Option.tsx +3 -3
  48. package/lib/components/Select/Select.tsx +4 -4
  49. package/lib/components/Select/Tag/Tag.tsx +3 -3
  50. package/{src/app/Skeleton/Avatar/index.tsx → lib/components/Skeleton/Avatar/Avatar.tsx} +6 -4
  51. package/lib/components/Skeleton/Avatar/index.ts +1 -0
  52. package/{src/app/Skeleton/Button/index.tsx → lib/components/Skeleton/Button/Button.tsx} +6 -4
  53. package/lib/components/Skeleton/Button/index.ts +1 -0
  54. package/{src/app/Skeleton/Image/index.tsx → lib/components/Skeleton/Image/Image.tsx} +5 -3
  55. package/lib/components/Skeleton/Image/index.ts +1 -0
  56. package/{src/app/Skeleton/Input/index.tsx → lib/components/Skeleton/Input/Input.tsx} +6 -4
  57. package/lib/components/Skeleton/Input/index.ts +1 -0
  58. package/{src/app/Skeleton/index.tsx → lib/components/Skeleton/Skeleton.tsx} +8 -5
  59. package/lib/components/Skeleton/index.ts +1 -0
  60. package/lib/components/Upload/Upload.tsx +4 -4
  61. package/lib/helpers/index.ts +1 -1
  62. package/lib/hooks/useForm.ts +2 -2
  63. package/lib/hooks/useWatch.ts +2 -2
  64. package/lib/index.ts +1 -1
  65. package/package.json +2 -1
  66. /package/{src/app → lib/components}/Skeleton/Avatar/style.css +0 -0
  67. /package/{src/app → lib/components}/Skeleton/Button/style.css +0 -0
  68. /package/{src/app → lib/components}/Skeleton/Image/style.css +0 -0
  69. /package/{src/app → lib/components}/Skeleton/Input/style.css +0 -0
  70. /package/{src/app → lib/components}/Skeleton/style.css +0 -0
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { ButtonProps } from '@/types/button';
2
+ import { ButtonProps } from '../../types/button';
3
3
  import './style.css';
4
4
  declare const ButtonComponent: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, icon, iconPosition, loading, disabled, ghost, danger, block, children, href, ...restProps }: ButtonProps) => ReactElement;
5
5
  export default ButtonComponent;
@@ -1,8 +1,8 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import './style.css';
3
- declare const Checkbox: import("react").ForwardRefExoticComponent<import("@/types").DefaultProps & {
3
+ declare const Checkbox: import("react").ForwardRefExoticComponent<import("../../types").DefaultProps & {
4
4
  disabled?: boolean;
5
- onChange?: (e: MouseEvent<HTMLInputElement> & import("@/types").TargetProps) => void;
5
+ onChange?: (e: MouseEvent<HTMLInputElement> & import("../../types").TargetProps) => void;
6
6
  onClick?: import("react").MouseEventHandler<HTMLElement>;
7
7
  onMouseEnter?: import("react").MouseEventHandler<HTMLElement>;
8
8
  onMouseLeave?: import("react").MouseEventHandler<HTMLElement>;
@@ -1,9 +1,9 @@
1
- import { TDatePickerProps } from '@/types/datepicker';
1
+ import { TDatePickerProps } from '../../types/datepicker';
2
2
  import './style.css';
3
3
  export declare const NUMBER_SIX = 6;
4
4
  export declare const MONTH_LENGTH = 11;
5
5
  export declare const NEXT_DAYS_COUNT_AS_CURRENT_MUNTH = 35;
6
6
  declare const DatePicker: (({ value, onChange, onCalendarChange, disabled, error, placeholder, prefixCls, noStyle, feedbackIcons, locale, placement, defaultValue, size, format, getPopupContainer, showToday, allowClear, disabledDate, suffixIcon, picker, prefix, defaultOpen, inputReadOnly, bordered }: TDatePickerProps) => import("react/jsx-runtime").JSX.Element) & {
7
- RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, style, className, separator, defaultValue, bordered }: import("@/types/datepicker").TRangePickerProps) => import("react/jsx-runtime").JSX.Element;
7
+ RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, style, className, separator, defaultValue, bordered }: import("../../types/datepicker").TRangePickerProps) => import("react/jsx-runtime").JSX.Element;
8
8
  };
9
9
  export default DatePicker;
@@ -1,4 +1,4 @@
1
- import { TRangePickerProps } from '@/types/datepicker';
1
+ import { TRangePickerProps } from '../../../types/datepicker';
2
2
  import './style.css';
3
3
  declare const RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, style, className, separator, defaultValue, bordered }: TRangePickerProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default RangePicker;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { TimePickerProps } from '@/types/datepicker';
2
+ import { TimePickerProps } from '../../../types/datepicker';
3
3
  import './style.css';
4
4
  declare const TimePicker: FC<TimePickerProps>;
5
5
  export default TimePicker;
@@ -1,4 +1,4 @@
1
- import { EmptyContentProps } from '@/types/empty';
1
+ import { EmptyContentProps } from '../../types/empty';
2
2
  import './style.css';
3
3
  declare const EmptyContent: ({ icon, style, className, title, description, prefixCls }: EmptyContentProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default EmptyContent;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { FormInstance, FormItemProps, FormProps } from '@/types/form';
2
+ import { FormInstance, FormItemProps, FormProps } from '../../types/form';
3
3
  export declare const FormContext: import("react").Context<FormInstance | null>;
4
4
  declare const Form: FC<FormProps> & {
5
5
  Item: FC<FormItemProps>;
@@ -1,4 +1,4 @@
1
- import { FormItemProps } from '@/types/form';
1
+ import { FormItemProps } from '../../../types/form';
2
2
  import './style.css';
3
3
  declare const FormItem: {
4
4
  ({ prefixCls, name, label, rules, children, className, layout, style, valuePropName, dependencies, initialValue, feedbackIcons, ...props }: FormItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import { KeyboardEvent } from 'react';
2
- import { SyntheticBaseEvent } from '@/types';
2
+ import { SyntheticBaseEvent } from '../../types';
3
3
  import './style.css';
4
4
  import Textarea from './Textarea/Textarea';
5
- declare const InputComponent: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "prefix" | "size"> & import("@/types").DefaultProps & {
5
+ declare const InputComponent: import("react").ForwardRefExoticComponent<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "prefix" | "size"> & import("../../types").DefaultProps & {
6
6
  addonBefore?: import("react").ReactNode;
7
7
  addonAfter?: import("react").ReactNode;
8
- size?: import("@/types").SizeType;
8
+ size?: import("../../types").SizeType;
9
9
  prefix?: import("react").ReactNode;
10
10
  suffix?: import("react").ReactNode;
11
11
  disabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { RadioButtonProps } from '@/types/radio';
1
+ import { RadioButtonProps } from '../../../types/radio';
2
2
  import './style.css';
3
3
  declare const RadioButton: ({ prefixCls, className, checked, disabled, children, size, ...props }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default RadioButton;
@@ -1,4 +1,4 @@
1
- import { RadioGroupProps } from '@/types/radio';
1
+ import { RadioGroupProps } from '../../../types/radio';
2
2
  import './style.css';
3
3
  declare const RadioGroup: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default RadioGroup;
@@ -24,7 +24,7 @@ declare const Radio: import("react").ForwardRefExoticComponent<import("../../typ
24
24
  button?: boolean;
25
25
  error?: boolean;
26
26
  } & import("react").RefAttributes<HTMLLabelElement>> & {
27
- Group: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: import("@/types/radio").RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
28
- Button: ({ prefixCls, className, checked, disabled, children, size, ...props }: import("@/types/radio").RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
27
+ Group: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: import("../../types/radio").RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
28
+ Button: ({ prefixCls, className, checked, disabled, children, size, ...props }: import("../../types/radio").RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
29
29
  };
30
30
  export default Radio;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { OptionProps } from '@/types/select';
2
+ import { OptionProps } from '../../../types/select';
3
3
  import './style.css';
4
4
  declare const Option: FC<OptionProps>;
5
5
  export default Option;
@@ -1,12 +1,12 @@
1
1
  import { ReactElement } from 'react';
2
- import { OptionType } from '@/types/select';
2
+ import { OptionType } from '../../types/select';
3
3
  import './style.css';
4
- declare const Select: import("react").ForwardRefExoticComponent<import("@/types").DefaultProps & {
4
+ declare const Select: import("react").ForwardRefExoticComponent<import("../../types").DefaultProps & {
5
5
  id?: string;
6
6
  searchValue?: string;
7
7
  onSearch?: (value: string) => void;
8
8
  autoClearSearchValue?: boolean;
9
- onSelect?: (value: import("@/types").RuleTypes, option?: OptionType) => void;
9
+ onSelect?: (value: import("../../types").RuleTypes, option?: OptionType) => void;
10
10
  onDeselect?: (value: string, option?: OptionType) => void;
11
11
  filterOption?: boolean | ((input: string, option: OptionType) => boolean);
12
12
  optionFilterProp?: string;
@@ -16,10 +16,10 @@ declare const Select: import("react").ForwardRefExoticComponent<import("@/types"
16
16
  listHeight?: number;
17
17
  menuItemSelectedIcon?: import("react").ReactNode;
18
18
  mode?: "default" | "multiple" | "tags";
19
- value?: import("@/types").RuleTypes;
20
- defaultValue?: import("@/types").RuleTypes;
19
+ value?: import("../../types").RuleTypes;
20
+ defaultValue?: import("../../types").RuleTypes;
21
21
  maxCount?: number;
22
- onChange?: (e: import("@/types").RuleTypes, option?: OptionType) => void;
22
+ onChange?: (e: import("../../types").RuleTypes, option?: OptionType) => void;
23
23
  disabled?: boolean;
24
24
  loading?: boolean;
25
25
  placeholder?: string;
@@ -30,8 +30,8 @@ declare const Select: import("react").ForwardRefExoticComponent<import("@/types"
30
30
  onClear?: () => void;
31
31
  error?: boolean;
32
32
  showSearch?: boolean;
33
- tagRender?: ((props: import("@/types/select").CustomTagProps) => ReactElement) | undefined;
34
- maxTagPlaceholder?: import("react").ReactNode | ((omittedValues: import("@/types/select").DisplayValueType[]) => import("react").ReactNode);
33
+ tagRender?: ((props: import("../../types/select").CustomTagProps) => ReactElement) | undefined;
34
+ maxTagPlaceholder?: import("react").ReactNode | ((omittedValues: import("../../types/select").DisplayValueType[]) => import("react").ReactNode);
35
35
  dropdownClassName?: string;
36
36
  showArrow?: boolean;
37
37
  onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
@@ -46,6 +46,6 @@ declare const Select: import("react").ForwardRefExoticComponent<import("@/types"
46
46
  placement?: "bottomLeft" | "bottomRight" | "topLeft" | "topRight";
47
47
  removeIcon?: import("react").ReactNode;
48
48
  } & import("react").RefAttributes<HTMLDivElement>> & {
49
- Option: import("react").FC<import("@/types/select").OptionProps>;
49
+ Option: import("react").FC<import("../../types/select").OptionProps>;
50
50
  };
51
51
  export default Select;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { CustomTagProps } from '@/types/select';
2
+ import { CustomTagProps } from '../../../types/select';
3
3
  import './style.css';
4
4
  declare const Tag: FC<CustomTagProps>;
5
5
  export default Tag;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { SkeletonAvatarProps } from '../../../types/skeleton';
3
+ import './style.css';
4
+ export declare const AVATAR_DEFAULT_SIZE = 32;
5
+ export declare const AVATAR_GLOBAL_SIZE = 40;
6
+ export declare const GET_AVATAR_SKELETON_PROPS: (avatar: SkeletonAvatarProps | boolean) => SkeletonAvatarProps;
7
+ declare const SkeletonAvatar: FC<SkeletonAvatarProps>;
8
+ export default SkeletonAvatar;
@@ -0,0 +1 @@
1
+ export { default as SkeletonAvatar } from './Avatar';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SkeletonButtonProps } from '../../../types/skeleton';
3
+ import './style.css';
4
+ declare const SkeletonButton: FC<SkeletonButtonProps>;
5
+ export default SkeletonButton;
@@ -0,0 +1 @@
1
+ export { default as SkeletonButton } from './Button';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SkeletonImageProps } from '../../../types/skeleton';
3
+ import './style.css';
4
+ declare const SkeletonImage: FC<SkeletonImageProps>;
5
+ export default SkeletonImage;
@@ -0,0 +1 @@
1
+ export { default as SkeletonImage } from './Image';
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { SkeletonInputProps } from '../../../types/skeleton';
3
+ import './style.css';
4
+ declare const SkeletonInput: FC<SkeletonInputProps>;
5
+ export default SkeletonInput;
@@ -0,0 +1 @@
1
+ export { default as SkeletonInput } from './Input';
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from 'react';
2
+ import { SkeletonProps } from '../../types/skeleton';
3
+ import './style.css';
4
+ declare const Skeleton: {
5
+ ({ prefixCls, active, className, style, avatar, paragraph, round, title, teamLogo }: SkeletonProps): ReactElement;
6
+ Image: import("react").FC<import("../../types/skeleton").SkeletonImageProps>;
7
+ Input: import("react").FC<import("../../types/skeleton").SkeletonInputProps>;
8
+ Avatar: import("react").FC<import("../../types/skeleton").SkeletonAvatarProps>;
9
+ Button: import("react").FC<import("../../types/skeleton").SkeletonButtonProps>;
10
+ };
11
+ export default Skeleton;
@@ -0,0 +1 @@
1
+ export { default as Skeleton } from './Skeleton';
@@ -1,4 +1,4 @@
1
- import { UploadProps } from '@/types/upload';
1
+ import { UploadProps } from '../../types/upload';
2
2
  import './style.css';
3
3
  declare const Upload: ({ prefixCls, multiple, style, className, onChange, action, name, method, headers, directory, beforeUpload, rootClassName, onRemove, disabled, withCredentials, openFileDialogOnClick, maxCount, fileList: controlledFileList, customRequest, accept, listType, showUploadList, children, noStyle, defaultFileList }: UploadProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Upload;
@@ -1,4 +1,4 @@
1
- import { RuleType } from '@/types';
1
+ import { RuleType } from '../types';
2
2
  export declare const parseValue: (value: RuleType) => RuleType;
3
3
  export declare function createArray(length: number): number[];
4
4
  export declare function clsx(...args: RuleType[]): string;
@@ -1,4 +1,4 @@
1
- import { RuleTypes } from '@/types';
2
- import type { FieldData, FormInstance } from '@/types/form';
1
+ import { RuleTypes } from '../types';
2
+ import type { FieldData, FormInstance } from '../types/form';
3
3
  declare const useForm: (initialValues?: Record<string, RuleTypes>, onFieldsChange?: (changedFields: FieldData[]) => void, onValuesChange?: (changedValues: Record<string, RuleTypes>, allValues: Record<string, RuleTypes>) => void) => FormInstance;
4
4
  export { useForm };
@@ -1,5 +1,5 @@
1
- import { RuleType } from '@/types';
2
- import { FormInstance } from '@/types/form';
1
+ import { RuleType } from '../types';
2
+ import { FormInstance } from '../types/form';
3
3
  type UseWatchProps = {
4
4
  name?: string;
5
5
  defaultValue?: RuleType;
@@ -1 +1 @@
1
- export { default as Button } from "@/components/Button/Button";
1
+ export { default as Button } from "./components/Button/Button";
package/dist/index.d.ts CHANGED
@@ -1 +1,47 @@
1
- export { default as Button } from '@/components/Button/Button';
1
+ import { ButtonHTMLAttributes, ReactNode, CSSProperties, ReactElement } from 'react';
2
+
3
+ declare const ButtonTypes: readonly ["default", "primary", "dashed", "link", "text", "ghost"];
4
+ declare const ButtonShapes: readonly ["default", "circle", "round"];
5
+ declare const ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
6
+ declare const ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
7
+ type ButtonType = (typeof ButtonTypes)[number];
8
+ type ButtonShape = (typeof ButtonShapes)[number];
9
+ type ButtonVariantType = (typeof ButtonVariantTypes)[number];
10
+ type ButtonColorType = (typeof ButtonColorTypes)[number];
11
+ type SizeType = 'small' | 'middle' | 'large' | undefined;
12
+ type ButtonHTMLType = 'button' | 'submit' | 'reset';
13
+ interface BaseButtonProps {
14
+ type?: ButtonType;
15
+ color?: ButtonColorType;
16
+ variant?: ButtonVariantType;
17
+ icon?: ReactNode;
18
+ iconPosition?: 'start' | 'end';
19
+ shape?: ButtonShape;
20
+ size?: SizeType;
21
+ disabled?: boolean;
22
+ loading?: boolean | {
23
+ delay?: number;
24
+ icon?: ReactNode;
25
+ };
26
+ prefixCls?: string;
27
+ className?: string;
28
+ rootClassName?: string;
29
+ ghost?: boolean;
30
+ danger?: boolean;
31
+ block?: boolean;
32
+ children?: ReactNode;
33
+ classNames?: {
34
+ icon?: string;
35
+ };
36
+ styles?: {
37
+ icon?: CSSProperties;
38
+ };
39
+ }
40
+ interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
41
+ href?: string;
42
+ htmlType?: ButtonHTMLType;
43
+ }
44
+
45
+ declare const ButtonComponent: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, icon, iconPosition, loading, disabled, ghost, danger, block, children, href, ...restProps }: ButtonProps) => ReactElement;
46
+
47
+ export { ButtonComponent as Button };