gov-ui-core 0.2.6-beta.8 → 0.2.6

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 (104) hide show
  1. package/.storybook/main.ts +36 -37
  2. package/.storybook/preview.tsx +27 -27
  3. package/@types/custom.d.ts +43 -43
  4. package/@types/styles.d.ts +3 -86
  5. package/README.md +46 -46
  6. package/build/App.d.ts +3 -3
  7. package/build/Main.d.ts +5 -5
  8. package/build/components/Button/DropdownButton.d.ts +15 -15
  9. package/build/components/Button/SwitchButton.d.ts +7 -7
  10. package/build/components/Button/index.d.ts +11 -11
  11. package/build/components/Button/styled.d.ts +10 -11
  12. package/build/components/Calendar/CalendarNavigation.d.ts +9 -9
  13. package/build/components/Calendar/constants.d.ts +2 -2
  14. package/build/components/Calendar/index.d.ts +11 -11
  15. package/build/components/Calendar/styled.d.ts +2 -2
  16. package/build/components/Carousel/ArrowButton.d.ts +7 -7
  17. package/build/components/Carousel/index.d.ts +14 -14
  18. package/build/components/Carousel/styled.d.ts +2 -2
  19. package/build/components/Directory/index.d.ts +32 -32
  20. package/build/components/Directory/styled.d.ts +6 -6
  21. package/build/components/EmptyBox/index.d.ts +8 -8
  22. package/build/components/EmptyBox/styled.d.ts +4 -4
  23. package/build/components/Form/Form.d.ts +21 -21
  24. package/build/components/Form/Group.d.ts +6 -6
  25. package/build/components/Form/Item.d.ts +22 -22
  26. package/build/components/Form/index.d.ts +14 -14
  27. package/build/components/Form/styled.d.ts +7 -7
  28. package/build/components/Header/ContentHeader.d.ts +15 -15
  29. package/build/components/Header/styled.d.ts +5 -5
  30. package/build/components/Icons/index.d.ts +14 -14
  31. package/build/components/Input/Checkbox.d.ts +19 -19
  32. package/build/components/Input/ErrorMessage.d.ts +8 -8
  33. package/build/components/Input/Input.d.ts +23 -23
  34. package/build/components/Input/InputNumber.d.ts +8 -8
  35. package/build/components/Input/Radio.d.ts +16 -16
  36. package/build/components/Input/Search.d.ts +13 -13
  37. package/build/components/Input/Select.d.ts +39 -39
  38. package/build/components/Input/TextArea.d.ts +15 -15
  39. package/build/components/Input/index.d.ts +19 -19
  40. package/build/components/Input/styled.d.ts +25 -25
  41. package/build/components/IntlText/index.d.ts +5 -5
  42. package/build/components/Loading/OverlayLoading.d.ts +10 -10
  43. package/build/components/Loading/Spinner.d.ts +9 -9
  44. package/build/components/Loading/styled.d.ts +10 -10
  45. package/build/components/Styled/mixins.d.ts +13 -13
  46. package/build/components/Styled/variable.d.ts +6 -6
  47. package/build/components/Table/AppendTable.d.ts +26 -26
  48. package/build/components/Table/AutoTooltip.d.ts +8 -8
  49. package/build/components/Table/TableBase.d.ts +16 -16
  50. package/build/components/Table/TableLoading.d.ts +9 -9
  51. package/build/components/Table/components/Pagination.d.ts +18 -18
  52. package/build/components/Table/components/PaginationItem.d.ts +9 -9
  53. package/build/components/Table/index.d.ts +27 -27
  54. package/build/components/Table/styled.d.ts +25 -25
  55. package/build/components/ThemeProvider.d.ts +16 -16
  56. package/build/globalStyle.d.ts +5 -5
  57. package/build/index.d.ts +1 -1
  58. package/build/index.js +1 -1
  59. package/build/modules.d.ts +23 -25
  60. package/build/pages/CreateTable.d.ts +20 -20
  61. package/build/pages/FormSample.d.ts +5 -5
  62. package/build/pages/Sample.d.ts +5 -5
  63. package/build/pages/Sample2.d.ts +5 -5
  64. package/build/pages/Sample3.d.ts +5 -5
  65. package/build/pages/Sample4.d.ts +5 -5
  66. package/build/pages/TableSample.d.ts +5 -5
  67. package/build/pages/sampleData.d.ts +59 -59
  68. package/build/reportWebVitals.d.ts +3 -3
  69. package/build/theme.d.ts +45 -3
  70. package/build/utils/customState.d.ts +28 -28
  71. package/build/utils/hookUtils.d.ts +16 -16
  72. package/build/utils/index.d.ts +35 -35
  73. package/config/env.js +104 -104
  74. package/config/getHttpsConfig.js +66 -66
  75. package/config/jest/babelTransform.js +29 -29
  76. package/config/jest/cssTransform.js +14 -14
  77. package/config/jest/fileTransform.js +40 -40
  78. package/config/modules.js +134 -134
  79. package/config/paths.js +77 -77
  80. package/config/webpack/persistentCache/createEnvironmentHash.js +9 -9
  81. package/config/webpack.config.js +756 -756
  82. package/config/webpack.prod.config.js +91 -91
  83. package/config/webpackDevServer.config.js +127 -127
  84. package/doctor-storybook.log +18 -0
  85. package/migration-storybook.log +98 -0
  86. package/package.json +215 -246
  87. package/public/index.html +43 -43
  88. package/public/manifest.json +25 -25
  89. package/public/robots.txt +3 -3
  90. package/scripts/build.js +217 -217
  91. package/scripts/start.js +154 -154
  92. package/scripts/test.js +52 -52
  93. package/tsconfig.json +34 -34
  94. package/.eslintrc.json +0 -54
  95. package/.husky/pre-commit +0 -4
  96. package/.prettierrc +0 -12
  97. package/.stylelintrc.json +0 -16
  98. package/build/components/Button/constants.d.ts +0 -19
  99. package/build/components/TailwindTest/index.d.ts +0 -6
  100. package/build/pages/ButtonSample.d.ts +0 -6
  101. package/build/pages/InputSample.d.ts +0 -6
  102. package/build/pages/TailwindSample.d.ts +0 -1
  103. package/postcss.config.js +0 -8
  104. package/tailwind.config.js +0 -185
