enerdot-front-system 0.0.26 → 0.0.27
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 +2 -0
- package/dist/index.cjs.js +51 -43
- package/dist/index.es.js +3260 -2659
- package/dist/lib/components/Dropdown/Button/index.d.ts +9 -0
- package/dist/lib/components/Dropdown/OptionList/CheckboxOption.d.ts +12 -0
- package/dist/lib/components/Dropdown/OptionList/RadioOption.d.ts +11 -0
- package/dist/lib/components/Dropdown/OptionList/SeletOption.d.ts +12 -0
- package/dist/lib/components/Dropdown/OptionList/common.d.ts +5 -0
- package/dist/lib/components/Dropdown/OptionList/index.d.ts +16 -0
- package/dist/lib/components/Dropdown/index.d.ts +19 -0
- package/dist/lib/hooks/useTooltipPosition.d.ts +5 -0
- package/dist/lib/hooks/useVirtualScroll.d.ts +10 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/utils/validate.d.ts +8 -0
- package/package.json +4 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ButtonProps {
|
|
2
|
+
children?: React.ReactNode;
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
level?: "small" | "medium" | "large";
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
width?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default Button;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Option } from '../../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { DropdownOption } from '..';
|
|
3
|
+
interface CheckboxOptionProps {
|
|
4
|
+
option: DropdownOption;
|
|
5
|
+
values: Option[];
|
|
6
|
+
onChange: (value: Option[]) => void;
|
|
7
|
+
level: "small" | "medium" | "large";
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const CheckboxOption: ({ option, values, onChange, level, isSelected, children, }: CheckboxOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default CheckboxOption;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Option } from '../../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { DropdownOption } from '..';
|
|
3
|
+
interface RadioOptionProps {
|
|
4
|
+
option: DropdownOption;
|
|
5
|
+
onChange: (value: Option[]) => void;
|
|
6
|
+
level: "small" | "medium" | "large";
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const RadioOption: ({ option, onChange, level, isSelected, children, }: RadioOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default RadioOption;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Option } from '../../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { DropdownOption } from '..';
|
|
3
|
+
interface SelectOptionProps {
|
|
4
|
+
option: DropdownOption;
|
|
5
|
+
onChange: (value: Option[]) => void;
|
|
6
|
+
level: "small" | "medium" | "large";
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
onHideTooltip: () => void;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const SelectOption: ({ option, onChange, level, isSelected, onHideTooltip, children, }: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default SelectOption;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Option } from '../../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { DropdownOption } from '..';
|
|
3
|
+
interface OptionListProps {
|
|
4
|
+
options: DropdownOption[];
|
|
5
|
+
values: Option[];
|
|
6
|
+
onChange: (value: Option[]) => void;
|
|
7
|
+
input: string;
|
|
8
|
+
type: "checkbox" | "radio" | "select";
|
|
9
|
+
level: "small" | "medium" | "large";
|
|
10
|
+
isAllChecked?: boolean;
|
|
11
|
+
allCheckText?: string;
|
|
12
|
+
onHideTooltip: () => void;
|
|
13
|
+
containerRef: React.MutableRefObject<HTMLDivElement>;
|
|
14
|
+
}
|
|
15
|
+
declare const OptionList: ({ options, values, onChange, type, input, level, isAllChecked, allCheckText, onHideTooltip, containerRef, }: OptionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default OptionList;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Option, Options } from '../../../../../../../../../src/lib/types/option';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
3
|
+
export interface DropdownOption extends Option {
|
|
4
|
+
element?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface DropdownProps {
|
|
7
|
+
initialPlaceholder: string;
|
|
8
|
+
level?: ButtonProps["level"];
|
|
9
|
+
type?: "checkbox" | "radio" | "select";
|
|
10
|
+
options: DropdownOption[];
|
|
11
|
+
values: Options;
|
|
12
|
+
onChange: (value: Options) => void;
|
|
13
|
+
isAllChecked?: boolean;
|
|
14
|
+
allCheckText?: string;
|
|
15
|
+
unit?: string;
|
|
16
|
+
width?: "auto" | `${number}px`;
|
|
17
|
+
}
|
|
18
|
+
export declare const Dropdown: ({ initialPlaceholder, level, type, options, values, onChange, isAllChecked, allCheckText, unit, width, }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default Dropdown;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface VirtualScrollProps {
|
|
2
|
+
rowHeight: number;
|
|
3
|
+
overScanCount: number;
|
|
4
|
+
ref: React.MutableRefObject<HTMLElement>;
|
|
5
|
+
}
|
|
6
|
+
declare const useVirtualScroll: ({ rowHeight, overScanCount, ref, }: VirtualScrollProps) => {
|
|
7
|
+
showCount: number;
|
|
8
|
+
showFirstIndex: number;
|
|
9
|
+
};
|
|
10
|
+
export default useVirtualScroll;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './components/DateSelector/DatePicker/Calendar';
|
|
|
8
8
|
export * from './components/DateSelector/DateRangePicker';
|
|
9
9
|
export * from './components/DateSelector/DateRangePicker/Calendar';
|
|
10
10
|
export * from './components/Divider';
|
|
11
|
+
export * from './components/Dropdown';
|
|
11
12
|
export * from './components/IconButton';
|
|
12
13
|
export * from './components/IconWithButton';
|
|
13
14
|
export * from './components/Inputs/Input';
|
|
@@ -12,3 +12,11 @@ export declare const validateInputMinMax: ({ targetValue, min, max, }: {
|
|
|
12
12
|
min: number;
|
|
13
13
|
max: number;
|
|
14
14
|
}) => boolean;
|
|
15
|
+
/**초성 또는, 포함하는 단어가 있는지 확인하는 유틸 */
|
|
16
|
+
export declare const validateAutoComplete: (value: string, validateValue: string) => boolean;
|
|
17
|
+
/**비교 문자와 입력 문자를 비교해서 같은 글자 또는, 같은 초성인 부분과 아닌 부분을 나눠서 리턴하는 유틸 */
|
|
18
|
+
export declare const getValidateKorean: (value: string, input: string) => {
|
|
19
|
+
startValue: string;
|
|
20
|
+
validValue: string;
|
|
21
|
+
endValue: string;
|
|
22
|
+
};
|
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.27",
|
|
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.27.tgz",
|
|
31
|
+
"reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.27.tgz"
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
56
56
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
57
57
|
"globals": "^15.14.0",
|
|
58
|
+
"korean-regexp": "^1.0.13",
|
|
58
59
|
"moment": "^2.30.1",
|
|
59
60
|
"path": "^0.12.7",
|
|
60
61
|
"react": "^18.3.1",
|