x-ui-design 0.6.23 → 0.6.24

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 (77) hide show
  1. package/lib/components/Form/Form.tsx +1 -1
  2. package/lib/hooks/useForm.ts +6 -4
  3. package/package.json +1 -1
  4. package/dist/esm/types/components/Button/Button.d.ts +0 -5
  5. package/dist/esm/types/components/Button/index.d.ts +0 -1
  6. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -8
  7. package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
  8. package/dist/esm/types/components/ConditionalWrapper/index.d.ts +0 -7
  9. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +0 -8
  10. package/dist/esm/types/components/DatePicker/RangePicker/RangePicker.d.ts +0 -5
  11. package/dist/esm/types/components/DatePicker/RangePicker/index.d.ts +0 -1
  12. package/dist/esm/types/components/DatePicker/TimePicker/TimePicker.d.ts +0 -5
  13. package/dist/esm/types/components/DatePicker/TimePicker/index.d.ts +0 -1
  14. package/dist/esm/types/components/DatePicker/index.d.ts +0 -1
  15. package/dist/esm/types/components/Empty/Empty.d.ts +0 -5
  16. package/dist/esm/types/components/Empty/index.d.ts +0 -1
  17. package/dist/esm/types/components/Form/Form.d.ts +0 -5
  18. package/dist/esm/types/components/Form/Item/Item.d.ts +0 -5
  19. package/dist/esm/types/components/Form/Item/index.d.ts +0 -1
  20. package/dist/esm/types/components/Form/index.d.ts +0 -1
  21. package/dist/esm/types/components/Icons/Icons.d.ts +0 -17
  22. package/dist/esm/types/components/Icons/index.d.ts +0 -1
  23. package/dist/esm/types/components/Input/Input.d.ts +0 -12
  24. package/dist/esm/types/components/Input/Textarea/Textarea.d.ts +0 -8
  25. package/dist/esm/types/components/Input/Textarea/index.d.ts +0 -1
  26. package/dist/esm/types/components/Input/index.d.ts +0 -1
  27. package/dist/esm/types/components/Radio/Button/Button.d.ts +0 -5
  28. package/dist/esm/types/components/Radio/Button/index.d.ts +0 -1
  29. package/dist/esm/types/components/Radio/Group/Group.d.ts +0 -5
  30. package/dist/esm/types/components/Radio/Group/index.d.ts +0 -1
  31. package/dist/esm/types/components/Radio/Radio.d.ts +0 -8
  32. package/dist/esm/types/components/Radio/index.d.ts +0 -1
  33. package/dist/esm/types/components/Select/Option/Option.d.ts +0 -5
  34. package/dist/esm/types/components/Select/Option/index.d.ts +0 -1
  35. package/dist/esm/types/components/Select/Select.d.ts +0 -10
  36. package/dist/esm/types/components/Select/Tag/Tag.d.ts +0 -5
  37. package/dist/esm/types/components/Select/Tag/index.d.ts +0 -1
  38. package/dist/esm/types/components/Select/index.d.ts +0 -1
  39. package/dist/esm/types/components/Skeleton/Avatar/Avatar.d.ts +0 -8
  40. package/dist/esm/types/components/Skeleton/Avatar/index.d.ts +0 -1
  41. package/dist/esm/types/components/Skeleton/Button/Button.d.ts +0 -5
  42. package/dist/esm/types/components/Skeleton/Button/index.d.ts +0 -1
  43. package/dist/esm/types/components/Skeleton/Image/Image.d.ts +0 -5
  44. package/dist/esm/types/components/Skeleton/Image/index.d.ts +0 -1
  45. package/dist/esm/types/components/Skeleton/Input/Input.d.ts +0 -5
  46. package/dist/esm/types/components/Skeleton/Input/index.d.ts +0 -1
  47. package/dist/esm/types/components/Skeleton/Skeleton.d.ts +0 -10
  48. package/dist/esm/types/components/Skeleton/index.d.ts +0 -1
  49. package/dist/esm/types/components/Switch/Switch.d.ts +0 -8
  50. package/dist/esm/types/components/Switch/index.d.ts +0 -1
  51. package/dist/esm/types/components/Upload/Upload.d.ts +0 -5
  52. package/dist/esm/types/components/Upload/index.d.ts +0 -1
  53. package/dist/esm/types/helpers/flatten.d.ts +0 -2
  54. package/dist/esm/types/helpers/index.d.ts +0 -4
  55. package/dist/esm/types/helpers/mask.d.ts +0 -7
  56. package/dist/esm/types/hooks/useForm.d.ts +0 -4
  57. package/dist/esm/types/hooks/useWatch.d.ts +0 -9
  58. package/dist/esm/types/index.d.ts +0 -61
  59. package/dist/esm/types/types/button.d.ts +0 -43
  60. package/dist/esm/types/types/checkbox.d.ts +0 -24
  61. package/dist/esm/types/types/datepicker.d.ts +0 -120
  62. package/dist/esm/types/types/empty.d.ts +0 -7
  63. package/dist/esm/types/types/form.d.ts +0 -116
  64. package/dist/esm/types/types/index.d.ts +0 -25
  65. package/dist/esm/types/types/input.d.ts +0 -53
  66. package/dist/esm/types/types/radio.d.ts +0 -58
  67. package/dist/esm/types/types/select.d.ts +0 -102
  68. package/dist/esm/types/types/skeleton.d.ts +0 -50
  69. package/dist/esm/types/types/switch.d.ts +0 -18
  70. package/dist/esm/types/types/upload.d.ts +0 -54
  71. package/dist/esm/types/utils/index.d.ts +0 -15
  72. package/dist/esm/types/utils/lazy.d.ts +0 -1
  73. package/dist/index.d.ts +0 -151
  74. package/dist/index.esm.js +0 -4129
  75. package/dist/index.esm.js.map +0 -1
  76. package/dist/index.js +0 -4173
  77. package/dist/index.js.map +0 -1