@@ -1,32 +1,32 @@
1
- import React from 'react';
2
- export interface DataNode {
3
- children?: DataNode[];
4
- isLeaf?: boolean;
5
- key: string | number;
6
- title?: React.ReactNode;
7
- selectable?: boolean;
8
- className?: string;
9
- style?: React.CSSProperties;
10
- customType?: string;
11
- data?: Record<string, any>;
12
- }
13
- export type CustomKeysType = Record<string, 'loading' | 'loaded'>;
14
- interface IDirectoryProps {
15
- treeData?: DataNode[];
16
- onExpand: (expandKey: Record<string, boolean>, data: DataNode) => void;
17
- onSelect: (selectKey: string, data: DataNode) => Promise<void> | void;
18
- selectedKey?: string;
19
- expandedKeys?: Record<string, boolean>;
20
- customKeys?: Record<string, 'loading' | 'loaded' | 'error'>;
21
- horizontalScroll?: boolean;
22
- customIcons?: {
23
- [key: string]: React.ReactNode;
24
- directory?: React.ReactNode;
25
- file?: React.ReactNode;
26
- };
27
- contents?: React.ReactNode;
28
- titleEllipsis?: boolean;
29
- size?: 'default' | 'small';
30
- }
31
- declare const Directory: React.FC<IDirectoryProps>;
32
- export default Directory;
1
+ import React from 'react';
2
+ export interface DataNode {
3
+ children?: DataNode[];
4
+ isLeaf?: boolean;
5
+ key: string | number;
6
+ title?: React.ReactNode;
7
+ selectable?: boolean;
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ customType?: string;
11
+ data?: Record<string, any>;
12
+ }
13
+ export type CustomKeysType = Record<string, 'loading' | 'loaded'>;
14
+ interface IDirectoryProps {
15
+ treeData?: DataNode[];
16
+ onExpand: (expandKey: Record<string, boolean>, data: DataNode) => void;
17
+ onSelect: (selectKey: string, data: DataNode) => Promise<void> | void;
18
+ selectedKey?: string;
19
+ expandedKeys?: Record<string, boolean>;
20
+ customKeys?: Record<string, 'loading' | 'loaded' | 'error'>;
21
+ horizontalScroll?: boolean;
22
+ customIcons?: {
23
+ [key: string]: React.ReactNode;
24
+ directory?: React.ReactNode;
25
+ file?: React.ReactNode;
26
+ };
27
+ contents?: React.ReactNode;
28
+ titleEllipsis?: boolean;
29
+ size?: 'default' | 'small';
30
+ }
31
+ declare const Directory: React.FC<IDirectoryProps>;
32
+ export default Directory;
@@ -1,6 +1,6 @@
1
- export declare const DirectoryBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
- selectRowNo?: number | undefined;
3
- horizontalScroll?: boolean | undefined;
4
- size?: "small" | "default" | undefined;
5
- }, never>;
6
- export declare const EmptyDirectoryBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const DirectoryBox: import("styled-components").StyledComponent<"div", any, {
2
+ selectRowNo?: number | undefined;
3
+ horizontalScroll?: boolean | undefined;
4
+ size?: "small" | "default" | undefined;
5
+ }, never>;
6
+ export declare const EmptyDirectoryBox: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- interface IEmptyItemsProps {
3
- search?: boolean;
4
- message?: React.ReactNode;
5
- emptyLogo?: React.ReactNode;
6
- }
7
- declare const EmptyBox: React.FC<IEmptyItemsProps>;
8
- export default EmptyBox;
1
+ import React from 'react';
2
+ interface IEmptyItemsProps {
3
+ search?: boolean;
4
+ message?: React.ReactNode;
5
+ emptyLogo?: React.ReactNode;
6
+ }
7
+ declare const EmptyBox: React.FC<IEmptyItemsProps>;
8
+ export default EmptyBox;
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- export declare const EmptyArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
- emptyLogo: React.ReactNode;
4
- }, never>;
1
+ import React from 'react';
2
+ export declare const EmptyArea: import("styled-components").StyledComponent<"div", any, {
3
+ emptyLogo: React.ReactNode;
4
+ }, never>;
@@ -1,21 +1,21 @@
1
- import React from 'react';
2
- import { UseFormReturn } from 'react-hook-form';
3
- export interface IFormProps {
4
- options?: any;
5
- /** submit 동작 및 validation을 통과할 경우 실행 */
6
- submit: (data: any) => void;
7
- /** error 가 아닌 경우에도 공백 object({}) 반환 */
8
- onError?: (errors: any, isSubmitting?: boolean) => void;
9
- onValid?: (isValid: boolean) => void;
10
- /** Form.Item 필수 */
11
- children: React.ReactNode;
12
- layout?: {
13
- label: number | string;
14
- wrapper?: number;
15
- };
16
- hideAsterisk?: boolean;
17
- preventEnter?: boolean;
18
- formClassName?: string;
19
- }
20
- declare const Form: React.ForwardRefExoticComponent<IFormProps & React.RefAttributes<UseFormReturn<import("react-hook-form").FieldValues, any, undefined>>>;
21
- export default Form;
1
+ import React from 'react';
2
+ import { UseFormReturn } from 'react-hook-form';
3
+ export interface IFormProps {
4
+ options?: any;
5
+ /** submit 동작 및 validation을 통과할 경우 실행 */
6
+ submit: (data: any) => void;
7
+ /** error 가 아닌 경우에도 공백 object({}) 반환 */
8
+ onError?: (errors: any, isSubmitting?: boolean) => void;
9
+ onValid?: (isValid: boolean) => void;
10
+ /** Form.Item 필수 */
11
+ children: React.ReactNode;
12
+ layout?: {
13
+ label: number | string;
14
+ wrapper?: number;
15
+ };
16
+ hideAsterisk?: boolean;
17
+ preventEnter?: boolean;
18
+ formClassName?: string;
19
+ }
20
+ declare const Form: React.ForwardRefExoticComponent<IFormProps & React.RefAttributes<UseFormReturn<import("react-hook-form").FieldValues, any, undefined>>>;
21
+ export default Form;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- interface IGroupProps {
3
- children?: React.ReactNode;
4
- }
5
- declare const Group: React.FC<IGroupProps>;
6
- export default Group;
1
+ import React from 'react';
2
+ interface IGroupProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ declare const Group: React.FC<IGroupProps>;
6
+ export default Group;
@@ -1,22 +1,22 @@
1
- import React from 'react';
2
- import { RegisterOptions } from 'react-hook-form/dist/types/validator';
3
- import { ErrorStyle } from '../Input/data';
4
- import { FieldErrors } from 'react-hook-form/dist/types/errors';
5
- import { Control, FieldValues } from 'react-hook-form';
6
- interface IItemProps<T extends FieldValues> extends Omit<React.ComponentPropsWithoutRef<'div'>, 'prefix'> {
7
- name?: string;
8
- label?: React.ReactNode;
9
- rules?: RegisterOptions;
10
- error?: FieldErrors;
11
- errorStyle?: ErrorStyle | false;
12
- prefix?: React.ReactNode;
13
- suffix?: React.ReactNode;
14
- emptyLabel?: boolean;
15
- asterisk?: boolean;
16
- itemClassName?: string;
17
- isFormItem?: boolean;
18
- visible?: boolean;
19
- control?: Control<T>;
20
- }
21
- declare const Item: React.ForwardRefExoticComponent<IItemProps<FieldValues> & React.RefAttributes<HTMLDivElement>>;
22
- export default Item;
1
+ import React from 'react';
2
+ import { RegisterOptions } from 'react-hook-form/dist/types/validator';
3
+ import { ErrorStyle } from '../Input/data';
4
+ import { FieldErrors } from 'react-hook-form/dist/types/errors';
5
+ import { Control, FieldValues } from "react-hook-form";
6
+ interface IItemProps<T extends FieldValues> extends Omit<React.ComponentPropsWithoutRef<'div'>, 'prefix'> {
7
+ name?: string;
8
+ label?: React.ReactNode;
9
+ rules?: RegisterOptions;
10
+ error?: FieldErrors;
11
+ errorStyle?: ErrorStyle | false;
12
+ prefix?: React.ReactNode;
13
+ suffix?: React.ReactNode;
14
+ emptyLabel?: boolean;
15
+ asterisk?: boolean;
16
+ itemClassName?: string;
17
+ isFormItem?: boolean;
18
+ visible?: boolean;
19
+ control?: Control<T>;
20
+ }
21
+ declare const Item: React.ForwardRefExoticComponent<IItemProps<FieldValues> & React.RefAttributes<HTMLDivElement>>;
22
+ export default Item;
@@ -1,14 +1,14 @@
1
- import FormProvider from './Form';
2
- import Item from './Item';
3
- import Group from './Group';
4
- import { UseFormReturn } from 'react-hook-form';
5
- type FormType = typeof FormProvider;
6
- interface FormInterface extends FormType {
7
- Item: typeof Item;
8
- Group: typeof Group;
9
- }
10
- interface Methods extends UseFormReturn {
11
- }
12
- declare const Form: FormInterface;
13
- export type { Methods };
14
- export default Form;
1
+ import FormProvider from './Form';
2
+ import Item from './Item';
3
+ import Group from './Group';
4
+ import { UseFormReturn } from 'react-hook-form';
5
+ type FormType = typeof FormProvider;
6
+ interface FormInterface extends FormType {
7
+ Item: typeof Item;
8
+ Group: typeof Group;
9
+ }
10
+ interface Methods extends UseFormReturn {
11
+ }
12
+ declare const Form: FormInterface;
13
+ export type { Methods };
14
+ export default Form;
@@ -1,7 +1,7 @@
1
- export declare const FormArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
- layout?: {
3
- label: number | string;
4
- wrapper?: number | undefined;
5
- } | undefined;
6
- hideAsterisk?: boolean | undefined;
7
- }, never>;
1
+ export declare const FormArea: import("styled-components").StyledComponent<"div", any, {
2
+ layout?: {
3
+ label: number | string;
4
+ wrapper?: number | undefined;
5
+ } | undefined;
6
+ hideAsterisk?: boolean | undefined;
7
+ }, never>;
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- export interface IContentHeaderProps {
3
- title?: React.ReactNode | string;
4
- emptyMessage?: React.ReactNode | string;
5
- validationMessage?: React.ReactNode | string;
6
- description?: React.ReactNode | string;
7
- rightContent?: React.ReactNode;
8
- small?: boolean;
9
- noTitle?: boolean;
10
- onlyDescription?: boolean;
11
- wrapStyle?: Record<string, any>;
12
- headerClassName?: string;
13
- }
14
- declare const ContentHeader: React.FC<IContentHeaderProps>;
15
- export default ContentHeader;
1
+ import React from 'react';
2
+ export interface IContentHeaderProps {
3
+ title?: React.ReactNode | string;
4
+ emptyMessage?: React.ReactNode | string;
5
+ validationMessage?: React.ReactNode | string;
6
+ description?: React.ReactNode | string;
7
+ rightContent?: React.ReactNode;
8
+ small?: boolean;
9
+ noTitle?: boolean;
10
+ onlyDescription?: boolean;
11
+ wrapStyle?: Record<string, any>;
12
+ headerClassName?: string;
13
+ }
14
+ declare const ContentHeader: React.FC<IContentHeaderProps>;
15
+ export default ContentHeader;
@@ -1,5 +1,5 @@
1
- export declare const ContentHeaderBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
- small?: boolean | undefined;
3
- minusWidth: number;
4
- noTitle?: boolean | undefined;
5
- }, never>;
1
+ export declare const ContentHeaderBox: import("styled-components").StyledComponent<"div", any, {
2
+ small?: boolean | undefined;
3
+ minusWidth: number;
4
+ noTitle?: boolean | undefined;
5
+ }, never>;
@@ -1,14 +1,14 @@
1
- import React from 'react';
2
- export type sizes = 'x-small' | 'small' | 'default' | 'medium' | 'large' | 'x-large';
3
- export interface IIconsProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
4
- style?: any;
5
- color?: string;
6
- size?: sizes;
7
- fixSize?: sizes;
8
- spin?: boolean;
9
- spinSec?: number;
10
- inverse?: boolean;
11
- className?: string;
12
- }
13
- declare const Icons: React.FC<IIconsProps>;
14
- export default Icons;
1
+ import React from 'react';
2
+ export type sizes = 'x-small' | 'small' | 'default' | 'medium' | 'large' | 'x-large';
3
+ export interface IIconsProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
4
+ style?: any;
5
+ color?: string;
6
+ size?: sizes;
7
+ fixSize?: sizes;
8
+ spin?: boolean;
9
+ spinSec?: number;
10
+ inverse?: boolean;
11
+ className?: string;
12
+ }
13
+ declare const Icons: React.FC<IIconsProps>;
14
+ export default Icons;
@@ -1,19 +1,19 @@
1
- import React from 'react';
2
- import { ErrorType, OptionType } from './data';
3
- export interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
4
- name?: string;
5
- description?: React.ReactNode;
6
- error?: string | ErrorType;
7
- setValue?: any;
8
- options?: string[] | OptionType[];
9
- onChange?: (value: string[] | undefined) => void;
10
- vertical?: boolean;
11
- cRef?: React.Ref<any>;
12
- }
13
- export interface CheckboxRef {
14
- checkAll: (reset?: boolean) => void;
15
- changeValue: (values: string[]) => void;
16
- checkValue: (values: string[]) => void;
17
- }
18
- declare const Checkbox: React.ForwardRefExoticComponent<ICheckboxProps & React.RefAttributes<HTMLInputElement>>;
19
- export default Checkbox;
1
+ import React from 'react';
2
+ import { ErrorType, OptionType } from './data';
3
+ export interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
4
+ name?: string;
5
+ description?: React.ReactNode;
6
+ error?: string | ErrorType;
7
+ setValue?: any;
8
+ options?: string[] | OptionType[];
9
+ onChange?: (value: string[] | undefined) => void;
10
+ vertical?: boolean;
11
+ cRef?: React.Ref<any>;
12
+ }
13
+ export interface CheckboxRef {
14
+ checkAll: (reset?: boolean) => void;
15
+ changeValue: (values: string[]) => void;
16
+ checkValue: (values: string[]) => void;
17
+ }
18
+ declare const Checkbox: React.ForwardRefExoticComponent<ICheckboxProps & React.RefAttributes<HTMLInputElement>>;
19
+ export default Checkbox;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import './ErrorMessage.scss';
3
- interface IErrorMessageProps {
4
- visible: boolean;
5
- message: React.ReactNode | string;
6
- }
7
- declare const ErrorMessage: React.FC<IErrorMessageProps>;
8
- export default ErrorMessage;
1
+ import React from 'react';
2
+ import './ErrorMessage.scss';
3
+ interface IErrorMessageProps {
4
+ visible: boolean;
5
+ message: React.ReactNode | string;
6
+ }
7
+ declare const ErrorMessage: React.FC<IErrorMessageProps>;
8
+ export default ErrorMessage;
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- import { ErrorType, ErrorStyle } from './data';
3
- import { ChangeHandler } from 'react-hook-form';
4
- export interface IInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'> {
5
- error?: string | ErrorType | boolean;
6
- errorStyle?: ErrorStyle;
7
- prefix?: React.ReactNode;
8
- suffix?: React.ReactNode;
9
- selectDisabled?: boolean;
10
- description?: React.ReactNode;
11
- size?: 'small' | 'medium';
12
- areaStyle?: Record<string, any>;
13
- selectValue?: React.ReactNode;
14
- isSelect?: boolean;
15
- active?: boolean;
16
- formOnChange?: ChangeHandler;
17
- }
18
- /**
19
- * input base component
20
- * 해당 컴포넌트를 이용하여 기본적인 input 을 공용으로 생성
21
- */
22
- declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
23
- export default Input;
1
+ import React from 'react';
2
+ import { ErrorType, ErrorStyle } from './data';
3
+ import { ChangeHandler } from 'react-hook-form';
4
+ export interface IInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'> {
5
+ error?: string | ErrorType | boolean;
6
+ errorStyle?: ErrorStyle;
7
+ prefix?: React.ReactNode;
8
+ suffix?: React.ReactNode;
9
+ selectDisabled?: boolean;
10
+ description?: React.ReactNode;
11
+ size?: 'small' | 'medium';
12
+ areaStyle?: Record<string, any>;
13
+ selectValue?: React.ReactNode;
14
+ isSelect?: boolean;
15
+ active?: boolean;
16
+ formOnChange?: ChangeHandler;
17
+ }
18
+ /**
19
+ * input base component
20
+ * 해당 컴포넌트를 이용하여 기본적인 input 을 공용으로 생성
21
+ */
22
+ declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
23
+ export default Input;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { IInputProps } from './Input';
3
- interface IInputNumberProps extends IInputProps {
4
- setValue?: any;
5
- onChange?: (event: any) => void;
6
- }
7
- declare const InputNumber: React.ForwardRefExoticComponent<IInputNumberProps & React.RefAttributes<HTMLInputElement>>;
8
- export default InputNumber;
1
+ import React from 'react';
2
+ import { IInputProps } from './Input';
3
+ interface IInputNumberProps extends IInputProps {
4
+ setValue?: any;
5
+ onChange?: (event: any) => void;
6
+ }
7
+ declare const InputNumber: React.ForwardRefExoticComponent<IInputNumberProps & React.RefAttributes<HTMLInputElement>>;
8
+ export default InputNumber;
@@ -1,16 +1,16 @@
1
- import React from 'react';
2
- import { ChangeHandler } from 'react-hook-form';
3
- import { ErrorType, OptionType } from './data';
4
- export interface IRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
5
- name?: string;
6
- description?: React.ReactNode;
7
- error?: string | ErrorType;
8
- setValue?: any;
9
- options?: string[] | OptionType[];
10
- onChange?: (value: any) => void;
11
- formOnChange?: ChangeHandler;
12
- vertical?: boolean;
13
- label?: string;
14
- }
15
- declare const Radio: React.ForwardRefExoticComponent<IRadioProps & React.RefAttributes<HTMLInputElement>>;
16
- export default Radio;
1
+ import React from 'react';
2
+ import { ChangeHandler } from 'react-hook-form';
3
+ import { ErrorType, OptionType } from './data';
4
+ export interface IRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
5
+ name?: string;
6
+ description?: React.ReactNode;
7
+ error?: string | ErrorType;
8
+ setValue?: any;
9
+ options?: string[] | OptionType[];
10
+ onChange?: (value: any) => void;
11
+ formOnChange?: ChangeHandler;
12
+ vertical?: boolean;
13
+ label?: string;
14
+ }
15
+ declare const Radio: React.ForwardRefExoticComponent<IRadioProps & React.RefAttributes<HTMLInputElement>>;
16
+ export default Radio;
@@ -1,13 +1,13 @@
1
- import React, { ChangeEventHandler } from 'react';
2
- import { IInputProps } from './Input';
3
- import { ChangeHandler } from 'react-hook-form';
4
- interface ISearchProps extends IInputProps {
5
- onClear?: () => void;
6
- onSearch?: (value: string) => void;
7
- resetOnSearch?: boolean;
8
- setValue?: any;
9
- onChange?: ChangeEventHandler<HTMLInputElement>;
10
- formOnChange?: ChangeHandler;
11
- }
12
- declare const Search: React.ForwardRefExoticComponent<ISearchProps & React.RefAttributes<HTMLInputElement>>;
13
- export default Search;
1
+ import React, { ChangeEventHandler } from 'react';
2
+ import { IInputProps } from './Input';
3
+ import { ChangeHandler } from 'react-hook-form';
4
+ interface ISearchProps extends IInputProps {
5
+ onClear?: () => void;
6
+ onSearch?: (value: string) => void;
7
+ resetOnSearch?: boolean;
8
+ setValue?: any;
9
+ onChange?: ChangeEventHandler<HTMLInputElement>;
10
+ formOnChange?: ChangeHandler;
11
+ }
12
+ declare const Search: React.ForwardRefExoticComponent<ISearchProps & React.RefAttributes<HTMLInputElement>>;
13
+ export default Search;
@@ -1,39 +1,39 @@
1
- import React from 'react';
2
- import { ChangeHandler } from 'react-hook-form';
3
- import { ErrorStyle, ErrorType } from './data';
4
- type OptionItem = {
5
- label?: React.ReactNode;
6
- searchLabel?: string;
7
- value?: any;
8
- type?: string;
9
- children?: OptionItem[];
10
- };
11
- export interface ISelectProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'onChange' | 'size'> {
12
- description?: React.ReactNode;
13
- error?: string | ErrorType;
14
- errorStyle?: ErrorStyle;
15
- prefix?: React.ReactElement;
16
- suffix?: React.ReactElement;
17
- setValue?: any;
18
- onChange?: (value: any) => void;
19
- onChangeVisible?: (isShow: boolean) => void;
20
- options?: OptionItem[];
21
- optionSize?: 'small' | 'default' | 'medium' | 'large';
22
- size?: 'small' | 'medium';
23
- search?: boolean;
24
- listHeight?: number;
25
- listWidth?: number;
26
- searchPlaceholder?: string;
27
- areaStyle?: Record<string, any>;
28
- disableChangeEvent?: boolean;
29
- customActive?: boolean;
30
- customValue?: React.ReactNode;
31
- fixedOptionWidth?: boolean;
32
- formOnChange?: ChangeHandler;
33
- }
34
- export type SelectRef = {
35
- handleOnChange: (value: any) => void;
36
- handleClearOption: () => void;
37
- } | null;
38
- declare const Select: React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<SelectRef>>;
39
- export default Select;
1
+ import React from 'react';
2
+ import { ChangeHandler } from 'react-hook-form';
3
+ import { ErrorStyle, ErrorType } from './data';
4
+ type OptionItem = {
5
+ label?: React.ReactNode;
6
+ searchLabel?: string;
7
+ value?: any;
8
+ type?: string;
9
+ children?: OptionItem[];
10
+ };
11
+ export interface ISelectProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'onChange' | 'size'> {
12
+ description?: React.ReactNode;
13
+ error?: string | ErrorType;
14
+ errorStyle?: ErrorStyle;
15
+ prefix?: React.ReactElement;
16
+ suffix?: React.ReactElement;
17
+ setValue?: any;
18
+ onChange?: (value: any) => void;
19
+ onChangeVisible?: (isShow: boolean) => void;
20
+ options?: OptionItem[];
21
+ optionSize?: 'small' | 'default' | 'medium' | 'large';
22
+ size?: 'small' | 'medium';
23
+ search?: boolean;
24
+ listHeight?: number;
25
+ listWidth?: number;
26
+ searchPlaceholder?: string;
27
+ areaStyle?: Record<string, any>;
28
+ disableChangeEvent?: boolean;
29
+ customActive?: boolean;
30
+ customValue?: React.ReactNode;
31
+ fixedOptionWidth?: boolean;
32
+ formOnChange?: ChangeHandler;
33
+ }
34
+ export type SelectRef = {
35
+ handleOnChange: (value: any) => void;
36
+ handleClearOption: () => void;
37
+ } | null;
38
+ declare const Select: React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<SelectRef>>;
39
+ export default Select;
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- import { ErrorStyle, ErrorType } from './data';
3
- interface ITextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'> {
4
- error?: string | ErrorType;
5
- errorStyle?: ErrorStyle;
6
- prefix?: React.ReactElement;
7
- suffix?: React.ReactElement;
8
- selectDisabled?: boolean;
9
- setValue?: any;
10
- rows: number;
11
- description?: React.ReactNode;
12
- areaStyle?: Record<string, any>;
13
- }
14
- declare const TextArea: React.ForwardRefExoticComponent<ITextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
15
- export default TextArea;
1
+ import React from 'react';
2
+ import { ErrorStyle, ErrorType } from './data';
3
+ interface ITextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'> {
4
+ error?: string | ErrorType;
5
+ errorStyle?: ErrorStyle;
6
+ prefix?: React.ReactElement;
7
+ suffix?: React.ReactElement;
8
+ selectDisabled?: boolean;
9
+ setValue?: any;
10
+ rows: number;
11
+ description?: React.ReactNode;
12
+ areaStyle?: Record<string, any>;
13
+ }
14
+ declare const TextArea: React.ForwardRefExoticComponent<ITextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
15
+ export default TextArea;