maru_design2 2.31.1 → 3.0.2
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/CHANGELOG.md +46 -0
- package/dist/components/atoms/badge/Badge.d.ts +40 -3
- package/dist/components/atoms/button/Button.d.ts +16 -0
- package/dist/components/atoms/checkbox/Checkbox.d.ts +2 -1
- package/dist/components/atoms/chip/Chip.d.ts +36 -3
- package/dist/components/atoms/code/Code.d.ts +2 -1
- package/dist/components/atoms/icon/Icon.d.ts +5 -3
- package/dist/components/atoms/icon/iconmap.d.ts +4 -0
- package/dist/components/atoms/input/Input.d.ts +8 -0
- package/dist/components/atoms/popover/Popover.d.ts +1 -1
- package/dist/components/atoms/radio/Radio.d.ts +9 -5
- package/dist/components/atoms/radio/index.d.ts +1 -0
- package/dist/components/atoms/skeleton/Contents.d.ts +2 -1
- package/dist/components/atoms/skeleton/Skeleton.d.ts +2 -1
- package/dist/components/atoms/slider/Slider.d.ts +3 -5
- package/dist/components/atoms/toggle/Toggle.d.ts +8 -23
- package/dist/components/atoms/toggle/index.d.ts +1 -0
- package/dist/components/atoms/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/molecules/buttonGroup/ButtonGroup.d.ts +1 -1
- package/dist/components/molecules/calendar/Calendar.d.ts +1 -1
- package/dist/components/molecules/calendar/DatePickerHeader.d.ts +2 -1
- package/dist/components/molecules/calendar/DatePickerWrapper.d.ts +2 -1
- package/dist/components/molecules/dropdown/Dropdown.d.ts +6 -1
- package/dist/components/molecules/dropdown/menu/MenuItem.d.ts +1 -1
- package/dist/components/molecules/dropdown/menu/index.d.ts +1 -1
- package/dist/components/molecules/dropdown/toggleButton/Arrow.d.ts +2 -2
- package/dist/components/molecules/dropdown/toggleButton/Clear.d.ts +2 -1
- package/dist/components/molecules/dropdown/toggleButton/index.d.ts +2 -1
- package/dist/components/molecules/inputWithAction/InputWithAction.d.ts +14 -0
- package/dist/components/molecules/inputWithAction/index.d.ts +1 -0
- package/dist/components/molecules/modal/Modal.d.ts +20 -2
- package/dist/components/molecules/multiSelectDropdown/MultiSelectDropdown.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/menu/MenuItem.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/menu/index.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Arrow.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/Clear.d.ts +2 -1
- package/dist/components/molecules/multiSelectDropdown/toggleButton/index.d.ts +2 -1
- package/dist/components/molecules/numberInput/NumberInput.d.ts +18 -0
- package/dist/components/molecules/numberInput/index.d.ts +1 -0
- package/dist/components/molecules/pagination/Pagination.d.ts +2 -1
- package/dist/components/molecules/searchInput/SearchInput.d.ts +1 -1
- package/dist/components/molecules/searchInput/filter/FilterPopover.d.ts +1 -1
- package/dist/components/molecules/searchInput/filter/index.d.ts +1 -1
- package/dist/components/molecules/table/Colgroup.d.ts +2 -1
- package/dist/components/molecules/table/Table.d.ts +2 -1
- package/dist/components/molecules/table/body/BinButtonTd.d.ts +2 -1
- package/dist/components/molecules/table/body/ChartButtonTd.d.ts +2 -1
- package/dist/components/molecules/table/body/CheckboxTd.d.ts +3 -1
- package/dist/components/molecules/table/body/EmptyTr.d.ts +1 -1
- package/dist/components/molecules/table/body/KebabMenuTd.d.ts +1 -1
- package/dist/components/molecules/table/body/RadioTd.d.ts +3 -1
- package/dist/components/molecules/table/body/Tr.d.ts +2 -1
- package/dist/components/molecules/table/body/index.d.ts +2 -1
- package/dist/components/molecules/table/header/FilterButtonsTh.d.ts +2 -1
- package/dist/components/molecules/table/header/FilterTh.d.ts +1 -1
- package/dist/components/molecules/table/header/SortableColumn.d.ts +2 -8
- package/dist/components/molecules/table/header/index.d.ts +1 -1
- package/dist/components/molecules/table/types.d.ts +7 -0
- package/dist/components/molecules/tabs/Tab.d.ts +12 -0
- package/dist/components/molecules/tabs/Tabs.d.ts +21 -0
- package/dist/components/molecules/tabs/TabsContext.d.ts +4 -0
- package/dist/components/molecules/tabs/index.d.ts +2 -0
- package/dist/components/molecules/tagInput/TagInput.d.ts +22 -0
- package/dist/components/molecules/tagInput/index.d.ts +2 -0
- package/dist/components/molecules/toast/Details.d.ts +3 -2
- package/dist/components/molecules/toast/DetailsItem.d.ts +6 -0
- package/dist/components/molecules/toast/Toast.d.ts +5 -21
- package/dist/components/molecules/toast/ToastContext.d.ts +2 -2
- package/dist/components/molecules/toast/ToastStyle.d.ts +4 -2
- package/dist/components/molecules/toast/index.d.ts +2 -0
- package/dist/components/molecules/toast/types.d.ts +1 -4
- package/dist/components/styleProvider/StyleProvider.d.ts +7 -3
- package/dist/constants/color.d.ts +352 -0
- package/dist/constants/input.d.ts +2 -0
- package/dist/constants/toast.d.ts +2 -0
- package/dist/enums/color.d.ts +113 -6
- package/dist/enums/size.d.ts +5 -2
- package/dist/enums/variant.d.ts +7 -2
- package/dist/fonts.js +1 -1
- package/dist/hooks/useColor.d.ts +2 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1703 -616
- package/dist/types/color.d.ts +4 -0
- package/dist/types/input.d.ts +7 -0
- package/dist/types/radio.d.ts +12 -0
- package/dist/types/tabs.d.ts +12 -0
- package/dist/types/toast.d.ts +29 -0
- package/dist/types/toggle.d.ts +5 -0
- package/package.json +35 -7
- package/mise.toml +0 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TColor } from '../../../../enums/color';
|
|
2
3
|
interface Props<T extends Record<string, any>> {
|
|
3
4
|
item: T;
|
|
@@ -8,5 +9,5 @@ interface Props<T extends Record<string, any>> {
|
|
|
8
9
|
color?: TColor;
|
|
9
10
|
width?: number;
|
|
10
11
|
}
|
|
11
|
-
declare function MenuItem<T extends Record<string, any>>({ item, selectedIds, onSelect, idKey, displayKey, color, width, }: Props<T>):
|
|
12
|
+
declare function MenuItem<T extends Record<string, any>>({ item, selectedIds, onSelect, idKey, displayKey, color, width, }: Props<T>): React.JSX.Element;
|
|
12
13
|
export default MenuItem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TColor } from '../../../../enums/color';
|
|
2
3
|
interface Props<T extends Record<string, any>> {
|
|
3
4
|
data: T[];
|
|
@@ -17,5 +18,5 @@ interface Props<T extends Record<string, any>> {
|
|
|
17
18
|
open: boolean;
|
|
18
19
|
onClose: () => void;
|
|
19
20
|
}
|
|
20
|
-
declare function DropdownMenu<T extends Record<string, any>>({ data, selectedIds, onSelect, idKey, displayKey, searchPlaceholder, allCheckLabel, color, noDataMessage, noResultMessage, width, height, isSearch, parent, open, onClose, }: Props<T>):
|
|
21
|
+
declare function DropdownMenu<T extends Record<string, any>>({ data, selectedIds, onSelect, idKey, displayKey, searchPlaceholder, allCheckLabel, color, noDataMessage, noResultMessage, width, height, isSearch, parent, open, onClose, }: Props<T>): React.JSX.Element;
|
|
21
22
|
export default DropdownMenu;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TColor } from '../../../../enums/color';
|
|
2
3
|
interface Props {
|
|
3
4
|
open: boolean;
|
|
@@ -5,5 +6,5 @@ interface Props {
|
|
|
5
6
|
color: TColor;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare function Arrow({ open, focus, color, disabled }: Props):
|
|
9
|
+
declare function Arrow({ open, focus, color, disabled }: Props): React.JSX.Element;
|
|
9
10
|
export default Arrow;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
focus: boolean;
|
|
3
4
|
onClear: () => void;
|
|
4
5
|
}
|
|
5
|
-
declare function Clear({ focus, onClear }: Props):
|
|
6
|
+
declare function Clear({ focus, onClear }: Props): React.JSX.Element;
|
|
6
7
|
export default Clear;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TColor } from '../../../../enums/color';
|
|
2
3
|
interface Props {
|
|
3
4
|
content: string;
|
|
@@ -13,5 +14,5 @@ interface Props {
|
|
|
13
14
|
onClear: () => void;
|
|
14
15
|
onClick: () => void;
|
|
15
16
|
}
|
|
16
|
-
declare function DropdownToggleButton({ content, placeholder, disabled, color, stopPropagation, width, open, selected, errored, hasClearBtn, onClear, onClick, }: Props):
|
|
17
|
+
declare function DropdownToggleButton({ content, placeholder, disabled, color, stopPropagation, width, open, selected, errored, hasClearBtn, onClear, onClick, }: Props): React.JSX.Element;
|
|
17
18
|
export default DropdownToggleButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from '../../atoms/input';
|
|
3
|
+
import './number-input.scss';
|
|
4
|
+
export interface NumberInputProps extends Omit<InputProps, 'type' | 'value' | 'defaultValue' | 'onChange' | 'startNode' | 'endNode'> {
|
|
5
|
+
/** 제어할 숫자 문자열 */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** 비제어 방식의 초기 숫자 문자열 */
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
/** 값이 변경될 때 호출되는 함수 */
|
|
10
|
+
onValueChange?: (value: string) => void;
|
|
11
|
+
/** 허용할 최솟값 */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** 허용할 최댓값 */
|
|
14
|
+
max?: number;
|
|
15
|
+
/** 증감 단위 */
|
|
16
|
+
step?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberInput';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import './pagination.scss';
|
|
2
3
|
export interface PaginationProps {
|
|
3
4
|
/**
|
|
@@ -19,4 +20,4 @@ export interface PaginationProps {
|
|
|
19
20
|
buttonVisibility?: 'visible' | 'hidden';
|
|
20
21
|
label: string;
|
|
21
22
|
}
|
|
22
|
-
export declare function Pagination({ page, onPageChange, totalPage, className, buttonVisibility, label, }: PaginationProps):
|
|
23
|
+
export declare function Pagination({ page, onPageChange, totalPage, className, buttonVisibility, label, }: PaginationProps): React.JSX.Element;
|
|
@@ -31,4 +31,4 @@ export interface SearchInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
|
|
|
31
31
|
searchButtonContent?: string;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
export declare function SearchInput({ hiddenClearButton, className, filter, ...props }: SearchInputProps):
|
|
34
|
+
export declare function SearchInput({ hiddenClearButton, className, filter, ...props }: SearchInputProps): React.JSX.Element;
|
|
@@ -12,5 +12,5 @@ interface Props {
|
|
|
12
12
|
searchButtonContent?: string;
|
|
13
13
|
onSearch: () => void;
|
|
14
14
|
}
|
|
15
|
-
declare function FilterPopover({ parent, onClose, formats, resetButtonContent, onReset, searchButtonContent, onSearch, }: Props):
|
|
15
|
+
declare function FilterPopover({ parent, onClose, formats, resetButtonContent, onReset, searchButtonContent, onSearch, }: Props): React.JSX.Element;
|
|
16
16
|
export default FilterPopover;
|
|
@@ -13,5 +13,5 @@ interface Props {
|
|
|
13
13
|
onSearch: () => void;
|
|
14
14
|
inputWrapperRef: React.RefObject<HTMLDivElement>;
|
|
15
15
|
}
|
|
16
|
-
declare function Filter({ on, formats, hoverContent, resetButtonContent, onReset, searchButtonContent, onSearch, inputWrapperRef, }: Props):
|
|
16
|
+
declare function Filter({ on, formats, hoverContent, resetButtonContent, onReset, searchButtonContent, onSearch, inputWrapperRef, }: Props): React.JSX.Element;
|
|
17
17
|
export default Filter;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IColumnFormats } from './types';
|
|
2
3
|
interface Props {
|
|
3
4
|
hasCheckbox?: boolean;
|
|
@@ -5,5 +6,5 @@ interface Props {
|
|
|
5
6
|
formats: IColumnFormats[];
|
|
6
7
|
hasActionCol: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare function Colgroup({ hasCheckbox, hasRadio, formats, hasActionCol }: Props):
|
|
9
|
+
declare function Colgroup({ hasCheckbox, hasRadio, formats, hasActionCol }: Props): React.JSX.Element;
|
|
9
10
|
export default Colgroup;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TableProps } from './types';
|
|
2
3
|
import './table.scss';
|
|
3
|
-
export declare function Table({ rowIdKey, data, formats, maxHeight, sort, onSort, checkedIds, onCheck, radioCheckedId, onRadioCheck, filter, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, className, id, noData, loading, }: TableProps):
|
|
4
|
+
export declare function Table({ rowIdKey, data, formats, maxHeight, sort, onSort, checkedIds, onCheck, radioCheckedId, onRadioCheck, filter, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, disabledRows, className, id, noData, loading, }: TableProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
rowId: string;
|
|
3
4
|
hovered: boolean;
|
|
4
5
|
onClick: (rowId: string) => void;
|
|
5
6
|
}
|
|
6
|
-
declare function BinButtonTd({ rowId, hovered, onClick }: Props):
|
|
7
|
+
declare function BinButtonTd({ rowId, hovered, onClick }: Props): React.JSX.Element;
|
|
7
8
|
export default BinButtonTd;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
rowId: string;
|
|
3
4
|
hovered: boolean;
|
|
4
5
|
selected?: boolean;
|
|
5
6
|
onClick: (rowId: string) => void;
|
|
6
7
|
}
|
|
7
|
-
declare function ChartButtonTd({ rowId, hovered, selected, onClick }: Props):
|
|
8
|
+
declare function ChartButtonTd({ rowId, hovered, selected, onClick }: Props): React.JSX.Element;
|
|
8
9
|
export default ChartButtonTd;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
checked: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
3
5
|
onCheck: (checked: boolean) => void;
|
|
4
6
|
}
|
|
5
|
-
declare function CheckboxTd({ checked, onCheck }: Props):
|
|
7
|
+
declare function CheckboxTd({ checked, disabled, onCheck }: Props): React.JSX.Element;
|
|
6
8
|
export default CheckboxTd;
|
|
@@ -4,5 +4,5 @@ interface Props {
|
|
|
4
4
|
loadingContent?: React.ReactNode;
|
|
5
5
|
emptyBodyHeight: number;
|
|
6
6
|
}
|
|
7
|
-
declare function EmptyTr({ noDataMessage, loadingContent, emptyBodyHeight }: Props):
|
|
7
|
+
declare function EmptyTr({ noDataMessage, loadingContent, emptyBodyHeight }: Props): React.JSX.Element;
|
|
8
8
|
export default EmptyTr;
|
|
@@ -3,5 +3,5 @@ interface Props {
|
|
|
3
3
|
rowId: string;
|
|
4
4
|
kebabContent?: (rowId: string, onClose: () => void) => React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare function KebabMenuTd({ rowId, kebabContent }: Props):
|
|
6
|
+
declare function KebabMenuTd({ rowId, kebabContent }: Props): React.JSX.Element | null;
|
|
7
7
|
export default KebabMenuTd;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
checked: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
3
5
|
onCheck: (checked: boolean) => void;
|
|
4
6
|
}
|
|
5
|
-
declare function RadioTd({ checked, onCheck }: Props):
|
|
7
|
+
declare function RadioTd({ checked, disabled, onCheck }: Props): React.JSX.Element;
|
|
6
8
|
export default RadioTd;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TableProps } from '../types';
|
|
2
3
|
interface Props extends TableProps {
|
|
3
4
|
row: Record<string, any>;
|
|
4
5
|
hasActionCol: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare function Tr({ row, rowIdKey, formats, checkedIds, onCheck, radioCheckedId, onRadioCheck, hasActionCol, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, }: Props):
|
|
7
|
+
declare function Tr({ row, rowIdKey, formats, checkedIds, onCheck, radioCheckedId, onRadioCheck, hasActionCol, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, disabledRows, }: Props): React.JSX.Element;
|
|
7
8
|
export default Tr;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TableProps } from '../types';
|
|
2
3
|
interface Props extends TableProps {
|
|
3
4
|
hasActionCol: boolean;
|
|
4
5
|
emptyBodyHeight: number;
|
|
5
6
|
}
|
|
6
|
-
declare function TBody({ rowIdKey, formats, data, checkedIds, onCheck, radioCheckedId, onRadioCheck, hasActionCol, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, noData, loading, emptyBodyHeight, }: Props):
|
|
7
|
+
declare function TBody({ rowIdKey, formats, data, checkedIds, onCheck, radioCheckedId, onRadioCheck, hasActionCol, kebabMenu, binButton, chartButton, onRowClick, selectedRow, highlightRows, disabledRows, noData, loading, emptyBodyHeight, }: Props): React.JSX.Element;
|
|
7
8
|
export default TBody;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
toggle: boolean;
|
|
3
4
|
onToggle: () => void;
|
|
4
5
|
onReset?: () => void;
|
|
5
6
|
}
|
|
6
|
-
declare function FilterButtonsTh({ toggle, onToggle, onReset }: Props):
|
|
7
|
+
declare function FilterButtonsTh({ toggle, onToggle, onReset }: Props): React.JSX.Element;
|
|
7
8
|
export default FilterButtonsTh;
|
|
@@ -4,5 +4,5 @@ interface Props {
|
|
|
4
4
|
toggle: boolean;
|
|
5
5
|
filter?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare function FilterTh({ children, toggle, filter }: Props):
|
|
7
|
+
declare function FilterTh({ children, toggle, filter }: Props): React.JSX.Element;
|
|
8
8
|
export default FilterTh;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IColumnFormats, ISort } from '../types';
|
|
2
3
|
interface Props {
|
|
3
4
|
format: IColumnFormats;
|
|
4
5
|
sort?: ISort;
|
|
5
6
|
onSortClick: (columnName: string) => () => void;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
* 정렬 아닌거 마우스오버하면 쌍방 화살표
|
|
9
|
-
* 내림차순 정렬이면 아래 화살표
|
|
10
|
-
* 오름차순 정렬이면 위 화살표
|
|
11
|
-
* 색깔은 언제나 b500 #5c5c5c
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
declare function SortableColumn({ format, sort, onSortClick }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function SortableColumn({ format, sort, onSortClick }: Props): React.JSX.Element;
|
|
15
9
|
export default SortableColumn;
|
|
@@ -13,5 +13,5 @@ interface Props {
|
|
|
13
13
|
setFilterToggle: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
14
|
hasActionCol: boolean;
|
|
15
15
|
}
|
|
16
|
-
declare function THead({ formats, sort, onSortClick, hasCheckbox, allCheckbox, onAllCheck, hasRadio, filter, filterToggle, setFilterToggle, hasActionCol, }: Props):
|
|
16
|
+
declare function THead({ formats, sort, onSortClick, hasCheckbox, allCheckbox, onAllCheck, hasRadio, filter, filterToggle, setFilterToggle, hasActionCol, }: Props): React.JSX.Element;
|
|
17
17
|
export default THead;
|
|
@@ -106,6 +106,13 @@ export interface TableProps {
|
|
|
106
106
|
rowIds: string[];
|
|
107
107
|
className?: string;
|
|
108
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* 비활성화할 행과 추가 스타일 지정. 비활성 행은 행 클릭, 선택 및 내장 액션을 실행하지 않음.
|
|
111
|
+
*/
|
|
112
|
+
disabledRows?: {
|
|
113
|
+
rowIds: string[];
|
|
114
|
+
className?: string;
|
|
115
|
+
};
|
|
109
116
|
className?: string;
|
|
110
117
|
id?: string;
|
|
111
118
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'role' | 'type' | 'value'> {
|
|
3
|
+
/**
|
|
4
|
+
* 탭을 식별하는 고유한 값
|
|
5
|
+
*/
|
|
6
|
+
value: string;
|
|
7
|
+
/**
|
|
8
|
+
* 탭에 표시할 내용
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './tabs.scss';
|
|
3
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* 현재 선택된 탭의 값
|
|
6
|
+
*/
|
|
7
|
+
value: string;
|
|
8
|
+
/**
|
|
9
|
+
* 선택된 탭이 변경될 때 호출되는 함수
|
|
10
|
+
*/
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 탭이 컨테이너 너비를 동일한 비율로 채울지 여부
|
|
14
|
+
*/
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Tab 컴포넌트 목록
|
|
18
|
+
*/
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TInputTag } from '../../../types/input';
|
|
3
|
+
import './tag-input.scss';
|
|
4
|
+
export interface TagInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className' | 'value' | 'defaultValue' | 'onChange'> {
|
|
5
|
+
/** 표시할 태그 목록 */
|
|
6
|
+
tags: TInputTag[];
|
|
7
|
+
/** Enter 입력으로 태그 추가를 요청할 때 호출되는 함수 */
|
|
8
|
+
onTagAdd?: (value: string) => void;
|
|
9
|
+
/** 태그 삭제를 요청할 때 호출되는 함수 */
|
|
10
|
+
onTagRemove: (value: string) => void;
|
|
11
|
+
/** 상단 라벨 */
|
|
12
|
+
label?: string;
|
|
13
|
+
/** 하단 도움말 */
|
|
14
|
+
helperText?: React.ReactNode;
|
|
15
|
+
/** 오류 상태와 오류 문구 */
|
|
16
|
+
invalid?: {
|
|
17
|
+
on: boolean;
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IToastDetailItem } from '../../../types/toast';
|
|
2
3
|
interface DetailsProps {
|
|
3
4
|
details: IToastDetailItem[] | undefined;
|
|
4
5
|
}
|
|
5
|
-
export default function Details({ details }: DetailsProps):
|
|
6
|
+
export default function Details({ details }: DetailsProps): React.JSX.Element | null;
|
|
6
7
|
export {};
|
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
variant: TToastVariant;
|
|
5
|
-
content: string;
|
|
6
|
-
title?: {
|
|
7
|
-
main: string;
|
|
8
|
-
sub?: string;
|
|
9
|
-
};
|
|
10
|
-
closeButton?: {
|
|
11
|
-
content: string;
|
|
12
|
-
onClick: () => void;
|
|
13
|
-
};
|
|
14
|
-
revert?: {
|
|
15
|
-
label: string;
|
|
16
|
-
onRevert: () => void;
|
|
17
|
-
};
|
|
18
|
-
details?: IToastDetailItem[];
|
|
19
|
-
disableAutoOff?: boolean;
|
|
20
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IToast } from '../../../types/toast';
|
|
3
|
+
export type { IToast } from '../../../types/toast';
|
|
21
4
|
export interface ToastProps {
|
|
22
5
|
id: string;
|
|
23
6
|
/**
|
|
24
7
|
* @param variant 'success', 'warning', 'danger'
|
|
25
8
|
* @param content 컴포넌트에 들어갈 한 줄짜리 내용(string)
|
|
9
|
+
* @param layout 'inline', 'stacked' (기본값: 'inline')
|
|
26
10
|
* @param title {main: string, sub?: string}
|
|
27
11
|
* @param closeButton 닫기 버튼 커스텀 (default는 x 아이콘 버튼) {content: string, onClick: () => void}
|
|
28
12
|
* @param details details, summary 태그를 활용하여 노출할 내용 (legacy)
|
|
@@ -32,4 +16,4 @@ export interface ToastProps {
|
|
|
32
16
|
drop: (id: string) => void;
|
|
33
17
|
className?: string;
|
|
34
18
|
}
|
|
35
|
-
export declare function Toast({ id, toast, drop, className }: ToastProps):
|
|
19
|
+
export declare function Toast({ id, toast, drop, className }: ToastProps): React.JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { IToast } from '
|
|
2
|
+
import { IToast } from '../../../types/toast';
|
|
3
3
|
interface ToastContextProps {
|
|
4
4
|
toasts: {
|
|
5
5
|
[id: string]: IToast;
|
|
@@ -10,6 +10,6 @@ interface ToastContextProps {
|
|
|
10
10
|
declare const ToastContext: React.Context<ToastContextProps | undefined>;
|
|
11
11
|
declare function ToastProvider({ children }: {
|
|
12
12
|
children: ReactNode;
|
|
13
|
-
}):
|
|
13
|
+
}): React.JSX.Element;
|
|
14
14
|
export declare const useToast: () => ToastContextProps;
|
|
15
15
|
export { ToastContext, ToastProvider };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IToastDetailItem, TToastLayout } from '../../../types/toast';
|
|
2
3
|
import { TToastVariant } from '../../../enums/variant';
|
|
3
4
|
import './toast.scss';
|
|
4
5
|
export interface ToastStyleProps {
|
|
5
6
|
variant: TToastVariant;
|
|
6
7
|
content: string;
|
|
8
|
+
layout?: TToastLayout;
|
|
7
9
|
title?: {
|
|
8
10
|
main: string;
|
|
9
11
|
sub?: string;
|
|
@@ -19,4 +21,4 @@ export interface ToastStyleProps {
|
|
|
19
21
|
details?: IToastDetailItem[];
|
|
20
22
|
onClose: () => void;
|
|
21
23
|
}
|
|
22
|
-
export declare function ToastStyle({ variant, content, title, closeButton, revert, details, onClose, }: ToastStyleProps):
|
|
24
|
+
export declare function ToastStyle({ variant, content, layout, title, closeButton, revert, details, onClose, }: ToastStyleProps): React.JSX.Element;
|
|
@@ -2,9 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { TTheme } from '../../enums/color';
|
|
3
3
|
import './reset.scss';
|
|
4
4
|
import './style-provider.scss';
|
|
5
|
-
interface
|
|
5
|
+
export interface StyleProviderProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* 앱 테마입니다. `data-theme`에 반영되어 brand semantic(`--p`, `--maru-*-brand-*`)을 결정합니다.
|
|
9
|
+
* - `navy`: Figma Brand 팔레트
|
|
10
|
+
* - `blue` / `green`: Figma brand semantic 확정 전 provisional 값
|
|
11
|
+
*/
|
|
7
12
|
theme: TTheme;
|
|
8
13
|
}
|
|
9
|
-
export declare function StyleProvider({ children, theme }:
|
|
10
|
-
export {};
|
|
14
|
+
export declare function StyleProvider({ children, theme }: StyleProviderProps): React.JSX.Element;
|