@@ -143,4 +143,4 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
143
143
 
144
144
  Form.Item = FormItem;
145
145
 
146
- export default memo(Form);
146
+ export default Form;
@@ -1,6 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { useRef, useState } from 'react';
3
+ import { useRef
4
+ // useState
5
+ } from 'react';
4
6
  import { RuleTypes } from '../types';
5
7
  import type {
6
8
  FieldData,
@@ -43,7 +45,7 @@ const useForm = (
43
45
  const trashFormRef = useRef<Record<string, RuleTypes>>({ ...initialValues });
44
46
  const fieldInstancesRef = useRef<Record<string, FieldInstancesRef | null>>({});
45
47
 
46
- const [isReseting, setIsReseting] = useState(false);
48
+ // const [isReseting, setIsReseting] = useState(false);
47
49
 
48
50
  const errorsRef = useRef<Record<string, string[]>>({});
49
51
 
@@ -319,7 +321,7 @@ const useForm = (
319
321
 
320
322
  formSubscribers.current.forEach(callback => callback(getFieldsValue()));
321
323
 
322
- setIsReseting(prev => !prev);
324
+ // setIsReseting(prev => !prev);
323
325
  }
324
326
 
325
327
  async function submit() {
@@ -431,7 +433,7 @@ const useForm = (
431
433
  subscribeToFields,
432
434
  setScrollToFirstError,
433
435
  scrollToFirstError,
434
- isReseting,
436
+ // isReseting,
435
437
  setOnFinish,
436
438
  setOnFieldsChange,
437
439
  setOnValuesChange,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-ui-design",
3
- "version": "0.6.23",
3
+ "version": "0.6.24",
4
4
  "license": "ISC",
5
5
  "author": "Gabriel Boyajyan",
6
6
  "main": "dist/index.js",
@@ -1,5 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { ButtonProps } from '../../types/button';
3
- import './style.css';
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, __injected, child, ...restProps }: ButtonProps) => ReactElement;
5
- export default ButtonComponent;
@@ -1 +0,0 @@
1
- export { default as Button } from './Button';
@@ -1,8 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { CheckboxProps } from '../../types/checkbox';
3
- import './style.css';
4
- declare const Checkbox: {
5
- ({ prefixCls, className, defaultChecked, checked, style, disabled, onChange, onClick, onMouseEnter, onMouseLeave, onKeyPress, onKeyDown, tabIndex, name, children, id, autoFocus, type, value, required, noStyle, titleClick, ref }: CheckboxProps): ReactElement;
6
- displayName: string;
7
- };
8
- export default Checkbox;
@@ -1 +0,0 @@
1
- export { default as Checkbox } from './Checkbox';
@@ -1,7 +0,0 @@
1
- import { FC, PropsWithChildren, ReactElement } from 'react';
2
- type Props = {
3
- condition: boolean;
4
- wrapper: (children: PropsWithChildren['children']) => ReactElement;
5
- } & PropsWithChildren;
6
- export declare const ConditionalWrapper: FC<Props>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { TDatePickerProps } from '../../types/datepicker';
3
- import './style.css';
4
- export declare const NUMBER_SIX = 6;
5
- export declare const MONTH_LENGTH = 11;
6
- export declare const NEXT_DAYS_COUNT_AS_CURRENT_MUNTH = 35;
7
- 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) => React.JSX.Element;
8
- export default DatePicker;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { TRangePickerProps } from '../../../types/datepicker';
3
- import './style.css';
4
- declare const RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, onOpenChange, onCalendarChange, style, className, separator, defaultValue, bordered }: TRangePickerProps) => React.JSX.Element;
5
- export default RangePicker;
@@ -1 +0,0 @@
1
- export { default as RangePicker } from '../RangePicker/RangePicker';
@@ -1,5 +0,0 @@
1
- import { FC } from 'react';
2
- import { TimePickerProps } from '../../../types/datepicker';
3
- import './style.css';
4
- declare const TimePicker: FC<TimePickerProps>;
5
- export default TimePicker;
@@ -1 +0,0 @@
1
- export { default as TimePicker } from '../TimePicker/TimePicker';
@@ -1 +0,0 @@
1
- export { default as DatePicker } from '../DatePicker/DatePicker';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { EmptyContentProps } from '../../types/empty';
3
- import './style.css';
4
- declare const EmptyContent: ({ icon, style, className, title, description, prefixCls }: EmptyContentProps) => React.JSX.Element;
5
- export default EmptyContent;
@@ -1 +0,0 @@
1
- export { default as Empty } from '../Empty/Empty';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { FormInstance, FormProps } from '../../types/form';
3
- export declare const FormContext: React.Context<FormInstance | null>;
4
- declare const _default: React.NamedExoticComponent<FormProps>;
5
- export default _default;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { FormItemProps } from '../../../types/form';
3
- import './style.css';
4
- declare const FormItem: React.MemoExoticComponent<({ prefixCls, name, label, rules, children, className, layout, style, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps) => React.JSX.Element>;
5
- export default FormItem;
@@ -1 +0,0 @@
1
- export { default as Item } from './Item';
@@ -1 +0,0 @@
1
- export { default as Form } from './Form';
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- declare const ClearIcon: () => React.JSX.Element;
3
- declare const ArrowIcon: ({ isOpen }: {
4
- isOpen: boolean;
5
- }) => React.JSX.Element;
6
- declare const LoadingIcon: () => React.JSX.Element;
7
- declare const CheckIcon: () => React.JSX.Element;
8
- declare const SearchIcon: () => React.JSX.Element;
9
- declare const CalendarIcon: () => React.JSX.Element;
10
- declare const SuccessIcon: () => React.JSX.Element;
11
- declare const ErrorIcon: () => React.JSX.Element;
12
- declare const DateDistanceIcon: () => React.JSX.Element;
13
- declare const TimeIcon: () => React.JSX.Element;
14
- declare const StampleIcon: () => React.JSX.Element;
15
- declare const TrashIcon: () => React.JSX.Element;
16
- declare const SpinerIcon: () => React.JSX.Element;
17
- export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon };
@@ -1 +0,0 @@
1
- export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon } from './Icons';
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from '../../types/input';
3
- import Textarea from './Textarea/Textarea';
4
- import './style.css';
5
- declare const InputComponent: {
6
- ({ size, error, suffix, prefix, addonAfter, addonBefore, onPressEnter, disabled, allowClear, prefixCls, className, value, iconRender, noStyle, feedbackIcons, mask, maskChar, maskRegex, __injected, defaultValue, child, ref, ...props }: InputProps): React.JSX.Element;
7
- displayName: string;
8
- };
9
- declare const Input: typeof InputComponent & {
10
- TextArea: typeof Textarea;
11
- };
12
- export default Input;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { TextareaProps } from '../../../types/input';
3
- import './style.css';
4
- declare const Textarea: {
5
- ({ prefixCls, value, className, style, autoSize, onPressEnter, onResize, styles, bordered, size, status, rootClassName, variant, error, allowClear, ref, ...props }: TextareaProps): React.JSX.Element;
6
- displayName: string;
7
- };
8
- export default Textarea;
@@ -1 +0,0 @@
1
- export { default as Textarea } from '../Textarea/Textarea';
@@ -1 +0,0 @@
1
- export { default as Input } from '../Input/Input';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { RadioButtonProps } from '../../../types/radio';
3
- import './style.css';
4
- declare const RadioButton: ({ prefixCls, className, checked, disabled, children, size, ...props }: RadioButtonProps) => React.JSX.Element;
5
- export default RadioButton;
@@ -1 +0,0 @@
1
- export { default as RadioButton } from '../../Radio/Button/Button';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { RadioGroupProps } from '../../../types/radio';
3
- import './style.css';
4
- declare const RadioGroup: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, className, options, children, ...props }: RadioGroupProps) => React.JSX.Element;
5
- export default RadioGroup;
@@ -1 +0,0 @@
1
- export { default as RadioGroup } from '../../Radio/Group/Group';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { RadioProps } from '../../types/radio';
3
- import './style.css';
4
- declare const Radio: {
5
- ({ prefixCls, className, value, onChange, onClick, disabled, children, name, title, defaultChecked, checked, onBlur, onFocus, onMouseEnter, onMouseLeave, noStyle, ref }: RadioProps): React.JSX.Element;
6
- displayName: string;
7
- };
8
- export default Radio;
@@ -1 +0,0 @@
1
- export { default as Radio } from '../Radio/Radio';
@@ -1,5 +0,0 @@
1
- import { FC } from 'react';
2
- import { OptionProps } from '../../../types/select';
3
- import './style.css';
4
- declare const Option: FC<OptionProps>;
5
- export default Option;
@@ -1 +0,0 @@
1
- export { default as Option } from '../../Select/Option/Option';
@@ -1,10 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { SelectProps } from '../../types/select';
3
- import './style.css';
4
- declare const Select: {
5
- ({ prefixCls, id, searchValue, autoClearSearchValue, filterOption, optionFilterProp, children, options, listHeight, menuItemSelectedIcon, mode, value, defaultValue, maxCount, disabled, loading, placeholder, allowClear, filterable, defaultOpen, size, error, dropdownClassName, className, suffixIcon, searchIcon, style, showSearch, open, closeFromParent, showArrow, notFoundContent, noStyle, feedbackIcons, placement, removeIcon, maxTagCount, onSearch, onSelect, onDeselect, onClear, onChange, onClose, tagRender, getPopupContainer, dropdownRender, onDropdownVisibleChange, ref }: SelectProps): ReactElement;
6
- displayName: string;
7
- } & {
8
- Option: React.FC<import("../../types/select").OptionProps>;
9
- };
10
- export default Select;
@@ -1,5 +0,0 @@
1
- import { FC } from 'react';
2
- import { CustomTagProps } from '../../../types/select';
3
- import './style.css';
4
- declare const Tag: FC<CustomTagProps>;
5
- export default Tag;
@@ -1 +0,0 @@
1
- export { default as Tag } from '../../Select/Tag/Tag';
@@ -1 +0,0 @@
1
- export { default as Select } from '../Select/Select';
@@ -1,8 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default as SkeletonAvatar } from './Avatar';
@@ -1,5 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default as SkeletonButton } from './Button';
@@ -1,5 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default as SkeletonImage } from './Image';
@@ -1,5 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default as SkeletonInput } from './Input';
@@ -1,10 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { SkeletonProps } from '../../types/skeleton';
3
- import './style.css';
4
- declare const Skeleton: (({ prefixCls, active, className, style, avatar, paragraph, round, title, teamLogo }: SkeletonProps) => ReactElement) & {
5
- Image: React.FC<import("../../types/skeleton").SkeletonImageProps>;
6
- Input: React.FC<import("../../types/skeleton").SkeletonInputProps>;
7
- Avatar: React.FC<import("../../types/skeleton").SkeletonAvatarProps>;
8
- Button: React.FC<import("../../types/skeleton").SkeletonButtonProps>;
9
- };
10
- export default Skeleton;
@@ -1 +0,0 @@
1
- export { default as Skeleton } from './Skeleton';
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { SwitchProps } from '../../types/switch';
3
- import './index.css';
4
- declare const Switch: {
5
- ({ prefixCls, checked, onChange, onClick, disabled, className, style, defaultChecked, value }: SwitchProps): React.JSX.Element;
6
- displayName: string;
7
- };
8
- export default Switch;
@@ -1 +0,0 @@
1
- export { default as Switch } from './Switch';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { UploadProps } from '../../types/upload';
3
- import './style.css';
4
- 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) => React.JSX.Element;
5
- export default Upload;
@@ -1 +0,0 @@
1
- export { default as Upload } from '../Upload/Upload';
@@ -1,2 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- export declare function flattenChildren(children: ReactNode): ReactElement[];
@@ -1,4 +0,0 @@
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;
@@ -1,7 +0,0 @@
1
- export declare const MASK_CHAR = "_";
2
- export declare const MASK_REGEX: RegExp;
3
- export declare function stripMask(value: string, mask: string, maskChar?: string): string;
4
- export declare function applyMask(raw: string, mask: string, maskChar?: string): {
5
- masked: string;
6
- rawIndex: number;
7
- };
@@ -1,4 +0,0 @@
1
- import { RuleTypes } from '../types';
2
- import type { FieldData, FormInstance } from '../types/form';
3
- declare const useForm: (initialValues?: Record<string, RuleTypes>, onFieldsChange?: (changedFields: FieldData[]) => void, onValuesChange?: (changedValues: Record<string, RuleTypes>, allValues: Record<string, RuleTypes>) => void, scrollToFirstError?: boolean, onFinish?: ((values: Record<string, RuleTypes>) => void) | undefined) => FormInstance;
4
- export { useForm };
@@ -1,9 +0,0 @@
1
- import { RuleType } from '../types';
2
- import { FormInstance } from '../types/form';
3
- type UseWatchProps = {
4
- name?: string;
5
- defaultValue?: RuleType;
6
- form?: FormInstance;
7
- };
8
- export declare const useWatch: ({ name, defaultValue, form }: UseWatchProps) => any;
9
- export {};
@@ -1,61 +0,0 @@
1
- import './styles/global.css';
2
- declare const Button: import("react").ComponentType<import("@/types/button").ButtonProps>;
3
- declare const Checkbox: import("react").ComponentType<import("@/types/checkbox").CheckboxProps>;
4
- declare const Switch: import("react").ComponentType<import("./types/switch").SwitchProps>;
5
- declare const Empty: import("react").ComponentType<import("./types/empty").EmptyContentProps>;
6
- declare const Upload: import("react").ComponentType<import("@/types/upload").UploadProps>;
7
- declare const DatePicker: import("react").ComponentType<import("@/types/datepicker").TDatePickerProps>;
8
- declare const RangePicker: import("react").ComponentType<import("@/types/datepicker").TRangePickerProps>;
9
- declare const TimePicker: import("react").ComponentType<import("@/types/datepicker").TimePickerProps>;
10
- declare const Form: import("react").ComponentType<import("@/types/form").FormProps>;
11
- declare const FormItem: import("react").ComponentType<import("@/types").DefaultProps & {
12
- name: string;
13
- label?: string | import("react").ReactNode;
14
- rules?: import("@/types/form").RuleObject[];
15
- initialValue?: import("@/types").RuleType;
16
- children: (import("react").ReactElement & {
17
- props: {
18
- value: import("@/types").RuleTypes;
19
- };
20
- }) | (import("react").ReactElement & {
21
- props: {
22
- value: import("@/types").RuleTypes;
23
- };
24
- })[];
25
- layout?: import("@/types/form").FormLayoutTypes;
26
- dependencies?: string[];
27
- normalize?: (value: import("@/types").RuleType, prevValue: import("@/types").RuleType, allValues: import("@/types").RuleType) => import("@/types").RuleType;
28
- feedbackIcons?: boolean;
29
- extra?: import("react").ReactNode;
30
- hideLabel?: boolean;
31
- removeErrorMessageHeight?: boolean;
32
- }>;
33
- declare const Input: import("react").ComponentType<import("@/types/input").InputProps>;
34
- declare const Textarea: import("react").ComponentType<import("@/types/input").TextareaProps>;
35
- declare const Radio: import("react").ComponentType<import("@/types/radio").RadioProps>;
36
- declare const RadioButton: import("react").ComponentType<import("@/types/radio").RadioButtonProps>;
37
- declare const RadioGroup: import("react").ComponentType<import("@/types/radio").RadioGroupProps>;
38
- declare const Select: import("react").ComponentType<import("@/types/select").SelectProps>;
39
- declare const Option: import("react").ComponentType<import("@/types/select").OptionProps>;
40
- declare const Tag: import("react").ComponentType<import("@/types/select").CustomTagProps>;
41
- declare const Skeleton: import("react").ComponentType<import("./types/skeleton").SkeletonProps>;
42
- declare const SkeletonAvatar: import("react").ComponentType<import("./types/skeleton").SkeletonAvatarProps>;
43
- declare const SkeletonButton: import("react").ComponentType<import("./types/skeleton").SkeletonButtonProps>;
44
- declare const SkeletonImage: import("react").ComponentType<import("./types/skeleton").SkeletonImageProps>;
45
- declare const SkeletonInput: import("react").ComponentType<import("./types/skeleton").SkeletonInputProps>;
46
- export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, FormItem, Input, Textarea, Radio, RadioButton, RadioGroup, Select, Option, Tag, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, Upload, Switch };
47
- export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
48
- export { useForm } from '@/hooks/useForm';
49
- export { useWatch } from '@/hooks/useWatch';
50
- export type { FormInstance, RuleObject, RuleRender, FieldData, FieldInstancesInputRef, FieldError, FormProps, FormItemChildComponentProps } from '@/types/form';
51
- export type { DefaultProps, TargetProps, RuleTypes, RuleType, MouseEventHandlerSelect, SyntheticBaseEvent } from '@/types';
52
- export type { CheckboxProps } from '@/types/checkbox';
53
- export type { InputProps, TextareaProps } from '@/types/input';
54
- export type { ButtonProps, BaseButtonProps, ButtonType } from '@/types/button';
55
- export type { RadioProps, RadioGroupProps, RadioButtonProps } from '@/types/radio';
56
- export type { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
57
- export type { SelectProps, OptionType, OptionProps, CustomTagProps, TagProps, DisplayValueType } from '@/types/select';
58
- export type { RcFile, UploadFile, UploadProps, UploadChangeParam } from '@/types/upload';
59
- export { FormContext } from '@/components/Form/Form';
60
- export { clsx, createArray, parseValue } from '@/helpers';
61
- export { flattenChildren } from '@/helpers/flatten';
@@ -1,43 +0,0 @@
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
- child?: ReactNode;
39
- }
40
- export interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
41
- href?: string;
42
- htmlType?: ButtonHTMLType;
43
- }
@@ -1,24 +0,0 @@
1
- import { ForwardedRef, 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
- titleClick?: boolean;
23
- ref?: ForwardedRef<HTMLDivElement>;
24
- };