x-ui-design 0.6.15 → 0.6.17

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 (79) hide show
  1. package/lib/components/Form/Form.tsx +1 -0
  2. package/lib/components/Form/Item/Item.tsx +6 -5
  3. package/lib/hooks/useForm.ts +1 -1
  4. package/package.json +1 -1
  5. package/src/app/page.tsx +2 -0
  6. package/dist/esm/types/components/Button/Button.d.ts +0 -5
  7. package/dist/esm/types/components/Button/index.d.ts +0 -1
  8. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -8
  9. package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
  10. package/dist/esm/types/components/ConditionalWrapper/index.d.ts +0 -7
  11. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +0 -8
  12. package/dist/esm/types/components/DatePicker/RangePicker/RangePicker.d.ts +0 -5
  13. package/dist/esm/types/components/DatePicker/RangePicker/index.d.ts +0 -1
  14. package/dist/esm/types/components/DatePicker/TimePicker/TimePicker.d.ts +0 -5
  15. package/dist/esm/types/components/DatePicker/TimePicker/index.d.ts +0 -1
  16. package/dist/esm/types/components/DatePicker/index.d.ts +0 -1
  17. package/dist/esm/types/components/Empty/Empty.d.ts +0 -5
  18. package/dist/esm/types/components/Empty/index.d.ts +0 -1
  19. package/dist/esm/types/components/Form/Form.d.ts +0 -7
  20. package/dist/esm/types/components/Form/Item/Item.d.ts +0 -8
  21. package/dist/esm/types/components/Form/Item/index.d.ts +0 -1
  22. package/dist/esm/types/components/Form/index.d.ts +0 -1
  23. package/dist/esm/types/components/Icons/Icons.d.ts +0 -17
  24. package/dist/esm/types/components/Icons/index.d.ts +0 -1
  25. package/dist/esm/types/components/Input/Input.d.ts +0 -12
  26. package/dist/esm/types/components/Input/Textarea/Textarea.d.ts +0 -8
  27. package/dist/esm/types/components/Input/Textarea/index.d.ts +0 -1
  28. package/dist/esm/types/components/Input/index.d.ts +0 -1
  29. package/dist/esm/types/components/Radio/Button/Button.d.ts +0 -5
  30. package/dist/esm/types/components/Radio/Button/index.d.ts +0 -1
  31. package/dist/esm/types/components/Radio/Group/Group.d.ts +0 -5
  32. package/dist/esm/types/components/Radio/Group/index.d.ts +0 -1
  33. package/dist/esm/types/components/Radio/Radio.d.ts +0 -8
  34. package/dist/esm/types/components/Radio/index.d.ts +0 -1
  35. package/dist/esm/types/components/Select/Option/Option.d.ts +0 -5
  36. package/dist/esm/types/components/Select/Option/index.d.ts +0 -1
  37. package/dist/esm/types/components/Select/Select.d.ts +0 -10
  38. package/dist/esm/types/components/Select/Tag/Tag.d.ts +0 -5
  39. package/dist/esm/types/components/Select/Tag/index.d.ts +0 -1
  40. package/dist/esm/types/components/Select/index.d.ts +0 -1
  41. package/dist/esm/types/components/Skeleton/Avatar/Avatar.d.ts +0 -8
  42. package/dist/esm/types/components/Skeleton/Avatar/index.d.ts +0 -1
  43. package/dist/esm/types/components/Skeleton/Button/Button.d.ts +0 -5
  44. package/dist/esm/types/components/Skeleton/Button/index.d.ts +0 -1
  45. package/dist/esm/types/components/Skeleton/Image/Image.d.ts +0 -5
  46. package/dist/esm/types/components/Skeleton/Image/index.d.ts +0 -1
  47. package/dist/esm/types/components/Skeleton/Input/Input.d.ts +0 -5
  48. package/dist/esm/types/components/Skeleton/Input/index.d.ts +0 -1
  49. package/dist/esm/types/components/Skeleton/Skeleton.d.ts +0 -10
  50. package/dist/esm/types/components/Skeleton/index.d.ts +0 -1
  51. package/dist/esm/types/components/Switch/Switch.d.ts +0 -8
  52. package/dist/esm/types/components/Switch/index.d.ts +0 -1
  53. package/dist/esm/types/components/Upload/Upload.d.ts +0 -5
  54. package/dist/esm/types/components/Upload/index.d.ts +0 -1
  55. package/dist/esm/types/helpers/flatten.d.ts +0 -2
  56. package/dist/esm/types/helpers/index.d.ts +0 -4
  57. package/dist/esm/types/helpers/mask.d.ts +0 -7
  58. package/dist/esm/types/hooks/useForm.d.ts +0 -4
  59. package/dist/esm/types/hooks/useWatch.d.ts +0 -9
  60. package/dist/esm/types/index.d.ts +0 -40
  61. package/dist/esm/types/types/button.d.ts +0 -43
  62. package/dist/esm/types/types/checkbox.d.ts +0 -24
  63. package/dist/esm/types/types/datepicker.d.ts +0 -120
  64. package/dist/esm/types/types/empty.d.ts +0 -7
  65. package/dist/esm/types/types/form.d.ts +0 -116
  66. package/dist/esm/types/types/index.d.ts +0 -25
  67. package/dist/esm/types/types/input.d.ts +0 -53
  68. package/dist/esm/types/types/radio.d.ts +0 -58
  69. package/dist/esm/types/types/select.d.ts +0 -102
  70. package/dist/esm/types/types/skeleton.d.ts +0 -50
  71. package/dist/esm/types/types/switch.d.ts +0 -18
  72. package/dist/esm/types/types/upload.d.ts +0 -54
  73. package/dist/esm/types/utils/index.d.ts +0 -15
  74. package/dist/esm/types/utils/lazy.d.ts +0 -1
  75. package/dist/index.d.ts +0 -129
  76. package/dist/index.esm.js +0 -4111
  77. package/dist/index.esm.js.map +0 -1
  78. package/dist/index.js +0 -4155
  79. package/dist/index.js.map +0 -1
