enerdot-front-system 0.0.8 → 0.0.10
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/README.md +18 -2
- package/dist/index.cjs.js +425 -97
- package/dist/index.es.js +1533 -658
- package/dist/lib/components/ButtonFilter/Button.d.ts +6 -0
- package/dist/lib/components/ButtonFilter/CustomFilter.d.ts +13 -0
- package/dist/lib/components/ButtonFilter/index.d.ts +14 -0
- package/dist/lib/components/ButtonFilter/index.style.d.ts +8 -0
- package/dist/lib/components/Divider/index.d.ts +6 -0
- package/dist/lib/components/IconButton/OnlyIconButton.d.ts +3 -0
- package/dist/lib/components/IconButton/OnlyIconWhButton.d.ts +3 -0
- package/dist/lib/components/IconButton/PrimaryButton.d.ts +3 -0
- package/dist/lib/components/IconButton/SecondaryButton.d.ts +3 -0
- package/dist/lib/components/IconButton/TertiaryButton.d.ts +3 -0
- package/dist/lib/components/IconButton/common.d.ts +50 -0
- package/dist/lib/components/IconButton/index.d.ts +9 -0
- package/dist/lib/components/IconWithButton/index.d.ts +8 -0
- package/dist/lib/components/Inputs/Input.d.ts +15 -0
- package/dist/lib/components/Inputs/SearchInput.d.ts +7 -0
- package/dist/lib/components/Svg/arrow/ArrowDown.d.ts +5 -0
- package/dist/lib/components/Svg/arrow/ArrowUp.d.ts +5 -0
- package/dist/lib/hooks/useElementSize.d.ts +2 -0
- package/dist/lib/hooks/useTooltip.d.ts +2 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/utils/input.d.ts +6 -0
- package/dist/lib/utils/throttle.d.ts +1 -0
- package/dist/lib/utils/validate.d.ts +14 -0
- package/package.json +5 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
2
|
+
interface TertiaryButtonProps extends Omit<ButtonProps, "theme"> {
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const TertiaryButton: (props: TertiaryButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default TertiaryButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
2
|
+
export interface CustomButtonFilterProps {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
level?: ButtonProps["level"];
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
tooltipWidth?: number;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onOpenFilter: () => void;
|
|
10
|
+
onCloseFilter: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const CustomButtonFilter: ({ title, isSelected, level, tooltipWidth, children, isOpen, onOpenFilter, onCloseFilter, }: CustomButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default CustomButtonFilter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Options } from '../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export interface ButtonFilterProps {
|
|
4
|
+
title: string;
|
|
5
|
+
level?: ButtonProps["level"];
|
|
6
|
+
type?: "checkbox" | "radio" | "select";
|
|
7
|
+
options: Options;
|
|
8
|
+
values: Options;
|
|
9
|
+
onChange: (value: Options) => void;
|
|
10
|
+
isAllChecked?: boolean;
|
|
11
|
+
allCheckText?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ButtonFilter: ({ title, level, type, options, values, onChange, isAllChecked, allCheckText, }: ButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default ButtonFilter;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Tooltip: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$top: number;
|
|
4
|
+
$width?: number;
|
|
5
|
+
}>> & string;
|
|
6
|
+
export declare const ItemButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
7
|
+
$isSelected?: boolean;
|
|
8
|
+
}>> & string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface IconButtonStyleProps {
|
|
2
|
+
$mainColor: string;
|
|
3
|
+
$hoverColor: string;
|
|
4
|
+
$activeColor: string;
|
|
5
|
+
$isRound: boolean;
|
|
6
|
+
$padding: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const levels: {
|
|
9
|
+
small: {
|
|
10
|
+
padding: number;
|
|
11
|
+
};
|
|
12
|
+
medium: {
|
|
13
|
+
padding: number;
|
|
14
|
+
};
|
|
15
|
+
large: {
|
|
16
|
+
padding: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const colors: {
|
|
20
|
+
primary: {
|
|
21
|
+
$mainColor: string;
|
|
22
|
+
$hoverColor: string;
|
|
23
|
+
$activeColor: string;
|
|
24
|
+
};
|
|
25
|
+
green: {
|
|
26
|
+
$mainColor: string;
|
|
27
|
+
$hoverColor: string;
|
|
28
|
+
$activeColor: string;
|
|
29
|
+
};
|
|
30
|
+
red: {
|
|
31
|
+
$mainColor: string;
|
|
32
|
+
$hoverColor: string;
|
|
33
|
+
$activeColor: string;
|
|
34
|
+
};
|
|
35
|
+
orange: {
|
|
36
|
+
$mainColor: string;
|
|
37
|
+
$hoverColor: string;
|
|
38
|
+
$activeColor: string;
|
|
39
|
+
};
|
|
40
|
+
yellow: {
|
|
41
|
+
$mainColor: string;
|
|
42
|
+
$hoverColor: string;
|
|
43
|
+
$activeColor: string;
|
|
44
|
+
};
|
|
45
|
+
black: {
|
|
46
|
+
$mainColor: string;
|
|
47
|
+
$hoverColor: string;
|
|
48
|
+
$activeColor: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
level?: "small" | "medium" | "large";
|
|
4
|
+
theme?: "primary" | "secondary" | "tertiary" | "onlyIcon" | "onlyIconWh";
|
|
5
|
+
baseColor?: "primary" | "green" | "red" | "orange" | "yellow" | "black";
|
|
6
|
+
isRound?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const IconButton: (props: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default IconButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export interface IconWithButtonProps extends ButtonProps {
|
|
4
|
+
iconPosition?: "left" | "right";
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const IconWithButton: ({ children, iconPosition, icon, level, ...rest }: IconWithButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default IconWithButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
level?: "large" | "small";
|
|
4
|
+
width?: string;
|
|
5
|
+
unit?: string | ReactNode;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
successMessage?: string;
|
|
11
|
+
guideMessage?: string;
|
|
12
|
+
onCancel?: (name?: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const Input: ({ unit, type, onChange, min, max, width, label, level, value, disabled, errorMessage, successMessage, guideMessage, required, onCancel, ...props }: InputProps) => JSX.Element;
|
|
15
|
+
export default Input;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
2
|
+
width?: string;
|
|
3
|
+
level?: "small" | "large";
|
|
4
|
+
onCancel?: (name?: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const SearchInput: ({ width, level, value, disabled, onCancel, ...props }: SearchInputProps) => JSX.Element;
|
|
7
|
+
export default SearchInput;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export * from './components/Button';
|
|
2
|
+
export * from './components/ButtonFilter';
|
|
3
|
+
export * from './components/ButtonFilter/CustomFilter';
|
|
2
4
|
export * from './components/CheckBox';
|
|
5
|
+
export * from './components/Divider';
|
|
6
|
+
export * from './components/IconButton';
|
|
7
|
+
export * from './components/IconWithButton';
|
|
8
|
+
export * from './components/Inputs/Input';
|
|
9
|
+
export * from './components/Inputs/SearchInput';
|
|
3
10
|
export * from './components/Radio/RadioButton';
|
|
4
11
|
export * from './components/Radio/RadioButtons';
|
|
5
12
|
export * from './theme/color.style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const throttle: (fetchData: () => void, delay?: number) => () => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**문자열 타입 숫자 정규식 */
|
|
2
|
+
export declare const regexNumberString: RegExp;
|
|
3
|
+
/**문자열 타입 소수 정규식 */
|
|
4
|
+
export declare const regexNumeric: RegExp;
|
|
5
|
+
/**문자열 타입 숫자인지 확인하는 유틸 */
|
|
6
|
+
export declare const validateNumberString: (value: string) => boolean;
|
|
7
|
+
/**문자열 타입 소수인지 확인하는 유틸 - 다 된다*/
|
|
8
|
+
export declare const validateDecimalString: (value: string) => boolean;
|
|
9
|
+
/** input min,max 범위에 있는지 확인하는 유틸 */
|
|
10
|
+
export declare const validateInputMinMax: ({ targetValue, min, max, }: {
|
|
11
|
+
targetValue: string;
|
|
12
|
+
min: number;
|
|
13
|
+
max: number;
|
|
14
|
+
}) => boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enerdot-front-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"enerdot-front-system",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint": "eslint .",
|
|
28
28
|
"preview": "vite preview",
|
|
29
29
|
"prepare": "rm -rf dist && tsc && vite build",
|
|
30
|
-
"add:package": "yarn add ./enerdot-front-system-v0.0.
|
|
31
|
-
"reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.
|
|
30
|
+
"add:package": "yarn add ./enerdot-front-system-v0.0.10.tgz",
|
|
31
|
+
"reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.10.tgz"
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": "^18.3.1",
|
|
42
42
|
"react-dom": "^18.3.1",
|
|
43
|
-
"styled-components": "^6.1.14"
|
|
43
|
+
"styled-components": "^6.1.14",
|
|
44
|
+
"react-router-dom": "^7.1.1"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@eslint/js": "^9.17.0",
|