gov-ui-core 0.2.6-beta.3 → 0.2.6-beta.4

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/.eslintrc.json +54 -54
  2. package/.husky/pre-commit +4 -4
  3. package/.prettierrc +12 -12
  4. package/.storybook/main.ts +37 -37
  5. package/.storybook/preview.tsx +27 -27
  6. package/.stylelintrc.json +16 -16
  7. package/@types/custom.d.ts +43 -43
  8. package/@types/styles.d.ts +85 -86
  9. package/README.md +46 -46
  10. package/build/App.d.ts +3 -3
  11. package/build/Main.d.ts +5 -5
  12. package/build/components/Button/DropdownButton.d.ts +15 -15
  13. package/build/components/Button/SwitchButton.d.ts +7 -7
  14. package/build/components/Button/constants.d.ts +19 -19
  15. package/build/components/Button/index.d.ts +11 -11
  16. package/build/components/Button/styled.d.ts +11 -11
  17. package/build/components/Calendar/CalendarNavigation.d.ts +9 -9
  18. package/build/components/Calendar/constants.d.ts +2 -2
  19. package/build/components/Calendar/index.d.ts +11 -11
  20. package/build/components/Calendar/styled.d.ts +2 -2
  21. package/build/components/Carousel/ArrowButton.d.ts +7 -7
  22. package/build/components/Carousel/index.d.ts +14 -14
  23. package/build/components/Carousel/styled.d.ts +2 -2
  24. package/build/components/Directory/index.d.ts +32 -32
  25. package/build/components/Directory/styled.d.ts +6 -6
  26. package/build/components/EmptyBox/index.d.ts +8 -8
  27. package/build/components/EmptyBox/styled.d.ts +4 -4
  28. package/build/components/Form/Form.d.ts +21 -21
  29. package/build/components/Form/Group.d.ts +6 -6
  30. package/build/components/Form/Item.d.ts +22 -22
  31. package/build/components/Form/index.d.ts +14 -14
  32. package/build/components/Form/styled.d.ts +7 -7
  33. package/build/components/Header/ContentHeader.d.ts +15 -15
  34. package/build/components/Header/styled.d.ts +5 -5
  35. package/build/components/Icons/index.d.ts +14 -14
  36. package/build/components/Input/Checkbox.d.ts +19 -19
  37. package/build/components/Input/ErrorMessage.d.ts +8 -8
  38. package/build/components/Input/Input.d.ts +23 -23
  39. package/build/components/Input/InputNumber.d.ts +8 -8
  40. package/build/components/Input/Radio.d.ts +16 -16
  41. package/build/components/Input/Search.d.ts +13 -13
  42. package/build/components/Input/Select.d.ts +39 -39
  43. package/build/components/Input/TextArea.d.ts +15 -15
  44. package/build/components/Input/index.d.ts +19 -19
  45. package/build/components/Input/styled.d.ts +25 -25
  46. package/build/components/IntlText/index.d.ts +5 -5
  47. package/build/components/Loading/OverlayLoading.d.ts +10 -10
  48. package/build/components/Loading/Spinner.d.ts +9 -9
  49. package/build/components/Loading/styled.d.ts +10 -10
  50. package/build/components/Styled/mixins.d.ts +13 -13
  51. package/build/components/Styled/variable.d.ts +6 -6
  52. package/build/components/Table/AppendTable.d.ts +26 -26
  53. package/build/components/Table/AutoTooltip.d.ts +8 -8
  54. package/build/components/Table/TableBase.d.ts +16 -16
  55. package/build/components/Table/TableLoading.d.ts +9 -9
  56. package/build/components/Table/components/Pagination.d.ts +18 -18
  57. package/build/components/Table/components/PaginationItem.d.ts +9 -9
  58. package/build/components/Table/index.d.ts +27 -27
  59. package/build/components/Table/styled.d.ts +25 -25
  60. package/build/components/ThemeProvider.d.ts +16 -16
  61. package/build/globalStyle.d.ts +5 -5
  62. package/build/index.d.ts +1 -1
  63. package/build/index.js +1 -1
  64. package/build/modules.d.ts +23 -25
  65. package/build/pages/ButtonSample.d.ts +6 -6
  66. package/build/pages/CreateTable.d.ts +20 -20
  67. package/build/pages/FormSample.d.ts +5 -5
  68. package/build/pages/InputSample.d.ts +6 -6
  69. package/build/pages/Sample.d.ts +5 -5
  70. package/build/pages/Sample2.d.ts +5 -5
  71. package/build/pages/Sample3.d.ts +5 -5
  72. package/build/pages/Sample4.d.ts +5 -5
  73. package/build/pages/TableSample.d.ts +5 -5
  74. package/build/pages/TailwindSample.d.ts +1 -1
  75. package/build/pages/sampleData.d.ts +59 -59
  76. package/build/reportWebVitals.d.ts +3 -3
  77. package/build/theme.d.ts +3 -3
  78. package/build/utils/customState.d.ts +28 -28
  79. package/build/utils/hookUtils.d.ts +16 -16
  80. package/build/utils/index.d.ts +35 -35
  81. package/config/env.js +104 -104
  82. package/config/getHttpsConfig.js +66 -66
  83. package/config/jest/babelTransform.js +29 -29
  84. package/config/jest/cssTransform.js +14 -14
  85. package/config/jest/fileTransform.js +40 -40
  86. package/config/modules.js +134 -134
  87. package/config/paths.js +77 -77
  88. package/config/webpack/persistentCache/createEnvironmentHash.js +9 -9
  89. package/config/webpack.config.js +756 -756
  90. package/config/webpack.prod.config.js +91 -91
  91. package/config/webpackDevServer.config.js +127 -127
  92. package/package.json +246 -246
  93. package/postcss.config.js +6 -6
  94. package/public/index.html +43 -43
  95. package/public/manifest.json +25 -25
  96. package/public/robots.txt +3 -3
  97. package/scripts/build.js +217 -217
  98. package/scripts/start.js +154 -154
  99. package/scripts/test.js +52 -52
  100. package/tailwind.config.js +185 -185
  101. package/tsconfig.json +34 -34
  102. package/build/components/TailwindTest/index.d.ts +0 -6
  103. package/doctor-storybook.log +0 -18
  104. package/migration-storybook.log +0 -98
