x-ui-design 0.6.52 → 0.6.53

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 (78) hide show
  1. package/lib/components/Form/Item/Item.tsx +0 -3
  2. package/package.json +1 -1
  3. package/src/app/page.tsx +12 -18
  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 -7
  18. package/dist/esm/types/components/Form/Item/Item.d.ts +0 -8
  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 -8
  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 -7
  57. package/dist/esm/types/hooks/useWatch.d.ts +0 -9
  58. package/dist/esm/types/hooks/useWatchError.d.ts +0 -2
  59. package/dist/esm/types/index.d.ts +0 -40
  60. package/dist/esm/types/types/button.d.ts +0 -43
  61. package/dist/esm/types/types/checkbox.d.ts +0 -24
  62. package/dist/esm/types/types/datepicker.d.ts +0 -120
  63. package/dist/esm/types/types/empty.d.ts +0 -7
  64. package/dist/esm/types/types/form.d.ts +0 -122
  65. package/dist/esm/types/types/index.d.ts +0 -25
  66. package/dist/esm/types/types/input.d.ts +0 -53
  67. package/dist/esm/types/types/radio.d.ts +0 -58
  68. package/dist/esm/types/types/select.d.ts +0 -102
  69. package/dist/esm/types/types/skeleton.d.ts +0 -50
  70. package/dist/esm/types/types/switch.d.ts +0 -18
  71. package/dist/esm/types/types/upload.d.ts +0 -54
  72. package/dist/esm/types/utils/index.d.ts +0 -15
  73. package/dist/esm/types/utils/lazy.d.ts +0 -1
  74. package/dist/index.d.ts +0 -129
  75. package/dist/index.esm.js +0 -4174
  76. package/dist/index.esm.js.map +0 -1
  77. package/dist/index.js +0 -4218
  78. package/dist/index.js.map +0 -1
