enerdot-front-system 0.0.29-beta.2 → 0.0.29-beta.20

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 (42) hide show
  1. package/README.md +3 -3
  2. package/dist/index-BhjJHeRp.js +829 -0
  3. package/dist/index-D5_M1Zj1.cjs +30 -0
  4. package/dist/index.cjs.js +64 -72
  5. package/dist/index.es.js +2958 -3486
  6. package/dist/lib/components/ButtonFilter/Button/index.d.ts +1 -0
  7. package/dist/lib/components/ButtonFilter/CustomFilter.d.ts +2 -1
  8. package/dist/lib/components/ButtonFilter/index.d.ts +3 -1
  9. package/dist/lib/components/CheckBox/index.d.ts +3 -2
  10. package/dist/lib/components/Chip/index.d.ts +3 -2
  11. package/dist/lib/components/Chip/theme.d.ts +3 -6
  12. package/dist/lib/components/DateSelector/DatePicker/Buttons/ArrowButton.d.ts +3 -2
  13. package/dist/lib/components/DateSelector/DatePicker/Buttons/InputButton.d.ts +5 -2
  14. package/dist/lib/components/DateSelector/DatePicker/index.d.ts +5 -2
  15. package/dist/lib/components/DateSelector/DateRangePicker/InputButton.d.ts +13 -0
  16. package/dist/lib/components/DateSelector/DateRangePicker/index.d.ts +5 -2
  17. package/dist/lib/components/Dropdown/Button/index.d.ts +3 -1
  18. package/dist/lib/components/Dropdown/OptionList/CheckboxOption.d.ts +3 -2
  19. package/dist/lib/components/Dropdown/OptionList/OptionSubLabelWrapper.d.ts +11 -0
  20. package/dist/lib/components/Dropdown/OptionList/RadioOption.d.ts +3 -2
  21. package/dist/lib/components/Dropdown/OptionList/SeletOption.d.ts +3 -2
  22. package/dist/lib/components/Dropdown/OptionList/index.d.ts +3 -2
  23. package/dist/lib/components/Dropdown/index.d.ts +5 -2
  24. package/dist/lib/components/Inputs/Input/index.d.ts +9 -5
  25. package/dist/lib/components/Inputs/SearchInput/index.d.ts +5 -3
  26. package/dist/lib/components/Pagination/index.d.ts +2 -1
  27. package/dist/lib/components/Radio/RadioButton/index.d.ts +2 -1
  28. package/dist/lib/components/Radio/RadioButtons.d.ts +4 -3
  29. package/dist/lib/components/Tab/index.d.ts +3 -2
  30. package/dist/lib/components/Textarea/index.d.ts +3 -2
  31. package/dist/lib/hooks/useTooltipWithPortal.d.ts +44 -0
  32. package/dist/lib/index.d.ts +0 -1
  33. package/dist/lib/server.d.ts +3 -0
  34. package/dist/lib/theme/color.style.d.ts +14 -0
  35. package/dist/lib/types/option.d.ts +5 -4
  36. package/dist/lib/types/theme.d.ts +4 -0
  37. package/dist/server.cjs.js +1 -0
  38. package/dist/server.es.js +6 -0
  39. package/package.json +10 -4
  40. package/dist/lib/components/DateSelector/DateRangePicker/Button.d.ts +0 -10
  41. package/dist/lib/hooks/useTooltip.d.ts +0 -2
  42. package/dist/lib/hooks/useTooltipPosition.d.ts +0 -7
@@ -1,6 +1,7 @@
1
1
  import { ButtonProps } from '../../Button';
2
2
  interface TertiaryButtonProps extends Omit<ButtonProps, "theme"> {
3
3
  isOpen?: boolean;
4
+ isError?: boolean;
4
5
  }