package/build/Main.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- interface IMainProps {
3
- }
4
- declare const Main: React.FC<IMainProps>;
5
- export default Main;
1
+ import React from 'react';
2
+ interface IMainProps {
3
+ }
4
+ declare const Main: React.FC<IMainProps>;
5
+ export default Main;
@@ -1,15 +1,15 @@
1
- import React from 'react';
2
- import { IButtonProps } from './';
3
- export type OptionType = {
4
- label?: React.ReactNode;
5
- onClick?: (value: OptionType) => void;
6
- type?: string;
7
- };
8
- export interface IDropdownButtonProps extends IButtonProps {
9
- options: OptionType[];
10
- optionSize?: 'small' | 'default' | 'medium' | 'large';
11
- menuStyle?: any;
12
- placement?: 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | undefined;
13
- }
14
- declare const DropdownButton: React.FC<IDropdownButtonProps>;
15
- export default DropdownButton;
1
+ import React from 'react';
2
+ import { IButtonProps } from './';
3
+ export type OptionType = {
4
+ label?: React.ReactNode;
5
+ onClick?: (value: OptionType) => void;
6
+ type?: string;
7
+ };
8
+ export interface IDropdownButtonProps extends IButtonProps {
9
+ options: OptionType[];
10
+ optionSize?: 'small' | 'default' | 'medium' | 'large';
11
+ menuStyle?: any;
12
+ placement?: 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | undefined;
13
+ }
14
+ declare const DropdownButton: React.FC<IDropdownButtonProps>;
15
+ export default DropdownButton;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { SwitchProps } from 'antd';
3
- export interface ISwitchButtonProps extends SwitchProps {
4
- label?: string;
5
- }
6
- declare const SwitchButton: React.FC<ISwitchButtonProps>;
7
- export default SwitchButton;
1
+ import React from 'react';
2
+ import { SwitchProps } from 'antd';
3
+ export interface ISwitchButtonProps extends SwitchProps {
4
+ label?: string;
5
+ }
6
+ declare const SwitchButton: React.FC<ISwitchButtonProps>;
7
+ export default SwitchButton;
@@ -1,19 +1,19 @@
1
- export declare const BUTTON_CHILD_TYPE: {
2
- NORMAL: string;
3
- ICON: string;
4
- TEXT_LEFT_ICON: string;
5
- TEXT_RIGHT_ICON: string;
6
- TEXT_SIDE_ICON: string;
7
- };
8
- export declare const BUTTON_TYPE: {
9
- PRIMARY: string;
10
- SOLID: string;
11
- SOLID_SECONDARY: string;
12
- GRAY: string;
13
- WHITE: string;
14
- TRANSPARENT: string;
15
- NO_BG: string;
16
- NO_BG_GRAY: string;
17
- OUTLINED_GRAY: string;
18
- OUTLINED: string;
19
- };
1
+ export declare const BUTTON_CHILD_TYPE: {
2
+ NORMAL: string;
3
+ ICON: string;
4
+ TEXT_LEFT_ICON: string;
5
+ TEXT_RIGHT_ICON: string;
6
+ TEXT_SIDE_ICON: string;
7
+ };
8
+ export declare const BUTTON_TYPE: {
9
+ PRIMARY: string;
10
+ SOLID: string;
11
+ SOLID_SECONDARY: string;
12
+ GRAY: string;
13
+ WHITE: string;
14
+ TRANSPARENT: string;
15
+ NO_BG: string;
16
+ NO_BG_GRAY: string;
17
+ OUTLINED_GRAY: string;
18
+ OUTLINED: string;
19
+ };
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import type { ButtonSize, ButtonType } from './data';
3
- export interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- btype?: ButtonType;
5
- size?: ButtonSize;
6
- active?: boolean;
7
- loading?: boolean;
8
- border?: boolean;
9
- }
10
- declare const Button: React.FC<IButtonProps>;
11
- export default Button;
1
+ import React from 'react';
2
+ import type { ButtonSize, ButtonType } from './data';
3
+ export interface IButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ btype?: ButtonType;
5
+ size?: ButtonSize;
6
+ active?: boolean;
7
+ loading?: boolean;
8
+ border?: boolean;
9
+ }
10
+ declare const Button: React.FC<IButtonProps>;
11
+ export default Button;
@@ -1,11 +1,11 @@
1
- declare const ButtonBox: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
2
- btype?: string | undefined;
3
- size?: string | undefined;
4
- disabled?: boolean | undefined;
5
- active?: boolean | undefined;
6
- border?: boolean | undefined;
7
- $loading?: boolean | undefined;
8
- $buttonChildType?: string | undefined;
9
- }, never>;
10
- declare const SwitchBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
- export { ButtonBox, SwitchBox };
1
+ declare const ButtonBox: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
2
+ btype?: string | undefined;
3
+ size?: string | undefined;
4
+ disabled?: boolean | undefined;
5
+ active?: boolean | undefined;
6
+ border?: boolean | undefined;
7
+ $loading?: boolean | undefined;
8
+ $buttonChildType?: string | undefined;
9
+ }, never>;
10
+ declare const SwitchBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
+ export { ButtonBox, SwitchBox };
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- interface ICalendarNavigationProps {
3
- focusedDate: Date;
4
- changeShownDate: (value: Date | number | string, mode?: 'set' | 'setYear' | 'setMonth' | 'monthOffset') => void;
5
- months: number[];
6
- years: number[];
7
- }
8
- declare const CalendarNavigation: React.FC<ICalendarNavigationProps>;
9
- export default CalendarNavigation;
1
+ import React from 'react';
2
+ interface ICalendarNavigationProps {
3
+ focusedDate: Date;
4
+ changeShownDate: (value: Date | number | string, mode?: 'set' | 'setYear' | 'setMonth' | 'monthOffset') => void;
5
+ months: number[];
6
+ years: number[];
7
+ }
8
+ declare const CalendarNavigation: React.FC<ICalendarNavigationProps>;
9
+ export default CalendarNavigation;
@@ -1,2 +1,2 @@
1
- export declare const DEFAULT_MIN_YEAR = 2017;
2
- export declare const MONTHS_SIZE = 12;
1
+ export declare const DEFAULT_MIN_YEAR = 2017;
2
+ export declare const MONTHS_SIZE = 12;
@@ -1,11 +1,11 @@
1
- import React from 'react';
2
- import 'react-date-range/dist/styles.css';
3
- import 'react-date-range/dist/theme/default.css';
4
- interface ICalendarProps {
5
- defaultValue?: Date;
6
- minDate?: Date;
7
- maxDate?: Date;
8
- onChange: (date: Date) => void;
9
- }
10
- declare const Calendar: React.FC<ICalendarProps>;
11
- export default Calendar;
1
+ import React from 'react';
2
+ import 'react-date-range/dist/styles.css';
3
+ import 'react-date-range/dist/theme/default.css';
4
+ interface ICalendarProps {
5
+ defaultValue?: Date;
6
+ minDate?: Date;
7
+ maxDate?: Date;
8
+ onChange: (date: Date) => void;
9
+ }
10
+ declare const Calendar: React.FC<ICalendarProps>;
11
+ export default Calendar;
@@ -1,2 +1,2 @@
1
- export declare const CalendarBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const NavigationBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const CalendarBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const NavigationBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- interface IArrowButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
3
- direction: 'left' | 'right';
4
- disabled?: boolean;
5
- }
6
- declare const ArrowButton: React.FC<IArrowButtonProps>;
7
- export default ArrowButton;
1
+ import React from 'react';
2
+ interface IArrowButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
3
+ direction: 'left' | 'right';
4
+ disabled?: boolean;
5
+ }
6
+ declare const ArrowButton: React.FC<IArrowButtonProps>;
7
+ export default ArrowButton;
@@ -1,14 +1,14 @@
1
- import React from 'react';
2
- import { Settings } from 'react-slick';
3
- import 'slick-carousel/slick/slick.css';
4
- import 'slick-carousel/slick/slick-theme.css';
5
- export interface ICarouselProps {
6
- items?: Record<string, any>[];
7
- itemSize?: number;
8
- rowKey?: string;
9
- dataKey?: string;
10
- settings?: Settings;
11
- fitWidth?: boolean;
12
- }
13
- declare const Carousel: React.FC<ICarouselProps>;
14
- export default Carousel;
1
+ import React from 'react';
2
+ import { Settings } from 'react-slick';
3
+ import 'slick-carousel/slick/slick.css';
4
+ import 'slick-carousel/slick/slick-theme.css';
5
+ export interface ICarouselProps {
6
+ items?: Record<string, any>[];
7
+ itemSize?: number;
8
+ rowKey?: string;
9
+ dataKey?: string;
10
+ settings?: Settings;
11
+ fitWidth?: boolean;
12
+ }
13
+ declare const Carousel: React.FC<ICarouselProps>;
14
+ export default Carousel;
@@ -1,2 +1,2 @@
1
- export declare const CarouselBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const ArrowButtonArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const CarouselBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const ArrowButtonArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -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", 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,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", import("styled-components").DefaultTheme, {
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", import("styled-components").DefaultTheme, {
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", import("styled-components").DefaultTheme, {
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;