@@ -101,9 +101,6 @@ const FormItem = ({
101
101
  [rules]
102
102
  );
103
103
 
104
- console.log(name);
105
-
106
-
107
104
  return (
108
105
  <div
109
106
  style={style}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-ui-design",
3
- "version": "0.6.52",
3
+ "version": "0.6.53",
4
4
  "license": "ISC",
5
5
  "author": "Gabriel Boyajyan",
6
6
  "main": "dist/index.js",
package/src/app/page.tsx CHANGED
@@ -1863,6 +1863,8 @@ export default function Home() {
1863
1863
 
1864
1864
  const fields = useWatch({ form });
1865
1865
 
1866
+ console.log(fields);
1867
+
1866
1868
  // const disableDate = useCallback(
1867
1869
  // (date: any) => {
1868
1870
  // date = dayjs(date);
@@ -1889,18 +1891,18 @@ export default function Home() {
1889
1891
  // [dates, period]
1890
1892
  // );
1891
1893
 
1892
- const onOpenChange = useCallback((open: boolean) => {
1893
- if (open) {
1894
- setDates([]);
1895
- }
1896
- }, []);
1894
+ // const onOpenChange = useCallback((open: boolean) => {
1895
+ // if (open) {
1896
+ // setDates([]);
1897
+ // }
1898
+ // }, []);
1897
1899
 
1898
1900
  return (
1899
1901
  <>
1900
1902
  <Form
1901
1903
  form={form}
1902
1904
  layout="vertical"
1903
- style={{ width: 400 }}
1905
+ // style={{ width: 400 }}
1904
1906
  scrollToFirstError={true}
1905
1907
  // onValuesChange={(values) => {
1906
1908
  // console.log(values, form.isFieldsTouched());
@@ -1912,7 +1914,7 @@ export default function Home() {
1912
1914
  >
1913
1915
  {current === 0
1914
1916
  ? <>
1915
- {fields.country === 'BR' ? <Item rules={[{ required: true }]} name="email" label="Email">
1917
+ {true ? <Item rules={[{ required: true }]} name="email" label="Email">
1916
1918
  <div>
1917
1919
  <Input placeholder="Email" value={value} onChange={(e) => setValue(e.target.value)} />
1918
1920
  </div>
@@ -1920,27 +1922,19 @@ export default function Home() {
1920
1922
 
1921
1923
  <Item rules={[{ required: true }]} name="type" label="Type" initialValue={type}>
1922
1924
  <RadioGroup>
1923
- <Radio checked={type === 'full'} name="type" value='full' />
1924
- <Radio checked={type === 'partial'} name="type" value='partial' />
1925
+ <Radio checked={type === 'full'} name="type" value='full' onClick={() => setType('full')} />
1926
+ <Radio checked={type === 'partial'} name="type" value='partial' onClick={() => setType('partial')} />
1925
1927
  </RadioGroup>
1926
1928
  </Item>
1927
1929
 
1928
1930
  <Item rules={[{ required: true }]} name="country" label="Country">
1929
1931
  <Select
1930
1932
  showSearch
1931
- style={{ width: 400 }}
1933
+ // style={{ width: 400 }}
1932
1934
  placeholder="Select..."
1933
1935
  options={CountryCodes}
1934
1936
  />
1935
1937
  </Item>
1936
-
1937
- <Item rules={[{ required: true }]} name="gender" label="Gender">
1938
- <Input mask="___.___.___.__" placeholder="Gender" />
1939
- </Item>
1940
-
1941
- <Item rules={[{ required: true }]} name="username" label="Username">
1942
- <Input placeholder="Username" />
1943
- </Item>
1944
1938
  </>
1945
1939
  :
1946
1940
  <>
@@ -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,7 +0,0 @@
1
- import React, { FC } from 'react';
2
- import { FormInstance, FormItemProps, FormProps } from '../../types/form';
3
- export declare const FormContext: React.Context<FormInstance | null>;
4
- declare const Form: FC<FormProps> & {
5
- Item: FC<FormItemProps>;
6
- };
7
- export default Form;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { FormItemProps } from '../../../types/form';
3
- import './style.css';
4
- declare const FormItem: {
5
- ({ prefixCls, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps): React.JSX.Element;
6
- displayName: string;
7
- };
8
- 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,8 +0,0 @@
1
- import { 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
- 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,7 +0,0 @@
1
- import { RuleTypes } from '../types';
2
- import type { FieldData, FieldError, 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, onFinishFailed?: (errorInfo: {
4
- values: Record<string, RuleTypes>;
5
- errorFields: Pick<FieldError, "errors" | "name">[];
6
- }) => void) => FormInstance;
7
- 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,2 +0,0 @@
1
- import type { FormInstance } from '../types/form';
2
- export declare function useWatchError(form: FormInstance, name: string): string[] | undefined;
@@ -1,40 +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/form").FormItemProps>;
12
- declare const Input: import("react").ComponentType<import("@/types/input").InputProps>;
13
- declare const Textarea: import("react").ComponentType<import("@/types/input").TextareaProps>;
14
- declare const Radio: import("react").ComponentType<import("@/types/radio").RadioProps>;
15
- declare const RadioButton: import("react").ComponentType<import("@/types/radio").RadioButtonProps>;
16
- declare const RadioGroup: import("react").ComponentType<import("@/types/radio").RadioGroupProps>;
17
- declare const Select: import("react").ComponentType<import("@/types/select").SelectProps>;
18
- declare const Option: import("react").ComponentType<import("@/types/select").OptionProps>;
19
- declare const Tag: import("react").ComponentType<import("@/types/select").CustomTagProps>;
20
- declare const Skeleton: import("react").ComponentType<import("./types/skeleton").SkeletonProps>;
21
- declare const SkeletonAvatar: import("react").ComponentType<import("./types/skeleton").SkeletonAvatarProps>;
22
- declare const SkeletonButton: import("react").ComponentType<import("./types/skeleton").SkeletonButtonProps>;
23
- declare const SkeletonImage: import("react").ComponentType<import("./types/skeleton").SkeletonImageProps>;
24
- declare const SkeletonInput: import("react").ComponentType<import("./types/skeleton").SkeletonInputProps>;
25
- export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, FormItem, Input, Textarea, Radio, RadioButton, RadioGroup, Select, Option, Tag, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, Upload, Switch };
26
- export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
27
- export { useForm } from '@/hooks/useForm';
28
- export { useWatch } from '@/hooks/useWatch';
29
- export type { FormInstance, RuleObject, RuleRender, FieldData, FieldInstancesInputRef, FieldError, FormProps, FormItemChildComponentProps } from '@/types/form';
30
- export type { DefaultProps, TargetProps, RuleTypes, RuleType, MouseEventHandlerSelect, SyntheticBaseEvent } from '@/types';
31
- export type { CheckboxProps } from '@/types/checkbox';
32
- export type { InputProps, TextareaProps } from '@/types/input';
33
- export type { ButtonProps, BaseButtonProps, ButtonType } from '@/types/button';
34
- export type { RadioProps, RadioGroupProps, RadioButtonProps } from '@/types/radio';
35
- export type { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
36
- export type { SelectProps, OptionType, OptionProps, CustomTagProps, TagProps, DisplayValueType } from '@/types/select';
37
- export type { RcFile, UploadFile, UploadProps, UploadChangeParam } from '@/types/upload';
38
- export { FormContext } from '@/components/Form/Form';
39
- export { clsx, createArray, parseValue } from '@/helpers';
40
- 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
- };