5
6
  declare const TertiaryButton: (props: TertiaryButtonProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export default TertiaryButton;
@@ -8,6 +8,7 @@ export interface CustomButtonFilterProps {
8
8
  isOpen: boolean;
9
9
  onOpenFilter: () => void;
10
10
  onCloseFilter: () => void;
11
+ isError?: boolean;
11
12
  }
12
- export declare const CustomButtonFilter: ({ title, isSelected, level, tooltipWidth, children, isOpen, onOpenFilter, onCloseFilter, }: CustomButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const CustomButtonFilter: ({ title, isSelected, level, tooltipWidth, children, isOpen, onOpenFilter, onCloseFilter, isError, }: CustomButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export default CustomButtonFilter;
@@ -9,6 +9,8 @@ export interface ButtonFilterProps {
9
9
  onChange: (value: Options) => void;
10
10
  isAllChecked?: boolean;
11
11
  allCheckText?: string;
12
+ menuHeight?: number;
13
+ isError?: boolean;
12
14
  }
13
- export declare const ButtonFilter: ({ title, level, type, options, values, onChange, isAllChecked, allCheckText, }: ButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const ButtonFilter: ({ title, level, type, options, values, onChange, isAllChecked, allCheckText, menuHeight, isError, }: ButtonFilterProps) => import("react/jsx-runtime").JSX.Element;
14
16
  export default ButtonFilter;
@@ -1,9 +1,10 @@
1
- interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
1
+ import { Theme } from '../../types/theme';
2
+ export interface CheckboxProps extends Theme, React.InputHTMLAttributes<HTMLInputElement> {
2
3
  children?: React.ReactNode;
3
4
  onClickBox?: (info: {
4
5
  checked?: boolean;
5
6
  name?: string;
6
7
  }, event?: React.MouseEvent<HTMLElement>) => void;
7
8
  }
8
- export declare const Checkbox: ({ id, checked, name, required, children, disabled, onClickBox, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Checkbox: ({ id, checked, name, required, lightTheme, children, disabled, onClickBox, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default Checkbox;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ChipColorTheme } from './theme';
3
- export interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ import { Theme } from '../../types/theme';
4
+ export interface ChipProps extends Theme, React.HTMLAttributes<HTMLDivElement> {
4
5
  colorTheme?: keyof ChipColorTheme;
5
6
  level?: "small" | "regular" | "large";
6
7
  borderRadius?: "round" | "full";
@@ -8,5 +9,5 @@ export interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
8
9
  isWhiteBg?: boolean;
9
10
  gap?: number;
10
11
  }
11
- export declare const Chip: ({ children, level, borderRadius, colorTheme, isWhiteBg, gap, isDot, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Chip: ({ children, lightTheme, level, borderRadius, colorTheme, isWhiteBg, gap, isDot, }: ChipProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export default Chip;
@@ -2,13 +2,10 @@ type ColorObject = {
2
2
  bgColor: string;
3
3
  textColor: string;
4
4
  };
5
+ type ChipBaseColor = "yellow" | "orange" | "red" | "green" | "primary" | "gray";
5
6
  export type ChipColorTheme = {
6
- yellow: ColorObject;
7
- orange: ColorObject;
8
- red: ColorObject;
9
- green: ColorObject;
10
- primary: ColorObject;
11
- gray: ColorObject;
7
+ [key in ChipBaseColor]: ColorObject;
12
8
  };
9
+ export declare const darkColorThemes: ChipColorTheme;
13
10
  export declare const colorThemes: ChipColorTheme;
14
11
  export {};
@@ -1,6 +1,6 @@
1
1
  import { default as moment } from 'moment';
2
2
  interface ArrowButtonProps {
3
- level: "small" | "large";
3
+ level: "small" | "medium" | "large";
4
4
  dateType: "day" | "week" | "month" | "quarter" | "year";
5
5
  format: "hyphenFormat" | "dotFormat";
6
6
  onClick: () => void;
@@ -13,6 +13,7 @@ interface ArrowButtonProps {
13
13
  name?: string;
14
14
  }) => void;
15
15
  name?: string;
16
+ isIcon?: boolean;
16
17
  }
17
- declare const ArrowButton: ({ level, dateType, onClick, format, disabled, date, maxDate, minDate, onChange, name, }: ArrowButtonProps) => import("react/jsx-runtime").JSX.Element;
18
+ declare const ArrowButton: ({ level, dateType, onClick, format, disabled, date, maxDate, minDate, onChange, name, isIcon, }: ArrowButtonProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export default ArrowButton;
@@ -1,10 +1,13 @@
1
1
  interface InputButtonProps {
2
- level: "small" | "large";
2
+ level: "small" | "medium" | "large";
3
3
  dateType: "day" | "week" | "month" | "quarter" | "year";
4
4
  format: "hyphenFormat" | "dotFormat";
5
5
  onClick: () => void;
6
6
  disabled?: boolean;
7
7
  date: moment.Moment;
8
+ onCancel?: () => void;
9
+ isError?: boolean;
10
+ isIcon?: boolean;
8
11
  }
9
- declare const InputButton: ({ level, dateType, onClick, format, disabled, date, }: InputButtonProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const InputButton: ({ level, dateType, onClick, format, disabled, date, onCancel, isError, isIcon, }: InputButtonProps) => import("react/jsx-runtime").JSX.Element;
10
13
  export default InputButton;
@@ -11,9 +11,12 @@ export interface DatePickerProps {
11
11
  disabled?: boolean;
12
12
  name?: string;
13
13
  width?: "auto" | `${number}px` | "100%";
14
- level?: "small" | "large";
14
+ level?: "small" | "medium" | "large";
15
15
  format?: "hyphenFormat" | "dotFormat";
16
16
  buttonType?: "arrow" | "input";
17
+ isCancelable?: boolean;
18
+ isError?: boolean;
19
+ isIcon?: boolean;
17
20
  }
18
- export declare const DatePicker: ({ date, dateType, maxDate, minDate, onChange, disabled, name, format, level, buttonType, width, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const DatePicker: ({ date, dateType, maxDate, minDate, onChange, disabled, name, format, level, buttonType, width, isCancelable, isError, isIcon, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
19
22
  export default DatePicker;
@@ -0,0 +1,13 @@
1
+ interface InputButtonProps {
2
+ level: "small" | "medium" | "large";
3
+ dateType: "day" | "month" | "year";
4
+ format: "hyphenFormat" | "dotFormat";
5
+ onClick: () => void;
6
+ disabled?: boolean;
7
+ dates: [moment.Moment, moment.Moment];
8
+ onCancel?: () => void;
9
+ isError?: boolean;
10
+ isIcon?: boolean;
11
+ }
12
+ declare const InputButton: ({ level, dateType, onClick, format, disabled, dates, onCancel, isError, isIcon, }: InputButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default InputButton;
@@ -11,10 +11,13 @@ export interface DateRangePickerProps {
11
11
  disabled?: boolean;
12
12
  name?: string;
13
13
  width?: "auto" | `${number}px` | "100%";
14
- level?: "small" | "large";
14
+ level?: "small" | "medium" | "large";
15
15
  format?: "hyphenFormat" | "dotFormat";
16
16
  buttonType?: "arrow" | "input";
17
17
  maxRange?: number;
18
+ isCancelable?: boolean;
19
+ isError?: boolean;
20
+ isIcon?: boolean;
18
21
  }
19
- export declare const DateRangePicker: ({ dates, dateType, maxDate, minDate, onChange, disabled, name, format, level, width, maxRange, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const DateRangePicker: ({ dates, dateType, maxDate, minDate, onChange, disabled, name, format, level, width, maxRange, isCancelable, isError, isIcon, }: DateRangePickerProps) => import("react/jsx-runtime").JSX.Element;
20
23
  export default DateRangePicker;
@@ -1,10 +1,12 @@
1
- interface ButtonProps {
1
+ import { Theme } from '../../../types/theme';
2
+ interface ButtonProps extends Theme {
2
3
  children?: React.ReactNode;
3
4
  onClick?: () => void;
4
5
  level?: "small" | "medium" | "large";
5
6
  isOpen?: boolean;
6
7
  width?: string;
7
8
  disabled?: boolean;
9
+ isError?: boolean;
8
10
  }
9
11
  declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
12
  export default Button;
@@ -1,6 +1,7 @@
1
1
  import { Option } from '../../../types/option';
2
2
  import { DropdownOption } from '..';
3
- interface CheckboxOptionProps {
3
+ import { Theme } from '../../../types/theme';
4
+ interface CheckboxOptionProps extends Theme {
4
5
  option: DropdownOption;
5
6
  values: Option[];
6
7
  onChange: (value: Option[]) => void;
@@ -8,5 +9,5 @@ interface CheckboxOptionProps {
8
9
  isSelected: boolean;
9
10
  children: React.ReactNode;
10
11
  }
11
- declare const CheckboxOption: ({ option, values, onChange, level, isSelected, children, }: CheckboxOptionProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const CheckboxOption: ({ option, values, onChange, level, isSelected, children, lightTheme, }: CheckboxOptionProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export default CheckboxOption;
@@ -0,0 +1,11 @@
1
+ import { SelectOptionProps } from './SeletOption';
2
+ /**
3
+ * 기존 [Radio,Select,Checkbox] Option 컴포넌트에 하단에 Sublabel추가 하기 위한 래퍼 컴포넌트.
4
+ */
5
+ declare const OptionSubLabelWrapper: ({ option, isLarge, isSelected, children, }: {
6
+ option: SelectOptionProps["option"];
7
+ isSelected?: SelectOptionProps["isSelected"];
8
+ isLarge?: boolean;
9
+ children: React.ReactNode;
10
+ }) => import("react/jsx-runtime").JSX.Element;
11
+ export default OptionSubLabelWrapper;
@@ -1,11 +1,12 @@
1
1
  import { Option } from '../../../types/option';
2
2
  import { DropdownOption } from '..';
3
- interface RadioOptionProps {
3
+ import { Theme } from '../../../types/theme';
4
+ interface RadioOptionProps extends Theme {
4
5
  option: DropdownOption;
5
6
  onChange: (value: Option[]) => void;
6
7
  level: "small" | "medium" | "large";
7
8
  isSelected: boolean;
8
9
  children: React.ReactNode;
9
10
  }
10
- declare const RadioOption: ({ option, onChange, level, isSelected, children, }: RadioOptionProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const RadioOption: ({ lightTheme, option, onChange, level, isSelected, children, }: RadioOptionProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export default RadioOption;
@@ -1,6 +1,7 @@
1
1
  import { Option } from '../../../types/option';
2
2
  import { DropdownOption } from '..';
3
- interface SelectOptionProps {
3
+ import { Theme } from '../../../types/theme';
4
+ export interface SelectOptionProps extends Theme {
4
5
  option: DropdownOption;
5
6
  onChange: (value: Option[]) => void;
6
7
  level: "small" | "medium" | "large";
@@ -8,5 +9,5 @@ interface SelectOptionProps {
8
9
  onHideTooltip: () => void;
9
10
  children: React.ReactNode;
10
11
  }
11
- declare const SelectOption: ({ option, onChange, level, isSelected, onHideTooltip, children, }: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const SelectOption: ({ lightTheme, option, onChange, level, isSelected, onHideTooltip, children, }: SelectOptionProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export default SelectOption;
@@ -1,6 +1,7 @@
1
1
  import { Option } from '../../../types/option';
2
2
  import { DropdownOption } from '..';
3
- interface OptionListProps {
3
+ import { Theme } from '../../../types/theme';
4
+ interface OptionListProps extends Theme {
4
5
  options: DropdownOption[];
5
6
  values: Option[];
6
7
  onChange: (value: Option[]) => void;
@@ -12,5 +13,5 @@ interface OptionListProps {
12
13
  onHideTooltip: () => void;
13
14
  containerRef: React.MutableRefObject<HTMLDivElement>;
14
15
  }
15
- declare const OptionList: ({ options, values, onChange, type, input, level, isAllChecked, allCheckText, onHideTooltip, containerRef, }: OptionListProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const OptionList: ({ options, values, onChange, type, input, level, isAllChecked, allCheckText, onHideTooltip, containerRef, lightTheme, }: OptionListProps) => import("react/jsx-runtime").JSX.Element;
16
17
  export default OptionList;
@@ -1,9 +1,10 @@
1
1
  import { Option, Options } from '../../types/option';
2
+ import { Theme } from '../../types/theme';
2
3
  import { ButtonProps } from '../Button';
3
4
  export interface DropdownOption extends Option {
4
5
  element?: React.ReactNode;
5
6
  }
6
- export interface DropdownProps {
7
+ export interface DropdownProps extends Theme {
7
8
  initialPlaceholder: string;
8
9
  level?: ButtonProps["level"];
9
10
  type?: "checkbox" | "radio" | "select";
@@ -15,6 +16,8 @@ export interface DropdownProps {
15
16
  unit?: string;
16
17
  width?: "auto" | `${number}px` | "100%";
17
18
  disabled?: boolean;
19
+ menuHeight?: number;
20
+ isError?: boolean;
18
21
  }
19
- export declare const Dropdown: ({ initialPlaceholder, level, type, options, values, onChange, isAllChecked, allCheckText, unit, width, disabled, }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const Dropdown: ({ initialPlaceholder, level, type, lightTheme, options, values, onChange, isAllChecked, allCheckText, unit, width, disabled, menuHeight, isError, }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
20
23
  export default Dropdown;
@@ -1,15 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
- level?: "large" | "small";
2
+ import { Theme } from '../../../types/theme';
3
+ export interface InputProps extends Theme, React.InputHTMLAttributes<HTMLInputElement> {
4
+ level?: "large" | "medium" | "small";
4
5
  width?: string;
5
6
  unit?: string | ReactNode;
6
- min?: number;
7
- max?: number;
8
7
  label?: string;
9
8
  errorMessage?: string;
10
9
  successMessage?: string;
11
10
  guideMessage?: string;
12
11
  onCancel?: (name?: string) => void;
12
+ textAlign?: "left" | "right";
13
+ isShowCount?: boolean;
14
+ isError?: boolean;
15
+ isSuccess?: boolean;
16
+ decimalLimits?: number;
13
17
  }
14
- export declare const Input: ({ unit, type, onChange, min, max, width, label, level, value, disabled, errorMessage, successMessage, guideMessage, required, onCancel, ...props }: InputProps) => JSX.Element;
18
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
15
19
  export default Input;
@@ -1,7 +1,9 @@
1
- export interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1
+ import { Theme } from '../../../types/theme';
2
+ export interface SearchInputProps extends Theme, React.InputHTMLAttributes<HTMLInputElement> {
2
3
  width?: string;
3
- level?: "small" | "large";
4
+ level?: "small" | "medium" | "large";
4
5
  onCancel?: (name?: string) => void;
6
+ textAlign?: "left" | "right";
5
7
  }
6
- export declare const SearchInput: ({ width, level, value, disabled, onCancel, ...props }: SearchInputProps) => JSX.Element;
8
+ export declare const SearchInput: ({ width, level, value, disabled, onCancel, lightTheme, textAlign, ...props }: SearchInputProps) => JSX.Element;
7
9
  export default SearchInput;
@@ -1,4 +1,5 @@
1
- interface PaginationProps {
1
+ import { Theme } from '../../types/theme';
2
+ interface PaginationProps extends Theme {
2
3
  totalPageCount: number;
3
4
  currentPage: number;
4
5
  displayRangeCount?: number;
@@ -1,4 +1,5 @@
1
- interface RadioButtonProps {
1
+ import { Theme } from '../../../types/theme';
2
+ interface RadioButtonProps extends Theme {
2
3
  checked: boolean;
3
4
  label?: string;
4
5
  name?: string;
@@ -1,9 +1,10 @@
1
1
  import { Option, Options } from '../../types/option';
2
- export interface RadioButtonsProps {
2
+ import { Theme } from '../../types/theme';
3
+ export interface RadioButtonsProps extends Theme {
3
4
  options: Options;
4
- value: Option;
5
+ value: Option | null;
5
6
  onClick: (value: Option) => void;
6
7
  disabled?: boolean;
7
8
  }
8
- export declare const RadioButtons: ({ options, value, onClick, disabled, }: RadioButtonsProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const RadioButtons: ({ options, value, onClick, disabled, lightTheme, }: RadioButtonsProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default RadioButtons;
@@ -5,9 +5,10 @@ export interface TabItemProps {
5
5
  }
6
6
  export interface TabProps {
7
7
  tabs: Array<TabItemProps>;
8
- selectId: string | number;
8
+ selectId: number;
9
9
  level?: "large" | "medium" | "small";
10
10
  onClick: (index: number) => void;
11
+ isBottomBorder?: boolean;
11
12
  }
12
- export declare const Tab: ({ tabs, selectId, level, onClick }: TabProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Tab: ({ tabs, selectId, level, onClick, isBottomBorder, }: TabProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export default Tab;
@@ -1,9 +1,10 @@
1
1
  export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
2
2
  width?: string;
3
3
  label?: string;
4
- errorText?: string;
4
+ errorMessage?: string;
5
5
  isShutdown?: boolean;
6
6
  isRequired?: boolean;
7
+ isError?: boolean;
7
8
  }
8
- export declare const Textarea: ({ errorText, width, label, isShutdown, value, disabled, isRequired, ...props }: TextareaProps) => JSX.Element;
9
+ export declare const Textarea: ({ errorMessage, width, label, isShutdown, value, disabled, isRequired, isError, ...props }: TextareaProps) => JSX.Element;
9
10
  export default Textarea;
@@ -0,0 +1,44 @@
1
+ export interface UseMenuWithPortalOptions {
2
+ containerRef: React.MutableRefObject<HTMLElement | null>;
3
+ menuRef: React.MutableRefObject<HTMLElement | null>;
4
+ minWidth?: number;
5
+ estimatedMenuHeight?: number;
6
+ gap?: number;
7
+ }
8
+ export interface UseMenuWithPortalReturn {
9
+ isOpen: boolean;
10
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
11
+ menuStyle: React.CSSProperties;
12
+ }
13
+ /**
14
+ * createPortal을 사용하는 툴팁을 위한 통합 훅
15
+ * 외부 클릭 감지와 위치 계산 기능을 모두 제공합니다.
16
+ *
17
+ * @param options - 툴팁 옵션
18
+ * @returns isOpen, setOpen, menuStyle을 반환
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const containerRef = useRef<HTMLDivElement>(null);
23
+ * const menuRef = useRef<HTMLDivElement>(null);
24
+ *
25
+ * const { isOpen, setOpen, menuStyle } = useMenuWithPortal({
26
+ * containerRef,
27
+ * menuRef,
28
+ * minWidth: 300,
29
+ * estimatedMenuHeight: 510,
30
+ * gap: 8,
31
+ * });
32
+ *
33
+ * return (
34
+ * <>
35
+ * <div ref={containerRef} onClick={() => setOpen(true)}>...</div>
36
+ * {isOpen && createPortal(
37
+ * <div ref={menuRef} style={menuStyle}>...</div>,
38
+ * document.body
39
+ * )}
40
+ * </>
41
+ * );
42
+ * ```
43
+ */
44
+ export declare const useMenuWithPortal: ({ containerRef, menuRef, minWidth, estimatedMenuHeight, gap, }: UseMenuWithPortalOptions) => UseMenuWithPortalReturn;
@@ -19,6 +19,5 @@ export * from './components/Radio/RadioButtons';
19
19
  export * from './components/Segment';
20
20
  export * from './components/Tab';
21
21
  export * from './components/Textarea';
22
- export { useTooltipPosition } from './hooks/useTooltipPosition';
23
22
  export { useVirtualScroll } from './hooks/useVirtualScroll';
24
23
  export * from './theme/color.style';
@@ -0,0 +1,3 @@
1
+ export * from './components/Chip';
2
+ export * from './components/Divider';
3
+ export * from './theme/color.style';
@@ -46,4 +46,18 @@ export interface ThemeColors {
46
46
  yellow300: string;
47
47
  yellow400: string;
48
48
  yellow500: string;
49
+ darkbg400: string;
50
+ darkbg500: string;
51
+ darkbg600: string;
52
+ darkbg700: string;
53
+ darkbg800: string;
54
+ darkbg900: string;
55
+ darkgray200: string;
56
+ darkgray300: string;
57
+ darkgray400: string;
58
+ darkgray500: string;
59
+ darkgray900: string;
60
+ darkblue500: string;
61
+ darkblue900: string;
62
+ darkyellow600: string;
49
63
  }
@@ -1,5 +1,6 @@
1
- export type Option = {
2
- label: string;
3
- value: string;
1
+ export type Option<T = string> = {
2
+ label: T;
3
+ subLabel?: string;
4
+ value: T;
4
5
  };
5
- export type Options = Option[];
6
+ export type Options<T = string> = Option<T>[];
@@ -0,0 +1,4 @@
1
+ export interface Theme {
2
+ lightTheme?: LightThemeType;
3
+ }
4
+ export type LightThemeType = "light" | "dark";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D5_M1Zj1.cjs");exports.Chip=e.Chip;exports.Divider=e.Divider;exports.themeColors=e.themeColors;
@@ -0,0 +1,6 @@
1
+ import { C as r, D as s, t as a } from "./index-BhjJHeRp.js";
2
+ export {
3
+ r as Chip,
4
+ s as Divider,
5
+ a as themeColors
6
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "enerdot-front-system",
3
3
  "private": false,
4
- "version": "0.0.29-beta.2",
4
+ "version": "0.0.29-beta.20",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "enerdot-front-system",
@@ -27,14 +27,19 @@
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.29-beta.2.tgz",
31
- "reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.29-beta.2.tgz"
30
+ "add:package": "yarn add ./enerdot-front-system-v0.0.29-beta.20.tgz",
31
+ "reset:package": "yarn remove enerdot-front-system && yarn cache clean && rm -rf ./enerdot-front-system-v0.0.29-beta.20.tgz"
32
32
  },
33
33
  "exports": {
34
34
  ".": {
35
35
  "types": "./dist/lib/index.d.ts",
36
36
  "require": "./dist/index.cjs.js",
37
37
  "import": "./dist/index.es.js"
38
+ },
39
+ "./server": {
40
+ "types": "./dist/lib/server.d.ts",
41
+ "require": "./dist/server.cjs.js",
42
+ "import": "./dist/server.es.js"
38
43
  }
39
44
  },
40
45
  "peerDependencies": {
@@ -68,5 +73,6 @@
68
73
  "vite": "^6.0.5",
69
74
  "vite-plugin-css-injected-by-js": "^3.5.2",
70
75
  "vite-plugin-dts": "^4.4.0"
71
- }
76
+ },
77
+ "dependencies": {}
72
78
  }
@@ -1,10 +0,0 @@
1
- interface ButtonProps {
2
- level: "small" | "large";
3
- dateType: "day" | "month" | "year";
4
- format: "hyphenFormat" | "dotFormat";
5
- onClick: () => void;
6
- disabled?: boolean;
7
- dates: [moment.Moment, moment.Moment];
8
- }
9
- declare const Button: ({ level, dateType, onClick, format, disabled, dates, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
- export default Button;
@@ -1,2 +0,0 @@
1
- import { MutableRefObject } from 'react';
2
- export declare const useTooltip: (ref: MutableRefObject<HTMLElement>) => [boolean, React.Dispatch<React.SetStateAction<boolean>>];
@@ -1,7 +0,0 @@
1
- type TooltipPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
2
- export declare const useTooltipPosition: ({ isOpen, containerRef, tooltipRef, }: {
3
- isOpen: boolean;
4
- containerRef: React.MutableRefObject<HTMLDivElement>;
5
- tooltipRef: React.MutableRefObject<HTMLDivElement>;
6
- }) => TooltipPosition;
7
- export {};