gov-ui-core 0.2.6 → 1.0.0
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.
- package/.eslintrc.json +54 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc +12 -0
- package/.storybook/main.ts +10 -9
- package/.stylelintrc.json +19 -0
- package/@types/styles.d.ts +96 -0
- package/build/components/Badge/index.d.ts +8 -0
- package/build/components/Badge/styled.d.ts +1 -0
- package/build/components/Breadcrumb/index.d.ts +6 -0
- package/build/components/Breadcrumb/styled.d.ts +2 -0
- package/build/components/Button/SwitchButton.d.ts +6 -3
- package/build/components/Button/TextButton.d.ts +8 -0
- package/build/components/Button/constants.d.ts +19 -0
- package/build/components/Button/styled.d.ts +12 -4
- package/build/components/Calendar/styled.d.ts +2 -2
- package/build/components/Card/index.d.ts +12 -0
- package/build/components/Carousel/styled.d.ts +2 -2
- package/build/components/Chip/constants.d.ts +11 -0
- package/build/components/Chip/index.d.ts +11 -0
- package/build/components/Directory/styled.d.ts +2 -2
- package/build/components/EmptyBox/styled.d.ts +1 -1
- package/build/components/Form/Item.d.ts +6 -1
- package/build/components/Form/styled.d.ts +1 -1
- package/build/components/Header/styled.d.ts +1 -1
- package/build/components/Input/Checkbox.d.ts +4 -1
- package/build/components/Input/Input.d.ts +1 -0
- package/build/components/Input/Radio.d.ts +3 -1
- package/build/components/Input/Select.d.ts +1 -0
- package/build/components/Input/TextArea.d.ts +3 -0
- package/build/components/Input/styled.d.ts +16 -12
- package/build/components/Loading/styled.d.ts +4 -4
- package/build/components/Menu/index.d.ts +26 -0
- package/build/components/Modal/index.d.ts +10 -0
- package/build/components/Modal/styled.d.ts +6 -0
- package/build/components/Pannel/index.d.ts +10 -0
- package/build/components/Pannel/styled.d.ts +5 -0
- package/build/components/Progress/index.d.ts +11 -0
- package/build/components/Progress/styled.d.ts +4 -0
- package/build/components/Sliders/index.d.ts +9 -0
- package/build/components/Sliders/styled.d.ts +9 -0
- package/build/components/Styled/mixins.d.ts +3 -3
- package/build/components/Table/styled.d.ts +8 -7
- package/build/components/Tabs/TabContent.d.ts +8 -0
- package/build/components/Tabs/index.d.ts +19 -0
- package/build/components/Tabs/styled.d.ts +12 -0
- package/build/components/TextBox/index.d.ts +12 -0
- package/build/components/ThemeProvider.d.ts +3 -2
- package/build/components/Toast/index.d.ts +10 -0
- package/build/components/Toast/styled.d.ts +6 -0
- package/build/components/Tooltips/index.d.ts +16 -0
- package/build/components/Tree/index.d.ts +8 -0
- package/build/globalStyle.d.ts +3 -3
- package/build/index.d.ts +2 -1
- package/build/index.js +1 -1
- package/build/modules.d.ts +10 -2
- package/build/pages/BreadcrumbSample.d.ts +5 -0
- package/build/pages/ButtonSample.d.ts +6 -0
- package/build/pages/CardSample.d.ts +5 -0
- package/build/pages/CheckboxSample.d.ts +6 -0
- package/build/pages/ChipSample.d.ts +6 -0
- package/build/pages/InputSample.d.ts +6 -0
- package/build/pages/ModalSample.d.ts +5 -0
- package/build/pages/PannelSample.d.ts +5 -0
- package/build/pages/ProgressSample.d.ts +5 -0
- package/build/pages/RadioSample.d.ts +6 -0
- package/build/pages/SlidersSample.d.ts +5 -0
- package/build/pages/TabsSample.d.ts +6 -0
- package/build/pages/TailwindSample.d.ts +1 -0
- package/build/pages/TextBoxSample.d.ts +2 -0
- package/build/pages/ToastSample.d.ts +6 -0
- package/build/pages/TooltipsSample.d.ts +5 -0
- package/build/pages/TreeSample.d.ts +5 -0
- package/build/theme.d.ts +2 -44
- package/package.json +43 -8
- package/postcss.config.js +8 -0
- package/tailwind.config.js +185 -0
- package/build/pages/CreateTable.d.ts +0 -20
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"node": true,
|
|
4
|
+
"browser": true,
|
|
5
|
+
"es2021": true
|
|
6
|
+
},
|
|
7
|
+
"extends": [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:react/recommended",
|
|
10
|
+
"plugin:@typescript-eslint/recommended",
|
|
11
|
+
"prettier"
|
|
12
|
+
],
|
|
13
|
+
"overrides": [
|
|
14
|
+
],
|
|
15
|
+
"parser": "@typescript-eslint/parser",
|
|
16
|
+
"parserOptions": {
|
|
17
|
+
"ecmaFeatures": {
|
|
18
|
+
"jsx": true
|
|
19
|
+
},
|
|
20
|
+
"ecmaVersion": "latest",
|
|
21
|
+
"sourceType": "module",
|
|
22
|
+
"project": "./tsconfig.json"
|
|
23
|
+
},
|
|
24
|
+
"plugins": [
|
|
25
|
+
"react",
|
|
26
|
+
"@typescript-eslint"
|
|
27
|
+
],
|
|
28
|
+
"rules": {
|
|
29
|
+
"quotes": [
|
|
30
|
+
"error",
|
|
31
|
+
"single",
|
|
32
|
+
{
|
|
33
|
+
"avoidEscape": true
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"jsx-quotes": ["error", "prefer-double"],
|
|
37
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
38
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
39
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
40
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
41
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
42
|
+
"react/no-children-prop": "off",
|
|
43
|
+
"no-extra-boolean-cast": "off",
|
|
44
|
+
"no-constant-condition": "off"
|
|
45
|
+
},
|
|
46
|
+
"settings": {
|
|
47
|
+
"react": {
|
|
48
|
+
"version": "detect"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"ignorePatterns": [
|
|
52
|
+
"mock/**/*"
|
|
53
|
+
]
|
|
54
|
+
}
|
package/.prettierrc
ADDED
package/.storybook/main.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
2
3
|
import { resolve } from 'path';
|
|
3
4
|
|
|
4
5
|
const config: StorybookConfig = {
|
|
5
|
-
stories: [
|
|
6
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
6
7
|
addons: [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
'@storybook/addon-webpack5-compiler-swc',
|
|
9
|
+
'@storybook/addon-onboarding',
|
|
10
|
+
'@storybook/addon-essentials',
|
|
11
|
+
'@chromatic-com/storybook',
|
|
12
|
+
'@storybook/addon-interactions',
|
|
12
13
|
],
|
|
13
14
|
framework: {
|
|
14
|
-
name:
|
|
15
|
+
name: '@storybook/react-webpack5',
|
|
15
16
|
options: {},
|
|
16
17
|
},
|
|
17
18
|
docs: {},
|
|
18
|
-
staticDirs: [
|
|
19
|
+
staticDirs: ['../public'],
|
|
19
20
|
webpackFinal: async (config) => {
|
|
20
21
|
if (config.resolve) {
|
|
21
22
|
config.resolve.alias = {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["stylelint-config-standard-scss", "stylelint-config-prettier-scss", "prettier"],
|
|
3
|
+
"ignoreFiles": [
|
|
4
|
+
"src/tailwind.css"
|
|
5
|
+
],
|
|
6
|
+
"rules": {
|
|
7
|
+
"at-rule-no-unknown": null,
|
|
8
|
+
"selector-class-pattern": "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
|
|
9
|
+
"keyframes-name-pattern": "/^(,[a-z][a-z0-9]*)(-[a-z0-9]+)*$/",
|
|
10
|
+
"no-descending-specificity": null,
|
|
11
|
+
"block-no-empty": null,
|
|
12
|
+
"scss/at-rule-no-unknown": [
|
|
13
|
+
true,
|
|
14
|
+
{
|
|
15
|
+
"ignoreAtRules": ["tailwind"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
package/@types/styles.d.ts
CHANGED
|
@@ -1,3 +1,99 @@
|
|
|
1
|
+
import 'styled-components';
|
|
2
|
+
|
|
1
3
|
declare module '*.css';
|
|
2
4
|
declare module '*.scss';
|
|
3
5
|
declare module '*.less';
|
|
6
|
+
|
|
7
|
+
declare module 'styled-components' {
|
|
8
|
+
export interface DefaultTheme {
|
|
9
|
+
info?: string;
|
|
10
|
+
info10?: string;
|
|
11
|
+
info20?: string;
|
|
12
|
+
success?: string;
|
|
13
|
+
warning?: string;
|
|
14
|
+
error?: string;
|
|
15
|
+
errortooltip?: string;
|
|
16
|
+
transparent?: string;
|
|
17
|
+
black100?: string;
|
|
18
|
+
black80?: string;
|
|
19
|
+
black70?: string;
|
|
20
|
+
black60?: string;
|
|
21
|
+
black50?: string;
|
|
22
|
+
black40?: string;
|
|
23
|
+
black30?: string;
|
|
24
|
+
black20?: string;
|
|
25
|
+
black15?: string;
|
|
26
|
+
black10?: string;
|
|
27
|
+
black07?: string;
|
|
28
|
+
black05?: string;
|
|
29
|
+
black03?: string;
|
|
30
|
+
black02?: string;
|
|
31
|
+
white?: string;
|
|
32
|
+
white90?: string;
|
|
33
|
+
white80?: string;
|
|
34
|
+
white70?: string;
|
|
35
|
+
white60?: string;
|
|
36
|
+
white50?: string;
|
|
37
|
+
white40?: string;
|
|
38
|
+
white30?: string;
|
|
39
|
+
white20?: string;
|
|
40
|
+
white10?: string;
|
|
41
|
+
line?: string;
|
|
42
|
+
primary?: string;
|
|
43
|
+
primary90?: string;
|
|
44
|
+
primary60?: string;
|
|
45
|
+
primary50?: string;
|
|
46
|
+
primary40?: string;
|
|
47
|
+
primary20?: string;
|
|
48
|
+
primary10?: string;
|
|
49
|
+
primarystop1?: string;
|
|
50
|
+
primarystop2?: string;
|
|
51
|
+
emptyLogo?: string;
|
|
52
|
+
|
|
53
|
+
// new colors
|
|
54
|
+
colorPrimary?: string;
|
|
55
|
+
colorPrimary90?: string;
|
|
56
|
+
colorPrimary60?: string;
|
|
57
|
+
colorPrimary50?: string;
|
|
58
|
+
colorPrimary40?: string;
|
|
59
|
+
colorPrimary30?: string;
|
|
60
|
+
colorPrimary20?: string;
|
|
61
|
+
colorPrimary10?: string;
|
|
62
|
+
colorPrimary05?: string;
|
|
63
|
+
colorPrimaryHover?: string;
|
|
64
|
+
colorPrimaryActive?: string;
|
|
65
|
+
colorEtcLine?: string;
|
|
66
|
+
colorEtcLineDisable?: string;
|
|
67
|
+
colorEtcBG?: string;
|
|
68
|
+
colorEtcTransparent?: string;
|
|
69
|
+
colorEtcError?: string;
|
|
70
|
+
colorEtcError05?: string;
|
|
71
|
+
colorEtcError15?: string;
|
|
72
|
+
colorEtcWarning?: string;
|
|
73
|
+
colorEtcWarning05?: string;
|
|
74
|
+
colorEtcWarning15?: string;
|
|
75
|
+
colorEtcSuccess?: string;
|
|
76
|
+
colorEtcSuccess05?: string;
|
|
77
|
+
colorEtcSuccess15?: string;
|
|
78
|
+
colorEtcInfo?: string;
|
|
79
|
+
colorEtcInfo05?: string;
|
|
80
|
+
colorEtcInfo15?: string;
|
|
81
|
+
colorChart01?: string;
|
|
82
|
+
colorChart02?: string;
|
|
83
|
+
colorChart03?: string;
|
|
84
|
+
colorChart04?: string;
|
|
85
|
+
colorChart05?: string;
|
|
86
|
+
colorChart06?: string;
|
|
87
|
+
colorChart07?: string;
|
|
88
|
+
colorChart08?: string;
|
|
89
|
+
colorChart09?: string;
|
|
90
|
+
colorChart10?: string;
|
|
91
|
+
|
|
92
|
+
// box shadow
|
|
93
|
+
elevationLight01?: string;
|
|
94
|
+
elevationLight02?: string;
|
|
95
|
+
elevationLight03?: string;
|
|
96
|
+
elevationLight04?: string;
|
|
97
|
+
elevationLight05?: string;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BadgeBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const BreadcrumbBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const BreadcrumbList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export interface ISwitchButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
showLabel?: boolean;
|
|
5
|
+
showCheckIcon?: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
onChange?: (value: boolean) => void;
|
|
5
8
|
}
|
|
6
9
|
declare const SwitchButton: React.FC<ISwitchButtonProps>;
|
|
7
10
|
export default SwitchButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface ITextButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
btype?: 'default' | 'gray';
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const TextButton: React.FC<ITextButtonProps>;
|
|
8
|
+
export default TextButton;
|
|
@@ -0,0 +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,10 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
export declare const ButtonBox: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
3
3
|
btype?: string | undefined;
|
|
4
4
|
size?: string | undefined;
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
active?: boolean | undefined;
|
|
7
7
|
border?: boolean | undefined;
|
|
8
|
+
$loading?: boolean | undefined;
|
|
9
|
+
$buttonChildType?: string | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const SwitchBox: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
12
|
+
checked?: boolean | undefined;
|
|
13
|
+
showLabel?: boolean | undefined;
|
|
14
|
+
}, never>;
|
|
15
|
+
export declare const TextButtonBox: import("styled-components").StyledComponent<"a", DefaultTheme, {
|
|
16
|
+
$type: 'default' | 'gray';
|
|
17
|
+
$disabled?: boolean | undefined;
|
|
8
18
|
}, never>;
|
|
9
|
-
declare const SwitchBox: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
-
export { ButtonBox, SwitchBox, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CalendarBox: import("styled-components").StyledComponent<"div",
|
|
2
|
-
export declare const NavigationBox: import("styled-components").StyledComponent<"div",
|
|
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>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface ICardProps {
|
|
3
|
+
title?: string | ReactNode;
|
|
4
|
+
type?: 'inside' | 'outside';
|
|
5
|
+
style?: any;
|
|
6
|
+
className?: string;
|
|
7
|
+
contentStyle?: any;
|
|
8
|
+
contentClassName?: string;
|
|
9
|
+
children?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const Card: React.FC<ICardProps>;
|
|
12
|
+
export default Card;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CarouselBox: import("styled-components").StyledComponent<"div",
|
|
2
|
-
export declare const ArrowButtonArea: import("styled-components").StyledComponent<"div",
|
|
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>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { JSXElementConstructor, ReactElement, ReactNode, ReactPortal } from 'react';
|
|
2
|
+
interface IChipProps {
|
|
3
|
+
children?: ReactNode | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal;
|
|
4
|
+
ctype?: 'status' | 'input' | 'filter';
|
|
5
|
+
shape?: 'square' | 'round';
|
|
6
|
+
status?: 'success' | 'error' | 'warning' | 'primary';
|
|
7
|
+
type?: 'on' | 'off';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Chip: React.FC<IChipProps>;
|
|
11
|
+
export default Chip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const DirectoryBox: import("styled-components").StyledComponent<"div",
|
|
1
|
+
export declare const DirectoryBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
2
|
selectRowNo?: number | undefined;
|
|
3
3
|
horizontalScroll?: boolean | undefined;
|
|
4
4
|
size?: "small" | "default" | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const EmptyDirectoryBox: import("styled-components").StyledComponent<"div",
|
|
6
|
+
export declare const EmptyDirectoryBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const EmptyArea: import("styled-components").StyledComponent<"div",
|
|
2
|
+
export declare const EmptyArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
3
|
emptyLogo: React.ReactNode;
|
|
4
4
|
}, never>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { RegisterOptions } from 'react-hook-form/dist/types/validator';
|
|
3
3
|
import { ErrorStyle } from '../Input/data';
|
|
4
4
|
import { FieldErrors } from 'react-hook-form/dist/types/errors';
|
|
5
|
-
import { Control, FieldValues } from
|
|
5
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
6
6
|
interface IItemProps<T extends FieldValues> extends Omit<React.ComponentPropsWithoutRef<'div'>, 'prefix'> {
|
|
7
7
|
name?: string;
|
|
8
8
|
label?: React.ReactNode;
|
|
@@ -17,6 +17,11 @@ interface IItemProps<T extends FieldValues> extends Omit<React.ComponentPropsWit
|
|
|
17
17
|
isFormItem?: boolean;
|
|
18
18
|
visible?: boolean;
|
|
19
19
|
control?: Control<T>;
|
|
20
|
+
option?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
button?: boolean;
|
|
20
25
|
}
|
|
21
26
|
declare const Item: React.ForwardRefExoticComponent<IItemProps<FieldValues> & React.RefAttributes<HTMLDivElement>>;
|
|
22
27
|
export default Item;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FormArea: import("styled-components").StyledComponent<"div",
|
|
1
|
+
export declare const FormArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
2
|
layout?: {
|
|
3
3
|
label: number | string;
|
|
4
4
|
wrapper?: number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ContentHeaderBox: import("styled-components").StyledComponent<"div",
|
|
1
|
+
export declare const ContentHeaderBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
2
|
small?: boolean | undefined;
|
|
3
3
|
minusWidth: number;
|
|
4
4
|
noTitle?: boolean | undefined;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ErrorType, OptionType } from './data';
|
|
3
|
-
export interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
|
|
3
|
+
export interface ICheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange' | 'size'> {
|
|
4
4
|
name?: string;
|
|
5
5
|
description?: React.ReactNode;
|
|
6
6
|
error?: string | ErrorType;
|
|
7
7
|
setValue?: any;
|
|
8
8
|
options?: string[] | OptionType[];
|
|
9
9
|
onChange?: (value: string[] | undefined) => void;
|
|
10
|
+
indeterminate?: boolean;
|
|
10
11
|
vertical?: boolean;
|
|
11
12
|
cRef?: React.Ref<any>;
|
|
13
|
+
type?: 'text' | 'icon';
|
|
14
|
+
size?: 'small' | 'medium';
|
|
12
15
|
}
|
|
13
16
|
export interface CheckboxRef {
|
|
14
17
|
checkAll: (reset?: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChangeHandler } from 'react-hook-form';
|
|
3
3
|
import { ErrorType, OptionType } from './data';
|
|
4
|
-
export interface IRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange'> {
|
|
4
|
+
export interface IRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'onChange' | 'size'> {
|
|
5
5
|
name?: string;
|
|
6
6
|
description?: React.ReactNode;
|
|
7
7
|
error?: string | ErrorType;
|
|
@@ -11,6 +11,8 @@ export interface IRadioProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
|
|
|
11
11
|
formOnChange?: ChangeHandler;
|
|
12
12
|
vertical?: boolean;
|
|
13
13
|
label?: string;
|
|
14
|
+
type?: 'text' | 'icon';
|
|
15
|
+
size?: 'small' | 'medium';
|
|
14
16
|
}
|
|
15
17
|
declare const Radio: React.ForwardRefExoticComponent<IRadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
18
|
export default Radio;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ChangeHandler } from 'react-hook-form';
|
|
2
3
|
import { ErrorStyle, ErrorType } from './data';
|
|
3
4
|
interface ITextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'> {
|
|
4
5
|
error?: string | ErrorType;
|
|
@@ -10,6 +11,8 @@ interface ITextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaE
|
|
|
10
11
|
rows: number;
|
|
11
12
|
description?: React.ReactNode;
|
|
12
13
|
areaStyle?: Record<string, any>;
|
|
14
|
+
size?: 'small' | 'medium';
|
|
15
|
+
formOnChange?: ChangeHandler;
|
|
13
16
|
}
|
|
14
17
|
declare const TextArea: React.ForwardRefExoticComponent<ITextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
15
18
|
export default TextArea;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const ItemArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
|
+
type: string;
|
|
3
|
+
vertical?: boolean | undefined;
|
|
4
|
+
indeterminate?: boolean | undefined;
|
|
5
|
+
size?: "small" | "medium" | undefined;
|
|
6
|
+
}, never>;
|
|
7
|
+
declare const InputBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
8
|
error: boolean;
|
|
3
9
|
suffixWidth: number;
|
|
4
10
|
prefixWidth: number;
|
|
5
11
|
disabled?: boolean | undefined;
|
|
6
12
|
size?: "small" | "medium" | undefined;
|
|
7
13
|
}, never>;
|
|
8
|
-
declare const ErrorMessage: import("styled-components").StyledComponent<"div",
|
|
14
|
+
declare const ErrorMessage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
9
15
|
suffixWidth: number;
|
|
10
16
|
}, never>;
|
|
11
|
-
declare const SuffixArea: import("styled-components").StyledComponent<"div",
|
|
12
|
-
declare const SelectArea: import("styled-components").StyledComponent<"div",
|
|
17
|
+
declare const SuffixArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
18
|
+
declare const SelectArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
13
19
|
disabled?: boolean | undefined;
|
|
14
20
|
}, never>;
|
|
15
|
-
declare const
|
|
16
|
-
type: string;
|
|
17
|
-
vertical?: boolean | undefined;
|
|
18
|
-
}, never>;
|
|
19
|
-
declare const SearchArea: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
+
declare const SearchArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
20
22
|
listHeight?: number | undefined;
|
|
21
23
|
}, never>;
|
|
22
|
-
declare const OptionItemsBox: import("styled-components").StyledComponent<"div",
|
|
23
|
-
isDropdownButton?: boolean | undefined;
|
|
24
|
+
declare const OptionItemsBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
25
|
+
$isDropdownButton?: boolean | undefined;
|
|
26
|
+
$maxWidth?: number | undefined;
|
|
24
27
|
}, never>;
|
|
25
|
-
|
|
28
|
+
declare const SuffixBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
29
|
+
export { InputBox, ErrorMessage, SuffixArea, SelectArea, ItemArea, SearchArea, OptionItemsBox, SuffixBox, };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare const LoadingBox: import("styled-components").StyledComponent<"div",
|
|
1
|
+
declare const LoadingBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
2
|
interface SinnerProps {
|
|
3
3
|
width: number;
|
|
4
4
|
weight: number;
|
|
5
5
|
color: string;
|
|
6
6
|
}
|
|
7
|
-
declare const SpinnerBoxTypeA: import("styled-components").StyledComponent<"div",
|
|
8
|
-
declare const SpinnerBoxTypeB: import("styled-components").StyledComponent<"div",
|
|
9
|
-
declare const SpinnerBoxTypeC: import("styled-components").StyledComponent<"div",
|
|
7
|
+
declare const SpinnerBoxTypeA: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SinnerProps, never>;
|
|
8
|
+
declare const SpinnerBoxTypeB: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SinnerProps, never>;
|
|
9
|
+
declare const SpinnerBoxTypeC: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SinnerProps, never>;
|
|
10
10
|
export { LoadingBox, SpinnerBoxTypeA, SpinnerBoxTypeB, SpinnerBoxTypeC, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export type OptionItem = {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
searchLabel?: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
type?: string;
|
|
7
|
+
children?: OptionItem[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
};
|
|
11
|
+
interface IMenuProps {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
items: OptionItem[];
|
|
14
|
+
size?: 'small' | 'large';
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
search?: boolean;
|
|
18
|
+
onChange?: (values: string[]) => void;
|
|
19
|
+
value?: string | string[] | null;
|
|
20
|
+
defaultValues?: string[];
|
|
21
|
+
}
|
|
22
|
+
export interface MenuRef {
|
|
23
|
+
searchFocus: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare const Menu: React.ForwardRefExoticComponent<IMenuProps & React.RefAttributes<MenuRef>>;
|
|
26
|
+
export default Menu;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ModalProps } from 'antd';
|
|
3
|
+
interface IModalProps extends ModalProps {
|
|
4
|
+
titleIcon?: ReactNode;
|
|
5
|
+
titleIconConfirm?: 'default' | 'warning' | 'error';
|
|
6
|
+
titleDescription?: string;
|
|
7
|
+
buttonAlign?: 'left' | 'center' | 'right';
|
|
8
|
+
}
|
|
9
|
+
declare const Modal: React.FC<IModalProps>;
|
|
10
|
+
export default Modal;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ModalWrap: import("styled-components").StyledComponent<import("react").FC<import("antd").ModalProps> & import("antd/lib/modal/confirm").ModalStaticFunctions & {
|
|
3
|
+
useModal: typeof import("antd/lib/modal/useModal").default;
|
|
4
|
+
destroyAll: () => void;
|
|
5
|
+
config: typeof import("antd/lib/modal/confirm").modalGlobalConfig;
|
|
6
|
+
}, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IPannelProps {
|
|
3
|
+
type?: 'default' | 'error' | 'success' | 'warning' | 'primary';
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
isIcon?: boolean;
|
|
7
|
+
buttonList?: any;
|
|
8
|
+
}
|
|
9
|
+
declare const Pannel: React.FC<IPannelProps>;
|
|
10
|
+
export default Pannel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
|
+
import { ProgressProps } from 'antd';
|
|
3
|
+
interface IProgressProps extends ProgressProps {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
ref?: Ref<HTMLDivElement>;
|
|
6
|
+
percent?: number;
|
|
7
|
+
width?: number;
|
|
8
|
+
status?: 'active' | 'normal' | 'exception' | 'success' | undefined;
|
|
9
|
+
}
|
|
10
|
+
declare const Progress: React.FC<IProgressProps>;
|
|
11
|
+
export default Progress;
|