@@ -112,6 +112,7 @@ const Form: FC<FormProps> & { Item: FC<FormItemProps> } = ({
112
112
 
113
113
  return (
114
114
  <FormContext.Provider value={formInstance}>
115
+ {console.log(1)}
115
116
  <form
116
117
  style={style}
117
118
  ref={formRef}
@@ -3,6 +3,7 @@
3
3
  import React, {
4
4
  Children,
5
5
  isValidElement,
6
+ memo,
6
7
  ReactElement,
7
8
  useContext,
8
9
  useEffect,
@@ -23,7 +24,7 @@ import { prefixClsFormItem } from '../../../utils';
23
24
  import { FormContext } from '../Form';
24
25
  import './style.css';
25
26
 
26
- const FormItem = ({
27
+ const FormItem = memo(({
27
28
  prefixCls = prefixClsFormItem,
28
29
  name,
29
30
  label,
@@ -138,9 +139,9 @@ const FormItem = ({
138
139
  })}
139
140
  </div>
140
141
  );
141
- };
142
+ });
142
143
 
143
- const FormItemChildComponent = ({
144
+ const FormItemChildComponent = memo(({
144
145
  child,
145
146
  name,
146
147
  error,
@@ -247,10 +248,10 @@ const FormItemChildComponent = ({
247
248
  return <child.type
248
249
  {...props}
249
250
  ref={ref}
251
+ name={name}
250
252
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
251
253
  // @ts-expect-error
252
254
  {...child.props}
253
- name={name}
254
255
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
255
256
  // @ts-expect-error
256
257
  size={childProps.size || props.size}
@@ -267,7 +268,7 @@ const FormItemChildComponent = ({
267
268
  };
268
269
 
269
270
  return injectPropsIntoFinalLeaf(child)
270
- };
271
+ });
271
272
 
272
273
  FormItem.displayName = 'FormItem';
273
274
 
@@ -281,7 +281,7 @@ const useForm = (
281
281
  if (_scrollToFirstError.current) {
282
282
  const firstErrorContent = document.querySelectorAll('.xUi-form-item-has-error')?.[0];
283
283
 
284
- console.log(firstErrorContent);
284
+ console.log('firstErrorContent', firstErrorContent);
285
285
 
286
286
  if (firstErrorContent) {
287
287
  firstErrorContent.closest('.xUi-form-item')?.scrollIntoView({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-ui-design",
3
- "version": "0.6.15",
3
+ "version": "0.6.17",
4
4
  "license": "ISC",
5
5
  "author": "Gabriel Boyajyan",
6
6
  "main": "dist/index.js",
package/src/app/page.tsx CHANGED
@@ -1897,6 +1897,8 @@ export default function Home() {
1897
1897
 
1898
1898
  return (
1899
1899
  <>
1900
+ {console.log(0)}
1901
+
1900
1902
  <Form
1901
1903
  form={form}
1902
1904
  size="large"
@@ -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, 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,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,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
- };